2014-02-13 08:35:51 +01:00
/ * !
2014-03-01 19:58:31 +01:00
* LESS - Leaner CSS v1 . 7.0
2014-02-13 08:35:51 +01:00
* http : //lesscss.org
*
* Copyright ( c ) 2009 - 2014 , Alexis Sellier < self @ cloudhead . net >
* Licensed under the Apache v2 License .
*
2014-01-14 06:58:27 +01:00
* /
/ * * * @ l i c e n s e A p a c h e v 2
* /
2014-02-04 10:00:57 +01:00
/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
2014-03-01 19:58:31 +01:00
if ( ! function ( a , b ) { function c ( b ) { return a . less [ b . split ( "/" ) [ 1 ] ] } function d ( a , b ) { "undefined" != typeof console && w . logLevel >= b && console . log ( "less: " + a ) } function e ( a ) { return a . replace ( /^[a-z-]+:\/+?[^\/]+/ , "" ) . replace ( /^\// , "" ) . replace ( /\.[a-zA-Z]+$/ , "" ) . replace ( /[^\.\w-]+/g , "-" ) . replace ( /\./g , ":" ) } function f ( a , c ) { var e = "{line} {content}" , f = a . filename || c , g = [ ] , h = ( a . type || "Syntax" ) + "Error: " + ( a . message || "There is an error in your .less file" ) + " in " + f + " " , i = function ( a , c , d ) { a . extract [ c ] !== b && g . push ( e . replace ( /\{line\}/ , ( parseInt ( a . line , 10 ) || 0 ) + ( c - 1 ) ) . replace ( /\{class\}/ , d ) . replace ( /\{content\}/ , a . extract [ c ] ) ) } ; a . extract ? ( i ( a , 0 , "" ) , i ( a , 1 , "line" ) , i ( a , 2 , "" ) , h += "on line " + a . line + ", column " + ( a . column + 1 ) + ":\n" + g . join ( "\n" ) ) : a . stack && ( h += a . stack ) , d ( h , z . errors ) } function g ( a , b , c ) { var f = b . href || "" , g = "less:" + ( b . title || e ( f ) ) , h = document . getElementById ( g ) , i = ! 1 , j = document . createElement ( "style" ) ; if ( j . setAttribute ( "type" , "text/css" ) , b . media && j . setAttribute ( "media" , b . media ) , j . id = g , j . styleSheet ) try { j . styleSheet . cssText = a } catch ( k ) { throw new Error ( "Couldn't reassign styleSheet.cssText." ) } else j . appendChild ( document . createTextNode ( a ) ) , i = null !== h && h . childNodes . length > 0 && j . childNodes . length > 0 && h . firstChild . nodeValue === j . firstChild . nodeValue ; var l = document . getElementsByTagName ( "head" ) [ 0 ] ; if ( null === h || i === ! 1 ) { var m = b && b . nextSibling || null ; m ? m . parentNode . insertBefore ( j , m ) : l . appendChild ( j ) } if ( h && i === ! 1 && h . parentNode . removeChild ( h ) , c && D ) { d ( "saving " + f + " to cache." , z . info ) ; try { D . setItem ( f , a ) , D . setItem ( f + ":timestamp" , c ) } catch ( k ) { d ( "failed to save" , z . errors ) } } } function h ( a ) { return w . postProcessor && "function" == typeof w . postProcessor && ( a = w . postProcessor . call ( a , a ) || a ) , a } function i ( a , c ) { var d , f , h = "less-error-message:" + e ( c || "" ) , i = '<li><label>{line}</label><pre class="{class}">{content}</pre></li>' , j = document . createElement ( "div" ) , k = [ ] , l = a . filename || c , m = l . match ( /([^\/]+(\?.*)?)$/ ) [ 1 ] ; j . id = h , j . className = "less-error-message" , f = "<h3>" + ( a . type || "Syntax" ) + "Error: " + ( a . message || "There is an error in your .less file" ) + '</h3><p>in <a href="' + l + '">' + m + "</a> " ; var n = function ( a , c , d ) { a . extract [ c ] !== b && k . push ( i . replace ( /\{line\}/ , ( parseInt ( a . line , 10 ) || 0 ) + ( c - 1 ) ) . replace ( /\{class\}/ , d ) . replace ( /\{content\}/ , a . extract [ c ] ) ) } ; a . extract ? ( n ( a , 0 , "" ) , n ( a , 1 , "line" ) , n ( a , 2 , "" ) , f += "on line " + a . line + ", column " + ( a . column + 1 ) + ":</p><ul>" + k . join ( "" ) + "</ul>" ) : a . stack && ( f += "<br/>" + a . stack . split ( "\n" ) . slice ( 1 ) . join ( "<br/>" ) ) , j . innerHTML = f , g ( [ ".less-error-message ul, .less-error-message li {" , "list-style-type: none;" , "margin-right: 15px;" , "padding: 4px 0;" , "margin: 0;" , "}" , ".less-error-message label {" , "font-size: 12px;" , "margin-right: 15px;" , "padding: 4px 0;" , "color: #cc7777;" , "}" , ".less-error-message pre {" , "color: #dd6666;" , "padding: 4px 0;" , "margin: 0;" , "display: inline-block;" , "}" , ".less-error-message pre.line {" , "color: #ff0000;" , "}" , ".less-error-message h3 {" , "font-size: 20px;" , "font-weight: bold;" , "padding: 15px 0 5px 0;" , "margin: 0;" , "}" , ".less-error-message a {" , "color: #10a" , "}" , ".less-error-message .error {" , "color: red;" , "font-weight: bold;" , "padding-bottom: 2px;" , "border-bottom: 1px dashed red;" , "}" ] . join ( "\n" ) , { title : "error-message" } ) , j . style . cssText = [ "font-family: Arial, sans-serif" , "border: 1px solid #e00" , "background-color: #eee" , "border-radius: 5px" , "-webkit-border-radius: 5px" , "-moz-border-radius: 5px" , "color: #e00" , "padding: 15px" , "margin-bottom: 15px" ] . join ( ";" ) , "development" == w . env && ( d = setInterval ( function ( ) { document . body && ( document . getElementById ( h ) ? document . body . replaceChild ( j , document . getElementById ( h ) ) : document . body . insertBefore ( j , document . body . firstChild ) , clearInterval ( d ) ) } , 10 ) ) } function j ( a , b ) { w . errorReporting && "html" !== w . errorReporting ? "console" === w . errorReporting ? f ( a , b ) : "function" == typeof w . errorReporting && w . errorReporting ( "add" , a , b ) : i ( a , b ) } function k ( a ) { var b = document . getElementById ( "less-error-message:" + e ( a ) ) ; b && b . parentNode . removeChild ( b ) } function l ( ) { } function m ( a ) { w . errorReporting && "html" !== w . errorReporting ? "console" === w . errorReporting ? l ( a ) : "function" == typeof w . errorReporting && w . errorReporting ( "remove" , a ) : k ( a ) } function n ( a ) { for ( var b , c = document . getElementsByTagName
2014-03-17 03:03:53 +01:00
return b = b ? b instanceof d . Keyword ? b . value : b . toCSS ( ) : "" , new d . Dimension ( a . value , b ) } , convert : function ( a , b ) { return a . convertTo ( b . value ) } , round : function ( a , b ) { var c = "undefined" == typeof b ? 0 : b . value ; return e ( function ( a ) { return a . toFixed ( c ) } , null , a ) } , pi : function ( ) { return new d . Dimension ( Math . PI ) } , mod : function ( a , b ) { return new d . Dimension ( a . value % b . value , a . unit ) } , pow : function ( a , b ) { if ( "number" == typeof a && "number" == typeof b ) a = new d . Dimension ( a ) , b = new d . Dimension ( b ) ; else if ( ! ( a instanceof d . Dimension && b instanceof d . Dimension ) ) throw { type : "Argument" , message : "arguments must be numbers" } ; return new d . Dimension ( Math . pow ( a . value , b . value ) , a . unit ) } , _minmax : function ( a , c ) { switch ( c = Array . prototype . slice . call ( c ) , c . length ) { case 0 : throw { type : "Argument" , message : "one or more arguments required" } } var e , f , g , h , i , j , k , l , m = [ ] , n = { } ; for ( e = 0 ; e < c . length ; e ++ ) if ( g = c [ e ] , g instanceof d . Dimension ) if ( h = "" === g . unit . toString ( ) && l !== b ? new d . Dimension ( g . value , l ) . unify ( ) : g . unify ( ) , j = "" === h . unit . toString ( ) && k !== b ? k : h . unit . toString ( ) , k = "" !== j && k === b || "" !== j && "" === m [ 0 ] . unify ( ) . unit . toString ( ) ? j : k , l = "" !== j && l === b ? g . unit . toString ( ) : l , f = n [ "" ] !== b && "" !== j && j === k ? n [ "" ] : n [ j ] , f !== b ) i = "" === m [ f ] . unit . toString ( ) && l !== b ? new d . Dimension ( m [ f ] . value , l ) . unify ( ) : m [ f ] . unify ( ) , ( a && h . value < i . value || ! a && h . value > i . value ) && ( m [ f ] = g ) ; else { if ( k !== b && j !== k ) throw { type : "Argument" , message : "incompatible types" } ; n [ j ] = m . length , m . push ( g ) } else Array . isArray ( c [ e ] . value ) && Array . prototype . push . apply ( c , Array . prototype . slice . call ( c [ e ] . value ) ) ; return 1 == m . length ? m [ 0 ] : ( c = m . map ( function ( a ) { return a . toCSS ( this . env ) } ) . join ( this . env . compress ? "," : ", " ) , new d . Anonymous ( ( a ? "min" : "max" ) + "(" + c + ")" ) ) } , min : function ( ) { return this . _minmax ( ! 0 , arguments ) } , max : function ( ) { return this . _minmax ( ! 1 , arguments ) } , "get-unit" : function ( a ) { return new d . Anonymous ( a . unit ) } , argb : function ( a ) { return new d . Anonymous ( a . toARGB ( ) ) } , percentage : function ( a ) { return new d . Dimension ( 100 * a . value , "%" ) } , color : function ( a ) { if ( a instanceof d . Quoted ) { var b , c = a . value ; if ( b = d . Color . fromKeyword ( c ) ) return b ; if ( /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/ . test ( c ) ) return new d . Color ( c . slice ( 1 ) ) ; throw { type : "Argument" , message : "argument must be a color keyword or 3/6 digit hex e.g. #FFF" } } throw { type : "Argument" , message : "argument must be a string" } } , iscolor : function ( a ) { return this . _isa ( a , d . Color ) } , isnumber : function ( a ) { return this . _isa ( a , d . Dimension ) } , isstring : function ( a ) { return this . _isa ( a , d . Quoted ) } , iskeyword : function ( a ) { return this . _isa ( a , d . Keyword ) } , isurl : function ( a ) { return this . _isa ( a , d . URL ) } , ispixel : function ( a ) { return this . isunit ( a , "px" ) } , ispercentage : function ( a ) { return this . isunit ( a , "%" ) } , isem : function ( a ) { return this . isunit ( a , "em" ) } , isunit : function ( a , b ) { return a instanceof d . Dimension && a . unit . is ( b . value || b ) ? d . True : d . False } , _isa : function ( a , b ) { return a instanceof b ? d . True : d . False } , tint : function ( a , b ) { return this . mix ( this . rgb ( 255 , 255 , 255 ) , a , b ) } , shade : function ( a , b ) { return this . mix ( this . rgb ( 0 , 0 , 0 ) , a , b ) } , extract : function ( a , b ) { return b = b . value - 1 , Array . isArray ( a . value ) ? a . value [ b ] : Array ( a ) [ b ] } , length : function ( a ) { var b = Array . isArray ( a . value ) ? a . value . length : 1 ; return new d . Dimension ( b ) } , "data-uri" : function ( b , e ) { if ( "undefined" != typeof a ) return new d . URL ( e || b , this . currentFileInfo ) . eval ( this . env ) ; var f = b . value , g = e && e . value , h = c ( "fs" ) , i = c ( "path" ) , j = ! 1 ; if ( arguments . length < 2 && ( g = f ) , this . env . isPathRelative ( g ) && ( g = this . currentFileInfo . relativeUrls ? i . join ( this . currentFileInfo . currentDirectory , g ) : i . join ( this . currentFileInfo . entryPath , g ) ) , arguments . length < 2 ) { var k ; try { k = c ( "mime" ) } catch ( l ) { k = d . _mime } f = k . lookup ( g ) ; var m = k . charsets . lookup ( f ) ; j = [ "US-ASCII" , "UTF-8" ] . indexOf ( m ) < 0 , j && ( f += ";base64" ) } else j = /;base64$/ . test ( f ) ; var n = h . readFileSync ( g ) , o = 32 , p = parseInt ( n . length / 1024 , 10 ) ; if ( p >= o && this . env . ieCompat !== ! 1 ) return this . env . silent || console . warn ( "Skipped data-uri embedding of %s because its size (%dKB) exceeds IE8-safe %dKB!" , g , p , o ) , new d . URL ( e || b , this . currentFileInfo ) . eval ( this . env ) ; n = j ? n . toString ( "base64" ) : encodeURIComponent ( n ) ; var q = '"data:' + f + "," + n + '"' ; return new d . URL ( new d . Anonymous ( q ) ) } , "svg-gradient" : function ( a ) { function e ( ) { throw { type : "Argument" , message : " svg - gradient expects direction , start _co
2014-03-01 19:58:31 +01:00
} ) , f = 0 ; f < b . frames . length ; f ++ ) if ( ( c = b . frames [ f ] . find ( this . selector ) ) . length > 0 ) { for ( j = ! 0 , g = 0 ; g < c . length ; g ++ ) { for ( d = c [ g ] , i = ! 1 , h = 0 ; h < b . frames . length ; h ++ ) if ( ! ( d instanceof a . mixin . Definition ) && d === ( b . frames [ h ] . originalRuleset || b . frames [ h ] ) ) { i = ! 0 ; break } if ( ! i && d . matchArgs ( e , b ) ) { if ( l = { mixin : d , group : t } , d . matchCondition ) { for ( h = 0 ; 2 > h ; h ++ ) s . value ( h ) , r [ h ] = d . matchCondition ( e , b ) ; ( r [ 0 ] || r [ 1 ] ) && ( r [ 0 ] != r [ 1 ] && ( l . group = r [ 1 ] ? u : v ) , q . push ( l ) ) } else q . push ( l ) ; p = ! 0 } } for ( s . reset ( ) , n = [ 0 , 0 , 0 ] , g = 0 ; g < q . length ; g ++ ) n [ q [ g ] . group ] ++ ; if ( n [ t ] > 0 ) m = v ; else if ( m = u , n [ u ] + n [ v ] > 1 ) throw { type : "Runtime" , message : "Ambiguous use of `default()` found when matching for `" + this . format ( e ) + "`" , index : this . index , filename : this . currentFileInfo . filename } ; for ( g = 0 ; g < q . length ; g ++ ) if ( l = q [ g ] . group , l === t || l === m ) try { d = q [ g ] . mixin , d instanceof a . mixin . Definition || ( d = new a . mixin . Definition ( "" , [ ] , d . rules , null , ! 1 ) , d . originalRuleset = c [ g ] . originalRuleset || c [ g ] ) , Array . prototype . push . apply ( o , d . evalCall ( b , e , this . important ) . rules ) } catch ( w ) { throw { message : w . message , index : this . index , filename : this . currentFileInfo . filename , stack : w . stack } } if ( p ) { if ( ! this . currentFileInfo || ! this . currentFileInfo . reference ) for ( f = 0 ; f < o . length ; f ++ ) k = o [ f ] , k . markReferenced && k . markReferenced ( ) ; return o } } throw j ? { type : "Runtime" , message : "No matching definition was found for `" + this . format ( e ) + "`" , index : this . index , filename : this . currentFileInfo . filename } : { type : "Name" , message : this . selector . toCSS ( ) . trim ( ) + " is undefined" , index : this . index , filename : this . currentFileInfo . filename } } , format : function ( a ) { return this . selector . toCSS ( ) . trim ( ) + "(" + ( a ? a . map ( function ( a ) { var b = "" ; return a . name && ( b += a . name + ":" ) , b += a . value . toCSS ? a . value . toCSS ( ) : "???" } ) . join ( ", " ) : "" ) + ")" } } , a . mixin . Definition = function ( b , c , d , e , f , g ) { this . name = b , this . selectors = [ new a . Selector ( [ new a . Element ( null , b , this . index , this . currentFileInfo ) ] ) ] , this . params = c , this . condition = e , this . variadic = f , this . arity = c . length , this . rules = d , this . _lookups = { } , this . required = c . reduce ( function ( a , b ) { return ! b . name || b . name && ! b . value ? a + 1 : a } , 0 ) , this . parent = a . Ruleset . prototype , this . frames = g } , a . mixin . Definition . prototype = { type : "MixinDefinition" , accept : function ( a ) { this . params && this . params . length && ( this . params = a . visitArray ( this . params ) ) , this . rules = a . visitArray ( this . rules ) , this . condition && ( this . condition = a . visit ( this . condition ) ) } , variable : function ( a ) { return this . parent . variable . call ( this , a ) } , variables : function ( ) { return this . parent . variables . call ( this ) } , find : function ( ) { return this . parent . find . apply ( this , arguments ) } , rulesets : function ( ) { return this . parent . rulesets . apply ( this ) } , evalParams : function ( b , c , d , e ) { var f , g , h , i , j , k , l , m , n = new a . Ruleset ( null , null ) , o = this . params . slice ( 0 ) , p = 0 ; if ( c = new a . evalEnv ( c , [ n ] . concat ( c . frames ) ) , d ) for ( d = d . slice ( 0 ) , p = d . length , h = 0 ; p > h ; h ++ ) if ( g = d [ h ] , k = g && g . name ) { for ( l = ! 1 , i = 0 ; i < o . length ; i ++ ) if ( ! e [ i ] && k === o [ i ] . name ) { e [ i ] = g . value . eval ( b ) , n . prependRule ( new a . Rule ( k , g . value . eval ( b ) ) ) , l = ! 0 ; break } if ( l ) { d . splice ( h , 1 ) , h -- ; continue } throw { type : "Runtime" , message : "Named argument for " + this . name + " " + d [ h ] . name + " not found" } } for ( m = 0 , h = 0 ; h < o . length ; h ++ ) if ( ! e [ h ] ) { if ( g = d && d [ m ] , k = o [ h ] . name ) if ( o [ h ] . variadic ) { for ( f = [ ] , i = m ; p > i ; i ++ ) f . push ( d [ i ] . value . eval ( b ) ) ; n . prependRule ( new a . Rule ( k , new a . Expression ( f ) . eval ( b ) ) ) } else { if ( j = g && g . value ) j = j . eval ( b ) ; else { if ( ! o [ h ] . value ) throw { type : "Runtime" , message : "wrong number of arguments for " + this . name + " (" + p + " for " + this . arity + ")" } ; j = o [ h ] . value . eval ( c ) , n . resetCache ( ) } n . prependRule ( new a . Rule ( k , j ) ) , e [ h ] = j } if ( o [ h ] . variadic && d ) for ( i = m ; p > i ; i ++ ) e [ i ] = d [ i ] . value . eval ( b ) ; m ++ } return n } , eval : function ( b ) { return new a . mixin . Definition ( this . name , this . params , this . rules , this . condition , this . variadic , this . frames || b . frames . slice ( 0 ) ) } , evalCall : function ( b , c , d ) { var e , f , g = [ ] , h = this . frames ? this . frames . concat ( b . frames ) : b . frames , i = this . evalParams ( b , new a . evalEnv ( b , h ) , c , g ) ; return i . prependRule ( new a . Rule ( "@arguments" , new a . Expression ( g ) . eval ( b ) ) ) , e = this . rules . slice ( 0 ) , f = new a . Ruleset ( null , e ) , f . originalRuleset = this , f = f . eval ( new a . evalEnv ( b , [ this , i ] . concat ( h ) ) ) , d && ( f = this . parent . makeImportant . apply ( f ) ) , f } , matchCondition : function ( b , c ) { return this . condition && ! this . condition . eval ( new a . evalEnv ( c , [ this . evalParams ( c , new
} , visitRulesetOut : function ( ) { } , visitMedia : function ( a ) { var b = a . allExtends . concat ( this . allExtendsStack [ this . allExtendsStack . length - 1 ] ) ; b = b . concat ( this . doExtendChaining ( b , a . allExtends ) ) , this . allExtendsStack . push ( b ) } , visitMediaOut : function ( ) { this . allExtendsStack . length = this . allExtendsStack . length - 1 } , visitDirective : function ( a ) { var b = a . allExtends . concat ( this . allExtendsStack [ this . allExtendsStack . length - 1 ] ) ; b = b . concat ( this . doExtendChaining ( b , a . allExtends ) ) , this . allExtendsStack . push ( b ) } , visitDirectiveOut : function ( ) { this . allExtendsStack . length = this . allExtendsStack . length - 1 } } } ( c ( "./tree" ) ) , function ( a ) { a . sourceMapOutput = function ( a ) { this . _css = [ ] , this . _rootNode = a . rootNode , this . _writeSourceMap = a . writeSourceMap , this . _contentsMap = a . contentsMap , this . _contentsIgnoredCharsMap = a . contentsIgnoredCharsMap , this . _sourceMapFilename = a . sourceMapFilename , this . _outputFilename = a . outputFilename , this . _sourceMapURL = a . sourceMapURL , a . sourceMapBasepath && ( this . _sourceMapBasepath = a . sourceMapBasepath . replace ( /\\/g , "/" ) ) , this . _sourceMapRootpath = a . sourceMapRootpath , this . _outputSourceFiles = a . outputSourceFiles , this . _sourceMapGeneratorConstructor = a . sourceMapGenerator || c ( "source-map" ) . SourceMapGenerator , this . _sourceMapRootpath && "/" !== this . _sourceMapRootpath . charAt ( this . _sourceMapRootpath . length - 1 ) && ( this . _sourceMapRootpath += "/" ) , this . _lineNumber = 0 , this . _column = 0 } , a . sourceMapOutput . prototype . normalizeFilename = function ( a ) { return a = a . replace ( /\\/g , "/" ) , this . _sourceMapBasepath && 0 === a . indexOf ( this . _sourceMapBasepath ) && ( a = a . substring ( this . _sourceMapBasepath . length ) , ( "\\" === a . charAt ( 0 ) || "/" === a . charAt ( 0 ) ) && ( a = a . substring ( 1 ) ) ) , ( this . _sourceMapRootpath || "" ) + a } , a . sourceMapOutput . prototype . add = function ( a , b , c , d ) { if ( a ) { var e , f , g , h , i ; if ( b ) { var j = this . _contentsMap [ b . filename ] ; this . _contentsIgnoredCharsMap [ b . filename ] && ( c -= this . _contentsIgnoredCharsMap [ b . filename ] , 0 > c && ( c = 0 ) , j = j . slice ( this . _contentsIgnoredCharsMap [ b . filename ] ) ) , j = j . substring ( 0 , c ) , f = j . split ( "\n" ) , h = f [ f . length - 1 ] } if ( e = a . split ( "\n" ) , g = e [ e . length - 1 ] , b ) if ( d ) for ( i = 0 ; i < e . length ; i ++ ) this . _sourceMapGenerator . addMapping ( { generated : { line : this . _lineNumber + i + 1 , column : 0 === i ? this . _column : 0 } , original : { line : f . length + i , column : 0 === i ? h . length : 0 } , source : this . normalizeFilename ( b . filename ) } ) ; else this . _sourceMapGenerator . addMapping ( { generated : { line : this . _lineNumber + 1 , column : this . _column } , original : { line : f . length , column : h . length } , source : this . normalizeFilename ( b . filename ) } ) ; 1 === e . length ? this . _column += g . length : ( this . _lineNumber += e . length - 1 , this . _column = g . length ) , this . _css . push ( a ) } } , a . sourceMapOutput . prototype . isEmpty = function ( ) { return 0 === this . _css . length } , a . sourceMapOutput . prototype . toCSS = function ( a ) { if ( this . _sourceMapGenerator = new this . _sourceMapGeneratorConstructor ( { file : this . _outputFilename , sourceRoot : null } ) , this . _outputSourceFiles ) for ( var b in this . _contentsMap ) if ( this . _contentsMap . hasOwnProperty ( b ) ) { var c = this . _contentsMap [ b ] ; this . _contentsIgnoredCharsMap [ b ] && ( c = c . slice ( this . _contentsIgnoredCharsMap [ b ] ) ) , this . _sourceMapGenerator . setSourceContent ( this . normalizeFilename ( b ) , c ) } if ( this . _rootNode . genCSS ( a , this ) , this . _css . length > 0 ) { var d , e = JSON . stringify ( this . _sourceMapGenerator . toJSON ( ) ) ; this . _sourceMapURL ? d = this . _sourceMapURL : this . _sourceMapFilename && ( d = this . normalizeFilename ( this . _sourceMapFilename ) ) , this . _writeSourceMap ? this . _writeSourceMap ( e ) : d = "data:application/json," + encodeURIComponent ( e ) , d && this . _css . push ( "/*# sourceMappingURL=" + d + " */" ) } return this . _css . join ( "" ) } } ( c ( "./tree" ) ) ; var y = /^(file|chrome(-extension)?|resource|qrc|app):/ . test ( location . protocol ) ; w . env = w . env || ( "127.0.0.1" == location . hostname || "0.0.0.0" == location . hostname || "localhost" == location . hostname || location . port && location . port . length > 0 || y ? "development" : "production" ) ; var z = { debug : 3 , info : 2 , errors : 1 , none : 0 } ; if ( w . logLevel = "undefined" != typeof w . logLevel ? w . logLevel : "development" === w . env ? z . debug : z . errors , w . async = w . async || ! 1 , w . fileAsync = w . fileAsync || ! 1 , w . poll = w . poll || ( y ? 1e3 : 1500 ) , w . functions ) for ( var A in w . functions ) w . functions . hasOwnProperty ( A ) && ( w . tree . functions [ A ] = w . functions [ A ] ) ; var B = /!dumpLineNumbers:(comments|mediaquery|all)/ . exec ( location . hash ) ; B && ( w . dumpLineNumbers = B [ 1 ] )
2014-02-06 22:10:37 +01:00
2014-01-14 06:58:27 +01:00
JSZip - A Javascript class for generating and reading zip files
< http : //stuartk.com/jszip>
( c ) 2009 - 2012 Stuart Knightley < stuart [ at ] stuartk . com >
2014-02-06 22:10:37 +01:00
Dual licenced under the MIT license or GPLv3 . See https : //raw.github.com/Stuk/jszip/master/LICENSE.markdown.
JSZip uses the library zlib . js released under the following license :
zlib . js 2012 - imaya [ https : //github.com/imaya/zlib.js ] The MIT License
2014-01-14 06:58:27 +01:00
* /
2014-02-06 22:10:37 +01:00
! function ( a ) { "object" == typeof exports ? module . exports = a ( ) : "function" == typeof define && define . amd ? define ( a ) : "undefined" != typeof window ? window . JSZip = a ( ) : "undefined" != typeof global ? global . JSZip = a ( ) : "undefined" != typeof self && ( self . JSZip = a ( ) ) } ( function ( ) { return function a ( b , c , d ) { function e ( g , h ) { if ( ! c [ g ] ) { if ( ! b [ g ] ) { var i = "function" == typeof require && require ; if ( ! h && i ) return i ( g , ! 0 ) ; if ( f ) return f ( g , ! 0 ) ; throw new Error ( "Cannot find module '" + g + "'" ) } var j = c [ g ] = { exports : { } } ; b [ g ] [ 0 ] . call ( j . exports , function ( a ) { var c = b [ g ] [ 1 ] [ a ] ; return e ( c ? c : a ) } , j , j . exports , a , b , c , d ) } return c [ g ] . exports } for ( var f = "function" == typeof require && require , g = 0 ; g < d . length ; g ++ ) e ( d [ g ] ) ; return e } ( { 1 : [ function ( a , b , c ) { "use strict" ; var d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" ; c . encode = function ( a ) { for ( var b , c , e , f , g , h , i , j = "" , k = 0 ; k < a . length ; ) b = a . charCodeAt ( k ++ ) , c = a . charCodeAt ( k ++ ) , e = a . charCodeAt ( k ++ ) , f = b >> 2 , g = ( 3 & b ) << 4 | c >> 4 , h = ( 15 & c ) << 2 | e >> 6 , i = 63 & e , isNaN ( c ) ? h = i = 64 : isNaN ( e ) && ( i = 64 ) , j = j + d . charAt ( f ) + d . charAt ( g ) + d . charAt ( h ) + d . charAt ( i ) ; return j } , c . decode = function ( a ) { var b , c , e , f , g , h , i , j = "" , k = 0 ; for ( a = a . replace ( /[^A-Za-z0-9\+\/\=]/g , "" ) ; k < a . length ; ) f = d . indexOf ( a . charAt ( k ++ ) ) , g = d . indexOf ( a . charAt ( k ++ ) ) , h = d . indexOf ( a . charAt ( k ++ ) ) , i = d . indexOf ( a . charAt ( k ++ ) ) , b = f << 2 | g >> 4 , c = ( 15 & g ) << 4 | h >> 2 , e = ( 3 & h ) << 6 | i , j += String . fromCharCode ( b ) , 64 != h && ( j += String . fromCharCode ( c ) ) , 64 != i && ( j += String . fromCharCode ( e ) ) ; return j } } , { } ] , 2 : [ function ( a , b ) { "use strict" ; function c ( ) { this . compressedSize = 0 , this . uncompressedSize = 0 , this . crc32 = 0 , this . compressionMethod = null , this . compressedContent = null } c . prototype = { getContent : function ( ) { return null } , getCompressedContent : function ( ) { return null } } , b . exports = c } , { } ] , 3 : [ function ( a , b , c ) { "use strict" ; c . STORE = { magic : "\x00\x00" , compress : function ( a ) { return a } , uncompress : function ( a ) { return a } , compressInputType : null , uncompressInputType : null } , c . DEFLATE = a ( "./flate" ) } , { "./flate" : 6 } ] , 4 : [ function ( a , b ) { "use strict" ; function c ( ) { this . data = null , this . length = 0 , this . index = 0 } var d = a ( "./utils" ) ; c . prototype = { checkOffset : function ( a ) { this . checkIndex ( this . index + a ) } , checkIndex : function ( a ) { if ( this . length < a || 0 > a ) throw new Error ( "End of data reached (data length = " + this . length + ", asked index = " + a + "). Corrupted zip ?" ) } , setIndex : function ( a ) { this . checkIndex ( a ) , this . index = a } , skip : function ( a ) { this . setIndex ( this . index + a ) } , byteAt : function ( ) { } , readInt : function ( a ) { var b , c = 0 ; for ( this . checkOffset ( a ) , b = this . index + a - 1 ; b >= this . index ; b -- ) c = ( c << 8 ) + this . byteAt ( b ) ; return this . index += a , c } , readString : function ( a ) { return d . transformTo ( "string" , this . readData ( a ) ) } , readData : function ( ) { } , lastIndexOfSignature : function ( ) { } , readDate : function ( ) { var a = this . readInt ( 4 ) ; return new Date ( ( a >> 25 & 127 ) + 1980 , ( a >> 21 & 15 ) - 1 , a >> 16 & 31 , a >> 11 & 31 , a >> 5 & 63 , ( 31 & a ) << 1 ) } } , b . exports = c } , { "./utils" : 14 } ] , 5 : [ function ( a , b , c ) { "use strict" ; c . base64 = ! 1 , c . binary = ! 1 , c . dir = ! 1 , c . date = null , c . compression = null } , { } ] , 6 : [ function ( a , b , c ) { "use strict" ; var d = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Uint32Array , e = a ( "zlibjs/bin/rawdeflate.min" ) . Zlib , f = a ( "zlibjs/bin/rawinflate.min" ) . Zlib ; c . uncompressInputType = d ? "uint8array" : "array" , c . compressInputType = d ? "uint8array" : "array" , c . magic = "\b\x00" , c . compress = function ( a ) { var b = new e . RawDeflate ( a ) ; return b . compress ( ) } , c . uncompress = function ( a ) { var b = new f . RawInflate ( a ) ; return b . decompress ( ) } } , { "zlibjs/bin/rawdeflate.min" : 19 , "zlibjs/bin/rawinflate.min" : 20 } ] , 7 : [ function ( a , b ) { "use strict" ; function c ( a , b ) { this . files = { } , this . root = "" , a && this . load ( a , b ) , this . clone = function ( ) { var a = new c ; for ( var b in this ) "function" != typeof this [ b ] && ( a [ b ] = this [ b ] ) ; return a } } c . prototype = a ( "./object" ) , c . prototype . load = a ( "./load" ) , c . support = a ( "./support" ) , c . defaults = a ( "./defaults" ) , c . utils = a ( "./utils" ) , c . base64 = a ( "./base64" ) , c . compressions = a ( "./compressions" ) , b . exports = c } , { "./base64" : 1 , "./compressions" : 3 , "./defaults" : 5 , "./load" : 8 , "./object" : 9 , "./support" : 12 , "./utils" : 14 } ] , 8 : [ function ( a , b ) { "use strict" ; var c = a ( "./base64" ) , d = a ( "./zipEntries" ) ; b . exports = function ( a , b ) { var e , f , g , h ; for ( b = b || { } , b . base64 && ( a = c . decode ( a ) ) , f = new d ( a , b ) , e = f . files , g = 0 ; g < e . length ; g ++ ) h = e [ g ] , this . file ( h . fileName , h . decompressed , {
2014-02-12 17:47:08 +01:00
( function ( ) { "use strict" ; function a ( a , b ) { var c = a . split ( "." ) , d = n ; ! ( c [ 0 ] in d ) && d . execScript && d . execScript ( "var " + c [ 0 ] ) ; for ( var e ; c . length && ( e = c . shift ( ) ) ; ) c . length || b === l ? d = d [ e ] ? d [ e ] : d [ e ] = { } : d [ e ] = b } function b ( a , b ) { if ( this . index = "number" == typeof b ? b : 0 , this . d = 0 , this . buffer = a instanceof ( o ? Uint8Array : Array ) ? a : new ( o ? Uint8Array : Array ) ( 32768 ) , 2 * this . buffer . length <= this . index ) throw Error ( "invalid index" ) ; this . buffer . length <= this . index && c ( this ) } function c ( a ) { var b , c = a . buffer , d = c . length , e = new ( o ? Uint8Array : Array ) ( d << 1 ) ; if ( o ) e . set ( c ) ; else for ( b = 0 ; d > b ; ++ b ) e [ b ] = c [ b ] ; return a . buffer = e } function d ( a ) { this . buffer = new ( o ? Uint16Array : Array ) ( 2 * a ) , this . length = 0 } function e ( a , b ) { this . e = w , this . f = 0 , this . input = o && a instanceof Array ? new Uint8Array ( a ) : a , this . c = 0 , b && ( b . lazy && ( this . f = b . lazy ) , "number" == typeof b . compressionType && ( this . e = b . compressionType ) , b . outputBuffer && ( this . b = o && b . outputBuffer instanceof Array ? new Uint8Array ( b . outputBuffer ) : b . outputBuffer ) , "number" == typeof b . outputIndex && ( this . c = b . outputIndex ) ) , this . b || ( this . b = new ( o ? Uint8Array : Array ) ( 32768 ) ) } function f ( a , b ) { this . length = a , this . g = b } function g ( a , b ) { function c ( a , b ) { var c , d = a . g , e = [ ] , f = 0 ; c = z [ a . length ] , e [ f ++ ] = 65535 & c , e [ f ++ ] = c >> 16 & 255 , e [ f ++ ] = c >> 24 ; var g ; switch ( m ) { case 1 === d : g = [ 0 , d - 1 , 0 ] ; break ; case 2 === d : g = [ 1 , d - 2 , 0 ] ; break ; case 3 === d : g = [ 2 , d - 3 , 0 ] ; break ; case 4 === d : g = [ 3 , d - 4 , 0 ] ; break ; case 6 >= d : g = [ 4 , d - 5 , 1 ] ; break ; case 8 >= d : g = [ 5 , d - 7 , 1 ] ; break ; case 12 >= d : g = [ 6 , d - 9 , 2 ] ; break ; case 16 >= d : g = [ 7 , d - 13 , 2 ] ; break ; case 24 >= d : g = [ 8 , d - 17 , 3 ] ; break ; case 32 >= d : g = [ 9 , d - 25 , 3 ] ; break ; case 48 >= d : g = [ 10 , d - 33 , 4 ] ; break ; case 64 >= d : g = [ 11 , d - 49 , 4 ] ; break ; case 96 >= d : g = [ 12 , d - 65 , 5 ] ; break ; case 128 >= d : g = [ 13 , d - 97 , 5 ] ; break ; case 192 >= d : g = [ 14 , d - 129 , 6 ] ; break ; case 256 >= d : g = [ 15 , d - 193 , 6 ] ; break ; case 384 >= d : g = [ 16 , d - 257 , 7 ] ; break ; case 512 >= d : g = [ 17 , d - 385 , 7 ] ; break ; case 768 >= d : g = [ 18 , d - 513 , 8 ] ; break ; case 1024 >= d : g = [ 19 , d - 769 , 8 ] ; break ; case 1536 >= d : g = [ 20 , d - 1025 , 9 ] ; break ; case 2048 >= d : g = [ 21 , d - 1537 , 9 ] ; break ; case 3072 >= d : g = [ 22 , d - 2049 , 10 ] ; break ; case 4096 >= d : g = [ 23 , d - 3073 , 10 ] ; break ; case 6144 >= d : g = [ 24 , d - 4097 , 11 ] ; break ; case 8192 >= d : g = [ 25 , d - 6145 , 11 ] ; break ; case 12288 >= d : g = [ 26 , d - 8193 , 12 ] ; break ; case 16384 >= d : g = [ 27 , d - 12289 , 12 ] ; break ; case 24576 >= d : g = [ 28 , d - 16385 , 13 ] ; break ; case 32768 >= d : g = [ 29 , d - 24577 , 13 ] ; break ; default : throw "invalid distance" } c = g , e [ f ++ ] = c [ 0 ] , e [ f ++ ] = c [ 1 ] , e [ f ++ ] = c [ 2 ] ; var h , i ; for ( h = 0 , i = e . length ; i > h ; ++ h ) r [ s ++ ] = e [ h ] ; u [ e [ 0 ] ] ++ , v [ e [ 3 ] ] ++ , t = a . length + b - 1 , n = null } var d , e , f , g , i , j , k , n , p , q = { } , r = o ? new Uint16Array ( 2 * b . length ) : [ ] , s = 0 , t = 0 , u = new ( o ? Uint32Array : Array ) ( 286 ) , v = new ( o ? Uint32Array : Array ) ( 30 ) , w = a . f ; if ( ! o ) { for ( f = 0 ; 285 >= f ; ) u [ f ++ ] = 0 ; for ( f = 0 ; 29 >= f ; ) v [ f ++ ] = 0 } for ( u [ 256 ] = 1 , d = 0 , e = b . length ; e > d ; ++ d ) { for ( f = i = 0 , g = 3 ; g > f && d + f !== e ; ++ f ) i = i << 8 | b [ d + f ] ; if ( q [ i ] === l && ( q [ i ] = [ ] ) , j = q [ i ] , ! ( 0 < t -- ) ) { for ( ; 0 < j . length && 32768 < d - j [ 0 ] ; ) j . shift ( ) ; if ( d + 3 >= e ) { for ( n && c ( n , - 1 ) , f = 0 , g = e - d ; g > f ; ++ f ) p = b [ d + f ] , r [ s ++ ] = p , ++ u [ p ] ; break } 0 < j . length ? ( k = h ( b , d , j ) , n ? n . length < k . length ? ( p = b [ d - 1 ] , r [ s ++ ] = p , ++ u [ p ] , c ( k , 0 ) ) : c ( n , - 1 ) : k . length < w ? n = k : c ( k , 0 ) ) : n ? c ( n , - 1 ) : ( p = b [ d ] , r [ s ++ ] = p , ++ u [ p ] ) } j . push ( d ) } return r [ s ++ ] = 256 , u [ 256 ] ++ , a . j = u , a . i = v , o ? r . subarray ( 0 , s ) : r } function h ( a , b , c ) { var d , e , g , h , i , j , k = 0 , l = a . length ; h = 0 , j = c . length ; a : for ( ; j > h ; h ++ ) { if ( d = c [ j - h - 1 ] , g = 3 , k > 3 ) { for ( i = k ; i > 3 ; i -- ) if ( a [ d + i - 1 ] !== a [ b + i - 1 ] ) continue a ; g = k } for ( ; 258 > g && l > b + g && a [ d + g ] === a [ b + g ] ; ) ++ g ; if ( g > k && ( e = d , k = g ) , 258 === g ) break } return new f ( k , b - e ) } function i ( a , b ) { var c , e , f , g , h , i = a . length , k = new d ( 572 ) , l = new ( o ? Uint8Array : Array ) ( i ) ; if ( ! o ) for ( g = 0 ; i > g ; g ++ ) l [ g ] = 0 ; for ( g = 0 ; i > g ; ++ g ) 0 < a [ g ] && k . push ( g , a [ g ] ) ; if ( c = Array ( k . length / 2 ) , e = new ( o ? Uint32Array : Array ) ( k . length / 2 ) , 1 === c . length ) return l [ k . pop ( ) . index ] = 1 , l ; for ( g = 0 , h = k . length / 2 ; h > g ; ++ g ) c [ g ] = k . pop ( ) , e [ g ] = c [ g ] . value ; for ( f = j ( e , e . length , b ) , g = 0 , h = c . length ; h > g ; ++ g ) l [ c [ g ] . index ] = f [ g ] ; return l } function j ( a , b , c ) { function d ( a ) { var c = n [ a ] [ p [ a ] ] ; c === b ? ( d ( a + 1 ) , d ( a + 1 ) ) : -- l [ c ] , ++ p [ a ] } var e , f , g , h , i , j = new ( o ? Uint16Array : Array ) ( c ) , k = new ( o ? Uint8Array : Array ) ( c ) , l = new ( o ? Uint8Array : Array ) ( b ) , m = Array ( c ) , n = Array ( c ) , p = Array ( c ) , q = ( 1 << c ) - b , r = 1 << c - 1 ; for ( j [ c - 1 ] = b , f = 0 ; c > f ; ++ f ) r > q ? k [ f ] = 0 : ( k [ f ] = 1 , q -= r ) , q <<= 1 , j [ c - 2 - f ] = ( j [ c - 1 - f ] / 2 | 0 ) + b ; for ( j [ 0 ] = k [ 0 ] , m [ 0 ] = Array ( j [ 0 ] ) , n [ 0 ] = Array ( j [ 0 ] ) , f = 1 ; c > f ; ++ f ) j [ f ] > 2 * j [ f - 1 ] + k [ f ] && ( j [ f ] = 2 * j [ f - 1 ] + k [ f ] ) , m [ f ] = Array ( j [ f ] ) , n [ f ] = Array ( j [ f ] ) ; for ( e = 0 ; b >
2014-02-04 10:00:57 +01:00
( function ( ) { "use strict" ; function a ( a , b ) { var c = a . split ( "." ) , d = h ; ! ( c [ 0 ] in d ) && d . execScript && d . execScript ( "var " + c [ 0 ] ) ; for ( var e ; c . length && ( e = c . shift ( ) ) ; ) c . length || b === g ? d = d [ e ] ? d [ e ] : d [ e ] = { } : d [ e ] = b } function b ( a ) { var b , c , d , e , f , g , h , j , k , l = a . length , m = 0 , n = Number . POSITIVE _INFINITY ; for ( j = 0 ; l > j ; ++ j ) a [ j ] > m && ( m = a [ j ] ) , a [ j ] < n && ( n = a [ j ] ) ; for ( b = 1 << m , c = new ( i ? Uint32Array : Array ) ( b ) , d = 1 , e = 0 , f = 2 ; m >= d ; ) { for ( j = 0 ; l > j ; ++ j ) if ( a [ j ] === d ) { for ( g = 0 , h = e , k = 0 ; d > k ; ++ k ) g = g << 1 | 1 & h , h >>= 1 ; for ( k = g ; b > k ; k += f ) c [ k ] = d << 16 | j ; ++ e } ++ d , e <<= 1 , f <<= 1 } return [ c , m , n ] } function c ( a , b ) { switch ( this . g = [ ] , this . h = 32768 , this . c = this . f = this . d = this . k = 0 , this . input = i ? new Uint8Array ( a ) : a , this . l = ! 1 , this . i = k , this . p = ! 1 , ( b || ! ( b = { } ) ) && ( b . index && ( this . d = b . index ) , b . bufferSize && ( this . h = b . bufferSize ) , b . bufferType && ( this . i = b . bufferType ) , b . resize && ( this . p = b . resize ) ) , this . i ) { case j : this . a = 32768 , this . b = new ( i ? Uint8Array : Array ) ( 32768 + this . h + 258 ) ; break ; case k : this . a = 0 , this . b = new ( i ? Uint8Array : Array ) ( this . h ) , this . e = this . u , this . m = this . r , this . j = this . s ; break ; default : throw Error ( "invalid inflate mode" ) } } function d ( a , b ) { for ( var c , d = a . f , e = a . c , f = a . input , h = a . d ; b > e ; ) { if ( c = f [ h ++ ] , c === g ) throw Error ( "input buffer is broken" ) ; d |= c << e , e += 8 } return c = d & ( 1 << b ) - 1 , a . f = d >>> b , a . c = e - b , a . d = h , c } function e ( a , b ) { for ( var c , d , e , f = a . f , h = a . c , i = a . input , j = a . d , k = b [ 0 ] , l = b [ 1 ] ; l > h && ( c = i [ j ++ ] , c !== g ) ; ) f |= c << h , h += 8 ; return d = k [ f & ( 1 << l ) - 1 ] , e = d >>> 16 , a . f = f >> e , a . c = h - e , a . d = j , 65535 & d } function f ( a ) { function c ( a , b , c ) { var f , g , h , i ; for ( i = 0 ; a > i ; ) switch ( f = e ( this , b ) ) { case 16 : for ( h = 3 + d ( this , 2 ) ; h -- ; ) c [ i ++ ] = g ; break ; case 17 : for ( h = 3 + d ( this , 3 ) ; h -- ; ) c [ i ++ ] = 0 ; g = 0 ; break ; case 18 : for ( h = 11 + d ( this , 7 ) ; h -- ; ) c [ i ++ ] = 0 ; g = 0 ; break ; default : g = c [ i ++ ] = f } return c } var f , g , h , j , k = d ( a , 5 ) + 257 , l = d ( a , 5 ) + 1 , m = d ( a , 4 ) + 4 , n = new ( i ? Uint8Array : Array ) ( o . length ) ; for ( j = 0 ; m > j ; ++ j ) n [ o [ j ] ] = d ( a , 3 ) ; f = b ( n ) , g = new ( i ? Uint8Array : Array ) ( k ) , h = new ( i ? Uint8Array : Array ) ( l ) , a . j ( b ( c . call ( a , k , f , g ) ) , b ( c . call ( a , l , f , h ) ) ) } var g = void 0 , h = this , i = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Uint32Array , j = 0 , k = 1 ; c . prototype . t = function ( ) { for ( ; ! this . l ; ) { var a = d ( this , 3 ) ; switch ( 1 & a && ( this . l = ! 0 ) , a >>>= 1 ) { case 0 : var b = this . input , c = this . d , e = this . b , h = this . a , l = g , m = g , n = g , o = e . length , p = g ; if ( this . c = this . f = 0 , l = b [ c ++ ] , l === g ) throw Error ( "invalid uncompressed block header: LEN (first byte)" ) ; if ( m = l , l = b [ c ++ ] , l === g ) throw Error ( "invalid uncompressed block header: LEN (second byte)" ) ; if ( m |= l << 8 , l = b [ c ++ ] , l === g ) throw Error ( "invalid uncompressed block header: NLEN (first byte)" ) ; if ( n = l , l = b [ c ++ ] , l === g ) throw Error ( "invalid uncompressed block header: NLEN (second byte)" ) ; if ( n |= l << 8 , m === ~ n ) throw Error ( "invalid uncompressed block header: length verify" ) ; if ( c + m > b . length ) throw Error ( "input buffer is broken" ) ; switch ( this . i ) { case j : for ( ; h + m > e . length ; ) { if ( p = o - h , m -= p , i ) e . set ( b . subarray ( c , c + p ) , h ) , h += p , c += p ; else for ( ; p -- ; ) e [ h ++ ] = b [ c ++ ] ; this . a = h , e = this . e ( ) , h = this . a } break ; case k : for ( ; h + m > e . length ; ) e = this . e ( { o : 2 } ) ; break ; default : throw Error ( "invalid inflate mode" ) } if ( i ) e . set ( b . subarray ( c , c + m ) , h ) , h += m , c += m ; else for ( ; m -- ; ) e [ h ++ ] = b [ c ++ ] ; this . d = c , this . a = h , this . b = e ; break ; case 1 : this . j ( A , C ) ; break ; case 2 : f ( this ) ; break ; default : throw Error ( "unknown BTYPE: " + a ) } } return this . m ( ) } ; var l , m , n = [ 16 , 17 , 18 , 0 , 8 , 7 , 9 , 6 , 10 , 5 , 11 , 4 , 12 , 3 , 13 , 2 , 14 , 1 , 15 ] , o = i ? new Uint16Array ( n ) : n , p = [ 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 13 , 15 , 17 , 19 , 23 , 27 , 31 , 35 , 43 , 51 , 59 , 67 , 83 , 99 , 115 , 131 , 163 , 195 , 227 , 258 , 258 , 258 ] , q = i ? new Uint16Array ( p ) : p , r = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 3 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 5 , 5 , 5 , 5 , 0 , 0 , 0 ] , s = i ? new Uint8Array ( r ) : r , t = [ 1 , 2 , 3 , 4 , 5 , 7 , 9 , 13 , 17 , 25 , 33 , 49 , 65 , 97 , 129 , 193 , 257 , 385 , 513 , 769 , 1025 , 1537 , 2049 , 3073 , 4097 , 6145 , 8193 , 12289 , 16385 , 24577 ] , u = i ? new Uint16Array ( t ) : t , v = [ 0 , 0 , 0 , 0 , 1 , 1 , 2 , 2 , 3 , 3 , 4 , 4 , 5 , 5 , 6 , 6 , 7 , 7 , 8 , 8 , 9 , 9 , 10 , 10 , 11 , 11 , 12 , 12 , 13 , 13 ] , w = i ? new Uint8Array ( v ) : v , x = new ( i ? Uint8Array : Array ) ( 288 ) ; for ( l = 0 , m = x . length ; m > l ; ++ l ) x [ l ] = 143 >= l ? 8 : 255 >= l ? 9 : 279 >= l ? 7 : 8 ; var y , z , A = b ( x ) , B = new ( i ? Uint8Array : Array ) ( 30 ) ; for ( y = 0 , z = B . length ; z > y ; ++ y ) B [ y ] = 5 ; var C = b ( B ) ; c . prototype . j = function ( a , b ) { var c = this . b , f = this . a ; this . n = a ; for ( var g , h , i , j , k = c . length - 258 ; 256 !== ( g = e ( this , a ) ) ; ) if ( 256 > g ) f >= k && ( this . a = f , c = this . e ( ) , f = this . a ) , c [ f ++ ] = g ; else for ( h = g - 257 , j = q [ h ] , 0 < s [ h ] && ( j += d ( this , s [ h ] ) ) , g = e ( this , b ) , i = u [ g ] , 0 < w [ g ] && ( i += d ( this , w [ g ] ) ) , f >= k &
2014-01-14 06:58:27 +01:00
* The parts that are unique to this repo ( not much , just some wrapper code ) are
* released under the new BSD and MIT licenses .
*
* This file includes UglifyJS and some parts of es5 - shim , both which have
* their own licenses :
*
* https : //github.com/mishoo/UglifyJS (BSD)
* https : //github.com/kriskowal/es5-shim (MIT)
*
* More info on the project : https : //github.com/jrburke/uglifyweb
* /
2014-02-09 01:31:42 +01:00
function ( ) { var a = ( Object . prototype . toString , "a" != "a" [ 0 ] ) , b = function ( b ) { if ( null == b ) throw new TypeError ; return a && "string" == typeof b && b ? b . split ( "" ) : Object ( b ) } ; Array . prototype . forEach || ( Array . prototype . forEach = function ( a ) { for ( var c = b ( this ) , d = arguments [ 1 ] , e = 0 , f = c . length >>> 0 ; f > e ; ) e in c && a . call ( d , c [ e ] , e , c ) , e ++ } ) , Array . prototype . reduce || ( Array . prototype . reduce = function ( a ) { var c = b ( this ) , d = c . length >>> 0 ; if ( ! d && 1 == arguments . length ) throw new TypeError ; var e , f = 0 ; if ( arguments . length < 2 ) for ( ; ; ) { if ( f in c ) { e = c [ f ++ ] ; break } if ( ++ f >= d ) throw new TypeError } else e = arguments [ 1 ] ; for ( ; d > f ; f ++ ) f in c && ( e = a . call ( void 0 , e , c [ f ] , f , c ) ) ; return e } ) ; var c , d , e ; if ( function ( ) { function a ( a , b ) { if ( a && "." === a . charAt ( 0 ) && b ) { b = b . split ( "/" ) , b = b . slice ( 0 , b . length - 1 ) , a = b . concat ( a . split ( "/" ) ) ; var c , d ; for ( c = 0 ; d = a [ c ] ; c ++ ) if ( "." === d ) a . splice ( c , 1 ) , c -= 1 ; else if ( ".." === d ) { if ( 1 === c && ( ".." === a [ 2 ] || ".." === a [ 0 ] ) ) break ; c > 0 && ( a . splice ( c - 1 , 2 ) , c -= 2 ) } a = a . join ( "/" ) } return a } function b ( a , b ) { return function ( ) { return j . apply ( null , l . call ( arguments , 0 ) . concat ( [ a , b ] ) ) } } function f ( b ) { return function ( c ) { return a ( c , b ) } } function g ( a ) { return function ( b ) { k [ a ] = b } } function h ( b , c ) { var d , e , g = b . indexOf ( "!" ) ; return - 1 !== g ? ( d = a ( b . slice ( 0 , g ) , c ) , b = b . slice ( g + 1 ) , e = k [ d ] , b = e && e . normalize ? e . normalize ( b , f ( c ) ) : a ( b , c ) ) : b = a ( b , c ) , { f : d ? d + "!" + b : b , n : b , p : e } } function i ( a , c , d , e ) { var f , i , j , l , m , n , o = [ ] ; if ( e || ( e = a ) , "function" == typeof d ) { if ( c ) for ( l = 0 ; l < c . length ; l ++ ) n = h ( c [ l ] , e ) , j = n . f , "require" === j ? o [ l ] = b ( a ) : "exports" === j ? ( o [ l ] = k [ a ] = { } , f = ! 0 ) : "module" === j ? i = o [ l ] = { id : a , uri : "" , exports : k [ a ] } : j in k ? o [ l ] = k [ j ] : n . p && ( n . p . load ( n . n , b ( e , ! 0 ) , g ( j ) , { } ) , o [ l ] = k [ j ] ) ; m = d . apply ( k [ a ] , o ) , a && ( i && void 0 !== i . exports ? k [ a ] = i . exports : f || ( k [ a ] = m ) ) } else a && ( k [ a ] = d ) } var j , k = { } , l = [ ] . slice ; "function" != typeof e && ( c = j = function ( a , b , c , d ) { return "string" == typeof a ? k [ h ( a , b ) . f ] : ( a . splice || ( b . splice ? ( a = b , b = arguments [ 2 ] ) : a = [ ] ) , d ? i ( null , a , b , c ) : setTimeout ( function ( ) { i ( null , a , b , c ) } , 15 ) , j ) } , j . config = function ( ) { return j } , d || ( d = j ) , e = function ( a , b , c ) { b . splice || ( c = b , b = [ ] ) , i ( a , b , c ) } , e . amd = { } ) } ( ) , e ( "almond" , function ( ) { } ) , e ( "lib/parse-js" , [ "require" , "exports" , "module" ] , function ( a , b ) { function c ( a ) { return J . letter . test ( a ) } function d ( a ) { return a = a . charCodeAt ( 0 ) , a >= 48 && 57 >= a } function e ( a ) { return d ( a ) || c ( a ) } function f ( a ) { return J . non _spacing _mark . test ( a ) || J . space _combining _mark . test ( a ) } function g ( a ) { return J . connector _punctuation . test ( a ) } function h ( a ) { return "$" == a || "_" == a || c ( a ) } function i ( a ) { return h ( a ) || f ( a ) || d ( a ) || g ( a ) || " " == a || " " == a } function j ( a ) { return C . test ( a ) ? parseInt ( a . substr ( 2 ) , 16 ) : D . test ( a ) ? parseInt ( a . substr ( 1 ) , 8 ) : E . test ( a ) ? parseFloat ( a ) : void 0 } function k ( a , b , c , d ) { this . message = a , this . line = b , this . col = c , this . pos = d , this . stack = ( new Error ) . stack } function l ( a , b , c , d ) { throw new k ( a , b , c , d ) } function m ( a , b , c ) { return a . type == b && ( null == c || a . value == c ) } function n ( a ) { function b ( ) { return O . text . charAt ( O . pos ) } function c ( a , b ) { var c = O . text . charAt ( O . pos ++ ) ; if ( a && ! c ) throw K ; return "\n" == c ? ( O . newline _before = O . newline _before || ! b , ++ O . line , O . col = 0 ) : ++ O . col , c } function f ( a , b ) { var c = O . text . indexOf ( a , O . pos ) ; if ( b && - 1 == c ) throw K ; return c } function g ( ) { O . tokline = O . line , O . tokcol = O . col , O . tokpos = O . pos } function k ( a , b , c ) { O . regex _allowed = "operator" == a && ! w ( M , b ) || "keyword" == a && w ( z , b ) || "punc" == a && w ( H , b ) ; var d = { type : a , value : b , line : O . tokline , col : O . tokcol , pos : O . tokpos , nlb : O . newline _before } ; return c || ( d . comments _before = O . comments _before , O . comments _before = [ ] ) , O . newline _before = ! 1 , d } function m ( ) { for ( ; w ( G , b ( ) ) ; ) c ( ) } function n ( a ) { for ( var d = "" , e = b ( ) , f = 0 ; e && a ( e , f ++ ) ; ) d += c ( ) , e = b ( ) ; return d } function o ( a ) { l ( a , O . tokline , O . tokcol , O . tokpos ) } function p ( a ) { var b = ! 1 , c = ! 1 , d = ! 1 , f = "." == a , g = n ( function ( g , h ) { return "x" == g || "X" == g ? d ? ! 1 : d = ! 0 : d || "E" != g && "e" != g ? "-" == g ? c || 0 == h && ! a ? ! 0 : ! 1 : "+" == g ? c : ( c = ! 1 , "." == g ? f || d ? ! 1 : f = ! 0 : e ( g ) ) : b ? ! 1 : b = c = ! 0 } ) ; a && ( g = a + g ) ; var h = j ( g ) ; return isNaN ( h ) ? void o ( "Invalid syntax: " + g ) : k ( "num" , h ) } function q ( a ) { var b = c ( ! 0 , a ) ; switch ( b ) { case "n" : return "\n" ; case "r" : return "\r" ; case "t" : return " " ; case "b" : return "\b" ; case "v" : return " " ; case "f" : return "\f" ; case "0" : return "\x00" ; case "x" : return String . fromCharCode ( r ( 2 ) ) ; case "u" : return String . fromCharCode ( r ( 4 ) ) ; case "\n" : return "" ; default : return b } } function r ( a ) { for ( var b = 0 ; a > 0 ; -- a ) { var d = pars
switch ( a [ 0 ] ) { case "unary-prefix" : return "!" == a [ 1 ] && j ( a [ 2 ] ) ? a [ 2 ] : c ; case "seq" : return a = A ( a ) , a [ a . length - 1 ] = d ( a [ a . length - 1 ] ) , a ; case "conditional" : return g ( c , [ "conditional" , a [ 1 ] , d ( a [ 2 ] ) , d ( a [ 3 ] ) ] ) ; case "binary" : var e = a [ 1 ] , f = a [ 2 ] , h = a [ 3 ] ; if ( ! b . keep _comps ) switch ( e ) { case "<=" : return [ "binary" , ">" , f , h ] ; case "<" : return [ "binary" , ">=" , f , h ] ; case ">=" : return [ "binary" , "<" , f , h ] ; case ">" : return [ "binary" , "<=" , f , h ] } switch ( e ) { case "==" : return [ "binary" , "!=" , f , h ] ; case "!=" : return [ "binary" , "==" , f , h ] ; case "===" : return [ "binary" , "!==" , f , h ] ; case "!==" : return [ "binary" , "===" , f , h ] ; case "&&" : return g ( c , [ "binary" , "||" , d ( f ) , d ( h ) ] ) ; case "||" : return g ( c , [ "binary" , "&&" , d ( f ) , d ( h ) ] ) } } return c } function f ( a , b , c ) { var e = function ( ) { return "unary-prefix" == a [ 0 ] && "!" == a [ 1 ] ? c ? [ "conditional" , a [ 2 ] , c , b ] : [ "binary" , "||" , a [ 2 ] , b ] : c ? g ( [ "conditional" , a , b , c ] , [ "conditional" , d ( a ) , c , b ] ) : [ "binary" , "&&" , a , b ] } ; return H ( a , function ( a , d ) { return m ( d ? c : b ) , d ? b : c } , e ) } function h ( a , b ) { var c = u ; u = a ; var d = b ( ) ; return d . scope = a , u = c , d } function l ( a ) { return null != a && "block" == a [ 0 ] && a [ 1 ] && ( 1 == a [ 1 ] . length ? a = a [ 1 ] [ 0 ] : 0 == a [ 1 ] . length && ( a = [ "block" ] ) ) , a } function o ( a , b , c ) { var d = "defun" == this [ 0 ] ; return c = h ( c . scope , function ( ) { var b = p ( c , "lambda" ) ; return ! d && a && ! u . references ( a ) && ( a = null ) , b } ) , [ this [ 0 ] , a , b , c ] } function p ( a ) { return a = F ( a , y ) , a = a . reduce ( function ( a , b ) { return "block" == b [ 0 ] ? b [ 1 ] && a . push . apply ( a , b [ 1 ] ) : a . push ( b ) , a } , [ ] ) , a = function ( b , c ) { return a . forEach ( function ( a ) { c && ( "var" == a [ 0 ] && "var" == c [ 0 ] || "const" == a [ 0 ] && "const" == c [ 0 ] ) ? c [ 1 ] = c [ 1 ] . concat ( a [ 1 ] ) : ( b . push ( a ) , c = a ) } ) , b } ( [ ] ) , b . dead _code && ( a = function ( c , d ) { return a . forEach ( function ( a ) { d ? "function" == a [ 0 ] || "defun" == a [ 0 ] ? c . push ( a ) : "var" == a [ 0 ] || "const" == a [ 0 ] ? ( b . no _warnings || G ( "Variables declared in unreachable code" ) , a [ 1 ] = F ( a [ 1 ] , function ( a ) { return a [ 1 ] && ! b . no _warnings && m ( [ "assign" , ! 0 , [ "name" , a [ 0 ] ] , a [ 1 ] ] ) , [ a [ 0 ] ] } ) , c . push ( a ) ) : b . no _warnings || m ( a ) : ( c . push ( a ) , B ( a [ 0 ] , [ "return" , "throw" , "break" , "continue" ] ) && ( d = ! 0 ) ) } ) , c } ( [ ] ) ) , b . make _seqs && ( a = function ( b , c ) { return a . forEach ( function ( a ) { c && "stat" == c [ 0 ] && "stat" == a [ 0 ] ? c [ 1 ] = [ "seq" , c [ 1 ] , a [ 1 ] ] : ( b . push ( a ) , c = a ) } ) , b . length >= 2 && "stat" == b [ b . length - 2 ] [ 0 ] && ( "return" == b [ b . length - 1 ] [ 0 ] || "throw" == b [ b . length - 1 ] [ 0 ] ) && b [ b . length - 1 ] [ 1 ] && b . splice ( b . length - 2 , 2 , [ b [ b . length - 1 ] [ 0 ] , [ "seq" , b [ b . length - 2 ] [ 1 ] , b [ b . length - 1 ] [ 1 ] ] ] ) , b } ( [ ] ) ) , a } function q ( a , b , c ) { return H ( a , function ( a , d ) { return d ? ( b = y ( b ) , m ( c ) , b || [ "block" ] ) : ( c = y ( c ) , m ( b ) , c || [ "block" ] ) } , function ( ) { return r ( a , b , c ) } ) } function r ( a , b , c ) { if ( a = y ( a ) , b = y ( b ) , c = y ( c ) , k ( b ) ? ( a = d ( a ) , b = c , c = null ) : k ( c ) ? c = null : function ( ) { var e = t ( a ) , f = d ( a ) , g = t ( f ) ; if ( g . length < e . length ) { var h = b ; b = c , c = h , a = f } } ( ) , k ( c ) && k ( b ) ) return [ "stat" , a ] ; var e = [ "if" , a , b , c ] ; return "if" == b [ 0 ] && k ( b [ 3 ] ) && k ( c ) ? e = g ( e , y ( [ "if" , [ "binary" , "&&" , a , b [ 1 ] ] , b [ 2 ] ] ) ) : "stat" == b [ 0 ] ? c ? "stat" == c [ 0 ] && ( e = g ( e , [ "stat" , f ( a , b [ 1 ] , c [ 1 ] ) ] ) ) : e = g ( e , [ "stat" , f ( a , b [ 1 ] ) ] ) : c && b [ 0 ] == c [ 0 ] && ( "return" == b [ 0 ] || "throw" == b [ 0 ] ) && b [ 1 ] && c [ 1 ] ? e = g ( e , [ b [ 0 ] , f ( a , b [ 1 ] , c [ 1 ] ) ] ) : c && i ( b ) ? ( e = [ [ "if" , a , b ] ] , "block" == c [ 0 ] ? c [ 1 ] && ( e = e . concat ( c [ 1 ] ) ) : e . push ( c ) , e = y ( [ "block" , e ] ) ) : b && i ( c ) && ( e = [ [ "if" , d ( a ) , c ] ] , "block" == b [ 0 ] ? b [ 1 ] && ( e = e . concat ( b [ 1 ] ) ) : e . push ( b ) , e = y ( [ "block" , e ] ) ) , e } function s ( a , b ) { return H ( a , function ( a , c ) { return c ? [ "for" , null , null , null , y ( b ) ] : ( m ( b ) , [ "block" ] ) } ) } b = w ( b , { make _seqs : ! 0 , dead _code : ! 0 , no _warnings : ! 1 , keep _comps : ! 0 } ) ; var u , v = c ( ) , y = v . walk ; return v . with _walkers ( { sub : function ( a , b ) { if ( "string" == b [ 0 ] ) { var c = b [ 1 ] ; if ( x ( c ) ) return [ "dot" , y ( a ) , c ] ; if ( /^[1-9][0-9]*$/ . test ( c ) || "0" === c ) return [ "sub" , y ( a ) , [ "num" , parseInt ( c , 10 ) ] ] } } , "if" : q , toplevel : function ( a ) { return [ "toplevel" , h ( this . scope , function ( ) { return p ( a ) } ) ] } , "switch" : function ( a , b ) { var c = b . length - 1 ; return [ "switch" , y ( a ) , F ( b , function ( a , b ) { var d = p ( a [ 1 ] ) ; if ( b == c && d . length > 0 ) { var e = d [ d . length - 1 ] ; "break" == e [ 0 ] && ! e [ 1 ] && d . pop ( ) } return [ a [ 0 ] ? y ( a [ 0 ] ) : null , d ] } ) ] } , "function" : o , defun : o , block : function ( a ) { return a ? l ( [ "block" , p ( a ) ] ) : void 0 } , binary : function ( a , b , c ) { return H ( [ "binary" , a , y ( b ) , y ( c ) ] , function ( a ) { return g ( y ( a ) , this ) } , function ( ) { return function ( ) { if ( "==" == a || "!=" == a ) { var d = y ( b ) , e = y ( c ) ; return d && "unary-prefix" == d [ 0 ] && "!" == d [ 1 ] && "num" == d [ 2 ] [ 0 ] ? b = [ "num" , + ! d [ 2 ] [ 1 ] ] : e && "unary-prefix" == e [ 0 ] && "!" == e [ 1 ] && "num" == e [ 2 ] [ 0 ] && ( c = [ "num" , + ! e [ 2 ] [ 1 ] ] ) , [ "binary" , a , b , c ] } } ( ) || this } ) } , conditional : function ( a , b , c ) { retur
2014-02-11 23:20:01 +01:00
var saveAs = saveAs || navigator . msSaveOrOpenBlob && navigator . msSaveOrOpenBlob . bind ( navigator ) || function ( a ) { "use strict" ; if ( ! /MSIE [1-9]\./ . test ( navigator . userAgent ) ) { var b = a . document , c = function ( ) { return a . URL || a . webkitURL || a } , d = a . URL || a . webkitURL || a , e = b . createElementNS ( "http://www.w3.org/1999/xhtml" , "a" ) , f = ! a . externalHost && "download" in e , g = a . webkitRequestFileSystem , h = a . requestFileSystem || g || a . mozRequestFileSystem , i = function ( b ) { ( a . setImmediate || a . setTimeout ) ( function ( ) { throw b } , 0 ) } , j = "application/octet-stream" , k = 0 , l = [ ] , m = function ( ) { for ( var a = l . length ; a -- ; ) { var b = l [ a ] ; "string" == typeof b ? d . revokeObjectURL ( b ) : b . remove ( ) } l . length = 0 } , n = function ( a , b , c ) { b = [ ] . concat ( b ) ; for ( var d = b . length ; d -- ; ) { var e = a [ "on" + b [ d ] ] ; if ( "function" == typeof e ) try { e . call ( a , c || a ) } catch ( f ) { i ( f ) } } } , o = function ( d , i ) { var m , o , p , q = this , r = d . type , s = ! 1 , t = function ( ) { var a = c ( ) . createObjectURL ( d ) ; return l . push ( a ) , a } , u = function ( ) { n ( q , "writestart progress write writeend" . split ( " " ) ) } , v = function ( ) { ( s || ! m ) && ( m = t ( d ) ) , o ? o . location . href = m : window . open ( m , "_blank" ) , q . readyState = q . DONE , u ( ) } , w = function ( a ) { return function ( ) { return q . readyState !== q . DONE ? a . apply ( this , arguments ) : void 0 } } , x = { create : ! 0 , exclusive : ! 1 } ; if ( q . readyState = q . INIT , i || ( i = "download" ) , f ) { m = t ( d ) , b = a . document , e = b . createElementNS ( "http://www.w3.org/1999/xhtml" , "a" ) , e . href = m , e . download = i ; var y = b . createEvent ( "MouseEvents" ) ; return y . initMouseEvent ( "click" , ! 0 , ! 1 , a , 0 , 0 , 0 , 0 , 0 , ! 1 , ! 1 , ! 1 , ! 1 , 0 , null ) , e . dispatchEvent ( y ) , q . readyState = q . DONE , void u ( ) } return a . chrome && r && r !== j && ( p = d . slice || d . webkitSlice , d = p . call ( d , 0 , d . size , j ) , s = ! 0 ) , g && "download" !== i && ( i += ".download" ) , ( r === j || g ) && ( o = a ) , h ? ( k += d . size , void h ( a . TEMPORARY , k , w ( function ( a ) { a . root . getDirectory ( "saved" , x , w ( function ( a ) { var b = function ( ) { a . getFile ( i , x , w ( function ( a ) { a . createWriter ( w ( function ( b ) { b . onwriteend = function ( b ) { o . location . href = a . toURL ( ) , l . push ( a ) , q . readyState = q . DONE , n ( q , "writeend" , b ) } , b . onerror = function ( ) { var a = b . error ; a . code !== a . ABORT _ERR && v ( ) } , "writestart progress write abort" . split ( " " ) . forEach ( function ( a ) { b [ "on" + a ] = q [ "on" + a ] } ) , b . write ( d ) , q . abort = function ( ) { b . abort ( ) , q . readyState = q . DONE } , q . readyState = q . WRITING } ) , v ) } ) , v ) } ; a . getFile ( i , { create : ! 1 } , w ( function ( a ) { a . remove ( ) , b ( ) } ) , w ( function ( a ) { a . code === a . NOT _FOUND _ERR ? b ( ) : v ( ) } ) ) } ) , v ) } ) , v ) ) : void v ( ) } , p = o . prototype , q = function ( a , b ) { return new o ( a , b ) } ; return p . abort = function ( ) { var a = this ; a . readyState = a . DONE , n ( a , "abort" ) } , p . readyState = p . INIT = 0 , p . WRITING = 1 , p . DONE = 2 , p . error = p . onwritestart = p . onprogress = p . onwrite = p . onabort = p . onerror = p . onwriteend = null , a . addEventListener ( "unload" , m , ! 1 ) , q } } ( "undefined" != typeof self && self || "undefined" != typeof window && window || this . content ) ; "undefined" != typeof module && ( module . exports = saveAs ) ; / * !
2014-02-13 10:12:26 +01:00
* Bootstrap v3 . 1.1 ( http : //getbootstrap.com)
2014-02-11 23:20:01 +01:00
* Copyright 2011 - 2014 Twitter , Inc .
* Licensed under MIT ( https : //github.com/twbs/bootstrap/blob/master/LICENSE)
* /
2014-03-17 04:46:00 +01:00
var _ _js = { "affix.js" : "/* ========================================================================\n * Bootstrap: affix.js v3.1.1\n * http://getbootstrap.com/javascript/#affix\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // AFFIX CLASS DEFINITION\n // ======================\n\n var Affix = function (element, options) {\n this.options = $.extend({}, Affix.DEFAULTS, options)\n this.$window = $(window)\n .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))\n .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))\n\n this.$element = $(element)\n this.affixed =\n this.unpin =\n this.pinnedOffset = null\n\n this.checkPosition()\n }\n\n Affix.RESET = 'affix affix-top affix-bottom'\n\n Affix.DEFAULTS = {\n offset: 0\n }\n\n Affix.prototype.getPinnedOffset = function () {\n if (this.pinnedOffset) return this.pinnedOffset\n this.$element.removeClass(Affix.RESET).addClass('affix')\n var scrollTop = this.$window.scrollTop()\n var position = this.$element.offset()\n return (this.pinnedOffset = position.top - scrollTop)\n }\n\n Affix.prototype.checkPositionWithEventLoop = function () {\n setTimeout($.proxy(this.checkPosition, this), 1)\n }\n\n Affix.prototype.checkPosition = function () {\n if (!this.$element.is(':visible')) return\n\n var scrollHeight = $(document).height()\n var scrollTop = this.$window.scrollTop()\n var position = this.$element.offset()\n var offset = this.options.offset\n var offsetTop = offset.top\n var offsetBottom = offset.bottom\n\n if (typeof offset != 'object') offsetBottom = offsetTop = offset\n if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)\n if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)\n\n var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :\n offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :\n offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false\n\n if (this.affixed === affix) return\n if (this.unpin != null) this.$element.css('top', '')\n\n var affixType = 'affix' + (affix ? '-' + affix : '')\n var e = $.Event(affixType + '.bs.affix')\n\n this.$element.trigger(e)\n\n if (e.isDefaultPrevented()) return\n\n this.affixed = affix\n this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null\n\n this.$element\n .removeClass(Affix.RESET)\n .addClass(affixType)\n .trigger($.Event(affixType.replace('affix', 'affixed')))\n\n if (affix == 'bottom') {\n this.$element.offset({ top: position.top })\n }\n }\n\n\n // AFFIX PLUGIN DEFINITION\n // =======================\n\n var old = $.fn.affix\n\n $.fn.affix = function (option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.affix')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n $.fn.affix.Constructor = Affix\n\n\n // AFFIX NO CONFLICT\n // =================\n\n $.fn.affix.noConflict = function () {\n $.fn.affix = old\n return this\n }\n\n\n // AFFIX DATA-API\n // ==============\n\n $(window).on('load', function () {\n $('[data-spy=\"affix\" ] ' ) . each ( function ( ) { \ n var $spy = $ ( this ) \ n var data = $spy . data ( ) \ n \ n data . offset = data . offset || { } \ n \ n if ( data . offsetBottom ) data . offset . bottom = data . offsetBottom \ n if ( data . offsetTop ) data . offset . top = data . offsetTop \ n \ n $spy . affix ( data ) \ n } ) \ n } ) \ n \
2014-02-11 23:20:01 +01:00
/ * !
2014-01-14 06:58:27 +01:00
* Bootstrap Customizer ( http : //getbootstrap.com/customize/)
2014-01-07 01:05:24 +01:00
* Copyright 2011 - 2014 Twitter , Inc .
2014-01-14 06:58:27 +01:00
*
2013-12-27 04:08:19 +01:00
* Licensed under the Creative Commons Attribution 3.0 Unported License . For
* details , see http : //creativecommons.org/licenses/by/3.0/.
2013-12-06 20:35:46 +01:00
* /
2014-02-13 17:59:03 +01:00
window . onload = function ( ) { function a ( a , b ) { throw $ ( '<div id="bsCustomizerAlert" class="bs-customizer-alert"><div class="container"><a href="#bsCustomizerAlert" data-dismiss="alert" class="close pull-right">×</a><p class="bs-customizer-alert-text"><span class="glyphicon glyphicon-warning-sign"></span>' + a + "</p>" + ( b . extract ? '<pre class="bs-customizer-alert-extract">' + b . extract . join ( "\n" ) + "</pre>" : "" ) + "</div></div>" ) . appendTo ( "body" ) . alert ( ) , b } function b ( a , b ) { var c = $ ( '<div class="bs-callout bs-callout-danger"><h4>Attention!</h4><p>' + a + "</p></div>" ) ; b ? c . appendTo ( ".bs-docs-container" ) : c . insertAfter ( ".bs-customize-download" ) } function c ( a ) { a = a . replace ( /[*+?^$.\[\]{}()|\\\/]/g , "\\$&" ) ; var b = location . search . match ( new RegExp ( "[?&]" + a + "=([^&]+)(&|$)" ) ) ; return b && decodeURIComponent ( b [ 1 ] . replace ( /\+/g , " " ) ) } function d ( b ) { var c = { description : "Bootstrap Customizer Config" , "public" : ! 0 , files : { "config.json" : { content : b } } } ; $ . ajax ( { url : "https://api.github.com/gists" , type : "POST" , dataType : "json" , data : JSON . stringify ( c ) } ) . success ( function ( a ) { var b = window . location . protocol + "//" + window . location . host ; history . replaceState ( ! 1 , document . title , b + window . location . pathname + "?id=" + a . id ) } ) . error ( function ( b ) { a ( "<strong>Ruh roh!</strong> Could not save gist file, configuration not saved." , b ) } ) } function e ( ) { var a = { } ; $ ( "#less-variables-section input" ) . each ( function ( ) { $ ( this ) . val ( ) && ( a [ $ ( this ) . prev ( ) . text ( ) ] = $ ( this ) . val ( ) ) } ) ; var b = { vars : a , css : $ ( "#less-section input:checked" ) . map ( function ( ) { return this . value } ) . toArray ( ) , js : $ ( "#plugin-section input:checked" ) . map ( function ( ) { return this . value } ) . toArray ( ) } ; if ( ! $ . isEmptyObject ( b . vars ) || b . css . length || b . js . length ) return b } function f ( ) { var b = c ( "id" ) ; b && $ . ajax ( { url : "https://api.github.com/gists/" + b , type : "GET" , dataType : "json" } ) . success ( function ( a ) { var b = JSON . parse ( a . files [ "config.json" ] . content ) ; if ( b . js && $ ( "#plugin-section input" ) . each ( function ( ) { $ ( this ) . prop ( "checked" , ~ $ . inArray ( this . value , b . js ) ) } ) , b . css && $ ( "#less-section input" ) . each ( function ( ) { $ ( this ) . prop ( "checked" , ~ $ . inArray ( this . value , b . css ) ) } ) , b . vars ) for ( var c in b . vars ) $ ( 'input[data-var="' + c + '"]' ) . val ( b . vars [ c ] ) } ) . error ( function ( b ) { a ( "Error fetching bootstrap config file" , b ) } ) } function g ( b , c , d , e , f ) { if ( ! b && ! c ) return a ( "<strong>Ruh roh!</strong> No Bootstrap files selected." , new Error ( "no Bootstrap" ) ) ; var g = new JSZip ; if ( b ) { var h = g . folder ( "css" ) ; for ( var i in b ) h . file ( i , b [ i ] ) } if ( c ) { var j = g . folder ( "js" ) ; for ( var k in c ) j . file ( k , c [ k ] ) } if ( d ) { var l = g . folder ( "fonts" ) ; for ( var m in d ) l . file ( m , d [ m ] , { base64 : ! 0 } ) } e && g . file ( "config.json" , e ) ; var n = g . generate ( { type : "blob" } ) ; f ( n ) } function h ( a ) { var b = "" ; for ( var c in a ) b += c + ": " + a [ c ] + ";\n" ; return b + "\n\n" } function i ( ) { var a = $ ( '#less-section [value="glyphicons.less"]:checked' ) ; return a . length ? _ _fonts : void 0 } function j ( a ) { for ( var b = /^@import \"(.*?)\";$/ , c = _ _less [ a ] . split ( "\n" ) , d = 0 , e = [ ] ; d < c . length ; d ++ ) { var f = b . exec ( c [ d ] ) ; f && e . push ( f [ 1 ] ) } return e } function k ( a , b , c ) { var d = _ _less [ a ] ; return $ . each ( j ( a ) , function ( a , e ) { var f = b [ e ] ; ( f || null == f ) && ( d += _ _less [ e ] ) , "variables.less" === e && c && ( d += h ( c ) ) } ) , d = d . replace ( /@import[^\n]*/gi , "" ) } function l ( b , c , d ) { new less . Parser ( { paths : [ "variables.less" , "mixins.less" ] , optimization : 0 , filename : c + ".css" } ) . parse ( b , function ( b , e ) { return b ? a ( "<strong>Ruh roh!</strong> Could not parse less files." , b ) : ( d [ c + ".css" ] = o + e . toCSS ( ) , void ( d [ c + ".min.css" ] = o + e . toCSS ( { compress : ! 0 } ) ) ) } ) } function m ( ) { var b = ! 1 , c = { } ; if ( $ ( "#less-section input" ) . each ( function ( ) { var a = $ ( this ) , d = a . is ( ":checked" ) ; c [ a . val ( ) ] = d , b = b || d } ) , ! b ) return ! 1 ; var d = { } , e = { } ; $ ( "#less-variables-section input" ) . each ( function ( ) { $ ( this ) . val ( ) && ( e [ $ ( this ) . prev ( ) . text ( ) ] = $ ( this ) . val ( ) ) } ) ; var f = k ( "bootstrap.less" , c , e ) , g = k ( "theme.less" , c , e ) ; try { l ( f , "bootstrap" , d ) , l ( g , "bootstrap-theme" , d ) } catch ( h ) { return a ( "<strong>Ruh roh!</strong> Could not parse less files." , h ) } return d } function n ( ) { var a = $ ( "#plugin-section input:checked" ) ; if ( ! a . length ) return ! 1 ; var b = a . map ( function ( ) { return _ _js [ this . value ] } ) . toArray ( ) . join ( "\n" ) ; return { "bootstrap.js" : b , "bootstrap.min.js" : o + uglify ( b ) } } var o = " / * ! \ n * Bootstrap v3 . 1.1 ( http : //getbootstrap.com)\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed u