diff --git a/Log/Web/Assets/CSSLog.go b/Log/Web/Assets/CSSLog.go new file mode 100644 index 0000000..f883dcf --- /dev/null +++ b/Log/Web/Assets/CSSLog.go @@ -0,0 +1,308 @@ +package Assets + +var CSSLog string = ` +body { + font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; + color: #333; + font-size: 14px; + line-height: 20px; +} +h1 { + margin-top: 20px; + margin-bottom: 10px; + font-size: 38px; + line-height: 44px; + font-weight: 700; +} +h2 { + margin-top: 20px; + margin-bottom: 10px; + font-size: 32px; + line-height: 36px; + font-weight: 700; +} +h3 { + margin-top: 20px; + margin-bottom: 10px; + font-size: 24px; + line-height: 30px; + font-weight: 700; +} +h4 { + margin-top: 10px; + margin-bottom: 10px; + font-size: 18px; + line-height: 24px; + font-weight: 700; +} +h5 { + margin-top: 10px; + margin-bottom: 10px; + font-size: 14px; + line-height: 20px; + font-weight: 700; +} +h6 { + margin-top: 10px; + margin-bottom: 10px; + font-size: 12px; + line-height: 18px; + font-weight: 700; +} +p { + margin-bottom: 5px; +} +.button { + display: inline-block; + padding: 4px 15px; + background-color: black; + color: white; + text-align: center; + text-decoration: none; +} +.button.changepagebutton { + margin-right: 3px; + margin-left: 3px; + background-color: #545454; +} +.button.changepagebutton.pagechangesubmit { + margin-right: 30px; +} +.button.optionbuttons { + margin: 6px; + background-color: #545454; +} +.button.optionbuttons.applyfilters { + margin-left: 0px; +} +.headercontainer { + height: 50px; + margin-top: -19px; + background-color: black; + color: white; + text-align: center; +} +.logcontainer { + margin-top: 0px; +} +.loglist { + margin-right: 3px; + margin-bottom: 3px; + margin-left: 3px; + padding-top: 0px; + padding-left: 0px; + list-style-type: none; +} +.logline { + margin: 3px 6px; + padding: 6px; + border: 1px solid #9e9e9e; + border-radius: 3px; + font-family:'Source Code Pro', sans-serif; + font-size: 10px; + font-weight: 900; +} +.logline.loga { + background-color: #ededed; +} +.logline.logb { + background-color: #cfcfcf; +} +.logline.logwarn { + color: #db7602; +} +.logline.logdebug { + color: #04f; +} +.logline.logerror { + color: #c00; +} +.logline.loginfo { + color: black; +} +.logline.logtalkative { + color: #a3a2a2; +} +.logline.logsecurity { + color: #db4500; +} +.logheadercontainer { + margin-top: 10px; + text-align: center; +} +.showposition { + margin-top: 10px; + font-size: 20px; +} +.controlcontainer { + margin-top: 10px; +} +.pagecontainer { + margin-top: 10px; + text-align: center; + list-style-type: none; +} +.icons { + position: absolute; + display: block; + width: 25px; + height: 25px; + margin-top: 15px; + margin-left: 254px; + padding-top: 0px; + font-family: Glyphicons, sans-serif; + color: black; + font-size: 25px; + font-weight: 400; + text-decoration: none; +} +.icons.oneback { + margin-top: 17px; + margin-left: 219px; +} +.icons.tofirst { + margin-top: 17px; + margin-left: 255px; +} +.icons.next { + margin-top: -38px; + margin-left: 668px; +} +.icons.tolast { + margin-top: -38px; + margin-left: 702px; +} +.formfield { + display: inline; + margin-right: 6px; + margin-left: 30px; + color: black; + font-weight: 400; +} +.formpages { + display: inline; +} +.currentpage { + display: inline-block; + width: 100px; + margin-top: 7px; + margin-right: 6px; + padding-top: 3px; + padding-bottom: 3px; + float: none; + clear: none; + color: black; + text-align: center; +} +.formpageswrapper { + display: inline; +} +.textcountpages { + display: inline; + margin-right: 6px; + color: black; +} +.logchangepagebutton { + height: 40px; + margin-left: 10px; + padding-top: 3px; + padding-bottom: 3px; + background-color: #a8a8a8; + color: black; + font-weight: 700; +} +.headercontrol { + text-align: center; +} +.headeroutput { + text-align: center; +} +.options { + background-color: #ededed; +} +.filters { + background-color: #ededed; +} +.labels { + display: block; +} +@media (max-width: 991px) { + .icons.oneback { + margin-left: 113px; + } + .icons.tofirst { + margin-left: 152px; + } + .icons.next { + margin-left: 563px; + } + .icons.tolast { + margin-left: 602px; + } +} +@media (max-width: 767px) { + .button.changepagebutton.pagechangesubmit { + margin-right: 0px; + } + .icons.oneback { + margin-left: 40px; + } + .icons.tofirst { + margin-left: 73px; + } + .icons.next { + margin-left: 483px; + } + .icons.tolast { + margin-left: 518px; + } + .formfield { + margin-left: 0px; + } + .newlineblock { + height: 10px; + } +} +@media (max-width: 479px) { + .button.changepagebutton.pagechangesubmit { + margin-right: 3px; + margin-bottom: 20px; + text-align: center; + } + .pagecontainer { + margin-top: 20px; + } + .icons.oneback { + margin-top: 113px; + margin-left: 25px; + } + .icons.tofirst { + margin-top: 113px; + margin-left: 62px; + } + .icons.next { + margin-top: 18px; + margin-left: 242px; + } + .icons.tolast { + margin-top: 18px; + margin-left: 278px; + } + .formfield { + margin-left: 0px; + } + .currentpage { + margin-top: 20px; + } + .newlineblock { + display: block; + height: 10px; + } +} + +@font-face { + font-family: 'Glyphicons'; + src: url('/binaryAssets/SourceCodePro-Black.eot') format('embedded-opentype'), url('/binaryAssets/SourceCodePro-Black.ttf') format('truetype'), url('/binaryAssets/SourceCodePro-Black.otf') format('opentype'); + font-weight: 400; + font-style: normal; +}` diff --git a/Log/Web/Assets/CSSNormalize.go b/Log/Web/Assets/CSSNormalize.go new file mode 100644 index 0000000..575736a --- /dev/null +++ b/Log/Web/Assets/CSSNormalize.go @@ -0,0 +1,343 @@ +package Assets + +var CSSNormalize string = ` +/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ +/** + * Correct "block" display not defined in IE 8/9. + */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} +/** + * Correct "inline-block" display not defined in IE 8/9. + */ +audio, +canvas, +video { + display: inline-block; +} +/** + * Prevent modern browsers from displaying "audio" without controls. + * Remove excess height in iOS 5 devices. + */ +audio:not([controls]) { + display: none; + height: 0; +} +/** + * Address "[hidden]" styling not present in IE 8/9. + * Hide the "template" element in IE, Safari, and Firefox < 22. + */ +[hidden], +template { + display: none; +} +/* ========================================================================== + Base + ========================================================================== */ +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ +html { + font-family: sans-serif; + /* 1 */ + -ms-text-size-adjust: 100%; + /* 2 */ + -webkit-text-size-adjust: 100%; + /* 2 */ +} +/** + * Remove default margin. + */ +body { + margin: 0; +} +/* ========================================================================== + Links + ========================================================================== */ +/** + * Remove the gray background color from active links in IE 10. + */ +a { + background: transparent; +} +/** + * Address "outline" inconsistency between Chrome and other browsers. + */ +a:focus { + outline: thin dotted; +} +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ +a:active, +a:hover { + outline: 0; +} +/* ========================================================================== + Typography + ========================================================================== */ +/** + * Address variable "h1" font-size and margin within "section" and "article" + * contexts in Firefox 4+, Safari 5, and Chrome. + */ +h1 { + font-size: 2em; + margin: 0.67em 0; +} +/** + * Address styling not present in IE 8/9, Safari 5, and Chrome. + */ +abbr[title] { + border-bottom: 1px dotted; +} +/** + * Address style set to "bolder" in Firefox 4+, Safari 5, and Chrome. + */ +b, +strong { + font-weight: bold; +} +/** + * Address styling not present in Safari 5 and Chrome. + */ +dfn { + font-style: italic; +} +/** + * Address differences between Firefox and other browsers. + */ +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} +/** + * Address styling not present in IE 8/9. + */ +mark { + background: #ff0; + color: #000; +} +/** + * Correct font family set oddly in Safari 5 and Chrome. + */ +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 1em; +} +/** + * Improve readability of pre-formatted text in all browsers. + */ +pre { + white-space: pre-wrap; +} +/** + * Set consistent quote types. + */ +q { + quotes: "\201C" "\201D" "\2018" "\2019"; +} +/** + * Address inconsistent and variable font size in all browsers. + */ +small { + font-size: 80%; +} +/** + * Prevent "sub" and "sup" affecting "line-height" in all browsers. + */ +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +/* ========================================================================== + Embedded content + ========================================================================== */ +/** + * Remove border when inside "a" element in IE 8/9. + */ +img { + border: 0; +} +/** + * Correct overflow displayed oddly in IE 9. + */ +svg:not(:root) { + overflow: hidden; +} +/* ========================================================================== + Figures + ========================================================================== */ +/** + * Address margin not present in IE 8/9 and Safari 5. + */ +figure { + margin: 0; +} +/* ========================================================================== + Forms + ========================================================================== */ +/** + * Define consistent border, margin, and padding. + */ +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} +/** + * 1. Correct "color" not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ +legend { + border: 0; + /* 1 */ + padding: 0; + /* 2 */ +} +/** + * 1. Correct font family not being inherited in all browsers. + * 2. Correct font size not being inherited in all browsers. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ +button, +input, +select, +textarea { + font-family: inherit; + /* 1 */ + font-size: 100%; + /* 2 */ + margin: 0; + /* 3 */ +} +/** + * Address Firefox 4+ setting "line-height" on "input" using "!important" in + * the UA stylesheet. + */ +button, +input { + line-height: normal; +} +/** + * Address inconsistent "text-transform" inheritance for "button" and "select". + * All other form control elements do not inherit "text-transform" values. + * Correct "button" style inheritance in Chrome, Safari 5+, and IE 8+. + * Correct "select" style inheritance in Firefox 4+ and Opera. + */ +button, +select { + text-transform: none; +} +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native "audio" + * and "video" controls. + * 2. Correct inability to style clickable "input" types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * "input" and others. + */ +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + /* 2 */ + cursor: pointer; + /* 3 */ +} +/** + * Re-set default cursor for disabled elements. + */ +button[disabled], +html input[disabled] { + cursor: default; +} +/** + * 1. Address box sizing set to "content-box" in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + /* 1 */ + padding: 0; + /* 2 */ +} +/** + * 1. Address "appearance" set to "searchfield" in Safari 5 and Chrome. + * 2. Address "box-sizing" set to "border-box" in Safari 5 and Chrome + * (include "-moz" to future-proof). + */ +input[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + /* 2 */ + box-sizing: content-box; +} +/** + * Remove inner padding and search cancel button in Safari 5 and Chrome + * on OS X. + */ +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +/** + * Remove inner padding and border in Firefox 4+. + */ +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} +/** + * 1. Remove default vertical scrollbar in IE 8/9. + * 2. Improve readability and alignment in all browsers. + */ +textarea { + overflow: auto; + /* 1 */ + vertical-align: top; + /* 2 */ +} +/* ========================================================================== + Tables + ========================================================================== */ +/** + * Remove most spacing between table cells. + */ +table { + border-collapse: collapse; + border-spacing: 0; +}` diff --git a/Log/Web/Assets/CSSWebflow.go b/Log/Web/Assets/CSSWebflow.go new file mode 100644 index 0000000..126bbc3 --- /dev/null +++ b/Log/Web/Assets/CSSWebflow.go @@ -0,0 +1,1667 @@ +package Assets + +var CSSWebflow string = ` +@font-face { + font-family: 'webflow-icons'; + src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg6SAy0AAAC8AAAAYGNtYXAaVcxaAAABHAAAAExnYXNwAAAAEAAAAWgAAAAIZ2x5ZgscV1gAAAFwAAABhGhlYWQCkFKvAAAC9AAAADZoaGVhB0MDyQAAAywAAAAkaG10eBIAA10AAANQAAAAIGxvY2EBMADyAAADcAAAABJtYXhwAAwATQAAA4QAAAAgbmFtZWTuiIAAAAOkAAABe3Bvc3QAAwAAAAAFIAAAACAAAwQAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADmAwPA/8D/wAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEADgAAAAKAAgAAgACAAEAIOYD//3//wAAAAAAIOYA//3//wAB/+MaBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQEgAAADIAOAAAUAAAkBBwkBFwMg/kBAAYD+gEABwAHAQP6A/oBAAAEA4AAAAuADgAAFAAATARcJAQfgAcBA/oABgEABwAHAQP6A/oBAAAADAMAA4ANAAsAAGAAxAEoAAAEhIg4CHQEUHgIzITI+Aj0BNC4CIxUhIg4CHQEUHgIzITI+Aj0BNC4CIxUhIg4CHQEUHgIzITI+Aj0BNC4CIwMg/cAHCwkFBQkLBwJABwsJBQUJCwf9wAcLCQUFCQsHAkAHCwkFBQkLB/3ABwsJBQUJCwcCQAcLCQUFCQsHAsAFCQsHIAcLCQUFCQsHIAcLCQXABQkLByAHCwkFBQkLByAHCwkFwAUJCwcgBwsJBQUJCwcgBwsJBQAAAAABAJ0AtAOBApUABQAACQIHCQEDJP7r/upcAXEBcgKU/usBFFv+egGGAAAAAAEAAAABAADSLAJOXw889QALBAAAAAAAz/iHGQAAAADP+IcZAAAAAAOBA4AAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAA4EAAQAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAACAAAABAABIAQAAOAEAADABAAAnQAAAAAACgAUAB4AMgBGAKwAwgAAAAEAAAAIAEsAAwAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAaAAAAAQAAAAAAAgAOAHEAAQAAAAAAAwAaADAAAQAAAAAABAAaAH8AAQAAAAAABQAWABoAAQAAAAAABgANAEoAAQAAAAAACgA0AJkAAwABBAkAAQAaAAAAAwABBAkAAgAOAHEAAwABBAkAAwAaADAAAwABBAkABAAaAH8AAwABBAkABQAWABoAAwABBAkABgAaAFcAAwABBAkACgA0AJkAdwBlAGIAZgBsAG8AdwAtAGkAYwBvAG4AcwBWAGUAcgBzAGkAbwBuACAAMQAuADAAdwBlAGIAZgBsAG8AdwAtAGkAYwBvAG4Ac3dlYmZsb3ctaWNvbnMAdwBlAGIAZgBsAG8AdwAtAGkAYwBvAG4AcwBSAGUAZwB1AGwAYQByAHcAZQBiAGYAbABvAHcALQBpAGMAbwBuAHMARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('truetype'), url(data:application/font-woff;charset=utf-8;base64,d09GRk9UVE8AAAVcAAoAAAAABRQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAAAZMAAAGTuzUomU9TLzIAAAKIAAAAYAAAAGAOkgMtY21hcAAAAugAAABMAAAATBpVzFpnYXNwAAADNAAAAAgAAAAIAAAAEGhlYWQAAAM8AAAANgAAADYCkFKvaGhlYQAAA3QAAAAkAAAAJAdDA8lobXR4AAADmAAAACAAAAAgEgADXW1heHAAAAO4AAAABgAAAAYACFAAbmFtZQAAA8AAAAF7AAABe2TuiIBwb3N0AAAFPAAAACAAAAAgAAMAAAEABAQAAQEBDndlYmZsb3ctaWNvbnMAAQIAAQA6+BwC+BsD+BgEHgoACXf/i4seCgAJd/+LiwwHi0v6lPpUBR0AAACaDx0AAACfER0AAAAJHQAAAYoSAAkBAQ4bHR8iJywxNndlYmZsb3ctaWNvbnN3ZWJmbG93LWljb25zdTB1MXUyMHVFNjAwdUU2MDF1RTYwMnVFNjAzAAACAYkABgAIAQEEBwoNJDvH4P6UDv6UDv6UDvyUDvm0+FQV/FT4VEtL+BT8FPwU/BTLSwUO93T4VBX4VPhUy0v8FPwU+BT8FEtLBQ75tPlUFfzUiwV5i319i3kIi2sFi3mZfZ2LCPjUiwWdi5mZi50Ii6sFi519mXmLCIv7VBX81IsFeYt9fYt5CItrBYt5mX2diwj41IsFnYuZmYudCIurBYudfZl5iwiL+1QV/NSLBXmLfX2LeQiLawWLeZl9nYsI+NSLBZ2LmZmLnQiLqwWLnX2ZeYsIDvm4+SkV+6n7qvuq96ovLvgG/Bj4BvgYBQ76lBT6lBWLDAoAAAMEAAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA5gMDwP/A/8ADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAgAAAAMAAAAUAAMAAQAAABQABAA4AAAACgAIAAIAAgABACDmA//9//8AAAAAACDmAP/9//8AAf/jGgQAAwABAAAAAAAAAAAAAAABAAH//wAPAAEAAAABAAC1pQTjXw889QALBAAAAAAAz/iHGQAAAADP+IcZAAAAAAOBA4AAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAA4EAAQAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAACAAAABAABIAQAAOAEAADABAAAnQAAUAAACAAAAAAADgCuAAEAAAAAAAEAGgAAAAEAAAAAAAIADgBxAAEAAAAAAAMAGgAwAAEAAAAAAAQAGgB/AAEAAAAAAAUAFgAaAAEAAAAAAAYADQBKAAEAAAAAAAoANACZAAMAAQQJAAEAGgAAAAMAAQQJAAIADgBxAAMAAQQJAAMAGgAwAAMAAQQJAAQAGgB/AAMAAQQJAAUAFgAaAAMAAQQJAAYAGgBXAAMAAQQJAAoANACZAHcAZQBiAGYAbABvAHcALQBpAGMAbwBuAHMAVgBlAHIAcwBpAG8AbgAgADEALgAwAHcAZQBiAGYAbABvAHcALQBpAGMAbwBuAHN3ZWJmbG93LWljb25zAHcAZQBiAGYAbABvAHcALQBpAGMAbwBuAHMAUgBlAGcAdQBsAGEAcgB3AGUAYgBmAGwAbwB3AC0AaQBjAG8AbgBzAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff'); + font-weight: normal; + font-style: normal; +} +[class^="w-icon-"], +[class*=" w-icon-"] { + font-family: 'webflow-icons'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.w-icon-slider-right:before { + content: "\e600"; +} +.w-icon-slider-left:before { + content: "\e601"; +} +.w-icon-nav-menu:before { + content: "\e602"; +} +.w-icon-arrow-down:before, +.w-icon-dropdown-toggle:before { + content: "\e603"; +} +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +html { + height: 100%; +} +body { + margin: 0; + min-height: 100%; + background-color: #fff; + color: #333; +} +img { + max-width: 100%; + vertical-align: middle; + display: inline-block; +} +html.w-mod-touch * { + background-attachment: scroll !important; +} +a:focus { + outline: 0; +} +.w-block { + display: block; +} +.w-inline-block { + max-width: 100%; + display: inline-block; +} +.w-clearfix:before, +.w-clearfix:after { + content: " "; + display: table; +} +.w-clearfix:after { + clear: both; +} +.w-hidden { + display: none; +} +html[w-dynpage] [w-cloak] { + color: transparent !important; +} +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 0; +} +p { + margin: 0; +} +blockquote { + margin: 0; +} +ul, +ol { + margin-top: 0; + margin-bottom: 0; +} +.w-list-unstyled { + padding-left: 0; + list-style: none; +} +.w-embed:before, +.w-embed:after { + content: " "; + display: table; +} +.w-embed:after { + clear: both; +} +.w-video { + width: 100%; + position: relative; + padding: 0; +} +.w-video iframe, +.w-video object, +.w-video embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +fieldset { + padding: 0; + margin: 0; + border: 0; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; +} +.w-form { + margin: 0 0 15px; +} +.w-form-done { + display: none; + padding: 10px; + background-color: #dddddd; +} +.w-form-fail { + display: none; + margin-top: 10px; + padding: 10px; + background-color: #ffdede; +} +label { + display: block; + margin-bottom: 5px; + font-weight: bold; +} +.w-input, +.w-select { + display: block; + width: 100%; + height: 38px; + padding: 8px 12px; + margin-bottom: 10px; + font-size: 14px; + line-height: 1.428571429; + color: #555555; + vertical-align: middle; + background-color: #ffffff; + border: 1px solid #cccccc; +} +.w-input:-moz-placeholder, +.w-select:-moz-placeholder { + color: #999999; +} +.w-input::-moz-placeholder, +.w-select::-moz-placeholder { + color: #999999; + opacity: 1; +} +.w-input:-ms-input-placeholder, +.w-select:-ms-input-placeholder { + color: #999999; +} +.w-input::-webkit-input-placeholder, +.w-select::-webkit-input-placeholder { + color: #999999; +} +.w-input:focus, +.w-select:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; +} +.w-input[disabled], +.w-select[disabled], +.w-input[readonly], +.w-select[readonly], +fieldset[disabled] .w-input, +fieldset[disabled] .w-select { + cursor: not-allowed; + background-color: #eeeeee; +} +textarea.w-input, +textarea.w-select { + height: auto; +} +.w-select[multiple] { + height: auto; +} +.w-button { + display: inline-block; + padding: 12px; + background-color: black; + color: white; + border: 0; + line-height: inherit; +} +.w-form-label { + display: inline-block; + cursor: pointer; + font-weight: normal; + margin-bottom: 0px; +} +.w-checkbox, +.w-radio { + display: block; + margin-bottom: 5px; + padding-left: 20px; +} +.w-checkbox:before, +.w-radio:before, +.w-checkbox:after, +.w-radio:after { + content: " "; + display: table; +} +.w-checkbox:after, +.w-radio:after { + clear: both; +} +.w-checkbox-input, +.w-radio-input { + margin: 4px 0 0; + margin-top: 1px \9; + line-height: normal; + float: left; + margin-left: -20px; +} +.w-radio-input { + margin-top: 3px; +} +.w-container { + margin-left: auto; + margin-right: auto; + max-width: 940px; +} +.w-container:before, +.w-container:after { + content: " "; + display: table; +} +.w-container:after { + clear: both; +} +.w-container .w-row { + margin-left: -10px; + margin-right: -10px; +} +.w-row:before, +.w-row:after { + content: " "; + display: table; +} +.w-row:after { + clear: both; +} +.w-row .w-row { + margin-left: 0; + margin-right: 0; +} +.w-col { + position: relative; + float: left; + width: 100%; + min-height: 1px; + padding-left: 10px; + padding-right: 10px; +} +.w-col .w-col { + padding-left: 0; + padding-right: 0; +} +.w-col-1 { + width: 8.33333333%; +} +.w-col-2 { + width: 16.66666667%; +} +.w-col-3 { + width: 25%; +} +.w-col-4 { + width: 33.33333333%; +} +.w-col-5 { + width: 41.66666667%; +} +.w-col-6 { + width: 50%; +} +.w-col-7 { + width: 58.33333333%; +} +.w-col-8 { + width: 66.66666667%; +} +.w-col-9 { + width: 75%; +} +.w-col-10 { + width: 83.33333333%; +} +.w-col-11 { + width: 91.66666667%; +} +.w-col-12 { + width: 100%; +} +.w-col-push-1 { + left: 8.33333333%; +} +.w-col-push-2 { + left: 16.66666667%; +} +.w-col-push-3 { + left: 25%; +} +.w-col-push-4 { + left: 33.33333333%; +} +.w-col-push-5 { + left: 41.66666667%; +} +.w-col-push-6 { + left: 50%; +} +.w-col-push-7 { + left: 58.33333333%; +} +.w-col-push-8 { + left: 66.66666667%; +} +.w-col-push-9 { + left: 75%; +} +.w-col-push-10 { + left: 83.33333333%; +} +.w-col-push-11 { + left: 91.66666667%; +} +.w-col-pull-1 { + right: 8.33333333%; +} +.w-col-pull-2 { + right: 16.66666667%; +} +.w-col-pull-3 { + right: 25%; +} +.w-col-pull-4 { + right: 33.33333333%; +} +.w-col-pull-5 { + right: 41.66666667%; +} +.w-col-pull-6 { + right: 50%; +} +.w-col-pull-7 { + right: 58.33333333%; +} +.w-col-pull-8 { + right: 66.66666667%; +} +.w-col-pull-9 { + right: 75%; +} +.w-col-pull-10 { + right: 83.33333333%; +} +.w-col-pull-11 { + right: 91.66666667%; +} +.w-col-offset-1 { + margin-left: 8.33333333%; +} +.w-col-offset-2 { + margin-left: 16.66666667%; +} +.w-col-offset-3 { + margin-left: 25%; +} +.w-col-offset-4 { + margin-left: 33.33333333%; +} +.w-col-offset-5 { + margin-left: 41.66666667%; +} +.w-col-offset-6 { + margin-left: 50%; +} +.w-col-offset-7 { + margin-left: 58.33333333%; +} +.w-col-offset-8 { + margin-left: 66.66666667%; +} +.w-col-offset-9 { + margin-left: 75%; +} +.w-col-offset-10 { + margin-left: 83.33333333%; +} +.w-col-offset-11 { + margin-left: 91.66666667%; +} +.w-hidden-main { + display: none !important; +} +@media screen and (max-width: 991px) { + .w-container { + max-width: 728px; + } + .w-hidden-main { + display: inherit !important; + } + .w-hidden-medium { + display: none !important; + } + .w-col-medium-1 { + width: 8.33333333%; + } + .w-col-medium-2 { + width: 16.66666667%; + } + .w-col-medium-3 { + width: 25%; + } + .w-col-medium-4 { + width: 33.33333333%; + } + .w-col-medium-5 { + width: 41.66666667%; + } + .w-col-medium-6 { + width: 50%; + } + .w-col-medium-7 { + width: 58.33333333%; + } + .w-col-medium-8 { + width: 66.66666667%; + } + .w-col-medium-9 { + width: 75%; + } + .w-col-medium-10 { + width: 83.33333333%; + } + .w-col-medium-11 { + width: 91.66666667%; + } + .w-col-medium-12 { + width: 100%; + } + .w-col-medium-push-1 { + left: 8.33333333%; + } + .w-col-medium-push-2 { + left: 16.66666667%; + } + .w-col-medium-push-3 { + left: 25%; + } + .w-col-medium-push-4 { + left: 33.33333333%; + } + .w-col-medium-push-5 { + left: 41.66666667%; + } + .w-col-medium-push-6 { + left: 50%; + } + .w-col-medium-push-7 { + left: 58.33333333%; + } + .w-col-medium-push-8 { + left: 66.66666667%; + } + .w-col-medium-push-9 { + left: 75%; + } + .w-col-medium-push-10 { + left: 83.33333333%; + } + .w-col-medium-push-11 { + left: 91.66666667%; + } + .w-col-medium-pull-1 { + right: 8.33333333%; + } + .w-col-medium-pull-2 { + right: 16.66666667%; + } + .w-col-medium-pull-3 { + right: 25%; + } + .w-col-medium-pull-4 { + right: 33.33333333%; + } + .w-col-medium-pull-5 { + right: 41.66666667%; + } + .w-col-medium-pull-6 { + right: 50%; + } + .w-col-medium-pull-7 { + right: 58.33333333%; + } + .w-col-medium-pull-8 { + right: 66.66666667%; + } + .w-col-medium-pull-9 { + right: 75%; + } + .w-col-medium-pull-10 { + right: 83.33333333%; + } + .w-col-medium-pull-11 { + right: 91.66666667%; + } + .w-col-medium-offset-1 { + margin-left: 8.33333333%; + } + .w-col-medium-offset-2 { + margin-left: 16.66666667%; + } + .w-col-medium-offset-3 { + margin-left: 25%; + } + .w-col-medium-offset-4 { + margin-left: 33.33333333%; + } + .w-col-medium-offset-5 { + margin-left: 41.66666667%; + } + .w-col-medium-offset-6 { + margin-left: 50%; + } + .w-col-medium-offset-7 { + margin-left: 58.33333333%; + } + .w-col-medium-offset-8 { + margin-left: 66.66666667%; + } + .w-col-medium-offset-9 { + margin-left: 75%; + } + .w-col-medium-offset-10 { + margin-left: 83.33333333%; + } + .w-col-medium-offset-11 { + margin-left: 91.66666667%; + } + .w-col-stack { + width: 100%; + left: auto; + right: auto; + } +} +@media screen and (max-width: 767px) { + .w-hidden-main { + display: inherit !important; + } + .w-hidden-medium { + display: inherit !important; + } + .w-hidden-small { + display: none !important; + } + .w-row, + .w-container .w-row { + margin-left: 0; + margin-right: 0; + } + .w-col { + width: 100%; + left: auto; + right: auto; + } + .w-col-small-1 { + width: 8.33333333%; + } + .w-col-small-2 { + width: 16.66666667%; + } + .w-col-small-3 { + width: 25%; + } + .w-col-small-4 { + width: 33.33333333%; + } + .w-col-small-5 { + width: 41.66666667%; + } + .w-col-small-6 { + width: 50%; + } + .w-col-small-7 { + width: 58.33333333%; + } + .w-col-small-8 { + width: 66.66666667%; + } + .w-col-small-9 { + width: 75%; + } + .w-col-small-10 { + width: 83.33333333%; + } + .w-col-small-11 { + width: 91.66666667%; + } + .w-col-small-12 { + width: 100%; + } + .w-col-small-push-1 { + left: 8.33333333%; + } + .w-col-small-push-2 { + left: 16.66666667%; + } + .w-col-small-push-3 { + left: 25%; + } + .w-col-small-push-4 { + left: 33.33333333%; + } + .w-col-small-push-5 { + left: 41.66666667%; + } + .w-col-small-push-6 { + left: 50%; + } + .w-col-small-push-7 { + left: 58.33333333%; + } + .w-col-small-push-8 { + left: 66.66666667%; + } + .w-col-small-push-9 { + left: 75%; + } + .w-col-small-push-10 { + left: 83.33333333%; + } + .w-col-small-push-11 { + left: 91.66666667%; + } + .w-col-small-pull-1 { + right: 8.33333333%; + } + .w-col-small-pull-2 { + right: 16.66666667%; + } + .w-col-small-pull-3 { + right: 25%; + } + .w-col-small-pull-4 { + right: 33.33333333%; + } + .w-col-small-pull-5 { + right: 41.66666667%; + } + .w-col-small-pull-6 { + right: 50%; + } + .w-col-small-pull-7 { + right: 58.33333333%; + } + .w-col-small-pull-8 { + right: 66.66666667%; + } + .w-col-small-pull-9 { + right: 75%; + } + .w-col-small-pull-10 { + right: 83.33333333%; + } + .w-col-small-pull-11 { + right: 91.66666667%; + } + .w-col-small-offset-1 { + margin-left: 8.33333333%; + } + .w-col-small-offset-2 { + margin-left: 16.66666667%; + } + .w-col-small-offset-3 { + margin-left: 25%; + } + .w-col-small-offset-4 { + margin-left: 33.33333333%; + } + .w-col-small-offset-5 { + margin-left: 41.66666667%; + } + .w-col-small-offset-6 { + margin-left: 50%; + } + .w-col-small-offset-7 { + margin-left: 58.33333333%; + } + .w-col-small-offset-8 { + margin-left: 66.66666667%; + } + .w-col-small-offset-9 { + margin-left: 75%; + } + .w-col-small-offset-10 { + margin-left: 83.33333333%; + } + .w-col-small-offset-11 { + margin-left: 91.66666667%; + } +} +@media screen and (max-width: 479px) { + .w-container { + max-width: none; + } + .w-hidden-main { + display: inherit !important; + } + .w-hidden-medium { + display: inherit !important; + } + .w-hidden-small { + display: inherit !important; + } + .w-hidden-tiny { + display: none !important; + } + .w-col { + width: 100%; + } + .w-col-tiny-1 { + width: 8.33333333%; + } + .w-col-tiny-2 { + width: 16.66666667%; + } + .w-col-tiny-3 { + width: 25%; + } + .w-col-tiny-4 { + width: 33.33333333%; + } + .w-col-tiny-5 { + width: 41.66666667%; + } + .w-col-tiny-6 { + width: 50%; + } + .w-col-tiny-7 { + width: 58.33333333%; + } + .w-col-tiny-8 { + width: 66.66666667%; + } + .w-col-tiny-9 { + width: 75%; + } + .w-col-tiny-10 { + width: 83.33333333%; + } + .w-col-tiny-11 { + width: 91.66666667%; + } + .w-col-tiny-12 { + width: 100%; + } + .w-col-tiny-push-1 { + left: 8.33333333%; + } + .w-col-tiny-push-2 { + left: 16.66666667%; + } + .w-col-tiny-push-3 { + left: 25%; + } + .w-col-tiny-push-4 { + left: 33.33333333%; + } + .w-col-tiny-push-5 { + left: 41.66666667%; + } + .w-col-tiny-push-6 { + left: 50%; + } + .w-col-tiny-push-7 { + left: 58.33333333%; + } + .w-col-tiny-push-8 { + left: 66.66666667%; + } + .w-col-tiny-push-9 { + left: 75%; + } + .w-col-tiny-push-10 { + left: 83.33333333%; + } + .w-col-tiny-push-11 { + left: 91.66666667%; + } + .w-col-tiny-pull-1 { + right: 8.33333333%; + } + .w-col-tiny-pull-2 { + right: 16.66666667%; + } + .w-col-tiny-pull-3 { + right: 25%; + } + .w-col-tiny-pull-4 { + right: 33.33333333%; + } + .w-col-tiny-pull-5 { + right: 41.66666667%; + } + .w-col-tiny-pull-6 { + right: 50%; + } + .w-col-tiny-pull-7 { + right: 58.33333333%; + } + .w-col-tiny-pull-8 { + right: 66.66666667%; + } + .w-col-tiny-pull-9 { + right: 75%; + } + .w-col-tiny-pull-10 { + right: 83.33333333%; + } + .w-col-tiny-pull-11 { + right: 91.66666667%; + } + .w-col-tiny-offset-1 { + margin-left: 8.33333333%; + } + .w-col-tiny-offset-2 { + margin-left: 16.66666667%; + } + .w-col-tiny-offset-3 { + margin-left: 25%; + } + .w-col-tiny-offset-4 { + margin-left: 33.33333333%; + } + .w-col-tiny-offset-5 { + margin-left: 41.66666667%; + } + .w-col-tiny-offset-6 { + margin-left: 50%; + } + .w-col-tiny-offset-7 { + margin-left: 58.33333333%; + } + .w-col-tiny-offset-8 { + margin-left: 66.66666667%; + } + .w-col-tiny-offset-9 { + margin-left: 75%; + } + .w-col-tiny-offset-10 { + margin-left: 83.33333333%; + } + .w-col-tiny-offset-11 { + margin-left: 91.66666667%; + } +} +.w-widget { + position: relative; +} +.w-widget-map { + width: 100%; + height: 400px; +} +.w-widget-map label { + width: auto; + display: inline; +} +.w-widget-map img { + max-width: inherit; +} +.w-widget-map .gm-style-iw { + width: 90% !important; + height: auto !important; + top: 7px !important; + left: 6% !important; + display: inline; + text-align: center; + overflow: hidden; +} +.w-widget-map .gm-style-iw + div { + display: none; +} +.w-widget-twitter { + overflow: hidden; +} +.w-widget-gplus { + overflow: hidden; +} +.w-slider { + position: relative; + height: 300px; + text-align: center; + background: rgba(153, 153, 153, 0.5); + clear: both; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + tap-highlight-color: rgba(0, 0, 0, 0); +} +.w-slider-mask { + position: relative; + display: block; + overflow: hidden; + z-index: 1; + left: 0; + right: 0; + height: 100%; + white-space: nowrap; +} +.w-slide { + position: relative; + display: inline-block; + vertical-align: top; + width: 100%; + height: 100%; + white-space: normal; + text-align: left; +} +.w-slider-nav { + position: absolute; + z-index: 2; + top: auto; + right: 0; + bottom: 0; + left: 0; + margin: auto; + padding-top: 10px; + height: 40px; + text-align: center; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + tap-highlight-color: rgba(0, 0, 0, 0); +} +.w-slider-nav.w-round > div { + -webkit-border-radius: 100%; + -webkit-background-clip: padding-box; + -moz-border-radius: 100%; + -moz-background-clip: padding; + border-radius: 100%; + background-clip: padding-box; +} +.w-slider-nav.w-num > div { + width: auto; + height: auto; + padding: 0.2em 0.5em; + font-size: inherit; + line-height: inherit; +} +.w-slider-nav.w-shadow > div { + -webkit-box-shadow: 0 0 3px rgba(51, 51, 51, 0.4); + -moz-box-shadow: 0 0 3px rgba(51, 51, 51, 0.4); + box-shadow: 0 0 3px rgba(51, 51, 51, 0.4); +} +.w-slider-nav-invert { + color: #fff; +} +.w-slider-nav-invert > div { + background-color: rgba(34, 34, 34, 0.4); +} +.w-slider-nav-invert > div.w-active { + background-color: #222; +} +.w-slider-dot { + position: relative; + display: inline-block; + width: 1em; + height: 1em; + background-color: rgba(255, 255, 255, 0.4); + cursor: pointer; + margin: 0 3px 0.5em; + -webkit-transition: background-color 100ms, color 100ms; + -moz-transition: background-color 100ms, color 100ms; + -o-transition: background-color 100ms, color 100ms; + transition: background-color 100ms, color 100ms; +} +.w-slider-dot.w-active { + background-color: #fff; +} +.w-slider-arrow-left, +.w-slider-arrow-right { + position: absolute; + width: 80px; + top: 0; + right: 0; + bottom: 0; + left: 0; + margin: auto; + cursor: pointer; + overflow: hidden; + color: white; + font-size: 40px; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.w-slider-arrow-left [class^="w-icon-"], +.w-slider-arrow-right [class^="w-icon-"], +.w-slider-arrow-left [class*=" w-icon-"], +.w-slider-arrow-right [class*=" w-icon-"] { + position: absolute; +} +.w-slider-arrow-left { + z-index: 3; + right: auto; +} +.w-slider-arrow-right { + z-index: 4; + left: auto; +} +.w-icon-slider-left, +.w-icon-slider-right { + top: 0; + right: 0; + bottom: 0; + left: 0; + margin: auto; + width: 1em; + height: 1em; +} +.w-dropdown { + display: inline-block; + position: relative; + text-align: left; + margin-left: auto; + margin-right: auto; + z-index: 900; +} +.w-dropdown-btn, +.w-dropdown-toggle, +.w-dropdown-link { + position: relative; + vertical-align: top; + text-decoration: none; + color: #222; + padding: 20px; + text-align: left; + margin-left: auto; + margin-right: auto; + white-space: nowrap; +} +.w-dropdown-toggle { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + display: inline-block; + cursor: pointer; + padding-right: 40px; +} +.w-dropdown-toggle:focus { + outline: 0; +} +.w-icon-dropdown-toggle { + position: absolute; + top: 0; + right: 0; + bottom: 0; + margin: auto; + margin-right: 20px; + width: 1em; + height: 1em; +} +.w-dropdown-list { + position: absolute; + background: #f2f2f2; + display: none; + min-width: 100%; +} +.w-dropdown-list.w--open { + display: block; +} +.w-dropdown-link { + padding: 10px 20px; + display: block; +} +.w-dropdown-link.w--current { + color: #339ce1; +} +.w-nav[data-collapse="all"] .w-dropdown, +.w-nav[data-collapse="all"] .w-dropdown-toggle { + display: block; +} +.w-nav[data-collapse="all"] .w-dropdown-list { + position: static; +} +@media screen and (max-width: 991px) { + .w-nav[data-collapse="medium"] .w-dropdown, + .w-nav[data-collapse="medium"] .w-dropdown-toggle { + display: block; + } + .w-nav[data-collapse="medium"] .w-dropdown-list { + position: static; + } +} +@media screen and (max-width: 767px) { + .w-nav[data-collapse="small"] .w-dropdown, + .w-nav[data-collapse="small"] .w-dropdown-toggle { + display: block; + } + .w-nav[data-collapse="small"] .w-dropdown-list { + position: static; + } + .w-nav-brand { + padding-left: 10px; + } +} +@media screen and (max-width: 479px) { + .w-nav[data-collapse="tiny"] .w-dropdown, + .w-nav[data-collapse="tiny"] .w-dropdown-toggle { + display: block; + } + .w-nav[data-collapse="tiny"] .w-dropdown-list { + position: static; + } +} +/** + * ## Note + * Safari (on both iOS and OS X) does not handle viewport units (vh, vw) well. + * For example percentage units do not work on descendants of elements that + * have any dimensions expressed in viewport units. It also doesn’t handle them at + * all in `calc()`. + */ +/** + * Wrapper around all lightbox elements + * + * 1. Since the lightbox can receive focus, IE also gives it an outline. + * 2. Fixes flickering on Chrome when a transition is in progress + * underneath the lightbox. + */ +.w-lightbox-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + color: #fff; + font-family: "Helvetica Neue", Helvetica, Ubuntu, "Segoe UI", Verdana, sans-serif; + font-size: 17px; + font-weight: 300; + text-align: center; + background: rgba(0, 0, 0, 0.9); + z-index: 2000; + outline: 0; + /* 1 */ + opacity: 0; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -webkit-tap-highlight-color: transparent; + -webkit-transform: translate(0, 0); + /* 2 */ +} +/** + * Neat trick to bind the rubberband effect to our canvas instead of the whole + * document on iOS. It also prevents a bug that causes the document underneath to scroll. + */ +.w-lightbox-backdrop, +.w-lightbox-container { + height: 100%; + overflow: auto; + -webkit-overflow-scrolling: touch; +} +.w-lightbox-content { + position: relative; + height: 100vh; + overflow: hidden; +} +.w-lightbox-view { + position: absolute; + width: 100vw; + height: 100vh; + opacity: 0; +} +.w-lightbox-view:before { + content: ""; + height: 100vh; +} +/* .w-lightbox-content */ +.w-lightbox-group, +.w-lightbox-group .w-lightbox-view, +.w-lightbox-group .w-lightbox-view:before { + height: 86vh; +} +.w-lightbox-frame, +.w-lightbox-view:before { + display: inline-block; + vertical-align: middle; +} +/* + * 1. Remove default margin set by user-agent on the
element. + */ +.w-lightbox-figure { + position: relative; + margin: 0; + /* 1 */ +} +.w-lightbox-group .w-lightbox-figure { + cursor: pointer; +} +/** + * IE adds image dimensions as width and height attributes on the IMG tag, + * but we need both width and height to be set to auto to enable scaling. + */ +.w-lightbox-img { + width: auto; + height: auto; + max-width: none; +} +.w-lightbox-image { + display: block; + max-width: 100vw; + max-height: 100vh; +} +.w-lightbox-group .w-lightbox-image { + max-height: 86vh; +} +.w-lightbox-caption { + position: absolute; + right: 0; + bottom: 0; + left: 0; + padding: .5em 1em; + background: rgba(0, 0, 0, 0.4); + text-align: left; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} +.w-lightbox-embed { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; +} +.w-lightbox-control { + position: absolute; + top: 0; + width: 4em; + background-size: 24px; + background-repeat: no-repeat; + background-position: center; + cursor: pointer; + -webkit-transition: all .3s; + transition: all .3s; +} +.w-lightbox-left { + display: none; + bottom: 0; + left: 0; + /* */ + background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0yMCAwIDI0IDQwIiB3aWR0aD0iMjQiIGhlaWdodD0iNDAiPjxnIHRyYW5zZm9ybT0icm90YXRlKDQ1KSI+PHBhdGggZD0ibTAgMGg1djIzaDIzdjVoLTI4eiIgb3BhY2l0eT0iLjQiLz48cGF0aCBkPSJtMSAxaDN2MjNoMjN2M2gtMjZ6IiBmaWxsPSIjZmZmIi8+PC9nPjwvc3ZnPg=="); +} +.w-lightbox-right { + display: none; + right: 0; + bottom: 0; + /* */ + background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii00IDAgMjQgNDAiIHdpZHRoPSIyNCIgaGVpZ2h0PSI0MCI+PGcgdHJhbnNmb3JtPSJyb3RhdGUoNDUpIj48cGF0aCBkPSJtMC0waDI4djI4aC01di0yM2gtMjN6IiBvcGFjaXR5PSIuNCIvPjxwYXRoIGQ9Im0xIDFoMjZ2MjZoLTN2LTIzaC0yM3oiIGZpbGw9IiNmZmYiLz48L2c+PC9zdmc+"); +} +/* + * Without specifying the with and height inside the SVG, all versions of IE render the icon too small. + * The bug does not seem to manifest itself if the elements are tall enough such as the above arrows. + * (http://stackoverflow.com/questions/16092114/background-size-differs-in-internet-explorer) + */ +.w-lightbox-close { + right: 0; + height: 2.6em; + /* */ + background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii00IDAgMTggMTciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxNyI+PGcgdHJhbnNmb3JtPSJyb3RhdGUoNDUpIj48cGF0aCBkPSJtMCAwaDd2LTdoNXY3aDd2NWgtN3Y3aC01di03aC03eiIgb3BhY2l0eT0iLjQiLz48cGF0aCBkPSJtMSAxaDd2LTdoM3Y3aDd2M2gtN3Y3aC0zdi03aC03eiIgZmlsbD0iI2ZmZiIvPjwvZz48L3N2Zz4="); + background-size: 18px; +} +/** + * 1. All IE versions add extra space at the bottom without this. + */ +.w-lightbox-strip { + padding: 0 1vh; + line-height: 0; + /* 1 */ + white-space: nowrap; + overflow-x: auto; + overflow-y: hidden; +} +/* + * 1. We use content-box to avoid having to do `width: calc(10vh + 2vw)` + * which doesn’t work in Safari anyway. + * 2. Chrome renders images pixelated when switching to GPU. Making sure + * the parent is also rendered on the GPU (by setting translate3d for + * example) fixes this behavior. + */ +.w-lightbox-item { + display: inline-block; + width: 10vh; + padding: 2vh 1vh; + box-sizing: content-box; + /* 1 */ + cursor: pointer; + -webkit-transform: translate3d(0, 0, 0); + /* 2 */ +} +.w-lightbox-active { + opacity: .3; +} +.w-lightbox-thumbnail { + position: relative; + height: 10vh; + background: #222; + overflow: hidden; +} +.w-lightbox-thumbnail-image { + position: absolute; + top: 0; + left: 0; +} +.w-lightbox-thumbnail .w-lightbox-tall { + top: 50%; + width: 100%; + -webkit-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); + transform: translate(0, -50%); +} +.w-lightbox-thumbnail .w-lightbox-wide { + left: 50%; + height: 100%; + -webkit-transform: translate(-50%, 0); + -ms-transform: translate(-50%, 0); + transform: translate(-50%, 0); +} +/* + * Spinner + * + * Absolute pixel values are used to avoid rounding errors that would cause + * the white spinning element to be misaligned with the track. + */ +.w-lightbox-spinner { + position: absolute; + top: 50%; + left: 50%; + box-sizing: border-box; + width: 40px; + height: 40px; + margin-top: -20px; + margin-left: -20px; + border: 5px solid rgba(0, 0, 0, 0.4); + border-radius: 50%; + -webkit-animation: spin .8s infinite linear; + animation: spin .8s infinite linear; +} +.w-lightbox-spinner:after { + content: ""; + position: absolute; + top: -4px; + right: -4px; + bottom: -4px; + left: -4px; + border: 3px solid transparent; + border-bottom-color: #fff; + border-radius: 50%; +} +/* + * Utility classes + */ +.w-lightbox-hide { + display: none; +} +.w-lightbox-noscroll { + overflow: hidden; +} +@media (min-width: 768px) { + .w-lightbox-content { + height: 96vh; + margin-top: 2vh; + } + .w-lightbox-view, + .w-lightbox-view:before { + height: 96vh; + } + /* .w-lightbox-content */ + .w-lightbox-group, + .w-lightbox-group .w-lightbox-view, + .w-lightbox-group .w-lightbox-view:before { + height: 84vh; + } + .w-lightbox-image { + max-width: 96vw; + max-height: 96vh; + } + .w-lightbox-group .w-lightbox-image { + max-width: 82.3vw; + max-height: 84vh; + } + .w-lightbox-left, + .w-lightbox-right { + display: block; + opacity: .5; + } + .w-lightbox-close { + opacity: .8; + } + .w-lightbox-control:hover { + opacity: 1; + } +} +.w-lightbox-inactive, +.w-lightbox-inactive:hover { + opacity: 0; +} +.w-nav { + position: relative; + background: #BBB; + z-index: 1000; +} +.w-nav:before, +.w-nav:after { + content: " "; + display: table; +} +.w-nav:after { + clear: both; +} +.w-nav-brand { + position: relative; + float: left; + text-decoration: none; + color: #222222; +} +.w-nav-brand:hover { + text-decoration: none; + color: #222222; +} +.w-nav-link { + position: relative; + display: inline-block; + vertical-align: top; + text-decoration: none; + color: #222222; + padding: 20px; + text-align: left; + margin-left: auto; + margin-right: auto; +} +.w-nav-link:hover { + text-decoration: none; + color: #222222; +} +.w-nav-link.w--current { + color: #339ce1; +} +.w-nav-menu { + position: relative; + float: right; +} +.w--nav-menu-open { + display: block !important; + position: absolute; + top: 100%; + left: 0; + right: 0; + background: #999; + text-align: center; + overflow: visible; + min-width: 200px; +} +.w--nav-link-open { + display: block; + position: relative; +} +.w-nav-overlay { + position: absolute; + overflow: hidden; + display: none; + top: 100%; + left: 0; + right: 0; + width: 100%; +} +.w-nav-overlay .w--nav-menu-open { + top: 0; +} +.w-nav[data-animation="over-left"] .w-nav-overlay { + width: auto; +} +.w-nav[data-animation="over-left"] .w-nav-overlay, +.w-nav[data-animation="over-left"] .w--nav-menu-open { + right: auto; + z-index: 1; + top: 0; +} +.w-nav[data-animation="over-right"] .w-nav-overlay { + width: auto; +} +.w-nav[data-animation="over-right"] .w-nav-overlay, +.w-nav[data-animation="over-right"] .w--nav-menu-open { + left: auto; + z-index: 1; + top: 0; +} +.w-nav-button { + position: relative; + float: right; + padding: 18px; + font-size: 24px; + display: none; + cursor: pointer; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.w-nav-button.w--open { + background-color: #999; + color: white; +} +.w-nav[data-collapse="all"] .w-nav-menu { + display: none; +} +.w-nav[data-collapse="all"] .w-nav-button { + display: block; +} +@media screen and (max-width: 991px) { + .w-nav[data-collapse="medium"] .w-nav-menu { + display: none; + } + .w-nav[data-collapse="medium"] .w-nav-button { + display: block; + } +} +@media screen and (max-width: 767px) { + .w-nav[data-collapse="small"] .w-nav-menu { + display: none; + } + .w-nav[data-collapse="small"] .w-nav-button { + display: block; + } + .w-nav-brand { + padding-left: 10px; + } +} +@media screen and (max-width: 479px) { + .w-nav[data-collapse="tiny"] .w-nav-menu { + display: none; + } + .w-nav[data-collapse="tiny"] .w-nav-button { + display: block; + } +} +.w-tabs { + position: relative; +} +.w-tabs:before, +.w-tabs:after { + content: " "; + display: table; +} +.w-tabs:after { + clear: both; +} +.w-tab-menu { + position: relative; +} +.w-tab-link { + position: relative; + display: inline-block; + vertical-align: top; + text-decoration: none; + padding: 8px 30px; + text-align: left; + cursor: pointer; + background-color: #E8E8E8; +} +.w-tab-link.w--current { + background-color: #BCD3F3; +} +.w-tab-content { + position: relative; + display: block; + overflow: hidden; +} +.w-tab-pane { + position: relative; + display: none; +} +.w--tab-active { + display: block; +} +@media screen and (max-width: 479px) { + .w-tab-link { + display: block; + } +} +.w-ix-emptyfix:after { + content: ""; +} +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + } +} +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +.w-dyn-loading { + display: block; + padding: 10px; +} +.w-dyn-items { + display: none; +} +.w-dyn-items.visible { + display: block; +} +.w-dyn-empty { + padding: 10px; + background-color: #dddddd; +} +.w-dyn-error { + display: none; + padding: 10px; + background-color: #ffdede; +}` \ No newline at end of file diff --git a/Log/Web/Assets/JSModernizr.go b/Log/Web/Assets/JSModernizr.go new file mode 100644 index 0000000..a6efe31 --- /dev/null +++ b/Log/Web/Assets/JSModernizr.go @@ -0,0 +1,11 @@ +package Assets + +var JSModernizr string = ` +/* Modernizr 2.7.1 (Custom Build) | MIT & BSD + * Build: http://modernizr.com/download/#-video-touch-shiv-cssclasses-teststyles-prefixes-cssclassprefix:w!mod! + */ +;window.Modernizr=function(a,b,c){function w(a){j.cssText=a}function x(a,b){return w(m.join(a+";")+(b||""))}function y(a,b){return typeof a===b}function z(a,b){return!!~(""+a).indexOf(b)}function A(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:y(f,"function")?f.bind(d||b):f}return!1}var d="2.7.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n={},o={},p={},q=[],r=q.slice,s,t=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},u={}.hasOwnProperty,v;!y(u,"undefined")&&!y(u.call,"undefined")?v=function(a,b){return u.call(a,b)}:v=function(a,b){return b in a&&y(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=r.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(r.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(r.call(arguments)))};return e}),n.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:t(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},n.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c};for(var B in n)v(n,B)&&(s=B.toLowerCase(),e[s]=n[B](),q.push((e[s]?"":"no-")+s));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)v(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" w-mod-"+(b?"":"no-")+a),e[a]=b}return e},w(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=m,e.testStyles=t,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" w-mod-js w-mod-"+q.join(" w-mod-"):""),e}(this,this.document); +/** + * Webflow: Custom tests + */ +Modernizr.addTest('ios', /(ipod|iphone|ipad)/i.test(navigator.userAgent));` diff --git a/Log/Web/Assets/JSWebflow.go b/Log/Web/Assets/JSWebflow.go new file mode 100644 index 0000000..74cb725 --- /dev/null +++ b/Log/Web/Assets/JSWebflow.go @@ -0,0 +1,3774 @@ +package Assets + +var JSWebflow string = ` +/*! + * ---------------------------------------------------------------------- + * Webflow: Front-end site library + * @license MIT + * Other scripts may access this api using an async handler: + * var Webflow = Webflow || []; + * Webflow.push(readyFunction); + * ---------------------------------------------------------------------- + */ +var Webflow = { w: Webflow }; +Webflow.init = function() { + 'use strict'; + + var $ = window.$; + var api = {}; + var modules = {}; + var primary = []; + var secondary = this.w || []; + var $win = $(window); + var $doc = $(document); + var _ = api._ = underscore(); + var domready = false; + var tram = window.tram; + var Modernizr = window.Modernizr; + var noop = function() {}; + tram.config.hideBackface = false; + tram.config.keepInherited = true; + + /** + * Webflow.define() - Define a webflow.js module + * @param {string} name + * @param {function} factory + */ + api.define = function(name, factory) { + var module = modules[name] = factory($, _); + if (!module) return; + // If running in Webflow app, subscribe to design/preview events + if (api.env()) { + $.isFunction(module.design) && window.addEventListener('__wf_design', module.design); + $.isFunction(module.preview) && window.addEventListener('__wf_preview', module.preview); + } + // Subscribe to module front-end events + $.isFunction(module.destroy) && $win.on('__wf_destroy', module.destroy); + // Look for a ready method on module + if (module.ready && $.isFunction(module.ready)) { + // If domready has already happened, call ready method + if (domready) module.ready(); + // Otherwise push ready method into primary queue + else primary.push(module.ready); + } + }; + + /** + * Webflow.require() - Load a Webflow.js module + * @param {string} name + * @return {object} + */ + api.require = function(name) { + return modules[name]; + }; + + /** + * Webflow.push() - Add a ready handler into secondary queue + * @param {function} ready Callback to invoke on domready + */ + api.push = function(ready) { + // If domready has already happened, invoke handler + if (domready) { + $.isFunction(ready) && ready(); + return; + } + // Otherwise push into secondary queue + secondary.push(ready); + }; + + /** + * Webflow.env() - Get the state of the Webflow app + * @param {string} mode [optional] + * @return {boolean} + */ + api.env = function(mode) { + var designFlag = window.__wf_design; + var inApp = typeof designFlag != 'undefined'; + if (!mode) return inApp; + if (mode == 'design') return inApp && designFlag; + if (mode == 'preview') return inApp && !designFlag; + if (mode == 'slug') return inApp && window.__wf_slug; + if (mode == 'editor') return window.WebflowEditor; + }; + + // Feature detects + browser sniffs ಠ_ಠ + var userAgent = navigator.userAgent.toLowerCase(); + var appVersion = navigator.appVersion.toLowerCase(); + var touch = api.env.touch = ('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch; + var chrome = api.env.chrome = /chrome/.test(userAgent) && /Google/.test(navigator.vendor) && parseInt(appVersion.match(/chrome\/(\d+)\./)[1], 10); + var ios = api.env.ios = Modernizr && Modernizr.ios; + api.env.safari = /safari/.test(userAgent) && !chrome && !ios; + + // Maintain current touch target to prevent late clicks on touch devices + var touchTarget; + // Listen for both events to support touch/mouse hybrid devices + touch && $doc.on('touchstart mousedown', function(evt) { + touchTarget = evt.target; + }); + + /** + * Webflow.validClick() - validate click target against current touch target + * @param {HTMLElement} clickTarget Element being clicked + * @return {Boolean} True if click target is valid (always true on non-touch) + */ + api.validClick = touch ? function(clickTarget) { + return clickTarget === touchTarget || $.contains(clickTarget, touchTarget); + } : function() { return true; }; + + /** + * Webflow.resize, Webflow.scroll - throttled event proxies + */ + var resizeEvents = 'resize.webflow orientationchange.webflow load.webflow'; + var scrollEvents = 'scroll.webflow ' + resizeEvents; + api.resize = eventProxy($win, resizeEvents); + api.scroll = eventProxy($win, scrollEvents); + api.redraw = eventProxy(); + + // Create a proxy instance for throttled events + function eventProxy(target, types) { + + // Set up throttled method (using custom frame-based _.throttle) + var handlers = []; + var proxy = {}; + proxy.up = _.throttle(function(evt) { + _.each(handlers, function(h) { h(evt); }); + }); + + // Bind events to target + if (target && types) target.on(types, proxy.up); + + /** + * Add an event handler + * @param {function} handler + */ + proxy.on = function(handler) { + if (typeof handler != 'function') return; + if (_.contains(handlers, handler)) return; + handlers.push(handler); + }; + + /** + * Remove an event handler + * @param {function} handler + */ + proxy.off = function(handler) { + handlers = _.filter(handlers, function(h) { + return h !== handler; + }); + }; + return proxy; + } + + // Provide optional IX events to components + api.ixEvents = function() { + var ix = api.require('ix'); + return (ix && ix.events) || { + reset: noop, + intro: noop, + outro: noop + }; + }; + + // Webflow.location() - Wrap window.location in api + api.location = function(url) { + window.location = url; + }; + + // Webflow.app - Designer-specific methods + api.app = api.env() ? {} : null; + if (api.app) { + + // Trigger redraw for specific elements + var Event = window.Event; + var redraw = new Event('__wf_redraw'); + api.app.redrawElement = function(i, el) { el.dispatchEvent(redraw); }; + + // Webflow.location - Re-route location change to trigger an event + api.location = function(url) { + window.dispatchEvent(new CustomEvent('__wf_location', { detail: url })); + }; + } + + // Webflow.ready() - Call primary and secondary handlers + api.ready = function() { + domready = true; + $.each(primary.concat(secondary), function(index, value) { + $.isFunction(value) && value(); + }); + // Trigger resize + api.resize.up(); + }; + + /** + * Webflow.load() - Add a window load handler that will run even if load event has already happened + * @param {function} handler + */ + var deferLoad; + api.load = function(handler) { + deferLoad.then(handler); + }; + + function bindLoad() { + // Reject any previous deferred (to support destroy) + if (deferLoad) { + deferLoad.reject(); + $win.off('load', deferLoad.resolve); + } + // Create deferred and bind window load event + deferLoad = new $.Deferred(); + $win.on('load', deferLoad.resolve); + } + + // Webflow.destroy() - Trigger a cleanup event for all modules + api.destroy = function() { + $win.triggerHandler('__wf_destroy'); + // If load event has not yet fired, replace the deferred + if (deferLoad.state() == 'pending') bindLoad(); + }; + + // Listen for domready + $(api.ready); + + // Listen for window.onload and resolve deferred + bindLoad(); + + /*! + * Webflow._ (aka) Underscore.js 1.6.0 (custom build) + * _.each + * _.map + * _.find + * _.filter + * _.any + * _.contains + * _.delay + * _.defer + * _.throttle (webflow) + * _.debounce + * _.keys + * _.has + * _.now + * + * http://underscorejs.org + * (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Underscore may be freely distributed under the MIT license. + */ + function underscore() { + var _ = {}; + + // Current version. + _.VERSION = '1.6.0-Webflow'; + + // Establish the object that gets returned to break out of a loop iteration. + var breaker = {}; + + // Save bytes in the minified (but not gzipped) version: + var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; + + // Create quick reference variables for speed access to core prototypes. + var + push = ArrayProto.push, + slice = ArrayProto.slice, + concat = ArrayProto.concat, + toString = ObjProto.toString, + hasOwnProperty = ObjProto.hasOwnProperty; + + // All **ECMAScript 5** native function implementations that we hope to use + // are declared here. + var + nativeForEach = ArrayProto.forEach, + nativeMap = ArrayProto.map, + nativeReduce = ArrayProto.reduce, + nativeReduceRight = ArrayProto.reduceRight, + nativeFilter = ArrayProto.filter, + nativeEvery = ArrayProto.every, + nativeSome = ArrayProto.some, + nativeIndexOf = ArrayProto.indexOf, + nativeLastIndexOf = ArrayProto.lastIndexOf, + nativeIsArray = Array.isArray, + nativeKeys = Object.keys, + nativeBind = FuncProto.bind; + + // Collection Functions + // -------------------- + + // The cornerstone, an `each` implementation, aka `forEach`. + // Handles objects with the built-in `forEach`, arrays, and raw objects. + // Delegates to **ECMAScript 5**'s native `forEach` if available. + var each = _.each = _.forEach = function(obj, iterator, context) { + /* jshint shadow:true */ + if (obj == null) return obj; + if (nativeForEach && obj.forEach === nativeForEach) { + obj.forEach(iterator, context); + } else if (obj.length === +obj.length) { + for (var i = 0, length = obj.length; i < length; i++) { + if (iterator.call(context, obj[i], i, obj) === breaker) return; + } + } else { + var keys = _.keys(obj); + for (var i = 0, length = keys.length; i < length; i++) { + if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return; + } + } + return obj; + }; + + // Return the results of applying the iterator to each element. + // Delegates to **ECMAScript 5**'s native `map` if available. + _.map = _.collect = function(obj, iterator, context) { + var results = []; + if (obj == null) return results; + if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); + each(obj, function(value, index, list) { + results.push(iterator.call(context, value, index, list)); + }); + return results; + }; + + // Return the first value which passes a truth test. Aliased as `detect`. + _.find = _.detect = function(obj, predicate, context) { + var result; + any(obj, function(value, index, list) { + if (predicate.call(context, value, index, list)) { + result = value; + return true; + } + }); + return result; + }; + + // Return all the elements that pass a truth test. + // Delegates to **ECMAScript 5**'s native `filter` if available. + // Aliased as `select`. + _.filter = _.select = function(obj, predicate, context) { + var results = []; + if (obj == null) return results; + if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context); + each(obj, function(value, index, list) { + if (predicate.call(context, value, index, list)) results.push(value); + }); + return results; + }; + + // Determine if at least one element in the object matches a truth test. + // Delegates to **ECMAScript 5**'s native `some` if available. + // Aliased as `any`. + var any = _.some = _.any = function(obj, predicate, context) { + predicate || (predicate = _.identity); + var result = false; + if (obj == null) return result; + if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context); + each(obj, function(value, index, list) { + if (result || (result = predicate.call(context, value, index, list))) return breaker; + }); + return !!result; + }; + + // Determine if the array or object contains a given value (using `===`). + // Aliased as `include`. + _.contains = _.include = function(obj, target) { + if (obj == null) return false; + if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1; + return any(obj, function(value) { + return value === target; + }); + }; + + // Function (ahem) Functions + // -------------------- + + // Delays a function for the given number of milliseconds, and then calls + // it with the arguments supplied. + _.delay = function(func, wait) { + var args = slice.call(arguments, 2); + return setTimeout(function(){ return func.apply(null, args); }, wait); + }; + + // Defers a function, scheduling it to run after the current call stack has + // cleared. + _.defer = function(func) { + return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); + }; + + // Returns a function, that, when invoked, will only be triggered once every + // browser animation frame - using tram's requestAnimationFrame polyfill. + _.throttle = function(func) { + var wait, args, context; + return function() { + if (wait) return; + wait = true; + args = arguments; + context = this; + tram.frame(function() { + wait = false; + func.apply(context, args); + }); + }; + }; + + // Returns a function, that, as long as it continues to be invoked, will not + // be triggered. The function will be called after it stops being called for + // N milliseconds. If `immediate` is passed, trigger the function on the + // leading edge, instead of the trailing. + _.debounce = function(func, wait, immediate) { + var timeout, args, context, timestamp, result; + + var later = function() { + var last = _.now() - timestamp; + if (last < wait) { + timeout = setTimeout(later, wait - last); + } else { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + context = args = null; + } + } + }; + + return function() { + context = this; + args = arguments; + timestamp = _.now(); + var callNow = immediate && !timeout; + if (!timeout) { + timeout = setTimeout(later, wait); + } + if (callNow) { + result = func.apply(context, args); + context = args = null; + } + + return result; + }; + }; + + // Object Functions + // ---------------- + + // Retrieve the names of an object's properties. + // Delegates to **ECMAScript 5**'s native `Object.keys` + _.keys = function(obj) { + if (!_.isObject(obj)) return []; + if (nativeKeys) return nativeKeys(obj); + var keys = []; + for (var key in obj) if (_.has(obj, key)) keys.push(key); + return keys; + }; + + // Shortcut function for checking if an object has a given property directly + // on itself (in other words, not on a prototype). + _.has = function(obj, key) { + return hasOwnProperty.call(obj, key); + }; + + // Is a given variable an object? + _.isObject = function(obj) { + return obj === Object(obj); + }; + + // Utility Functions + // ----------------- + + // A (possibly faster) way to get the current timestamp as an integer. + _.now = Date.now || function() { return new Date().getTime(); }; + + // Export underscore + return _; + } + + // Export api + Webflow = api; +}; +/*! + * ---------------------------------------------------------------------- + * Webflow: 3rd party plugins + */ +/* jshint ignore:start */ +/*! + * tram.js v0.8.1-global + * Cross-browser CSS3 transitions in JavaScript + * https://github.com/bkwld/tram + * MIT License + */ +window.tram=function(a){function b(a,b){var c=new L.Bare;return c.init(a,b)}function c(a){return a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()})}function d(a){var b=parseInt(a.slice(1),16),c=b>>16&255,d=b>>8&255,e=255&b;return[c,d,e]}function e(a,b,c){return"#"+(1<<24|a<<16|b<<8|c).toString(16).slice(1)}function f(){}function g(a,b){_("Type warning: Expected: ["+a+"] Got: ["+typeof b+"] "+b)}function h(a,b,c){_("Units do not match ["+a+"]: "+b+", "+c)}function i(a,b,c){if(void 0!==b&&(c=b),void 0===a)return c;var d=c;return Z.test(a)||!$.test(a)?d=parseInt(a,10):$.test(a)&&(d=1e3*parseFloat(a)),0>d&&(d=0),d===d?d:c}function j(a){for(var b=-1,c=a?a.length:0,d=[];++bf&&(f=a.span),a.stop(),a.animate(b)},function(a){"wait"in a&&(f=i(a.wait,0))}),s.call(this),f>0&&(this.timer=new R({duration:f,context:this}),this.active=!0,b&&(this.timer.complete=h));var g=this,j=!1,l={};I(function(){t.call(g,a,function(a){a.active&&(j=!0,l[a.name]=a.nextStyle)}),j&&g.$el.css(l)})}}}function f(a){a=i(a,0),this.active?this.queue.push({options:a}):(this.timer=new R({duration:a,context:this,complete:h}),this.active=!0)}function g(a){return this.active?(this.queue.push({options:a,args:arguments}),void(this.timer.complete=h)):_("No active transition timer. Use start() or wait() before then().")}function h(){if(this.timer&&this.timer.destroy(),this.active=!1,this.queue.length){var a=this.queue.shift();e.call(this,a.options,!0,a.args)}}function k(a){this.timer&&this.timer.destroy(),this.queue=[],this.active=!1;var b;"string"==typeof a?(b={},b[a]=1):b="object"==typeof a&&null!=a?a:this.props,t.call(this,b,u),s.call(this)}function l(a){k.call(this,a),t.call(this,a,v,w)}function m(a){"string"!=typeof a&&(a="block"),this.el.style.display=a}function n(){k.call(this),this.el.style.display="none"}function o(){this.el.offsetHeight}function q(){k.call(this),a.removeData(this.el,p),this.$el=this.el=null}function s(){var a,b,c=[];this.upstream&&c.push(this.upstream);for(a in this.props)b=this.props[a],b.active&&c.push(b.string);c=c.join(","),this.style!==c&&(this.style=c,this.el.style[F.transition.dom]=c)}function t(a,b,e){var f,g,h,i,j=b!==u,k={};for(f in a)h=a[f],f in Y?(k.transform||(k.transform={}),k.transform[f]=h):(r.test(f)&&(f=c(f)),f in X?k[f]=h:(i||(i={}),i[f]=h));for(f in k){if(h=k[f],g=this.props[f],!g){if(!j)continue;g=d.call(this,f)}b.call(this,g,h)}e&&i&&e.call(this,i)}function u(a){a.stop()}function v(a,b){a.set(b)}function w(a){this.$el.css(a)}function x(a,c){b[a]=function(){return this.children?z.call(this,c,arguments):(this.el&&c.apply(this,arguments),this)}}function z(a,b){var c,d=this.children.length;for(c=0;d>c;c++)a.apply(this.children[c],b);return this}b.init=function(b){if(this.$el=a(b),this.el=this.$el[0],this.props={},this.queue=[],this.style="",this.active=!1,T.keepInherited&&!T.fallback){var c=V(this.el,"transition");c&&!y.test(c)&&(this.upstream=c)}F.backface&&T.hideBackface&&U(this.el,F.backface.css,"hidden")},x("add",d),x("start",e),x("wait",f),x("then",g),x("next",h),x("stop",k),x("set",l),x("show",m),x("hide",n),x("redraw",o),x("destroy",q)}),L=k(K,function(b){function c(b,c){var d=a.data(b,p)||a.data(b,p,new K.Bare);return d.el||d.init(b),c?d.start(c):d}b.init=function(b,d){var e=a(b);if(!e.length)return this;if(1===e.length)return c(e[0],d);var f=[];return e.each(function(a,b){f.push(c(b,d))}),this.children=f,this}}),M=k(function(a){function b(){var a=this.get();this.update("auto");var b=this.get();return this.update(a),b}function c(a,b,c){return void 0!==b&&(c=b),a in l?a:c}function d(a){var b=/rgba?\((\d+),\s*(\d+),\s*(\d+)/.exec(a);return(b?e(b[1],b[2],b[3]):a).replace(/#(\w)(\w)(\w)$/,"#$1$1$2$2$3$3")}var f={duration:500,ease:"ease",delay:0};a.init=function(a,b,d,e){this.$el=a,this.el=a[0];var g=b[0];d[2]&&(g=d[2]),W[g]&&(g=W[g]),this.name=g,this.type=d[1],this.duration=i(b[1],this.duration,f.duration),this.ease=c(b[2],this.ease,f.ease),this.delay=i(b[3],this.delay,f.delay),this.span=this.duration+this.delay,this.active=!1,this.nextStyle=null,this.auto=z.test(this.name),this.unit=e.unit||this.unit||T.defaultUnit,this.angle=e.angle||this.angle||T.defaultAngle,T.fallback||e.fallback?this.animate=this.fallback:(this.animate=this.transition,this.string=this.name+A+this.duration+"ms"+("ease"!=this.ease?A+l[this.ease][0]:"")+(this.delay?A+this.delay+"ms":""))},a.set=function(a){a=this.convert(a,this.type),this.update(a),this.redraw()},a.transition=function(a){this.active=!0,a=this.convert(a,this.type),this.auto&&("auto"==this.el.style[this.name]&&(this.update(this.get()),this.redraw()),"auto"==a&&(a=b.call(this))),this.nextStyle=a},a.fallback=function(a){var c=this.el.style[this.name]||this.convert(this.get(),this.type);a=this.convert(a,this.type),this.auto&&("auto"==c&&(c=this.convert(this.get(),this.type)),"auto"==a&&(a=b.call(this))),this.tween=new Q({from:c,to:a,duration:this.duration,delay:this.delay,ease:this.ease,update:this.update,context:this})},a.get=function(){return V(this.el,this.name)},a.update=function(a){U(this.el,this.name,a)},a.stop=function(){(this.active||this.nextStyle)&&(this.active=!1,this.nextStyle=null,U(this.el,this.name,this.get()));var a=this.tween;a&&a.context&&a.destroy()},a.convert=function(a,b){if("auto"==a&&this.auto)return a;var c,e="number"==typeof a,f="string"==typeof a;switch(b){case s:if(e)return a;if(f&&""===a.replace(q,""))return+a;c="number(unitless)";break;case t:if(f){if(""===a&&this.original)return this.original;if(b.test(a))return"#"==a.charAt(0)&&7==a.length?a:d(a)}c="hex or rgb string";break;case u:if(e)return a+this.unit;if(f&&b.test(a))return a;c="number(px) or string(unit)";break;case v:if(e)return a+this.unit;if(f&&b.test(a))return a;c="number(px) or string(unit or %)";break;case w:if(e)return a+this.angle;if(f&&b.test(a))return a;c="number(deg) or string(angle)";break;case x:if(e)return a;if(f&&v.test(a))return a;c="number(unitless) or string(unit or %)"}return g(c,a),a},a.redraw=function(){this.el.offsetHeight}}),N=k(M,function(a,b){a.init=function(){b.init.apply(this,arguments),this.original||(this.original=this.convert(this.get(),t))}}),O=k(M,function(a,b){a.init=function(){b.init.apply(this,arguments),this.animate=this.fallback},a.get=function(){return this.$el[this.name]()},a.update=function(a){this.$el[this.name](a)}}),P=k(M,function(a,b){function c(a,b){var c,d,e,f,g;for(c in a)f=Y[c],e=f[0],d=f[1]||c,g=this.convert(a[c],e),b.call(this,d,g,e)}a.init=function(){b.init.apply(this,arguments),this.current||(this.current={},Y.perspective&&T.perspective&&(this.current.perspective=T.perspective,U(this.el,this.name,this.style(this.current)),this.redraw()))},a.set=function(a){c.call(this,a,function(a,b){this.current[a]=b}),U(this.el,this.name,this.style(this.current)),this.redraw()},a.transition=function(a){var b=this.values(a);this.tween=new S({current:this.current,values:b,duration:this.duration,delay:this.delay,ease:this.ease});var c,d={};for(c in this.current)d[c]=c in b?b[c]:this.current[c];this.active=!0,this.nextStyle=this.style(d)},a.fallback=function(a){var b=this.values(a);this.tween=new S({current:this.current,values:b,duration:this.duration,delay:this.delay,ease:this.ease,update:this.update,context:this})},a.update=function(){U(this.el,this.name,this.style(this.current))},a.style=function(a){var b,c="";for(b in a)c+=b+"("+a[b]+") ";return c},a.values=function(a){var b,d={};return c.call(this,a,function(a,c,e){d[a]=c,void 0===this.current[a]&&(b=0,~a.indexOf("scale")&&(b=1),this.current[a]=this.convert(b,e))}),d}}),Q=k(function(b){function c(a){1===n.push(a)&&I(g)}function g(){var a,b,c,d=n.length;if(d)for(I(g),b=J(),a=d;a--;)c=n[a],c&&c.render(b)}function i(b){var c,d=a.inArray(b,n);d>=0&&(c=n.slice(d+1),n.length=d,c.length&&(n=n.concat(c)))}function j(a){return Math.round(a*o)/o}function k(a,b,c){return e(a[0]+c*(b[0]-a[0]),a[1]+c*(b[1]-a[1]),a[2]+c*(b[2]-a[2]))}var m={ease:l.ease[1],from:0,to:1};b.init=function(a){this.duration=a.duration||0,this.delay=a.delay||0;var b=a.ease||m.ease;l[b]&&(b=l[b][1]),"function"!=typeof b&&(b=m.ease),this.ease=b,this.update=a.update||f,this.complete=a.complete||f,this.context=a.context||this,this.name=a.name;var c=a.from,d=a.to;void 0===c&&(c=m.from),void 0===d&&(d=m.to),this.unit=a.unit||"","number"==typeof c&&"number"==typeof d?(this.begin=c,this.change=d-c):this.format(d,c),this.value=this.begin+this.unit,this.start=J(),a.autoplay!==!1&&this.play()},b.play=function(){this.active||(this.start||(this.start=J()),this.active=!0,c(this))},b.stop=function(){this.active&&(this.active=!1,i(this))},b.render=function(a){var b,c=a-this.start;if(this.delay){if(c<=this.delay)return;c-=this.delay}if(c 0) { + result = result / 100; + if (result >= 1) result = 0.999; + } + return result; + } + + function teardown(i, el) { + $(el).off(namespace); + } + + function scroll() { + var viewTop = $win.scrollTop(); + var viewHeight = $win.height(); + + // Check each anchor for a valid scroll trigger + var count = anchors.length; + for (var i = 0; i < count; i++) { + var anchor = anchors[i]; + var $el = anchor.el; + var trigger = anchor.trigger; + var stepsB = trigger.stepsB && trigger.stepsB.length; + var state = anchor.state; + var top = $el.offset().top; + var height = $el.outerHeight(); + var offsetTop = anchor.offsetTop; + var offsetBot = anchor.offsetBot; + if (offsetTop < 1 && offsetTop > 0) offsetTop *= viewHeight; + if (offsetBot < 1 && offsetBot > 0) offsetBot *= viewHeight; + var active = (top + height - offsetTop >= viewTop && top + offsetBot <= viewTop + viewHeight); + if (active === state.active) continue; + if (active === false && !stepsB) continue; + state.active = active; + run(trigger, $el, { group: active ? 'A' : 'B' }); + } + } + + function runLoads() { + var count = loads.length; + for (var i = 0; i < count; i++) { + loads[i](); + } + } + + function runReadys() { + var count = readys.length; + for (var i = 0; i < count; i++) { + readys[i](); + } + } + + function run(trigger, $el, opts, replay) { + opts = opts || {}; + var done = opts.done; + + // Do not run in designer unless forced + if (designer && !opts.force) return; + + // Operate on a set of grouped steps + var group = opts.group || 'A'; + var loop = trigger['loop' + group]; + var steps = trigger['steps' + group]; + if (!steps || !steps.length) return; + if (steps.length < 2) loop = false; + + // One-time init before any loops + if (!replay) { + + // Find selector within element descendants, siblings, or query whole document + var selector = trigger.selector; + if (selector) { + $el = ( + trigger.descend ? $el.find(selector) : + trigger.siblings ? $el.siblings(selector) : + $(selector) + ); + if (inApp) $el.attr('data-ix-affect', 1); + } + + // Apply empty fix for certain Chrome versions + if (emptyFix) $el.addClass('w-ix-emptyfix'); + } + + var _tram = tram($el); + + // Add steps + var meta = {}; + for (var i = 0; i < steps.length; i++) { + addStep(_tram, steps[i], meta); + } + + function fin() { + // Run trigger again if looped + if (loop) return run(trigger, $el, opts, true); + + // Reset any 'auto' values + if (meta.width == 'auto') _tram.set({ width: 'auto' }); + if (meta.height == 'auto') _tram.set({ height: 'auto' }); + + // Run callback + done && done(); + } + + // Add final step to queue if tram has started + meta.start ? _tram.then(fin) : fin(); + } + + function addStep(_tram, step, meta) { + var addMethod = 'add'; + var startMethod = 'start'; + + // Once the transition has started, we will always use then() to add to the queue. + if (meta.start) addMethod = startMethod = 'then'; + + // Parse transitions string on the current step + var transitions = step.transition; + if (transitions) { + transitions = transitions.split(','); + for (var i = 0; i < transitions.length; i++) { + var transition = transitions[i]; + var options = fallbackProps.test(transition) ? { fallback: true } : null; + _tram[addMethod](transition, options); + } + } + + // Build a clean object to pass to the tram method + var clean = tramify(step) || {}; + + // Store last width and height values + if (clean.width != null) meta.width = clean.width; + if (clean.height != null) meta.height = clean.height; + + // When transitions are not present, set values immediately and continue queue. + if (transitions == null) { + + // If we have started, wrap set() in then() and reset queue + if (meta.start) { + _tram.then(function() { + var queue = this.queue; + this.set(clean); + if (clean.display) { + _tram.redraw(); + Webflow.redraw.up(); + } + this.queue = queue; + this.next(); + }); + } else { + _tram.set(clean); + + // Always redraw after setting display + if (clean.display) { + _tram.redraw(); + Webflow.redraw.up(); + } + } + + // Use the wait() method to kick off queue in absence of transitions. + var wait = clean.wait; + if (wait != null) { + _tram.wait(wait); + meta.start = true; + } + + // Otherwise, when transitions are present + } else { + + // If display is present, handle it separately + if (clean.display) { + var display = clean.display; + delete clean.display; + + // If we've already started, we need to wrap it in a then() + if (meta.start) { + _tram.then(function() { + var queue = this.queue; + this.set({ display: display }).redraw(); + Webflow.redraw.up(); + this.queue = queue; + this.next(); + }); + } else { + _tram.set({ display: display }).redraw(); + Webflow.redraw.up(); + } + } + + // Otherwise, start a transition using the current start method. + _tram[startMethod](clean); + meta.start = true; + } + } + + // (In app) Set styles immediately and manage upstream transition + function styleApp(el, data) { + var _tram = tram(el); + + // Get computed transition value + el.css('transition', ''); + var computed = el.css('transition'); + + // If computed is disabled, clear upstream + if (computed === transNone) computed = _tram.upstream = null; + + // Disable upstream temporarily + _tram.upstream = transNone; + + // Set values immediately + _tram.set(tramify(data)); + + // Only restore upstream in preview mode + _tram.upstream = computed; + } + + // (Published) Set styles immediately on specified jquery element + function stylePub(el, data) { + tram(el).set(tramify(data)); + } + + // Build a clean object for tram + function tramify(obj) { + var result = {}; + var found = false; + for (var x in obj) { + if (x === 'transition') continue; + result[x] = obj[x]; + found = true; + } + // If empty, return null for tram.set/stop compliance + return found ? result : null; + } + + // Events used by other webflow modules + var events = { + reset: function(i, el) { + el.__wf_intro = null; + }, + intro: function(i, el) { + if (el.__wf_intro) return; + el.__wf_intro = true; + $(el).triggerHandler(introEvent); + }, + outro: function(i, el) { + if (!el.__wf_intro) return; + el.__wf_intro = null; + $(el).triggerHandler(outroEvent); + } + }; + + // Trigger events in queue + point to sync methods + function initEvents() { + var count = eventQueue.length; + for (var i = 0; i < count; i++) { + var memo = eventQueue[i]; + memo[0](0, memo[1]); + } + eventQueue = []; + $.extend(api.events, events); + } + + // Replace events with async methods prior to init + function asyncEvents() { + _.each(events, function(func, name) { + api.events[name] = function(i, el) { + eventQueue.push([func, el]); + }; + }); + } + + asyncEvents(); + + // Export module + return api; +}); +/** + * ---------------------------------------------------------------------- + * Webflow: Touch events + */ +Webflow.define('touch', function($, _) { + 'use strict'; + + var api = {}; + var fallback = !document.addEventListener; + var getSelection = window.getSelection; + + // Fallback to click events in old IE + if (fallback) { + $.event.special.tap = { bindType: 'click', delegateType: 'click' }; + } + + api.init = function(el) { + if (fallback) return null; + el = typeof el === 'string' ? $(el).get(0) : el; + return el ? new Touch(el) : null; + }; + + function Touch(el) { + var active = false; + var dirty = false; + var useTouch = false; + var thresholdX = Math.min(Math.round(window.innerWidth * 0.04), 40); + var startX, startY, lastX; + + el.addEventListener('touchstart', start, false); + el.addEventListener('touchmove', move, false); + el.addEventListener('touchend', end, false); + el.addEventListener('touchcancel', cancel, false); + el.addEventListener('mousedown', start, false); + el.addEventListener('mousemove', move, false); + el.addEventListener('mouseup', end, false); + el.addEventListener('mouseout', cancel, false); + + function start(evt) { + // We don’t handle multi-touch events yet. + var touches = evt.touches; + if (touches && touches.length > 1) { + return; + } + + active = true; + dirty = false; + + if (touches) { + useTouch = true; + startX = touches[0].clientX; + startY = touches[0].clientY; + } else { + startX = evt.clientX; + startY = evt.clientY; + } + + lastX = startX; + } + + function move(evt) { + if (!active) return; + + if (useTouch && evt.type === 'mousemove') { + evt.preventDefault(); + evt.stopPropagation(); + return; + } + + var touches = evt.touches; + var x = touches ? touches[0].clientX : evt.clientX; + var y = touches ? touches[0].clientY : evt.clientY; + + var velocityX = x - lastX; + lastX = x; + + // Allow swipes while pointer is down, but prevent them during text selection + if (Math.abs(velocityX) > thresholdX && getSelection && getSelection() + '' === '') { + triggerEvent('swipe', evt, { direction: velocityX > 0 ? 'right' : 'left' }); + cancel(); + } + + // If pointer moves more than 10px flag to cancel tap + if (Math.abs(x - startX) > 10 || Math.abs(y - startY) > 10) { + dirty = true; + } + } + + function end(evt) { + if (!active) return; + active = false; + + if (useTouch && evt.type === 'mouseup') { + evt.preventDefault(); + evt.stopPropagation(); + useTouch = false; + return; + } + + if (!dirty) triggerEvent('tap', evt); + } + + function cancel(evt) { + active = false; + } + + function destroy() { + el.removeEventListener('touchstart', start, false); + el.removeEventListener('touchmove', move, false); + el.removeEventListener('touchend', end, false); + el.removeEventListener('touchcancel', cancel, false); + el.removeEventListener('mousedown', start, false); + el.removeEventListener('mousemove', move, false); + el.removeEventListener('mouseup', end, false); + el.removeEventListener('mouseout', cancel, false); + el = null; + } + + // Public instance methods + this.destroy = destroy; + } + + // Wrap native event to supoprt preventdefault + stopPropagation + function triggerEvent(type, evt, data) { + var newEvent = $.Event(type, { originalEvent: evt }); + $(evt.target).trigger(newEvent, data); + } + + // Listen for touch events on all nodes by default. + api.instance = api.init(document); + + // Export module + return api; +}); +/** + * ---------------------------------------------------------------------- + * Webflow: Forms + */ +Webflow.define('forms', function($, _) { + 'use strict'; + + var api = {}; + + var FORM_API_HOST = 'https://webflow.com'; + var FORM_SUBMIT_HOST = 'https://webflow.com'; + var FORM_OLDIE_HOST = 'http://formdata.webflow.com'; + + var $doc = $(document); + var $forms; + var loc = window.location; + var retro = window.XDomainRequest && !window.atob; + var namespace = '.w-form'; + var siteId; + var emailField = /e(\-)?mail/i; + var emailValue = /^\S+@\S+$/; + var alert = window.alert; + var listening; + + // MailChimp domains: list-manage.com + mirrors + var chimpRegex = /list-manage[1-9]?.com/i; + + api.ready = function() { + // Init forms + init(); + + // Wire document events once + if (!listening) addListeners(); + }; + + api.preview = api.design = function() { + init(); + }; + + function init() { + siteId = $('html').attr('data-wf-site'); + + $forms = $(namespace + ' form'); + if (!$forms.length) return; + $forms.each(build); + } + + function build(i, el) { + // Store form state using namespace + var $el = $(el); + var data = $.data(el, namespace); + if (!data) data = $.data(el, namespace, { form: $el }); // data.form + + reset(data); + var wrap = $el.closest('div.w-form'); + data.done = wrap.find('> .w-form-done'); + data.fail = wrap.find('> .w-form-fail'); + + var action = data.action = $el.attr('action'); + data.handler = null; + data.redirect = $el.attr('data-redirect'); + + // MailChimp form + if (chimpRegex.test(action)) { data.handler = submitMailChimp; return; } + + // Custom form action + if (action) return; + + // Webflow form + if (siteId) { data.handler = submitWebflow; return; } + + // Alert for disconnected Webflow forms + disconnected(); + } + + function addListeners() { + listening = true; + + // Handle form submission for Webflow forms + $doc.on('submit', namespace + ' form', function(evt) { + var data = $.data(this, namespace); + if (data.handler) { + data.evt = evt; + data.handler(data); + } + }); + } + + // Reset data common to all submit handlers + function reset(data) { + var btn = data.btn = data.form.find(':input[type="submit"]'); + data.wait = data.btn.attr('data-wait') || null; + data.success = false; + btn.prop('disabled', false); + data.label && btn.val(data.label); + } + + // Disable submit button + function disableBtn(data) { + var btn = data.btn; + var wait = data.wait; + btn.prop('disabled', true); + // Show wait text and store previous label + if (wait) { + data.label = btn.val(); + btn.val(wait); + } + } + + // Find form fields, validate, and set value pairs + function findFields(form, result) { + var status = null; + result = result || {}; + + // The ":input" selector is a jQuery shortcut to select all inputs, selects, textareas + form.find(':input:not([type="submit"])').each(function(i, el) { + var field = $(el); + var type = field.attr('type'); + var name = field.attr('data-name') || field.attr('name') || ('Field ' + (i + 1)); + var value = field.val(); + + if (type == 'checkbox') { + value = field.is(':checked'); + } if (type == 'radio') { + // Radio group value already processed + if (result[name] === null || typeof result[name] == 'string') { + return; + } + + value = form.find('input[name="' + field.attr('name') + '"]:checked').val() || null; + } + + if (typeof value == 'string') value = $.trim(value); + result[name] = value; + status = status || getStatus(field, name, value); + }); + + return status; + } + + function getStatus(field, name, value) { + var status = null; + if (!field.attr('required')) return null; + if (!value) status = 'Please fill out the required field: ' + name; + else if (emailField.test(name) || emailField.test(field.attr('type'))) { + if (!emailValue.test(value)) status = 'Please enter a valid email address for: ' + name; + } + return status; + } + + // Submit form to Webflow + function submitWebflow(data) { + reset(data); + + var form = data.form; + var payload = { + name: form.attr('data-name') || form.attr('name') || 'Untitled Form', + source: loc.href, + test: Webflow.env(), + fields: {} + }; + + preventDefault(data); + + // Find & populate all fields + var status = findFields(form, payload.fields); + if (status) return alert(status); + + // Disable submit button + disableBtn(data); + + // Read site ID + // NOTE: If this site is exported, the HTML tag must retain the data-wf-site attribute for forms to work + if (!siteId) { afterSubmit(data); return; } + var url = FORM_API_HOST + '/api/v1/form/' + siteId; + + // Work around same-protocol IE XDR limitation - without this IE9 and below forms won't submit + if (retro && url.indexOf(FORM_SUBMIT_HOST) >= 0) { + url = url.replace(FORM_SUBMIT_HOST, FORM_OLDIE_HOST); + } + + $.ajax({ + url: url, + type: 'POST', + data: payload, + dataType: 'json', + crossDomain: true + }).done(function() { + data.success = true; + afterSubmit(data); + }).fail(function() { + afterSubmit(data); + }); + } + + // Submit form to MailChimp + function submitMailChimp(data) { + reset(data); + + var form = data.form; + var payload = {}; + + // Skip Ajax submission if http/s mismatch, fallback to POST instead + if (/^https/.test(loc.href) && !/^https/.test(data.action)) { + form.attr('method', 'post'); + return; + } + + preventDefault(data); + + // Find & populate all fields + var status = findFields(form, payload); + if (status) return alert(status); + + // Disable submit button + disableBtn(data); + + // Use special format for MailChimp params + var fullName; + _.each(payload, function(value, key) { + if (emailField.test(key)) payload.EMAIL = value; + if (/^((full[ _-]?)?name)$/i.test(key)) fullName = value; + if (/^(first[ _-]?name)$/i.test(key)) payload.FNAME = value; + if (/^(last[ _-]?name)$/i.test(key)) payload.LNAME = value; + }); + + if (fullName && !payload.FNAME) { + fullName = fullName.split(' '); + payload.FNAME = fullName[0]; + payload.LNAME = payload.LNAME || fullName[1]; + } + + // Use the (undocumented) MailChimp jsonp api + var url = data.action.replace('/post?', '/post-json?') + '&c=?'; + // Add special param to prevent bot signups + var userId = url.indexOf('u=')+2; + userId = url.substring(userId, url.indexOf('&', userId)); + var listId = url.indexOf('id=')+3; + listId = url.substring(listId, url.indexOf('&', listId)); + payload['b_' + userId + '_' + listId] = ''; + + $.ajax({ + url: url, + data: payload, + dataType: 'jsonp' + }).done(function(resp) { + data.success = (resp.result == 'success' || /already/.test(resp.msg)); + if (!data.success) console.info('MailChimp error: ' + resp.msg); + afterSubmit(data); + }).fail(function() { + afterSubmit(data); + }); + } + + // Common callback which runs after all Ajax submissions + function afterSubmit(data) { + var form = data.form; + var wrap = form.closest('div.w-form'); + var redirect = data.redirect; + var success = data.success; + + // Redirect to a success url if defined + if (success && redirect) { + Webflow.location(redirect); + return; + } + + // Show or hide status divs + data.done.toggle(success); + data.fail.toggle(!success); + + // Hide form on success + form.toggle(!success); + + // Reset data and enable submit button + reset(data); + } + + function preventDefault(data) { + data.evt && data.evt.preventDefault(); + data.evt = null; + } + + var disconnected = _.debounce(function() { + alert('Oops! This page has a form that is powered by Webflow, but important code was removed that is required to make the form work. Please contact support@webflow.com to fix this issue.'); + }, 100); + + // Export module + return api; +}); +/** + * ---------------------------------------------------------------------- + * Webflow: Maps widget + */ +Webflow.define('maps', function($, _) { + 'use strict'; + + var api = {}; + var $doc = $(document); + var google = null; + var $maps; + var namespace = '.w-widget-map'; + + // ----------------------------------- + // Module methods + + api.ready = function() { + // Init Maps on the front-end + if (!Webflow.env()) initMaps(); + }; + + api.preview = function() { + // Update active map nodes + $maps = $doc.find(namespace); + // Listen for resize events + Webflow.resize.off(triggerRedraw); + if ($maps.length) { + Webflow.resize.on(triggerRedraw); + triggerRedraw(); + } + }; + + api.design = function(evt) { + // Update active map nodes + $maps = $doc.find(namespace); + // Stop listening for resize events + Webflow.resize.off(triggerRedraw); + // Redraw to account for page changes + $maps.length && _.defer(triggerRedraw); + }; + + api.destroy = removeListeners; + + // ----------------------------------- + // Private methods + + // Trigger redraw in designer or preview mode + function triggerRedraw() { + if ($maps.length && Webflow.app) { + $maps.each(Webflow.app.redrawElement); + } + } + + function initMaps() { + $maps = $doc.find(namespace); + if (!$maps.length) return; + + if (google === null) { + $.getScript('https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&callback=_wf_maps_loaded'); + window._wf_maps_loaded = mapsLoaded; + } else { + mapsLoaded(); + } + + function mapsLoaded() { + window._wf_maps_loaded = function() {}; + google = window.google; + $maps.each(renderMap); + removeListeners(); + addListeners(); + } + } + + function removeListeners() { + Webflow.resize.off(resizeMaps); + Webflow.redraw.off(resizeMaps); + } + + function addListeners() { + Webflow.resize.on(resizeMaps); + Webflow.redraw.on(resizeMaps); + } + + // Render map onto each element + function renderMap(i, el) { + var data = $(el).data(); + getState(el, data); + } + + function resizeMaps() { + $maps.each(resizeMap); + } + + // Resize map when window changes + function resizeMap(i, el) { + var state = getState(el); + google.maps.event.trigger(state.map, 'resize'); + state.setMapPosition(); + } + + // Store state on element data + var store = 'w-widget-map'; + function getState(el, data) { + + var state = $.data(el, store); + if (state) return state; + + var $el = $(el); + state = $.data(el, store, { + // Default options + latLng: '51.511214,-0.119824', + tooltip: '', + style: 'roadmap', + zoom: 12, + + // Marker + marker: new google.maps.Marker({ + draggable: false + }), + + // Tooltip infowindow + infowindow: new google.maps.InfoWindow({ + disableAutoPan: true + }) + }); + + // LatLng center point + var latLng = data.widgetLatlng || state.latLng; + state.latLng = latLng; + var coords = latLng.split(','); + var latLngObj = new google.maps.LatLng(coords[0], coords[1]); + state.latLngObj = latLngObj; + + // Disable touch events + var mapDraggable = (Webflow.env.touch && data.disableTouch) ? false : true; + + // Map instance + state.map = new google.maps.Map(el, { + center: state.latLngObj, + zoom: state.zoom, + maxZoom: 18, + mapTypeControl: false, + panControl: false, + streetViewControl: false, + scrollwheel: !data.disableScroll, + draggable: mapDraggable, + zoomControl: true, + zoomControlOptions: { + style: google.maps.ZoomControlStyle.SMALL + }, + mapTypeId: state.style + }); + state.marker.setMap(state.map); + + // Set map position and offset + state.setMapPosition = function() { + state.map.setCenter(state.latLngObj); + var offsetX = 0; + var offsetY = 0; + var padding = $el.css(['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft']); + offsetX -= parseInt(padding.paddingLeft, 10); + offsetX += parseInt(padding.paddingRight, 10); + offsetY -= parseInt(padding.paddingTop, 10); + offsetY += parseInt(padding.paddingBottom, 10); + if (offsetX || offsetY) { + state.map.panBy(offsetX, offsetY); + } + $el.css('position', ''); // Remove injected position + }; + + // Fix position after first tiles have loaded + google.maps.event.addListener(state.map, 'tilesloaded', function() { + google.maps.event.clearListeners(state.map, 'tilesloaded'); + state.setMapPosition(); + }); + + // Set initial position + state.setMapPosition(); + state.marker.setPosition(state.latLngObj); + state.infowindow.setPosition(state.latLngObj); + + // Draw tooltip + var tooltip = data.widgetTooltip; + if (tooltip) { + state.tooltip = tooltip; + state.infowindow.setContent(tooltip); + if (!state.infowindowOpen) { + state.infowindow.open(state.map, state.marker); + state.infowindowOpen = true; + } + } + + // Map style - options.style + var style = data.widgetStyle; + if (style) { + state.map.setMapTypeId(style); + } + + // Zoom - options.zoom + var zoom = data.widgetZoom; + if (zoom != null) { + state.zoom = zoom; + state.map.setZoom(+zoom); + } + + // Click marker to open in google maps + google.maps.event.addListener(state.marker, 'click', function() { + window.open('https://maps.google.com/?z=' + state.zoom + '&daddr=' + state.latLng); + }); + + return state; + } + + // Export module + return api; +}); +/** + * ---------------------------------------------------------------------- + * Webflow: Google+ widget + */ +Webflow.define('gplus', function($) { + 'use strict'; + + var $doc = $(document); + var api = {}; + var loaded; + + api.ready = function() { + // Load Google+ API on the front-end + if (!Webflow.env() && !loaded) init(); + }; + + function init() { + $doc.find('.w-widget-gplus').length && load(); + } + + function load() { + loaded = true; + $.getScript('https://apis.google.com/js/plusone.js'); + } + + // Export module + return api; +}); +/** + * ---------------------------------------------------------------------- + * Webflow: Smooth scroll + */ +Webflow.define('scroll', function($) { + 'use strict'; + + var $doc = $(document); + var win = window; + var loc = win.location; + var history = inIframe() ? null : win.history; + var validHash = /^[a-zA-Z][\w:.-]*$/; + + function inIframe() { + try { + return !!win.frameElement; + } catch (e) { + return true; + } + } + + function ready() { + // If hash is already present on page load, scroll to it right away + if (loc.hash) { + findEl(loc.hash.substring(1)); + } + + // When clicking on a link, check if it links to another part of the page + $doc.on('click', 'a', function(e) { + if (Webflow.env('design')) { + return; + } + + // Ignore links being used by jQuery mobile + if (window.$.mobile && $(e.currentTarget).hasClass('ui-link')) return; + + // Ignore empty # links + if (this.getAttribute('href') === '#') { + e.preventDefault(); + return; + } + + var hash = this.hash ? this.hash.substring(1) : null; + if (hash) { + findEl(hash, e); + } + }); + } + + function findEl(hash, e) { + if (!validHash.test(hash)) return; + + var el = $('#' + hash); + if (!el.length) { + return; + } + + if (e) { + e.preventDefault(); + e.stopPropagation(); + } + + // Push new history state + if (loc.hash !== hash && history && history.pushState) { + var oldHash = history.state && history.state.hash; + if (oldHash !== hash) { + history.pushState({ hash: hash }, '', '#' + hash); + } + } + + // If a fixed header exists, offset for the height + var header = $('header, body > .header, body > .w-nav'); + var offset = header.css('position') === 'fixed' ? header.outerHeight() : 0; + + win.setTimeout(function() { + scroll(el, offset); + }, e ? 0 : 300); + } + + function scroll(el, offset){ + var start = $(win).scrollTop(); + var end = el.offset().top - offset; + + // If specified, scroll so that the element ends up in the middle of the viewport + if (el.data('scroll') == 'mid') { + var available = $(win).height() - offset; + var elHeight = el.outerHeight(); + if (elHeight < available) { + end -= Math.round((available - elHeight) / 2); + } + } + + var mult = 1; + + // Check for custom time multiplier on the body and the element + $('body').add(el).each(function(i) { + var time = parseFloat($(this).attr('data-scroll-time'), 10); + if (!isNaN(time) && (time === 0 || time > 0)) { + mult = time; + } + }); + + // Shim for IE8 and below + if (!Date.now) { + Date.now = function() { return new Date().getTime(); }; + } + + var clock = Date.now(); + var animate = win.requestAnimationFrame || win.mozRequestAnimationFrame || win.webkitRequestAnimationFrame || function(fn) { win.setTimeout(fn, 15); }; + var duration = (472.143 * Math.log(Math.abs(start - end) +125) - 2000) * mult; + + var step = function() { + var elapsed = Date.now() - clock; + win.scroll(0, getY(start, end, elapsed, duration)); + + if (elapsed <= duration) { + animate(step); + } + }; + + step(); + } + + function getY(start, end, elapsed, duration) { + if (elapsed > duration) { + return end; + } + + return start + (end - start) * ease(elapsed / duration); + } + + function ease(t) { + return t<0.5 ? 4*t*t*t : (t-1)*(2*t-2)*(2*t-2)+1; + } + + // Export module + return { ready: ready }; +}); +/** + * ---------------------------------------------------------------------- + * Webflow: Auto-select links to current page or section + */ +Webflow.define('links', function($, _) { + 'use strict'; + + var api = {}; + var $win = $(window); + var designer; + var inApp = Webflow.env(); + var location = window.location; + var tempLink = document.createElement('a'); + var linkCurrent = 'w--current'; + var validHash = /^#[a-zA-Z][\w:.-]*$/; + var indexPage = /index\.(html|php)$/; + var dirList = /\/$/; + var anchors; + var slug; + + // ----------------------------------- + // Module methods + + api.ready = api.design = api.preview = init; + + // ----------------------------------- + // Private methods + + function init() { + designer = inApp && Webflow.env('design'); + slug = Webflow.env('slug') || location.pathname || ''; + + // Reset scroll listener, init anchors + Webflow.scroll.off(scroll); + anchors = []; + + // Test all links for a selectable href + var links = document.links; + for (var i = 0; i < links.length; ++i) { + select(links[i]); + } + + // Listen for scroll if any anchors exist + if (anchors.length) { + Webflow.scroll.on(scroll); + scroll(); + } + } + + function select(link) { + var href = (designer && link.getAttribute('href-disabled')) || link.getAttribute('href'); + tempLink.href = href; + + // Ignore any hrefs with a colon to safely avoid all uri schemes + if (href.indexOf(':') >= 0) return; + + var $link = $(link); + + // Check for valid hash links w/ sections and use scroll anchor + if (href.indexOf('#') === 0 && validHash.test(href)) { + // Ignore #edit anchors + if (href === '#edit') return; + var $section = $(href); + $section.length && anchors.push({ link: $link, sec: $section, active: false }); + return; + } + + // Ignore empty # links + if (href === '#') return; + + // Determine whether the link should be selected + var match = (tempLink.href === location.href) || (href === slug) || (indexPage.test(href) && dirList.test(slug)); + setClass($link, linkCurrent, match); + } + + function scroll() { + var viewTop = $win.scrollTop(); + var viewHeight = $win.height(); + + // Check each anchor for a section in view + _.each(anchors, function(anchor) { + var $link = anchor.link; + var $section = anchor.sec; + var top = $section.offset().top; + var height = $section.outerHeight(); + var offset = viewHeight * 0.5; + var active = ($section.is(':visible') && + top + height - offset >= viewTop && + top + offset <= viewTop + viewHeight); + if (anchor.active === active) return; + anchor.active = active; + setClass($link, linkCurrent, active); + if (designer) $link[0].__wf_current = active; + }); + } + + function setClass($elem, className, add) { + var exists = $elem.hasClass(className); + if (add && exists) return; + if (!add && !exists) return; + add ? $elem.addClass(className) : $elem.removeClass(className); + } + + // Export module + return api; +}); +/** + * ---------------------------------------------------------------------- + * Webflow: Slider component + */ +Webflow.define('slider', function($, _) { + 'use strict'; + + var api = {}; + var tram = window.tram; + var $doc = $(document); + var $sliders; + var designer; + var inApp = Webflow.env(); + var namespace = '.w-slider'; + var dot = '
'; + var ix = Webflow.ixEvents(); + var fallback; + var redraw; + + // ----------------------------------- + // Module methods + + api.ready = function() { + init(); + }; + + api.design = function() { + designer = true; + init(); + }; + + api.preview = function() { + designer = false; + init(); + }; + + api.redraw = function() { + redraw = true; + init(); + }; + + api.destroy = removeListeners; + + // ----------------------------------- + // Private methods + + function init() { + // Find all sliders on the page + $sliders = $doc.find(namespace); + if (!$sliders.length) return; + $sliders.filter(':visible').each(build); + redraw = null; + if (fallback) return; + + // Wire events + removeListeners(); + addListeners(); + } + + function removeListeners() { + Webflow.resize.off(renderAll); + Webflow.redraw.off(api.redraw); + } + + function addListeners() { + Webflow.resize.on(renderAll); + Webflow.redraw.on(api.redraw); + } + + function renderAll() { + $sliders.filter(':visible').each(render); + } + + function build(i, el) { + var $el = $(el); + + // Store slider state in data + var data = $.data(el, namespace); + if (!data) data = $.data(el, namespace, { + index: 0, + depth: 1, + el: $el, + config: {} + }); + data.mask = $el.children('.w-slider-mask'); + data.left = $el.children('.w-slider-arrow-left'); + data.right = $el.children('.w-slider-arrow-right'); + data.nav = $el.children('.w-slider-nav'); + data.slides = data.mask.children('.w-slide'); + data.slides.each(ix.reset); + if (redraw) data.maskWidth = 0; + + // Disable in old browsers + if (!tram.support.transform) { + data.left.hide(); + data.right.hide(); + data.nav.hide(); + fallback = true; + return; + } + + // Remove old events + data.el.off(namespace); + data.left.off(namespace); + data.right.off(namespace); + data.nav.off(namespace); + + // Set config from data attributes + configure(data); + + // Add events based on mode + if (designer) { + data.el.on('setting' + namespace, handler(data)); + stopTimer(data); + data.hasTimer = false; + } else { + data.el.on('swipe' + namespace, handler(data)); + data.left.on('tap' + namespace, previous(data)); + data.right.on('tap' + namespace, next(data)); + + // Start timer if autoplay is true, only once + if (data.config.autoplay && !data.hasTimer) { + data.hasTimer = true; + data.timerCount = 1; + startTimer(data); + } + } + + // Listen to nav events + data.nav.on('tap' + namespace, '> div', handler(data)); + + // Remove gaps from formatted html (for inline-blocks) + if (!inApp) { + data.mask.contents().filter(function() { + return this.nodeType === 3; + }).remove(); + } + + // Run first render + render(i, el); + } + + function configure(data) { + var config = {}; + + config.crossOver = 0; + + // Set config options from data attributes + config.animation = data.el.attr('data-animation') || 'slide'; + if (config.animation == 'outin') { + config.animation = 'cross'; + config.crossOver = 0.5; + } + config.easing = data.el.attr('data-easing') || 'ease'; + + var duration = data.el.attr('data-duration'); + config.duration = duration != null ? +duration : 500; + + if (+data.el.attr('data-infinite')) config.infinite = true; + + if (+data.el.attr('data-hide-arrows')) { + config.hideArrows = true; + } else if (data.config.hideArrows) { + data.left.show(); + data.right.show(); + } + + if (+data.el.attr('data-autoplay')) { + config.autoplay = true; + config.delay = +data.el.attr('data-delay') || 2000; + config.timerMax = +data.el.attr('data-autoplay-limit'); + // Disable timer on first touch or mouse down + var touchEvents = 'mousedown' + namespace + ' touchstart' + namespace; + if (!designer) data.el.off(touchEvents).one(touchEvents, function() { + stopTimer(data); + }); + } + + // Use edge buffer to help calculate page count + var arrowWidth = data.right.width(); + config.edge = arrowWidth ? arrowWidth + 40 : 100; + + // Store config in data + data.config = config; + } + + function previous(data) { + return function(evt) { + change(data, { index: data.index - 1, vector: -1 }); + }; + } + + function next(data) { + return function(evt) { + change(data, { index: data.index + 1, vector: 1 }); + }; + } + + function select(data, value) { + // Select page based on slide element index + var found = null; + if (value === data.slides.length) { + init(); layout(data); // Rebuild and find new slides + } + _.each(data.anchors, function(anchor, index) { + $(anchor.els).each(function(i, el) { + if ($(el).index() === value) found = index; + }); + }); + if (found != null) change(data, { index: found, immediate: true }); + } + + function startTimer(data) { + stopTimer(data); + var config = data.config; + var timerMax = config.timerMax; + if (timerMax && data.timerCount++ > timerMax) return; + data.timerId = window.setTimeout(function() { + if (data.timerId == null || designer) return; + next(data)(); + startTimer(data); + }, config.delay); + } + + function stopTimer(data) { + window.clearTimeout(data.timerId); + data.timerId = null; + } + + function handler(data) { + return function(evt, options) { + options = options || {}; + + // Designer settings + if (designer && evt.type == 'setting') { + if (options.select == 'prev') return previous(data)(); + if (options.select == 'next') return next(data)(); + configure(data); + layout(data); + if (options.select == null) return; + select(data, options.select); + return; + } + + // Swipe event + if (evt.type == 'swipe') { + if (Webflow.env('editor')) return; + if (options.direction == 'left') return next(data)(); + if (options.direction == 'right') return previous(data)(); + return; + } + + // Page buttons + if (data.nav.has(evt.target).length) { + change(data, { index: $(evt.target).index() }); + } + }; + } + + function change(data, options) { + options = options || {}; + var config = data.config; + var anchors = data.anchors; + + // Set new index + data.previous = data.index; + var index = options.index; + var shift = {}; + if (index < 0) { + index = anchors.length-1; + if (config.infinite) { + // Shift first slide to the end + shift.x = -data.endX; + shift.from = 0; + shift.to = anchors[0].width; + } + } else if (index >= anchors.length) { + index = 0; + if (config.infinite) { + // Shift last slide to the start + shift.x = anchors[anchors.length-1].width; + shift.from = -anchors[anchors.length-1].x; + shift.to = shift.from - shift.x; + } + } + data.index = index; + + // Select page nav + var active = data.nav.children().eq(data.index).addClass('w-active'); + data.nav.children().not(active).removeClass('w-active'); + + // Hide arrows + if (config.hideArrows) { + data.index === anchors.length-1 ? data.right.hide() : data.right.show(); + data.index === 0 ? data.left.hide() : data.left.show(); + } + + // Get page offset from anchors + var lastOffsetX = data.offsetX || 0; + var offsetX = data.offsetX = -anchors[data.index].x; + var resetConfig = { x: offsetX, opacity: 1, visibility: '' }; + + // Transition slides + var targets = $(anchors[data.index].els); + var previous = $(anchors[data.previous] && anchors[data.previous].els); + var others = data.slides.not(targets); + var animation = config.animation; + var easing = config.easing; + var duration = Math.round(config.duration); + var vector = options.vector || (data.index > data.previous ? 1 : -1); + var fadeRule = 'opacity ' + duration + 'ms ' + easing; + var slideRule = 'transform ' + duration + 'ms ' + easing; + + // Trigger IX events + if (!designer) { + targets.each(ix.intro); + others.each(ix.outro); + } + + // Set immediately after layout changes (but not during redraw) + if (options.immediate && !redraw) { + tram(targets).set(resetConfig); + resetOthers(); + return; + } + + // Exit early if index is unchanged + if (data.index == data.previous) return; + + // Cross Fade / Out-In + if (animation == 'cross') { + var reduced = Math.round(duration - duration * config.crossOver); + var wait = Math.round(duration - reduced); + fadeRule = 'opacity ' + reduced + 'ms ' + easing; + tram(previous) + .set({ visibility: '' }) + .add(fadeRule) + .start({ opacity: 0 }); + tram(targets) + .set({ visibility: '', x: offsetX, opacity: 0, zIndex: data.depth++ }) + .add(fadeRule) + .wait(wait) + .then({ opacity: 1 }) + .then(resetOthers); + return; + } + + // Fade Over + if (animation == 'fade') { + tram(previous) + .set({ visibility: '' }) + .stop(); + tram(targets) + .set({ visibility: '', x: offsetX, opacity: 0, zIndex: data.depth++ }) + .add(fadeRule) + .start({ opacity: 1 }) + .then(resetOthers); + return; + } + + // Slide Over + if (animation == 'over') { + resetConfig = { x: data.endX }; + tram(previous) + .set({ visibility: '' }) + .stop(); + tram(targets) + .set({ visibility: '', zIndex: data.depth++, x: offsetX + anchors[data.index].width * vector }) + .add(slideRule) + .start({ x: offsetX }) + .then(resetOthers); + return; + } + + // Slide - infinite scroll + if (config.infinite && shift.x) { + tram(data.slides.not(previous)) + .set({ visibility: '', x: shift.x }) + .add(slideRule) + .start({ x: offsetX }); + tram(previous) + .set({ visibility: '', x: shift.from }) + .add(slideRule) + .start({ x: shift.to }); + data.shifted = previous; + + } else { + if (config.infinite && data.shifted) { + tram(data.shifted).set({ visibility: '', x: lastOffsetX }); + data.shifted = null; + } + + // Slide - basic scroll + tram(data.slides) + .set({ visibility: '' }) + .add(slideRule) + .start({ x: offsetX }); + } + + // Helper to move others out of view + function resetOthers() { + var targets = $(anchors[data.index].els); + var others = data.slides.not(targets); + if (animation != 'slide') resetConfig.visibility = 'hidden'; + tram(others).set(resetConfig); + } + } + + function render(i, el) { + var data = $.data(el, namespace); + if (maskChanged(data)) return layout(data); + if (designer && slidesChanged(data)) layout(data); + } + + function layout(data) { + // Determine page count from width of slides + var pages = 1; + var offset = 0; + var anchor = 0; + var width = 0; + var maskWidth = data.maskWidth; + var threshold = maskWidth - data.config.edge; + if (threshold < 0) threshold = 0; + data.anchors = [{ els: [], x: 0, width: 0 }]; + data.slides.each(function(i, el) { + if (anchor - offset > threshold) { + pages++; + offset += maskWidth; + // Store page anchor for transition + data.anchors[pages-1] = { els: [], x: anchor, width: 0 }; + } + // Set next anchor using current width + margin + width = $(el).outerWidth(true); + anchor += width; + data.anchors[pages-1].width += width; + data.anchors[pages-1].els.push(el); + }); + data.endX = anchor; + + // Build dots if nav exists and needs updating + if (designer) data.pages = null; + if (data.nav.length && data.pages !== pages){ + data.pages = pages; + buildNav(data); + } + + // Make sure index is still within range and call change handler + var index = data.index; + if (index >= pages) index = pages-1; + change(data, { immediate: true, index: index }); + } + + function buildNav(data) { + var dots = []; + var $dot; + var spacing = data.el.attr('data-nav-spacing'); + if (spacing) spacing = parseFloat(spacing) + 'px'; + for (var i=0; i 1) { + $refs.items = $refs.empty; + + items.forEach(function (item) { + var $thumbnail = dom('thumbnail'); + var $item = dom('item').append($thumbnail); + + $refs.items = $refs.items.add($item); + + loadImage(item.thumbnailUrl || item.url, function ($image) { + if ($image.prop('width') > $image.prop('height')) { + addClass($image, 'wide'); + } + else { + addClass($image, 'tall'); + } + $thumbnail.append(addClass($image, 'thumbnail-image')); + }); + }); + + $refs.strip.empty().append($refs.items); + addClass($refs.content, 'group'); + } + + tram( + // Focus the lightbox to receive keyboard events. + removeClass($refs.lightbox, 'hide').focus() + ) + .add('opacity .3s') + .start({opacity: 1}); + + // Prevent document from scrolling while lightbox is active. + addClass($refs.html, 'noscroll'); + + return lightbox.show(index || 0); + } + + /** + * Creates the DOM structure required by the lightbox. + */ + lightbox.build = function () { + // In case `build` is called more than once. + lightbox.destroy(); + + $refs = { + html: $(document.documentElement), + // Empty jQuery object can be used to build new ones using `.add`. + empty: $() + }; + + $refs.arrowLeft = dom('control left inactive'); + $refs.arrowRight = dom('control right inactive'); + $refs.close = dom('control close'); + + $refs.spinner = dom('spinner'); + $refs.strip = dom('strip'); + + spinner = new Spinner($refs.spinner, prefixed('hide')); + + $refs.content = dom('content') + .append($refs.spinner, $refs.arrowLeft, $refs.arrowRight, $refs.close); + + $refs.container = dom('container') + .append($refs.content, $refs.strip); + + $refs.lightbox = dom('backdrop hide') + .append($refs.container); + + // We are delegating events for performance reasons and also + // to not have to reattach handlers when images change. + $refs.strip.on('tap', selector('item'), itemTapHandler); + $refs.content + .on('swipe', swipeHandler) + .on('tap', selector('left'), handlerPrev) + .on('tap', selector('right'), handlerNext) + .on('tap', selector('close'), handlerHide) + .on('tap', selector('image, caption'), handlerNext); + $refs.container + .on('tap', selector('view, strip'), handlerHide) + // Prevent images from being dragged around. + .on('dragstart', selector('img'), preventDefault); + $refs.lightbox + .on('keydown', keyHandler) + // IE loses focus to inner nodes without letting us know. + .on('focusin', focusThis); + + // The `tabindex` attribute is needed to enable non-input elements + // to receive keyboard events. + $('body').append($refs.lightbox.prop('tabIndex', 0)); + + return lightbox; + }; + + /** + * Dispose of DOM nodes created by the lightbox. + */ + lightbox.destroy = function () { + if (!$refs) { + return; + } + + // Event handlers are also removed. + $refs.lightbox.remove(); + $refs = undefined; + }; + + /** + * Show a specific item. + */ + lightbox.show = function (index) { + // Bail if we are already showing this item. + if (index === currentIndex) { + return; + } + + var item = items[index]; + var previousIndex = currentIndex; + currentIndex = index; + spinner.show(); + + // For videos, load an empty SVG with the video dimensions to preserve + // the video’s aspect ratio while being responsive. + var url = item.html && svgDataUri(item.width, item.height) || item.url; + loadImage(url, function ($image) { + // Make sure this is the last item requested to be shown since + // images can finish loading in a different order than they were + // requested in. + if (index != currentIndex) { + return; + } + + var $figure = dom('figure', 'figure').append(addClass($image, 'image')); + var $frame = dom('frame').append($figure); + var $newView = dom('view').append($frame); + var $html, isIframe; + + if (item.html) { + $html = $(item.html); + isIframe = $html.is('iframe'); + + if (isIframe) { + $html.on('load', transitionToNewView); + } + + $figure.append(addClass($html, 'embed')); + } + + if (item.caption) { + $figure.append(dom('caption', 'figcaption').text(item.caption)); + } + + $refs.spinner.before($newView); + + if (!isIframe) { + transitionToNewView(); + } + + function transitionToNewView() { + spinner.hide(); + + if (index != currentIndex) { + $newView.remove(); + return; + } + + + toggleClass($refs.arrowLeft, 'inactive', index <= 0); + toggleClass($refs.arrowRight, 'inactive', index >= items.length - 1); + + if ($refs.view) { + tram($refs.view) + .add('opacity .3s') + .start({opacity: 0}) + .then(remover($refs.view)); + + tram($newView) + .add('opacity .3s') + .add('transform .3s') + .set({x: index > previousIndex ? '80px' : '-80px'}) + .start({opacity: 1, x: 0}); + } + else { + $newView.css('opacity', 1); + } + + $refs.view = $newView; + + if ($refs.items) { + // Mark proper thumbnail as active + addClass(removeClass($refs.items, 'active').eq(index), 'active'); + } + } + }); + + return lightbox; + }; + + /** + * Hides the lightbox. + */ + lightbox.hide = function () { + tram($refs.lightbox) + .add('opacity .3s') + .start({opacity: 0}) + .then(hideLightbox); + + return lightbox; + }; + + lightbox.prev = function () { + if (currentIndex > 0) { + lightbox.show(currentIndex - 1); + } + }; + + lightbox.next = function () { + if (currentIndex < items.length - 1) { + lightbox.show(currentIndex + 1); + } + }; + + function createHandler(action) { + return function (event) { + // We only care about events triggered directly on the bound selectors. + if (this != event.target) { + return; + } + + event.stopPropagation(); + event.preventDefault(); + + action(); + }; + } + + var handlerPrev = createHandler(lightbox.prev); + var handlerNext = createHandler(lightbox.next); + var handlerHide = createHandler(lightbox.hide); + + var itemTapHandler = function(event) { + var index = $(this).index(); + + event.preventDefault(); + lightbox.show(index); + }; + + var swipeHandler = function (event, data) { + // Prevent scrolling. + event.preventDefault(); + + if (data.direction == 'left') { + lightbox.next(); + } + else if (data.direction == 'right') { + lightbox.prev(); + } + }; + + var focusThis = function () { + this.focus(); + }; + + function preventDefault(event) { + event.preventDefault(); + } + + function keyHandler(event) { + var keyCode = event.keyCode; + + // [esc] + if (keyCode == 27) { + lightbox.hide(); + } + + // [◀] + else if (keyCode == 37) { + lightbox.prev(); + } + + // [▶] + else if (keyCode == 39) { + lightbox.next(); + } + } + + function hideLightbox() { + removeClass($refs.html, 'noscroll'); + addClass($refs.lightbox, 'hide'); + $refs.strip.empty(); + $refs.view && $refs.view.remove(); + + // Reset some stuff + removeClass($refs.content, 'group'); + addClass($refs.arrowLeft, 'inactive'); + addClass($refs.arrowRight, 'inactive'); + + currentIndex = $refs.view = undefined; + } + + function loadImage(url, callback) { + var $image = dom('img', 'img'); + + $image.one('load', function () { + callback($image); + }); + + // Start loading image. + $image.attr('src', url); + + return $image; + } + + function remover($element) { + return function () { + $element.remove(); + }; + } + + /** + * Spinner + */ + function Spinner($spinner, className, delay) { + this.$element = $spinner; + this.className = className; + this.delay = delay || 200; + this.hide(); + } + + Spinner.prototype.show = function () { + var spinner = this; + + // Bail if we are already showing the spinner. + if (spinner.timeoutId) { + return; + } + + spinner.timeoutId = setTimeout(function () { + spinner.$element.removeClass(spinner.className); + delete spinner.timeoutId; + }, spinner.delay); + }; + + Spinner.prototype.hide = function () { + var spinner = this; + if (spinner.timeoutId) { + clearTimeout(spinner.timeoutId); + delete spinner.timeoutId; + return; + } + + spinner.$element.addClass(spinner.className); + }; + + function prefixed(string, isSelector) { + return string.replace(prefixRegex, (isSelector ? ' .' : ' ') + prefix); + } + + function selector(string) { + return prefixed(string, true); + } + + /** + * jQuery.addClass with auto-prefixing + * @param {jQuery} Element to add class to + * @param {string} Class name that will be prefixed and added to element + * @return {jQuery} + */ + function addClass($element, className) { + return $element.addClass(prefixed(className)); + } + + /** + * jQuery.removeClass with auto-prefixing + * @param {jQuery} Element to remove class from + * @param {string} Class name that will be prefixed and removed from element + * @return {jQuery} + */ + function removeClass($element, className) { + return $element.removeClass(prefixed(className)); + } + + /** + * jQuery.toggleClass with auto-prefixing + * @param {jQuery} Element where class will be toggled + * @param {string} Class name that will be prefixed and toggled + * @param {boolean} Optional boolean that determines if class will be added or removed + * @return {jQuery} + */ + function toggleClass($element, className, shouldAdd) { + return $element.toggleClass(prefixed(className), shouldAdd); + } + + /** + * Create a new DOM element wrapped in a jQuery object, + * decorated with our custom methods. + * @param {string} className + * @param {string} [tag] + * @return {jQuery} + */ + function dom(className, tag) { + return addClass($(document.createElement(tag || 'div')), className); + } + + function isObject(value) { + return typeof value == 'object' && null != value && !isArray(value); + } + + function svgDataUri(width, height) { + var svg = ''; + return 'data:image/svg+xml;charset=utf-8,' + encodeURI(svg); + } + + // Compute some dimensions manually for iOS, because of buggy support for VH. + // Also, Android built-in browser does not support viewport units. + (function () { + var ua = window.navigator.userAgent; + var iOS = /(iPhone|iPod|iPad).+AppleWebKit/i.test(ua); + var android = ua.indexOf('Android ') > -1 && ua.indexOf('Chrome') == -1; + + if (!iOS && !android) { + return; + } + + var styleNode = document.createElement('style'); + document.head.appendChild(styleNode); + window.addEventListener('orientationchange', refresh, true); + + function refresh() { + var vh = window.innerHeight; + var vw = window.innerWidth; + var content = + '.w-lightbox-content, .w-lightbox-view, .w-lightbox-view:before {' + + 'height:' + vh + 'px' + + '}' + + '.w-lightbox-view {' + + 'width:' + vw + 'px' + + '}' + + '.w-lightbox-group, .w-lightbox-group .w-lightbox-view, .w-lightbox-group .w-lightbox-view:before {' + + 'height:' + (0.86 * vh) + 'px' + + '}' + + '.w-lightbox-image {' + + 'max-width:' + vw + 'px;' + + 'max-height:' + vh + 'px' + + '}' + + '.w-lightbox-group .w-lightbox-image {' + + 'max-height:' + (0.86 * vh) + 'px' + + '}' + + '.w-lightbox-strip {' + + 'padding: 0 ' + (0.01 * vh) + 'px' + + '}' + + '.w-lightbox-item {' + + 'width:' + (0.1 * vh) + 'px;' + + 'padding:' + (0.02 * vh) + 'px ' + (0.01 * vh) + 'px' + + '}' + + '.w-lightbox-thumbnail {' + + 'height:' + (0.1 * vh) + 'px' + + '}' + + '@media (min-width: 768px) {' + + '.w-lightbox-content, .w-lightbox-view, .w-lightbox-view:before {' + + 'height:' + (0.96 * vh) + 'px' + + '}' + + '.w-lightbox-content {' + + 'margin-top:' + (0.02 * vh) + 'px' + + '}' + + '.w-lightbox-group, .w-lightbox-group .w-lightbox-view, .w-lightbox-group .w-lightbox-view:before {' + + 'height:' + (0.84 * vh) + 'px' + + '}' + + '.w-lightbox-image {' + + 'max-width:' + (0.96 * vw) + 'px;' + + 'max-height:' + (0.96 * vh) + 'px' + + '}' + + '.w-lightbox-group .w-lightbox-image {' + + 'max-width:' + (0.823 * vw) + 'px;' + + 'max-height:' + (0.84 * vh) + 'px' + + '}' + + '}'; + + styleNode.textContent = content; + } + + refresh(); + })(); + + return lightbox; +})(window, document, jQuery, window.tram); + +Webflow.define('lightbox', function ($, _) { + 'use strict'; + + var api = {}; + var $doc = $(document); + var $body; + var $lightboxes; + var designer; + var inApp = Webflow.env(); + var namespace = '.w-lightbox'; + var groups; + + // ----------------------------------- + // Module methods + + api.ready = api.design = api.preview = init; + + // ----------------------------------- + // Private methods + + function init() { + designer = inApp && Webflow.env('design'); + $body = $(document.body); + + // Reset Lightbox + lightbox.destroy(); + + // Reset groups + groups = {}; + + // Find all instances on the page + $lightboxes = $doc.find(namespace); + $lightboxes.each(build); + } + + function build(i, el) { + var $el = $(el); + + // Store state in data + var data = $.data(el, namespace); + if (!data) data = $.data(el, namespace, { + el: $el, + mode: 'images', + images: [], + embed: '' + }); + + // Remove old events + data.el.off(namespace); + + // Set config from json script tag + configure(data); + + // Add events based on mode + if (designer) { + data.el.on('setting' + namespace, configure.bind(null, data)); + } + else { + data.el + .on('tap' + namespace, tapHandler(data)) + // Prevent page scrolling to top when clicking on lightbox triggers. + .on('click' + namespace, function (e) { e.preventDefault(); }); + } + } + + function configure(data) { + var json = data.el.children('.w-json').html(); + var groupName, groupItems; + + if (!json) { + data.items = []; + return; + } + + try { + json = JSON.parse(json); + + supportOldLightboxJson(json); + + groupName = json.group; + + if (groupName) { + groupItems = groups[groupName]; + if (!groupItems) { + groupItems = groups[groupName] = []; + } + + data.items = groupItems; + + if (json.items.length) { + data.index = groupItems.length; + groupItems.push.apply(groupItems, json.items); + } + } + else { + data.items = json.items; + } + } + catch (e) { + console.error('Malformed lightbox JSON configuration.', e.message); + } + } + + function tapHandler(data) { + return function () { + data.items.length && lightbox(data.items, data.index || 0); + }; + } + + function supportOldLightboxJson(data) { + if (data.images) { + data.images.forEach(function (item) { + item.type = 'image'; + }); + data.items = data.images; + } + + if (data.embed) { + data.embed.type = 'video'; + data.items = [data.embed]; + } + + if (data.groupId) { + data.group = data.groupId; + } + } + + // Export module + return api; +}); +/** + * ---------------------------------------------------------------------- + * Webflow: Navbar component + */ +Webflow.define('navbar', function($, _) { + 'use strict'; + + var api = {}; + var tram = window.tram; + var $win = $(window); + var $doc = $(document); + var $body; + var $navbars; + var designer; + var inApp = Webflow.env(); + var overlay = '
'; + var namespace = '.w-nav'; + var buttonOpen = 'w--open'; + var menuOpen = 'w--nav-menu-open'; + var linkOpen = 'w--nav-link-open'; + var ix = Webflow.ixEvents(); + + // ----------------------------------- + // Module methods + + api.ready = api.design = api.preview = init; + api.destroy = removeListeners; + + // ----------------------------------- + // Private methods + + function init() { + designer = inApp && Webflow.env('design'); + $body = $(document.body); + + // Find all instances on the page + $navbars = $doc.find(namespace); + if (!$navbars.length) return; + $navbars.each(build); + + // Wire events + removeListeners(); + addListeners(); + } + + function removeListeners() { + Webflow.resize.off(resizeAll); + } + + function addListeners() { + Webflow.resize.on(resizeAll); + } + + function resizeAll() { + $navbars.each(resize); + } + + function build(i, el) { + var $el = $(el); + + // Store state in data + var data = $.data(el, namespace); + if (!data) data = $.data(el, namespace, { open: false, el: $el, config: {} }); + data.menu = $el.find('.w-nav-menu'); + data.links = data.menu.find('.w-nav-link'); + data.dropdowns = data.menu.find('.w-dropdown'); + data.button = $el.find('.w-nav-button'); + data.container = $el.find('.w-container'); + data.outside = outside(data); + + // Remove old events + data.el.off(namespace); + data.button.off(namespace); + data.menu.off(namespace); + + // Set config from data attributes + configure(data); + + // Add events based on mode + if (designer) { + removeOverlay(data); + data.el.on('setting' + namespace, handler(data)); + } else { + addOverlay(data); + data.button.on('tap' + namespace, toggle(data)); + data.menu.on('click' + namespace, 'a', navigate(data)); + } + + // Trigger initial resize + resize(i, el); + } + + function removeOverlay(data) { + if (!data.overlay) return; + close(data, true); + data.overlay.remove(); + data.overlay = null; + } + + function addOverlay(data) { + if (data.overlay) return; + data.overlay = $(overlay).appendTo(data.el); + data.parent = data.menu.parent(); + close(data, true); + } + + function configure(data) { + var config = {}; + var old = data.config || {}; + + // Set config options from data attributes + var animation = config.animation = data.el.attr('data-animation') || 'default'; + config.animOver = /^over/.test(animation); + config.animDirect = /left$/.test(animation) ? -1 : 1; + + // Re-open menu if the animation type changed + if (old.animation != animation) { + data.open && _.defer(reopen, data); + } + + config.easing = data.el.attr('data-easing') || 'ease'; + config.easing2 = data.el.attr('data-easing2') || 'ease'; + + var duration = data.el.attr('data-duration'); + config.duration = duration != null ? +duration : 400; + + config.docHeight = data.el.attr('data-doc-height'); + + // Store config in data + data.config = config; + } + + function handler(data) { + return function(evt, options) { + options = options || {}; + var winWidth = $win.width(); + configure(data); + options.open === true && open(data, true); + options.open === false && close(data, true); + // Reopen if media query changed after setting + data.open && _.defer(function() { + if (winWidth != $win.width()) reopen(data); + }); + }; + } + + function reopen(data) { + if (!data.open) return; + close(data, true); + open(data, true); + } + + function toggle(data) { + // Debounce toggle to wait for accurate open state + return _.debounce(function(evt) { + data.open ? close(data) : open(data); + }); + } + + function navigate(data) { + return function(evt) { + var link = $(this); + var href = link.attr('href'); + + // Avoid late clicks on touch devices + if (!Webflow.validClick(evt.currentTarget)) { + evt.preventDefault(); + return; + } + + // Close when navigating to an in-page anchor + if (href && href.indexOf('#') === 0 && data.open) { + close(data); + } + }; + } + + function outside(data) { + // Unbind previous tap handler if it exists + if (data.outside) $doc.off('tap' + namespace, data.outside); + + // Close menu when tapped outside, debounced to wait for state + return _.debounce(function(evt) { + if (!data.open) return; + var menu = $(evt.target).closest('.w-nav-menu'); + if (!data.menu.is(menu)) { + close(data); + } + }); + } + + function resize(i, el) { + var data = $.data(el, namespace); + // Check for collapsed state based on button display + var collapsed = data.collapsed = data.button.css('display') != 'none'; + // Close menu if button is no longer visible (and not in designer) + if (data.open && !collapsed && !designer) close(data, true); + // Set max-width of links + dropdowns to match container + if (data.container.length) { + var updateEachMax = updateMax(data); + data.links.each(updateEachMax); + data.dropdowns.each(updateEachMax); + } + // If currently open, update height to match body + if (data.open) { + setOverlayHeight(data); + } + } + + var maxWidth = 'max-width'; + function updateMax(data) { + // Set max-width of each element to match container + var containMax = data.container.css(maxWidth); + if (containMax == 'none') containMax = ''; + return function(i, link) { + link = $(link); + link.css(maxWidth, ''); + // Don't set the max-width if an upstream value exists + if (link.css(maxWidth) == 'none') link.css(maxWidth, containMax); + }; + } + + function open(data, immediate) { + if (data.open) return; + data.open = true; + data.menu.addClass(menuOpen); + data.links.addClass(linkOpen); + data.button.addClass(buttonOpen); + var config = data.config; + var animation = config.animation; + if (animation == 'none' || !tram.support.transform) immediate = true; + var bodyHeight = setOverlayHeight(data); + var menuHeight = data.menu.outerHeight(true); + var menuWidth = data.menu.outerWidth(true); + var navHeight = data.el.height(); + var navbarEl = data.el[0]; + resize(0, navbarEl); + ix.intro(0, navbarEl); + Webflow.redraw.up(); + + // Listen for tap outside events + if (!designer) $doc.on('tap' + namespace, data.outside); + + // No transition for immediate + if (immediate) return; + + var transConfig = 'transform ' + config.duration + 'ms ' + config.easing; + + // Add menu to overlay + if (data.overlay) { + data.overlay.show().append(data.menu); + } + + // Over left/right + if (config.animOver) { + tram(data.menu) + .add(transConfig) + .set({ x: config.animDirect * menuWidth, height: bodyHeight }).start({ x: 0 }); + data.overlay && data.overlay.width(menuWidth); + return; + } + + // Drop Down + var offsetY = navHeight + menuHeight; + tram(data.menu) + .add(transConfig) + .set({ y: -offsetY }).start({ y: 0 }); + } + + function setOverlayHeight(data) { + var config = data.config; + var bodyHeight = config.docHeight ? $doc.height() : $body.height(); + if (config.animOver) { + data.menu.height(bodyHeight); + } else if (data.el.css('position') != 'fixed') { + bodyHeight -= data.el.height(); + } + data.overlay && data.overlay.height(bodyHeight); + return bodyHeight; + } + + function close(data, immediate) { + if (!data.open) return; + data.open = false; + data.button.removeClass(buttonOpen); + var config = data.config; + if (config.animation == 'none' || !tram.support.transform) immediate = true; + var animation = config.animation; + ix.outro(0, data.el[0]); + + // Stop listening for tap outside events + $doc.off('tap' + namespace, data.outside); + + if (immediate) { + tram(data.menu).stop(); + complete(); + return; + } + + var transConfig = 'transform ' + config.duration + 'ms ' + config.easing2; + var menuHeight = data.menu.outerHeight(true); + var menuWidth = data.menu.outerWidth(true); + var navHeight = data.el.height(); + + // Over left/right + if (config.animOver) { + tram(data.menu) + .add(transConfig) + .start({ x: menuWidth * config.animDirect }).then(complete); + return; + } + + // Drop Down + var offsetY = navHeight + menuHeight; + tram(data.menu) + .add(transConfig) + .start({ y: -offsetY }).then(complete); + + function complete() { + data.menu.height(''); + tram(data.menu).set({ x: 0, y: 0 }); + data.menu.removeClass(menuOpen); + data.links.removeClass(linkOpen); + if (data.overlay && data.overlay.children().length) { + // Move menu back to parent + data.menu.appendTo(data.parent); + data.overlay.attr('style', '').hide(); + } + + // Trigger event so other components can hook in (dropdown) + data.el.triggerHandler('w-close'); + } + } + + // Export module + return api; +}); +/** + * ---------------------------------------------------------------------- + * Webflow: Dropdown component + */ +Webflow.define('dropdown', function($, _) { + 'use strict'; + + var api = {}; + var tram = window.tram; + var $doc = $(document); + var $dropdowns; + var designer; + var inApp = Webflow.env(); + var namespace = '.w-dropdown'; + var stateOpen = 'w--open'; + var closeEvent = 'w-close' + namespace; + var ix = Webflow.ixEvents(); + + // ----------------------------------- + // Module methods + + api.ready = api.design = api.preview = init; + + // ----------------------------------- + // Private methods + + function init() { + designer = inApp && Webflow.env('design'); + + // Find all instances on the page + $dropdowns = $doc.find(namespace); + $dropdowns.each(build); + } + + function build(i, el) { + var $el = $(el); + + // Store state in data + var data = $.data(el, namespace); + if (!data) data = $.data(el, namespace, { open: false, el: $el, config: {} }); + data.list = $el.children('.w-dropdown-list'); + data.toggle = $el.children('.w-dropdown-toggle'); + data.links = data.list.children('.w-dropdown-link'); + data.outside = outside(data); + data.complete = complete(data); + + // Remove old events + $el.off(namespace); + data.toggle.off(namespace); + + // Set config from data attributes + configure(data); + + if (data.nav) data.nav.off(namespace); + data.nav = $el.closest('.w-nav'); + data.nav.on(closeEvent, handler(data)); + + // Add events based on mode + if (designer) { + $el.on('setting' + namespace, handler(data)); + } else { + data.toggle.on('tap' + namespace, toggle(data)); + $el.on(closeEvent, handler(data)); + // Close in preview mode + inApp && close(data); + } + } + + function configure(data) { + data.config = { + hover: +data.el.attr('data-hover'), + delay: +data.el.attr('data-delay') || 0 + }; + } + + function handler(data) { + return function(evt, options) { + options = options || {}; + + if (evt.type == 'w-close') { + return close(data); + } + + if (evt.type == 'setting') { + configure(data); + options.open === true && open(data, true); + options.open === false && close(data, true); + return; + } + }; + } + + function toggle(data) { + return _.debounce(function(evt) { + data.open ? close(data) : open(data); + }); + } + + function open(data, immediate) { + if (data.open) return; + closeOthers(data); + data.open = true; + data.list.addClass(stateOpen); + data.toggle.addClass(stateOpen); + ix.intro(0, data.el[0]); + Webflow.redraw.up(); + + // Listen for tap outside events + if (!designer) $doc.on('tap' + namespace, data.outside); + + // Clear previous delay + window.clearTimeout(data.delayId); + } + + function close(data, immediate) { + if (!data.open) return; + data.open = false; + var config = data.config; + ix.outro(0, data.el[0]); + + // Stop listening for tap outside events + $doc.off('tap' + namespace, data.outside); + + // Clear previous delay + window.clearTimeout(data.delayId); + + // Skip delay during immediate + if (!config.delay || immediate) return data.complete(); + + // Optionally wait for delay before close + data.delayId = window.setTimeout(data.complete, config.delay); + } + + function closeOthers(data) { + var self = data.el[0]; + $dropdowns.each(function(i, other) { + var $other = $(other); + if ($other.is(self) || $other.has(self).length) return; + $other.triggerHandler(closeEvent); + }); + } + + function outside(data) { + // Unbind previous tap handler if it exists + if (data.outside) $doc.off('tap' + namespace, data.outside); + + // Close menu when tapped outside + return _.debounce(function(evt) { + if (!data.open) return; + var $target = $(evt.target); + if ($target.closest('.w-dropdown-toggle').length) return; + if (!data.el.is($target.closest(namespace))) { + close(data); + } + }); + } + + function complete(data) { + return function() { + data.list.removeClass(stateOpen); + data.toggle.removeClass(stateOpen); + }; + } + + // Export module + return api; +}); +/** + * ---------------------------------------------------------------------- + * Webflow: Tabs component + */ +Webflow.define('tabs', function($, _) { + 'use strict'; + + var api = {}; + var tram = window.tram; + var $win = $(window); + var $doc = $(document); + var $tabs; + var design; + var env = Webflow.env; + var safari = env.safari; + var inApp = env(); + var tabAttr = 'data-w-tab'; + var namespace = '.w-tabs'; + var linkCurrent = 'w--current'; + var tabActive = 'w--tab-active'; + var ix = Webflow.ixEvents(); + + // ----------------------------------- + // Module methods + + api.ready = api.design = api.preview = init; + + // ----------------------------------- + // Private methods + + function init() { + design = inApp && Webflow.env('design'); + + // Find all instances on the page + $tabs = $doc.find(namespace); + if (!$tabs.length) return; + $tabs.each(build); + } + + function build(i, el) { + var $el = $(el); + + // Store state in data + var data = $.data(el, namespace); + if (!data) data = $.data(el, namespace, { el: $el, config: {} }); + data.current = null; + data.menu = $el.children('.w-tab-menu'); + data.links = data.menu.children('.w-tab-link'); + data.content = $el.children('.w-tab-content'); + data.panes = data.content.children('.w-tab-pane'); + + // Remove old events + data.el.off(namespace); + data.links.off(namespace); + + // Set config from data attributes + configure(data); + + // Wire up events when not in design mode + if (!design) { + data.links.on('click' + namespace, linkSelect(data)); + + // Trigger first intro event from current tab + var $link = data.links.filter('.' + linkCurrent); + var tab = $link.attr(tabAttr); + tab && changeTab(data, { tab: tab, immediate: true }); + } + } + + function configure(data) { + var config = {}; + var old = data.config || {}; + + // Set config options from data attributes + config.easing = data.el.attr('data-easing') || 'ease'; + + var intro = +data.el.attr('data-duration-in'); + intro = config.intro = intro === intro ? intro : 0; + + var outro = +data.el.attr('data-duration-out'); + outro = config.outro = outro === outro ? outro : 0; + + config.immediate = !intro && !outro; + + // Store config in data + data.config = config; + } + + function linkSelect(data) { + return function(evt) { + var tab = evt.currentTarget.getAttribute(tabAttr); + tab && changeTab(data, { tab: tab }); + }; + } + + function changeTab(data, options) { + options = options || {}; + + var config = data.config; + var easing = config.easing; + var tab = options.tab; + + // Don't select the same tab twice + if (tab === data.current) return; + data.current = tab; + + // Select the current link + data.links.each(function(i, el) { + var $el = $(el); + if (el.getAttribute(tabAttr) === tab) $el.addClass(linkCurrent).each(ix.intro); + else if ($el.hasClass(linkCurrent)) $el.removeClass(linkCurrent).each(ix.outro); + }); + + // Find the new tab panes and keep track of previous + var targets = []; + var previous = []; + data.panes.each(function(i, el) { + var $el = $(el); + if (el.getAttribute(tabAttr) === tab) { + targets.push(el); + } else if ($el.hasClass(tabActive)) { + previous.push(el); + } + }); + + var $targets = $(targets); + var $previous = $(previous); + + // Switch tabs immediately and bypass transitions + if (options.immediate || config.immediate) { + $targets.addClass(tabActive).each(ix.intro); + $previous.removeClass(tabActive); + Webflow.redraw.up(); + return; + } + + // Fade out the currently active tab before intro + if ($previous.length && config.outro) { + $previous.each(ix.outro); + tram($previous) + .add('opacity ' + config.outro + 'ms ' + easing, { fallback: safari }) + .start({ opacity: 0 }) + .then(intro); + } else { + // Skip the outro and play intro + intro(); + } + + // Fade in the new target + function intro() { + // Clear previous active class + inline style + $previous.removeClass(tabActive).removeAttr('style'); + + // Add active class to new target + $targets.addClass(tabActive).each(ix.intro); + Webflow.redraw.up(); + + // Set opacity immediately if intro is zero + if (!config.intro) return tram($targets).set({ opacity: 1 }); + + // Otherwise fade in opacity + tram($targets) + .set({ opacity: 0 }) + .redraw() + .add('opacity ' + config.intro + 'ms ' + easing, { fallback: safari }) + .start({ opacity: 1 }); + } + } + + // Export module + return api; +}); +/** + * ---------------------------------------------------------------------- + * Webflow: Brand pages on the subdomain + */ +Webflow.define('branding', function($, _) { + 'use strict'; + + var api = {}; + var $html = $('html'); + var $body = $('body'); + var location = window.location; + var inApp = Webflow.env(); + + // ----------------------------------- + // Module methods + + api.ready = function() { + var doBranding = $html.attr("data-wf-status") && location.href.match(/webflow.com|webflowtest.com/); + + if (doBranding) { + var $branding = $('
'); + var $link = $(''); + $link.attr('href', 'http://webflow.com'); + + $branding.css({ + position: 'fixed', + bottom: 0, + right: 0, + borderTop: '5px solid #2b3239', + borderLeft: '5px solid #2b3239', + borderTopLeftRadius: '5px', + backgroundColor: '#2b3239', + padding: '5px 5px 5px 10px', + fontFamily: 'Arial', + fontSize: '10px', + textTransform: 'uppercase', + opacity: '0', + transition: 'opacity 0.50s ease-in-out' + }); + + $link.css({ + color: '#AAADB0', + textDecoration: 'none' + }); + + var $webflowLogo = $(''); + $webflowLogo.attr('src', 'https://daks2k3a4ib2z.cloudfront.net/54153e6a3d25f2755b1f14ed/5445a4b1944ecdaa4df86d3e_subdomain-brand.svg'); + $webflowLogo.css({ + opacity: 0.9, + width: '55px', + verticalAlign: 'middle', + paddingLeft: '4px', + paddingBottom: '3px' + }); + + $branding.text('Built with'); + $branding.append($webflowLogo); + $link.append($branding); + + $body.append($link); + + if (/PhantomJS/.test(window.navigator.userAgent)) { + return; + } + + $branding.css({ + opacity: '1.0' + }); + } + }; + + // Export module + return api; +}); +` \ No newline at end of file diff --git a/Log/Web/Assets/JSjQuery.go b/Log/Web/Assets/JSjQuery.go new file mode 100644 index 0000000..e648513 --- /dev/null +++ b/Log/Web/Assets/JSjQuery.go @@ -0,0 +1,8 @@ +package Assets + +var JSjQuery string = ` +/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c) +},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("