From 2c2217c4b9af3a2848fca0acb48f23920ae6dcf0 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 19 Dec 2014 09:56:58 +0200 Subject: [PATCH] Update clean-css to v3.0.1. --- assets/cleancss-browser.js | 10 ++++++---- dist/htmlminifier.js | 8 ++++---- dist/htmlminifier.min.js | 2 +- package.json | 2 +- src/htmlminifier.js | 8 ++++---- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/assets/cleancss-browser.js b/assets/cleancss-browser.js index eba2782..12baecc 100644 --- a/assets/cleancss-browser.js +++ b/assets/cleancss-browser.js @@ -1,4 +1,6 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.CleanCSS=e()}}(function(){var e;return function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);throw new Error("Cannot find module '"+a+"'")}var l=r[a]={exports:{}};e[a][0].call(l.exports,function(t){var r=e[a][1][t];return i(r?r:t)},l,l.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a0){var o=this,a=t?r.nextTick:function(e){return e()};return a(function(){return new u(o.context,i.inliner).process(e,{localOnly:!t,root:i.root||r.cwd(),relativeTo:i.relativeTo,whenDone:function(e){return y.call(o,e,t)}})})}return y.call(this,e,t)};var y=function(e,t){var n,u=this.stats,b=this.options,y=this.context,w=this.lineBreak,x=new c(y,"keepSpecialComments"in b?b.keepSpecialComments:"*",b.keepBreaks,w),k=new h,_=new p,O=new d(y),E=new g;b.debug&&(this.startedAt=r.hrtime(),this.stats.originalSize=e.length);var S=function(){"function"==typeof arguments[0]?arguments[0]():e=e.replace.apply(e,arguments)};if(b.benchmark){var A=S;S=function(e,t){var n="function"==typeof e?/function (\w+)\(/.exec(e.toString())[1]:e,i=r.hrtime();A(e,t);var o=r.hrtime(i);console.log("%d ms: "+n,1e3*o[0]+o[1]/1e6)}}b.debug&&(n=r.hrtime(),u.originalSize=e.length),S(function(){e=x.escape(e)}),S(/\\(\r\n|\n)/gm,""),S(/url\((['"])([^\)]+)['"]\)/g,function(e,t,r){var n=0===r.indexOf("data:")&&null===r.match(/data:\w+\/[^;]+;base64,/);return null!==r.match(/[ \t]/g)||n?"url("+t+r+t+")":"url("+r+")"}),S(function(){e=E.process(e)}),S(/@(\-moz\-|\-o\-|\-webkit\-)?keyframes ([^{]+)/g,function(e,t,r){return t=t||"","@"+t+"keyframes "+(r.indexOf(" ")>-1?r:r.replace(/['"]/g,""))}),S(/progid:DXImageTransform\.Microsoft\.(Alpha|Chroma)(\([^\)]+\))([;}'"])/g,function(e,t,r,n){return t.toLowerCase()+r+n}),S(function(){e=k.escape(e)}),S(/\[([^\]]+)\]/g,function(e,t){var r=t.indexOf("="),n=t.indexOf("'"),i=t.indexOf('"');if(0>r&&0>n&&0>i)return e;if(0===n||0===i)return e;var o=t.substring(0,r),a=t.substring(r+1,t.length);return/^['"](?:[a-zA-Z][a-zA-Z\d\-_]+)['"]$/.test(a)?"["+o+"="+a.substring(1,a.length-1)+"]":e}),S(function(){e=_.escape(e)}),S(function(){e=O.escape(e)}),S(/@charset [^;]+;/gi,function(e){return e.indexOf("@charset")>-1?e:""}),S(/\[([^\]]+)\]/g,function(e){return e.replace(/\s/g,"")}),S(/[\r]?\n/g," "),S(/[\t ]+/g," "),S(/;[ ]?;+/g,";"),S(/ (?:\r\n|\n)/g,w),S(/(?:\r\n|\n)+/g,w),S(/ ([+~>]) /g,"$1"),S(/([!\(\{\}:;=,\n]) /g,"$1"),S(/ ([!\)\{\};=,\n])/g,"$1"),S(/(?:\r\n|\n)\}/g,"}"),S(/([\{;,])(?:\r\n|\n)/g,"$1"),S(/ :([^\{\};]+)([;}])/g,":$1$2"),S(/progid:[^(]+\(([^\)]+)/g,function(e){return e.replace(/,/g,", ")}),S(/;\}/g,"}"),S(function(){e=new o(e).process()}),S(function(){e=new a(e).process()}),S(function(){e=new s(e).process()}),S(function(){e=new i(e).process()}),S(/(font\-weight|font):(normal|bold)([ ;\}!])(\w*)/g,function(e,t,r,n,i){return" "==n&&(i.indexOf("/")>-1||"normal"==i||/[1-9]00/.test(i))?e:"normal"==r?t+":400"+n+i:"bold"==r?t+":700"+n+i:e});var R=/(\s|:|,|\()\-0([^\.])/g;S(R,"$10$2"),S(R,"$10$2"),S(/(\s|:|,)0+([1-9])/g,"$1$2");var I="roundingPrecision"in b?b.roundingPrecision:2,V=Math.pow(10,I);S(new RegExp("(\\d*\\.\\d{"+(I+1)+",})px","g"),function(e,t){return Math.round(parseFloat(t)*V)/V+"px"});var j=/(\D)\.0+(\D)/g;S(j,"$10$2"),S(j,"$10$2"),S(/\.([1-9]*)0+(\D)/g,function(e,t,r){return(t.length>0?".":"")+t+r});var C=["px","em","ex","cm","mm","in","pt","pc","%"];if(-1==["ie7","ie8"].indexOf(b.compatibility)&&C.push("rem"),S(new RegExp("(\\s|:|,)\\-?0(?:"+C.join("|")+")","g"),"$10"),S(new RegExp("(\\s|:|,)\\-?(\\d+)\\.(\\D)","g"),"$1$2$3"),S(new RegExp("rect\\(0(?:"+C.join("|")+")","g"),"rect(0"),S(/(rgb|rgba|hsl|hsla)\(([^\)]+)\)/g,function(e,t,r){var n=r.split(","),i="hsl"==t||"hsla"==t||n[0].indexOf("%")>-1;return i?(-1==n[1].indexOf("%")&&(n[1]+="%"),-1==n[2].indexOf("%")&&(n[2]+="%"),t+"("+n.join(",")+")"):e}),b.compatibility||S(/:([^;]*)(?:rgba|hsla)\(0,0%?,0%?,0\)/g,function(e,t){return new v(",").split(e).pop().indexOf("gradient(")>-1?e:":"+t+"transparent"}),S(/outline:none/g,"outline:0"),S(/background:(?:none|transparent)([;}])/g,"background:0 0$1"),S(/box-shadow:0 0 0 0([^\.])/g,"box-shadow:0 0$1"),S(/:0 0 0 0([^\.])/g,":0$1"),S(/([: ,=\-])0\.(\d)/g,"$1.$2"),S(/rect\(\s?0(\s|,)0[ ,]0[ ,]0\s?\)/g,"rect(0$10$10$10)"),"ie7"!=b.compatibility&&(S(/([^,]?)(\*[^ \+\{]*\+html[^\{]*)(\{[^\}]*\})/g,function(e,t,r,n){var i=new v(",").split(r).filter(function(e){return!/^\*[^ \+\{]*\+html/.test(e)});return i.length>0?t+i.join(",")+n:t}),S(/\*([\.#:\[])/g,"$1")),S(/calc\([^\}]+\}/g,function(e){return e.replace(/\+/g," + ")}),b.compatibility||S(/([;\{])[\*_][\w\-]+:[^;\}]+/g,"$1"),b.noAdvanced?b.keepBreaks&&S(/\}/g,"}"+w):S(function(){e=new m(e,y,{keepBreaks:b.keepBreaks,lineBreak:w,compatibility:b.compatibility,aggressiveMerging:!b.noAggressiveMerging}).process()}),S(/(border-\w+-\w+-radius:\S+)\s+\/\s+/g,"$1/"),S(/(border-\w+-\w+-radius):([^;\}]+)/g,function(e,t,r){var n=r.split("/");return n.length>1&&n[0]==n[1]?t+":"+n[0]:e}),S(function(){e=O.restore(e)}),S(function(){e=b.noRebase?e:new l(b,y).process(e)}),S(function(){e=_.restore(e)}),S(function(){e=x.restore(e)}),S(function(){e=k.restore(e)}),S(function(){var t=e.match(/@charset [^;]+;/),r=t?t[0]:null;r&&(e=r+(b.keepBreaks?w:"")+e.replace(new RegExp("@charset [^;]+;("+w+")?","g"),"").trim())}),b.noAdvanced&&S(function(){e=new f(e).process()}),e=e.trim(),b.debug){var L=r.hrtime(n);u.timeSpent=~~(1e3*L[0]+L[1]/1e6),u.efficiency=1-e.length/u.originalSize,u.minifiedSize=e.length}return t?t.call(this,this.context.errors.length>0?this.context.errors:null,e):e}}).call(this,e("Zbi7gb"),e("buffer").Buffer)},{"./colors/hsl-to-hex":3,"./colors/long-to-short-hex":4,"./colors/rgb-to-hex":5,"./colors/shortener":6,"./images/url-rebase":7,"./imports/inliner":9,"./selectors/empty-removal":17,"./selectors/optimizer":18,"./text/comments":20,"./text/expressions":22,"./text/free":23,"./text/name-quotes":24,"./text/splitter":26,"./text/urls":27,Zbi7gb:41,buffer:29}],3:[function(e,t){t.exports=function(e){var t=function(e,t,n){var i,o,a;if(e%=360,0>e&&(e+=360),e=~~e/360,0>t?t=0:t>100&&(t=100),t=~~t/100,0>n?n=0:n>100&&(n=100),n=~~n/100,0===t)i=o=a=n;else{var s=.5>n?n*(1+t):n+t-n*t,u=2*n-s;i=r(u,s,e+1/3),o=r(u,s,e),a=r(u,s,e-1/3)}return[~~(255*i),~~(255*o),~~(255*a)]},r=function(e,t,r){return 0>r&&(r+=1),r>1&&(r-=1),1/6>r?e+6*(t-e)*r:.5>r?t:2/3>r?e+(t-e)*(2/3-r)*6:e};return{process:function(){return e.replace(/hsl\((-?\d+),(-?\d+)%?,(-?\d+)%?\)/g,function(e,r,n,i){var o=t(r,n,i),a=o[0].toString(16),s=o[1].toString(16),u=o[2].toString(16);return"#"+((1==a.length?"0":"")+a)+((1==s.length?"0":"")+s)+((1==u.length?"0":"")+u)})}}}},{}],4:[function(e,t){t.exports=function(e){return{process:function(){return e.replace(/([,: \(])#([0-9a-f]{6})/gi,function(e,t,r){return r[0]==r[1]&&r[2]==r[3]&&r[4]==r[5]?t+"#"+r[0]+r[2]+r[4]:t+"#"+r})}}}},{}],5:[function(e,t){t.exports=function(e){return{process:function(){return e.replace(/rgb\((\-?\d+),(\-?\d+),(\-?\d+)\)/g,function(e,t,r,n){return t=Math.max(0,Math.min(~~t,255)),r=Math.max(0,Math.min(~~r,255)),n=Math.max(0,Math.min(~~n,255)),"#"+("00000"+(t<<16|r<<8|n).toString(16)).slice(-6)})}}}},{}],6:[function(e,t){t.exports=function(e){var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},r={},n={};for(var i in t){var o=t[i];i.length0?r.join("")+e.substring(o,e.length):e},_rebased:function(e,t){var o,a="/"==e[0]||"#"==e[0]||".css"==e.substring(e.length-4)||0===e.indexOf("data:")||null!==/^https?:\/\//.exec(e)||null!==/__\w+__/.exec(e);return a?e:/https?:\/\//.test(t.toBase)?i.resolve(t.toBase,e):(o=t.absolute?n.resolve(n.join(t.fromBase,e)).replace(t.toBase,""):n.relative(t.toBase,n.join(t.fromBase,e)),"win32"==r.platform?o.replace(/\\/g,"/"):o)}}}).call(this,e("Zbi7gb"))},{Zbi7gb:41,path:40,url:60}],9:[function(e,t){var r=e("fs"),n=e("path"),i=e("http"),o=e("https"),a=e("url"),s=e("../images/url-rewriter"),u=e("../text/splitter.js"),l=function(e,t){var r={};for(var n in e)r[n]=e[n];for(var i in t)r[i]=t[i];return r};t.exports=function(e,t){var f={timeout:5e3,request:{}},c=l(f,t||{}),h=function(e,t){if(t.shallow)return t.shallow=!1,t._shared.done.push(e),d(t);t._shared=t._shared||{done:[],left:[]};var r=t._shared,n=0,i=0,o=0,a=g(e),s=v(e);for(t.relativeTo=t.relativeTo||t.root,t._baseRelativeTo=t._baseRelativeTo||t.relativeTo,t.visited=t.visited||[];i-1&&-1==n?r:-1==r&&n>-1?n:Math.min(r,n)},d=function(e){return e._shared.left.length>0?h.apply(null,e._shared.left.shift()):e.whenDone(e._shared.done.join(""))},g=function(e){var t=/(\/\*(?!\*\/)[\s\S]*?\*\/)/,r=0,n=0,i=!1,o=function(a){var s,u=0,l=0,f=0,c=0;return i?!1:a>r&&n>a?!0:(s=e.match(t))?(r=u=s.index,l=u+s[0].length,c=l+n,f=c-s[0].length,e=e.substring(l),n=c,a>c?o(a):c>a&&a>f):(i=!0,!1)};return o},v=function(e){for(var t=g(e),r=-1;;)if(r=e.indexOf("{",r+1),-1==r||!t(r))break;return function(e){return r>-1?e>r:!1}},m=function(t,r,n,i){i.shallow=t.indexOf("@shallow")>0;var o=t.substring(p(t,r)+"@import".length+1,n).replace(/@shallow\)$/,")").trim(),a=0===o.indexOf("url("),s=a?4:0,l=/^['"]/.exec(o.substring(s,s+2)),f=l?o.indexOf(l[0],s+1):new u(" ").split(o)[0].length-(a?1:0),c=o.substring(s,f).replace(/['"]/g,"").replace(/\)$/,"").trim(),h=o.substring(f+1).replace(/^\)/,"").trim(),g=i.isRemote||/^(http|https):\/\//.test(c)||/^\/\//.test(c);if(i.localOnly&&g)return e.warnings.push('Ignoring remote @import declaration of "'+c+'" as no callback given.'),w(c,h,i),d(i);var v=g?b:y;return v(c,h,i)},b=function(t,r,n){var u=/^https?:\/\//.test(t)?t:a.resolve(n.relativeTo,t);if(0===u.indexOf("//")&&(u="http:"+u),n.visited.indexOf(u)>-1)return d(n);e.debug&&console.error("Inlining remote stylesheet: "+u),n.visited.push(u);var f=0===u.indexOf("http://")?i.get:o.get,p=!1,g=function(t){e.errors.push('Broken @import declaration of "'+u+'" - '+t),w(u,r,n),d(n)},v=l(a.parse(u),c.request);f(v,function(e){if(e.statusCode<200||e.statusCode>399)return g("error "+e.statusCode);if(e.statusCode>299){var t=a.resolve(u,e.headers.location);return b(t,r,n)}var i=[],o=a.parse(u);e.on("data",function(e){i.push(e.toString())}),e.on("end",function(){var e=i.join("");e=s.process(e,{toBase:u}),r.length>0&&(e="@media "+r+"{"+e+"}"),h(e,{isRemote:!0,relativeTo:o.protocol+"//"+o.host,_shared:n._shared,whenDone:n.whenDone,visited:n.visited,shallow:n.shallow})})}).on("error",function(e){g(e.message)}).on("timeout",function(){p||(g("timeout"),p=!0)}).setTimeout(c.timeout)},y=function(t,i,o){var a="/"==t[0]?o.root:o.relativeTo,u=n.resolve(n.join(a,t));if(!r.existsSync(u)||!r.statSync(u).isFile())return e.errors.push('Broken @import declaration of "'+t+'"'),d(o);if(o.visited.indexOf(u)>-1)return d(o);e.debug&&console.error("Inlining local stylesheet: "+u),o.visited.push(u);var l=r.readFileSync(u,"utf8"),f=n.dirname(u);return l=s.process(l,{relative:!0,fromBase:f,toBase:o._baseRelativeTo}),i.length>0&&(l="@media "+i+"{"+l+"}"),h(l,{root:o.root,relativeTo:f,_baseRelativeTo:o._baseRelativeTo,_shared:o._shared,visited:o.visited,whenDone:o.whenDone,localOnly:o.localOnly,shallow:o.shallow})},w=function(e,t,r){var n="@import url("+e+")"+(t.length>0?" "+t:"")+";";r._shared.done.push(n)};return{process:h}}},{"../images/url-rewriter":8,"../text/splitter.js":26,fs:28,http:34,https:38,path:40,url:60}],10:[function(e,t){var r=e("./processable"),n=e("./override-compactor"),i=e("./shorthand-compactor");t.exports=function(e,t,o){var a={"animation-delay":["animation"],"animation-direction":["animation"],"animation-duration":["animation"],"animation-fill-mode":["animation"],"animation-iteration-count":["animation"],"animation-name":["animation"],"animation-play-state":["animation"],"animation-timing-function":["animation"],"-moz-animation-delay":["-moz-animation"],"-moz-animation-direction":["-moz-animation"],"-moz-animation-duration":["-moz-animation"],"-moz-animation-fill-mode":["-moz-animation"],"-moz-animation-iteration-count":["-moz-animation"],"-moz-animation-name":["-moz-animation"],"-moz-animation-play-state":["-moz-animation"],"-moz-animation-timing-function":["-moz-animation"],"-o-animation-delay":["-o-animation"],"-o-animation-direction":["-o-animation"],"-o-animation-duration":["-o-animation"],"-o-animation-fill-mode":["-o-animation"],"-o-animation-iteration-count":["-o-animation"],"-o-animation-name":["-o-animation"],"-o-animation-play-state":["-o-animation"],"-o-animation-timing-function":["-o-animation"],"-webkit-animation-delay":["-webkit-animation"],"-webkit-animation-direction":["-webkit-animation"],"-webkit-animation-duration":["-webkit-animation"],"-webkit-animation-fill-mode":["-webkit-animation"],"-webkit-animation-iteration-count":["-webkit-animation"],"-webkit-animation-name":["-webkit-animation"],"-webkit-animation-play-state":["-webkit-animation"],"-webkit-animation-timing-function":["-webkit-animation"],"background-clip":["background"],"background-origin":["background"],"border-color":["border"],"border-style":["border"],"border-width":["border"],"border-bottom":["border"],"border-bottom-color":["border-bottom","border-color","border"],"border-bottom-style":["border-bottom","border-style","border"],"border-bottom-width":["border-bottom","border-width","border"],"border-left":["border"],"border-left-color":["border-left","border-color","border"],"border-left-style":["border-left","border-style","border"],"border-left-width":["border-left","border-width","border"],"border-right":["border"],"border-right-color":["border-right","border-color","border"],"border-right-style":["border-right","border-style","border"],"border-right-width":["border-right","border-width","border"],"border-top":["border"],"border-top-color":["border-top","border-color","border"],"border-top-style":["border-top","border-style","border"],"border-top-width":["border-top","border-width","border"],"font-family":["font"],"font-size":["font"],"font-style":["font"],"font-variant":["font"],"font-weight":["font"],"list-style-image":["list-style"],"list-style-position":["list-style"],"list-style-type":["list-style"],"margin-bottom":["margin"],"margin-left":["margin"],"margin-right":["margin"],"margin-top":["margin"],"outline-color":["outline"],"outline-style":["outline"],"outline-width":["outline"],"padding-bottom":["padding"],"padding-left":["padding"],"padding-right":["padding"],"padding-top":["padding"],"transition-delay":["transition"],"transition-duration":["transition"],"transition-property":["transition"],"transition-timing-function":["transition"],"-moz-transition-delay":["-moz-transition"],"-moz-transition-duration":["-moz-transition"],"-moz-transition-property":["-moz-transition"],"-moz-transition-timing-function":["-moz-transition"],"-o-transition-delay":["-o-transition"],"-o-transition-duration":["-o-transition"],"-o-transition-property":["-o-transition"],"-o-transition-timing-function":["-o-transition"],"-webkit-transition-delay":["-webkit-transition"],"-webkit-transition-duration":["-webkit-transition"],"-webkit-transition-property":["-webkit-transition"],"-webkit-transition-timing-function":["-webkit-transition"]},s="\\9",u={};for(var l in a)for(var f=0;fi;i++){var u=r[i];if(""!==u){var l=u.indexOf(":"),f=u.substring(0,l),c=u.substring(l+1);""!==c?n.push([f,c,u.indexOf("!important")>-1,u.indexOf(s,l+1)===u.length-s.length]):o.warnings.push("Empty property '"+f+"' inside '"+t+"' selector. Ignoring.")}}return n}},d=function(n,i){var o=[],s=[],l=null,f={},c=function(e,t){for(var r=u[e],n=0,i=r.length;i>n;n++)for(var a=0;a-1};e:for(var p=0,d=n.length;d>p;p++){var g=n[p],v=g[0],m=g[1],b=g[2],y=g[3],w=!("-ms-filter"!=v&&"filter"!=v||"background"!=l&&"background-image"!=l)?l:v,x=0;if(e||!y){if(t&&w!=l||h(p))for(;;){if(x=s.indexOf(w,x),-1==x)break;var k=o[x],_=k[2],O=k[3];if(_&&!b)continue e;if(e&&!O&&y)break;var E=r.processable[w];if(!y&&!O&&E&&E.canOverride&&!E.canOverride(n[x][1],m))break;o.splice(x,1),s.splice(x,1)}o.push(g),s.push(w),f[w]&&c(w,b);for(var S=0,A=a[w]||[],R=A.length;R>S;S++)f[A[S]]=!0;l=w}}return o},g=function(e){for(var t=[],r=0,n=e.length;n>r;r++)t.push(e[r][0]+":"+e[r][1]);return t.join(";")},v=function(t){var o=r.processable,a=r.Token,s=a.tokenize(t);return s=n.compactOverrides(s,o,a,e),s=i.compactShorthands(s,!1,o,a),s=i.compactShorthands(s,!0,o,a),a.detokenize(s)};return{process:function(e,t,n,i){var o=e,a=p(e,i);if(a){var s=d(a,t);o=g(s)}return!n&&r.implementedFor.test(o)&&(o=v(o)),o}}}},{"./override-compactor":11,"./processable":12,"./shorthand-compactor":14}],11:[function(e,t){var r=e("./validator");t.exports=function(){var e=function(e,t){return e===t},t=function(t,n,i,o){function a(e,t){var r=e.clone();return r.isDirty=!0,r.isShorthand=!0,r.components=[],e.components.forEach(function(e){var n=e.clone();e.prop==t.prop&&(n.value=t.value),r.components.push(n)}),i.getDetokenizedLength([e,t])>=i.getDetokenizedLength([r])}var s,u,l,f,c,h,p,d,g,v=function(e){return e.prop===l.prop},m=function(e){return e.prop===f.prop};for(s=t,c=0;(h=s.length-1-c)>=0;c++){l=s[h],u=n[l.prop]&&n[l.prop].canOverride||e,d=s,s=[];for(var b=!1,y=d.length,w=0;y>w;w++)if(f=d[w],f!==l||b)if(w>h&&!l.isImportant)s.push(f);else if(!f.isImportant||l.isImportant)if(l.isShorthand&&!f.isShorthand&&f.isComponentOf(l))g=l.components.filter(m)[0],u=n[f.prop]&&n[f.prop].canOverride||e,u(f.value,g.value)||s.push(f);else if(f.isShorthand&&!l.isShorthand&&l.isComponentOf(f)){if(g=f.components.filter(v)[0],u(g.value,l.value)){if(o){var x=!1;for(p=0;p4)return[t];i.lengtho;o++)t.value=r[o],i.push(e(t));for(var s=0,u=i[0].length;u>s;s++){for(var l=0,f=i.length,c=[];f>l;l++)c.push(i[l][s].value);i[0][s].value=c.join(",")}return i[0]}},o.background=function(e){var t=h.makeDefaults(["background-image","background-position","background-size","background-repeat","background-attachment","background-color"],e.isImportant),i=t[0],o=t[1],a=t[2],u=t[3],l=t[4],f=t[5],c=!1;if("inherit"===e.value)return f.value=i.value=u.value=o.value=a.value=l.value="inherit",t;var p=new n(" ").split(e.value);if(0===p.length)return t;for(var d=p.length-1;d>=0;d--){var g=p[d];if(r.isValidBackgroundAttachment(g))l.value=g;else if(r.isValidBackgroundRepeat(g))u.value=g;else if(r.isValidBackgroundPositionPart(g)||r.isValidBackgroundSizePart(g))if(d>0){var v=p[d-1];if(v.indexOf("/")>0){var m=new n("/").split(v);a.value=m.pop()+" "+g,p[d-1]=m.pop()}else d>1&&"/"==p[d-2]?(a.value=v+" "+g,d-=2):"/"==p[d-1]?a.value=g:(o.value=g+(c?" "+o.value:""),c=!0)}else o.value=g+(c?" "+o.value:""),c=!0;else if(r.isValidBackgroundPositionAndSize(g)){var b=new n("/").split(g);a.value=b.pop(),o.value=b.pop()}else f.value!=s[f.prop].defaultValue&&"none"!=f.value||!r.isValidColor(g)?(r.isValidUrl(g)||r.isValidFunction(g))&&(i.value=g):f.value=g}return t},o.listStyle=function(e){var t=h.makeDefaults(["list-style-type","list-style-position","list-style-image"],e.isImportant),i=t[0],o=t[1],a=t[2];if("inherit"===e.value)return i.value=o.value=a.value="inherit",t;var s=new n(" ").split(e.value),u=0;return u=1&&(f=c.filter(function(e){return"inherit"!==e&&r.isValidOutlineWidth(e)}),f.length&&(l.value=f[0],c.splice(c.indexOf(f[0]),1))),c.length>=1&&(f=c.filter(function(e){return"inherit"!==e&&r.isValidOutlineStyle(e)}),f.length&&(u.value=f[0],c.splice(c.indexOf(f[0]),1))),c.length>=1&&(f=c.filter(function(e){return r.isValidOutlineColor(e)}),f.length&&(s.value=f[0],c.splice(c.indexOf(f[0]),1))),a)},o.outline=function(e){return o._widthStyleColor(e,"outline",["color","style","width"])},o.border=function(e){return o._widthStyleColor(e,"border",["width","style","color"])},o.borderRadius=function(e){var t=e.value.split("/");if(1==t.length)return o.fourBySpaces(e);var r=e.clone(),n=e.clone();r.value=t[0],n.value=t[1];for(var i=o.fourBySpaces(r),a=o.fourBySpaces(n),s=0;4>s;s++)i[s].value=[i[s].value,a[s].value];return i};var a={fourUnits:function(e,t,r){t[0].isIrrelevant&&(t[0].value=t[2].value),t[2].isIrrelevant&&(t[2].value=t[0].value),t[1].isIrrelevant&&(t[1].value=t[3].value),t[3].isIrrelevant&&(t[3].value=t[1].value),t[0].isIrrelevant&&t[2].isIrrelevant&&(t[0].value=t[2].value=t[1].value===t[3].value?t[1].value:"0"),t[1].isIrrelevant&&t[3].isIrrelevant&&(t[1].value=t[3].value=t[0].value===t[2].value?t[0].value:"0");var n=new h(e,t[0].value,r);return n.granularValues=[],n.granularValues[t[0].prop]=t[0].value,n.granularValues[t[1].prop]=t[1].value,n.granularValues[t[2].prop]=t[2].value,n.granularValues[t[3].prop]=t[3].value,t[0].isIrrelevant&&t[1].isIrrelevant&&t[2].isIrrelevant&&t[3].isIrrelevant?(n.value=s[e].shortestValue||s[e].defaultValue,n):t[0].value===t[1].value&&t[0].value===t[2].value&&t[0].value===t[3].value?n:(n.value+=" "+t[1].value,t[0].value===t[2].value&&t[1].value===t[3].value?n:(n.value+=" "+t[2].value,t[1].value===t[3].value?n:(n.value+=" "+t[3].value,n)))},bySpacesOmitDefaults:function(e,t,r,n){var i=new h(e,"",r),o=t.filter(function(e){return e.isIrrelevant});if(o.length===t.length)return i.isIrrelevant=!0,i.value=s[e].shortestValue||s[e].defaultValue,i;for(var a=s[e].defaultValue,u=0;uu;u++){s.push([]);for(var l=0;lu;u++){for(var p=[],d=0,g=s[u].length;g>d;d++){var v=r[d].clone();v.value=s[u][d],p.push(v)}var m={partsCount:a,position:u},b=e(t,p,i,m);h.push(b.value),c||(c=b)}return c.value=h.join(","),c}},takeCareOfInherit:function(e){return function(t,r,n,i){var o,a=[],s=[],u=[];for(o=0;o0){var f=[new h(t,"inherit",n)].concat(s),c=[e(t,u,n,i)].concat(a),p=h.getDetokenizedLength(f),d=h.getDetokenizedLength(c);return d>p?f:c}return e(t,r,n,i)}},borderRadius:function(e,t,r){for(var n=[],i=[],o=0,s=t.length;s>o;o++){var u=t[o],l=u.clone();i.push(l),Array.isArray(u.value)&&(u.value.length>1&&n.push({prop:u.prop,value:u.value[1],isImportant:u.isImportant}),l.value=u.value[0])}var f=a.takeCareOfInherit(a.fourUnits)(e,i,r);if(n.length>0){var c=a.takeCareOfInherit(a.fourUnits)(e,n,r);f.value!=c.value&&(f.value+="/"+c.value)}return f}},s={color:{canOverride:i.color,defaultValue:"transparent",shortestValue:"red"},background:{components:["background-image","background-position","background-size","background-repeat","background-attachment","background-color"],breakUp:o.commaSeparatedMulitpleValues(o.background),putTogether:a.commaSeparatedMulitpleValues(a.takeCareOfInherit(a.bySpacesOmitDefaults)),defaultValue:"0 0",shortestValue:"0"},"background-color":{canOverride:i.color,defaultValue:"transparent",multiValueLastOnly:!0,shortestValue:"red"},"background-image":{canOverride:i.backgroundImage,defaultValue:"none"},"background-repeat":{canOverride:i.always,defaultValue:"repeat"},"background-position":{canOverride:i.always,defaultValue:"0 0",shortestValue:"0"},"background-size":{canOverride:i.always,defaultValue:"auto",shortestValue:"0 0",prefixShorthandValueWith:"/",shorthandFollows:"background-position"},"background-attachment":{canOverride:i.always,defaultValue:"scroll"},border:{breakUp:o.border,canOverride:i.border,components:["border-width","border-style","border-color"],defaultValue:"none",putTogether:a.takeCareOfInherit(a.bySpacesOmitDefaults)},"border-color":{canOverride:i.color,defaultValue:"none"},"border-style":{canOverride:i.always,defaultValue:"none"},"border-width":{canOverride:i.unit,defaultValue:"medium",shortestValue:"0"},"list-style":{components:["list-style-type","list-style-position","list-style-image"],canOverride:i.always,breakUp:o.listStyle,putTogether:a.takeCareOfInherit(a.bySpacesOmitDefaults),defaultValue:"outside",shortestValue:"none"},"list-style-type":{canOverride:i.always,shortestValue:"none",defaultValue:"__hack"},"list-style-position":{canOverride:i.always,defaultValue:"outside",shortestValue:"inside"},"list-style-image":{canOverride:i.always,defaultValue:"none"},outline:{components:["outline-color","outline-style","outline-width"],breakUp:o.outline,putTogether:a.takeCareOfInherit(a.bySpacesOmitDefaults),defaultValue:"0"},"outline-color":{canOverride:i.color,defaultValue:"invert",shortestValue:"red"},"outline-style":{canOverride:i.always,defaultValue:"none"},"outline-width":{canOverride:i.unit,defaultValue:"medium",shortestValue:"0"},"-moz-transform":{canOverride:i.sameFunctionOrValue},"-ms-transform":{canOverride:i.sameFunctionOrValue},"-webkit-transform":{canOverride:i.sameFunctionOrValue},transform:{canOverride:i.sameFunctionOrValue}},u=function(e,t,r){r=r||{},s[e]={components:t,breakUp:r.breakUp||o.fourBySpaces,putTogether:r.putTogether||a.takeCareOfInherit(a.fourUnits),defaultValue:r.defaultValue||"0",shortestValue:r.shortestValue}; -for(var n=0;na;a++){var p=n[o].components[a];if(s[o].found[p]&&s[o].found[p].length){var d=s[o].found[p][0];c.push(d),d.isReal!==!1&&h.push(d)}else{if(!s[o].lastShorthand)return!1;var g=s[o].lastShorthand.components[a].clone(r);c.push(g)}}if(0===h.length)return!1;if(h.length===f){for(var v,m=!0,b=!0,y=0;y=0){var k=w.value.substring(0,x);v?b=b&&k===v:v=k}}if(!m||!b)return!1}var _=n[o].putTogether(o,c,r);_ instanceof Array||(_=[_]);var O=i.getDetokenizedLength(_),E=i.getDetokenizedLength(h);if(h.length===f||E>O||c.some(e)){for(_[0].isShorthand=!0,_[0].components=n[o].breakUp(_[0]),a=0;a=0:!1},t.prototype.clone=function(e){var r=new t(this.prop,this.value,"undefined"!=typeof e?e:this.isImportant);return r},t.prototype.cloneIrrelevant=function(e){var r=t.makeDefault(this.prop,"undefined"!=typeof e?e:this.isImportant);return r.isIrrelevant=!0,r},t.makeDefaults=function(e,r){return e.map(function(e){return new t(e,r)})},t.tokenizeOne=function(n){var i=n.indexOf(":");if(0>i)return new t("",n);var o=n.substr(0,i).trim(),a=n.substr(i+1).trim(),s=!1,u=a.indexOf(r);u>=1&&u===a.length-r.length&&(a=a.substr(0,u).trim(),s=!0);var l=new t(o,a,s);return e[o]&&e[o].isShorthand&&(l.isShorthand=!0,l.components=e[o].breakUp(l),l.isDirty=!0),l},t.tokenize=function(e){var r=e.split(";").map(t.tokenizeOne);return r},t.detokenize=function(t){t instanceof Array||(t=[t]);for(var n="",i=0;i0&&0===e.indexOf("rgba(")&&e.indexOf(")")===e.length-1},isValidHslaColor:function(e){return e=e.split(" ").join(""),e.length>0&&0===e.indexOf("hsla(")&&e.indexOf(")")===e.length-1},isValidNamedColor:function(e){return"auto"!==e&&("transparent"===e||"inherit"===e||/^[a-zA-Z]+$/.test(e))},isValidVariable:function(e){return f.test(e)},isValidColor:function(e){return x.isValidNamedColor(e)||x.isValidHexColor(e)||x.isValidRgbaColor(e)||x.isValidHslaColor(e)||x.isValidVariable(e)},isValidUrl:function(e){return 0===e.indexOf("__ESCAPED_URL_CLEAN_CSS")},isValidUnit:function(e){return p.test(e)},isValidUnitWithoutFunction:function(e){return h.test(e)},isValidFunctionWithoutVendorPrefix:function(e){return u.test(e)},isValidFunctionWithVendorPrefix:function(e){return l.test(e)},isValidFunction:function(e){return c.test(e)},isValidBackgroundRepeat:function(e){return d.indexOf(e)>=0||x.isValidVariable(e)},isValidBackgroundAttachment:function(e){return g.indexOf(e)>=0||x.isValidVariable(e)},isValidBackgroundPositionPart:function(e){return v.indexOf(e)>=0?!0:h.test(e)||x.isValidVariable(e)},isValidBackgroundPosition:function(e){if("inherit"===e)return!0;for(var t=e.split(" "),r=0,n=t.length;n>r;r++)if(""!==t[r]&&!x.isValidBackgroundPositionPart(t[r])&&!x.isValidVariable(t[r]))return!1;return!0},isValidBackgroundSizePart:function(e){return m.indexOf(e)>=0||h.test(e)||x.isValidVariable(e)},isValidBackgroundPositionAndSize:function(e){if(e.indexOf("/")<0)return!1;var t=new r("/").split(e);return x.isValidBackgroundSizePart(t.pop())&&x.isValidBackgroundPositionPart(t.pop())},isValidListStyleType:function(e){return b.indexOf(e)>=0||x.isValidVariable(e)},isValidListStylePosition:function(e){return y.indexOf(e)>=0||x.isValidVariable(e)},isValidOutlineColor:function(e){return"invert"===e||x.isValidColor(e)||x.isValidVendorPrefixedValue(e)},isValidOutlineStyle:function(e){return w.indexOf(e)>=0||x.isValidVariable(e)},isValidOutlineWidth:function(t){return x.isValidUnit(t)||e.indexOf(t)>=0||x.isValidVariable(t)},isValidVendorPrefixedValue:function(e){return/^-([A-Za-z0-9]|-)*$/gi.test(e)},areSameFunction:function(e,t){if(!x.isValidFunction(e)||!x.isValidFunction(t))return!1;var r=e.substring(0,e.indexOf("(")),n=t.substring(0,t.indexOf("("));return r===n}};return x}()},{"../text/splitter":26}],17:[function(e,t){t.exports=function(e){var t=function(e){for(var r=[],n=0,i=0;n0?t(r.join("")+e.substring(i,e.length)):e};return{process:function(){return t(e)}}}},{}],18:[function(e,t){var r=e("./tokenizer"),n=e("../properties/optimizer");t.exports=function(e,t,i){var o={"*":/(\-moz\-|\-ms\-|\-o\-|\-webkit\-|:dir\([a-z-]*\)|:first(?![a-z-])|:fullscreen|:left|:read-only|:read-write|:right)/,ie8:/(\-moz\-|\-ms\-|\-o\-|\-webkit\-|:root|:nth|:first\-of|:last|:only|:empty|:target|:checked|::selection|:enabled|:disabled|:not)/,ie7:/(\-moz\-|\-ms\-|\-o\-|\-webkit\-|:focus|:before|:after|:root|:nth|:first\-of|:last|:only|:empty|:target|:checked|::selection|:enabled|:disabled|:not)/},a=[],s=new n(i.compatibility,i.aggressiveMerging,t),u=function(e){if(-1==e.indexOf(","))return e;for(var t=[],r=0,n=0,i=-1==e.indexOf("("),o=function(t){if(i)return!1;var r=e.lastIndexOf("(",t),n=e.lastIndexOf(")",t);return-1==r?!1:n>0&&t>n?!1:!0};;){var a,s=e.indexOf(",",r+1);if(-1===s)s=e.length;else if(o(s)){r=s+1;continue}if(a=e.substring(n,s),n=r=s+1,-1==t.indexOf(a)&&t.push(a),s===e.length)break}return t.sort().join(",")},l=function(e){return o[i.compatibility||"*"].test(e)},f=function(e){for(var t={},r=[],n=0,i=e.length;i>n;n++){var o=e[n];if("string"!=typeof o&&!o.block){var s=o.body+"@"+o.selector,u=t[s];u?(r.push(u[0]),u.unshift(n)):t[s]=[n]}}r=r.sort(function(e,t){return e>t?1:-1});for(var l=0,f=r.length;f>l;l++)e.splice(r[l]-l,1);a.unshift(r.length>0)},c=function(e){for(var t=[],r={selector:null,body:null},n=0,i=e.length;i>n;n++){var o=e[n];if("string"!=typeof o&&!o.block)if(o.selector==r.selector){var f=[r.body.split(";").length];r.body=s.process(r.body+";"+o.body,f,!1,o.selector),t.push(n)}else o.body!=r.body||l(o.selector)||l(r.selector)?r=o:(r.selector=u(r.selector+","+o.selector),t.push(n))}for(var c=0,h=t.length;h>c;c++)e.splice(t[c]-c,1);a.unshift(t.length>0)},h=function(e){for(var t={},r=[],n=e.length-1;n>=0;n--){var i=e[n];if("string"!=typeof i&&!i.block)for(var o=i.selector,s=o.indexOf(",")>-1&&!l(o)?o.split(",").concat(o):[o],u=0,f=s.length;f>u;u++){var c=s[u];t[c]?r.push(c):t[c]=[],t[c].push({where:n,partial:c!=o})}}var h=p(e,r,t),g=d(e,t);a.unshift(h||g)},p=function(e,t,r){for(var n=!1,i=0,o=t.length;o>i;i++){var a=t[i],s=r[a];s.length<2||g(e,a,s,{filterOut:function(e,t){return s[e].partial&&0===t.length},callback:function(e,t,r,i){s[r-i-1].partial||(e.body=t.join(";"),n=!0)}})}return n},d=function(e,t){var r=!1;e:for(var n in t)if(-1!=n.indexOf(",")){for(var i=t[n].pop().where,o=e[i],a=l(n)?[n]:n.split(","),s=[],u=0,f=a.length;f>u;u++){var c=a[u],h=t[c];if(h.length<2)continue e;if(g(e,c,h,{filterOut:function(e){return h[e].where=0;l--)if(!n.filterOut(l,i)){var c=r[l].where,h=e[c],p=h.body;i.push(p),a.push(p.split(";")),u.push(c)}for(l=0,f=i.length;f>l;l++)i[l].length>0&&o.push((o[l-1]||0)+a[l].length);for(var d=s.process(i.join(";"),o,!0,t),g=d.split(";"),v=u.length,m=g.length-1,b=v-1;b>=0;)if((0===b||a[b].indexOf(g[m])>-1)&&m>-1)m--;else{var y=g.splice(m+1);n.callback(e[u[b]],y,v,b),b--}},v=function(e){var t=function(){return a.length>4&&a[0]===!1&&a[1]===!1};e=Array.isArray(e)?e:[e];for(var r=0,n=e.length;n>r;r++){var i=e[r];i.selector?(i.selector=u(i.selector),i.body=s.process(i.body,!1,!1,i.selector)):i.block&&v(i.body)}for(a=[];;){if(t())break;if(f(e),t())break;if(c(e),t())break;h(e)}},m=function(e){var t=[];e=Array.isArray(e)?e:[e];for(var r=0,n=e.length;n>r;r++){var o=e[r];if("string"!=typeof o){var a=o.block||o.selector,s=o.block?m(o.body):o.body;s.length>0&&t.push(a+"{"+s+"}")}else t.push(o)}return t.join(i.keepBreaks?i.lineBreak:"")};return{process:function(){var n=new r(e,t).process();return v(n),m(n)}}}},{"../properties/optimizer":10,"./tokenizer":19}],19:[function(e,t){t.exports=function(e,t){var n=new r(e,128),i=n.next(),o=/(^@(font\-face|page|\-ms\-viewport|\-o\-viewport|viewport)|\\@.+?)/,a=function(e){var t,r=e.cursor,o=e.mode;if(i.length==e.cursor){if(n.isEmpty())return null;i=n.next(),e.cursor=0}if("body"==o)return t=i.indexOf("}",r),t>-1?[t,"bodyEnd"]:null;var a=i.indexOf("@",e.cursor),s="top"==o?i.indexOf("__ESCAPED_COMMENT_CLEAN_CSS",e.cursor):-1,u=i.indexOf("{",e.cursor),l=i.indexOf("}",e.cursor);return t=a,(-1==t||s>-1&&t>s)&&(t=s),(-1==t||u>-1&&t>u)&&(t=u),(-1==t||l>-1&&t>l)&&(t=l),-1!=t?s===t?[t,"escape"]:u===t?[t,"bodyStart"]:l===t?[t,"bodyEnd"]:a===t?[t,"special"]:void 0:void 0},s=function(e){var r=[];for(e=e||{cursor:0,mode:"top"};;){var n=a(e);if(!n){var u=i.substring(e.cursor);u.length>0&&(r.push(u),e.cursor+=u.length);break}var l,f,c=n[0],h=n[1];if("special"==h){var p=i.indexOf("{",c),d=i.indexOf(";",c),g=d>-1&&(-1==p||p>d),v=-1==p&&-1==d;if(v)t.warnings.push("Broken declaration: '"+i.substring(e.cursor)+"'."),e.cursor=i.length;else if(g)l=i.indexOf(";",c+1),r.push(i.substring(e.cursor,l+1)),e.cursor=l+1;else{l=i.indexOf("{",c+1);var m=i.substring(e.cursor,l).trim(),b=o.test(m);f=e.mode,e.cursor=l+1,e.mode=b?"body":"block";var y=s(e);e.mode=f,r.push({block:m,body:y})}}else if("escape"==h){l=i.indexOf("__",c+1);var w=i.substring(e.cursor,l+2);r.push(w),e.cursor=l+2}else if("bodyStart"==h){var x=i.substring(e.cursor,c).trim();f=e.mode,e.cursor=c+1,e.mode="body";var k=s(e);e.mode=f,r.push({selector:x,body:k})}else if("bodyEnd"==h){if("top"==e.mode){var _=e.cursor,O="}"==i[e.cursor]?"Unexpected '}' in '"+i.substring(_-20,_+20)+"'. Ignoring.":"Unexpected content: '"+i.substring(_,c+1)+"'. Ignoring.";t.warnings.push(O),e.cursor=c+1;continue}"block"!=e.mode&&(r=i.substring(e.cursor,c)),e.cursor=c+1;break}}return r};return{process:function(){return s()}}};var r=function(e,t){for(var r=[],n=0,i=e.length;i>n;){var o=n+t>i?i-1:n+t;"}"!=e[o]&&(o=e.indexOf("}",o)),-1==o&&(o=e.length-1),r.push(e.substring(n,o+1)),n=o+1}return{isEmpty:function(){return 0===r.length},next:function(){return r.shift()||""}}}},{}],20:[function(e,t){var r=e("./escape-store"),n=e("./quote-scanner");t.exports=function(e,t,i,o){var a=new r("COMMENT");return{escape:function(t){for(var r=[],i=0,o=0,s=0,u=function(){var e=[];return new n(t).each(function(t,r,n){e.push([n,n+t.length])}),function(t){for(var r=0,n=e.length;n>r;r++)if(e[r][0]t)return!0;return!1}}();o0?r.join("")+t.substring(s,t.length):t},restore:function(e){var r=0,n=i?o:"";return e.replace(new RegExp(a.placeholderPattern+"("+o+"| )?","g"),function(e,i){switch(r++,t){case"*":return a.restore(i)+n;case 1:case"1":return 1==r?a.restore(i)+n:"";case 0:case"0":return""}})}}}},{"./escape-store":21,"./quote-scanner":25}],21:[function(e,t){t.exports=function(e){e="ESCAPED_"+e+"_CLEAN_CSS";var t={},r={},n=0,i=function(){return"__"+e+n++ +"__"},o="(__"+e+"\\d{1,}__)";return{placeholderPattern:o,placeholderRegExp:new RegExp(o,"g"),store:function(e){var n=r[e];return n||(n=i(),t[n]=e,r[e]=n),n},restore:function(e){return t[e]}}}},{}],22:[function(e,t){var r=e("./escape-store");t.exports=function(){var e=new r("EXPRESSION"),t=function(e,t){for(var r=t+"expression".length,n=0,i=!1;;){var o=e[r++];if(i?i="'"!=o&&'"'!=o:(i="'"==o||'"'==o,"("==o&&n++,")"==o&&n--,"}"==o&&1==n&&(r--,n--)),0===n&&")"==o)break;if(!o){r=e.substring(0,r).lastIndexOf("}");break}}return r};return{escape:function(r){for(var n=0,i=0,o=0,a=[];i0?a.join("")+r.substring(o,r.length):r},restore:function(t){return t.replace(e.placeholderRegExp,e.restore)}}}},{"./escape-store":21}],23:[function(e,t){!function(){var r=e("./escape-store"),n=e("./quote-scanner"),i=function(){this.matches=new r("FREE_TEXT")};i.prototype.escape=function(e){var t=this;return new n(e).each(function(e,r){var n=t.matches.store(e);r.push(n)})},i.prototype.restore=function(e){return e.replace(this.matches.placeholderRegExp,this.matches.restore)},t.exports=i}()},{"./escape-store":21,"./quote-scanner":25}],24:[function(e,t){!function(){var r=e("./quote-scanner"),n=e("../properties/scanner"),i=function(){},o=/^['"][a-zA-Z][a-zA-Z\d\-_]+['"]$/,a=["animation","-moz-animation","-o-animation","-webkit-animation","animation-name","-moz-animation-name","-o-animation-name","-webkit-animation-name","font","font-family"];i.prototype.process=function(e){var t=new n(e);return new r(e).each(function(e,r,n){var i=t.nextAt(n);a.indexOf(i)>-1&&o.test(e)&&(e=e.substring(1,e.length-1)),r.push(e)})},t.exports=i}()},{"../properties/scanner":13,"./quote-scanner":25}],25:[function(e,t){!function(){var e=function(e){this.data=e},r=function(e,t,r,n){var i="/*",o="*/",a="\\",s="}",u=e.substring(n,r),l=u.lastIndexOf(o,r),f=u.lastIndexOf(i,r),c=!1;if(l>=r&&f>-1&&(c=!0),r>f&&f>l&&(c=!0),c){var h=e.indexOf(o,r);return h>-1?h:(h=e.indexOf(s,r),h>-1?h-1:e.length)}for(;;){if(void 0===e[r])break;if(e[r]==t&&(e[r-1]!=a||e[r-2]==a))break;r++}return r};e.prototype.each=function(e){for(var t=this.data,n=[],i=0,o=0,a=0,s=null,u="'",l='"',f=t.length;oc?(i=c,s=u):(i=h,s=l),-1==i)break;if(o=r(t,s,i+1,a),-1==o)break;var p=t.substring(i,o+1);n.push(t.substring(a,i)),p.length>0&&e(p,n,i),a=o+1}return n.length>0?n.join("")+t.substring(a,t.length):t},t.exports=e}()},{}],26:[function(e,t){var r=function(e){this.separator=e};r.prototype.split=function(e){if(-1===e.indexOf(this.separator))return[e];if(-1===e.indexOf("("))return e.split(this.separator);for(var t=0,r=0,n=0,i=e.length,o=[];r++n&&o.push(e.substring(n)),o},t.exports=r},{}],27:[function(e,t){var r=e("./escape-store");t.exports=function(e){var t=new r("URL");return{escape:function(r){for(var n=0,i=0,o=0,a=[];i0?a.join("")+r.substring(o,r.length):r},restore:function(e){return e.replace(t.placeholderRegExp,function(e){return t.restore(e).replace(/\s/g,"")})}}}},{"./escape-store":21}],28:[function(){},{}],29:[function(e,t,r){function n(e,t,r){if(!(this instanceof n))return new n(e,t,r);var i,o=typeof e;if("number"===o)i=e>0?e>>>0:0;else if("string"===o)"base64"===t&&(e=_(e)),i=n.byteLength(e,t);else{if("object"!==o||null===e)throw new TypeError("must start with number, buffer, array or string");"Buffer"===e.type&&B(e.data)&&(e=e.data),i=+e.length>0?Math.floor(+e.length):0}if(this.length>U)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+U.toString(16)+" bytes");var a;n.TYPED_ARRAY_SUPPORT?a=n._augment(new Uint8Array(i)):(a=this,a.length=i,a._isBuffer=!0);var s;if(n.TYPED_ARRAY_SUPPORT&&"number"==typeof e.byteLength)a._set(e);else if(E(e))if(n.isBuffer(e))for(s=0;i>s;s++)a[s]=e.readUInt8(s);else for(s=0;i>s;s++)a[s]=(e[s]%256+256)%256;else if("string"===o)a.write(e,0,t);else if("number"===o&&!n.TYPED_ARRAY_SUPPORT&&!r)for(s=0;i>s;s++)a[s]=0;return a}function i(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;n>a;a++){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[r+a]=s}return a}function o(e,t,r,n){var i=j(A(t),e,r,n);return i}function a(e,t,r,n){var i=j(R(t),e,r,n);return i}function s(e,t,r,n){return a(e,t,r,n)}function u(e,t,r,n){var i=j(V(t),e,r,n);return i}function l(e,t,r,n){var i=j(I(t),e,r,n,2);return i}function f(e,t,r){return L.fromByteArray(0===t&&r===e.length?e:e.slice(t,r))}function c(e,t,r){var n="",i="";r=Math.min(e.length,r);for(var o=t;r>o;o++)e[o]<=127?(n+=C(i)+String.fromCharCode(e[o]),i=""):i+="%"+e[o].toString(16);return n+C(i)}function h(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;r>i;i++)n+=String.fromCharCode(e[i]);return n}function p(e,t,r){return h(e,t,r)}function d(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=t;r>o;o++)i+=S(e[o]);return i}function g(e,t,r){for(var n=e.slice(t,r),i="",o=0;oe)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function m(e,t,r,i,o,a){if(!n.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>o||a>t)throw new TypeError("value is out of bounds");if(r+i>e.length)throw new TypeError("index out of range")}function b(e,t,r,n){0>t&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);o>i;i++)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function y(e,t,r,n){0>t&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);o>i;i++)e[r+i]=t>>>8*(n?i:3-i)&255}function w(e,t,r,n,i,o){if(t>i||o>t)throw new TypeError("value is out of bounds");if(r+n>e.length)throw new TypeError("index out of range")}function x(e,t,r,n,i){return i||w(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),T.write(e,t,r,n,23,4),r+4}function k(e,t,r,n,i){return i||w(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),T.write(e,t,r,n,52,8),r+8}function _(e){for(e=O(e).replace(P,"");e.length%4!==0;)e+="=";return e}function O(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function E(e){return B(e)||n.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function S(e){return 16>e?"0"+e.toString(16):e.toString(16)}function A(e){for(var t=[],r=0;r=n)t.push(n);else{var i=r;n>=55296&&57343>=n&&r++;for(var o=encodeURIComponent(e.slice(i,r+1)).substr(1).split("%"),a=0;a>8,n=t%256,i.push(n),i.push(r);return i}function V(e){return L.toByteArray(e)}function j(e,t,r,n,i){i&&(n-=n%i);for(var o=0;n>o&&!(o+r>=t.length||o>=e.length);o++)t[o+r]=e[o];return o}function C(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}var L=e("base64-js"),T=e("ieee754"),B=e("is-array");r.Buffer=n,r.SlowBuffer=n,r.INSPECT_MAX_BYTES=50,n.poolSize=8192;var U=1073741823;n.TYPED_ARRAY_SUPPORT=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(r){return!1}}(),n.isBuffer=function(e){return!(null==e||!e._isBuffer)},n.compare=function(e,t){if(!n.isBuffer(e)||!n.isBuffer(t))throw new TypeError("Arguments must be Buffers");for(var r=e.length,i=t.length,o=0,a=Math.min(r,i);a>o&&e[o]===t[o];o++);return o!==a&&(r=e[o],i=t[o]),i>r?-1:r>i?1:0},n.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(e,t){if(!B(e))throw new TypeError("Usage: Buffer.concat(list[, length])");if(0===e.length)return new n(0);if(1===e.length)return e[0];var r;if(void 0===t)for(t=0,r=0;r>>1;break;case"utf8":case"utf-8":r=A(e).length;break;case"base64":r=V(e).length;break;default:r=e.length}return r},n.prototype.length=void 0,n.prototype.parent=void 0,n.prototype.toString=function(e,t,r){var n=!1;if(t>>>=0,r=void 0===r||1/0===r?this.length:r>>>0,e||(e="utf8"),0>t&&(t=0),r>this.length&&(r=this.length),t>=r)return"";for(;;)switch(e){case"hex":return d(this,t,r);case"utf8":case"utf-8":return c(this,t,r);case"ascii":return h(this,t,r);case"binary":return p(this,t,r);case"base64":return f(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}},n.prototype.equals=function(e){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");return 0===n.compare(this,e)},n.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},n.prototype.compare=function(e){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");return n.compare(this,e)},n.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},n.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},n.prototype.write=function(e,t,r,n){if(isFinite(t))isFinite(r)||(n=r,r=void 0);else{var f=n;n=t,t=r,r=f}t=Number(t)||0;var c=this.length-t;r?(r=Number(r),r>c&&(r=c)):r=c,n=String(n||"utf8").toLowerCase();var h;switch(n){case"hex":h=i(this,e,t,r);break;case"utf8":case"utf-8":h=o(this,e,t,r);break;case"ascii":h=a(this,e,t,r);break;case"binary":h=s(this,e,t,r);break;case"base64":h=u(this,e,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":h=l(this,e,t,r);break;default:throw new TypeError("Unknown encoding: "+n)}return h},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(e,t){var r=this.length;if(e=~~e,t=void 0===t?r:~~t,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),e>t&&(t=e),n.TYPED_ARRAY_SUPPORT)return n._augment(this.subarray(e,t));for(var i=t-e,o=new n(i,void 0,!0),a=0;i>a;a++)o[a]=this[a+e];return o},n.prototype.readUInt8=function(e,t){return t||v(e,1,this.length),this[e]},n.prototype.readUInt16LE=function(e,t){return t||v(e,2,this.length),this[e]|this[e+1]<<8},n.prototype.readUInt16BE=function(e,t){return t||v(e,2,this.length),this[e]<<8|this[e+1]},n.prototype.readUInt32LE=function(e,t){return t||v(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},n.prototype.readUInt32BE=function(e,t){return t||v(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},n.prototype.readInt8=function(e,t){return t||v(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},n.prototype.readInt16LE=function(e,t){t||v(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt16BE=function(e,t){t||v(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt32LE=function(e,t){return t||v(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return t||v(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readFloatLE=function(e,t){return t||v(e,4,this.length),T.read(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return t||v(e,4,this.length),T.read(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return t||v(e,8,this.length),T.read(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return t||v(e,8,this.length),T.read(this,e,!1,52,8)},n.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||m(this,e,t,1,255,0),n.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e,t+1},n.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||m(this,e,t,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):b(this,e,t,!0),t+2},n.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||m(this,e,t,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):b(this,e,t,!1),t+2},n.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||m(this,e,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e):y(this,e,t,!0),t+4},n.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||m(this,e,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):y(this,e,t,!1),t+4},n.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||m(this,e,t,1,127,-128),n.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=e,t+1},n.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||m(this,e,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):b(this,e,t,!0),t+2},n.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||m(this,e,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):b(this,e,t,!1),t+2},n.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||m(this,e,t,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):y(this,e,t,!0),t+4},n.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||m(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):y(this,e,t,!1),t+4},n.prototype.writeFloatLE=function(e,t,r){return x(this,e,t,!0,r)},n.prototype.writeFloatBE=function(e,t,r){return x(this,e,t,!1,r)},n.prototype.writeDoubleLE=function(e,t,r){return k(this,e,t,!0,r)},n.prototype.writeDoubleBE=function(e,t,r){return k(this,e,t,!1,r)},n.prototype.copy=function(e,t,r,i){var o=this;if(r||(r=0),i||0===i||(i=this.length),t||(t=0),i!==r&&0!==e.length&&0!==o.length){if(r>i)throw new TypeError("sourceEnd < sourceStart"); -if(0>t||t>=e.length)throw new TypeError("targetStart out of bounds");if(0>r||r>=o.length)throw new TypeError("sourceStart out of bounds");if(0>i||i>o.length)throw new TypeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-ta||!n.TYPED_ARRAY_SUPPORT)for(var s=0;a>s;s++)e[s+t]=this[s+r];else e._set(this.subarray(r,r+a),t)}},n.prototype.fill=function(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),t>r)throw new TypeError("end < start");if(r!==t&&0!==this.length){if(0>t||t>=this.length)throw new TypeError("start out of bounds");if(0>r||r>this.length)throw new TypeError("end out of bounds");var n;if("number"==typeof e)for(n=t;r>n;n++)this[n]=e;else{var i=A(e.toString()),o=i.length;for(n=t;r>n;n++)this[n]=i[n%o]}return this}},n.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(n.TYPED_ARRAY_SUPPORT)return new n(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;r>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var M=n.prototype;n._augment=function(e){return e.constructor=n,e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=M.get,e.set=M.set,e.write=M.write,e.toString=M.toString,e.toLocaleString=M.toString,e.toJSON=M.toJSON,e.equals=M.equals,e.compare=M.compare,e.copy=M.copy,e.slice=M.slice,e.readUInt8=M.readUInt8,e.readUInt16LE=M.readUInt16LE,e.readUInt16BE=M.readUInt16BE,e.readUInt32LE=M.readUInt32LE,e.readUInt32BE=M.readUInt32BE,e.readInt8=M.readInt8,e.readInt16LE=M.readInt16LE,e.readInt16BE=M.readInt16BE,e.readInt32LE=M.readInt32LE,e.readInt32BE=M.readInt32BE,e.readFloatLE=M.readFloatLE,e.readFloatBE=M.readFloatBE,e.readDoubleLE=M.readDoubleLE,e.readDoubleBE=M.readDoubleBE,e.writeUInt8=M.writeUInt8,e.writeUInt16LE=M.writeUInt16LE,e.writeUInt16BE=M.writeUInt16BE,e.writeUInt32LE=M.writeUInt32LE,e.writeUInt32BE=M.writeUInt32BE,e.writeInt8=M.writeInt8,e.writeInt16LE=M.writeInt16LE,e.writeInt16BE=M.writeInt16BE,e.writeInt32LE=M.writeInt32LE,e.writeInt32BE=M.writeInt32BE,e.writeFloatLE=M.writeFloatLE,e.writeFloatBE=M.writeFloatBE,e.writeDoubleLE=M.writeDoubleLE,e.writeDoubleBE=M.writeDoubleBE,e.fill=M.fill,e.inspect=M.inspect,e.toArrayBuffer=M.toArrayBuffer,e};var P=/[^+\/0-9A-z]/g},{"base64-js":30,ieee754:31,"is-array":32}],30:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===a?62:t===s?63:u>t?-1:u+10>t?t-u+26+26:f+26>t?t-f:l+26>t?t-l+26:void 0}function r(e){function r(e){l[c++]=e}var n,i,a,s,u,l;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=e.length;u="="===e.charAt(f-2)?2:"="===e.charAt(f-1)?1:0,l=new o(3*e.length/4-u),a=u>0?e.length-4:e.length;var c=0;for(n=0,i=0;a>n;n+=4,i+=3)s=t(e.charAt(n))<<18|t(e.charAt(n+1))<<12|t(e.charAt(n+2))<<6|t(e.charAt(n+3)),r((16711680&s)>>16),r((65280&s)>>8),r(255&s);return 2===u?(s=t(e.charAt(n))<<2|t(e.charAt(n+1))>>4,r(255&s)):1===u&&(s=t(e.charAt(n))<<10|t(e.charAt(n+1))<<4|t(e.charAt(n+2))>>2,r(s>>8&255),r(255&s)),l}function i(e){function t(e){return n.charAt(e)}function r(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,o,a,s=e.length%3,u="";for(i=0,a=e.length-s;a>i;i+=3)o=(e[i]<<16)+(e[i+1]<<8)+e[i+2],u+=r(o);switch(s){case 1:o=e[e.length-1],u+=t(o>>2),u+=t(o<<4&63),u+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],u+=t(o>>10),u+=t(o>>4&63),u+=t(o<<2&63),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),s="/".charCodeAt(0),u="0".charCodeAt(0),l="a".charCodeAt(0),f="A".charCodeAt(0);e.toByteArray=r,e.fromByteArray=i}("undefined"==typeof r?this.base64js={}:r)},{}],31:[function(e,t,r){r.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,f=-7,c=r?i-1:0,h=r?-1:1,p=e[t+c];for(c+=h,o=p&(1<<-f)-1,p>>=-f,f+=s;f>0;o=256*o+e[t+c],c+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+c],c+=h,f-=8);if(0===o)o=1-l;else{if(o===u)return a?0/0:1/0*(p?-1:1);a+=Math.pow(2,n),o-=l}return(p?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,u,l=8*o-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||1/0===t?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+c>=1?h/u:h*Math.pow(2,1-c),t*u>=2&&(a++,u/=2),a+c>=f?(s=0,a=f):a+c>=1?(s=(t*u-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<0;e[r+p]=255&a,p+=d,a/=256,l-=8);e[r+p-d]|=128*g}},{}],32:[function(e,t){var r=Array.isArray,n=Object.prototype.toString;t.exports=r||function(e){return!!e&&"[object Array]"==n.call(e)}},{}],33:[function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,i,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[e],a(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,s=new Array(i-1),u=1;i>u;u++)s[u-1]=arguments[u];r.apply(this,s)}else if(o(r)){for(i=arguments.length,s=new Array(i-1),u=1;i>u;u++)s[u-1]=arguments[u];for(l=r.slice(),i=l.length,u=0;i>u;u++)l[u].apply(this,s)}return!0},r.prototype.addListener=function(e,t){var i;if(!n(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned){var i;i=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,i,a,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,i=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(s=a;s-->0;)if(r[s]===t||r[s].listener&&r[s].listener===t){i=s;break}if(0>i)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){var r;return r=e._events&&e._events[t]?n(e._events[t])?1:e._events[t].length:0}},{}],34:[function(e,t){var r=t.exports,n=(e("events").EventEmitter,e("./lib/request")),i=e("url");r.request=function(e,t){"string"==typeof e&&(e=i.parse(e)),e||(e={}),e.host||e.port||(e.port=parseInt(window.location.port,10)),!e.host&&e.hostname&&(e.host=e.hostname),e.protocol||(e.protocol=e.scheme?e.scheme+":":window.location.protocol),e.host||(e.host=window.location.hostname||window.location.host),/:/.test(e.host)&&(e.port||(e.port=e.host.split(":")[1]),e.host=e.host.split(":")[0]),e.port||(e.port="https:"==e.protocol?443:80);var r=new n(new o,e);return t&&r.on("response",t),r},r.get=function(e,t){e.method="GET";var n=r.request(e,t);return n.end(),n},r.Agent=function(){},r.Agent.defaultMaxSockets=4;var o=function(){if("undefined"==typeof window)throw new Error("no window object present");if(window.XMLHttpRequest)return window.XMLHttpRequest;if(window.ActiveXObject){for(var e=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"],t=0;tthis.offset&&(this.emit("data",t.slice(this.offset)),this.offset=t.length))};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{stream:59,util:62}],37:[function(e,t,r){!function(){function e(e){this.message=e}var t="undefined"!=typeof r?r:this,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.prototype=new Error,e.prototype.name="InvalidCharacterError",t.btoa||(t.btoa=function(t){for(var r,i,o=0,a=n,s="";t.charAt(0|o)||(a="=",o%1);s+=a.charAt(63&r>>8-o%1*8)){if(i=t.charCodeAt(o+=.75),i>255)throw new e("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|i}return s}),t.atob||(t.atob=function(t){if(t=t.replace(/=+$/,""),t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,a=0,s="";i=t.charAt(a++);~i&&(r=o%4?64*r+i:i,o++%4)?s+=String.fromCharCode(255&r>>(-2*o&6)):0)i=n.indexOf(i);return s})}()},{}],38:[function(e,t){var r=e("http"),n=t.exports;for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);n.request=function(e,t){return e||(e={}),e.scheme="https",r.request.call(this,e,t)}},{http:34}],39:[function(e,t){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],40:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!i;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(r=a+"/"+r,i="/"===a.charAt(0))}return r=t(n(r.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(e){var i=r.isAbsolute(e),o="/"===a(e,-1);return e=t(n(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&o&&(e+="/"),(i?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,function(e){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var i=n(e.split("/")),o=n(t.split("/")),a=Math.min(i.length,o.length),s=a,u=0;a>u;u++)if(i[u]!==o[u]){s=u;break}for(var l=[],u=s;ut&&(t=e.length+t),e.substr(t,r)}}).call(this,e("Zbi7gb"))},{Zbi7gb:41}],41:[function(e,t){function r(){}var n=t.exports={};n.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.on=r,n.addListener=r,n.once=r,n.off=r,n.removeListener=r,n.removeAllListeners=r,n.emit=r,n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},{}],42:[function(t,r,n){(function(t){!function(i){function o(e){throw RangeError(T[e])}function a(e,t){for(var r=e.length;r--;)e[r]=t(e[r]);return e}function s(e,t){return a(e.split(L),t).join(".")}function u(e){for(var t,r,n=[],i=0,o=e.length;o>i;)t=e.charCodeAt(i++),t>=55296&&56319>=t&&o>i?(r=e.charCodeAt(i++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--)):n.push(t);return n}function l(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=M(e>>>10&1023|55296),e=56320|1023&e),t+=M(e)}).join("")}function f(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:_}function c(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function h(e,t,r){var n=0;for(e=r?U(e/A):e>>1,e+=U(e/t);e>B*E>>1;n+=_)e=U(e/B);return U(n+(B+1)*e/(e+S))}function p(e){var t,r,n,i,a,s,u,c,p,d,g=[],v=e.length,m=0,b=I,y=R;for(r=e.lastIndexOf(V),0>r&&(r=0),n=0;r>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),g.push(e.charCodeAt(n));for(i=r>0?r+1:0;v>i;){for(a=m,s=1,u=_;i>=v&&o("invalid-input"),c=f(e.charCodeAt(i++)),(c>=_||c>U((k-m)/s))&&o("overflow"),m+=c*s,p=y>=u?O:u>=y+E?E:u-y,!(p>c);u+=_)d=_-p,s>U(k/d)&&o("overflow"),s*=d;t=g.length+1,y=h(m-a,t,0==a),U(m/t)>k-b&&o("overflow"),b+=U(m/t),m%=t,g.splice(m++,0,b)}return l(g)}function d(e){var t,r,n,i,a,s,l,f,p,d,g,v,m,b,y,w=[];for(e=u(e),v=e.length,t=I,r=0,a=R,s=0;v>s;++s)g=e[s],128>g&&w.push(M(g));for(n=i=w.length,i&&w.push(V);v>n;){for(l=k,s=0;v>s;++s)g=e[s],g>=t&&l>g&&(l=g);for(m=n+1,l-t>U((k-r)/m)&&o("overflow"),r+=(l-t)*m,t=l,s=0;v>s;++s)if(g=e[s],t>g&&++r>k&&o("overflow"),g==t){for(f=r,p=_;d=a>=p?O:p>=a+E?E:p-a,!(d>f);p+=_)y=f-d,b=_-d,w.push(M(c(d+y%b,0))),f=U(y/b);w.push(M(c(f,0))),a=h(r,m,n==i),r=0,++n}++r,++t}return w.join("")}function g(e){return s(e,function(e){return j.test(e)?p(e.slice(4).toLowerCase()):e})}function v(e){return s(e,function(e){return C.test(e)?"xn--"+d(e):e})}var m="object"==typeof n&&n,b="object"==typeof r&&r&&r.exports==m&&r,y="object"==typeof t&&t;(y.global===y||y.window===y)&&(i=y);var w,x,k=2147483647,_=36,O=1,E=26,S=38,A=700,R=72,I=128,V="-",j=/^xn--/,C=/[^ -~]/,L=/\x2E|\u3002|\uFF0E|\uFF61/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=_-O,U=Math.floor,M=String.fromCharCode;if(w={version:"1.2.4",ucs2:{decode:u,encode:l},decode:p,encode:d,toASCII:v,toUnicode:g},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return w});else if(m&&!m.nodeType)if(b)b.exports=w;else for(x in w)w.hasOwnProperty(x)&&(m[x]=w[x]);else i.punycode=w}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],43:[function(e,t){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,i,o){t=t||"&",i=i||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var l=e.length;u>0&&l>u&&(l=u);for(var f=0;l>f;++f){var c,h,p,d,g=e[f].replace(s,"%20"),v=g.indexOf(i);v>=0?(c=g.substr(0,v),h=g.substr(v+1)):(c=g,h=""),p=decodeURIComponent(c),d=decodeURIComponent(h),r(a,p)?n(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],44:[function(e,t){"use strict";function r(e,t){if(e.map)return e.map(t);for(var r=[],n=0;nr;r++)t(e[r],r)}t.exports=n;var a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},s=e("core-util-is");s.inherits=e("inherits");var u=e("./_stream_readable"),l=e("./_stream_writable");s.inherits(n,u),o(a(l.prototype),function(e){n.prototype[e]||(n.prototype[e]=l.prototype[e])})}).call(this,e("Zbi7gb"))},{"./_stream_readable":49,"./_stream_writable":51,Zbi7gb:41,"core-util-is":52,inherits:39}],48:[function(e,t){function r(e){return this instanceof r?void n.call(this,e):new r(e)}t.exports=r;var n=e("./_stream_transform"),i=e("core-util-is");i.inherits=e("inherits"),i.inherits(r,n),r.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":50,"core-util-is":52,inherits:39}],49:[function(e,t){(function(r){function n(t){t=t||{};var r=t.highWaterMark;this.highWaterMark=r||0===r?r:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(R||(R=e("string_decoder/").StringDecoder),this.decoder=new R(t.encoding),this.encoding=t.encoding)}function i(e){return this instanceof i?(this._readableState=new n(e,this),this.readable=!0,void S.call(this)):new i(e)}function o(e,t,r,n,i){var o=l(t,r);if(o)e.emit("error",o);else if(null===r||void 0===r)t.reading=!1,t.ended||f(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||i||n||(r=t.decoder.write(r)),t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):(t.reading=!1,t.buffer.push(r)),t.needReadable&&c(e),p(e,t);else i||(t.reading=!1);return a(t)}function a(e){return!e.ended&&(e.needReadable||e.length=I)e=I;else{e--;for(var t=1;32>t;t<<=1)e|=e>>t;e++}return e}function u(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function l(e,t){var r=null;return O.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function f(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.length>0?c(e):w(e)}function c(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?r.nextTick(function(){h(e)}):h(e))}function h(e){e.emit("readable")}function p(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(function(){d(e,t)}))}function d(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length0)return;return 0===n.pipesCount?(n.flowing=!1,void(E.listenerCount(e,"data")>0&&b(e))):void(n.ranOut=!0)}function m(){this._readableState.ranOut&&(this._readableState.ranOut=!1,v(this))}function b(e,t){var n=e._readableState;if(n.flowing)throw new Error("Cannot switch to old mode now.");var i=t||!1,o=!1;e.readable=!0,e.pipe=S.prototype.pipe,e.on=e.addListener=S.prototype.on,e.on("readable",function(){o=!0;for(var t;!i&&null!==(t=e.read());)e.emit("data",t);null===t&&(o=!1,e._readableState.needReadable=!0)}),e.pause=function(){i=!0,this.emit("pause")},e.resume=function(){i=!1,o?r.nextTick(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function y(e,t){var r,n=t.buffer,i=t.length,o=!!t.decoder,a=!!t.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(a)r=n.shift();else if(!e||e>=i)r=o?n.join(""):O.concat(n,i),n.length=0;else if(el&&e>u;l++){var s=n[0],c=Math.min(e-u,s.length);o?r+=s.slice(0,c):s.copy(r,u,0,c),c0)throw new Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,r.nextTick(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function x(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r],r)}function k(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r]===t)return r;return-1}t.exports=i;var _=e("isarray"),O=e("buffer").Buffer;i.ReadableState=n;var E=e("events").EventEmitter;E.listenerCount||(E.listenerCount=function(e,t){return e.listeners(t).length});var S=e("stream"),A=e("core-util-is");A.inherits=e("inherits");var R;A.inherits(i,S),i.prototype.push=function(e,t){var r=this._readableState;return"string"!=typeof e||r.objectMode||(t=t||r.defaultEncoding,t!==r.encoding&&(e=new O(e,t),t="")),o(this,r,e,t,!1)},i.prototype.unshift=function(e){var t=this._readableState;return o(this,t,e,"",!0)},i.prototype.setEncoding=function(t){R||(R=e("string_decoder/").StringDecoder),this._readableState.decoder=new R(t),this._readableState.encoding=t};var I=8388608;i.prototype.read=function(e){var t=this._readableState;t.calledRead=!0;var r,n=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return c(this),null;if(e=u(e,t),0===e&&t.ended)return r=null,t.length>0&&t.decoder&&(r=y(e,t),t.length-=r.length),0===t.length&&w(this),r;var i=t.needReadable;return t.length-e<=t.highWaterMark&&(i=!0),(t.ended||t.reading)&&(i=!1),i&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=u(n,t)),r=e>0?y(e,t):null,null===r&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&w(this),r},i.prototype._read=function(){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,t){function n(e){e===f&&o()}function i(){e.end()}function o(){e.removeListener("close",s),e.removeListener("finish",u),e.removeListener("drain",d),e.removeListener("error",a),e.removeListener("unpipe",n),f.removeListener("end",i),f.removeListener("end",o),(!e._writableState||e._writableState.needDrain)&&d()}function a(t){l(),e.removeListener("error",a),0===E.listenerCount(e,"error")&&e.emit("error",t)}function s(){e.removeListener("finish",u),l()}function u(){e.removeListener("close",s),l()}function l(){f.unpipe(e)}var f=this,c=this._readableState;switch(c.pipesCount){case 0:c.pipes=e;break;case 1:c.pipes=[c.pipes,e];break;default:c.pipes.push(e)}c.pipesCount+=1;var h=(!t||t.end!==!1)&&e!==r.stdout&&e!==r.stderr,p=h?i:o;c.endEmitted?r.nextTick(p):f.once("end",p),e.on("unpipe",n);var d=g(f);return e.on("drain",d),e._events&&e._events.error?_(e._events.error)?e._events.error.unshift(a):e._events.error=[a,e._events.error]:e.on("error",a),e.once("close",s),e.once("finish",u),e.emit("pipe",f),c.flowing||(this.on("readable",m),c.flowing=!0,r.nextTick(function(){v(f) -})),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,this.removeListener("readable",m),t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",m),t.flowing=!1;for(var i=0;n>i;i++)r[i].emit("unpipe",this);return this}var i=k(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var r=S.prototype.on.call(this,e,t);if("data"!==e||this._readableState.flowing||b(this),"readable"===e&&this.readable){var n=this._readableState;n.readableListening||(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading?n.length&&c(this,n):this.read(0))}return r},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){b(this),this.read(0),this.emit("resume")},i.prototype.pause=function(){b(this,!0),this.emit("pause")},i.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(i){if(t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){var o=n.push(i);o||(r=!0,e.pause())}});for(var i in e)"function"==typeof e[i]&&"undefined"==typeof this[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return x(o,function(t){e.on(t,n.emit.bind(n,t))}),n._read=function(){r&&(r=!1,e.resume())},n},i._fromList=y}).call(this,e("Zbi7gb"))},{Zbi7gb:41,buffer:29,"core-util-is":52,events:33,inherits:39,isarray:53,stream:59,"string_decoder/":54}],50:[function(e,t){function r(e,t){this.afterTransform=function(e,r){return n(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function n(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r),i&&i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&56319>=n)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,n=t.charCodeAt(i);if(n>=55296&&56319>=n){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},l.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(2>=t&&r>>4==14){this.charLength=3;break}if(3>=t&&r>>3==30){this.charLength=4;break}}this.charReceived=t},l.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},{buffer:29}],55:[function(e,t){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":48}],56:[function(e,t,r){var n=e("stream");r=t.exports=e("./lib/_stream_readable.js"),r.Stream=n,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":47,"./lib/_stream_passthrough.js":48,"./lib/_stream_readable.js":49,"./lib/_stream_transform.js":50,"./lib/_stream_writable.js":51,stream:59}],57:[function(e,t){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":50}],58:[function(e,t){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":51}],59:[function(e,t){function r(){n.call(this)}t.exports=r;var n=e("events").EventEmitter,i=e("inherits");i(r,n),r.Readable=e("readable-stream/readable.js"),r.Writable=e("readable-stream/writable.js"),r.Duplex=e("readable-stream/duplex.js"),r.Transform=e("readable-stream/transform.js"),r.PassThrough=e("readable-stream/passthrough.js"),r.Stream=r,r.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&l.pause&&l.pause()}function i(){l.readable&&l.resume&&l.resume()}function o(){f||(f=!0,e.end())}function a(){f||(f=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===n.listenerCount(this,"error"))throw e}function u(){l.removeListener("data",r),e.removeListener("drain",i),l.removeListener("end",o),l.removeListener("close",a),l.removeListener("error",s),e.removeListener("error",s),l.removeListener("end",u),l.removeListener("close",u),e.removeListener("close",u)}var l=this;l.on("data",r),e.on("drain",i),e._isStdio||t&&t.end===!1||(l.on("end",o),l.on("close",a));var f=!1;return l.on("error",s),e.on("error",s),l.on("end",u),l.on("close",u),e.on("close",u),e.emit("pipe",l),e}},{events:33,inherits:39,"readable-stream/duplex.js":46,"readable-stream/passthrough.js":55,"readable-stream/readable.js":56,"readable-stream/transform.js":57,"readable-stream/writable.js":58}],60:[function(e,t,r){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,r){if(e&&l(e)&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}function o(e){return u(e)&&(e=i(e)),e instanceof n?e.format():n.prototype.format.call(e)}function a(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t}function u(e){return"string"==typeof e}function l(e){return"object"==typeof e&&null!==e}function f(e){return null===e}function c(e){return null==e}var h=e("punycode");r.parse=i,r.resolve=a,r.resolveObject=s,r.format=o,r.Url=n;var p=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,g=["<",">",'"',"`"," ","\r","\n"," "],v=["{","}","|","\\","^","`"].concat(g),m=["'"].concat(v),b=["%","/","?",";","#"].concat(m),y=["/","?","#"],w=255,x=/^[a-z0-9A-Z_-]{0,63}$/,k=/^([a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},O={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},S=e("querystring");n.prototype.parse=function(e,t,r){if(!u(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e;n=n.trim();var i=p.exec(n);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,n=n.substr(i.length)}if(r||i||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var a="//"===n.substr(0,2);!a||i&&O[i]||(n=n.substr(2),this.slashes=!0)}if(!O[i]&&(a||i&&!E[i])){for(var s=-1,l=0;lf)&&(s=f)}var c,d;d=-1===s?n.lastIndexOf("@"):n.lastIndexOf("@",s),-1!==d&&(c=n.slice(0,d),n=n.slice(d+1),this.auth=decodeURIComponent(c)),s=-1;for(var l=0;lf)&&(s=f)}-1===s&&(s=n.length),this.host=n.slice(0,s),n=n.slice(s),this.parseHost(),this.hostname=this.hostname||"";var g="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!g)for(var v=this.hostname.split(/\./),l=0,A=v.length;A>l;l++){var R=v[l];if(R&&!R.match(x)){for(var I="",V=0,j=R.length;j>V;V++)I+=R.charCodeAt(V)>127?"x":R[V];if(!I.match(x)){var C=v.slice(0,l),L=v.slice(l+1),T=R.match(k);T&&(C.push(T[1]),L.unshift(T[2])),L.length&&(n="/"+L.join(".")+n),this.hostname=C.join(".");break}}}if(this.hostname=this.hostname.length>w?"":this.hostname.toLowerCase(),!g){for(var B=this.hostname.split("."),U=[],l=0;ll;l++){var D=m[l],F=encodeURIComponent(D);F===D&&(F=escape(D)),n=n.split(D).join(F)}var q=n.indexOf("#");-1!==q&&(this.hash=n.substr(q),n=n.slice(0,q));var N=n.indexOf("?");if(-1!==N?(this.search=n.substr(N),this.query=n.substr(N+1),t&&(this.query=S.parse(this.query)),n=n.slice(0,N)):t&&(this.search="",this.query={}),n&&(this.pathname=n),E[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var P=this.pathname||"",M=this.search||"";this.path=P+M}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&l(this.query)&&Object.keys(this.query).length&&(o=S.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||E[t])&&i!==!1?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),a=a.replace("#","%23"),t+i+r+a+n},n.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(u(e)){var t=new n;t.parse(e,!1,!0),e=t}var r=new n;if(Object.keys(this).forEach(function(e){r[e]=this[e]},this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(r[t]=e[t])}),E[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!E[e.protocol])return Object.keys(e).forEach(function(t){r[t]=e[t]}),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||O[e.protocol])r.pathname=e.pathname;else{for(var i=(e.pathname||"").split("/");i.length&&!(e.host=i.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),r.pathname=i.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var o=r.pathname||"",a=r.search||"";r.path=o+a}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var s=r.pathname&&"/"===r.pathname.charAt(0),l=e.host||e.pathname&&"/"===e.pathname.charAt(0),h=l||s||r.host&&e.pathname,p=h,d=r.pathname&&r.pathname.split("/")||[],i=e.pathname&&e.pathname.split("/")||[],g=r.protocol&&!E[r.protocol];if(g&&(r.hostname="",r.port=null,r.host&&(""===d[0]?d[0]=r.host:d.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===i[0]?i[0]=e.host:i.unshift(e.host)),e.host=null),h=h&&(""===i[0]||""===d[0])),l)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,d=i;else if(i.length)d||(d=[]),d.pop(),d=d.concat(i),r.search=e.search,r.query=e.query;else if(!c(e.search)){if(g){r.hostname=r.host=d.shift();var v=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;v&&(r.auth=v.shift(),r.host=r.hostname=v.shift())}return r.search=e.search,r.query=e.query,f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!d.length)return r.pathname=null,r.path=r.search?"/"+r.search:null,r.href=r.format(),r;for(var m=d.slice(-1)[0],b=(r.host||e.host)&&("."===m||".."===m)||""===m,y=0,w=d.length;w>=0;w--)m=d[w],"."==m?d.splice(w,1):".."===m?(d.splice(w,1),y++):y&&(d.splice(w,1),y--);if(!h&&!p)for(;y--;y)d.unshift("..");!h||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),b&&"/"!==d.join("/").substr(-1)&&d.push("");var x=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(g){r.hostname=r.host=x?"":d.length?d.shift():"";var v=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;v&&(r.auth=v.shift(),r.host=r.hostname=v.shift())}return h=h||r.host&&d.length,h&&!x&&d.unshift(""),d.length?r.pathname=d.join("/"):(r.pathname=null,r.path=null),f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=d.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{punycode:42,querystring:45}],61:[function(e,t){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],62:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(t)?n.showHidden=t:t&&r._extend(n,t),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,e,n.depth)}function o(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function a(e){return e}function s(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function u(e,t,n){if(e.customInspect&&t&&S(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return y(i)||(i=u(e,i,n)),i}var o=l(e,t);if(o)return o;var a=Object.keys(t),g=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),E(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(t);if(0===a.length){if(S(t)){var v=t.name?": "+t.name:"";return e.stylize("[Function"+v+"]","special")}if(k(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(O(t))return e.stylize(Date.prototype.toString.call(t),"date");if(E(t))return f(t)}var m="",b=!1,w=["{","}"];if(d(t)&&(b=!0,w=["[","]"]),S(t)){var x=t.name?": "+t.name:"";m=" [Function"+x+"]"}if(k(t)&&(m=" "+RegExp.prototype.toString.call(t)),O(t)&&(m=" "+Date.prototype.toUTCString.call(t)),E(t)&&(m=" "+f(t)),0===a.length&&(!b||0==t.length))return w[0]+m+w[1];if(0>n)return k(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var _;return _=b?c(e,t,n,g,a):a.map(function(r){return h(e,t,n,g,r,b)}),e.seen.pop(),p(_,m,w)}function l(e,t){if(x(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,r,n,i){for(var o=[],a=0,s=t.length;s>a;++a)o.push(j(t,String(a))?h(e,t,r,n,String(a),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(e,t,r,n,i,!0))}),o}function h(e,t,r,n,i,o){var a,s,l;if(l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},l.get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),j(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=v(r)?u(e,l.value,null):u(e,l.value,r-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e,t,r){var n=0,i=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function m(e){return null==e}function b(e){return"number"==typeof e}function y(e){return"string"==typeof e}function w(e){return"symbol"==typeof e}function x(e){return void 0===e}function k(e){return _(e)&&"[object RegExp]"===R(e)}function _(e){return"object"==typeof e&&null!==e}function O(e){return _(e)&&"[object Date]"===R(e)}function E(e){return _(e)&&("[object Error]"===R(e)||e instanceof Error)}function S(e){return"function"==typeof e}function A(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function R(e){return Object.prototype.toString.call(e)}function I(e){return 10>e?"0"+e.toString(10):e.toString(10)}function V(){var e=new Date,t=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":");return[e.getDate(),B[e.getMonth()],t].join(" ")}function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var C=/%[sdj%]/g;r.format=function(e){if(!y(e)){for(var t=[],r=0;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}}),s=n[r];o>r;s=n[++r])a+=v(s)||!_(s)?" "+s:" "+i(s);return a},r.deprecate=function(e,i){function o(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}if(x(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var a=!1;return o};var L,T={};r.debuglog=function(e){if(x(L)&&(L=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!T[e])if(new RegExp("\\b"+e+"\\b","i").test(L)){var n=t.pid;T[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else T[e]=function(){};return T[e]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=g,r.isNull=v,r.isNullOrUndefined=m,r.isNumber=b,r.isString=y,r.isSymbol=w,r.isUndefined=x,r.isRegExp=k,r.isObject=_,r.isDate=O,r.isError=E,r.isFunction=S,r.isPrimitive=A,r.isBuffer=e("./support/isBuffer");var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",V(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("Zbi7gb"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":61,Zbi7gb:41,inherits:39}]},{},[1])(1)}); \ No newline at end of file +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.CleanCSS=e()}}(function(){var e;return function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[a]={exports:{}};e[a][0].call(c.exports,function(t){var r=e[a][1][t];return i(r?r:t)},c,c.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a0?t.errors:null,r):r}return function(e){return t.options.sourceMap?(t.inputSourceMapTracker=new b(t),t.inputSourceMapTracker.track(e,function(){return r(e)})):r(e)}}function i(e,t){return t.stats=e.stats,t.errors=e.errors,t.warnings=e.warnings,t}function o(e,t){var n=r.hrtime();e.stats.originalSize=e.sourceTracker.removeAll(t).length,t=s(e,t);var i=r.hrtime(n);return e.stats.timeSpent=~~(1e3*i[0]+i[1]/1e6),e.stats.efficiency=1-t.styles.length/e.stats.originalSize,e.stats.minifiedSize=t.styles.length,t}function a(e){return function(t,n){var i=t.constructor.name+"#"+n,o=r.hrtime();e(t,n);var a=r.hrtime(o);console.log("%d ms: "+i,1e3*a[0]+a[1]/1e6)}}function s(e,t){var r=e.options,n=e.inputSourceMapTracker,i=new p(e,r.keepSpecialComments,r.keepBreaks,r.sourceMap),o=new d(r.sourceMap),s=new g(r.sourceMap),u=new m(e,r.sourceMap),v=new l(e),b=new c(r,e),y=r.sourceMap?f:h,w=function(e,r){t="function"==typeof e?e(t):e[r](t)};return r.benchmark&&(w=a(w)),w(i,"escape"),w(o,"escape"),w(u,"escape"),w(s,"escape"),w(function(){var e=new y(r,function(e){return e=s.restore(e),e=u.restore(e),e=r.rebase?v.process(e):e,e=o.restore(e),i.restore(e)},n);return b.process(t,e)}),t}var u=e("./imports/inliner"),l=e("./images/url-rebase"),c=e("./selectors/optimizer"),h=e("./selectors/stringifier"),f=e("./selectors/source-map-stringifier"),p=e("./text/comments-processor"),d=e("./text/expressions-processor"),g=e("./text/free-text-processor"),m=e("./text/urls-processor"),v=e("./utils/compatibility"),b=e("./utils/input-source-map-tracker"),y=e("./utils/source-tracker"),w=e("./utils/source-reader"),_=5e3,x=t.exports=function(e){e=e||{},this.options={advanced:void 0===e.advanced?!0:!!e.advanced,aggressiveMerging:void 0===e.aggressiveMerging?!0:!!e.aggressiveMerging,benchmark:e.benchmark,compatibility:new v(e.compatibility).toOptions(),debug:e.debug,inliner:e.inliner||{},keepBreaks:e.keepBreaks||!1,keepSpecialComments:"keepSpecialComments"in e?e.keepSpecialComments:"*",processImport:void 0===e.processImport?!0:!!e.processImport,rebase:void 0===e.rebase?!0:!!e.rebase,relativeTo:e.relativeTo,root:e.root,roundingPrecision:e.roundingPrecision,shorthandCompacting:e.sourceMap?!1:void 0===e.shorthandCompacting?!0:!!e.shorthandCompacting,sourceMap:e.sourceMap,target:e.target},this.options.inliner.timeout=this.options.inliner.timeout||_,this.options.inliner.request=this.options.inliner.request||{}};x.prototype.minify=function(e,t){var i={stats:{},errors:[],warnings:[],options:this.options,debug:this.options.debug,sourceTracker:new y};if(e=new w(i,e).toString(),i.options.processImport||e.indexOf("@shallow")>0){var o=t?r.nextTick:function(e){return e()};return o(function(){return new u(i).process(e,{localOnly:!t,whenDone:n(t,i)})})}return n(t,i)(e)}}).call(this,e("_process"))},{"./images/url-rebase":6,"./imports/inliner":8,"./selectors/optimizer":15,"./selectors/source-map-stringifier":19,"./selectors/stringifier":20,"./text/comments-processor":22,"./text/expressions-processor":24,"./text/free-text-processor":25,"./text/urls-processor":26,"./utils/compatibility":28,"./utils/input-source-map-tracker":30,"./utils/source-reader":34,"./utils/source-tracker":35,_process:52}],3:[function(e,t){var r={},n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},i={},o={};for(var a in n){var s=n[a];a.length-1,r=e.replace(u,function(e,t,r){return i[t.toLowerCase()]+r});return t&&(r=r.replace(l,function(e,t){return o[t.toLowerCase()]})),r},t.exports=r},{}],4:[function(e,t){function r(e,t,r){this.hue=e,this.saturation=t,this.lightness=r}function n(e,t,r){var n,o,a;if(e%=360,0>e&&(e+=360),e=~~e/360,0>t?t=0:t>100&&(t=100),t=~~t/100,0>r?r=0:r>100&&(r=100),r=~~r/100,0===t)n=o=a=r;else{var s=.5>r?r*(1+t):r+t-r*t,u=2*r-s;n=i(u,s,e+1/3),o=i(u,s,e),a=i(u,s,e-1/3)}return[~~(255*n),~~(255*o),~~(255*a)]}function i(e,t,r){return 0>r&&(r+=1),r>1&&(r-=1),1/6>r?e+6*(t-e)*r:.5>r?t:2/3>r?e+(t-e)*(2/3-r)*6:e}r.prototype.toHex=function(){var e=n(this.hue,this.saturation,this.lightness),t=e[0].toString(16),r=e[1].toString(16),i=e[2].toString(16);return"#"+((1==t.length?"0":"")+t)+((1==r.length?"0":"")+r)+((1==i.length?"0":"")+i)},t.exports=r},{}],5:[function(e,t){function r(e,t,r){this.red=e,this.green=t,this.blue=r}r.prototype.toHex=function(){var e=Math.max(0,Math.min(~~this.red,255)),t=Math.max(0,Math.min(~~this.green,255)),r=Math.max(0,Math.min(~~this.blue,255));return"#"+("00000"+(e<<16|t<<8|r).toString(16)).slice(-6)},t.exports=r},{}],6:[function(e,t){function r(e){this.outerContext=e}var n=e("fs"),i=e("path"),o=e("./url-rewriter");r.prototype.process=function(e){var t=this.outerContext.options,r={absolute:!!t.root,relative:!t.root&&!!t.target,fromBase:t.relativeTo};if(!r.absolute&&!r.relative)return e;if(r.absolute&&t.target&&this.outerContext.warnings.push("Both 'root' and output file given so rebasing URLs as absolute paths"),r.absolute&&(r.toBase=i.resolve(t.root)),r.relative){var a=n.existsSync(t.target)&&n.statSync(t.target).isDirectory()?t.target:i.dirname(t.target);r.toBase=i.resolve(a)}return r.fromBase&&r.toBase?new o(r).process(e):e},t.exports=r},{"./url-rewriter":7,fs:37,path:51}],7:[function(e,t){(function(r){function n(e){this.options=e}function i(e,t){var n,i="/"==e[0]||"#"==e[0]||".css"==e.substring(e.length-4)||0===e.indexOf("data:")||null!==/^https?:\/\//.exec(e)||null!==/__\w+__/.exec(e);return i?e:/https?:\/\//.test(t.toBase)?a.resolve(t.toBase,e):(n=t.absolute?o.resolve(o.join(t.fromBase,e)).replace(t.toBase,""):o.relative(t.toBase,o.join(t.fromBase,e)),"win32"==r.platform?n.replace(/\\/g,"/"):n)}var o=e("path"),a=e("url");n.prototype.process=function(e){for(var t=[],r=0,n=0,o=0;n0?t.join("")+e.substring(o,e.length):e},t.exports=n}).call(this,e("_process"))},{_process:52,path:51,url:70}],8:[function(e,t){(function(r){function n(e){this.outerContext=e}function i(e,t){if(t.shallow)return t.shallow=!1,t.done.push(e),s(t);for(var r=0,n=0,i=0,o=u(e),h=l(e);n-1&&-1==n?r:-1==r&&n>-1?n:Math.min(r,n)}function s(e){return e.left.length>0?i.apply(null,e.left.shift()):e.whenDone(e.done.join(""))}function u(e){var t=/(\/\*(?!\*\/)[\s\S]*?\*\/)/,r=0,n=0,i=!1;return function o(a){var s,u=0,l=0,c=0,h=0;return i?!1:a>r&&n>a?!0:(s=e.match(t))?(r=u=s.index,l=u+s[0].length,h=l+n,c=h-s[0].length,e=e.substring(l),n=h,a>h?o(a):h>a&&a>c):(i=!0,!1)}}function l(e){for(var t=u(e),r=-1;;)if(r=e.indexOf("{",r+1),-1==r||!t(r))break;return function(e){return r>-1?e>r:!1}}function c(e,t,r,n){n.shallow=e.indexOf("@shallow")>0;var i=e.substring(a(e,t)+"@import".length+1,r).replace(/@shallow\)$/,")").trim(),o=0===i.indexOf("url("),u=o?4:0,l=/^['"]/.exec(i.substring(u,u+2)),c=l?i.indexOf(l[0],u+1):new w(" ").split(i)[0].length-(o?1:0),d=i.substring(u,c).replace(/['"]/g,"").replace(/\)$/,"").trim(),g=i.substring(c+1).replace(/^\)/,"").trim(),m=n.isRemote||k.test(d);if(n.localOnly&&m)return n.warnings.push('Ignoring remote @import declaration of "'+d+'" as no callback given.'),p(d,g,n),s(n);var v=m?h:f;return v(d,g,n)}function h(e,t,r){function n(e){r.errors.push('Broken @import declaration of "'+a+'" - '+e),p(a,t,r),s(r)}var a=k.test(e)?e:b.resolve(r.relativeTo,e);if(0===a.indexOf("//")&&(a="http:"+a),r.visited.indexOf(a)>-1)return s(r);r.debug&&console.error("Inlining remote stylesheet: "+a),r.visited.push(a);var u=0===a.indexOf("http://")?m.get:v.get,l=_(b.parse(a),r.inliner.request);u(l,function(e){if(e.statusCode<200||e.statusCode>399)return n("error "+e.statusCode);if(e.statusCode>299){var s=b.resolve(a,e.headers.location);return h(s,t,r)}var u=[],l=b.parse(a);e.on("data",function(e){u.push(e.toString())}),e.on("end",function(){var e=u.join("");r.rebase&&(e=new y({toBase:a}).process(e)),e=r.sourceTracker.store(a,e),e=o(e,a),t.length>0&&(e="@media "+t+"{"+e+"}");var n=_(r,{isRemote:!0,relativeTo:l.protocol+"//"+l.host});i(e,n)})}).on("error",function(e){n(e.message)}).on("timeout",function(){n("timeout")}).setTimeout(r.inliner.timeout)}function f(e,t,r){var n="/"==e[0]?r.root:r.relativeTo,o=g.resolve(g.join(n,e));if(!d.existsSync(o)||!d.statSync(o).isFile())return r.errors.push('Broken @import declaration of "'+e+'"'),s(r);if(r.visited.indexOf(o)>-1)return s(r);r.debug&&console.error("Inlining local stylesheet: "+o),r.visited.push(o);var a=g.dirname(o),u=d.readFileSync(o,"utf8");if(r.rebase){var l=new y({relative:!0,fromBase:a,toBase:r.baseRelativeTo});u=l.process(u)}u=r.sourceTracker.store(g.resolve(r.relativeTo,o),u),t.length>0&&(u="@media "+t+"{"+u+"}");var c=_(r,{relativeTo:a});return i(u,c)}function p(e,t,r){var n="@import url("+e+")"+(t.length>0?" "+t:"")+";";r.done.push(n)}var d=e("fs"),g=e("path"),m=e("http"),v=e("https"),b=e("url"),y=e("../images/url-rewriter"),w=e("../utils/splitter.js"),_=e("../utils/object.js").override,x=/\/\*# sourceMappingURL=(\S+) \*\//,k=/^(https?:)?\/\//;n.prototype.process=function(e,t){var n=this.outerContext.options.root||r.cwd();return t=_(t,{baseRelativeTo:this.outerContext.options.relativeTo||n,debug:this.outerContext.options.debug,done:[],errors:this.outerContext.errors,left:[],inliner:this.outerContext.options.inliner,rebase:this.outerContext.options.rebase,relativeTo:this.outerContext.options.relativeTo||n,root:n,sourceTracker:this.outerContext.sourceTracker,warnings:this.outerContext.warnings,visited:[]}),i(e,t)},t.exports=n}).call(this,e("_process"))},{"../images/url-rewriter":7,"../utils/object.js":31,"../utils/splitter.js":36,_process:52,fs:37,http:43,https:47,path:51,url:70}],9:[function(e,t){function r(e){return e.value}var n=e("./processable"),i=e("./override-compactor"),o=e("./shorthand-compactor");t.exports=function(e,t){var a={"animation-delay":["animation"],"animation-direction":["animation"],"animation-duration":["animation"],"animation-fill-mode":["animation"],"animation-iteration-count":["animation"],"animation-name":["animation"],"animation-play-state":["animation"],"animation-timing-function":["animation"],"-moz-animation-delay":["-moz-animation"],"-moz-animation-direction":["-moz-animation"],"-moz-animation-duration":["-moz-animation"],"-moz-animation-fill-mode":["-moz-animation"],"-moz-animation-iteration-count":["-moz-animation"],"-moz-animation-name":["-moz-animation"],"-moz-animation-play-state":["-moz-animation"],"-moz-animation-timing-function":["-moz-animation"],"-o-animation-delay":["-o-animation"],"-o-animation-direction":["-o-animation"],"-o-animation-duration":["-o-animation"],"-o-animation-fill-mode":["-o-animation"],"-o-animation-iteration-count":["-o-animation"],"-o-animation-name":["-o-animation"],"-o-animation-play-state":["-o-animation"],"-o-animation-timing-function":["-o-animation"],"-webkit-animation-delay":["-webkit-animation"],"-webkit-animation-direction":["-webkit-animation"],"-webkit-animation-duration":["-webkit-animation"],"-webkit-animation-fill-mode":["-webkit-animation"],"-webkit-animation-iteration-count":["-webkit-animation"],"-webkit-animation-name":["-webkit-animation"],"-webkit-animation-play-state":["-webkit-animation"],"-webkit-animation-timing-function":["-webkit-animation"],"background-clip":["background"],"background-origin":["background"],"border-color":["border"],"border-style":["border"],"border-width":["border"],"border-bottom":["border"],"border-bottom-color":["border-bottom","border-color","border"],"border-bottom-style":["border-bottom","border-style","border"],"border-bottom-width":["border-bottom","border-width","border"],"border-left":["border"],"border-left-color":["border-left","border-color","border"],"border-left-style":["border-left","border-style","border"],"border-left-width":["border-left","border-width","border"],"border-right":["border"],"border-right-color":["border-right","border-color","border"],"border-right-style":["border-right","border-style","border"],"border-right-width":["border-right","border-width","border"],"border-top":["border"],"border-top-color":["border-top","border-color","border"],"border-top-style":["border-top","border-style","border"],"border-top-width":["border-top","border-width","border"],"font-family":["font"],"font-size":["font"],"font-style":["font"],"font-variant":["font"],"font-weight":["font"],"margin-bottom":["margin"],"margin-left":["margin"],"margin-right":["margin"],"margin-top":["margin"],"padding-bottom":["padding"],"padding-left":["padding"],"padding-right":["padding"],"padding-top":["padding"],"transition-delay":["transition"],"transition-duration":["transition"],"transition-property":["transition"],"transition-timing-function":["transition"],"-moz-transition-delay":["-moz-transition"],"-moz-transition-duration":["-moz-transition"],"-moz-transition-property":["-moz-transition"],"-moz-transition-timing-function":["-moz-transition"],"-o-transition-delay":["-o-transition"],"-o-transition-duration":["-o-transition"],"-o-transition-property":["-o-transition"],"-o-transition-timing-function":["-o-transition"],"-webkit-transition-delay":["-webkit-transition"],"-webkit-transition-duration":["-webkit-transition"],"-webkit-transition-property":["-webkit-transition"],"-webkit-transition-timing-function":["-webkit-transition"]},s=e.compatibility,u=e.aggressiveMerging,l=e.shorthandCompacting,c="\\9",h=n.processable(s),f={};for(var p in a)for(var d=0;do;o++){var s=e[o],u=s.value.indexOf(":"),l=s.value.substring(0,u),h=s.value.substring(u+1);""!==h?i.push([l,h,s.value.indexOf("!important")>-1,s.value.indexOf(c,u+1)===s.value.length-c.length,s.metadata]):t.warnings.push("Empty property '"+l+"' inside '"+n.map(r).join(",")+"' selector. Ignoring.")}return i},b=function(e,t){var r=[],n=[],i=null,o={},l=function(e,t){for(var i=f[e],o=0,a=i.length;a>o;o++)for(var s=0;s-1};e:for(var p=0,d=e.length;d>p;p++){var g=e[p],m=g[0],v=g[1],b=g[2],y=g[3],w=!("-ms-filter"!=m&&"filter"!=m||"background"!=i&&"background-image"!=i)?i:m,_=0;if(!y||s.properties.ieSuffixHack){if(u&&""!==m&&w!=i||c(p))for(;;){if(_=n.indexOf(w,_),-1==_)break;var x=r[_],k=x[2],S=x[3];if(k&&!b)continue e;if(s.properties.ieSuffixHack&&!S&&y)break;var O=h[w];if(!y&&!S&&O&&O.canOverride&&!O.canOverride(e[_][1],v))break;r.splice(_,1),n.splice(_,1)}r.push(g),n.push(w),o[w]&&l(w,b);for(var E=0,C=a[w]||[],A=C.length;A>E;E++)o[C[E]]=!0;i=w}}return r},y=function(e){for(var t=[],r=[],i=!1,o=0,a=e.length;a>o;o++){!i&&n.implementedFor.test(e[o][0])&&(i=!0);var s=e[o][0]||0!==e[o][1].indexOf("__ESCAPED_")?e[o][0]+":"+e[o][1]:e[o][1];t.push({value:s,metadata:e[o][4]}),r.push(s)}return{compactFurther:i,list:r,tokenized:t}},w=function(e){var t=n.Token,r=t.tokenize(e);return r=i.compactOverrides(r,h,t,s),r=o.compactShorthands(r,!1,h,t),r=o.compactShorthands(r,!0,h,t),t.detokenize(r)};return{process:function(e,t,r,n){var i=v(t,e),o=b(i,r),a=y(o);return l&&n&&a.compactFurther?w(a.tokenized):a}}}},{"./override-compactor":10,"./processable":11,"./shorthand-compactor":12}],10:[function(e,t){var r=e("./validator");t.exports=function(){var e=function(e,t){return e===t},t=function(t,n,i,o){function a(e,t){var r=e.clone();return r.isDirty=!0,r.isShorthand=!0,r.components=[],e.components.forEach(function(e){var n=e.clone();e.prop==t.prop&&(n.value=t.value),r.components.push(n)}),i.getDetokenizedLength([e,t])>=i.getDetokenizedLength([r])}var s,u,l,c,h,f,p,d,g,m=function(e){return e.prop===l.prop},v=function(e){return e.prop===c.prop};for(s=t,h=0;(f=s.length-1-h)>=0;h++){l=s[f],u=n[l.prop]&&n[l.prop].canOverride||e,d=s,s=[];for(var b=!1,y=d.length,w=0;y>w;w++)if(c=d[w],c!==l||b)if(w>f&&!l.isImportant)s.push(c);else if(!c.isImportant||l.isImportant)if(l.isShorthand&&!c.isShorthand&&c.isComponentOf(l))g=l.components.filter(v)[0],u=n[c.prop]&&n[c.prop].canOverride||e,u(c.value,g.value)||s.push(c);else if(c.isShorthand&&!l.isShorthand&&l.isComponentOf(c)){if(g=c.components.filter(m)[0],u(g.value,l.value)){var _=!o.properties.backgroundSizeMerging&&l.prop.indexOf("background-size")>-1;if(_){s.push(c);continue}if(!o.properties.merging){var x=!1;for(p=0;p4)return[t];i.lengtho;o++)t.value=r[o],i.push(e(t));for(var s=0,u=i[0].length;u>s;s++){for(var l=0,c=i.length,h=[];c>l;l++)h.push(i[l][s].value);i[0][s].value=h.join(",")}return i[0]}},o.background=function(e){var t=f.makeDefaults(["background-image","background-position","background-size","background-repeat","background-attachment","background-color"],e.isImportant),i=t[0],o=t[1],a=t[2],u=t[3],l=t[4],c=t[5],h=!1;if("inherit"===e.value)return c.value=i.value=u.value=o.value=a.value=l.value="inherit",t;var p=new n(" ").split(e.value);if(0===p.length)return t;for(var d=p.length-1;d>=0;d--){var g=p[d];if(r.isValidBackgroundAttachment(g))l.value=g;else if(r.isValidBackgroundRepeat(g))u.value=g;else if(r.isValidBackgroundPositionPart(g)||r.isValidBackgroundSizePart(g))if(d>0){var m=p[d-1];if(m.indexOf("/")>0){var v=new n("/").split(m);a.value=v.pop()+" "+g,p[d-1]=v.pop()}else d>1&&"/"==p[d-2]?(a.value=m+" "+g,d-=2):"/"==p[d-1]?a.value=g:(o.value=g+(h?" "+o.value:""),h=!0)}else o.value=g+(h?" "+o.value:""),h=!0;else if(r.isValidBackgroundPositionAndSize(g)){var b=new n("/").split(g);a.value=b.pop(),o.value=b.pop()}else c.value!=s[c.prop].defaultValue&&"none"!=c.value||!r.isValidColor(g)?(r.isValidUrl(g)||r.isValidFunction(g))&&(i.value=g):c.value=g}return t},o.listStyle=function(e){var t=f.makeDefaults(["list-style-type","list-style-position","list-style-image"],e.isImportant),i=t[0],o=t[1],a=t[2];if("inherit"===e.value)return i.value=o.value=a.value="inherit",t;var s=new n(" ").split(e.value),u=0;return u=1&&(c=h.filter(function(e){return"inherit"!==e&&r.isValidOutlineWidth(e)}),c.length&&(l.value=c[0],h.splice(h.indexOf(c[0]),1))),h.length>=1&&(c=h.filter(function(e){return"inherit"!==e&&r.isValidOutlineStyle(e)}),c.length&&(u.value=c[0],h.splice(h.indexOf(c[0]),1))),h.length>=1&&(c=h.filter(function(e){return r.isValidOutlineColor(e)}),c.length&&(s.value=c[0],h.splice(h.indexOf(c[0]),1))),a)},o.outline=function(e){return o._widthStyleColor(e,"outline",["color","style","width"])},o.border=function(e){return o._widthStyleColor(e,"border",["width","style","color"])},o.borderRadius=function(e){var t=e.value.split("/");if(1==t.length)return o.fourBySpaces(e);var r=e.clone(),n=e.clone();r.value=t[0],n.value=t[1];for(var i=o.fourBySpaces(r),a=o.fourBySpaces(n),s=0;4>s;s++)i[s].value=[i[s].value,a[s].value];return i};var a={fourUnits:function(e,t,r){t[0].isIrrelevant&&(t[0].value=t[2].value),t[2].isIrrelevant&&(t[2].value=t[0].value),t[1].isIrrelevant&&(t[1].value=t[3].value),t[3].isIrrelevant&&(t[3].value=t[1].value),t[0].isIrrelevant&&t[2].isIrrelevant&&(t[0].value=t[2].value=t[1].value===t[3].value?t[1].value:"0"),t[1].isIrrelevant&&t[3].isIrrelevant&&(t[1].value=t[3].value=t[0].value===t[2].value?t[0].value:"0");var n=new f(e,t[0].value,r);return n.granularValues=[],n.granularValues[t[0].prop]=t[0].value,n.granularValues[t[1].prop]=t[1].value,n.granularValues[t[2].prop]=t[2].value,n.granularValues[t[3].prop]=t[3].value,t[0].isIrrelevant&&t[1].isIrrelevant&&t[2].isIrrelevant&&t[3].isIrrelevant?(n.value=s[e].shortestValue||s[e].defaultValue,n):t[0].value===t[1].value&&t[0].value===t[2].value&&t[0].value===t[3].value?n:(n.value+=" "+t[1].value,t[0].value===t[2].value&&t[1].value===t[3].value?n:(n.value+=" "+t[2].value,t[1].value===t[3].value?n:(n.value+=" "+t[3].value,n)))},bySpacesOmitDefaults:function(e,t,r,n){var i=new f(e,"",r),o=t.filter(function(e){return e.isIrrelevant});if(o.length===t.length)return i.isIrrelevant=!0,i.value=s[e].shortestValue||s[e].defaultValue,i;for(var a=s[e].defaultValue,u=0;uu;u++){s.push([]);for(var l=0;lu;u++){for(var p=[],d=0,g=s[u].length;g>d;d++){var m=r[d].clone();m.value=s[u][d],p.push(m)}var v={partsCount:a,position:u},b=e(t,p,i,v);f.push(b.value),h||(h=b)}return h.value=f.join(","),h}},takeCareOfInherit:function(e){return function(t,r,n,i){var o,a=[],s=[],u=[];for(o=0;o0){var c=[new f(t,"inherit",n)].concat(s),h=[e(t,u,n,i)].concat(a),p=f.getDetokenizedLength(c),d=f.getDetokenizedLength(h);return d>p?c:h}return e(t,r,n,i)}},borderRadius:function(e,t,r){for(var n=[],i=[],o=0,s=t.length;s>o;o++){var u=t[o],l=u.clone();i.push(l),Array.isArray(u.value)&&(u.value.length>1&&n.push({prop:u.prop,value:u.value[1],isImportant:u.isImportant}),l.value=u.value[0])}var c=a.takeCareOfInherit(a.fourUnits)(e,i,r);if(n.length>0){var h=a.takeCareOfInherit(a.fourUnits)(e,n,r);c.value!=h.value&&(c.value+="/"+h.value)}return c}},s={color:{canOverride:i.color,defaultValue:"transparent",shortestValue:"red"},background:{components:["background-image","background-position","background-size","background-repeat","background-attachment","background-color"],breakUp:o.commaSeparatedMulitpleValues(o.background),putTogether:a.commaSeparatedMulitpleValues(a.takeCareOfInherit(a.bySpacesOmitDefaults)),defaultValue:"0 0",shortestValue:"0"},"background-color":{canOverride:i.color,defaultValue:"transparent",multiValueLastOnly:!0,shortestValue:"red"},"background-image":{canOverride:i.backgroundImage,defaultValue:"none"},"background-repeat":{canOverride:i.always,defaultValue:"repeat"},"background-position":{canOverride:i.always,defaultValue:"0 0",shortestValue:"0"},"background-size":{canOverride:i.always,defaultValue:"auto",shortestValue:"0 0",prefixShorthandValueWith:"/",shorthandFollows:"background-position"},"background-attachment":{canOverride:i.always,defaultValue:"scroll"},border:{breakUp:o.border,canOverride:i.border,components:["border-width","border-style","border-color"],defaultValue:"none",putTogether:a.takeCareOfInherit(a.bySpacesOmitDefaults)},"border-color":{canOverride:i.color,defaultValue:"none"},"border-style":{canOverride:i.always,defaultValue:"none"},"border-width":{canOverride:i.unit,defaultValue:"medium",shortestValue:"0"},"list-style":{components:["list-style-type","list-style-position","list-style-image"],canOverride:i.always,breakUp:o.listStyle,putTogether:a.takeCareOfInherit(a.bySpacesOmitDefaults),defaultValue:"outside",shortestValue:"none"},"list-style-type":{canOverride:i.always,shortestValue:"none",defaultValue:"__hack"},"list-style-position":{canOverride:i.always,defaultValue:"outside",shortestValue:"inside"},"list-style-image":{canOverride:i.always,defaultValue:"none"},outline:{components:["outline-color","outline-style","outline-width"],breakUp:o.outline,putTogether:a.takeCareOfInherit(a.bySpacesOmitDefaults),defaultValue:"0"},"outline-color":{canOverride:i.color,defaultValue:"invert",shortestValue:"red"},"outline-style":{canOverride:i.always,defaultValue:"none"},"outline-width":{canOverride:i.unit,defaultValue:"medium",shortestValue:"0"},"-moz-transform":{canOverride:i.sameFunctionOrValue},"-ms-transform":{canOverride:i.sameFunctionOrValue},"-webkit-transform":{canOverride:i.sameFunctionOrValue},transform:{canOverride:i.sameFunctionOrValue}},u=function(e,t,r){r=r||{},s[e]={components:t,breakUp:r.breakUp||o.fourBySpaces,putTogether:r.putTogether||a.takeCareOfInherit(a.fourUnits),defaultValue:r.defaultValue||"0",shortestValue:r.shortestValue};for(var n=0;na;a++){var p=n[o].components[a];if(s[o].found[p]&&s[o].found[p].length){var d=s[o].found[p][0];h.push(d),d.isReal!==!1&&f.push(d)}else{if(!s[o].lastShorthand)return!1;var g=s[o].lastShorthand.components[a].clone(r);h.push(g)}}if(0===f.length)return!1;if(f.length===c){for(var m,v=!0,b=!0,y=0;y=0){var x=w.value.substring(0,_);m?b=b&&x===m:m=x}}if(!v||!b)return!1}var k=n[o].putTogether(o,h,r);k instanceof Array||(k=[k]);var S=i.getDetokenizedLength(k),O=i.getDetokenizedLength(f);if(f.length===c||O>S||h.some(e)){for(k[0].isShorthand=!0,k[0].components=n[o].breakUp(k[0]),a=0;a=0:!1},t.prototype.clone=function(e){var r=new t(this.prop,this.value,"undefined"!=typeof e?e:this.isImportant);return r},t.prototype.cloneIrrelevant=function(e){var r=t.makeDefault(this.prop,"undefined"!=typeof e?e:this.isImportant);return r.isIrrelevant=!0,r},t.makeDefaults=function(e,r){return e.map(function(e){return new t(e,r)})},t.tokenizeOne=function(n){var i=n.value.indexOf(":");if(0>i)return new t("",n.value);var o=n.value.substr(0,i).trim(),a=n.value.substr(i+1).trim(),s=!1,u=a.indexOf(r);u>=1&&u===a.length-r.length&&(a=a.substr(0,u).trim(),s=!0);var l=new t(o,a,s);return e[o]&&e[o].isShorthand&&(l.isShorthand=!0,l.components=e[o].breakUp(l),l.isDirty=!0),l.metadata=n.metadata,l},t.tokenize=function(e){var r=e.map(t.tokenizeOne);return r},t.detokenize=function(t){t instanceof Array||(t=[t]);for(var n=[],i=[],o=0;o0&&0===e.indexOf("rgba(")&&e.indexOf(")")===e.length-1},isValidHslaColor:function(e){return e=e.split(" ").join(""),e.length>0&&0===e.indexOf("hsla(")&&e.indexOf(")")===e.length-1},isValidNamedColor:function(e){return"auto"!==e&&("transparent"===e||"inherit"===e||/^[a-zA-Z]+$/.test(e))},isValidVariable:function(e){return p.test(e)},isValidColor:function(e){return S.isValidNamedColor(e)||S.isValidHexColor(e)||S.isValidRgbaColor(e)||S.isValidHslaColor(e)||S.isValidVariable(e)},isValidUrl:function(e){return 0===e.indexOf("__ESCAPED_URL_CLEAN_CSS")},isValidUnit:function(e){return m.test(e)},isValidUnitWithoutFunction:function(e){return g.test(e)},isValidAndCompatibleUnit:function(e){return t.test(e)},isValidAndCompatibleUnitWithoutFunction:function(t){return e.test(t)},isValidFunctionWithoutVendorPrefix:function(e){return h.test(e)},isValidFunctionWithVendorPrefix:function(e){return f.test(e)},isValidFunction:function(e){return d.test(e)},isValidBackgroundRepeat:function(e){return v.indexOf(e)>=0||S.isValidVariable(e)},isValidBackgroundAttachment:function(e){return b.indexOf(e)>=0||S.isValidVariable(e)},isValidBackgroundPositionPart:function(e){return y.indexOf(e)>=0?!0:g.test(e)||S.isValidVariable(e)},isValidBackgroundPosition:function(e){if("inherit"===e)return!0;for(var t=e.split(" "),r=0,n=t.length;n>r;r++)if(""!==t[r]&&!S.isValidBackgroundPositionPart(t[r])&&!S.isValidVariable(t[r]))return!1;return!0},isValidBackgroundSizePart:function(e){return w.indexOf(e)>=0||g.test(e)||S.isValidVariable(e)},isValidBackgroundPositionAndSize:function(e){if(e.indexOf("/")<0)return!1;var t=new r("/").split(e);return S.isValidBackgroundSizePart(t.pop())&&S.isValidBackgroundPositionPart(t.pop())},isValidListStyleType:function(e){return _.indexOf(e)>=0||S.isValidVariable(e)},isValidListStylePosition:function(e){return x.indexOf(e)>=0||S.isValidVariable(e)},isValidOutlineColor:function(e){return"invert"===e||S.isValidColor(e)||S.isValidVendorPrefixedValue(e)},isValidOutlineStyle:function(e){return k.indexOf(e)>=0||S.isValidVariable(e)},isValidOutlineWidth:function(e){return S.isValidUnit(e)||n.indexOf(e)>=0||S.isValidVariable(e)},isValidVendorPrefixedValue:function(e){return/^-([A-Za-z0-9]|-)*$/gi.test(e)},areSameFunction:function(e,t){if(!S.isValidFunction(e)||!S.isValidFunction(t))return!1;var r=e.substring(0,e.indexOf("(")),n=t.substring(0,t.indexOf("("));return r===n}};return S}()},{"../utils/splitter":36}],15:[function(e,t){function r(e,t){this.options=e||{},this.context=t||{}}var n=e("./tokenizer"),i=e("./optimizers/simple"),o=e("./optimizers/advanced");r.prototype.process=function(e,t){var r=new n(this.context,this.options.advanced,this.options.sourceMap).toTokens(e);return new i(this.options).optimize(r),this.options.advanced&&new o(this.options,this.context).optimize(r),t.toString(r)},t.exports=r},{"./optimizers/advanced":16,"./optimizers/simple":18,"./tokenizer":21}],16:[function(e,t){function r(e,t){this.options=e,this.minificationsMade=[],this.propertyOptimizer=new a(this.options,t)}function n(e,t){e.body=t.tokenized,e.metadata.body=t.list.join(";"),e.metadata.bodiesList=t.list}function i(e,t){e.value=t.tokenized,e.metadata.selector=t.list.join(","),e.metadata.selectorsList=t.list}function o(e,t){for(var r=0,i=e.length;i>r;r++){var a=e[r];"selector"==a.kind?n(a,t.process(a.value,a.body,!1,!0)):"block"==a.kind&&o(a.body,t)}}var a=e("../../properties/optimizer"),s=e("./clean-up");r.prototype.isSpecial=function(e){return this.options.compatibility.selectors.special.test(e)},r.prototype.removeDuplicates=function(e){for(var t={},r=[],n=0,i=e.length;i>n;n++){var o=e[n];if("selector"==o.kind){var a=o.metadata.body+"@"+o.metadata.selector,s=t[a];s?(r.push(s[0]),s.unshift(n)):t[a]=[n]}}r=r.sort(function(e,t){return e>t?1:-1});for(var u=0,l=r.length;l>u;u++)e.splice(r[u]-u,1);this.minificationsMade.unshift(r.length>0)},r.prototype.mergeAdjacent=function(e){for(var t=[],r={selector:null,body:null},o=0,a=e.length;a>o;o++){var u=e[o];if("selector"==u.kind)if("selector"==r.kind&&u.metadata.selector==r.metadata.selector){var l=[r.body.length];n(r,this.propertyOptimizer.process(u.value,r.body.concat(u.body),l,!0)),t.push(o)}else!r.body||u.metadata.body!=r.metadata.body||this.isSpecial(u.metadata.selector)||this.isSpecial(r.metadata.selector)?r=u:(i(r,s.selectors(r.value.concat(u.value),!1)),t.push(o))}for(var c=0,h=t.length;h>c;c++)e.splice(t[c]-c,1);this.minificationsMade.unshift(t.length>0)},r.prototype.reduceNonAdjacent=function(e){for(var t={},r=[],n=e.length-1;n>=0;n--){var i=e[n];if("selector"==i.kind)for(var o=i.value.length>1&&!this.isSpecial(i.metadata.selector),a=o?[i.metadata.selector].concat(i.metadata.selectorsList):[i.metadata.selector],s=0,u=a.length;u>s;s++){var l=a[s];t[l]?r.push(l):t[l]=[],t[l].push({where:n,list:i.metadata.selectorsList,isPartial:o&&s>0,isComplex:o&&0===s})}}var c=this.reduceSimpleNonAdjacentCases(e,r,t),h=this.reduceComplexNonAdjacentCases(e,t);this.minificationsMade.unshift(c||h)},r.prototype.reduceSimpleNonAdjacentCases=function(e,t,r){function i(e,t){return c[e].isPartial&&0===t.length}function o(e,t,r,i){c[r-i-1].isPartial||(n(e,t),a=!0)}for(var a=!1,s=0,u=t.length;u>s;s++){var l=t[s],c=r[l];this.reduceSelector(e,l,c,{filterOut:i,callback:o})}return a},r.prototype.reduceComplexNonAdjacentCases=function(e,t){function r(e){return o.data[e].wheref;f++){var d=h[f],g=t[d];if(g.length<2)continue e;if(o.data=g,this.reduceSelector(e,d,g,{filterOut:r,callback:n}),c[c.length-1].list.length!=c[0].list.length)continue e}l.body=c[0].tokenized,i=!0}}return i},r.prototype.reduceSelector=function(e,t,r,n){for(var i=[],o=[],a=[],s=[],u=r.length-1,l=0;u>=0;u--)if(!n.filterOut(u,i)){var c=r[u].where,h=e[c];i=i.concat(h.body),o.push(h.metadata.bodiesList),s.push(c)}for(u=0,l=o.length;l>u;u++)o[u].length>0&&a.push((a[u-1]||0)+o[u].length);for(var f=this.propertyOptimizer.process(t,i,a,!1),p=s.length,d=f.tokenized.length-1,g=p-1;g>=0;)if((0===g||f.tokenized[d]&&o[g].indexOf(f.tokenized[d].value)>-1)&&d>-1)d--;else{var m={list:f.list.splice(d+1),tokenized:f.tokenized.splice(d+1)};n.callback(e[s[g]],m,p,g),g--}},r.prototype.optimize=function(e){function t(e){e.forEach(function(e){"block"==e.kind&&t(e.body)}),o(e,r.propertyOptimizer),r.removeDuplicates(e),r.mergeAdjacent(e),r.reduceNonAdjacent(e),r.removeDuplicates(e),r.mergeAdjacent(e)}var r=this;t(e)},t.exports=r},{"../../properties/optimizer":9,"./clean-up":17}],17:[function(e,t){function r(e,t){return"["+t.replace(/ /g,"")+"]"}function n(e,t){return e.value>t.value?1:-1}var i={selectors:function(e,t){for(var i=[],o=[],a=0,s=e.length;s>a;a++){var u=e[a],l=u.value.replace(/\s+/g," ").replace(/ ?, ?/g,",").replace(/\s*([>\+\~])\s*/g,"$1").trim();(!t||-1==l.indexOf("*+html ")&&-1==l.indexOf("*:first-child+html "))&&(l.indexOf("*")>-1&&(l=l.replace(/\*([:#\.\[])/g,"$1").replace(/^(\:first\-child)?\+html/,"*$1+html")),l.indexOf("[")>-1&&(l=l.replace(/\[([^\]]+)\]/g,r)),-1==i.indexOf(l)&&(i.push(l),u.value=l,o.push(u)))}return{list:i.sort(),tokenized:o.sort(n)}},block:function(e){return e.replace(/\s+/g," ").replace(/(,|:|\() /g,"$1").replace(/ \)/g,")")},atRule:function(e){return e.replace(/\s+/g," ").trim()}};t.exports=i},{}],18:[function(e,t){function r(e){this.options=e;var t=["px","em","ex","cm","mm","in","pt","pc","%"];e.compatibility.units.rem&&t.push("rem"),e.unitsRegexp=new RegExp("(^|\\s|\\(|,)0(?:"+t.join("|")+")","g"),e.precision={},e.precision.value=void 0===e.roundingPrecision?d:e.roundingPrecision,e.precision.multiplier=Math.pow(10,e.precision.value),e.precision.regexp=new RegExp("(\\d*\\.\\d{"+(e.precision.value+1)+",})px","g"),e.updateMetadata=this.options.advanced}function n(e,t){return-1==t.indexOf("0")?t:t.replace(/\-0$/g,"0").replace(/\-0([^\.])/g,"0$1").replace(/(^|\s)0+([1-9])/g,"$1$2").replace(/(^|\D)\.0+(\D|$)/g,"$10$2").replace(/(^|\D)\.0+(\D|$)/g,"$10$2").replace(/\.([1-9]*)0+(\D|$)/g,function(e,t,r){return(t.length>0?".":"")+t+r}).replace(/(^|\D)0\.(\d)/g,"$1.$2")}function i(e,t,r){return-1===r.value||-1===t.indexOf(".")?t:t.replace(r.regexp,function(e,t){return Math.round(parseFloat(t)*r.multiplier)/r.multiplier+"px"}).replace(/(\d)\.($|\D)/g,"$1$2")}function o(e,t,r){return t.replace(r,"$10")}function a(e,t){return-1==t.indexOf("0 0 0 0")?t:e.indexOf("box-shadow")>-1?"0 0 0 0"==t?"0 0":t:t.replace(/^0 0 0 0$/,"0")}function s(e,t,r){return-1===t.indexOf("#")&&-1==t.indexOf("rgb")&&-1==t.indexOf("hsl")?p.shorten(t):(t=t.replace(/rgb\((\-?\d+),(\-?\d+),(\-?\d+)\)/g,function(e,t,r,n){return new h(t,r,n).toHex()}).replace(/hsl\((-?\d+),(-?\d+)%?,(-?\d+)%?\)/g,function(e,t,r,n){return new f(t,r,n).toHex()}).replace(/(^|[^='"])#([0-9a-f]{6})/gi,function(e,t,r){return r[0]==r[1]&&r[2]==r[3]&&r[4]==r[5]?t+"#"+r[0]+r[2]+r[4]:t+"#"+r}).replace(/(rgb|rgba|hsl|hsla)\(([^\)]+)\)/g,function(e,t,r){var n=r.split(","),i="hsl"==t||"hsla"==t||n[0].indexOf("%")>-1;return i?(-1==n[1].indexOf("%")&&(n[1]+="%"),-1==n[2].indexOf("%")&&(n[2]+="%"),t+"("+n.join(",")+")"):e}),r.colors.opacity&&(t=t.replace(/(?:rgba|hsla)\(0,0%?,0%?,0\)/g,function(e){return new c(",").split(t).pop().indexOf("gradient(")>-1?e:"transparent"})),p.shorten(t))}function u(e,t){for(var r,u=[],l=[],c=0,h=e.length;h>c;c++){var f=e[c];if(0!==f.value.indexOf("__ESCAPED_")){var p=f.value.indexOf(":"),d=f.value.substring(0,p),g=f.value.substring(p+1),m=!1;(t.compatibility.properties.iePrefixHack||"_"!=d[0]&&"*"!=d[0])&&((g.indexOf("!important")>0||g.indexOf("! important")>0)&&(g=g.substring(0,g.indexOf("!")).trim(),m=!0),0===d.indexOf("border")&&d.indexOf("radius")>0&&(g=v["border-*-radius"](g)),v[d]&&(g=v[d](g)),g=i(d,g,t.precision),g=n(d,g),g=o(d,g,t.unitsRegexp),g=a(d,g),g=s(d,g,t.compatibility),r=d+":"+g+(m?"!important":""),u.push({value:r,metadata:f.metadata}),l.push(r))}else u.push(f),l.push(f.value)}return{tokenized:u,list:l}}var l=e("./clean-up"),c=e("../../utils/splitter"),h=e("../../colors/rgb"),f=e("../../colors/hsl"),p=e("../../colors/hex-name-shortener"),d=2,g="@charset",m=new RegExp("^"+g,"i"),v={background:function(e){return"none"==e||"transparent"==e?"0 0":e},"border-*-radius":function(e){if(-1==e.indexOf("/"))return e;var t=e.split(/\s*\/\s*/);return t[0]==t[1]?t[0]:t[0]+"/"+t[1]},filter:function(e){return e.indexOf("DXImageTransform")===e.lastIndexOf("DXImageTransform")&&(e=e.replace(/progid:DXImageTransform\.Microsoft\.(Alpha|Chroma)/,function(e,t){return t.toLowerCase()})),e.replace(/,(\S)/g,", $1").replace(/ ?= ?/g,"=")},font:function(e){var t=e.split(" ");return"normal"==t[1]||"bold"==t[1]||/^[1-9]00/.test(t[1])||(t[0]=this["font-weight"](t[0])),t.join(" ")},"font-weight":function(e){return"normal"==e?"400":"bold"==e?"700":e},outline:function(e){return"none"==e?"0":e}};r.prototype.optimize=function(e){function t(e){for(var o=0,a=e.length;a>o;o++){var s=e[o];if(!s)break;if("selector"==s.kind){var c=l.selectors(s.value,!i.compatibility.selectors.ie7Hack);if(s.value=c.tokenized,0===s.value.length){e.splice(o,1),o--;continue}var h=u(s.body,r.options);s.body=h.tokenized,i.updateMetadata&&(s.metadata.body=h.list.join(";"),s.metadata.bodiesList=h.list,s.metadata.selector=c.list.join(","),s.metadata.selectorsList=c.list)}else"block"==s.kind?(s.value=l.block(s.value),s.isFlatBlock?s.body=u(s.body,r.options).tokenized:t(s.body)):"at-rule"==s.kind&&(s.value=l.atRule(s.value),m.test(s.value)&&(n||-1==s.value.indexOf(g)?(e.splice(o,1),o--):(n=!0,e.splice(o,1),e.unshift({kind:"at-rule",value:s.value.replace(m,g)}))))}}var r=this,n=!1,i=this.options;t(e)},t.exports=r},{"../../colors/hex-name-shortener":3,"../../colors/hsl":4,"../../colors/rgb":5,"../../utils/splitter":36,"./clean-up":17}],19:[function(e,t){(function(r){function n(e,t,n){this.column=0,this.line=1,this.output=[],this.keepBreaks=e.keepBreaks,this.restore=t,this.inputMapTracker=n,this.outputMap=new u,e.root?(this.rebaseTo=o.resolve(e.root),this.resolvePath=this.rootPathResolver):e.target&&(this.rebaseTo=o.resolve(r.cwd(),e.target),(!a.existsSync(this.rebaseTo)||a.statSync(this.rebaseTo).isFile())&&(this.rebaseTo=o.dirname(this.rebaseTo)),this.resolvePath=this.relativePathResolver)}function i(e,t,r){this.rebuilder=new n(e,t,r)}var o=e("path"),a=e("fs"),s=e("url"),u=e("source-map").SourceMapGenerator,l=e("os").EOL;n.prototype.rootPathResolver=function(e){return e.replace(this.rebaseTo,"")},n.prototype.relativePathResolver=function(e,t){return t&&(e=o.resolve(o.dirname(t),e)),o.relative(this.rebaseTo,e)},n.prototype.rebuildValue=function(e,t){for(var r=0,n=0,i=e.length;i>n;n++){var o=e[n];0===o.value.indexOf("__ESCAPED_")?(this.store(o),r++,n===i-1&&r>0&&this.output.splice(this.output.length-r-1,1)):(this.store(o),this.store(i-1>n?t:""),r=0)}},n.prototype.store=function(e){var t="string"==typeof e?e:e.value.indexOf("_")>-1?this.restore(e.value):e.value;this.track(t,e.metadata),this.output.push(t)},n.prototype.rebuildList=function(e,t){for(var r=t?";":this.keepBreaks?l:"",n=0,i=e.length;i>n;n++){var o=e[n];"text"!==o.kind&&"at-rule"!=o.kind?o.body&&(0===o.body.length||1==o.body.length&&""===o.body[0].value)||("block"==o.kind?o.body.length>0&&(this.rebuildValue([{value:o.value,metadata:o.metadata}],""),this.store("{"),o.isFlatBlock?this.rebuildValue(o.body,";"):this.rebuildList(o.body,!1),this.store("}")):(this.rebuildValue(o.value,","),this.store("{"),this.rebuildValue(o.body,";"),this.store("}")),this.store(r)):this.store(o)}},n.prototype.track=function(e,t){t&&this.trackMetadata(t,e);var r=e.split("\n");this.line+=r.length-1,this.column=r.length>1?0:this.column+r.pop().length},n.prototype.trackMetadata=function(e,t){var r=this.inputMapTracker.isTracking(e)?this.inputMapTracker.originalPositionFor(e,t):{};this.outputMap.addMapping({generated:{line:this.line,column:this.column},source:this.stylingSourceFor(r,e)||"__stdin__.css",original:{line:r.line||e.line,column:r.column||e.column}})},n.prototype.stylingSourceFor=function(e,t){var r=e.source||t.source;return r&&t.source&&(/^https?:\/\//.test(t.source)||/^\/\//.test(t.source))&&r!=t.source?s.resolve(t.source,r):r&&this.resolvePath?this.resolvePath(r,t.source):r},i.prototype.toString=function(e){return this.rebuilder.rebuildList(e),{sourceMap:this.rebuilder.outputMap,styles:this.rebuilder.output.join("").trim()}},t.exports=i}).call(this,e("_process"))},{_process:52,fs:37,os:50,path:51,"source-map":73,url:70}],20:[function(e,t){function r(e,t){this.keepBreaks=e.keepBreaks,this.restoreCallback=t}function n(e,t){for(var r="",n=0,i=e.length;i>n;n++){var o=e[n];if(0===o.value.indexOf("__ESCAPED_")){if(r+=o.value,n===i-1){var a=r.lastIndexOf(";");r=r.substring(0,a)+r.substring(a+1)}}else r+=e[n].value+(i-1>n?t:"")}return r}function i(e,t,r){for(var a,s,u=r?";":t?o:"",l=[],c=0,h=e.length;h>c;c++){var f=e[c];"text"!==f.kind&&"at-rule"!=f.kind?f.body&&(0===f.body.length||1==f.body.length&&""===f.body[0].value)||("block"==f.kind?(a=f.isFlatBlock?n(f.body,";"):i(f.body,t,f.isFlatBlock),a.length>0&&l.push(f.value+"{"+a+"}")):(s=n(f.value,","),a=n(f.body,";"),l.push(s+"{"+a+"}"))):l.push(f.value)}return l.join(u)}var o=e("os").EOL;r.prototype.toString=function(e){var t=i(e,this.keepBreaks,!1);return{styles:this.restoreCallback(t).trim()}},t.exports=r},{os:50}],21:[function(e,t){function r(e,t,r){this.minifyContext=e,this.addMetadata=t,this.addSourceMap=r}function n(e){var t,r=e.mode,n=e.chunk;if(n.length==e.cursor){if(e.chunker.isEmpty())return null;e.chunk=n=e.chunker.next(),e.cursor=0}if("body"==r)return t=n.indexOf("}",e.cursor),t>-1?[t,"bodyEnd"]:null;var i=n.indexOf("@",e.cursor),o=n.indexOf("__ESCAPED_",e.cursor),a=n.indexOf("{",e.cursor),s=n.indexOf("}",e.cursor);return o>-1&&/\S/.test(n.substring(e.cursor,o))&&(o=-1),t=i,(-1==t||o>-1&&t>o)&&(t=o),(-1==t||a>-1&&t>a)&&(t=a),(-1==t||s>-1&&t>s)&&(t=s),-1!=t?o===t?[t,"escape"]:a===t?[t,"bodyStart"]:s===t?[t,"bodyEnd"]:i===t?[t,"special"]:void 0:void 0}function i(e){for(var t,r,o=e.chunk,l=[],c=e.addSourceMap;;){var h=n(e);if(!h){var f=e.chunk.substring(e.cursor);f.trim().length>0&&(l.push({kind:"text",value:f}),e.cursor+=f.length);break}var p,d,g=h[0],m=h[1];if(o=e.chunk,e.cursor!=g&&"bodyEnd"!=m){var v=o.substring(e.cursor,g),b=/^\s+/.exec(v);b&&(e.cursor+=b[0].length,c&&s.track(b[0],e))}if("special"==m){var y=o.indexOf("{",g),w=o.indexOf(";",g),_=w>-1&&(-1==y||y>w),x=-1==y&&-1==w;if(x)e.outer.warnings.push("Broken declaration: '"+o.substring(e.cursor)+"'."),e.cursor=o.length;else if(_)p=o.indexOf(";",g+1),r=o.substring(e.cursor,p+1),t={kind:"at-rule",value:r},l.push(t),c&&(t.metadata=s.saveAndTrack(r,e,!0)),e.cursor=p+1;else{p=o.indexOf("{",g+1),r=o.substring(e.cursor,p);var k=r.trim(),S=u.test(k);d=e.mode,e.cursor=p+1,e.mode=S?"body":"block",t={kind:"block",value:k,isFlatBlock:S},c&&(t.metadata=s.saveAndTrack(r,e,!0)),t.body=i(e),"string"==typeof t.body&&(t.body=a.properties(t.body,e).tokenized),e.mode=d,c&&s.suffix(e),l.push(t)}}else if("escape"==m){p=o.indexOf("__",g+1);var O=o.substring(e.cursor,p+2),E=!!e.outer.sourceTracker.nextStart(O),C=!!e.outer.sourceTracker.nextEnd(O);if(E)c&&s.track(O,e),e.state.push({source:e.source,line:e.line,column:e.column}),e.source=e.outer.sourceTracker.nextStart(O).filename,e.line=1,e.column=0;else if(C){var A=e.state.pop();e.source=A.source,e.line=A.line,e.column=A.column,c&&s.track(O,e)}else 0===O.indexOf("__ESCAPED_COMMENT_SPECIAL")&&l.push({kind:"text",value:O}),c&&s.track(O,e);e.cursor=p+2}else if("bodyStart"==m){var M=a.selectors(o.substring(e.cursor,g),e);d=e.mode,e.cursor=g+1,e.mode="body";var R=a.properties(i(e),e);c&&s.suffix(e),e.mode=d,t={kind:"selector",value:M.tokenized,body:R.tokenized},e.addMetadata&&(t.metadata={body:R.list.join(","),bodiesList:R.list,selector:M.list.join(","),selectorsList:M.list}),l.push(t)}else if("bodyEnd"==m){if("top"==e.mode){var L=e.cursor,j="}"==o[e.cursor]?"Unexpected '}' in '"+o.substring(L-20,L+20)+"'. Ignoring.":"Unexpected content: '"+o.substring(L,g+1)+"'. Ignoring.";e.outer.warnings.push(j),e.cursor=g+1;continue}"block"==e.mode&&e.addSourceMap&&s.track(o.substring(e.cursor,g),e),"block"!=e.mode&&(l=o.substring(e.cursor,g)),e.cursor=g+1;break}}return l}var o=e("../utils/chunker"),a=e("../utils/extractors"),s=e("../utils/source-maps"),u=/(^@(font\-face|page|\-ms\-viewport|\-o\-viewport|viewport|counter\-style)|\\@.+?)/;r.prototype.toTokens=function(e){e=e.replace(/\r\n/g,"\n");var t=new o(e,"}",128);if(t.isEmpty())return[];var r={cursor:0,mode:"top",chunker:t,chunk:t.next(),outer:this.minifyContext,addMetadata:this.addMetadata,addSourceMap:this.addSourceMap,state:[],line:1,column:0,source:void 0};return i(r)},t.exports=r},{"../utils/chunker":27,"../utils/extractors":29,"../utils/source-maps":33}],22:[function(e,t){function r(e,t,r,n){this.comments=new o("COMMENT"),this.specialComments=new o("COMMENT_SPECIAL"),this.context=e,this.keepAll="*"==t,this.keepOne="1"==t||1===t,this.keepBreaks=r,this.saveWaypoints=n}function n(e){var t=[];return new a(e).each(function(e,r,n){t.push([n,n+e.length])}),function(e){for(var r=0,n=t.length;n>r;r++)if(t[r][0]e)return!0;return!1}}function i(e,t,r,n){for(var i,o=[],a=0,s=0;s0?o.join("")+t.substring(s,t.length):t}var o=e("./escape-store"),a=e("../utils/quote-scanner"),s="/*!",u="/*",l="*/",c=e("os").EOL;r.prototype.escape=function(e){for(var t,r,i,o=[],a=0,h=0,f=0,p=0,d=n(e),g=this.saveWaypoints;h0?m.substring(r+c.length).length:p+m.length),g||v){var b=g?[t,i]:null,y=v?this.specialComments.store(m,b):this.comments.store(m,b);o.push(y)}g&&(p=i+1),f=h+l.length}return o.length>0?o.join("")+e.substring(f,e.length):e},r.prototype.restore=function(e){return e=i(this,e,this.comments,!1),e=i(this,e,this.specialComments,!0)},t.exports=r},{"../utils/quote-scanner":32,"./escape-store":23,os:50}],23:[function(e,t){function r(e){this.placeholderRoot="ESCAPED_"+e+"_CLEAN_CSS",this.placeholderToData={},this.dataToPlaceholder={},this.count=0,this.restoreMatcher=new RegExp(this.placeholderRoot+"(\\d+)")}var n="__";r.prototype._nextPlaceholder=function(e){return{index:this.count,value:n+this.placeholderRoot+this.count++ +e+n}},r.prototype.store=function(e,t){var r=t?"("+t.join(",")+")":"",n=this.dataToPlaceholder[e];if(!n){var i=this._nextPlaceholder(r);n=i.value,this.placeholderToData[i.index]=e,this.dataToPlaceholder[e]=i.value}return t&&(n=n.replace(/\([^\)]+\)/,r)),n},r.prototype.nextMatch=function(e,t){var r={};return r.start=e.indexOf(this.placeholderRoot,t)-n.length,r.end=e.indexOf(n,r.start+n.length)+n.length,r.start>-1&&r.end>-1&&(r.match=e.substring(r.start,r.end)),r},r.prototype.restore=function(e){var t=this.restoreMatcher.exec(e)[1];return this.placeholderToData[t]},t.exports=r},{}],24:[function(e,t){function r(e,t){for(var r=t+o.length,n=0,i=!1,u=!1;;){var h=e[r++];if(i?i="'"!=h&&'"'!=h:(i="'"==h||'"'==h,h==a&&n++,h==s&&n--,h==l&&(u=!0),h!=c||u||1!=n||(r--,n--)),0===n&&h==s)break;if(!h){r=e.substring(0,r).lastIndexOf(c);break}}return r}function n(e){this.expressions=new i("EXPRESSION"),this.saveWaypoints=e}var i=e("./escape-store"),o="expression",a="(",s=")",u=o+a,l="{",c="}",h=e("os").EOL;n.prototype.escape=function(e){for(var t,n,i,o=0,a=0,s=0,l=[],c=0,f=this.saveWaypoints;a0?p.substring(n+h.length).length:c+p.length);var d=f?[t,i]:null,g=this.expressions.store(p,d);l.push(e.substring(s,o)),l.push(g),f&&(c=i+1),s=a}return l.length>0?l.join("")+e.substring(s,e.length):e},n.prototype.restore=function(e){for(var t=[],r=0;r0?t.join("")+e.substring(r,e.length):e},t.exports=n},{"./escape-store":23,os:50}],25:[function(e,t){function r(e){this.matches=new i("FREE_TEXT"),this.saveWaypoints=e}function n(e,t,r){var n=t.lastIndexOf(";",r),i=t.lastIndexOf("{",r),o=0;o=n>-1&&i>-1?Math.max(n,i):-1==n?i:n;var a=t.substring(o+1,r);if(/\[[\w\d\-]+[\*\|\~\^\$]?=$/.test(a)&&(e=e.replace(/\\\n|\\\r\n/g,"")),/^['"][a-zA-Z][a-zA-Z\d\-_]+['"]$/.test(e)&&!/format\($/.test(a)){var s=/^(font|font\-family):/.test(a),u=/\[[\w\d\-]+[\*\|\~\^\$]?=$/.test(a),l=/@(-moz-|-o-|-webkit-)?keyframes /.test(a),c=/^(-moz-|-o-|-webkit-)?animation(-name)?:/.test(a);(s||u||l||c)&&(e=e.substring(1,e.length-1))}return e}var i=e("./escape-store"),o=e("../utils/quote-scanner"),a=e("os").EOL;r.prototype.escape=function(e){var t,r,n,i,s=this,u=this.saveWaypoints;return new o(e).each(function(e,o){u&&(t=e.split(a).length-1,r=e.lastIndexOf(a),n=r>0?e.substring(r+a.length).length:e.length,i=[t,n]);var l=s.matches.store(e,i);o.push(l)})},r.prototype.restore=function(e){for(var t=[],r=0;r0?t.join("")+e.substring(r,e.length):e},t.exports=r},{"../utils/quote-scanner":32,"./escape-store":23,os:50}],26:[function(e,t){function r(e,t){this.urls=new i("URL"),this.context=e,this.saveWaypoints=t}function n(e){return e=e.replace(/\\?\n|\\?\r\n/g,"").replace(/(\s{2,}|\s)/g," ").replace(/^url\((['"])? /,"url($1").replace(/ (['"])?\)$/,"$1)"),/url\(.*[\s\(\)].*\)/.test(e)||/url\(['"]data:[^;]+;charset/.test(e)||(e=e.replace(/["']/g,"")),e}var i=e("./escape-store"),o="url(",a=")",s=e("os").EOL;r.prototype.escape=function(e){for(var t,r,n,i=0,u=0,l=0,c=[],h=this.saveWaypoints;u0?f.substring(r+s.length).length:f.length);var p=this.urls.store(f,h?[t,n]:null);c.push(e.substring(l,i)),c.push(p),l=u+1}return c.length>0?c.join("")+e.substring(l,e.length):e},r.prototype.restore=function(e){for(var t=[],r=0;r0?t.join("")+e.substring(r,e.length):e},t.exports=r},{"./escape-store":23,os:50}],27:[function(e,t){function r(e,t,r){this.chunks=[];for(var n=0,i=e.length;i>n;){var o=n+r>i?i-1:n+r;e[o]!=t&&(o=e.indexOf(t,o)),-1==o&&(o=e.length-1),this.chunks.push(e.substring(n,o+t.length)),n=o+t.length}}r.prototype.isEmpty=function(){return 0===this.chunks.length},r.prototype.next=function(){return this.chunks.shift()},t.exports=r},{}],28:[function(e,t){function r(e){this.source=e||{}}function n(e,t){for(var r in e){var i=e[r];t[r]="object"!=typeof i||o.isRegExp(i)?r in t?t[r]:i:n(i,t[r]||{})}return t}function i(e){if("object"==typeof e)return e;if(!/[,\+\-]/.test(e))return a[e]||a["*"];var t=e.split(","),r=t[0]in a?a[t.shift()]:a["*"];return e={},t.forEach(function(t){var r="+"==t[0],n=t.substring(1).split("."),i=n[0],o=n[1];e[i]=e[i]||{},e[i][o]=r}),n(r,e)}var o=e("util"),a={"*":{colors:{opacity:!0},properties:{backgroundSizeMerging:!1,iePrefixHack:!1,ieSuffixHack:!1,merging:!0},selectors:{ie7Hack:!1,special:/(\-moz\-|\-ms\-|\-o\-|\-webkit\-|:dir\([a-z-]*\)|:first(?![a-z-])|:fullscreen|:left|:read-only|:read-write|:right)/},units:{rem:!0}},ie8:{colors:{opacity:!1},properties:{backgroundSizeMerging:!1,iePrefixHack:!0,ieSuffixHack:!0,merging:!1},selectors:{ie7Hack:!1,special:/(\-moz\-|\-ms\-|\-o\-|\-webkit\-|:root|:nth|:first\-of|:last|:only|:empty|:target|:checked|::selection|:enabled|:disabled|:not)/},units:{rem:!1}},ie7:{colors:{opacity:!1},properties:{backgroundSizeMerging:!1,iePrefixHack:!0,ieSuffixHack:!0,merging:!1},selectors:{ie7Hack:!0,special:/(\-moz\-|\-ms\-|\-o\-|\-webkit\-|:focus|:before|:after|:root|:nth|:first\-of|:last|:only|:empty|:target|:checked|::selection|:enabled|:disabled|:not)/},units:{rem:!1}}};r.prototype.toOptions=function(){return n(a["*"],i(this.source))},t.exports=r},{util:72}],29:[function(e,t){var r=e("./splitter"),n=e("../utils/source-maps"),i={properties:function(e,t){for(var r,i,o,a,s,u,l,c,h,f,p=[],d=[],g=[],m=[],v=t.addSourceMap,b=0,y=e.length;y>b;b++){if(l=e[b],i=";"===l,h=!i&&"_"==l&&e.indexOf("__ESCAPED_COMMENT",b)===b)if(g.length>0)b--,i=!0;else{var w=e.indexOf("__",b+1)+2,_=e.substring(b,w);if(b=w-1,-1===_.indexOf("__ESCAPED_COMMENT_SPECIAL")){v&&n.track(_,t,!0);continue}g=m=[_]}i||h?(a&&" "===g[g.length-1]&&g.pop(),g.length>0&&(r=g.join(""),f={value:r},p.push(f),d.push(r),v&&(f.metadata=n.saveAndTrack(m.join(""),t,!h))),g=[],m=[]):(o=" "===l||" "===l||"\n"===l,s=":"===l||"["===l||"]"===l||","===l||"("===l||")"===l,a&&s?(g.pop(),g.push(l)):o&&u&&!c||(o&&!a&&g.length>0?g.push(" "):o&&0===g.length||o&&a||g.push(o?" ":l)),m.push(l)),u=s,a=o,c=")"===l}return a&&" "===g[g.length-1]&&g.pop(),g.length>0?(r=g.join(""),f={value:r},p.push(f),d.push(r),v&&(f.metadata=n.saveAndTrack(m.join(""),t,!1))):m.indexOf("\n")>-1&&n.track(m.join(""),t),{list:d,tokenized:p}},selectors:function(e,t){for(var i=[],o=[],a=new r(",").split(e),s=t.addSourceMap,u=0,l=a.length;l>u;u++){var c=a[u];o.push(c);var h={value:c};i.push(h),s&&(h.metadata=n.saveAndTrack(c,t,!0))}return{list:o,tokenized:i}}};t.exports=i},{"../utils/source-maps":33,"./splitter":36}],30:[function(e,t){function r(e){this.options=e.options,this.errors=e.errors,this.sourceTracker=e.sourceTracker,this.timeout=this.options.inliner.timeout,this.requestOptions=this.options.inliner.request,this.maps={}}function n(e,t,r){return e.maps[void 0]=new s(e.options.sourceMap),r()}function i(e,t,r,n){function a(){n.cursor+=c+1,i(e,t,r,n)}for(var c=0;n.cursor-1&&(c=f.index),p.index>-1&&p.index-1&&g.index299)return i(t.statusCode);var o=[];t.on("data",function(e){o.push(e.toString())}),t.on("end",function(){e.maps[r.files[r.files.length-1]||void 0]=new s(o.join("")),n()})}).on("error",function(e){i(e.message)}).on("timeout",function(){i("timeout")}).setTimeout(e.timeout)}function a(e,t,r){for(var n,i=r.replace(/[>\+~]/g," $1 ").length,o={line:t.line,column:t.column+i};i-->0&&(o.column--,!(n=e.originalPositionFor(o))););return n}var s=e("source-map").SourceMapConsumer,u=e("fs"),l=e("path"),c=e("http"),h=e("https"),f=e("url"),p=e("../utils/object.js").override,d=/\/\*# sourceMappingURL=(\S+) \*\//;r.prototype.track=function(e,t){return"string"==typeof this.options.sourceMap?n(this,e,t):i(this,e,t,{files:[],cursor:0,errors:this.errors})},r.prototype.isTracking=function(e){return!!this.maps[e.source]},r.prototype.originalPositionFor=function(e,t){return a(this.maps[e.source],e,t)},t.exports=r},{"../utils/object.js":31,fs:37,http:43,https:47,path:51,"source-map":73,url:70}],31:[function(e,t){t.exports={override:function(e,t){var r={};for(var n in e)r[n]=e[n];for(var i in t)r[i]=t[i];return r}}},{}],32:[function(e,t){function r(e){this.data=e}var n=function(e,t,r,n){var i="/*",o="*/",a="\\",s="}",u=e.substring(n,r),l=u.lastIndexOf(o,r),c=u.lastIndexOf(i,r),h=!1;if(l>=r&&c>-1&&(h=!0),r>c&&c>l&&(h=!0),h){var f=e.indexOf(o,r);return f>-1?f:(f=e.indexOf(s,r),f>-1?f-1:e.length)}for(;;){if(void 0===e[r])break;if(e[r]==t&&(e[r-1]!=a||e[r-2]==a))break;r++}return r};r.prototype.each=function(e){for(var t=this.data,r=[],i=0,o=0,a=0,s=null,u="'",l='"',c=t.length;oh?(i=h,s=u):(i=f,s=l),-1==i)break;if(o=n(t,s,i+1,a),-1==o)break;var p=t.substring(i,o+1);r.push(t.substring(a,i)),p.length>0&&e(p,r,i),a=o+1}return r.length>0?r.join("")+t.substring(a,t.length):t},t.exports=r},{}],33:[function(e,t){function r(e,t){var r,n,i=e.split("\n"),o=0;for(r=0,n=i.length;n>r;r++){var a=i[r];if(/\S/.test(a))break;o+=a.length+1}return t.line+=r,t.column=r>0?0:t.column,t.column+=/^(\s)*/.exec(i[r])[0].length,e.substring(o).trimLeft()}var n={saveAndTrack:function(e,t,n){var i=r(e,t),o={line:t.line,column:t.column,source:t.source};return this.track(i,t),n&&t.column++,o},suffix:function(e){e.column++},track:function(e,t){for(var r=e.split("\n"),n=0,i=r.length;i>n;n++){var o=r[n],a=0;for(n>0&&(t.line++,t.column=0);;){var s=o.indexOf("__ESCAPED_",a);if(-1==s){t.column+=o.substring(a).length;break}t.column+=s-a,a+=s-a;var u=o.substring(s,o.indexOf("__",s+1)+2),l=u.substring(u.indexOf("(")+1,u.indexOf(")")).split(",");t.line+=~~l[0],t.column=(0===~~l[0]?t.column:0)+~~l[1],a+=u.length}}}};t.exports=n},{}],34:[function(e,t){(function(r){function n(e,t){this.outerContext=e,this.data=t}function i(e,t){return t.map(function(t){return e.options.processImport===!1?t+"@shallow":t}).map(function(t){return!e.options.relativeTo||/^https?:\/\//.test(t)?t:o.relative(e.options.relativeTo,t)}).map(function(e){return"@import url("+e+");"}).join("")}var o=e("path");n.prototype.toString=function(){return"string"==typeof this.data?this.data:r.isBuffer(this.data)?this.data.toString():Array.isArray(this.data)?i(this.outerContext,this.data):this.data},t.exports=n}).call(this,e("buffer").Buffer)},{buffer:38,path:51}],35:[function(e,t){function r(){this.sources=[]}r.prototype.store=function(e,t){return this.sources.push(e),"__ESCAPED_SOURCE_CLEAN_CSS"+(this.sources.length-1)+"__"+t+"__ESCAPED_SOURCE_END_CLEAN_CSS__"},r.prototype.nextStart=function(e){var t=/__ESCAPED_SOURCE_CLEAN_CSS(\d+)__/.exec(e);return t?{index:t.index,filename:this.sources[~~t[1]]}:null},r.prototype.nextEnd=function(e){return/__ESCAPED_SOURCE_END_CLEAN_CSS__/g.exec(e)},r.prototype.removeAll=function(e){return e.replace(/__ESCAPED_SOURCE_CLEAN_CSS\d+__/g,"").replace(/__ESCAPED_SOURCE_END_CLEAN_CSS__/g,"")},t.exports=r},{}],36:[function(e,t){function r(e){this.separator=e}r.prototype.split=function(e){if(-1===e.indexOf(this.separator))return[e];if(-1===e.indexOf("("))return e.split(this.separator);for(var t=0,r=0,n=0,i=e.length,o=[];r++n&&o.push(e.substring(n)),o},t.exports=r},{}],37:[function(){},{}],38:[function(e,t,r){function n(e,t,r){if(!(this instanceof n))return new n(e,t,r);var i,o=typeof e;if("number"===o)i=e>0?e>>>0:0;else if("string"===o)"base64"===t&&(e=k(e)),i=n.byteLength(e,t);else{if("object"!==o||null===e)throw new TypeError("must start with number, buffer, array or string");"Buffer"===e.type&&V(e.data)&&(e=e.data),i=+e.length>0?Math.floor(+e.length):0}if(this.length>P)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+P.toString(16)+" bytes");var a;n.TYPED_ARRAY_SUPPORT?a=n._augment(new Uint8Array(i)):(a=this,a.length=i,a._isBuffer=!0);var s;if(n.TYPED_ARRAY_SUPPORT&&"number"==typeof e.byteLength)a._set(e);else if(O(e))if(n.isBuffer(e))for(s=0;i>s;s++)a[s]=e.readUInt8(s);else for(s=0;i>s;s++)a[s]=(e[s]%256+256)%256;else if("string"===o)a.write(e,0,t);else if("number"===o&&!n.TYPED_ARRAY_SUPPORT&&!r)for(s=0;i>s;s++)a[s]=0;return a}function i(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;n>a;a++){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[r+a]=s}return a}function o(e,t,r,n){var i=L(C(t),e,r,n);return i}function a(e,t,r,n){var i=L(A(t),e,r,n);return i}function s(e,t,r,n){return a(e,t,r,n)}function u(e,t,r,n){var i=L(R(t),e,r,n);return i}function l(e,t,r,n){var i=L(M(t),e,r,n,2);return i}function c(e,t,r){return T.fromByteArray(0===t&&r===e.length?e:e.slice(t,r))}function h(e,t,r){var n="",i="";r=Math.min(e.length,r);for(var o=t;r>o;o++)e[o]<=127?(n+=j(i)+String.fromCharCode(e[o]),i=""):i+="%"+e[o].toString(16);return n+j(i)}function f(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;r>i;i++)n+=String.fromCharCode(e[i]);return n}function p(e,t,r){return f(e,t,r)}function d(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=t;r>o;o++)i+=E(e[o]);return i}function g(e,t,r){for(var n=e.slice(t,r),i="",o=0;oe)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function v(e,t,r,i,o,a){if(!n.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>o||a>t)throw new TypeError("value is out of bounds");if(r+i>e.length)throw new TypeError("index out of range")}function b(e,t,r,n){0>t&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);o>i;i++)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function y(e,t,r,n){0>t&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);o>i;i++)e[r+i]=t>>>8*(n?i:3-i)&255}function w(e,t,r,n,i,o){if(t>i||o>t)throw new TypeError("value is out of bounds");if(r+n>e.length)throw new TypeError("index out of range")}function _(e,t,r,n,i){return i||w(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),I.write(e,t,r,n,23,4),r+4}function x(e,t,r,n,i){return i||w(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),I.write(e,t,r,n,52,8),r+8}function k(e){for(e=S(e).replace(z,"");e.length%4!==0;)e+="=";return e}function S(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function O(e){return V(e)||n.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function E(e){return 16>e?"0"+e.toString(16):e.toString(16)}function C(e){for(var t=[],r=0;r=n)t.push(n);else{var i=r;n>=55296&&57343>=n&&r++;for(var o=encodeURIComponent(e.slice(i,r+1)).substr(1).split("%"),a=0;a>8,n=t%256,i.push(n),i.push(r);return i}function R(e){return T.toByteArray(e)}function L(e,t,r,n,i){i&&(n-=n%i);for(var o=0;n>o&&!(o+r>=t.length||o>=e.length);o++)t[o+r]=e[o];return o}function j(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}var T=e("base64-js"),I=e("ieee754"),V=e("is-array");r.Buffer=n,r.SlowBuffer=n,r.INSPECT_MAX_BYTES=50,n.poolSize=8192;var P=1073741823;n.TYPED_ARRAY_SUPPORT=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(r){return!1}}(),n.isBuffer=function(e){return!(null==e||!e._isBuffer)},n.compare=function(e,t){if(!n.isBuffer(e)||!n.isBuffer(t))throw new TypeError("Arguments must be Buffers");for(var r=e.length,i=t.length,o=0,a=Math.min(r,i);a>o&&e[o]===t[o];o++);return o!==a&&(r=e[o],i=t[o]),i>r?-1:r>i?1:0},n.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(e,t){if(!V(e))throw new TypeError("Usage: Buffer.concat(list[, length])");if(0===e.length)return new n(0);if(1===e.length)return e[0];var r;if(void 0===t)for(t=0,r=0;r>>1;break;case"utf8":case"utf-8":r=C(e).length;break;case"base64":r=R(e).length;break;default:r=e.length}return r},n.prototype.length=void 0,n.prototype.parent=void 0,n.prototype.toString=function(e,t,r){var n=!1;if(t>>>=0,r=void 0===r||1/0===r?this.length:r>>>0,e||(e="utf8"),0>t&&(t=0),r>this.length&&(r=this.length),t>=r)return"";for(;;)switch(e){case"hex":return d(this,t,r);case"utf8":case"utf-8":return h(this,t,r);case"ascii":return f(this,t,r);case"binary":return p(this,t,r);case"base64":return c(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}},n.prototype.equals=function(e){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");return 0===n.compare(this,e)},n.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},n.prototype.compare=function(e){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");return n.compare(this,e)},n.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},n.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},n.prototype.write=function(e,t,r,n){if(isFinite(t))isFinite(r)||(n=r,r=void 0);else{var c=n;n=t,t=r,r=c}t=Number(t)||0;var h=this.length-t;r?(r=Number(r),r>h&&(r=h)):r=h,n=String(n||"utf8").toLowerCase();var f;switch(n){case"hex":f=i(this,e,t,r);break;case"utf8":case"utf-8":f=o(this,e,t,r);break;case"ascii":f=a(this,e,t,r);break;case"binary":f=s(this,e,t,r);break;case"base64":f=u(this,e,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":f=l(this,e,t,r);break;default:throw new TypeError("Unknown encoding: "+n)}return f},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(e,t){var r=this.length;if(e=~~e,t=void 0===t?r:~~t,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),e>t&&(t=e),n.TYPED_ARRAY_SUPPORT)return n._augment(this.subarray(e,t));for(var i=t-e,o=new n(i,void 0,!0),a=0;i>a;a++)o[a]=this[a+e];return o},n.prototype.readUInt8=function(e,t){return t||m(e,1,this.length),this[e]},n.prototype.readUInt16LE=function(e,t){return t||m(e,2,this.length),this[e]|this[e+1]<<8},n.prototype.readUInt16BE=function(e,t){return t||m(e,2,this.length),this[e]<<8|this[e+1]},n.prototype.readUInt32LE=function(e,t){return t||m(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},n.prototype.readUInt32BE=function(e,t){return t||m(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},n.prototype.readInt8=function(e,t){return t||m(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},n.prototype.readInt16LE=function(e,t){t||m(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt16BE=function(e,t){t||m(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt32LE=function(e,t){return t||m(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return t||m(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readFloatLE=function(e,t){return t||m(e,4,this.length),I.read(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return t||m(e,4,this.length),I.read(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return t||m(e,8,this.length),I.read(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return t||m(e,8,this.length),I.read(this,e,!1,52,8)},n.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,1,255,0),n.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e,t+1},n.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):b(this,e,t,!0),t+2},n.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):b(this,e,t,!1),t+2},n.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e):y(this,e,t,!0),t+4},n.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):y(this,e,t,!1),t+4},n.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,1,127,-128),n.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=e,t+1},n.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):b(this,e,t,!0),t+2},n.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):b(this,e,t,!1),t+2},n.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):y(this,e,t,!0),t+4},n.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):y(this,e,t,!1),t+4},n.prototype.writeFloatLE=function(e,t,r){return _(this,e,t,!0,r)},n.prototype.writeFloatBE=function(e,t,r){return _(this,e,t,!1,r)},n.prototype.writeDoubleLE=function(e,t,r){return x(this,e,t,!0,r)},n.prototype.writeDoubleBE=function(e,t,r){return x(this,e,t,!1,r)},n.prototype.copy=function(e,t,r,i){var o=this;if(r||(r=0),i||0===i||(i=this.length),t||(t=0),i!==r&&0!==e.length&&0!==o.length){if(r>i)throw new TypeError("sourceEnd < sourceStart");if(0>t||t>=e.length)throw new TypeError("targetStart out of bounds");if(0>r||r>=o.length)throw new TypeError("sourceStart out of bounds");if(0>i||i>o.length)throw new TypeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-ta||!n.TYPED_ARRAY_SUPPORT)for(var s=0;a>s;s++)e[s+t]=this[s+r];else e._set(this.subarray(r,r+a),t)}},n.prototype.fill=function(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),t>r)throw new TypeError("end < start");if(r!==t&&0!==this.length){if(0>t||t>=this.length)throw new TypeError("start out of bounds");if(0>r||r>this.length)throw new TypeError("end out of bounds");var n;if("number"==typeof e)for(n=t;r>n;n++)this[n]=e;else{var i=C(e.toString()),o=i.length;for(n=t;r>n;n++)this[n]=i[n%o]}return this}},n.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(n.TYPED_ARRAY_SUPPORT)return new n(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;r>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var B=n.prototype;n._augment=function(e){return e.constructor=n,e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=B.get,e.set=B.set,e.write=B.write,e.toString=B.toString,e.toLocaleString=B.toString,e.toJSON=B.toJSON,e.equals=B.equals,e.compare=B.compare,e.copy=B.copy,e.slice=B.slice,e.readUInt8=B.readUInt8,e.readUInt16LE=B.readUInt16LE,e.readUInt16BE=B.readUInt16BE,e.readUInt32LE=B.readUInt32LE,e.readUInt32BE=B.readUInt32BE,e.readInt8=B.readInt8,e.readInt16LE=B.readInt16LE,e.readInt16BE=B.readInt16BE,e.readInt32LE=B.readInt32LE,e.readInt32BE=B.readInt32BE,e.readFloatLE=B.readFloatLE,e.readFloatBE=B.readFloatBE,e.readDoubleLE=B.readDoubleLE,e.readDoubleBE=B.readDoubleBE,e.writeUInt8=B.writeUInt8,e.writeUInt16LE=B.writeUInt16LE,e.writeUInt16BE=B.writeUInt16BE,e.writeUInt32LE=B.writeUInt32LE,e.writeUInt32BE=B.writeUInt32BE,e.writeInt8=B.writeInt8,e.writeInt16LE=B.writeInt16LE,e.writeInt16BE=B.writeInt16BE,e.writeInt32LE=B.writeInt32LE,e.writeInt32BE=B.writeInt32BE,e.writeFloatLE=B.writeFloatLE,e.writeFloatBE=B.writeFloatBE,e.writeDoubleLE=B.writeDoubleLE,e.writeDoubleBE=B.writeDoubleBE,e.fill=B.fill,e.inspect=B.inspect,e.toArrayBuffer=B.toArrayBuffer,e};var z=/[^+\/0-9A-z]/g},{"base64-js":39,ieee754:40,"is-array":41}],39:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===a?62:t===s?63:u>t?-1:u+10>t?t-u+26+26:c+26>t?t-c:l+26>t?t-l+26:void 0}function r(e){function r(e){l[h++]=e}var n,i,a,s,u,l;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;u="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,l=new o(3*e.length/4-u),a=u>0?e.length-4:e.length;var h=0;for(n=0,i=0;a>n;n+=4,i+=3)s=t(e.charAt(n))<<18|t(e.charAt(n+1))<<12|t(e.charAt(n+2))<<6|t(e.charAt(n+3)),r((16711680&s)>>16),r((65280&s)>>8),r(255&s);return 2===u?(s=t(e.charAt(n))<<2|t(e.charAt(n+1))>>4,r(255&s)):1===u&&(s=t(e.charAt(n))<<10|t(e.charAt(n+1))<<4|t(e.charAt(n+2))>>2,r(s>>8&255),r(255&s)),l}function i(e){function t(e){return n.charAt(e)}function r(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,o,a,s=e.length%3,u="";for(i=0,a=e.length-s;a>i;i+=3)o=(e[i]<<16)+(e[i+1]<<8)+e[i+2],u+=r(o);switch(s){case 1:o=e[e.length-1],u+=t(o>>2),u+=t(o<<4&63),u+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],u+=t(o>>10),u+=t(o>>4&63),u+=t(o<<2&63),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),s="/".charCodeAt(0),u="0".charCodeAt(0),l="a".charCodeAt(0),c="A".charCodeAt(0);e.toByteArray=r,e.fromByteArray=i}("undefined"==typeof r?this.base64js={}:r)},{}],40:[function(e,t,r){r.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,c=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return a?0/0:1/0*(p?-1:1);a+=Math.pow(2,n),o-=l}return(p?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,u,l=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||1/0===t?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+h>=1?f/u:f*Math.pow(2,1-h),t*u>=2&&(a++,u/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*u-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<0;e[r+p]=255&a,p+=d,a/=256,l-=8);e[r+p-d]|=128*g}},{}],41:[function(e,t){var r=Array.isArray,n=Object.prototype.toString;t.exports=r||function(e){return!!e&&"[object Array]"==n.call(e)}},{}],42:[function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,i,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[e],a(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,s=new Array(i-1),u=1;i>u;u++)s[u-1]=arguments[u];r.apply(this,s)}else if(o(r)){for(i=arguments.length,s=new Array(i-1),u=1;i>u;u++)s[u-1]=arguments[u];for(l=r.slice(),i=l.length,u=0;i>u;u++)l[u].apply(this,s)}return!0},r.prototype.addListener=function(e,t){var i;if(!n(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned){var i;i=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,i,a,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,i=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(s=a;s-->0;)if(r[s]===t||r[s].listener&&r[s].listener===t){i=s;break}if(0>i)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){var r;return r=e._events&&e._events[t]?n(e._events[t])?1:e._events[t].length:0}},{}],43:[function(e,t){var r=t.exports,n=(e("events").EventEmitter,e("./lib/request")),i=e("url");r.request=function(e,t){"string"==typeof e&&(e=i.parse(e)),e||(e={}),e.host||e.port||(e.port=parseInt(window.location.port,10)),!e.host&&e.hostname&&(e.host=e.hostname),e.protocol||(e.protocol=e.scheme?e.scheme+":":window.location.protocol),e.host||(e.host=window.location.hostname||window.location.host),/:/.test(e.host)&&(e.port||(e.port=e.host.split(":")[1]),e.host=e.host.split(":")[0]),e.port||(e.port="https:"==e.protocol?443:80);var r=new n(new o,e);return t&&r.on("response",t),r},r.get=function(e,t){e.method="GET";var n=r.request(e,t);return n.end(),n},r.Agent=function(){},r.Agent.defaultMaxSockets=4;var o=function(){if("undefined"==typeof window)throw new Error("no window object present");if(window.XMLHttpRequest)return window.XMLHttpRequest;if(window.ActiveXObject){for(var e=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"],t=0;tthis.offset&&(this.emit("data",t.slice(this.offset)),this.offset=t.length))};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{stream:68,util:72}],46:[function(e,t,r){!function(){function e(e){this.message=e}var t="undefined"!=typeof r?r:this,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.prototype=new Error,e.prototype.name="InvalidCharacterError",t.btoa||(t.btoa=function(t){for(var r,i,o=0,a=n,s="";t.charAt(0|o)||(a="=",o%1);s+=a.charAt(63&r>>8-o%1*8)){if(i=t.charCodeAt(o+=.75),i>255)throw new e("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|i}return s}),t.atob||(t.atob=function(t){if(t=t.replace(/=+$/,""),t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,a=0,s="";i=t.charAt(a++);~i&&(r=o%4?64*r+i:i,o++%4)?s+=String.fromCharCode(255&r>>(-2*o&6)):0)i=n.indexOf(i);return s})}()},{}],47:[function(e,t){var r=e("http"),n=t.exports;for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);n.request=function(e,t){return e||(e={}),e.scheme="https",r.request.call(this,e,t)}},{http:43}],48:[function(e,t){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],49:[function(e,t){t.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],50:[function(e,t,r){r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n"},{}],51:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!i;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(r=a+"/"+r,i="/"===a.charAt(0))}return r=t(n(r.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(e){var i=r.isAbsolute(e),o="/"===a(e,-1);return e=t(n(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&o&&(e+="/"),(i?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,function(e){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var i=n(e.split("/")),o=n(t.split("/")),a=Math.min(i.length,o.length),s=a,u=0;a>u;u++)if(i[u]!==o[u]){s=u;break}for(var l=[],u=s;ut&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:52}],52:[function(e,t){function r(){}var n=t.exports={};n.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.MutationObserver,r="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};var n=[];if(t){var i=document.createElement("div"),o=new MutationObserver(function(){var e=n.slice();n.length=0,e.forEach(function(e){e()})});return o.observe(i,{attributes:!0}),function(e){n.length||i.setAttribute("yes","no"),n.push(e)}}return r?(window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}):function(e){setTimeout(e,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.on=r,n.addListener=r,n.once=r,n.off=r,n.removeListener=r,n.removeAllListeners=r,n.emit=r,n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},{}],53:[function(t,r,n){(function(t){!function(i){function o(e){throw RangeError(I[e])}function a(e,t){for(var r=e.length;r--;)e[r]=t(e[r]);return e}function s(e,t){return a(e.split(T),t).join(".")}function u(e){for(var t,r,n=[],i=0,o=e.length;o>i;)t=e.charCodeAt(i++),t>=55296&&56319>=t&&o>i?(r=e.charCodeAt(i++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--)):n.push(t);return n}function l(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=B(e>>>10&1023|55296),e=56320|1023&e),t+=B(e)}).join("")}function c(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:k}function h(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function f(e,t,r){var n=0;for(e=r?P(e/C):e>>1,e+=P(e/t);e>V*O>>1;n+=k)e=P(e/V);return P(n+(V+1)*e/(e+E))}function p(e){var t,r,n,i,a,s,u,h,p,d,g=[],m=e.length,v=0,b=M,y=A;for(r=e.lastIndexOf(R),0>r&&(r=0),n=0;r>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),g.push(e.charCodeAt(n));for(i=r>0?r+1:0;m>i;){for(a=v,s=1,u=k;i>=m&&o("invalid-input"),h=c(e.charCodeAt(i++)),(h>=k||h>P((x-v)/s))&&o("overflow"),v+=h*s,p=y>=u?S:u>=y+O?O:u-y,!(p>h);u+=k)d=k-p,s>P(x/d)&&o("overflow"),s*=d;t=g.length+1,y=f(v-a,t,0==a),P(v/t)>x-b&&o("overflow"),b+=P(v/t),v%=t,g.splice(v++,0,b)}return l(g)}function d(e){var t,r,n,i,a,s,l,c,p,d,g,m,v,b,y,w=[];for(e=u(e),m=e.length,t=M,r=0,a=A,s=0;m>s;++s)g=e[s],128>g&&w.push(B(g));for(n=i=w.length,i&&w.push(R);m>n;){for(l=x,s=0;m>s;++s)g=e[s],g>=t&&l>g&&(l=g);for(v=n+1,l-t>P((x-r)/v)&&o("overflow"),r+=(l-t)*v,t=l,s=0;m>s;++s)if(g=e[s],t>g&&++r>x&&o("overflow"),g==t){for(c=r,p=k;d=a>=p?S:p>=a+O?O:p-a,!(d>c);p+=k)y=c-d,b=k-d,w.push(B(h(d+y%b,0))),c=P(y/b);w.push(B(h(c,0))),a=f(r,v,n==i),r=0,++n}++r,++t}return w.join("")}function g(e){return s(e,function(e){return L.test(e)?p(e.slice(4).toLowerCase()):e})}function m(e){return s(e,function(e){return j.test(e)?"xn--"+d(e):e})}var v="object"==typeof n&&n,b="object"==typeof r&&r&&r.exports==v&&r,y="object"==typeof t&&t;(y.global===y||y.window===y)&&(i=y);var w,_,x=2147483647,k=36,S=1,O=26,E=38,C=700,A=72,M=128,R="-",L=/^xn--/,j=/[^ -~]/,T=/\x2E|\u3002|\uFF0E|\uFF61/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},V=k-S,P=Math.floor,B=String.fromCharCode;if(w={version:"1.2.4",ucs2:{decode:u,encode:l},decode:p,encode:d,toASCII:m,toUnicode:g},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return w});else if(v&&!v.nodeType)if(b)b.exports=w;else for(_ in w)w.hasOwnProperty(_)&&(v[_]=w[_]);else i.punycode=w}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],54:[function(e,t){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,i,o){t=t||"&",i=i||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var l=e.length;u>0&&l>u&&(l=u);for(var c=0;l>c;++c){var h,f,p,d,g=e[c].replace(s,"%20"),m=g.indexOf(i);m>=0?(h=g.substr(0,m),f=g.substr(m+1)):(h=g,f=""),p=decodeURIComponent(h),d=decodeURIComponent(f),r(a,p)?n(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],55:[function(e,t){"use strict";function r(e,t){if(e.map)return e.map(t);for(var r=[],n=0;nr;r++)t(e[r],r)}t.exports=n;var a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},s=e("core-util-is");s.inherits=e("inherits");var u=e("./_stream_readable"),l=e("./_stream_writable");s.inherits(n,u),o(a(l.prototype),function(e){n.prototype[e]||(n.prototype[e]=l.prototype[e])})}).call(this,e("_process"))},{"./_stream_readable":60,"./_stream_writable":62,_process:52,"core-util-is":63,inherits:48}],59:[function(e,t){function r(e){return this instanceof r?void n.call(this,e):new r(e)}t.exports=r;var n=e("./_stream_transform"),i=e("core-util-is");i.inherits=e("inherits"),i.inherits(r,n),r.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":61,"core-util-is":63,inherits:48}],60:[function(e,t){(function(r){function n(t){t=t||{};var r=t.highWaterMark;this.highWaterMark=r||0===r?r:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(A||(A=e("string_decoder/").StringDecoder),this.decoder=new A(t.encoding),this.encoding=t.encoding)}function i(e){return this instanceof i?(this._readableState=new n(e,this),this.readable=!0,void E.call(this)):new i(e)}function o(e,t,r,n,i){var o=l(t,r);if(o)e.emit("error",o);else if(null===r||void 0===r)t.reading=!1,t.ended||c(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||i||n||(r=t.decoder.write(r)),t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):(t.reading=!1,t.buffer.push(r)),t.needReadable&&h(e),p(e,t);else i||(t.reading=!1);return a(t)}function a(e){return!e.ended&&(e.needReadable||e.length=M)e=M;else{e--;for(var t=1;32>t;t<<=1)e|=e>>t;e++}return e}function u(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function l(e,t){var r=null;return S.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function c(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.length>0?h(e):w(e)}function h(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?r.nextTick(function(){f(e)}):f(e))}function f(e){e.emit("readable")}function p(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(function(){d(e,t)}))}function d(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length0)return;return 0===n.pipesCount?(n.flowing=!1,void(O.listenerCount(e,"data")>0&&b(e))):void(n.ranOut=!0)}function v(){this._readableState.ranOut&&(this._readableState.ranOut=!1,m(this))}function b(e,t){var n=e._readableState;if(n.flowing)throw new Error("Cannot switch to old mode now.");var i=t||!1,o=!1;e.readable=!0,e.pipe=E.prototype.pipe,e.on=e.addListener=E.prototype.on,e.on("readable",function(){o=!0;for(var t;!i&&null!==(t=e.read());)e.emit("data",t);null===t&&(o=!1,e._readableState.needReadable=!0)}),e.pause=function(){i=!0,this.emit("pause")},e.resume=function(){i=!1,o?r.nextTick(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function y(e,t){var r,n=t.buffer,i=t.length,o=!!t.decoder,a=!!t.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(a)r=n.shift();else if(!e||e>=i)r=o?n.join(""):S.concat(n,i),n.length=0;else if(el&&e>u;l++){var s=n[0],h=Math.min(e-u,s.length);o?r+=s.slice(0,h):s.copy(r,u,0,h),h0)throw new Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,r.nextTick(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function _(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r],r)}function x(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r]===t)return r;return-1}t.exports=i;var k=e("isarray"),S=e("buffer").Buffer;i.ReadableState=n;var O=e("events").EventEmitter;O.listenerCount||(O.listenerCount=function(e,t){return e.listeners(t).length});var E=e("stream"),C=e("core-util-is");C.inherits=e("inherits");var A;C.inherits(i,E),i.prototype.push=function(e,t){var r=this._readableState;return"string"!=typeof e||r.objectMode||(t=t||r.defaultEncoding,t!==r.encoding&&(e=new S(e,t),t="")),o(this,r,e,t,!1)},i.prototype.unshift=function(e){var t=this._readableState;return o(this,t,e,"",!0)},i.prototype.setEncoding=function(t){A||(A=e("string_decoder/").StringDecoder),this._readableState.decoder=new A(t),this._readableState.encoding=t};var M=8388608;i.prototype.read=function(e){var t=this._readableState;t.calledRead=!0;var r,n=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h(this),null;if(e=u(e,t),0===e&&t.ended)return r=null,t.length>0&&t.decoder&&(r=y(e,t),t.length-=r.length),0===t.length&&w(this),r;var i=t.needReadable;return t.length-e<=t.highWaterMark&&(i=!0),(t.ended||t.reading)&&(i=!1),i&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=u(n,t)),r=e>0?y(e,t):null,null===r&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&w(this),r},i.prototype._read=function(){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,t){function n(e){e===c&&o()}function i(){e.end()}function o(){e.removeListener("close",s),e.removeListener("finish",u),e.removeListener("drain",d),e.removeListener("error",a),e.removeListener("unpipe",n),c.removeListener("end",i),c.removeListener("end",o),(!e._writableState||e._writableState.needDrain)&&d()}function a(t){l(),e.removeListener("error",a),0===O.listenerCount(e,"error")&&e.emit("error",t)}function s(){e.removeListener("finish",u),l()}function u(){e.removeListener("close",s),l()}function l(){c.unpipe(e)}var c=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1;var f=(!t||t.end!==!1)&&e!==r.stdout&&e!==r.stderr,p=f?i:o;h.endEmitted?r.nextTick(p):c.once("end",p),e.on("unpipe",n);var d=g(c);return e.on("drain",d),e._events&&e._events.error?k(e._events.error)?e._events.error.unshift(a):e._events.error=[a,e._events.error]:e.on("error",a),e.once("close",s),e.once("finish",u),e.emit("pipe",c),h.flowing||(this.on("readable",v),h.flowing=!0,r.nextTick(function(){m(c)})),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,this.removeListener("readable",v),t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",v),t.flowing=!1;for(var i=0;n>i;i++)r[i].emit("unpipe",this);return this}var i=x(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var r=E.prototype.on.call(this,e,t);if("data"!==e||this._readableState.flowing||b(this),"readable"===e&&this.readable){var n=this._readableState;n.readableListening||(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading?n.length&&h(this,n):this.read(0))}return r},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){b(this),this.read(0),this.emit("resume")},i.prototype.pause=function(){b(this,!0),this.emit("pause")},i.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(i){if(t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){var o=n.push(i);o||(r=!0,e.pause())}});for(var i in e)"function"==typeof e[i]&&"undefined"==typeof this[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return _(o,function(t){e.on(t,n.emit.bind(n,t))}),n._read=function(){r&&(r=!1,e.resume())},n},i._fromList=y}).call(this,e("_process"))},{_process:52,buffer:38,"core-util-is":63,events:42,inherits:48,isarray:49,stream:68,"string_decoder/":69}],61:[function(e,t){function r(e,t){this.afterTransform=function(e,r){return n(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function n(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r),i&&i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&56319>=n)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,n=t.charCodeAt(i);if(n>=55296&&56319>=n){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},l.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(2>=t&&r>>4==14){this.charLength=3;break}if(3>=t&&r>>3==30){this.charLength=4;break}}this.charReceived=t},l.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},{buffer:38}],70:[function(e,t,r){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,r){if(e&&l(e)&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}function o(e){return u(e)&&(e=i(e)),e instanceof n?e.format():n.prototype.format.call(e)}function a(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t}function u(e){return"string"==typeof e}function l(e){return"object"==typeof e&&null!==e}function c(e){return null===e}function h(e){return null==e}var f=e("punycode");r.parse=i,r.resolve=a,r.resolveObject=s,r.format=o,r.Url=n;var p=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,g=["<",">",'"',"`"," ","\r","\n"," "],m=["{","}","|","\\","^","`"].concat(g),v=["'"].concat(m),b=["%","/","?",";","#"].concat(v),y=["/","?","#"],w=255,_=/^[a-z0-9A-Z_-]{0,63}$/,x=/^([a-z0-9A-Z_-]{0,63})(.*)$/,k={javascript:!0,"javascript:":!0},S={javascript:!0,"javascript:":!0},O={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=e("querystring");n.prototype.parse=function(e,t,r){if(!u(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e;n=n.trim();var i=p.exec(n);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,n=n.substr(i.length)}if(r||i||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var a="//"===n.substr(0,2);!a||i&&S[i]||(n=n.substr(2),this.slashes=!0)}if(!S[i]&&(a||i&&!O[i])){for(var s=-1,l=0;lc)&&(s=c)}var h,d;d=-1===s?n.lastIndexOf("@"):n.lastIndexOf("@",s),-1!==d&&(h=n.slice(0,d),n=n.slice(d+1),this.auth=decodeURIComponent(h)),s=-1;for(var l=0;lc)&&(s=c)}-1===s&&(s=n.length),this.host=n.slice(0,s),n=n.slice(s),this.parseHost(),this.hostname=this.hostname||"";var g="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!g)for(var m=this.hostname.split(/\./),l=0,C=m.length;C>l;l++){var A=m[l];if(A&&!A.match(_)){for(var M="",R=0,L=A.length;L>R;R++)M+=A.charCodeAt(R)>127?"x":A[R];if(!M.match(_)){var j=m.slice(0,l),T=m.slice(l+1),I=A.match(x);I&&(j.push(I[1]),T.unshift(I[2])),T.length&&(n="/"+T.join(".")+n),this.hostname=j.join(".");break}}}if(this.hostname=this.hostname.length>w?"":this.hostname.toLowerCase(),!g){for(var V=this.hostname.split("."),P=[],l=0;ll;l++){var U=v[l],F=encodeURIComponent(U);F===U&&(F=escape(U)),n=n.split(U).join(F)}var N=n.indexOf("#");-1!==N&&(this.hash=n.substr(N),n=n.slice(0,N));var q=n.indexOf("?");if(-1!==q?(this.search=n.substr(q),this.query=n.substr(q+1),t&&(this.query=E.parse(this.query)),n=n.slice(0,q)):t&&(this.search="",this.query={}),n&&(this.pathname=n),O[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var z=this.pathname||"",B=this.search||"";this.path=z+B}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&l(this.query)&&Object.keys(this.query).length&&(o=E.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||O[t])&&i!==!1?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),a=a.replace("#","%23"),t+i+r+a+n},n.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(u(e)){var t=new n;t.parse(e,!1,!0),e=t}var r=new n;if(Object.keys(this).forEach(function(e){r[e]=this[e]},this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(r[t]=e[t])}),O[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!O[e.protocol])return Object.keys(e).forEach(function(t){r[t]=e[t]}),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||S[e.protocol])r.pathname=e.pathname;else{for(var i=(e.pathname||"").split("/");i.length&&!(e.host=i.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),r.pathname=i.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var o=r.pathname||"",a=r.search||"";r.path=o+a}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var s=r.pathname&&"/"===r.pathname.charAt(0),l=e.host||e.pathname&&"/"===e.pathname.charAt(0),f=l||s||r.host&&e.pathname,p=f,d=r.pathname&&r.pathname.split("/")||[],i=e.pathname&&e.pathname.split("/")||[],g=r.protocol&&!O[r.protocol];if(g&&(r.hostname="",r.port=null,r.host&&(""===d[0]?d[0]=r.host:d.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===i[0]?i[0]=e.host:i.unshift(e.host)),e.host=null),f=f&&(""===i[0]||""===d[0])),l)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,d=i;else if(i.length)d||(d=[]),d.pop(),d=d.concat(i),r.search=e.search,r.query=e.query;else if(!h(e.search)){if(g){r.hostname=r.host=d.shift();var m=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;m&&(r.auth=m.shift(),r.host=r.hostname=m.shift())}return r.search=e.search,r.query=e.query,c(r.pathname)&&c(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!d.length)return r.pathname=null,r.path=r.search?"/"+r.search:null,r.href=r.format(),r;for(var v=d.slice(-1)[0],b=(r.host||e.host)&&("."===v||".."===v)||""===v,y=0,w=d.length;w>=0;w--)v=d[w],"."==v?d.splice(w,1):".."===v?(d.splice(w,1),y++):y&&(d.splice(w,1),y--);if(!f&&!p)for(;y--;y)d.unshift("..");!f||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),b&&"/"!==d.join("/").substr(-1)&&d.push("");var _=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(g){r.hostname=r.host=_?"":d.length?d.shift():"";var m=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;m&&(r.auth=m.shift(),r.host=r.hostname=m.shift())}return f=f||r.host&&d.length,f&&!_&&d.unshift(""),d.length?r.pathname=d.join("/"):(r.pathname=null,r.path=null),c(r.pathname)&&c(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=d.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{punycode:53,querystring:56}],71:[function(e,t){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],72:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(t)?n.showHidden=t:t&&r._extend(n,t),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,e,n.depth)}function o(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function a(e){return e}function s(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function u(e,t,n){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return y(i)||(i=u(e,i,n)),i}var o=l(e,t);if(o)return o;var a=Object.keys(t),g=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),O(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(t);if(0===a.length){if(E(t)){var m=t.name?": "+t.name:"";return e.stylize("[Function"+m+"]","special")}if(x(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(S(t))return e.stylize(Date.prototype.toString.call(t),"date");if(O(t))return c(t)}var v="",b=!1,w=["{","}"];if(d(t)&&(b=!0,w=["[","]"]),E(t)){var _=t.name?": "+t.name:"";v=" [Function"+_+"]"}if(x(t)&&(v=" "+RegExp.prototype.toString.call(t)),S(t)&&(v=" "+Date.prototype.toUTCString.call(t)),O(t)&&(v=" "+c(t)),0===a.length&&(!b||0==t.length))return w[0]+v+w[1];if(0>n)return x(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var k;return k=b?h(e,t,n,g,a):a.map(function(r){return f(e,t,n,g,r,b)}),e.seen.pop(),p(k,v,w)}function l(e,t){if(_(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i){for(var o=[],a=0,s=t.length;s>a;++a)o.push(L(t,String(a))?f(e,t,r,n,String(a),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(e,t,r,n,i,!0))}),o}function f(e,t,r,n,i,o){var a,s,l;if(l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},l.get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),L(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=m(r)?u(e,l.value,null):u(e,l.value,r-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),_(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e,t,r){var n=0,i=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function v(e){return null==e}function b(e){return"number"==typeof e}function y(e){return"string"==typeof e}function w(e){return"symbol"==typeof e}function _(e){return void 0===e}function x(e){return k(e)&&"[object RegExp]"===A(e)}function k(e){return"object"==typeof e&&null!==e}function S(e){return k(e)&&"[object Date]"===A(e)}function O(e){return k(e)&&("[object Error]"===A(e)||e instanceof Error)}function E(e){return"function"==typeof e}function C(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function A(e){return Object.prototype.toString.call(e)}function M(e){return 10>e?"0"+e.toString(10):e.toString(10)}function R(){var e=new Date,t=[M(e.getHours()),M(e.getMinutes()),M(e.getSeconds())].join(":");return[e.getDate(),V[e.getMonth()],t].join(" ")}function L(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var j=/%[sdj%]/g;r.format=function(e){if(!y(e)){for(var t=[],r=0;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}}),s=n[r];o>r;s=n[++r])a+=m(s)||!k(s)?" "+s:" "+i(s);return a},r.deprecate=function(e,i){function o(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}if(_(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var a=!1;return o};var T,I={};r.debuglog=function(e){if(_(T)&&(T=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!I[e])if(new RegExp("\\b"+e+"\\b","i").test(T)){var n=t.pid;I[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else I[e]=function(){};return I[e]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=g,r.isNull=m,r.isNullOrUndefined=v,r.isNumber=b,r.isString=y,r.isSymbol=w,r.isUndefined=_,r.isRegExp=x,r.isObject=k,r.isDate=S,r.isError=O,r.isFunction=E,r.isPrimitive=C,r.isBuffer=e("./support/isBuffer");var V=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",R(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!k(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":71,_process:52,inherits:48}],73:[function(e,t,r){r.SourceMapGenerator=e("./source-map/source-map-generator").SourceMapGenerator,r.SourceMapConsumer=e("./source-map/source-map-consumer").SourceMapConsumer,r.SourceNode=e("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":78,"./source-map/source-map-generator":79,"./source-map/source-node":80}],74:[function(e,t){if("function"!=typeof r)var r=e("amdefine")(t,e);r(function(e,t){function r(){this._array=[],this._set={}}var n=e("./util");r.fromArray=function(e,t){for(var n=new r,i=0,o=e.length;o>i;i++)n.add(e[i],t);return n},r.prototype.add=function(e,t){var r=this.has(e),i=this._array.length;(!r||t)&&this._array.push(e),r||(this._set[n.toSetString(e)]=i)},r.prototype.has=function(e){return Object.prototype.hasOwnProperty.call(this._set,n.toSetString(e))},r.prototype.indexOf=function(e){if(this.has(e))return this._set[n.toSetString(e)];throw new Error('"'+e+'" is not in the set.')},r.prototype.at=function(e){if(e>=0&&ee?(-e<<1)+1:(e<<1)+0}function n(e){var t=1===(1&e),r=e>>1;return t?-r:r}var i=e("./base64"),o=5,a=1<>>=o,a>0&&(t|=u),n+=i.encode(t);while(a>0);return n},t.decode=function(e,t){var r,a,l=0,c=e.length,h=0,f=0;do{if(l>=c)throw new Error("Expected more digits in base 64 VLQ value.");a=i.decode(e.charAt(l++)),r=!!(a&u),a&=s,h+=a<0?t-a>1?r(a,t,n,i,o):a:a-e>1?r(e,a,n,i,o):0>e?-1:e}t.search=function(e,t,n){return 0===t.length?-1:r(-1,t.length,e,t,n)}})},{amdefine:82}],78:[function(e,t){if("function"!=typeof r)var r=e("amdefine")(t,e);r(function(e,t){function r(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=n.getArg(t,"version"),i=n.getArg(t,"sources"),a=n.getArg(t,"names",[]),s=n.getArg(t,"sourceRoot",null),u=n.getArg(t,"sourcesContent",null),l=n.getArg(t,"mappings"),c=n.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);i=i.map(n.normalize),this._names=o.fromArray(a,!0),this._sources=o.fromArray(i,!0),this.sourceRoot=s,this.sourcesContent=u,this._mappings=l,this.file=c}var n=e("./util"),i=e("./binary-search"),o=e("./array-set").ArraySet,a=e("./base64-vlq");r.fromSourceMap=function(e){var t=Object.create(r.prototype);return t._names=o.fromArray(e._names.toArray(),!0),t._sources=o.fromArray(e._sources.toArray(),!0),t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file,t.__generatedMappings=e._mappings.slice().sort(n.compareByGeneratedPositions),t.__originalMappings=e._mappings.slice().sort(n.compareByOriginalPositions),t},r.prototype._version=3,Object.defineProperty(r.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?n.join(this.sourceRoot,e):e},this)}}),r.prototype.__generatedMappings=null,Object.defineProperty(r.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__generatedMappings}}),r.prototype.__originalMappings=null,Object.defineProperty(r.prototype,"_originalMappings",{get:function(){return this.__originalMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__originalMappings}}),r.prototype._nextCharIsMappingSeparator=function(e){var t=e.charAt(0);return";"===t||","===t},r.prototype._parseMappings=function(e){for(var t,r=1,i=0,o=0,s=0,u=0,l=0,c=e,h={};c.length>0;)if(";"===c.charAt(0))r++,c=c.slice(1),i=0;else if(","===c.charAt(0))c=c.slice(1);else{if(t={},t.generatedLine=r,a.decode(c,h),t.generatedColumn=i+h.value,i=t.generatedColumn,c=h.rest,c.length>0&&!this._nextCharIsMappingSeparator(c)){if(a.decode(c,h),t.source=this._sources.at(u+h.value),u+=h.value,c=h.rest,0===c.length||this._nextCharIsMappingSeparator(c))throw new Error("Found a source, but no line and column");if(a.decode(c,h),t.originalLine=o+h.value,o=t.originalLine,t.originalLine+=1,c=h.rest,0===c.length||this._nextCharIsMappingSeparator(c))throw new Error("Found a source and line, but no column");a.decode(c,h),t.originalColumn=s+h.value,s=t.originalColumn,c=h.rest,c.length>0&&!this._nextCharIsMappingSeparator(c)&&(a.decode(c,h),t.name=this._names.at(l+h.value),l+=h.value,c=h.rest)}this.__generatedMappings.push(t),"number"==typeof t.originalLine&&this.__originalMappings.push(t)}this.__generatedMappings.sort(n.compareByGeneratedPositions),this.__originalMappings.sort(n.compareByOriginalPositions)},r.prototype._findMapping=function(e,t,r,n,o){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return i.search(e,t,o)},r.prototype.computeColumnSpans=function(){for(var e=0;e=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var o=n.getArg(i,"source",null);return null!=o&&null!=this.sourceRoot&&(o=n.join(this.sourceRoot,o)),{source:o,line:n.getArg(i,"originalLine",null),column:n.getArg(i,"originalColumn",null),name:n.getArg(i,"name",null)}}}return{source:null,line:null,column:null,name:null}},r.prototype.sourceContentFor=function(e){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=n.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var t;if(null!=this.sourceRoot&&(t=n.urlParse(this.sourceRoot))){var r=e.replace(/^file:\/\//,"");if("file"==t.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!t.path||"/"==t.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}throw new Error('"'+e+'" is not in the SourceMap.')},r.prototype.generatedPositionFor=function(e){var t={source:n.getArg(e,"source"),originalLine:n.getArg(e,"line"),originalColumn:n.getArg(e,"column")};null!=this.sourceRoot&&(t.source=n.relative(this.sourceRoot,t.source));var r=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions);if(r>=0){var i=this._originalMappings[r];return{line:n.getArg(i,"generatedLine",null),column:n.getArg(i,"generatedColumn",null),lastColumn:n.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.prototype.allGeneratedPositionsFor=function(e){var t={source:n.getArg(e,"source"),originalLine:n.getArg(e,"line"),originalColumn:1/0};null!=this.sourceRoot&&(t.source=n.relative(this.sourceRoot,t.source));var r=[],i=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions);if(i>=0)for(var o=this._originalMappings[i];o&&o.originalLine===t.originalLine;)r.push({line:n.getArg(o,"generatedLine",null),column:n.getArg(o,"generatedColumn",null),lastColumn:n.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[--i];return r.reverse()},r.GENERATED_ORDER=1,r.ORIGINAL_ORDER=2,r.prototype.eachMapping=function(e,t,i){var o,a=t||null,s=i||r.GENERATED_ORDER;switch(s){case r.GENERATED_ORDER:o=this._generatedMappings;break;case r.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;o.map(function(e){var t=e.source;return null!=t&&null!=u&&(t=n.join(u,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name}}).forEach(e,a)},t.SourceMapConsumer=r})},{"./array-set":74,"./base64-vlq":75,"./binary-search":77,"./util":81,amdefine:82}],79:[function(e,t){if("function"!=typeof r)var r=e("amdefine")(t,e);r(function(e,t){function r(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._sources=new o,this._names=new o,this._mappings=[],this._sourcesContents=null}var n=e("./base64-vlq"),i=e("./util"),o=e("./array-set").ArraySet;r.prototype._version=3,r.fromSourceMap=function(e){var t=e.sourceRoot,n=new r({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=i.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)}),e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&n.setSourceContent(t,r)}),n},r.prototype.addMapping=function(e){var t=i.getArg(e,"generated"),r=i.getArg(e,"original",null),n=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._validateMapping(t,r,n,o),null==n||this._sources.has(n)||this._sources.add(n),null==o||this._names.has(o)||this._names.add(o),this._mappings.push({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:o})},r.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[i.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var a=this._sourceRoot;null!=a&&(n=i.relative(a,n));var s=new o,u=new o;this._mappings.forEach(function(t){if(t.source===n&&null!=t.originalLine){var o=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=o.source&&(t.source=o.source,null!=r&&(t.source=i.join(r,t.source)),null!=a&&(t.source=i.relative(a,t.source)),t.originalLine=o.line,t.originalColumn=o.column,null!=o.name&&(t.name=o.name))}var l=t.source;null==l||s.has(l)||s.add(l);var c=t.name;null==c||u.has(c)||u.add(c)},this),this._sources=s,this._names=u,e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=i.join(r,t)),null!=a&&(t=i.relative(a,t)),this.setSourceContent(t,n))},this)},r.prototype._validateMapping=function(e,t,r,n){if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!r&&!n||e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},r.prototype._serializeMappings=function(){var e,t=0,r=1,o=0,a=0,s=0,u=0,l="";this._mappings.sort(i.compareByGeneratedPositions);for(var c=0,h=this._mappings.length;h>c;c++){if(e=this._mappings[c],e.generatedLine!==r)for(t=0;e.generatedLine!==r;)l+=";",r++;else if(c>0){if(!i.compareByGeneratedPositions(e,this._mappings[c-1]))continue;l+=","}l+=n.encode(e.generatedColumn-t),t=e.generatedColumn,null!=e.source&&(l+=n.encode(this._sources.indexOf(e.source)-u),u=this._sources.indexOf(e.source),l+=n.encode(e.originalLine-1-a),a=e.originalLine-1,l+=n.encode(e.originalColumn-o),o=e.originalColumn,null!=e.name&&(l+=n.encode(this._names.indexOf(e.name)-s),s=this._names.indexOf(e.name)))}return l},r.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=i.relative(t,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},r.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},r.prototype.toString=function(){return JSON.stringify(this)},t.SourceMapGenerator=r})},{"./array-set":74,"./base64-vlq":75,"./util":81,amdefine:82}],80:[function(e,t){if("function"!=typeof r)var r=e("amdefine")(t,e);r(function(e,t){function r(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,null!=n&&this.add(n)}var n=e("./source-map-generator").SourceMapGenerator,i=e("./util"),o=/(\r?\n)/,a=/\r\n|[\s\S]/g;r.fromStringWithSourceMap=function(e,t,n){function a(e,t){if(null===e||void 0===e.source)s.add(t);else{var o=n?i.join(n,e.source):e.source;s.add(new r(e.originalLine,e.originalColumn,o,t,e.name))}}var s=new r,u=e.split(o),l=function(){var e=u.shift(),t=u.shift()||"";return e+t},c=1,h=0,f=null;return t.eachMapping(function(e){if(null!==f){if(!(c0&&(f&&a(f,l()),s.add(u.join(""))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=i.join(n,e)),s.setSourceContent(e,r))}),s},r.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!(e instanceof r||"string"==typeof e))throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},r.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!(e instanceof r||"string"==typeof e))throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},r.prototype.walk=function(e){for(var t,n=0,i=this.children.length;i>n;n++)t=this.children[n],t instanceof r?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},r.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;n-1>r;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},r.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n instanceof r?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},r.prototype.setSourceContent=function(e,t){this.sourceContents[i.toSetString(e)]=t},r.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;n>t;t++)this.children[t]instanceof r&&this.children[t].walkSourceContents(e);for(var o=Object.keys(this.sourceContents),t=0,n=o.length;n>t;t++)e(i.fromSetString(o[t]),this.sourceContents[o[t]])},r.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},r.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new n(e),i=!1,s=null,u=null,l=null,c=null;return this.walk(function(e,n){t.code+=e,null!==n.source&&null!==n.line&&null!==n.column?((s!==n.source||u!==n.line||l!==n.column||c!==n.name)&&r.addMapping({source:n.source,original:{line:n.line,column:n.column},generated:{line:t.line,column:t.column},name:n.name}),s=n.source,u=n.line,l=n.column,c=n.name,i=!0):i&&(r.addMapping({generated:{line:t.line,column:t.column}}),s=null,i=!1),e.match(a).forEach(function(e,a,u){o.test(e)?(t.line++,t.column=0,a+1===u.length?(s=null,i=!1):i&&r.addMapping({source:n.source,original:{line:n.line,column:n.column},generated:{line:t.line,column:t.column},name:n.name})):t.column+=e.length +})}),this.walkSourceContents(function(e,t){r.setSourceContent(e,t)}),{code:t.code,map:r}},t.SourceNode=r})},{"./source-map-generator":79,"./util":81,amdefine:82}],81:[function(e,t){if("function"!=typeof r)var r=e("amdefine")(t,e);r(function(e,t){function r(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')}function n(e){var t=e.match(p);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var t=e,r=n(e);if(r){if(!r.path)return e;t=r.path}for(var o,a="/"===t.charAt(0),s=t.split(/\/+/),u=0,l=s.length-1;l>=0;l--)o=s[l],"."===o?s.splice(l,1):".."===o?u++:u>0&&(""===o?(s.splice(l+1,u),u=0):(s.splice(l,2),u--));return t=s.join("/"),""===t&&(t=a?"/":"."),r?(r.path=t,i(r)):t}function a(e,t){""===e&&(e="."),""===t&&(t=".");var r=n(t),a=n(e);if(a&&(e=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),i(r);if(r||t.match(d))return t;if(a&&!a.host&&!a.path)return a.host=t,i(a);var s="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=s,i(a)):s}function s(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");var r=n(e);return"/"==t.charAt(0)&&r&&"/"==r.path?t.slice(1):0===t.indexOf(e+"/")?t.substr(e.length+1):t}function u(e){return"$"+e}function l(e){return e.substr(1)}function c(e,t){var r=e||"",n=t||"";return(r>n)-(n>r)}function h(e,t,r){var n;return(n=c(e.source,t.source))?n:(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,n||r?n:(n=c(e.name,t.name))?n:(n=e.generatedLine-t.generatedLine,n?n:e.generatedColumn-t.generatedColumn))}function f(e,t,r){var n;return(n=e.generatedLine-t.generatedLine)?n:(n=e.generatedColumn-t.generatedColumn,n||r?n:(n=c(e.source,t.source))?n:(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,n?n:c(e.name,t.name)))}t.getArg=r;var p=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,d=/^data:.+\,.+$/;t.urlParse=n,t.urlGenerate=i,t.normalize=o,t.join=a,t.relative=s,t.toSetString=u,t.fromSetString=l,t.compareByOriginalPositions=h,t.compareByGeneratedPositions=f})},{amdefine:82}],82:[function(e,t){(function(r,n){"use strict";function i(t,i){function o(e){var t,r;for(t=0;e[t];t+=1)if(r=e[t],"."===r)e.splice(t,1),t-=1;else if(".."===r){if(1===t&&(".."===e[2]||".."===e[0]))break;t>0&&(e.splice(t-1,2),t-=2)}}function a(e,t){var r;return e&&"."===e.charAt(0)&&t&&(r=t.split("/"),r=r.slice(0,r.length-1),r=r.concat(e.split("/")),o(r),e=r.join("/")),e}function s(e){return function(t){return a(t,e)}}function u(e){function t(t){d[e]=t}return t.fromText=function(){throw new Error("amdefine does not implement load.fromText")},t}function l(e,r,o){var a,s,u,l;if(e)s=d[e]={},u={id:e,uri:n,exports:s},a=h(i,s,u,e);else{if(g)throw new Error("amdefine with no module ID cannot be called more than once per file.");g=!0,s=t.exports,u=t,a=h(i,s,u,t.id)}r&&(r=r.map(function(e){return a(e)})),l="function"==typeof o?o.apply(u.exports,r):o,void 0!==l&&(u.exports=l,e&&(d[e]=u.exports))}function c(e,t,r){Array.isArray(e)?(r=t,t=e,e=void 0):"string"!=typeof e&&(r=e,e=t=void 0),t&&!Array.isArray(t)&&(r=t,t=void 0),t||(t=["require","exports","module"]),e?p[e]=[e,t,r]:l(e,t,r)}var h,f,p={},d={},g=!1,m=e("path");return h=function(e,t,n,i){function o(o,a){return"string"==typeof o?f(e,t,n,o,i):(o=o.map(function(r){return f(e,t,n,r,i)}),void r.nextTick(function(){a.apply(null,o)}))}return o.toUrl=function(e){return 0===e.indexOf(".")?a(e,m.dirname(n.filename)):e},o},i=i||function(){return t.require.apply(t,arguments)},f=function(e,t,r,n,i){var o,c,g=n.indexOf("!"),m=n;if(-1===g){if(n=a(n,i),"require"===n)return h(e,t,r,i);if("exports"===n)return t;if("module"===n)return r;if(d.hasOwnProperty(n))return d[n];if(p[n])return l.apply(null,p[n]),d[n];if(e)return e(m);throw new Error("No module with ID: "+n)}return o=n.substring(0,g),n=n.substring(g+1,n.length),c=f(e,t,r,o,i),n=c.normalize?c.normalize(n,s(i)):a(n,i),d[n]?d[n]:(c.load(n,h(e,t,r,i),u(n),{}),d[n])},c.require=function(e){return d[e]?d[e]:p[e]?(l.apply(null,p[e]),d[e]):void 0},c.amd={},c}t.exports=i}).call(this,e("_process"),"/node_modules\\source-map\\node_modules\\amdefine\\amdefine.js")},{_process:52,path:51}]},{},[1])(1)}); \ No newline at end of file diff --git a/dist/htmlminifier.js b/dist/htmlminifier.js index 677d982..88c65ba 100644 --- a/dist/htmlminifier.js +++ b/dist/htmlminifier.js @@ -1066,16 +1066,16 @@ if (typeof options !== 'object') { options = { }; } - if (typeof options.noAdvanced === 'undefined') { - options.noAdvanced = true; + if (typeof options.advanced === 'undefined') { + options.advanced = false; } try { if (typeof CleanCSS !== 'undefined') { - return new CleanCSS(options).minify(text); + return new CleanCSS(options).minify(text).styles; } else if (typeof require === 'function') { var CleanCSSModule = require('clean-css'); - return new CleanCSSModule(options).minify(text); + return new CleanCSSModule(options).minify(text).styles; } } catch (err) { diff --git a/dist/htmlminifier.min.js b/dist/htmlminifier.min.js index ef69aa1..c389e10 100644 --- a/dist/htmlminifier.min.js +++ b/dist/htmlminifier.min.js @@ -3,4 +3,4 @@ * Copyright 2010-2014 Juriy "kangax" Zaytsev * Licensed under MIT (https://github.com/kangax/html-minifier/blob/gh-pages/LICENSE) */ -!function(a){"use strict";function b(a){var b,c=new RegExp("(?:\\s*[\\w:\\.-]+(?:\\s*(?:"+d(a)+")\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*");if(a.customAttrSurround){for(var e=[],f=a.customAttrSurround.length-1;f>=0;f--)e[f]="(?:\\s*"+a.customAttrSurround[f][0].source+c.source+a.customAttrSurround[f][1].source+")";e.unshift(c.source),b=new RegExp("((?:"+e.join("|")+")*)")}else b=new RegExp("("+c.source+")");return new RegExp(j.source+b.source+k.source)}function c(a){var b=new RegExp(f.source+"(?:\\s*("+d(a)+")\\s*(?:"+i.join("|")+"))?");if(a.customAttrSurround){for(var c=[],e=a.customAttrSurround.length-1;e>=0;e--)c[e]="(?:("+a.customAttrSurround[e][0].source+")"+b.source+"("+a.customAttrSurround[e][1].source+"))";return c.unshift("(?:"+b.source+")"),new RegExp(c.join("|"),"g")}return new RegExp(b.source,"g")}function d(a){return h.concat(a.customAttrAssign||[]).map(function(a){return"(?:"+a.source+")"}).join("|")}function e(a){for(var b={},c=a.split(","),d=0;d\s]+)/.source],j=/^<([\w:-]+)/,k=/\s*(\/?)>/,l=/^<\/([\w:-]+)[^>]*>/,m=/\/>$/,n=/^]+>/i,o=!1;"x".replace(/x(.)?/g,function(a,b){o=""===b});var p,q,r,s=e("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,wbr"),t=e("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,noscript,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,svg,textarea,tt,u,var"),u=e("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),v=e("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),w=e("script,style,noscript"),x={},y=a.HTMLParser=function(a,d){function e(a,b,c,e){for(var g=!1;!d.html5&&y.last()&&t[y.last()];)f("",y.last());u[b]&&y.last()===b&&f("",b),e=s[b]||!!e;var h=[];c.replace(B,function(){var a,b,c,e,f,g,i,j=7;if(o&&-1===arguments[0].indexOf('""')&&(""===arguments[3]&&(arguments[3]=void 0),""===arguments[4]&&(arguments[4]=void 0),""===arguments[5]&&(arguments[5]=void 0)),a=arguments[1])g=arguments[2],c=arguments[3],b=c||arguments[4]||arguments[5],g&&(i=arguments[0].charAt(a.length+g.length),i="'"===i||'"'===i?i:"");else if(d.customAttrSurround)for(var k=d.customAttrSurround.length-1;k>=0;k--)if(a=arguments[k*j+7],g=arguments[k*j+8],a){c=arguments[k*j+9],b=c||arguments[k*j+10]||arguments[k*j+11],e=arguments[k*j+6],f=arguments[k*j+12];break}void 0===b&&(b=v[a]?a:c),h.push({name:a,value:b,escaped:b&&b.replace(/(^|.)("+)/g,function(a){return a.replace(/"/g,""")}),customAssign:g||"=",customOpen:e||"",customClose:f||"",quote:i||""})}),e?g=a.match(m):y.push({tag:b,attrs:h}),d.start&&d.start(b,h,e,g)}function f(a,b){var c;if(b){var e=b.toLowerCase();for(c=y.length-1;c>=0&&y[c].tag.toLowerCase()!==e;c--);}else c=0;if(c>=0){for(var f=y.length-1;f>=c;f--)d.end&&d.end(y[f].tag,y[f].attrs);y.length=c}}var g,h,i,j,k,y=[],z=a;y.last=function(){var a=this[this.length-1];return a&&a.tag};for(var A=b(d),B=c(d);a;){if(h=!0,y.last()&&w[y.last()])p=y.last().toLowerCase(),q=x[p]||(x[p]=new RegExp("([\\s\\S]*?)]*>","i")),a=a.replace(q,function(a,b){return"script"!==p&&"style"!==p&&"noscript"!==p&&(b=b.replace(//g,"$1").replace(//g,"$1")),d.chars&&d.chars(b),""}),f("",p);else if(/^"),g>=0&&(d.comment&&d.comment(a.substring(4,g)),a=a.substring(g+3),h=!1)),/^"),g>=0&&(d.comment&&d.comment(a.substring(2,g+1),!0),a=a.substring(g+2),h=!1)):/^<\?/.test(a)?(g=a.indexOf("?>",2),g>=0&&(d.chars&&d.chars(a.substring(0,g+2)),a=a.substring(g+2))):/^<%/.test(a)?(g=a.indexOf("%>",2),g>=0&&(d.chars&&d.chars(a.substring(0,g+2)),a=a.substring(g+2))):(i=n.exec(a))?(d.doctype&&d.doctype(i[0]),a=a.substring(i[0].length),h=!1):/^<\//.test(a)?(i=a.match(l),i&&(a=a.substring(i[0].length),i[0].replace(l,f),j="/"+i[1].toLowerCase(),h=!1)):/^g?a:a.substring(0,g);a=0>g?"":a.substring(g),r=a.match(A),r?k=r[1]:(r=a.match(l),k=r?"/"+r[1]:""),d.chars&&d.chars(C,j,k)}if(a===z)throw"Parse Error: "+a;z=a}f()};a.HTMLtoXML=function(a){var b="";return new y(a,{start:function(a,c,d){b+="<"+a;for(var e=0;e"},end:function(a){b+=""},chars:function(a){b+=a},comment:function(a){b+=""},ignore:function(a){b+=a}}),b},a.HTMLtoDOM=function(a,b){var c=e("html,head,body,title"),d={link:"head",base:"head"};b?b=b.ownerDocument||b.getOwnerDocument&&b.getOwnerDocument()||b:"undefined"!=typeof DOMDocument?b=new DOMDocument:"undefined"!=typeof document&&document.implementation&&document.implementation.createDocument?b=document.implementation.createDocument("","",null):"undefined"!=typeof ActiveX&&(b=new ActiveXObject("Msxml.DOMDocument"));var f=[],g=b.documentElement||b.getDocumentElement&&b.getDocumentElement();if(!g&&b.createElement&&!function(){var a=b.createElement("html"),c=b.createElement("head");c.appendChild(b.createElement("title")),a.appendChild(c),a.appendChild(b.createElement("body")),b.appendChild(a)}(),b.getElementsByTagName)for(var h in c)c[h]=b.getElementsByTagName(h)[0];var i=c.body;return new y(a,{start:function(a,e,g){if(c[a])return void(i=c[a]);var h=b.createElement(a);for(var j in e)h.setAttribute(e[j].name,e[j].value);d[a]&&"boolean"!=typeof c[d[a]]?c[d[a]].appendChild(h):i&&i.appendChild&&i.appendChild(h),g||(f.push(h),i=h)},end:function(){f.length-=1,i=f[f.length-1]},chars:function(a){i.appendChild(b.createTextNode(a))},comment:function(){},ignore:function(){}}),b}}("undefined"==typeof exports?this:exports),function(a){"use strict";function b(a){return a?a.replace(/[\t\n\r ]+/g," "):a}function c(a,b,c,d){var e=["a","abbr","acronym","b","bdi","bdo","big","button","cite","code","del","dfn","em","font","i","ins","kbd","mark","q","rt","rp","s","samp","small","span","strike","strong","sub","sup","svg","time","tt","u","var"],f=/^[\t ]*[\n\r]+[\t\n\r ]*/,g=/[\t\n\r ]*[\n\r]+[\t ]*$/,h=f.test(a)?"\n":" ",i=g.test(a)?"\n":" ",j="htmlmincollapsedlinebreak";return b&&"img"!==b&&"input"!==b&&("/"!==b.substr(0,1)||"/"===b.substr(0,1)&&-1===e.indexOf(b.substr(1)))&&(a=a.replace(/^\s+/,d.conservativeCollapse?" ":d.preserveLineBreaks?h:"")),c&&"img"!==c&&"input"!==c&&("/"===c.substr(0,1)||"/"!==c.substr(0,1)&&-1===e.indexOf(c))&&(a=a.replace(/\s+$/,d.conservativeCollapse?" ":d.preserveLineBreaks?i:"")),b&&c?(d.preserveLineBreaks&&(a=a.replace(f,j).replace(g,j)),a.replace(/[\t\n\r]+/g," ").replace(/[ ]+/g," ").replace(new RegExp(j,"g"),"\n")):a}function d(a){return/\[if[^\]]+\]/.test(a)||/\s*((?:c;c++)if(b.ignoreCustomComments[c].test(a))return!0;return!1}function f(a){return/^on[a-z]+/.test(a)}function g(a){return/^[^\x20\t\n\f\r"'`=<>]+$/.test(a)&&!/\/$/.test(a)&&!/\/$/.test(a)}function h(a,b){for(var c=a.length;c--;)if(a[c].name.toLowerCase()===b)return!0;return!1}function i(a,b,c,d){return c=c?J(c.toLowerCase()):"","script"===a&&"language"===b&&"javascript"===c||"form"===a&&"method"===b&&"get"===c||"input"===a&&"type"===b&&"text"===c||"script"===a&&"charset"===b&&!h(d,"src")||"a"===a&&"name"===b&&h(d,"id")||"area"===a&&"shape"===b&&"rect"===c}function j(a,b,c){return"script"===a&&"type"===b&&"text/javascript"===J(c.toLowerCase())}function k(a,b,c){return("style"===a||"link"===a)&&"type"===b&&"text/css"===J(c.toLowerCase())}function l(a,b){var c=/^(?:allowfullscreen|async|autofocus|autoplay|checked|compact|controls|declare|default|defaultchecked|defaultmuted|defaultselected|defer|disabled|enabled|formnovalidate|hidden|indeterminate|inert|ismap|itemscope|loop|multiple|muted|nohref|noresize|noshade|novalidate|nowrap|open|pauseonexit|readonly|required|reversed|scoped|seamless|selected|sortable|spellcheck|truespeed|typemustmatch|visible)$/i.test(a);if(c)return!0;var d=K[a.toLowerCase()];return d?-1===d.indexOf(b.toLowerCase()):!1}function m(a,b){return/^(?:a|area|link|base)$/.test(b)&&"href"===a||"img"===b&&/^(?:src|longdesc|usemap)$/.test(a)||"object"===b&&/^(?:classid|codebase|data|usemap)$/.test(a)||"q"===b&&"cite"===a||"blockquote"===b&&"cite"===a||("ins"===b||"del"===b)&&"cite"===a||"form"===b&&"action"===a||"input"===b&&("src"===a||"usemap"===a)||"head"===b&&"profile"===a||"script"===b&&("src"===a||"for"===a)}function n(a,b){return/^(?:a|area|object|button)$/.test(b)&&"tabindex"===a||"input"===b&&("maxlength"===a||"tabindex"===a)||"select"===b&&("size"===a||"tabindex"===a)||"textarea"===b&&/^(?:rows|cols|tabindex)$/.test(a)||"colgroup"===b&&"span"===a||"col"===b&&"span"===a||("th"===b||"td"===b)&&("rowspan"===a||"colspan"===a)}function o(a,c,d,e,g){if(d&&f(c)){if(d=J(d).replace(/^javascript:\s*/i,"").replace(/\s*;$/,""),e.minifyJS){var h="(function(){"+d+"})()",i=D(h,e.minifyJS);return i.slice(12,i.length-4).replace(/"/g,""")}return d}return"class"===c?b(J(d)):m(c,a)?(d=J(d),e.minifyURLs?C(d,e.minifyURLs):d):n(c,a)?J(d):"style"===c?(d=J(d),d&&(d=d.replace(/\s*;\s*$/,"")),e.minifyCSS?E(d,e.minifyCSS):d):(p(a,g)&&"content"===c?d=d.replace(/1\.0/g,"1").replace(/\s+/g,""):d&&e.customAttrCollapse&&e.customAttrCollapse.test(c)&&(d=d.replace(/\n+/g,"")),d)}function p(a,b){if("meta"!==a)return!1;for(var c=0,d=b.length;d>c;c++)if("name"===b[c].name&&"viewport"===b[c].value)return!0}function q(a){return a.replace(/^(\[[^\]]+\]>)\s*/,"$1").replace(/\s*(\s*\*\/|\/\/\s*\]\]>)\s*$/,"")}function s(a,b,c){for(var d=0,e=c.length;e>d;d++)if("type"===c[d].name.toLowerCase()&&b.processScripts.indexOf(c[d].value)>-1)return F(a,b);return a}function t(a,b){return a.replace(L[b],"").replace(M[b],"")}function u(a){return/^(?:html|t?body|t?head|tfoot|tr|td|th|dt|dd|option|colgroup|source)$/.test(a)}function v(a,b,c){var d=!c||/^\s*$/.test(c);return d?"input"===a&&"value"===b||N.test(b):!1}function w(a,b){if("textarea"===a)return!1;if("script"===a)for(var c=b.length-1;c>=0;c--)if("src"===b[c].name)return!1;return!0}function x(a){return!/^(?:script|style|pre|textarea)$/.test(a)}function y(a){return!/^(?:pre|textarea)$/.test(a)}function z(a){for(var b="",c=0,d=a.length;d>c;c++)b+=" "+a[c].name+(l(a[c].value)?"":'="'+a[c].value+'"');return b}function A(a,b,c,d,e,f){var h,m,n=f.caseSensitive?a.name:a.name.toLowerCase(),p=f.preventAttributesEscaping?a.value:a.escaped,q=f.preventAttributesEscaping?a.quote:'"',r=d&&e===b.length-1;return f.removeRedundantAttributes&&i(c,n,p,b)||f.removeScriptTypeAttributes&&j(c,n,p)||f.removeStyleLinkTypeAttributes&&k(c,n,p)?"":(p=o(c,n,p,f,b),m=void 0!==p&&!f.removeAttributeQuotes||!g(p)||r?q+p+q:p,f.removeEmptyAttributes&&v(c,n,p)?"":(h=void 0===p||f.collapseBooleanAttributes&&l(n,p)?n:n+a.customAssign+m," "+a.customOpen+h+a.customClose))}function B(a){for(var b=["canCollapseWhitespace","canTrimWhitespace"],c=0,d=b.length;d>c;c++)a[b[c]]||(a[b[c]]=function(){return!1})}function C(b,c){"object"!=typeof c&&(c={});try{var d=a.RelateUrl;return"undefined"==typeof d&&"function"==typeof require&&(d=require("relateurl")),d&&d.relate?d.relate(b,c):b}catch(e){H(e)}return b}function D(b,c){"object"!=typeof c&&(c={}),c.fromString=!0,c.output={inline_script:!0};try{var d=a.UglifyJS;if("undefined"==typeof d&&"function"==typeof require&&(d=require("uglify-js")),!d)return b;if(d.minify)return d.minify(b,c).code;if(d.parse){var e=d.parse(b);e.figure_out_scope();var f=d.Compressor(),g=e.transform(f);g.figure_out_scope(),g.compute_char_frequency(),c.mangle!==!1&&g.mangle_names();var h=d.OutputStream(c.output);return g.print(h),h.toString()}return b}catch(i){H(i)}return b}function E(a,b){"object"!=typeof b&&(b={}),"undefined"==typeof b.noAdvanced&&(b.noAdvanced=!0);try{if("undefined"!=typeof CleanCSS)return new CleanCSS(b).minify(a);if("function"==typeof require){var c=require("clean-css");return new c(b).minify(a)}}catch(d){H(d)}return a}function F(a,f){function g(a,b){return x(a)||f.canCollapseWhitespace(a,b)}function h(a,b){return y(a)||f.canTrimWhitespace(a,b)}f=f||{};var i=[];a=J(a),B(f);var j=[],k=[],l="",m="",n=[],o=[],p=[],v=f.lint,C=!1,F=new Date;f.removeIgnored&&(a=a.replace(/<\?[^\?]+\?>/g,"").replace(/<%[^%]+%>/g,"")),new I(a,{html5:"undefined"!=typeof f.html5?f.html5:!0,start:function(a,b,c,d){if(C)return void k.push("<"+a,z(b),d?"/":"",">");var e=a.toLowerCase();if("svg"===e){i.push(f);var j={};for(var q in f)j[q]=f[q];j.keepClosingSlash=!0,j.caseSensitive=!0,f=j}a=f.caseSensitive?a:e,m=a,l="",n=b,f.collapseWhitespace&&(h(a,b)||o.push(a),g(a,b)||p.push(a));var r="<"+a,s=(d&&f.keepClosingSlash?"/":"")+">";0===b.length&&(r+=s),k.push(r),v&&v.testElement(a);for(var t,u=0,w=b.length;w>u;u++)v&&v.testAttribute(a,b[u].name.toLowerCase(),b[u].escaped),t=A(b[u],b,a,d,u,f),u===w-1&&(t+=s),k.push(t)},end:function(a,b){if(C)return void k.push("");var c=a.toLowerCase();"svg"===c&&(f=i.pop()),f.collapseWhitespace&&(o.length&&a===o[o.length-1]&&o.pop(),p.length&&a===p[p.length-1]&&p.pop());var d=""===l&&a===m;if(f.removeEmptyElements&&d&&w(a,b)){for(var e=k.length-1;e>=0;e--)if(/^<[^\/!]/.test(k[e])){k.splice(e);break}}else f.removeOptionalTags&&u(a)||(k.push(""),j.push.apply(j,k),k.length=0,l="")},chars:function(a,d,e){return d=""===d?"comment":d,e=""===e?"comment":e,C?void k.push(a):(("script"===m||"style"===m)&&(f.removeCommentsFromCDATA&&(a=t(a,m)),f.removeCDATASectionsFromCDATA&&(a=r(a)),f.processScripts&&(a=s(a,f,n))),"script"===m&&f.minifyJS&&(a=D(a,f.minifyJS)),"style"===m&&f.minifyCSS&&(a=E(a,f.minifyCSS)),f.collapseWhitespace&&(o.length||(a=d&&"comment"!==d||e&&"comment"!==e?c(a,d,e,f):J(a)),p.length||(a=d&&e||"html"===e?a:b(a))),l=a,v&&v.testChars(a),void k.push(a))},comment:function(a,b){var c=b?"":"-->";return/^\s*htmlmin:ignore/.test(a)?(C=!C,void(f.removeComments||k.push(""))):(a=f.removeComments?d(a)?c+q(a)+g:e(a,f)?"":"":c+a+g,void k.push(a))},doctype:function(a){k.push(f.useShortDoctype?"":b(a))},customAttrAssign:f.customAttrAssign,customAttrSurround:f.customAttrSurround}),j.push.apply(j,k);var K=G(j,f);return H("minified in: "+(new Date-F)+"ms"),K}function G(a,b){var c,d=b.maxLineLength;if(d){for(var e,f=[],g="",h=0,i=a.length;i>h;h++)e=a[h],g.length+e.length\s*$/,style:/\s*-->\s*$/},N=new RegExp("^(?:class|id|style|title|lang|dir|on(?:focus|blur|change|click|dblclick|mouse(?:down|up|over|move|out)|key(?:press|down|up)))$");"undefined"!=typeof exports?exports.minify=F:a.minify=F}(this),function(a){"use strict";function b(a){return/^(?:big|small|hr|blink|marquee)$/.test(a)}function c(a){return/^(?:applet|basefont|center|dir|font|isindex|strike)$/.test(a)}function d(a){return/^on[a-z]+/.test(a)}function e(a){return"style"===a.toLowerCase()}function f(a,b){return"align"===b&&/^(?:caption|applet|iframe|img|imput|object|legend|table|hr|div|h[1-6]|p)$/.test(a)||"alink"===b&&"body"===a||"alt"===b&&"applet"===a||"archive"===b&&"applet"===a||"background"===b&&"body"===a||"bgcolor"===b&&/^(?:table|t[rdh]|body)$/.test(a)||"border"===b&&/^(?:img|object)$/.test(a)||"clear"===b&&"br"===a||"code"===b&&"applet"===a||"codebase"===b&&"applet"===a||"color"===b&&/^(?:base(?:font)?)$/.test(a)||"compact"===b&&/^(?:dir|[dou]l|menu)$/.test(a)||"face"===b&&/^base(?:font)?$/.test(a)||"height"===b&&/^(?:t[dh]|applet)$/.test(a)||"hspace"===b&&/^(?:applet|img|object)$/.test(a)||"language"===b&&"script"===a||"link"===b&&"body"===a||"name"===b&&"applet"===a||"noshade"===b&&"hr"===a||"nowrap"===b&&/^t[dh]$/.test(a)||"object"===b&&"applet"===a||"prompt"===b&&"isindex"===a||"size"===b&&/^(?:hr|font|basefont)$/.test(a)||"start"===b&&"ol"===a||"text"===b&&"body"===a||"type"===b&&/^(?:li|ol|ul)$/.test(a)||"value"===b&&"li"===a||"version"===b&&"html"===a||"vlink"===b&&"body"===a||"vspace"===b&&/^(?:applet|img|object)$/.test(a)||"width"===b&&/^(?:hr|td|th|applet|pre)$/.test(a)}function g(a,b){return"href"===a&&/^\s*javascript\s*:\s*void\s*(\s+0|\(\s*0\s*\))\s*$/i.test(b)}function h(){this.log=[],this._lastElement=null,this._isElementRepeated=!1}h.prototype.testElement=function(a){c(a)?this.log.push('Found deprecated <'+a+"> element"):b(a)?this.log.push('Found presentational <'+a+"> element"):this.checkRepeatingElement(a)},h.prototype.checkRepeatingElement=function(a){"br"===a&&"br"===this._lastElement?this._isElementRepeated=!0:this._isElementRepeated&&(this._reportRepeatingElement(),this._isElementRepeated=!1),this._lastElement=a},h.prototype._reportRepeatingElement=function(){this.log.push("Found <br> sequence. Try replacing it with styling.")},h.prototype.testAttribute=function(a,b,c){d(b)?this.log.push('Found event attribute ('+b+") on <"+a+"> element."):f(a,b)?this.log.push('Found deprecated '+b+" attribute on <"+a+"> element."):e(b)?this.log.push('Found style attribute on <'+a+"> element."):g(b,c)&&this.log.push('Found inaccessible attribute (on <'+a+"> element).")},h.prototype.testChars=function(a){this._lastElement="",/( \s*){2,}/.test(a)&&this.log.push("Found repeating &nbsp; sequence. Try replacing it with styling.")},h.prototype.test=function(a,b,c){this.testElement(a),this.testAttribute(a,b,c)},h.prototype.populate=function(a){if(this._isElementRepeated&&this._reportRepeatingElement(),this.log.length)if(a)a.innerHTML="
  1. "+this.log.join("
  2. ")+"
";else{var b=" - "+this.log.join("\n - ").replace(/(<([^>]+)>)/gi,"").replace(/</g,"<").replace(/>/g,">");console.log(b)}},a.HTMLLint=h}("undefined"==typeof exports?this:exports); \ No newline at end of file +!function(a){"use strict";function b(a){var b,c=new RegExp("(?:\\s*[\\w:\\.-]+(?:\\s*(?:"+d(a)+")\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*");if(a.customAttrSurround){for(var e=[],f=a.customAttrSurround.length-1;f>=0;f--)e[f]="(?:\\s*"+a.customAttrSurround[f][0].source+c.source+a.customAttrSurround[f][1].source+")";e.unshift(c.source),b=new RegExp("((?:"+e.join("|")+")*)")}else b=new RegExp("("+c.source+")");return new RegExp(j.source+b.source+k.source)}function c(a){var b=new RegExp(f.source+"(?:\\s*("+d(a)+")\\s*(?:"+i.join("|")+"))?");if(a.customAttrSurround){for(var c=[],e=a.customAttrSurround.length-1;e>=0;e--)c[e]="(?:("+a.customAttrSurround[e][0].source+")"+b.source+"("+a.customAttrSurround[e][1].source+"))";return c.unshift("(?:"+b.source+")"),new RegExp(c.join("|"),"g")}return new RegExp(b.source,"g")}function d(a){return h.concat(a.customAttrAssign||[]).map(function(a){return"(?:"+a.source+")"}).join("|")}function e(a){for(var b={},c=a.split(","),d=0;d\s]+)/.source],j=/^<([\w:-]+)/,k=/\s*(\/?)>/,l=/^<\/([\w:-]+)[^>]*>/,m=/\/>$/,n=/^]+>/i,o=!1;"x".replace(/x(.)?/g,function(a,b){o=""===b});var p,q,r,s=e("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,wbr"),t=e("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,noscript,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,svg,textarea,tt,u,var"),u=e("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),v=e("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),w=e("script,style,noscript"),x={},y=a.HTMLParser=function(a,d){function e(a,b,c,e){for(var g=!1;!d.html5&&y.last()&&t[y.last()];)f("",y.last());u[b]&&y.last()===b&&f("",b),e=s[b]||!!e;var h=[];c.replace(B,function(){var a,b,c,e,f,g,i,j=7;if(o&&-1===arguments[0].indexOf('""')&&(""===arguments[3]&&(arguments[3]=void 0),""===arguments[4]&&(arguments[4]=void 0),""===arguments[5]&&(arguments[5]=void 0)),a=arguments[1])g=arguments[2],c=arguments[3],b=c||arguments[4]||arguments[5],g&&(i=arguments[0].charAt(a.length+g.length),i="'"===i||'"'===i?i:"");else if(d.customAttrSurround)for(var k=d.customAttrSurround.length-1;k>=0;k--)if(a=arguments[k*j+7],g=arguments[k*j+8],a){c=arguments[k*j+9],b=c||arguments[k*j+10]||arguments[k*j+11],e=arguments[k*j+6],f=arguments[k*j+12];break}void 0===b&&(b=v[a]?a:c),h.push({name:a,value:b,escaped:b&&b.replace(/(^|.)("+)/g,function(a){return a.replace(/"/g,""")}),customAssign:g||"=",customOpen:e||"",customClose:f||"",quote:i||""})}),e?g=a.match(m):y.push({tag:b,attrs:h}),d.start&&d.start(b,h,e,g)}function f(a,b){var c;if(b){var e=b.toLowerCase();for(c=y.length-1;c>=0&&y[c].tag.toLowerCase()!==e;c--);}else c=0;if(c>=0){for(var f=y.length-1;f>=c;f--)d.end&&d.end(y[f].tag,y[f].attrs);y.length=c}}var g,h,i,j,k,y=[],z=a;y.last=function(){var a=this[this.length-1];return a&&a.tag};for(var A=b(d),B=c(d);a;){if(h=!0,y.last()&&w[y.last()])p=y.last().toLowerCase(),q=x[p]||(x[p]=new RegExp("([\\s\\S]*?)]*>","i")),a=a.replace(q,function(a,b){return"script"!==p&&"style"!==p&&"noscript"!==p&&(b=b.replace(//g,"$1").replace(//g,"$1")),d.chars&&d.chars(b),""}),f("",p);else if(/^"),g>=0&&(d.comment&&d.comment(a.substring(4,g)),a=a.substring(g+3),h=!1)),/^"),g>=0&&(d.comment&&d.comment(a.substring(2,g+1),!0),a=a.substring(g+2),h=!1)):/^<\?/.test(a)?(g=a.indexOf("?>",2),g>=0&&(d.chars&&d.chars(a.substring(0,g+2)),a=a.substring(g+2))):/^<%/.test(a)?(g=a.indexOf("%>",2),g>=0&&(d.chars&&d.chars(a.substring(0,g+2)),a=a.substring(g+2))):(i=n.exec(a))?(d.doctype&&d.doctype(i[0]),a=a.substring(i[0].length),h=!1):/^<\//.test(a)?(i=a.match(l),i&&(a=a.substring(i[0].length),i[0].replace(l,f),j="/"+i[1].toLowerCase(),h=!1)):/^g?a:a.substring(0,g);a=0>g?"":a.substring(g),r=a.match(A),r?k=r[1]:(r=a.match(l),k=r?"/"+r[1]:""),d.chars&&d.chars(C,j,k)}if(a===z)throw"Parse Error: "+a;z=a}f()};a.HTMLtoXML=function(a){var b="";return new y(a,{start:function(a,c,d){b+="<"+a;for(var e=0;e"},end:function(a){b+=""},chars:function(a){b+=a},comment:function(a){b+=""},ignore:function(a){b+=a}}),b},a.HTMLtoDOM=function(a,b){var c=e("html,head,body,title"),d={link:"head",base:"head"};b?b=b.ownerDocument||b.getOwnerDocument&&b.getOwnerDocument()||b:"undefined"!=typeof DOMDocument?b=new DOMDocument:"undefined"!=typeof document&&document.implementation&&document.implementation.createDocument?b=document.implementation.createDocument("","",null):"undefined"!=typeof ActiveX&&(b=new ActiveXObject("Msxml.DOMDocument"));var f=[],g=b.documentElement||b.getDocumentElement&&b.getDocumentElement();if(!g&&b.createElement&&!function(){var a=b.createElement("html"),c=b.createElement("head");c.appendChild(b.createElement("title")),a.appendChild(c),a.appendChild(b.createElement("body")),b.appendChild(a)}(),b.getElementsByTagName)for(var h in c)c[h]=b.getElementsByTagName(h)[0];var i=c.body;return new y(a,{start:function(a,e,g){if(c[a])return void(i=c[a]);var h=b.createElement(a);for(var j in e)h.setAttribute(e[j].name,e[j].value);d[a]&&"boolean"!=typeof c[d[a]]?c[d[a]].appendChild(h):i&&i.appendChild&&i.appendChild(h),g||(f.push(h),i=h)},end:function(){f.length-=1,i=f[f.length-1]},chars:function(a){i.appendChild(b.createTextNode(a))},comment:function(){},ignore:function(){}}),b}}("undefined"==typeof exports?this:exports),function(a){"use strict";function b(a){return a?a.replace(/[\t\n\r ]+/g," "):a}function c(a,b,c,d){var e=["a","abbr","acronym","b","bdi","bdo","big","button","cite","code","del","dfn","em","font","i","ins","kbd","mark","q","rt","rp","s","samp","small","span","strike","strong","sub","sup","svg","time","tt","u","var"],f=/^[\t ]*[\n\r]+[\t\n\r ]*/,g=/[\t\n\r ]*[\n\r]+[\t ]*$/,h=f.test(a)?"\n":" ",i=g.test(a)?"\n":" ",j="htmlmincollapsedlinebreak";return b&&"img"!==b&&"input"!==b&&("/"!==b.substr(0,1)||"/"===b.substr(0,1)&&-1===e.indexOf(b.substr(1)))&&(a=a.replace(/^\s+/,d.conservativeCollapse?" ":d.preserveLineBreaks?h:"")),c&&"img"!==c&&"input"!==c&&("/"===c.substr(0,1)||"/"!==c.substr(0,1)&&-1===e.indexOf(c))&&(a=a.replace(/\s+$/,d.conservativeCollapse?" ":d.preserveLineBreaks?i:"")),b&&c?(d.preserveLineBreaks&&(a=a.replace(f,j).replace(g,j)),a.replace(/[\t\n\r]+/g," ").replace(/[ ]+/g," ").replace(new RegExp(j,"g"),"\n")):a}function d(a){return/\[if[^\]]+\]/.test(a)||/\s*((?:c;c++)if(b.ignoreCustomComments[c].test(a))return!0;return!1}function f(a){return/^on[a-z]+/.test(a)}function g(a){return/^[^\x20\t\n\f\r"'`=<>]+$/.test(a)&&!/\/$/.test(a)&&!/\/$/.test(a)}function h(a,b){for(var c=a.length;c--;)if(a[c].name.toLowerCase()===b)return!0;return!1}function i(a,b,c,d){return c=c?J(c.toLowerCase()):"","script"===a&&"language"===b&&"javascript"===c||"form"===a&&"method"===b&&"get"===c||"input"===a&&"type"===b&&"text"===c||"script"===a&&"charset"===b&&!h(d,"src")||"a"===a&&"name"===b&&h(d,"id")||"area"===a&&"shape"===b&&"rect"===c}function j(a,b,c){return"script"===a&&"type"===b&&"text/javascript"===J(c.toLowerCase())}function k(a,b,c){return("style"===a||"link"===a)&&"type"===b&&"text/css"===J(c.toLowerCase())}function l(a,b){var c=/^(?:allowfullscreen|async|autofocus|autoplay|checked|compact|controls|declare|default|defaultchecked|defaultmuted|defaultselected|defer|disabled|enabled|formnovalidate|hidden|indeterminate|inert|ismap|itemscope|loop|multiple|muted|nohref|noresize|noshade|novalidate|nowrap|open|pauseonexit|readonly|required|reversed|scoped|seamless|selected|sortable|spellcheck|truespeed|typemustmatch|visible)$/i.test(a);if(c)return!0;var d=K[a.toLowerCase()];return d?-1===d.indexOf(b.toLowerCase()):!1}function m(a,b){return/^(?:a|area|link|base)$/.test(b)&&"href"===a||"img"===b&&/^(?:src|longdesc|usemap)$/.test(a)||"object"===b&&/^(?:classid|codebase|data|usemap)$/.test(a)||"q"===b&&"cite"===a||"blockquote"===b&&"cite"===a||("ins"===b||"del"===b)&&"cite"===a||"form"===b&&"action"===a||"input"===b&&("src"===a||"usemap"===a)||"head"===b&&"profile"===a||"script"===b&&("src"===a||"for"===a)}function n(a,b){return/^(?:a|area|object|button)$/.test(b)&&"tabindex"===a||"input"===b&&("maxlength"===a||"tabindex"===a)||"select"===b&&("size"===a||"tabindex"===a)||"textarea"===b&&/^(?:rows|cols|tabindex)$/.test(a)||"colgroup"===b&&"span"===a||"col"===b&&"span"===a||("th"===b||"td"===b)&&("rowspan"===a||"colspan"===a)}function o(a,c,d,e,g){if(d&&f(c)){if(d=J(d).replace(/^javascript:\s*/i,"").replace(/\s*;$/,""),e.minifyJS){var h="(function(){"+d+"})()",i=D(h,e.minifyJS);return i.slice(12,i.length-4).replace(/"/g,""")}return d}return"class"===c?b(J(d)):m(c,a)?(d=J(d),e.minifyURLs?C(d,e.minifyURLs):d):n(c,a)?J(d):"style"===c?(d=J(d),d&&(d=d.replace(/\s*;\s*$/,"")),e.minifyCSS?E(d,e.minifyCSS):d):(p(a,g)&&"content"===c?d=d.replace(/1\.0/g,"1").replace(/\s+/g,""):d&&e.customAttrCollapse&&e.customAttrCollapse.test(c)&&(d=d.replace(/\n+/g,"")),d)}function p(a,b){if("meta"!==a)return!1;for(var c=0,d=b.length;d>c;c++)if("name"===b[c].name&&"viewport"===b[c].value)return!0}function q(a){return a.replace(/^(\[[^\]]+\]>)\s*/,"$1").replace(/\s*(\s*\*\/|\/\/\s*\]\]>)\s*$/,"")}function s(a,b,c){for(var d=0,e=c.length;e>d;d++)if("type"===c[d].name.toLowerCase()&&b.processScripts.indexOf(c[d].value)>-1)return F(a,b);return a}function t(a,b){return a.replace(L[b],"").replace(M[b],"")}function u(a){return/^(?:html|t?body|t?head|tfoot|tr|td|th|dt|dd|option|colgroup|source)$/.test(a)}function v(a,b,c){var d=!c||/^\s*$/.test(c);return d?"input"===a&&"value"===b||N.test(b):!1}function w(a,b){if("textarea"===a)return!1;if("script"===a)for(var c=b.length-1;c>=0;c--)if("src"===b[c].name)return!1;return!0}function x(a){return!/^(?:script|style|pre|textarea)$/.test(a)}function y(a){return!/^(?:pre|textarea)$/.test(a)}function z(a){for(var b="",c=0,d=a.length;d>c;c++)b+=" "+a[c].name+(l(a[c].value)?"":'="'+a[c].value+'"');return b}function A(a,b,c,d,e,f){var h,m,n=f.caseSensitive?a.name:a.name.toLowerCase(),p=f.preventAttributesEscaping?a.value:a.escaped,q=f.preventAttributesEscaping?a.quote:'"',r=d&&e===b.length-1;return f.removeRedundantAttributes&&i(c,n,p,b)||f.removeScriptTypeAttributes&&j(c,n,p)||f.removeStyleLinkTypeAttributes&&k(c,n,p)?"":(p=o(c,n,p,f,b),m=void 0!==p&&!f.removeAttributeQuotes||!g(p)||r?q+p+q:p,f.removeEmptyAttributes&&v(c,n,p)?"":(h=void 0===p||f.collapseBooleanAttributes&&l(n,p)?n:n+a.customAssign+m," "+a.customOpen+h+a.customClose))}function B(a){for(var b=["canCollapseWhitespace","canTrimWhitespace"],c=0,d=b.length;d>c;c++)a[b[c]]||(a[b[c]]=function(){return!1})}function C(b,c){"object"!=typeof c&&(c={});try{var d=a.RelateUrl;return"undefined"==typeof d&&"function"==typeof require&&(d=require("relateurl")),d&&d.relate?d.relate(b,c):b}catch(e){H(e)}return b}function D(b,c){"object"!=typeof c&&(c={}),c.fromString=!0,c.output={inline_script:!0};try{var d=a.UglifyJS;if("undefined"==typeof d&&"function"==typeof require&&(d=require("uglify-js")),!d)return b;if(d.minify)return d.minify(b,c).code;if(d.parse){var e=d.parse(b);e.figure_out_scope();var f=d.Compressor(),g=e.transform(f);g.figure_out_scope(),g.compute_char_frequency(),c.mangle!==!1&&g.mangle_names();var h=d.OutputStream(c.output);return g.print(h),h.toString()}return b}catch(i){H(i)}return b}function E(a,b){"object"!=typeof b&&(b={}),"undefined"==typeof b.advanced&&(b.advanced=!1);try{if("undefined"!=typeof CleanCSS)return new CleanCSS(b).minify(a).styles;if("function"==typeof require){var c=require("clean-css");return new c(b).minify(a).styles}}catch(d){H(d)}return a}function F(a,f){function g(a,b){return x(a)||f.canCollapseWhitespace(a,b)}function h(a,b){return y(a)||f.canTrimWhitespace(a,b)}f=f||{};var i=[];a=J(a),B(f);var j=[],k=[],l="",m="",n=[],o=[],p=[],v=f.lint,C=!1,F=new Date;f.removeIgnored&&(a=a.replace(/<\?[^\?]+\?>/g,"").replace(/<%[^%]+%>/g,"")),new I(a,{html5:"undefined"!=typeof f.html5?f.html5:!0,start:function(a,b,c,d){if(C)return void k.push("<"+a,z(b),d?"/":"",">");var e=a.toLowerCase();if("svg"===e){i.push(f);var j={};for(var q in f)j[q]=f[q];j.keepClosingSlash=!0,j.caseSensitive=!0,f=j}a=f.caseSensitive?a:e,m=a,l="",n=b,f.collapseWhitespace&&(h(a,b)||o.push(a),g(a,b)||p.push(a));var r="<"+a,s=(d&&f.keepClosingSlash?"/":"")+">";0===b.length&&(r+=s),k.push(r),v&&v.testElement(a);for(var t,u=0,w=b.length;w>u;u++)v&&v.testAttribute(a,b[u].name.toLowerCase(),b[u].escaped),t=A(b[u],b,a,d,u,f),u===w-1&&(t+=s),k.push(t)},end:function(a,b){if(C)return void k.push("");var c=a.toLowerCase();"svg"===c&&(f=i.pop()),f.collapseWhitespace&&(o.length&&a===o[o.length-1]&&o.pop(),p.length&&a===p[p.length-1]&&p.pop());var d=""===l&&a===m;if(f.removeEmptyElements&&d&&w(a,b)){for(var e=k.length-1;e>=0;e--)if(/^<[^\/!]/.test(k[e])){k.splice(e);break}}else f.removeOptionalTags&&u(a)||(k.push(""),j.push.apply(j,k),k.length=0,l="")},chars:function(a,d,e){return d=""===d?"comment":d,e=""===e?"comment":e,C?void k.push(a):(("script"===m||"style"===m)&&(f.removeCommentsFromCDATA&&(a=t(a,m)),f.removeCDATASectionsFromCDATA&&(a=r(a)),f.processScripts&&(a=s(a,f,n))),"script"===m&&f.minifyJS&&(a=D(a,f.minifyJS)),"style"===m&&f.minifyCSS&&(a=E(a,f.minifyCSS)),f.collapseWhitespace&&(o.length||(a=d&&"comment"!==d||e&&"comment"!==e?c(a,d,e,f):J(a)),p.length||(a=d&&e||"html"===e?a:b(a))),l=a,v&&v.testChars(a),void k.push(a))},comment:function(a,b){var c=b?"":"-->";return/^\s*htmlmin:ignore/.test(a)?(C=!C,void(f.removeComments||k.push(""))):(a=f.removeComments?d(a)?c+q(a)+g:e(a,f)?"":"":c+a+g,void k.push(a))},doctype:function(a){k.push(f.useShortDoctype?"":b(a))},customAttrAssign:f.customAttrAssign,customAttrSurround:f.customAttrSurround}),j.push.apply(j,k);var K=G(j,f);return H("minified in: "+(new Date-F)+"ms"),K}function G(a,b){var c,d=b.maxLineLength;if(d){for(var e,f=[],g="",h=0,i=a.length;i>h;h++)e=a[h],g.length+e.length\s*$/,style:/\s*-->\s*$/},N=new RegExp("^(?:class|id|style|title|lang|dir|on(?:focus|blur|change|click|dblclick|mouse(?:down|up|over|move|out)|key(?:press|down|up)))$");"undefined"!=typeof exports?exports.minify=F:a.minify=F}(this),function(a){"use strict";function b(a){return/^(?:big|small|hr|blink|marquee)$/.test(a)}function c(a){return/^(?:applet|basefont|center|dir|font|isindex|strike)$/.test(a)}function d(a){return/^on[a-z]+/.test(a)}function e(a){return"style"===a.toLowerCase()}function f(a,b){return"align"===b&&/^(?:caption|applet|iframe|img|imput|object|legend|table|hr|div|h[1-6]|p)$/.test(a)||"alink"===b&&"body"===a||"alt"===b&&"applet"===a||"archive"===b&&"applet"===a||"background"===b&&"body"===a||"bgcolor"===b&&/^(?:table|t[rdh]|body)$/.test(a)||"border"===b&&/^(?:img|object)$/.test(a)||"clear"===b&&"br"===a||"code"===b&&"applet"===a||"codebase"===b&&"applet"===a||"color"===b&&/^(?:base(?:font)?)$/.test(a)||"compact"===b&&/^(?:dir|[dou]l|menu)$/.test(a)||"face"===b&&/^base(?:font)?$/.test(a)||"height"===b&&/^(?:t[dh]|applet)$/.test(a)||"hspace"===b&&/^(?:applet|img|object)$/.test(a)||"language"===b&&"script"===a||"link"===b&&"body"===a||"name"===b&&"applet"===a||"noshade"===b&&"hr"===a||"nowrap"===b&&/^t[dh]$/.test(a)||"object"===b&&"applet"===a||"prompt"===b&&"isindex"===a||"size"===b&&/^(?:hr|font|basefont)$/.test(a)||"start"===b&&"ol"===a||"text"===b&&"body"===a||"type"===b&&/^(?:li|ol|ul)$/.test(a)||"value"===b&&"li"===a||"version"===b&&"html"===a||"vlink"===b&&"body"===a||"vspace"===b&&/^(?:applet|img|object)$/.test(a)||"width"===b&&/^(?:hr|td|th|applet|pre)$/.test(a)}function g(a,b){return"href"===a&&/^\s*javascript\s*:\s*void\s*(\s+0|\(\s*0\s*\))\s*$/i.test(b)}function h(){this.log=[],this._lastElement=null,this._isElementRepeated=!1}h.prototype.testElement=function(a){c(a)?this.log.push('Found deprecated <'+a+"> element"):b(a)?this.log.push('Found presentational <'+a+"> element"):this.checkRepeatingElement(a)},h.prototype.checkRepeatingElement=function(a){"br"===a&&"br"===this._lastElement?this._isElementRepeated=!0:this._isElementRepeated&&(this._reportRepeatingElement(),this._isElementRepeated=!1),this._lastElement=a},h.prototype._reportRepeatingElement=function(){this.log.push("Found <br> sequence. Try replacing it with styling.")},h.prototype.testAttribute=function(a,b,c){d(b)?this.log.push('Found event attribute ('+b+") on <"+a+"> element."):f(a,b)?this.log.push('Found deprecated '+b+" attribute on <"+a+"> element."):e(b)?this.log.push('Found style attribute on <'+a+"> element."):g(b,c)&&this.log.push('Found inaccessible attribute (on <'+a+"> element).")},h.prototype.testChars=function(a){this._lastElement="",/( \s*){2,}/.test(a)&&this.log.push("Found repeating &nbsp; sequence. Try replacing it with styling.")},h.prototype.test=function(a,b,c){this.testElement(a),this.testAttribute(a,b,c)},h.prototype.populate=function(a){if(this._isElementRepeated&&this._reportRepeatingElement(),this.log.length)if(a)a.innerHTML="
  1. "+this.log.join("
  2. ")+"
";else{var b=" - "+this.log.join("\n - ").replace(/(<([^>]+)>)/gi,"").replace(/</g,"<").replace(/>/g,">");console.log(b)}},a.HTMLLint=h}("undefined"==typeof exports?this:exports); \ No newline at end of file diff --git a/package.json b/package.json index 27ea0c4..6866b49 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "change-case": "2.1.x", - "clean-css": "2.2.x", + "clean-css": "3.0.x", "cli": "0.6.x", "uglify-js": "2.4.x", "relateurl": "0.2.x" diff --git a/src/htmlminifier.js b/src/htmlminifier.js index 44b1adf..10c336b 100644 --- a/src/htmlminifier.js +++ b/src/htmlminifier.js @@ -500,16 +500,16 @@ if (typeof options !== 'object') { options = { }; } - if (typeof options.noAdvanced === 'undefined') { - options.noAdvanced = true; + if (typeof options.advanced === 'undefined') { + options.advanced = false; } try { if (typeof CleanCSS !== 'undefined') { - return new CleanCSS(options).minify(text); + return new CleanCSS(options).minify(text).styles; } else if (typeof require === 'function') { var CleanCSSModule = require('clean-css'); - return new CleanCSSModule(options).minify(text); + return new CleanCSSModule(options).minify(text).styles; } } catch (err) { -- 2.34.1