Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
05d381af
Commit
05d381af
authored
Apr 07, 2015
by
Chris Rebert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to Holder v2.5.2
Fixes #16216, FWICT
parent
4cf748b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
docs/assets/js/vendor/holder.js
docs/assets/js/vendor/holder.js
+4
-4
No files found.
docs/assets/js/vendor/holder.js
View file @
05d381af
/*!
Holder - client side image placeholders
Version 2.
4.1+f2l1h
© 201
4
Ivan Malopinsky - http://imsky.co
Version 2.
5.2+2mg3u
© 201
5
Ivan Malopinsky - http://imsky.co
Site: http://
imsky.github.io/holder
Site: http://
holderjs.com
Issues: https://github.com/imsky/holder/issues
License: http://opensource.org/licenses/MIT
*/
!
function
(
e
,
t
,
r
){
t
[
e
]
=
r
}(
"
onDomReady
"
,
this
,
function
(
e
){
"
use strict
"
;
function
t
(
e
){
if
(
!
b
){
if
(
!
a
.
body
)
return
i
(
t
);
for
(
b
=!
0
;
e
=
S
.
shift
();)
i
(
e
)}}
function
r
(
e
){(
y
||
e
.
type
===
s
||
a
[
c
]
===
u
)
&&
(
n
(),
t
())}
function
n
(){
y
?(
a
[
x
](
m
,
r
,
d
),
e
[
x
](
s
,
r
,
d
)):(
a
[
g
](
v
,
r
),
e
[
g
](
h
,
r
))}
function
i
(
e
,
t
){
setTimeout
(
e
,
+
t
>=
0
?
t
:
1
)}
function
o
(
e
){
b
?
i
(
e
):
S
.
push
(
e
)}
null
==
document
.
readyState
&&
document
.
addEventListener
&&
(
document
.
addEventListener
(
"
DOMContentLoaded
"
,
function
E
(){
document
.
removeEventListener
(
"
DOMContentLoaded
"
,
E
,
!
1
),
document
.
readyState
=
"
complete
"
},
!
1
),
document
.
readyState
=
"
loading
"
);
var
a
=
e
.
document
,
l
=
a
.
documentElement
,
s
=
"
load
"
,
d
=!
1
,
h
=
"
on
"
+
s
,
u
=
"
complete
"
,
c
=
"
readyState
"
,
f
=
"
attachEvent
"
,
g
=
"
detachEvent
"
,
p
=
"
addEventListener
"
,
m
=
"
DOMContentLoaded
"
,
v
=
"
onreadystatechange
"
,
x
=
"
removeEventListener
"
,
y
=
p
in
a
,
w
=
d
,
b
=
d
,
S
=
[];
if
(
a
[
c
]
===
u
)
i
(
t
);
else
if
(
y
)
a
[
p
](
m
,
r
,
d
),
e
[
p
](
s
,
r
,
d
);
else
{
a
[
f
](
v
,
r
),
e
[
f
](
h
,
r
);
try
{
w
=
null
==
e
.
frameElement
&&
l
}
catch
(
C
){}
w
&&
w
.
doScroll
&&!
function
k
(){
if
(
!
b
){
try
{
w
.
doScroll
(
"
left
"
)}
catch
(
e
){
return
i
(
k
,
50
)}
n
(),
t
()}}()}
return
o
.
version
=
"
1.4.0
"
,
o
.
isReady
=
function
(){
return
b
},
o
}(
this
)),
document
.
querySelectorAll
||
(
document
.
querySelectorAll
=
function
(
e
){
var
t
,
r
=
document
.
createElement
(
"
style
"
),
n
=
[];
for
(
document
.
documentElement
.
firstChild
.
appendChild
(
r
),
document
.
_qsa
=
[],
r
.
styleSheet
.
cssText
=
e
+
"
{x-qsa:expression(document._qsa && document._qsa.push(this))}
"
,
window
.
scrollBy
(
0
,
0
),
r
.
parentNode
.
removeChild
(
r
);
document
.
_qsa
.
length
;)
t
=
document
.
_qsa
.
shift
(),
t
.
style
.
removeAttribute
(
"
x-qsa
"
),
n
.
push
(
t
);
return
document
.
_qsa
=
null
,
n
}),
document
.
querySelector
||
(
document
.
querySelector
=
function
(
e
){
var
t
=
document
.
querySelectorAll
(
e
);
return
t
.
length
?
t
[
0
]:
null
}),
document
.
getElementsByClassName
||
(
document
.
getElementsByClassName
=
function
(
e
){
return
e
=
String
(
e
).
replace
(
/^|
\s
+/g
,
"
.
"
),
document
.
querySelectorAll
(
e
)}),
Object
.
keys
||
(
Object
.
keys
=
function
(
e
){
if
(
e
!==
Object
(
e
))
throw
TypeError
(
"
Object.keys called on non-object
"
);
var
t
,
r
=
[];
for
(
t
in
e
)
Object
.
prototype
.
hasOwnProperty
.
call
(
e
,
t
)
&&
r
.
push
(
t
);
return
r
}),
function
(
e
){
var
t
=
"
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
"
;
e
.
atob
=
e
.
atob
||
function
(
e
){
e
=
String
(
e
);
var
r
,
n
=
0
,
i
=
[],
o
=
0
,
a
=
0
;
if
(
e
=
e
.
replace
(
/
\s
/g
,
""
),
e
.
length
%
4
===
0
&&
(
e
=
e
.
replace
(
/=+$/
,
""
)),
e
.
length
%
4
===
1
)
throw
Error
(
"
InvalidCharacterError
"
);
if
(
/
[^
+
/
0-9A-Za-z
]
/
.
test
(
e
))
throw
Error
(
"
InvalidCharacterError
"
);
for
(;
n
<
e
.
length
;)
r
=
t
.
indexOf
(
e
.
charAt
(
n
)),
o
=
o
<<
6
|
r
,
a
+=
6
,
24
===
a
&&
(
i
.
push
(
String
.
fromCharCode
(
o
>>
16
&
255
)),
i
.
push
(
String
.
fromCharCode
(
o
>>
8
&
255
)),
i
.
push
(
String
.
fromCharCode
(
255
&
o
)),
a
=
0
,
o
=
0
),
n
+=
1
;
return
12
===
a
?(
o
>>=
4
,
i
.
push
(
String
.
fromCharCode
(
255
&
o
))):
18
===
a
&&
(
o
>>=
2
,
i
.
push
(
String
.
fromCharCode
(
o
>>
8
&
255
)),
i
.
push
(
String
.
fromCharCode
(
255
&
o
))),
i
.
join
(
""
)},
e
.
btoa
=
e
.
btoa
||
function
(
e
){
e
=
String
(
e
);
var
r
,
n
,
i
,
o
,
a
,
l
,
s
,
d
=
0
,
h
=
[];
if
(
/
[^\x
00-
\x
FF
]
/
.
test
(
e
))
throw
Error
(
"
InvalidCharacterError
"
);
for
(;
d
<
e
.
length
;)
r
=
e
.
charCodeAt
(
d
++
),
n
=
e
.
charCodeAt
(
d
++
),
i
=
e
.
charCodeAt
(
d
++
),
o
=
r
>>
2
,
a
=
(
3
&
r
)
<<
4
|
n
>>
4
,
l
=
(
15
&
n
)
<<
2
|
i
>>
6
,
s
=
63
&
i
,
d
===
e
.
length
+
2
?(
l
=
64
,
s
=
64
):
d
===
e
.
length
+
1
&&
(
s
=
64
),
h
.
push
(
t
.
charAt
(
o
),
t
.
charAt
(
a
),
t
.
charAt
(
l
),
t
.
charAt
(
s
));
return
h
.
join
(
""
)}}(
this
),
function
(){
function
e
(
t
,
r
,
n
){
t
.
document
;
var
i
,
o
=
t
.
currentStyle
[
r
].
match
(
/
([\d\.]
+
)(
%|cm|em|in|mm|pc|pt|
)
/
)
||
[
0
,
0
,
""
],
a
=
o
[
1
],
l
=
o
[
2
];
return
n
=
n
?
/%|em/
.
test
(
l
)
&&
t
.
parentElement
?
e
(
t
.
parentElement
,
"
fontSize
"
,
null
):
16
:
n
,
i
=
"
fontSize
"
==
r
?
n
:
/width/i
.
test
(
r
)?
t
.
clientWidth
:
t
.
clientHeight
,
"
%
"
==
l
?
a
/
100
*
i
:
"
cm
"
==
l
?.
3937
*
a
*
96
:
"
em
"
==
l
?
a
*
n
:
"
in
"
==
l
?
96
*
a
:
"
mm
"
==
l
?.
3937
*
a
*
96
/
10
:
"
pc
"
==
l
?
12
*
a
*
96
/
72
:
"
pt
"
==
l
?
96
*
a
/
72
:
a
}
function
t
(
e
,
t
){
var
r
=
"
border
"
==
t
?
"
Width
"
:
""
,
n
=
t
+
"
Top
"
+
r
,
i
=
t
+
"
Right
"
+
r
,
o
=
t
+
"
Bottom
"
+
r
,
a
=
t
+
"
Left
"
+
r
;
e
[
t
]
=
(
e
[
n
]
==
e
[
i
]
&&
e
[
n
]
==
e
[
o
]
&&
e
[
n
]
==
e
[
a
]?[
e
[
n
]]:
e
[
n
]
==
e
[
o
]
&&
e
[
a
]
==
e
[
i
]?[
e
[
n
],
e
[
i
]]:
e
[
a
]
==
e
[
i
]?[
e
[
n
],
e
[
i
],
e
[
o
]]:[
e
[
n
],
e
[
i
],
e
[
o
],
e
[
a
]]).
join
(
"
"
)}
function
r
(
r
){
var
n
,
i
=
this
,
o
=
r
.
currentStyle
,
a
=
e
(
r
,
"
fontSize
"
),
l
=
function
(
e
){
return
"
-
"
+
e
.
toLowerCase
()};
for
(
n
in
o
)
if
(
Array
.
prototype
.
push
.
call
(
i
,
"
styleFloat
"
==
n
?
"
float
"
:
n
.
replace
(
/
[
A-Z
]
/
,
l
)),
"
width
"
==
n
)
i
[
n
]
=
r
.
offsetWidth
+
"
px
"
;
else
if
(
"
height
"
==
n
)
i
[
n
]
=
r
.
offsetHeight
+
"
px
"
;
else
if
(
"
styleFloat
"
==
n
)
i
.
float
=
o
[
n
];
else
if
(
/margin.|padding.|border.+W/
.
test
(
n
)
&&
"
auto
"
!=
i
[
n
])
i
[
n
]
=
Math
.
round
(
e
(
r
,
n
,
a
))
+
"
px
"
;
else
if
(
/^outline/
.
test
(
n
))
try
{
i
[
n
]
=
o
[
n
]}
catch
(
s
){
i
.
outlineColor
=
o
.
color
,
i
.
outlineStyle
=
i
.
outlineStyle
||
"
none
"
,
i
.
outlineWidth
=
i
.
outlineWidth
||
"
0px
"
,
i
.
outline
=
[
i
.
outlineColor
,
i
.
outlineWidth
,
i
.
outlineStyle
].
join
(
"
"
)}
else
i
[
n
]
=
o
[
n
];
t
(
i
,
"
margin
"
),
t
(
i
,
"
padding
"
),
t
(
i
,
"
border
"
),
i
.
fontSize
=
Math
.
round
(
a
)
+
"
px
"
}
window
.
getComputedStyle
||
(
r
.
prototype
=
{
constructor
:
r
,
getPropertyPriority
:
function
(){
throw
new
Error
(
"
NotSupportedError: DOM Exception 9
"
)},
getPropertyValue
:
function
(
e
){
var
t
=
e
.
replace
(
/-
([
a-z
])
/g
,
function
(
e
){
return
e
=
e
.
charAt
?
e
.
split
(
""
):
e
,
e
[
1
].
toUpperCase
()}),
r
=
this
[
t
];
return
r
},
item
:
function
(
e
){
return
this
[
e
]},
removeProperty
:
function
(){
throw
new
Error
(
"
NoModificationAllowedError: DOM Exception 7
"
)},
setProperty
:
function
(){
throw
new
Error
(
"
NoModificationAllowedError: DOM Exception 7
"
)},
getPropertyCSSValue
:
function
(){
throw
new
Error
(
"
NotSupportedError: DOM Exception 9
"
)}},
window
.
getComputedStyle
=
function
(
e
){
return
new
r
(
e
)})}(),
Object
.
prototype
.
hasOwnProperty
||
(
Object
.
prototype
.
hasOwnProperty
=
function
(
e
){
var
t
=
this
.
__proto__
||
this
.
constructor
.
prototype
;
return
e
in
this
&&
(
!
(
e
in
t
)
||
t
[
e
]
!==
this
[
e
])}),
function
(
e
,
t
){
e
.
augment
=
t
()}(
this
,
function
(){
"
use strict
"
;
var
e
=
function
(){},
t
=
Array
.
prototype
.
slice
,
r
=
function
(
r
,
n
){
var
i
=
e
.
prototype
=
"
function
"
==
typeof
r
?
r
.
prototype
:
r
,
o
=
new
e
,
a
=
n
.
apply
(
o
,
t
.
call
(
arguments
,
2
).
concat
(
i
));
if
(
"
object
"
==
typeof
a
)
for
(
var
l
in
a
)
o
[
l
]
=
a
[
l
];
if
(
!
o
.
hasOwnProperty
(
"
constructor
"
))
return
o
;
var
s
=
o
.
constructor
;
return
s
.
prototype
=
o
,
s
};
return
r
.
defclass
=
function
(
e
){
var
t
=
e
.
constructor
;
return
t
.
prototype
=
e
,
t
},
r
.
extend
=
function
(
e
,
t
){
return
r
(
e
,
function
(
e
){
return
this
.
uber
=
e
,
t
})},
r
}),
function
(
e
,
t
){
function
r
(
e
,
t
,
r
,
o
){
var
a
=
n
(
r
.
substr
(
r
.
lastIndexOf
(
e
.
domain
)),
e
);
a
&&
i
(
null
,
o
,
a
,
t
)}
function
n
(
e
,
t
){
for
(
var
r
=
{
theme
:
p
(
A
.
settings
.
themes
.
gray
,
null
),
stylesheets
:
t
.
stylesheets
,
holderURL
:[]},
n
=!
1
,
i
=
String
.
fromCharCode
(
11
),
o
=
e
.
replace
(
/
([^\\])\/
/g
,
"
$1
"
+
i
).
split
(
i
),
a
=
/%
[
0-9a-f
]{2}
/gi
,
l
=
o
.
length
,
s
=
0
;
l
>
s
;
s
++
){
var
d
=
o
[
s
];
if
(
d
.
match
(
a
))
try
{
d
=
decodeURIComponent
(
d
)}
catch
(
h
){
d
=
o
[
s
]}
var
u
=!
1
;
if
(
A
.
flags
.
dimensions
.
match
(
d
))
n
=!
0
,
r
.
dimensions
=
A
.
flags
.
dimensions
.
output
(
d
),
u
=!
0
;
else
if
(
A
.
flags
.
fluid
.
match
(
d
))
n
=!
0
,
r
.
dimensions
=
A
.
flags
.
fluid
.
output
(
d
),
r
.
fluid
=!
0
,
u
=!
0
;
else
if
(
A
.
flags
.
textmode
.
match
(
d
))
r
.
textmode
=
A
.
flags
.
textmode
.
output
(
d
),
u
=!
0
;
else
if
(
A
.
flags
.
colors
.
match
(
d
)){
var
c
=
A
.
flags
.
colors
.
output
(
d
);
r
.
theme
=
p
(
r
.
theme
,
c
),
u
=!
0
}
else
if
(
t
.
themes
[
d
])
t
.
themes
.
hasOwnProperty
(
d
)
&&
(
r
.
theme
=
p
(
t
.
themes
[
d
],
null
)),
u
=!
0
;
else
if
(
A
.
flags
.
font
.
match
(
d
))
r
.
font
=
A
.
flags
.
font
.
output
(
d
),
u
=!
0
;
else
if
(
A
.
flags
.
auto
.
match
(
d
))
r
.
auto
=!
0
,
u
=!
0
;
else
if
(
A
.
flags
.
text
.
match
(
d
))
r
.
text
=
A
.
flags
.
text
.
output
(
d
),
u
=!
0
;
else
if
(
A
.
flags
.
random
.
match
(
d
)){
null
==
A
.
vars
.
cache
.
themeKeys
&&
(
A
.
vars
.
cache
.
themeKeys
=
Object
.
keys
(
t
.
themes
));
var
f
=
A
.
vars
.
cache
.
themeKeys
[
0
|
Math
.
random
()
*
A
.
vars
.
cache
.
themeKeys
.
length
];
r
.
theme
=
p
(
t
.
themes
[
f
],
null
),
u
=!
0
}
u
&&
r
.
holderURL
.
push
(
d
)}
return
r
.
holderURL
.
unshift
(
t
.
domain
),
r
.
holderURL
=
r
.
holderURL
.
join
(
"
/
"
),
n
?
r
:
!
1
}
function
i
(
e
,
t
,
r
,
n
){
var
i
=
r
.
dimensions
,
a
=
r
.
theme
,
l
=
i
.
width
+
"
x
"
+
i
.
height
;
if
(
e
=
null
==
e
?
r
.
fluid
?
"
fluid
"
:
"
image
"
:
e
,
null
!=
r
.
text
&&
(
a
.
text
=
r
.
text
,
"
object
"
===
t
.
nodeName
.
toLowerCase
())){
for
(
var
d
=
a
.
text
.
split
(
"
\\
n
"
),
u
=
0
;
u
<
d
.
length
;
u
++
)
d
[
u
]
=
b
(
d
[
u
]);
a
.
text
=
d
.
join
(
"
\\
n
"
)}
var
f
=
r
.
holderURL
,
g
=
p
(
n
,
null
);
r
.
font
&&
(
a
.
font
=
r
.
font
,
!
g
.
noFontFallback
&&
"
img
"
===
t
.
nodeName
.
toLowerCase
()
&&
A
.
setup
.
supportsCanvas
&&
"
svg
"
===
g
.
renderer
&&
(
g
=
p
(
g
,{
renderer
:
"
canvas
"
}))),
r
.
font
&&
"
canvas
"
==
g
.
renderer
&&
(
g
.
reRender
=!
0
),
"
background
"
==
e
?
null
==
t
.
getAttribute
(
"
data-background-src
"
)
&&
c
(
t
,{
"
data-background-src
"
:
f
}):
c
(
t
,{
"
data-src
"
:
f
}),
r
.
theme
=
a
,
t
.
holderData
=
{
flags
:
r
,
renderSettings
:
g
},(
"
image
"
==
e
||
"
fluid
"
==
e
)
&&
c
(
t
,{
alt
:
a
.
text
?(
a
.
text
.
length
>
16
?
a
.
text
.
substring
(
0
,
16
)
+
"
…
"
:
a
.
text
)
+
"
[
"
+
l
+
"
]
"
:
l
}),
"
image
"
==
e
?(
"
html
"
!=
g
.
renderer
&&
r
.
auto
||
(
t
.
style
.
width
=
i
.
width
+
"
px
"
,
t
.
style
.
height
=
i
.
height
+
"
px
"
),
"
html
"
==
g
.
renderer
?
t
.
style
.
backgroundColor
=
a
.
background
:(
o
(
e
,{
dimensions
:
i
,
theme
:
a
,
flags
:
r
},
t
,
g
),
r
.
textmode
&&
"
exact
"
==
r
.
textmode
&&
(
A
.
vars
.
resizableImages
.
push
(
t
),
s
(
t
)))):
"
background
"
==
e
&&
"
html
"
!=
g
.
renderer
?
o
(
e
,{
dimensions
:
i
,
theme
:
a
,
flags
:
r
},
t
,
g
):
"
fluid
"
==
e
&&
(
"
%
"
==
i
.
height
.
slice
(
-
1
)?
t
.
style
.
height
=
i
.
height
:
null
!=
r
.
auto
&&
r
.
auto
||
(
t
.
style
.
height
=
i
.
height
+
"
px
"
),
"
%
"
==
i
.
width
.
slice
(
-
1
)?
t
.
style
.
width
=
i
.
width
:
null
!=
r
.
auto
&&
r
.
auto
||
(
t
.
style
.
width
=
i
.
width
+
"
px
"
),(
"
inline
"
==
t
.
style
.
display
||
""
===
t
.
style
.
display
||
"
none
"
==
t
.
style
.
display
)
&&
(
t
.
style
.
display
=
"
block
"
),
h
(
t
),
"
html
"
==
g
.
renderer
?
t
.
style
.
backgroundColor
=
a
.
background
:(
A
.
vars
.
resizableImages
.
push
(
t
),
s
(
t
)))}
function
o
(
e
,
t
,
r
,
n
){
function
i
(){
var
e
=
null
;
switch
(
n
.
renderer
){
case
"
canvas
"
:
e
=
L
(
s
);
break
;
case
"
svg
"
:
e
=
O
(
s
,
n
);
break
;
default
:
throw
"
Holder: invalid renderer:
"
+
n
.
renderer
}
return
e
}
var
o
=
null
;
switch
(
n
.
renderer
){
case
"
svg
"
:
if
(
!
A
.
setup
.
supportsSVG
)
return
;
break
;
case
"
canvas
"
:
if
(
!
A
.
setup
.
supportsCanvas
)
return
;
break
;
default
:
return
}{
var
l
=
{
width
:
t
.
dimensions
.
width
,
height
:
t
.
dimensions
.
height
,
theme
:
t
.
theme
,
flags
:
t
.
flags
},
s
=
a
(
l
);({
text
:
l
.
text
,
width
:
l
.
width
,
height
:
l
.
height
,
textHeight
:
l
.
font
.
size
,
font
:
l
.
font
.
family
,
fontWeight
:
l
.
font
.
weight
,
template
:
l
.
theme
})}
if
(
o
=
i
(),
null
==
o
)
throw
"
Holder: couldn't render placeholder
"
;
"
background
"
==
e
?(
r
.
style
.
backgroundImage
=
"
url(
"
+
o
+
"
)
"
,
r
.
style
.
backgroundSize
=
l
.
width
+
"
px
"
+
l
.
height
+
"
px
"
):(
"
img
"
===
r
.
nodeName
.
toLowerCase
()?
c
(
r
,{
src
:
o
}):
"
object
"
===
r
.
nodeName
.
toLowerCase
()
&&
(
c
(
r
,{
data
:
o
}),
c
(
r
,{
type
:
"
image/svg+xml
"
})),
n
.
reRender
&&
setTimeout
(
function
(){
var
e
=
i
();
if
(
null
==
e
)
throw
"
Holder: couldn't render placeholder
"
;
"
img
"
===
r
.
nodeName
.
toLowerCase
()?
c
(
r
,{
src
:
e
}):
"
object
"
===
r
.
nodeName
.
toLowerCase
()
&&
(
c
(
r
,{
data
:
e
}),
c
(
r
,{
type
:
"
image/svg+xml
"
}))},
100
)),
c
(
r
,{
"
data-holder-rendered
"
:
!
0
})}
function
a
(
e
){
function
t
(
e
,
t
,
r
,
n
){
t
.
width
=
r
,
t
.
height
=
n
,
e
.
width
=
Math
.
max
(
e
.
width
,
t
.
width
),
e
.
height
+=
t
.
height
,
e
.
add
(
t
)}
switch
(
e
.
font
=
{
family
:
e
.
theme
.
font
?
e
.
theme
.
font
:
"
Arial, Helvetica, Open Sans, sans-serif
"
,
size
:
l
(
e
.
width
,
e
.
height
,
e
.
theme
.
size
?
e
.
theme
.
size
:
A
.
defaults
.
size
),
units
:
e
.
theme
.
units
?
e
.
theme
.
units
:
A
.
defaults
.
units
,
weight
:
e
.
theme
.
fontweight
?
e
.
theme
.
fontweight
:
"
bold
"
},
e
.
text
=
e
.
theme
.
text
?
e
.
theme
.
text
:
Math
.
floor
(
e
.
width
)
+
"
x
"
+
Math
.
floor
(
e
.
height
),
e
.
flags
.
textmode
){
case
"
literal
"
:
e
.
text
=
e
.
flags
.
dimensions
.
width
+
"
x
"
+
e
.
flags
.
dimensions
.
height
;
break
;
case
"
exact
"
:
if
(
!
e
.
flags
.
exactDimensions
)
break
;
e
.
text
=
Math
.
floor
(
e
.
flags
.
exactDimensions
.
width
)
+
"
x
"
+
Math
.
floor
(
e
.
flags
.
exactDimensions
.
height
)}
var
r
=
new
z
({
width
:
e
.
width
,
height
:
e
.
height
}),
n
=
r
.
Shape
,
i
=
new
n
.
Rect
(
"
holderBg
"
,{
fill
:
e
.
theme
.
background
});
i
.
resize
(
e
.
width
,
e
.
height
),
r
.
root
.
add
(
i
);
var
o
=
new
n
.
Group
(
"
holderTextGroup
"
,{
text
:
e
.
text
,
align
:
"
center
"
,
font
:
e
.
font
,
fill
:
e
.
theme
.
foreground
});
o
.
moveTo
(
null
,
null
,
1
),
r
.
root
.
add
(
o
);
var
a
=
o
.
textPositionData
=
T
(
r
);
if
(
!
a
)
throw
"
Holder: staging fallback not supported yet.
"
;
o
.
properties
.
leading
=
a
.
boundingBox
.
height
;
var
s
=
null
,
d
=
null
;
if
(
a
.
lineCount
>
1
){
var
h
=
0
,
u
=
0
,
c
=
e
.
width
*
A
.
setup
.
lineWrapRatio
,
f
=
0
;
d
=
new
n
.
Group
(
"
line
"
+
f
);
for
(
var
g
=
0
;
g
<
a
.
words
.
length
;
g
++
){
var
p
=
a
.
words
[
g
];
s
=
new
n
.
Text
(
p
.
text
);
var
m
=
"
\\
n
"
==
p
.
text
;(
h
+
p
.
width
>=
c
||
m
===!
0
)
&&
(
t
(
o
,
d
,
h
,
o
.
properties
.
leading
),
h
=
0
,
u
+=
o
.
properties
.
leading
,
f
+=
1
,
d
=
new
n
.
Group
(
"
line
"
+
f
),
d
.
y
=
u
),
m
!==!
0
&&
(
s
.
moveTo
(
h
,
0
),
h
+=
a
.
spaceWidth
+
p
.
width
,
d
.
add
(
s
))}
t
(
o
,
d
,
h
,
o
.
properties
.
leading
);
for
(
var
v
in
o
.
children
)
d
=
o
.
children
[
v
],
d
.
moveTo
((
o
.
width
-
d
.
width
)
/
2
,
null
,
null
);
o
.
moveTo
((
e
.
width
-
o
.
width
)
/
2
,(
e
.
height
-
o
.
height
)
/
2
,
null
),(
e
.
height
-
o
.
height
)
/
2
<
0
&&
o
.
moveTo
(
null
,
0
,
null
)}
else
s
=
new
n
.
Text
(
e
.
text
),
d
=
new
n
.
Group
(
"
line0
"
),
d
.
add
(
s
),
o
.
add
(
d
),
o
.
moveTo
((
e
.
width
-
a
.
boundingBox
.
width
)
/
2
,(
e
.
height
-
a
.
boundingBox
.
height
)
/
2
,
null
);
return
r
}
function
l
(
e
,
t
,
r
){
t
=
parseInt
(
t
,
10
),
e
=
parseInt
(
e
,
10
);
var
n
=
Math
.
max
(
t
,
e
),
i
=
Math
.
min
(
t
,
e
),
o
=
A
.
defaults
.
scale
,
a
=
Math
.
min
(.
75
*
i
,.
75
*
n
*
o
);
return
Math
.
round
(
Math
.
max
(
r
,
a
))}
function
s
(
e
){
var
t
;
t
=
null
==
e
||
null
==
e
.
nodeType
?
A
.
vars
.
resizableImages
:[
e
];
for
(
var
r
in
t
)
if
(
t
.
hasOwnProperty
(
r
)){
var
n
=
t
[
r
];
if
(
n
.
holderData
){
var
i
=
n
.
holderData
.
flags
,
a
=
d
(
n
,
k
.
invisibleErrorFn
(
s
));
if
(
a
){
if
(
i
.
fluid
&&
i
.
auto
){
var
l
=
n
.
holderData
.
fluidConfig
;
switch
(
l
.
mode
){
case
"
width
"
:
a
.
height
=
a
.
width
/
l
.
ratio
;
break
;
case
"
height
"
:
a
.
width
=
a
.
height
*
l
.
ratio
}}
var
h
=
{
dimensions
:
a
,
theme
:
i
.
theme
,
flags
:
i
};
i
.
textmode
&&
"
exact
"
==
i
.
textmode
&&
(
i
.
exactDimensions
=
a
,
h
.
dimensions
=
i
.
dimensions
),
o
(
"
image
"
,
h
,
n
,
n
.
holderData
.
renderSettings
)}}}}
function
d
(
e
,
t
){
var
r
=
{
height
:
e
.
clientHeight
,
width
:
e
.
clientWidth
};
return
r
.
height
||
r
.
width
?(
e
.
removeAttribute
(
"
data-holder-invisible
"
),
r
):(
c
(
e
,{
"
data-holder-invisible
"
:
!
0
}),
t
.
call
(
this
,
e
),
void
0
)}
function
h
(
e
){
if
(
e
.
holderData
){
var
t
=
d
(
e
,
k
.
invisibleErrorFn
(
h
));
if
(
t
){
var
r
=
e
.
holderData
.
flags
,
n
=
{
fluidHeight
:
"
%
"
==
r
.
dimensions
.
height
.
slice
(
-
1
),
fluidWidth
:
"
%
"
==
r
.
dimensions
.
width
.
slice
(
-
1
),
mode
:
null
,
initialDimensions
:
t
};
n
.
fluidWidth
&&!
n
.
fluidHeight
?(
n
.
mode
=
"
width
"
,
n
.
ratio
=
n
.
initialDimensions
.
width
/
parseFloat
(
r
.
dimensions
.
height
)):
!
n
.
fluidWidth
&&
n
.
fluidHeight
&&
(
n
.
mode
=
"
height
"
,
n
.
ratio
=
parseFloat
(
r
.
dimensions
.
width
)
/
n
.
initialDimensions
.
height
),
e
.
holderData
.
fluidConfig
=
n
}}}
function
u
(
e
,
t
){
return
null
==
t
?
E
.
createElement
(
e
):
E
.
createElementNS
(
t
,
e
)}
function
c
(
e
,
t
){
for
(
var
r
in
t
)
e
.
setAttribute
(
r
,
t
[
r
])}
function
f
(
e
,
t
,
r
){
if
(
null
==
e
){
e
=
u
(
"
svg
"
,
C
);
var
n
=
u
(
"
defs
"
,
C
);
e
.
appendChild
(
n
)}
return
e
.
webkitMatchesSelector
&&
e
.
setAttribute
(
"
xmlns
"
,
C
),
c
(
e
,{
width
:
t
,
height
:
r
,
viewBox
:
"
0 0
"
+
t
+
"
"
+
r
,
preserveAspectRatio
:
"
none
"
}),
e
}
function
g
(
e
,
r
){
if
(
t
.
XMLSerializer
){{
var
n
=
new
XMLSerializer
,
i
=
""
,
o
=
r
.
stylesheets
;
e
.
querySelector
(
"
defs
"
)}
if
(
r
.
svgXMLStylesheet
){
for
(
var
a
=
(
new
DOMParser
).
parseFromString
(
"
<xml />
"
,
"
application/xml
"
),
l
=
o
.
length
-
1
;
l
>=
0
;
l
--
){
var
s
=
a
.
createProcessingInstruction
(
"
xml-stylesheet
"
,
'
href="
'
+
o
[
l
]
+
'
" rel="stylesheet"
'
);
a
.
insertBefore
(
s
,
a
.
firstChild
)}
var
d
=
a
.
createProcessingInstruction
(
"
xml
"
,
'
version="1.0" encoding="UTF-8" standalone="yes"
'
);
a
.
insertBefore
(
d
,
a
.
firstChild
),
a
.
removeChild
(
a
.
documentElement
),
i
=
n
.
serializeToString
(
a
)}
var
h
=
n
.
serializeToString
(
e
);
return
h
=
h
.
replace
(
/
\&
amp;
(\#[
0-9
]{2,}\;)
/g
,
"
&$1
"
),
i
+
h
}}
function
p
(
e
,
t
){
var
r
=
{};
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
r
[
n
]
=
e
[
n
]);
if
(
null
!=
t
)
for
(
var
i
in
t
)
t
.
hasOwnProperty
(
i
)
&&
(
r
[
i
]
=
t
[
i
]);
return
r
}
function
m
(
e
){
var
t
=
[];
for
(
var
r
in
e
)
e
.
hasOwnProperty
(
r
)
&&
t
.
push
(
r
+
"
:
"
+
e
[
r
]);
return
t
.
join
(
"
;
"
)}
function
v
(
e
){
A
.
vars
.
debounceTimer
||
e
.
call
(
this
),
A
.
vars
.
debounceTimer
&&
clearTimeout
(
A
.
vars
.
debounceTimer
),
A
.
vars
.
debounceTimer
=
setTimeout
(
function
(){
A
.
vars
.
debounceTimer
=
null
,
e
.
call
(
this
)},
A
.
setup
.
debounce
)}
function
x
(){
v
(
function
(){
s
(
null
)})}
function
y
(
e
){
var
r
=
null
;
return
"
string
"
==
typeof
e
?
r
=
E
.
querySelectorAll
(
e
):
t
.
NodeList
&&
e
instanceof
t
.
NodeList
?
r
=
e
:
t
.
Node
&&
e
instanceof
t
.
Node
?
r
=
[
e
]:
t
.
HTMLCollection
&&
e
instanceof
t
.
HTMLCollection
?
r
=
e
:
null
===
e
&&
(
r
=
[]),
r
}
function
w
(
e
,
t
){
var
r
=
new
Image
;
r
.
onerror
=
function
(){
t
.
call
(
this
,
!
1
)},
r
.
onload
=
function
(){
t
.
call
(
this
,
!
0
)},
r
.
src
=
e
}
function
b
(
e
){
for
(
var
t
=
[],
r
=
0
,
n
=
e
.
length
-
1
;
n
>=
0
;
n
--
)
r
=
e
.
charCodeAt
(
n
),
r
>
128
?
t
.
unshift
([
"
&#
"
,
r
,
"
;
"
].
join
(
""
)):
t
.
unshift
(
e
[
n
]);
return
t
.
join
(
""
)}
function
S
(
e
){
return
e
.
replace
(
/&#
(\d
+
)
;/g
,
function
(
e
,
t
){
return
String
.
fromCharCode
(
t
)})}
var
C
=
"
http://www.w3.org/2000/svg
"
,
E
=
t
.
document
,
k
=
{
addTheme
:
function
(
e
,
t
){
return
null
!=
e
&&
null
!=
t
&&
(
A
.
settings
.
themes
[
e
]
=
t
),
delete
A
.
vars
.
cache
.
themeKeys
,
this
},
addImage
:
function
(
e
,
t
){
var
r
=
E
.
querySelectorAll
(
t
);
if
(
r
.
length
)
for
(
var
n
=
0
,
i
=
r
.
length
;
i
>
n
;
n
++
){
var
o
=
u
(
"
img
"
);
c
(
o
,{
"
data-src
"
:
e
}),
r
[
n
].
appendChild
(
o
)}
return
this
},
run
:
function
(
e
){
e
=
e
||
{};
var
o
=
{};
A
.
vars
.
preempted
=!
0
;
var
a
=
p
(
A
.
settings
,
e
);
o
.
renderer
=
a
.
renderer
?
a
.
renderer
:
A
.
setup
.
renderer
,
-
1
===
A
.
setup
.
renderers
.
join
(
"
,
"
).
indexOf
(
o
.
renderer
)
&&
(
o
.
renderer
=
A
.
setup
.
supportsSVG
?
"
svg
"
:
A
.
setup
.
supportsCanvas
?
"
canvas
"
:
"
html
"
),
a
.
use_canvas
?
o
.
renderer
=
"
canvas
"
:
a
.
use_svg
&&
(
o
.
renderer
=
"
svg
"
);
var
l
=
y
(
a
.
images
),
s
=
y
(
a
.
bgnodes
),
d
=
y
(
a
.
stylenodes
),
h
=
y
(
a
.
objects
);
o
.
stylesheets
=
[],
o
.
svgXMLStylesheet
=!
0
,
o
.
noFontFallback
=
a
.
noFontFallback
?
a
.
noFontFallback
:
!
1
;
for
(
var
c
=
0
;
c
<
d
.
length
;
c
++
){
var
f
=
d
[
c
];
if
(
f
.
attributes
.
rel
&&
f
.
attributes
.
href
&&
"
stylesheet
"
==
f
.
attributes
.
rel
.
value
){
var
g
=
f
.
attributes
.
href
.
value
,
m
=
u
(
"
a
"
);
m
.
href
=
g
;
var
v
=
m
.
protocol
+
"
//
"
+
m
.
host
+
m
.
pathname
+
m
.
search
;
o
.
stylesheets
.
push
(
v
)}}
for
(
c
=
0
;
c
<
s
.
length
;
c
++
){
var
x
=
t
.
getComputedStyle
(
s
[
c
],
null
).
getPropertyValue
(
"
background-image
"
),
b
=
s
[
c
].
getAttribute
(
"
data-background-src
"
),
S
=
null
;
S
=
null
==
b
?
x
:
b
;
var
C
=
null
,
E
=
"
?
"
+
a
.
domain
+
"
/
"
;
if
(
0
===
S
.
indexOf
(
E
))
C
=
S
.
slice
(
1
);
else
if
(
-
1
!=
S
.
indexOf
(
E
)){
var
k
=
S
.
substr
(
S
.
indexOf
(
E
)).
slice
(
1
),
T
=
k
.
match
(
/
([^\"]
*
)
"
?\)
/
);
null
!=
T
&&
(
C
=
T
[
1
])}
if
(
null
!=
C
){
var
L
=
n
(
C
,
a
);
L
&&
i
(
"
background
"
,
s
[
c
],
L
,
o
)}}
for
(
c
=
0
;
c
<
h
.
length
;
c
++
){
var
O
=
h
[
c
],
z
=
{};
try
{
z
.
data
=
O
.
getAttribute
(
"
data
"
),
z
.
dataSrc
=
O
.
getAttribute
(
"
data-src
"
)}
catch
(
F
){}
var
M
=
null
!=
z
.
data
&&
0
===
z
.
data
.
indexOf
(
a
.
domain
),
D
=
null
!=
z
.
dataSrc
&&
0
===
z
.
dataSrc
.
indexOf
(
a
.
domain
);
M
?
r
(
a
,
o
,
z
.
data
,
O
):
D
&&
r
(
a
,
o
,
z
.
dataSrc
,
O
)}
for
(
c
=
0
;
c
<
l
.
length
;
c
++
){
var
R
=
l
[
c
],
j
=
{};
try
{
j
.
src
=
R
.
getAttribute
(
"
src
"
),
j
.
dataSrc
=
R
.
getAttribute
(
"
data-src
"
),
j
.
rendered
=
R
.
getAttribute
(
"
data-holder-rendered
"
)}
catch
(
F
){}
var
B
=
null
!=
j
.
src
,
P
=
null
!=
j
.
dataSrc
&&
0
===
j
.
dataSrc
.
indexOf
(
a
.
domain
),
N
=
null
!=
j
.
rendered
&&
"
true
"
==
j
.
rendered
;
B
?
0
===
j
.
src
.
indexOf
(
a
.
domain
)?
r
(
a
,
o
,
j
.
src
,
R
):
P
&&
(
N
?
r
(
a
,
o
,
j
.
dataSrc
,
R
):
!
function
(
e
,
t
,
n
,
i
,
o
){
w
(
e
,
function
(
e
){
e
||
r
(
t
,
n
,
i
,
o
)})}(
j
.
src
,
a
,
o
,
j
.
dataSrc
,
R
)):
P
&&
r
(
a
,
o
,
j
.
dataSrc
,
R
)}
return
this
},
invisibleErrorFn
:
function
(){
return
function
(
e
){
if
(
e
.
hasAttribute
(
"
data-holder-invisible
"
))
throw
"
Holder: invisible placeholder
"
}}};
k
.
add_theme
=
k
.
addTheme
,
k
.
add_image
=
k
.
addImage
,
k
.
invisible_error_fn
=
k
.
invisibleErrorFn
;
var
A
=
{
settings
:{
domain
:
"
holder.js
"
,
images
:
"
img
"
,
objects
:
"
object
"
,
bgnodes
:
"
body .holderjs
"
,
stylenodes
:
"
head link.holderjs
"
,
stylesheets
:[],
themes
:{
gray
:{
background
:
"
#EEEEEE
"
,
foreground
:
"
#AAAAAA
"
},
social
:{
background
:
"
#3a5a97
"
,
foreground
:
"
#FFFFFF
"
},
industrial
:{
background
:
"
#434A52
"
,
foreground
:
"
#C2F200
"
},
sky
:{
background
:
"
#0D8FDB
"
,
foreground
:
"
#FFFFFF
"
},
vine
:{
background
:
"
#39DBAC
"
,
foreground
:
"
#1E292C
"
},
lava
:{
background
:
"
#F8591A
"
,
foreground
:
"
#1C2846
"
}}},
defaults
:{
size
:
10
,
units
:
"
pt
"
,
scale
:
1
/
16
},
flags
:{
dimensions
:{
regex
:
/^
(\d
+
)
x
(\d
+
)
$/
,
output
:
function
(
e
){
var
t
=
this
.
regex
.
exec
(
e
);
return
{
width
:
+
t
[
1
],
height
:
+
t
[
2
]}}},
fluid
:{
regex
:
/^
([
0-9
]
+%
?)
x
([
0-9
]
+%
?)
$/
,
output
:
function
(
e
){
var
t
=
this
.
regex
.
exec
(
e
);
return
{
width
:
t
[
1
],
height
:
t
[
2
]}}},
colors
:{
regex
:
/
(?:
#|
\^)([
0-9a-f
]{3,})\:(?:
#|
\^)([
0-9a-f
]{3,})
/i
,
output
:
function
(
e
){
var
t
=
this
.
regex
.
exec
(
e
);
return
{
foreground
:
"
#
"
+
t
[
2
],
background
:
"
#
"
+
t
[
1
]}}},
text
:{
regex
:
/text
\:(
.*
)
/
,
output
:
function
(
e
){
return
this
.
regex
.
exec
(
e
)[
1
].
replace
(
"
\\
/
"
,
"
/
"
)}},
font
:{
regex
:
/font
\:(
.*
)
/
,
output
:
function
(
e
){
return
this
.
regex
.
exec
(
e
)[
1
]}},
auto
:{
regex
:
/^auto$/
},
textmode
:{
regex
:
/textmode
\:(
.*
)
/
,
output
:
function
(
e
){
return
this
.
regex
.
exec
(
e
)[
1
]}},
random
:{
regex
:
/^random$/
}}},
T
=
function
(){
var
e
=
null
,
t
=
null
,
r
=
null
;
return
function
(
n
){
var
i
=
n
.
root
;
if
(
A
.
setup
.
supportsSVG
){
var
o
=!
1
,
a
=
function
(
e
){
return
E
.
createTextNode
(
e
)};
null
==
e
&&
(
o
=!
0
),
e
=
f
(
e
,
i
.
properties
.
width
,
i
.
properties
.
height
),
o
&&
(
t
=
u
(
"
text
"
,
C
),
r
=
a
(
null
),
c
(
t
,{
x
:
0
}),
t
.
appendChild
(
r
),
e
.
appendChild
(
t
),
E
.
body
.
appendChild
(
e
),
e
.
style
.
visibility
=
"
hidden
"
,
e
.
style
.
position
=
"
absolute
"
,
e
.
style
.
top
=
"
-100%
"
,
e
.
style
.
left
=
"
-100%
"
);
var
l
=
i
.
children
.
holderTextGroup
,
s
=
l
.
properties
;
c
(
t
,{
y
:
s
.
font
.
size
,
style
:
m
({
"
font-weight
"
:
s
.
font
.
weight
,
"
font-size
"
:
s
.
font
.
size
+
s
.
font
.
units
,
"
font-family
"
:
s
.
font
.
family
,
"
dominant-baseline
"
:
"
middle
"
})}),
r
.
nodeValue
=
s
.
text
;
var
d
=
t
.
getBBox
(),
h
=
Math
.
ceil
(
d
.
width
/
(
i
.
properties
.
width
*
A
.
setup
.
lineWrapRatio
)),
g
=
s
.
text
.
split
(
"
"
),
p
=
s
.
text
.
match
(
/
\\
n/g
);
h
+=
null
==
p
?
0
:
p
.
length
,
r
.
nodeValue
=
s
.
text
.
replace
(
/
[
]
+/g
,
""
);
var
v
=
t
.
getComputedTextLength
(),
x
=
d
.
width
-
v
,
y
=
Math
.
round
(
x
/
Math
.
max
(
1
,
g
.
length
-
1
)),
w
=
[];
if
(
h
>
1
){
r
.
nodeValue
=
""
;
for
(
var
b
=
0
;
b
<
g
.
length
;
b
++
)
if
(
0
!==
g
[
b
].
length
){
r
.
nodeValue
=
S
(
g
[
b
]);
var
k
=
t
.
getBBox
();
w
.
push
({
text
:
g
[
b
],
width
:
k
.
width
})}}
return
{
spaceWidth
:
y
,
lineCount
:
h
,
boundingBox
:
d
,
words
:
w
}}
return
!
1
}}(),
L
=
function
(){
var
e
=
u
(
"
canvas
"
),
t
=
null
;
return
function
(
r
){
null
==
t
&&
(
t
=
e
.
getContext
(
"
2d
"
));
var
n
=
r
.
root
;
e
.
width
=
A
.
dpr
(
n
.
properties
.
width
),
e
.
height
=
A
.
dpr
(
n
.
properties
.
height
),
t
.
textBaseline
=
"
middle
"
,
t
.
fillStyle
=
n
.
children
.
holderBg
.
properties
.
fill
,
t
.
fillRect
(
0
,
0
,
A
.
dpr
(
n
.
children
.
holderBg
.
width
),
A
.
dpr
(
n
.
children
.
holderBg
.
height
));{
var
i
=
n
.
children
.
holderTextGroup
;
i
.
properties
}
t
.
font
=
i
.
properties
.
font
.
weight
+
"
"
+
A
.
dpr
(
i
.
properties
.
font
.
size
)
+
i
.
properties
.
font
.
units
+
"
"
+
i
.
properties
.
font
.
family
+
"
, monospace
"
,
t
.
fillStyle
=
i
.
properties
.
fill
;
for
(
var
o
in
i
.
children
){
var
a
=
i
.
children
[
o
];
for
(
var
l
in
a
.
children
){
var
s
=
a
.
children
[
l
],
d
=
A
.
dpr
(
i
.
x
+
a
.
x
+
s
.
x
),
h
=
A
.
dpr
(
i
.
y
+
a
.
y
+
s
.
y
+
i
.
properties
.
leading
/
2
);
t
.
fillText
(
s
.
properties
.
text
,
d
,
h
)}}
return
e
.
toDataURL
(
"
image/png
"
)}}(),
O
=
function
(){
if
(
t
.
XMLSerializer
){
var
e
=
f
(
null
,
0
,
0
),
r
=
u
(
"
rect
"
,
C
);
return
e
.
appendChild
(
r
),
function
(
t
,
n
){
var
i
=
t
.
root
;
f
(
e
,
i
.
properties
.
width
,
i
.
properties
.
height
);
for
(
var
o
=
e
.
querySelectorAll
(
"
g
"
),
a
=
0
;
a
<
o
.
length
;
a
++
)
o
[
a
].
parentNode
.
removeChild
(
o
[
a
]);
c
(
r
,{
width
:
i
.
children
.
holderBg
.
width
,
height
:
i
.
children
.
holderBg
.
height
,
fill
:
i
.
children
.
holderBg
.
properties
.
fill
});
var
l
=
i
.
children
.
holderTextGroup
,
s
=
l
.
properties
,
d
=
u
(
"
g
"
,
C
);
e
.
appendChild
(
d
);
for
(
var
h
in
l
.
children
){
var
p
=
l
.
children
[
h
];
for
(
var
v
in
p
.
children
){
var
x
=
p
.
children
[
v
],
y
=
l
.
x
+
p
.
x
+
x
.
x
,
w
=
l
.
y
+
p
.
y
+
x
.
y
+
l
.
properties
.
leading
/
2
,
b
=
u
(
"
text
"
,
C
),
S
=
E
.
createTextNode
(
null
);
c
(
b
,{
x
:
y
,
y
:
w
,
style
:
m
({
fill
:
s
.
fill
,
"
font-weight
"
:
s
.
font
.
weight
,
"
font-family
"
:
s
.
font
.
family
+
"
, monospace
"
,
"
font-size
"
:
s
.
font
.
size
+
s
.
font
.
units
,
"
dominant-baseline
"
:
"
central
"
})}),
S
.
nodeValue
=
x
.
properties
.
text
,
b
.
appendChild
(
S
),
d
.
appendChild
(
b
)}}
var
k
=
"
data:image/svg+xml;base64,
"
+
btoa
(
unescape
(
encodeURIComponent
(
g
(
e
,
n
))));
return
k
}}}(),
z
=
function
(
e
){
function
t
(
e
,
t
){
for
(
var
r
in
t
)
e
[
r
]
=
t
[
r
];
return
e
}
var
r
=
1
,
n
=
augment
.
defclass
({
constructor
:
function
(
e
){
r
++
,
this
.
parent
=
null
,
this
.
children
=
{},
this
.
id
=
r
,
this
.
name
=
"
n
"
+
r
,
null
!=
e
&&
(
this
.
name
=
e
),
this
.
x
=
0
,
this
.
y
=
0
,
this
.
z
=
0
,
this
.
width
=
0
,
this
.
height
=
0
},
resize
:
function
(
e
,
t
){
null
!=
e
&&
(
this
.
width
=
e
),
null
!=
t
&&
(
this
.
height
=
t
)},
moveTo
:
function
(
e
,
t
,
r
){
this
.
x
=
null
!=
e
?
e
:
this
.
x
,
this
.
y
=
null
!=
t
?
t
:
this
.
y
,
this
.
z
=
null
!=
r
?
r
:
this
.
z
},
add
:
function
(
e
){
var
t
=
e
.
name
;
if
(
null
!=
this
.
children
[
t
])
throw
"
SceneGraph: child with that name already exists:
"
+
t
;
this
.
children
[
t
]
=
e
,
e
.
parent
=
this
}}),
i
=
augment
(
n
,
function
(
t
){
this
.
constructor
=
function
(){
t
.
constructor
.
call
(
this
,
"
root
"
),
this
.
properties
=
e
}}),
o
=
augment
(
n
,
function
(
e
){
function
r
(
r
,
n
){
if
(
e
.
constructor
.
call
(
this
,
r
),
this
.
properties
=
{
fill
:
"
#000
"
},
null
!=
n
)
t
(
this
.
properties
,
n
);
else
if
(
null
!=
r
&&
"
string
"
!=
typeof
r
)
throw
"
SceneGraph: invalid node name
"
}
this
.
Group
=
augment
.
extend
(
this
,{
constructor
:
r
,
type
:
"
group
"
}),
this
.
Rect
=
augment
.
extend
(
this
,{
constructor
:
r
,
type
:
"
rect
"
}),
this
.
Text
=
augment
.
extend
(
this
,{
constructor
:
function
(
e
){
r
.
call
(
this
),
this
.
properties
.
text
=
e
},
type
:
"
text
"
})}),
a
=
new
i
;
return
this
.
Shape
=
o
,
this
.
root
=
a
,
this
};
for
(
var
F
in
A
.
flags
)
A
.
flags
.
hasOwnProperty
(
F
)
&&
(
A
.
flags
[
F
].
match
=
function
(
e
){
return
e
.
match
(
this
.
regex
)});
A
.
setup
=
{
renderer
:
"
html
"
,
debounce
:
100
,
ratio
:
1
,
supportsCanvas
:
!
1
,
supportsSVG
:
!
1
,
lineWrapRatio
:.
9
,
renderers
:[
"
html
"
,
"
canvas
"
,
"
svg
"
]},
A
.
dpr
=
function
(
e
){
return
e
*
A
.
setup
.
ratio
},
A
.
vars
=
{
preempted
:
!
1
,
resizableImages
:[],
debounceTimer
:
null
,
cache
:{}},
function
(){
var
e
=
1
,
r
=
1
,
n
=
u
(
"
canvas
"
),
i
=
null
;
n
.
getContext
&&-
1
!=
n
.
toDataURL
(
"
image/png
"
).
indexOf
(
"
data:image/png
"
)
&&
(
A
.
setup
.
renderer
=
"
canvas
"
,
i
=
n
.
getContext
(
"
2d
"
),
A
.
setup
.
supportsCanvas
=!
0
),
A
.
setup
.
supportsCanvas
&&
(
e
=
t
.
devicePixelRatio
||
1
,
r
=
i
.
webkitBackingStorePixelRatio
||
i
.
mozBackingStorePixelRatio
||
i
.
msBackingStorePixelRatio
||
i
.
oBackingStorePixelRatio
||
i
.
backingStorePixelRatio
||
1
),
A
.
setup
.
ratio
=
e
/
r
,
E
.
createElementNS
&&
E
.
createElementNS
(
C
,
"
svg
"
).
createSVGRect
&&
(
A
.
setup
.
renderer
=
"
svg
"
,
A
.
setup
.
supportsSVG
=!
0
)}(),
e
(
k
,
"
Holder
"
,
t
),
t
.
onDomReady
&&
t
.
onDomReady
(
function
(){
A
.
vars
.
preempted
||
k
.
run
(),
t
.
addEventListener
?(
t
.
addEventListener
(
"
resize
"
,
x
,
!
1
),
t
.
addEventListener
(
"
orientationchange
"
,
x
,
!
1
)):
t
.
attachEvent
(
"
onresize
"
,
x
),
"
object
"
==
typeof
t
.
Turbolinks
&&
t
.
document
.
addEventListener
(
"
page:change
"
,
function
(){
k
.
run
()})})}(
function
(
e
,
t
,
r
){
var
n
=
"
function
"
==
typeof
define
&&
define
.
amd
;
n
?
define
(
e
):
r
[
t
]
=
e
},
this
);
\ No newline at end of file
!
function
(
a
,
b
,
c
){
b
[
a
]
=
c
}(
"
onDomReady
"
,
this
,
function
(
a
){
"
use strict
"
;
function
b
(
a
){
if
(
!
v
){
if
(
!
g
.
body
)
return
e
(
b
);
for
(
v
=!
0
;
a
=
w
.
shift
();)
e
(
a
)}}
function
c
(
a
){(
t
||
a
.
type
===
i
||
g
[
m
]
===
l
)
&&
(
d
(),
b
())}
function
d
(){
t
?(
g
[
s
](
q
,
c
,
j
),
a
[
s
](
i
,
c
,
j
)):(
g
[
o
](
r
,
c
),
a
[
o
](
k
,
c
))}
function
e
(
a
,
b
){
setTimeout
(
a
,
+
b
>=
0
?
b
:
1
)}
function
f
(
a
){
v
?
e
(
a
):
w
.
push
(
a
)}
null
==
document
.
readyState
&&
document
.
addEventListener
&&
(
document
.
addEventListener
(
"
DOMContentLoaded
"
,
function
y
(){
document
.
removeEventListener
(
"
DOMContentLoaded
"
,
y
,
!
1
),
document
.
readyState
=
"
complete
"
},
!
1
),
document
.
readyState
=
"
loading
"
);
var
g
=
a
.
document
,
h
=
g
.
documentElement
,
i
=
"
load
"
,
j
=!
1
,
k
=
"
on
"
+
i
,
l
=
"
complete
"
,
m
=
"
readyState
"
,
n
=
"
attachEvent
"
,
o
=
"
detachEvent
"
,
p
=
"
addEventListener
"
,
q
=
"
DOMContentLoaded
"
,
r
=
"
onreadystatechange
"
,
s
=
"
removeEventListener
"
,
t
=
p
in
g
,
u
=
j
,
v
=
j
,
w
=
[];
if
(
g
[
m
]
===
l
)
e
(
b
);
else
if
(
t
)
g
[
p
](
q
,
c
,
j
),
a
[
p
](
i
,
c
,
j
);
else
{
g
[
n
](
r
,
c
),
a
[
n
](
k
,
c
);
try
{
u
=
null
==
a
.
frameElement
&&
h
}
catch
(
x
){}
u
&&
u
.
doScroll
&&!
function
z
(){
if
(
!
v
){
try
{
u
.
doScroll
(
"
left
"
)}
catch
(
a
){
return
e
(
z
,
50
)}
d
(),
b
()}}()}
return
f
.
version
=
"
1.4.0
"
,
f
.
isReady
=
function
(){
return
v
},
f
}(
this
)),
document
.
querySelectorAll
||
(
document
.
querySelectorAll
=
function
(
a
){
var
b
,
c
=
document
.
createElement
(
"
style
"
),
d
=
[];
for
(
document
.
documentElement
.
firstChild
.
appendChild
(
c
),
document
.
_qsa
=
[],
c
.
styleSheet
.
cssText
=
a
+
"
{x-qsa:expression(document._qsa && document._qsa.push(this))}
"
,
window
.
scrollBy
(
0
,
0
),
c
.
parentNode
.
removeChild
(
c
);
document
.
_qsa
.
length
;)
b
=
document
.
_qsa
.
shift
(),
b
.
style
.
removeAttribute
(
"
x-qsa
"
),
d
.
push
(
b
);
return
document
.
_qsa
=
null
,
d
}),
document
.
querySelector
||
(
document
.
querySelector
=
function
(
a
){
var
b
=
document
.
querySelectorAll
(
a
);
return
b
.
length
?
b
[
0
]:
null
}),
document
.
getElementsByClassName
||
(
document
.
getElementsByClassName
=
function
(
a
){
return
a
=
String
(
a
).
replace
(
/^|
\s
+/g
,
"
.
"
),
document
.
querySelectorAll
(
a
)}),
Object
.
keys
||
(
Object
.
keys
=
function
(
a
){
if
(
a
!==
Object
(
a
))
throw
TypeError
(
"
Object.keys called on non-object
"
);
var
b
,
c
=
[];
for
(
b
in
a
)
Object
.
prototype
.
hasOwnProperty
.
call
(
a
,
b
)
&&
c
.
push
(
b
);
return
c
}),
function
(
a
){
var
b
=
"
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
"
;
a
.
atob
=
a
.
atob
||
function
(
a
){
a
=
String
(
a
);
var
c
,
d
=
0
,
e
=
[],
f
=
0
,
g
=
0
;
if
(
a
=
a
.
replace
(
/
\s
/g
,
""
),
a
.
length
%
4
===
0
&&
(
a
=
a
.
replace
(
/=+$/
,
""
)),
a
.
length
%
4
===
1
)
throw
Error
(
"
InvalidCharacterError
"
);
if
(
/
[^
+
/
0-9A-Za-z
]
/
.
test
(
a
))
throw
Error
(
"
InvalidCharacterError
"
);
for
(;
d
<
a
.
length
;)
c
=
b
.
indexOf
(
a
.
charAt
(
d
)),
f
=
f
<<
6
|
c
,
g
+=
6
,
24
===
g
&&
(
e
.
push
(
String
.
fromCharCode
(
f
>>
16
&
255
)),
e
.
push
(
String
.
fromCharCode
(
f
>>
8
&
255
)),
e
.
push
(
String
.
fromCharCode
(
255
&
f
)),
g
=
0
,
f
=
0
),
d
+=
1
;
return
12
===
g
?(
f
>>=
4
,
e
.
push
(
String
.
fromCharCode
(
255
&
f
))):
18
===
g
&&
(
f
>>=
2
,
e
.
push
(
String
.
fromCharCode
(
f
>>
8
&
255
)),
e
.
push
(
String
.
fromCharCode
(
255
&
f
))),
e
.
join
(
""
)},
a
.
btoa
=
a
.
btoa
||
function
(
a
){
a
=
String
(
a
);
var
c
,
d
,
e
,
f
,
g
,
h
,
i
,
j
=
0
,
k
=
[];
if
(
/
[^\x
00-
\x
FF
]
/
.
test
(
a
))
throw
Error
(
"
InvalidCharacterError
"
);
for
(;
j
<
a
.
length
;)
c
=
a
.
charCodeAt
(
j
++
),
d
=
a
.
charCodeAt
(
j
++
),
e
=
a
.
charCodeAt
(
j
++
),
f
=
c
>>
2
,
g
=
(
3
&
c
)
<<
4
|
d
>>
4
,
h
=
(
15
&
d
)
<<
2
|
e
>>
6
,
i
=
63
&
e
,
j
===
a
.
length
+
2
?(
h
=
64
,
i
=
64
):
j
===
a
.
length
+
1
&&
(
i
=
64
),
k
.
push
(
b
.
charAt
(
f
),
b
.
charAt
(
g
),
b
.
charAt
(
h
),
b
.
charAt
(
i
));
return
k
.
join
(
""
)}}(
this
),
Object
.
prototype
.
hasOwnProperty
||
(
Object
.
prototype
.
hasOwnProperty
=
function
(
a
){
var
b
=
this
.
__proto__
||
this
.
constructor
.
prototype
;
return
a
in
this
&&
(
!
(
a
in
b
)
||
b
[
a
]
!==
this
[
a
])}),
window
.
requestAnimationFrame
||
(
window
.
webkitRequestAnimationFrame
?
!
function
(
a
){
a
.
requestAnimationFrame
=
function
(
b
){
return
webkitRequestAnimationFrame
(
function
(){
b
(
a
.
performance
.
now
())})},
a
.
cancelAnimationFrame
=
webkitCancelAnimationFrame
}(
this
):
window
.
mozRequestAnimationFrame
?
!
function
(
a
){
a
.
requestAnimationFrame
=
function
(
b
){
return
mozRequestAnimationFrame
(
function
(){
b
(
a
.
performance
.
now
())})},
a
.
cancelAnimationFrame
=
mozCancelAnimationFrame
}(
this
):
!
function
(
a
){
a
.
requestAnimationFrame
=
function
(
b
){
return
a
.
setTimeout
(
b
,
1
e3
/
60
)},
a
.
cancelAnimationFrame
=
a
.
clearTimeout
}(
this
)),
function
(
a
,
b
){
a
.
augment
=
b
()}(
this
,
function
(){
var
a
=
function
(){},
b
=
Array
.
prototype
.
slice
,
c
=
function
(
c
,
d
){
var
e
=
a
.
prototype
=
"
function
"
==
typeof
c
?
c
.
prototype
:
c
,
f
=
new
a
,
g
=
d
.
apply
(
f
,
b
.
call
(
arguments
,
2
).
concat
(
e
));
if
(
"
object
"
==
typeof
g
)
for
(
var
h
in
g
)
f
[
h
]
=
g
[
h
];
if
(
!
f
.
hasOwnProperty
(
"
constructor
"
))
return
f
;
var
i
=
f
.
constructor
;
return
i
.
prototype
=
f
,
i
};
return
c
.
defclass
=
function
(
a
){
var
b
=
a
.
constructor
;
return
b
.
prototype
=
a
,
b
},
c
.
extend
=
function
(
a
,
b
){
return
c
(
a
,
function
(
a
){
return
this
.
uber
=
a
,
b
})},
c
}),
function
(
a
,
b
){
function
c
(
a
,
b
,
c
,
f
){
var
g
=
d
(
c
.
substr
(
c
.
lastIndexOf
(
a
.
domain
)),
a
);
g
&&
e
({
mode
:
null
,
el
:
f
,
flags
:
g
,
engineSettings
:
b
})}
function
d
(
a
,
b
){
for
(
var
c
=
{
theme
:
s
(
G
.
settings
.
themes
.
gray
,
null
),
stylesheets
:
b
.
stylesheets
,
holderURL
:[]},
d
=!
1
,
e
=
String
.
fromCharCode
(
11
),
f
=
a
.
replace
(
/
([^\\])\/
/g
,
"
$1
"
+
e
).
split
(
e
),
g
=
/%
[
0-9a-f
]{2}
/gi
,
h
=
f
.
length
,
i
=
0
;
h
>
i
;
i
++
){
var
j
=
f
[
i
];
if
(
j
.
match
(
g
))
try
{
j
=
decodeURIComponent
(
j
)}
catch
(
k
){
j
=
f
[
i
]}
var
l
=!
1
;
if
(
G
.
flags
.
dimensions
.
match
(
j
))
d
=!
0
,
c
.
dimensions
=
G
.
flags
.
dimensions
.
output
(
j
),
l
=!
0
;
else
if
(
G
.
flags
.
fluid
.
match
(
j
))
d
=!
0
,
c
.
dimensions
=
G
.
flags
.
fluid
.
output
(
j
),
c
.
fluid
=!
0
,
l
=!
0
;
else
if
(
G
.
flags
.
textmode
.
match
(
j
))
c
.
textmode
=
G
.
flags
.
textmode
.
output
(
j
),
l
=!
0
;
else
if
(
G
.
flags
.
colors
.
match
(
j
)){
var
m
=
G
.
flags
.
colors
.
output
(
j
);
c
.
theme
=
s
(
c
.
theme
,
m
),
l
=!
0
}
else
if
(
b
.
themes
[
j
])
b
.
themes
.
hasOwnProperty
(
j
)
&&
(
c
.
theme
=
s
(
b
.
themes
[
j
],
null
)),
l
=!
0
;
else
if
(
G
.
flags
.
font
.
match
(
j
))
c
.
font
=
G
.
flags
.
font
.
output
(
j
),
l
=!
0
;
else
if
(
G
.
flags
.
auto
.
match
(
j
))
c
.
auto
=!
0
,
l
=!
0
;
else
if
(
G
.
flags
.
text
.
match
(
j
))
c
.
text
=
G
.
flags
.
text
.
output
(
j
),
l
=!
0
;
else
if
(
G
.
flags
.
size
.
match
(
j
))
c
.
size
=
G
.
flags
.
size
.
output
(
j
),
l
=!
0
;
else
if
(
G
.
flags
.
random
.
match
(
j
)){
null
==
G
.
vars
.
cache
.
themeKeys
&&
(
G
.
vars
.
cache
.
themeKeys
=
Object
.
keys
(
b
.
themes
));
var
n
=
G
.
vars
.
cache
.
themeKeys
[
0
|
Math
.
random
()
*
G
.
vars
.
cache
.
themeKeys
.
length
];
c
.
theme
=
s
(
b
.
themes
[
n
],
null
),
l
=!
0
}
l
&&
c
.
holderURL
.
push
(
j
)}
return
c
.
holderURL
.
unshift
(
b
.
domain
),
c
.
holderURL
=
c
.
holderURL
.
join
(
"
/
"
),
d
?
c
:
!
1
}
function
e
(
a
){
var
b
=
a
.
mode
,
c
=
a
.
el
,
d
=
a
.
flags
,
e
=
a
.
engineSettings
,
g
=
d
.
dimensions
,
h
=
d
.
theme
,
k
=
g
.
width
+
"
x
"
+
g
.
height
;
if
(
b
=
null
==
b
?
d
.
fluid
?
"
fluid
"
:
"
image
"
:
b
,
null
!=
d
.
text
&&
(
h
.
text
=
d
.
text
,
"
object
"
===
c
.
nodeName
.
toLowerCase
())){
for
(
var
l
=
h
.
text
.
split
(
"
\\
n
"
),
m
=
0
;
m
<
l
.
length
;
m
++
)
l
[
m
]
=
y
(
l
[
m
]);
h
.
text
=
l
.
join
(
"
\\
n
"
)}
var
n
=
d
.
holderURL
,
o
=
s
(
e
,
null
);
d
.
font
&&
(
h
.
font
=
d
.
font
,
!
o
.
noFontFallback
&&
"
img
"
===
c
.
nodeName
.
toLowerCase
()
&&
G
.
setup
.
supportsCanvas
&&
"
svg
"
===
o
.
renderer
&&
(
o
=
s
(
o
,{
renderer
:
"
canvas
"
}))),
d
.
font
&&
"
canvas
"
==
o
.
renderer
&&
(
o
.
reRender
=!
0
),
"
background
"
==
b
?
null
==
c
.
getAttribute
(
"
data-background-src
"
)
&&
p
(
c
,{
"
data-background-src
"
:
n
}):
p
(
c
,{
"
data-src
"
:
n
}),
d
.
theme
=
h
,
c
.
holderData
=
{
flags
:
d
,
engineSettings
:
o
},(
"
image
"
==
b
||
"
fluid
"
==
b
)
&&
p
(
c
,{
alt
:
h
.
text
?
h
.
text
+
"
[
"
+
k
+
"
]
"
:
k
});
var
q
=
{
mode
:
b
,
el
:
c
,
holderSettings
:{
dimensions
:
g
,
theme
:
h
,
flags
:
d
},
engineSettings
:
o
};
"
image
"
==
b
?(
"
html
"
!=
o
.
renderer
&&
d
.
auto
||
(
c
.
style
.
width
=
g
.
width
+
"
px
"
,
c
.
style
.
height
=
g
.
height
+
"
px
"
),
"
html
"
==
o
.
renderer
?
c
.
style
.
backgroundColor
=
h
.
background
:(
f
(
q
),
"
exact
"
==
d
.
textmode
&&
(
c
.
holderData
.
resizeUpdate
=!
0
,
G
.
vars
.
resizableImages
.
push
(
c
),
i
(
c
)))):
"
background
"
==
b
&&
"
html
"
!=
o
.
renderer
?
f
(
q
):
"
fluid
"
==
b
&&
(
c
.
holderData
.
resizeUpdate
=!
0
,
"
%
"
==
g
.
height
.
slice
(
-
1
)?
c
.
style
.
height
=
g
.
height
:
null
!=
d
.
auto
&&
d
.
auto
||
(
c
.
style
.
height
=
g
.
height
+
"
px
"
),
"
%
"
==
g
.
width
.
slice
(
-
1
)?
c
.
style
.
width
=
g
.
width
:
null
!=
d
.
auto
&&
d
.
auto
||
(
c
.
style
.
width
=
g
.
width
+
"
px
"
),(
"
inline
"
==
c
.
style
.
display
||
""
===
c
.
style
.
display
||
"
none
"
==
c
.
style
.
display
)
&&
(
c
.
style
.
display
=
"
block
"
),
j
(
c
),
"
html
"
==
o
.
renderer
?
c
.
style
.
backgroundColor
=
h
.
background
:(
G
.
vars
.
resizableImages
.
push
(
c
),
i
(
c
)))}
function
f
(
a
){
function
c
(){
var
b
=
null
;
switch
(
i
.
renderer
){
case
"
canvas
"
:
b
=
I
(
k
,
a
);
break
;
case
"
svg
"
:
b
=
J
(
k
,
a
);
break
;
default
:
throw
"
Holder: invalid renderer:
"
+
i
.
renderer
}
return
b
}
var
d
=
null
,
e
=
a
.
mode
,
f
=
a
.
holderSettings
,
h
=
a
.
el
,
i
=
a
.
engineSettings
;
switch
(
i
.
renderer
){
case
"
svg
"
:
if
(
!
G
.
setup
.
supportsSVG
)
return
;
break
;
case
"
canvas
"
:
if
(
!
G
.
setup
.
supportsCanvas
)
return
;
break
;
default
:
return
}
var
j
=
{
width
:
f
.
dimensions
.
width
,
height
:
f
.
dimensions
.
height
,
theme
:
f
.
theme
,
flags
:
f
.
flags
},
k
=
g
(
j
);
if
(
d
=
c
(),
null
==
d
)
throw
"
Holder: couldn't render placeholder
"
;
"
background
"
==
e
?(
h
.
style
.
backgroundImage
=
"
url(
"
+
d
+
"
)
"
,
h
.
style
.
backgroundSize
=
j
.
width
+
"
px
"
+
j
.
height
+
"
px
"
):(
"
img
"
===
h
.
nodeName
.
toLowerCase
()?
p
(
h
,{
src
:
d
}):
"
object
"
===
h
.
nodeName
.
toLowerCase
()
&&
(
p
(
h
,{
data
:
d
}),
p
(
h
,{
type
:
"
image/svg+xml
"
})),
i
.
reRender
&&
b
.
setTimeout
(
function
(){
var
a
=
c
();
if
(
null
==
a
)
throw
"
Holder: couldn't render placeholder
"
;
"
img
"
===
h
.
nodeName
.
toLowerCase
()?
p
(
h
,{
src
:
a
}):
"
object
"
===
h
.
nodeName
.
toLowerCase
()
&&
(
p
(
h
,{
data
:
a
}),
p
(
h
,{
type
:
"
image/svg+xml
"
}))},
100
)),
p
(
h
,{
"
data-holder-rendered
"
:
!
0
})}
function
g
(
a
){
function
b
(
a
,
b
,
c
,
d
){
b
.
width
=
c
,
b
.
height
=
d
,
a
.
width
=
Math
.
max
(
a
.
width
,
b
.
width
),
a
.
height
+=
b
.
height
,
a
.
add
(
b
)}
var
c
=
G
.
defaults
.
size
;
switch
(
parseFloat
(
a
.
theme
.
size
)?
c
=
a
.
theme
.
size
:
parseFloat
(
a
.
flags
.
size
)
&&
(
c
=
a
.
flags
.
size
),
a
.
font
=
{
family
:
a
.
theme
.
font
?
a
.
theme
.
font
:
"
Arial, Helvetica, Open Sans, sans-serif
"
,
size
:
h
(
a
.
width
,
a
.
height
,
c
),
units
:
a
.
theme
.
units
?
a
.
theme
.
units
:
G
.
defaults
.
units
,
weight
:
a
.
theme
.
fontweight
?
a
.
theme
.
fontweight
:
"
bold
"
},
a
.
text
=
a
.
theme
.
text
?
a
.
theme
.
text
:
Math
.
floor
(
a
.
width
)
+
"
x
"
+
Math
.
floor
(
a
.
height
),
a
.
flags
.
textmode
){
case
"
literal
"
:
a
.
text
=
a
.
flags
.
dimensions
.
width
+
"
x
"
+
a
.
flags
.
dimensions
.
height
;
break
;
case
"
exact
"
:
if
(
!
a
.
flags
.
exactDimensions
)
break
;
a
.
text
=
Math
.
floor
(
a
.
flags
.
exactDimensions
.
width
)
+
"
x
"
+
Math
.
floor
(
a
.
flags
.
exactDimensions
.
height
)}
var
d
=
new
K
({
width
:
a
.
width
,
height
:
a
.
height
}),
e
=
d
.
Shape
,
f
=
new
e
.
Rect
(
"
holderBg
"
,{
fill
:
a
.
theme
.
background
});
f
.
resize
(
a
.
width
,
a
.
height
),
d
.
root
.
add
(
f
);
var
g
=
new
e
.
Group
(
"
holderTextGroup
"
,{
text
:
a
.
text
,
align
:
"
center
"
,
font
:
a
.
font
,
fill
:
a
.
theme
.
foreground
});
g
.
moveTo
(
null
,
null
,
1
),
d
.
root
.
add
(
g
);
var
i
=
g
.
textPositionData
=
H
(
d
);
if
(
!
i
)
throw
"
Holder: staging fallback not supported yet.
"
;
g
.
properties
.
leading
=
i
.
boundingBox
.
height
;
var
j
=
null
,
k
=
null
;
if
(
i
.
lineCount
>
1
){
var
l
=
0
,
m
=
0
,
n
=
a
.
width
*
G
.
setup
.
lineWrapRatio
,
o
=
0
;
k
=
new
e
.
Group
(
"
line
"
+
o
);
for
(
var
p
=
0
;
p
<
i
.
words
.
length
;
p
++
){
var
q
=
i
.
words
[
p
];
j
=
new
e
.
Text
(
q
.
text
);
var
r
=
"
\\
n
"
==
q
.
text
;(
l
+
q
.
width
>=
n
||
r
===!
0
)
&&
(
b
(
g
,
k
,
l
,
g
.
properties
.
leading
),
l
=
0
,
m
+=
g
.
properties
.
leading
,
o
+=
1
,
k
=
new
e
.
Group
(
"
line
"
+
o
),
k
.
y
=
m
),
r
!==!
0
&&
(
j
.
moveTo
(
l
,
0
),
l
+=
i
.
spaceWidth
+
q
.
width
,
k
.
add
(
j
))}
b
(
g
,
k
,
l
,
g
.
properties
.
leading
);
for
(
var
s
in
g
.
children
)
k
=
g
.
children
[
s
],
k
.
moveTo
((
g
.
width
-
k
.
width
)
/
2
,
null
,
null
);
g
.
moveTo
((
a
.
width
-
g
.
width
)
/
2
,(
a
.
height
-
g
.
height
)
/
2
,
null
),(
a
.
height
-
g
.
height
)
/
2
<
0
&&
g
.
moveTo
(
null
,
0
,
null
)}
else
j
=
new
e
.
Text
(
a
.
text
),
k
=
new
e
.
Group
(
"
line0
"
),
k
.
add
(
j
),
g
.
add
(
k
),
g
.
moveTo
((
a
.
width
-
i
.
boundingBox
.
width
)
/
2
,(
a
.
height
-
i
.
boundingBox
.
height
)
/
2
,
null
);
return
d
}
function
h
(
a
,
b
,
c
){
var
d
=
parseInt
(
a
,
10
),
e
=
parseInt
(
b
,
10
),
f
=
Math
.
max
(
d
,
e
),
g
=
Math
.
min
(
d
,
e
),
h
=
.
8
*
Math
.
min
(
g
,
f
*
G
.
defaults
.
scale
);
return
Math
.
round
(
Math
.
max
(
c
,
h
))}
function
i
(
a
){
var
b
;
b
=
null
==
a
||
null
==
a
.
nodeType
?
G
.
vars
.
resizableImages
:[
a
];
for
(
var
c
=
0
,
d
=
b
.
length
;
d
>
c
;
c
++
){
var
e
=
b
[
c
];
if
(
e
.
holderData
){
var
g
=
e
.
holderData
.
flags
,
h
=
k
(
e
);
if
(
h
){
if
(
!
e
.
holderData
.
resizeUpdate
)
continue
;
if
(
g
.
fluid
&&
g
.
auto
){
var
i
=
e
.
holderData
.
fluidConfig
;
switch
(
i
.
mode
){
case
"
width
"
:
h
.
height
=
h
.
width
/
i
.
ratio
;
break
;
case
"
height
"
:
h
.
width
=
h
.
height
*
i
.
ratio
}}
var
j
=
{
mode
:
"
image
"
,
holderSettings
:{
dimensions
:
h
,
theme
:
g
.
theme
,
flags
:
g
},
el
:
e
,
engineSettings
:
e
.
holderData
.
engineSettings
};
"
exact
"
==
g
.
textmode
&&
(
g
.
exactDimensions
=
h
,
j
.
holderSettings
.
dimensions
=
g
.
dimensions
),
f
(
j
)}
else
n
(
e
)}}}
function
j
(
a
){
if
(
a
.
holderData
){
var
b
=
k
(
a
);
if
(
b
){
var
c
=
a
.
holderData
.
flags
,
d
=
{
fluidHeight
:
"
%
"
==
c
.
dimensions
.
height
.
slice
(
-
1
),
fluidWidth
:
"
%
"
==
c
.
dimensions
.
width
.
slice
(
-
1
),
mode
:
null
,
initialDimensions
:
b
};
d
.
fluidWidth
&&!
d
.
fluidHeight
?(
d
.
mode
=
"
width
"
,
d
.
ratio
=
d
.
initialDimensions
.
width
/
parseFloat
(
c
.
dimensions
.
height
)):
!
d
.
fluidWidth
&&
d
.
fluidHeight
&&
(
d
.
mode
=
"
height
"
,
d
.
ratio
=
parseFloat
(
c
.
dimensions
.
width
)
/
d
.
initialDimensions
.
height
),
a
.
holderData
.
fluidConfig
=
d
}
else
n
(
a
)}}
function
k
(
a
){
var
b
=
{
height
:
a
.
clientHeight
,
width
:
a
.
clientWidth
};
return
b
.
height
&&
b
.
width
?
b
:
!
1
}
function
l
(){
for
(
var
a
,
c
=
[],
d
=
Object
.
keys
(
G
.
vars
.
invisibleImages
),
e
=
0
,
f
=
d
.
length
;
f
>
e
;
e
++
)
a
=
G
.
vars
.
invisibleImages
[
d
[
e
]],
k
(
a
)
&&
"
img
"
==
a
.
nodeName
.
toLowerCase
()
&&
(
c
.
push
(
a
),
delete
G
.
vars
.
invisibleImages
[
d
[
e
]]);
c
.
length
&&
F
.
run
({
images
:
c
}),
b
.
requestAnimationFrame
(
l
)}
function
m
(){
G
.
vars
.
visibilityCheckStarted
||
(
b
.
requestAnimationFrame
(
l
),
G
.
vars
.
visibilityCheckStarted
=!
0
)}
function
n
(
a
){
a
.
holderData
.
invisibleId
||
(
G
.
vars
.
invisibleId
+=
1
,
G
.
vars
.
invisibleImages
[
"
i
"
+
G
.
vars
.
invisibleId
]
=
a
,
a
.
holderData
.
invisibleId
=
G
.
vars
.
invisibleId
)}
function
o
(
a
,
b
){
return
null
==
b
?
C
.
createElement
(
a
):
C
.
createElementNS
(
b
,
a
)}
function
p
(
a
,
b
){
for
(
var
c
in
b
)
a
.
setAttribute
(
c
,
b
[
c
])}
function
q
(
a
,
b
,
c
){
if
(
null
==
a
){
a
=
o
(
"
svg
"
,
A
);
var
d
=
o
(
"
defs
"
,
A
);
a
.
appendChild
(
d
)}
a
.
webkitMatchesSelector
&&
a
.
setAttribute
(
"
xmlns
"
,
A
);
for
(
var
e
=
0
;
e
<
a
.
childNodes
.
length
;
e
++
)
a
.
childNodes
[
e
].
nodeType
===
B
&&
a
.
removeChild
(
a
.
childNodes
[
e
]);
return
p
(
a
,{
width
:
b
,
height
:
c
,
viewBox
:
"
0 0
"
+
b
+
"
"
+
c
,
preserveAspectRatio
:
"
none
"
}),
a
}
function
r
(
a
,
c
){
if
(
b
.
XMLSerializer
){{
var
d
=
new
XMLSerializer
,
e
=
""
,
f
=
c
.
stylesheets
;
a
.
querySelector
(
"
defs
"
)}
if
(
c
.
svgXMLStylesheet
){
for
(
var
g
=
(
new
DOMParser
).
parseFromString
(
"
<xml />
"
,
"
application/xml
"
),
h
=
f
.
length
-
1
;
h
>=
0
;
h
--
){
var
i
=
g
.
createProcessingInstruction
(
"
xml-stylesheet
"
,
'
href="
'
+
f
[
h
]
+
'
" rel="stylesheet"
'
);
g
.
insertBefore
(
i
,
g
.
firstChild
)}
var
j
=
g
.
createProcessingInstruction
(
"
xml
"
,
'
version="1.0" encoding="UTF-8" standalone="yes"
'
);
g
.
insertBefore
(
j
,
g
.
firstChild
),
g
.
removeChild
(
g
.
documentElement
),
e
=
d
.
serializeToString
(
g
)}
var
k
=
d
.
serializeToString
(
a
);
return
k
=
k
.
replace
(
/
\&
amp;
(\#[
0-9
]{2,}\;)
/g
,
"
&$1
"
),
e
+
k
}}
function
s
(
a
,
b
){
var
c
=
{};
for
(
var
d
in
a
)
a
.
hasOwnProperty
(
d
)
&&
(
c
[
d
]
=
a
[
d
]);
if
(
null
!=
b
)
for
(
var
e
in
b
)
b
.
hasOwnProperty
(
e
)
&&
(
c
[
e
]
=
b
[
e
]);
return
c
}
function
t
(
a
){
var
b
=
[];
for
(
var
c
in
a
)
a
.
hasOwnProperty
(
c
)
&&
b
.
push
(
c
+
"
:
"
+
a
[
c
]);
return
b
.
join
(
"
;
"
)}
function
u
(
a
){
G
.
vars
.
debounceTimer
||
a
.
call
(
this
),
G
.
vars
.
debounceTimer
&&
b
.
clearTimeout
(
G
.
vars
.
debounceTimer
),
G
.
vars
.
debounceTimer
=
b
.
setTimeout
(
function
(){
G
.
vars
.
debounceTimer
=
null
,
a
.
call
(
this
)},
G
.
setup
.
debounce
)}
function
v
(){
u
(
function
(){
i
(
null
)})}
function
w
(
a
){
var
c
=
null
;
return
"
string
"
==
typeof
a
?
c
=
C
.
querySelectorAll
(
a
):
b
.
NodeList
&&
a
instanceof
b
.
NodeList
?
c
=
a
:
b
.
Node
&&
a
instanceof
b
.
Node
?
c
=
[
a
]:
b
.
HTMLCollection
&&
a
instanceof
b
.
HTMLCollection
?
c
=
a
:
a
instanceof
Array
?
c
=
a
:
null
===
a
&&
(
c
=
[]),
c
}
function
x
(
a
,
b
){
var
c
=
new
Image
;
c
.
onerror
=
function
(){
b
.
call
(
this
,
!
1
)},
c
.
onload
=
function
(){
b
.
call
(
this
,
!
0
)},
c
.
src
=
a
}
function
y
(
a
){
for
(
var
b
=
[],
c
=
0
,
d
=
a
.
length
-
1
;
d
>=
0
;
d
--
)
c
=
a
.
charCodeAt
(
d
),
b
.
unshift
(
c
>
128
?[
"
&#
"
,
c
,
"
;
"
].
join
(
""
):
a
[
d
]);
return
b
.
join
(
""
)}
function
z
(
a
){
return
a
.
replace
(
/&#
(\d
+
)
;/g
,
function
(
a
,
b
){
return
String
.
fromCharCode
(
b
)})}
var
A
=
"
http://www.w3.org/2000/svg
"
,
B
=
8
,
C
=
b
.
document
,
D
=
"
2.5.2
"
,
E
=
"
\n
Created with Holder.js
"
+
D
+
"
.
\n
Learn more at http://holderjs.com
\n
(c) 2012-2015 Ivan Malopinsky - http://imsky.co
\n
"
,
F
=
{
version
:
D
,
addTheme
:
function
(
a
,
b
){
return
null
!=
a
&&
null
!=
b
&&
(
G
.
settings
.
themes
[
a
]
=
b
),
delete
G
.
vars
.
cache
.
themeKeys
,
this
},
addImage
:
function
(
a
,
b
){
var
c
=
C
.
querySelectorAll
(
b
);
if
(
c
.
length
)
for
(
var
d
=
0
,
e
=
c
.
length
;
e
>
d
;
d
++
){
var
f
=
o
(
"
img
"
);
p
(
f
,{
"
data-src
"
:
a
}),
c
[
d
].
appendChild
(
f
)}
return
this
},
setResizeUpdate
:
function
(
a
,
b
){
a
.
holderData
&&
(
a
.
holderData
.
resizeUpdate
=!!
b
,
a
.
holderData
.
resizeUpdate
&&
i
(
a
))},
run
:
function
(
a
){
a
=
a
||
{};
var
f
=
{};
G
.
vars
.
preempted
=!
0
;
var
g
=
s
(
G
.
settings
,
a
);
f
.
renderer
=
g
.
renderer
?
g
.
renderer
:
G
.
setup
.
renderer
,
-
1
===
G
.
setup
.
renderers
.
join
(
"
,
"
).
indexOf
(
f
.
renderer
)
&&
(
f
.
renderer
=
G
.
setup
.
supportsSVG
?
"
svg
"
:
G
.
setup
.
supportsCanvas
?
"
canvas
"
:
"
html
"
);
var
h
=
w
(
g
.
images
),
i
=
w
(
g
.
bgnodes
),
j
=
w
(
g
.
stylenodes
),
k
=
w
(
g
.
objects
);
f
.
stylesheets
=
[],
f
.
svgXMLStylesheet
=!
0
,
f
.
noFontFallback
=
g
.
noFontFallback
?
g
.
noFontFallback
:
!
1
;
for
(
var
l
=
0
;
l
<
j
.
length
;
l
++
){
var
m
=
j
[
l
];
if
(
m
.
attributes
.
rel
&&
m
.
attributes
.
href
&&
"
stylesheet
"
==
m
.
attributes
.
rel
.
value
){
var
n
=
m
.
attributes
.
href
.
value
,
p
=
o
(
"
a
"
);
p
.
href
=
n
;
var
q
=
p
.
protocol
+
"
//
"
+
p
.
host
+
p
.
pathname
+
p
.
search
;
f
.
stylesheets
.
push
(
q
)}}
for
(
l
=
0
;
l
<
i
.
length
;
l
++
)
if
(
b
.
getComputedStyle
){
var
r
=
b
.
getComputedStyle
(
i
[
l
],
null
).
getPropertyValue
(
"
background-image
"
),
t
=
i
[
l
].
getAttribute
(
"
data-background-src
"
),
u
=
null
;
u
=
null
==
t
?
r
:
t
;
var
v
=
null
,
y
=
"
?
"
+
g
.
domain
+
"
/
"
;
if
(
0
===
u
.
indexOf
(
y
))
v
=
u
.
slice
(
1
);
else
if
(
-
1
!=
u
.
indexOf
(
y
)){
var
z
=
u
.
substr
(
u
.
indexOf
(
y
)).
slice
(
1
),
A
=
z
.
match
(
/
([^\"]
*
)
"
?\)
/
);
null
!=
A
&&
(
v
=
A
[
1
])}
if
(
null
!=
v
){
var
B
=
d
(
v
,
g
);
B
&&
e
({
mode
:
"
background
"
,
el
:
i
[
l
],
flags
:
B
,
engineSettings
:
f
})}}
for
(
l
=
0
;
l
<
k
.
length
;
l
++
){
var
C
=
k
[
l
],
D
=
{};
try
{
D
.
data
=
C
.
getAttribute
(
"
data
"
),
D
.
dataSrc
=
C
.
getAttribute
(
"
data-src
"
)}
catch
(
E
){}
var
F
=
null
!=
D
.
data
&&
0
===
D
.
data
.
indexOf
(
g
.
domain
),
H
=
null
!=
D
.
dataSrc
&&
0
===
D
.
dataSrc
.
indexOf
(
g
.
domain
);
F
?
c
(
g
,
f
,
D
.
data
,
C
):
H
&&
c
(
g
,
f
,
D
.
dataSrc
,
C
)}
for
(
l
=
0
;
l
<
h
.
length
;
l
++
){
var
I
=
h
[
l
],
J
=
{};
try
{
J
.
src
=
I
.
getAttribute
(
"
src
"
),
J
.
dataSrc
=
I
.
getAttribute
(
"
data-src
"
),
J
.
rendered
=
I
.
getAttribute
(
"
data-holder-rendered
"
)}
catch
(
E
){}
var
K
=
null
!=
J
.
src
,
L
=
null
!=
J
.
dataSrc
&&
0
===
J
.
dataSrc
.
indexOf
(
g
.
domain
),
M
=
null
!=
J
.
rendered
&&
"
true
"
==
J
.
rendered
;
K
?
0
===
J
.
src
.
indexOf
(
g
.
domain
)?
c
(
g
,
f
,
J
.
src
,
I
):
L
&&
(
M
?
c
(
g
,
f
,
J
.
dataSrc
,
I
):
!
function
(
a
,
b
,
d
,
e
,
f
){
x
(
a
,
function
(
a
){
a
||
c
(
b
,
d
,
e
,
f
)})}(
J
.
src
,
g
,
f
,
J
.
dataSrc
,
I
)):
L
&&
c
(
g
,
f
,
J
.
dataSrc
,
I
)}
return
this
}},
G
=
{
settings
:{
domain
:
"
holder.js
"
,
images
:
"
img
"
,
objects
:
"
object
"
,
bgnodes
:
"
body .holderjs
"
,
stylenodes
:
"
head link.holderjs
"
,
stylesheets
:[],
themes
:{
gray
:{
background
:
"
#EEEEEE
"
,
foreground
:
"
#AAAAAA
"
},
social
:{
background
:
"
#3a5a97
"
,
foreground
:
"
#FFFFFF
"
},
industrial
:{
background
:
"
#434A52
"
,
foreground
:
"
#C2F200
"
},
sky
:{
background
:
"
#0D8FDB
"
,
foreground
:
"
#FFFFFF
"
},
vine
:{
background
:
"
#39DBAC
"
,
foreground
:
"
#1E292C
"
},
lava
:{
background
:
"
#F8591A
"
,
foreground
:
"
#1C2846
"
}}},
defaults
:{
size
:
10
,
units
:
"
pt
"
,
scale
:
1
/
16
},
flags
:{
dimensions
:{
regex
:
/^
(\d
+
)
x
(\d
+
)
$/
,
output
:
function
(
a
){
var
b
=
this
.
regex
.
exec
(
a
);
return
{
width
:
+
b
[
1
],
height
:
+
b
[
2
]}}},
fluid
:{
regex
:
/^
([
0-9
]
+%
?)
x
([
0-9
]
+%
?)
$/
,
output
:
function
(
a
){
var
b
=
this
.
regex
.
exec
(
a
);
return
{
width
:
b
[
1
],
height
:
b
[
2
]}}},
colors
:{
regex
:
/
(?:
#|
\^)([
0-9a-f
]{3,})\:(?:
#|
\^)([
0-9a-f
]{3,})
/i
,
output
:
function
(
a
){
var
b
=
this
.
regex
.
exec
(
a
);
return
{
foreground
:
"
#
"
+
b
[
2
],
background
:
"
#
"
+
b
[
1
]}}},
text
:{
regex
:
/text
\:(
.*
)
/
,
output
:
function
(
a
){
return
this
.
regex
.
exec
(
a
)[
1
].
replace
(
"
\\
/
"
,
"
/
"
)}},
font
:{
regex
:
/font
\:(
.*
)
/
,
output
:
function
(
a
){
return
this
.
regex
.
exec
(
a
)[
1
]}},
auto
:{
regex
:
/^auto$/
},
textmode
:{
regex
:
/textmode
\:(
.*
)
/
,
output
:
function
(
a
){
return
this
.
regex
.
exec
(
a
)[
1
]}},
random
:{
regex
:
/^random$/
},
size
:{
regex
:
/size
\:(\d
+
)
/
,
output
:
function
(
a
){
return
this
.
regex
.
exec
(
a
)[
1
]}}}},
H
=
function
(){
var
a
=
null
,
b
=
null
,
c
=
null
;
return
function
(
d
){
var
e
=
d
.
root
;
if
(
G
.
setup
.
supportsSVG
){
var
f
=!
1
,
g
=
function
(
a
){
return
C
.
createTextNode
(
a
)};(
null
==
a
||
a
.
parentNode
!==
C
.
body
)
&&
(
f
=!
0
),
a
=
q
(
a
,
e
.
properties
.
width
,
e
.
properties
.
height
),
a
.
style
.
display
=
"
block
"
,
f
&&
(
b
=
o
(
"
text
"
,
A
),
c
=
g
(
null
),
p
(
b
,{
x
:
0
}),
b
.
appendChild
(
c
),
a
.
appendChild
(
b
),
C
.
body
.
appendChild
(
a
),
a
.
style
.
visibility
=
"
hidden
"
,
a
.
style
.
position
=
"
absolute
"
,
a
.
style
.
top
=
"
-100%
"
,
a
.
style
.
left
=
"
-100%
"
);
var
h
=
e
.
children
.
holderTextGroup
,
i
=
h
.
properties
;
p
(
b
,{
y
:
i
.
font
.
size
,
style
:
t
({
"
font-weight
"
:
i
.
font
.
weight
,
"
font-size
"
:
i
.
font
.
size
+
i
.
font
.
units
,
"
font-family
"
:
i
.
font
.
family
})}),
c
.
nodeValue
=
i
.
text
;
var
j
=
b
.
getBBox
(),
k
=
Math
.
ceil
(
j
.
width
/
(
e
.
properties
.
width
*
G
.
setup
.
lineWrapRatio
)),
l
=
i
.
text
.
split
(
"
"
),
m
=
i
.
text
.
match
(
/
\\
n/g
);
k
+=
null
==
m
?
0
:
m
.
length
,
c
.
nodeValue
=
i
.
text
.
replace
(
/
[
]
+/g
,
""
);
var
n
=
b
.
getComputedTextLength
(),
r
=
j
.
width
-
n
,
s
=
Math
.
round
(
r
/
Math
.
max
(
1
,
l
.
length
-
1
)),
u
=
[];
if
(
k
>
1
){
c
.
nodeValue
=
""
;
for
(
var
v
=
0
;
v
<
l
.
length
;
v
++
)
if
(
0
!==
l
[
v
].
length
){
c
.
nodeValue
=
z
(
l
[
v
]);
var
w
=
b
.
getBBox
();
u
.
push
({
text
:
l
[
v
],
width
:
w
.
width
})}}
return
a
.
style
.
display
=
"
none
"
,{
spaceWidth
:
s
,
lineCount
:
k
,
boundingBox
:
j
,
words
:
u
}}
return
!
1
}}(),
I
=
function
(){
var
a
=
o
(
"
canvas
"
),
b
=
null
;
return
function
(
c
){
null
==
b
&&
(
b
=
a
.
getContext
(
"
2d
"
));
var
d
=
c
.
root
;
a
.
width
=
G
.
dpr
(
d
.
properties
.
width
),
a
.
height
=
G
.
dpr
(
d
.
properties
.
height
),
b
.
textBaseline
=
"
middle
"
,
b
.
fillStyle
=
d
.
children
.
holderBg
.
properties
.
fill
,
b
.
fillRect
(
0
,
0
,
G
.
dpr
(
d
.
children
.
holderBg
.
width
),
G
.
dpr
(
d
.
children
.
holderBg
.
height
));{
var
e
=
d
.
children
.
holderTextGroup
;
e
.
properties
}
b
.
font
=
e
.
properties
.
font
.
weight
+
"
"
+
G
.
dpr
(
e
.
properties
.
font
.
size
)
+
e
.
properties
.
font
.
units
+
"
"
+
e
.
properties
.
font
.
family
+
"
, monospace
"
,
b
.
fillStyle
=
e
.
properties
.
fill
;
for
(
var
f
in
e
.
children
){
var
g
=
e
.
children
[
f
];
for
(
var
h
in
g
.
children
){
var
i
=
g
.
children
[
h
],
j
=
G
.
dpr
(
e
.
x
+
g
.
x
+
i
.
x
),
k
=
G
.
dpr
(
e
.
y
+
g
.
y
+
i
.
y
+
e
.
properties
.
leading
/
2
);
b
.
fillText
(
i
.
properties
.
text
,
j
,
k
)}}
return
a
.
toDataURL
(
"
image/png
"
)}}(),
J
=
function
(){
if
(
b
.
XMLSerializer
){
var
a
=
q
(
null
,
0
,
0
),
c
=
o
(
"
rect
"
,
A
);
return
a
.
appendChild
(
c
),
function
(
b
,
d
){
var
e
=
b
.
root
,
f
=
d
.
holderSettings
.
flags
.
holderURL
,
g
=
C
.
createComment
(
"
\n
Source URL:
"
+
f
+
E
);
q
(
a
,
e
.
properties
.
width
,
e
.
properties
.
height
),
a
.
insertBefore
(
g
,
a
.
firstChild
);
for
(
var
h
=
a
.
querySelectorAll
(
"
g
"
),
i
=
0
;
i
<
h
.
length
;
i
++
)
h
[
i
].
parentNode
.
removeChild
(
h
[
i
]);
p
(
c
,{
width
:
e
.
children
.
holderBg
.
width
,
height
:
e
.
children
.
holderBg
.
height
,
fill
:
e
.
children
.
holderBg
.
properties
.
fill
});
var
j
=
e
.
children
.
holderTextGroup
,
k
=
j
.
properties
,
l
=
o
(
"
g
"
,
A
),
m
=
j
.
textPositionData
;
a
.
appendChild
(
l
),
j
.
y
+=
.
8
*
m
.
boundingBox
.
height
;
for
(
var
n
in
j
.
children
){
var
s
=
j
.
children
[
n
];
for
(
var
u
in
s
.
children
){
var
v
=
s
.
children
[
u
],
w
=
j
.
x
+
s
.
x
+
v
.
x
,
x
=
j
.
y
+
s
.
y
+
v
.
y
,
y
=
o
(
"
text
"
,
A
),
z
=
C
.
createTextNode
(
null
);
p
(
y
,{
x
:
w
,
y
:
x
,
style
:
t
({
fill
:
k
.
fill
,
"
font-weight
"
:
k
.
font
.
weight
,
"
font-family
"
:
k
.
font
.
family
+
"
, monospace
"
,
"
font-size
"
:
k
.
font
.
size
+
k
.
font
.
units
})}),
z
.
nodeValue
=
v
.
properties
.
text
,
y
.
appendChild
(
z
),
l
.
appendChild
(
y
)}}
var
B
=
"
data:image/svg+xml;base64,
"
+
btoa
(
unescape
(
encodeURIComponent
(
r
(
a
,
d
.
engineSettings
))));
return
B
}}}(),
K
=
function
(
a
){
function
b
(
a
,
b
){
for
(
var
c
in
b
)
a
[
c
]
=
b
[
c
];
return
a
}
var
c
=
1
,
d
=
augment
.
defclass
({
constructor
:
function
(
a
){
c
++
,
this
.
parent
=
null
,
this
.
children
=
{},
this
.
id
=
c
,
this
.
name
=
"
n
"
+
c
,
null
!=
a
&&
(
this
.
name
=
a
),
this
.
x
=
0
,
this
.
y
=
0
,
this
.
z
=
0
,
this
.
width
=
0
,
this
.
height
=
0
},
resize
:
function
(
a
,
b
){
null
!=
a
&&
(
this
.
width
=
a
),
null
!=
b
&&
(
this
.
height
=
b
)},
moveTo
:
function
(
a
,
b
,
c
){
this
.
x
=
null
!=
a
?
a
:
this
.
x
,
this
.
y
=
null
!=
b
?
b
:
this
.
y
,
this
.
z
=
null
!=
c
?
c
:
this
.
z
},
add
:
function
(
a
){
var
b
=
a
.
name
;
if
(
null
!=
this
.
children
[
b
])
throw
"
SceneGraph: child with that name already exists:
"
+
b
;
this
.
children
[
b
]
=
a
,
a
.
parent
=
this
}}),
e
=
augment
(
d
,
function
(
b
){
this
.
constructor
=
function
(){
b
.
constructor
.
call
(
this
,
"
root
"
),
this
.
properties
=
a
}}),
f
=
augment
(
d
,
function
(
a
){
function
c
(
c
,
d
){
if
(
a
.
constructor
.
call
(
this
,
c
),
this
.
properties
=
{
fill
:
"
#000
"
},
null
!=
d
)
b
(
this
.
properties
,
d
);
else
if
(
null
!=
c
&&
"
string
"
!=
typeof
c
)
throw
"
SceneGraph: invalid node name
"
}
this
.
Group
=
augment
.
extend
(
this
,{
constructor
:
c
,
type
:
"
group
"
}),
this
.
Rect
=
augment
.
extend
(
this
,{
constructor
:
c
,
type
:
"
rect
"
}),
this
.
Text
=
augment
.
extend
(
this
,{
constructor
:
function
(
a
){
c
.
call
(
this
),
this
.
properties
.
text
=
a
},
type
:
"
text
"
})}),
g
=
new
e
;
return
this
.
Shape
=
f
,
this
.
root
=
g
,
this
};
for
(
var
L
in
G
.
flags
)
G
.
flags
.
hasOwnProperty
(
L
)
&&
(
G
.
flags
[
L
].
match
=
function
(
a
){
return
a
.
match
(
this
.
regex
)});
G
.
setup
=
{
renderer
:
"
html
"
,
debounce
:
100
,
ratio
:
1
,
supportsCanvas
:
!
1
,
supportsSVG
:
!
1
,
lineWrapRatio
:.
9
,
renderers
:[
"
html
"
,
"
canvas
"
,
"
svg
"
]},
G
.
dpr
=
function
(
a
){
return
a
*
G
.
setup
.
ratio
},
G
.
vars
=
{
preempted
:
!
1
,
resizableImages
:[],
invisibleImages
:{},
invisibleId
:
0
,
visibilityCheckStarted
:
!
1
,
debounceTimer
:
null
,
cache
:{}},
function
(){
var
a
=
1
,
c
=
1
,
d
=
o
(
"
canvas
"
),
e
=
null
;
d
.
getContext
&&-
1
!=
d
.
toDataURL
(
"
image/png
"
).
indexOf
(
"
data:image/png
"
)
&&
(
G
.
setup
.
renderer
=
"
canvas
"
,
e
=
d
.
getContext
(
"
2d
"
),
G
.
setup
.
supportsCanvas
=!
0
),
G
.
setup
.
supportsCanvas
&&
(
a
=
b
.
devicePixelRatio
||
1
,
c
=
e
.
webkitBackingStorePixelRatio
||
e
.
mozBackingStorePixelRatio
||
e
.
msBackingStorePixelRatio
||
e
.
oBackingStorePixelRatio
||
e
.
backingStorePixelRatio
||
1
),
G
.
setup
.
ratio
=
a
/
c
,
C
.
createElementNS
&&
C
.
createElementNS
(
A
,
"
svg
"
).
createSVGRect
&&
(
G
.
setup
.
renderer
=
"
svg
"
,
G
.
setup
.
supportsSVG
=!
0
)}(),
m
(),
a
(
F
,
"
Holder
"
,
b
),
b
.
onDomReady
&&
b
.
onDomReady
(
function
(){
G
.
vars
.
preempted
||
F
.
run
(),
b
.
addEventListener
?(
b
.
addEventListener
(
"
resize
"
,
v
,
!
1
),
b
.
addEventListener
(
"
orientationchange
"
,
v
,
!
1
)):
b
.
attachEvent
(
"
onresize
"
,
v
),
"
object
"
==
typeof
b
.
Turbolinks
&&
b
.
document
.
addEventListener
(
"
page:change
"
,
function
(){
F
.
run
()})})}(
function
(
a
,
b
,
c
){{
var
d
=
"
function
"
==
typeof
define
&&
define
.
amd
;
"
object
"
==
typeof
exports
}
d
?
define
(
a
):
c
[
b
]
=
a
},
this
);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment