jumbo-jekyll-theme-test 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +26 -0
  4. data/_config.yml +122 -0
  5. data/_data/authors.yml +7 -0
  6. data/_data/footer.yml +55 -0
  7. data/_data/nav.yml +77 -0
  8. data/_data/news.yaml +230 -0
  9. data/_data/settings.yml +148 -0
  10. data/_data/sidebar-nav.yml +23 -0
  11. data/_data/sticky-tab-bar.yml +29 -0
  12. data/_includes/breadcrumb.html +97 -0
  13. data/_includes/css.html +9 -0
  14. data/_includes/custom.html +1 -0
  15. data/_includes/display-blog-posts.html +67 -0
  16. data/_includes/disqus-comments.html +14 -0
  17. data/_includes/footer.html +70 -0
  18. data/_includes/github-edit.html +73 -0
  19. data/_includes/google-analytics-script.html +9 -0
  20. data/_includes/gtm-noscript.html +5 -0
  21. data/_includes/gtm-script.html +7 -0
  22. data/_includes/head.html +44 -0
  23. data/_includes/hero-banner.html +21 -0
  24. data/_includes/image.html +6 -0
  25. data/_includes/javascript.html +9 -0
  26. data/_includes/jumbotron.html +87 -0
  27. data/_includes/linaro-404.html +13 -0
  28. data/_includes/linaro-svg.html +1 -0
  29. data/_includes/media.html +11 -0
  30. data/_includes/members.html +63 -0
  31. data/_includes/nav.html +132 -0
  32. data/_includes/newsletter-script.html +30 -0
  33. data/_includes/owl-carousel-homepage.html +103 -0
  34. data/_includes/pagination-authors.html +36 -0
  35. data/_includes/pagination-news.html +36 -0
  36. data/_includes/pagination.html +36 -0
  37. data/_includes/post-comments.html +9 -0
  38. data/_includes/post-sidebar.html +74 -0
  39. data/_includes/post-tags.html +9 -0
  40. data/_includes/schema.html +50 -0
  41. data/_includes/shape-divider.html +12 -0
  42. data/_includes/shape.html +52 -0
  43. data/_includes/sidebar.html +55 -0
  44. data/_includes/sticky-tab-bar.html +63 -0
  45. data/_includes/universal-nav.html +28 -0
  46. data/_includes/youtube.html +7 -0
  47. data/_layouts/container-breadcrumb-left-sidebar.html +10 -0
  48. data/_layouts/container-breadcrumb-right-sidebar.html +9 -0
  49. data/_layouts/container-breadcrumb-tabs.html +7 -0
  50. data/_layouts/container-breadcrumb.html +6 -0
  51. data/_layouts/container-left-sidebar.html +9 -0
  52. data/_layouts/container-right-sidebar.html +9 -0
  53. data/_layouts/container.html +9 -0
  54. data/_layouts/default.html +31 -0
  55. data/_layouts/full-width-breadcrumb.html +10 -0
  56. data/_layouts/full-width.html +9 -0
  57. data/_layouts/home.html +21 -0
  58. data/_layouts/post-index.html +19 -0
  59. data/_layouts/post-no-sidebar.html +0 -0
  60. data/_layouts/post-old.html +70 -0
  61. data/_layouts/post.html +240 -0
  62. data/_sass/_bootstrap-compass.scss +9 -0
  63. data/_sass/_bootstrap-mincer.scss +19 -0
  64. data/_sass/_bootstrap-sprockets.scss +9 -0
  65. data/_sass/_bootstrap.scss +56 -0
  66. data/_sass/app/blog.scss +58 -0
  67. data/_sass/app/contact.scss +3 -0
  68. data/_sass/app/custom.scss +1 -0
  69. data/_sass/app/home.scss +18 -0
  70. data/_sass/app/overrides.scss +36 -0
  71. data/_sass/app/search.scss +1 -0
  72. data/_sass/blog.scss +9 -0
  73. data/_sass/bootstrap/_alerts.scss +73 -0
  74. data/_sass/bootstrap/_badges.scss +68 -0
  75. data/_sass/bootstrap/_breadcrumbs.scss +28 -0
  76. data/_sass/bootstrap/_button-groups.scss +244 -0
  77. data/_sass/bootstrap/_buttons.scss +168 -0
  78. data/_sass/bootstrap/_carousel.scss +270 -0
  79. data/_sass/bootstrap/_close.scss +36 -0
  80. data/_sass/bootstrap/_code.scss +69 -0
  81. data/_sass/bootstrap/_component-animations.scss +37 -0
  82. data/_sass/bootstrap/_dropdowns.scss +216 -0
  83. data/_sass/bootstrap/_forms.scss +617 -0
  84. data/_sass/bootstrap/_glyphicons.scss +307 -0
  85. data/_sass/bootstrap/_grid.scss +84 -0
  86. data/_sass/bootstrap/_input-groups.scss +171 -0
  87. data/_sass/bootstrap/_jumbotron.scss +54 -0
  88. data/_sass/bootstrap/_labels.scss +66 -0
  89. data/_sass/bootstrap/_list-group.scss +130 -0
  90. data/_sass/bootstrap/_media.scss +66 -0
  91. data/_sass/bootstrap/_mixins.scss +40 -0
  92. data/_sass/bootstrap/_modals.scss +150 -0
  93. data/_sass/bootstrap/_navbar.scss +662 -0
  94. data/_sass/bootstrap/_navs.scss +242 -0
  95. data/_sass/bootstrap/_normalize.scss +424 -0
  96. data/_sass/bootstrap/_pager.scss +54 -0
  97. data/_sass/bootstrap/_pagination.scss +89 -0
  98. data/_sass/bootstrap/_panels.scss +271 -0
  99. data/_sass/bootstrap/_popovers.scss +131 -0
  100. data/_sass/bootstrap/_print.scss +101 -0
  101. data/_sass/bootstrap/_progress-bars.scss +87 -0
  102. data/_sass/bootstrap/_responsive-embed.scss +35 -0
  103. data/_sass/bootstrap/_responsive-utilities.scss +179 -0
  104. data/_sass/bootstrap/_scaffolding.scss +161 -0
  105. data/_sass/bootstrap/_tables.scss +234 -0
  106. data/_sass/bootstrap/_theme.scss +291 -0
  107. data/_sass/bootstrap/_thumbnails.scss +38 -0
  108. data/_sass/bootstrap/_tooltip.scss +101 -0
  109. data/_sass/bootstrap/_type.scss +298 -0
  110. data/_sass/bootstrap/_utilities.scss +55 -0
  111. data/_sass/bootstrap/_variables.scss +922 -0
  112. data/_sass/bootstrap/_wells.scss +29 -0
  113. data/_sass/bootstrap/mixins/_alerts.scss +14 -0
  114. data/_sass/bootstrap/mixins/_background-variant.scss +12 -0
  115. data/_sass/bootstrap/mixins/_border-radius.scss +18 -0
  116. data/_sass/bootstrap/mixins/_buttons.scss +65 -0
  117. data/_sass/bootstrap/mixins/_center-block.scss +7 -0
  118. data/_sass/bootstrap/mixins/_clearfix.scss +22 -0
  119. data/_sass/bootstrap/mixins/_forms.scss +88 -0
  120. data/_sass/bootstrap/mixins/_gradients.scss +58 -0
  121. data/_sass/bootstrap/mixins/_grid-framework.scss +81 -0
  122. data/_sass/bootstrap/mixins/_grid.scss +122 -0
  123. data/_sass/bootstrap/mixins/_hide-text.scss +21 -0
  124. data/_sass/bootstrap/mixins/_image.scss +33 -0
  125. data/_sass/bootstrap/mixins/_labels.scss +12 -0
  126. data/_sass/bootstrap/mixins/_list-group.scss +32 -0
  127. data/_sass/bootstrap/mixins/_nav-divider.scss +10 -0
  128. data/_sass/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  129. data/_sass/bootstrap/mixins/_opacity.scss +8 -0
  130. data/_sass/bootstrap/mixins/_pagination.scss +24 -0
  131. data/_sass/bootstrap/mixins/_panels.scss +24 -0
  132. data/_sass/bootstrap/mixins/_progress-bar.scss +10 -0
  133. data/_sass/bootstrap/mixins/_reset-filter.scss +8 -0
  134. data/_sass/bootstrap/mixins/_reset-text.scss +18 -0
  135. data/_sass/bootstrap/mixins/_resize.scss +6 -0
  136. data/_sass/bootstrap/mixins/_responsive-visibility.scss +21 -0
  137. data/_sass/bootstrap/mixins/_size.scss +10 -0
  138. data/_sass/bootstrap/mixins/_tab-focus.scss +9 -0
  139. data/_sass/bootstrap/mixins/_table-row.scss +28 -0
  140. data/_sass/bootstrap/mixins/_text-emphasis.scss +12 -0
  141. data/_sass/bootstrap/mixins/_text-overflow.scss +8 -0
  142. data/_sass/bootstrap/mixins/_vendor-prefixes.scss +222 -0
  143. data/_sass/core.scss +12 -0
  144. data/_sass/core/404.scss +189 -0
  145. data/_sass/core/animations.scss +125 -0
  146. data/_sass/core/blog.scss +441 -0
  147. data/_sass/core/breadcrumb.scss +97 -0
  148. data/_sass/core/carousel-styles.scss +3 -0
  149. data/_sass/core/carousel.scss +318 -0
  150. data/_sass/core/cookieconsent.scss +42 -0
  151. data/_sass/core/critical.scss +0 -0
  152. data/_sass/core/custom.scss +3 -0
  153. data/_sass/core/fa.scss +2336 -0
  154. data/_sass/core/flipclock.scss +434 -0
  155. data/_sass/core/font-awesome.min.scss +4 -0
  156. data/_sass/core/fonts.scss +3 -0
  157. data/_sass/core/footer.scss +169 -0
  158. data/_sass/core/forms.scss +3 -0
  159. data/_sass/core/homepage.scss +106 -0
  160. data/_sass/core/jumbotron.scss +51 -0
  161. data/_sass/core/lightbox.scss +212 -0
  162. data/_sass/core/nav.scss +971 -0
  163. data/_sass/core/owl.carousel.min.scss +6 -0
  164. data/_sass/core/owl.theme.default.min.scss +6 -0
  165. data/_sass/core/social-media-icons.scss +67 -0
  166. data/_sass/core/syntax.scss +65 -0
  167. data/_sass/core/tables.scss +145 -0
  168. data/_sass/core/theme.scss +630 -0
  169. data/_sass/core/twitter-feed.scss +414 -0
  170. data/_sass/core/universal-nav.scss +154 -0
  171. data/_sass/core/youtube.scss +65 -0
  172. data/_sass/home.scss +6 -0
  173. data/assets/css/main-404.scss +18 -0
  174. data/assets/css/main-blog.scss +19 -0
  175. data/assets/css/main-contact.scss +23 -0
  176. data/assets/css/main-home.scss +22 -0
  177. data/assets/css/main-lightbox.scss +29 -0
  178. data/assets/css/main-search.scss +13 -0
  179. data/assets/css/main.scss +12 -0
  180. data/assets/fonts/fontawesome-webfont.eot +0 -0
  181. data/assets/fonts/fontawesome-webfont.svg +2671 -0
  182. data/assets/fonts/fontawesome-webfont.ttf +0 -0
  183. data/assets/fonts/fontawesome-webfont.woff +0 -0
  184. data/assets/fonts/fontawesome-webfont.woff2 +0 -0
  185. data/assets/fonts/fontello.eot +0 -0
  186. data/assets/fonts/fontello.svg +44 -0
  187. data/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  188. data/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  189. data/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  190. data/assets/fonts/lato-regular/LICENSE.txt +93 -0
  191. data/assets/fonts/lato-regular/Lato-regular.eot +0 -0
  192. data/assets/fonts/lato-regular/Lato-regular.svg +435 -0
  193. data/assets/fonts/lato-regular/Lato-regular.ttf +0 -0
  194. data/assets/fonts/lato-regular/Lato-regular.woff +0 -0
  195. data/assets/fonts/lato-regular/Lato-regular.woff2 +0 -0
  196. data/assets/images/Linaro-Logo.svg +1 -0
  197. data/assets/images/Linaro-Logo_light.png +0 -0
  198. data/assets/images/Linaro-Logo_standard.svg +1 -0
  199. data/assets/images/Linaro-Sprinkle.png +0 -0
  200. data/assets/images/avatar-placeholder.png +0 -0
  201. data/assets/images/background-image.jpg +0 -0
  202. data/assets/images/banner.jpg +0 -0
  203. data/assets/images/breadcrumb-image.jpg +0 -0
  204. data/assets/images/close.png +0 -0
  205. data/assets/images/favicon.ico +0 -0
  206. data/assets/images/favicon.png +0 -0
  207. data/assets/images/loading.gif +0 -0
  208. data/assets/images/next.png +0 -0
  209. data/assets/images/owl.video.play.png +0 -0
  210. data/assets/images/placeholder.png +0 -0
  211. data/assets/images/prev.png +0 -0
  212. data/assets/images/social-media-image.png +0 -0
  213. data/assets/js/app/custom.js +0 -0
  214. data/assets/js/app/facebook.js +8 -0
  215. data/assets/js/app/home.js +46 -0
  216. data/assets/js/app/main.js +143 -0
  217. data/assets/js/app/scroll-to-anchors.js +10 -0
  218. data/assets/js/app/sticky-tab-bar.js +72 -0
  219. data/assets/js/app/tables.js +35 -0
  220. data/assets/js/package-blog.js +10 -0
  221. data/assets/js/package-extended.js +14 -0
  222. data/assets/js/package-home.js +12 -0
  223. data/assets/js/package-main.js +10 -0
  224. data/assets/js/package-search.js +8 -0
  225. data/assets/js/vendor/bootstrap.js +2377 -0
  226. data/assets/js/vendor/cognito.js +11 -0
  227. data/assets/js/vendor/cookieconsent.js +1504 -0
  228. data/assets/js/vendor/jquery.js +10364 -0
  229. data/assets/js/vendor/jquery.rss.js +333 -0
  230. data/assets/js/vendor/jquery.validate.js +1601 -0
  231. data/assets/js/vendor/lazysizes.js +698 -0
  232. data/assets/js/vendor/lightbox.js +523 -0
  233. data/assets/js/vendor/loadCSS.js +35 -0
  234. data/assets/js/vendor/ls.unveilhooks.js +145 -0
  235. data/assets/js/vendor/mc.js +255 -0
  236. data/assets/js/vendor/owl.carousel.js +3475 -0
  237. data/assets/js/vendor/picturefill.js +1471 -0
  238. data/assets/js/vendor/shuffle.js +2004 -0
  239. data/robots.txt +9 -0
  240. metadata +528 -0
@@ -0,0 +1,35 @@
1
+ /*! loadCSS: load a CSS file asynchronously. [c]2016 @scottjehl, Filament Group, Inc. Licensed MIT */
2
+ ! function(e) {
3
+ "use strict";
4
+ var n = function(n, t, o) {
5
+ function i(e) {
6
+ return a.body ? e() : void setTimeout(function() {
7
+ i(e)
8
+ })
9
+ }
10
+
11
+ function r() {
12
+ l.addEventListener && l.removeEventListener("load", r), l.media = o || "all"
13
+ }
14
+ var d, a = e.document,
15
+ l = a.createElement("link");
16
+ if (t) d = t;
17
+ else {
18
+ var s = (a.body || a.getElementsByTagName("head")[0]).childNodes;
19
+ d = s[s.length - 1]
20
+ }
21
+ var f = a.styleSheets;
22
+ l.rel = "stylesheet", l.href = n, l.media = "only x", i(function() {
23
+ d.parentNode.insertBefore(l, t ? d : d.nextSibling)
24
+ });
25
+ var u = function(e) {
26
+ for (var n = l.href, t = f.length; t--;)
27
+ if (f[t].href === n) return e();
28
+ setTimeout(function() {
29
+ u(e)
30
+ })
31
+ };
32
+ return l.addEventListener && l.addEventListener("load", r), l.onloadcssdefined = u, u(r), l
33
+ };
34
+ "undefined" != typeof exports ? exports.loadCSS = n : e.loadCSS = n
35
+ }("undefined" != typeof global ? global : this);
@@ -0,0 +1,145 @@
1
+ /*
2
+ This plugin extends lazySizes to lazyLoad:
3
+ background images, videos/posters and scripts
4
+
5
+ Background-Image:
6
+ For background images, use data-bg attribute:
7
+ <div class="lazyload" data-bg="bg-img.jpg"></div>
8
+
9
+ Video:
10
+ For video/audio use data-poster and preload="none":
11
+ <video class="lazyload" data-poster="poster.jpg" preload="none">
12
+ <!-- sources -->
13
+ </video>
14
+
15
+ Scripts:
16
+ For scripts use data-script:
17
+ <div class="lazyload" data-script="module-name.js"></div>
18
+
19
+
20
+ Script modules using require:
21
+ For modules using require use data-require:
22
+ <div class="lazyload" data-require="module-name"></div>
23
+ */
24
+
25
+ (function(window, factory) {
26
+ var globalInstall = function(){
27
+ factory(window.lazySizes);
28
+ window.removeEventListener('lazyunveilread', globalInstall, true);
29
+ };
30
+
31
+ factory = factory.bind(null, window, window.document);
32
+
33
+ if(typeof module == 'object' && module.exports){
34
+ factory(require('lazysizes'));
35
+ } else if(window.lazySizes) {
36
+ globalInstall();
37
+ } else {
38
+ window.addEventListener('lazyunveilread', globalInstall, true);
39
+ }
40
+ }(window, function(window, document, lazySizes) {
41
+ /*jshint eqnull:true */
42
+ 'use strict';
43
+ var bgLoad, regBgUrlEscape;
44
+ var uniqueUrls = {};
45
+
46
+ if(document.addEventListener){
47
+ regBgUrlEscape = /\(|\)|\s|'/;
48
+
49
+ bgLoad = function (url, cb){
50
+ var img = document.createElement('img');
51
+ img.onload = function(){
52
+ img.onload = null;
53
+ img.onerror = null;
54
+ img = null;
55
+ cb();
56
+ };
57
+ img.onerror = img.onload;
58
+
59
+ img.src = url;
60
+
61
+ if(img && img.complete && img.onload){
62
+ img.onload();
63
+ }
64
+ };
65
+
66
+ addEventListener('lazybeforeunveil', function(e){
67
+ if(e.detail.instance != lazySizes){return;}
68
+
69
+ var tmp, load, bg, poster;
70
+ if(!e.defaultPrevented) {
71
+
72
+ if(e.target.preload == 'none'){
73
+ e.target.preload = 'auto';
74
+ }
75
+
76
+ tmp = e.target.getAttribute('data-link');
77
+ if(tmp){
78
+ addStyleScript(tmp, true);
79
+ }
80
+
81
+ // handle data-script
82
+ tmp = e.target.getAttribute('data-script');
83
+ if(tmp){
84
+ addStyleScript(tmp);
85
+ }
86
+
87
+ // handle data-require
88
+ tmp = e.target.getAttribute('data-require');
89
+ if(tmp){
90
+ if(lazySizes.cfg.requireJs){
91
+ lazySizes.cfg.requireJs([tmp]);
92
+ } else {
93
+ addStyleScript(tmp);
94
+ }
95
+ }
96
+
97
+ // handle data-bg
98
+ bg = e.target.getAttribute('data-bg');
99
+ if (bg) {
100
+ e.detail.firesLoad = true;
101
+ load = function(){
102
+ e.target.style.backgroundImage = 'url(' + (regBgUrlEscape.test(bg) ? JSON.stringify(bg) : bg ) + ')';
103
+ e.detail.firesLoad = false;
104
+ lazySizes.fire(e.target, '_lazyloaded', {}, true, true);
105
+ };
106
+
107
+ bgLoad(bg, load);
108
+ }
109
+
110
+ // handle data-poster
111
+ poster = e.target.getAttribute('data-poster');
112
+ if(poster){
113
+ e.detail.firesLoad = true;
114
+ load = function(){
115
+ e.target.poster = poster;
116
+ e.detail.firesLoad = false;
117
+ lazySizes.fire(e.target, '_lazyloaded', {}, true, true);
118
+ };
119
+
120
+ bgLoad(poster, load);
121
+
122
+ }
123
+ }
124
+ }, false);
125
+
126
+ }
127
+
128
+ function addStyleScript(src, style){
129
+ if(uniqueUrls[src]){
130
+ return;
131
+ }
132
+ var elem = document.createElement(style ? 'link' : 'script');
133
+ var insertElem = document.getElementsByTagName('script')[0];
134
+
135
+ if(style){
136
+ elem.rel = 'stylesheet';
137
+ elem.href = src;
138
+ } else {
139
+ elem.src = src;
140
+ }
141
+ uniqueUrls[src] = true;
142
+ uniqueUrls[elem.src || elem.href] = true;
143
+ insertElem.parentNode.insertBefore(elem, insertElem);
144
+ }
145
+ }));
@@ -0,0 +1,255 @@
1
+ //>>built
2
+ (function(a,k){var f,n=function(){},c=function(b){for(var d in b)return 0;return 1},e={}.toString,h=function(b){return"[object Function]"==e.call(b)},g=function(b){return"[object String]"==e.call(b)},m=function(b){return"[object Array]"==e.call(b)},b=function(b,d){if(b)for(var a=0;a<b.length;)d(b[a++])},l=function(b,d){for(var a in d)b[a]=d[a];return b},q=function(b,d){return l(Error(b),{src:"dojoLoader",info:d})},d=1,y=function(){return"_"+d++},p=function(b,d,a){return Ma(b,d,a,0,p)},r=this,t=r.document,
3
+ x=t&&t.createElement("DiV"),v=p.has=function(b){return h(u[b])?u[b]=u[b](r,t,x):u[b]},u=v.cache=k.hasCache;v.add=function(b,d,a,l){(void 0===u[b]||l)&&(u[b]=d);return a&&v(b)};v.add("host-webworker","undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope);v("host-webworker")&&(l(k.hasCache,{"host-browser":0,dom:0,"dojo-dom-ready-api":0,"dojo-sniff":0,"dojo-inject-api":1,"host-webworker":1}),k.loaderPatch={injectUrl:function(b,d){try{importScripts(b),d()}catch(a){}}});for(var z in a.has)v.add(z,
4
+ a.has[z],0,1);var w=0,D=[],N=0,X=n,R=n,P;p.isXdUrl=n;p.initSyncLoader=function(b,d,a){N||(N=b,X=d,R=a);return{sync:"sync",requested:1,arrived:2,nonmodule:3,executing:4,executed:5,syncExecStack:D,modules:G,execQ:T,getModule:Y,injectModule:ra,setArrived:ga,signal:A,finishExec:ia,execModule:ja,dojoRequirePlugin:N,getLegacyMode:function(){return w},guardCheckComplete:ka}};var O=location.protocol,S=location.host;p.isXdUrl=function(b){return/^\./.test(b)?!1:/^\/\//.test(b)?!0:(b=b.match(/^([^\/\:]+\:)\/+([^\/]+)/))&&
5
+ (b[1]!=O||S&&b[2]!=S)};v.add("dojo-force-activex-xhr",!t.addEventListener&&"file:"==window.location.protocol);v.add("native-xhr","undefined"!=typeof XMLHttpRequest);if(v("native-xhr")&&!v("dojo-force-activex-xhr"))P=function(){return new XMLHttpRequest};else{var I=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],J;for(f=0;3>f;)try{if(J=I[f++],new ActiveXObject(J))break}catch(jb){}P=function(){return new ActiveXObject(J)}}p.getXhr=P;v.add("dojo-gettext-api",1);p.getText=function(b,d,a){var l=
6
+ P();l.open("GET",sa(b),!1);l.send(null);if(200==l.status||!location.host&&!l.status)a&&a(l.responseText,d);else throw q("xhrFailed",l.status);return l.responseText};var Q=new Function("return eval(arguments[0]);");p.eval=function(b,d){return Q(b+"\r\n//# sourceURL\x3d"+d)};var E={},A=p.signal=function(d,a){var l=E[d];b(l&&l.slice(0),function(b){b.apply(null,m(a)?a:[a])})},C=p.on=function(b,d){var a=E[b]||(E[b]=[]);a.push(d);return{remove:function(){for(var b=0;b<a.length;b++)if(a[b]===d){a.splice(b,
7
+ 1);break}}}},H=[],ea={},K=[],B={},L=p.map={},F=[],G={},V="",M={},aa={},W={},ba=0,ca=function(b){var d,a,l,q;for(d in aa)a=aa[d],(l=d.match(/^url\:(.+)/))?M["url:"+Na(l[1],b)]=a:"*now"==d?q=a:"*noref"!=d&&(l=la(d,b,!0),M[l.mid]=M["url:"+l.url]=a);q&&q(Ca(b));aa={}},Oa=function(b){return b.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(b){return"\\"+b})},Da=function(b,d){d.splice(0,d.length);for(var a in b)d.push([a,b[a],new RegExp("^"+Oa(a)+"(/|$)"),a.length]);d.sort(function(b,d){return d[3]-b[3]});
8
+ return d},ab=function(d,a){b(d,function(b){a.push([g(b[0])?new RegExp("^"+Oa(b[0])+"$"):b[0],b[1]])})},Pa=function(b){var d=b.name;d||(d=b,b={name:d});b=l({main:"main"},b);b.location=b.location?b.location:d;b.packageMap&&(L[d]=b.packageMap);b.main.indexOf("./")||(b.main=b.main.substring(2));B[d]=b},Qa=[],ma=function(d,a,q){for(var c in d){"waitSeconds"==c&&(p.waitms=1E3*(d[c]||0));"cacheBust"==c&&(V=d[c]?g(d[c])?d[c]:(new Date).getTime()+"":"");if("baseUrl"==c||"combo"==c)p[c]=d[c];if("async"==c){var e=
9
+ d[c];p.legacyMode=w=g(e)&&/sync|legacyAsync/.test(e)?e:e?!1:"sync";p.async=!w}d[c]!==u&&(p.rawConfig[c]=d[c],"has"!=c&&v.add("config-"+c,d[c],0,a))}p.baseUrl||(p.baseUrl="./");/\/$/.test(p.baseUrl)||(p.baseUrl+="/");for(c in d.has)v.add(c,d.has[c],0,a);b(d.packages,Pa);for(var h in d.packagePaths)b(d.packagePaths[h],function(b){var d=h+"/"+b;g(b)&&(b={name:b});b.location=d;Pa(b)});Da(l(L,d.map),F);b(F,function(b){b[1]=Da(b[1],[]);"*"==b[0]&&(F.star=b)});Da(l(ea,d.paths),K);ab(d.aliases,H);if(a)Qa.push({config:d.config});
10
+ else for(c in d.config)a=Y(c,q),a.config=l(a.config||{},d.config[c]);d.cache&&(ca(),aa=d.cache,d.cache["*noref"]&&ca());A("config",[d,p.rawConfig])};v("dojo-cdn");var ta=t.getElementsByTagName("script");f=0;for(var Z,fa,ua,na;f<ta.length;)if(Z=ta[f++],(ua=Z.getAttribute("src"))&&(na=ua.match(/(((.*)\/)|^)dojo\.js(\W|$)/i))&&(fa=na[3]||"",k.baseUrl=k.baseUrl||fa,ba=Z),ua=Z.getAttribute("data-dojo-config")||Z.getAttribute("djConfig"))W=p.eval("({ "+ua+" })","data-dojo-config"),ba=Z;p.rawConfig={};ma(k,
11
+ 1);v("dojo-cdn")&&((B.dojo.location=fa)&&(fa+="/"),B.dijit.location=fa+"../dijit/",B.dojox.location=fa+"../dojox/");ma(a,1);ma(W,1);var oa=function(d){ka(function(){b(d.deps,ra)})},Ma=function(b,d,a,c,e){var h;if(g(b)){if((h=Y(b,c,!0))&&h.executed)return h.result;throw q("undefinedModule",b);}m(b)||(ma(b,0,c),b=d,d=a);if(m(b))if(b.length){a="require*"+y();for(var f,r=[],N=0;N<b.length;)f=b[N++],r.push(Y(f,c));h=l(va("",a,0,""),{injected:2,deps:r,def:d||n,require:c?c.require:p,gc:1});G[h.mid]=h;oa(h);
12
+ var v=pa&&"sync"!=w;ka(function(){ja(h,v)});h.executed||T.push(h);ha()}else d&&d();return e},Ca=function(b){if(!b)return p;var d=b.require;d||(d=function(a,l,q){return Ma(a,l,q,b,d)},b.require=l(d,p),d.module=b,d.toUrl=function(d){return Na(d,b)},d.toAbsMid=function(d){return Ea(d,b)},d.syncLoadNls=function(d){d=la(d,b);var a=G[d.mid];if(!a||!a.executed)if(da=M[d.mid]||M["url:"+d.url])wa(da),a=G[d.mid];return a&&a.executed&&a.result});return d},T=[],xa=[],U={},bb=function(b){b.injected=1;U[b.mid]=
13
+ 1;b.url&&(U[b.url]=b.pack||1);Ra()},ga=function(b){b.injected=2;delete U[b.mid];b.url&&delete U[b.url];c(U)&&(ya(),"xd"==w&&(w="sync"))},cb=p.idle=function(){return!xa.length&&c(U)&&!T.length&&!pa},Fa=function(b,d){if(d)for(var a=0;a<d.length;a++)if(d[a][2].test(b))return d[a];return 0},Sa=function(b){var d=[],a,l;for(b=b.replace(/\\/g,"/").split("/");b.length;)a=b.shift(),".."==a&&d.length&&".."!=l?(d.pop(),l=d[d.length-1]):"."!=a&&d.push(l=a);return d.join("/")},va=function(b,d,a,l){var q=p.isXdUrl(l);
14
+ return{pid:b,mid:d,pack:a,url:l,executed:0,def:0,isXd:q,isAmd:!!(q||B[b]&&B[b].isAmd)}},Ta=function(d,a,l,c,e,g,f,m,y){var r,N,p,k;k=/^\./.test(d);if(/(^\/)|(\:)|(\.js$)/.test(d)||k&&!a)return va(0,d,0,d);d=Sa(k?a.mid+"/../"+d:d);if(/^\./.test(d))throw q("irrationalPath",d);a&&(p=Fa(a.mid,g));(p=(p=p||g.star)&&Fa(d,p[1]))&&(d=p[1]+d.substring(p[3]));a=(na=d.match(/^([^\/]+)(\/(.+))?$/))?na[1]:"";(r=l[a])?d=a+"/"+(N=na[3]||r.main):a="";var n=0;b(m,function(b){var a=d.match(b[0]);a&&0<a.length&&(n=
15
+ h(b[1])?d.replace(b[0],b[1]):b[1])});if(n)return Ta(n,0,l,c,e,g,f,m,y);if(l=c[d])return y?va(l.pid,l.mid,l.pack,l.url):c[d];c=(p=Fa(d,f))?p[1]+d.substring(p[3]):a?r.location+"/"+N:v("config-tlmSiblingOfDojo")?"../"+d:d;/(^\/)|(\:)/.test(c)||(c=e+c);return va(a,d,r,Sa(c+".js"))},la=function(b,d,a){return Ta(b,d,B,G,p.baseUrl,a?[]:F,a?[]:K,a?[]:H)},Ua=function(b,d,a){return b.normalize?b.normalize(d,function(b){return Ea(b,a)}):Ea(d,a)},Va=0,Y=function(b,d,a){var l,q;(l=b.match(/^(.+?)\!(.*)$/))?(q=
16
+ Y(l[1],d,a),"sync"!=w||q.executed||(ra(q),2!==q.injected||q.executed||ka(function(){ja(q)}),q.executed?za(q):T.unshift(q)),5!==q.executed||q.load||za(q),q.load?(l=Ua(q,l[2],d),b=q.mid+"!"+(q.dynamic?++Va+"!":"")+l):(l=l[2],b=q.mid+"!"+ ++Va+"!waitingForPlugin"),b={plugin:q,mid:b,req:Ca(d),prid:l}):b=la(b,d);return G[b.mid]||!a&&(G[b.mid]=b)},Ea=p.toAbsMid=function(b,d){return la(b,d).mid},Na=p.toUrl=function(b,d){var a=la(b+"/x",d),l=a.url;return sa(0===a.pid?b:l.substring(0,l.length-5))},Wa={injected:2,
17
+ executed:5,def:3,result:3},Ga=function(b){return G[b]=l({mid:b},Wa)},db=Ga("require"),eb=Ga("exports"),fb=Ga("module"),Aa={},Ha=0,za=function(b){var d=b.result;b.dynamic=d.dynamic;b.normalize=d.normalize;b.load=d.load;return b},gb=function(d){var a={};b(d.loadQ,function(b){var q=Ua(d,b.prid,b.req.module),c=d.dynamic?b.mid.replace(/waitingForPlugin$/,q):d.mid+"!"+q,q=l(l({},b),{mid:c,prid:q,injected:0});G[c]||Xa(G[c]=q);a[b.mid]=G[c];ga(b);delete G[b.mid]});d.loadQ=0;var q=function(b){for(var d=b.deps||
18
+ [],l=0;l<d.length;l++)(b=a[d[l].mid])&&(d[l]=b)},c;for(c in G)q(G[c]);b(T,q)},ia=function(d){p.trace("loader-finish-exec",[d.mid]);d.executed=5;d.defOrder=Ha++;b(d.provides,function(b){b()});d.loadQ&&(za(d),gb(d));for(f=0;f<T.length;)T[f]===d?T.splice(f,1):f++;/^require\*/.test(d.mid)&&delete G[d.mid]},hb=[],ja=function(b,d){if(4===b.executed)return p.trace("loader-circular-dependency",[hb.concat(b.mid).join("-\x3e")]),!b.def||d?Aa:b.cjs&&b.cjs.exports;if(!b.executed){if(!b.def)return Aa;var a=b.mid,
19
+ l=b.deps||[],c,e=[],g=0;for(b.executed=4;c=l[g++];){c=c===db?Ca(b):c===eb?b.cjs.exports:c===fb?b.cjs:ja(c,d);if(c===Aa)return b.executed=0,p.trace("loader-exec-module",["abort",a]),Aa;e.push(c)}p.trace("loader-run-factory",[b.mid]);var a=b.def,f;D.unshift(b);if(v("config-dojo-loader-catches"))try{f=h(a)?a.apply(null,e):a}catch(m){A("error",b.result=q("factoryThrew",[b,m]))}else f=h(a)?a.apply(null,e):a;b.result=void 0===f&&b.cjs?b.cjs.exports:f;D.shift(b);ia(b)}return b.result},pa=0,ka=function(b){try{pa++,
20
+ b()}catch(d){}finally{pa--}cb()&&A("idle",[])},ha=function(){pa||ka(function(){X();for(var b,d,a=0;a<T.length;)b=Ha,d=T[a],ja(d),b!=Ha?(X(),a=0):a++})};void 0===v("dojo-loader-eval-hint-url")&&v.add("dojo-loader-eval-hint-url",1);var sa="function"==typeof a.fixupUrl?a.fixupUrl:function(b){b+="";return b+(V?(/\?/.test(b)?"\x26":"?")+V:"")},Xa=function(b){var d=b.plugin;5!==d.executed||d.load||za(d);var a=function(d){b.result=d;ga(b);ia(b);ha()};d.load?d.load(b.prid,b.req,a):d.loadQ?d.loadQ.push(b):
21
+ (d.loadQ=[b],T.unshift(d),ra(d))},da=0,qa=0,Ia=0,wa=function(b,d){v("config-stripStrict")&&(b=b.replace(/"use strict"/g,""));Ia=1;if(v("config-dojo-loader-catches"))try{b===da?da.call(null):p.eval(b,v("dojo-loader-eval-hint-url")?d.url:d.mid)}catch(a){A("error",q("evalModuleThrew",d))}else b===da?da.call(null):p.eval(b,v("dojo-loader-eval-hint-url")?d.url:d.mid);Ia=0},ra=function(d){var a=d.mid,c=d.url;if(!(d.executed||d.injected||U[a]||d.url&&(d.pack&&U[d.url]===d.pack||1==U[d.url])))if(bb(d),d.plugin)Xa(d);
22
+ else{var e=function(){Ya(d);if(2!==d.injected){if(v("dojo-enforceDefine")){A("error",q("noDefine",d));return}ga(d);l(d,Wa);p.trace("loader-define-nonmodule",[d.url])}w?!D.length&&ha():ha()};if(da=M[a]||M["url:"+d.url])p.trace("loader-inject",["cache",d.mid,c]),wa(da,d),e();else{if(w)if(d.isXd)"sync"==w&&(w="xd");else if(!d.isAmd||"sync"==w){var g=function(l){if("sync"==w){D.unshift(d);wa(l,d);D.shift();Ya(d);d.cjs||(ga(d),ia(d));if(d.finish){l=a+"*finish";var q=d.finish;delete d.finish;Ja(l,["dojo",
23
+ ("dojo/require!"+q.join(",")).replace(/\./g,"/")],function(d){b(q,function(b){d.require(b)})});T.unshift(Y(l))}e()}else(l=R(d,l))?(wa(l,d),e()):(qa=d,p.injectUrl(sa(c),e,d),qa=0)};p.trace("loader-inject",["xhr",d.mid,c,"sync"!=w]);if(v("config-dojo-loader-catches"))try{p.getText(c,"sync"!=w,g)}catch(h){A("error",q("xhrInjectFailed",[d,h]))}else p.getText(c,"sync"!=w,g);return}p.trace("loader-inject",["script",d.mid,c]);qa=d;p.injectUrl(sa(c),e,d);qa=0}}},Ka=function(b,d,a){p.trace("loader-define-module",
24
+ [b.mid,d]);var c=b.mid;if(2===b.injected)return A("error",q("multipleDefine",b)),b;l(b,{deps:d,def:a,cjs:{id:b.mid,uri:b.url,exports:b.result={},setExports:function(d){b.cjs.exports=d},config:function(){return b.config}}});for(var e=0;d[e];e++)d[e]=Y(d[e],b);w&&!U[c]&&(oa(b),T.push(b),ha());ga(b);h(a)||d.length||(b.result=a,ia(b));return b},Ya=function(d,a){for(var l=[],q,c;xa.length;)c=xa.shift(),a&&(c[0]=a.shift()),q=c[0]&&Y(c[0])||d,l.push([q,c[1],c[2]]);ca(d);b(l,function(b){oa(Ka.apply(null,
25
+ b))})},Ba=0,ya=n,Ra=n,ya=function(){Ba&&clearTimeout(Ba);Ba=0},Ra=function(){ya();p.waitms&&(Ba=r.setTimeout(function(){ya();A("error",q("timeout",U))},p.waitms))};v.add("ie-event-behavior",t.attachEvent&&"undefined"===typeof Windows&&("undefined"===typeof opera||"[object Opera]"!=opera.toString()));var La=function(b,d,a,l){if(v("ie-event-behavior"))return b.attachEvent(a,l),function(){b.detachEvent(a,l)};b.addEventListener(d,l,!1);return function(){b.removeEventListener(d,l,!1)}},ib=La(window,"load",
26
+ "onload",function(){p.pageLoaded=1;"complete"!=t.readyState&&(t.readyState="complete");ib()}),ta=t.getElementsByTagName("script");for(f=0;!ba;)/^dojo/.test((Z=ta[f++])&&Z.type)||(ba=Z);p.injectUrl=function(b,d,a){a=a.node=t.createElement("script");var l=La(a,"load","onreadystatechange",function(b){b=b||window.event;var a=b.target||b.srcElement;if("load"===b.type||/complete|loaded/.test(a.readyState))l(),c(),d&&d()}),c=La(a,"error","onerror",function(d){l();c();A("error",q("scriptError",[b,d]))});
27
+ a.type="text/javascript";a.charset="utf-8";a.src=b;ba.parentNode.insertBefore(a,ba);return a};p.log=function(){try{for(var b=0;b<arguments.length;b++);}catch(d){}};p.trace=n;var Ja=function(b,d,a){var l=arguments.length,c=["require","exports","module"],e=[0,b,d];1==l?e=[0,h(b)?c:[],b]:2==l&&g(b)?e=[b,h(d)?c:[],d]:3==l&&(e=[b,d,a]);p.trace("loader-define",e.slice(0,2));if((l=e[0]&&Y(e[0]))&&!U[l.mid])oa(Ka(l,e[1],e[2]));else if(!v("ie-event-behavior")||Ia)xa.push(e);else{l=l||qa;if(!l)for(b in U)if((c=
28
+ G[b])&&c.node&&"interactive"===c.node.readyState){l=c;break}l?(ca(l),oa(Ka(l,e[1],e[2]))):A("error",q("ieDefineFailed",e[0]));ha()}};Ja.amd={vendor:"dojotoolkit.org"};l(l(p,k.loaderPatch),a.loaderPatch);C("error",function(b){try{if(b instanceof Error)for(var d in b);}catch(a){}});l(p,{uid:y,cache:M,packs:B});if(r.define)A("error",q("defineAlreadyDefined",0));else{r.define=Ja;r.require=p;b(Qa,function(b){ma(b)});var Za=W.deps||a.deps||k.deps,$a=W.callback||a.callback||k.callback;p.boot=Za||$a?[Za||
29
+ [],$a]:0}})(this.dojoConfig||this.djConfig||this.require||{},{async:0,hasCache:{"config-selectorEngine":"acme","config-tlmSiblingOfDojo":1,"dojo-built":1,"dojo-loader":1,dom:1,"host-browser":1},packages:[{location:".",name:"dojo"},{location:"../dijit",name:"dijit"},{location:"../dojox",name:"dojox"},{location:"../mojo",name:"mojo"}]});
30
+ require({cache:{"dojo/main":function(){define("./_base/kernel ./has require ./sniff ./_base/lang ./_base/array ./_base/config ./ready ./_base/declare ./_base/connect ./_base/Deferred ./_base/json ./_base/Color ./has!dojo-firebug?./_firebug/firebug ./_base/browser ./_base/loader".split(" "),function(a,k,f,n,c,e,h,g){h.isDebug&&f(["./_firebug/firebug"]);var m=h.require;m&&(m=e.map(c.isArray(m)?m:[m],function(b){return b.replace(/\./g,"/")}),a.isAsync?f(m):g(1,function(){f(m)}));return a})},"dojo/_base/kernel":function(){define(["../has",
31
+ "./config","require","module"],function(a,k,f,n){var c,e;c=function(){return this}();var h={},g={},m={config:k,global:c,dijit:h,dojox:g},h={dojo:["dojo",m],dijit:["dijit",h],dojox:["dojox",g]};n=f.map&&f.map[n.id.match(/[^\/]+/)[0]];for(e in n)h[e]?h[e][0]=n[e]:h[e]=[n[e],{}];for(e in h)n=h[e],n[1]._scopeName=n[0],k.noGlobals||(c[n[0]]=n[1]);m.scopeMap=h;m.baseUrl=m.config.baseUrl=f.baseUrl;m.isAsync=f.async;m.locale=k.locale;c="$Rev: f4fef70 $".match(/[0-9a-f]{7,}/);m.version={major:1,minor:10,patch:4,
32
+ flag:"",revision:c?c[0]:NaN,toString:function(){var b=m.version;return b.major+"."+b.minor+"."+b.patch+b.flag+" ("+b.revision+")"}};Function("d","d.eval \x3d function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}")(m);m.exit=function(){};"undefined"!=typeof console||(console={});n="assert count debug dir dirxml error group groupEnd info profile profileEnd time timeEnd trace warn log".split(" ");var b;for(c=0;b=n[c++];)console[b]||function(){var a=b+"";console[a]="log"in
33
+ console?function(){var b=Array.prototype.slice.call(arguments);b.unshift(a+":");console.log(b.join(" "))}:function(){};console[a]._fake=!0}();a.add("dojo-debug-messages",!!k.isDebug);m.deprecated=m.experimental=function(){};a("dojo-debug-messages")&&(m.deprecated=function(b,a,d){},m.experimental=function(b,a){});if(k.modulePaths){m.deprecated("dojo.modulePaths","use paths configuration");a={};for(e in k.modulePaths)a[e.replace(/\./g,"/")]=k.modulePaths[e];f({paths:a})}m.moduleUrl=function(b,a){m.deprecated("dojo.moduleUrl()",
34
+ "use require.toUrl","2.0");var d=null;b&&(d=f.toUrl(b.replace(/\./g,"/")+(a?"/"+a:"")+"/*.*").replace(/\/\*\.\*/,"")+(a?"":"/"));return d};m._hasResource={};return m})},"dojo/has":function(){define(["require","module"],function(a,k){var f=a.has||function(){};f.add("dom-addeventlistener",!!document.addEventListener);f.add("touch","ontouchstart"in document||"onpointerdown"in document&&0<navigator.maxTouchPoints||window.navigator.msMaxTouchPoints);f.add("touch-events","ontouchstart"in document);f.add("pointer-events",
35
+ "pointerEnabled"in window.navigator?window.navigator.pointerEnabled:"PointerEvent"in window);f.add("MSPointer",window.navigator.msPointerEnabled);f.add("device-width",screen.availWidth||innerWidth);var n=document.createElement("form");f.add("dom-attributes-explicit",0==n.attributes.length);f.add("dom-attributes-specified-flag",0<n.attributes.length&&40>n.attributes.length);f.clearElement=function(a){a.innerHTML="";return a};f.normalize=function(a,e){var h=a.match(/[\?:]|[^:\?]*/g),g=0,m=function(b){var a=
36
+ h[g++];if(":"==a)return 0;if("?"==h[g++]){if(!b&&f(a))return m();m(!0);return m(b)}return a||0};return(a=m())&&e(a)};f.load=function(a,e,h){a?e([a],h):h()};return f})},"dojo/_base/config":function(){define(["../has","require"],function(a,k){var f={},n=k.rawConfig,c;for(c in n)f[c]=n[c];!f.locale&&"undefined"!=typeof navigator&&(n=navigator.language||navigator.userLanguage)&&(f.locale=n.toLowerCase());return f})},"dojo/sniff":function(){define(["./has"],function(a){var k=navigator,f=k.userAgent,k=
37
+ k.appVersion,n=parseFloat(k);a.add("air",0<=f.indexOf("AdobeAIR"));a.add("msapp",parseFloat(f.split("MSAppHost/")[1])||void 0);a.add("khtml",0<=k.indexOf("Konqueror")?n:void 0);a.add("webkit",parseFloat(f.split("WebKit/")[1])||void 0);a.add("chrome",parseFloat(f.split("Chrome/")[1])||void 0);a.add("safari",0<=k.indexOf("Safari")&&!a("chrome")?parseFloat(k.split("Version/")[1]):void 0);a.add("mac",0<=k.indexOf("Macintosh"));a.add("quirks","BackCompat"==document.compatMode);if(f.match(/(iPhone|iPod|iPad)/)){var c=
38
+ RegExp.$1.replace(/P/,"p"),e=f.match(/OS ([\d_]+)/)?RegExp.$1:"1",e=parseFloat(e.replace(/_/,".").replace(/_/g,""));a.add(c,e);a.add("ios",e)}a.add("android",parseFloat(f.split("Android ")[1])||void 0);a.add("bb",(0<=f.indexOf("BlackBerry")||0<=f.indexOf("BB10"))&&parseFloat(f.split("Version/")[1])||void 0);a.add("trident",parseFloat(k.split("Trident/")[1])||void 0);a.add("svg","undefined"!==typeof SVGAngle);a("webkit")||(0<=f.indexOf("Opera")&&a.add("opera",9.8<=n?parseFloat(f.split("Version/")[1])||
39
+ n:n),0<=f.indexOf("Gecko")&&!a("khtml")&&!a("webkit")&&!a("trident")&&a.add("mozilla",n),a("mozilla")&&a.add("ff",parseFloat(f.split("Firefox/")[1]||f.split("Minefield/")[1])||void 0),document.all&&!a("opera")&&(f=parseFloat(k.split("MSIE ")[1])||void 0,(k=document.documentMode)&&5!=k&&Math.floor(f)!=k&&(f=k),a.add("ie",f)),a.add("wii","undefined"!=typeof opera&&opera.wiiremote));return a})},"dojo/_base/lang":function(){define(["./kernel","../has","../sniff"],function(a,k){k.add("bug-for-in-skips-shadowed",
40
+ function(){for(var b in{toString:1})return 0;return 1});var f=k("bug-for-in-skips-shadowed")?"hasOwnProperty valueOf isPrototypeOf propertyIsEnumerable toLocaleString toString constructor".split(" "):[],n=f.length,c=function(b,l,q){q||(q=b[0]&&a.scopeMap[b[0]]?a.scopeMap[b.shift()][1]:a.global);try{for(var d=0;d<b.length;d++){var c=b[d];if(!(c in q))if(l)q[c]={};else return;q=q[c]}return q}catch(e){}},e=Object.prototype.toString,h=function(b,a,q){return(q||[]).concat(Array.prototype.slice.call(b,
41
+ a||0))},g=/\{([^\}]+)\}/g,m={_extraNames:f,_mixin:function(b,a,q){var d,c,e,g={};for(d in a)c=a[d],d in b&&(b[d]===c||d in g&&g[d]===c)||(b[d]=q?q(c):c);if(k("bug-for-in-skips-shadowed")&&a)for(e=0;e<n;++e)d=f[e],c=a[d],d in b&&(b[d]===c||d in g&&g[d]===c)||(b[d]=q?q(c):c);return b},mixin:function(b,a){b||(b={});for(var c=1,d=arguments.length;c<d;c++)m._mixin(b,arguments[c]);return b},setObject:function(b,a,q){var d=b.split(".");b=d.pop();return(q=c(d,!0,q))&&b?q[b]=a:void 0},getObject:function(b,
42
+ a,q){return c(b?b.split("."):[],a,q)},exists:function(b,a){return void 0!==m.getObject(b,!1,a)},isString:function(b){return"string"==typeof b||b instanceof String},isArray:function(b){return b&&(b instanceof Array||"array"==typeof b)},isFunction:function(b){return"[object Function]"===e.call(b)},isObject:function(b){return void 0!==b&&(null===b||"object"==typeof b||m.isArray(b)||m.isFunction(b))},isArrayLike:function(b){return b&&void 0!==b&&!m.isString(b)&&!m.isFunction(b)&&!(b.tagName&&"form"==
43
+ b.tagName.toLowerCase())&&(m.isArray(b)||isFinite(b.length))},isAlien:function(b){return b&&!m.isFunction(b)&&/\{\s*\[native code\]\s*\}/.test(String(b))},extend:function(b,a){for(var c=1,d=arguments.length;c<d;c++)m._mixin(b.prototype,arguments[c]);return b},_hitchArgs:function(b,l){var c=m._toArray(arguments,2),d=m.isString(l);return function(){var e=m._toArray(arguments),g=d?(b||a.global)[l]:l;return g&&g.apply(b||this,c.concat(e))}},hitch:function(b,l){if(2<arguments.length)return m._hitchArgs.apply(a,
44
+ arguments);l||(l=b,b=null);if(m.isString(l)){b=b||a.global;if(!b[l])throw['lang.hitch: scope["',l,'"] is null (scope\x3d"',b,'")'].join("");return function(){return b[l].apply(b,arguments||[])}}return b?function(){return l.apply(b,arguments||[])}:l},delegate:function(){function b(){}return function(a,c){b.prototype=a;var d=new b;b.prototype=null;c&&m._mixin(d,c);return d}}(),_toArray:k("ie")?function(){function b(b,a,d){d=d||[];for(a=a||0;a<b.length;a++)d.push(b[a]);return d}return function(a){return(a.item?
45
+ b:h).apply(this,arguments)}}():h,partial:function(b){return m.hitch.apply(a,[null].concat(m._toArray(arguments)))},clone:function(b){if(!b||"object"!=typeof b||m.isFunction(b))return b;if(b.nodeType&&"cloneNode"in b)return b.cloneNode(!0);if(b instanceof Date)return new Date(b.getTime());if(b instanceof RegExp)return new RegExp(b);var a,c,d;if(m.isArray(b))for(a=[],c=0,d=b.length;c<d;++c)c in b&&a.push(m.clone(b[c]));else a=b.constructor?new b.constructor:{};return m._mixin(a,b,m.clone)},trim:String.prototype.trim?
46
+ function(b){return b.trim()}:function(b){return b.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},replace:function(b,a,c){return b.replace(c||g,m.isFunction(a)?a:function(b,c){return m.getObject(c,!1,a)})}};m.mixin(a,m);return m})},"dojo/_base/array":function(){define(["./kernel","../has","./lang"],function(a,k,f){function n(b){return h[b]=new Function("item","index","array",b)}function c(b){var a=!b;return function(c,d,e){var g=0,f=c&&c.length||0,m;f&&"string"==typeof c&&(c=c.split(""));"string"==typeof d&&
47
+ (d=h[d]||n(d));if(e)for(;g<f;++g){if(m=!d.call(e,c[g],g,c),b^m)return!m}else for(;g<f;++g)if(m=!d(c[g],g,c),b^m)return!m;return a}}function e(b){var a=1,c=0,d=0;b||(a=c=d=-1);return function(e,h,f,k){if(k&&0<a)return m.lastIndexOf(e,h,f);k=e&&e.length||0;var n=b?k+d:c;f===g?f=b?c:k+d:0>f?(f=k+f,0>f&&(f=c)):f=f>=k?k+d:f;for(k&&"string"==typeof e&&(e=e.split(""));f!=n;f+=a)if(e[f]==h)return f;return-1}}var h={},g,m={every:c(!1),some:c(!0),indexOf:e(!0),lastIndexOf:e(!1),forEach:function(b,a,c){var d=
48
+ 0,e=b&&b.length||0;e&&"string"==typeof b&&(b=b.split(""));"string"==typeof a&&(a=h[a]||n(a));if(c)for(;d<e;++d)a.call(c,b[d],d,b);else for(;d<e;++d)a(b[d],d,b)},map:function(b,a,c,d){var e=0,g=b&&b.length||0;d=new (d||Array)(g);g&&"string"==typeof b&&(b=b.split(""));"string"==typeof a&&(a=h[a]||n(a));if(c)for(;e<g;++e)d[e]=a.call(c,b[e],e,b);else for(;e<g;++e)d[e]=a(b[e],e,b);return d},filter:function(b,a,c){var d=0,e=b&&b.length||0,g=[],f;e&&"string"==typeof b&&(b=b.split(""));"string"==typeof a&&
49
+ (a=h[a]||n(a));if(c)for(;d<e;++d)f=b[d],a.call(c,f,d,b)&&g.push(f);else for(;d<e;++d)f=b[d],a(f,d,b)&&g.push(f);return g},clearCache:function(){h={}}};f.mixin(a,m);return m})},"dojo/ready":function(){define(["./_base/kernel","./has","require","./domReady","./_base/lang"],function(a,k,f,n,c){var e=0,h=[],g=0;k=function(){e=1;a._postLoad=a.config.afterOnLoad=!0;m()};var m=function(){if(!g){for(g=1;e&&(!n||0==n._Q.length)&&(f.idle?f.idle():1)&&h.length;){var b=h.shift();try{b()}catch(d){if(d.info=d.message,
50
+ f.signal)f.signal("error",d);else throw d;}}g=0}};f.on&&f.on("idle",m);n&&(n._onQEmpty=m);var b=a.ready=a.addOnLoad=function(b,d,e){var l=c._toArray(arguments);"number"!=typeof b?(e=d,d=b,b=1E3):l.shift();e=e?c.hitch.apply(a,l):function(){d()};e.priority=b;for(l=0;l<h.length&&b>=h[l].priority;l++);h.splice(l,0,e);m()},l=a.config.addOnLoad;if(l)b[c.isArray(l)?"apply":"call"](a,l);a.config.parseOnLoad&&!a.isAsync&&b(99,function(){a.parser||(a.deprecated("Add explicit require(['dojo/parser']);","","2.0"),
51
+ f(["dojo/parser"]))});n?n(k):k();return b})},"dojo/domReady":function(){define(["./has"],function(a){function k(b){m.push(b);g&&f()}function f(){if(!b){for(b=!0;m.length;)try{m.shift()(c)}catch(d){}b=!1;k._onQEmpty()}}var n=function(){return this}(),c=document,e={loaded:1,complete:1},h="string"!=typeof c.readyState,g=!!e[c.readyState],m=[],b;k.load=function(b,d,a){k(a)};k._Q=m;k._onQEmpty=function(){};h&&(c.readyState="loading");if(!g){var l=[],q=function(b){b=b||n.event;g||"readystatechange"==b.type&&
52
+ !e[c.readyState]||(h&&(c.readyState="complete"),g=1,f())},d=function(b,d){b.addEventListener(d,q,!1);m.push(function(){b.removeEventListener(d,q,!1)})};if(!a("dom-addeventlistener")){var d=function(b,d){d="on"+d;b.attachEvent(d,q);m.push(function(){b.detachEvent(d,q)})},y=c.createElement("div");try{y.doScroll&&null===n.frameElement&&l.push(function(){try{return y.doScroll("left"),1}catch(b){}})}catch(r){}}d(c,"DOMContentLoaded");d(n,"load");"onreadystatechange"in c?d(c,"readystatechange"):h||l.push(function(){return e[c.readyState]});
53
+ if(l.length){var p=function(){if(!g){for(var b=l.length;b--;)if(l[b]()){q("poller");return}setTimeout(p,30)}};p()}}return k})},"dojo/_base/declare":function(){define(["./kernel","../has","./lang"],function(a,k,f){function n(b,d){throw Error("declare"+(d?" "+d:"")+": "+b);}function c(b,d,a){var c,e,l,g,q,f,h,m=this._inherited=this._inherited||{};"string"==typeof b&&(c=b,b=d,d=a);a=0;g=b.callee;(c=c||g.nom)||n("can't deduce a name to call inherited()",this.declaredClass);q=this.constructor._meta;l=
54
+ q.bases;h=m.p;if("constructor"!=c){if(m.c!==g&&(h=0,f=l[0],q=f._meta,q.hidden[c]!==g)){(e=q.chains)&&"string"==typeof e[c]&&n("calling chained method with inherited: "+c,this.declaredClass);do if(q=f._meta,e=f.prototype,q&&(e[c]===g&&e.hasOwnProperty(c)||q.hidden[c]===g))break;while(f=l[++h]);h=f?h:-1}if(f=l[++h])if(e=f.prototype,f._meta&&e.hasOwnProperty(c))a=e[c];else{g=u[c];do if(e=f.prototype,(a=e[c])&&(f._meta?e.hasOwnProperty(c):a!==g))break;while(f=l[++h])}a=f&&a||u[c]}else{if(m.c!==g&&(h=
55
+ 0,(q=l[0]._meta)&&q.ctor!==g)){for((e=q.chains)&&"manual"===e.constructor||n("calling chained constructor with inherited",this.declaredClass);(f=l[++h])&&(!(q=f._meta)||q.ctor!==g););h=f?h:-1}for(;(f=l[++h])&&!(a=(q=f._meta)?q.ctor:f););a=f&&a}m.c=a;m.p=h;if(a)return!0===d?a:a.apply(this,d||b)}function e(b,d){return"string"==typeof b?this.__inherited(b,d,!0):this.__inherited(b,!0)}function h(b,d,a){var c=this.getInherited(b,d);if(c)return c.apply(this,a||d||b)}function g(b){for(var d=this.constructor._meta.bases,
56
+ a=0,c=d.length;a<c;++a)if(d[a]===b)return!0;return this instanceof b}function m(b,d){for(var a in d)"constructor"!=a&&d.hasOwnProperty(a)&&(b[a]=d[a]);if(k("bug-for-in-skips-shadowed"))for(var c=f._extraNames,e=c.length;e;)a=c[--e],"constructor"!=a&&d.hasOwnProperty(a)&&(b[a]=d[a])}function b(b){x.safeMixin(this.prototype,b);return this}function l(b,d){b instanceof Array||"function"==typeof b||(d=b,b=void 0);d=d||{};b=b||[];return x([this].concat(b),d)}function q(b,d){return function(){var a=arguments,
57
+ c=a,e=a[0],l,g;g=b.length;var f;if(!(this instanceof a.callee))return t(a);if(d&&(e&&e.preamble||this.preamble))for(f=Array(b.length),f[0]=a,l=0;;){(e=a[0])&&(e=e.preamble)&&(a=e.apply(this,a)||a);e=b[l].prototype;(e=e.hasOwnProperty("preamble")&&e.preamble)&&(a=e.apply(this,a)||a);if(++l==g)break;f[l]=a}for(l=g-1;0<=l;--l)e=b[l],(e=(g=e._meta)?g.ctor:e)&&e.apply(this,f?f[l]:a);(e=this.postscript)&&e.apply(this,c)}}function d(b,d){return function(){var a=arguments,c=a,e=a[0];if(!(this instanceof a.callee))return t(a);
58
+ d&&(e&&(e=e.preamble)&&(c=e.apply(this,c)||c),(e=this.preamble)&&e.apply(this,c));b&&b.apply(this,a);(e=this.postscript)&&e.apply(this,a)}}function y(b){return function(){var d=arguments,a=0,c,e;if(!(this instanceof d.callee))return t(d);for(;c=b[a];++a)if(c=(e=c._meta)?e.ctor:c){c.apply(this,d);break}(c=this.postscript)&&c.apply(this,d)}}function p(b,d,a){return function(){var c,e,l=0,g=1;a&&(l=d.length-1,g=-1);for(;c=d[l];l+=g)e=c._meta,(c=(e?e.hidden:c.prototype)[b])&&c.apply(this,arguments)}}
59
+ function r(b){w.prototype=b.prototype;b=new w;w.prototype=null;return b}function t(b){var d=b.callee,a=r(d);d.apply(a,b);return a}function x(a,h,k){"string"!=typeof a&&(k=h,h=a,a="");k=k||{};var t,w,I,J,Q,E,A,C=1,H=h;if("[object Array]"==z.call(h)){C=a;w=[];I=[{cls:0,refs:[]}];J={};E=1;for(var ea=h.length,K=0,B,L,F,G;K<ea;++K){(B=h[K])?"[object Function]"!=z.call(B)&&n("mixin #"+K+" is not a callable constructor.",C):n("mixin #"+K+" is unknown. Did you use dojo.require to pull it in?",C);L=B._meta?
60
+ B._meta.bases:[B];F=0;for(B=L.length-1;0<=B;--B)G=L[B].prototype,G.hasOwnProperty("declaredClass")||(G.declaredClass="uniqName_"+D++),G=G.declaredClass,J.hasOwnProperty(G)||(J[G]={count:0,refs:[],cls:L[B]},++E),G=J[G],F&&F!==G&&(G.refs.push(F),++F.count),F=G;++F.count;I[0].refs.push(F)}for(;I.length;){F=I.pop();w.push(F.cls);for(--E;t=F.refs,1==t.length;){F=t[0];if(!F||--F.count){F=0;break}w.push(F.cls);--E}if(F)for(K=0,ea=t.length;K<ea;++K)F=t[K],--F.count||I.push(F)}E&&n("can't build consistent linearization",
61
+ C);B=h[0];w[0]=B?B._meta&&B===w[w.length-B._meta.bases.length]?B._meta.bases.length:1:0;E=w;I=E[0];C=E.length-I;h=E[C]}else E=[0],h?"[object Function]"==z.call(h)?(I=h._meta,E=E.concat(I?I.bases:h)):n("base class is not a callable constructor.",a):null!==h&&n("unknown base class. Did you use dojo.require to pull it in?",a);if(h)for(w=C-1;;--w){t=r(h);if(!w)break;I=E[w];(I._meta?m:v)(t,I.prototype);J=new Function;J.superclass=h;J.prototype=t;h=t.constructor=J}else t={};x.safeMixin(t,k);I=k.constructor;
62
+ I!==u.constructor&&(I.nom="constructor",t.constructor=I);for(w=C-1;w;--w)(I=E[w]._meta)&&I.chains&&(A=v(A||{},I.chains));t["-chains-"]&&(A=v(A||{},t["-chains-"]));I=!A||!A.hasOwnProperty("constructor");E[0]=J=A&&"manual"===A.constructor?y(E):1==E.length?d(k.constructor,I):q(E,I);J._meta={bases:E,hidden:k,chains:A,parents:H,ctor:k.constructor};J.superclass=h&&h.prototype;J.extend=b;J.createSubclass=l;J.prototype=t;t.constructor=J;t.getInherited=e;t.isInstanceOf=g;t.inherited=N;t.__inherited=c;a&&(t.declaredClass=
63
+ a,f.setObject(a,J));if(A)for(Q in A)t[Q]&&"string"==typeof A[Q]&&"constructor"!=Q&&(I=t[Q]=p(Q,E,"after"===A[Q]),I.nom=Q);return J}var v=f.mixin,u=Object.prototype,z=u.toString,w=new Function,D=0,N=a.config.isDebug?h:c;a.safeMixin=x.safeMixin=function(b,d){var a,c;for(a in d)c=d[a],c===u[a]&&a in u||"constructor"==a||("[object Function]"==z.call(c)&&(c.nom=a),b[a]=c);if(k("bug-for-in-skips-shadowed"))for(var e=f._extraNames,l=e.length;l;)a=e[--l],c=d[a],c===u[a]&&a in u||"constructor"==a||("[object Function]"==
64
+ z.call(c)&&(c.nom=a),b[a]=c);return b};return a.declare=x})},"dojo/_base/connect":function(){define("./kernel ../on ../topic ../aspect ./event ../mouse ./sniff ./lang ../keys".split(" "),function(a,k,f,n,c,e,h,g){function m(b,d,c,l,f){l=g.hitch(c,l);if(!b||!b.addEventListener&&!b.attachEvent)return n.after(b||a.global,d,l,!0);"string"==typeof d&&"on"==d.substring(0,2)&&(d=d.substring(2));b||(b=a.global);if(!f)switch(d){case "keypress":d=y;break;case "mouseenter":d=e.enter;break;case "mouseleave":d=
65
+ e.leave}return k(b,d,l,f)}function b(b){b.keyChar=b.charCode?String.fromCharCode(b.charCode):"";b.charOrCode=b.keyChar||b.keyCode}h.add("events-keypress-typed",function(){var b={charCode:0};try{b=document.createEvent("KeyboardEvent"),(b.initKeyboardEvent||b.initKeyEvent).call(b,"keypress",!0,!0,null,!1,!1,!1,!1,9,3)}catch(d){}return 0==b.charCode&&!h("opera")});var l={106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,229:113},q=h("mac")?"metaKey":"ctrlKey",
66
+ d=function(d,a){var c=g.mixin({},d,a);b(c);c.preventDefault=function(){d.preventDefault()};c.stopPropagation=function(){d.stopPropagation()};return c},y;y=h("events-keypress-typed")?function(b,a){var c=k(b,"keydown",function(b){var c=b.keyCode,e=13!=c&&32!=c&&(27!=c||!h("ie"))&&(48>c||90<c)&&(96>c||111<c)&&(186>c||192<c)&&(219>c||222<c)&&229!=c;if(e||b.ctrlKey){e=e?0:c;if(b.ctrlKey){if(3==c||13==c)return a.call(b.currentTarget,b);e=95<e&&106>e?e-48:!b.shiftKey&&65<=e&&90>=e?e+32:l[e]||e}c=d(b,{type:"keypress",
67
+ faux:!0,charCode:e});a.call(b.currentTarget,c);if(h("ie"))try{b.keyCode=c.keyCode}catch(g){}}}),e=k(b,"keypress",function(b){var c=b.charCode;b=d(b,{charCode:32<=c?c:0,faux:!0});return a.call(this,b)});return{remove:function(){c.remove();e.remove()}}}:h("opera")?function(b,a){return k(b,"keypress",function(b){var c=b.which;3==c&&(c=99);c=32>c&&!b.shiftKey?0:c;b.ctrlKey&&!b.shiftKey&&65<=c&&90>=c&&(c+=32);return a.call(this,d(b,{charCode:c}))})}:function(d,a){return k(d,"keypress",function(d){b(d);
68
+ return a.call(this,d)})};var p={_keypress:y,connect:function(b,d,a,c,e){var l=arguments,g=[],f=0;g.push("string"==typeof l[0]?null:l[f++],l[f++]);var q=l[f+1];g.push("string"==typeof q||"function"==typeof q?l[f++]:null,l[f++]);for(q=l.length;f<q;f++)g.push(l[f]);return m.apply(this,g)},disconnect:function(b){b&&b.remove()},subscribe:function(b,d,a){return f.subscribe(b,g.hitch(d,a))},publish:function(b,d){return f.publish.apply(f,[b].concat(d))},connectPublisher:function(b,d,a){var c=function(){p.publish(b,
69
+ arguments)};return a?p.connect(d,a,c):p.connect(d,c)},isCopyKey:function(b){return b[q]}};p.unsubscribe=p.disconnect;g.mixin(a,p);return p})},"dojo/on":function(){define(["./has!dom-addeventlistener?:./aspect","./_base/kernel","./sniff"],function(a,k,f){function n(b,d,a,c,e){if(c=d.match(/(.*):(.*)/))return d=c[2],c=c[1],g.selector(c,d).call(e,b,a);f("touch")&&(m.test(d)&&(a=D(a)),f("event-orientationchange")||"orientationchange"!=d||(d="resize",b=window,a=D(a)));y&&(a=y(a));if(b.addEventListener){var l=
70
+ d in q,h=l?q[d]:d;b.addEventListener(h,a,l);return{remove:function(){b.removeEventListener(h,a,l)}}}if(x&&b.attachEvent)return x(b,"on"+d,a);throw Error("Target must be an event emitter");}function c(){this.cancelable=!1;this.defaultPrevented=!0}function e(){this.bubbles=!1}var h=window.ScriptEngineMajorVersion;f.add("jscript",h&&h()+ScriptEngineMinorVersion()/10);f.add("event-orientationchange",f("touch")&&!f("android"));f.add("event-stopimmediatepropagation",window.Event&&!!window.Event.prototype&&
71
+ !!window.Event.prototype.stopImmediatePropagation);f.add("event-focusin",function(b,d,a){return"onfocusin"in a});f("touch")&&f.add("touch-can-modify-event-delegate",function(){var b=function(){};b.prototype=document.createEvent("MouseEvents");try{var d=new b;d.target=null;return null===d.target}catch(a){return!1}});var g=function(b,d,a,c){return"function"!=typeof b.on||"function"==typeof d||b.nodeType?g.parse(b,d,a,n,c,this):b.on(d,a)};g.pausable=function(b,d,a,c){var e;b=g(b,d,function(){if(!e)return a.apply(this,
72
+ arguments)},c);b.pause=function(){e=!0};b.resume=function(){e=!1};return b};g.once=function(b,d,a,c){var e=g(b,d,function(){e.remove();return a.apply(this,arguments)});return e};g.parse=function(b,d,a,c,e,l){if(d.call)return d.call(l,b,a);if(d instanceof Array)f=d;else if(-1<d.indexOf(","))var f=d.split(/\s*,\s*/);if(f){var q=[];d=0;for(var h;h=f[d++];)q.push(g.parse(b,h,a,c,e,l));q.remove=function(){for(var b=0;b<q.length;b++)q[b].remove()};return q}return c(b,d,a,e,l)};var m=/^touch/;g.matches=
73
+ function(b,d,a,c,e){e=e&&e.matches?e:k.query;c=!1!==c;1!=b.nodeType&&(b=b.parentNode);for(;!e.matches(b,d,a);)if(b==a||!1===c||!(b=b.parentNode)||1!=b.nodeType)return!1;return b};g.selector=function(b,d,a){return function(c,e){function l(d){return g.matches(d,b,c,a,f)}var f="function"==typeof b?{matches:b}:this,q=d.bubble;return q?g(c,q(l),e):g(c,d,function(b){var d=l(b.target);if(d)return e.call(d,b)})}};var b=[].slice,l=g.emit=function(d,a,l){var g=b.call(arguments,2),f="on"+a;if("parentNode"in
74
+ d){var q=g[0]={},h;for(h in l)q[h]=l[h];q.preventDefault=c;q.stopPropagation=e;q.target=d;q.type=a;l=q}do d[f]&&d[f].apply(d,g);while(l&&l.bubbles&&(d=d.parentNode));return l&&l.cancelable&&l},q=f("event-focusin")?{}:{focusin:"focus",focusout:"blur"};if(!f("event-stopimmediatepropagation"))var d=function(){this.modified=this.immediatelyStopped=!0},y=function(b){return function(a){if(!a.immediatelyStopped)return a.stopImmediatePropagation=d,b.apply(this,arguments)}};if(f("dom-addeventlistener"))g.emit=
75
+ function(b,d,a){if(b.dispatchEvent&&document.createEvent){var c=(b.ownerDocument||document).createEvent("HTMLEvents");c.initEvent(d,!!a.bubbles,!!a.cancelable);for(var e in a)e in c||(c[e]=a[e]);return b.dispatchEvent(c)&&c}return l.apply(g,arguments)};else{g._fixEvent=function(b,d){b||(b=(d&&(d.ownerDocument||d.document||d).parentWindow||window).event);if(!b)return b;try{p&&b.type==p.type&&b.srcElement==p.target&&(b=p)}catch(a){}if(!b.target)switch(b.target=b.srcElement,b.currentTarget=d||b.srcElement,
76
+ "mouseover"==b.type&&(b.relatedTarget=b.fromElement),"mouseout"==b.type&&(b.relatedTarget=b.toElement),b.stopPropagation||(b.stopPropagation=v,b.preventDefault=u),b.type){case "keypress":var c="charCode"in b?b.charCode:b.keyCode;10==c?(c=0,b.keyCode=13):13==c||27==c?c=0:3==c&&(c=99);b.charCode=c;c=b;c.keyChar=c.charCode?String.fromCharCode(c.charCode):"";c.charOrCode=c.keyChar||c.keyCode}return b};var p,r=function(b){this.handle=b};r.prototype.remove=function(){delete _dojoIEListeners_[this.handle]};
77
+ var t=function(b){return function(d){d=g._fixEvent(d,this);var a=b.call(this,d);d.modified&&(p||setTimeout(function(){p=null}),p=d);return a}},x=function(b,d,c){c=t(c);if(((b.ownerDocument?b.ownerDocument.parentWindow:b.parentWindow||b.window||window)!=top||5.8>f("jscript"))&&!f("config-_allow_leaks")){"undefined"==typeof _dojoIEListeners_&&(_dojoIEListeners_=[]);var e=b[d];if(!e||!e.listeners){var l=e,e=Function("event","var callee \x3d arguments.callee; for(var i \x3d 0; i\x3ccallee.listeners.length; i++){var listener \x3d _dojoIEListeners_[callee.listeners[i]]; if(listener){listener.call(this,event);}}");
78
+ e.listeners=[];b[d]=e;e.global=this;l&&e.listeners.push(_dojoIEListeners_.push(l)-1)}e.listeners.push(b=e.global._dojoIEListeners_.push(c)-1);return new r(b)}return a.after(b,d,c,!0)},v=function(){this.cancelBubble=!0},u=g._preventDefault=function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey)try{this.keyCode=0}catch(b){}this.defaultPrevented=!0;this.returnValue=!1;this.modified=!0}}if(f("touch"))var z=function(){},w=window.orientation,D=function(b){return function(d){var a=d.corrected;if(!a){var c=
79
+ d.type;try{delete d.type}catch(e){}if(d.type){if(f("touch-can-modify-event-delegate"))z.prototype=d,a=new z;else{var a={},l;for(l in d)a[l]=d[l]}a.preventDefault=function(){d.preventDefault()};a.stopPropagation=function(){d.stopPropagation()}}else a=d,a.type=c;d.corrected=a;if("resize"==c){if(w==window.orientation)return null;w=window.orientation;a.type="orientationchange";return b.call(this,a)}"rotation"in a||(a.rotation=0,a.scale=1);var c=a.changedTouches[0],g;for(g in c)delete a[g],a[g]=c[g]}return b.call(this,
80
+ a)}};return g})},"dojo/topic":function(){define(["./Evented"],function(a){var k=new a;return{publish:function(a,n){return k.emit.apply(k,arguments)},subscribe:function(a,n){return k.on.apply(k,arguments)}}})},"dojo/Evented":function(){define(["./aspect","./on"],function(a,k){function f(){}var n=a.after;f.prototype={on:function(a,e){return k.parse(this,a,e,function(a,c){return n(a,"on"+c,e,!0)})},emit:function(a,e){var f=[this];f.push.apply(f,arguments);return k.emit.apply(k,f)}};return f})},"dojo/aspect":function(){define([],
81
+ function(){function a(a,c,b,e){var f=a[c],d="around"==c,h;if(d){var p=b(function(){return f.advice(this,arguments)});h={remove:function(){p&&(p=a=b=null)},advice:function(b,d){return p?p.apply(b,d):f.advice(b,d)}}}else h={remove:function(){if(h.advice){var d=h.previous,e=h.next;e||d?(d?d.next=e:a[c]=e,e&&(e.previous=d)):delete a[c];a=b=h.advice=null}},id:n++,advice:b,receiveArguments:e};if(f&&!d)if("after"==c){for(;f.next&&(f=f.next););f.next=h;h.previous=f}else"before"==c&&(a[c]=h,h.next=f,f.previous=
82
+ h);else a[c]=h;return h}function k(c){return function(e,b,l,h){var d=e[b],k;d&&d.target==e||(e[b]=k=function(){for(var b=n,d=arguments,a=k.before;a;)d=a.advice.apply(this,d)||d,a=a.next;if(k.around)var c=k.around.advice(this,d);for(a=k.after;a&&a.id<b;){if(a.receiveArguments)var e=a.advice.apply(this,d),c=e===f?c:e;else c=a.advice.call(this,c,d);a=a.next}return c},d&&(k.around={advice:function(b,a){return d.apply(b,a)}}),k.target=e);e=a(k||d,c,l,h);l=null;return e}}var f,n=0,c=k("after"),e=k("before"),
83
+ h=k("around");return{before:e,around:h,after:c}})},"dojo/_base/event":function(){define(["./kernel","../on","../has","../dom-geometry"],function(a,k,f,n){if(k._fixEvent){var c=k._fixEvent;k._fixEvent=function(a,e){(a=c(a,e))&&n.normalizeEvent(a);return a}}var e={fix:function(a,c){return k._fixEvent?k._fixEvent(a,c):a},stop:function(a){f("dom-addeventlistener")||a&&a.preventDefault?(a.preventDefault(),a.stopPropagation()):(a=a||window.event,a.cancelBubble=!0,k._preventDefault.call(a))}};a.fixEvent=
84
+ e.fix;a.stopEvent=e.stop;return e})},"dojo/dom-geometry":function(){define(["./sniff","./_base/window","./dom","./dom-style"],function(a,k,f,n){function c(b,a,c,d,e,f){f=f||"px";b=b.style;isNaN(a)||(b.left=a+f);isNaN(c)||(b.top=c+f);0<=d&&(b.width=d+f);0<=e&&(b.height=e+f)}function e(b){return"button"==b.tagName.toLowerCase()||"input"==b.tagName.toLowerCase()&&"button"==(b.getAttribute("type")||"").toLowerCase()}function h(b){return"border-box"==g.boxModel||"table"==b.tagName.toLowerCase()||e(b)}
85
+ var g={boxModel:"content-box"};a("ie")&&(g.boxModel="BackCompat"==document.compatMode?"border-box":"content-box");g.getPadExtents=function(b,a){b=f.byId(b);var c=a||n.getComputedStyle(b),d=n.toPixelValue,e=d(b,c.paddingLeft),g=d(b,c.paddingTop),h=d(b,c.paddingRight),c=d(b,c.paddingBottom);return{l:e,t:g,r:h,b:c,w:e+h,h:g+c}};g.getBorderExtents=function(b,a){b=f.byId(b);var c=n.toPixelValue,d=a||n.getComputedStyle(b),e="none"!=d.borderLeftStyle?c(b,d.borderLeftWidth):0,g="none"!=d.borderTopStyle?c(b,
86
+ d.borderTopWidth):0,h="none"!=d.borderRightStyle?c(b,d.borderRightWidth):0,c="none"!=d.borderBottomStyle?c(b,d.borderBottomWidth):0;return{l:e,t:g,r:h,b:c,w:e+h,h:g+c}};g.getPadBorderExtents=function(b,a){b=f.byId(b);var c=a||n.getComputedStyle(b),d=g.getPadExtents(b,c),c=g.getBorderExtents(b,c);return{l:d.l+c.l,t:d.t+c.t,r:d.r+c.r,b:d.b+c.b,w:d.w+c.w,h:d.h+c.h}};g.getMarginExtents=function(b,a){b=f.byId(b);var c=a||n.getComputedStyle(b),d=n.toPixelValue,e=d(b,c.marginLeft),g=d(b,c.marginTop),h=d(b,
87
+ c.marginRight),c=d(b,c.marginBottom);return{l:e,t:g,r:h,b:c,w:e+h,h:g+c}};g.getMarginBox=function(b,c){b=f.byId(b);var e=c||n.getComputedStyle(b),d=g.getMarginExtents(b,e),h=b.offsetLeft-d.l,m=b.offsetTop-d.t,k=b.parentNode,t=n.toPixelValue;if(a("mozilla")){var x=parseFloat(e.left),e=parseFloat(e.top);isNaN(x)||isNaN(e)?k&&k.style&&(k=n.getComputedStyle(k),"visible"!=k.overflow&&(h+="none"!=k.borderLeftStyle?t(b,k.borderLeftWidth):0,m+="none"!=k.borderTopStyle?t(b,k.borderTopWidth):0)):(h=x,m=e)}else(a("opera")||
88
+ 8==a("ie")&&!a("quirks"))&&k&&(k=n.getComputedStyle(k),h-="none"!=k.borderLeftStyle?t(b,k.borderLeftWidth):0,m-="none"!=k.borderTopStyle?t(b,k.borderTopWidth):0);return{l:h,t:m,w:b.offsetWidth+d.w,h:b.offsetHeight+d.h}};g.getContentBox=function(b,c){b=f.byId(b);var e=c||n.getComputedStyle(b),d=b.clientWidth,h=g.getPadExtents(b,e),m=g.getBorderExtents(b,e);d?(e=b.clientHeight,m.w=m.h=0):(d=b.offsetWidth,e=b.offsetHeight);a("opera")&&(h.l+=m.l,h.t+=m.t);return{l:h.l,t:h.t,w:d-h.w-m.w,h:e-h.h-m.h}};
89
+ g.setContentSize=function(b,a,e){b=f.byId(b);var d=a.w;a=a.h;h(b)&&(e=g.getPadBorderExtents(b,e),0<=d&&(d+=e.w),0<=a&&(a+=e.h));c(b,NaN,NaN,d,a)};var m={l:0,t:0,w:0,h:0};g.setMarginBox=function(b,l,q){b=f.byId(b);var d=q||n.getComputedStyle(b);q=l.w;var k=l.h,p=h(b)?m:g.getPadBorderExtents(b,d),d=g.getMarginExtents(b,d);if(a("webkit")&&e(b)){var r=b.style;0<=q&&!r.width&&(r.width="4px");0<=k&&!r.height&&(r.height="4px")}0<=q&&(q=Math.max(q-p.w-d.w,0));0<=k&&(k=Math.max(k-p.h-d.h,0));c(b,l.l,l.t,q,
90
+ k)};g.isBodyLtr=function(b){b=b||k.doc;return"ltr"==(k.body(b).dir||b.documentElement.dir||"ltr").toLowerCase()};g.docScroll=function(b){b=b||k.doc;var c=k.doc.parentWindow||k.doc.defaultView;return"pageXOffset"in c?{x:c.pageXOffset,y:c.pageYOffset}:(c=a("quirks")?k.body(b):b.documentElement)&&{x:g.fixIeBiDiScrollLeft(c.scrollLeft||0,b),y:c.scrollTop||0}};a("ie")&&(g.getIeDocumentElementOffset=function(b){b=b||k.doc;b=b.documentElement;if(8>a("ie")){var c=b.getBoundingClientRect(),e=c.left,c=c.top;
91
+ 7>a("ie")&&(e+=b.clientLeft,c+=b.clientTop);return{x:0>e?0:e,y:0>c?0:c}}return{x:0,y:0}});g.fixIeBiDiScrollLeft=function(b,c){c=c||k.doc;var e=a("ie");if(e&&!g.isBodyLtr(c)){var d=a("quirks"),f=d?k.body(c):c.documentElement,h=k.global;6==e&&!d&&h.frameElement&&f.scrollHeight>f.clientHeight&&(b+=f.clientLeft);return 8>e||d?b+f.clientWidth-f.scrollWidth:-b}return b};g.position=function(b,c){b=f.byId(b);var e=k.body(b.ownerDocument),d=b.getBoundingClientRect(),d={x:d.left,y:d.top,w:d.right-d.left,h:d.bottom-
92
+ d.top};if(9>a("ie")){var h=g.getIeDocumentElementOffset(b.ownerDocument);d.x-=h.x+(a("quirks")?e.clientLeft+e.offsetLeft:0);d.y-=h.y+(a("quirks")?e.clientTop+e.offsetTop:0)}c&&(e=g.docScroll(b.ownerDocument),d.x+=e.x,d.y+=e.y);return d};g.getMarginSize=function(b,a){b=f.byId(b);var c=g.getMarginExtents(b,a||n.getComputedStyle(b)),d=b.getBoundingClientRect();return{w:d.right-d.left+c.w,h:d.bottom-d.top+c.h}};g.normalizeEvent=function(b){"layerX"in b||(b.layerX=b.offsetX,b.layerY=b.offsetY);if(!a("dom-addeventlistener")){var c=
93
+ b.target,c=c&&c.ownerDocument||document,e=a("quirks")?c.body:c.documentElement,d=g.getIeDocumentElementOffset(c);b.pageX=b.clientX+g.fixIeBiDiScrollLeft(e.scrollLeft||0,c)-d.x;b.pageY=b.clientY+(e.scrollTop||0)-d.y}};return g})},"dojo/_base/window":function(){define(["./kernel","./lang","../sniff"],function(a,k,f){var n={global:a.global,doc:a.global.document||null,body:function(c){c=c||a.doc;return c.body||c.getElementsByTagName("body")[0]},setContext:function(c,e){a.global=n.global=c;a.doc=n.doc=
94
+ e},withGlobal:function(c,e,f,g){var m=a.global;try{return a.global=n.global=c,n.withDoc.call(null,c.document,e,f,g)}finally{a.global=n.global=m}},withDoc:function(c,e,h,g){var m=n.doc,b=f("quirks"),l=f("ie"),q,d,k;try{return a.doc=n.doc=c,a.isQuirks=f.add("quirks","BackCompat"==a.doc.compatMode,!0,!0),f("ie")&&(k=c.parentWindow)&&k.navigator&&(q=parseFloat(k.navigator.appVersion.split("MSIE ")[1])||void 0,(d=c.documentMode)&&5!=d&&Math.floor(q)!=d&&(q=d),a.isIE=f.add("ie",q,!0,!0)),h&&"string"==typeof e&&
95
+ (e=h[e]),e.apply(h,g||[])}finally{a.doc=n.doc=m,a.isQuirks=f.add("quirks",b,!0,!0),a.isIE=f.add("ie",l,!0,!0)}}};k.mixin(a,n);return n})},"dojo/dom":function(){define(["./sniff","./_base/window"],function(a,k){if(7>=a("ie"))try{document.execCommand("BackgroundImageCache",!1,!0)}catch(c){}var f={};a("ie")?f.byId=function(a,e){if("string"!=typeof a)return a;var f=e||k.doc,g=a&&f.getElementById(a);if(!g||g.attributes.id.value!=a&&g.id!=a){f=f.all[a];if(!f||f.nodeName)f=[f];for(var m=0;g=f[m++];)if(g.attributes&&
96
+ g.attributes.id&&g.attributes.id.value==a||g.id==a)return g}else return g}:f.byId=function(a,e){return("string"==typeof a?(e||k.doc).getElementById(a):a)||null};f.isDescendant=function(a,e){try{for(a=f.byId(a),e=f.byId(e);a;){if(a==e)return!0;a=a.parentNode}}catch(h){}return!1};a.add("css-user-select",function(a,e,f){if(!f)return!1;a=f.style;e=["Khtml","O","Moz","Webkit"];f=e.length;var g="userSelect";do if("undefined"!==typeof a[g])return g;while(f--&&(g=e[f]+"UserSelect"));return!1});var n=a("css-user-select");
97
+ f.setSelectable=n?function(a,e){f.byId(a).style[n]=e?"":"none"}:function(a,e){a=f.byId(a);var h=a.getElementsByTagName("*"),g=h.length;if(e)for(a.removeAttribute("unselectable");g--;)h[g].removeAttribute("unselectable");else for(a.setAttribute("unselectable","on");g--;)h[g].setAttribute("unselectable","on")};return f})},"dojo/dom-style":function(){define(["./sniff","./dom"],function(a,k){function f(d,c,f){c=c.toLowerCase();if(a("ie")||a("trident")){if("auto"==f){if("height"==c)return d.offsetHeight;
98
+ if("width"==c)return d.offsetWidth}if("fontweight"==c)switch(f){case 700:return"bold";default:return"normal"}}c in b||(b[c]=l.test(c));return b[c]?e(d,f):f}var n,c={};n=a("webkit")?function(b){var a;if(1==b.nodeType){var c=b.ownerDocument.defaultView;a=c.getComputedStyle(b,null);!a&&b.style&&(b.style.display="",a=c.getComputedStyle(b,null))}return a||{}}:a("ie")&&(9>a("ie")||a("quirks"))?function(b){return 1==b.nodeType&&b.currentStyle?b.currentStyle:{}}:function(b){return 1==b.nodeType?b.ownerDocument.defaultView.getComputedStyle(b,
99
+ null):{}};c.getComputedStyle=n;var e;e=a("ie")?function(b,a){if(!a)return 0;if("medium"==a)return 4;if(a.slice&&"px"==a.slice(-2))return parseFloat(a);var c=b.style,e=b.runtimeStyle,f=c.left,l=e.left;e.left=b.currentStyle.left;try{c.left=a,a=c.pixelLeft}catch(g){a=0}c.left=f;e.left=l;return a}:function(b,a){return parseFloat(a)||0};c.toPixelValue=e;var h=function(b,a){try{return b.filters.item("DXImageTransform.Microsoft.Alpha")}catch(c){return a?{}:null}},g=9>a("ie")||10>a("ie")&&a("quirks")?function(b){try{return h(b).Opacity/
100
+ 100}catch(a){return 1}}:function(b){return n(b).opacity},m=9>a("ie")||10>a("ie")&&a("quirks")?function(b,a){""===a&&(a=1);var c=100*a;1===a?(b.style.zoom="",h(b)&&(b.style.filter=b.style.filter.replace(/\s*progid:DXImageTransform.Microsoft.Alpha\([^\)]+?\)/i,""))):(b.style.zoom=1,h(b)?h(b,1).Opacity=c:b.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity\x3d"+c+")",h(b,1).Enabled=!0);if("tr"==b.tagName.toLowerCase())for(c=b.firstChild;c;c=c.nextSibling)"td"==c.tagName.toLowerCase()&&m(c,
101
+ a);return a}:function(b,a){return b.style.opacity=a},b={left:!0,top:!0},l=/margin|padding|width|height|max|min|offset/,q={cssFloat:1,styleFloat:1,"float":1};c.get=function(b,a){var e=k.byId(b),l=arguments.length;if(2==l&&"opacity"==a)return g(e);a=q[a]?"cssFloat"in e.style?"cssFloat":"styleFloat":a;var h=c.getComputedStyle(e);return 1==l?h:f(e,a,h[a]||e.style[a])};c.set=function(b,a,e){var f=k.byId(b),l=arguments.length,g="opacity"==a;a=q[a]?"cssFloat"in f.style?"cssFloat":"styleFloat":a;if(3==l)return g?
102
+ m(f,e):f.style[a]=e;for(var h in a)c.set(b,h,a[h]);return c.getComputedStyle(f)};return c})},"dojo/mouse":function(){define(["./_base/kernel","./on","./has","./dom","./_base/window"],function(a,k,f,n,c){function e(a,c){var f=function(b,e){return k(b,a,function(a){if(c)return c(a,e);if(!n.isDescendant(a.relatedTarget,b))return e.call(this,a)})};f.bubble=function(b){return e(a,function(a,c){var d=b(a.target),e=a.relatedTarget;if(d&&d!=(e&&1==e.nodeType&&b(e)))return c.call(d,a)})};return f}f.add("dom-quirks",
103
+ c.doc&&"BackCompat"==c.doc.compatMode);f.add("events-mouseenter",c.doc&&"onmouseenter"in c.doc.createElement("div"));f.add("events-mousewheel",c.doc&&"onmousewheel"in c.doc);c=f("dom-quirks")&&f("ie")||!f("dom-addeventlistener")?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(a,c){return a.button&c},isLeft:function(a){return a.button&1},isMiddle:function(a){return a.button&4},isRight:function(a){return a.button&2}}:{LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(a,c){return a.button==c},isLeft:function(a){return 0==
104
+ a.button},isMiddle:function(a){return 1==a.button},isRight:function(a){return 2==a.button}};a.mouseButtons=c;a=f("events-mousewheel")?"mousewheel":function(a,c){return k(a,"DOMMouseScroll",function(a){a.wheelDelta=-a.detail;c.call(this,a)})};return{_eventHandler:e,enter:e("mouseover"),leave:e("mouseout"),wheel:a,isLeft:c.isLeft,isMiddle:c.isMiddle,isRight:c.isRight}})},"dojo/_base/sniff":function(){define(["./kernel","./lang","../sniff"],function(a,k,f){a._name="browser";k.mixin(a,{isBrowser:!0,isFF:f("ff"),
105
+ isIE:f("ie"),isKhtml:f("khtml"),isWebKit:f("webkit"),isMozilla:f("mozilla"),isMoz:f("mozilla"),isOpera:f("opera"),isSafari:f("safari"),isChrome:f("chrome"),isMac:f("mac"),isIos:f("ios"),isAndroid:f("android"),isWii:f("wii"),isQuirks:f("quirks"),isAir:f("air")});return f})},"dojo/keys":function(){define(["./_base/kernel","./sniff"],function(a,k){return a.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:k("webkit")?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,
106
+ END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,
107
+ UP_DPAD:175,DOWN_DPAD:176,LEFT_DPAD:177,RIGHT_DPAD:178,copyKey:k("mac")&&!k("air")?k("safari")?91:224:17}})},"dojo/_base/Deferred":function(){define("./kernel ../Deferred ../promise/Promise ../errors/CancelError ../has ./lang ../when".split(" "),function(a,k,f,n,c,e,h){var g=function(){},m=Object.freeze||function(){},b=a.Deferred=function(a){function h(b){if(p)throw Error("This deferred has already been resolved");y=b;p=!0;d()}function d(){for(var b;!b&&u;){var a=u;u=u.next;if(b=a.progress==g)p=!1;
108
+ var d=x?a.error:a.resolved;c("config-useDeferredInstrumentation")&&x&&k.instrumentRejected&&k.instrumentRejected(y,!!d);if(d)try{var f=d(y);f&&"function"===typeof f.then?f.then(e.hitch(a.deferred,"resolve"),e.hitch(a.deferred,"reject"),e.hitch(a.deferred,"progress")):(d=b&&void 0===f,b&&!d&&(x=f instanceof Error),a.deferred[d&&x?"reject":"resolve"](d?y:f))}catch(l){a.deferred.reject(l)}else x?a.deferred.reject(y):a.deferred.resolve(y)}}var y,p,r,t,x,v,u,z=this.promise=new f;this.isResolved=z.isResolved=
109
+ function(){return 0==t};this.isRejected=z.isRejected=function(){return 1==t};this.isFulfilled=z.isFulfilled=function(){return 0<=t};this.isCanceled=z.isCanceled=function(){return r};this.resolve=this.callback=function(b){this.fired=t=0;this.results=[b,null];h(b)};this.reject=this.errback=function(b){x=!0;this.fired=t=1;c("config-useDeferredInstrumentation")&&k.instrumentRejected&&k.instrumentRejected(b,!!u);h(b);this.results=[null,b]};this.progress=function(b){for(var a=u;a;){var d=a.progress;d&&
110
+ d(b);a=a.next}};this.addCallbacks=function(b,a){this.then(b,a,g);return this};z.then=this.then=function(a,c,e){var f=e==g?this:new b(z.cancel);a={resolved:a,error:c,progress:e,deferred:f};u?v=v.next=a:u=v=a;p&&d();return f.promise};var w=this;z.cancel=this.cancel=function(){if(!p){var b=a&&a(w);p||(b instanceof Error||(b=new n(b)),b.log=!1,w.reject(b))}r=!0};m(z)};e.extend(b,{addCallback:function(b){return this.addCallbacks(e.hitch.apply(a,arguments))},addErrback:function(b){return this.addCallbacks(null,
111
+ e.hitch.apply(a,arguments))},addBoth:function(b){var c=e.hitch.apply(a,arguments);return this.addCallbacks(c,c)},fired:-1});b.when=a.when=h;return b})},"dojo/Deferred":function(){define(["./has","./_base/lang","./errors/CancelError","./promise/Promise","./promise/instrumentation"],function(a,k,f,n,c){var e=Object.freeze||function(){},h=function(b,a,c,e,f){2===a&&l.instrumentRejected&&0===b.length&&l.instrumentRejected(c,!1,e,f);for(f=0;f<b.length;f++)g(b[f],a,c,e)},g=function(a,d,c,e){var f=a[d],
112
+ g=a.deferred;if(f)try{var h=f(c);if(0===d)"undefined"!==typeof h&&b(g,d,h);else{if(h&&"function"===typeof h.then){a.cancel=h.cancel;h.then(m(g,1),m(g,2),m(g,0));return}b(g,1,h)}}catch(k){b(g,2,k)}else b(g,d,c);2===d&&l.instrumentRejected&&l.instrumentRejected(c,!!f,e,g.promise)},m=function(a,d){return function(c){b(a,d,c)}},b=function(b,a,c){if(!b.isCanceled())switch(a){case 0:b.progress(c);break;case 1:b.resolve(c);break;case 2:b.reject(c)}},l=function(b){var a=this.promise=new n,c=this,m,k,t,x=
113
+ !1,v=[];Error.captureStackTrace&&(Error.captureStackTrace(c,l),Error.captureStackTrace(a,l));this.isResolved=a.isResolved=function(){return 1===m};this.isRejected=a.isRejected=function(){return 2===m};this.isFulfilled=a.isFulfilled=function(){return!!m};this.isCanceled=a.isCanceled=function(){return x};this.progress=function(b,e){if(m){if(!0===e)throw Error("This deferred has already been fulfilled.");return a}h(v,0,b,null,c);return a};this.resolve=function(b,e){if(m){if(!0===e)throw Error("This deferred has already been fulfilled.");
114
+ return a}h(v,m=1,k=b,null,c);v=null;return a};var u=this.reject=function(b,e){if(m){if(!0===e)throw Error("This deferred has already been fulfilled.");return a}Error.captureStackTrace&&Error.captureStackTrace(t={},u);h(v,m=2,k=b,t,c);v=null;return a};this.then=a.then=function(b,c,e){var f=[e,b,c];f.cancel=a.cancel;f.deferred=new l(function(b){return f.cancel&&f.cancel(b)});m&&!v?g(f,m,k,t):v.push(f);return f.deferred.promise};this.cancel=a.cancel=function(a,d){if(!m){if(b){var c=b(a);a="undefined"===
115
+ typeof c?a:c}x=!0;if(!m)return"undefined"===typeof a&&(a=new f),u(a),a;if(2===m&&k===a)return a}else if(!0===d)throw Error("This deferred has already been fulfilled.");};e(a)};l.prototype.toString=function(){return"[object Deferred]"};c&&c(l);return l})},"dojo/errors/CancelError":function(){define(["./create"],function(a){return a("CancelError",null,null,{dojoType:"cancel"})})},"dojo/errors/create":function(){define(["../_base/lang"],function(a){return function(k,f,n,c){n=n||Error;var e=function(a){if(n===
116
+ Error){Error.captureStackTrace&&Error.captureStackTrace(this,e);var c=Error.call(this,a),m;for(m in c)c.hasOwnProperty(m)&&(this[m]=c[m]);this.message=a;this.stack=c.stack}else n.apply(this,arguments);f&&f.apply(this,arguments)};e.prototype=a.delegate(n.prototype,c);e.prototype.name=k;return e.prototype.constructor=e}})},"dojo/promise/Promise":function(){define(["../_base/lang"],function(a){function k(){throw new TypeError("abstract");}return a.extend(function(){},{then:function(a,n,c){k()},cancel:function(a,
117
+ n){k()},isResolved:function(){k()},isRejected:function(){k()},isFulfilled:function(){k()},isCanceled:function(){k()},always:function(a){return this.then(a,a)},otherwise:function(a){return this.then(null,a)},trace:function(){return this},traceRejected:function(){return this},toString:function(){return"[object Promise]"}})})},"dojo/promise/instrumentation":function(){define(["./tracer","../has","../_base/lang","../_base/array"],function(a,k,f,n){function c(b,a,c){a&&a.stack&&a.stack.split("\n").slice(1).join("\n").replace(/^\s+/,
118
+ " ")}function e(b,a,e,f){a||c(b,e,f)}function h(a,d,c,e){n.some(m,function(b){if(b.error===a)return d&&(b.handled=!0),!0})||m.push({error:a,rejection:c,handled:d,deferred:e,timestamp:(new Date).getTime()});b||(b=setTimeout(g,l))}function g(){var a=(new Date).getTime(),d=a-l;m=n.filter(m,function(b){return b.timestamp<d?(b.handled||c(b.error,b.rejection,b.deferred),!1):!0});b=m.length?setTimeout(g,m[0].timestamp+l-a):!1}k.add("config-useDeferredInstrumentation","report-unhandled-rejections");var m=
119
+ [],b=!1,l=1E3;return function(b){var d=k("config-useDeferredInstrumentation");if(d){a.on("resolved",f.hitch(console,"log","resolved"));a.on("rejected",f.hitch(console,"log","rejected"));a.on("progress",f.hitch(console,"log","progress"));var c=[];"string"===typeof d&&(c=d.split(","),d=c.shift());if("report-rejections"===d)b.instrumentRejected=e;else if("report-unhandled-rejections"===d||!0===d||1===d)b.instrumentRejected=h,l=parseInt(c[0],10)||l;else throw Error("Unsupported instrumentation usage \x3c"+
120
+ d+"\x3e");}}})},"dojo/promise/tracer":function(){define(["../_base/lang","./Promise","../Evented"],function(a,k,f){function n(a){setTimeout(function(){e.apply(c,a)},0)}var c=new f,e=c.emit;c.emit=null;k.prototype.trace=function(){var c=a._toArray(arguments);this.then(function(a){n(["resolved",a].concat(c))},function(a){n(["rejected",a].concat(c))},function(a){n(["progress",a].concat(c))});return this};k.prototype.traceRejected=function(){var c=a._toArray(arguments);this.otherwise(function(a){n(["rejected",
121
+ a].concat(c))});return this};return c})},"dojo/when":function(){define(["./Deferred","./promise/Promise"],function(a,k){return function(f,n,c,e){var h=f&&"function"===typeof f.then,g=h&&f instanceof k;if(!h)return 1<arguments.length?n?n(f):f:(new a).resolve(f);g||(h=new a(f.cancel),f.then(h.resolve,h.reject,h.progress),f=h.promise);return n||c||e?f.then(n,c,e):f}})},"dojo/_base/json":function(){define(["./kernel","../json"],function(a,k){a.fromJson=function(a){return eval("("+a+")")};a._escapeString=
122
+ k.stringify;a.toJsonIndentStr="\t";a.toJson=function(f,n){return k.stringify(f,function(a,e){if(e){var f=e.__json__||e.json;if("function"==typeof f)return f.call(e)}return e},n&&a.toJsonIndentStr)};return a})},"dojo/json":function(){define(["./has"],function(a){var k="undefined"!=typeof JSON;a.add("json-parse",k);a.add("json-stringify",k&&'{"a":1}'==JSON.stringify({a:0},function(a,c){return c||1}));if(a("json-stringify"))return JSON;var f=function(a){return('"'+a.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,
123
+ "\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};return{parse:a("json-parse")?JSON.parse:function(a,c){if(c&&!/^([\s\[\{]*(?:"(?:\\.|[^"])*"|-?\d[\d\.]*(?:[Ee][+-]?\d+)?|null|true|false|)[\s\]\}]*(?:,|:|$))+$/.test(a))throw new SyntaxError("Invalid characters in JSON");return eval("("+a+")")},stringify:function(a,c,e){function h(a,b,l){c&&(a=c(l,a));var k;k=typeof a;if("number"==k)return isFinite(a)?a+"":"null";if("boolean"==k)return a+"";if(null===
124
+ a)return"null";if("string"==typeof a)return f(a);if("function"==k||"undefined"==k)return g;if("function"==typeof a.toJSON)return h(a.toJSON(l),b,l);if(a instanceof Date)return'"{FullYear}-{Month+}-{Date}T{Hours}:{Minutes}:{Seconds}Z"'.replace(/\{(\w+)(\+)?\}/g,function(b,d,c){b=a["getUTC"+d]()+(c?1:0);return 10>b?"0"+b:b});if(a.valueOf()!==a)return h(a.valueOf(),b,l);var d=e?b+e:"",n=e?" ":"",p=e?"\n":"";if(a instanceof Array){var n=a.length,r=[];for(l=0;l<n;l++)k=h(a[l],d,l),"string"!=typeof k&&
125
+ (k="null"),r.push(p+d+k);return"["+r.join(",")+p+b+"]"}r=[];for(l in a){var t;if(a.hasOwnProperty(l)){if("number"==typeof l)t='"'+l+'"';else if("string"==typeof l)t=f(l);else continue;k=h(a[l],d,l);"string"==typeof k&&r.push(p+d+t+":"+n+k)}}return"{"+r.join(",")+p+b+"}"}var g;"string"==typeof c&&(e=c,c=null);return h(a,"","")}}})},"dojo/_base/Color":function(){define(["./kernel","./lang","./array","./config"],function(a,k,f,n){var c=a.Color=function(a){a&&this.setColor(a)};c.named={black:[0,0,0],
126
+ silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:n.transparentColor||[0,0,0,0]};k.extend(c,{r:255,g:255,b:255,a:1,_set:function(a,c,f,k){this.r=a;this.g=c;this.b=f;this.a=k},setColor:function(a){k.isString(a)?c.fromString(a,this):k.isArray(a)?c.fromArray(a,this):(this._set(a.r,
127
+ a.g,a.b,a.a),a instanceof c||this.sanitize());return this},sanitize:function(){return this},toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+f.map(["r","g","b"],function(a){a=this[a].toString(16);return 2>a.length?"0"+a:a},this).join("")},toCss:function(a){var c=this.r+", "+this.g+", "+this.b;return(a?"rgba("+c+", "+this.a:"rgb("+c)+")"},toString:function(){return this.toCss(!0)}});c.blendColors=a.blendColors=function(a,
128
+ h,g,k){var b=k||new c;f.forEach(["r","g","b","a"],function(c){b[c]=a[c]+(h[c]-a[c])*g;"a"!=c&&(b[c]=Math.round(b[c]))});return b.sanitize()};c.fromRgb=a.colorFromRgb=function(a,f){var g=a.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return g&&c.fromArray(g[1].split(/\s*,\s*/),f)};c.fromHex=a.colorFromHex=function(a,h){var g=h||new c,k=4==a.length?4:8,b=(1<<k)-1;a=Number("0x"+a.substr(1));if(isNaN(a))return null;f.forEach(["b","g","r"],function(c){var f=a&b;a>>=k;g[c]=4==k?17*f:f});g.a=1;return g};
129
+ c.fromArray=a.colorFromArray=function(a,f){var g=f||new c;g._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));isNaN(g.a)&&(g.a=1);return g.sanitize()};c.fromString=a.colorFromString=function(a,f){var g=c.named[a];return g&&c.fromArray(g,f)||c.fromRgb(a,f)||c.fromHex(a,f)};return c})},"dojo/_base/browser":function(){require.has&&require.has.add("config-selectorEngine","acme");define("../ready ./kernel ./connect ./unload ./window ./event ./html ./NodeList ../query ./xhr ./fx".split(" "),function(a){return a})},
130
+ "dojo/_base/unload":function(){define(["./kernel","./lang","../on"],function(a,k,f){var n=window,c={addOnWindowUnload:function(c,h){a.windowUnloaded||f(n,"unload",a.windowUnloaded=function(){});f(n,"unload",k.hitch(c,h))},addOnUnload:function(a,c){f(n,"beforeunload",k.hitch(a,c))}};a.addOnWindowUnload=c.addOnWindowUnload;a.addOnUnload=c.addOnUnload;return c})},"dojo/_base/html":function(){define("./kernel ../dom ../dom-style ../dom-attr ../dom-prop ../dom-class ../dom-construct ../dom-geometry".split(" "),
131
+ function(a,k,f,n,c,e,h,g){a.byId=k.byId;a.isDescendant=k.isDescendant;a.setSelectable=k.setSelectable;a.getAttr=n.get;a.setAttr=n.set;a.hasAttr=n.has;a.removeAttr=n.remove;a.getNodeProp=n.getNodeProp;a.attr=function(a,b,c){return 2==arguments.length?n["string"==typeof b?"get":"set"](a,b):n.set(a,b,c)};a.hasClass=e.contains;a.addClass=e.add;a.removeClass=e.remove;a.toggleClass=e.toggle;a.replaceClass=e.replace;a._toDom=a.toDom=h.toDom;a.place=h.place;a.create=h.create;a.empty=function(a){h.empty(a)};
132
+ a._destroyElement=a.destroy=function(a){h.destroy(a)};a._getPadExtents=a.getPadExtents=g.getPadExtents;a._getBorderExtents=a.getBorderExtents=g.getBorderExtents;a._getPadBorderExtents=a.getPadBorderExtents=g.getPadBorderExtents;a._getMarginExtents=a.getMarginExtents=g.getMarginExtents;a._getMarginSize=a.getMarginSize=g.getMarginSize;a._getMarginBox=a.getMarginBox=g.getMarginBox;a.setMarginBox=g.setMarginBox;a._getContentBox=a.getContentBox=g.getContentBox;a.setContentSize=g.setContentSize;a._isBodyLtr=
133
+ a.isBodyLtr=g.isBodyLtr;a._docScroll=a.docScroll=g.docScroll;a._getIeDocumentElementOffset=a.getIeDocumentElementOffset=g.getIeDocumentElementOffset;a._fixIeBiDiScrollLeft=a.fixIeBiDiScrollLeft=g.fixIeBiDiScrollLeft;a.position=g.position;a.marginBox=function(a,b){return b?g.setMarginBox(a,b):g.getMarginBox(a)};a.contentBox=function(a,b){return b?g.setContentSize(a,b):g.getContentBox(a)};a.coords=function(c,b){a.deprecated("dojo.coords()","Use dojo.position() or dojo.marginBox().");c=k.byId(c);var e=
134
+ f.getComputedStyle(c),e=g.getMarginBox(c,e),h=g.position(c,b);e.x=h.x;e.y=h.y;return e};a.getProp=c.get;a.setProp=c.set;a.prop=function(a,b,e){return 2==arguments.length?c["string"==typeof b?"get":"set"](a,b):c.set(a,b,e)};a.getStyle=f.get;a.setStyle=f.set;a.getComputedStyle=f.getComputedStyle;a.__toPixelValue=a.toPixelValue=f.toPixelValue;a.style=function(a,b,c){switch(arguments.length){case 1:return f.get(a);case 2:return f["string"==typeof b?"get":"set"](a,b)}return f.set(a,b,c)};return a})},"dojo/dom-attr":function(){define("exports ./sniff ./_base/lang ./dom ./dom-style ./dom-prop".split(" "),
135
+ function(a,k,f,n,c,e){function h(a,c){var e=a.getAttributeNode&&a.getAttributeNode(c);return!!e&&e.specified}var g={innerHTML:1,textContent:1,className:1,htmlFor:k("ie"),value:1},m={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"};a.has=function(a,c){var f=c.toLowerCase();return g[e.names[f]||c]||h(n.byId(a),m[f]||c)};a.get=function(a,c){a=n.byId(a);var k=c.toLowerCase(),d=e.names[k]||c,y=a[d];if(g[d]&&"undefined"!=typeof y)return y;if("textContent"==d)return e.get(a,d);if("href"!=
136
+ d&&("boolean"==typeof y||f.isFunction(y)))return y;k=m[k]||c;return h(a,k)?a.getAttribute(k):null};a.set=function(b,l,h){b=n.byId(b);if(2==arguments.length){for(var d in l)a.set(b,d,l[d]);return b}d=l.toLowerCase();var k=e.names[d]||l,p=g[k];if("style"==k&&"string"!=typeof h)return c.set(b,h),b;if(p||"boolean"==typeof h||f.isFunction(h))return e.set(b,l,h);b.setAttribute(m[d]||l,h);return b};a.remove=function(a,c){n.byId(a).removeAttribute(m[c.toLowerCase()]||c)};a.getNodeProp=function(a,c){a=n.byId(a);
137
+ var f=c.toLowerCase(),d=e.names[f]||c;if(d in a&&"href"!=d)return a[d];f=m[f]||c;return h(a,f)?a.getAttribute(f):null}})},"dojo/dom-prop":function(){define("exports ./_base/kernel ./sniff ./_base/lang ./dom ./dom-style ./dom-construct ./_base/connect".split(" "),function(a,k,f,n,c,e,h,g){function m(a){var b="";a=a.childNodes;for(var c=0,e;e=a[c];c++)8!=e.nodeType&&(b=1==e.nodeType?b+m(e):b+e.nodeValue);return b}var b={},l=0,q=k._scopeName+"attrid";f.add("dom-textContent",function(a,b,c){return"textContent"in
138
+ c});a.names={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",textcontent:"textContent",valuetype:"valueType"};a.get=function(b,e){b=c.byId(b);var g=e.toLowerCase(),g=a.names[g]||e;return"textContent"!=g||f("dom-textContent")?b[g]:m(b)};a.set=function(d,k,m){d=c.byId(d);if(2==arguments.length&&"string"!=typeof k){for(var r in k)a.set(d,r,k[r]);return d}r=k.toLowerCase();r=a.names[r]||k;if("style"==r&&"string"!=
139
+ typeof m)return e.set(d,m),d;if("innerHTML"==r)return f("ie")&&d.tagName.toLowerCase()in{col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1}?(h.empty(d),d.appendChild(h.toDom(m,d.ownerDocument))):d[r]=m,d;if("textContent"==r&&!f("dom-textContent"))return h.empty(d),d.appendChild(d.ownerDocument.createTextNode(m)),d;if(n.isFunction(m)){var t=d[q];t||(t=l++,d[q]=t);b[t]||(b[t]={});var x=b[t][r];if(x)g.disconnect(x);else try{delete d[r]}catch(v){}m?b[t][r]=g.connect(d,r,m):d[r]=null;return d}d[r]=
140
+ m;return d}})},"dojo/dom-construct":function(){define("exports ./_base/kernel ./sniff ./_base/window ./dom ./dom-attr".split(" "),function(a,k,f,n,c,e){function h(a,b){var c=b.parentNode;c&&c.insertBefore(a,b)}function g(a){if("innerHTML"in a)try{a.innerHTML="";return}catch(b){}for(var c;c=a.lastChild;)a.removeChild(c)}var m={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],
141
+ colgroup:["table"],col:["table","colgroup"],li:["ul"]},b=/<\s*([\w\:]+)/,l={},q=0,d="__"+k._scopeName+"ToDomId",y;for(y in m)m.hasOwnProperty(y)&&(k=m[y],k.pre="option"==y?'\x3cselect multiple\x3d"multiple"\x3e':"\x3c"+k.join("\x3e\x3c")+"\x3e",k.post="\x3c/"+k.reverse().join("\x3e\x3c/")+"\x3e");var p;8>=f("ie")&&(p=function(a){a.__dojo_html5_tested="yes";var b=r("div",{innerHTML:"\x3cnav\x3ea\x3c/nav\x3e",style:{visibility:"hidden"}},a.body);1!==b.childNodes.length&&"abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".replace(/\b\w+\b/g,
142
+ function(b){a.createElement(b)});t(b)});a.toDom=function(a,c){c=c||n.doc;var e=c[d];e||(c[d]=e=++q+"",l[e]=c.createElement("div"));8>=f("ie")&&!c.__dojo_html5_tested&&c.body&&p(c);a+="";var g=a.match(b),h=g?g[1].toLowerCase():"",e=l[e];if(g&&m[h])for(g=m[h],e.innerHTML=g.pre+a+g.post,g=g.length;g;--g)e=e.firstChild;else e.innerHTML=a;if(1==e.childNodes.length)return e.removeChild(e.firstChild);for(h=c.createDocumentFragment();g=e.firstChild;)h.appendChild(g);return h};a.place=function(b,d,e){d=c.byId(d);
143
+ "string"==typeof b&&(b=/^\s*</.test(b)?a.toDom(b,d.ownerDocument):c.byId(b));if("number"==typeof e){var f=d.childNodes;!f.length||f.length<=e?d.appendChild(b):h(b,f[0>e?0:e])}else switch(e){case "before":h(b,d);break;case "after":e=b;(f=d.parentNode)&&(f.lastChild==d?f.appendChild(e):f.insertBefore(e,d.nextSibling));break;case "replace":d.parentNode.replaceChild(b,d);break;case "only":a.empty(d);d.appendChild(b);break;case "first":if(d.firstChild){h(b,d.firstChild);break}default:d.appendChild(b)}return b};
144
+ var r=a.create=function(b,d,f,g){var l=n.doc;f&&(f=c.byId(f),l=f.ownerDocument);"string"==typeof b&&(b=l.createElement(b));d&&e.set(b,d);f&&a.place(b,f,g);return b};a.empty=function(a){g(c.byId(a))};var t=a.destroy=function(a){if(a=c.byId(a)){var b=a;a=a.parentNode;b.firstChild&&g(b);a&&(f("ie")&&a.canHaveChildren&&"removeNode"in b?b.removeNode(!1):a.removeChild(b))}}})},"dojo/dom-class":function(){define(["./_base/lang","./_base/array","./dom"],function(a,k,f){function n(a){if("string"==typeof a||
145
+ a instanceof String){if(a&&!e.test(a))return h[0]=a,h;a=a.split(e);a.length&&!a[0]&&a.shift();a.length&&!a[a.length-1]&&a.pop();return a}return a?k.filter(a,function(a){return a}):[]}var c,e=/\s+/,h=[""],g={};return c={contains:function(a,b){return 0<=(" "+f.byId(a).className+" ").indexOf(" "+b+" ")},add:function(a,b){a=f.byId(a);b=n(b);var c=a.className,e,c=c?" "+c+" ":" ";e=c.length;for(var d=0,g=b.length,h;d<g;++d)(h=b[d])&&0>c.indexOf(" "+h+" ")&&(c+=h+" ");e<c.length&&(a.className=c.substr(1,
146
+ c.length-2))},remove:function(c,b){c=f.byId(c);var e;if(void 0!==b){b=n(b);e=" "+c.className+" ";for(var g=0,d=b.length;g<d;++g)e=e.replace(" "+b[g]+" "," ");e=a.trim(e)}else e="";c.className!=e&&(c.className=e)},replace:function(a,b,e){a=f.byId(a);g.className=a.className;c.remove(g,e);c.add(g,b);a.className!==g.className&&(a.className=g.className)},toggle:function(a,b,e){a=f.byId(a);if(void 0===e){b=n(b);for(var g=0,d=b.length,h;g<d;++g)h=b[g],c[c.contains(a,h)?"remove":"add"](a,h)}else c[e?"add":
147
+ "remove"](a,b);return e}}})},"dojo/_base/NodeList":function(){define(["./kernel","../query","./array","./html","../NodeList-dom"],function(a,k,f){k=k.NodeList;var n=k.prototype;n.connect=k._adaptAsForEach(function(){return a.connect.apply(this,arguments)});n.coords=k._adaptAsMap(a.coords);k.events="blur focus change click error keydown keypress keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup submit".split(" ");f.forEach(k.events,function(a){var e="on"+a;n[e]=function(a,
148
+ c){return this.connect(e,a,c)}});return a.NodeList=k})},"dojo/query":function(){define("./_base/kernel ./has ./dom ./on ./_base/array ./_base/lang ./selector/_loader ./selector/_loader!default".split(" "),function(a,k,f,n,c,e,h,g){function m(a,b){var d=function(c,d){if("string"==typeof d&&(d=f.byId(d),!d))return new b([]);var e="string"==typeof c?a(c,d):c?c.end&&c.on?c:[c]:[];return e.end&&e.on?e:new b(e)};d.matches=a.match||function(a,b,c){return 0<d.filter([a],b,c).length};d.filter=a.filter||function(a,
149
+ b,e){return d(b,e).filter(function(b){return-1<c.indexOf(a,b)})};if("function"!=typeof a){var e=a.search;a=function(a,b){return e(b||document,a)}}return d}k.add("array-extensible",function(){return 1==e.delegate([],{length:1}).length&&!k("bug-for-in-skips-shadowed")});var b=Array.prototype,l=b.slice,q=b.concat,d=c.forEach,y=function(b,c,d){c=[0].concat(l.call(c,0));d=d||a.global;return function(a){c[0]=a;return b.apply(d,c)}},p=function(a){var b=this instanceof r&&k("array-extensible");"number"==
150
+ typeof a&&(a=Array(a));var c=a&&"length"in a?a:arguments;if(b||!c.sort){for(var d=b?this:[],f=d.length=c.length,g=0;g<f;g++)d[g]=c[g];if(b)return d;c=d}e._mixin(c,t);c._NodeListCtor=function(a){return r(a)};return c},r=p,t=r.prototype=k("array-extensible")?[]:{};r._wrap=t._wrap=function(a,b,c){a=new (c||this._NodeListCtor||r)(a);return b?a._stash(b):a};r._adaptAsMap=function(a,b){return function(){return this.map(y(a,arguments,b))}};r._adaptAsForEach=function(a,b){return function(){this.forEach(y(a,
151
+ arguments,b));return this}};r._adaptAsFilter=function(a,b){return function(){return this.filter(y(a,arguments,b))}};r._adaptWithCondition=function(b,c,d){return function(){var e=arguments,f=y(b,e,d);if(c.call(d||a.global,e))return this.map(f);this.forEach(f);return this}};d(["slice","splice"],function(a){var c=b[a];t[a]=function(){return this._wrap(c.apply(this,arguments),"slice"==a?this:null)}});d(["indexOf","lastIndexOf","every","some"],function(b){var d=c[b];t[b]=function(){return d.apply(a,[this].concat(l.call(arguments,
152
+ 0)))}});e.extend(p,{constructor:r,_NodeListCtor:r,toString:function(){return this.join(",")},_stash:function(a){this._parent=a;return this},on:function(a,b){var c=this.map(function(c){return n(c,a,b)});c.remove=function(){for(var a=0;a<c.length;a++)c[a].remove()};return c},end:function(){return this._parent?this._parent:new this._NodeListCtor(0)},concat:function(a){var b=l.call(this,0),d=c.map(arguments,function(a){return l.call(a,0)});return this._wrap(q.apply(b,d),this)},map:function(a,b){return this._wrap(c.map(this,
153
+ a,b),this)},forEach:function(a,b){d(this,a,b);return this},filter:function(a){var b=arguments,d=this,e=0;if("string"==typeof a){d=x._filterResult(this,b[0]);if(1==b.length)return d._stash(this);e=1}return this._wrap(c.filter(d,b[e],b[e+1]),this)},instantiate:function(a,b){var c=e.isFunction(a)?a:e.getObject(a);b=b||{};return this.forEach(function(a){new c(b,a)})},at:function(){var a=new this._NodeListCtor(0);d(arguments,function(b){0>b&&(b=this.length+b);this[b]&&a.push(this[b])},this);return a._stash(this)}});
154
+ var x=m(g,p);a.query=m(g,function(a){return p(a)});x.load=function(a,b,c){h.load(a,b,function(a){c(m(a,p))})};a._filterQueryResult=x._filterResult=function(a,b,c){return new p(x.filter(a,b,c))};a.NodeList=x.NodeList=p;return x})},"dojo/selector/_loader":function(){define(["../has","require"],function(a,k){var f=document.createElement("div");a.add("dom-qsa2.1",!!f.querySelectorAll);a.add("dom-qsa3",function(){try{return f.innerHTML="\x3cp class\x3d'TEST'\x3e\x3c/p\x3e",1==f.querySelectorAll(".TEST:empty").length}catch(a){}});
155
+ var n;return{load:function(c,e,f,g){g=k;c="default"==c?a("config-selectorEngine")||"css3":c;c="css2"==c||"lite"==c?"./lite":"css2.1"==c?a("dom-qsa2.1")?"./lite":"./acme":"css3"==c?a("dom-qsa3")?"./lite":"./acme":"acme"==c?"./acme":(g=e)&&c;if("?"==c.charAt(c.length-1)){c=c.substring(0,c.length-1);var m=!0}if(m&&(a("dom-compliant-qsa")||n))return f(n);g([c],function(a){"./lite"!=c&&(n=a);f(a)})}}})},"dojo/selector/acme":function(){define(["../dom","../sniff","../_base/array","../_base/lang","../_base/window"],
156
+ function(a,k,f,n,c){var e=n.trim,h=f.forEach,g="BackCompat"==c.doc.compatMode,m=!1,b=function(){return!0},l=function(a){a=0<="\x3e~+".indexOf(a.slice(-1))?a+" * ":a+" ";for(var b=function(b,c){return e(a.slice(b,c))},c=[],d=-1,f=-1,g=-1,h=-1,l=-1,k=-1,n=-1,q,t="",v="",D,p=0,N=a.length,r=null,u=null,x=function(){0<=k&&(r.id=b(k,p).replace(/\\/g,""),k=-1);if(0<=n){var a=n==p?null:b(n,p);r[0>"\x3e~+".indexOf(a)?"tag":"oper"]=a;n=-1}0<=l&&(r.classes.push(b(l+1,p).replace(/\\/g,"")),l=-1)};t=v,v=a.charAt(p),
157
+ p<N;p++)"\\"!=t&&(r||(D=p,r={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return m?this.otag:this.tag}},n=p),q?v==q&&(q=null):"'"==v||'"'==v?q=v:0<=d?"]"==v?(u.attr?u.matchFor=b(g||d+1,p):u.attr=b(d+1,p),!(d=u.matchFor)||'"'!=d.charAt(0)&&"'"!=d.charAt(0)||(u.matchFor=d.slice(1,-1)),u.matchFor&&(u.matchFor=u.matchFor.replace(/\\/g,"")),r.attrs.push(u),u=null,d=g=-1):"\x3d"==v&&(g=0<="|~^$*".indexOf(t)?t:"",u.type=g+v,u.attr=b(d+1,p-g.length),g=p+1):0<=f?")"==
158
+ v&&(0<=h&&(u.value=b(f+1,p)),h=f=-1):"#"==v?(x(),k=p+1):"."==v?(x(),l=p):":"==v?(x(),h=p):"["==v?(x(),d=p,u={}):"("==v?(0<=h&&(u={name:b(h+1,p),value:null},r.pseudos.push(u)),f=p):" "==v&&t!=v&&(x(),0<=h&&r.pseudos.push({name:b(h+1,p)}),r.loops=r.pseudos.length||r.attrs.length||r.classes.length,r.oquery=r.query=b(D,p),r.otag=r.tag=r.oper?null:r.tag||"*",r.tag&&(r.tag=r.tag.toUpperCase()),c.length&&c[c.length-1].oper&&(r.infixOper=c.pop(),r.query=r.infixOper.query+" "+r.query),c.push(r),r=null));return c},
159
+ q=function(a,b){return a?b?function(){return a.apply(window,arguments)&&b.apply(window,arguments)}:a:b},d=function(a,b){var c=b||[];a&&c.push(a);return c},y=function(a){return 1==a.nodeType},p=function(a,b){return a?"class"==b?a.className||"":"for"==b?a.htmlFor||"":"style"==b?a.style.cssText||"":(m?a.getAttribute(b):a.getAttribute(b,2))||"":""},r={"*\x3d":function(a,b){return function(c){return 0<=p(c,a).indexOf(b)}},"^\x3d":function(a,b){return function(c){return 0==p(c,a).indexOf(b)}},"$\x3d":function(a,
160
+ b){return function(c){c=" "+p(c,a);var d=c.lastIndexOf(b);return-1<d&&d==c.length-b.length}},"~\x3d":function(a,b){var c=" "+b+" ";return function(b){return 0<=(" "+p(b,a)+" ").indexOf(c)}},"|\x3d":function(a,b){var c=b+"-";return function(d){d=p(d,a);return d==b||0==d.indexOf(c)}},"\x3d":function(a,b){return function(c){return p(c,a)==b}}},t="undefined"==typeof c.doc.firstChild.nextElementSibling,x=t?"nextSibling":"nextElementSibling",v=t?"previousSibling":"previousElementSibling",u=t?y:b,z=function(a){for(;a=
161
+ a[v];)if(u(a))return!1;return!0},w=function(a){for(;a=a[x];)if(u(a))return!1;return!0},D=function(a){var b=a.parentNode,b=7!=b.nodeType?b:b.nextSibling,c=0,d=b.children||b.childNodes,e=a._i||a.getAttribute("_i")||-1,f=b._l||("undefined"!==typeof b.getAttribute?b.getAttribute("_l"):-1);if(!d)return-1;d=d.length;if(f==d&&0<=e&&0<=f)return e;k("ie")&&"undefined"!==typeof b.setAttribute?b.setAttribute("_l",d):b._l=d;e=-1;for(b=b.firstElementChild||b.firstChild;b;b=b[x])u(b)&&(k("ie")?b.setAttribute("_i",
162
+ ++c):b._i=++c,a===b&&(e=c));return e},N=function(a){return!(D(a)%2)},X=function(a){return D(a)%2},R={checked:function(a,b){return function(a){return!("checked"in a?!a.checked:!a.selected)}},disabled:function(a,b){return function(a){return a.disabled}},enabled:function(a,b){return function(a){return!a.disabled}},"first-child":function(){return z},"last-child":function(){return w},"only-child":function(a,b){return function(a){return z(a)&&w(a)}},empty:function(a,b){return function(a){var b=a.childNodes;
163
+ for(a=a.childNodes.length-1;0<=a;a--){var c=b[a].nodeType;if(1===c||3==c)return!1}return!0}},contains:function(a,b){var c=b.charAt(0);if('"'==c||"'"==c)b=b.slice(1,-1);return function(a){return 0<=a.innerHTML.indexOf(b)}},not:function(a,b){var c=l(b)[0],d={el:1};"*"!=c.tag&&(d.tag=1);c.classes.length||(d.classes=1);var e=O(c,d);return function(a){return!e(a)}},"nth-child":function(a,b){var c=parseInt;if("odd"==b)return X;if("even"==b)return N;if(-1!=b.indexOf("n")){var d=b.split("n",2),e=d[0]?"-"==
164
+ d[0]?-1:c(d[0]):1,f=d[1]?c(d[1]):0,g=0,h=-1;0<e?0>f?f=f%e&&e+f%e:0<f&&(f>=e&&(g=f-f%e),f%=e):0>e&&(e*=-1,0<f&&(h=f,f%=e));if(0<e)return function(a){a=D(a);return a>=g&&(0>h||a<=h)&&a%e==f};b=f}var l=c(b);return function(a){return D(a)==l}}},P=9>k("ie")||9==k("ie")&&k("quirks")?function(a){var b=a.toLowerCase();"class"==b&&(a="className");return function(c){return m?c.getAttribute(a):c[a]||c[b]}}:function(a){return function(b){return b&&b.getAttribute&&b.hasAttribute(a)}},O=function(a,c){if(!a)return b;
165
+ c=c||{};var d=null;"el"in c||(d=q(d,y));"tag"in c||"*"!=a.tag&&(d=q(d,function(b){return b&&(m?b.tagName:b.tagName.toUpperCase())==a.getTag()}));"classes"in c||h(a.classes,function(a,b,c){var e=new RegExp("(?:^|\\s)"+a+"(?:\\s|$)");d=q(d,function(a){return e.test(a.className)});d.count=b});"pseudos"in c||h(a.pseudos,function(a){var b=a.name;R[b]&&(d=q(d,R[b](b,a.value)))});"attrs"in c||h(a.attrs,function(a){var b,c=a.attr;a.type&&r[a.type]?b=r[a.type](c,a.matchFor):c.length&&(b=P(c));b&&(d=q(d,b))});
166
+ "id"in c||a.id&&(d=q(d,function(b){return!!b&&b.id==a.id}));d||"default"in c||(d=b);return d},S=function(a){return function(b,c,d){for(;b=b[x];)if(!t||y(b)){d&&!W(b,d)||!a(b)||c.push(b);break}return c}},I=function(a){return function(b,c,d){for(b=b[x];b;){if(u(b)){if(d&&!W(b,d))break;a(b)&&c.push(b)}b=b[x]}return c}},J=function(a){a=a||b;return function(b,c,d){for(var e=0,f=b.children||b.childNodes;b=f[e++];)u(b)&&(!d||W(b,d))&&a(b,e)&&c.push(b);return c}},Q={},E=function(e){var f=Q[e.query];if(f)return f;
167
+ var h=e.infixOper,h=h?h.oper:"",l=O(e,{el:1}),k="*"==e.tag,m=c.doc.getElementsByClassName;if(h)m={el:1},k&&(m.tag=1),l=O(e,m),"+"==h?f=S(l):"~"==h?f=I(l):"\x3e"==h&&(f=J(l));else if(e.id)l=!e.loops&&k?b:O(e,{el:1,id:1}),f=function(b,c){var f=a.byId(e.id,b.ownerDocument||b);if(f&&l(f)){if(9==b.nodeType)return d(f,c);for(var g=f.parentNode;g&&g!=b;)g=g.parentNode;if(g)return d(f,c)}};else if(m&&/\{\s*\[native code\]\s*\}/.test(String(m))&&e.classes.length&&!g)var l=O(e,{el:1,classes:1,id:1}),n=e.classes.join(" "),
168
+ f=function(a,b,c){b=d(0,b);for(var e,f=0,g=a.getElementsByClassName(n);e=g[f++];)l(e,a)&&W(e,c)&&b.push(e);return b};else k||e.loops?(l=O(e,{el:1,tag:1,id:1}),f=function(a,b,c){b=d(0,b);for(var f,g=0,h=(f=e.getTag())?a.getElementsByTagName(f):[];f=h[g++];)l(f,a)&&W(f,c)&&b.push(f);return b}):f=function(a,b,c){b=d(0,b);for(var f=0,g=e.getTag(),g=g?a.getElementsByTagName(g):[];a=g[f++];)W(a,c)&&b.push(a);return b};return Q[e.query]=f},A={},C={},H=function(a){var b=l(e(a));if(1==b.length){var c=E(b[0]);
169
+ return function(a){if(a=c(a,[]))a.nozip=!0;return a}}return function(a){a=d(a);for(var c,e,f=b.length,g,h,l=0;l<f;l++){h=[];c=b[l];e=a.length-1;0<e&&(g={},h.nozip=!0);e=E(c);for(var k=0;c=a[k];k++)e(c,h,g);if(!h.length)break;a=h}return h}},ea=k("ie")?"commentStrip":"nozip",K=!!c.doc.querySelectorAll,B=/\\[>~+]|n\+\d|([^ \\])?([>~+])([^ =])?/g,L=function(a,b,c,d){return c?(b?b+" ":"")+c+(d?" "+d:""):a},F=/([^[]*)([^\]]*])?/g,G=function(a,b,c){return b.replace(B,L)+(c||"")},V=function(a,b){a=a.replace(F,
170
+ G);if(K){var c=C[a];if(c&&!b)return c}if(c=A[a])return c;var c=a.charAt(0),d=-1==a.indexOf(" ");0<=a.indexOf("#")&&d&&(b=!0);if(!K||b||-1!="\x3e~+".indexOf(c)||k("ie")&&-1!=a.indexOf(":")||g&&0<=a.indexOf(".")||-1!=a.indexOf(":contains")||-1!=a.indexOf(":checked")||-1!=a.indexOf("|\x3d")){var e=a.match(/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g);return A[a]=2>e.length?H(a):function(a){for(var b=0,c=[],d;d=e[b++];)c=c.concat(H(d)(a));return c}}var f=0<="\x3e~+".indexOf(a.charAt(a.length-
171
+ 1))?a+" *":a;return C[a]=function(b){try{if(9!=b.nodeType&&!d)throw"";var c=b.querySelectorAll(f);c[ea]=!0;return c}catch(e){return V(a,!0)(b)}}},M=0,aa=k("ie")?function(a){return m?a.getAttribute("_uid")||a.setAttribute("_uid",++M)||M:a.uniqueID}:function(a){return a._uid||(a._uid=++M)},W=function(a,b){if(!b)return 1;var c=aa(a);return b[c]?0:b[c]=1},ba=function(a){if(a&&a.nozip)return a;if(!a||!a.length)return[];if(2>a.length)return[a[0]];var b=[];M++;var c,d;if(k("ie")&&m){var e=M+"";for(c=0;c<
172
+ a.length;c++)(d=a[c])&&d.getAttribute("_zipIdx")!=e&&(b.push(d),d.setAttribute("_zipIdx",e))}else if(k("ie")&&a.commentStrip)try{for(c=0;c<a.length;c++)(d=a[c])&&y(d)&&b.push(d)}catch(f){}else for(c=0;c<a.length;c++)(d=a[c])&&d._zipIdx!=M&&(b.push(d),d._zipIdx=M);return b},ca=function(a,b){b=b||c.doc;m="div"===(b.ownerDocument||b).createElement("div").tagName;var d=V(a)(b);return d&&d.nozip?d:ba(d)};ca.filter=function(b,c,d){for(var e=[],g=l(c),g=1!=g.length||/[^\w#\.]/.test(c)?function(b){return-1!=
173
+ f.indexOf(ca(c,a.byId(d)),b)}:O(g[0]),h=0,k;k=b[h];h++)g(k)&&e.push(k);return e};return ca})},"dojo/NodeList-dom":function(){define("./_base/kernel ./query ./_base/array ./_base/lang ./dom-class ./dom-construct ./dom-geometry ./dom-attr ./dom-style".split(" "),function(a,k,f,n,c,e,h,g,m){function b(a){return function(b,c,d){return 2==arguments.length?a["string"==typeof c?"get":"set"](b,c):a.set(b,c,d)}}var l=function(a){return 1==a.length&&"string"==typeof a[0]},q=function(a){var b=a.parentNode;b&&
174
+ b.removeChild(a)},d=k.NodeList,y=d._adaptWithCondition,p=d._adaptAsForEach,r=d._adaptAsMap;n.extend(d,{_normalize:function(b,c){var d=!0===b.parse;if("string"==typeof b.template){var f=b.templateFunc||a.string&&a.string.substitute;b=f?f(b.template,b):b}f=typeof b;"string"==f||"number"==f?(b=e.toDom(b,c&&c.ownerDocument),b=11==b.nodeType?n._toArray(b.childNodes):[b]):n.isArrayLike(b)?n.isArray(b)||(b=n._toArray(b)):b=[b];d&&(b._runParse=!0);return b},_cloneNode:function(a){return a.cloneNode(!0)},
175
+ _place:function(b,c,d,f){if(1==c.nodeType||"only"!=d)for(var g,h=b.length,l=h-1;0<=l;l--){var k=f?this._cloneNode(b[l]):b[l];if(b._runParse&&a.parser&&a.parser.parse)for(g||(g=c.ownerDocument.createElement("div")),g.appendChild(k),a.parser.parse(g),k=g.firstChild;g.firstChild;)g.removeChild(g.firstChild);l==h-1?e.place(k,c,d):c.parentNode.insertBefore(k,c);c=k}},position:r(h.position),attr:y(b(g),l),style:y(b(m),l),addClass:p(c.add),removeClass:p(c.remove),toggleClass:p(c.toggle),replaceClass:p(c.replace),
176
+ empty:p(e.empty),removeAttr:p(g.remove),marginBox:r(h.getMarginBox),place:function(a,b){var c=k(a)[0];return this.forEach(function(a){e.place(a,c,b)})},orphan:function(a){return(a?k._filterResult(this,a):this).forEach(q)},adopt:function(a,b){return k(a).place(this[0],b)._stash(this)},query:function(a){if(!a)return this;var b=new d;this.map(function(c){k(a,c).forEach(function(a){void 0!==a&&b.push(a)})});return b._stash(this)},filter:function(a){var b=arguments,c=this,d=0;if("string"==typeof a){c=
177
+ k._filterResult(this,b[0]);if(1==b.length)return c._stash(this);d=1}return this._wrap(f.filter(c,b[d],b[d+1]),this)},addContent:function(a,b){a=this._normalize(a,this[0]);for(var c=0,d;d=this[c];c++)a.length?this._place(a,d,b,0<c):e.empty(d);return this}});return d})},"dojo/_base/xhr":function(){define("./kernel ./sniff require ../io-query ../dom ../dom-form ./Deferred ./config ./json ./lang ./array ../on ../aspect ../request/watch ../request/xhr ../request/util".split(" "),function(a,k,f,n,c,e,h,
178
+ g,m,b,l,q,d,y,p,r){a._xhrObj=p._create;var t=a.config;a.objectToQuery=n.objectToQuery;a.queryToObject=n.queryToObject;a.fieldToObject=e.fieldToObject;a.formToObject=e.toObject;a.formToQuery=e.toQuery;a.formToJson=e.toJson;a._blockAsync=!1;var x=a._contentHandlers=a.contentHandlers={text:function(a){return a.responseText},json:function(a){return m.fromJson(a.responseText||null)},"json-comment-filtered":function(a){a=a.responseText;var b=a.indexOf("/*"),c=a.lastIndexOf("*/");if(-1==b||-1==c)throw Error("JSON was not comment filtered");
179
+ return m.fromJson(a.substring(b+2,c))},javascript:function(b){return a.eval(b.responseText)},xml:function(a){var b=a.responseXML;b&&k("dom-qsa2.1")&&!b.querySelectorAll&&k("dom-parser")&&(b=(new DOMParser).parseFromString(a.responseText,"application/xml"));if(k("ie")&&(!b||!b.documentElement)){var c=function(a){return"MSXML"+a+".DOMDocument"},c=["Microsoft.XMLDOM",c(6),c(4),c(3),c(2)];l.some(c,function(c){try{var d=new ActiveXObject(c);d.async=!1;d.loadXML(a.responseText);b=d}catch(e){return!1}return!0})}return b},
180
+ "json-comment-optional":function(a){return a.responseText&&/^[^{\[]*\/\*/.test(a.responseText)?x["json-comment-filtered"](a):x.json(a)}};a._ioSetArgs=function(d,f,g,l){var k={args:d,url:d.url},m=null;if(d.form){var m=c.byId(d.form),q=m.getAttributeNode("action");k.url=k.url||(q?q.value:null);m=e.toObject(m)}q=[{}];m&&q.push(m);d.content&&q.push(d.content);d.preventCache&&q.push({"dojo.preventCache":(new Date).valueOf()});k.query=n.objectToQuery(b.mixin.apply(null,q));k.handleAs=d.handleAs||"text";
181
+ var p=new h(function(a){a.canceled=!0;f&&f(a);var b=a.ioArgs.error;b||(b=Error("request cancelled"),b.dojoType="cancel",a.ioArgs.error=b);return b});p.addCallback(g);var r=d.load;r&&b.isFunction(r)&&p.addCallback(function(a){return r.call(d,a,k)});var v=d.error;v&&b.isFunction(v)&&p.addErrback(function(a){return v.call(d,a,k)});var u=d.handle;u&&b.isFunction(u)&&p.addBoth(function(a){return u.call(d,a,k)});p.addErrback(function(a){return l(a,p)});t.ioPublish&&a.publish&&!1!==k.args.ioPublish&&(p.addCallbacks(function(b){a.publish("/dojo/io/load",
182
+ [p,b]);return b},function(b){a.publish("/dojo/io/error",[p,b]);return b}),p.addBoth(function(b){a.publish("/dojo/io/done",[p,b]);return b}));p.ioArgs=k;return p};var v=function(a){a=x[a.ioArgs.handleAs](a.ioArgs.xhr);return void 0===a?null:a},u=function(a,b){return a},z=function(b){0>=w&&(w=0,t.ioPublish&&a.publish&&(!b||b&&!1!==b.ioArgs.args.ioPublish)&&a.publish("/dojo/io/stop"))},w=0;d.after(y,"_onAction",function(){--w});d.after(y,"_onInFlight",z);a._ioCancelAll=y.cancelAll;a._ioNotifyStart=function(b){t.ioPublish&&
183
+ a.publish&&!1!==b.ioArgs.args.ioPublish&&(w||a.publish("/dojo/io/start"),w+=1,a.publish("/dojo/io/send",[b]))};a._ioWatch=function(a,c,d,e){a.ioArgs.options=a.ioArgs.args;b.mixin(a,{response:a.ioArgs,isValid:function(b){return c(a)},isReady:function(b){return d(a)},handleResponse:function(b){return e(a)}});y(a);z(a)};a._ioAddQueryToUrl=function(a){a.query.length&&(a.url+=(-1==a.url.indexOf("?")?"?":"\x26")+a.query,a.query=null)};a.xhr=function(b,c,d){var e,f=a._ioSetArgs(c,function(a){e&&e.cancel()},
184
+ v,u),g=f.ioArgs;"postData"in c?g.query=c.postData:"putData"in c?g.query=c.putData:"rawBody"in c?g.query=c.rawBody:(2<arguments.length&&!d||-1==="POST|PUT".indexOf(b.toUpperCase()))&&a._ioAddQueryToUrl(g);var h={method:b,handleAs:"text",timeout:c.timeout,withCredentials:c.withCredentials,ioArgs:g};"undefined"!==typeof c.headers&&(h.headers=c.headers);"undefined"!==typeof c.contentType&&(h.headers||(h.headers={}),h.headers["Content-Type"]=c.contentType);"undefined"!==typeof g.query&&(h.data=g.query);
185
+ "undefined"!==typeof c.sync&&(h.sync=c.sync);a._ioNotifyStart(f);try{e=p(g.url,h,!0)}catch(l){return f.cancel(),f}f.ioArgs.xhr=e.response.xhr;e.then(function(){f.resolve(f)}).otherwise(function(a){g.error=a;a.response&&(a.status=a.response.status,a.responseText=a.response.text,a.xhr=a.response.xhr);f.reject(a)});return f};a.xhrGet=function(b){return a.xhr("GET",b)};a.rawXhrPost=a.xhrPost=function(b){return a.xhr("POST",b,!0)};a.rawXhrPut=a.xhrPut=function(b){return a.xhr("PUT",b,!0)};a.xhrDelete=
186
+ function(b){return a.xhr("DELETE",b)};a._isDocumentOk=function(a){return r.checkStatus(a.status)};a._getText=function(b){var c;a.xhrGet({url:b,sync:!0,load:function(a){c=a}});return c};b.mixin(a.xhr,{_xhrObj:a._xhrObj,fieldToObject:e.fieldToObject,formToObject:e.toObject,objectToQuery:n.objectToQuery,formToQuery:e.toQuery,formToJson:e.toJson,queryToObject:n.queryToObject,contentHandlers:x,_ioSetArgs:a._ioSetArgs,_ioCancelAll:a._ioCancelAll,_ioNotifyStart:a._ioNotifyStart,_ioWatch:a._ioWatch,_ioAddQueryToUrl:a._ioAddQueryToUrl,
187
+ _isDocumentOk:a._isDocumentOk,_getText:a._getText,get:a.xhrGet,post:a.xhrPost,put:a.xhrPut,del:a.xhrDelete});return a.xhr})},"dojo/io-query":function(){define(["./_base/lang"],function(a){var k={};return{objectToQuery:function(f){var n=encodeURIComponent,c=[],e;for(e in f){var h=f[e];if(h!=k[e]){var g=n(e)+"\x3d";if(a.isArray(h))for(var m=0,b=h.length;m<b;++m)c.push(g+n(h[m]));else c.push(g+n(h))}}return c.join("\x26")},queryToObject:function(f){var k=decodeURIComponent;f=f.split("\x26");for(var c=
188
+ {},e,h,g=0,m=f.length;g<m;++g)if(h=f[g],h.length){var b=h.indexOf("\x3d");0>b?(e=k(h),h=""):(e=k(h.slice(0,b)),h=k(h.slice(b+1)));"string"==typeof c[e]&&(c[e]=[c[e]]);a.isArray(c[e])?c[e].push(h):c[e]=h}return c}}})},"dojo/dom-form":function(){define(["./_base/lang","./dom","./io-query","./json"],function(a,k,f,n){var c={fieldToObject:function(a){var c=null;if(a=k.byId(a)){var f=a.name,m=(a.type||"").toLowerCase();if(f&&m&&!a.disabled)if("radio"==m||"checkbox"==m)a.checked&&(c=a.value);else if(a.multiple)for(c=
189
+ [],a=[a.firstChild];a.length;)for(f=a.pop();f;f=f.nextSibling)if(1==f.nodeType&&"option"==f.tagName.toLowerCase())f.selected&&c.push(f.value);else{f.nextSibling&&a.push(f.nextSibling);f.firstChild&&a.push(f.firstChild);break}else c=a.value}return c},toObject:function(e){var f={};e=k.byId(e).elements;for(var g=0,m=e.length;g<m;++g){var b=e[g],l=b.name,n=(b.type||"").toLowerCase();if(l&&n&&0>"file|submit|image|reset|button".indexOf(n)&&!b.disabled){var d=f,y=l,b=c.fieldToObject(b);if(null!==b){var p=
190
+ d[y];"string"==typeof p?d[y]=[p,b]:a.isArray(p)?p.push(b):d[y]=b}"image"==n&&(f[l+".x"]=f[l+".y"]=f[l].x=f[l].y=0)}}return f},toQuery:function(a){return f.objectToQuery(c.toObject(a))},toJson:function(a,f){return n.stringify(c.toObject(a),null,f?4:0)}};return c})},"dojo/request/watch":function(){define("./util ../errors/RequestTimeoutError ../errors/CancelError ../_base/array ../_base/window ../has!host-browser?dom-addeventlistener?:../on:".split(" "),function(a,k,f,n,c,e){function h(){for(var a=
191
+ +new Date,c=0,d;c<b.length&&(d=b[c]);c++){var e=d.response,f=e.options;d.isCanceled&&d.isCanceled()||d.isValid&&!d.isValid(e)?(b.splice(c--,1),g._onAction&&g._onAction()):d.isReady&&d.isReady(e)?(b.splice(c--,1),d.handleResponse(e),g._onAction&&g._onAction()):d.startTime&&d.startTime+(f.timeout||0)<a&&(b.splice(c--,1),d.cancel(new k("Timeout exceeded",e)),g._onAction&&g._onAction())}g._onInFlight&&g._onInFlight(d);b.length||(clearInterval(m),m=null)}function g(a){a.response.options.timeout&&(a.startTime=
192
+ +new Date);a.isFulfilled()||(b.push(a),m||(m=setInterval(h,50)),a.response.options.sync&&h())}var m=null,b=[];g.cancelAll=function(){try{n.forEach(b,function(a){try{a.cancel(new f("All requests canceled."))}catch(b){}})}catch(a){}};c&&e&&c.doc.attachEvent&&e(c.global,"unload",function(){g.cancelAll()});return g})},"dojo/request/util":function(){define("exports ../errors/RequestError ../errors/CancelError ../Deferred ../io-query ../_base/array ../_base/lang ../promise/Promise".split(" "),function(a,
193
+ k,f,n,c,e,h,g){function m(a){return l(a)}function b(a){return a.data||a.text}a.deepCopy=function(b,c){for(var e in c){var f=b[e],g=c[e];f!==g&&(f&&"object"===typeof f&&g&&"object"===typeof g?a.deepCopy(f,g):b[e]=g)}return b};a.deepCreate=function(b,c){c=c||{};var e=h.delegate(b),f,g;for(f in b)(g=b[f])&&"object"===typeof g&&(e[f]=a.deepCreate(g,c[f]));return a.deepCopy(e,c)};var l=Object.freeze||function(a){return a};a.deferred=function(c,d,e,p,r,t){var x=new n(function(a){d&&d(x,c);return a&&(a instanceof
194
+ k||a instanceof f)?a:new f("Request canceled",c)});x.response=c;x.isValid=e;x.isReady=p;x.handleResponse=r;e=x.then(m).otherwise(function(a){a.response=c;throw a;});a.notify&&e.then(h.hitch(a.notify,"emit","load"),h.hitch(a.notify,"emit","error"));p=e.then(b);r=new g;for(var v in p)p.hasOwnProperty(v)&&(r[v]=p[v]);r.response=e;l(r);t&&x.then(function(a){t.call(x,a)},function(a){t.call(x,c,a)});x.promise=r;x.then=r.then;return x};a.addCommonMethods=function(a,b){e.forEach(b||["GET","POST","PUT","DELETE"],
195
+ function(b){a[("DELETE"===b?"DEL":b).toLowerCase()]=function(c,d){d=h.delegate(d||{});d.method=b;return a(c,d)}})};a.parseArgs=function(a,b,e){var f=b.data,g=b.query;f&&!e&&"object"===typeof f&&(b.data=c.objectToQuery(f));g?("object"===typeof g&&(g=c.objectToQuery(g)),b.preventCache&&(g+=(g?"\x26":"")+"request.preventCache\x3d"+ +new Date)):b.preventCache&&(g="request.preventCache\x3d"+ +new Date);a&&g&&(a+=(~a.indexOf("?")?"\x26":"?")+g);return{url:a,options:b,getHeader:function(a){return null}}};
196
+ a.checkStatus=function(a){a=a||0;return 200<=a&&300>a||304===a||1223===a||!a}})},"dojo/errors/RequestError":function(){define(["./create"],function(a){return a("RequestError",function(a,f){this.response=f})})},"dojo/errors/RequestTimeoutError":function(){define(["./create","./RequestError"],function(a,k){return a("RequestTimeoutError",null,k,{dojoType:"timeout"})})},"dojo/request/xhr":function(){define(["../errors/RequestError","./watch","./handlers","./util","../has"],function(a,k,f,n,c){function e(b,
197
+ c){var d=b.xhr;b.status=b.xhr.status;try{b.text=d.responseText}catch(e){}"xml"===b.options.handleAs&&(b.data=d.responseXML);if(!c)try{f(b)}catch(e){c=e}c?this.reject(c):n.checkStatus(d.status)?this.resolve(b):(c=new a("Unable to load "+b.url+" status: "+d.status,b),this.reject(c))}function h(a){return this.xhr.getResponseHeader(a)}function g(f,t,x){var v=c("native-formdata")&&t&&t.data&&t.data instanceof FormData,u=n.parseArgs(f,n.deepCreate(p,t),v);f=u.url;t=u.options;var z,w=n.deferred(u,d,b,l,
198
+ e,function(){z&&z()}),D=u.xhr=g._create();if(!D)return w.cancel(new a("XHR was not created")),x?w:w.promise;u.getHeader=h;q&&(z=q(D,w,u));var N=t.data,X=!t.sync,R=t.method;try{D.open(R,f,X,t.user||y,t.password||y);t.withCredentials&&(D.withCredentials=t.withCredentials);c("native-response-type")&&t.handleAs in m&&(D.responseType=m[t.handleAs]);var P=t.headers;f=v?!1:"application/x-www-form-urlencoded";if(P)for(var O in P)"content-type"===O.toLowerCase()?f=P[O]:P[O]&&D.setRequestHeader(O,P[O]);f&&
199
+ !1!==f&&D.setRequestHeader("Content-Type",f);P&&"X-Requested-With"in P||D.setRequestHeader("X-Requested-With","XMLHttpRequest");n.notify&&n.notify.emit("send",u,w.promise.cancel);D.send(N)}catch(S){w.reject(S)}k(w);D=null;return x?w:w.promise}c.add("native-xhr",function(){return"undefined"!==typeof XMLHttpRequest});c.add("dojo-force-activex-xhr",function(){return c("activex")&&!document.addEventListener&&"file:"===window.location.protocol});c.add("native-xhr2",function(){if(c("native-xhr")){var a=
200
+ new XMLHttpRequest;return"undefined"!==typeof a.addEventListener&&("undefined"===typeof opera||"undefined"!==typeof a.upload)}});c.add("native-formdata",function(){return"undefined"!==typeof FormData});c.add("native-response-type",function(){return c("native-xhr")&&"undefined"!==typeof(new XMLHttpRequest).responseType});c.add("native-xhr2-blob",function(){if(c("native-response-type")){var a=new XMLHttpRequest;a.open("GET","/",!0);a.responseType="blob";var b=a.responseType;a.abort();return"blob"===
201
+ b}});var m={blob:c("native-xhr2-blob")?"blob":"arraybuffer",document:"document",arraybuffer:"arraybuffer"},b,l,q,d;c("native-xhr2")?(b=function(a){return!this.isFulfilled()},d=function(a,b){b.xhr.abort()},q=function(b,c,d){function e(a){c.handleResponse(d)}function f(b){b=new a("Unable to load "+d.url+" status: "+b.target.status,d);c.handleResponse(d,b)}function g(a){a.lengthComputable?(d.loaded=a.loaded,d.total=a.total,c.progress(d)):3===d.xhr.readyState&&(d.loaded=a.position,c.progress(d))}b.addEventListener("load",
202
+ e,!1);b.addEventListener("error",f,!1);b.addEventListener("progress",g,!1);return function(){b.removeEventListener("load",e,!1);b.removeEventListener("error",f,!1);b.removeEventListener("progress",g,!1);b=null}}):(b=function(a){return a.xhr.readyState},l=function(a){return 4===a.xhr.readyState},d=function(a,b){var c=b.xhr,d=typeof c.abort;"function"!==d&&"object"!==d&&"unknown"!==d||c.abort()});var y,p={data:null,query:null,sync:!1,method:"GET"};g._create=function(){throw Error("XMLHTTP not available");
203
+ };if(c("native-xhr")&&!c("dojo-force-activex-xhr"))g._create=function(){return new XMLHttpRequest};else if(c("activex"))try{new ActiveXObject("Msxml2.XMLHTTP"),g._create=function(){return new ActiveXObject("Msxml2.XMLHTTP")}}catch(r){try{new ActiveXObject("Microsoft.XMLHTTP"),g._create=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}catch(t){}}n.addCommonMethods(g);return g})},"dojo/request/handlers":function(){define(["../json","../_base/kernel","../_base/array","../has","../selector/_loader"],
204
+ function(a,k,f,n){function c(a){var c=b[a.options.handleAs];a.data=c?c(a):a.data||a.text;return a}n.add("activex","undefined"!==typeof ActiveXObject);n.add("dom-parser",function(a){return"DOMParser"in a});var e;if(n("activex")){var h=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML.DOMDocument"],g;e=function(a){function b(a){try{var f=new ActiveXObject(a);f.async=!1;f.loadXML(e);c=f;g=a}catch(h){return!1}return!0}var c=a.data,e=a.text;c&&n("dom-qsa2.1")&&!c.querySelectorAll&&
205
+ n("dom-parser")&&(c=(new DOMParser).parseFromString(e,"application/xml"));c&&c.documentElement||g&&b(g)||f.some(h,b);return c}}var m=function(a){return n("native-xhr2-blob")||"blob"!==a.options.handleAs||"undefined"===typeof Blob?a.xhr.response:new Blob([a.xhr.response],{type:a.xhr.getResponseHeader("Content-Type")})},b={javascript:function(a){return k.eval(a.text||"")},json:function(b){return a.parse(b.text||null)},xml:e,blob:m,arraybuffer:m,document:m};c.register=function(a,c){b[a]=c};return c})},
206
+ "dojo/_base/fx":function(){define("./kernel ./config ./lang ../Evented ./Color ../aspect ../sniff ../dom ../dom-style".split(" "),function(a,k,f,n,c,e,h,g,m){var b=f.mixin,l={},q=l._Line=function(a,b){this.start=a;this.end=b};q.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};var d=l.Animation=function(a){b(this,a);f.isArray(this.curve)&&(this.curve=new q(this.curve[0],this.curve[1]))};d.prototype=new n;f.extend(d,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,
207
+ _getStep:function(){var a=this._percent,b=this.easing;return b?b(a):a},_fire:function(a,b){var c=b||[];if(this[a])if(k.debugAtAllCosts)this[a].apply(this,c);else try{this[a].apply(this,c)}catch(d){}return this},play:function(a,b){this._delayTimer&&this._clearTimer();if(b)this._stopTimer(),this._active=this._paused=!1,this._percent=0;else if(this._active&&!this._paused)return this;this._fire("beforeBegin",[this.node]);var c=a||this.delay,d=f.hitch(this,"_play",b);if(0<c)return this._delayTimer=setTimeout(d,
208
+ c),this;d();return this},_play:function(a){this._delayTimer&&this._clearTimer();this._startTime=(new Date).valueOf();this._paused&&(this._startTime-=this.duration*this._percent);this._active=!0;this._paused=!1;a=this.curve.getValue(this._getStep());this._percent||(this._startRepeatCount||(this._startRepeatCount=this.repeat),this._fire("onBegin",[a]));this._fire("onPlay",[a]);this._cycle();return this},pause:function(){this._delayTimer&&this._clearTimer();this._stopTimer();if(!this._active)return this;
209
+ this._paused=!0;this._fire("onPause",[this.curve.getValue(this._getStep())]);return this},gotoPercent:function(a,b){this._stopTimer();this._active=this._paused=!0;this._percent=a;b&&this.play();return this},stop:function(a){this._delayTimer&&this._clearTimer();if(!this._timer)return this;this._stopTimer();a&&(this._percent=1);this._fire("onStop",[this.curve.getValue(this._getStep())]);this._active=this._paused=!1;return this},destroy:function(){this.stop()},status:function(){return this._active?this._paused?
210
+ "paused":"playing":"stopped"},_cycle:function(){if(this._active){var a=(new Date).valueOf(),a=0===this.duration?1:(a-this._startTime)/this.duration;1<=a&&(a=1);this._percent=a;this.easing&&(a=this.easing(a));this._fire("onAnimate",[this.curve.getValue(a)]);1>this._percent?this._startTimer():(this._active=!1,0<this.repeat?(this.repeat--,this.play(null,!0)):-1==this.repeat?this.play(null,!0):this._startRepeatCount&&(this.repeat=this._startRepeatCount,this._startRepeatCount=0),this._percent=0,this._fire("onEnd",
211
+ [this.node]),!this.repeat&&this._stopTimer())}return this},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer}});var y=0,p=null,r={run:function(){}};f.extend(d,{_startTimer:function(){this._timer||(this._timer=e.after(r,"run",f.hitch(this,"_cycle"),!0),y++);p||(p=setInterval(f.hitch(r,"run"),this.rate))},_stopTimer:function(){this._timer&&(this._timer.remove(),this._timer=null,y--);0>=y&&(clearInterval(p),p=null,y=0)}});var t=h("ie")?function(a){var b=a.style;b.width.length||
212
+ "auto"!=m.get(a,"width")||(b.width="auto")}:function(){};l._fade=function(a){a.node=g.byId(a.node);var c=b({properties:{}},a);a=c.properties.opacity={};a.start="start"in c?c.start:function(){return+m.get(c.node,"opacity")||0};a.end=c.end;a=l.animateProperty(c);e.after(a,"beforeBegin",f.partial(t,c.node),!0);return a};l.fadeIn=function(a){return l._fade(b({end:1},a))};l.fadeOut=function(a){return l._fade(b({end:0},a))};l._defaultEasing=function(a){return.5+Math.sin((a+1.5)*Math.PI)/2};var x=function(a){this._properties=
213
+ a;for(var b in a){var d=a[b];d.start instanceof c&&(d.tempColor=new c)}};x.prototype.getValue=function(a){var b={},d;for(d in this._properties){var e=this._properties[d],g=e.start;g instanceof c?b[d]=c.blendColors(g,e.end,a,e.tempColor).toCss():f.isArray(g)||(b[d]=(e.end-g)*a+g+("opacity"!=d?e.units||"px":0))}return b};l.animateProperty=function(h){var k=h.node=g.byId(h.node);h.easing||(h.easing=a._defaultEasing);h=new d(h);e.after(h,"beforeBegin",f.hitch(h,function(){var a={},d;for(d in this.properties){var e=
214
+ function(a,b){var c={height:a.offsetHeight,width:a.offsetWidth}[b];if(void 0!==c)return c;c=m.get(a,b);return"opacity"==b?+c:h?c:parseFloat(c)};if("width"==d||"height"==d)this.node.display="block";var g=this.properties[d];f.isFunction(g)&&(g=g(k));g=a[d]=b({},f.isObject(g)?g:{end:g});f.isFunction(g.start)&&(g.start=g.start(k));f.isFunction(g.end)&&(g.end=g.end(k));var h=0<=d.toLowerCase().indexOf("color");"end"in g?"start"in g||(g.start=e(k,d)):g.end=e(k,d);h?(g.start=new c(g.start),g.end=new c(g.end)):
215
+ g.start="opacity"==d?+g.start:parseFloat(g.start)}this.curve=new x(a)}),!0);e.after(h,"onAnimate",f.hitch(m,"set",h.node),!0);return h};l.anim=function(a,b,c,e,f,g){return l.animateProperty({node:a,duration:c||d.prototype.duration,properties:b,easing:e,onEnd:f}).play(g||0)};b(a,l);a._Animation=d;return l})},"dojo/_base/loader":function(){define("./kernel ../has require module ../json ./lang ./array".split(" "),function(a,k,f,n,c,e,h){var g=function(a){return a.replace(/\./g,"/")},m=/\/\/>>built/,
216
+ b=[],l=[],q=function(a,c,e){b.push(e);h.forEach(a.split(","),function(a){a=S(a,c.module);l.push(a);I(a)});d()},d=function(){var a,c;for(c in P)if(a=P[c],void 0===a.noReqPluginCheck&&(a.noReqPluginCheck=/loadInit\!/.test(c)||/require\!/.test(c)?1:0),!a.executed&&!a.noReqPluginCheck&&a.injected==z)return;H(function(){var a=b;b=[];h.forEach(a,function(a){a(1)})})},y=function(b,c,d){var e=/\(|\)/g,f=1;for(e.lastIndex=c;(c=e.exec(b))&&(")"==c[0]?--f:f+=1,0!=f););if(0!=f)throw"unmatched paren around character "+
217
+ e.lastIndex+" in: "+b;return[a.trim(b.substring(d,e.lastIndex))+";\n",e.lastIndex]},p=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,r=/(^|\s)dojo\.(loadInit|require|provide|requireLocalization|requireIf|requireAfterIf|platformRequire)\s*\(/mg,t=/(^|\s)(require|define)\s*\(/m,x=function(a,b){var c,d,e,f=[],g=[];c=[];for(b=b||a.replace(p,function(a){r.lastIndex=t.lastIndex=0;return r.test(a)||t.test(a)?"":a});c=r.exec(b);)d=r.lastIndex,e=d-c[0].length,d=y(b,d,e),"loadInit"==c[2]?f.push(d[0]):g.push(d[0]),r.lastIndex=
218
+ d[1];c=f.concat(g);return c.length||!t.test(b)?[a.replace(/(^|\s)dojo\.loadInit\s*\(/g,"\n0 \x26\x26 dojo.loadInit("),c.join(""),c]:0},v=f.initSyncLoader(q,d,function(a,b){var d,e,f=[],g=[];if(m.test(b)||!(d=x(b)))return 0;e=a.mid+"-*loadInit";for(var h in S("dojo",a).result.scopeMap)f.push(h),g.push('"'+h+'"');return"// xdomain rewrite of "+a.mid+"\ndefine('"+e+"',{\n\tnames:"+c.stringify(f)+",\n\tdef:function("+f.join(",")+"){"+d[1]+"}});\n\ndefine("+c.stringify(f.concat(["dojo/loadInit!"+e]))+
219
+ ", function("+f.join(",")+"){\n"+d[0]+"});"}),u=v.sync,z=v.requested,w=v.arrived,D=v.nonmodule,N=v.executing,X=v.executed,R=v.syncExecStack,P=v.modules,O=v.execQ,S=v.getModule,I=v.injectModule,J=v.setArrived,Q=v.signal,E=v.finishExec,A=v.execModule,C=v.getLegacyMode,H=v.guardCheckComplete,q=v.dojoRequirePlugin;a.provide=function(a){var b=R[0],c=e.mixin(S(g(a),f.module),{executed:N,result:e.getObject(a,!0)});J(c);b&&(b.provides||(b.provides=[])).push(function(){c.result=e.getObject(a);delete c.provides;
220
+ c.executed!==X&&E(c)});return c.result};k.add("config-publishRequireResult",1,0,0);a.require=function(a,b){var c=function(a,b){var c=S(g(a),f.module);if(R.length&&R[0].finish)R[0].finish.push(a);else{if(c.executed)return c.result;b&&(c.result=D);var d=C();I(c);d=C();c.executed!==X&&c.injected===w&&v.guardCheckComplete(function(){A(c)});if(c.executed)return c.result;d==u?c.cjs?O.unshift(c):R.length&&(R[0].finish=[a]):O.push(c)}}(a,b);k("config-publishRequireResult")&&!e.exists(a)&&void 0!==c&&e.setObject(a,
221
+ c);return c};a.loadInit=function(a){a()};a.registerModulePath=function(a,b){var c={};c[a.replace(/\./g,"/")]=b;f({paths:c})};a.platformRequire=function(b){b=(b.common||[]).concat(b[a._name]||b["default"]||[]);for(var c;b.length;)e.isArray(c=b.shift())?a.require.apply(a,c):a.require(c)};a.requireIf=a.requireAfterIf=function(b,c,d){b&&a.require(c,d)};a.requireLocalization=function(a,b,c){f(["../i18n"],function(d){d.getLocalization(a,b,c)})};return{extractLegacyApiApplications:x,require:q,loadInit:function(b,
222
+ c,d){c([b],function(b){c(b.names,function(){for(var e="",f=[],h=0;h<arguments.length;h++)e+="var "+b.names[h]+"\x3d arguments["+h+"]; ",f.push(arguments[h]);eval(e);var k=c.module,l=[],m,e={provide:function(a){a=g(a);a=S(a,k);a!==k&&J(a)},require:function(a,b){a=g(a);b&&(S(a,k).result=D);l.push(a)},requireLocalization:function(b,c,d){m||(m=["dojo/i18n"]);d=(d||a.locale).toLowerCase();b=g(b)+"/nls/"+(/root/i.test(d)?"":d+"/")+g(c);S(b,k).isXd&&m.push("dojo/i18n!"+b)},loadInit:function(a){a()}},h={},
223
+ p;try{for(p in e)h[p]=a[p],a[p]=e[p];b.def.apply(null,f)}catch(t){Q("error",[{src:n.id,id:"failedDojoLoadInit"},t])}finally{for(p in e)a[p]=h[p]}m&&(l=l.concat(m));l.length?q(l.join(","),c,d):d()})})}}})}}});
224
+ require({cache:{"mojo/signup-forms/embed":function(){define([],1)},"dijit/_base/manager":function(){define(["dojo/_base/array","dojo/_base/config","dojo/_base/lang","../registry","../main"],function(a,k,f,n,c){var e={};a.forEach("byId getUniqueId findWidgets _destroyAll byNode getEnclosingWidget".split(" "),function(a){e[a]=n[a]});f.mixin(e,{defaultDuration:k.defaultDuration||200});f.mixin(c,e);return c})},"dijit/registry":function(){define(["dojo/_base/array","dojo/_base/window","./main"],function(a,
225
+ k,f){var n={},c={},e={length:0,add:function(a){if(c[a.id])throw Error("Tried to register widget with id\x3d\x3d"+a.id+" but that id is already registered");c[a.id]=a;this.length++},remove:function(a){c[a]&&(delete c[a],this.length--)},byId:function(a){return"string"==typeof a?c[a]:a},byNode:function(a){return c[a.getAttribute("widgetId")]},toArray:function(){var a=[],e;for(e in c)a.push(c[e]);return a},getUniqueId:function(a){var e;do e=a+"_"+(a in n?++n[a]:n[a]=0);while(c[e]);return"dijit"==f._scopeName?
226
+ e:f._scopeName+"_"+e},findWidgets:function(a,e){function f(a){for(a=a.firstChild;a;a=a.nextSibling)if(1==a.nodeType){var h=a.getAttribute("widgetId");h?(h=c[h])&&b.push(h):a!==e&&f(a)}}var b=[];f(a);return b},_destroyAll:function(){f._curFocus=null;f._prevFocus=null;f._activeStack=[];a.forEach(e.findWidgets(k.body()),function(a){a._destroyed||(a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy())})},getEnclosingWidget:function(a){for(;a;){var e=1==a.nodeType&&a.getAttribute("widgetId");
227
+ if(e)return c[e];a=a.parentNode}return null},_hash:c};return f.registry=e})},"dijit/main":function(){define(["dojo/_base/kernel"],function(a){return a.dijit})},"dojo/parser":function(){define("require ./_base/kernel ./_base/lang ./_base/array ./_base/config ./dom ./_base/window ./_base/url ./aspect ./promise/all ./date/stamp ./Deferred ./has ./query ./on ./ready".split(" "),function(a,k,f,n,c,e,h,g,m,b,l,q,d,y,p,r){function t(a){return eval("("+a+")")}function x(a){var b=a._nameCaseMap,c=a.prototype;
228
+ if(!b||b._extendCnt<u){var b=a._nameCaseMap={},d;for(d in c)"_"!==d.charAt(0)&&(b[d.toLowerCase()]=d);b._extendCnt=u}return b}function v(b,c){var d=b.join();if(!z[d]){for(var e=[],g=0,h=b.length;g<h;g++){var k=b[g];e[e.length]=z[k]=z[k]||f.getObject(k)||~k.indexOf("/")&&(c?c(k):a(k))}g=e.shift();z[d]=e.length?g.createSubclass?g.createSubclass(e):g.extend.apply(g,e):g}return z[d]}new Date("X");var u=0;m.after(f,"extend",function(){u++},!0);var z={},w={_clearCache:function(){u++;z={}},_functionFromScript:function(a,
229
+ b){var c="",d="",e=a.getAttribute(b+"args")||a.getAttribute("args"),f=a.getAttribute("with"),e=(e||"").split(/\s*,\s*/);f&&f.length&&n.forEach(f.split(/\s*,\s*/),function(a){c+="with("+a+"){";d+="}"});return new Function(e,c+a.innerHTML+d)},instantiate:function(a,b,c){b=b||{};c=c||{};var d=(c.scope||k._scopeName)+"Type",e="data-"+(c.scope||k._scopeName)+"-",f=e+"type",g=e+"mixins",h=[];n.forEach(a,function(a){var c=d in b?b[d]:a.getAttribute(f)||a.getAttribute(d);if(c){var e=a.getAttribute(g),c=e?
230
+ [c].concat(e.split(/\s*,\s*/)):[c];h.push({node:a,types:c})}});return this._instantiate(h,b,c)},_instantiate:function(a,c,d,e){function f(a){c._started||d.noStart||n.forEach(a,function(a){"function"!==typeof a.startup||a._started||a.startup()});return a}a=n.map(a,function(a){var b=a.ctor||v(a.types,d.contextRequire);if(!b)throw Error("Unable to resolve constructor for: '"+a.types.join()+"'");return this.construct(b,a.node,c,d,a.scripts,a.inherited)},this);return e?b(a).then(f):f(a)},construct:function(a,
231
+ b,c,e,h,q){function r(a){z&&f.setObject(z,a);for(C=0;C<F.length;C++)m[F[C].advice||"after"](a,F[C].method,f.hitch(a,F[C].func),!0);for(C=0;C<G.length;C++)G[C].call(a);for(C=0;C<V.length;C++)a.watch(V[C].prop,V[C].func);for(C=0;C<M.length;C++)p(a,M[C].event,M[C].func);return a}var v=a&&a.prototype;e=e||{};var u={};e.defaults&&f.mixin(u,e.defaults);q&&f.mixin(u,q);var w;d("dom-attributes-explicit")?w=b.attributes:d("dom-attributes-specified-flag")?w=n.filter(b.attributes,function(a){return a.specified}):
232
+ (q=(/^input$|^img$/i.test(b.nodeName)?b:b.cloneNode(!1)).outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g,"").replace(/^\s*<[a-zA-Z0-9]*\s*/,"").replace(/\s*>.*$/,""),w=n.map(q.split(/\s+/),function(a){var c=a.toLowerCase();return{name:a,value:"LI"==b.nodeName&&"value"==a||"enctype"==c?b.getAttribute(c):b.getAttributeNode(c).value}}));var E=e.scope||k._scopeName;q="data-"+E+"-";var A={};"dojo"!==E&&(A[q+"props"]="data-dojo-props",A[q+"type"]="data-dojo-type",A[q+"mixins"]="data-dojo-mixins",A[E+"type"]=
233
+ "dojoType",A[q+"id"]="data-dojo-id");for(var C=0,H,E=[],z,K;H=w[C++];){var B=H.name,L=B.toLowerCase();H=H.value;switch(A[L]||L){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;case "data-dojo-props":K=H;break;case "data-dojo-id":case "jsid":z=H;break;case "data-dojo-attach-point":case "dojoattachpoint":u.dojoAttachPoint=H;break;case "data-dojo-attach-event":case "dojoattachevent":u.dojoAttachEvent=H;break;case "class":u["class"]=b.className;break;case "style":u.style=b.style&&
234
+ b.style.cssText;break;default:if(B in v||(B=x(a)[L]||B),B in v)switch(typeof v[B]){case "string":u[B]=H;break;case "number":u[B]=H.length?Number(H):NaN;break;case "boolean":u[B]="false"!=H.toLowerCase();break;case "function":""===H||-1!=H.search(/[^\w\.]+/i)?u[B]=new Function(H):u[B]=f.getObject(H,!1)||new Function(H);E.push(B);break;default:L=v[B],u[B]=L&&"length"in L?H?H.split(/\s*,\s*/):[]:L instanceof Date?""==H?new Date(""):"now"==H?new Date:l.fromISOString(H):L instanceof g?k.baseUrl+H:t(H)}else u[B]=
235
+ H}}for(w=0;w<E.length;w++)A=E[w].toLowerCase(),b.removeAttribute(A),b[A]=null;if(K)try{K=t.call(e.propsThis,"{"+K+"}"),f.mixin(u,K)}catch(aa){throw Error(aa.toString()+" in data-dojo-props\x3d'"+K+"'");}f.mixin(u,c);h||(h=a&&(a._noScript||v._noScript)?[]:y("\x3e script[type^\x3d'dojo/']",b));var F=[],G=[],V=[],M=[];if(h)for(C=0;C<h.length;C++)A=h[C],b.removeChild(A),c=A.getAttribute(q+"event")||A.getAttribute("event"),e=A.getAttribute(q+"prop"),K=A.getAttribute(q+"method"),E=A.getAttribute(q+"advice"),
236
+ w=A.getAttribute("type"),A=this._functionFromScript(A,q),c?"dojo/connect"==w?F.push({method:c,func:A}):"dojo/on"==w?M.push({event:c,func:A}):u[c]=A:"dojo/aspect"==w?F.push({method:K,advice:E,func:A}):"dojo/watch"==w?V.push({prop:e,func:A}):G.push(A);a=(h=a.markupFactory||v.markupFactory)?h(u,b,a):new a(u,b);return a.then?a.then(r):r(a)},scan:function(b,c){function e(a){if(!a.inherited){a.inherited={};var b=a.node,c=e(a.parent),b={dir:b.getAttribute("dir")||c.dir,lang:b.getAttribute("lang")||c.lang,
237
+ textDir:b.getAttribute(t)||c.textDir},d;for(d in b)b[d]&&(a.inherited[d]=b[d])}return a.inherited}var f=[],g=[],h={},l=(c.scope||k._scopeName)+"Type",m="data-"+(c.scope||k._scopeName)+"-",p=m+"type",t=m+"textdir",m=m+"mixins",r=b.firstChild,u=c.inherited;if(!u){var w=function(a,b){return a.getAttribute&&a.getAttribute(b)||a.parentNode&&w(a.parentNode,b)},u={dir:w(b,"dir"),lang:w(b,"lang"),textDir:w(b,t)},x;for(x in u)u[x]||delete u[x]}for(var u={inherited:u},y,z;;)if(r)if(1!=r.nodeType)r=r.nextSibling;
238
+ else if(y&&"script"==r.nodeName.toLowerCase())(B=r.getAttribute("type"))&&/^dojo\/\w/i.test(B)&&y.push(r),r=r.nextSibling;else if(z)r=r.nextSibling;else{var B=r.getAttribute(p)||r.getAttribute(l);x=r.firstChild;if(B||x&&(3!=x.nodeType||x.nextSibling)){z=null;if(B){var L=r.getAttribute(m);y=L?[B].concat(L.split(/\s*,\s*/)):[B];try{z=v(y,c.contextRequire)}catch(G){}z||n.forEach(y,function(a){~a.indexOf("/")&&!h[a]&&(h[a]=!0,g[g.length]=a)});L=z&&!z.prototype._noScript?[]:null;u={types:y,ctor:z,parent:u,
239
+ node:r,scripts:L};u.inherited=e(u);f.push(u)}else u={node:r,scripts:y,parent:u};y=L;z=r.stopParser||z&&z.prototype.stopParser&&!c.template;r=x}else r=r.nextSibling}else{if(!u||!u.node)break;r=u.node.nextSibling;z=!1;u=u.parent;y=u.scripts}var F=new q;g.length?(d("dojo-debug-messages"),(c.contextRequire||a)(g,function(){F.resolve(n.filter(f,function(a){if(!a.ctor)try{a.ctor=v(a.types,c.contextRequire)}catch(b){}for(var d=a.parent;d&&!d.types;)d=d.parent;var e=a.ctor&&a.ctor.prototype;a.instantiateChildren=
240
+ !(e&&e.stopParser&&!c.template);a.instantiate=!d||d.instantiate&&d.instantiateChildren;return a.instantiate}))})):F.resolve(f);return F.promise},_require:function(b,c){var d=t("{"+b.innerHTML+"}"),e=[],g=[],h=new q,k=c&&c.contextRequire||a,l;for(l in d)e.push(l),g.push(d[l]);k(g,function(){for(var a=0;a<e.length;a++)f.setObject(e[a],arguments[a]);h.resolve(arguments)});return h.promise},_scanAmd:function(a,b){var c=new q,d=c.promise;c.resolve(!0);var e=this;y("script[type\x3d'dojo/require']",a).forEach(function(a){d=
241
+ d.then(function(){return e._require(a,b)});a.parentNode.removeChild(a)});return d},parse:function(a,b){!a||"string"==typeof a||"nodeType"in a||(b=a,a=b.rootNode);var c=a?e.byId(a):h.body();b=b||{};var d=b.template?{template:!0}:{},g=[],k=this,l=this._scanAmd(c,b).then(function(){return k.scan(c,b)}).then(function(a){return k._instantiate(a,d,b,!0)}).then(function(a){return g=g.concat(a)}).otherwise(function(a){throw a;});f.mixin(g,l);return g}};k.parser=w;c.parseOnLoad&&r(100,w,"parse");return w})},
242
+ "dojo/_base/url":function(){define(["./kernel"],function(a){var k=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,f=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,n=function(){for(var a=arguments,e=[a[0]],h=1;h<a.length;h++)if(a[h]){var g=new n(a[h]+""),e=new n(e[0]+"");if(""==g.path&&!g.scheme&&!g.authority&&!g.query)null!=g.fragment&&(e.fragment=g.fragment),g=e;else if(!g.scheme&&(g.scheme=e.scheme,!g.authority&&(g.authority=e.authority,"/"!=g.path.charAt(0)))){for(var e=
243
+ (e.path.substring(0,e.path.lastIndexOf("/")+1)+g.path).split("/"),m=0;m<e.length;m++)"."==e[m]?m==e.length-1?e[m]="":(e.splice(m,1),m--):0<m&&(1!=m||""!=e[0])&&".."==e[m]&&".."!=e[m-1]&&(m==e.length-1?(e.splice(m,1),e[m-1]=""):(e.splice(m-1,2),m-=2));g.path=e.join("/")}e=[];g.scheme&&e.push(g.scheme,":");g.authority&&e.push("//",g.authority);e.push(g.path);g.query&&e.push("?",g.query);g.fragment&&e.push("#",g.fragment)}this.uri=e.join("");a=this.uri.match(k);this.scheme=a[2]||(a[1]?"":null);this.authority=
244
+ a[4]||(a[3]?"":null);this.path=a[5];this.query=a[7]||(a[6]?"":null);this.fragment=a[9]||(a[8]?"":null);null!=this.authority&&(a=this.authority.match(f),this.user=a[3]||null,this.password=a[4]||null,this.host=a[6]||a[7],this.port=a[9]||null)};n.prototype.toString=function(){return this.uri};return a._Url=n})},"dojo/promise/all":function(){define(["../_base/array","../Deferred","../when"],function(a,k,f){var n=a.some;return function(a){var e,h;a instanceof Array?h=a:a&&"object"===typeof a&&(e=a);var g,
245
+ m=[];if(e){h=[];for(var b in e)Object.hasOwnProperty.call(e,b)&&(m.push(b),h.push(e[b]));g={}}else h&&(g=[]);if(!h||!h.length)return(new k).resolve(g);var l=new k;l.promise.always(function(){g=m=null});var q=h.length;n(h,function(a,b){e||m.push(b);f(a,function(a){l.isFulfilled()||(g[m[b]]=a,0===--q&&l.resolve(g))},l.reject);return l.isFulfilled()});return l.promise}})},"dojo/date/stamp":function(){define(["../_base/lang","../_base/array"],function(a,k){var f={};a.setObject("dojo.date.stamp",f);f.fromISOString=
246
+ function(a,c){f._isoRegExp||(f._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/);var e=f._isoRegExp.exec(a),h=null;if(e){e.shift();e[1]&&e[1]--;e[6]&&(e[6]*=1E3);c&&(c=new Date(c),k.forEach(k.map("FullYear Month Date Hours Minutes Seconds Milliseconds".split(" "),function(a){return c["get"+a]()}),function(a,c){e[c]=e[c]||a}));h=new Date(e[0]||1970,e[1]||0,e[2]||1,e[3]||0,e[4]||0,e[5]||0,e[6]||0);100>e[0]&&h.setFullYear(e[0]||
247
+ 1970);var g=0,m=e[7]&&e[7].charAt(0);"Z"!=m&&(g=60*(e[8]||0)+(Number(e[9])||0),"-"!=m&&(g*=-1));m&&(g-=h.getTimezoneOffset());g&&h.setTime(h.getTime()+6E4*g)}return h};f.toISOString=function(a,c){var e=function(a){return 10>a?"0"+a:a};c=c||{};var f=[],g=c.zulu?"getUTC":"get",k="";"time"!=c.selector&&(k=a[g+"FullYear"](),k=["0000".substr((k+"").length)+k,e(a[g+"Month"]()+1),e(a[g+"Date"]())].join("-"));f.push(k);if("date"!=c.selector){k=[e(a[g+"Hours"]()),e(a[g+"Minutes"]()),e(a[g+"Seconds"]())].join(":");
248
+ g=a[g+"Milliseconds"]();c.milliseconds&&(k+="."+(100>g?"0":"")+e(g));if(c.zulu)k+="Z";else if("time"!=c.selector)var g=a.getTimezoneOffset(),b=Math.abs(g),k=k+((0<g?"-":"+")+e(Math.floor(b/60))+":"+e(b%60));f.push(k)}return f.join("T")};return f})},"dojo/request/script":function(){define("module ./watch ./util ../_base/kernel ../_base/array ../_base/lang ../on ../dom ../dom-construct ../has ../_base/window".split(" "),function(a,k,f,n,c,e,h,g,m,b,l){function q(a,b){a.canDelete&&t._remove(a.id,b.options.frameDoc,
249
+ !0)}function d(a){D&&D.length&&(c.forEach(D,function(a){t._remove(a.id,a.frameDoc);a.frameDoc=null}),D=[]);return a.options.jsonp?!a.data:!0}function y(a){return!!this.scriptLoaded}function p(a){return(a=a.options.checkString)&&eval("typeof("+a+') !\x3d\x3d "undefined"')}function r(a,b){if(this.canDelete){var c=this.response.options;D.push({id:this.id,frameDoc:c.ioArgs?c.ioArgs.frameDoc:c.frameDoc});c.ioArgs&&(c.ioArgs.frameDoc=null);c.frameDoc=null}b?this.reject(b):this.resolve(a)}function t(a,b,
250
+ c){var g=f.parseArgs(a,f.deepCopy({},b));a=g.url;b=g.options;var l=f.deferred(g,q,d,b.jsonp?null:b.checkString?p:y,r);e.mixin(l,{id:x+v++,canDelete:!1});b.jsonp&&((new RegExp("[?\x26]"+b.jsonp+"\x3d")).test(a)||(a+=(~a.indexOf("?")?"\x26":"?")+b.jsonp+"\x3d"+(b.frameDoc?"parent.":"")+x+"_callbacks."+l.id),l.canDelete=!0,w[l.id]=function(a){g.data=a;l.handleResponse(g)});f.notify&&f.notify.emit("send",g,l.promise.cancel);if(!b.canAttach||b.canAttach(l)){var m=t._attach(l.id,a,b.frameDoc);if(!b.jsonp&&
251
+ !b.checkString)var n=h(m,u,function(a){if("load"===a.type||z.test(m.readyState))n.remove(),l.scriptLoaded=a})}k(l);return c?l:l.promise}b.add("script-readystatechange",function(a,b){return"undefined"!==typeof b.createElement("script").onreadystatechange&&("undefined"===typeof a.opera||"[object Opera]"!==a.opera.toString())});var x=a.id.replace(/[\/\.\-]/g,"_"),v=0,u=b("script-readystatechange")?"readystatechange":"load",z=/complete|loaded/,w=n.global[x+"_callbacks"]={},D=[];t.get=t;t._attach=function(a,
252
+ b,c){c=c||l.doc;var d=c.createElement("script");d.type="text/javascript";d.src=b;d.id=a;d.async=!0;d.charset="utf-8";return c.getElementsByTagName("head")[0].appendChild(d)};t._remove=function(a,b,c){m.destroy(g.byId(a,b));w[a]&&(c?w[a]=function(){delete w[a]}:delete w[a])};t._callbacksProperty=x+"_callbacks";return t})},"mojo/signup-forms/Loader":function(){define(["dojo/request/script"],function(a){return{start:function(k){if(!(k&&k.baseUrl&&k.uuid&&k.lid))throw Error("Missing base url, uuid and/or lid parameter(s).");
253
+ var f=this._getFormSettingsUrl(k.baseUrl,k.uuid,k.lid),n=this._getFormSubscribeUrl(k.baseUrl,k.uuid,k.lid),c=this._getHoneypotFieldName(k.uuid,k.lid),e=this._getEnv(k.env),h=this;a.get(f,{jsonp:"c",query:{u:k.uuid,id:k.lid}}).then(function(a){"error"!=a.result&&("dev"===e?h._setupPopupSignupForm(a,n,c,e):require(["//downloads.mailchimp.com/js/signup-forms/popup/"+a.version+"/popup.js"],function(){h._setupPopupSignupForm(a,n,c,e)}))})},_getFormSettingsUrl:function(a,f,n){return"//"+a+"/subscribe/form-settings?u\x3d"+
254
+ f+"\x26id\x3d"+n},_getFormSubscribeUrl:function(a,f,n){return"//"+a+"/subscribe/form-post?u\x3d"+f+"\x26id\x3d"+n+"\x26popup\x3dtrue"},_getHoneypotFieldName:function(a,f){return"b_"+a+"_"+f},_getEnv:function(a){return"undefined"===typeof a?"prod":"dev"},_setupPopupSignupForm:function(a,f,n,c){require(["mojo/signup-forms/PopupSignupForm"]);a=new PopupSignupForm({config:a,subscribeUrl:f,honeypotFieldName:n,env:c});a.placeAt(document.body);a.startup()}}})}}});
255
+ (function(){var a=this.require;a({cache:{}});!a.async&&a(["dojo"]);a.boot&&a.apply(null,a.boot)})();
@@ -0,0 +1,3475 @@
1
+ /**
2
+ * Owl Carousel v2.3.3
3
+ * Copyright 2013-2018 David Deutsch
4
+ * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
5
+ */
6
+ /**
7
+ * Owl carousel
8
+ * @version 2.3.3
9
+ * @author Bartosz Wojciechowski
10
+ * @author David Deutsch
11
+ * @license The MIT License (MIT)
12
+ * @todo Lazy Load Icon
13
+ * @todo prevent animationend bubling
14
+ * @todo itemsScaleUp
15
+ * @todo Test Zepto
16
+ * @todo stagePadding calculate wrong active classes
17
+ */
18
+ ;(function($, window, document, undefined) {
19
+
20
+ /**
21
+ * Creates a carousel.
22
+ * @class The Owl Carousel.
23
+ * @public
24
+ * @param {HTMLElement|jQuery} element - The element to create the carousel for.
25
+ * @param {Object} [options] - The options
26
+ */
27
+ function Owl(element, options) {
28
+
29
+ /**
30
+ * Current settings for the carousel.
31
+ * @public
32
+ */
33
+ this.settings = null;
34
+
35
+ /**
36
+ * Current options set by the caller including defaults.
37
+ * @public
38
+ */
39
+ this.options = $.extend({}, Owl.Defaults, options);
40
+
41
+ /**
42
+ * Plugin element.
43
+ * @public
44
+ */
45
+ this.$element = $(element);
46
+
47
+ /**
48
+ * Proxied event handlers.
49
+ * @protected
50
+ */
51
+ this._handlers = {};
52
+
53
+ /**
54
+ * References to the running plugins of this carousel.
55
+ * @protected
56
+ */
57
+ this._plugins = {};
58
+
59
+ /**
60
+ * Currently suppressed events to prevent them from being retriggered.
61
+ * @protected
62
+ */
63
+ this._supress = {};
64
+
65
+ /**
66
+ * Absolute current position.
67
+ * @protected
68
+ */
69
+ this._current = null;
70
+
71
+ /**
72
+ * Animation speed in milliseconds.
73
+ * @protected
74
+ */
75
+ this._speed = null;
76
+
77
+ /**
78
+ * Coordinates of all items in pixel.
79
+ * @todo The name of this member is missleading.
80
+ * @protected
81
+ */
82
+ this._coordinates = [];
83
+
84
+ /**
85
+ * Current breakpoint.
86
+ * @todo Real media queries would be nice.
87
+ * @protected
88
+ */
89
+ this._breakpoint = null;
90
+
91
+ /**
92
+ * Current width of the plugin element.
93
+ */
94
+ this._width = null;
95
+
96
+ /**
97
+ * All real items.
98
+ * @protected
99
+ */
100
+ this._items = [];
101
+
102
+ /**
103
+ * All cloned items.
104
+ * @protected
105
+ */
106
+ this._clones = [];
107
+
108
+ /**
109
+ * Merge values of all items.
110
+ * @todo Maybe this could be part of a plugin.
111
+ * @protected
112
+ */
113
+ this._mergers = [];
114
+
115
+ /**
116
+ * Widths of all items.
117
+ */
118
+ this._widths = [];
119
+
120
+ /**
121
+ * Invalidated parts within the update process.
122
+ * @protected
123
+ */
124
+ this._invalidated = {};
125
+
126
+ /**
127
+ * Ordered list of workers for the update process.
128
+ * @protected
129
+ */
130
+ this._pipe = [];
131
+
132
+ /**
133
+ * Current state information for the drag operation.
134
+ * @todo #261
135
+ * @protected
136
+ */
137
+ this._drag = {
138
+ time: null,
139
+ target: null,
140
+ pointer: null,
141
+ stage: {
142
+ start: null,
143
+ current: null
144
+ },
145
+ direction: null
146
+ };
147
+
148
+ /**
149
+ * Current state information and their tags.
150
+ * @type {Object}
151
+ * @protected
152
+ */
153
+ this._states = {
154
+ current: {},
155
+ tags: {
156
+ 'initializing': [ 'busy' ],
157
+ 'animating': [ 'busy' ],
158
+ 'dragging': [ 'interacting' ]
159
+ }
160
+ };
161
+
162
+ $.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler) {
163
+ this._handlers[handler] = $.proxy(this[handler], this);
164
+ }, this));
165
+
166
+ $.each(Owl.Plugins, $.proxy(function(key, plugin) {
167
+ this._plugins[key.charAt(0).toLowerCase() + key.slice(1)]
168
+ = new plugin(this);
169
+ }, this));
170
+
171
+ $.each(Owl.Workers, $.proxy(function(priority, worker) {
172
+ this._pipe.push({
173
+ 'filter': worker.filter,
174
+ 'run': $.proxy(worker.run, this)
175
+ });
176
+ }, this));
177
+
178
+ this.setup();
179
+ this.initialize();
180
+ }
181
+
182
+ /**
183
+ * Default options for the carousel.
184
+ * @public
185
+ */
186
+ Owl.Defaults = {
187
+ items: 3,
188
+ loop: false,
189
+ center: false,
190
+ rewind: false,
191
+ checkVisibility: true,
192
+
193
+ mouseDrag: true,
194
+ touchDrag: true,
195
+ pullDrag: true,
196
+ freeDrag: false,
197
+
198
+ margin: 0,
199
+ stagePadding: 0,
200
+
201
+ merge: false,
202
+ mergeFit: true,
203
+ autoWidth: false,
204
+
205
+ startPosition: 0,
206
+ rtl: false,
207
+
208
+ smartSpeed: 250,
209
+ fluidSpeed: false,
210
+ dragEndSpeed: false,
211
+
212
+ responsive: {},
213
+ responsiveRefreshRate: 200,
214
+ responsiveBaseElement: window,
215
+
216
+ fallbackEasing: 'swing',
217
+
218
+ info: false,
219
+
220
+ nestedItemSelector: false,
221
+ itemElement: 'div',
222
+ stageElement: 'div',
223
+
224
+ refreshClass: 'owl-refresh',
225
+ loadedClass: 'owl-loaded',
226
+ loadingClass: 'owl-loading',
227
+ rtlClass: 'owl-rtl',
228
+ responsiveClass: 'owl-responsive',
229
+ dragClass: 'owl-drag',
230
+ itemClass: 'owl-item',
231
+ stageClass: 'owl-stage',
232
+ stageOuterClass: 'owl-stage-outer',
233
+ grabClass: 'owl-grab'
234
+ };
235
+
236
+ /**
237
+ * Enumeration for width.
238
+ * @public
239
+ * @readonly
240
+ * @enum {String}
241
+ */
242
+ Owl.Width = {
243
+ Default: 'default',
244
+ Inner: 'inner',
245
+ Outer: 'outer'
246
+ };
247
+
248
+ /**
249
+ * Enumeration for types.
250
+ * @public
251
+ * @readonly
252
+ * @enum {String}
253
+ */
254
+ Owl.Type = {
255
+ Event: 'event',
256
+ State: 'state'
257
+ };
258
+
259
+ /**
260
+ * Contains all registered plugins.
261
+ * @public
262
+ */
263
+ Owl.Plugins = {};
264
+
265
+ /**
266
+ * List of workers involved in the update process.
267
+ */
268
+ Owl.Workers = [ {
269
+ filter: [ 'width', 'settings' ],
270
+ run: function() {
271
+ this._width = this.$element.width();
272
+ }
273
+ }, {
274
+ filter: [ 'width', 'items', 'settings' ],
275
+ run: function(cache) {
276
+ cache.current = this._items && this._items[this.relative(this._current)];
277
+ }
278
+ }, {
279
+ filter: [ 'items', 'settings' ],
280
+ run: function() {
281
+ this.$stage.children('.cloned').remove();
282
+ }
283
+ }, {
284
+ filter: [ 'width', 'items', 'settings' ],
285
+ run: function(cache) {
286
+ var margin = this.settings.margin || '',
287
+ grid = !this.settings.autoWidth,
288
+ rtl = this.settings.rtl,
289
+ css = {
290
+ 'width': 'auto',
291
+ 'margin-left': rtl ? margin : '',
292
+ 'margin-right': rtl ? '' : margin
293
+ };
294
+
295
+ !grid && this.$stage.children().css(css);
296
+
297
+ cache.css = css;
298
+ }
299
+ }, {
300
+ filter: [ 'width', 'items', 'settings' ],
301
+ run: function(cache) {
302
+ var width = (this.width() / this.settings.items).toFixed(3) - this.settings.margin,
303
+ merge = null,
304
+ iterator = this._items.length,
305
+ grid = !this.settings.autoWidth,
306
+ widths = [];
307
+
308
+ cache.items = {
309
+ merge: false,
310
+ width: width
311
+ };
312
+
313
+ while (iterator--) {
314
+ merge = this._mergers[iterator];
315
+ merge = this.settings.mergeFit && Math.min(merge, this.settings.items) || merge;
316
+
317
+ cache.items.merge = merge > 1 || cache.items.merge;
318
+
319
+ widths[iterator] = !grid ? this._items[iterator].width() : width * merge;
320
+ }
321
+
322
+ this._widths = widths;
323
+ }
324
+ }, {
325
+ filter: [ 'items', 'settings' ],
326
+ run: function() {
327
+ var clones = [],
328
+ items = this._items,
329
+ settings = this.settings,
330
+ // TODO: Should be computed from number of min width items in stage
331
+ view = Math.max(settings.items * 2, 4),
332
+ size = Math.ceil(items.length / 2) * 2,
333
+ repeat = settings.loop && items.length ? settings.rewind ? view : Math.max(view, size) : 0,
334
+ append = '',
335
+ prepend = '';
336
+
337
+ repeat /= 2;
338
+
339
+ while (repeat > 0) {
340
+ // Switch to only using appended clones
341
+ clones.push(this.normalize(clones.length / 2, true));
342
+ append = append + items[clones[clones.length - 1]][0].outerHTML;
343
+ clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));
344
+ prepend = items[clones[clones.length - 1]][0].outerHTML + prepend;
345
+ repeat -= 1;
346
+ }
347
+
348
+ this._clones = clones;
349
+
350
+ $(append).addClass('cloned').appendTo(this.$stage);
351
+ $(prepend).addClass('cloned').prependTo(this.$stage);
352
+ }
353
+ }, {
354
+ filter: [ 'width', 'items', 'settings' ],
355
+ run: function() {
356
+ var rtl = this.settings.rtl ? 1 : -1,
357
+ size = this._clones.length + this._items.length,
358
+ iterator = -1,
359
+ previous = 0,
360
+ current = 0,
361
+ coordinates = [];
362
+
363
+ while (++iterator < size) {
364
+ previous = coordinates[iterator - 1] || 0;
365
+ current = this._widths[this.relative(iterator)] + this.settings.margin;
366
+ coordinates.push(previous + current * rtl);
367
+ }
368
+
369
+ this._coordinates = coordinates;
370
+ }
371
+ }, {
372
+ filter: [ 'width', 'items', 'settings' ],
373
+ run: function() {
374
+ var padding = this.settings.stagePadding,
375
+ coordinates = this._coordinates,
376
+ css = {
377
+ 'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2,
378
+ 'padding-left': padding || '',
379
+ 'padding-right': padding || ''
380
+ };
381
+
382
+ this.$stage.css(css);
383
+ }
384
+ }, {
385
+ filter: [ 'width', 'items', 'settings' ],
386
+ run: function(cache) {
387
+ var iterator = this._coordinates.length,
388
+ grid = !this.settings.autoWidth,
389
+ items = this.$stage.children();
390
+
391
+ if (grid && cache.items.merge) {
392
+ while (iterator--) {
393
+ cache.css.width = this._widths[this.relative(iterator)];
394
+ items.eq(iterator).css(cache.css);
395
+ }
396
+ } else if (grid) {
397
+ cache.css.width = cache.items.width;
398
+ items.css(cache.css);
399
+ }
400
+ }
401
+ }, {
402
+ filter: [ 'items' ],
403
+ run: function() {
404
+ this._coordinates.length < 1 && this.$stage.removeAttr('style');
405
+ }
406
+ }, {
407
+ filter: [ 'width', 'items', 'settings' ],
408
+ run: function(cache) {
409
+ cache.current = cache.current ? this.$stage.children().index(cache.current) : 0;
410
+ cache.current = Math.max(this.minimum(), Math.min(this.maximum(), cache.current));
411
+ this.reset(cache.current);
412
+ }
413
+ }, {
414
+ filter: [ 'position' ],
415
+ run: function() {
416
+ this.animate(this.coordinates(this._current));
417
+ }
418
+ }, {
419
+ filter: [ 'width', 'position', 'items', 'settings' ],
420
+ run: function() {
421
+ var rtl = this.settings.rtl ? 1 : -1,
422
+ padding = this.settings.stagePadding * 2,
423
+ begin = this.coordinates(this.current()) + padding,
424
+ end = begin + this.width() * rtl,
425
+ inner, outer, matches = [], i, n;
426
+
427
+ for (i = 0, n = this._coordinates.length; i < n; i++) {
428
+ inner = this._coordinates[i - 1] || 0;
429
+ outer = Math.abs(this._coordinates[i]) + padding * rtl;
430
+
431
+ if ((this.op(inner, '<=', begin) && (this.op(inner, '>', end)))
432
+ || (this.op(outer, '<', begin) && this.op(outer, '>', end))) {
433
+ matches.push(i);
434
+ }
435
+ }
436
+
437
+ this.$stage.children('.active').removeClass('active');
438
+ this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active');
439
+
440
+ this.$stage.children('.center').removeClass('center');
441
+ if (this.settings.center) {
442
+ this.$stage.children().eq(this.current()).addClass('center');
443
+ }
444
+ }
445
+ } ];
446
+
447
+ /**
448
+ * Create the stage DOM element
449
+ */
450
+ Owl.prototype.initializeStage = function() {
451
+ this.$stage = this.$element.find('.' + this.settings.stageClass);
452
+
453
+ // if the stage is already in the DOM, grab it and skip stage initialization
454
+ if (this.$stage.length) {
455
+ return;
456
+ }
457
+
458
+ this.$element.addClass(this.options.loadingClass);
459
+
460
+ // create stage
461
+ this.$stage = $('<' + this.settings.stageElement + ' class="' + this.settings.stageClass + '"/>')
462
+ .wrap('<div class="' + this.settings.stageOuterClass + '"/>');
463
+
464
+ // append stage
465
+ this.$element.append(this.$stage.parent());
466
+ };
467
+
468
+ /**
469
+ * Create item DOM elements
470
+ */
471
+ Owl.prototype.initializeItems = function() {
472
+ var $items = this.$element.find('.owl-item');
473
+
474
+ // if the items are already in the DOM, grab them and skip item initialization
475
+ if ($items.length) {
476
+ this._items = $items.get().map(function(item) {
477
+ return $(item);
478
+ });
479
+
480
+ this._mergers = this._items.map(function() {
481
+ return 1;
482
+ });
483
+
484
+ this.refresh();
485
+
486
+ return;
487
+ }
488
+
489
+ // append content
490
+ this.replace(this.$element.children().not(this.$stage.parent()));
491
+
492
+ // check visibility
493
+ if (this.isVisible()) {
494
+ // update view
495
+ this.refresh();
496
+ } else {
497
+ // invalidate width
498
+ this.invalidate('width');
499
+ }
500
+
501
+ this.$element
502
+ .removeClass(this.options.loadingClass)
503
+ .addClass(this.options.loadedClass);
504
+ };
505
+
506
+ /**
507
+ * Initializes the carousel.
508
+ * @protected
509
+ */
510
+ Owl.prototype.initialize = function() {
511
+ this.enter('initializing');
512
+ this.trigger('initialize');
513
+
514
+ this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl);
515
+
516
+ if (this.settings.autoWidth && !this.is('pre-loading')) {
517
+ var imgs, nestedSelector, width;
518
+ imgs = this.$element.find('img');
519
+ nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined;
520
+ width = this.$element.children(nestedSelector).width();
521
+
522
+ if (imgs.length && width <= 0) {
523
+ this.preloadAutoWidthImages(imgs);
524
+ }
525
+ }
526
+
527
+ this.initializeStage();
528
+ this.initializeItems();
529
+
530
+ // register event handlers
531
+ this.registerEventHandlers();
532
+
533
+ this.leave('initializing');
534
+ this.trigger('initialized');
535
+ };
536
+
537
+ /**
538
+ * @returns {Boolean} visibility of $element
539
+ * if you know the carousel will always be visible you can set `checkVisibility` to `false` to
540
+ * prevent the expensive browser layout forced reflow the $element.is(':visible') does
541
+ */
542
+ Owl.prototype.isVisible = function() {
543
+ return this.settings.checkVisibility
544
+ ? this.$element.is(':visible')
545
+ : true;
546
+ };
547
+
548
+ /**
549
+ * Setups the current settings.
550
+ * @todo Remove responsive classes. Why should adaptive designs be brought into IE8?
551
+ * @todo Support for media queries by using `matchMedia` would be nice.
552
+ * @public
553
+ */
554
+ Owl.prototype.setup = function() {
555
+ var viewport = this.viewport(),
556
+ overwrites = this.options.responsive,
557
+ match = -1,
558
+ settings = null;
559
+
560
+ if (!overwrites) {
561
+ settings = $.extend({}, this.options);
562
+ } else {
563
+ $.each(overwrites, function(breakpoint) {
564
+ if (breakpoint <= viewport && breakpoint > match) {
565
+ match = Number(breakpoint);
566
+ }
567
+ });
568
+
569
+ settings = $.extend({}, this.options, overwrites[match]);
570
+ if (typeof settings.stagePadding === 'function') {
571
+ settings.stagePadding = settings.stagePadding();
572
+ }
573
+ delete settings.responsive;
574
+
575
+ // responsive class
576
+ if (settings.responsiveClass) {
577
+ this.$element.attr('class',
578
+ this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match)
579
+ );
580
+ }
581
+ }
582
+
583
+ this.trigger('change', { property: { name: 'settings', value: settings } });
584
+ this._breakpoint = match;
585
+ this.settings = settings;
586
+ this.invalidate('settings');
587
+ this.trigger('changed', { property: { name: 'settings', value: this.settings } });
588
+ };
589
+
590
+ /**
591
+ * Updates option logic if necessery.
592
+ * @protected
593
+ */
594
+ Owl.prototype.optionsLogic = function() {
595
+ if (this.settings.autoWidth) {
596
+ this.settings.stagePadding = false;
597
+ this.settings.merge = false;
598
+ }
599
+ };
600
+
601
+ /**
602
+ * Prepares an item before add.
603
+ * @todo Rename event parameter `content` to `item`.
604
+ * @protected
605
+ * @returns {jQuery|HTMLElement} - The item container.
606
+ */
607
+ Owl.prototype.prepare = function(item) {
608
+ var event = this.trigger('prepare', { content: item });
609
+
610
+ if (!event.data) {
611
+ event.data = $('<' + this.settings.itemElement + '/>')
612
+ .addClass(this.options.itemClass).append(item)
613
+ }
614
+
615
+ this.trigger('prepared', { content: event.data });
616
+
617
+ return event.data;
618
+ };
619
+
620
+ /**
621
+ * Updates the view.
622
+ * @public
623
+ */
624
+ Owl.prototype.update = function() {
625
+ var i = 0,
626
+ n = this._pipe.length,
627
+ filter = $.proxy(function(p) { return this[p] }, this._invalidated),
628
+ cache = {};
629
+
630
+ while (i < n) {
631
+ if (this._invalidated.all || $.grep(this._pipe[i].filter, filter).length > 0) {
632
+ this._pipe[i].run(cache);
633
+ }
634
+ i++;
635
+ }
636
+
637
+ this._invalidated = {};
638
+
639
+ !this.is('valid') && this.enter('valid');
640
+ };
641
+
642
+ /**
643
+ * Gets the width of the view.
644
+ * @public
645
+ * @param {Owl.Width} [dimension=Owl.Width.Default] - The dimension to return.
646
+ * @returns {Number} - The width of the view in pixel.
647
+ */
648
+ Owl.prototype.width = function(dimension) {
649
+ dimension = dimension || Owl.Width.Default;
650
+ switch (dimension) {
651
+ case Owl.Width.Inner:
652
+ case Owl.Width.Outer:
653
+ return this._width;
654
+ default:
655
+ return this._width - this.settings.stagePadding * 2 + this.settings.margin;
656
+ }
657
+ };
658
+
659
+ /**
660
+ * Refreshes the carousel primarily for adaptive purposes.
661
+ * @public
662
+ */
663
+ Owl.prototype.refresh = function() {
664
+ this.enter('refreshing');
665
+ this.trigger('refresh');
666
+
667
+ this.setup();
668
+
669
+ this.optionsLogic();
670
+
671
+ this.$element.addClass(this.options.refreshClass);
672
+
673
+ this.update();
674
+
675
+ this.$element.removeClass(this.options.refreshClass);
676
+
677
+ this.leave('refreshing');
678
+ this.trigger('refreshed');
679
+ };
680
+
681
+ /**
682
+ * Checks window `resize` event.
683
+ * @protected
684
+ */
685
+ Owl.prototype.onThrottledResize = function() {
686
+ window.clearTimeout(this.resizeTimer);
687
+ this.resizeTimer = window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate);
688
+ };
689
+
690
+ /**
691
+ * Checks window `resize` event.
692
+ * @protected
693
+ */
694
+ Owl.prototype.onResize = function() {
695
+ if (!this._items.length) {
696
+ return false;
697
+ }
698
+
699
+ if (this._width === this.$element.width()) {
700
+ return false;
701
+ }
702
+
703
+ if (!this.isVisible()) {
704
+ return false;
705
+ }
706
+
707
+ this.enter('resizing');
708
+
709
+ if (this.trigger('resize').isDefaultPrevented()) {
710
+ this.leave('resizing');
711
+ return false;
712
+ }
713
+
714
+ this.invalidate('width');
715
+
716
+ this.refresh();
717
+
718
+ this.leave('resizing');
719
+ this.trigger('resized');
720
+ };
721
+
722
+ /**
723
+ * Registers event handlers.
724
+ * @todo Check `msPointerEnabled`
725
+ * @todo #261
726
+ * @protected
727
+ */
728
+ Owl.prototype.registerEventHandlers = function() {
729
+ if ($.support.transition) {
730
+ this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this));
731
+ }
732
+
733
+ if (this.settings.responsive !== false) {
734
+ this.on(window, 'resize', this._handlers.onThrottledResize);
735
+ }
736
+
737
+ if (this.settings.mouseDrag) {
738
+ this.$element.addClass(this.options.dragClass);
739
+ this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this));
740
+ this.$stage.on('dragstart.owl.core selectstart.owl.core', function() { return false });
741
+ }
742
+
743
+ if (this.settings.touchDrag){
744
+ this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this));
745
+ this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this));
746
+ }
747
+ };
748
+
749
+ /**
750
+ * Handles `touchstart` and `mousedown` events.
751
+ * @todo Horizontal swipe threshold as option
752
+ * @todo #261
753
+ * @protected
754
+ * @param {Event} event - The event arguments.
755
+ */
756
+ Owl.prototype.onDragStart = function(event) {
757
+ var stage = null;
758
+
759
+ if (event.which === 3) {
760
+ return;
761
+ }
762
+
763
+ if ($.support.transform) {
764
+ stage = this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(',');
765
+ stage = {
766
+ x: stage[stage.length === 16 ? 12 : 4],
767
+ y: stage[stage.length === 16 ? 13 : 5]
768
+ };
769
+ } else {
770
+ stage = this.$stage.position();
771
+ stage = {
772
+ x: this.settings.rtl ?
773
+ stage.left + this.$stage.width() - this.width() + this.settings.margin :
774
+ stage.left,
775
+ y: stage.top
776
+ };
777
+ }
778
+
779
+ if (this.is('animating')) {
780
+ $.support.transform ? this.animate(stage.x) : this.$stage.stop()
781
+ this.invalidate('position');
782
+ }
783
+
784
+ this.$element.toggleClass(this.options.grabClass, event.type === 'mousedown');
785
+
786
+ this.speed(0);
787
+
788
+ this._drag.time = new Date().getTime();
789
+ this._drag.target = $(event.target);
790
+ this._drag.stage.start = stage;
791
+ this._drag.stage.current = stage;
792
+ this._drag.pointer = this.pointer(event);
793
+
794
+ $(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this));
795
+
796
+ $(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event) {
797
+ var delta = this.difference(this._drag.pointer, this.pointer(event));
798
+
799
+ $(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this));
800
+
801
+ if (Math.abs(delta.x) < Math.abs(delta.y) && this.is('valid')) {
802
+ return;
803
+ }
804
+
805
+ event.preventDefault();
806
+
807
+ this.enter('dragging');
808
+ this.trigger('drag');
809
+ }, this));
810
+ };
811
+
812
+ /**
813
+ * Handles the `touchmove` and `mousemove` events.
814
+ * @todo #261
815
+ * @protected
816
+ * @param {Event} event - The event arguments.
817
+ */
818
+ Owl.prototype.onDragMove = function(event) {
819
+ var minimum = null,
820
+ maximum = null,
821
+ pull = null,
822
+ delta = this.difference(this._drag.pointer, this.pointer(event)),
823
+ stage = this.difference(this._drag.stage.start, delta);
824
+
825
+ if (!this.is('dragging')) {
826
+ return;
827
+ }
828
+
829
+ event.preventDefault();
830
+
831
+ if (this.settings.loop) {
832
+ minimum = this.coordinates(this.minimum());
833
+ maximum = this.coordinates(this.maximum() + 1) - minimum;
834
+ stage.x = (((stage.x - minimum) % maximum + maximum) % maximum) + minimum;
835
+ } else {
836
+ minimum = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum());
837
+ maximum = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum());
838
+ pull = this.settings.pullDrag ? -1 * delta.x / 5 : 0;
839
+ stage.x = Math.max(Math.min(stage.x, minimum + pull), maximum + pull);
840
+ }
841
+
842
+ this._drag.stage.current = stage;
843
+
844
+ this.animate(stage.x);
845
+ };
846
+
847
+ /**
848
+ * Handles the `touchend` and `mouseup` events.
849
+ * @todo #261
850
+ * @todo Threshold for click event
851
+ * @protected
852
+ * @param {Event} event - The event arguments.
853
+ */
854
+ Owl.prototype.onDragEnd = function(event) {
855
+ var delta = this.difference(this._drag.pointer, this.pointer(event)),
856
+ stage = this._drag.stage.current,
857
+ direction = delta.x > 0 ^ this.settings.rtl ? 'left' : 'right';
858
+
859
+ $(document).off('.owl.core');
860
+
861
+ this.$element.removeClass(this.options.grabClass);
862
+
863
+ if (delta.x !== 0 && this.is('dragging') || !this.is('valid')) {
864
+ this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed);
865
+ this.current(this.closest(stage.x, delta.x !== 0 ? direction : this._drag.direction));
866
+ this.invalidate('position');
867
+ this.update();
868
+
869
+ this._drag.direction = direction;
870
+
871
+ if (Math.abs(delta.x) > 3 || new Date().getTime() - this._drag.time > 300) {
872
+ this._drag.target.one('click.owl.core', function() { return false; });
873
+ }
874
+ }
875
+
876
+ if (!this.is('dragging')) {
877
+ return;
878
+ }
879
+
880
+ this.leave('dragging');
881
+ this.trigger('dragged');
882
+ };
883
+
884
+ /**
885
+ * Gets absolute position of the closest item for a coordinate.
886
+ * @todo Setting `freeDrag` makes `closest` not reusable. See #165.
887
+ * @protected
888
+ * @param {Number} coordinate - The coordinate in pixel.
889
+ * @param {String} direction - The direction to check for the closest item. Ether `left` or `right`.
890
+ * @return {Number} - The absolute position of the closest item.
891
+ */
892
+ Owl.prototype.closest = function(coordinate, direction) {
893
+ var position = -1,
894
+ pull = 30,
895
+ width = this.width(),
896
+ coordinates = this.coordinates();
897
+
898
+ if (!this.settings.freeDrag) {
899
+ // check closest item
900
+ $.each(coordinates, $.proxy(function(index, value) {
901
+ // on a left pull, check on current index
902
+ if (direction === 'left' && coordinate > value - pull && coordinate < value + pull) {
903
+ position = index;
904
+ // on a right pull, check on previous index
905
+ // to do so, subtract width from value and set position = index + 1
906
+ } else if (direction === 'right' && coordinate > value - width - pull && coordinate < value - width + pull) {
907
+ position = index + 1;
908
+ } else if (this.op(coordinate, '<', value)
909
+ && this.op(coordinate, '>', coordinates[index + 1] !== undefined ? coordinates[index + 1] : value - width)) {
910
+ position = direction === 'left' ? index + 1 : index;
911
+ }
912
+ return position === -1;
913
+ }, this));
914
+ }
915
+
916
+ if (!this.settings.loop) {
917
+ // non loop boundries
918
+ if (this.op(coordinate, '>', coordinates[this.minimum()])) {
919
+ position = coordinate = this.minimum();
920
+ } else if (this.op(coordinate, '<', coordinates[this.maximum()])) {
921
+ position = coordinate = this.maximum();
922
+ }
923
+ }
924
+
925
+ return position;
926
+ };
927
+
928
+ /**
929
+ * Animates the stage.
930
+ * @todo #270
931
+ * @public
932
+ * @param {Number} coordinate - The coordinate in pixels.
933
+ */
934
+ Owl.prototype.animate = function(coordinate) {
935
+ var animate = this.speed() > 0;
936
+
937
+ this.is('animating') && this.onTransitionEnd();
938
+
939
+ if (animate) {
940
+ this.enter('animating');
941
+ this.trigger('translate');
942
+ }
943
+
944
+ if ($.support.transform3d && $.support.transition) {
945
+ this.$stage.css({
946
+ transform: 'translate3d(' + coordinate + 'px,0px,0px)',
947
+ transition: (this.speed() / 1000) + 's'
948
+ });
949
+ } else if (animate) {
950
+ this.$stage.animate({
951
+ left: coordinate + 'px'
952
+ }, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this));
953
+ } else {
954
+ this.$stage.css({
955
+ left: coordinate + 'px'
956
+ });
957
+ }
958
+ };
959
+
960
+ /**
961
+ * Checks whether the carousel is in a specific state or not.
962
+ * @param {String} state - The state to check.
963
+ * @returns {Boolean} - The flag which indicates if the carousel is busy.
964
+ */
965
+ Owl.prototype.is = function(state) {
966
+ return this._states.current[state] && this._states.current[state] > 0;
967
+ };
968
+
969
+ /**
970
+ * Sets the absolute position of the current item.
971
+ * @public
972
+ * @param {Number} [position] - The new absolute position or nothing to leave it unchanged.
973
+ * @returns {Number} - The absolute position of the current item.
974
+ */
975
+ Owl.prototype.current = function(position) {
976
+ if (position === undefined) {
977
+ return this._current;
978
+ }
979
+
980
+ if (this._items.length === 0) {
981
+ return undefined;
982
+ }
983
+
984
+ position = this.normalize(position);
985
+
986
+ if (this._current !== position) {
987
+ var event = this.trigger('change', { property: { name: 'position', value: position } });
988
+
989
+ if (event.data !== undefined) {
990
+ position = this.normalize(event.data);
991
+ }
992
+
993
+ this._current = position;
994
+
995
+ this.invalidate('position');
996
+
997
+ this.trigger('changed', { property: { name: 'position', value: this._current } });
998
+ }
999
+
1000
+ return this._current;
1001
+ };
1002
+
1003
+ /**
1004
+ * Invalidates the given part of the update routine.
1005
+ * @param {String} [part] - The part to invalidate.
1006
+ * @returns {Array.<String>} - The invalidated parts.
1007
+ */
1008
+ Owl.prototype.invalidate = function(part) {
1009
+ if ($.type(part) === 'string') {
1010
+ this._invalidated[part] = true;
1011
+ this.is('valid') && this.leave('valid');
1012
+ }
1013
+ return $.map(this._invalidated, function(v, i) { return i });
1014
+ };
1015
+
1016
+ /**
1017
+ * Resets the absolute position of the current item.
1018
+ * @public
1019
+ * @param {Number} position - The absolute position of the new item.
1020
+ */
1021
+ Owl.prototype.reset = function(position) {
1022
+ position = this.normalize(position);
1023
+
1024
+ if (position === undefined) {
1025
+ return;
1026
+ }
1027
+
1028
+ this._speed = 0;
1029
+ this._current = position;
1030
+
1031
+ this.suppress([ 'translate', 'translated' ]);
1032
+
1033
+ this.animate(this.coordinates(position));
1034
+
1035
+ this.release([ 'translate', 'translated' ]);
1036
+ };
1037
+
1038
+ /**
1039
+ * Normalizes an absolute or a relative position of an item.
1040
+ * @public
1041
+ * @param {Number} position - The absolute or relative position to normalize.
1042
+ * @param {Boolean} [relative=false] - Whether the given position is relative or not.
1043
+ * @returns {Number} - The normalized position.
1044
+ */
1045
+ Owl.prototype.normalize = function(position, relative) {
1046
+ var n = this._items.length,
1047
+ m = relative ? 0 : this._clones.length;
1048
+
1049
+ if (!this.isNumeric(position) || n < 1) {
1050
+ position = undefined;
1051
+ } else if (position < 0 || position >= n + m) {
1052
+ position = ((position - m / 2) % n + n) % n + m / 2;
1053
+ }
1054
+
1055
+ return position;
1056
+ };
1057
+
1058
+ /**
1059
+ * Converts an absolute position of an item into a relative one.
1060
+ * @public
1061
+ * @param {Number} position - The absolute position to convert.
1062
+ * @returns {Number} - The converted position.
1063
+ */
1064
+ Owl.prototype.relative = function(position) {
1065
+ position -= this._clones.length / 2;
1066
+ return this.normalize(position, true);
1067
+ };
1068
+
1069
+ /**
1070
+ * Gets the maximum position for the current item.
1071
+ * @public
1072
+ * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
1073
+ * @returns {Number}
1074
+ */
1075
+ Owl.prototype.maximum = function(relative) {
1076
+ var settings = this.settings,
1077
+ maximum = this._coordinates.length,
1078
+ iterator,
1079
+ reciprocalItemsWidth,
1080
+ elementWidth;
1081
+
1082
+ if (settings.loop) {
1083
+ maximum = this._clones.length / 2 + this._items.length - 1;
1084
+ } else if (settings.autoWidth || settings.merge) {
1085
+ iterator = this._items.length;
1086
+ if (iterator) {
1087
+ reciprocalItemsWidth = this._items[--iterator].width();
1088
+ elementWidth = this.$element.width();
1089
+ while (iterator--) {
1090
+ reciprocalItemsWidth += this._items[iterator].width() + this.settings.margin;
1091
+ if (reciprocalItemsWidth > elementWidth) {
1092
+ break;
1093
+ }
1094
+ }
1095
+ }
1096
+ maximum = iterator + 1;
1097
+ } else if (settings.center) {
1098
+ maximum = this._items.length - 1;
1099
+ } else {
1100
+ maximum = this._items.length - settings.items;
1101
+ }
1102
+
1103
+ if (relative) {
1104
+ maximum -= this._clones.length / 2;
1105
+ }
1106
+
1107
+ return Math.max(maximum, 0);
1108
+ };
1109
+
1110
+ /**
1111
+ * Gets the minimum position for the current item.
1112
+ * @public
1113
+ * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
1114
+ * @returns {Number}
1115
+ */
1116
+ Owl.prototype.minimum = function(relative) {
1117
+ return relative ? 0 : this._clones.length / 2;
1118
+ };
1119
+
1120
+ /**
1121
+ * Gets an item at the specified relative position.
1122
+ * @public
1123
+ * @param {Number} [position] - The relative position of the item.
1124
+ * @return {jQuery|Array.<jQuery>} - The item at the given position or all items if no position was given.
1125
+ */
1126
+ Owl.prototype.items = function(position) {
1127
+ if (position === undefined) {
1128
+ return this._items.slice();
1129
+ }
1130
+
1131
+ position = this.normalize(position, true);
1132
+ return this._items[position];
1133
+ };
1134
+
1135
+ /**
1136
+ * Gets an item at the specified relative position.
1137
+ * @public
1138
+ * @param {Number} [position] - The relative position of the item.
1139
+ * @return {jQuery|Array.<jQuery>} - The item at the given position or all items if no position was given.
1140
+ */
1141
+ Owl.prototype.mergers = function(position) {
1142
+ if (position === undefined) {
1143
+ return this._mergers.slice();
1144
+ }
1145
+
1146
+ position = this.normalize(position, true);
1147
+ return this._mergers[position];
1148
+ };
1149
+
1150
+ /**
1151
+ * Gets the absolute positions of clones for an item.
1152
+ * @public
1153
+ * @param {Number} [position] - The relative position of the item.
1154
+ * @returns {Array.<Number>} - The absolute positions of clones for the item or all if no position was given.
1155
+ */
1156
+ Owl.prototype.clones = function(position) {
1157
+ var odd = this._clones.length / 2,
1158
+ even = odd + this._items.length,
1159
+ map = function(index) { return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2 };
1160
+
1161
+ if (position === undefined) {
1162
+ return $.map(this._clones, function(v, i) { return map(i) });
1163
+ }
1164
+
1165
+ return $.map(this._clones, function(v, i) { return v === position ? map(i) : null });
1166
+ };
1167
+
1168
+ /**
1169
+ * Sets the current animation speed.
1170
+ * @public
1171
+ * @param {Number} [speed] - The animation speed in milliseconds or nothing to leave it unchanged.
1172
+ * @returns {Number} - The current animation speed in milliseconds.
1173
+ */
1174
+ Owl.prototype.speed = function(speed) {
1175
+ if (speed !== undefined) {
1176
+ this._speed = speed;
1177
+ }
1178
+
1179
+ return this._speed;
1180
+ };
1181
+
1182
+ /**
1183
+ * Gets the coordinate of an item.
1184
+ * @todo The name of this method is missleanding.
1185
+ * @public
1186
+ * @param {Number} position - The absolute position of the item within `minimum()` and `maximum()`.
1187
+ * @returns {Number|Array.<Number>} - The coordinate of the item in pixel or all coordinates.
1188
+ */
1189
+ Owl.prototype.coordinates = function(position) {
1190
+ var multiplier = 1,
1191
+ newPosition = position - 1,
1192
+ coordinate;
1193
+
1194
+ if (position === undefined) {
1195
+ return $.map(this._coordinates, $.proxy(function(coordinate, index) {
1196
+ return this.coordinates(index);
1197
+ }, this));
1198
+ }
1199
+
1200
+ if (this.settings.center) {
1201
+ if (this.settings.rtl) {
1202
+ multiplier = -1;
1203
+ newPosition = position + 1;
1204
+ }
1205
+
1206
+ coordinate = this._coordinates[position];
1207
+ coordinate += (this.width() - coordinate + (this._coordinates[newPosition] || 0)) / 2 * multiplier;
1208
+ } else {
1209
+ coordinate = this._coordinates[newPosition] || 0;
1210
+ }
1211
+
1212
+ coordinate = Math.ceil(coordinate);
1213
+
1214
+ return coordinate;
1215
+ };
1216
+
1217
+ /**
1218
+ * Calculates the speed for a translation.
1219
+ * @protected
1220
+ * @param {Number} from - The absolute position of the start item.
1221
+ * @param {Number} to - The absolute position of the target item.
1222
+ * @param {Number} [factor=undefined] - The time factor in milliseconds.
1223
+ * @returns {Number} - The time in milliseconds for the translation.
1224
+ */
1225
+ Owl.prototype.duration = function(from, to, factor) {
1226
+ if (factor === 0) {
1227
+ return 0;
1228
+ }
1229
+
1230
+ return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor || this.settings.smartSpeed));
1231
+ };
1232
+
1233
+ /**
1234
+ * Slides to the specified item.
1235
+ * @public
1236
+ * @param {Number} position - The position of the item.
1237
+ * @param {Number} [speed] - The time in milliseconds for the transition.
1238
+ */
1239
+ Owl.prototype.to = function(position, speed) {
1240
+ var current = this.current(),
1241
+ revert = null,
1242
+ distance = position - this.relative(current),
1243
+ direction = (distance > 0) - (distance < 0),
1244
+ items = this._items.length,
1245
+ minimum = this.minimum(),
1246
+ maximum = this.maximum();
1247
+
1248
+ if (this.settings.loop) {
1249
+ if (!this.settings.rewind && Math.abs(distance) > items / 2) {
1250
+ distance += direction * -1 * items;
1251
+ }
1252
+
1253
+ position = current + distance;
1254
+ revert = ((position - minimum) % items + items) % items + minimum;
1255
+
1256
+ if (revert !== position && revert - distance <= maximum && revert - distance > 0) {
1257
+ current = revert - distance;
1258
+ position = revert;
1259
+ this.reset(current);
1260
+ }
1261
+ } else if (this.settings.rewind) {
1262
+ maximum += 1;
1263
+ position = (position % maximum + maximum) % maximum;
1264
+ } else {
1265
+ position = Math.max(minimum, Math.min(maximum, position));
1266
+ }
1267
+
1268
+ this.speed(this.duration(current, position, speed));
1269
+ this.current(position);
1270
+
1271
+ if (this.isVisible()) {
1272
+ this.update();
1273
+ }
1274
+ };
1275
+
1276
+ /**
1277
+ * Slides to the next item.
1278
+ * @public
1279
+ * @param {Number} [speed] - The time in milliseconds for the transition.
1280
+ */
1281
+ Owl.prototype.next = function(speed) {
1282
+ speed = speed || false;
1283
+ this.to(this.relative(this.current()) + 1, speed);
1284
+ };
1285
+
1286
+ /**
1287
+ * Slides to the previous item.
1288
+ * @public
1289
+ * @param {Number} [speed] - The time in milliseconds for the transition.
1290
+ */
1291
+ Owl.prototype.prev = function(speed) {
1292
+ speed = speed || false;
1293
+ this.to(this.relative(this.current()) - 1, speed);
1294
+ };
1295
+
1296
+ /**
1297
+ * Handles the end of an animation.
1298
+ * @protected
1299
+ * @param {Event} event - The event arguments.
1300
+ */
1301
+ Owl.prototype.onTransitionEnd = function(event) {
1302
+
1303
+ // if css2 animation then event object is undefined
1304
+ if (event !== undefined) {
1305
+ event.stopPropagation();
1306
+
1307
+ // Catch only owl-stage transitionEnd event
1308
+ if ((event.target || event.srcElement || event.originalTarget) !== this.$stage.get(0)) {
1309
+ return false;
1310
+ }
1311
+ }
1312
+
1313
+ this.leave('animating');
1314
+ this.trigger('translated');
1315
+ };
1316
+
1317
+ /**
1318
+ * Gets viewport width.
1319
+ * @protected
1320
+ * @return {Number} - The width in pixel.
1321
+ */
1322
+ Owl.prototype.viewport = function() {
1323
+ var width;
1324
+ if (this.options.responsiveBaseElement !== window) {
1325
+ width = $(this.options.responsiveBaseElement).width();
1326
+ } else if (window.innerWidth) {
1327
+ width = window.innerWidth;
1328
+ } else if (document.documentElement && document.documentElement.clientWidth) {
1329
+ width = document.documentElement.clientWidth;
1330
+ } else {
1331
+ console.warn('Can not detect viewport width.');
1332
+ }
1333
+ return width;
1334
+ };
1335
+
1336
+ /**
1337
+ * Replaces the current content.
1338
+ * @public
1339
+ * @param {HTMLElement|jQuery|String} content - The new content.
1340
+ */
1341
+ Owl.prototype.replace = function(content) {
1342
+ this.$stage.empty();
1343
+ this._items = [];
1344
+
1345
+ if (content) {
1346
+ content = (content instanceof jQuery) ? content : $(content);
1347
+ }
1348
+
1349
+ if (this.settings.nestedItemSelector) {
1350
+ content = content.find('.' + this.settings.nestedItemSelector);
1351
+ }
1352
+
1353
+ content.filter(function() {
1354
+ return this.nodeType === 1;
1355
+ }).each($.proxy(function(index, item) {
1356
+ item = this.prepare(item);
1357
+ this.$stage.append(item);
1358
+ this._items.push(item);
1359
+ this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
1360
+ }, this));
1361
+
1362
+ this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0);
1363
+
1364
+ this.invalidate('items');
1365
+ };
1366
+
1367
+ /**
1368
+ * Adds an item.
1369
+ * @todo Use `item` instead of `content` for the event arguments.
1370
+ * @public
1371
+ * @param {HTMLElement|jQuery|String} content - The item content to add.
1372
+ * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end.
1373
+ */
1374
+ Owl.prototype.add = function(content, position) {
1375
+ var current = this.relative(this._current);
1376
+
1377
+ position = position === undefined ? this._items.length : this.normalize(position, true);
1378
+ content = content instanceof jQuery ? content : $(content);
1379
+
1380
+ this.trigger('add', { content: content, position: position });
1381
+
1382
+ content = this.prepare(content);
1383
+
1384
+ if (this._items.length === 0 || position === this._items.length) {
1385
+ this._items.length === 0 && this.$stage.append(content);
1386
+ this._items.length !== 0 && this._items[position - 1].after(content);
1387
+ this._items.push(content);
1388
+ this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
1389
+ } else {
1390
+ this._items[position].before(content);
1391
+ this._items.splice(position, 0, content);
1392
+ this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
1393
+ }
1394
+
1395
+ this._items[current] && this.reset(this._items[current].index());
1396
+
1397
+ this.invalidate('items');
1398
+
1399
+ this.trigger('added', { content: content, position: position });
1400
+ };
1401
+
1402
+ /**
1403
+ * Removes an item by its position.
1404
+ * @todo Use `item` instead of `content` for the event arguments.
1405
+ * @public
1406
+ * @param {Number} position - The relative position of the item to remove.
1407
+ */
1408
+ Owl.prototype.remove = function(position) {
1409
+ position = this.normalize(position, true);
1410
+
1411
+ if (position === undefined) {
1412
+ return;
1413
+ }
1414
+
1415
+ this.trigger('remove', { content: this._items[position], position: position });
1416
+
1417
+ this._items[position].remove();
1418
+ this._items.splice(position, 1);
1419
+ this._mergers.splice(position, 1);
1420
+
1421
+ this.invalidate('items');
1422
+
1423
+ this.trigger('removed', { content: null, position: position });
1424
+ };
1425
+
1426
+ /**
1427
+ * Preloads images with auto width.
1428
+ * @todo Replace by a more generic approach
1429
+ * @protected
1430
+ */
1431
+ Owl.prototype.preloadAutoWidthImages = function(images) {
1432
+ images.each($.proxy(function(i, element) {
1433
+ this.enter('pre-loading');
1434
+ element = $(element);
1435
+ $(new Image()).one('load', $.proxy(function(e) {
1436
+ element.attr('src', e.target.src);
1437
+ element.css('opacity', 1);
1438
+ this.leave('pre-loading');
1439
+ !this.is('pre-loading') && !this.is('initializing') && this.refresh();
1440
+ }, this)).attr('src', element.attr('src') || element.attr('data-src') || element.attr('data-src-retina'));
1441
+ }, this));
1442
+ };
1443
+
1444
+ /**
1445
+ * Destroys the carousel.
1446
+ * @public
1447
+ */
1448
+ Owl.prototype.destroy = function() {
1449
+
1450
+ this.$element.off('.owl.core');
1451
+ this.$stage.off('.owl.core');
1452
+ $(document).off('.owl.core');
1453
+
1454
+ if (this.settings.responsive !== false) {
1455
+ window.clearTimeout(this.resizeTimer);
1456
+ this.off(window, 'resize', this._handlers.onThrottledResize);
1457
+ }
1458
+
1459
+ for (var i in this._plugins) {
1460
+ this._plugins[i].destroy();
1461
+ }
1462
+
1463
+ this.$stage.children('.cloned').remove();
1464
+
1465
+ this.$stage.unwrap();
1466
+ this.$stage.children().contents().unwrap();
1467
+ this.$stage.children().unwrap();
1468
+ this.$stage.remove();
1469
+ this.$element
1470
+ .removeClass(this.options.refreshClass)
1471
+ .removeClass(this.options.loadingClass)
1472
+ .removeClass(this.options.loadedClass)
1473
+ .removeClass(this.options.rtlClass)
1474
+ .removeClass(this.options.dragClass)
1475
+ .removeClass(this.options.grabClass)
1476
+ .attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), ''))
1477
+ .removeData('owl.carousel');
1478
+ };
1479
+
1480
+ /**
1481
+ * Operators to calculate right-to-left and left-to-right.
1482
+ * @protected
1483
+ * @param {Number} [a] - The left side operand.
1484
+ * @param {String} [o] - The operator.
1485
+ * @param {Number} [b] - The right side operand.
1486
+ */
1487
+ Owl.prototype.op = function(a, o, b) {
1488
+ var rtl = this.settings.rtl;
1489
+ switch (o) {
1490
+ case '<':
1491
+ return rtl ? a > b : a < b;
1492
+ case '>':
1493
+ return rtl ? a < b : a > b;
1494
+ case '>=':
1495
+ return rtl ? a <= b : a >= b;
1496
+ case '<=':
1497
+ return rtl ? a >= b : a <= b;
1498
+ default:
1499
+ break;
1500
+ }
1501
+ };
1502
+
1503
+ /**
1504
+ * Attaches to an internal event.
1505
+ * @protected
1506
+ * @param {HTMLElement} element - The event source.
1507
+ * @param {String} event - The event name.
1508
+ * @param {Function} listener - The event handler to attach.
1509
+ * @param {Boolean} capture - Wether the event should be handled at the capturing phase or not.
1510
+ */
1511
+ Owl.prototype.on = function(element, event, listener, capture) {
1512
+ if (element.addEventListener) {
1513
+ element.addEventListener(event, listener, capture);
1514
+ } else if (element.attachEvent) {
1515
+ element.attachEvent('on' + event, listener);
1516
+ }
1517
+ };
1518
+
1519
+ /**
1520
+ * Detaches from an internal event.
1521
+ * @protected
1522
+ * @param {HTMLElement} element - The event source.
1523
+ * @param {String} event - The event name.
1524
+ * @param {Function} listener - The attached event handler to detach.
1525
+ * @param {Boolean} capture - Wether the attached event handler was registered as a capturing listener or not.
1526
+ */
1527
+ Owl.prototype.off = function(element, event, listener, capture) {
1528
+ if (element.removeEventListener) {
1529
+ element.removeEventListener(event, listener, capture);
1530
+ } else if (element.detachEvent) {
1531
+ element.detachEvent('on' + event, listener);
1532
+ }
1533
+ };
1534
+
1535
+ /**
1536
+ * Triggers a public event.
1537
+ * @todo Remove `status`, `relatedTarget` should be used instead.
1538
+ * @protected
1539
+ * @param {String} name - The event name.
1540
+ * @param {*} [data=null] - The event data.
1541
+ * @param {String} [namespace=carousel] - The event namespace.
1542
+ * @param {String} [state] - The state which is associated with the event.
1543
+ * @param {Boolean} [enter=false] - Indicates if the call enters the specified state or not.
1544
+ * @returns {Event} - The event arguments.
1545
+ */
1546
+ Owl.prototype.trigger = function(name, data, namespace, state, enter) {
1547
+ var status = {
1548
+ item: { count: this._items.length, index: this.current() }
1549
+ }, handler = $.camelCase(
1550
+ $.grep([ 'on', name, namespace ], function(v) { return v })
1551
+ .join('-').toLowerCase()
1552
+ ), event = $.Event(
1553
+ [ name, 'owl', namespace || 'carousel' ].join('.').toLowerCase(),
1554
+ $.extend({ relatedTarget: this }, status, data)
1555
+ );
1556
+
1557
+ if (!this._supress[name]) {
1558
+ $.each(this._plugins, function(name, plugin) {
1559
+ if (plugin.onTrigger) {
1560
+ plugin.onTrigger(event);
1561
+ }
1562
+ });
1563
+
1564
+ this.register({ type: Owl.Type.Event, name: name });
1565
+ this.$element.trigger(event);
1566
+
1567
+ if (this.settings && typeof this.settings[handler] === 'function') {
1568
+ this.settings[handler].call(this, event);
1569
+ }
1570
+ }
1571
+
1572
+ return event;
1573
+ };
1574
+
1575
+ /**
1576
+ * Enters a state.
1577
+ * @param name - The state name.
1578
+ */
1579
+ Owl.prototype.enter = function(name) {
1580
+ $.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
1581
+ if (this._states.current[name] === undefined) {
1582
+ this._states.current[name] = 0;
1583
+ }
1584
+
1585
+ this._states.current[name]++;
1586
+ }, this));
1587
+ };
1588
+
1589
+ /**
1590
+ * Leaves a state.
1591
+ * @param name - The state name.
1592
+ */
1593
+ Owl.prototype.leave = function(name) {
1594
+ $.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
1595
+ this._states.current[name]--;
1596
+ }, this));
1597
+ };
1598
+
1599
+ /**
1600
+ * Registers an event or state.
1601
+ * @public
1602
+ * @param {Object} object - The event or state to register.
1603
+ */
1604
+ Owl.prototype.register = function(object) {
1605
+ if (object.type === Owl.Type.Event) {
1606
+ if (!$.event.special[object.name]) {
1607
+ $.event.special[object.name] = {};
1608
+ }
1609
+
1610
+ if (!$.event.special[object.name].owl) {
1611
+ var _default = $.event.special[object.name]._default;
1612
+ $.event.special[object.name]._default = function(e) {
1613
+ if (_default && _default.apply && (!e.namespace || e.namespace.indexOf('owl') === -1)) {
1614
+ return _default.apply(this, arguments);
1615
+ }
1616
+ return e.namespace && e.namespace.indexOf('owl') > -1;
1617
+ };
1618
+ $.event.special[object.name].owl = true;
1619
+ }
1620
+ } else if (object.type === Owl.Type.State) {
1621
+ if (!this._states.tags[object.name]) {
1622
+ this._states.tags[object.name] = object.tags;
1623
+ } else {
1624
+ this._states.tags[object.name] = this._states.tags[object.name].concat(object.tags);
1625
+ }
1626
+
1627
+ this._states.tags[object.name] = $.grep(this._states.tags[object.name], $.proxy(function(tag, i) {
1628
+ return $.inArray(tag, this._states.tags[object.name]) === i;
1629
+ }, this));
1630
+ }
1631
+ };
1632
+
1633
+ /**
1634
+ * Suppresses events.
1635
+ * @protected
1636
+ * @param {Array.<String>} events - The events to suppress.
1637
+ */
1638
+ Owl.prototype.suppress = function(events) {
1639
+ $.each(events, $.proxy(function(index, event) {
1640
+ this._supress[event] = true;
1641
+ }, this));
1642
+ };
1643
+
1644
+ /**
1645
+ * Releases suppressed events.
1646
+ * @protected
1647
+ * @param {Array.<String>} events - The events to release.
1648
+ */
1649
+ Owl.prototype.release = function(events) {
1650
+ $.each(events, $.proxy(function(index, event) {
1651
+ delete this._supress[event];
1652
+ }, this));
1653
+ };
1654
+
1655
+ /**
1656
+ * Gets unified pointer coordinates from event.
1657
+ * @todo #261
1658
+ * @protected
1659
+ * @param {Event} - The `mousedown` or `touchstart` event.
1660
+ * @returns {Object} - Contains `x` and `y` coordinates of current pointer position.
1661
+ */
1662
+ Owl.prototype.pointer = function(event) {
1663
+ var result = { x: null, y: null };
1664
+
1665
+ event = event.originalEvent || event || window.event;
1666
+
1667
+ event = event.touches && event.touches.length ?
1668
+ event.touches[0] : event.changedTouches && event.changedTouches.length ?
1669
+ event.changedTouches[0] : event;
1670
+
1671
+ if (event.pageX) {
1672
+ result.x = event.pageX;
1673
+ result.y = event.pageY;
1674
+ } else {
1675
+ result.x = event.clientX;
1676
+ result.y = event.clientY;
1677
+ }
1678
+
1679
+ return result;
1680
+ };
1681
+
1682
+ /**
1683
+ * Determines if the input is a Number or something that can be coerced to a Number
1684
+ * @protected
1685
+ * @param {Number|String|Object|Array|Boolean|RegExp|Function|Symbol} - The input to be tested
1686
+ * @returns {Boolean} - An indication if the input is a Number or can be coerced to a Number
1687
+ */
1688
+ Owl.prototype.isNumeric = function(number) {
1689
+ return !isNaN(parseFloat(number));
1690
+ };
1691
+
1692
+ /**
1693
+ * Gets the difference of two vectors.
1694
+ * @todo #261
1695
+ * @protected
1696
+ * @param {Object} - The first vector.
1697
+ * @param {Object} - The second vector.
1698
+ * @returns {Object} - The difference.
1699
+ */
1700
+ Owl.prototype.difference = function(first, second) {
1701
+ return {
1702
+ x: first.x - second.x,
1703
+ y: first.y - second.y
1704
+ };
1705
+ };
1706
+
1707
+ /**
1708
+ * The jQuery Plugin for the Owl Carousel
1709
+ * @todo Navigation plugin `next` and `prev`
1710
+ * @public
1711
+ */
1712
+ $.fn.owlCarousel = function(option) {
1713
+ var args = Array.prototype.slice.call(arguments, 1);
1714
+
1715
+ return this.each(function() {
1716
+ var $this = $(this),
1717
+ data = $this.data('owl.carousel');
1718
+
1719
+ if (!data) {
1720
+ data = new Owl(this, typeof option == 'object' && option);
1721
+ $this.data('owl.carousel', data);
1722
+
1723
+ $.each([
1724
+ 'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove'
1725
+ ], function(i, event) {
1726
+ data.register({ type: Owl.Type.Event, name: event });
1727
+ data.$element.on(event + '.owl.carousel.core', $.proxy(function(e) {
1728
+ if (e.namespace && e.relatedTarget !== this) {
1729
+ this.suppress([ event ]);
1730
+ data[event].apply(this, [].slice.call(arguments, 1));
1731
+ this.release([ event ]);
1732
+ }
1733
+ }, data));
1734
+ });
1735
+ }
1736
+
1737
+ if (typeof option == 'string' && option.charAt(0) !== '_') {
1738
+ data[option].apply(data, args);
1739
+ }
1740
+ });
1741
+ };
1742
+
1743
+ /**
1744
+ * The constructor for the jQuery Plugin
1745
+ * @public
1746
+ */
1747
+ $.fn.owlCarousel.Constructor = Owl;
1748
+
1749
+ })(window.Zepto || window.jQuery, window, document);
1750
+
1751
+ /**
1752
+ * AutoRefresh Plugin
1753
+ * @version 2.3.3
1754
+ * @author Artus Kolanowski
1755
+ * @author David Deutsch
1756
+ * @license The MIT License (MIT)
1757
+ */
1758
+ ;(function($, window, document, undefined) {
1759
+
1760
+ /**
1761
+ * Creates the auto refresh plugin.
1762
+ * @class The Auto Refresh Plugin
1763
+ * @param {Owl} carousel - The Owl Carousel
1764
+ */
1765
+ var AutoRefresh = function(carousel) {
1766
+ /**
1767
+ * Reference to the core.
1768
+ * @protected
1769
+ * @type {Owl}
1770
+ */
1771
+ this._core = carousel;
1772
+
1773
+ /**
1774
+ * Refresh interval.
1775
+ * @protected
1776
+ * @type {number}
1777
+ */
1778
+ this._interval = null;
1779
+
1780
+ /**
1781
+ * Whether the element is currently visible or not.
1782
+ * @protected
1783
+ * @type {Boolean}
1784
+ */
1785
+ this._visible = null;
1786
+
1787
+ /**
1788
+ * All event handlers.
1789
+ * @protected
1790
+ * @type {Object}
1791
+ */
1792
+ this._handlers = {
1793
+ 'initialized.owl.carousel': $.proxy(function(e) {
1794
+ if (e.namespace && this._core.settings.autoRefresh) {
1795
+ this.watch();
1796
+ }
1797
+ }, this)
1798
+ };
1799
+
1800
+ // set default options
1801
+ this._core.options = $.extend({}, AutoRefresh.Defaults, this._core.options);
1802
+
1803
+ // register event handlers
1804
+ this._core.$element.on(this._handlers);
1805
+ };
1806
+
1807
+ /**
1808
+ * Default options.
1809
+ * @public
1810
+ */
1811
+ AutoRefresh.Defaults = {
1812
+ autoRefresh: true,
1813
+ autoRefreshInterval: 500
1814
+ };
1815
+
1816
+ /**
1817
+ * Watches the element.
1818
+ */
1819
+ AutoRefresh.prototype.watch = function() {
1820
+ if (this._interval) {
1821
+ return;
1822
+ }
1823
+
1824
+ this._visible = this._core.isVisible();
1825
+ this._interval = window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval);
1826
+ };
1827
+
1828
+ /**
1829
+ * Refreshes the element.
1830
+ */
1831
+ AutoRefresh.prototype.refresh = function() {
1832
+ if (this._core.isVisible() === this._visible) {
1833
+ return;
1834
+ }
1835
+
1836
+ this._visible = !this._visible;
1837
+
1838
+ this._core.$element.toggleClass('owl-hidden', !this._visible);
1839
+
1840
+ this._visible && (this._core.invalidate('width') && this._core.refresh());
1841
+ };
1842
+
1843
+ /**
1844
+ * Destroys the plugin.
1845
+ */
1846
+ AutoRefresh.prototype.destroy = function() {
1847
+ var handler, property;
1848
+
1849
+ window.clearInterval(this._interval);
1850
+
1851
+ for (handler in this._handlers) {
1852
+ this._core.$element.off(handler, this._handlers[handler]);
1853
+ }
1854
+ for (property in Object.getOwnPropertyNames(this)) {
1855
+ typeof this[property] != 'function' && (this[property] = null);
1856
+ }
1857
+ };
1858
+
1859
+ $.fn.owlCarousel.Constructor.Plugins.AutoRefresh = AutoRefresh;
1860
+
1861
+ })(window.Zepto || window.jQuery, window, document);
1862
+
1863
+ /**
1864
+ * Lazy Plugin
1865
+ * @version 2.3.3
1866
+ * @author Bartosz Wojciechowski
1867
+ * @author David Deutsch
1868
+ * @license The MIT License (MIT)
1869
+ */
1870
+ ;(function($, window, document, undefined) {
1871
+
1872
+ /**
1873
+ * Creates the lazy plugin.
1874
+ * @class The Lazy Plugin
1875
+ * @param {Owl} carousel - The Owl Carousel
1876
+ */
1877
+ var Lazy = function(carousel) {
1878
+
1879
+ /**
1880
+ * Reference to the core.
1881
+ * @protected
1882
+ * @type {Owl}
1883
+ */
1884
+ this._core = carousel;
1885
+
1886
+ /**
1887
+ * Already loaded items.
1888
+ * @protected
1889
+ * @type {Array.<jQuery>}
1890
+ */
1891
+ this._loaded = [];
1892
+
1893
+ /**
1894
+ * Event handlers.
1895
+ * @protected
1896
+ * @type {Object}
1897
+ */
1898
+ this._handlers = {
1899
+ 'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e) {
1900
+ if (!e.namespace) {
1901
+ return;
1902
+ }
1903
+
1904
+ if (!this._core.settings || !this._core.settings.lazyLoad) {
1905
+ return;
1906
+ }
1907
+
1908
+ if ((e.property && e.property.name == 'position') || e.type == 'initialized') {
1909
+ var settings = this._core.settings,
1910
+ n = (settings.center && Math.ceil(settings.items / 2) || settings.items),
1911
+ i = ((settings.center && n * -1) || 0),
1912
+ position = (e.property && e.property.value !== undefined ? e.property.value : this._core.current()) + i,
1913
+ clones = this._core.clones().length,
1914
+ load = $.proxy(function(i, v) { this.load(v) }, this);
1915
+
1916
+ while (i++ < n) {
1917
+ this.load(clones / 2 + this._core.relative(position));
1918
+ clones && $.each(this._core.clones(this._core.relative(position)), load);
1919
+ position++;
1920
+ }
1921
+ }
1922
+ }, this)
1923
+ };
1924
+
1925
+ // set the default options
1926
+ this._core.options = $.extend({}, Lazy.Defaults, this._core.options);
1927
+
1928
+ // register event handler
1929
+ this._core.$element.on(this._handlers);
1930
+ };
1931
+
1932
+ /**
1933
+ * Default options.
1934
+ * @public
1935
+ */
1936
+ Lazy.Defaults = {
1937
+ lazyLoad: false
1938
+ };
1939
+
1940
+ /**
1941
+ * Loads all resources of an item at the specified position.
1942
+ * @param {Number} position - The absolute position of the item.
1943
+ * @protected
1944
+ */
1945
+ Lazy.prototype.load = function(position) {
1946
+ var $item = this._core.$stage.children().eq(position),
1947
+ $elements = $item && $item.find('.owl-lazy');
1948
+
1949
+ if (!$elements || $.inArray($item.get(0), this._loaded) > -1) {
1950
+ return;
1951
+ }
1952
+
1953
+ $elements.each($.proxy(function(index, element) {
1954
+ var $element = $(element), image,
1955
+ url = (window.devicePixelRatio > 1 && $element.attr('data-src-retina')) || $element.attr('data-src') || $element.attr('data-srcset');
1956
+
1957
+ this._core.trigger('load', { element: $element, url: url }, 'lazy');
1958
+
1959
+ if ($element.is('img')) {
1960
+ $element.one('load.owl.lazy', $.proxy(function() {
1961
+ $element.css('opacity', 1);
1962
+ this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
1963
+ }, this)).attr('src', url);
1964
+ } else if ($element.is('source')) {
1965
+ $element.one('load.owl.lazy', $.proxy(function() {
1966
+ this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
1967
+ }, this)).attr('srcset', url);
1968
+ } else {
1969
+ image = new Image();
1970
+ image.onload = $.proxy(function() {
1971
+ $element.css({
1972
+ 'background-image': 'url("' + url + '")',
1973
+ 'opacity': '1'
1974
+ });
1975
+ this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
1976
+ }, this);
1977
+ image.src = url;
1978
+ }
1979
+ }, this));
1980
+
1981
+ this._loaded.push($item.get(0));
1982
+ };
1983
+
1984
+ /**
1985
+ * Destroys the plugin.
1986
+ * @public
1987
+ */
1988
+ Lazy.prototype.destroy = function() {
1989
+ var handler, property;
1990
+
1991
+ for (handler in this.handlers) {
1992
+ this._core.$element.off(handler, this.handlers[handler]);
1993
+ }
1994
+ for (property in Object.getOwnPropertyNames(this)) {
1995
+ typeof this[property] != 'function' && (this[property] = null);
1996
+ }
1997
+ };
1998
+
1999
+ $.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy;
2000
+
2001
+ })(window.Zepto || window.jQuery, window, document);
2002
+
2003
+ /**
2004
+ * AutoHeight Plugin
2005
+ * @version 2.3.3
2006
+ * @author Bartosz Wojciechowski
2007
+ * @author David Deutsch
2008
+ * @license The MIT License (MIT)
2009
+ */
2010
+ ;(function($, window, document, undefined) {
2011
+
2012
+ /**
2013
+ * Creates the auto height plugin.
2014
+ * @class The Auto Height Plugin
2015
+ * @param {Owl} carousel - The Owl Carousel
2016
+ */
2017
+ var AutoHeight = function(carousel) {
2018
+ /**
2019
+ * Reference to the core.
2020
+ * @protected
2021
+ * @type {Owl}
2022
+ */
2023
+ this._core = carousel;
2024
+
2025
+ /**
2026
+ * All event handlers.
2027
+ * @protected
2028
+ * @type {Object}
2029
+ */
2030
+ this._handlers = {
2031
+ 'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e) {
2032
+ if (e.namespace && this._core.settings.autoHeight) {
2033
+ this.update();
2034
+ }
2035
+ }, this),
2036
+ 'changed.owl.carousel': $.proxy(function(e) {
2037
+ if (e.namespace && this._core.settings.autoHeight && e.property.name === 'position'){
2038
+ console.log('update called');
2039
+ this.update();
2040
+ }
2041
+ }, this),
2042
+ 'loaded.owl.lazy': $.proxy(function(e) {
2043
+ if (e.namespace && this._core.settings.autoHeight
2044
+ && e.element.closest('.' + this._core.settings.itemClass).index() === this._core.current()) {
2045
+ this.update();
2046
+ }
2047
+ }, this)
2048
+ };
2049
+
2050
+ // set default options
2051
+ this._core.options = $.extend({}, AutoHeight.Defaults, this._core.options);
2052
+
2053
+ // register event handlers
2054
+ this._core.$element.on(this._handlers);
2055
+ this._intervalId = null;
2056
+ var refThis = this;
2057
+
2058
+ // These changes have been taken from a PR by gavrochelegnou proposed in #1575
2059
+ // and have been made compatible with the latest jQuery version
2060
+ $(window).on('load', function() {
2061
+ if (refThis._core.settings.autoHeight) {
2062
+ refThis.update();
2063
+ }
2064
+ });
2065
+
2066
+ // Autoresize the height of the carousel when window is resized
2067
+ // When carousel has images, the height is dependent on the width
2068
+ // and should also change on resize
2069
+ $(window).resize(function() {
2070
+ if (refThis._core.settings.autoHeight) {
2071
+ if (refThis._intervalId != null) {
2072
+ clearTimeout(refThis._intervalId);
2073
+ }
2074
+
2075
+ refThis._intervalId = setTimeout(function() {
2076
+ refThis.update();
2077
+ }, 250);
2078
+ }
2079
+ });
2080
+
2081
+ };
2082
+
2083
+ /**
2084
+ * Default options.
2085
+ * @public
2086
+ */
2087
+ AutoHeight.Defaults = {
2088
+ autoHeight: false,
2089
+ autoHeightClass: 'owl-height'
2090
+ };
2091
+
2092
+ /**
2093
+ * Updates the view.
2094
+ */
2095
+ AutoHeight.prototype.update = function() {
2096
+ var start = this._core._current,
2097
+ end = start + this._core.settings.items,
2098
+ visible = this._core.$stage.children().toArray().slice(start, end),
2099
+ heights = [],
2100
+ maxheight = 0;
2101
+
2102
+ $.each(visible, function(index, item) {
2103
+ heights.push($(item).height());
2104
+ });
2105
+
2106
+ maxheight = Math.max.apply(null, heights);
2107
+
2108
+ this._core.$stage.parent()
2109
+ .height(maxheight)
2110
+ .addClass(this._core.settings.autoHeightClass);
2111
+ };
2112
+
2113
+ AutoHeight.prototype.destroy = function() {
2114
+ var handler, property;
2115
+
2116
+ for (handler in this._handlers) {
2117
+ this._core.$element.off(handler, this._handlers[handler]);
2118
+ }
2119
+ for (property in Object.getOwnPropertyNames(this)) {
2120
+ typeof this[property] !== 'function' && (this[property] = null);
2121
+ }
2122
+ };
2123
+
2124
+ $.fn.owlCarousel.Constructor.Plugins.AutoHeight = AutoHeight;
2125
+
2126
+ })(window.Zepto || window.jQuery, window, document);
2127
+
2128
+ /**
2129
+ * Video Plugin
2130
+ * @version 2.3.3
2131
+ * @author Bartosz Wojciechowski
2132
+ * @author David Deutsch
2133
+ * @license The MIT License (MIT)
2134
+ */
2135
+ ;(function($, window, document, undefined) {
2136
+
2137
+ /**
2138
+ * Creates the video plugin.
2139
+ * @class The Video Plugin
2140
+ * @param {Owl} carousel - The Owl Carousel
2141
+ */
2142
+ var Video = function(carousel) {
2143
+ /**
2144
+ * Reference to the core.
2145
+ * @protected
2146
+ * @type {Owl}
2147
+ */
2148
+ this._core = carousel;
2149
+
2150
+ /**
2151
+ * Cache all video URLs.
2152
+ * @protected
2153
+ * @type {Object}
2154
+ */
2155
+ this._videos = {};
2156
+
2157
+ /**
2158
+ * Current playing item.
2159
+ * @protected
2160
+ * @type {jQuery}
2161
+ */
2162
+ this._playing = null;
2163
+
2164
+ /**
2165
+ * All event handlers.
2166
+ * @todo The cloned content removale is too late
2167
+ * @protected
2168
+ * @type {Object}
2169
+ */
2170
+ this._handlers = {
2171
+ 'initialized.owl.carousel': $.proxy(function(e) {
2172
+ if (e.namespace) {
2173
+ this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] });
2174
+ }
2175
+ }, this),
2176
+ 'resize.owl.carousel': $.proxy(function(e) {
2177
+ if (e.namespace && this._core.settings.video && this.isInFullScreen()) {
2178
+ e.preventDefault();
2179
+ }
2180
+ }, this),
2181
+ 'refreshed.owl.carousel': $.proxy(function(e) {
2182
+ if (e.namespace && this._core.is('resizing')) {
2183
+ this._core.$stage.find('.cloned .owl-video-frame').remove();
2184
+ }
2185
+ }, this),
2186
+ 'changed.owl.carousel': $.proxy(function(e) {
2187
+ if (e.namespace && e.property.name === 'position' && this._playing) {
2188
+ this.stop();
2189
+ }
2190
+ }, this),
2191
+ 'prepared.owl.carousel': $.proxy(function(e) {
2192
+ if (!e.namespace) {
2193
+ return;
2194
+ }
2195
+
2196
+ var $element = $(e.content).find('.owl-video');
2197
+
2198
+ if ($element.length) {
2199
+ $element.css('display', 'none');
2200
+ this.fetch($element, $(e.content));
2201
+ }
2202
+ }, this)
2203
+ };
2204
+
2205
+ // set default options
2206
+ this._core.options = $.extend({}, Video.Defaults, this._core.options);
2207
+
2208
+ // register event handlers
2209
+ this._core.$element.on(this._handlers);
2210
+
2211
+ this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) {
2212
+ this.play(e);
2213
+ }, this));
2214
+ };
2215
+
2216
+ /**
2217
+ * Default options.
2218
+ * @public
2219
+ */
2220
+ Video.Defaults = {
2221
+ video: false,
2222
+ videoHeight: false,
2223
+ videoWidth: false
2224
+ };
2225
+
2226
+ /**
2227
+ * Gets the video ID and the type (YouTube/Vimeo/vzaar only).
2228
+ * @protected
2229
+ * @param {jQuery} target - The target containing the video data.
2230
+ * @param {jQuery} item - The item containing the video.
2231
+ */
2232
+ Video.prototype.fetch = function(target, item) {
2233
+ var type = (function() {
2234
+ if (target.attr('data-vimeo-id')) {
2235
+ return 'vimeo';
2236
+ } else if (target.attr('data-vzaar-id')) {
2237
+ return 'vzaar'
2238
+ } else {
2239
+ return 'youtube';
2240
+ }
2241
+ })(),
2242
+ id = target.attr('data-vimeo-id') || target.attr('data-youtube-id') || target.attr('data-vzaar-id'),
2243
+ width = target.attr('data-width') || this._core.settings.videoWidth,
2244
+ height = target.attr('data-height') || this._core.settings.videoHeight,
2245
+ url = target.attr('href');
2246
+
2247
+ if (url) {
2248
+
2249
+ /*
2250
+ Parses the id's out of the following urls (and probably more):
2251
+ https://www.youtube.com/watch?v=:id
2252
+ https://youtu.be/:id
2253
+ https://vimeo.com/:id
2254
+ https://vimeo.com/channels/:channel/:id
2255
+ https://vimeo.com/groups/:group/videos/:id
2256
+ https://app.vzaar.com/videos/:id
2257
+
2258
+ Visual example: https://regexper.com/#(http%3A%7Chttps%3A%7C)%5C%2F%5C%2F(player.%7Cwww.%7Capp.)%3F(vimeo%5C.com%7Cyoutu(be%5C.com%7C%5C.be%7Cbe%5C.googleapis%5C.com)%7Cvzaar%5C.com)%5C%2F(video%5C%2F%7Cvideos%5C%2F%7Cembed%5C%2F%7Cchannels%5C%2F.%2B%5C%2F%7Cgroups%5C%2F.%2B%5C%2F%7Cwatch%5C%3Fv%3D%7Cv%5C%2F)%3F(%5BA-Za-z0-9._%25-%5D*)(%5C%26%5CS%2B)%3F
2259
+ */
2260
+
2261
+ id = url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);
2262
+
2263
+ if (id[3].indexOf('youtu') > -1) {
2264
+ type = 'youtube';
2265
+ } else if (id[3].indexOf('vimeo') > -1) {
2266
+ type = 'vimeo';
2267
+ } else if (id[3].indexOf('vzaar') > -1) {
2268
+ type = 'vzaar';
2269
+ } else {
2270
+ throw new Error('Video URL not supported.');
2271
+ }
2272
+ id = id[6];
2273
+ } else {
2274
+ throw new Error('Missing video URL.');
2275
+ }
2276
+
2277
+ this._videos[url] = {
2278
+ type: type,
2279
+ id: id,
2280
+ width: width,
2281
+ height: height
2282
+ };
2283
+
2284
+ item.attr('data-video', url);
2285
+
2286
+ this.thumbnail(target, this._videos[url]);
2287
+ };
2288
+
2289
+ /**
2290
+ * Creates video thumbnail.
2291
+ * @protected
2292
+ * @param {jQuery} target - The target containing the video data.
2293
+ * @param {Object} info - The video info object.
2294
+ * @see `fetch`
2295
+ */
2296
+ Video.prototype.thumbnail = function(target, video) {
2297
+ var tnLink,
2298
+ icon,
2299
+ path,
2300
+ dimensions = video.width && video.height ? 'style="width:' + video.width + 'px;height:' + video.height + 'px;"' : '',
2301
+ customTn = target.find('img'),
2302
+ srcType = 'src',
2303
+ lazyClass = '',
2304
+ settings = this._core.settings,
2305
+ create = function(path) {
2306
+ icon = '<div class="owl-video-play-icon"></div>';
2307
+
2308
+ if (settings.lazyLoad) {
2309
+ tnLink = '<div class="owl-video-tn ' + lazyClass + '" ' + srcType + '="' + path + '"></div>';
2310
+ } else {
2311
+ tnLink = '<div class="owl-video-tn" style="opacity:1;background-image:url(' + path + ')"></div>';
2312
+ }
2313
+ target.after(tnLink);
2314
+ target.after(icon);
2315
+ };
2316
+
2317
+ // wrap video content into owl-video-wrapper div
2318
+ target.wrap('<div class="owl-video-wrapper"' + dimensions + '></div>');
2319
+
2320
+ if (this._core.settings.lazyLoad) {
2321
+ srcType = 'data-src';
2322
+ lazyClass = 'owl-lazy';
2323
+ }
2324
+
2325
+ // custom thumbnail
2326
+ if (customTn.length) {
2327
+ create(customTn.attr(srcType));
2328
+ customTn.remove();
2329
+ return false;
2330
+ }
2331
+
2332
+ if (video.type === 'youtube') {
2333
+ path = "//img.youtube.com/vi/" + video.id + "/hqdefault.jpg";
2334
+ create(path);
2335
+ } else if (video.type === 'vimeo') {
2336
+ $.ajax({
2337
+ type: 'GET',
2338
+ url: '//vimeo.com/api/v2/video/' + video.id + '.json',
2339
+ jsonp: 'callback',
2340
+ dataType: 'jsonp',
2341
+ success: function(data) {
2342
+ path = data[0].thumbnail_large;
2343
+ create(path);
2344
+ }
2345
+ });
2346
+ } else if (video.type === 'vzaar') {
2347
+ $.ajax({
2348
+ type: 'GET',
2349
+ url: '//vzaar.com/api/videos/' + video.id + '.json',
2350
+ jsonp: 'callback',
2351
+ dataType: 'jsonp',
2352
+ success: function(data) {
2353
+ path = data.framegrab_url;
2354
+ create(path);
2355
+ }
2356
+ });
2357
+ }
2358
+ };
2359
+
2360
+ /**
2361
+ * Stops the current video.
2362
+ * @public
2363
+ */
2364
+ Video.prototype.stop = function() {
2365
+ this._core.trigger('stop', null, 'video');
2366
+ this._playing.find('.owl-video-frame').remove();
2367
+ this._playing.removeClass('owl-video-playing');
2368
+ this._playing = null;
2369
+ this._core.leave('playing');
2370
+ this._core.trigger('stopped', null, 'video');
2371
+ };
2372
+
2373
+ /**
2374
+ * Starts the current video.
2375
+ * @public
2376
+ * @param {Event} event - The event arguments.
2377
+ */
2378
+ Video.prototype.play = function(event) {
2379
+ var target = $(event.target),
2380
+ item = target.closest('.' + this._core.settings.itemClass),
2381
+ video = this._videos[item.attr('data-video')],
2382
+ width = video.width || '100%',
2383
+ height = video.height || this._core.$stage.height(),
2384
+ html;
2385
+
2386
+ if (this._playing) {
2387
+ return;
2388
+ }
2389
+
2390
+ this._core.enter('playing');
2391
+ this._core.trigger('play', null, 'video');
2392
+
2393
+ item = this._core.items(this._core.relative(item.index()));
2394
+
2395
+ this._core.reset(item.index());
2396
+
2397
+ if (video.type === 'youtube') {
2398
+ html = '<iframe width="' + width + '" height="' + height + '" src="//www.youtube.com/embed/' +
2399
+ video.id + '?autoplay=1&rel=0&v=' + video.id + '" frameborder="0" allowfullscreen></iframe>';
2400
+ } else if (video.type === 'vimeo') {
2401
+ html = '<iframe src="//player.vimeo.com/video/' + video.id +
2402
+ '?autoplay=1" width="' + width + '" height="' + height +
2403
+ '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
2404
+ } else if (video.type === 'vzaar') {
2405
+ html = '<iframe frameborder="0"' + 'height="' + height + '"' + 'width="' + width +
2406
+ '" allowfullscreen mozallowfullscreen webkitAllowFullScreen ' +
2407
+ 'src="//view.vzaar.com/' + video.id + '/player?autoplay=true"></iframe>';
2408
+ }
2409
+
2410
+ $('<div class="owl-video-frame">' + html + '</div>').insertAfter(item.find('.owl-video'));
2411
+
2412
+ this._playing = item.addClass('owl-video-playing');
2413
+ };
2414
+
2415
+ /**
2416
+ * Checks whether an video is currently in full screen mode or not.
2417
+ * @todo Bad style because looks like a readonly method but changes members.
2418
+ * @protected
2419
+ * @returns {Boolean}
2420
+ */
2421
+ Video.prototype.isInFullScreen = function() {
2422
+ var element = document.fullscreenElement || document.mozFullScreenElement ||
2423
+ document.webkitFullscreenElement;
2424
+
2425
+ return element && $(element).parent().hasClass('owl-video-frame');
2426
+ };
2427
+
2428
+ /**
2429
+ * Destroys the plugin.
2430
+ */
2431
+ Video.prototype.destroy = function() {
2432
+ var handler, property;
2433
+
2434
+ this._core.$element.off('click.owl.video');
2435
+
2436
+ for (handler in this._handlers) {
2437
+ this._core.$element.off(handler, this._handlers[handler]);
2438
+ }
2439
+ for (property in Object.getOwnPropertyNames(this)) {
2440
+ typeof this[property] != 'function' && (this[property] = null);
2441
+ }
2442
+ };
2443
+
2444
+ $.fn.owlCarousel.Constructor.Plugins.Video = Video;
2445
+
2446
+ })(window.Zepto || window.jQuery, window, document);
2447
+
2448
+ /**
2449
+ * Animate Plugin
2450
+ * @version 2.3.3
2451
+ * @author Bartosz Wojciechowski
2452
+ * @author David Deutsch
2453
+ * @license The MIT License (MIT)
2454
+ */
2455
+ ;(function($, window, document, undefined) {
2456
+
2457
+ /**
2458
+ * Creates the animate plugin.
2459
+ * @class The Navigation Plugin
2460
+ * @param {Owl} scope - The Owl Carousel
2461
+ */
2462
+ var Animate = function(scope) {
2463
+ this.core = scope;
2464
+ this.core.options = $.extend({}, Animate.Defaults, this.core.options);
2465
+ this.swapping = true;
2466
+ this.previous = undefined;
2467
+ this.next = undefined;
2468
+
2469
+ this.handlers = {
2470
+ 'change.owl.carousel': $.proxy(function(e) {
2471
+ if (e.namespace && e.property.name == 'position') {
2472
+ this.previous = this.core.current();
2473
+ this.next = e.property.value;
2474
+ }
2475
+ }, this),
2476
+ 'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) {
2477
+ if (e.namespace) {
2478
+ this.swapping = e.type == 'translated';
2479
+ }
2480
+ }, this),
2481
+ 'translate.owl.carousel': $.proxy(function(e) {
2482
+ if (e.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) {
2483
+ this.swap();
2484
+ }
2485
+ }, this)
2486
+ };
2487
+
2488
+ this.core.$element.on(this.handlers);
2489
+ };
2490
+
2491
+ /**
2492
+ * Default options.
2493
+ * @public
2494
+ */
2495
+ Animate.Defaults = {
2496
+ animateOut: false,
2497
+ animateIn: false
2498
+ };
2499
+
2500
+ /**
2501
+ * Toggles the animation classes whenever an translations starts.
2502
+ * @protected
2503
+ * @returns {Boolean|undefined}
2504
+ */
2505
+ Animate.prototype.swap = function() {
2506
+
2507
+ if (this.core.settings.items !== 1) {
2508
+ return;
2509
+ }
2510
+
2511
+ if (!$.support.animation || !$.support.transition) {
2512
+ return;
2513
+ }
2514
+
2515
+ this.core.speed(0);
2516
+
2517
+ var left,
2518
+ clear = $.proxy(this.clear, this),
2519
+ previous = this.core.$stage.children().eq(this.previous),
2520
+ next = this.core.$stage.children().eq(this.next),
2521
+ incoming = this.core.settings.animateIn,
2522
+ outgoing = this.core.settings.animateOut;
2523
+
2524
+ if (this.core.current() === this.previous) {
2525
+ return;
2526
+ }
2527
+
2528
+ if (outgoing) {
2529
+ left = this.core.coordinates(this.previous) - this.core.coordinates(this.next);
2530
+ previous.one($.support.animation.end, clear)
2531
+ .css( { 'left': left + 'px' } )
2532
+ .addClass('animated owl-animated-out')
2533
+ .addClass(outgoing);
2534
+ }
2535
+
2536
+ if (incoming) {
2537
+ next.one($.support.animation.end, clear)
2538
+ .addClass('animated owl-animated-in')
2539
+ .addClass(incoming);
2540
+ }
2541
+ };
2542
+
2543
+ Animate.prototype.clear = function(e) {
2544
+ $(e.target).css( { 'left': '' } )
2545
+ .removeClass('animated owl-animated-out owl-animated-in')
2546
+ .removeClass(this.core.settings.animateIn)
2547
+ .removeClass(this.core.settings.animateOut);
2548
+ this.core.onTransitionEnd();
2549
+ };
2550
+
2551
+ /**
2552
+ * Destroys the plugin.
2553
+ * @public
2554
+ */
2555
+ Animate.prototype.destroy = function() {
2556
+ var handler, property;
2557
+
2558
+ for (handler in this.handlers) {
2559
+ this.core.$element.off(handler, this.handlers[handler]);
2560
+ }
2561
+ for (property in Object.getOwnPropertyNames(this)) {
2562
+ typeof this[property] != 'function' && (this[property] = null);
2563
+ }
2564
+ };
2565
+
2566
+ $.fn.owlCarousel.Constructor.Plugins.Animate = Animate;
2567
+
2568
+ })(window.Zepto || window.jQuery, window, document);
2569
+
2570
+ /**
2571
+ * Autoplay Plugin
2572
+ * @version 2.3.3
2573
+ * @author Bartosz Wojciechowski
2574
+ * @author Artus Kolanowski
2575
+ * @author David Deutsch
2576
+ * @author Tom De Caluwé
2577
+ * @license The MIT License (MIT)
2578
+ */
2579
+ ;(function($, window, document, undefined) {
2580
+
2581
+ /**
2582
+ * Creates the autoplay plugin.
2583
+ * @class The Autoplay Plugin
2584
+ * @param {Owl} scope - The Owl Carousel
2585
+ */
2586
+ var Autoplay = function(carousel) {
2587
+ /**
2588
+ * Reference to the core.
2589
+ * @protected
2590
+ * @type {Owl}
2591
+ */
2592
+ this._core = carousel;
2593
+
2594
+ /**
2595
+ * The autoplay timeout id.
2596
+ * @type {Number}
2597
+ */
2598
+ this._call = null;
2599
+
2600
+ /**
2601
+ * Depending on the state of the plugin, this variable contains either
2602
+ * the start time of the timer or the current timer value if it's
2603
+ * paused. Since we start in a paused state we initialize the timer
2604
+ * value.
2605
+ * @type {Number}
2606
+ */
2607
+ this._time = 0;
2608
+
2609
+ /**
2610
+ * Stores the timeout currently used.
2611
+ * @type {Number}
2612
+ */
2613
+ this._timeout = 0;
2614
+
2615
+ /**
2616
+ * Indicates whenever the autoplay is paused.
2617
+ * @type {Boolean}
2618
+ */
2619
+ this._paused = true;
2620
+
2621
+ /**
2622
+ * All event handlers.
2623
+ * @protected
2624
+ * @type {Object}
2625
+ */
2626
+ this._handlers = {
2627
+ 'changed.owl.carousel': $.proxy(function(e) {
2628
+ if (e.namespace && e.property.name === 'settings') {
2629
+ if (this._core.settings.autoplay) {
2630
+ this.play();
2631
+ } else {
2632
+ this.stop();
2633
+ }
2634
+ } else if (e.namespace && e.property.name === 'position' && this._paused) {
2635
+ // Reset the timer. This code is triggered when the position
2636
+ // of the carousel was changed through user interaction.
2637
+ this._time = 0;
2638
+ }
2639
+ }, this),
2640
+ 'initialized.owl.carousel': $.proxy(function(e) {
2641
+ if (e.namespace && this._core.settings.autoplay) {
2642
+ this.play();
2643
+ }
2644
+ }, this),
2645
+ 'play.owl.autoplay': $.proxy(function(e, t, s) {
2646
+ if (e.namespace) {
2647
+ this.play(t, s);
2648
+ }
2649
+ }, this),
2650
+ 'stop.owl.autoplay': $.proxy(function(e) {
2651
+ if (e.namespace) {
2652
+ this.stop();
2653
+ }
2654
+ }, this),
2655
+ 'mouseover.owl.autoplay': $.proxy(function() {
2656
+ if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {
2657
+ this.pause();
2658
+ }
2659
+ }, this),
2660
+ 'mouseleave.owl.autoplay': $.proxy(function() {
2661
+ if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {
2662
+ this.play();
2663
+ }
2664
+ }, this),
2665
+ 'touchstart.owl.core': $.proxy(function() {
2666
+ if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {
2667
+ this.pause();
2668
+ }
2669
+ }, this),
2670
+ 'touchend.owl.core': $.proxy(function() {
2671
+ if (this._core.settings.autoplayHoverPause) {
2672
+ this.play();
2673
+ }
2674
+ }, this)
2675
+ };
2676
+
2677
+ // register event handlers
2678
+ this._core.$element.on(this._handlers);
2679
+
2680
+ // set default options
2681
+ this._core.options = $.extend({}, Autoplay.Defaults, this._core.options);
2682
+ };
2683
+
2684
+ /**
2685
+ * Default options.
2686
+ * @public
2687
+ */
2688
+ Autoplay.Defaults = {
2689
+ autoplay: false,
2690
+ autoplayTimeout: 5000,
2691
+ autoplayHoverPause: false,
2692
+ autoplaySpeed: false
2693
+ };
2694
+
2695
+ /**
2696
+ * Transition to the next slide and set a timeout for the next transition.
2697
+ * @private
2698
+ * @param {Number} [speed] - The animation speed for the animations.
2699
+ */
2700
+ Autoplay.prototype._next = function(speed) {
2701
+ this._call = window.setTimeout(
2702
+ $.proxy(this._next, this, speed),
2703
+ this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read()
2704
+ );
2705
+
2706
+ if (this._core.is('interacting') || document.hidden) {
2707
+ return;
2708
+ }
2709
+ this._core.next(speed || this._core.settings.autoplaySpeed);
2710
+ }
2711
+
2712
+ /**
2713
+ * Reads the current timer value when the timer is playing.
2714
+ * @public
2715
+ */
2716
+ Autoplay.prototype.read = function() {
2717
+ return new Date().getTime() - this._time;
2718
+ };
2719
+
2720
+ /**
2721
+ * Starts the autoplay.
2722
+ * @public
2723
+ * @param {Number} [timeout] - The interval before the next animation starts.
2724
+ * @param {Number} [speed] - The animation speed for the animations.
2725
+ */
2726
+ Autoplay.prototype.play = function(timeout, speed) {
2727
+ var elapsed;
2728
+
2729
+ if (!this._core.is('rotating')) {
2730
+ this._core.enter('rotating');
2731
+ }
2732
+
2733
+ timeout = timeout || this._core.settings.autoplayTimeout;
2734
+
2735
+ // Calculate the elapsed time since the last transition. If the carousel
2736
+ // wasn't playing this calculation will yield zero.
2737
+ elapsed = Math.min(this._time % (this._timeout || timeout), timeout);
2738
+
2739
+ if (this._paused) {
2740
+ // Start the clock.
2741
+ this._time = this.read();
2742
+ this._paused = false;
2743
+ } else {
2744
+ // Clear the active timeout to allow replacement.
2745
+ window.clearTimeout(this._call);
2746
+ }
2747
+
2748
+ // Adjust the origin of the timer to match the new timeout value.
2749
+ this._time += this.read() % timeout - elapsed;
2750
+
2751
+ this._timeout = timeout;
2752
+ this._call = window.setTimeout($.proxy(this._next, this, speed), timeout - elapsed);
2753
+ };
2754
+
2755
+ /**
2756
+ * Stops the autoplay.
2757
+ * @public
2758
+ */
2759
+ Autoplay.prototype.stop = function() {
2760
+ if (this._core.is('rotating')) {
2761
+ // Reset the clock.
2762
+ this._time = 0;
2763
+ this._paused = true;
2764
+
2765
+ window.clearTimeout(this._call);
2766
+ this._core.leave('rotating');
2767
+ }
2768
+ };
2769
+
2770
+ /**
2771
+ * Pauses the autoplay.
2772
+ * @public
2773
+ */
2774
+ Autoplay.prototype.pause = function() {
2775
+ if (this._core.is('rotating') && !this._paused) {
2776
+ // Pause the clock.
2777
+ this._time = this.read();
2778
+ this._paused = true;
2779
+
2780
+ window.clearTimeout(this._call);
2781
+ }
2782
+ };
2783
+
2784
+ /**
2785
+ * Destroys the plugin.
2786
+ */
2787
+ Autoplay.prototype.destroy = function() {
2788
+ var handler, property;
2789
+
2790
+ this.stop();
2791
+
2792
+ for (handler in this._handlers) {
2793
+ this._core.$element.off(handler, this._handlers[handler]);
2794
+ }
2795
+ for (property in Object.getOwnPropertyNames(this)) {
2796
+ typeof this[property] != 'function' && (this[property] = null);
2797
+ }
2798
+ };
2799
+
2800
+ $.fn.owlCarousel.Constructor.Plugins.autoplay = Autoplay;
2801
+
2802
+ })(window.Zepto || window.jQuery, window, document);
2803
+
2804
+ /**
2805
+ * Navigation Plugin
2806
+ * @version 2.3.3
2807
+ * @author Artus Kolanowski
2808
+ * @author David Deutsch
2809
+ * @license The MIT License (MIT)
2810
+ */
2811
+ ;(function($, window, document, undefined) {
2812
+ 'use strict';
2813
+
2814
+ /**
2815
+ * Creates the navigation plugin.
2816
+ * @class The Navigation Plugin
2817
+ * @param {Owl} carousel - The Owl Carousel.
2818
+ */
2819
+ var Navigation = function(carousel) {
2820
+ /**
2821
+ * Reference to the core.
2822
+ * @protected
2823
+ * @type {Owl}
2824
+ */
2825
+ this._core = carousel;
2826
+
2827
+ /**
2828
+ * Indicates whether the plugin is initialized or not.
2829
+ * @protected
2830
+ * @type {Boolean}
2831
+ */
2832
+ this._initialized = false;
2833
+
2834
+ /**
2835
+ * The current paging indexes.
2836
+ * @protected
2837
+ * @type {Array}
2838
+ */
2839
+ this._pages = [];
2840
+
2841
+ /**
2842
+ * All DOM elements of the user interface.
2843
+ * @protected
2844
+ * @type {Object}
2845
+ */
2846
+ this._controls = {};
2847
+
2848
+ /**
2849
+ * Markup for an indicator.
2850
+ * @protected
2851
+ * @type {Array.<String>}
2852
+ */
2853
+ this._templates = [];
2854
+
2855
+ /**
2856
+ * The carousel element.
2857
+ * @type {jQuery}
2858
+ */
2859
+ this.$element = this._core.$element;
2860
+
2861
+ /**
2862
+ * Overridden methods of the carousel.
2863
+ * @protected
2864
+ * @type {Object}
2865
+ */
2866
+ this._overrides = {
2867
+ next: this._core.next,
2868
+ prev: this._core.prev,
2869
+ to: this._core.to
2870
+ };
2871
+
2872
+ /**
2873
+ * All event handlers.
2874
+ * @protected
2875
+ * @type {Object}
2876
+ */
2877
+ this._handlers = {
2878
+ 'prepared.owl.carousel': $.proxy(function(e) {
2879
+ if (e.namespace && this._core.settings.dotsData) {
2880
+ this._templates.push('<div class="' + this._core.settings.dotClass + '">' +
2881
+ $(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '</div>');
2882
+ }
2883
+ }, this),
2884
+ 'added.owl.carousel': $.proxy(function(e) {
2885
+ if (e.namespace && this._core.settings.dotsData) {
2886
+ this._templates.splice(e.position, 0, this._templates.pop());
2887
+ }
2888
+ }, this),
2889
+ 'remove.owl.carousel': $.proxy(function(e) {
2890
+ if (e.namespace && this._core.settings.dotsData) {
2891
+ this._templates.splice(e.position, 1);
2892
+ }
2893
+ }, this),
2894
+ 'changed.owl.carousel': $.proxy(function(e) {
2895
+ if (e.namespace && e.property.name == 'position') {
2896
+ this.draw();
2897
+ }
2898
+ }, this),
2899
+ 'initialized.owl.carousel': $.proxy(function(e) {
2900
+ if (e.namespace && !this._initialized) {
2901
+ this._core.trigger('initialize', null, 'navigation');
2902
+ this.initialize();
2903
+ this.update();
2904
+ this.draw();
2905
+ this._initialized = true;
2906
+ this._core.trigger('initialized', null, 'navigation');
2907
+ }
2908
+ }, this),
2909
+ 'refreshed.owl.carousel': $.proxy(function(e) {
2910
+ if (e.namespace && this._initialized) {
2911
+ this._core.trigger('refresh', null, 'navigation');
2912
+ this.update();
2913
+ this.draw();
2914
+ this._core.trigger('refreshed', null, 'navigation');
2915
+ }
2916
+ }, this)
2917
+ };
2918
+
2919
+ // set default options
2920
+ this._core.options = $.extend({}, Navigation.Defaults, this._core.options);
2921
+
2922
+ // register event handlers
2923
+ this.$element.on(this._handlers);
2924
+ };
2925
+
2926
+ /**
2927
+ * Default options.
2928
+ * @public
2929
+ * @todo Rename `slideBy` to `navBy`
2930
+ */
2931
+ Navigation.Defaults = {
2932
+ nav: false,
2933
+ navText: [
2934
+ '<span aria-label="' + 'Previous' + '">&#x2039;</span>',
2935
+ '<span aria-label="' + 'Next' + '">&#x203a;</span>'
2936
+ ],
2937
+ navSpeed: false,
2938
+ navElement: 'button type="button" role="presentation"',
2939
+ navContainer: false,
2940
+ navContainerClass: 'owl-nav',
2941
+ navClass: [
2942
+ 'owl-prev',
2943
+ 'owl-next'
2944
+ ],
2945
+ slideBy: 1,
2946
+ dotClass: 'owl-dot',
2947
+ dotsClass: 'owl-dots',
2948
+ dots: true,
2949
+ dotsEach: false,
2950
+ dotsData: false,
2951
+ dotsSpeed: false,
2952
+ dotsContainer: false
2953
+ };
2954
+
2955
+ /**
2956
+ * Initializes the layout of the plugin and extends the carousel.
2957
+ * @protected
2958
+ */
2959
+ Navigation.prototype.initialize = function() {
2960
+ var override,
2961
+ settings = this._core.settings;
2962
+
2963
+ // create DOM structure for relative navigation
2964
+ this._controls.$relative = (settings.navContainer ? $(settings.navContainer)
2965
+ : $('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');
2966
+
2967
+ this._controls.$previous = $('<' + settings.navElement + '>')
2968
+ .addClass(settings.navClass[0])
2969
+ .html(settings.navText[0])
2970
+ .prependTo(this._controls.$relative)
2971
+ .on('click', $.proxy(function(e) {
2972
+ this.prev(settings.navSpeed);
2973
+ }, this));
2974
+ this._controls.$next = $('<' + settings.navElement + '>')
2975
+ .addClass(settings.navClass[1])
2976
+ .html(settings.navText[1])
2977
+ .appendTo(this._controls.$relative)
2978
+ .on('click', $.proxy(function(e) {
2979
+ this.next(settings.navSpeed);
2980
+ }, this));
2981
+
2982
+ // create DOM structure for absolute navigation
2983
+ if (!settings.dotsData) {
2984
+ this._templates = [ $('<button role="button">')
2985
+ .addClass(settings.dotClass)
2986
+ .append($('<span>'))
2987
+ .prop('outerHTML') ];
2988
+ }
2989
+
2990
+ this._controls.$absolute = (settings.dotsContainer ? $(settings.dotsContainer)
2991
+ : $('<div>').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled');
2992
+
2993
+ this._controls.$absolute.on('click', 'button', $.proxy(function(e) {
2994
+ var index = $(e.target).parent().is(this._controls.$absolute)
2995
+ ? $(e.target).index() : $(e.target).parent().index();
2996
+
2997
+ e.preventDefault();
2998
+
2999
+ this.to(index, settings.dotsSpeed);
3000
+ }, this));
3001
+
3002
+ /*$el.on('focusin', function() {
3003
+ $(document).off(".carousel");
3004
+
3005
+ $(document).on('keydown.carousel', function(e) {
3006
+ if(e.keyCode == 37) {
3007
+ $el.trigger('prev.owl')
3008
+ }
3009
+ if(e.keyCode == 39) {
3010
+ $el.trigger('next.owl')
3011
+ }
3012
+ });
3013
+ });*/
3014
+
3015
+ // override public methods of the carousel
3016
+ for (override in this._overrides) {
3017
+ this._core[override] = $.proxy(this[override], this);
3018
+ }
3019
+ };
3020
+
3021
+ /**
3022
+ * Destroys the plugin.
3023
+ * @protected
3024
+ */
3025
+ Navigation.prototype.destroy = function() {
3026
+ var handler, control, property, override, settings;
3027
+ settings = this._core.settings;
3028
+
3029
+ for (handler in this._handlers) {
3030
+ this.$element.off(handler, this._handlers[handler]);
3031
+ }
3032
+ for (control in this._controls) {
3033
+ if (control === '$relative' && settings.navContainer) {
3034
+ this._controls[control].html('');
3035
+ } else {
3036
+ this._controls[control].remove();
3037
+ }
3038
+ }
3039
+ for (override in this.overides) {
3040
+ this._core[override] = this._overrides[override];
3041
+ }
3042
+ for (property in Object.getOwnPropertyNames(this)) {
3043
+ typeof this[property] != 'function' && (this[property] = null);
3044
+ }
3045
+ };
3046
+
3047
+ /**
3048
+ * Updates the internal state.
3049
+ * @protected
3050
+ */
3051
+ Navigation.prototype.update = function() {
3052
+ var i, j, k,
3053
+ lower = this._core.clones().length / 2,
3054
+ upper = lower + this._core.items().length,
3055
+ maximum = this._core.maximum(true),
3056
+ settings = this._core.settings,
3057
+ size = settings.center || settings.autoWidth || settings.dotsData
3058
+ ? 1 : settings.dotsEach || settings.items;
3059
+
3060
+ if (settings.slideBy !== 'page') {
3061
+ settings.slideBy = Math.min(settings.slideBy, settings.items);
3062
+ }
3063
+
3064
+ if (settings.dots || settings.slideBy == 'page') {
3065
+ this._pages = [];
3066
+
3067
+ for (i = lower, j = 0, k = 0; i < upper; i++) {
3068
+ if (j >= size || j === 0) {
3069
+ this._pages.push({
3070
+ start: Math.min(maximum, i - lower),
3071
+ end: i - lower + size - 1
3072
+ });
3073
+ if (Math.min(maximum, i - lower) === maximum) {
3074
+ break;
3075
+ }
3076
+ j = 0, ++k;
3077
+ }
3078
+ j += this._core.mergers(this._core.relative(i));
3079
+ }
3080
+ }
3081
+ };
3082
+
3083
+ /**
3084
+ * Draws the user interface.
3085
+ * @todo The option `dotsData` wont work.
3086
+ * @protected
3087
+ */
3088
+ Navigation.prototype.draw = function() {
3089
+ var difference,
3090
+ settings = this._core.settings,
3091
+ disabled = this._core.items().length <= settings.items,
3092
+ index = this._core.relative(this._core.current()),
3093
+ loop = settings.loop || settings.rewind;
3094
+
3095
+ this._controls.$relative.toggleClass('disabled', !settings.nav || disabled);
3096
+
3097
+ if (settings.nav) {
3098
+ this._controls.$previous.toggleClass('disabled', !loop && index <= this._core.minimum(true));
3099
+ this._controls.$next.toggleClass('disabled', !loop && index >= this._core.maximum(true));
3100
+ }
3101
+
3102
+ this._controls.$absolute.toggleClass('disabled', !settings.dots || disabled);
3103
+
3104
+ if (settings.dots) {
3105
+ difference = this._pages.length - this._controls.$absolute.children().length;
3106
+
3107
+ if (settings.dotsData && difference !== 0) {
3108
+ this._controls.$absolute.html(this._templates.join(''));
3109
+ } else if (difference > 0) {
3110
+ this._controls.$absolute.append(new Array(difference + 1).join(this._templates[0]));
3111
+ } else if (difference < 0) {
3112
+ this._controls.$absolute.children().slice(difference).remove();
3113
+ }
3114
+
3115
+ this._controls.$absolute.find('.active').removeClass('active');
3116
+ this._controls.$absolute.children().eq($.inArray(this.current(), this._pages)).addClass('active');
3117
+ }
3118
+ };
3119
+
3120
+ /**
3121
+ * Extends event data.
3122
+ * @protected
3123
+ * @param {Event} event - The event object which gets thrown.
3124
+ */
3125
+ Navigation.prototype.onTrigger = function(event) {
3126
+ var settings = this._core.settings;
3127
+
3128
+ event.page = {
3129
+ index: $.inArray(this.current(), this._pages),
3130
+ count: this._pages.length,
3131
+ size: settings && (settings.center || settings.autoWidth || settings.dotsData
3132
+ ? 1 : settings.dotsEach || settings.items)
3133
+ };
3134
+ };
3135
+
3136
+ /**
3137
+ * Gets the current page position of the carousel.
3138
+ * @protected
3139
+ * @returns {Number}
3140
+ */
3141
+ Navigation.prototype.current = function() {
3142
+ var current = this._core.relative(this._core.current());
3143
+ return $.grep(this._pages, $.proxy(function(page, index) {
3144
+ return page.start <= current && page.end >= current;
3145
+ }, this)).pop();
3146
+ };
3147
+
3148
+ /**
3149
+ * Gets the current succesor/predecessor position.
3150
+ * @protected
3151
+ * @returns {Number}
3152
+ */
3153
+ Navigation.prototype.getPosition = function(successor) {
3154
+ var position, length,
3155
+ settings = this._core.settings;
3156
+
3157
+ if (settings.slideBy == 'page') {
3158
+ position = $.inArray(this.current(), this._pages);
3159
+ length = this._pages.length;
3160
+ successor ? ++position : --position;
3161
+ position = this._pages[((position % length) + length) % length].start;
3162
+ } else {
3163
+ position = this._core.relative(this._core.current());
3164
+ length = this._core.items().length;
3165
+ successor ? position += settings.slideBy : position -= settings.slideBy;
3166
+ }
3167
+
3168
+ return position;
3169
+ };
3170
+
3171
+ /**
3172
+ * Slides to the next item or page.
3173
+ * @public
3174
+ * @param {Number} [speed=false] - The time in milliseconds for the transition.
3175
+ */
3176
+ Navigation.prototype.next = function(speed) {
3177
+ $.proxy(this._overrides.to, this._core)(this.getPosition(true), speed);
3178
+ };
3179
+
3180
+ /**
3181
+ * Slides to the previous item or page.
3182
+ * @public
3183
+ * @param {Number} [speed=false] - The time in milliseconds for the transition.
3184
+ */
3185
+ Navigation.prototype.prev = function(speed) {
3186
+ $.proxy(this._overrides.to, this._core)(this.getPosition(false), speed);
3187
+ };
3188
+
3189
+ /**
3190
+ * Slides to the specified item or page.
3191
+ * @public
3192
+ * @param {Number} position - The position of the item or page.
3193
+ * @param {Number} [speed] - The time in milliseconds for the transition.
3194
+ * @param {Boolean} [standard=false] - Whether to use the standard behaviour or not.
3195
+ */
3196
+ Navigation.prototype.to = function(position, speed, standard) {
3197
+ var length;
3198
+
3199
+ if (!standard && this._pages.length) {
3200
+ length = this._pages.length;
3201
+ $.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed);
3202
+ } else {
3203
+ $.proxy(this._overrides.to, this._core)(position, speed);
3204
+ }
3205
+ };
3206
+
3207
+ $.fn.owlCarousel.Constructor.Plugins.Navigation = Navigation;
3208
+
3209
+ })(window.Zepto || window.jQuery, window, document);
3210
+
3211
+ /**
3212
+ * Hash Plugin
3213
+ * @version 2.3.3
3214
+ * @author Artus Kolanowski
3215
+ * @author David Deutsch
3216
+ * @license The MIT License (MIT)
3217
+ */
3218
+ ;(function($, window, document, undefined) {
3219
+ 'use strict';
3220
+
3221
+ /**
3222
+ * Creates the hash plugin.
3223
+ * @class The Hash Plugin
3224
+ * @param {Owl} carousel - The Owl Carousel
3225
+ */
3226
+ var Hash = function(carousel) {
3227
+ /**
3228
+ * Reference to the core.
3229
+ * @protected
3230
+ * @type {Owl}
3231
+ */
3232
+ this._core = carousel;
3233
+
3234
+ /**
3235
+ * Hash index for the items.
3236
+ * @protected
3237
+ * @type {Object}
3238
+ */
3239
+ this._hashes = {};
3240
+
3241
+ /**
3242
+ * The carousel element.
3243
+ * @type {jQuery}
3244
+ */
3245
+ this.$element = this._core.$element;
3246
+
3247
+ /**
3248
+ * All event handlers.
3249
+ * @protected
3250
+ * @type {Object}
3251
+ */
3252
+ this._handlers = {
3253
+ 'initialized.owl.carousel': $.proxy(function(e) {
3254
+ if (e.namespace && this._core.settings.startPosition === 'URLHash') {
3255
+ $(window).trigger('hashchange.owl.navigation');
3256
+ }
3257
+ }, this),
3258
+ 'prepared.owl.carousel': $.proxy(function(e) {
3259
+ if (e.namespace) {
3260
+ var hash = $(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash');
3261
+
3262
+ if (!hash) {
3263
+ return;
3264
+ }
3265
+
3266
+ this._hashes[hash] = e.content;
3267
+ }
3268
+ }, this),
3269
+ 'changed.owl.carousel': $.proxy(function(e) {
3270
+ if (e.namespace && e.property.name === 'position') {
3271
+ var current = this._core.items(this._core.relative(this._core.current())),
3272
+ hash = $.map(this._hashes, function(item, hash) {
3273
+ return item === current ? hash : null;
3274
+ }).join();
3275
+
3276
+ if (!hash || window.location.hash.slice(1) === hash) {
3277
+ return;
3278
+ }
3279
+
3280
+ window.location.hash = hash;
3281
+ }
3282
+ }, this)
3283
+ };
3284
+
3285
+ // set default options
3286
+ this._core.options = $.extend({}, Hash.Defaults, this._core.options);
3287
+
3288
+ // register the event handlers
3289
+ this.$element.on(this._handlers);
3290
+
3291
+ // register event listener for hash navigation
3292
+ $(window).on('hashchange.owl.navigation', $.proxy(function(e) {
3293
+ var hash = window.location.hash.substring(1),
3294
+ items = this._core.$stage.children(),
3295
+ position = this._hashes[hash] && items.index(this._hashes[hash]);
3296
+
3297
+ if (position === undefined || position === this._core.current()) {
3298
+ return;
3299
+ }
3300
+
3301
+ this._core.to(this._core.relative(position), false, true);
3302
+ }, this));
3303
+ };
3304
+
3305
+ /**
3306
+ * Default options.
3307
+ * @public
3308
+ */
3309
+ Hash.Defaults = {
3310
+ URLhashListener: false
3311
+ };
3312
+
3313
+ /**
3314
+ * Destroys the plugin.
3315
+ * @public
3316
+ */
3317
+ Hash.prototype.destroy = function() {
3318
+ var handler, property;
3319
+
3320
+ $(window).off('hashchange.owl.navigation');
3321
+
3322
+ for (handler in this._handlers) {
3323
+ this._core.$element.off(handler, this._handlers[handler]);
3324
+ }
3325
+ for (property in Object.getOwnPropertyNames(this)) {
3326
+ typeof this[property] != 'function' && (this[property] = null);
3327
+ }
3328
+ };
3329
+
3330
+ $.fn.owlCarousel.Constructor.Plugins.Hash = Hash;
3331
+
3332
+ })(window.Zepto || window.jQuery, window, document);
3333
+
3334
+ /**
3335
+ * Support Plugin
3336
+ *
3337
+ * @version 2.3.3
3338
+ * @author Vivid Planet Software GmbH
3339
+ * @author Artus Kolanowski
3340
+ * @author David Deutsch
3341
+ * @license The MIT License (MIT)
3342
+ */
3343
+ ;(function($, window, document, undefined) {
3344
+
3345
+ var style = $('<support>').get(0).style,
3346
+ prefixes = 'Webkit Moz O ms'.split(' '),
3347
+ events = {
3348
+ transition: {
3349
+ end: {
3350
+ WebkitTransition: 'webkitTransitionEnd',
3351
+ MozTransition: 'transitionend',
3352
+ OTransition: 'oTransitionEnd',
3353
+ transition: 'transitionend'
3354
+ }
3355
+ },
3356
+ animation: {
3357
+ end: {
3358
+ WebkitAnimation: 'webkitAnimationEnd',
3359
+ MozAnimation: 'animationend',
3360
+ OAnimation: 'oAnimationEnd',
3361
+ animation: 'animationend'
3362
+ }
3363
+ }
3364
+ },
3365
+ tests = {
3366
+ csstransforms: function() {
3367
+ return !!test('transform');
3368
+ },
3369
+ csstransforms3d: function() {
3370
+ return !!test('perspective');
3371
+ },
3372
+ csstransitions: function() {
3373
+ return !!test('transition');
3374
+ },
3375
+ cssanimations: function() {
3376
+ return !!test('animation');
3377
+ }
3378
+ };
3379
+
3380
+ function test(property, prefixed) {
3381
+ var result = false,
3382
+ upper = property.charAt(0).toUpperCase() + property.slice(1);
3383
+
3384
+ $.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property) {
3385
+ if (style[property] !== undefined) {
3386
+ result = prefixed ? property : true;
3387
+ return false;
3388
+ }
3389
+ });
3390
+
3391
+ return result;
3392
+ }
3393
+
3394
+ function prefixed(property) {
3395
+ return test(property, true);
3396
+ }
3397
+
3398
+ if (tests.csstransitions()) {
3399
+ /* jshint -W053 */
3400
+ $.support.transition = new String(prefixed('transition'))
3401
+ $.support.transition.end = events.transition.end[ $.support.transition ];
3402
+ }
3403
+
3404
+ if (tests.cssanimations()) {
3405
+ /* jshint -W053 */
3406
+ $.support.animation = new String(prefixed('animation'))
3407
+ $.support.animation.end = events.animation.end[ $.support.animation ];
3408
+ }
3409
+
3410
+ if (tests.csstransforms()) {
3411
+ /* jshint -W053 */
3412
+ $.support.transform = new String(prefixed('transform'));
3413
+ $.support.transform3d = tests.csstransforms3d();
3414
+ }
3415
+
3416
+ })(window.Zepto || window.jQuery, window, document);
3417
+
3418
+
3419
+ $(document).ready(function(){
3420
+
3421
+ $('#featured-slider').owlCarousel({
3422
+ loop:true,
3423
+ margin:10,
3424
+ nav:false,
3425
+ lazyLoad: true,
3426
+ margin: 25,
3427
+ autoplay:true,
3428
+ responsiveClass:true,
3429
+ responsive:{
3430
+ 0:{
3431
+ items:1,
3432
+ nav:false,
3433
+ loop: true
3434
+ },
3435
+ 991:{
3436
+ items:2,
3437
+ nav:false,
3438
+ loop: true
3439
+ },
3440
+ 1200:{
3441
+ items:3,
3442
+ nav:false,
3443
+ loop:true
3444
+ }
3445
+ }
3446
+ });
3447
+
3448
+ $('#blog-slider').owlCarousel({
3449
+ loop:true,
3450
+ margin:10,
3451
+ nav:true,
3452
+ dots: false,
3453
+ lazyLoad: true,
3454
+ margin: 25,
3455
+ autoplay:false,
3456
+ responsiveClass:true,
3457
+ responsive:{
3458
+ 0:{
3459
+ items:1,
3460
+ nav:true,
3461
+ loop: true
3462
+ },
3463
+ 991:{
3464
+ items:2,
3465
+ nav:true,
3466
+ loop: true
3467
+ },
3468
+ 1200:{
3469
+ items:3,
3470
+ nav:true,
3471
+ loop:true
3472
+ }
3473
+ }
3474
+ });
3475
+ });