seasons 0.9.3.beta7 → 0.9.3.beta8
Sign up to get free protection for your applications and to get access to all the features.
- data/seasons.gemspec +5 -2
- data/stylesheets/seasons/_tools.sass +3 -1
- data/stylesheets/seasons/tools/_color-schemer.sass +180 -0
- data/stylesheets/seasons/tools/_css3.sass +9 -4
- data/stylesheets/seasons/tools/_modular-scale.sass +4 -1
- data/templates/project/_config.sass +12 -4
- data/templates/project/sample-ad.html +48 -0
- data/templates/project/sample-ad.jpg +0 -0
- data/templates/project/style.sass +1 -0
- data/templates/project/toc.json +4 -0
- data/templates/project/treesaver-0.9.3b.js +121 -120
- metadata +5 -2
data/seasons.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{seasons}
|
5
|
-
s.version = "0.9.3.
|
5
|
+
s.version = "0.9.3.beta8"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5")
|
8
8
|
s.authors = ["Scott Kellum"]
|
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
"stylesheets/seasons/tools/_css3.sass",
|
20
20
|
"stylesheets/seasons/tools/_grid-tools.sass",
|
21
21
|
"stylesheets/seasons/tools/_modular-scale.sass",
|
22
|
+
"stylesheets/seasons/tools/_color-schemer.sass",
|
22
23
|
"stylesheets/seasons/tools/_reset.sass",
|
23
24
|
"templates/project/_chrome.scss",
|
24
25
|
"templates/project/_config.sass",
|
@@ -29,13 +30,15 @@ Gem::Specification.new do |s|
|
|
29
30
|
"templates/project/resources.html",
|
30
31
|
"templates/project/index.html",
|
31
32
|
"templates/project/article.html",
|
33
|
+
"templates/project/sample-ad.html",
|
32
34
|
"templates/project/img.jpg",
|
35
|
+
"templates/project/sample-ad.jpg",
|
33
36
|
"templates/project/manifest.rb"
|
34
37
|
]
|
35
38
|
s.homepage = %q{http://www.treesaver.net/}
|
36
39
|
s.require_paths = ["lib"]
|
37
40
|
s.rubyforge_project = %q{seasons}
|
38
|
-
s.rubygems_version = %q{0.9.3.
|
41
|
+
s.rubygems_version = %q{0.9.3.beta8}
|
39
42
|
s.summary = %q{The Compass variant of the Seasons framework to style Treesaver.}
|
40
43
|
s.add_dependency(%q<compass>, ["~> 0.11"])
|
41
44
|
end
|
@@ -0,0 +1,180 @@
|
|
1
|
+
// Define color schemes quickly
|
2
|
+
|
3
|
+
// Color schemes to choose from
|
4
|
+
// mono
|
5
|
+
// complement
|
6
|
+
// triad
|
7
|
+
// tetrad
|
8
|
+
// analogic
|
9
|
+
// accented-analogic
|
10
|
+
|
11
|
+
$color-location: primary !default
|
12
|
+
$base-color: #f00 !default
|
13
|
+
$color-scheme: mono !default
|
14
|
+
$hue-offset: 20 !default
|
15
|
+
$brightness-offset: 10% !default
|
16
|
+
$color-theory: rgb !default
|
17
|
+
$equalize: false !default
|
18
|
+
|
19
|
+
// Normalizer credit to Mason Wendell: https://github.com/canarymason/The-Coding-Designers-Survival-Kit/blob/master/sass/partials/lib/variables/_color_schemes.sass
|
20
|
+
@function equalize($color)
|
21
|
+
@return hsl(hue($color), 100%, 50%)
|
22
|
+
|
23
|
+
// Complement based on Claude Boutet's color wheel
|
24
|
+
@function boutet-complement($color)
|
25
|
+
$hue: round(hue($color)/ 10) // find and round hue
|
26
|
+
// Manually adjusted values until these can be mathmatically explained.
|
27
|
+
@if $hue == 0
|
28
|
+
@return adjust-hue(invert($color), -60) // Start with red
|
29
|
+
@if $hue == 1
|
30
|
+
@return adjust-hue(invert($color), -50)
|
31
|
+
@if $hue == 2
|
32
|
+
@return adjust-hue(invert($color), -40)
|
33
|
+
@if $hue == 3
|
34
|
+
@return adjust-hue(invert($color), -25)
|
35
|
+
@if $hue == 4
|
36
|
+
@return adjust-hue(invert($color), 0)
|
37
|
+
@if $hue == 5
|
38
|
+
@return adjust-hue(invert($color), 25)
|
39
|
+
@if $hue == 6
|
40
|
+
@return adjust-hue(invert($color), 38)
|
41
|
+
@if $hue == 7
|
42
|
+
@return adjust-hue(invert($color), 44)
|
43
|
+
@if $hue == 8
|
44
|
+
@return adjust-hue(invert($color), 52)
|
45
|
+
@if $hue == 9
|
46
|
+
@return adjust-hue(invert($color), 58)
|
47
|
+
@if $hue == 10
|
48
|
+
@return adjust-hue(invert($color), 59)
|
49
|
+
@if $hue == 11
|
50
|
+
@return adjust-hue(invert($color), 60)
|
51
|
+
@if $hue == 12
|
52
|
+
@return adjust-hue(invert($color), 60) // Green is halfway through the Boutet scale.
|
53
|
+
@if $hue == 13
|
54
|
+
@return adjust-hue(invert($color), 55)
|
55
|
+
@if $hue == 14
|
56
|
+
@return adjust-hue(invert($color), 50)
|
57
|
+
@if $hue == 15
|
58
|
+
@return adjust-hue(invert($color), 45)
|
59
|
+
@if $hue == 16
|
60
|
+
@return adjust-hue(invert($color), 40)
|
61
|
+
@if $hue == 17
|
62
|
+
@return adjust-hue(invert($color), 35)
|
63
|
+
@if $hue == 18
|
64
|
+
@return adjust-hue(invert($color), 30)
|
65
|
+
@if $hue == 19
|
66
|
+
@return adjust-hue(invert($color), 25)
|
67
|
+
@if $hue == 20
|
68
|
+
@return adjust-hue(invert($color), 20)
|
69
|
+
@if $hue == 21
|
70
|
+
@return adjust-hue(invert($color), 15)
|
71
|
+
@if $hue == 22
|
72
|
+
@return adjust-hue(invert($color), -5)
|
73
|
+
@if $hue == 23
|
74
|
+
@return adjust-hue(invert($color), -8)
|
75
|
+
@if $hue == 24
|
76
|
+
@return adjust-hue(invert($color), -17)
|
77
|
+
@if $hue == 25
|
78
|
+
@return adjust-hue(invert($color), -25)
|
79
|
+
@if $hue == 26
|
80
|
+
@return adjust-hue(invert($color), -30)
|
81
|
+
@if $hue == 27
|
82
|
+
@return adjust-hue(invert($color), -35)
|
83
|
+
@if $hue == 28
|
84
|
+
@return adjust-hue(invert($color), -40)
|
85
|
+
@if $hue == 29
|
86
|
+
@return adjust-hue(invert($color), -43)
|
87
|
+
@if $hue == 30
|
88
|
+
@return adjust-hue(invert($color), -46)
|
89
|
+
@if $hue == 31
|
90
|
+
@return adjust-hue(invert($color), -49)
|
91
|
+
@if $hue == 32
|
92
|
+
@return adjust-hue(invert($color), -52)
|
93
|
+
@if $hue == 33
|
94
|
+
@return adjust-hue(invert($color), -54)
|
95
|
+
@if $hue == 34
|
96
|
+
@return adjust-hue(invert($color), -57)
|
97
|
+
@if $hue == 35
|
98
|
+
@return adjust-hue(invert($color), -60)
|
99
|
+
|
100
|
+
// Add percentage of white to a color
|
101
|
+
@function tint($color, $percent)
|
102
|
+
@return mix(white, $color, $percent)
|
103
|
+
|
104
|
+
// Add percentage of black to a color
|
105
|
+
@function shade($color, $percent)
|
106
|
+
@return mix(black, $color, $percent)
|
107
|
+
|
108
|
+
@function color-schemer($color-location, $base-color, $color-scheme, $hue-offset)
|
109
|
+
// Primary, just return the base-color.
|
110
|
+
@if $equalize
|
111
|
+
$base-color: equalize($base-color)
|
112
|
+
@if $color-location == primary
|
113
|
+
@return $base-color
|
114
|
+
// Secondary colors
|
115
|
+
@if $color-location == secondary
|
116
|
+
@if $color-scheme == mono
|
117
|
+
@return lighten($base-color, $brightness-offset)
|
118
|
+
@if $color-scheme == complement
|
119
|
+
@if $color-theory == boutet
|
120
|
+
@return boutet-complement($base-color)
|
121
|
+
@return complement($base-color)
|
122
|
+
@if $color-scheme == triad
|
123
|
+
@if $color-theory == boutet
|
124
|
+
@return adjust-hue(boutet-complement($base-color), $hue-offset)
|
125
|
+
@return adjust-hue(complement($base-color), $hue-offset)
|
126
|
+
@if $color-scheme == tetrad
|
127
|
+
@return adjust-hue($base-color, $hue-offset)
|
128
|
+
@if $color-scheme == analogic
|
129
|
+
@return adjust-hue($base-color, $hue-offset)
|
130
|
+
@if $color-scheme == accented-analogic
|
131
|
+
@return adjust-hue($base-color, $hue-offset)
|
132
|
+
@warn "Oops! You didn’t properly define $color-scheme (complement, triad...)"
|
133
|
+
// Tertiary colors
|
134
|
+
@if $color-location == tertiary
|
135
|
+
@if $color-scheme == mono
|
136
|
+
@return lighten($base-color, $brightness-offset * 2)
|
137
|
+
@if $color-scheme == complement
|
138
|
+
@return lighten($base-color, $brightness-offset)
|
139
|
+
@if $color-scheme == triad
|
140
|
+
@if $color-theory == boutet
|
141
|
+
@return adjust-hue(boutet-complement($base-color), -$hue-offset)
|
142
|
+
@return adjust-hue(complement($base-color), -$hue-offset)
|
143
|
+
@if $color-scheme == tetrad
|
144
|
+
@if $color-theory == boutet
|
145
|
+
@return boutet-complement($base-color)
|
146
|
+
@return complement($base-color)
|
147
|
+
@if $color-scheme == analogic
|
148
|
+
@return adjust-hue($base-color, -$hue-offset)
|
149
|
+
@if $color-scheme == accented-analogic
|
150
|
+
@return adjust-hue($base-color, -$hue-offset)
|
151
|
+
@warn "Oops! You didn’t properly define $color-scheme (complement, triad...)"
|
152
|
+
// Quadrary colors
|
153
|
+
@if $color-location == quadrary
|
154
|
+
@if $color-scheme == mono
|
155
|
+
@return darken($base-color, $brightness-offset)
|
156
|
+
@if $color-scheme == complement
|
157
|
+
@return darken($base-color, $brightness-offset)
|
158
|
+
@if $color-scheme == triad
|
159
|
+
@return darken($base-color, $brightness-offset)
|
160
|
+
@if $color-scheme == tetrad
|
161
|
+
@if $color-theory == boutet
|
162
|
+
@return adjust-hue(boutet-complement($base-color), $hue-offset)
|
163
|
+
@return adjust-hue(complement($base-color), $hue-offset)
|
164
|
+
@if $color-scheme == analogic
|
165
|
+
@return darken($base-color, $brightness-offset)
|
166
|
+
@if $color-scheme == accented-analogic
|
167
|
+
@if $color-theory == boutet
|
168
|
+
@return boutet-complement($base-color)
|
169
|
+
@return complement($base-color)
|
170
|
+
@warn "Oops! You didn’t properly define $color-scheme (complement, triad...)"
|
171
|
+
@warn "Oops! You didn’t properly define $color-location (primary, secondary...)"
|
172
|
+
|
173
|
+
// Write your basic color scheme
|
174
|
+
$primary: color-schemer(primary) !default
|
175
|
+
$secondary: color-schemer(secondary) !default
|
176
|
+
$tertiary: color-schemer(tertiary) !default
|
177
|
+
$quadrary: color-schemer(quadrary) !default
|
178
|
+
|
179
|
+
// Tell other files that this is loaded.
|
180
|
+
$color-schemer-loaded: true
|
@@ -1,10 +1,15 @@
|
|
1
1
|
// VENDOR PREFIXR
|
2
|
-
$prefixes: -webkit- -moz- -ms- -o-
|
2
|
+
$prefixes: -webkit- -moz- -ms- -o- !default
|
3
3
|
|
4
|
-
=prefix($
|
4
|
+
=prefix($property, $value, $prefixes)
|
5
5
|
@each $prefix in $prefixes
|
6
|
-
#{$prefix}#{$
|
7
|
-
#{$
|
6
|
+
#{$prefix}#{$property}: $value
|
7
|
+
#{$property}: $value
|
8
|
+
|
9
|
+
=prefix-value($property, $value, $prefixes)
|
10
|
+
@each $prefix in $prefixes
|
11
|
+
#{$property}: #{$prefix}$value
|
12
|
+
#{$property}: $value
|
8
13
|
|
9
14
|
|
10
15
|
// STANDARDIZE VENDOR-SPECIFIC PROPERTIES
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
// Ratios
|
5
5
|
$golden: 1.618
|
6
|
-
$gold: $golden
|
6
|
+
$gold: $golden
|
7
7
|
$octave: (2 / 1)
|
8
8
|
$major-seventh: (15 / 8)
|
9
9
|
$minor-seventh: (16 / 9)
|
@@ -308,3 +308,6 @@ $class-slug: ms !default
|
|
308
308
|
@if nth($list, $i) <= $start
|
309
309
|
$trimmed: append($trimmed, nth($list, $i))
|
310
310
|
@return $trimmed
|
311
|
+
|
312
|
+
// Other libraries can easily query if this function is avalible
|
313
|
+
$modular-scale-loaded: true
|
@@ -28,12 +28,20 @@ $bottom: ms(3) // default bottom margin (for text and containers)
|
|
28
28
|
$columns: 12 // # of columns you want to calculate for
|
29
29
|
|
30
30
|
// COLORS
|
31
|
-
|
32
|
-
$
|
33
|
-
$
|
31
|
+
// calculated by a built in color schemer, write your own color schemes as you wish.
|
32
|
+
$base-color: #237ADE // base or primary color
|
33
|
+
$color-scheme: analogic // complement, triad, tetrad, analogic or accented-analogic
|
34
|
+
$color-angle: 30 // color offset ammount.
|
35
|
+
|
36
|
+
// Output of color scemer, set to your own values if you want.
|
37
|
+
$primary: color-schemer(primary)
|
38
|
+
$secondary: color-schemer(secondary)
|
39
|
+
$tertiary: color-schemer(tertiary)
|
40
|
+
$quadrary: color-schemer(quadrary)
|
41
|
+
|
34
42
|
$text: #333
|
35
43
|
$page: #fff
|
36
|
-
$body: #
|
44
|
+
$body: #666
|
37
45
|
|
38
46
|
// FONTS
|
39
47
|
$font: serif
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html class="no-treesaver no-js">
|
3
|
+
<head>
|
4
|
+
<title>Ad</title>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<meta name="viewport" content="width = device-width, height = device-height, maximum-scale=1.0, minimum-scale=1.0" />
|
7
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
8
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<article data-grids="ad">
|
12
|
+
<figure class="required">
|
13
|
+
<div data-sizes="ad" id="ad-id">
|
14
|
+
<style>
|
15
|
+
/* Write inline styles here */
|
16
|
+
#ad-id {
|
17
|
+
/* Most ads will have the folowing: */
|
18
|
+
position: absolute;
|
19
|
+
top: 0;
|
20
|
+
bottom: 0;
|
21
|
+
left: 0;
|
22
|
+
right: 0;
|
23
|
+
|
24
|
+
/* Everything else is fair game. */
|
25
|
+
background: #677E48 url('images/sample-ad.jpg');
|
26
|
+
background-repeat: no-repeat;
|
27
|
+
background-position: center center;
|
28
|
+
-webkit-background-size: cover;
|
29
|
+
-moz-background-size: cover;
|
30
|
+
-o-background-size: cover;
|
31
|
+
background-size: cover;
|
32
|
+
}
|
33
|
+
|
34
|
+
/* ALWAYS include a unique ad-id when styling to reduce conflicts with other styles. */
|
35
|
+
#ad-id h1 {
|
36
|
+
margin: 0;
|
37
|
+
padding: 20px;
|
38
|
+
color: #fff;
|
39
|
+
font-size: 100px;
|
40
|
+
line-height: 1em;
|
41
|
+
font-family: Helvetica, sans-serif;
|
42
|
+
}
|
43
|
+
</style>
|
44
|
+
<h1>AD<span style="display: block;">space</span></h1>
|
45
|
+
</div>
|
46
|
+
</article>
|
47
|
+
</body>
|
48
|
+
</html>
|
Binary file
|
data/templates/project/toc.json
CHANGED
@@ -1,125 +1,126 @@
|
|
1
|
-
var Mustache=function(){var j=function(){};j.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR"
|
2
|
-
var b=this;return a.replace(RegExp(this.otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+this.ctag,"g"),function(a,c,e){if(!b.pragmas_implemented[c])throw{message:"This implementation of mustache doesn't understand the '"+c+"' pragma"};b.pragmas[c]={};e&&(a=e.split("="),b.pragmas[c][a[0]]=a[1]);return""})},render_partial:function(a,b,d){a=this.trim(a);if(!d||d[a]===void 0)throw{message:"unknown_partial '"+a+"'"};return typeof b[a]!="object"?this.render(d[a],b,d
|
3
|
-
b,d){if(!this.includes("#",a)&&!this.includes("^",a))return a;var c=this;return a.replace(RegExp(this.otag+"(\\^|\\#)\\s*(.+)\\s*"+this.ctag+"\n*([\\s\\S]+?)"+this.otag+"\\/\\s*\\2\\s*"+this.ctag+"\\s*","mg"),function(a,g,i,f){a=c.find(i,b);if(g=="^")return!a||c.is_array(a)&&a.length===0?c.render(f,b,d
|
4
|
-
f,function(a){return c.render(a,b,d
|
5
|
-
f,this),c||this.send(a[h]);if(c)return a.join("\n")},set_delimiters:function(a){a=a.split(" ");this.otag=this.escape_regex(a[0]);this.ctag=this.escape_regex(a[1])},escape_regex:function(a){if(!arguments.callee.sRE)arguments.callee.sRE=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","g");return a.replace(arguments.callee.sRE,"\\$1")},find:function(a,b){var a=this.trim(a),d;b[a]
|
6
|
-
return typeof d==="function"?d.apply(b):d!==void 0?d:""},includes:function(a,b){return b.indexOf(this.otag+a)!=-1},escape:function(a){return String(a===null?"":a).replace(/&(?!\w+;)|["'<>\\]/g,function(a){switch(a){case "&":return"&";case "\\":return"\\\\";case '"':return""";case "'":return"'";case "<":return"<";case ">":return">";default:return a}})},create_context:function(a){if(this.is_object(a))return a;else{var b=".";if(this.pragmas["IMPLICIT-ITERATOR"])b=
|
7
|
-
var d={};d[b]=a;return d}},is_object:function(a){return a&&typeof a=="object"},is_array:function(a){return Object.prototype.toString.call(a)==="[object Array]"},trim:function(a){return a.replace(/^\s*|\s*$/g,"")},map:function(a,b){if(typeof a.map=="function")return a.map(b);else{for(var d=[],c=a.length,e=0;e<c;e++)d.push(b(a[e]));return d}}};return{name:"mustache.js",version:"0.3.1-dev",to_html:function(a,b,d,c){var e=new j;if(c)e.send=c;e.render(a,b,d);
|
8
|
-
(
|
9
|
-
|
10
|
-
case "msie":return"ms";case "opera":return"
|
11
|
-
|
12
|
-
|
13
|
-
var
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
function
|
20
|
-
function
|
21
|
-
|
22
|
-
|
23
|
-
function
|
24
|
-
|
25
|
-
|
26
|
-
x.
|
27
|
-
x.
|
28
|
-
|
29
|
-
function
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
function
|
34
|
-
|
35
|
-
|
36
|
-
function
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
function
|
42
|
-
function
|
43
|
-
function
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
function
|
49
|
-
function
|
50
|
-
0;
|
51
|
-
|
52
|
-
|
53
|
-
(
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
function
|
65
|
-
function
|
66
|
-
function
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
function
|
80
|
-
function
|
81
|
-
function Ad(
|
82
|
-
function
|
83
|
-
function
|
84
|
-
function
|
85
|
-
function
|
86
|
-
function
|
87
|
-
|
88
|
-
|
89
|
-
(
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
function
|
105
|
-
function
|
106
|
-
|
107
|
-
|
108
|
-
function
|
109
|
-
function
|
110
|
-
function se(a){var b=
|
111
|
-
function
|
112
|
-
|
113
|
-
function
|
114
|
-
function
|
115
|
-
|
1
|
+
var Mustache=function(){var j=function(){};j.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":true},context:{},render:function(a,b,d,c){if(!c)this.context=b,this.buffer=[];if(!this.includes("",a))if(c)return a;else{this.send(a);return}a=this.render_pragmas(a);a=this.render_section(a,b,d);if(c)return this.render_tags(a,b,d,c);this.render_tags(a,b,d,c)},send:function(a){a!==""&&this.buffer.push(a)},render_pragmas:function(a){if(!this.includes("%",a))return a;
|
2
|
+
var b=this;return a.replace(RegExp(this.otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+this.ctag,"g"),function(a,c,e){if(!b.pragmas_implemented[c])throw{message:"This implementation of mustache doesn't understand the '"+c+"' pragma"};b.pragmas[c]={};e&&(a=e.split("="),b.pragmas[c][a[0]]=a[1]);return""})},render_partial:function(a,b,d){a=this.trim(a);if(!d||d[a]===void 0)throw{message:"unknown_partial '"+a+"'"};return typeof b[a]!="object"?this.render(d[a],b,d,true):this.render(d[a],b[a],d,true)},render_section:function(a,
|
3
|
+
b,d){if(!this.includes("#",a)&&!this.includes("^",a))return a;var c=this;return a.replace(RegExp(this.otag+"(\\^|\\#)\\s*(.+)\\s*"+this.ctag+"\n*([\\s\\S]+?)"+this.otag+"\\/\\s*\\2\\s*"+this.ctag+"\\s*","mg"),function(a,g,i,f){a=c.find(i,b);if(g=="^")return!a||c.is_array(a)&&a.length===0?c.render(f,b,d,true):"";else if(g=="#")return c.is_array(a)?c.map(a,function(a){return c.render(f,c.create_context(a),d,true)}).join(""):c.is_object(a)?c.render(f,c.create_context(a),d,true):typeof a==="function"?
|
4
|
+
a.call(b,f,function(a){return c.render(a,b,d,true)}):a?c.render(f,b,d,true):""})},render_tags:function(a,b,d,c){for(var e=this,g=function(){return RegExp(e.otag+"(=|!|>|\\{|%|\\$)?([^\\/#\\^]+?)\\1?"+e.ctag+"+","g")},i=g(),f=function(a,c,f){switch(c){case "!":return"";case "=":return e.set_delimiters(f),i=g(),"";case ">":return e.render_partial(f,b,d);case "{":return e.find(f,b);case "$":return encodeURIComponent(e.find(f,b));default:return e.escape(e.find(f,b))}},a=a.split("\n"),h=0;h<a.length;h++)a[h]=
|
5
|
+
a[h].replace(i,f,this),c||this.send(a[h]);if(c)return a.join("\n")},set_delimiters:function(a){a=a.split(" ");this.otag=this.escape_regex(a[0]);this.ctag=this.escape_regex(a[1])},escape_regex:function(a){if(!arguments.callee.sRE)arguments.callee.sRE=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","g");return a.replace(arguments.callee.sRE,"\\$1")},find:function(a,b){var a=this.trim(a),d;b[a]===false||b[a]===0||b[a]?d=b[a]:(this.context[a]===false||this.context[a]===0||this.context[a])&&
|
6
|
+
(d=this.context[a]);return typeof d==="function"?d.apply(b):d!==void 0?d:""},includes:function(a,b){return b.indexOf(this.otag+a)!=-1},escape:function(a){return String(a===null?"":a).replace(/&(?!\w+;)|["'<>\\]/g,function(a){switch(a){case "&":return"&";case "\\":return"\\\\";case '"':return""";case "'":return"'";case "<":return"<";case ">":return">";default:return a}})},create_context:function(a){if(this.is_object(a))return a;else{var b=".";if(this.pragmas["IMPLICIT-ITERATOR"])b=
|
7
|
+
this.pragmas["IMPLICIT-ITERATOR"].iterator;var d={};d[b]=a;return d}},is_object:function(a){return a&&typeof a=="object"},is_array:function(a){return Object.prototype.toString.call(a)==="[object Array]"},trim:function(a){return a.replace(/^\s*|\s*$/g,"")},map:function(a,b){if(typeof a.map=="function")return a.map(b);else{for(var d=[],c=a.length,e=0;e<c;e++)d.push(b(a[e]));return d}}};return{name:"mustache.js",version:"0.3.1-dev",to_html:function(a,b,d,c){var e=new j;if(c)e.send=c;e.render(a,b,d);
|
8
|
+
if(!c)return e.buffer.join("\n")}}}();
|
9
|
+
(function(){'use strict';var f=void 0,h=true,i=null,k=false,p;window.Dc=h;var aa=this,ba=Date.now||function(){return+new Date};function q(a,b){var c=a.split("."),d=aa;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&b!==f?d[e]=b:d=d[e]?d[e]:d[e]={}};var ca={},r,da,fa,ga;if(k in Array)Array.isArray=function(a){return Object.prototype.toString.apply(a)==="[object Array]"};function ha(a){return Array.prototype.slice.call(a,0)}function ia(a,b){var c=a.slice(b+1||a.length);a.length=b<0?a.length+b:b;a.push.apply(a,c)};q("treesaver.VERSION","0.9.2-313-g6ca07e4");var ja,ka,la=window.navigator.userAgent.toLowerCase(),ma=document.compatMode!=="BackCompat"&&"XMLHttpRequest"in window&&"addEventListener"in document&&"getComputedStyle"in window&&"querySelectorAll"in document&&"localStorage"in window&&"JSON"in window,t=!!window.TS_WITHIN_NATIVE_IOS_APP,oa=t||na==="android"||/mobile/.test(la),pa=window.screen.width<=600,qa=t?"safari":/webkit/.test(la)?/chrome|safari/.test(la)?/(chrome|safari)/.exec(la)[0]:"webkit":/opera/.test(la)?"opera":/msie/.test(la)?"msie":!/compatible/.test(la)&&
|
10
|
+
/mozilla/.test(la)?"mozilla":"unknown",na=(/(android|ipad|iphone|ipod|win|mac|linux)/.exec(window.navigator.platform?window.navigator.platform.toLowerCase():/android/.test(la)?"android":"unknown")||["unknown"])[0],ra=function(){switch(qa){case "chrome":case "safari":case "webkit":return"-webkit-";case "mozilla":return"-moz-";case "msie":return"-ms-";case "opera":return"-o-";default:return""}}(),sa=function(){switch(qa){case "chrome":case "safari":case "webkit":return"Webkit";case "mozilla":return"Moz";
|
11
|
+
case "msie":return"ms";case "opera":return"O";default:return""}}();function ta(a,b,c){var d=document.documentElement.style,b=b&&sa?sa+a[0].toUpperCase()+a.substr(1):k;return!c&&typeof d[a]!=="undefined"||!!b&&typeof d[b]!=="undefined"}
|
12
|
+
var va=t||"orientation"in window,wa=t||"createTouch"in document||/android/.test(la),xa=!t&&function(){if(window.navigator.plugins&&window.navigator.plugins.length)return!!window.navigator.plugins["Shockwave Flash"];else if("ActiveXObject"in window)try{return!!new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(a){}return k}(),ya="CSSFontFaceRule"in window,za="getContext"in document.createElement("canvas");
|
13
|
+
if("createElementNS"in document)var Aa="createElementNS"in document&&"createSVGRect"in document.createElementNS("http://www.w3.org/2000/svg","svg"),Ba=Aa&&/SVG/.test(document.createElementNS("http://www.w3.org/2000/svg","animate").toString()),Ca=Aa&&/SVG/.test(document.createElementNS("http://www.w3.org/2000/svg","clipPath").toString());var Da,Ea=document.createElement("div");Ea.innerHTML="<svg/>";Da=(Ea.firstChild&&Ea.firstChild.namespaceURI)=="http://www.w3.org/2000/svg";
|
14
|
+
var Fa="canPlayType"in document.createElement("video"),Ga="localStorage"in window,Ha=!t&&"applicationCache"in window,Ia=t||window.navigator.standalone,Ja=t||ta("transformProperty")||ta("transform",h,h),Ka;
|
15
|
+
if(!(Ka=t)){var La=ta("perspectiveProperty")||ta("perspective",h,h);if(La&&"WebkitPerspective"in document.documentElement.style&&qa!=="safari"){var Ma=document.createElement("style"),Na=document.createElement("div"),Oa="@media (perspective)",Pa;Oa+=",("+ra+"perspective)";Ma.textContent=Oa+"{#ts-test {height:3px}}";Na.setAttribute("id","ts-test");document.documentElement.appendChild(Ma);document.documentElement.appendChild(Na);Pa=Na.offsetHeight===3;document.documentElement.removeChild(Ma);document.documentElement.removeChild(Na);
|
16
|
+
La=Pa}Ka=La}var Qa=Ka,Sa=t||ta("transitionProperty",h);function v(a){return a?"":"no-"}var Ta=k;
|
17
|
+
function Ua(){ja||(ja=[],ja.push("js",v(za)+"canvas",v(Ga)+"localstorage",v(Fa)+"video",v(Ha)+"applicationcache",v(ya)+"fontface",v(wa)+"touch",v(Ja)+"csstransforms",v(Qa)+"csstransforms3d",v(Sa)+"csstransitions",v(Aa)+"svg",v(Da)+"inlinesvg",v(Ba)+"smil",v(Ca)+"svgclippaths",v(ma)+"treesaver",v(xa)+"flash",v(va)+"orientation",v(Ia)+"fullscreen",v(oa)+"mobile",v(pa)+"smallscreen",v(x.oc())+"cached",v(t)+"nativeapp","browser-"+qa,"os-"+na));ka=[v(!x.eb())+"offline"];va&&ka.push("orientation-"+(window.orientation?
|
18
|
+
"horizontal":"vertical"));var a=document.documentElement.className;Ta||(Ta=h,a=a?a.replace(/no-js|no-treesaver/g,""):"",a+=" "+ja.join(" "));Va.lastIndex=0;a=a.replace(Va,"");a+=" "+ka.join(" ");document.documentElement.className=a.split(/\s+/).join(" ")}var Wa=["offline","orientation-vertical","orientation-horizontal"],Va=function(){var a=Wa.map(function(a){return"((no-)?"+a+")"});return RegExp(a.join("|"),"g")}();
|
19
|
+
function Xa(a,b){return!a.length?h:a.every(function(a){var d=a.substr(0,3)==="no-",a=d?a.substr(3):a,e=ja.concat(b?ka:[]);return d?e.indexOf(a)===-1:e.indexOf(a)!==-1?h:!b&&Wa.indexOf(a)!==-1?h:k})};ba();var Ya=[],Za={},$a=i,ab=-1,bb=-1,cb=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,17)},db=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||window.clearTimeout;
|
20
|
+
function eb(){var a=ba();Ya.forEach(function(b,c){if(ab!==-1&&!b.Rb&&(!$a||b.name&&$a.indexOf(b.name)!==-1)&&!(a-b.fb<=b.lc)){b.fb=a;b.rb-=1;if(b.rb<=0&&(!b.Fb||b.rb<0))if(ia(Ya,c),delete Za[b.name],b.Fb)return;b.hc.apply(b.pc,b.cc)}});ab=-1;Ya.length&&ab===-1&&(ab=cb.call(window,eb,document.body))}
|
21
|
+
function fb(a,b,c,d,e,g,j){var u=ba(),m=g?Za[g]:i;g&&g in Za?m=Za[g]:(m={hc:a,name:g,pc:j,fb:e?-Infinity:u},Ya.push(m),g&&(Za[g]=m));m.cc=d||[];m.rb=c;m.lc=b;m.Fb=e;m.Rb=k;ab===-1&&(ab=cb.call(window,eb,document.body))}function gb(a,b,c,d,e){fb(a,b,1,c,k,d,e)}function hb(a,b,c){fb(a,0,1,[],k,b,c)}function ib(a){$a=a;bb!==-1&&window.clearTimeout(bb)}function jb(){$a=i;bb!==-1&&(window.clearTimeout(bb),bb=-1)}function y(a){delete Za[a];Ya.forEach(function(b,c){if(b.name===a)ia(Ya,c),b.Rb=h})};if("Node"in window&&Node.prototype&&!("contains"in Node.prototype))Node.prototype.contains=function(a){return!!(this.compareDocumentPosition(a)&16)};
|
22
|
+
if("classList"in document.documentElement)var z=function(a,b){b.split(/\s+/).forEach(function(b){a.classList.add(b)})},mb=function(a,b){return a.classList.remove(b)},B=function(a,b){return a.classList.contains(b)},nb=function(a){return ha(a.classList)};else z=function(a,b){a.className?B(a,b)||(a.className+=" "+b):a.className=b},mb=function(a,b){a.className=a.className.replace(RegExp("(^|\\s)"+b+"(\\s|$)"),"$2")},B=function(a,b){return!(!a.className||!RegExp("(^|\\s)"+b+"(\\s|$)").test(a.className))},
|
23
|
+
nb=function(a){return!a.className?[]:a.className.split(/\s+/)};function D(a,b){b||(b=document);return ha(b.querySelectorAll(a))}function ob(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function pb(a){if("outerHTML"in a)return a.outerHTML;var a=a.cloneNode(h),b;qb.appendChild(a);b=qb.innerHTML;qb.removeChild(a);return b}function rb(a){qb.innerHTML=a;a=qb.firstChild;ob(qb);return!a||a.nodeType!==1?i:a}
|
24
|
+
function sb(a,b){for(var c=a,d=b.toUpperCase();(c=c.parentNode)!==i&&c.nodeType===1;)if(c.nodeName===d)return c;return i}var tb=[];function ub(a){tb.push(a);a.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=");var a=vb,b=[];Za.clearImgCache||fb(a,3E3,1,b,h,"clearImgCache",f)}function vb(){tb=[]}var qb=document.createElement("div");qb.style.display="none";function E(a,b,c){var d=document.createEvent("UIEvents"),e;d.initEvent(b,k,h);if(c)for(e in c)d[e]=c[e];a.dispatchEvent(d)}function wb(a,b,c){a.addEventListener(b,c,k)}function xb(a,b,c){a.removeEventListener(b,c,k)}q("treesaver.addListener",wb);q("treesaver.removeListener",xb);function yb(a,b,c){c=c?window.localStorage:window.sessionStorage;c.removeItem(a);try{c.setItem(a,window.JSON.stringify(b))}catch(d){}}function zb(a){return(a=window.sessionStorage.getItem(a)||window.localStorage.getItem(a))?window.JSON.parse(a):i};var Ab,Bb,Cb,Db="pushState"in window.history;function Eb(){var a=document.location.href.indexOf("#");return a===-1?"":document.location.href.substr(a+1)}if(document.location.hash){var Fb=Eb();Fb[0]==="-"&&Fb.length>=2&&document.location.replace(Fb.substr(1))}Bb=function(a,b,c){window.history.pushState(a,b,c)};Ab=function(a,b,c){window.history.replaceState(a,b,c)};
|
25
|
+
if(!Db){Bb=function(a,b,c){Gb(a,b,c,k)};Ab=function(a,b,c){Gb(a,b,c,h)};var Gb=function(a,b,c,d){var e="-"+window.escape(c);yb("history:"+e,{state:a,title:b});c===document.location.pathname&&(e="");Cb=e;d?document.location.replace("#"+e):document.location.hash="#"+e};window.onhashchange=function(){var a=Eb();a!==Cb&&(a=(Cb=a)?zb("history:"+a):{},E(window,"popstate",{state:a?a.state:i}))}};var x={$b:1E4,Eb:{bc:"treesaver.online",ac:"treesaver.offline"},Yb:["offline","online"],Xb:"uncached,idle,checking,downloading,updateready,obsolete".split(","),Ha:k};x.load=function(){if(!x.Ha)x.Ha=h,x.Yb.forEach(function(a){wb(document,a,x)}),Ha&&x.gb&&x.Xb.forEach(function(a){wb(window.applicationCache,a,x)})};x.Ac=function(){if(x.Ha)x.Ha=k,x.Yb.forEach(function(a){xb(window,a,x)}),Ha&&x.gb&&x.Xb.forEach(function(a){xb(window.applicationCache,a,x)})};
|
26
|
+
x.Mb="onLine"in window.navigator?window.navigator.onLine:h;x.eb=function(){return x.Mb};x.Ub=function(a){x.Mb=a;Ua();E(window,a?x.Eb.bc:x.Eb.ac)};x.gb=Ha&&!!window.applicationCache.status;x.oc=function(){return x.gb};x.handleEvent=function(a){switch(a.type){case "online":x.Ub(h);break;case "offline":x.Ub(k);break;case "updateready":window.applicationCache.swapCache()}};x.tc=/^https?:\/\//i;x.oa=function(a){if(a&&a[0]==="/"||x.tc.test(a))return a;var b=document.createElement("a");b.href=a;return b.href};
|
27
|
+
x.get=function(a,b,c){var d={M:new XMLHttpRequest,url:a,yb:b};gb(function(){x.uc(d)},c||x.$b,[],x.Kb(d));d.M.onreadystatechange=x.gc(d);try{d.M.open("GET",d.url,h),d.M.send(i)}catch(e){x.pb(d)}};x.Kb=function(a){return"fetch:"+a.url};x.gc=function(a){return function(){a.M.readyState===4&&(a.M.status===0||a.M.status===200||a.M.status===304?(a.yb(a.M.responseText,a.url),x.Bb(a)):x.pb(a))}};x.Bb=function(a){y(x.Kb(a));a.M.onreadystatechange=i};x.pb=function(a){a.yb(i,a.url);x.Bb(a)};
|
28
|
+
x.uc=function(a){a.M.abort();x.pb(a)};var Hb,Ib,Jb,Kb=/<body>\s*([\s\S]+?)\s*<\/body>/i;function Lb(a){return(a=Kb.exec(a))&&a[1]?a[1]:i}function Mb(a){Jb=document.createElement("div");if(a&&(a=Lb(a))){var b=document.createElement("div");b.style.display="none";b.innerHTML=a;ha(b.childNodes).forEach(function(a){/^div$/i.test(a.nodeName)&&Jb.appendChild(a)});ob(b)}Nb()}function Nb(){Hb=Ob;var a=Ib.slice(0);Ib=[];a.forEach(function(a){a()})}function Pb(a){return Jb?D("."+a,Jb):[]}var Ob=2;var Qb=document.createElement("style");Qb.setAttribute("type","text/css");D("head").length&&(D("head")[0].appendChild(Qb),Qb=document.styleSheets[document.styleSheets.length-1],Qb.insertRule(".offscreen{position:absolute;top:-200%;right:-200%;visibility:hidden;}",0),Qb.insertRule(".viewer .grid{top:50%;left:50%;margin:0}",0));var Rb=/^-?\d+(?:px)?$/i;function Sb(a,b){if(!a)return k;var c=a.m||a.m===0?a.m:a.b;return b.e>=(a.K||a.K===0?a.K:a.e)&&b.b>=c&&b.e<=a.Ia&&b.b<=a.V}function F(a){return a&&Rb.test(a)?parseFloat(a)||0:i}function G(a){return a&&a.offsetHeight||0}function Tb(a){return a&&a.offsetWidth||0}function K(a,b,c){a.style[b]=c+"px";return c}function Ub(a,b){"transformProperty"in a.style?a.style.transformProperty=b:a.style[sa+"Transform"]=b}function Vb(a,b,c){Ub(a,"translate("+b+"px,"+c+"px)")}
|
29
|
+
Qa&&(Vb=function(a,b,c){Ub(a,"translate3d("+b+"px,"+c+"px,0)")});function Yb(a,b){return Math.ceil(a)+b-a%b}
|
30
|
+
function L(a){if(a){var b=document.defaultView.getComputedStyle(a,i);a.getAttribute("style");this.display=b.display;this.position=b.position;this.marginTop=F(b.marginTop)||0;this.marginBottom=F(b.marginBottom)||0;this.marginLeft=F(b.marginLeft)||0;this.marginRight=F(b.marginRight)||0;this.marginHeight=this.marginTop+this.marginBottom;this.marginWidth=this.marginLeft+this.marginRight;this.borderTop=F(b.borderTopWidth);this.borderBottom=F(b.borderBottomWidth);this.borderLeft=F(b.borderLeftWidth);this.borderRight=
|
31
|
+
F(b.borderRightWidth);this.paddingTop=F(b.paddingTop);this.paddingBottom=F(b.paddingBottom);this.paddingLeft=F(b.paddingLeft);this.paddingRight=F(b.paddingRight);this.F=this.borderTop+this.paddingTop;this.ga=this.borderBottom+this.paddingBottom;this.O=this.F+this.ga;this.dc=this.borderLeft+this.paddingLeft;this.ec=this.borderRight+this.paddingRight;this.Ca=this.dc+this.ec;this.Q=Tb(a);this.n=G(a);this.e=this.Q-this.Ca;this.b=this.n-this.O;this.K=F(b.minWidth)||0;this.m=F(b.minHeight)||0;a=F(b.maxWidth);
|
32
|
+
this.Ia=!a||a===-1?Infinity:a;a=F(b.maxHeight);this.V=!a||a===-1?Infinity:a;this.lineHeight=F(b.lineHeight)||i}}L.prototype.H=function(){var a=new L,b;for(b in this)a[b]!==this[b]&&(a[b]=this[b]);return a};function Zb(a,b,c){this.X=a;this.u=b;this.g=c}var $b=new Zb(Infinity,Infinity,Infinity);Zb.prototype.wb=function(){return!this.X&&!this.u&&!this.g};function ac(a,b){if(a.X!==b.X)return b.X-a.X;else if(a.g!==b.g)return a.g-b.g;return b.u-a.u}Zb.prototype.H=function(){return new this.constructor(this.X,this.u,this.g)};function bc(){this.g=this.f=this.index=0;this.t=[];this.la=[];this.va=0}bc.prototype.H=function(){var a=new this.constructor;a.index=this.index;a.f=this.f;a.g=this.g;a.J=this.J;a.t=this.t.slice(0);a.la=this.la.slice(0);a.va=this.va;return a};bc.prototype.Z=function(a){return!!a&&a.index===this.index&&a.f===this.f&&a.g===this.g&&a.t.length===this.t.length};
|
33
|
+
function cc(a,b){if(a.g)return k;var c,d,e;for(c=a.index,d=b.k.length;c<d;c+=1){e=b.k[c];if(!e.Ga)return k;if(!dc(a,c)&&!e.u.ca)return k}if(!a.t.length&&a.f===b.o.length)return h;for(c=a.t.slice(0);c.length;)if(e=b.o[c.pop()],!e.ca)return k;for(c=a.f,d=b.o.length;c<d;c+=1)if(e=b.o[c],!e.ca)return k;return h}function ec(a,b){var c;if(b<a.f)(c=a.t.indexOf(b))!==-1?ia(a.t,c):(c=a.la.indexOf(b))!==-1&&ia(a.la,c);else{if(b>a.f)for(;a.f<b;a.f+=1)a.t.push(a.f);a.f=b+1}}
|
34
|
+
function fc(a,b){a.t.indexOf(b)===-1&&(ec(a,b),a.t.push(b))}function dc(a,b){return a.f<=b?k:a.t.indexOf(b)!==-1?k:a.la.indexOf(b)!==-1?k:h};function gc(a,b,c,d){this.l=a;this.K=parseInt(b||0,10);this.m=parseInt(c||0,10);this.r=d}gc.prototype.ba=function(){return!this.r?h:Xa(this.r,h)};function hc(a,b,c){c&&z(b,c);b.innerHTML=a.l;D("img[data-src], iframe[data-src], video[data-src], source[data-src], audio[data-src]",b).forEach(function(a){a.setAttribute("src",a.getAttribute("data-src"))})};if(k in String.prototype)String.prototype.trim=function(){return this.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};function ic(a,b,c){this.Ec=c.index;this.f=c.f;c.f+=1;this.ma=i;this.q={};this.ca=!B(a,"required");this.Zb=B(a,"zoomable");this.La=B(a,"scroll");ha(a.childNodes).forEach(function(a){if(a.nodeType!==1)a.data&&a.data.trim();else{var b=a.getAttribute("data-sizes"),c=parseInt(a.getAttribute(a.hasAttribute("width")?"width":"data-minwidth"),10),j=parseInt(a.getAttribute(a.hasAttribute("height")?"height":"data-minheight"),10),u=a.hasAttribute("data-requires")?a.getAttribute("data-requires").split(" "):i;
|
35
|
+
if(!u||Xa(u))a.removeAttribute("hidden"),mb(a,"hidden"),jc(a),a=pb(a),b=b?b.split(" "):["fallback"],kc(this,b,a,c,j,u)}},this);this.q.fallback&&(lc(this,this.q.fallback[0].l,a,b,c),delete this.q.fallback)}
|
36
|
+
function lc(a,b,c,d,e){var g=c.parentNode,j=document.createElement("div");j.innerHTML=b;b=j.childNodes.length===1?j.firstChild:j;g.insertBefore(b,c);a.Zb&&(z(b,"zoomable"),b.setAttribute("data-figureindex",a.f),(t||wa)&&b.setAttribute("onclick","void(0)"));mc(b,d);a.ma=new nc(b,d,e,h);a.ma.u=a;a.ma.k&&a.ma.k.forEach(function(a){a.u=this;a.Bc=h},a);g.removeChild(b)}
|
37
|
+
function oc(a,b){var c=-Infinity,d,e=Infinity,g,j,u=a.q;a.q.lightbox&&(u={lightbox:a.q.lightbox});for(j in u)a.q[j].forEach(function(a){if(a.ba()){var n=a.K*a.m;a.K&&a.K>b.e||a.m&&a.m>b.b?!g&&this.La&&n<=e&&(e=n,d={name:j,qa:a}):n>=c&&(c=n,g={name:j,qa:a})}},a);return g||d}function kc(a,b,c,d,e,g){var j=new gc(c,d,e,g);b.forEach(function(a){this.q[a]?this.q[a].push(j):this.q[a]=[j]},a)}function pc(a){var b=a.nodeName.toLowerCase();return a.nodeType===1&&b==="figure"};function nc(a,b,c,d){var e=qc(a),g,j="";if(a.nodeType!==1)this.sa=h;else if(G(a)){this.index=c.index;c.index+=1;this.$=!e&&rc(a);this.k=[];this.o=[];g=k;if(this.$&&!B(a,"keeptogether"))sc(this,a,b,c,d),g=!!this.o.length,this.$=!!this.k.length;this.Oa=this.Oa||!e;this.mc=B(a,"keepwithnext");this.fc=B(a,"columnbreak");this.na=this.na||!this.Oa||B(a,"keeptogether");this.d=new L(a);if(!this.d.lineHeight)this.d.lineHeight=b;if(!this.na)this.na=this.d.O+this.d.lineHeight===this.d.n;this.ra=this.na?this.d.n:
|
38
|
+
!this.$?this.d.F+this.d.lineHeight:!this.ka?this.d.F+this.k[0].ra+(this.d.F?this.k[0].d.marginTop:0):this.d.F+this.k[0].ra;this.l=pb(a);this.Nb=this.$?this.l.substr(0,this.l.indexOf(">")+1):i;this.Pa=this.$?this.l.slice(this.l.lastIndexOf("<")):i;if(g)this.l=this.Nb,this.k.forEach(function(a){this.l+=a.l},this),this.l+=this.Pa;this.$&&(a=a.cloneNode(h),this.d.marginTop&&K(a,"marginTop",0),this.d.borderTop&&K(a,"borderTopWidth",0),this.d.paddingTop&&K(a,"paddingTop",0),j=pb(a));this.qc=this.$?j.substr(0,
|
39
|
+
j.indexOf(">")+1):i}else this.sa=h}function tc(a){return a.nextSibling?a.nextSibling:a.parent?tc(a.parent):i}
|
40
|
+
function sc(a,b,c,d,e){var g,j=a instanceof nc,u=b.nodeName.toLowerCase()==="ol"&&"start"in b,m=u?b.start:i;m===-1&&(m=1);ha(b.childNodes).forEach(function(b){if(u&&b.nodeName.toLowerCase()==="li"){if(b.value&&b.value!==-1)m=b.value;b.setAttribute("value",m);m+=1}if(pc(b)){if(e)return;b=new ic(b,c,d);a.o.push(b);if(b=b.ma)if(b.Ga=h,j)a.ka=h}else if(b=new nc(b,c,d,!!e),j&&!a.ka)a.ka=b.ka;if(b&&!b.sa){a.k=a.k.concat(b,b.k||[]);if(b.o.length)a.o=a.o.concat(b.o),delete b.o;b.parent=j?a:i;if(g)g.nextSibling=
|
41
|
+
b;g=b}})}function uc(a){for(var a=a.parent,b=[];a;)b.unshift(a.qc),a=a.parent;return b.join("")}function vc(a){for(var a=a.parent,b=[];a;)b.push(a.Pa),a=a.parent;return b.join("")}
|
42
|
+
function rc(a){if(wc(a))return k;if(xc(a))return h;var b,c,d,e=k;for(b=0,c=a.childNodes.length;b<c;b+=1)if(d=a.childNodes[b],d.nodeType===3&&/[^\s]/.test(d.data))return k;else if(d.nodeType===1){if(wc(d)||xc(d))return h;e=h;d=document.defaultView.getComputedStyle(d,i);if(/inline/.test(d.display))return k;else if(/block/.test(d.display))return h}return e}var yc="img,video,object,embed,iframe,audio,canvas,svg,table".split(",");
|
43
|
+
function qc(a){var b=a.nodeName.toLowerCase();return a.nodeType===1&&yc.indexOf(b)!==-1}var zc="p,h1,h2,h3,h4,h5,h6".split(",");function wc(a){var b=a.nodeName.toLowerCase();return a.nodeType===1&&zc.indexOf(b)!==-1}var Ac="div,article,ul,ol,figure,aside".split(",");function xc(a){var b=a.nodeName.toLowerCase();return a.nodeType===1&&Ac.indexOf(b)!==-1}
|
44
|
+
function mc(a,b){if(a.nodeType===1){var c,d;a.removeAttribute("id");if(!pc(a)){if(rc(a)&&!B(a,"keeptogether"))for(c=a.childNodes.length-1;c>=0;c-=1)d=a.childNodes[c],d.nodeType!==1?a.removeChild(d):mc(d,b);if(!window.TS_NO_AUTOMETRICS)if(c=new L(a),c.marginTop%b&&K(a,"marginTop",Yb(c.marginTop,b)),c.marginBottom%b&&K(a,"marginBottom",Yb(c.marginBottom,b)),qc(a)||B(a,"keeptogether"))c.n%b&&K(a,"paddingBottom",c.paddingBottom+b-c.n%b);else{c.lineHeight?c.lineHeight%b&&K(a,"lineHeight",Yb(c.lineHeight,
|
45
|
+
b)):(c.lineHeight=b,K(a,"lineHeight",b));c.F%b&&K(a,"paddingTop",Yb(c.F,b)-c.borderTop);if(c.ga%b)c.paddingBottom=K(a,"paddingBottom",Yb(c.ga,b)-c.borderBottom);c.n=G(a);c.n%b&&(c.paddingBottom+=b-c.n%b,K(a,"paddingBottom",c.paddingBottom))}}}};function Bc(a,b){this.lineHeight=F(document.defaultView.getComputedStyle(a,i).lineHeight)||1;this.Y=a.offsetWidth;D("figure",a).forEach(function(a){a.style.display="none"});mc(a,this.lineHeight);this.o=[];this.k=[];this.Va=b;sc(this,a,this.lineHeight,{index:0,f:0})};function Cc(a,b){var c=new L(a);this.z=!B(a,"fixed");(this.m=c.m)&&K(a,"minHeight",0);this.b=c.n;this.Da=Math.max(0,b-this.b)}Cc.prototype.wa=function(a){if(!this.z)return this;this.b=Math.max(0,a-this.Da);return this};function Ec(a,b){var c=new L(a);this.z=!B(a,"fixed");(this.m=c.m)&&K(a,"minHeight",0);this.b=c.n;this.Da=Math.max(0,b-this.b);this.q=(c=a.getAttribute("data-sizes"))?c.split(" "):[]}Ec.prototype.wa=function(a){if(!this.z)return this;this.b=Math.max(0,a-this.Da);return this};function Fc(a){document.body.appendChild(a);this.r=a.hasAttribute("data-requires")?a.getAttribute("data-requires").split(" "):i;this.Ab=nb(a).map(function(a){return a.toLowerCase()});this.z=!B(a,"fixed");Gc(this);this.xa=this.size=new L(a);this.z?this.size.K=Math.max(this.size.K||0,this.size.e):(this.size.m=this.size.b,this.size.K=this.size.e);this.lineHeight=this.size.lineHeight||1;this.Y=this.aa=this.W=0;this.cols=[];D(".column",a).forEach(function(a){var c=new Cc(a,this.size.b);this.cols.push(c);
|
46
|
+
this.W+=c.b;this.aa=Math.max(this.aa,c.b);if(this.Y){if(this.Y!==a.offsetWidth)this.error=h}else this.Y=a.offsetWidth},this);this.I=[];D(".container",a).forEach(function(a){this.I.push(new Ec(a,this.size.b))},this);this.l=pb(a);document.body.removeChild(a)}var Hc={onlypage:h,odd:h,even:h,sizetocontainer:h},Ic=/^(no-)?page-(\d+)$/;
|
47
|
+
function Gc(a){var b=k,c,d;a.L={};a.Ja={};a.Ob={};a.Ab.forEach(function(a){if(a in Hc)this.L[a]=h;else if(c=Ic.exec(a))d=parseInt(c[2],10),isNaN(d)||(a.substr(0,3)==="no-"?this.Ob[d]=h:(b=h,this.Ja[d]=h))},a);if(!b)a.Ja=i}
|
48
|
+
Fc.prototype.wa=function(a){if(!this.z)return this;var b=Math.min(this.size.V,Math.max(a-(this.size.marginHeight+this.size.O),this.size.m));b-=(b-this.size.m||0)%this.lineHeight;this.W=this.aa=0;this.cols.forEach(function(a){this.W+=a.wa(b).b;this.aa=Math.max(this.aa,a.b)},this);this.I.forEach(function(a){a.wa(b)},this);this.xa=this.size.H();this.xa.b=b;this.xa.n=b+this.size.O;this.xa.V=this.L.sizetocontainer?this.size.V:Math.min(this.size.V,b+this.lineHeight*3);return this};
|
49
|
+
function Jc(a,b){return b.size.e+20*b.I.length-(a.size.e+20*a.I.length)}Fc.prototype.ia=function(){return!this.r?h:Xa(this.r,h)};
|
50
|
+
function Kc(a,b,c){var d=i,e=-Infinity,g,j,u=a.k.length,m,n,H,C,l,w,A,I,J,O,P,o,Y;H=0;C=b.length;for(;H<C;H+=1){l=b[H];o=0;Y=k;g=c.H();A=g.g;I=l.W-A;A&&l.W&&(Y=h);w=0;j=g.va+1;w+=l.cols.length*50;l.lineHeight!==a.lineHeight&&(w-=2E3);l.Y&&l.Y!==a.Y&&(w-=Infinity);l.L.onlypage&&(w+=g.va?-Infinity:4E3);l.Ja&&(l.Ja[j]?w+=3E3:w-=Infinity);l.Ob[j]&&(w-=Infinity);w+=j%2?l.L.odd?2E3:l.L.even?-Infinity:0:l.L.even?2E3:l.L.odd?-Infinity:0;j=l;m=a;n=g;var U=P=O=J=f,s=f,ea=f,ua=f,Wb=f,Z=f,kb=f,Xc=f,Xb=[];J=0;
|
51
|
+
O=j.I.length;for(;J<O;J+=1){P=j.I[J];Xb[J]=i;ea=n.f;kb=n.t.slice(0);c:for(;kb.length||ea<m.o.length;){ua=(Xc=!!kb.length)?kb.shift():ea;Wb=m.o[ua];U=P.q.length-1;d:for(;U>=0;U-=1){s=P.q[U];e:{var Z=Wb,lb=s,Ra=f,Yc=f;if(Z.q[lb])for(Ra=0,Yc=Z.q[lb].length;Ra<Yc;Ra+=1)if(Z.q[lb][Ra].ba()){Z=Z.q[lb][Ra];break e}Z=i}if(Z){if(P.z&&Z.m&&Z.m>P.b)continue d;Xb[J]={f:ua,qa:Z,size:s,z:P.z};ec(n,ua);break c}}if(!Wb.ca)break;Xc||(ea+=1)}}j=Xb;n=0;J=j.length;for(;n<J;n+=1)O=l.I[n],(P=j[n])?(m=a.o[P.f],w+=2E3+P.qa.m*
|
52
|
+
5,m.ca||(w+=4E3),O.z||(w+=5E3),o+=1):O.z||(w-=5E3);b:for(;l.W&&g.index<u&&A<=l.W;){m=a.k[g.index];n=m.d.n+m.d.marginTop;if(m.na&&(n>l.aa||n>I))break b;if(n>I){if(m.na)break b;if(m.children){g.index+=1;continue b}A+=n}A+=n;w+=n;I-=n;Y=h;g.index=m.nextSibling?m.nextSibling.index:g.index+1}if(Y)I>0&&(g=I/l.W,g-=o*0.2,g>0.5&&(w-=I,w-=g*g*2E3));else if(o){if((m=a.k[g.index])&&m.u&&!m.u.ca&&(g.g||m.Bc))w=-Infinity}else w=-Infinity;w>e&&(e=w,d={P:l,I:j})}return d};function Lc(a,b,c){a.innerHTML=Mustache.to_html(b,c,f,f);D("img[data-src], iframe[data-src], video[data-src]",a).forEach(function(a){a.setAttribute("src",a.getAttribute("data-src"))});D("a[data-href]",a).forEach(function(a){a.setAttribute("href",a.getAttribute("data-href"))})};function Mc(a){wa&&a.setAttribute("onclick","void(0)")}function jc(a){var b=D(".scroll",a);B(a,"scroll")&&b.unshift(a);b.forEach(Mc)};function Nc(a,b,c){var d=Kc(a,b,c),b=document.createElement("div"),e=c.H(),g=k;!d||!d.P?(c.J=cc(c,a)||c.f===a.o.length,c.J?this.sa=h:this.error=h):(this.size=d.P.xa.H(),this.xb=new Zb(c.index,c.f,c.g),z(b,"offscreen"),document.body.appendChild(b),b.innerHTML=d.P.l,this.a=b.firstChild,K(this.a,"width",this.size.e),K(this.a,"height",this.size.b),D("[data-ts-template=document]",this.a).forEach(function(b){Lc(b,b.innerHTML,a.Va.i)}),D(".container",this.a).forEach(function(b,e){var m=d.I[e],n,H,C;if(m){H=
|
53
|
+
m.f;n=a.o[H];a:{var l=a.lineHeight,w,A,I;C=h;w=m.size;A=m.qa;I=G(b);hc(A,b,w);if(m.z){B(b,"bottom")?(C=k,b.style.top="auto"):b.style.bottom="auto";A=new L(b);m=A.n;if(m>I)if(n.La)m=I,K(b,"height",m-A.O);else{mb(b,w);ob(b);C=k;break a}else l&&m%l&&(m=Yb(m,l));n.La&&(z(b,"scroll"),Mc(b));for(l=b;l=l.nextSibling;)if(l.nodeType===1&&!B(l,"fixed")&&(B(l,"column")||B(l,"container")||B(l,"group")))z(l,"flexed"),G(l)<=m?K(l,"height",0):C?K(l,"top",(l&&l.offsetTop||0)+m):K(l,"bottom",G(l.offsetParent)-((l&&
|
54
|
+
l.offsetTop||0)+G(l))+m)}C=h}if(C){if(ec(c,H),g=h,n.Zb&&(z(b,"zoomable"),b.setAttribute("data-figureindex",H),(t||wa)&&b.setAttribute("onclick","void(0)")),e===0&&d.P.L.sizetocontainer)this.size.b=G(b)+d.P.I[0].Da,this.size.n=this.size.b+this.size.O,K(this.a,"height",this.size.b)}else!n.ca&&n.ma?fc(c,n.f):B(b,"flexed")||(ec(c,H),c.la.push(H)),b.parentNode.removeChild(b)}else b.parentNode.removeChild(b)},this),D(".column",this.a).forEach(function(b,e){var g=G(b),n=0,H,C,l=h,w=0,A=0,I=0,J=0,O=[],P=
|
55
|
+
a.k.length,o=a.k[c.index],Y,U,s;H=[];var ea,A=k,ua=d.P.aa/g>1.5;if(o&&(g%a.lineHeight&&(g-=g%a.lineHeight),g&&!(g<d.P.cols[e].m))){o.parent&&O.push(uc(o));w=c.g?o.d.n-c.g:0;a:for(;c.index<P&&n<g;){o=a.k[c.index];U=(Y=o.nextSibling)||tc(o);if(o.Ga&&dc(c,o.u.f)&&(!l||!c.g)){c.index=U?U.index:P;continue a}s=o.parent;H=g-n;l&&!I?(I=-w,A=c.overflow?o.d.lineHeight:o.ra):(I=Math.max(I,o.d.marginTop),A=I+o.ra);J=Math.max(o.d.marginBottom,Y?Y.d.marginTop:0);ea=o.d.n+I;A=H<A;if(!A&&o.mc&&Y&&!(c.g||l&&!ua))A=
|
56
|
+
H>=ea&&H<ea+J+Y.ra;A&&(A=!l||ua);A&&(A=!o.ka);o.fc&&!l&&(A=h);if(A){if(s){for(;s&&s.index===o.index-1;)O.pop(),c.index=s.index,s.Ga&&fc(c,s.u.f),o=s,s=o.parent;s&&O.push(vc(o))}break a}o.Ga&&ec(c,o.u.f);if(o.ka||o.k.length&&H<ea){o.d.F&&(n+=l?0:I,I=0,n+=o.d.F);O.push(o.Nb);c.index+=1;continue a}n+=ea;O.push(o.l);l=k;C=C||o;c.g=0;if(g>n+J){c.index=U?U.index:P;if(!Y&&s){H=[];do H.push(s.Pa),s.d.ga?(n+=J+s.d.ga,J=s.d.marginBottom):J=Math.max(J,s.d.marginBottom);while(!s.nextSibling&&(s=s.parent));if(g>
|
57
|
+
n+J)O.push(H.join(""));else{s&&O.push(vc(o));n=g;break a}}I=J;continue a}s&&O.push(vc(o));if(o.Oa){if(n<=g)c.index=U?U.index:P,n=g}else n=g,c.index=U?U.index:P;break a}l=o;if(g>=n||!l)c.g=0;else if(c.g=n-g,n=c.g-l.d.ga,n<=0)c.g=0,c.index=l.index+1;else if(n=(l.d.b-n)%l.d.lineHeight)g-=n,c.g+=n;K(b,"height",g);b.innerHTML=O.join("");if(C&&b.firstChild)if(b.firstChild.style.marginTop=-w+"px",C.parent&&!w){for(s=C.parent;s;)s.d.F&&(C=s),s=s.parent;if(s!==C){s=C.parent;for(o=b.firstChild;s;)o=o.firstChild,
|
58
|
+
s=s.parent,o&&(o.style.marginTop=0)}}else{if(C.k.length&&!w)for(o=b.firstChild;C;)C.k.length&&o.firstChild?(C=C.k[0],o=o.firstChild,o.style.marginTop=0):C=i}else ob(b)}}),e.Z(c)?this.error=h:!g&&d.P.L.sizetocontainer?this.sa=h:(K(this.a,"marginTop",-this.size.n/2),K(this.a,"marginLeft",-this.size.Q/2),c.J=d.P.L.onlypage||cc(c,a),c.J&&z(this.a,"last-page"),this.l=b.innerHTML,this.end=new Zb(c.index,c.f,c.g),c.va+=1),this.v(),document.body.removeChild(b))}
|
59
|
+
Nc.prototype.N=function(){if(this.s)return this.a;this.a=rb(this.l);this.s=h;return this.a};Nc.prototype.v=function(){this.s=k;Ub(this.a,"none");D("img",this.a).forEach(ub);this.a=i};Nc.prototype.H=function(){var a=Object.H(this);a.a=this.a&&this.a.cloneNode(h)||i;a.s=this.s;return a};function Oc(a,b,c){this.j=[];this.Ya=[];this.bb=a;this.Va=c;if(b)if(b.nodeName!=="ARTICLE")this.error=h;else{this.loaded=h;a=document.createElement("div");c=document.createElement("div");a.style.display="none";z(a,"offscreen grid");z(c,"column");b.removeAttribute("id");ob(a);if(this.ya=b.getAttribute("data-theme")||b.getAttribute("data-grids")||i)z(a,this.ya),z(c,this.ya),Pc(this,this.bb);for(;b.firstChild;)c.appendChild(b.firstChild);a.appendChild(c);c.style.display="block";a.style.display="block";
|
60
|
+
document.body.appendChild(a);this.content=new Bc(c,this.Va);document.body.removeChild(a);a.removeChild(c);ob(c);Qc(this)}}function Pc(a,b){a.bb=a.ya?b.filter(function(a){return a.Ab.indexOf(this.ya)!==-1},a):b.slice(0)}function Rc(a,b){a.Ya=a.bb.filter(function(a){return a.ia()&&Sb(a.size,{e:b.e-a.size.Ca,b:b.b-a.size.O-a.size.marginHeight})}).map(function(a){return a.wa(b.b)});a.Ya.sort(Jc)}function Sc(a,b){if(!a.ua||a.ua.e!==b.e||a.ua.b!==b.b)a.ua=b,a.Ka=Sb(a.pa,b);return!a.Ka}
|
61
|
+
function Qc(a){y("paginate");a.j=[];a.B=0;a.ua&&Rc(a,a.ua);a.ha=new bc;a.pa=i;a.Ka=h;a.R=k}
|
62
|
+
Oc.prototype.sc=function(a,b,c){y("paginate");for(var d,b=b||0;!this.ha.J;)if(d=new Nc(this.content,this.Ya,this.ha),d.sa){if(this.ha.J)break}else{if(d.error){if(this.ha.J)break;this.error=h;E(document,"treesaver.paginationerror",{vb:this});this.ha.J=h;break}this.j.push(d);this.B+=1;this.error=k;var e=this.pa||{},g=d.size||{},j=g.O||(g.n?g.n-g.b:0),u=g.Ca||(g.Q?g.Q-g.e:0);this.pa={e:Math.max(e.e||0,g.e+u||0),b:Math.max(e.b||0,g.b+j||0),Ia:Math.min(e.Ia||Infinity,g.Ia+u||Infinity),V:Math.min(e.V||
|
63
|
+
Infinity,g.V+j||Infinity)};if(!(b&&this.B<=b||c&&(c===$b||!(ac(c,d.end)>=0)))&&!this.ha.J){a&&(E(document,"treesaver.paginationprogress",{vb:this}),Tc(this,ha(arguments)));return}}this.R=h;E(document,"treesaver.paginationprogress",{vb:this,Fc:h})};function Tc(a,b){gb(Oc.prototype.sc,200,b,"paginate",a)}
|
64
|
+
function Uc(a,b,c){a.Ka||Qc(a);var d=[],e=b>=0?b+c-1:Infinity;!a.R&&e>a.j.length-1&&Tc(a,[h,e]);if(a.R)c=Math.min(c,a.B-(b>=0?b:b-1));else if(d.length=c,b<0)return d;if(b<0)for(e=-b;e<=c;e+=1)d[e+b]=a.j[a.B-e];else for(e=b;e<b+c;e+=1)d[e-b]=a.j[e];return d}
|
65
|
+
function Vc(){var a=M.c[N.index],b=Q;if(!a.content)return-1;var c,d;if(!b||b.wb())return 0;a.Ka||Qc(a);if(!a.R&&(b===$b||!a.B||!(ac(b,a.j[a.B-1].end)>=0)))return Tc(a,[h,i,b]),-1;if(b===$b)return a.R?a.B-1:-1;for(c=0,d=a.B;c<d;c+=1)if(ac(a.j[c].end,b)<0)return c;return a.R?a.B-1:-1};function R(a,b){this.index=a;this.anchor=b}var Wc=new R(Infinity),Zc=new R(0);R.prototype.wb=function(){return this.index===0};R.prototype.Z=function(a){return this.index===a.index};function $c(){this.h=[];this.parent=i}$c.prototype.appendChild=function(a){a.parent=this;this.h.push(a);return a};$c.prototype.replaceChild=function(a,b){var c=this.h.indexOf(b);return c!==-1?(a.parent=b.parent,b.parent=i,this.h.splice(c,1,a)[0]):i};$c.prototype.insertBefore=function(a,b){var c=this.h.indexOf(b);a.parent=this;c===0?this.h.unshift(a):c>1&&this.h.splice(c,0,a);return a};$c.prototype.removeChild=function(a){var a=this.h.indexOf(a),b=i;if(a!==-1)b=this.h.splice(a,1)[0],b.parent=i;return b};if(!Object.keys)Object.keys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b};Object.H=function(a){function b(){}b.prototype=a;return new b};var ad=/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,bd="source,scheme,authority,userInfo,user,password,host,port,relative,path,directory,file,query,anchor".split(",");function cd(a){for(var b=bd.length,a=ad.exec(a),c={};b--;)c[bd[b]]=a[b]||i;return c}
|
66
|
+
function dd(a){var b="";a.scheme&&(b+=a.scheme+":");a.source&&/^(?:[^:\/?#]+:)?\/\//.test(a.source)&&(b+="//");a.authority&&(a.userInfo&&(b+=a.user||"",a.userInfo.indexOf(":")!==-1&&(b+=":"),b+=a.password||"",b+="@"),b+=a.host||"",a.port!==i&&(b+=":"+a.port));a.relative&&(a.path&&(b+=a.directory||"",b+=a.file||""),a.query&&(b+="?"+a.query),a.anchor&&(b+="#"+a.anchor));return b}
|
67
|
+
function ed(a){a=cd(a);return a.file?/^(index|default)\.(html?|php|asp|aspx)$/i.test(a.file)||S&&S.get("DirectoryIndex","index.html")===a.file:k}function fd(a){a=cd(a);a.anchor=i;return dd(a)}function gd(a){a=cd(a);a.file=i;return dd(a)};function T(a,b){if(a)this.url=a,this.path=cd(a).relative,this.i=b||{},this.c=[],this.Na={},this.ub=[],this.h=[]}var hd=/<title>\s*(.+?)\s*<\/title>/i;T.prototype=new $c;p=T.prototype;
|
68
|
+
p.parse=function(a){var b=document.createElement("div"),c=[];if(!a||typeof a!=="string"||a.trim()==="")return[];b.innerHTML=a;D("meta[name]",b).forEach(function(a){var b=a.getAttribute("name"),a=a.getAttribute("content");b&&a&&(this.i[b]=a)},this);c=D("article",b).filter(function(a){return sb(a,"article")===i});if(c.length===0)c.push(document.createElement("article")),c[0].innerHTML=b.innerHTML;return c.map(function(a,b){var c=a.getAttribute("id")||(b===0?i:"_"+b),j=new Oc(id,a,this);c&&(this.Na[c]=
|
69
|
+
b,this.ub[b]=c);return j},this)};p.Z=function(a){var b=a;if(!b)return k;if(typeof a!=="string"&&a.url)b=a.url;return ed(b)&&ed(this.url)?b===this.url:ed(b)?gd(b)===this.url:ed(this.url)?b===gd(this.url):b===this.url};p.ia=function(){return this.r?Xa(this.r,h):h};p.Za=function(a){return this.c[a]||i};p.wc=function(a){this.c=a};p.ab=function(){return this.i};p.kc=function(){return this.url};p.xc=function(a){this.url=a};p.ic=function(){return this.c.length};
|
70
|
+
function jd(a){return(a=hd.exec(a))&&a[1]?a[1]:i}p.load=function(){var a=this,b=i;if(!this.ta){this.ta=h;if(!t&&(b=zb("cache:"+this.url)))this.c=this.parse(b),this.title=jd(b),this.loaded=h,E(document,"treesaver.loaded",{document:this});x.get(this.url,function(c){a.ta=k;if(c){if(t||b!==c)t||yb("cache:"+a.url,c,h),a.c=a.parse(c),a.title=jd(c),a.loaded=h,E(document,"treesaver.loaded",{document:a})}else if(t||!b)a.nc=h,a.loaded=k,E(document,"treesaver.loadfailed",{document:a})})}};
|
71
|
+
q("treesaver.Document",T);q("treesaver.Document.prototype.setArticles",T.prototype.wc);q("treesaver.Document.prototype.getNumberOfArticles",T.prototype.ic);q("treesaver.Document.prototype.getArticle",T.prototype.Za);q("treesaver.Document.prototype.parse",T.prototype.parse);q("treesaver.Document.prototype.getUrl",T.prototype.kc);q("treesaver.Document.prototype.setUrl",T.prototype.xc);q("treesaver.Document.prototype.getMeta",T.prototype.ab);function kd(a){this.url=a;this.D={};this.i={}}kd.prototype=new $c;p=kd.prototype;p.w=[];
|
72
|
+
function ld(a,b){var c=i,d=i,e={},g=i,j=i;typeof b==="string"?c=b:(c=b.url,d=b.contents,Object.keys(b).forEach(function(a){e[a]=b[a]}),b.requires&&(typeof b.requires==="string"?g=b.requires.split(/\s|,\s/g):Array.isArray(b.requires)&&(g=b.requires.map(function(a){return a.toString()})),g=g.filter(function(a){return a.trim()!==""})));if(!c)return i;c=fd(x.oa(c));j=new T(c,e);d&&Array.isArray(d)&&d.forEach(function(a){j.appendChild(ld(this,a))},a);if(g)j.r=g;return j}
|
73
|
+
p.update=function(){var a=0;this.w=[];this.Wa={};this.Xa={};md(this,this.h,function(b){this.Wa[b.url]?this.Wa[b.url].push(b):this.Wa[b.url]=[b];this.w.push(b);this.Xa[b.url]?this.Xa[b.url].push(a):this.Xa[b.url]=[a];a+=1},this);E(document,"treesaver.index.updated",{index:this})};function md(a,b,c,d){return b.every(function(a){return c.call(d,a)!==k&&md(this,a.h,c,d)},a)}p.jc=function(){return this.w.length};function nd(a,b){var c=-1,d=0;md(a,a.h,function(a){a.Z(b)&&(c=d);d+=1},a);return c}
|
74
|
+
p.$a=function(a){var b=[];return a?(md(this,this.h,function(c){c.Z(a)&&b.push(c)},this),b):this.w};
|
75
|
+
p.parse=function(a){var b={h:[],D:{},i:{}};if(!a)return b;if(typeof a==="string")try{a=window.JSON.parse(a)}catch(c){return b}if(Object.prototype.toString.apply(a)!=="[object Object]")return b;if(!a.contents||!Array.isArray(a.contents))return b;b.h=a.contents.map(function(a){return ld(this,a)},this);b.h=b.h.filter(function(a){return a!==i});b.h=b.h.map(function(a){return this.appendChild(a)},this);if(a.settings)b.D={},Object.keys(a.D).forEach(function(c){b.D[c]=a.D[c]});Object.keys(a).forEach(function(c){c!==
|
76
|
+
"settings"&&(b.i[c]=a[c])});return b};p.set=function(a,b){return this.D[a]=b};p.get=function(a,b){return this.D.hasOwnProperty(a)?this.D[a]:b};p.ab=function(){return this.i};
|
77
|
+
p.load=function(){var a=this,b=i,c=i;if(!this.ta)if(this.url){this.ta=h;if(!t&&(b=zb("cache:"+this.url)))c=this.parse(b),this.h=c.h,this.i=c.i,this.D=c.D,this.loaded=h,E(document,"treesaver.index.loaded",{index:this}),this.update();x.get(this.url,function(d){a.ta=k;if(d){if(t||b!==d)t||yb("cache:"+a.url,d,h),c=a.parse(d),a.h=c.h,a.i=c.i,a.D=c.D,a.loaded=h,E(document,"treesaver.index.loaded",{index:a}),a.update()}else if(t||!b)a.nc=h,a.loaded=k,E(document,"treesaver.index.loadfailed",{index:a})})}else E(document,
|
78
|
+
"treesaver.index.loadfailed",{index:this})};q("treesaver.Index",kd);q("treesaver.Index.prototype.get",kd.prototype.get);q("treesaver.Index.prototype.set",kd.prototype.set);q("treesaver.Index.prototype.update",kd.prototype.update);q("treesaver.Index.prototype.getDocuments",kd.prototype.$a);q("treesaver.Index.prototype.getNumberOfDocuments",kd.prototype.jc);q("treesaver.Index.prototype.getMeta",kd.prototype.ab);var S,id,V,W,N,M,od,Q,pd,X,qd,rd,sd,td;function ud(){var a=ga;W=V=-1;N=Zc;id=vd();if(!id)return k;X=new T(fd(document.location.href),{});if(a)X.c=X.parse(a),X.title=document.title,X.loaded=h;wb(document,"treesaver.index.loaded",wd);S=new kd(xd());S.appendChild(X);S.update();S.load();yd(X,Zc,i,i,h);zd();Ad();Bd.forEach(function(a){wb(document,a,Cd)});wb(window,"popstate",Cd);return h}
|
79
|
+
function Dd(){Q=od=M=i;W=V=-1;rd=qd=N=i;xb(document,"treesaver.index.loaded",wd);Bd.forEach(function(a){xb(document,a,Cd)});xb(window,"popstate",Cd)}function wd(a){var a=a.index,b=a.$a(X.url),c=D("meta[name]");if(b.length)b.forEach(function(a){X.i=a.i;X.children=a.children;X.r=a.r;c.forEach(function(b){var c=b.getAttribute("name"),b=b.getAttribute("content");c&&b&&(a.i[c]=b)});a.parent.replaceChild(X,a)}),W=nd(a,X),document.title=X.i.title||X.title}
|
80
|
+
function vd(){var a=[];Pb("grid").forEach(function(b){var c=b.getAttribute("data-requires");if(!c||Xa(c.split(" ")))b=new Fc(b),b.error||a.push(b)});return a}function zd(){var a=Pb("loading")[0];a||(a=document.createElement("div"));document.body.appendChild(a);a.style.top="50%";a.style.left="50%";K(a,"margin-top",-G(a)/2);K(a,"margin-left",-Tb(a)/2);document.body.removeChild(a);qd=pb(a);a=a.cloneNode(h);document.body.appendChild(a);rd=new L(a);document.body.removeChild(a)}
|
81
|
+
function Ad(){var a=Pb("error")[0];a||(a=document.createElement("div"));document.body.appendChild(a);a.style.top="50%";a.style.left="50%";K(a,"margin-top",-G(a)/2);K(a,"margin-left",-Tb(a)/2);document.body.removeChild(a);sd=pb(a);a=a.cloneNode(h);document.body.appendChild(a);td=new L(a);document.body.removeChild(a)}var Bd=["treesaver.loaded","treesaver.loadfailed","treesaver.paginationprogress"];
|
82
|
+
function Cd(a){if(a.type==="treesaver.paginationprogress")E(document,"treesaver.pageschanged");else if(a.type==="treesaver.loaded")document.title=M.i.title||M.title,E(document,"treesaver.pageschanged");else if(a.type==="treesaver.loadfailed"&&a.document===M&&!t)x.eb()&&(document.location=M.url);else if(a.type==="popstate"){var b=-1,c=i,d;a.state?(d=(b=a.state.index)||b===0?S.w[b]:i)?(c=a.state.position,yd(d,Zc,c?new Zb(c.X,c.u,c.g):i,b,h)):Ed(a.state.url):(b=nd(S,X),yd(X,Zc,i,b))}}
|
83
|
+
function xd(){var a=D("link[rel~=index]")[0];return!a?i:x.oa(a.href)}function Fd(){return V!==-1?V>=1?h:Gd():!Q&&Gd()}function Gd(){return N.index>0||Hd()}function Hd(){for(var a=W-1;a>=0;a-=1)if(S.w[a].ia())return h;return k}function Id(a,b){if(!Gd())return i;if(N.index>0){var c=new R(N.index-1),d=W,e=M;return b?e:yd(e,c,a?$b:i,d)}else{if(Hd()){c=W-1;for(e=d=i;c>=0;c-=1)if(d=S.w[c],d.ia())break;d?(e=d.loaded?new R(d.c.length-1):Wc,c=b?d:yd(d,e,a?$b:i,c)):c=i}else c=i;return c}}
|
84
|
+
function Jd(){if(V===-1)return!Q&&Id(h)?h:k;var a=V-1;if(a<0)return Id(h)?h:k;V=a;Q=i;E(document,"treesaver.pageschanged");return h}function Kd(){return V!==-1?V<M.c[N.index].B-1?h:M.c[N.index].R&&Ld():Q===$b?Ld():k}function Ld(){return N.index<M.c.length-1||Md()}function Md(){for(var a=W+1,b=S.w.length;a<b;a+=1)if(S.w[a].ia())return h;return k}
|
85
|
+
function Nd(a){if(!Ld())return i;if(N.index<M.c.length-1){var b=new R(N.index+1),c=W,d=M;return a?d:yd(d,b,i,c)}else{if(Md()){b=W+1;c=i;for(d=S.w.length;b<d;b+=1)if(c=S.w[b],c.ia())break;a=c?a?c:yd(c,Zc,i,b):i}else a=i;return a}}function Od(){if(V===-1)return Q===$b?Nd():k;var a=V+1;if(a>=M.c[N.index].B)return M.c[N.index].R?Nd():k;V=a;Q=i;E(document,"treesaver.pageschanged");return h}
|
86
|
+
function Ed(a){var b=cd(a).anchor,c=S.$a(fd(a)),a=-1,d=i;return c.length!==0&&(c=c[0],a=nd(S,c),d=c.loaded&&b?new R(c.Na[b]||0):new R(0,b),a!==-1)?yd(c,d,i,a):k}
|
87
|
+
function Pd(a){N.index===Infinity&&M.loaded?N=new R(M.c.length-1):N.anchor&&M.loaded&&(N=new R(M.Na[N.anchor]||0));M.c[N.index]&&Sc(M.c[N.index],a)&&(V=-1,pd=0);var b=[],c,d,e;if(M.c[N.index]&&V===-1&&(V=Vc(),V===-1))return b.length=3,b[1]=Qd(),b;c=V-1;if(c<0){if((d=Id(k,h))&&d.loaded&&d===M)Sc(d.c[N.index-1],a),b=Uc(d.c[N.index-1],c,-c);else if(d&&d.loaded&&d.c[d.c.length-1].R)b=Uc(d.c[d.c.length-1],c,-c);else for(d=0,e=-c;d<e;d+=1)b[d]=i;d=3+c;c=0}else d=3;M.c[N.index]&&(b=b.concat(Uc(M.c[N.index],
|
88
|
+
c,d)));if(d=3-b.length)if((c=Nd(h))&&c===M)Sc(c.c[N.index+1],a),b=b.concat(Uc(c.c[N.index+1],0,d));else if(c)c.loaded?(Sc(c.c[0],a),b=b.concat(Uc(c.c[0],0,d))):(c.load(),b.length=3);for(d=1,e=b.length;d<e;d+=1)b[d]||(b[d]=M.error?{N:Nc.prototype.N,v:Nc.prototype.v,l:sd,size:td}:Qd());if((!Q||Q===$b)&&b[1]&&b[1].xb)Q=b[1].xb;M.c[N.index]&&!pd&&(a=M.c[N.index],pd=a.pa?a.pa.e:0);for(d=0;d<b.length;d+=1)for(a=d+1;a<b.length;a+=1)b[d]&&b[d]===b[a]&&(b[a]=b[d].H());return b}
|
89
|
+
function yd(a,b,c,d,e){var g=i,j=i,g=i,u;if(!a)return k;g=a.ub[b&&b.index||0]||i||!!b.anchor&&b.anchor;j=a.url+(g?"#"+g:"");g=a.path+(g?"#"+g:"");if(a.Z(M)&&d!==W&&!N.Z(b))return od=u=M.Za(b.index),N=b,Q!==c&&(Q=c,V=-1),V=-1,e?Ab({index:d,url:j,position:c},a.i.title,g):Bb({index:d,url:j,position:c},a.i.title,g),E(document,"treesaver.pageschanged"),E(document,"treesaver.articlechanged",{article:u}),h;document.title=a.i.title||a.title;M=a;Q!==c&&(Q=c,V=-1);V=-1;N=b;od=M.Za(b&&b.index||0);if(a.loaded){if(a.error&&
|
90
|
+
!t)x.eb()&&(document.location=a.url)}else a.load();W=d||d===0?d:nd(S,a);e?Ab({index:d,url:j,position:c},a.i.title||"",g):Bb({index:d,url:j,position:c},a.i.title||"",g);E(document,"treesaver.pageschanged");E(document,"treesaver.documentchanged",{document:a,url:j,path:g});E(document,"treesaver.articlechanged",{article:od});return h}function Qd(){return{N:Nc.prototype.N,v:Nc.prototype.v,l:qd,size:rd}};function Rd(a){this.r=a.hasAttribute("data-requires")?a.getAttribute("data-requires").split(" "):i;jc(a);this.l=a.parentNode.innerHTML;this.size=new L(a);delete this.size.e;delete this.size.b}
|
91
|
+
Rd.prototype.N=function(){if(!this.s)this.s=h,this.a=rb(this.l),this.T=D(".viewer",this.a)[0],this.Qb=D(".pagewidth",this.a),this.nextPage=D(".next",this.a),this.hb=D(".nextArticle",this.a),this.mb=D(".prev",this.a),this.lb=D(".prevArticle",this.a),this.jb=[],this.kb=[],this.Fa=[],this.cb=[],this.Qa=[],this.Ra=[],this.nb=[],this.ob=[],D("[data-ts-template]",this.a).forEach(function(a){var b,c;switch(a.getAttribute("data-ts-template")){case "position":b=this.jb;c=this.kb;break;case "index":b=this.Fa;
|
92
|
+
c=this.cb;break;case "currentdocument":b=this.Qa;c=this.Ra;break;case "publication":b=this.nb;c=this.ob;break;default:return}c.push(a.innerHTML);a.nodeName.toLowerCase()==="script"&&(c=document.createElement("div"),a.parentNode.replaceChild(c,a),a=c);b.push(a)},this),this.Lb=D(".menu",this.a),this.qb=D(".sidebar",this.a),this.j=[],Sd.forEach(function(a){wb(document,a,this)},this),this.Aa=k,Td(this);return this.a};
|
93
|
+
Rd.prototype.v=function(){if(this.s)Ud(),this.s=k,Sd.forEach(function(a){xb(document,a,this)},this),this.ob=this.nb=this.Ra=this.Qa=this.cb=this.Fa=this.kb=this.jb=this.lb=this.mb=this.hb=this.nextPage=this.qb=this.Lb=this.Qb=this.T=this.a=i,this.j.forEach(function(a){a&&a.v()}),this.ib=this.j=i,y("idletimer"),y("updateTOC"),Ud()};function Ud(){y("selectPages");y("animatePages")}var Sd="treesaver.index.updated,treesaver.pageschanged,treesaver.documentchanged,keydown,click,mousewheel,DOMMouseScroll".split(",");
|
94
|
+
wa?Sd.push("touchstart","touchmove","touchend","touchcancel"):Sd.push("mouseover");
|
95
|
+
Rd.prototype.handleEvent=function(a){switch(a.type){case "treesaver.pageschanged":return Vd(this);case "treesaver.index.updated":return hb(this.Wb,"updateTOC",this),Vd(this);case "treesaver.documentchanged":Wd(this);Xd(this);break;case "mouseover":a.touches||Td(this);break;case "touchstart":var b=Yd(a.target),c=Zd(b),d,e,g;if(r.contains(Yd(a.target)))if(a.stopPropagation(),a.preventDefault(),this.U&&!c)$d(this);else{if(c)for(d=c;d;){e=d.id;if(e==="prevPage"||e==="nextPage"){c=i;break}d=d.parentNode}b=
|
96
|
+
this.T.contains(b);d=a.touches[0].pageX;e=a.touches[0].pageY;g=ba();this.za={Hc:d,Ic:e,startTime:g,Ib:d,Jb:e,Gc:g,Sa:0,Ta:0,Cb:0,ea:0,tb:0,zc:0,fa:a.touches.length,Cc:b,rc:this.C,Tb:c,zb:c&&c.scrollWidth!==c.clientWidth};if(this.za.fa===2)this.za.yc=a.touches[1].pageX;ib(["resumeTasks"])}break;case "touchmove":if(c=this.za)a.stopPropagation(),a.preventDefault(),b=ba(),d=a.touches[0].pageX,e=a.touches[0].pageY,c.Cb=c.Hb-b,c.Sa=d-c.Ib,c.Ta=e-c.Jb,c.Hb=b,c.Ib=a.touches[0].pageX,c.Jb=a.touches[0].pageY,
|
97
|
+
c.zc+=c.Cb,c.ea+=c.Sa,c.tb+=c.Ta,c.fa=Math.min(a.touches.length,c.fa),c.Vb=c.fa===1&&Math.abs(c.ea)>=30&&Math.abs(c.ea)*2>Math.abs(c.tb),c.Tb&&(c.Ua||c.zb||!c.Vb)?(c.Ua=c.Ua||c.zb||Math.abs(c.tb)>=30,a=c.Tb,b=-c.Ta,a.scrollLeft+=-c.Sa,a.scrollTop+=b,c.Cc||Td(this)):c.fa===2?c.sb=a.touches[1].pageX-c.yc:(this.C=c.rc+c.ea,this.Ba(h));break;case "touchend":d=this.za;e=k;c=Yd(a.target);b=this.U||this.T.contains(c);ae(this);if(d&&(a.stopPropagation(),a.preventDefault(),d.Ua?b?this.S():Td(this):d.fa===
|
98
|
+
1?d.Hb?d.Vb&&((e=d.ea>0?be(this):ce(this))?this.S():Td(this)):(d=document.createEvent("MouseEvents"),d.initMouseEvent("click",h,h,a.view,1,a.changedTouches[0].screenX,a.changedTouches[0].screenY,a.changedTouches[0].clientX,a.changedTouches[0].clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,0,i),c.dispatchEvent(d)&&b?this.Aa?this.S():Td(this):b?this.S():Td(this),e=h):d.fa===2&&Math.abs(d.sb)>=30&&(d.ea<0&&d.sb<0?e=Nd():d.ea>0&&d.sb>0&&(e=Id()),e?this.S():Td(this)),!e))this.Ma=ba(),this.C=0,this.Ba();
|
99
|
+
break;case "touchcancel":return ae(this);case "keydown":a:if(this.U)$d(this),a.preventDefault();else if(!/input|select|textarea/i.test(a.target.tagName)&&!de(a)){switch(a.keyCode){case 34:case 39:case 40:case 74:case 32:ce(this);break;case 33:case 37:case 38:case 75:be(this);break;case 72:Id();break;case 76:Nd();break;default:b=f;break a}this.S();a.preventDefault()}return b;case "click":return this.click(a);case "mousewheel":case "DOMMouseScroll":if(de(a))c=h;else if(Zd(Yd(a.target)))c=h;else if(this.U)$d(this),
|
100
|
+
a.preventDefault();else if(b=ba(),!(this.Gb&&b-this.Gb<400))this.Gb=b,b=a.wheelDelta?a.wheelDelta:a.detail?-a.detail:0,d=this.T.contains(Yd(a.target)),b&&d&&(a.preventDefault(),a.stopPropagation(),b>0?be(this):ce(this),this.S());return c}};function de(a){return a.ctrlKey||a.shiftKey||a.altKey||a.metaKey}p=Rd.prototype;
|
101
|
+
p.click=function(a){if(de(a))return h;if(!("which"in a&&a.which!==1||a.button)){var b=Yd(a.target),c,d,e=k,g=e=c=k,j=i;d=i;if(this.U){if(this.A.a.contains(b)&&(c=b.nodeName==="A"?b:sb(b,"A"))&&c.href)if(d=x.oa(c.href),!Ed(d))return;$d(this);a.stopPropagation();a.preventDefault()}else{this.Lb.forEach(function(a){B(a,"menu-active")&&(g=a.contains(b),mb(a,"menu-active"))},this);(e=this.qb.some(function(a){return a.contains(b)}))||this.qb.forEach(function(a){ee(a)},this);if(this.j[0]&&this.j[0].a.contains(b))be(this),
|
102
|
+
c=h;else if(this.j[2]&&this.j[2].a.contains(b))ce(this),c=h;else for(e=this.j[1]&&this.j[1].a.contains(b);!c&&b&&b!==r;){if(e)B(b,"zoomable")&&(c=fe(this,b));else if(B(b,"prev"))be(this),c=h;else if(B(b,"next"))ce(this),c=h;else if(B(b,"prevArticle"))Id(),c=h;else if(B(b,"nextArticle"))Nd(),c=h;else if(B(b,"menu"))g||z(b,"menu-active"),c=h;else if(B(b,"sidebar")||B(b,"open-sidebar")||B(b,"toggle-sidebar")||B(b,"close-sidebar"))if(d=ge(b))B(b,"sidebar")||B(b,"open-sidebar")?he(d):B(b,"toggle-sidebar")?
|
103
|
+
ie(d):ee(d),c=h;if(!c&&b.href)if(j=b.getAttribute("target"),d=x.oa(b.href),j==="_blank")return;else if(j==="ts-lightbox"){b=b.parentNode;continue}else Ed(d)?c=h:j==="ts-treesaver"&&(S.appendChild(new T(d)),S.update(),Ed(d)&&(c=h));b=b.parentNode}c&&(a.stopPropagation(),a.preventDefault())}}};function Yd(a){a?a.nodeType!==1&&a.parentNode&&(a=a.parentNode||r):a=r;return a}function ae(a){hb(jb,"resumeTasks");a.za=i}
|
104
|
+
function Zd(a){for(;a&&a!=document.documentElement;){if(B(a,"scroll"))return a;a=a.parentNode}return i}function be(a){if(Fd())return je(a,-1),gb(Jd,50,[],"prevPage"),h}function ce(a){if(Kd())return je(a,1),gb(Od,50,[],"nextPage"),h}function Td(a){if(!a.Aa)a.Aa=h,z(a.a,"active"),E(document,"treesaver.active");var b=a.S,c=Za.idletimer;c?c.fb=ba():fb(b,5E3,1,i,k,"idletimer",a)}p.S=function(){if(this.Aa)this.Aa=k,mb(this.a,"active"),E(document,"treesaver.idle");y("idletimer")};
|
105
|
+
function he(a){E(document,"treesaver.sidebaractive",{sidebar:a});z(a,"sidebar-active")}function ee(a){B(a,"sidebar-active")&&E(document,"treesaver.sidebarinactive",{sidebar:a});mb(a,"sidebar-active")}function ie(a){B(a,"sidebar-active")?ee(a):he(a)}function ge(a){if(B(a,"sidebar"))return a;for(;(a=a.parentNode)!==i&&a.nodeType===1;)if(B(a,"sidebar"))return a;return i}
|
106
|
+
function fe(a,b){var c;c=parseInt(b.getAttribute("data-figureindex"),10);c=isNaN(c)?i:M.c[N.index].content.o[c];if(!c)return k;a.S();if(!a.U){var d=ke(),e=le,g,j,u,m=i;for(g=0,j=e.length;g<j;g+=1)if(u=e[g],u.ba()&&u.Ea(d)){m=u;break}a.A=m;if(!a.A)return k;a.U=h;a.A.N();a.a.parentNode.appendChild(a.A.a)}a.A.a=a.A.a;K(a.A.a,"width",Tb(a.a));K(a.A.a,"height",G(a.a));d=a.A;d.p=d.p;e=new L(d.p);e={e:e.e,b:e.b};u=oc(c,e);g=Tb(d.p.offsetParent);j=G(d.p.offsetParent);var n;d.p=d.p;d.s&&u?(hc(u.qa,d.p,u.name),
|
107
|
+
d.p.style.bottom="auto",d.p.style.right="auto",n=new L(d.p),u=n.e,m=n.b,c.La&&(u=Math.min(e.e,u),m=Math.min(e.b,m),K(d.p,"width",u),K(d.p,"height",m),z(d.p,"scroll"),Mc(d.p)),K(d.p,"left",(g-u-n.Ca)/2),K(d.p,"top",(j-m-n.O)/2),c=h):c=k;return!c?($d(a),k):h}function $d(a){if(a.U)a.U=k,a.a.parentNode.removeChild(a.A.a),a.A.v(),a.A=i}p.ba=function(){return!this.r?h:Xa(this.r,h)};p.Ea=function(a){return Sb(this.size,a)};
|
108
|
+
function Wd(a){var b=M.url;a.Fa.forEach(function(a){var d=D("a[href]",a).filter(function(a){return x.oa(a.href)===b}),e=[];d.length&&(e=ha(a.children),e.forEach(function(a){d.some(function(b){return a.contains(b)})?z(a,"current"):mb(a,"current")}))})}function Xd(a){a.jb.forEach(function(a,c){Lc(a,this.kb[c],{pagenumber:V+1||1,pagecount:!M.c[N.index]||N===Wc?1:M.c[N.index].B||1,url:M.url,documentnumber:W+1||1,documentcount:S.w.length})},a)}
|
109
|
+
function me(a){a.nb.forEach(function(a,c){Lc(a,this.ob[c],S.i)},a)}function ne(a){a.Qa.forEach(function(a,c){Lc(a,this.Ra[c],M.i)},a)}function oe(a){var b=pd;b&&a.Qb.forEach(function(a){K(a,"width",b)},a)}function pe(a,b){a.nodeName==="BUTTON"?a.disabled=!b:b?mb(a,"disabled"):z(a,"disabled")}function qe(a){if(a.nextPage){var b=Kd();a.nextPage.forEach(function(a){pe(a,b)},a)}}function re(a){if(a.hb){var b=Ld();a.hb.forEach(function(a){pe(a,b)},a)}}
|
110
|
+
function se(a){if(a.mb){var b=Fd();a.mb.forEach(function(a){pe(a,b)},a)}}function te(a){if(a.lb){var b=Gd();a.lb.forEach(function(a){pe(a,b)},a)}}function Vd(a){hb(a.vc,"selectPages",a)}p.vc=function(){Ud();ue(this);je(this);Xd(this);ne(this);me(this);oe(this);qe(this);re(this);se(this);te(this)};p.Wb=function(){y("updateTOC");var a={contents:S.h.map(function(a){return a.i})};this.Fa.forEach(function(b,c){Lc(b,this.cb[c],a)},this);Wd(this)};
|
111
|
+
function ue(a){var b=a.j;a.j=Pd(a.ib);b.forEach(function(a){if(a){var b=a.a;this.j.indexOf(a)===-1&&(a.v(),b&&b.parentNode===this.T&&this.T.removeChild(b))}},a);a.j.forEach(function(a,b){if(a){var e=a.a||a.N();e.parentNode||this.T.appendChild(e);e.setAttribute("id",b===0?"previousPage":b===1?"currentPage":"nextPage")}},a)}
|
112
|
+
function je(a,b){var c=a.j[0],d=a.j[1],e=a.j[2],g,j=d.size.Q/2;if(!(a.Pb&&b===a.Pb))a.Pb=b,a.da=[0,0,0],c&&(g=Math.max(d.size.marginLeft,c.size.marginRight),a.da[0]=-(j+g+c.size.Q/2)),e&&(g=Math.max(d.size.marginRight,e.size.marginLeft),a.da[2]=j+g+e.size.Q/2),b?(b>0?(d.a.setAttribute("id","nextPage"),e?(b=-a.da[2],e.a.setAttribute("id","currentPage")):b=-(d.size.Q+d.size.marginRight)):(d.a.setAttribute("id","previousPage"),c?(b=-a.da[0],c.a.setAttribute("id","currentPage")):b=d.size.Q+d.size.marginLeft),
|
113
|
+
a.da=a.da.map(function(a){return a+b}),a.Ma=ba(),a.C-=b):a.C=a.C||0,a.Ba()}p.Ba=function(a){!a&&this.C?this.Ma?(ib(["animatePages","resumeTasks"]),a=1-(ba()-this.Ma)/200,a=Math.max(0,Math.min(1,a)),(this.C=Math.round(this.C*a))?hb(this.Ba,"animatePages",this):(this.C=0,hb(jb,"resumeTasks"))):this.C=0:y("animatePages");this.j.forEach(function(a,c){a&&a.a&&Vb(a.a,this.da[c]+this.C,0)},this)};function ve(a){D(".container",a);this.r=a.hasAttribute("data-requires")?a.getAttribute("data-requires").split(" "):i;this.l=a.parentNode.innerHTML;this.size=new L(a);delete this.size.e;delete this.size.b}ve.prototype.N=function(){if(!this.s)this.s=h,this.a=rb(this.l),this.p=D(".container",this.a)[0];return this.a};ve.prototype.v=function(){if(this.s)this.s=k,this.a=i};ve.prototype.Ea=function(a){return Sb(this.size,a)};ve.prototype.ba=function(){return!this.r?h:Xa(this.r,h)};var $,we,le;function xe(){var a=[];Pb("chrome").forEach(function(b){var c;c=b.getAttribute("data-requires");if(!c||Xa(c.split(" ")))$.ja.appendChild(b),c=new Rd(b),a.push(c),$.ja.removeChild(b)});return a}function ye(){var a=[];Pb("lightbox").forEach(function(b){var c;c=b.getAttribute("data-requires");if(!c||Xa(c.split(" ")))$.ja.appendChild(b),c=new ve(b),a.push(c),$.ja.removeChild(b)});return a}
|
114
|
+
function ze(){if($.orientation!==window.orientation)Ua(),$.orientation=window.orientation,$.orientation%180?$.viewport.setAttribute("content","width=device-height, height=device-width"):$.viewport.setAttribute("content","width=device-width, height=device-height"),va&&!da&&!Ia&&window.scrollTo(0,0)}function ke(){if(t||!da)return(window.pageYOffset||window.pageXOffset)&&window.scrollTo(0,0),{e:window.innerWidth,b:window.innerHeight};else{var a=r;return{e:Tb(a),b:G(a)}}}
|
115
|
+
function Ae(){var a=ke(),b;if(a.b!==$.size.b||a.e!==$.size.e){$.size=a;if(!$.G||!$.G.ba()||!$.G.Ea(a)){b=we;var c,d,e,g=i;for(c=0,d=b.length;c<d;c+=1)if(e=b[c],e.ba()&&e.Ea(a)){g=e;break}b=g;if(!b)return;ob($.ja);$.G&&$.G.v();$.ja.appendChild(b.N());$.G=b;E(document,"treesaver.chromechanged",{node:b.a})}b=$.G;K(b.a,"width",a.e);K(b.a,"height",a.b);b.ib=i;b.ib={e:Tb(b.T),b:G(b.T)};M&&(Vd(b),hb(b.Wb,"updateTOC",b))}}
|
116
|
+
if(t){var Be=function(a){return function(){$.G&&Td($.G);a()}};q("treesaver.nextPage",Be(Od));q("treesaver.previousPage",Be(Jd));q("treesaver.nextArticle",Be(Nd));q("treesaver.previousArticle",Be(Id))};/*
|
116
117
|
Copyright 2011 Filipe Fortes ( www.fortes.com ).
|
117
118
|
Version: 0.1.
|
118
119
|
|
119
120
|
Licensed under MIT and GPLv2.
|
120
121
|
*/
|
121
|
-
function
|
122
|
-
function
|
123
|
-
function
|
124
|
-
|
125
|
-
if(
|
122
|
+
function Ce(){if(da)r.innerHTML=fa;else if(ga)r.innerHTML=ga;De();ab&&db.call(window,ab);jb();ab=-1;Ya=[];Za={};Jb=i;Hb=0;Ib=[];x.Ac();document.documentElement.className="js no-treesaver";document.documentElement.style.display="block"}function De(){y("unboot");xb(document,"DOMContentLoaded",Ee);delete ca.Sb;delete ca.Db}
|
123
|
+
function Ee(){ca.Db=h;(r=document.getElementById("ts_container"))?(da=h,fa=r.innerHTML):(da=k,r=document.body);ga=document.body.innerHTML;ob(r);r.innerHTML='<div id="loading">Loading '+document.title+"...</div>";document.documentElement.style.display="block";Fe()}
|
124
|
+
function Fe(){if(ca.Sb&&ca.Db&&document.body){De();wb(window,"unload",Ge);var a;$={orientation:0,size:{e:0,b:0}};ob(r);a=$;var b;da?b=r:(b=document.createElement("div"),b.setAttribute("id","chromeContainer"),r.appendChild(b));a.ja=b;a=$;b=D("meta[name=viewport]")[0];b||(b=document.createElement("meta"),b.setAttribute("name","viewport"),D("head")[0].appendChild(b));a.viewport=b;we=xe();le=ye();we.length?(Ae(),fb(Ae,100,Infinity,[],k,"checkState",f),va&&!da&&!Ia&&(wb(window,"orientationchange",ze),
|
125
|
+
gb(window.scrollTo,100,[0,0])),a=h):a=k;(!a||!ud())&&Ge()}}function Ge(){xb(window,"unload",Ge);Dd();va&&!da&&xb(window,"orientationchange",ze);$.G&&$.G.v();le=we=$=i;Ce()}
|
126
|
+
if(ma){document.documentElement.style.display="none";x.load();Ua();var He=function(){ca.Sb=h;Fe()},Ie,Je=document.querySelectorAll("link[rel~=resources]");(Ie=Je.length?Je[0].getAttribute("href"):i)?Hb?Hb===Ob?He():Ib.push(He):(Hb=1,Ib=[He],x.get(Ie,Mb)):He();/complete|loaded/.test(document.readyState)?Ee():wb(document,"DOMContentLoaded",Ee);gb(Ce,5E3,[],"unboot")};}).call(window);
|
metadata
CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 0
|
7
7
|
- 9
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.9.3.
|
9
|
+
- beta8
|
10
|
+
version: 0.9.3.beta8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Scott Kellum
|
@@ -49,6 +49,7 @@ files:
|
|
49
49
|
- stylesheets/seasons/tools/_css3.sass
|
50
50
|
- stylesheets/seasons/tools/_grid-tools.sass
|
51
51
|
- stylesheets/seasons/tools/_modular-scale.sass
|
52
|
+
- stylesheets/seasons/tools/_color-schemer.sass
|
52
53
|
- stylesheets/seasons/tools/_reset.sass
|
53
54
|
- templates/project/_chrome.scss
|
54
55
|
- templates/project/_config.sass
|
@@ -59,7 +60,9 @@ files:
|
|
59
60
|
- templates/project/resources.html
|
60
61
|
- templates/project/index.html
|
61
62
|
- templates/project/article.html
|
63
|
+
- templates/project/sample-ad.html
|
62
64
|
- templates/project/img.jpg
|
65
|
+
- templates/project/sample-ad.jpg
|
63
66
|
- templates/project/manifest.rb
|
64
67
|
has_rdoc: true
|
65
68
|
homepage: http://www.treesaver.net/
|