Merge lp:~widelands-dev/widelands-website/update_jvascript into lp:widelands-website

Proposed by kaputtnik
Status: Merged
Merged at revision: 470
Proposed branch: lp:~widelands-dev/widelands-website/update_jvascript
Merge into: lp:widelands-website
Diff against target: 37174 lines (+11398/-25416)
41 files modified
media/fancybox/helpers/jquery.fancybox-buttons.css (+0/-85)
media/fancybox/helpers/jquery.fancybox-buttons.js (+0/-115)
media/fancybox/helpers/jquery.fancybox-media.js (+0/-85)
media/fancybox/helpers/jquery.fancybox-thumbs.css (+0/-54)
media/fancybox/helpers/jquery.fancybox-thumbs.js (+0/-157)
media/fancybox/jquery.fancybox.css (+0/-234)
media/fancybox/jquery.fancybox.js (+0/-1463)
media/fancybox/jquery.fancybox.pack.js (+0/-35)
media/js/disableOnSubmit.js (+2/-2)
media/js/encyclopedia.js (+2/-3)
media/js/highcharts_219/adapters/mootools-adapter.js (+0/-12)
media/js/highcharts_219/adapters/mootools-adapter.src.js (+0/-264)
media/js/highcharts_219/adapters/prototype-adapter.js (+0/-15)
media/js/highcharts_219/adapters/prototype-adapter.src.js (+0/-331)
media/js/highcharts_219/highcharts.js (+0/-176)
media/js/highcharts_219/highcharts.src.js (+0/-11454)
media/js/highcharts_219/modules/exporting.js (+0/-24)
media/js/highcharts_219/modules/exporting.src.js (+0/-758)
media/js/highcharts_219/themes/dark-blue.js (+0/-263)
media/js/highcharts_219/themes/dark-green.js (+0/-263)
media/js/highcharts_219/themes/gray.js (+0/-262)
media/js/highcharts_219/themes/grid.js (+0/-96)
media/js/highcharts_v5/highcharts.js (+803/-0)
media/js/hoverIntent.js (+0/-9)
media/js/jqModal.js (+0/-100)
media/js/jquery-3.2.1.js (+10253/-0)
media/js/jquery.js (+0/-8981)
media/js/jquery.sexy-vote.js (+6/-6)
media/js/superfish.js (+0/-121)
media/lightbox_v2/LICENSE (+21/-0)
media/lightbox_v2/css/custom.css (+11/-0)
media/lightbox_v2/css/lightbox.css (+213/-0)
media/lightbox_v2/lightbox-plus-jquery.min.js (+38/-0)
templates/base.html (+3/-1)
templates/navigation.html (+1/-1)
templates/wlhelp/base.html (+0/-1)
templates/wlhelp/buildings.html (+5/-0)
templates/wlpoll/base.html (+1/-1)
templates/wlpoll/poll_detail.html (+2/-1)
templates/wlscreens/index.html (+25/-37)
wlpoll/templatetags/wlpoll_extras.py (+12/-6)
To merge this branch: bzr merge lp:~widelands-dev/widelands-website/update_jvascript
Reviewer Review Type Date Requested Status
SirVer testing Approve
kaputtnik (community) Needs Resubmitting
Review via email: mp+331244@code.launchpad.net

Description of the change

Update jquery from version 1.6.2 to 3.2.1

This needs adjustments to some other javascript files. To find incompatible/deprecated commands jquery-migrate is loaded: It shows warnings in the browsers console. It has to be removed in production.

Because Highcharts (used for polls) didn't work with the new jquery library, it is now updated to version 5, adjusted and i did some small beautification (e.g. labels are not in one row anymore like here for the left label: https://wl.widelands.org/poll/12/).
Highcharts throws an error shown in browsers console, but it works. The description of the error: https://www.highcharts.com/errors/16 Don't know how to fix this...

Deleted some js files which i believe were forgotten to remove in the past.

I am busy today and tomorrow, but next week i have a lot of time.

To post a comment you must log in.
Revision history for this message
kaputtnik (franku) wrote :

I forgot to check wlscreens and fancybox.js

review: Needs Fixing
471. By kaputtnik

updated fancybox to version 3; not terady yet

472. By kaputtnik

removed fancybox instead added lightbox; added forgotten highcharts

473. By kaputtnik

little fine tuning

Revision history for this message
kaputtnik (franku) wrote :

This should work now and i have started alpha for testing. Things you could test:

- Rating a map
- Showing Polls
- Viewing screenshots
- Preview posts

review: Needs Resubmitting
Revision history for this message
SirVer (sirver) wrote :

This is not reviable - too many changed lines.

I clicked around the alphe page and tested all the things you asked for. No issues. I suggest rolling this out and looking what breaks.

Revision history for this message
SirVer (sirver) :
review: Approve (testing)
Revision history for this message
kaputtnik (franku) wrote :

Thanks :-)

I am not fully satisfied with the border if a single screenshot is shown, but this could be changed later on.

Merged and deployed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed directory 'media/fancybox'
2=== removed file 'media/fancybox/blank.gif'
3Binary files media/fancybox/blank.gif 2012-04-24 13:30:24 +0000 and media/fancybox/blank.gif 1970-01-01 00:00:00 +0000 differ
4=== removed file 'media/fancybox/fancybox_loading.gif'
5Binary files media/fancybox/fancybox_loading.gif 2012-04-24 13:30:24 +0000 and media/fancybox/fancybox_loading.gif 1970-01-01 00:00:00 +0000 differ
6=== removed file 'media/fancybox/fancybox_sprite.png'
7Binary files media/fancybox/fancybox_sprite.png 2012-04-24 13:30:24 +0000 and media/fancybox/fancybox_sprite.png 1970-01-01 00:00:00 +0000 differ
8=== removed directory 'media/fancybox/helpers'
9=== removed file 'media/fancybox/helpers/fancybox_buttons.png'
10Binary files media/fancybox/helpers/fancybox_buttons.png 2012-04-24 13:30:24 +0000 and media/fancybox/helpers/fancybox_buttons.png 1970-01-01 00:00:00 +0000 differ
11=== removed file 'media/fancybox/helpers/jquery.fancybox-buttons.css'
12--- media/fancybox/helpers/jquery.fancybox-buttons.css 2012-04-24 13:30:24 +0000
13+++ media/fancybox/helpers/jquery.fancybox-buttons.css 1970-01-01 00:00:00 +0000
14@@ -1,85 +0,0 @@
15-#fancybox-buttons {
16- position: fixed;
17- left: 0;
18- width: 100%;
19- z-index: 8050;
20-}
21-
22-#fancybox-buttons.top {
23- top: 10px;
24-}
25-
26-#fancybox-buttons.bottom {
27- bottom: 10px;
28-}
29-
30-#fancybox-buttons ul {
31- display: block;
32- width: 170px;
33- height: 30px;
34- margin: 0 auto;
35- padding: 0;
36- list-style: none;
37- background: #111;
38- -webkit-box-shadow: 0 1px 3px #000,0 0 0 1px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05);
39- -moz-box-shadow: 0 1px 3px #000,0 0 0 1px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05);
40- background: #111 -webkit-gradient(linear,0% 0%,0% 100%,from(rgba(255,255,255,.2)),color-stop(.5,rgba(255,255,255,.15)),color-stop(.5,rgba(255,255,255,.1)),to(rgba(255,255,255,.15)));
41- background: #111 -moz-linear-gradient(top,rgba(255,255,255,.2) 0%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.1) 50%,rgba(255,255,255,.15) 100%);
42- border-radius: 3px;
43-}
44-
45-#fancybox-buttons ul li {
46- float: left;
47- margin: 0;
48- padding: 0;
49-}
50-
51-#fancybox-buttons a {
52- display: block;
53- width: 30px;
54- height: 30px;
55- text-indent: -9999px;
56- background-image: url('fancybox_buttons.png');
57- background-repeat: no-repeat;
58- outline: none;
59-}
60-
61-#fancybox-buttons a.btnPrev {
62- width: 32px;
63- background-position: 6px 0;
64-}
65-
66-#fancybox-buttons a.btnNext {
67- background-position: -33px 0;
68- border-right: 1px solid #3e3e3e;
69-}
70-
71-#fancybox-buttons a.btnPlay {
72- background-position: 0 -30px;
73-}
74-
75-#fancybox-buttons a.btnPlayOn {
76- background-position: -30px -30px;
77-}
78-
79-#fancybox-buttons a.btnToggle {
80- background-position: 3px -60px;
81- border-left: 1px solid #111;
82- border-right: 1px solid #3e3e3e;
83- width: 35px
84-}
85-
86-#fancybox-buttons a.btnToggleOn {
87- background-position: -27px -60px;
88-}
89-
90-#fancybox-buttons a.btnClose {
91- border-left: 1px solid #111;
92- width: 38px;
93- background-position: -57px 0px;
94-}
95-
96-#fancybox-buttons a.btnDisabled {
97- opacity : 0.5;
98- cursor: default;
99-}
100\ No newline at end of file
101
102=== removed file 'media/fancybox/helpers/jquery.fancybox-buttons.js'
103--- media/fancybox/helpers/jquery.fancybox-buttons.js 2012-04-24 13:30:24 +0000
104+++ media/fancybox/helpers/jquery.fancybox-buttons.js 1970-01-01 00:00:00 +0000
105@@ -1,115 +0,0 @@
106- /*!
107- * Buttons helper for fancyBox
108- * version: 1.0.2
109- * @requires fancyBox v2.0 or later
110- *
111- * Usage:
112- * $(".fancybox").fancybox({
113- * buttons: {
114- * position : 'top'
115- * }
116- * });
117- *
118- * Options:
119- * tpl - HTML template
120- * position - 'top' or 'bottom'
121- *
122- */
123-(function ($) {
124- //Shortcut for fancyBox object
125- var F = $.fancybox;
126-
127- //Add helper object
128- F.helpers.buttons = {
129- tpl: '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:jQuery.fancybox.close();"></a></li></ul></div>',
130- list: null,
131- buttons: {},
132-
133- update: function () {
134- var toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');
135-
136- //Size toggle button
137- if (F.current.canShrink) {
138- toggle.addClass('btnToggleOn');
139-
140- } else if (!F.current.canExpand) {
141- toggle.addClass('btnDisabled');
142- }
143- },
144-
145- beforeLoad: function (opts) {
146- //Remove self if gallery do not have at least two items
147- if (F.group.length < 2) {
148- F.coming.helpers.buttons = false;
149- F.coming.closeBtn = true;
150-
151- return;
152- }
153-
154- //Increase top margin to give space for buttons
155- F.coming.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
156- },
157-
158- onPlayStart: function () {
159- if (this.list) {
160- this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
161- }
162- },
163-
164- onPlayEnd: function () {
165- if (this.list) {
166- this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
167- }
168- },
169-
170- afterShow: function (opts) {
171- var buttons;
172-
173- if (!this.list) {
174- this.list = $(opts.tpl || this.tpl).addClass(opts.position || 'top').appendTo('body');
175-
176- this.buttons = {
177- prev : this.list.find('.btnPrev').click( F.prev ),
178- next : this.list.find('.btnNext').click( F.next ),
179- play : this.list.find('.btnPlay').click( F.play ),
180- toggle : this.list.find('.btnToggle').click( F.toggle )
181- }
182- }
183-
184- buttons = this.buttons;
185-
186- //Prev
187- if (F.current.index > 0 || F.current.loop) {
188- buttons.prev.removeClass('btnDisabled');
189- } else {
190- buttons.prev.addClass('btnDisabled');
191- }
192-
193- //Next / Play
194- if (F.current.loop || F.current.index < F.group.length - 1) {
195- buttons.next.removeClass('btnDisabled');
196- buttons.play.removeClass('btnDisabled');
197-
198- } else {
199- buttons.next.addClass('btnDisabled');
200- buttons.play.addClass('btnDisabled');
201- }
202-
203- this.update();
204- },
205-
206- onUpdate: function () {
207- this.update();
208- },
209-
210- beforeClose: function () {
211- if (this.list) {
212- this.list.remove();
213- }
214-
215- this.list = null;
216- this.buttons = {};
217- }
218- };
219-
220-}(jQuery));
221\ No newline at end of file
222
223=== removed file 'media/fancybox/helpers/jquery.fancybox-media.js'
224--- media/fancybox/helpers/jquery.fancybox-media.js 2012-04-24 13:30:24 +0000
225+++ media/fancybox/helpers/jquery.fancybox-media.js 1970-01-01 00:00:00 +0000
226@@ -1,85 +0,0 @@
227- /*!
228- * Media helper for fancyBox
229- * version: 1.0.0
230- * @requires fancyBox v2.0 or later
231- *
232- * Usage:
233- * $(".fancybox").fancybox({
234- * media: {}
235- * });
236- *
237- * Supports:
238- * Youtube
239- * http://www.youtube.com/watch?v=opj24KnzrWo
240- * http://youtu.be/opj24KnzrWo
241- * Vimeo
242- * http://vimeo.com/25634903
243- * Metacafe
244- * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/
245- * http://www.metacafe.com/watch/7635964/
246- * Dailymotion
247- * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people
248- * Twitvid
249- * http://twitvid.com/QY7MD
250- * Twitpic
251- * http://twitpic.com/7p93st
252- * Instagram
253- * http://instagr.am/p/IejkuUGxQn/
254- * http://instagram.com/p/IejkuUGxQn/
255- * Google maps
256- * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17
257- * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
258- * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
259- */
260-(function ($) {
261- //Shortcut for fancyBox object
262- var F = $.fancybox;
263-
264- //Add helper object
265- F.helpers.media = {
266- beforeLoad : function(opts, obj) {
267- var href = obj.href || '',
268- type = false,
269- rez;
270-
271- if ((rez = href.match(/(youtube\.com|youtu\.be)\/(v\/|u\/|embed\/|watch\?v=)?([^#\&\?]*).*/i))) {
272- href = '//www.youtube.com/embed/' + rez[3] + '?autoplay=1&autohide=1&fs=1&rel=0&enablejsapi=1';
273- type = 'iframe';
274-
275- } else if ((rez = href.match(/vimeo.com\/(\d+)\/?(.*)/))) {
276- href = '//player.vimeo.com/video/' + rez[1] + '?hd=1&autoplay=1&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1';
277- type = 'iframe';
278-
279- } else if ((rez = href.match(/metacafe.com\/watch\/(\d+)\/?(.*)/))) {
280- href = '//www.metacafe.com/fplayer/' + rez[1] + '/.swf?playerVars=autoPlay=yes';
281- type = 'swf';
282-
283- } else if ((rez = href.match(/dailymotion.com\/video\/(.*)\/?(.*)/))) {
284- href = '//www.dailymotion.com/swf/video/' + rez[1] + '?additionalInfos=0&autoStart=1';
285- type = 'swf';
286-
287- } else if ((rez = href.match(/twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i))) {
288- href = '//www.twitvid.com/embed.php?autoplay=0&guid=' + rez[1];
289- type = 'iframe';
290-
291- } else if ((rez = href.match(/twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i))) {
292- href = '//twitpic.com/show/full/' + rez[1];
293- type = 'image';
294-
295- } else if ((rez = href.match(/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i))) {
296- href = '//' + rez[1] + '/p/' + rez[2] + '/media/?size=l';
297- type = 'image';
298-
299- } else if ((rez = href.match(/maps\.google\.com\/(\?ll=|maps\/?\?q=)(.*)/i))) {
300- href = '//maps.google.com/' + rez[1] + '' + rez[2] + '&output=' + (rez[2].indexOf('layer=c') ? 'svembed' : 'embed');
301- type = 'iframe';
302- }
303-
304- if (type) {
305- obj.href = href;
306- obj.type = type;
307- }
308- }
309- }
310-
311-}(jQuery));
312\ No newline at end of file
313
314=== removed file 'media/fancybox/helpers/jquery.fancybox-thumbs.css'
315--- media/fancybox/helpers/jquery.fancybox-thumbs.css 2012-04-24 13:30:24 +0000
316+++ media/fancybox/helpers/jquery.fancybox-thumbs.css 1970-01-01 00:00:00 +0000
317@@ -1,54 +0,0 @@
318-#fancybox-thumbs {
319- position: fixed;
320- left: 0;
321- width: 100%;
322- overflow: hidden;
323- z-index: 8050;
324-}
325-
326-#fancybox-thumbs.bottom {
327- bottom: 2px;
328-}
329-
330-#fancybox-thumbs.top {
331- top: 2px;
332-}
333-
334-#fancybox-thumbs ul {
335- position: relative;
336- list-style: none;
337- margin: 0;
338- padding: 0;
339-}
340-
341-#fancybox-thumbs ul li {
342- float: left;
343- padding: 1px;
344- opacity: 0.5;
345-}
346-
347-#fancybox-thumbs ul li.active {
348- opacity: 0.75;
349- padding: 0;
350- border: 1px solid #fff;
351-}
352-
353-#fancybox-thumbs ul li:hover {
354- opacity: 1;
355-}
356-
357-#fancybox-thumbs ul li a {
358- display: block;
359- position: relative;
360- overflow: hidden;
361- border: 1px solid #222;
362- background: #111;
363- outline: none;
364-}
365-
366-#fancybox-thumbs ul li img {
367- display: block;
368- position: relative;
369- border: 0;
370- padding: 0;
371-}
372\ No newline at end of file
373
374=== removed file 'media/fancybox/helpers/jquery.fancybox-thumbs.js'
375--- media/fancybox/helpers/jquery.fancybox-thumbs.js 2012-04-24 13:30:24 +0000
376+++ media/fancybox/helpers/jquery.fancybox-thumbs.js 1970-01-01 00:00:00 +0000
377@@ -1,157 +0,0 @@
378- /*!
379- * Thumbnail helper for fancyBox
380- * version: 1.0.4
381- * @requires fancyBox v2.0 or later
382- *
383- * Usage:
384- * $(".fancybox").fancybox({
385- * thumbs: {
386- * width : 50,
387- * height : 50
388- * }
389- * });
390- *
391- * Options:
392- * width - thumbnail width
393- * height - thumbnail height
394- * source - function to obtain the URL of the thumbnail image
395- * position - 'top' or 'bottom'
396- *
397- */
398-(function ($) {
399- //Shortcut for fancyBox object
400- var F = $.fancybox;
401-
402- //Add helper object
403- F.helpers.thumbs = {
404- wrap: null,
405- list: null,
406- width: 0,
407-
408- //Default function to obtain the URL of the thumbnail image
409- source: function (el) {
410- var img;
411-
412- if ($.type(el) === 'string') {
413- return el;
414- }
415-
416- img = $(el).find('img');
417-
418- return img.length ? img.attr('src') : el.href;
419- },
420-
421- init: function (opts) {
422- var that = this,
423- list,
424- thumbWidth = opts.width || 50,
425- thumbHeight = opts.height || 50,
426- thumbSource = opts.source || this.source;
427-
428- //Build list structure
429- list = '';
430-
431- for (var n = 0; n < F.group.length; n++) {
432- list += '<li><a style="width:' + thumbWidth + 'px;height:' + thumbHeight + 'px;" href="javascript:jQuery.fancybox.jumpto(' + n + ');"></a></li>';
433- }
434-
435- this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position || 'bottom').appendTo('body');
436- this.list = $('<ul>' + list + '</ul>').appendTo(this.wrap);
437-
438- //Load each thumbnail
439- $.each(F.group, function (i) {
440- $("<img />").load(function () {
441- var width = this.width,
442- height = this.height,
443- widthRatio, heightRatio, parent;
444-
445- if (!that.list || !width || !height) {
446- return;
447- }
448-
449- //Calculate thumbnail width/height and center it
450- widthRatio = width / thumbWidth;
451- heightRatio = height / thumbHeight;
452- parent = that.list.children().eq(i).find('a');
453-
454- if (widthRatio >= 1 && heightRatio >= 1) {
455- if (widthRatio > heightRatio) {
456- width = Math.floor(width / heightRatio);
457- height = thumbHeight;
458-
459- } else {
460- width = thumbWidth;
461- height = Math.floor(height / widthRatio);
462- }
463- }
464-
465- $(this).css({
466- width: width,
467- height: height,
468- top: Math.floor(thumbHeight / 2 - height / 2),
469- left: Math.floor(thumbWidth / 2 - width / 2)
470- });
471-
472- parent.width(thumbWidth).height(thumbHeight);
473-
474- $(this).hide().appendTo(parent).fadeIn(300);
475-
476- }).attr('src', thumbSource( F.group[ i ] ));
477- });
478-
479- //Set initial width
480- this.width = this.list.children().eq(0).outerWidth(true);
481-
482- this.list.width(this.width * (F.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (F.current.index * this.width + this.width * 0.5)));
483- },
484-
485- //Center list
486- update: function (opts) {
487- if (this.list) {
488- this.list.stop(true).animate({
489- 'left': Math.floor($(window).width() * 0.5 - (F.current.index * this.width + this.width * 0.5))
490- }, 150);
491- }
492- },
493-
494- beforeLoad: function (opts) {
495- //Remove self if gallery do not have at least two items
496- if (F.group.length < 2) {
497- F.coming.helpers.thumbs = false;
498-
499- return;
500- }
501-
502- //Increase bottom margin to give space for thumbs
503- F.coming.margin[ opts.position === 'top' ? 0 : 2 ] = opts.height + 30;
504- },
505-
506- afterShow: function (opts) {
507- //Check if exists and create or update list
508- if (this.list) {
509- this.update(opts);
510-
511- } else {
512- this.init(opts);
513- }
514-
515- //Set active element
516- this.list.children().removeClass('active').eq(F.current.index).addClass('active');
517- },
518-
519- onUpdate: function () {
520- this.update();
521- },
522-
523- beforeClose: function () {
524- if (this.wrap) {
525- this.wrap.remove();
526- }
527-
528- this.wrap = null;
529- this.list = null;
530- this.width = 0;
531- }
532- }
533-
534-}(jQuery));
535\ No newline at end of file
536
537=== removed file 'media/fancybox/jquery.fancybox.css'
538--- media/fancybox/jquery.fancybox.css 2012-04-24 13:30:24 +0000
539+++ media/fancybox/jquery.fancybox.css 1970-01-01 00:00:00 +0000
540@@ -1,234 +0,0 @@
541-/*! fancyBox v2.0.6 fancyapps.com | fancyapps.com/fancybox/#license */
542-.fancybox-tmp iframe, .fancybox-tmp object {
543- vertical-align: top;
544- padding: 0;
545- margin: 0;
546-}
547-
548-.fancybox-wrap {
549- position: absolute;
550- top: 0;
551- left: 0;
552- z-index: 8020;
553-}
554-
555-.fancybox-skin {
556- position: relative;
557- padding: 0;
558- margin: 0;
559- background: #f9f9f9;
560- color: #444;
561- text-shadow: none;
562- -webkit-border-radius: 4px;
563- -moz-border-radius: 4px;
564- border-radius: 4px;
565-}
566-
567-.fancybox-opened {
568- z-index: 8030;
569-}
570-
571-.fancybox-opened .fancybox-skin {
572- -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
573- -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
574- box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
575-}
576-
577-.fancybox-outer, .fancybox-inner {
578- padding: 0;
579- margin: 0;
580- position: relative;
581- outline: none;
582-}
583-
584-.fancybox-inner {
585- overflow: hidden;
586-}
587-
588-.fancybox-type-iframe .fancybox-inner {
589- -webkit-overflow-scrolling: touch;
590-}
591-
592-.fancybox-error {
593- color: #444;
594- font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
595- margin: 0;
596- padding: 10px;
597-}
598-
599-.fancybox-image, .fancybox-iframe {
600- display: block;
601- width: 100%;
602- height: 100%;
603- border: 0;
604- padding: 0;
605- margin: 0;
606- vertical-align: top;
607-}
608-
609-.fancybox-image {
610- max-width: 100%;
611- max-height: 100%;
612-}
613-
614-#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
615- background-image: url('fancybox_sprite.png');
616-}
617-
618-#fancybox-loading {
619- position: fixed;
620- top: 50%;
621- left: 50%;
622- margin-top: -22px;
623- margin-left: -22px;
624- background-position: 0 -108px;
625- opacity: 0.8;
626- cursor: pointer;
627- z-index: 8020;
628-}
629-
630-#fancybox-loading div {
631- width: 44px;
632- height: 44px;
633- background: url('fancybox_loading.gif') center center no-repeat;
634-}
635-
636-.fancybox-close {
637- position: absolute;
638- top: -18px;
639- right: -18px;
640- width: 36px;
641- height: 36px;
642- cursor: pointer;
643- z-index: 8040;
644-}
645-
646-.fancybox-nav {
647- position: absolute;
648- top: 0;
649- width: 40%;
650- height: 100%;
651- cursor: pointer;
652- background: transparent url('blank.gif'); /* helps IE */
653- -webkit-tap-highlight-color: rgba(0,0,0,0);
654- z-index: 8040;
655-}
656-
657-.fancybox-prev {
658- left: 0;
659-}
660-
661-.fancybox-next {
662- right: 0;
663-}
664-
665-.fancybox-nav span {
666- position: absolute;
667- top: 50%;
668- width: 36px;
669- height: 34px;
670- margin-top: -18px;
671- cursor: pointer;
672- z-index: 8040;
673- visibility: hidden;
674-}
675-
676-.fancybox-prev span {
677- left: 20px;
678- background-position: 0 -36px;
679-}
680-
681-.fancybox-next span {
682- right: 20px;
683- background-position: 0 -72px;
684-}
685-
686-.fancybox-nav:hover span {
687- visibility: visible;
688-}
689-
690-.fancybox-tmp {
691- position: absolute;
692- top: -9999px;
693- left: -9999px;
694- padding: 0;
695- overflow: visible;
696- visibility: hidden;
697-}
698-
699-/* Overlay helper */
700-
701-#fancybox-overlay {
702- position: absolute;
703- top: 0;
704- left: 0;
705- overflow: hidden;
706- display: none;
707- z-index: 8010;
708- background: #000;
709-}
710-
711-#fancybox-overlay.overlay-fixed {
712- position: fixed;
713- bottom: 0;
714- right: 0;
715-}
716-
717-/* Title helper */
718-
719-.fancybox-title {
720- visibility: hidden;
721- font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
722- position: relative;
723- text-shadow: none;
724- z-index: 8050;
725-}
726-
727-.fancybox-opened .fancybox-title {
728- visibility: visible;
729-}
730-
731-.fancybox-title-float-wrap {
732- position: absolute;
733- bottom: 0;
734- right: 50%;
735- margin-bottom: -35px;
736- z-index: 8030;
737- text-align: center;
738-}
739-
740-.fancybox-title-float-wrap .child {
741- display: inline-block;
742- margin-right: -100%;
743- padding: 2px 20px;
744- background: transparent; /* Fallback for web browsers that doesn't support RGBa */
745- background: rgba(0, 0, 0, 0.8);
746- -webkit-border-radius: 15px;
747- -moz-border-radius: 15px;
748- border-radius: 15px;
749- text-shadow: 0 1px 2px #222;
750- color: #FFF;
751- font-weight: bold;
752- line-height: 24px;
753- white-space: nowrap;
754-}
755-
756-.fancybox-title-outside-wrap {
757- position: relative;
758- margin-top: 10px;
759- color: #fff;
760-}
761-
762-.fancybox-title-inside-wrap {
763- margin-top: 10px;
764-}
765-
766-.fancybox-title-over-wrap {
767- position: absolute;
768- bottom: 0;
769- left: 0;
770- color: #fff;
771- padding: 10px;
772- background: #000;
773- background: rgba(0, 0, 0, .8);
774-}
775\ No newline at end of file
776
777=== removed file 'media/fancybox/jquery.fancybox.js'
778--- media/fancybox/jquery.fancybox.js 2012-04-24 13:30:24 +0000
779+++ media/fancybox/jquery.fancybox.js 1970-01-01 00:00:00 +0000
780@@ -1,1463 +0,0 @@
781-/*!
782- * fancyBox - jQuery Plugin
783- * version: 2.0.6 (16/04/2012)
784- * @requires jQuery v1.6 or later
785- *
786- * Examples at http://fancyapps.com/fancybox/
787- * License: www.fancyapps.com/fancybox/#license
788- *
789- * Copyright 2012 Janis Skarnelis - janis@fancyapps.com
790- *
791- */
792-
793-(function (window, document, $, undefined) {
794- "use strict";
795-
796- var W = $(window),
797- D = $(document),
798- F = $.fancybox = function () {
799- F.open.apply( this, arguments );
800- },
801- didResize = false,
802- resizeTimer = null,
803- isTouch = document.createTouch !== undefined,
804- isString = function(str) {
805- return $.type(str) === "string";
806- },
807- isPercentage = function(str) {
808- return isString(str) && str.indexOf('%') > 0;
809- },
810- getValue = function(value, dim) {
811- if (dim && isPercentage(value)) {
812- value = F.getViewport()[ dim ] / 100 * parseInt(value, 10);
813- }
814-
815- return Math.round(value) + 'px';
816- };
817-
818- $.extend(F, {
819- // The current version of fancyBox
820- version: '2.0.5',
821-
822- defaults: {
823- padding: 15,
824- margin: 20,
825-
826- width: 800,
827- height: 600,
828- minWidth: 100,
829- minHeight: 100,
830- maxWidth: 9999,
831- maxHeight: 9999,
832-
833- autoSize: true,
834- autoResize: !isTouch,
835- autoCenter : !isTouch,
836- fitToView: true,
837- aspectRatio: false,
838- topRatio: 0.5,
839-
840- fixed: false,
841- scrolling: 'auto', // 'auto', 'yes' or 'no'
842- wrapCSS: '',
843-
844- arrows: true,
845- closeBtn: true,
846- closeClick: false,
847- nextClick : false,
848- mouseWheel: true,
849- autoPlay: false,
850- playSpeed: 3000,
851- preload : 3,
852-
853- modal: false,
854- loop: true,
855- ajax: { dataType: 'html', headers: { 'X-fancyBox': true } },
856- keys: {
857- next: [13, 32, 34, 39, 40], // enter, space, page down, right arrow, down arrow
858- prev: [8, 33, 37, 38], // backspace, page up, left arrow, up arrow
859- close: [27] // escape key
860- },
861-
862- // Override some properties
863- index: 0,
864- type: null,
865- href: null,
866- content: null,
867- title: null,
868-
869- // HTML templates
870- tpl: {
871- wrap: '<div class="fancybox-wrap"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
872- image: '<img class="fancybox-image" src="{href}" alt="" />',
873- iframe: '<iframe class="fancybox-iframe" name="fancybox-frame{rnd}" frameborder="0" hspace="0"' + ($.browser.msie ? ' allowtransparency="true"' : '') + '></iframe>',
874- swf: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{href}" /><embed src="{href}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="100%" height="100%" wmode="transparent"></embed></object>',
875- error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
876- closeBtn: '<div title="Close" class="fancybox-item fancybox-close"></div>',
877- next: '<a title="Next" class="fancybox-nav fancybox-next"><span></span></a>',
878- prev: '<a title="Previous" class="fancybox-nav fancybox-prev"><span></span></a>'
879- },
880-
881- // Properties for each animation type
882- // Opening fancyBox
883- openEffect: 'fade', // 'elastic', 'fade' or 'none'
884- openSpeed: 300,
885- openEasing: 'swing',
886- openOpacity: true,
887- openMethod: 'zoomIn',
888-
889- // Closing fancyBox
890- closeEffect: 'fade', // 'elastic', 'fade' or 'none'
891- closeSpeed: 300,
892- closeEasing: 'swing',
893- closeOpacity: true,
894- closeMethod: 'zoomOut',
895-
896- // Changing next gallery item
897- nextEffect: 'elastic', // 'elastic', 'fade' or 'none'
898- nextSpeed: 300,
899- nextEasing: 'swing',
900- nextMethod: 'changeIn',
901-
902- // Changing previous gallery item
903- prevEffect: 'elastic', // 'elastic', 'fade' or 'none'
904- prevSpeed: 300,
905- prevEasing: 'swing',
906- prevMethod: 'changeOut',
907-
908- // Enabled helpers
909- helpers: {
910- overlay: {
911- speedIn: 0,
912- speedOut: 300,
913- opacity: 0.8,
914- css: {
915- cursor: 'pointer'
916- },
917- closeClick: true
918- },
919- title: {
920- type: 'float' // 'float', 'inside', 'outside' or 'over'
921- }
922- },
923-
924- // Callbacks
925- onCancel: $.noop, // If canceling
926- beforeLoad: $.noop, // Before loading
927- afterLoad: $.noop, // After loading
928- beforeShow: $.noop, // Before changing in current item
929- afterShow: $.noop, // After opening
930- beforeClose: $.noop, // Before closing
931- afterClose: $.noop // After closing
932- },
933-
934- //Current state
935- group: {}, // Selected group
936- opts: {}, // Group options
937- coming: null, // Element being loaded
938- current: null, // Currently loaded element
939- isOpen: false, // Is currently open
940- isOpened: false, // Have been fully opened at least once
941- wrap: null,
942- skin: null,
943- outer: null,
944- inner: null,
945-
946- player: {
947- timer: null,
948- isActive: false
949- },
950-
951- // Loaders
952- ajaxLoad: null,
953- imgPreload: null,
954-
955- // Some collections
956- transitions: {},
957- helpers: {},
958-
959- /*
960- * Static methods
961- */
962-
963- open: function (group, opts) {
964- //Kill existing instances
965- F.close(true);
966-
967- //Normalize group
968- if (group && !$.isArray(group)) {
969- group = group instanceof $ ? $(group).get() : [group];
970- }
971-
972- F.isActive = true;
973-
974- //Extend the defaults
975- F.opts = $.extend(true, {}, F.defaults, opts);
976-
977- //All options are merged recursive except keys
978- if ($.isPlainObject(opts) && opts.keys !== undefined) {
979- F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false;
980- }
981-
982- F.group = group;
983-
984- F._start(F.opts.index || 0);
985- },
986-
987- cancel: function () {
988- if (F.coming && false === F.trigger('onCancel')) {
989- return;
990- }
991-
992- F.coming = null;
993-
994- F.hideLoading();
995-
996- if (F.ajaxLoad) {
997- F.ajaxLoad.abort();
998- }
999-
1000- F.ajaxLoad = null;
1001-
1002- if (F.imgPreload) {
1003- F.imgPreload.onload = F.imgPreload.onabort = F.imgPreload.onerror = null;
1004- }
1005- },
1006-
1007- close: function (a) {
1008- F.cancel();
1009-
1010- if (!F.current || false === F.trigger('beforeClose')) {
1011- return;
1012- }
1013-
1014- F.unbindEvents();
1015-
1016- //If forced or is still opening then remove immediately
1017- if (!F.isOpen || (a && a[0] === true)) {
1018- $('.fancybox-wrap').stop().trigger('onReset').remove();
1019-
1020- F._afterZoomOut();
1021-
1022- } else {
1023- F.isOpen = F.isOpened = false;
1024-
1025- $('.fancybox-item, .fancybox-nav').remove();
1026-
1027- F.wrap.stop(true).removeClass('fancybox-opened');
1028- F.inner.css('overflow', 'hidden');
1029-
1030- F.transitions[F.current.closeMethod]();
1031- }
1032- },
1033-
1034- // Start/stop slideshow
1035- play: function (a) {
1036- var clear = function () {
1037- clearTimeout(F.player.timer);
1038- },
1039- set = function () {
1040- clear();
1041-
1042- if (F.current && F.player.isActive) {
1043- F.player.timer = setTimeout(F.next, F.current.playSpeed);
1044- }
1045- },
1046- stop = function () {
1047- clear();
1048-
1049- $('body').unbind('.player');
1050-
1051- F.player.isActive = false;
1052-
1053- F.trigger('onPlayEnd');
1054- },
1055- start = function () {
1056- if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) {
1057- F.player.isActive = true;
1058-
1059- $('body').bind({
1060- 'afterShow.player onUpdate.player': set,
1061- 'onCancel.player beforeClose.player': stop,
1062- 'beforeLoad.player': clear
1063- });
1064-
1065- set();
1066-
1067- F.trigger('onPlayStart');
1068- }
1069- };
1070-
1071- if (F.player.isActive || (a && a[0] === false)) {
1072- stop();
1073- } else {
1074- start();
1075- }
1076- },
1077-
1078- next: function () {
1079- if (F.current) {
1080- F.jumpto(F.current.index + 1);
1081- }
1082- },
1083-
1084- prev: function () {
1085- if (F.current) {
1086- F.jumpto(F.current.index - 1);
1087- }
1088- },
1089-
1090- jumpto: function (index) {
1091- if (!F.current) {
1092- return;
1093- }
1094-
1095- index = parseInt(index, 10);
1096-
1097- if (F.group.length > 1 && F.current.loop) {
1098- if (index >= F.group.length) {
1099- index = 0;
1100-
1101- } else if (index < 0) {
1102- index = F.group.length - 1;
1103- }
1104- }
1105-
1106- if (F.group[index] !== undefined) {
1107- F.cancel();
1108-
1109- F._start(index);
1110- }
1111- },
1112-
1113- reposition: function (e, onlyAbsolute) {
1114- var pos;
1115-
1116- if (F.isOpen) {
1117- pos = F._getPosition(onlyAbsolute);
1118-
1119- if (e && e.type === 'scroll') {
1120- delete pos.position;
1121-
1122- F.wrap.stop(true, true).animate(pos, 200);
1123-
1124- } else {
1125- F.wrap.css(pos);
1126- }
1127- }
1128- },
1129-
1130- update: function (e) {
1131- if (!F.isOpen) {
1132- return;
1133- }
1134-
1135- // Run this code after a delay for better performance
1136- if (!didResize) {
1137- resizeTimer = setTimeout(function () {
1138- var current = F.current, anyway = !e || (e && e.type === 'orientationchange');
1139-
1140- if (didResize) {
1141- didResize = false;
1142-
1143- if (!current) {
1144- return;
1145- }
1146-
1147- if ((!e || e.type !== 'scroll') || anyway) {
1148- if (current.autoSize && current.type !== 'iframe') {
1149- F.inner.height('auto');
1150- current.height = F.inner.height();
1151- }
1152-
1153- if (current.autoResize || anyway) {
1154- F._setDimension();
1155- }
1156-
1157- if (current.canGrow && current.type !== 'iframe') {
1158- F.inner.height('auto');
1159- }
1160- }
1161-
1162- if (current.autoCenter || anyway) {
1163- F.reposition(e);
1164- }
1165-
1166- F.trigger('onUpdate');
1167- }
1168- }, 200);
1169- }
1170-
1171- didResize = true;
1172- },
1173-
1174- toggle: function () {
1175- if (F.isOpen) {
1176- F.current.fitToView = !F.current.fitToView;
1177-
1178- F.update();
1179- }
1180- },
1181-
1182- hideLoading: function () {
1183- D.unbind('keypress.fb');
1184-
1185- $('#fancybox-loading').remove();
1186- },
1187-
1188- showLoading: function () {
1189- F.hideLoading();
1190-
1191- //If user will press the escape-button, the request will be canceled
1192- D.bind('keypress.fb', function(e) {
1193- if (e.keyCode === 27) {
1194- e.preventDefault();
1195- F.cancel();
1196- }
1197- });
1198-
1199- $('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body');
1200- },
1201-
1202- getViewport: function () {
1203- // See http://bugs.jquery.com/ticket/6724
1204- return {
1205- x: W.scrollLeft(),
1206- y: W.scrollTop(),
1207- w: isTouch && window.innerWidth ? window.innerWidth : W.width(),
1208- h: isTouch && window.innerHeight ? window.innerHeight : W.height()
1209- };
1210- },
1211-
1212- // Unbind the keyboard / clicking actions
1213- unbindEvents: function () {
1214- if (F.wrap) {
1215- F.wrap.unbind('.fb');
1216- }
1217-
1218- D.unbind('.fb');
1219- W.unbind('.fb');
1220- },
1221-
1222- bindEvents: function () {
1223- var current = F.current,
1224- keys = current.keys;
1225-
1226- if (!current) {
1227- return;
1228- }
1229-
1230- W.bind('resize.fb orientationchange.fb' + (current.autoCenter && !current.fixed ? ' scroll.fb' : ''), F.update);
1231-
1232- if (keys) {
1233- D.bind('keydown.fb', function (e) {
1234- var code, target = e.target || e.srcElement;
1235-
1236- // Ignore key combinations and key events within form elements
1237- if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) {
1238- code = e.keyCode;
1239-
1240- if ($.inArray(code, keys.close) > -1) {
1241- F.close();
1242- e.preventDefault();
1243-
1244- } else if ($.inArray(code, keys.next) > -1) {
1245- F.next();
1246- e.preventDefault();
1247-
1248- } else if ($.inArray(code, keys.prev) > -1) {
1249- F.prev();
1250- e.preventDefault();
1251- }
1252- }
1253- });
1254- }
1255-
1256- if ($.fn.mousewheel && current.mouseWheel && F.group.length > 1) {
1257- F.wrap.bind('mousewheel.fb', function (e, delta) {
1258- var target = e.target || null;
1259-
1260- if (delta !== 0 && (!target || target.clientHeight === 0 || (target.scrollHeight === target.clientHeight && target.scrollWidth === target.clientWidth))) {
1261- e.preventDefault();
1262-
1263- F[delta > 0 ? 'prev' : 'next']();
1264- }
1265- });
1266- }
1267- },
1268-
1269- trigger: function (event, o) {
1270- var ret, obj = o || F[ $.inArray(event, ['onCancel', 'beforeLoad', 'afterLoad']) > -1 ? 'coming' : 'current' ];
1271-
1272- if (!obj) {
1273- return;
1274- }
1275-
1276- if ($.isFunction( obj[event] )) {
1277- ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1));
1278- }
1279-
1280- if (ret === false) {
1281- return false;
1282- }
1283-
1284- if (obj.helpers) {
1285- $.each(obj.helpers, function (helper, opts) {
1286- if (opts && $.isPlainObject(F.helpers[helper]) && $.isFunction(F.helpers[helper][event])) {
1287- F.helpers[helper][event](opts, obj);
1288- }
1289- });
1290- }
1291-
1292- $.event.trigger(event + '.fb');
1293- },
1294-
1295- isImage: function (str) {
1296- return isString(str) && str.match(/\.(jpe?g|gif|png|bmp)((\?|#).*)?$/i);
1297- },
1298-
1299- isSWF: function (str) {
1300- return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i);
1301- },
1302-
1303- _start: function (index) {
1304- var coming = {},
1305- element = F.group[index] || null,
1306- isDom,
1307- href,
1308- type,
1309- rez,
1310- hrefParts;
1311-
1312- if (element && (element.nodeType || element instanceof $)) {
1313- isDom = true;
1314-
1315- if ($.metadata) {
1316- coming = $(element).metadata();
1317- }
1318- }
1319-
1320- coming = $.extend(true, {}, F.opts, {index : index, element : element}, ($.isPlainObject(element) ? element : coming));
1321-
1322- // Re-check overridable options
1323- $.each(['href', 'title', 'content', 'type'], function(i,v) {
1324- coming[v] = F.opts[ v ] || (isDom && $(element).attr( v )) || coming[ v ] || null;
1325- });
1326-
1327- // Convert margin property to array - top, right, bottom, left
1328- if (typeof coming.margin === 'number') {
1329- coming.margin = [coming.margin, coming.margin, coming.margin, coming.margin];
1330- }
1331-
1332- // 'modal' propery is just a shortcut
1333- if (coming.modal) {
1334- $.extend(true, coming, {
1335- closeBtn : false,
1336- closeClick: false,
1337- nextClick : false,
1338- arrows : false,
1339- mouseWheel : false,
1340- keys : null,
1341- helpers: {
1342- overlay : {
1343- css: {
1344- cursor : 'auto'
1345- },
1346- closeClick : false
1347- }
1348- }
1349- });
1350- }
1351-
1352- //Give a chance for callback or helpers to update coming item (type, title, etc)
1353- F.coming = coming;
1354-
1355- if (false === F.trigger('beforeLoad')) {
1356- F.coming = null;
1357- return;
1358- }
1359-
1360- type = coming.type;
1361- href = coming.href || element;
1362-
1363- ///Check if content type is set, if not, try to get
1364- if (!type) {
1365- if (isDom) {
1366- type = $(element).data('fancybox-type');
1367-
1368- if (!type) {
1369- rez = element.className.match(/fancybox\.(\w+)/);
1370- type = rez ? rez[1] : null;
1371- }
1372- }
1373-
1374- if (!type && isString(href)) {
1375- if (F.isImage(href)) {
1376- type = 'image';
1377-
1378- } else if (F.isSWF(href)) {
1379- type = 'swf';
1380-
1381- } else if (href.match(/^#/)) {
1382- type = 'inline';
1383- }
1384- }
1385-
1386- // ...if not - display element itself
1387- if (!type) {
1388- type = isDom ? 'inline' : 'html';
1389- }
1390-
1391- coming.type = type;
1392- }
1393-
1394- // Check before try to load; 'inline' and 'html' types need content, others - href
1395- if (type === 'inline' || type === 'html') {
1396- if (!coming.content) {
1397- if (type === 'inline') {
1398- coming.content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7
1399-
1400- } else {
1401- coming.content = element;
1402- }
1403- }
1404-
1405- if (!coming.content || !coming.content.length) {
1406- type = null;
1407- }
1408-
1409- } else if (!href) {
1410- type = null;
1411- }
1412-
1413- /*
1414- * Add reference to the group, so it`s possible to access from callbacks, example:
1415- * afterLoad : function() {
1416- * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
1417- * }
1418- */
1419-
1420- if (type === 'ajax' && isString(href)) {
1421- hrefParts = href.split(/\s+/, 2);
1422-
1423- href = hrefParts.shift();
1424- coming.selector = hrefParts.shift();
1425- }
1426-
1427- coming.href = href;
1428- coming.group = F.group;
1429- coming.isDom = isDom;
1430-
1431- switch (type) {
1432- case 'image':
1433- F._loadImage();
1434- break;
1435-
1436- case 'ajax':
1437- F._loadAjax();
1438- break;
1439-
1440- case 'inline':
1441- case 'iframe':
1442- case 'swf':
1443- case 'html':
1444- F._afterLoad();
1445- break;
1446-
1447- default:
1448- F._error( 'type' );
1449- }
1450- },
1451-
1452- _error: function ( type ) {
1453- F.hideLoading();
1454-
1455- $.extend(F.coming, {
1456- type : 'html',
1457- autoSize : true,
1458- minWidth : 0,
1459- minHeight : 0,
1460- padding : 15,
1461- hasError : type,
1462- content : F.coming.tpl.error
1463- });
1464-
1465- F._afterLoad();
1466- },
1467-
1468- _loadImage: function () {
1469- // Reset preload image so it is later possible to check "complete" property
1470- var img = F.imgPreload = new Image();
1471-
1472- img.onload = function () {
1473- this.onload = this.onerror = null;
1474-
1475- F.coming.width = this.width;
1476- F.coming.height = this.height;
1477-
1478- F._afterLoad();
1479- };
1480-
1481- img.onerror = function () {
1482- this.onload = this.onerror = null;
1483-
1484- F._error( 'image' );
1485- };
1486-
1487- img.src = F.coming.href;
1488-
1489- if (img.complete === undefined || !img.complete) {
1490- F.showLoading();
1491- }
1492- },
1493-
1494- _loadAjax: function () {
1495- F.showLoading();
1496-
1497- F.ajaxLoad = $.ajax($.extend({}, F.coming.ajax, {
1498- url: F.coming.href,
1499- error: function (jqXHR, textStatus) {
1500- if (F.coming && textStatus !== 'abort') {
1501- F._error( 'ajax', jqXHR );
1502-
1503- } else {
1504- F.hideLoading();
1505- }
1506- },
1507- success: function (data, textStatus) {
1508- if (textStatus === 'success') {
1509- F.coming.content = data;
1510-
1511- F._afterLoad();
1512- }
1513- }
1514- }));
1515- },
1516-
1517- _preloadImages: function() {
1518- var group = F.group,
1519- current = F.current,
1520- len = group.length,
1521- item,
1522- href,
1523- i,
1524- cnt = Math.min(current.preload, len - 1);
1525-
1526- if (!current.preload || group.length < 2) {
1527- return;
1528- }
1529-
1530- for (i = 1; i <= cnt; i += 1) {
1531- item = group[ (current.index + i ) % len ];
1532- href = item.href || $( item ).attr('href') || item;
1533-
1534- if (item.type === 'image' || F.isImage(href)) {
1535- new Image().src = href;
1536- }
1537- }
1538- },
1539-
1540- _afterLoad: function () {
1541- F.hideLoading();
1542-
1543- if (!F.coming || false === F.trigger('afterLoad', F.current)) {
1544- F.coming = false;
1545-
1546- return;
1547- }
1548-
1549- if (F.isOpened) {
1550- $('.fancybox-item, .fancybox-nav').remove();
1551-
1552- F.wrap.stop(true).removeClass('fancybox-opened');
1553- F.inner.css('overflow', 'hidden');
1554-
1555- F.transitions[F.current.prevMethod]();
1556-
1557- } else {
1558- $('.fancybox-wrap').stop().trigger('onReset').remove();
1559-
1560- F.trigger('afterClose');
1561- }
1562-
1563- F.unbindEvents();
1564-
1565- F.isOpen = false;
1566- F.current = F.coming;
1567-
1568- //Build the neccessary markup
1569- F.wrap = $(F.current.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + F.current.type + ' fancybox-tmp ' + F.current.wrapCSS).appendTo('body');
1570- F.skin = $('.fancybox-skin', F.wrap).css('padding', getValue(F.current.padding));
1571- F.outer = $('.fancybox-outer', F.wrap);
1572- F.inner = $('.fancybox-inner', F.wrap);
1573-
1574- F._setContent();
1575- },
1576-
1577- _setContent: function () {
1578- var current = F.current,
1579- content = current.content,
1580- type = current.type,
1581- minWidth = current.minWidth,
1582- minHeight = current.minHeight,
1583- maxWidth = current.maxWidth,
1584- maxHeight = current.maxHeight,
1585- loadingBay;
1586-
1587- switch (type) {
1588- case 'inline':
1589- case 'ajax':
1590- case 'html':
1591- if (current.selector) {
1592- content = $('<div>').html(content).find(current.selector);
1593-
1594- } else if (content instanceof $) {
1595- if (content.parent().hasClass('fancybox-inner')) {
1596- content.parents('.fancybox-wrap').unbind('onReset');
1597- }
1598-
1599- content = content.show().detach();
1600-
1601- $(F.wrap).bind('onReset', function () {
1602- content.appendTo('body').hide();
1603- });
1604- }
1605-
1606- if (current.autoSize) {
1607- loadingBay = $('<div class="fancybox-wrap ' + F.current.wrapCSS + ' fancybox-tmp"></div>')
1608- .appendTo('body')
1609- .css({
1610- minWidth : getValue(minWidth, 'w'),
1611- minHeight : getValue(minHeight, 'h'),
1612- maxWidth : getValue(maxWidth, 'w'),
1613- maxHeight : getValue(maxHeight, 'h')
1614- })
1615- .append(content);
1616-
1617- current.width = loadingBay.width();
1618- current.height = loadingBay.height();
1619-
1620- // Re-check to fix 1px bug in some browsers
1621- loadingBay.width( F.current.width );
1622-
1623- if (loadingBay.height() > current.height) {
1624- loadingBay.width(current.width + 1);
1625-
1626- current.width = loadingBay.width();
1627- current.height = loadingBay.height();
1628- }
1629-
1630- content = loadingBay.contents().detach();
1631-
1632- loadingBay.remove();
1633- }
1634-
1635- break;
1636-
1637- case 'image':
1638- content = current.tpl.image.replace('{href}', current.href);
1639-
1640- current.aspectRatio = true;
1641- break;
1642-
1643- case 'swf':
1644- content = current.tpl.swf.replace(/\{width\}/g, current.width).replace(/\{height\}/g, current.height).replace(/\{href\}/g, current.href);
1645- break;
1646-
1647- case 'iframe':
1648- content = $(current.tpl.iframe.replace('{rnd}', new Date().getTime()) )
1649- .attr('scrolling', current.scrolling)
1650- .attr('src', current.href);
1651-
1652- current.scrolling = isTouch ? 'scroll' : 'auto';
1653-
1654- break;
1655- }
1656-
1657- if (type === 'image' || type === 'swf') {
1658- current.autoSize = false;
1659- current.scrolling = 'visible';
1660- }
1661-
1662- if (type === 'iframe' && current.autoSize) {
1663- F.showLoading();
1664-
1665- F._setDimension();
1666-
1667- F.inner.css('overflow', current.scrolling);
1668-
1669- content.bind({
1670- onCancel : function() {
1671- $(this).unbind();
1672-
1673- F._afterZoomOut();
1674- },
1675- load : function() {
1676- F.hideLoading();
1677-
1678- try {
1679- if (this.contentWindow.document.location) {
1680- F.current.height = $(this).contents().find('body').height();
1681- }
1682- } catch (e) {
1683- F.current.autoSize = false;
1684- }
1685-
1686- F[ F.isOpen ? '_afterZoomIn' : '_beforeShow']();
1687- }
1688- }).appendTo(F.inner);
1689-
1690- } else {
1691- F.inner.append(content);
1692-
1693- F._beforeShow();
1694- }
1695- },
1696-
1697- _beforeShow : function() {
1698- F.coming = null;
1699-
1700- //Give a chance for helpers or callbacks to update elements
1701- F.trigger('beforeShow');
1702-
1703- //Set initial dimensions and hide
1704- F._setDimension();
1705- F.wrap.hide().removeClass('fancybox-tmp');
1706-
1707- F.bindEvents();
1708-
1709- F._preloadImages();
1710-
1711- F.transitions[ F.isOpened ? F.current.nextMethod : F.current.openMethod ]();
1712- },
1713-
1714- _setDimension: function () {
1715- var wrap = F.wrap,
1716- inner = F.inner,
1717- current = F.current,
1718- viewport = F.getViewport(),
1719- margin = current.margin,
1720- padding2 = current.padding * 2,
1721- width = current.width,
1722- height = current.height,
1723- maxWidth = current.maxWidth + padding2,
1724- maxHeight = current.maxHeight + padding2,
1725- minWidth = current.minWidth + padding2,
1726- minHeight = current.minHeight + padding2,
1727- ratio,
1728- height_;
1729-
1730- viewport.w -= (margin[1] + margin[3]);
1731- viewport.h -= (margin[0] + margin[2]);
1732-
1733- if (isPercentage(width)) {
1734- width = (((viewport.w - padding2) * parseFloat(width)) / 100);
1735- }
1736-
1737- if (isPercentage(height)) {
1738- height = (((viewport.h - padding2) * parseFloat(height)) / 100);
1739- }
1740-
1741- ratio = width / height;
1742- width += padding2;
1743- height += padding2;
1744-
1745- if (current.fitToView) {
1746- maxWidth = Math.min(viewport.w, maxWidth);
1747- maxHeight = Math.min(viewport.h, maxHeight);
1748- }
1749-
1750- if (current.aspectRatio) {
1751- if (width > maxWidth) {
1752- width = maxWidth;
1753- height = ((width - padding2) / ratio) + padding2;
1754- }
1755-
1756- if (height > maxHeight) {
1757- height = maxHeight;
1758- width = ((height - padding2) * ratio) + padding2;
1759- }
1760-
1761- if (width < minWidth) {
1762- width = minWidth;
1763- height = ((width - padding2) / ratio) + padding2;
1764- }
1765-
1766- if (height < minHeight) {
1767- height = minHeight;
1768- width = ((height - padding2) * ratio) + padding2;
1769- }
1770-
1771- } else {
1772- width = Math.max(minWidth, Math.min(width, maxWidth));
1773- height = Math.max(minHeight, Math.min(height, maxHeight));
1774- }
1775-
1776- width = Math.round(width);
1777- height = Math.round(height);
1778-
1779- //Reset dimensions
1780- $(wrap.add(inner)).width('auto').height('auto');
1781-
1782- inner.width(width - padding2).height(height - padding2);
1783- wrap.width(width);
1784-
1785- height_ = wrap.height(); // Real wrap height
1786-
1787- //Fit wrapper inside
1788- if (width > maxWidth || height_ > maxHeight) {
1789- while ((width > maxWidth || height_ > maxHeight) && width > minWidth && height_ > minHeight) {
1790- height = height - 10;
1791-
1792- if (current.aspectRatio) {
1793- width = Math.round(((height - padding2) * ratio) + padding2);
1794-
1795- if (width < minWidth) {
1796- width = minWidth;
1797- height = ((width - padding2) / ratio) + padding2;
1798- }
1799-
1800- } else {
1801- width = width - 10;
1802- }
1803-
1804- inner.width(width - padding2).height(height - padding2);
1805- wrap.width(width);
1806-
1807- height_ = wrap.height();
1808- }
1809- }
1810-
1811- current.dim = {
1812- width : getValue(width),
1813- height : getValue(height_)
1814- };
1815-
1816- current.canGrow = current.autoSize && height > minHeight && height < maxHeight;
1817- current.canShrink = false;
1818- current.canExpand = false;
1819-
1820- if ((width - padding2) < current.width || (height - padding2) < current.height) {
1821- current.canExpand = true;
1822-
1823- } else if ((width > viewport.w || height_ > viewport.h) && width > minWidth && height > minHeight) {
1824- current.canShrink = true;
1825- }
1826-
1827- F.innerSpace = height_ - padding2 - inner.height();
1828- },
1829-
1830- _getPosition: function (onlyAbsolute) {
1831- var current = F.current,
1832- viewport = F.getViewport(),
1833- margin = current.margin,
1834- width = F.wrap.width() + margin[1] + margin[3],
1835- height = F.wrap.height() + margin[0] + margin[2],
1836- rez = {
1837- position: 'absolute',
1838- top : margin[0] + viewport.y,
1839- left : margin[3] + viewport.x
1840- };
1841-
1842- if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) {
1843- rez = {
1844- position: 'fixed',
1845- top : margin[0],
1846- left : margin[3]
1847- };
1848- }
1849-
1850- rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio)));
1851- rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * 0.5)));
1852-
1853- return rez;
1854- },
1855-
1856- _afterZoomIn: function () {
1857- var current = F.current, scrolling = current ? current.scrolling : 'no';
1858-
1859- if (!current) {
1860- return;
1861- }
1862-
1863- F.isOpen = F.isOpened = true;
1864-
1865- F.wrap.addClass('fancybox-opened');
1866-
1867- F.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling));
1868-
1869- F.trigger('afterShow');
1870-
1871- F.update();
1872-
1873- //Assign a click event
1874- if (current.closeClick || current.nextClick) {
1875- F.inner.css('cursor', 'pointer').bind('click.fb', function(e) {
1876- if (!$(e.target).is('a') && !$(e.target).parent().is('a')) {
1877- F[ current.closeClick ? 'close' : 'next' ]();
1878- }
1879- });
1880- }
1881-
1882- //Create a close button
1883- if (current.closeBtn) {
1884- $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', F.close);
1885- }
1886-
1887- //Create navigation arrows
1888- if (current.arrows && F.group.length > 1) {
1889- if (current.loop || current.index > 0) {
1890- $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev);
1891- }
1892-
1893- if (current.loop || current.index < F.group.length - 1) {
1894- $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next);
1895- }
1896- }
1897-
1898- if (F.opts.autoPlay && !F.player.isActive) {
1899- F.opts.autoPlay = false;
1900-
1901- F.play();
1902- }
1903- },
1904-
1905- _afterZoomOut: function () {
1906- var current = F.current;
1907-
1908- F.wrap.trigger('onReset').remove();
1909-
1910- $.extend(F, {
1911- group: {},
1912- opts: {},
1913- current: null,
1914- isActive: false,
1915- isOpened: false,
1916- isOpen: false,
1917- wrap: null,
1918- skin: null,
1919- outer: null,
1920- inner: null
1921- });
1922-
1923- F.trigger('afterClose', current);
1924- }
1925- });
1926-
1927- /*
1928- * Default transitions
1929- */
1930-
1931- F.transitions = {
1932- getOrigPosition: function () {
1933- var current = F.current,
1934- element = current.element,
1935- padding = current.padding,
1936- orig = $(current.orig),
1937- pos = {},
1938- width = 50,
1939- height = 50,
1940- viewport;
1941-
1942- if (!orig.length && current.isDom && $(element).is(':visible')) {
1943- orig = $(element).find('img:first');
1944-
1945- if (!orig.length) {
1946- orig = $(element);
1947- }
1948- }
1949-
1950- if (orig.length) {
1951- pos = orig.offset();
1952-
1953- if (orig.is('img')) {
1954- width = orig.outerWidth();
1955- height = orig.outerHeight();
1956- }
1957-
1958- } else {
1959- viewport = F.getViewport();
1960-
1961- pos.top = viewport.y + (viewport.h - height) * 0.5;
1962- pos.left = viewport.x + (viewport.w - width) * 0.5;
1963- }
1964-
1965- pos = {
1966- top : getValue(pos.top - padding),
1967- left : getValue(pos.left - padding),
1968- width : getValue(width + padding * 2),
1969- height : getValue(height + padding * 2)
1970- };
1971-
1972- return pos;
1973- },
1974-
1975- step: function (now, fx) {
1976- var prop = fx.prop, value, ratio;
1977-
1978- if (prop === 'width' || prop === 'height') {
1979- value = Math.ceil(now - (F.current.padding * 2));
1980-
1981- if (prop === 'height') {
1982- ratio = (now - fx.start) / (fx.end - fx.start);
1983-
1984- if (fx.start > fx.end) {
1985- ratio = 1 - ratio;
1986- }
1987-
1988- value -= F.innerSpace * ratio;
1989- }
1990-
1991- F.inner[prop](value);
1992- }
1993- },
1994-
1995- zoomIn: function () {
1996- var wrap = F.wrap,
1997- current = F.current,
1998- effect = current.openEffect,
1999- elastic = effect === 'elastic',
2000- dim = current.dim,
2001- startPos = $.extend({}, dim, F._getPosition( elastic )),
2002- endPos = $.extend({opacity : 1}, startPos);
2003-
2004- //Remove "position" property that breaks older IE
2005- delete endPos.position;
2006-
2007- if (elastic) {
2008- startPos = this.getOrigPosition();
2009-
2010- if (current.openOpacity) {
2011- startPos.opacity = 0;
2012- }
2013-
2014- F.outer.add(F.inner).width('auto').height('auto');
2015-
2016- } else if (effect === 'fade') {
2017- startPos.opacity = 0;
2018- }
2019-
2020- wrap.css(startPos)
2021- .show()
2022- .animate(endPos, {
2023- duration : effect === 'none' ? 0 : current.openSpeed,
2024- easing : current.openEasing,
2025- step : elastic ? this.step : null,
2026- complete : F._afterZoomIn
2027- });
2028- },
2029-
2030- zoomOut: function () {
2031- var wrap = F.wrap,
2032- current = F.current,
2033- effect = current.openEffect,
2034- elastic = effect === 'elastic',
2035- endPos = {opacity : 0};
2036-
2037- if (elastic) {
2038- if (wrap.css('position') === 'fixed') {
2039- wrap.css(F._getPosition(true));
2040- }
2041-
2042- endPos = this.getOrigPosition();
2043-
2044- if (current.closeOpacity) {
2045- endPos.opacity = 0;
2046- }
2047- }
2048-
2049- wrap.animate(endPos, {
2050- duration : effect === 'none' ? 0 : current.closeSpeed,
2051- easing : current.closeEasing,
2052- step : elastic ? this.step : null,
2053- complete : F._afterZoomOut
2054- });
2055- },
2056-
2057- changeIn: function () {
2058- var wrap = F.wrap,
2059- current = F.current,
2060- effect = current.nextEffect,
2061- elastic = effect === 'elastic',
2062- startPos = F._getPosition( elastic ),
2063- endPos = { opacity : 1 };
2064-
2065- startPos.opacity = 0;
2066-
2067- if (elastic) {
2068- startPos.top = getValue(parseInt(startPos.top, 10) - 200);
2069- endPos.top = '+=200px';
2070- }
2071-
2072- wrap.css(startPos)
2073- .show()
2074- .animate(endPos, {
2075- duration : effect === 'none' ? 0 : current.nextSpeed,
2076- easing : current.nextEasing,
2077- complete : F._afterZoomIn
2078- });
2079- },
2080-
2081- changeOut: function () {
2082- var wrap = F.wrap,
2083- current = F.current,
2084- effect = current.prevEffect,
2085- endPos = { opacity : 0 },
2086- cleanUp = function () {
2087- $(this).trigger('onReset').remove();
2088- };
2089-
2090- wrap.removeClass('fancybox-opened');
2091-
2092- if (effect === 'elastic') {
2093- endPos.top = '+=200px';
2094- }
2095-
2096- wrap.animate(endPos, {
2097- duration : effect === 'none' ? 0 : current.prevSpeed,
2098- easing : current.prevEasing,
2099- complete : cleanUp
2100- });
2101- }
2102- };
2103-
2104- /*
2105- * Overlay helper
2106- */
2107-
2108- F.helpers.overlay = {
2109- overlay: null,
2110-
2111- update: function () {
2112- var width, scrollWidth, offsetWidth;
2113-
2114- //Reset width/height so it will not mess
2115- this.overlay.width('100%').height('100%');
2116-
2117- if ($.browser.msie || isTouch) {
2118- scrollWidth = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
2119- offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
2120-
2121- width = scrollWidth < offsetWidth ? W.width() : scrollWidth;
2122-
2123- } else {
2124- width = D.width();
2125- }
2126-
2127- this.overlay.width(width).height(D.height());
2128- },
2129-
2130- beforeShow: function (opts) {
2131- if (this.overlay) {
2132- return;
2133- }
2134-
2135- opts = $.extend(true, {}, F.defaults.helpers.overlay, opts);
2136-
2137- this.overlay = $('<div id="fancybox-overlay"></div>').css(opts.css).appendTo('body');
2138-
2139- if (opts.closeClick) {
2140- this.overlay.bind('click.fb', F.close);
2141- }
2142-
2143- if (F.current.fixed && !isTouch) {
2144- this.overlay.addClass('overlay-fixed');
2145-
2146- } else {
2147- this.update();
2148-
2149- this.onUpdate = function () {
2150- this.update();
2151- };
2152- }
2153-
2154- this.overlay.fadeTo(opts.speedIn, opts.opacity);
2155- },
2156-
2157- afterClose: function (opts) {
2158- if (this.overlay) {
2159- this.overlay.fadeOut(opts.speedOut || 0, function () {
2160- $(this).remove();
2161- });
2162- }
2163-
2164- this.overlay = null;
2165- }
2166- };
2167-
2168- /*
2169- * Title helper
2170- */
2171-
2172- F.helpers.title = {
2173- beforeShow: function (opts) {
2174- var title, text = F.current.title;
2175-
2176- if (text) {
2177- title = $('<div class="fancybox-title fancybox-title-' + opts.type + '-wrap">' + text + '</div>').appendTo('body');
2178-
2179- if (opts.type === 'float') {
2180- //This helps for some browsers
2181- title.width(title.width());
2182-
2183- title.wrapInner('<span class="child"></span>');
2184-
2185- //Increase bottom margin so this title will also fit into viewport
2186- F.current.margin[2] += Math.abs(parseInt(title.css('margin-bottom'), 10));
2187- }
2188-
2189- title.appendTo(opts.type === 'over' ? F.inner : (opts.type === 'outside' ? F.wrap : F.skin));
2190- }
2191- }
2192- };
2193-
2194- // jQuery plugin initialization
2195- $.fn.fancybox = function (options) {
2196- var that = $(this),
2197- selector = this.selector || '',
2198- index,
2199- run = function(e) {
2200- var what = this, idx = index, relType, relVal;
2201-
2202- if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !$(what).is('.fancybox-wrap')) {
2203- e.preventDefault();
2204-
2205- relType = options.groupAttr || 'data-fancybox-group';
2206- relVal = $(what).attr(relType);
2207-
2208- if (!relVal) {
2209- relType = 'rel';
2210- relVal = what[ relType ];
2211- }
2212-
2213- if (relVal && relVal !== '' && relVal !== 'nofollow') {
2214- what = selector.length ? $(selector) : that;
2215- what = what.filter('[' + relType + '="' + relVal + '"]');
2216- idx = what.index(this);
2217- }
2218-
2219- options.index = idx;
2220-
2221- F.open(what, options);
2222- }
2223- };
2224-
2225- options = options || {};
2226- index = options.index || 0;
2227-
2228- if (selector) {
2229- D.undelegate(selector, 'click.fb-start').delegate(selector, 'click.fb-start', run);
2230-
2231- } else {
2232- that.unbind('click.fb-start').bind('click.fb-start', run);
2233- }
2234-
2235- return this;
2236- };
2237-
2238- // Test for fixedPosition needs a body at doc ready
2239- $(document).ready(function() {
2240- F.defaults.fixed = $.support.fixedPosition || (!($.browser.msie && $.browser.version <= 6) && !isTouch);
2241- });
2242-
2243-}(window, document, jQuery));
2244\ No newline at end of file
2245
2246=== removed file 'media/fancybox/jquery.fancybox.pack.js'
2247--- media/fancybox/jquery.fancybox.pack.js 2012-04-24 13:30:24 +0000
2248+++ media/fancybox/jquery.fancybox.pack.js 1970-01-01 00:00:00 +0000
2249@@ -1,35 +0,0 @@
2250-/*! fancyBox v2.0.6 fancyapps.com | fancyapps.com/fancybox/#license */
2251-(function(s,l,d,t){var m=d(s),q=d(l),a=d.fancybox=function(){a.open.apply(this,arguments)},u=!1,k=l.createTouch!==t,o=function(a){return"string"===d.type(a)},n=function(b,c){c&&o(b)&&0<b.indexOf("%")&&(b=a.getViewport()[c]/100*parseInt(b,10));return Math.round(b)+"px"};d.extend(a,{version:"2.0.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,autoSize:!0,autoResize:!k,autoCenter:!k,fitToView:!0,aspectRatio:!1,topRatio:0.5,fixed:!1,scrolling:"auto",
2252-wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},keys:{next:[13,32,34,39,40],prev:[8,33,37,38],close:[27]},tpl:{wrap:'<div class="fancybox-wrap"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe class="fancybox-iframe" name="fancybox-frame{rnd}" frameborder="0" hspace="0"'+
2253-(d.browser.msie?' allowtransparency="true"':"")+"></iframe>",swf:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{href}" /><embed src="{href}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="100%" height="100%" wmode="transparent"></embed></object>',error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
2254-closeBtn:'<div title="Close" class="fancybox-item fancybox-close"></div>',next:'<a title="Next" class="fancybox-nav fancybox-next"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev"><span></span></a>'},openEffect:"fade",openSpeed:300,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:300,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:300,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",
2255-prevSpeed:300,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:{speedIn:0,speedOut:300,opacity:0.8,css:{cursor:"pointer"},closeClick:!0},title:{type:"float"}}},group:{},opts:{},coming:null,current:null,isOpen:!1,isOpened:!1,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(b,c){a.close(!0);b&&!d.isArray(b)&&(b=b instanceof d?d(b).get():[b]);a.isActive=!0;a.opts=d.extend(!0,{},a.defaults,c);d.isPlainObject(c)&&c.keys!==t&&(a.opts.keys=c.keys?
2256-d.extend({},a.defaults.keys,c.keys):!1);a.group=b;a._start(a.opts.index||0)},cancel:function(){a.coming&&!1===a.trigger("onCancel")||(a.coming=null,a.hideLoading(),a.ajaxLoad&&a.ajaxLoad.abort(),a.ajaxLoad=null,a.imgPreload&&(a.imgPreload.onload=a.imgPreload.onabort=a.imgPreload.onerror=null))},close:function(b){a.cancel();a.current&&!1!==a.trigger("beforeClose")&&(a.unbindEvents(),!a.isOpen||b&&!0===b[0]?(d(".fancybox-wrap").stop().trigger("onReset").remove(),a._afterZoomOut()):(a.isOpen=a.isOpened=
2257-!1,d(".fancybox-item, .fancybox-nav").remove(),a.wrap.stop(!0).removeClass("fancybox-opened"),a.inner.css("overflow","hidden"),a.transitions[a.current.closeMethod]()))},play:function(b){var c=function(){clearTimeout(a.player.timer)},e=function(){c();a.current&&a.player.isActive&&(a.player.timer=setTimeout(a.next,a.current.playSpeed))},f=function(){c();d("body").unbind(".player");a.player.isActive=!1;a.trigger("onPlayEnd")};if(a.player.isActive||b&&!1===b[0])f();else if(a.current&&(a.current.loop||
2258-a.current.index<a.group.length-1))a.player.isActive=!0,d("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":f,"beforeLoad.player":c}),e(),a.trigger("onPlayStart")},next:function(){a.current&&a.jumpto(a.current.index+1)},prev:function(){a.current&&a.jumpto(a.current.index-1)},jumpto:function(b){a.current&&(b=parseInt(b,10),1<a.group.length&&a.current.loop&&(b>=a.group.length?b=0:0>b&&(b=a.group.length-1)),a.group[b]!==t&&(a.cancel(),a._start(b)))},reposition:function(b,
2259-c){var e;a.isOpen&&(e=a._getPosition(c),b&&"scroll"===b.type?(delete e.position,a.wrap.stop(!0,!0).animate(e,200)):a.wrap.css(e))},update:function(b){a.isOpen&&(u||setTimeout(function(){var c=a.current,e=!b||b&&"orientationchange"===b.type;if(u&&(u=!1,c)){if(!b||"scroll"!==b.type||e)c.autoSize&&"iframe"!==c.type&&(a.inner.height("auto"),c.height=a.inner.height()),(c.autoResize||e)&&a._setDimension(),c.canGrow&&"iframe"!==c.type&&a.inner.height("auto");(c.autoCenter||e)&&a.reposition(b);a.trigger("onUpdate")}},
2260-200),u=!0)},toggle:function(){a.isOpen&&(a.current.fitToView=!a.current.fitToView,a.update())},hideLoading:function(){q.unbind("keypress.fb");d("#fancybox-loading").remove()},showLoading:function(){a.hideLoading();q.bind("keypress.fb",function(b){27===b.keyCode&&(b.preventDefault(),a.cancel())});d('<div id="fancybox-loading"><div></div></div>').click(a.cancel).appendTo("body")},getViewport:function(){return{x:m.scrollLeft(),y:m.scrollTop(),w:k&&s.innerWidth?s.innerWidth:m.width(),h:k&&s.innerHeight?
2261-s.innerHeight:m.height()}},unbindEvents:function(){a.wrap&&a.wrap.unbind(".fb");q.unbind(".fb");m.unbind(".fb")},bindEvents:function(){var b=a.current,c=b.keys;b&&(m.bind("resize.fb orientationchange.fb"+(b.autoCenter&&!b.fixed?" scroll.fb":""),a.update),c&&q.bind("keydown.fb",function(b){var f;f=b.target||b.srcElement;if(!b.ctrlKey&&!b.altKey&&!b.shiftKey&&!b.metaKey&&(!f||!f.type&&!d(f).is("[contenteditable]")))f=b.keyCode,-1<d.inArray(f,c.close)?(a.close(),b.preventDefault()):-1<d.inArray(f,c.next)?
2262-(a.next(),b.preventDefault()):-1<d.inArray(f,c.prev)&&(a.prev(),b.preventDefault())}),d.fn.mousewheel&&b.mouseWheel&&1<a.group.length&&a.wrap.bind("mousewheel.fb",function(b,c){var d=b.target||null;if(0!==c&&(!d||0===d.clientHeight||d.scrollHeight===d.clientHeight&&d.scrollWidth===d.clientWidth))b.preventDefault(),a[0<c?"prev":"next"]()}))},trigger:function(b,c){var e,f=c||a[-1<d.inArray(b,["onCancel","beforeLoad","afterLoad"])?"coming":"current"];if(f){d.isFunction(f[b])&&(e=f[b].apply(f,Array.prototype.slice.call(arguments,
2263-1)));if(!1===e)return!1;f.helpers&&d.each(f.helpers,function(c,e){if(e&&d.isPlainObject(a.helpers[c])&&d.isFunction(a.helpers[c][b]))a.helpers[c][b](e,f)});d.event.trigger(b+".fb")}},isImage:function(a){return o(a)&&a.match(/\.(jpe?g|gif|png|bmp)((\?|#).*)?$/i)},isSWF:function(a){return o(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(b){var c={},e=a.group[b]||null,f,g,i;if(e&&(e.nodeType||e instanceof d))f=!0,d.metadata&&(c=d(e).metadata());c=d.extend(!0,{},a.opts,{index:b,element:e},d.isPlainObject(e)?
2264-e:c);d.each(["href","title","content","type"],function(b,g){c[g]=a.opts[g]||f&&d(e).attr(g)||c[g]||null});"number"===typeof c.margin&&(c.margin=[c.margin,c.margin,c.margin,c.margin]);c.modal&&d.extend(!0,c,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{css:{cursor:"auto"},closeClick:!1}}});a.coming=c;if(!1===a.trigger("beforeLoad"))a.coming=null;else{g=c.type;b=c.href||e;g||(f&&(g=d(e).data("fancybox-type"),g||(g=(g=e.className.match(/fancybox\.(\w+)/))?
2265-g[1]:null)),!g&&o(b)&&(a.isImage(b)?g="image":a.isSWF(b)?g="swf":b.match(/^#/)&&(g="inline")),g||(g=f?"inline":"html"),c.type=g);if("inline"===g||"html"===g){if(c.content||(c.content="inline"===g?d(o(b)?b.replace(/.*(?=#[^\s]+$)/,""):b):e),!c.content||!c.content.length)g=null}else b||(g=null);"ajax"===g&&o(b)&&(i=b.split(/\s+/,2),b=i.shift(),c.selector=i.shift());c.href=b;c.group=a.group;c.isDom=f;switch(g){case "image":a._loadImage();break;case "ajax":a._loadAjax();break;case "inline":case "iframe":case "swf":case "html":a._afterLoad();
2266-break;default:a._error("type")}}},_error:function(b){a.hideLoading();d.extend(a.coming,{type:"html",autoSize:!0,minWidth:0,minHeight:0,padding:15,hasError:b,content:a.coming.tpl.error});a._afterLoad()},_loadImage:function(){var b=a.imgPreload=new Image;b.onload=function(){this.onload=this.onerror=null;a.coming.width=this.width;a.coming.height=this.height;a._afterLoad()};b.onerror=function(){this.onload=this.onerror=null;a._error("image")};b.src=a.coming.href;(b.complete===t||!b.complete)&&a.showLoading()},
2267-_loadAjax:function(){a.showLoading();a.ajaxLoad=d.ajax(d.extend({},a.coming.ajax,{url:a.coming.href,error:function(b,c){a.coming&&"abort"!==c?a._error("ajax",b):a.hideLoading()},success:function(b,c){"success"===c&&(a.coming.content=b,a._afterLoad())}}))},_preloadImages:function(){var b=a.group,c=a.current,e=b.length,f,g,i,h=Math.min(c.preload,e-1);if(c.preload&&!(2>b.length))for(i=1;i<=h;i+=1)if(f=b[(c.index+i)%e],g=f.href||d(f).attr("href")||f,"image"===f.type||a.isImage(g))(new Image).src=g},_afterLoad:function(){a.hideLoading();
2268-!a.coming||!1===a.trigger("afterLoad",a.current)?a.coming=!1:(a.isOpened?(d(".fancybox-item, .fancybox-nav").remove(),a.wrap.stop(!0).removeClass("fancybox-opened"),a.inner.css("overflow","hidden"),a.transitions[a.current.prevMethod]()):(d(".fancybox-wrap").stop().trigger("onReset").remove(),a.trigger("afterClose")),a.unbindEvents(),a.isOpen=!1,a.current=a.coming,a.wrap=d(a.current.tpl.wrap).addClass("fancybox-"+(k?"mobile":"desktop")+" fancybox-type-"+a.current.type+" fancybox-tmp "+a.current.wrapCSS).appendTo("body"),
2269-a.skin=d(".fancybox-skin",a.wrap).css("padding",n(a.current.padding)),a.outer=d(".fancybox-outer",a.wrap),a.inner=d(".fancybox-inner",a.wrap),a._setContent())},_setContent:function(){var b=a.current,c=b.content,e=b.type,f=b.minWidth,g=b.minHeight,i=b.maxWidth,h=b.maxHeight;switch(e){case "inline":case "ajax":case "html":b.selector?c=d("<div>").html(c).find(b.selector):c instanceof d&&(c.parent().hasClass("fancybox-inner")&&c.parents(".fancybox-wrap").unbind("onReset"),c=c.show().detach(),d(a.wrap).bind("onReset",
2270-function(){c.appendTo("body").hide()}));b.autoSize&&(f=d('<div class="fancybox-wrap '+a.current.wrapCSS+' fancybox-tmp"></div>').appendTo("body").css({minWidth:n(f,"w"),minHeight:n(g,"h"),maxWidth:n(i,"w"),maxHeight:n(h,"h")}).append(c),b.width=f.width(),b.height=f.height(),f.width(a.current.width),f.height()>b.height&&(f.width(b.width+1),b.width=f.width(),b.height=f.height()),c=f.contents().detach(),f.remove());break;case "image":c=b.tpl.image.replace("{href}",b.href);b.aspectRatio=!0;break;case "swf":c=
2271-b.tpl.swf.replace(/\{width\}/g,b.width).replace(/\{height\}/g,b.height).replace(/\{href\}/g,b.href);break;case "iframe":c=d(b.tpl.iframe.replace("{rnd}",(new Date).getTime())).attr("scrolling",b.scrolling).attr("src",b.href),b.scrolling=k?"scroll":"auto"}if("image"===e||"swf"===e)b.autoSize=!1,b.scrolling="visible";"iframe"===e&&b.autoSize?(a.showLoading(),a._setDimension(),a.inner.css("overflow",b.scrolling),c.bind({onCancel:function(){d(this).unbind();a._afterZoomOut()},load:function(){a.hideLoading();
2272-try{this.contentWindow.document.location&&(a.current.height=d(this).contents().find("body").height())}catch(b){a.current.autoSize=!1}a[a.isOpen?"_afterZoomIn":"_beforeShow"]()}}).appendTo(a.inner)):(a.inner.append(c),a._beforeShow())},_beforeShow:function(){a.coming=null;a.trigger("beforeShow");a._setDimension();a.wrap.hide().removeClass("fancybox-tmp");a.bindEvents();a._preloadImages();a.transitions[a.isOpened?a.current.nextMethod:a.current.openMethod]()},_setDimension:function(){var b=a.wrap,c=
2273-a.inner,e=a.current,f=a.getViewport(),g=e.margin,i=2*e.padding,h=e.width,j=e.height,r=e.maxWidth+i,k=e.maxHeight+i,l=e.minWidth+i,m=e.minHeight+i,p;f.w-=g[1]+g[3];f.h-=g[0]+g[2];o(h)&&0<h.indexOf("%")&&(h=(f.w-i)*parseFloat(h)/100);o(j)&&0<j.indexOf("%")&&(j=(f.h-i)*parseFloat(j)/100);g=h/j;h+=i;j+=i;e.fitToView&&(r=Math.min(f.w,r),k=Math.min(f.h,k));if(e.aspectRatio){if(h>r&&(h=r,j=(h-i)/g+i),j>k&&(j=k,h=(j-i)*g+i),h<l&&(h=l,j=(h-i)/g+i),j<m)j=m,h=(j-i)*g+i}else h=Math.max(l,Math.min(h,r)),j=Math.max(m,
2274-Math.min(j,k));h=Math.round(h);j=Math.round(j);d(b.add(c)).width("auto").height("auto");c.width(h-i).height(j-i);b.width(h);p=b.height();if(h>r||p>k)for(;(h>r||p>k)&&h>l&&p>m;)j-=10,e.aspectRatio?(h=Math.round((j-i)*g+i),h<l&&(h=l,j=(h-i)/g+i)):h-=10,c.width(h-i).height(j-i),b.width(h),p=b.height();e.dim={width:n(h),height:n(p)};e.canGrow=e.autoSize&&j>m&&j<k;e.canShrink=!1;e.canExpand=!1;if(h-i<e.width||j-i<e.height)e.canExpand=!0;else if((h>f.w||p>f.h)&&h>l&&j>m)e.canShrink=!0;a.innerSpace=p-i-
2275-c.height()},_getPosition:function(b){var c=a.current,e=a.getViewport(),f=c.margin,d=a.wrap.width()+f[1]+f[3],i=a.wrap.height()+f[0]+f[2],h={position:"absolute",top:f[0]+e.y,left:f[3]+e.x};c.autoCenter&&c.fixed&&!b&&i<=e.h&&d<=e.w&&(h={position:"fixed",top:f[0],left:f[3]});h.top=n(Math.max(h.top,h.top+(e.h-i)*c.topRatio));h.left=n(Math.max(h.left,h.left+0.5*(e.w-d)));return h},_afterZoomIn:function(){var b=a.current,c=b?b.scrolling:"no";if(b&&(a.isOpen=a.isOpened=!0,a.wrap.addClass("fancybox-opened"),
2276-a.inner.css("overflow","yes"===c?"scroll":"no"===c?"hidden":c),a.trigger("afterShow"),a.update(),(b.closeClick||b.nextClick)&&a.inner.css("cursor","pointer").bind("click.fb",function(c){if(!d(c.target).is("a")&&!d(c.target).parent().is("a"))a[b.closeClick?"close":"next"]()}),b.closeBtn&&d(b.tpl.closeBtn).appendTo(a.skin).bind("click.fb",a.close),b.arrows&&1<a.group.length&&((b.loop||0<b.index)&&d(b.tpl.prev).appendTo(a.outer).bind("click.fb",a.prev),(b.loop||b.index<a.group.length-1)&&d(b.tpl.next).appendTo(a.outer).bind("click.fb",
2277-a.next)),a.opts.autoPlay&&!a.player.isActive))a.opts.autoPlay=!1,a.play()},_afterZoomOut:function(){var b=a.current;a.wrap.trigger("onReset").remove();d.extend(a,{group:{},opts:{},current:null,isActive:!1,isOpened:!1,isOpen:!1,wrap:null,skin:null,outer:null,inner:null});a.trigger("afterClose",b)}});a.transitions={getOrigPosition:function(){var b=a.current,c=b.element,e=b.padding,f=d(b.orig),g={},i=50,h=50;!f.length&&b.isDom&&d(c).is(":visible")&&(f=d(c).find("img:first"),f.length||(f=d(c)));f.length?
2278-(g=f.offset(),f.is("img")&&(i=f.outerWidth(),h=f.outerHeight())):(b=a.getViewport(),g.top=b.y+0.5*(b.h-h),g.left=b.x+0.5*(b.w-i));return g={top:n(g.top-e),left:n(g.left-e),width:n(i+2*e),height:n(h+2*e)}},step:function(b,c){var e=c.prop,d,g;if("width"===e||"height"===e)d=Math.ceil(b-2*a.current.padding),"height"===e&&(g=(b-c.start)/(c.end-c.start),c.start>c.end&&(g=1-g),d-=a.innerSpace*g),a.inner[e](d)},zoomIn:function(){var b=a.wrap,c=a.current,e=c.openEffect,f="elastic"===e,g=d.extend({},c.dim,
2279-a._getPosition(f)),i=d.extend({opacity:1},g);delete i.position;f?(g=this.getOrigPosition(),c.openOpacity&&(g.opacity=0),a.outer.add(a.inner).width("auto").height("auto")):"fade"===e&&(g.opacity=0);b.css(g).show().animate(i,{duration:"none"===e?0:c.openSpeed,easing:c.openEasing,step:f?this.step:null,complete:a._afterZoomIn})},zoomOut:function(){var b=a.wrap,c=a.current,d=c.openEffect,f="elastic"===d,g={opacity:0};f&&("fixed"===b.css("position")&&b.css(a._getPosition(!0)),g=this.getOrigPosition(),c.closeOpacity&&
2280-(g.opacity=0));b.animate(g,{duration:"none"===d?0:c.closeSpeed,easing:c.closeEasing,step:f?this.step:null,complete:a._afterZoomOut})},changeIn:function(){var b=a.wrap,c=a.current,d=c.nextEffect,f="elastic"===d,g=a._getPosition(f),i={opacity:1};g.opacity=0;f&&(g.top=n(parseInt(g.top,10)-200),i.top="+=200px");b.css(g).show().animate(i,{duration:"none"===d?0:c.nextSpeed,easing:c.nextEasing,complete:a._afterZoomIn})},changeOut:function(){var b=a.wrap,c=a.current,e=c.prevEffect,f={opacity:0};b.removeClass("fancybox-opened");
2281-"elastic"===e&&(f.top="+=200px");b.animate(f,{duration:"none"===e?0:c.prevSpeed,easing:c.prevEasing,complete:function(){d(this).trigger("onReset").remove()}})}};a.helpers.overlay={overlay:null,update:function(){var a,c;this.overlay.width("100%").height("100%");d.browser.msie||k?(a=Math.max(l.documentElement.scrollWidth,l.body.scrollWidth),c=Math.max(l.documentElement.offsetWidth,l.body.offsetWidth),a=a<c?m.width():a):a=q.width();this.overlay.width(a).height(q.height())},beforeShow:function(b){this.overlay||
2282-(b=d.extend(!0,{},a.defaults.helpers.overlay,b),this.overlay=d('<div id="fancybox-overlay"></div>').css(b.css).appendTo("body"),b.closeClick&&this.overlay.bind("click.fb",a.close),a.current.fixed&&!k?this.overlay.addClass("overlay-fixed"):(this.update(),this.onUpdate=function(){this.update()}),this.overlay.fadeTo(b.speedIn,b.opacity))},afterClose:function(a){this.overlay&&this.overlay.fadeOut(a.speedOut||0,function(){d(this).remove()});this.overlay=null}};a.helpers.title={beforeShow:function(b){var c;
2283-if(c=a.current.title)c=d('<div class="fancybox-title fancybox-title-'+b.type+'-wrap">'+c+"</div>").appendTo("body"),"float"===b.type&&(c.width(c.width()),c.wrapInner('<span class="child"></span>'),a.current.margin[2]+=Math.abs(parseInt(c.css("margin-bottom"),10))),c.appendTo("over"===b.type?a.inner:"outside"===b.type?a.wrap:a.skin)}};d.fn.fancybox=function(b){var c=d(this),e=this.selector||"",f,g=function(g){var h=this,j=f,k;!g.ctrlKey&&!g.altKey&&!g.shiftKey&&!g.metaKey&&!d(h).is(".fancybox-wrap")&&
2284-(g.preventDefault(),g=b.groupAttr||"data-fancybox-group",k=d(h).attr(g),k||(g="rel",k=h[g]),k&&""!==k&&"nofollow"!==k&&(h=e.length?d(e):c,h=h.filter("["+g+'="'+k+'"]'),j=h.index(this)),b.index=j,a.open(h,b))},b=b||{};f=b.index||0;e?q.undelegate(e,"click.fb-start").delegate(e,"click.fb-start",g):c.unbind("click.fb-start").bind("click.fb-start",g);return this};d(l).ready(function(){a.defaults.fixed=d.support.fixedPosition||!(d.browser.msie&&6>=d.browser.version)&&!k})})(window,document,jQuery);
2285\ No newline at end of file
2286
2287=== modified file 'media/js/disableOnSubmit.js'
2288--- media/js/disableOnSubmit.js 2011-07-06 23:31:10 +0000
2289+++ media/js/disableOnSubmit.js 2017-09-26 21:12:14 +0000
2290@@ -6,11 +6,11 @@
2291 */
2292 $.fn.disableOnSubmit = function(disableList){
2293
2294- if(disableList == null){var $list = 'input[type=submit],input[type=button],input[type=reset],button';}
2295+ if(disableList === null){var $list = 'input[type=submit],input[type=button],input[type=reset],button';}
2296 else{var $list = disableList;}
2297
2298 // Makes sure button is enabled at start
2299- $(this).find($list).removeAttr('disabled');
2300+ $(this).find($list).prop("disabled", true);
2301
2302 $(this).submit(function(){$(this).find($list).attr('disabled','disabled');});
2303 return this;
2304
2305=== modified file 'media/js/encyclopedia.js'
2306--- media/js/encyclopedia.js 2017-03-15 20:59:33 +0000
2307+++ media/js/encyclopedia.js 2017-09-26 21:12:14 +0000
2308@@ -1,6 +1,5 @@
2309 $(document).ready(function() {
2310- var elem = document.getElementById('apply_filter');
2311- elem.addEventListener('click', set_display);
2312+ $('#apply_filter').on('click', set_display);
2313 // Find names of checkboxes:
2314 checkb_names = get_input_names();
2315 // Initialize after reload, e.g. pressing F5:
2316@@ -8,7 +7,7 @@
2317
2318 // Smooth scrolling, taken from:
2319 // http://stackoverflow.com/a/18795112
2320- $('a[href*=#]').click(function(event){
2321+ $("a[href*='#']").click(function(event){
2322 $('html, body').animate({
2323 scrollTop: $( $.attr(this, 'href') ).offset().top
2324 }, 500);
2325
2326=== removed directory 'media/js/highcharts_219'
2327=== removed directory 'media/js/highcharts_219/adapters'
2328=== removed file 'media/js/highcharts_219/adapters/mootools-adapter.js'
2329--- media/js/highcharts_219/adapters/mootools-adapter.js 2011-11-18 22:51:37 +0000
2330+++ media/js/highcharts_219/adapters/mootools-adapter.js 1970-01-01 00:00:00 +0000
2331@@ -1,12 +0,0 @@
2332-/*
2333- Highcharts JS v2.1.9 (2011-11-11)
2334- MooTools adapter
2335-
2336- (c) 2010-2011 Torstein H?nsi
2337-
2338- License: www.highcharts.com/license
2339-*/
2340-(function(){var e=window,h=e.MooTools.version.substring(0,3),i=h==="1.2"||h==="1.1",m=i||h==="1.3",j=e.$extend||function(){return Object.append.apply(Object,arguments)};e.HighchartsAdapter={init:function(a){var b=Fx.prototype,c=b.start,d=Fx.Morph.prototype,g=d.compute;b.start=function(f){var k=this.element;if(f.d)this.paths=a.init(k,k.d,this.toD);c.apply(this,arguments);return this};d.compute=function(f,k,n){var l=this.paths;if(l)this.element.attr("d",a.step(l[0],l[1],n,this.toD));else return g.apply(this,
2341-arguments)}},animate:function(a,b,c){var d=a.attr,g=c&&c.complete;if(d&&!a.setStyle){a.getStyle=a.attr;a.setStyle=function(){var f=arguments;a.attr.call(a,f[0],f[1][0])};a.$family=a.uid=true}e.HighchartsAdapter.stop(a);c=new Fx.Morph(d?a:$(a),j({transition:Fx.Transitions.Quad.easeInOut},c));if(b.d)c.toD=b.d;g&&c.addEvent("complete",g);c.start(b);a.fx=c},each:function(a,b){return i?$each(a,b):a.each(b)},map:function(a,b){return a.map(b)},grep:function(a,b){return a.filter(b)},merge:function(){var a=
2342-arguments,b=[{}],c=a.length;if(i)a=$merge.apply(null,a);else{for(;c--;)if(typeof a[c]!=="boolean")b[c+1]=a[c];a=Object.merge.apply(Object,b)}return a},extendWithEvents:function(a){a.addEvent||(a.nodeName?$(a):j(a,new Events))},addEvent:function(a,b,c){if(typeof b==="string"){if(b==="unload")b="beforeunload";e.HighchartsAdapter.extendWithEvents(a);a.addEvent(b,c)}},removeEvent:function(a,b,c){if(typeof a!=="string"){e.HighchartsAdapter.extendWithEvents(a);if(b){if(b==="unload")b="beforeunload";c?a.removeEvent(b,
2343-c):a.removeEvents(b)}else a.removeEvents()}},fireEvent:function(a,b,c,d){b={type:b,target:a};b=m?new Event(b):new DOMEvent(b);b=j(b,c);b.preventDefault=function(){d=null};a.fireEvent&&a.fireEvent(b.type,b);d&&d(b)},stop:function(a){a.fx&&a.fx.cancel()}}})();
2344
2345=== removed file 'media/js/highcharts_219/adapters/mootools-adapter.src.js'
2346--- media/js/highcharts_219/adapters/mootools-adapter.src.js 2011-11-18 22:51:37 +0000
2347+++ media/js/highcharts_219/adapters/mootools-adapter.src.js 1970-01-01 00:00:00 +0000
2348@@ -1,264 +0,0 @@
2349-/**
2350- * @license Highcharts JS v2.1.9 (2011-11-11)
2351- * MooTools adapter
2352- *
2353- * (c) 2010-2011 Torstein Hønsi
2354- *
2355- * License: www.highcharts.com/license
2356- */
2357-
2358-// JSLint options:
2359-/*global Fx, $, $extend, $each, $merge, Events, Event, DOMEvent */
2360-
2361-(function () {
2362-
2363-var win = window,
2364- mooVersion = win.MooTools.version.substring(0, 3), // Get the first three characters of the version number
2365- legacy = mooVersion === '1.2' || mooVersion === '1.1', // 1.1 && 1.2 considered legacy, 1.3 is not.
2366- legacyEvent = legacy || mooVersion === '1.3', // In versions 1.1 - 1.3 the event class is named Event, in newer versions it is named DOMEvent.
2367- $extend = win.$extend || function () {
2368- return Object.append.apply(Object, arguments);
2369- };
2370-
2371-win.HighchartsAdapter = {
2372- /**
2373- * Initialize the adapter. This is run once as Highcharts is first run.
2374- * @param {Object} pathAnim The helper object to do animations across adapters.
2375- */
2376- init: function (pathAnim) {
2377- var fxProto = Fx.prototype,
2378- fxStart = fxProto.start,
2379- morphProto = Fx.Morph.prototype,
2380- morphCompute = morphProto.compute;
2381-
2382- // override Fx.start to allow animation of SVG element wrappers
2383- /*jslint unparam: true*//* allow unused parameters in fx functions */
2384- fxProto.start = function (from, to) {
2385- var fx = this,
2386- elem = fx.element;
2387-
2388- // special for animating paths
2389- if (from.d) {
2390- //this.fromD = this.element.d.split(' ');
2391- fx.paths = pathAnim.init(
2392- elem,
2393- elem.d,
2394- fx.toD
2395- );
2396- }
2397- fxStart.apply(fx, arguments);
2398-
2399- return this; // chainable
2400- };
2401-
2402- // override Fx.step to allow animation of SVG element wrappers
2403- morphProto.compute = function (from, to, delta) {
2404- var fx = this,
2405- paths = fx.paths;
2406-
2407- if (paths) {
2408- fx.element.attr(
2409- 'd',
2410- pathAnim.step(paths[0], paths[1], delta, fx.toD)
2411- );
2412- } else {
2413- return morphCompute.apply(fx, arguments);
2414- }
2415- };
2416- /*jslint unparam: false*/
2417- },
2418-
2419- /**
2420- * Animate a HTML element or SVG element wrapper
2421- * @param {Object} el
2422- * @param {Object} params
2423- * @param {Object} options jQuery-like animation options: duration, easing, callback
2424- */
2425- animate: function (el, params, options) {
2426- var isSVGElement = el.attr,
2427- effect,
2428- complete = options && options.complete;
2429-
2430- if (isSVGElement && !el.setStyle) {
2431- // add setStyle and getStyle methods for internal use in Moo
2432- el.getStyle = el.attr;
2433- el.setStyle = function () { // property value is given as array in Moo - break it down
2434- var args = arguments;
2435- el.attr.call(el, args[0], args[1][0]);
2436- };
2437- // dirty hack to trick Moo into handling el as an element wrapper
2438- el.$family = el.uid = true;
2439- }
2440-
2441- // stop running animations
2442- win.HighchartsAdapter.stop(el);
2443-
2444- // define and run the effect
2445- effect = new Fx.Morph(
2446- isSVGElement ? el : $(el),
2447- $extend({
2448- transition: Fx.Transitions.Quad.easeInOut
2449- }, options)
2450- );
2451-
2452- // special treatment for paths
2453- if (params.d) {
2454- effect.toD = params.d;
2455- }
2456-
2457- // jQuery-like events
2458- if (complete) {
2459- effect.addEvent('complete', complete);
2460- }
2461-
2462- // run
2463- effect.start(params);
2464-
2465- // record for use in stop method
2466- el.fx = effect;
2467- },
2468-
2469- /**
2470- * MooTool's each function
2471- *
2472- */
2473- each: function (arr, fn) {
2474- return legacy ?
2475- $each(arr, fn) :
2476- arr.each(fn);
2477- },
2478-
2479- /**
2480- * Map an array
2481- * @param {Array} arr
2482- * @param {Function} fn
2483- */
2484- map: function (arr, fn) {
2485- return arr.map(fn);
2486- },
2487-
2488- /**
2489- * Grep or filter an array
2490- * @param {Array} arr
2491- * @param {Function} fn
2492- */
2493- grep: function (arr, fn) {
2494- return arr.filter(fn);
2495- },
2496-
2497- /**
2498- * Deep merge two objects and return a third
2499- */
2500- merge: function () {
2501- var args = arguments,
2502- args13 = [{}], // MooTools 1.3+
2503- i = args.length,
2504- ret;
2505-
2506- if (legacy) {
2507- ret = $merge.apply(null, args);
2508- } else {
2509- while (i--) {
2510- // Boolean argumens should not be merged.
2511- // JQuery explicitly skips this, so we do it here as well.
2512- if (typeof args[i] !== 'boolean') {
2513- args13[i + 1] = args[i];
2514- }
2515- }
2516- ret = Object.merge.apply(Object, args13);
2517- }
2518-
2519- return ret;
2520- },
2521-
2522- /**
2523- * Extends an object with Events, if its not done
2524- */
2525- extendWithEvents: function (el) {
2526- // if the addEvent method is not defined, el is a custom Highcharts object
2527- // like series or point
2528- if (!el.addEvent) {
2529- if (el.nodeName) {
2530- el = $(el); // a dynamically generated node
2531- } else {
2532- $extend(el, new Events()); // a custom object
2533- }
2534- }
2535- },
2536-
2537- /**
2538- * Add an event listener
2539- * @param {Object} el HTML element or custom object
2540- * @param {String} type Event type
2541- * @param {Function} fn Event handler
2542- */
2543- addEvent: function (el, type, fn) {
2544- if (typeof type === 'string') { // chart broke due to el being string, type function
2545-
2546- if (type === 'unload') { // Moo self destructs before custom unload events
2547- type = 'beforeunload';
2548- }
2549-
2550- win.HighchartsAdapter.extendWithEvents(el);
2551-
2552- el.addEvent(type, fn);
2553- }
2554- },
2555-
2556- removeEvent: function (el, type, fn) {
2557- if (typeof el === 'string') {
2558- // el.removeEvents below apperantly calls this method again. Do not quite understand why, so for now just bail out.
2559- return;
2560- }
2561- win.HighchartsAdapter.extendWithEvents(el);
2562- if (type) {
2563- if (type === 'unload') { // Moo self destructs before custom unload events
2564- type = 'beforeunload';
2565- }
2566-
2567- if (fn) {
2568- el.removeEvent(type, fn);
2569- } else {
2570- el.removeEvents(type);
2571- }
2572- } else {
2573- el.removeEvents();
2574- }
2575- },
2576-
2577- fireEvent: function (el, event, eventArguments, defaultFunction) {
2578- var eventArgs = {
2579- type: event,
2580- target: el
2581- };
2582- // create an event object that keeps all functions
2583- event = legacyEvent ? new Event(eventArgs) : new DOMEvent(eventArgs);
2584- event = $extend(event, eventArguments);
2585- // override the preventDefault function to be able to use
2586- // this for custom events
2587- event.preventDefault = function () {
2588- defaultFunction = null;
2589- };
2590- // if fireEvent is not available on the object, there hasn't been added
2591- // any events to it above
2592- if (el.fireEvent) {
2593- el.fireEvent(event.type, event);
2594- }
2595-
2596- // fire the default if it is passed and it is not prevented above
2597- if (defaultFunction) {
2598- defaultFunction(event);
2599- }
2600- },
2601-
2602- /**
2603- * Stop running animations on the object
2604- */
2605- stop: function (el) {
2606- if (el.fx) {
2607- el.fx.cancel();
2608- }
2609- }
2610-};
2611-
2612-}());
2613
2614=== removed file 'media/js/highcharts_219/adapters/prototype-adapter.js'
2615--- media/js/highcharts_219/adapters/prototype-adapter.js 2011-11-18 22:51:37 +0000
2616+++ media/js/highcharts_219/adapters/prototype-adapter.js 1970-01-01 00:00:00 +0000
2617@@ -1,15 +0,0 @@
2618-/*
2619- Highcharts JS v2.1.9 (2011-11-11)
2620- Prototype adapter
2621-
2622- @author Michael Nelson, Torstein H?nsi.
2623-
2624- Feel free to use and modify this script.
2625- Highcharts license: www.highcharts.com/license.
2626-*/
2627-var HighchartsAdapter=function(){var g=typeof Effect!=="undefined";return{init:function(c){if(g)Effect.HighchartsTransition=Class.create(Effect.Base,{initialize:function(a,b,d,e){var f;this.element=a;this.key=b;f=a.attr(b);if(b==="d"){this.paths=c.init(a,a.d,d);this.toD=d;f=0;d=1}this.start(Object.extend(e||{},{from:f,to:d,attribute:b}))},setup:function(){HighchartsAdapter._extend(this.element);if(!this.element._highchart_animation)this.element._highchart_animation={};this.element._highchart_animation[this.key]=
2628-this},update:function(a){var b=this.paths;if(b)a=c.step(b[0],b[1],a,this.toD);this.element.attr(this.options.attribute,a)},finish:function(){delete this.element._highchart_animation[this.key]}})},addNS:function(c){var a=/^(?:click|mouse(?:down|up|over|move|out))$/;return/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/.test(c)||a.test(c)?c:"h:"+c},addEvent:function(c,a,b){if(c.addEventListener||c.attachEvent)Event.observe($(c),HighchartsAdapter.addNS(a),b);else{HighchartsAdapter._extend(c);
2629-c._highcharts_observe(a,b)}},animate:function(c,a,b){var d;b=b||{};b.delay=0;b.duration=(b.duration||500)/1E3;if(g)for(d in a)new Effect.HighchartsTransition($(c),d,a[d],b);else for(d in a)c.attr(d,a[d]);if(!c.attr)throw"Todo: implement animate DOM objects";},stop:function(c){var a;if(c._highcharts_extended&&c._highchart_animation)for(a in c._highchart_animation)c._highchart_animation[a].cancel()},each:function(c,a){$A(c).each(a)},fireEvent:function(c,a,b,d){if(c.fire)c.fire(HighchartsAdapter.addNS(a),
2630-b);else if(c._highcharts_extended){b=b||{};c._highcharts_fire(a,b)}if(b&&b.defaultPrevented)d=null;d&&d(b)},removeEvent:function(c,a,b){if($(c).stopObserving){if(a)a=HighchartsAdapter.addNS(a);$(c).stopObserving(a,b)}if(window===c)Event.stopObserving(c,a,b);else{HighchartsAdapter._extend(c);c._highcharts_stop_observing(a,b)}},grep:function(c,a){return c.findAll(a)},map:function(c,a){return c.map(a)},merge:function(){function c(a,b){var d,e;for(e in b){d=b[e];a[e]=d&&typeof d==="object"&&d.constructor!==
2631-Array&&typeof d.nodeType!=="number"?c(a[e]||{},d):b[e]}return a}return function(){var a=arguments,b,d={};for(b=0;b<a.length;b++)d=c(d,a[b]);return d}.apply(this,arguments)},_extend:function(c){c._highcharts_extended||Object.extend(c,{_highchart_events:{},_highchart_animation:null,_highcharts_extended:true,_highcharts_observe:function(a,b){this._highchart_events[a]=[this._highchart_events[a],b].compact().flatten()},_highcharts_stop_observing:function(a,b){if(a)if(b)this._highchart_events[a]=[this._highchart_events[a]].compact().flatten().without(b);
2632-else delete this._highchart_events[a];else this._highchart_events={}},_highcharts_fire:function(a,b){(this._highchart_events[a]||[]).each(function(d){if(!b.stopped){b.preventDefault=function(){b.defaultPrevented=true};d.bind(this)(b)===false&&b.preventDefault()}}.bind(this))}})}}}();
2633
2634=== removed file 'media/js/highcharts_219/adapters/prototype-adapter.src.js'
2635--- media/js/highcharts_219/adapters/prototype-adapter.src.js 2011-11-18 22:51:37 +0000
2636+++ media/js/highcharts_219/adapters/prototype-adapter.src.js 1970-01-01 00:00:00 +0000
2637@@ -1,331 +0,0 @@
2638-/**
2639- * @license Highcharts JS v2.1.9 (2011-11-11)
2640- * Prototype adapter
2641- *
2642- * @author Michael Nelson, Torstein Hønsi.
2643- *
2644- * Feel free to use and modify this script.
2645- * Highcharts license: www.highcharts.com/license.
2646- */
2647-
2648-/*
2649- * Known issues:
2650- * - Some grid lines land in wrong position - http://jsfiddle.net/highcharts/jaRhY/28
2651- */
2652-
2653-// JSLint options:
2654-/*global Effect, Class, Event, $, $A */
2655-
2656-// Adapter interface between prototype and the Highcharts charting library
2657-var HighchartsAdapter = (function () {
2658-
2659-var hasEffect = typeof Effect !== 'undefined';
2660-
2661-return {
2662-
2663- /**
2664- * Initialize the adapter. This is run once as Highcharts is first run.
2665- * @param {Object} pathAnim The helper object to do animations across adapters.
2666- */
2667- init: function (pathAnim) {
2668- if (hasEffect) {
2669- /**
2670- * Animation for Highcharts SVG element wrappers only
2671- * @param {Object} element
2672- * @param {Object} attribute
2673- * @param {Object} to
2674- * @param {Object} options
2675- */
2676- Effect.HighchartsTransition = Class.create(Effect.Base, {
2677- initialize: function (element, attr, to, options) {
2678- var from,
2679- opts;
2680-
2681- this.element = element;
2682- this.key = attr;
2683- from = element.attr(attr);
2684-
2685- // special treatment for paths
2686- if (attr === 'd') {
2687- this.paths = pathAnim.init(
2688- element,
2689- element.d,
2690- to
2691- );
2692- this.toD = to;
2693-
2694-
2695- // fake values in order to read relative position as a float in update
2696- from = 0;
2697- to = 1;
2698- }
2699-
2700- opts = Object.extend((options || {}), {
2701- from: from,
2702- to: to,
2703- attribute: attr
2704- });
2705- this.start(opts);
2706- },
2707- setup: function () {
2708- HighchartsAdapter._extend(this.element);
2709- // If this is the first animation on this object, create the _highcharts_animation helper that
2710- // contain pointers to the animation objects.
2711- if (!this.element._highchart_animation) {
2712- this.element._highchart_animation = {};
2713- }
2714-
2715- // Store a reference to this animation instance.
2716- this.element._highchart_animation[this.key] = this;
2717- },
2718- update: function (position) {
2719- var paths = this.paths;
2720-
2721- if (paths) {
2722- position = pathAnim.step(paths[0], paths[1], position, this.toD);
2723- }
2724-
2725- this.element.attr(this.options.attribute, position);
2726- },
2727- finish: function () {
2728- // Delete the property that holds this animation now that it is finished.
2729- // Both canceled animations and complete ones gets a 'finish' call.
2730- delete this.element._highchart_animation[this.key];
2731- }
2732- });
2733- }
2734- },
2735-
2736- /**
2737- * Custom events in prototype needs to be namespaced. This method adds a namespace 'h:' in front of
2738- * events that are not recognized as native.
2739- */
2740- addNS: function (eventName) {
2741- var HTMLEvents = /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
2742- MouseEvents = /^(?:click|mouse(?:down|up|over|move|out))$/;
2743- return (HTMLEvents.test(eventName) || MouseEvents.test(eventName)) ?
2744- eventName :
2745- 'h:' + eventName;
2746- },
2747-
2748- // el needs an event to be attached. el is not necessarily a dom element
2749- addEvent: function (el, event, fn) {
2750- if (el.addEventListener || el.attachEvent) {
2751- Event.observe($(el), HighchartsAdapter.addNS(event), fn);
2752-
2753- } else {
2754- HighchartsAdapter._extend(el);
2755- el._highcharts_observe(event, fn);
2756- }
2757- },
2758-
2759- // motion makes things pretty. use it if effects is loaded, if not... still get to the end result.
2760- animate: function (el, params, options) {
2761- var key,
2762- fx;
2763-
2764- // default options
2765- options = options || {};
2766- options.delay = 0;
2767- options.duration = (options.duration || 500) / 1000;
2768-
2769- // animate wrappers and DOM elements
2770- if (hasEffect) {
2771- for (key in params) {
2772- // The fx variable is seemingly thrown away here, but the Effect.setup will add itself to the _highcharts_animation object
2773- // on the element itself so its not really lost.
2774- fx = new Effect.HighchartsTransition($(el), key, params[key], options);
2775- }
2776- } else {
2777- for (key in params) {
2778- el.attr(key, params[key]);
2779- }
2780- }
2781-
2782- if (!el.attr) {
2783- throw 'Todo: implement animate DOM objects';
2784- }
2785- },
2786-
2787- // this only occurs in higcharts 2.0+
2788- stop: function (el) {
2789- var key;
2790- if (el._highcharts_extended && el._highchart_animation) {
2791- for (key in el._highchart_animation) {
2792- // Cancel the animation
2793- // The 'finish' function in the Effect object will remove the reference
2794- el._highchart_animation[key].cancel();
2795- }
2796- }
2797- },
2798-
2799- // um.. each
2800- each: function (arr, fn) {
2801- $A(arr).each(fn);
2802- },
2803-
2804- // fire an event based on an event name (event) and an object (el).
2805- // again, el may not be a dom element
2806- fireEvent: function (el, event, eventArguments, defaultFunction) {
2807- if (el.fire) {
2808- el.fire(HighchartsAdapter.addNS(event), eventArguments);
2809- } else if (el._highcharts_extended) {
2810- eventArguments = eventArguments || {};
2811- el._highcharts_fire(event, eventArguments);
2812- }
2813-
2814- if (eventArguments && eventArguments.defaultPrevented) {
2815- defaultFunction = null;
2816- }
2817-
2818- if (defaultFunction) {
2819- defaultFunction(eventArguments);
2820- }
2821- },
2822-
2823- removeEvent: function (el, event, handler) {
2824- if ($(el).stopObserving) {
2825- if (event) {
2826- event = HighchartsAdapter.addNS(event);
2827- }
2828- $(el).stopObserving(event, handler);
2829- } if (window === el) {
2830- Event.stopObserving(el, event, handler);
2831- } else {
2832- HighchartsAdapter._extend(el);
2833- el._highcharts_stop_observing(event, handler);
2834- }
2835- },
2836-
2837- // um, grep
2838- grep: function (arr, fn) {
2839- return arr.findAll(fn);
2840- },
2841-
2842- // um, map
2843- map: function (arr, fn) {
2844- return arr.map(fn);
2845- },
2846-
2847- // deep merge. merge({a : 'a', b : {b1 : 'b1', b2 : 'b2'}}, {b : {b2 : 'b2_prime'}, c : 'c'}) => {a : 'a', b : {b1 : 'b1', b2 : 'b2_prime'}, c : 'c'}
2848- /*merge: function(){
2849- function doCopy(copy, original) {
2850- var value,
2851- key,
2852- undef,
2853- nil,
2854- same,
2855- obj,
2856- arr,
2857- node;
2858-
2859- for (key in original) {
2860- value = original[key];
2861- undef = typeof(value) === 'undefined';
2862- nil = value === null;
2863- same = original === copy[key];
2864-
2865- if (undef || nil || same) {
2866- continue;
2867- }
2868-
2869- obj = typeof(value) === 'object';
2870- arr = value && obj && value.constructor == Array;
2871- node = !!value.nodeType;
2872-
2873- if (obj && !arr && !node) {
2874- copy[key] = doCopy(typeof copy[key] == 'object' ? copy[key] : {}, value);
2875- }
2876- else {
2877- copy[key] = original[key];
2878- }
2879- }
2880- return copy;
2881- }
2882-
2883- var args = arguments, retVal = {};
2884-
2885- for (var i = 0; i < args.length; i++) {
2886- retVal = doCopy(retVal, args[i]);
2887- }
2888-
2889- return retVal;
2890- },*/
2891- merge: function () { // the built-in prototype merge function doesn't do deep copy
2892- function doCopy(copy, original) {
2893- var value, key;
2894-
2895- for (key in original) {
2896- value = original[key];
2897- if (value && typeof value === 'object' && value.constructor !== Array &&
2898- typeof value.nodeType !== 'number') {
2899- copy[key] = doCopy(copy[key] || {}, value); // copy
2900-
2901- } else {
2902- copy[key] = original[key];
2903- }
2904- }
2905- return copy;
2906- }
2907-
2908- function merge() {
2909- var args = arguments,
2910- i,
2911- retVal = {};
2912-
2913- for (i = 0; i < args.length; i++) {
2914- retVal = doCopy(retVal, args[i]);
2915-
2916- }
2917- return retVal;
2918- }
2919-
2920- return merge.apply(this, arguments);
2921- },
2922-
2923- // extend an object to handle highchart events (highchart objects, not svg elements).
2924- // this is a very simple way of handling events but whatever, it works (i think)
2925- _extend: function (object) {
2926- if (!object._highcharts_extended) {
2927- Object.extend(object, {
2928- _highchart_events: {},
2929- _highchart_animation: null,
2930- _highcharts_extended: true,
2931- _highcharts_observe: function (name, fn) {
2932- this._highchart_events[name] = [this._highchart_events[name], fn].compact().flatten();
2933- },
2934- _highcharts_stop_observing: function (name, fn) {
2935- if (name) {
2936- if (fn) {
2937- this._highchart_events[name] = [this._highchart_events[name]].compact().flatten().without(fn);
2938- } else {
2939- delete this._highchart_events[name];
2940- }
2941- } else {
2942- this._highchart_events = {};
2943- }
2944- },
2945- _highcharts_fire: function (name, args) {
2946- (this._highchart_events[name] || []).each(function (fn) {
2947- // args is never null here
2948- if (args.stopped) {
2949- return; // "throw $break" wasn't working. i think because of the scope of 'this'.
2950- }
2951-
2952- // Attach a simple preventDefault function to skip default handler if called
2953- args.preventDefault = function () {
2954- args.defaultPrevented = true;
2955- };
2956-
2957- // If the event handler return false, prevent the default handler from executing
2958- if (fn.bind(this)(args) === false) {
2959- args.preventDefault();
2960- }
2961- }
2962-.bind(this));
2963- }
2964- });
2965- }
2966- }
2967-};
2968-}());
2969
2970=== removed file 'media/js/highcharts_219/highcharts.js'
2971--- media/js/highcharts_219/highcharts.js 2011-11-18 22:51:37 +0000
2972+++ media/js/highcharts_219/highcharts.js 1970-01-01 00:00:00 +0000
2973@@ -1,176 +0,0 @@
2974-/*
2975- Highcharts JS v2.1.9 (2011-11-11)
2976-
2977- (c) 2009-2011 Torstein H?nsi
2978-
2979- License: www.highcharts.com/license
2980-*/
2981-(function(){function sa(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function ja(a,b){return parseInt(a,b||10)}function Sb(a){return typeof a==="string"}function Nb(a){return typeof a==="object"}function lc(a){return typeof a==="number"}function mc(a){return Fa.log(a)/Fa.LN10}function nc(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function K(a){return a!==Wa&&a!==null}function Ga(a,b,c){var d,e;if(Sb(b))if(K(c))a.setAttribute(b,c);else{if(a&&a.getAttribute)e=a.getAttribute(b)}else if(K(b)&&
2982-Nb(b))for(d in b)a.setAttribute(d,b[d]);return e}function zc(a){return Object.prototype.toString.call(a)==="[object Array]"?a:[a]}function A(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++){c=a[b];if(typeof c!=="undefined"&&c!==null)return c}}function Ja(a,b){if(Pc)if(b&&b.opacity!==Wa)b.filter="alpha(opacity="+b.opacity*100+")";sa(a.style,b)}function hb(a,b,c,d,e){a=ua.createElement(a);b&&sa(a,b);e&&Ja(a,{padding:0,border:jb,margin:0});c&&Ja(a,c);d&&d.appendChild(a);return a}function yb(a,b){var c=
2983-function(){};c.prototype=new a;sa(c.prototype,b);return c}function Ed(a,b,c,d){var e=Xa.lang;a=a;var f=isNaN(b=bb(b))?2:b;b=c===undefined?e.decimalPoint:c;d=d===undefined?e.thousandsSep:d;e=a<0?"-":"";c=String(ja(a=bb(+a||0).toFixed(f)));var g=c.length>3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+bb(a-c).toFixed(f).slice(2):"")}function Fd(a){var b={left:a.offsetLeft,top:a.offsetTop};for(a=a.offsetParent;a;){b.left+=a.offsetLeft;b.top+=a.offsetTop;
2984-if(a!==ua.body&&a!==ua.documentElement){b.left-=a.scrollLeft;b.top-=a.scrollTop}a=a.offsetParent}return b}function Gd(){this.symbol=this.color=0}function fe(a,b,c,d,e,f,g){var h=g.x;g=g.y;var i=h-a+c-25,j=g-b+d+10,m;if(i<7)i=c+h+15;if(i+a>c+e){i-=i+a-(c+e);j-=b;m=true}if(j<5){j=5;if(m&&g>=j&&g<=j+b)j=g+b-5}else if(j+b>d+f)j=d+f-b-5;return{x:i,y:j}}function Hd(a,b){var c=a.length,d;for(d=0;d<c;d++)a[d].ss_i=d;a.sort(function(e,f){var g=b(e,f);return g===0?e.ss_i-f.ss_i:g});for(d=0;d<c;d++)delete a[d].ss_i}
2985-function Ac(a){for(var b in a){a[b]&&a[b].destroy&&a[b].destroy();delete a[b]}}function oc(a,b){Bc=A(a,b.animation)}function Id(){var a=Xa.global.useUTC;Qc=a?Date.UTC:function(b,c,d,e,f,g){return(new Date(b,c,A(d,1),A(e,0),A(f,0),A(g,0))).getTime()};id=a?"getUTCMinutes":"getMinutes";jd=a?"getUTCHours":"getHours";kd=a?"getUTCDay":"getDay";Cc=a?"getUTCDate":"getDate";Rc=a?"getUTCMonth":"getMonth";Sc=a?"getUTCFullYear":"getFullYear";Jd=a?"setUTCMinutes":"setMinutes";Kd=a?"setUTCHours":"setHours";ld=
2986-a?"setUTCDate":"setDate";Ld=a?"setUTCMonth":"setMonth";Md=a?"setUTCFullYear":"setFullYear"}function pc(a){Tc||(Tc=hb(Tb));a&&Tc.appendChild(a);Tc.innerHTML=""}function Uc(){}function Nd(a,b){function c(p){function q(k,n){this.pos=k;this.minor=n;this.isNew=true;n||this.addLabel()}function w(k){if(k){this.options=k;this.id=k.id}return this}function x(k,n,t,r){this.isNegative=n;this.options=k;this.x=t;this.stack=r;this.alignOptions={align:k.align||(va?n?"left":"right":"center"),verticalAlign:k.verticalAlign||
2987-(va?"middle":n?"bottom":"top"),y:A(k.y,va?4:n?14:-6),x:A(k.x,va?n?-6:6:0)};this.textAlign=k.textAlign||(va?n?"right":"left":"center")}function V(){var k=[],n=[],t;pa=wa=null;zb=[];u(Ha,function(r){t=false;u(["xAxis","yAxis"],function(F){if(r.isCartesian&&(F==="xAxis"&&xa||F==="yAxis"&&!xa)&&(r.options[F]===o.index||r.options[F]===Wa&&o.index===0)){r[F]=I;zb.push(r);t=true}});if(!r.visible&&z.ignoreHiddenSeries)t=false;if(t){var J,E,Q,fa,ka,$;if(!xa){J=r.options.stacking;Vc=J==="percent";if(J){ka=
2988-r.options.stack;fa=r.type+A(ka,"");$="-"+fa;r.stackKey=fa;E=k[fa]||[];k[fa]=E;Q=n[$]||[];n[$]=Q}if(Vc){pa=0;wa=99}}if(r.isCartesian){u(r.data,function(F){var O=F.x,S=F.y,aa=S<0,Eb=aa?Q:E,kb=aa?$:fa;if(pa===null)pa=wa=F[qa];if(xa)if(O>wa)wa=O;else{if(O<pa)pa=O}else if(K(S)){if(J)Eb[O]=K(Eb[O])?Eb[O]+S:S;S=Eb?Eb[O]:S;F=A(F.low,S);if(!Vc)if(S>wa)wa=S;else if(F<pa)pa=F;if(J){s[kb]||(s[kb]={});s[kb][O]||(s[kb][O]=new x(o.stackLabels,aa,O,ka));s[kb][O].setTotal(S)}}});if(/(area|column|bar)/.test(r.type)&&
2989-!xa)if(pa>=0){pa=0;Od=true}else if(wa<0){wa=0;Pd=true}}}})}function N(k,n){var t,r;Fb=n?1:Fa.pow(10,lb(Fa.log(k)/Fa.LN10));t=k/Fb;if(!n){n=[1,2,2.5,5,10];if(o.allowDecimals===false||ca)if(Fb===1)n=[1,2,5,10];else if(Fb<=0.1)n=[1/Fb]}for(r=0;r<n.length;r++){k=n[r];if(t<=(n[r]+(n[r+1]||n[r]))/2)break}k*=Fb;return k}function ta(k){var n;n=k;Fb=A(Fb,Fa.pow(10,lb(Fa.log(Ta)/Fa.LN10)));if(Fb<1){n=W(1/Fb)*10;n=W(k*n)/n}return n}function da(){var k,n,t,r,J=o.tickInterval,E=o.tickPixelInterval;k=o.maxZoom||
2990-(xa&&!K(o.min)&&!K(o.max)?tb(l.smallestInterval*5,wa-pa):null);ya=R?Da:Aa;if(Ub){t=l[xa?"xAxis":"yAxis"][o.linkedTo];r=t.getExtremes();ia=A(r.min,r.dataMin);ra=A(r.max,r.dataMax)}else{ia=A(Vb,o.min,pa);ra=A(Gb,o.max,wa)}if(ca){ia=mc(ia);ra=mc(ra)}if(ra-ia<k){r=(k-ra+ia)/2;ia=Ia(ia-r,A(o.min,ia-r),pa);ra=tb(ia+k,A(o.max,ia+k),wa)}if(!Ya&&!Vc&&!Ub&&K(ia)&&K(ra)){k=ra-ia||1;if(!K(o.min)&&!K(Vb)&&Qd&&(pa<0||!Od))ia-=k*Qd;if(!K(o.max)&&!K(Gb)&&Rd&&(wa>0||!Pd))ra+=k*Rd}Ta=ia===ra?1:Ub&&!J&&E===t.options.tickPixelInterval?
2991-t.tickInterval:A(J,Ya?1:(ra-ia)*E/ya);if(!D&&!K(o.tickInterval))Ta=N(Ta);I.tickInterval=Ta;Wc=o.minorTickInterval==="auto"&&Ta?Ta/5:o.minorTickInterval;if(D){Ba=[];J=Xa.global.useUTC;var Q=1E3/ub,fa=6E4/ub,ka=36E5/ub;E=864E5/ub;k=6048E5/ub;r=2592E6/ub;var $=31556952E3/ub,F=[["second",Q,[1,2,5,10,15,30]],["minute",fa,[1,2,5,10,15,30]],["hour",ka,[1,2,3,4,6,8,12]],["day",E,[1,2]],["week",k,[1,2]],["month",r,[1,2,3,4,6]],["year",$,null]],O=F[6],S=O[1],aa=O[2];for(t=0;t<F.length;t++){O=F[t];S=O[1];aa=
2992-O[2];if(F[t+1])if(Ta<=(S*aa[aa.length-1]+F[t+1][1])/2)break}if(S===$&&Ta<5*S)aa=[1,2,5];F=N(Ta/S,aa);aa=new Date(ia*ub);aa.setMilliseconds(0);if(S>=Q)aa.setSeconds(S>=fa?0:F*lb(aa.getSeconds()/F));if(S>=fa)aa[Jd](S>=ka?0:F*lb(aa[id]()/F));if(S>=ka)aa[Kd](S>=E?0:F*lb(aa[jd]()/F));if(S>=E)aa[ld](S>=r?1:F*lb(aa[Cc]()/F));if(S>=r){aa[Ld](S>=$?0:F*lb(aa[Rc]()/F));n=aa[Sc]()}if(S>=$){n-=n%F;aa[Md](n)}S===k&&aa[ld](aa[Cc]()-aa[kd]()+o.startOfWeek);t=1;n=aa[Sc]();Q=aa.getTime()/ub;fa=aa[Rc]();for(ka=aa[Cc]();Q<
2993-ra&&t<Da;){Ba.push(Q);if(S===$)Q=Qc(n+t*F,0)/ub;else if(S===r)Q=Qc(n,fa+t*F)/ub;else if(!J&&(S===E||S===k))Q=Qc(n,fa,ka+t*F*(S===E?1:7));else Q+=S*F;t++}Ba.push(Q);Xc=o.dateTimeLabelFormats[O[0]]}else{t=ta(lb(ia/Ta)*Ta);n=ta(md(ra/Ta)*Ta);Ba=[];for(t=ta(t);t<=n;){Ba.push(t);t=ta(t+Ta)}}if(!Ub){if(Ya||xa&&l.hasColumn){n=(Ya?1:Ta)*0.5;if(Ya||!K(A(o.min,Vb)))ia-=n;if(Ya||!K(A(o.max,Gb)))ra+=n}n=Ba[0];t=Ba[Ba.length-1];if(o.startOnTick)ia=n;else ia>n&&Ba.shift();if(o.endOnTick)ra=t;else ra<t&&Ba.pop();
2994-Ob||(Ob={x:0,y:0});if(!D&&Ba.length>Ob[qa])Ob[qa]=Ba.length}}function Ma(){var k,n;Dc=ia;Sd=ra;V();da();Hb=fb;fb=ya/(ra-ia||1);if(!xa)for(k in s)for(n in s[k])s[k][n].cum=s[k][n].total;if(!I.isDirty)I.isDirty=ia!==Dc||ra!==Sd}function za(k){k=(new w(k)).render();Pb.push(k);return k}function eb(){var k=o.title,n=o.stackLabels,t=o.alternateGridColor,r=o.lineWidth,J,E,Q=(J=l.hasRendered)&&K(Dc)&&!isNaN(Dc);E=zb.length&&K(ia)&&K(ra);ya=R?Da:Aa;fb=ya/(ra-ia||1);cc=R?X:vb;if(E||Ub){if(Wc&&!Ya)for(E=ia+
2995-(Ba[0]-ia)%Wc;E<=ra;E+=Wc){Wb[E]||(Wb[E]=new q(E,true));Q&&Wb[E].isNew&&Wb[E].render(null,true);Wb[E].isActive=true;Wb[E].render()}u(Ba,function($,F){if(!Ub||$>=ia&&$<=ra){Q&&mb[$].isNew&&mb[$].render(F,true);mb[$].isActive=true;mb[$].render(F)}});t&&u(Ba,function($,F){if(F%2===0&&$<ra){dc[$]||(dc[$]=new w);dc[$].options={from:$,to:Ba[F+1]!==Wa?Ba[F+1]:ra,color:t};dc[$].render();dc[$].isActive=true}});J||u((o.plotLines||[]).concat(o.plotBands||[]),function($){Pb.push((new w($)).render())})}u([mb,
2996-Wb,dc],function($){for(var F in $)if($[F].isActive)$[F].isActive=false;else{$[F].destroy();delete $[F]}});if(r){J=X+(Oa?Da:0)+la;E=cb-vb-(Oa?Aa:0)+la;J=ga.crispLine([Za,R?X:J,R?E:ea,Ka,R?$a-Ib:J,R?E:cb-vb],r);if(La)La.animate({d:J});else La=ga.path(J).attr({stroke:o.lineColor,"stroke-width":r,zIndex:7}).add()}if(ba){J=R?X:ea;r=ja(k.style.fontSize||12);J={low:J+(R?0:ya),middle:J+ya/2,high:J+(R?ya:0)}[k.align];r=(R?ea+Aa:X)+(R?1:-1)*(Oa?-1:1)*nd+(L===2?r:0);ba[ba.isNew?"attr":"animate"]({x:R?J:r+(Oa?
2997-Da:0)+la+(k.x||0),y:R?r-(Oa?Aa:0)+la:J+(k.y||0)});ba.isNew=false}if(n&&n.enabled){var fa,ka;n=I.stackTotalGroup;if(!n)I.stackTotalGroup=n=ga.g("stack-labels").attr({visibility:Ab,zIndex:6}).translate(X,ea).add();for(fa in s){k=s[fa];for(ka in k)k[ka].render(n)}}I.isDirty=false}function ab(k){for(var n=Pb.length;n--;)Pb[n].id===k&&Pb[n].destroy()}var xa=p.isX,Oa=p.opposite,R=va?!xa:xa,L=R?Oa?0:2:Oa?1:3,s={},o=Ca(xa?Yc:od,[ge,he,Td,ie][L],p),I=this,ba,B=o.type,D=B==="datetime",ca=B==="logarithmic",
2998-la=o.offset||0,qa=xa?"x":"y",ya,fb,Hb,cc=R?X:vb,G,ha,na,Ra,La,pa,wa,zb,Vb,Gb,ra=null,ia=null,Dc,Sd,Qd=o.minPadding,Rd=o.maxPadding,Ub=K(o.linkedTo),Od,Pd,Vc;B=o.events;var pd,Pb=[],Ta,Wc,Fb,Ba,mb={},Wb={},dc={},qc,rc,nd,Xc,Ya=o.categories,je=o.labels.formatter||function(){var k=this.value;return Xc?Zc(Xc,k):Ta%1E6===0?k/1E6+"M":Ta%1E3===0?k/1E3+"k":!Ya&&k>=1E3?Ed(k,0):k},$c=R&&o.labels.staggerLines,ec=o.reversed,fc=Ya&&o.tickmarkPlacement==="between"?0.5:0;q.prototype={addLabel:function(){var k=this.pos,
2999-n=o.labels,t=!(k===ia&&!A(o.showFirstLabel,1)||k===ra&&!A(o.showLastLabel,0)),r=Ya&&R&&Ya.length&&!n.step&&!n.staggerLines&&!n.rotation&&Da/Ya.length||!R&&Da/2,J=Ya&&K(Ya[k])?Ya[k]:k,E=this.label;k=je.call({isFirst:k===Ba[0],isLast:k===Ba[Ba.length-1],dateTimeLabelFormat:Xc,value:ca?Fa.pow(10,J):J});r=r&&{width:Ia(1,W(r-2*(n.padding||10)))+Ua};r=sa(r,n.style);if(E===Wa)this.label=K(k)&&t&&n.enabled?ga.text(k,0,0,n.useHTML).attr({align:n.align,rotation:n.rotation}).css(r).add(na):null;else E&&E.attr({text:k}).css(r)},
3000-getLabelSize:function(){var k=this.label;return k?(this.labelBBox=k.getBBox())[R?"height":"width"]:0},render:function(k,n){var t=!this.minor,r=this.label,J=this.pos,E=o.labels,Q=this.gridLine,fa=t?o.gridLineWidth:o.minorGridLineWidth,ka=t?o.gridLineColor:o.minorGridLineColor,$=t?o.gridLineDashStyle:o.minorGridLineDashStyle,F=this.mark,O=t?o.tickLength:o.minorTickLength,S=t?o.tickWidth:o.minorTickWidth||0,aa=t?o.tickColor:o.minorTickColor,Eb=t?o.tickPosition:o.minorTickPosition,kb=E.step,nb=n&&ad||
3001-cb,Qb;Qb=R?G(J+fc,null,null,n)+cc:X+la+(Oa?(n&&qd||$a)-Ib-X:0);nb=R?nb-vb+la-(Oa?Aa:0):nb-G(J+fc,null,null,n)-cc;if(fa){J=ha(J+fc,fa,n);if(Q===Wa){Q={stroke:ka,"stroke-width":fa};if($)Q.dashstyle=$;if(t)Q.zIndex=1;this.gridLine=Q=fa?ga.path(J).attr(Q).add(Ra):null}!n&&Q&&J&&Q.animate({d:J})}if(S){if(Eb==="inside")O=-O;if(Oa)O=-O;t=ga.crispLine([Za,Qb,nb,Ka,Qb+(R?0:-O),nb+(R?O:0)],S);if(F)F.animate({d:t});else this.mark=ga.path(t).attr({stroke:aa,"stroke-width":S}).add(na)}if(r&&!isNaN(Qb)){Qb=Qb+
3002-E.x-(fc&&R?fc*fb*(ec?-1:1):0);nb=nb+E.y-(fc&&!R?fc*fb*(ec?1:-1):0);K(E.y)||(nb+=ja(r.styles.lineHeight)*0.9-r.getBBox().height/2);if($c)nb+=k/(kb||1)%$c*16;if(kb)r[k%kb?"hide":"show"]();r[this.isNew?"attr":"animate"]({x:Qb,y:nb})}this.isNew=false},destroy:function(){Ac(this)}};w.prototype={render:function(){var k=this,n=k.options,t=n.label,r=k.label,J=n.width,E=n.to,Q=n.from,fa=n.value,ka,$=n.dashStyle,F=k.svgElem,O=[],S,aa,Eb=n.color;aa=n.zIndex;var kb=n.events;if(ca){Q=mc(Q);E=mc(E);fa=mc(fa)}if(J){O=
3003-ha(fa,J);n={stroke:Eb,"stroke-width":J};if($)n.dashstyle=$}else if(K(Q)&&K(E)){Q=Ia(Q,ia);E=tb(E,ra);ka=ha(E);if((O=ha(Q))&&ka)O.push(ka[4],ka[5],ka[1],ka[2]);else O=null;n={fill:Eb}}else return;if(K(aa))n.zIndex=aa;if(F)if(O)F.animate({d:O},null,F.onGetPath);else{F.hide();F.onGetPath=function(){F.show()}}else if(O&&O.length){k.svgElem=F=ga.path(O).attr(n).add();if(kb){$=function(nb){F.on(nb,function(Qb){kb[nb].apply(k,[Qb])})};for(S in kb)$(S)}}if(t&&K(t.text)&&O&&O.length&&Da>0&&Aa>0){t=Ca({align:R&&
3004-ka&&"center",x:R?!ka&&4:10,verticalAlign:!R&&ka&&"middle",y:R?ka?16:10:ka?6:-4,rotation:R&&!ka&&90},t);if(!r)k.label=r=ga.text(t.text,0,0).attr({align:t.textAlign||t.align,rotation:t.rotation,zIndex:aa}).css(t.style).add();ka=[O[1],O[4],A(O[6],O[1])];O=[O[2],O[5],A(O[7],O[2])];S=tb.apply(Fa,ka);aa=tb.apply(Fa,O);r.align(t,false,{x:S,y:aa,width:Ia.apply(Fa,ka)-S,height:Ia.apply(Fa,O)-aa});r.show()}else r&&r.hide();return k},destroy:function(){Ac(this);nc(Pb,this)}};x.prototype={destroy:function(){Ac(this)},
3005-setTotal:function(k){this.cum=this.total=k},render:function(k){var n=this.options.formatter.call(this);if(this.label)this.label.attr({text:n,visibility:ob});else this.label=l.renderer.text(n,0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation,visibility:ob}).add(k)},setOffset:function(k,n){var t=this.isNegative,r=I.translate(this.total),J=I.translate(0);J=bb(r-J);var E=l.xAxis[0].translate(this.x)+k,Q=l.plotHeight;t={x:va?t?r:r-J:E,y:va?Q-E-n:t?Q-r-J:Q-r,width:va?
3006-J:n,height:va?n:J};this.label&&this.label.align(this.alignOptions,null,t).attr({visibility:Ab})}};G=function(k,n,t,r,J){var E=1,Q=0,fa=r?Hb:fb;r=r?Dc:ia;fa||(fa=fb);if(t){E*=-1;Q=ya}if(ec){E*=-1;Q-=E*ya}if(n){if(ec)k=ya-k;k=k/fa+r;if(ca&&J)k=Fa.pow(10,k)}else{if(ca&&J)k=mc(k);k=E*(k-r)*fa+Q}return k};ha=function(k,n,t){var r,J,E;k=G(k,null,null,t);var Q=t&&ad||cb,fa=t&&qd||$a,ka;t=J=W(k+cc);r=E=W(Q-k-cc);if(isNaN(k))ka=true;else if(R){r=ea;E=Q-vb;if(t<X||t>X+Da)ka=true}else{t=X;J=fa-Ib;if(r<ea||r>
3007-ea+Aa)ka=true}return ka?null:ga.crispLine([Za,t,r,Ka,J,E],n||0)};if(va&&xa&&ec===Wa)ec=true;sa(I,{addPlotBand:za,addPlotLine:za,adjustTickAmount:function(){if(Ob&&!D&&!Ya&&!Ub){var k=qc,n=Ba.length;qc=Ob[qa];if(n<qc){for(;Ba.length<qc;)Ba.push(ta(Ba[Ba.length-1]+Ta));fb*=(n-1)/(qc-1);ra=Ba[Ba.length-1]}if(K(k)&&qc!==k)I.isDirty=true}},categories:Ya,getExtremes:function(){return{min:ia,max:ra,dataMin:pa,dataMax:wa,userMin:Vb,userMax:Gb}},getPlotLinePath:ha,getThreshold:function(k){if(ia>k)k=ia;else if(ra<
3008-k)k=ra;return G(k,0,1)},isXAxis:xa,options:o,plotLinesAndBands:Pb,getOffset:function(){var k=zb.length&&K(ia)&&K(ra),n=0,t=0,r=o.title,J=o.labels,E=[-1,1,1,-1][L],Q;if(!na){na=ga.g("axis").attr({zIndex:7}).add();Ra=ga.g("grid").attr({zIndex:1}).add()}rc=0;if(k||Ub){u(Ba,function(fa){if(mb[fa])mb[fa].addLabel();else mb[fa]=new q(fa);if(L===0||L===2||{1:"left",3:"right"}[L]===J.align)rc=Ia(mb[fa].getLabelSize(),rc)});if($c)rc+=($c-1)*16}else for(Q in mb){mb[Q].destroy();delete mb[Q]}if(r&&r.text){if(!ba){ba=
3009-I.axisTitle=ga.text(r.text,0,0,r.useHTML).attr({zIndex:7,rotation:r.rotation||0,align:r.textAlign||{low:"left",middle:"center",high:"right"}[r.align]}).css(r.style).add();ba.isNew=true}n=ba.getBBox()[R?"height":"width"];t=A(r.margin,R?5:10)}la=E*(o.offset||Xb[L]);nd=rc+(L!==2&&rc&&E*o.labels[R?"y":"x"])+t;Xb[L]=Ia(Xb[L],nd+n+E*la)},render:eb,setCategories:function(k,n){I.categories=p.categories=Ya=k;u(zb,function(t){t.translate();t.setTooltipPoints(true)});I.isDirty=true;A(n,true)&&l.redraw()},setExtremes:function(k,
3010-n,t,r){t=A(t,true);Pa(I,"setExtremes",{min:k,max:n},function(){Vb=k;Gb=n;t&&l.redraw(r)})},setScale:Ma,setTickPositions:da,translate:G,redraw:function(){Yb.resetTracker&&Yb.resetTracker();eb();u(Pb,function(k){k.render()});u(zb,function(k){k.isDirty=true})},removePlotBand:ab,removePlotLine:ab,reversed:ec,stacks:s,destroy:function(){var k;pb(I);for(k in s){Ac(s[k]);s[k]=null}if(I.stackTotalGroup)I.stackTotalGroup=I.stackTotalGroup.destroy();u([mb,Wb,dc,Pb],function(n){Ac(n)});u([La,na,Ra,ba],function(n){n&&
3011-n.destroy()});La=na=Ra=ba=null}});for(pd in B)Qa(I,pd,B[pd]);Ma()}function d(){var p={};return{add:function(q,w,x,V){if(!p[q]){w=ga.text(w,0,0).css(a.toolbar.itemStyle).align({align:"right",x:-Ib-20,y:ea+30}).on("click",V).attr({align:"right",zIndex:20}).add();p[q]=w}},remove:function(q){pc(p[q].element);p[q]=null}}}function e(p){function q(){var B=this.points||zc(this),D=B[0].series.xAxis,ca=this.x;D=D&&D.options.type==="datetime";var la=Sb(ca)||D,qa;qa=la?['<span style="font-size: 10px">'+(D?Zc("%A, %b %e, %Y",
3012-ca):ca)+"</span>"]:[];u(B,function(ya){qa.push(ya.point.tooltipFormatter(la))});return qa.join("<br/>")}function w(B,D){L=xa?B:(2*L+B)/3;s=xa?D:(s+D)/2;o.translate(L,s);rd=bb(B-L)>1||bb(D-s)>1?function(){w(B,D)}:null}function x(){if(!xa){var B=l.hoverPoints;o.hide();u(da,function(D){D&&D.hide()});B&&u(B,function(D){D.setState()});l.hoverPoints=null;xa=true}}var V,N=p.borderWidth,ta=p.crosshairs,da=[],Ma=p.style,za=p.shared,eb=ja(Ma.padding),ab=N+eb,xa=true,Oa,R,L=0,s=0;Ma.padding=0;var o=ga.g("tooltip").attr({zIndex:8}).add(),
3013-I=ga.rect(ab,ab,0,0,p.borderRadius,N).attr({fill:p.backgroundColor,"stroke-width":N}).add(o).shadow(p.shadow),ba=ga.text("",eb+ab,ja(Ma.fontSize)+eb+ab,p.useHTML).attr({zIndex:1}).css(Ma).add(o);o.hide();return{shared:za,refresh:function(B){var D,ca,la,qa=0,ya={},fb=[];la=B.tooltipPos;D=p.formatter||q;ya=l.hoverPoints;if(za){ya&&u(ya,function(Hb){Hb.setState()});l.hoverPoints=B;u(B,function(Hb){Hb.setState(Bb);qa+=Hb.plotY;fb.push(Hb.getLabelConfig())});ca=B[0].plotX;qa=W(qa)/B.length;ya={x:B[0].category};
3014-ya.points=fb;B=B[0]}else ya=B.getLabelConfig();ya=D.call(ya);V=B.series;ca=za?ca:B.plotX;qa=za?qa:B.plotY;D=W(la?la[0]:va?Da-qa:ca);ca=W(la?la[1]:va?Aa-ca:qa);la=za||!B.series.isCartesian||gc(D,ca);if(ya===false||!la)x();else{if(xa){o.show();xa=false}ba.attr({text:ya});la=ba.getBBox();Oa=la.width+2*eb;R=la.height+2*eb;I.attr({width:Oa,height:R,stroke:p.borderColor||B.color||V.color||"#606060"});D=fe(Oa,R,X,ea,Da,Aa,{x:D,y:ca});w(W(D.x-ab),W(D.y-ab))}if(ta){ta=zc(ta);for(D=ta.length;D--;){ca=B.series[D?
3015-"yAxis":"xAxis"];if(ta[D]&&ca){ca=ca.getPlotLinePath(B[D?"y":"x"],1);if(da[D])da[D].attr({d:ca,visibility:Ab});else{la={"stroke-width":ta[D].width||1,stroke:ta[D].color||"#C0C0C0",zIndex:2};if(ta[D].dashStyle)la.dashstyle=ta[D].dashStyle;da[D]=ga.path(ca).attr(la).add()}}}}},hide:x,destroy:function(){u(da,function(B){B&&B.destroy()});u([I,ba,o],function(B){B&&B.destroy()});I=ba=o=null}}}function f(p){function q(L){var s,o=Ud&&ua.width/ua.body.scrollWidth-1,I,ba,B;L=L||db.event;if(!L.target)L.target=
3016-L.srcElement;s=L.touches?L.touches.item(0):L;if(L.type!=="mousemove"||db.opera||o){Jb=Fd(oa);I=Jb.left;ba=Jb.top}if(Pc){B=L.x;s=L.y}else if(s.layerX===Wa){B=s.pageX-I;s=s.pageY-ba}else{B=L.layerX;s=L.layerY}if(o){B+=W((o+1)*I-I);s+=W((o+1)*ba-ba)}return sa(L,{chartX:B,chartY:s})}function w(L){var s={xAxis:[],yAxis:[]};u(Va,function(o){var I=o.translate,ba=o.isXAxis;s[ba?"xAxis":"yAxis"].push({axis:o,value:I((va?!ba:ba)?L.chartX-X:Aa-L.chartY+ea,true)})});return s}function x(){var L=l.hoverSeries,
3017-s=l.hoverPoint;s&&s.onMouseOut();L&&L.onMouseOut();hc&&hc.hide();sd=null}function V(){if(za){var L={xAxis:[],yAxis:[]},s=za.getBBox(),o=s.x-X,I=s.y-ea;if(Ma){u(Va,function(ba){var B=ba.translate,D=ba.isXAxis,ca=va?!D:D,la=B(ca?o:Aa-I-s.height,true,0,0,1);B=B(ca?o+s.width:Aa-I,true,0,0,1);L[D?"xAxis":"yAxis"].push({axis:ba,min:tb(la,B),max:Ia(la,B)})});Pa(l,"selection",L,td)}za=za.destroy()}l.mouseIsDown=ud=Ma=false;pb(ua,Kb?"touchend":"mouseup",V)}function N(L){var s=K(L.pageX)?L.pageX:L.page.x;L=
3018-K(L.pageX)?L.pageY:L.page.y;Jb&&!gc(s-Jb.left-X,L-Jb.top-ea)&&x()}var ta,da,Ma,za,eb=z.zoomType,ab=/x/.test(eb),xa=/y/.test(eb),Oa=ab&&!va||xa&&va,R=xa&&!va||ab&&va;bd=function(){if(Ec){Ec.translate(X,ea);va&&Ec.attr({width:l.plotWidth,height:l.plotHeight}).invert()}else l.trackerGroup=Ec=ga.g("tracker").attr({zIndex:9}).add()};bd();if(p.enabled)l.tooltip=hc=e(p);(function(){oa.onmousedown=function(s){s=q(s);!Kb&&s.preventDefault&&s.preventDefault();l.mouseIsDown=ud=true;ta=s.chartX;da=s.chartY;Qa(ua,
3019-Kb?"touchend":"mouseup",V)};var L=function(s){if(!(s&&s.touches&&s.touches.length>1)){s=q(s);if(!Kb)s.returnValue=false;var o=s.chartX,I=s.chartY,ba=!gc(o-X,I-ea);Jb||(Jb=Fd(oa));if(Kb&&s.type==="touchstart")if(Ga(s.target,"isTracker"))l.runTrackerClick||s.preventDefault();else!ke&&!ba&&s.preventDefault();if(ba){if(o<X)o=X;else if(o>X+Da)o=X+Da;if(I<ea)I=ea;else if(I>ea+Aa)I=ea+Aa}if(ud&&s.type!=="touchstart"){Ma=Math.sqrt(Math.pow(ta-o,2)+Math.pow(da-I,2));if(Ma>10){if(sc&&(ab||xa)&&gc(ta-X,da-ea))za||
3020-(za=ga.rect(X,ea,Oa?1:Da,R?1:Aa,0).attr({fill:z.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add());if(za&&Oa){o=o-ta;za.attr({width:bb(o),x:(o>0?0:o)+ta})}if(za&&R){I=I-da;za.attr({height:bb(I),y:(I>0?0:I)+da})}}}else if(!ba){var B;I=l.hoverPoint;o=l.hoverSeries;var D,ca,la=$a,qa=va?s.chartY:s.chartX-X;if(hc&&p.shared){B=[];D=Ha.length;for(ca=0;ca<D;ca++)if(Ha[ca].visible&&Ha[ca].tooltipPoints.length){s=Ha[ca].tooltipPoints[qa];s._dist=bb(qa-s.plotX);la=tb(la,s._dist);B.push(s)}for(D=
3021-B.length;D--;)B[D]._dist>la&&B.splice(D,1);if(B.length&&B[0].plotX!==sd){hc.refresh(B);sd=B[0].plotX}}if(o&&o.tracker)(s=o.tooltipPoints[qa])&&s!==I&&s.onMouseOver()}return ba||!sc}};oa.onmousemove=L;Qa(oa,"mouseleave",x);Qa(ua,"mousemove",N);oa.ontouchstart=function(s){if(ab||xa)oa.onmousedown(s);L(s)};oa.ontouchmove=L;oa.ontouchend=function(){Ma&&x()};oa.onclick=function(s){var o=l.hoverPoint;s=q(s);s.cancelBubble=true;if(!Ma)if(o&&Ga(s.target,"isTracker")){var I=o.plotX,ba=o.plotY;sa(o,{pageX:Jb.left+
3022-X+(va?Da-ba:I),pageY:Jb.top+ea+(va?Aa-I:ba)});Pa(o.series,"click",sa(s,{point:o}));o.firePointEvent("click",s)}else{sa(s,w(s));gc(s.chartX-X,s.chartY-ea)&&Pa(l,"click",s)}Ma=false}})();Vd=setInterval(function(){rd&&rd()},32);sa(this,{zoomX:ab,zoomY:xa,resetTracker:x,destroy:function(){if(l.trackerGroup)l.trackerGroup=Ec=l.trackerGroup.destroy();pb(ua,"mousemove",N);oa.onclick=oa.onmousedown=oa.onmousemove=oa.ontouchstart=oa.ontouchend=oa.ontouchmove=null}})}function g(p){var q=p.type||z.type||z.defaultSeriesType,
3023-w=wb[q],x=l.hasRendered;if(x)if(va&&q==="column")w=wb.bar;else if(!va&&q==="bar")w=wb.column;q=new w;q.init(l,p);if(!x&&q.inverted)va=true;if(q.isCartesian)sc=q.isCartesian;Ha.push(q);return q}function h(){z.alignTicks!==false&&u(Va,function(p){p.adjustTickAmount()});Ob=null}function i(p){var q=l.isDirtyLegend,w,x=l.isDirtyBox,V=Ha.length,N=V,ta=l.clipRect;for(oc(p,l);N--;){p=Ha[N];if(p.isDirty&&p.options.stacking){w=true;break}}if(w)for(N=V;N--;){p=Ha[N];if(p.options.stacking)p.isDirty=true}u(Ha,
3024-function(da){if(da.isDirty){da.cleanData();da.getSegments();if(da.options.legendType==="point")q=true}});if(q&&Fc.renderLegend){Fc.renderLegend();l.isDirtyLegend=false}if(sc){if(!cd){Ob=null;u(Va,function(da){da.setScale()})}h();Gc();u(Va,function(da){if(da.isDirty||x){da.redraw();x=true}})}if(x){vd();bd();if(ta){Hc(ta);ta.animate({width:l.plotSizeX,height:l.plotSizeY})}}u(Ha,function(da){if(da.isDirty&&da.visible&&(!da.isCartesian||da.xAxis))da.redraw()});Yb&&Yb.resetTracker&&Yb.resetTracker();Pa(l,
3025-"redraw")}function j(){var p=a.xAxis||{},q=a.yAxis||{},w;p=zc(p);u(p,function(x,V){x.index=V;x.isX=true});q=zc(q);u(q,function(x,V){x.index=V});Va=p.concat(q);l.xAxis=[];l.yAxis=[];Va=tc(Va,function(x){w=new c(x);l[w.isXAxis?"xAxis":"yAxis"].push(w);return w});h()}function m(p,q){uc=Ca(a.title,p);Ic=Ca(a.subtitle,q);u([["title",p,uc],["subtitle",q,Ic]],function(w){var x=w[0],V=l[x],N=w[1];w=w[2];if(V&&N)V=V.destroy();if(w&&w.text&&!V)l[x]=ga.text(w.text,0,0,w.useHTML).attr({align:w.align,"class":"highcharts-"+
3026-x,zIndex:1}).css(w.style).add().align(w,false,Rb)})}function v(){qb=z.renderTo;Wd=vc+wd++;if(Sb(qb))qb=ua.getElementById(qb);qb.innerHTML="";if(!qb.offsetWidth){Zb=qb.cloneNode(0);Ja(Zb,{position:ic,top:"-9999px",display:""});ua.body.appendChild(Zb)}dd=(Zb||qb).offsetWidth;Jc=(Zb||qb).offsetHeight;l.chartWidth=$a=z.width||dd||600;l.chartHeight=cb=z.height||(Jc>19?Jc:400);l.container=oa=hb(Tb,{className:"highcharts-container"+(z.className?" "+z.className:""),id:Wd},sa({position:Xd,overflow:ob,width:$a+
3027-Ua,height:cb+Ua,textAlign:"left"},z.style),Zb||qb);l.renderer=ga=z.forExport?new ed(oa,$a,cb,true):new fd(oa,$a,cb);var p,q;if(Yd&&oa.getBoundingClientRect){p=function(){Ja(oa,{left:0,top:0});q=oa.getBoundingClientRect();Ja(oa,{left:-(q.left-ja(q.left))+Ua,top:-(q.top-ja(q.top))+Ua})};p();Qa(db,"resize",p);Qa(l,"destroy",function(){pb(db,"resize",p)})}}function P(){function p(){var w=z.width||qb.offsetWidth,x=z.height||qb.offsetHeight;if(w&&x){if(w!==dd||x!==Jc){clearTimeout(q);q=setTimeout(function(){xd(w,
3028-x,false)},100)}dd=w;Jc=x}}var q;Qa(db,"resize",p);Qa(l,"destroy",function(){pb(db,"resize",p)})}function T(){Pa(l,"endResize",null,function(){cd-=1})}function Y(){var p=a.labels,q=a.credits,w;m();Fc=l.legend=new le;Gc();u(Va,function(x){x.setTickPositions(true)});h();Gc();vd();sc&&u(Va,function(x){x.render()});if(!l.seriesGroup)l.seriesGroup=ga.g("series-group").attr({zIndex:3}).add();u(Ha,function(x){x.translate();x.setTooltipPoints();x.render()});p.items&&u(p.items,function(){var x=sa(p.style,this.style),
3029-V=ja(x.left)+X,N=ja(x.top)+ea+12;delete x.left;delete x.top;ga.text(this.html,V,N).attr({zIndex:2}).css(x).add()});if(!l.toolbar)l.toolbar=d();if(q.enabled&&!l.credits){w=q.href;l.credits=ga.text(q.text,0,0).on("click",function(){if(w)location.href=w}).attr({align:q.position.align,zIndex:8}).css(q.style).add().align(q.position)}bd();l.hasRendered=true;if(Zb){qb.appendChild(oa);pc(Zb)}}function H(){var p,q=oa&&oa.parentNode;if(l!==null){Pa(l,"destroy");pb(db,"unload",H);pb(l);for(p=Va.length;p--;)Va[p]=
3030-Va[p].destroy();for(p=Ha.length;p--;)Ha[p]=Ha[p].destroy();u(["title","subtitle","seriesGroup","clipRect","credits","tracker"],function(w){var x=l[w];if(x)l[w]=x.destroy()});u([wc,xc,Kc,Fc,hc,ga,Yb],function(w){w&&w.destroy&&w.destroy()});wc=xc=Kc=Fc=hc=ga=Yb=null;if(oa){oa.innerHTML="";pb(oa);q&&pc(oa);oa=null}clearInterval(Vd);for(p in l)delete l[p];l=null}}function U(){if(!Lc&&db==db.top&&ua.readyState!=="complete")ua.attachEvent("onreadystatechange",function(){ua.detachEvent("onreadystatechange",
3031-U);ua.readyState==="complete"&&U()});else{v();yd();zd();u(a.series||[],function(p){g(p)});l.inverted=va=A(va,a.chart.inverted);j();l.render=Y;l.tracker=Yb=new f(a.tooltip);Y();Pa(l,"load");b&&b.apply(l,[l]);u(l.callbacks,function(p){p.apply(l,[l])})}}Yc=Ca(Yc,Xa.xAxis);od=Ca(od,Xa.yAxis);Xa.xAxis=Xa.yAxis=null;a=Ca(Xa,a);var z=a.chart,M=z.margin;M=Nb(M)?M:[M,M,M,M];var y=A(z.marginTop,M[0]),C=A(z.marginRight,M[1]),Z=A(z.marginBottom,M[2]),Sa=A(z.marginLeft,M[3]),Na=z.spacingTop,Ea=z.spacingRight,
3032-gb=z.spacingBottom,Lb=z.spacingLeft,Rb,uc,Ic,ea,Ib,vb,X,Xb,qb,Zb,oa,Wd,dd,Jc,$a,cb,qd,ad,wc,Kc,Ad,xc,l=this,ke=(M=z.events)&&!!M.click,Bd,gc,hc,ud,jc,Zd,Cd,Aa,Da,Yb,Ec,bd,Fc,$b,ac,Jb,sc=z.showAxes,cd=0,Va=[],Ob,Ha=[],va,ga,rd,Vd,sd,vd,Gc,yd,zd,xd,td,$d,le=function(){function p(G,ha){var na=G.legendItem,Ra=G.legendLine,La=G.legendSymbol,pa=Oa.color,wa=ha?N.itemStyle.color:pa,zb=ha?G.color:pa;pa=ha?G.pointAttr[ib]:{stroke:pa,fill:pa};na&&na.css({fill:wa});Ra&&Ra.attr({stroke:zb});La&&La.attr(pa)}function q(G,
3033-ha,na){var Ra=G.legendItem,La=G.legendLine,pa=G.legendSymbol;G=G.checkbox;Ra&&Ra.attr({x:ha,y:na});La&&La.translate(ha,na-4);pa&&pa.attr({x:ha+pa.xOff,y:na+pa.yOff});if(G){G.x=ha;G.y=na}}function w(){u(za,function(G){var ha=G.checkbox,na=qa.alignAttr;ha&&Ja(ha,{left:na.translateX+G.legendItemWidth+ha.x-40+Ua,top:na.translateY+ha.y-11+Ua})})}function x(G){var ha,na,Ra,La,pa=G.legendItem;La=G.series||G;var wa=La.options,zb=wa&&wa.borderWidth||0;if(!pa){La=/^(bar|pie|area|column)$/.test(La.type);G.legendItem=
3034-pa=ga.text(N.labelFormatter.call(G),0,0).css(G.visible?ab:Oa).on("mouseover",function(){G.setState(Bb);pa.css(xa)}).on("mouseout",function(){pa.css(G.visible?ab:Oa);G.setState()}).on("click",function(){var Gb=function(){G.setVisible()};G.firePointEvent?G.firePointEvent("legendItemClick",null,Gb):Pa(G,"legendItemClick",null,Gb)}).attr({zIndex:2}).add(qa);if(!La&&wa&&wa.lineWidth){var Vb={"stroke-width":wa.lineWidth,zIndex:2};if(wa.dashStyle)Vb.dashstyle=wa.dashStyle;G.legendLine=ga.path([Za,-da-Ma,
3035-0,Ka,-Ma,0]).attr(Vb).add(qa)}if(La)ha=ga.rect(na=-da-Ma,Ra=-11,da,12,2).attr({zIndex:3}).add(qa);else if(wa&&wa.marker&&wa.marker.enabled)ha=ga.symbol(G.symbol,na=-da/2-Ma,Ra=-4,wa.marker.radius).attr({zIndex:3}).add(qa);if(ha){ha.xOff=na+zb%2/2;ha.yOff=Ra+zb%2/2}G.legendSymbol=ha;p(G,G.visible);if(wa&&wa.showCheckbox){G.checkbox=hb("input",{type:"checkbox",checked:G.selected,defaultChecked:G.selected},N.itemCheckboxStyle,oa);Qa(G.checkbox,"click",function(Gb){Pa(G,"checkboxClick",{checked:Gb.target.checked},
3036-function(){G.select()})})}}ha=pa.getBBox();na=G.legendItemWidth=N.itemWidth||da+Ma+ha.width+R;B=ha.height;if(ta&&o-s+na>(fb||$a-2*R-s)){o=s;I+=B}ba=I;q(G,o,I);if(ta)o+=na;else I+=B;ya=fb||Ia(ta?o-s:na,ya)}function V(){o=s;I=L;ba=ya=0;qa||(qa=ga.g("legend").attr({zIndex:7}).add());za=[];u(Hb,function(Ra){var La=Ra.options;if(La.showInLegend)za=za.concat(La.legendType==="point"?Ra.data:Ra)});Hd(za,function(Ra,La){return(Ra.options.legendIndex||0)-(La.options.legendIndex||0)});cc&&za.reverse();u(za,
3037-x);$b=fb||ya;ac=ba-L+B;if(ca||la){$b+=2*R;ac+=2*R;if(D){if($b>0&&ac>0){D[D.isNew?"attr":"animate"](D.crisp(null,null,null,$b,ac));D.isNew=false}}else{D=ga.rect(0,0,$b,ac,N.borderRadius,ca||0).attr({stroke:N.borderColor,"stroke-width":ca||0,fill:la||jb}).add(qa).shadow(N.shadow);D.isNew=true}D[za.length?"show":"hide"]()}for(var G=["left","right","top","bottom"],ha,na=4;na--;){ha=G[na];if(eb[ha]&&eb[ha]!=="auto"){N[na<2?"align":"verticalAlign"]=ha;N[na<2?"x":"y"]=ja(eb[ha])*(na%2?-1:1)}}za.length&&
3038-qa.align(sa(N,{width:$b,height:ac}),true,Rb);cd||w()}var N=l.options.legend;if(N.enabled){var ta=N.layout==="horizontal",da=N.symbolWidth,Ma=N.symbolPadding,za,eb=N.style,ab=N.itemStyle,xa=N.itemHoverStyle,Oa=N.itemHiddenStyle,R=ja(eb.padding),L=18,s=4+R+da+Ma,o,I,ba,B=0,D,ca=N.borderWidth,la=N.backgroundColor,qa,ya,fb=N.width,Hb=l.series,cc=N.reversed;V();Qa(l,"endResize",w);return{colorizeItem:p,destroyItem:function(G){var ha=G.checkbox;u(["legendItem","legendLine","legendSymbol"],function(na){G[na]&&
3039-G[na].destroy()});ha&&pc(G.checkbox)},renderLegend:V,destroy:function(){if(D)D=D.destroy();if(qa)qa=qa.destroy()}}}};gc=function(p,q){return p>=0&&p<=Da&&q>=0&&q<=Aa};$d=function(){Pa(l,"selection",{resetSelection:true},td);l.toolbar.remove("zoom")};td=function(p){var q=Xa.lang,w=l.pointCount<100;l.toolbar.add("zoom",q.resetZoom,q.resetZoomTitle,$d);!p||p.resetSelection?u(Va,function(x){x.setExtremes(null,null,false,w)}):u(p.xAxis.concat(p.yAxis),function(x){var V=x.axis;if(l.tracker[V.isXAxis?"zoomX":
3040-"zoomY"])V.setExtremes(x.min,x.max,false,w)});i()};Gc=function(){var p=a.legend,q=A(p.margin,10),w=p.x,x=p.y,V=p.align,N=p.verticalAlign,ta;yd();if((l.title||l.subtitle)&&!K(y))if(ta=Ia(l.title&&!uc.floating&&!uc.verticalAlign&&uc.y||0,l.subtitle&&!Ic.floating&&!Ic.verticalAlign&&Ic.y||0))ea=Ia(ea,ta+A(uc.margin,15)+Na);if(p.enabled&&!p.floating)if(V==="right")K(C)||(Ib=Ia(Ib,$b-w+q+Ea));else if(V==="left")K(Sa)||(X=Ia(X,$b+w+q+Lb));else if(N==="top")K(y)||(ea=Ia(ea,ac+x+q+Na));else if(N==="bottom")K(Z)||
3041-(vb=Ia(vb,ac-x+q+gb));sc&&u(Va,function(da){da.getOffset()});K(Sa)||(X+=Xb[3]);K(y)||(ea+=Xb[0]);K(Z)||(vb+=Xb[2]);K(C)||(Ib+=Xb[1]);zd()};xd=function(p,q,w){var x=l.title,V=l.subtitle;cd+=1;oc(w,l);ad=cb;qd=$a;l.chartWidth=$a=W(p);l.chartHeight=cb=W(q);Ja(oa,{width:$a+Ua,height:cb+Ua});ga.setSize($a,cb,w);Da=$a-X-Ib;Aa=cb-ea-vb;Ob=null;u(Va,function(N){N.isDirty=true;N.setScale()});u(Ha,function(N){N.isDirty=true});l.isDirtyLegend=true;l.isDirtyBox=true;Gc();x&&x.align(null,null,Rb);V&&V.align(null,
3042-null,Rb);i(w);ad=null;Pa(l,"resize");Bc===false?T():setTimeout(T,Bc&&Bc.duration||500)};zd=function(){l.plotLeft=X=W(X);l.plotTop=ea=W(ea);l.plotWidth=Da=W($a-X-Ib);l.plotHeight=Aa=W(cb-ea-vb);l.plotSizeX=va?Aa:Da;l.plotSizeY=va?Da:Aa;Rb={x:Lb,y:Na,width:$a-Lb-Ea,height:cb-Na-gb}};yd=function(){ea=A(y,Na);Ib=A(C,Ea);vb=A(Z,gb);X=A(Sa,Lb);Xb=[0,0,0,0]};vd=function(){var p=z.borderWidth||0,q=z.backgroundColor,w=z.plotBackgroundColor,x=z.plotBackgroundImage,V,N={x:X,y:ea,width:Da,height:Aa};V=p+(z.shadow?
3043-8:0);if(p||q)if(wc)wc.animate(wc.crisp(null,null,null,$a-V,cb-V));else wc=ga.rect(V/2,V/2,$a-V,cb-V,z.borderRadius,p).attr({stroke:z.borderColor,"stroke-width":p,fill:q||jb}).add().shadow(z.shadow);if(w)if(Kc)Kc.animate(N);else Kc=ga.rect(X,ea,Da,Aa,0).attr({fill:w}).add().shadow(z.plotShadow);if(x)if(Ad)Ad.animate(N);else Ad=ga.image(x,X,ea,Da,Aa).add();if(z.plotBorderWidth)if(xc)xc.animate(xc.crisp(null,X,ea,Da,Aa));else xc=ga.rect(X,ea,Da,Aa,0,z.plotBorderWidth).attr({stroke:z.plotBorderColor,
3044-"stroke-width":z.plotBorderWidth,zIndex:4}).add();l.isDirtyBox=false};Qa(db,"unload",H);z.reflow!==false&&Qa(l,"load",P);if(M)for(Bd in M)Qa(l,Bd,M[Bd]);l.options=a;l.series=Ha;l.addSeries=function(p,q,w){var x;if(p){oc(w,l);q=A(q,true);Pa(l,"addSeries",{options:p},function(){x=g(p);x.isDirty=true;l.isDirtyLegend=true;q&&l.redraw()})}return x};l.animation=A(z.animation,true);l.destroy=H;l.get=function(p){var q,w,x;for(q=0;q<Va.length;q++)if(Va[q].options.id===p)return Va[q];for(q=0;q<Ha.length;q++)if(Ha[q].options.id===
3045-p)return Ha[q];for(q=0;q<Ha.length;q++){x=Ha[q].data;for(w=0;w<x.length;w++)if(x[w].id===p)return x[w]}return null};l.getSelectedPoints=function(){var p=[];u(Ha,function(q){p=p.concat(Dd(q.data,function(w){return w.selected}))});return p};l.getSelectedSeries=function(){return Dd(Ha,function(p){return p.selected})};l.hideLoading=function(){gd(jc,{opacity:0},{duration:a.loading.hideDuration,complete:function(){Ja(jc,{display:jb})}});Cd=false};l.isInsidePlot=gc;l.redraw=i;l.setSize=xd;l.setTitle=m;l.showLoading=
3046-function(p){var q=a.loading;if(!jc){jc=hb(Tb,{className:"highcharts-loading"},sa(q.style,{left:X+Ua,top:ea+Ua,width:Da+Ua,height:Aa+Ua,zIndex:10,display:jb}),oa);Zd=hb("span",null,q.labelStyle,jc)}Zd.innerHTML=p||a.lang.loading;if(!Cd){Ja(jc,{opacity:0,display:""});gd(jc,{opacity:q.style.opacity},{duration:q.showDuration});Cd=true}};l.pointCount=0;l.counters=new Gd;U()}var ua=document,db=window,Fa=Math,W=Fa.round,lb=Fa.floor,md=Fa.ceil,Ia=Fa.max,tb=Fa.min,bb=Fa.abs,rb=Fa.cos,Cb=Fa.sin,kc=Fa.PI,ae=
3047-kc*2/360,yc=navigator.userAgent,Pc=/msie/i.test(yc)&&!db.opera,Mc=ua.documentMode===8,Ud=/AppleWebKit/.test(yc),Yd=/Firefox/.test(yc),Lc=!!ua.createElementNS&&!!ua.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,me=Yd&&parseInt(yc.split("Firefox/")[1],10)<4,fd,Kb=ua.documentElement.ontouchstart!==undefined,be={},wd=0,ub=1,Tc,Xa,Zc,Bc,Nc,Wa,Tb="div",ic="absolute",Xd="relative",ob="hidden",vc="highcharts-",Ab="visible",Ua="px",jb="none",Za="M",Ka="L",ce="rgba(192,192,192,"+(Lc?1.0E-6:
3048-0.0020)+")",ib="",Bb="hover",Qc,id,jd,kd,Cc,Rc,Sc,Jd,Kd,ld,Ld,Md,ma=db.HighchartsAdapter,Db=ma||{},u=Db.each,Dd=Db.grep,tc=Db.map,Ca=Db.merge,Qa=Db.addEvent,pb=Db.removeEvent,Pa=Db.fireEvent,gd=Db.animate,Hc=Db.stop,wb={};Zc=function(a,b,c){function d(P){return P.toString().replace(/^([0-9])$/,"0$1")}if(!K(b)||isNaN(b))return"Invalid date";a=A(a,"%Y-%m-%d %H:%M:%S");b=new Date(b*ub);var e,f=b[jd](),g=b[kd](),h=b[Cc](),i=b[Rc](),j=b[Sc](),m=Xa.lang,v=m.weekdays;b={a:v[g].substr(0,3),A:v[g],d:d(h),
3049-e:h,b:m.shortMonths[i],B:m.months[i],m:d(i+1),y:j.toString().substr(2,2),Y:j,H:d(f),I:d(f%12||12),l:f%12||12,M:d(b[id]()),p:f<12?"AM":"PM",P:f<12?"am":"pm",S:d(b.getSeconds())};for(e in b)a=a.replace("%"+e,b[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};Gd.prototype={wrapColor:function(a){if(this.color>=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};Nc={init:function(a,b,c){b=b||"";var d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g;b=b.split(" ");c=[].concat(c);var h,
3050-i,j=function(m){for(g=m.length;g--;)m[g]===Za&&m.splice(g+1,0,m[g+1],m[g+2],m[g+1],m[g+2])};if(e){j(b);j(c)}if(a.isArea){h=b.splice(b.length-6,6);i=c.splice(c.length-6,6)}if(d){c=[].concat(c).splice(0,f).concat(c);a.shift=false}if(b.length)for(a=c.length;b.length<a;){d=[].concat(b).splice(b.length-f,f);if(e){d[f-6]=d[f-2];d[f-5]=d[f-1]}b=b.concat(d)}if(h){b=b.concat(h);c=c.concat(i)}return[b,c]},step:function(a,b,c,d){var e=[],f=a.length;if(c===1)e=d;else if(f===b.length&&c<1)for(;f--;){d=parseFloat(a[f]);
3051-e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d}else e=b;return e}};ma&&ma.init&&ma.init(Nc);if(!ma&&db.jQuery){var Mb=jQuery;u=function(a,b){for(var c=0,d=a.length;c<d;c++)if(b.call(a[c],a[c],c,a)===false)return c};Dd=Mb.grep;tc=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)c[d]=b.call(a[d],a[d],d,a);return c};Ca=function(){var a=arguments;return Mb.extend(true,null,a[0],a[1],a[2],a[3])};Qa=function(a,b,c){Mb(a).bind(b,c)};pb=function(a,b,c){var d=ua.removeEventListener?"removeEventListener":"detachEvent";
3052-if(ua[d]&&!a[d])a[d]=function(){};Mb(a).unbind(b,c)};Pa=function(a,b,c,d){var e=Mb.Event(b),f="detached"+b;sa(e,c);if(a[b]){a[f]=a[b];a[b]=null}Mb(a).trigger(e);if(a[f]){a[b]=a[f];a[f]=null}d&&!e.isDefaultPrevented()&&d(e)};gd=function(a,b,c){var d=Mb(a);if(b.d){a.toD=b.d;b.d=1}d.stop();d.animate(b,c)};Hc=function(a){Mb(a).stop()};Mb.extend(Mb.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});var de=jQuery.fx,ee=de.step;u(["cur","_default","width","height"],function(a,b){var c=b?
3053-ee:de.prototype,d=c[a],e;if(d)c[a]=function(f){f=b?f:this;e=f.elem;return e.attr?e.attr(f.prop,f.now):d.apply(this,arguments)}});ee.d=function(a){var b=a.elem;if(!a.started){var c=Nc.init(b,b.d,b.toD);a.start=c[0];a.end=c[1];a.started=true}b.attr("d",Nc.step(a.start,a.end,a.pos,b.toD))}}ma={enabled:true,align:"center",x:0,y:15,style:{color:"#666",fontSize:"11px",lineHeight:"14px"}};Xa={colors:["#4572A7","#AA4643","#89A54E","#80699B","#3D96AE","#DB843D","#92A8CD","#A47D7C","#B5CA92"],symbols:["circle",
3054-"diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","June","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:true},chart:{borderColor:"#4572A7",
3055-borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:true,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0"},title:{text:"Chart title",align:"center",y:15,style:{color:"#3E576F",fontSize:"16px"}},subtitle:{text:"",align:"center",y:30,style:{color:"#6D869F"}},plotOptions:{line:{allowPointSelect:false,showCheckbox:false,
3056-animation:{duration:1E3},events:{},lineWidth:2,shadow:true,marker:{enabled:true,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:Ca(ma,{enabled:false,y:-6,formatter:function(){return this.y}}),showInLegend:true,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:true}},labels:{style:{position:ic,color:"#3E576F"}},legend:{enabled:true,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},
3057-borderWidth:1,borderColor:"#909090",borderRadius:5,shadow:false,style:{padding:"5px"},itemStyle:{cursor:"pointer",color:"#3E576F"},itemHoverStyle:{cursor:"pointer",color:"#000000"},itemHiddenStyle:{color:"#C0C0C0"},itemCheckboxStyle:{position:ic,width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0},loading:{hideDuration:100,labelStyle:{fontWeight:"bold",position:Xd,top:"1em"},showDuration:100,style:{position:ic,backgroundColor:"white",opacity:0.5,textAlign:"center"}},
3058-tooltip:{enabled:true,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:2,borderRadius:5,shadow:true,snap:Kb?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},toolbar:{itemStyle:{color:"#4572A7",cursor:"pointer"}},credits:{enabled:true,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var Yc={dateTimeLabelFormats:{second:"%H:%M:%S",minute:"%H:%M",
3059-hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:false,gridLineColor:"#C0C0C0",labels:ma,lineColor:"#C0D0E0",lineWidth:1,max:null,min:null,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:false,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#6D869F",
3060-fontWeight:"bold"}},type:"linear"},od=Ca(Yc,{endOnTick:true,gridLineWidth:1,tickPixelInterval:72,showLastLabel:true,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:true,tickWidth:0,title:{rotation:270,text:"Y-values"},stackLabels:{enabled:false,formatter:function(){return this.total},style:ma.style}}),ie={labels:{align:"right",x:-8,y:null},title:{rotation:270}},he={labels:{align:"left",x:8,y:null},title:{rotation:90}},Td={labels:{align:"center",x:0,y:14},title:{rotation:0}},
3061-ge=Ca(Td,{labels:{y:-5}}),xb=Xa.plotOptions;ma=xb.line;xb.spline=Ca(ma);xb.scatter=Ca(ma,{lineWidth:0,states:{hover:{lineWidth:0}}});xb.area=Ca(ma,{});xb.areaspline=Ca(xb.area);xb.column=Ca(ma,{borderColor:"#FFFFFF",borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,states:{hover:{brightness:0.1,shadow:false},select:{color:"#C0C0C0",borderColor:"#000000",shadow:false}},dataLabels:{y:null,verticalAlign:null}});xb.bar=Ca(xb.column,{dataLabels:{align:"left",x:5,
3062-y:0}});xb.pie=Ca(ma,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:true,dataLabels:{distance:30,enabled:true,formatter:function(){return this.point.name},y:5},legendType:"point",marker:null,size:"75%",showInLegend:false,slicedOffset:10,states:{hover:{brightness:0.1,shadow:false}}});Id();var bc=function(a){var b=[],c;(function(d){if(c=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(d))b=[ja(c[1]),ja(c[2]),ja(c[3]),parseFloat(c[4],
3063-10)];else if(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(d))b=[ja(c[1],16),ja(c[2],16),ja(c[3],16),1]})(a);return{get:function(d){return b&&!isNaN(b[0])?d==="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+")":d==="a"?b[3]:"rgba("+b.join(",")+")":a},brighten:function(d){if(lc(d)&&d!==0){var e;for(e=0;e<3;e++){b[e]+=ja(d*255);if(b[e]<0)b[e]=0;if(b[e]>255)b[e]=255}}return this},setOpacity:function(d){b[3]=d;return this}}};Uc.prototype={init:function(a,b){this.element=ua.createElementNS("http://www.w3.org/2000/svg",
3064-b);this.renderer=a},animate:function(a,b,c){if(b=A(b,Bc,true)){b=Ca(b);if(c)b.complete=c;gd(this,a,b)}else{this.attr(a);c&&c()}},attr:function(a,b){var c,d,e,f,g=this.element,h=g.nodeName,i=this.renderer,j,m=this.shadows,v=this.htmlNode,P,T=this;if(Sb(a)&&K(b)){c=a;a={};a[c]=b}if(Sb(a)){c=a;if(h==="circle")c={x:"cx",y:"cy"}[c]||c;else if(c==="strokeWidth")c="stroke-width";T=Ga(g,c)||this[c]||0;if(c!=="d"&&c!=="visibility")T=parseFloat(T)}else for(c in a){j=false;d=a[c];if(c==="d"){if(d&&d.join)d=
3065-d.join(" ");if(/(NaN| {2}|^$)/.test(d))d="M 0 0";this.d=d}else if(c==="x"&&h==="text"){for(e=0;e<g.childNodes.length;e++){f=g.childNodes[e];Ga(f,"x")===Ga(g,"x")&&Ga(f,"x",d)}if(this.rotation)Ga(g,"transform","rotate("+this.rotation+" "+d+" "+ja(a.y||Ga(g,"y"))+")")}else if(c==="fill")d=i.color(d,g,c);else if(h==="circle"&&(c==="x"||c==="y"))c={x:"cx",y:"cy"}[c]||c;else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="verticalAlign"){this[c]=d;this.updateTransform();j=true}else if(c===
3066-"stroke")d=i.color(d,g,c);else if(c==="dashstyle"){c="stroke-dasharray";d=d&&d.toLowerCase();if(d==="solid")d=jb;else if(d){d=d.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=d.length;e--;)d[e]=ja(d[e])*a["stroke-width"];d=d.join(",")}}else if(c==="isTracker")this[c]=d;else if(c==="width")d=ja(d);else if(c===
3067-"align"){c="text-anchor";d={left:"start",center:"middle",right:"end"}[d]}else if(c==="title"){e=ua.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(ua.createTextNode(d));g.appendChild(e)}if(c==="strokeWidth")c="stroke-width";if(Ud&&c==="stroke-width"&&d===0)d=1.0E-6;if(this.symbolName&&/^(x|y|r|start|end|innerR)/.test(c)){if(!P){this.symbolAttr(a);P=true}j=true}if(m&&/^(width|height|visibility|x|y|d)$/.test(c))for(e=m.length;e--;)Ga(m[e],c,d);if((c==="width"||c==="height")&&h===
3068-"rect"&&d<0)d=0;if(c==="text"){this.textStr=d;this.added&&i.buildText(this)}else j||Ga(g,c,d);if(v&&(c==="x"||c==="y"||c==="translateX"||c==="translateY"||c==="visibility")){e=v.length?v:[this];f=e.length;var Y;for(Y=0;Y<f;Y++){v=e[Y];j=v.getBBox();v=v.htmlNode;Ja(v,sa(this.styles,{left:j.x+(this.translateX||0)+Ua,top:j.y+(this.translateY||0)+Ua}));c==="visibility"&&Ja(v,{visibility:d})}}}return T},symbolAttr:function(a){var b=this;u(["x","y","r","start","end","width","height","innerR"],function(c){b[c]=
3069-A(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](W(b.x*2)/2,W(b.y*2)/2,b.r,{start:b.start,end:b.end,width:b.width,height:b.height,innerR:b.innerR})})},clip:function(a){return this.attr("clip-path","url("+this.renderer.url+"#"+a.id+")")},crisp:function(a,b,c,d,e){var f,g={},h={},i;a=a||this.strokeWidth||0;i=a%2/2;h.x=lb(b||this.x||0)+i;h.y=lb(c||this.y||0)+i;h.width=lb((d||this.width||0)-2*i);h.height=lb((e||this.height||0)-2*i);h.strokeWidth=a;for(f in h)if(this[f]!==h[f])this[f]=g[f]=h[f];
3070-return g},css:function(a){var b=this.element;b=a&&a.width&&b.nodeName==="text";var c,d="",e=function(f,g){return"-"+g.toLowerCase()};if(a&&a.color)a.fill=a.color;this.styles=a=sa(this.styles,a);if(Pc&&!Lc){b&&delete a.width;Ja(this.element,a)}else{for(c in a)d+=c.replace(/([A-Z])/g,e)+":"+a[c]+";";this.attr({style:d})}b&&this.added&&this.renderer.buildText(this);return this},on:function(a,b){var c=b;if(Kb&&a==="click"){a="touchstart";c=function(d){d.preventDefault();b()}}this.element["on"+a]=c;return this},
3071-translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(){this.inverted=true;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.inverted,d=this.rotation,e=[];if(c){a+=this.attr("width");b+=this.attr("height")}if(a||b)e.push("translate("+a+","+b+")");if(c)e.push("rotate(90) scale(-1,1)");else d&&e.push("rotate("+d+" "+this.x+" "+this.y+")");e.length&&Ga(this.element,"transform",e.join(" "))},toFront:function(){var a=
3072-this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){if(a){this.alignOptions=a;this.alignByTranslate=b;c||this.renderer.alignedObjects.push(this)}else{a=this.alignOptions;b=this.alignByTranslate}c=A(c,this.renderer);var d=a.align,e=a.verticalAlign,f=(c.x||0)+(a.x||0),g=(c.y||0)+(a.y||0),h={};if(/^(right|center)$/.test(d))f+=(c.width-(a.width||0))/{right:1,center:2}[d];h[b?"translateX":"x"]=W(f);if(/^(bottom|middle)$/.test(e))g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||
3073-1);h[b?"translateY":"y"]=W(g);this[this.placed?"animate":"attr"](h);this.placed=true;this.alignAttr=h;return this},getBBox:function(){var a,b,c,d=this.rotation,e=d*ae;try{a=sa({},this.element.getBBox())}catch(f){a={width:0,height:0}}b=a.width;c=a.height;if(d){a.width=bb(c*Cb(e))+bb(b*rb(e));a.height=bb(c*rb(e))+bb(b*Cb(e))}return a},show:function(){return this.attr({visibility:Ab})},hide:function(){return this.attr({visibility:ob})},add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=
3074-d.childNodes,f=this.element,g=Ga(f,"zIndex");this.parentInverted=a&&a.inverted;this.textStr!==undefined&&b.buildText(this);if(a&&this.htmlNode){if(!a.htmlNode)a.htmlNode=[];a.htmlNode.push(this)}if(g){c.handleZ=true;g=ja(g)}if(c.handleZ)for(c=0;c<e.length;c++){a=e[c];b=Ga(a,"zIndex");if(a!==f&&(ja(b)>g||!K(g)&&K(b))){d.insertBefore(f,a);return this}}d.appendChild(f);this.added=true;return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||
3075-{},c=a.shadows,d,e;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=null;Hc(a);if(a.clipPath)a.clipPath=a.clipPath.destroy();if(a.stops){for(e=0;e<a.stops.length;e++)a.stops[e]=a.stops[e].destroy();a.stops=null}a.safeRemoveChild(b);c&&u(c,function(f){a.safeRemoveChild(f)});nc(a.renderer.alignedObjects,a);for(d in a)delete a[d];return null},empty:function(){for(var a=this.element,b=a.childNodes,c=b.length;c--;)a.removeChild(b[c])},shadow:function(a,b){var c=[],d,e,f=this.element,g=this.parentInverted?
3076-"(-1,-1)":"(1,1)";if(a){for(d=1;d<=3;d++){e=f.cloneNode(0);Ga(e,{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":0.05*d,"stroke-width":7-2*d,transform:"translate"+g,fill:jb});b?b.element.appendChild(e):f.parentNode.insertBefore(e,f);c.push(e)}this.shadows=c}return this}};var ed=function(){this.init.apply(this,arguments)};ed.prototype={Element:Uc,init:function(a,b,c,d){var e=location,f;f=this.createElement("svg").attr({xmlns:"http://www.w3.org/2000/svg",version:"1.1"});a.appendChild(f.element);
3077-this.box=f.element;this.boxWrapper=f;this.alignedObjects=[];this.url=Pc?"":e.href.replace(/#.*?$/,"");this.defs=this.createElement("defs").add();this.forExport=d;this.gradients=[];this.setSize(b,c,false)},destroy:function(){var a,b=this.gradients,c=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();if(b){for(a=0;a<b.length;a++)this.gradients[a]=b[a].destroy();this.gradients=null}if(c)this.defs=c.destroy();return this.alignedObjects=null},createElement:function(a){var b=new this.Element;
3078-b.init(this,a);return b},buildText:function(a){for(var b=a.element,c=A(a.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g),d=b.childNodes,e=/style="([^"]+)"/,f=/href="([^"]+)"/,g=Ga(b,"x"),h=a.styles,i=h&&a.useHTML&&!this.forExport,j=a.htmlNode,m=h&&ja(h.width),v=h&&h.lineHeight,P,T=d.length;T--;)b.removeChild(d[T]);m&&!a.added&&
3079-this.box.appendChild(b);u(c,function(Y,H){var U,z=0,M;Y=Y.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");U=Y.split("|||");u(U,function(y){if(y!==""||U.length===1){var C={},Z=ua.createElementNS("http://www.w3.org/2000/svg","tspan");e.test(y)&&Ga(Z,"style",y.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"));if(f.test(y)){Ga(Z,"onclick",'location.href="'+y.match(f)[1]+'"');Ja(Z,{cursor:"pointer"})}y=(y.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"<").replace(/&gt;/g,">");Z.appendChild(ua.createTextNode(y));
3080-if(z)C.dx=3;else C.x=g;if(!z){if(H){!Lc&&a.renderer.forExport&&Ja(Z,{display:"block"});M=db.getComputedStyle&&ja(db.getComputedStyle(P,null).getPropertyValue("line-height"));if(!M||isNaN(M))M=v||P.offsetHeight||18;Ga(Z,"dy",M)}P=Z}Ga(Z,C);b.appendChild(Z);z++;if(m){y=y.replace(/-/g,"- ").split(" ");for(var Sa,Na=[];y.length||Na.length;){Sa=b.getBBox().width;C=Sa>m;if(!C||y.length===1){y=Na;Na=[];if(y.length){Z=ua.createElementNS("http://www.w3.org/2000/svg","tspan");Ga(Z,{dy:v||16,x:g});b.appendChild(Z);
3081-if(Sa>m)m=Sa}}else{Z.removeChild(Z.firstChild);Na.unshift(y.pop())}y.length&&Z.appendChild(ua.createTextNode(y.join(" ").replace(/- /g,"-")))}}}})});if(i){if(!j)j=a.htmlNode=hb("span",null,sa(h,{position:ic,top:0,left:0}),this.box.parentNode);j.innerHTML=a.textStr;for(T=d.length;T--;)d[T].style.visibility=ob}},crispLine:function(a,b){if(a[1]===a[4])a[1]=a[4]=W(a[1])+b%2/2;if(a[2]===a[5])a[2]=a[5]=W(a[2])+b%2/2;return a},path:function(a){return this.createElement("path").attr({d:a,fill:jb})},circle:function(a,
3082-b,c){a=Nb(a)?a:{x:a,y:b,r:c};return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){if(Nb(a)){b=a.y;c=a.r;d=a.innerR;e=a.start;f=a.end;a=a.x}return this.symbol("arc",a||0,b||0,c||0,{innerR:d||0,start:e||0,end:f||0})},rect:function(a,b,c,d,e,f){if(Nb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;a=a.x}e=this.createElement("rect").attr({rx:e,ry:e,fill:jb});return e.attr(e.crisp(f,a,b,Ia(c,0),Ia(d,0)))},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;
3083-this.height=b;for(this.boxWrapper[A(c,true)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){var b=this.createElement("g");return K(a)?b.attr({"class":vc+a}):b},image:function(a,b,c,d,e){var f={preserveAspectRatio:jb};arguments.length>1&&sa(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e){var f,
3084-g=this.symbols[a];g=g&&g(W(b),W(c),d,e);var h=/^url\((.*?)\)$/,i;if(g){f=this.path(g);sa(f,{symbolName:a,x:b,y:c,r:d});e&&sa(f,e)}else if(h.test(a)){var j=function(m,v){m.attr({width:v[0],height:v[1]}).translate(-W(v[0]/2),-W(v[1]/2))};i=a.match(h)[1];a=be[i];f=this.image(i).attr({x:b,y:c});if(a)j(f,a);else{f.attr({width:0,height:0});hb("img",{onload:function(){j(f,be[i]=[this.width,this.height])},src:i})}}else f=this.circle(b,c,d);return f},symbols:{square:function(a,b,c){c=0.707*c;return[Za,a-c,
3085-b-c,Ka,a+c,b-c,a+c,b+c,a-c,b+c,"Z"]},triangle:function(a,b,c){return[Za,a,b-1.33*c,Ka,a+c,b+0.67*c,a-c,b+0.67*c,"Z"]},"triangle-down":function(a,b,c){return[Za,a,b+1.33*c,Ka,a-c,b-0.67*c,a+c,b-0.67*c,"Z"]},diamond:function(a,b,c){return[Za,a,b-c,Ka,a+c,b,a,b+c,a-c,b,"Z"]},arc:function(a,b,c,d){var e=d.start,f=d.end-1.0E-6,g=d.innerR,h=rb(e),i=Cb(e),j=rb(f);f=Cb(f);d=d.end-e<kc?0:1;return[Za,a+c*h,b+c*i,"A",c,c,0,d,1,a+c*j,b+c*f,Ka,a+g*j,b+g*f,"A",g,g,0,d,0,a+g*h,b+g*i,"Z"]}},clipRect:function(a,b,
3086-c,d){var e=vc+wd++,f=this.createElement("clipPath").attr({id:e}).add(this.defs);a=this.rect(a,b,c,d,0).add(f);a.id=e;a.clipPath=f;return a},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f=this;b=a.linearGradient;c=vc+wd++;var g,h,i;g=f.createElement("linearGradient").attr({id:c,gradientUnits:"userSpaceOnUse",x1:b[0],y1:b[1],x2:b[2],y2:b[3]}).add(f.defs);f.gradients.push(g);g.stops=[];u(a.stops,function(j){if(e.test(j[1])){d=bc(j[1]);h=d.get("rgb");i=d.get("a")}else{h=j[1];i=1}j=
3087-f.createElement("stop").attr({offset:j[0],"stop-color":h,"stop-opacity":i}).add(g);g.stops.push(j)});return"url("+this.url+"#"+c+")"}else if(e.test(a)){d=bc(a);Ga(b,c+"-opacity",d.get("a"));return d.get("rgb")}else{b.removeAttribute(c+"-opacity");return a}},text:function(a,b,c,d){var e=Xa.chart.style;b=W(A(b,0));c=W(A(c,0));a=this.createElement("text").attr({x:b,y:c,text:a}).css({fontFamily:e.fontFamily,fontSize:e.fontSize});a.x=b;a.y=c;a.useHTML=d;return a}};fd=ed;if(!Lc){Db=yb(Uc,{init:function(a,
3088-b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ",ic,";"];if(b==="shape"||b===Tb)d.push("left:0;top:0;width:10px;height:10px;");if(Mc)d.push("visibility: ",b===Tb?ob:Ab);c.push(' style="',d.join(""),'"/>');if(b){c=b===Tb||b==="span"||b==="img"?c.join(""):a.prepVML(c);this.element=hb(c)}this.renderer=a},add:function(a){var b=this.renderer,c=this.element,d=b.box;d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);Mc&&d.gVis===ob&&Ja(c,{visibility:ob});d.appendChild(c);this.added=true;this.alignOnAdd&&
3089-this.updateTransform();return this},attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,h=f.nodeName,i=this.renderer,j=this.symbolName,m,v,P=this.shadows,T=this;if(Sb(a)&&K(b)){c=a;a={};a[c]=b}if(Sb(a)){c=a;T=c==="strokeWidth"||c==="stroke-width"?this.strokeweight:this[c]}else for(c in a){d=a[c];m=false;if(j&&/^(x|y|r|start|end|width|height|innerR)/.test(c)){if(!v){this.symbolAttr(a);v=true}m=true}else if(c==="d"){d=d||[];this.d=d.join(" ");e=d.length;for(m=[];e--;)m[e]=lc(d[e])?W(d[e]*10)-
3090-5:d[e]==="Z"?"x":d[e];d=m.join(" ")||"x";f.path=d;if(P)for(e=P.length;e--;)P[e].path=d;m=true}else if(c==="zIndex"||c==="visibility"){if(Mc&&c==="visibility"&&h==="DIV"){f.gVis=d;m=f.childNodes;for(e=m.length;e--;)Ja(m[e],{visibility:d});if(d===Ab)d=null}if(d)g[c]=d;m=true}else if(/^(width|height)$/.test(c)){this[c]=d;if(this.updateClipping){this[c]=d;this.updateClipping()}else g[c]=d;m=true}else if(/^(x|y)$/.test(c)){this[c]=d;if(f.tagName==="SPAN")this.updateTransform();else g[{x:"left",y:"top"}[c]]=
3091-d}else if(c==="class")f.className=d;else if(c==="stroke"){d=i.color(d,f,c);c="strokecolor"}else if(c==="stroke-width"||c==="strokeWidth"){f.stroked=d?true:false;c="strokeweight";this[c]=d;if(lc(d))d+=Ua}else if(c==="dashstyle"){(f.getElementsByTagName("stroke")[0]||hb(i.prepVML(["<stroke/>"]),null,null,f))[c]=d||"solid";this.dashstyle=d;m=true}else if(c==="fill")if(h==="SPAN")g.color=d;else{f.filled=d!==jb?true:false;d=i.color(d,f,c);c="fillcolor"}else if(c==="translateX"||c==="translateY"||c==="rotation"||
3092-c==="align"){if(c==="align")c="textAlign";this[c]=d;this.updateTransform();m=true}else if(c==="text"){this.bBox=null;f.innerHTML=d;m=true}if(P&&c==="visibility")for(e=P.length;e--;)P[e].style[c]=d;if(!m)if(Mc)f[c]=d;else Ga(f,c,d)}return T},clip:function(a){var b=this,c=a.members;c.push(b);b.destroyClip=function(){nc(c,b)};return b.css(a.getCSS(b.inverted))},css:function(a){var b=this.element;if(b=a&&b.tagName==="SPAN"&&a.width){delete a.width;this.textWidth=b;this.updateTransform()}this.styles=sa(this.styles,
3093-a);Ja(this.element,a);return this},safeRemoveChild:function(a){a.parentNode&&pc(a)},destroy:function(){this.destroyClip&&this.destroyClip();return Uc.prototype.destroy.apply(this)},empty:function(){for(var a=this.element.childNodes,b=a.length,c;b--;){c=a[b];c.parentNode.removeChild(c)}},getBBox:function(){var a=this.element,b=this.bBox;if(!b){if(a.nodeName==="text")a.style.position=ic;b=this.bBox={x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}}return b},on:function(a,b){this.element["on"+
3094-a]=function(){var c=db.event;c.target=c.srcElement;b(c)};return this},updateTransform:function(){if(this.added){var a=this,b=a.element,c=a.translateX||0,d=a.translateY||0,e=a.x||0,f=a.y||0,g=a.textAlign||"left",h={left:0,center:0.5,right:1}[g],i=g&&g!=="left";if(c||d)a.css({marginLeft:c,marginTop:d});a.inverted&&u(b.childNodes,function(z){a.renderer.invertChild(z,b)});if(b.tagName==="SPAN"){var j,m;c=a.rotation;var v;j=0;d=1;var P=0,T;v=ja(a.textWidth);var Y=a.xCorr||0,H=a.yCorr||0,U=[c,g,b.innerHTML,
3095-a.textWidth].join(",");if(U!==a.cTT){if(K(c)){j=c*ae;d=rb(j);P=Cb(j);Ja(b,{filter:c?["progid:DXImageTransform.Microsoft.Matrix(M11=",d,", M12=",-P,", M21=",P,", M22=",d,", sizingMethod='auto expand')"].join(""):jb})}j=b.offsetWidth;m=b.offsetHeight;if(j>v){Ja(b,{width:v+Ua,display:"block",whiteSpace:"normal"});j=v}v=W((ja(b.style.fontSize)||12)*1.2);Y=d<0&&-j;H=P<0&&-m;T=d*P<0;Y+=P*v*(T?1-h:h);H-=d*v*(c?T?h:1-h:1);if(i){Y-=j*h*(d<0?-1:1);if(c)H-=m*h*(P<0?-1:1);Ja(b,{textAlign:g})}a.xCorr=Y;a.yCorr=
3096-H}Ja(b,{left:e+Y,top:f+H});a.cTT=U}}else this.alignOnAdd=true},shadow:function(a,b){var c=[],d,e=this.element,f=this.renderer,g,h=e.style,i,j=e.path;if(j&&typeof j.value!=="string")j="x";if(a){for(d=1;d<=3;d++){i=['<shape isShadow="true" strokeweight="',7-2*d,'" filled="false" path="',j,'" coordsize="100,100" style="',e.style.cssText,'" />'];g=hb(f.prepVML(i),null,{left:ja(h.left)+1,top:ja(h.top)+1});i=['<stroke color="black" opacity="',0.05*d,'"/>'];hb(f.prepVML(i),null,null,g);b?b.element.appendChild(g):
3097-e.parentNode.insertBefore(g,e);c.push(g)}this.shadows=c}return this}});ma=function(){this.init.apply(this,arguments)};ma.prototype=Ca(ed.prototype,{Element:Db,isIE8:yc.indexOf("MSIE 8.0")>-1,init:function(a,b,c){var d;this.alignedObjects=[];d=this.createElement(Tb);a.appendChild(d.element);this.box=d.element;this.boxWrapper=d;this.setSize(b,c,false);if(!ua.namespaces.hcv){ua.namespaces.add("hcv","urn:schemas-microsoft-com:vml");ua.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}},
3098-clipRect:function(a,b,c,d){var e=this.createElement();return sa(e,{members:[],left:a,top:b,width:c,height:d,getCSS:function(f){var g=this.top,h=this.left,i=h+this.width,j=g+this.height;g={clip:"rect("+W(f?h:g)+"px,"+W(f?j:i)+"px,"+W(f?i:j)+"px,"+W(f?g:h)+"px)"};!f&&Mc&&sa(g,{width:i+Ua,height:j+Ua});return g},updateClipping:function(){u(e.members,function(f){f.css(e.getCSS(f.inverted))})}})},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f,g,h=a.linearGradient,i,j,m,v;u(a.stops,
3099-function(P,T){if(e.test(P[1])){d=bc(P[1]);f=d.get("rgb");g=d.get("a")}else{f=P[1];g=1}if(T){m=f;v=g}else{i=f;j=g}});a=90-Fa.atan((h[3]-h[1])/(h[2]-h[0]))*180/kc;a=["<",c,' colors="0% ',i,",100% ",m,'" angle="',a,'" opacity="',v,'" o:opacity2="',j,'" type="gradient" focus="100%" />'];hb(this.prepVML(a),null,null,b)}else if(e.test(a)&&b.tagName!=="IMG"){d=bc(a);a=["<",c,' opacity="',d.get("a"),'"/>'];hb(this.prepVML(a),null,null,b);return d.get("rgb")}else{b=b.getElementsByTagName(c);if(b.length)b[0].opacity=
3100-1;return a}},prepVML:function(a){var b=this.isIE8;a=a.join("");if(b){a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />');a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')}else a=a.replace("<","<hcv:");return a},text:function(a,b,c){var d=Xa.chart.style;return this.createElement("span").attr({text:a,x:W(b),y:W(c)}).css({whiteSpace:"nowrap",fontFamily:d.fontFamily,
3101-fontSize:d.fontSize})},path:function(a){return this.createElement("shape").attr({coordsize:"100 100",d:a})},circle:function(a,b,c){return this.symbol("circle").attr({x:a,y:b,r:c})},g:function(a){var b;if(a)b={className:vc+a,"class":vc+a};return this.createElement(Tb).attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});arguments.length>1&&f.css({left:b,top:c,width:d,height:e});return f},rect:function(a,b,c,d,e,f){if(Nb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;
3102-a=a.x}var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,Ia(c,0),Ia(d,0)))},invertChild:function(a,b){var c=b.style;Ja(a,{flip:"x",left:ja(c.width)-10,top:ja(c.height)-10,rotation:-90})},symbols:{arc:function(a,b,c,d){var e=d.start,f=d.end,g=rb(e),h=Cb(e),i=rb(f),j=Cb(f);d=d.innerR;var m=0.07/c,v=d&&0.1/d||0;if(f-e===0)return["x"];else if(2*kc-f+e<m)i=-m;else if(f-e<v)i=rb(e+v);return["wa",a-c,b-c,a+c,b+c,a+c*g,b+c*h,a+c*i,b+c*j,"at",a-d,b-d,a+d,b+d,a+d*i,b+d*j,a+d*g,b+d*h,"x","e"]},circle:function(a,
3103-b,c){return["wa",a-c,b-c,a+c,b+c,a+c,b,a+c,b,"e"]},rect:function(a,b,c,d){if(!K(d))return[];var e=d.width;d=d.height;var f=a+e,g=b+d;c=tb(c,e,d);return[Za,a+c,b,Ka,f-c,b,"wa",f-2*c,b,f,b+2*c,f-c,b,f,b+c,Ka,f,g-c,"wa",f-2*c,g-2*c,f,g,f,g-c,f-c,g,Ka,a+c,g,"wa",a,g-2*c,a+2*c,g,a+c,g,a,g-c,Ka,a,b+c,"wa",a,b,a+2*c,b+2*c,a,b+c,a+c,b,"x","e"]}}});fd=ma}Nd.prototype.callbacks=[];var Oc=function(){};Oc.prototype={init:function(a,b){var c=a.chart.counters,d;this.series=a;this.applyOptions(b);this.pointAttr=
3104-{};if(a.options.colorByPoint){d=a.chart.options.colors;if(!this.options)this.options={};this.color=this.options.color=this.color||d[c.color++];c.wrapColor(d.length)}a.chart.pointCount++;return this},applyOptions:function(a){var b=this.series;this.config=a;if(lc(a)||a===null)this.y=a;else if(Nb(a)&&!lc(a.length)){sa(this,a);this.options=a}else if(Sb(a[0])){this.name=a[0];this.y=a[1]}else if(lc(a[0])){this.x=a[0];this.y=a[1]}if(this.x===Wa)this.x=b.autoIncrement()},destroy:function(){var a=this,b=a.series,
3105-c=b.chart.hoverPoints,d;b.chart.pointCount--;if(c){a.setState();nc(c,a)}a===b.chart.hoverPoint&&a.onMouseOut();pb(a);u(["graphic","tracker","group","dataLabel","connector","shadowGroup"],function(e){a[e]&&a[e].destroy()});a.legendItem&&a.series.chart.legend.destroyItem(a);for(d in a)a[d]=null},getLabelConfig:function(){return{x:this.category,y:this.y,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},select:function(a,b){var c=this,d=c.series.chart;a=A(a,
3106-!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=a;c.setState(a&&"select");b||u(d.getSelectedPoints(),function(e){if(e.selected&&e!==c){e.selected=false;e.setState(ib);e.firePointEvent("unselect")}})})},onMouseOver:function(){var a=this.series.chart,b=a.tooltip,c=a.hoverPoint;c&&c!==this&&c.onMouseOut();this.firePointEvent("mouseOver");b&&!b.shared&&b.refresh(this);this.setState(Bb);a.hoverPoint=this},onMouseOut:function(){this.firePointEvent("mouseOut");this.setState();
3107-this.series.chart.hoverPoint=null},tooltipFormatter:function(a){var b=this.series;return['<span style="color:'+b.color+'">',this.name||b.name,"</span>: ",!a?"<b>x = "+(this.name||this.x)+",</b> ":"","<b>",!a?"y = ":"",this.y,"</b>"].join("")},update:function(a,b,c){var d=this,e=d.series,f=d.graphic,g=e.chart;b=A(b,true);d.firePointEvent("update",{options:a},function(){d.applyOptions(a);if(Nb(a)){e.getAttribs();f&&f.attr(d.pointAttr[e.state])}e.isDirty=true;b&&g.redraw(c)})},remove:function(a,b){var c=
3108-this,d=c.series,e=d.chart,f=d.data;oc(b,e);a=A(a,true);c.firePointEvent("remove",null,function(){nc(f,c);c.destroy();d.isDirty=true;a&&e.redraw()})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;if(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])this.importEvents();if(a==="click"&&e.allowPointSelect)c=function(f){d.select(null,f.ctrlKey||f.metaKey||f.shiftKey)};Pa(this,a,b,c)},importEvents:function(){if(!this.hasImportedEvents){var a=Ca(this.series.options.point,
3109-this.options).events,b;this.events=a;for(b in a)Qa(this,b,a[b]);this.hasImportedEvents=true}},setState:function(a){var b=this.series,c=b.options.states,d=xb[b.type].marker&&b.options.marker,e=d&&!d.enabled,f=(d=d&&d.states[a])&&d.enabled===false,g=b.stateMarkerGraphic,h=b.chart,i=this.pointAttr;a=a||ib;if(!(a===this.state||this.selected&&a!=="select"||c[a]&&c[a].enabled===false||a&&(f||e&&!d.enabled))){if(this.graphic)this.graphic.attr(i[a]);else{if(a){if(!g)b.stateMarkerGraphic=g=h.renderer.circle(0,
3110-0,i[a].r).attr(i[a]).add(b.group);g.translate(this.plotX,this.plotY)}if(g)g[a?"show":"hide"]()}this.state=a}}};var sb=function(){};sb.prototype={isCartesian:true,type:"line",pointClass:Oc,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},init:function(a,b){var c,d;d=a.series.length;this.chart=a;b=this.setOptions(b);sa(this,{index:d,options:b,name:b.name||"Series "+(d+1),state:ib,pointAttr:{},visible:b.visible!==false,selected:b.selected===true});d=b.events;
3111-for(c in d)Qa(this,c,d[c]);if(d&&d.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=true;this.getColor();this.getSymbol();this.setData(b.data,false)},autoIncrement:function(){var a=this.options,b=this.xIncrement;b=A(b,a.pointStart,0);this.pointInterval=A(this.pointInterval,a.pointInterval,1);this.xIncrement=b+this.pointInterval;return b},cleanData:function(){var a=this.chart,b=this.data,c,d,e=a.smallestInterval,f,g;Hd(b,function(h,i){return h.x-i.x});if(this.options.connectNulls)for(g=
3112-b.length-1;g>=0;g--)b[g].y===null&&b[g-1]&&b[g+1]&&b.splice(g,1);for(g=b.length-1;g>=0;g--)if(b[g-1]){f=b[g].x-b[g-1].x;if(f>0&&(d===Wa||f<d)){d=f;c=g}}if(e===Wa||d<e)a.smallestInterval=d;this.closestPoints=c},getSegments:function(){var a=-1,b=[],c=this.data;u(c,function(d,e){if(d.y===null){e>a+1&&b.push(c.slice(a+1,e));a=e}else e===c.length-1&&b.push(c.slice(a+1,e+1))});this.segments=b},setOptions:function(a){var b=this.chart.options.plotOptions;return Ca(b[this.type],b.series,a)},getColor:function(){var a=
3113-this.chart.options.colors,b=this.chart.counters;this.color=this.options.color||a[b.color++]||"#0000ff";b.wrapColor(a.length)},getSymbol:function(){var a=this.chart.options.symbols,b=this.chart.counters;this.symbol=this.options.marker.symbol||a[b.symbol++];b.wrapSymbol(a.length)},addPoint:function(a,b,c,d){var e=this.data,f=this.graph,g=this.area,h=this.chart;a=(new this.pointClass).init(this,a);oc(d,h);if(f&&c)f.shift=c;if(g){g.shift=c;g.isArea=true}b=A(b,true);e.push(a);c&&e[0].remove(false);this.getAttribs();
3114-this.isDirty=true;b&&h.redraw()},setData:function(a,b){var c=this,d=c.data,e=c.initialColor,f=c.chart,g=d&&d.length||0;c.xIncrement=null;if(K(e))f.counters.color=e;for(a=tc(zc(a||[]),function(h){return(new c.pointClass).init(c,h)});g--;)d[g].destroy();c.data=a;c.cleanData();c.getSegments();c.getAttribs();c.isDirty=true;f.isDirtyBox=true;A(b,true)&&f.redraw(false)},remove:function(a,b){var c=this,d=c.chart;a=A(a,true);if(!c.isRemoving){c.isRemoving=true;Pa(c,"remove",null,function(){c.destroy();d.isDirtyLegend=
3115-d.isDirtyBox=true;a&&d.redraw(b)})}c.isRemoving=false},translate:function(){for(var a=this.chart,b=this.options.stacking,c=this.xAxis.categories,d=this.yAxis,e=this.data,f=e.length;f--;){var g=e[f],h=g.x,i=g.y,j=g.low,m=d.stacks[(i<0?"-":"")+this.stackKey];g.plotX=this.xAxis.translate(h);if(b&&this.visible&&m&&m[h]){j=m[h];h=j.total;j.cum=j=j.cum-i;i=j+i;if(b==="percent"){j=h?j*100/h:0;i=h?i*100/h:0}g.percentage=h?g.y*100/h:0;g.stackTotal=h}if(K(j))g.yBottom=d.translate(j,0,1,0,1);if(i!==null)g.plotY=
3116-d.translate(i,0,1,0,1);g.clientX=a.inverted?a.plotHeight-g.plotX:g.plotX;g.category=c&&c[g.x]!==Wa?c[g.x]:g.x}},setTooltipPoints:function(a){var b=this.chart,c=b.inverted,d=[],e=W((c?b.plotTop:b.plotLeft)+b.plotSizeX),f,g,h=[];if(a)this.tooltipPoints=null;u(this.segments,function(i){d=d.concat(i)});if(this.xAxis&&this.xAxis.reversed)d=d.reverse();u(d,function(i,j){f=d[j-1]?d[j-1]._high+1:0;for(g=i._high=d[j+1]?lb((i.plotX+(d[j+1]?d[j+1].plotX:e))/2):e;f<=g;)h[c?e-f++:f++]=i});this.tooltipPoints=h},
3117-onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(!(!Kb&&a.mouseIsDown)){b&&b!==this&&b.onMouseOut();this.options.events.mouseOver&&Pa(this,"mouseOver");this.tracker&&this.tracker.toFront();this.setState(Bb);a.hoverSeries=this}},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;d&&d.onMouseOut();this&&a.events.mouseOut&&Pa(this,"mouseOut");c&&!a.stickyTracking&&c.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this.chart,c=this.clipRect,
3118-d=this.options.animation;if(d&&!Nb(d))d={};if(a){if(!c.isAnimating){c.attr("width",0);c.isAnimating=true}}else{c.animate({width:b.plotSizeX},d);this.animate=null}},drawPoints:function(){var a,b=this.data,c=this.chart,d,e,f,g,h,i;if(this.options.marker.enabled)for(f=b.length;f--;){g=b[f];d=g.plotX;e=g.plotY;i=g.graphic;if(e!==Wa&&!isNaN(e)){a=g.pointAttr[g.selected?"select":ib];h=a.r;if(i)i.animate({x:d,y:e,r:h});else g.graphic=c.renderer.symbol(A(g.marker&&g.marker.symbol,this.symbol),d,e,h).attr(a).add(this.group)}}},
3119-convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={};a=a||{};b=b||{};c=c||{};d=d||{};for(f in e){g=e[f];h[f]=A(a[g],b[f],c[f],d[f])}return h},getAttribs:function(){var a=this,b=xb[a.type].marker?a.options.marker:a.options,c=b.states,d=c[Bb],e,f=a.color,g={stroke:f,fill:f},h=a.data,i=[],j,m=a.pointAttrToOptions,v;if(a.options.marker){d.radius=d.radius||b.radius+2;d.lineWidth=d.lineWidth||b.lineWidth+1}else d.color=d.color||bc(d.color||f).brighten(d.brightness).get();i[ib]=a.convertAttribs(b,
3120-g);u([Bb,"select"],function(P){i[P]=a.convertAttribs(c[P],i[ib])});a.pointAttr=i;for(f=h.length;f--;){g=h[f];if((b=g.options&&g.options.marker||g.options)&&b.enabled===false)b.radius=0;e=false;if(g.options)for(v in m)if(K(b[m[v]]))e=true;if(e){j=[];c=b.states||{};e=c[Bb]=c[Bb]||{};if(!a.options.marker)e.color=bc(e.color||g.options.color).brighten(e.brightness||d.brightness).get();j[ib]=a.convertAttribs(b,i[ib]);j[Bb]=a.convertAttribs(c[Bb],i[Bb],j[ib]);j.select=a.convertAttribs(c.select,i.select,
3121-j[ib])}else j=i;g.pointAttr=j}},destroy:function(){var a=this,b=a.chart,c=a.clipRect,d=/\/5[0-9\.]+ (Safari|Mobile)\//.test(yc),e,f;Pa(a,"destroy");pb(a);a.legendItem&&a.chart.legend.destroyItem(a);u(a.data,function(g){g.destroy()});if(c&&c!==b.clipRect)a.clipRect=c.destroy();u(["area","graph","dataLabelsGroup","group","tracker"],function(g){if(a[g]){e=d&&g==="group"?"hide":"destroy";a[g][e]()}});if(b.hoverSeries===a)b.hoverSeries=null;nc(b.series,a);for(f in a)delete a[f]},drawDataLabels:function(){if(this.options.dataLabels.enabled){var a,
3122-b,c=this.data,d=this.options,e=d.dataLabels,f,g=this.dataLabelsGroup,h=this.chart,i=h.renderer,j=h.inverted,m=this.type,v;v=d.stacking;var P=m==="column"||m==="bar",T=e.verticalAlign===null,Y=e.y===null;if(P)if(v){if(T)e=Ca(e,{verticalAlign:"middle"});if(Y)e=Ca(e,{y:{top:14,middle:4,bottom:-6}[e.verticalAlign]})}else if(T)e=Ca(e,{verticalAlign:"top"});if(g)g.translate(h.plotLeft,h.plotTop);else g=this.dataLabelsGroup=i.g("data-labels").attr({visibility:this.visible?Ab:ob,zIndex:6}).translate(h.plotLeft,
3123-h.plotTop).add();v=e.color;if(v==="auto")v=null;e.style.color=A(v,this.color,"black");u(c,function(H){var U=H.barX,z=U&&U+H.barW/2||H.plotX||-999,M=A(H.plotY,-999),y=H.dataLabel,C=e.align,Z=Y?H.y>=0?-6:12:e.y;f=e.formatter.call(H.getLabelConfig());a=(j?h.plotWidth-M:z)+e.x;b=(j?h.plotHeight-z:M)+Z;if(m==="column")a+={left:-1,right:1}[C]*H.barW/2||0;if(j&&H.y<0){C="right";a-=10}if(y){if(j&&!e.y)b=b+ja(y.styles.lineHeight)*0.9-y.getBBox().height/2;y.attr({text:f}).animate({x:a,y:b})}else if(K(f)){y=
3124-H.dataLabel=i.text(f,a,b).attr({align:C,rotation:e.rotation,zIndex:1}).css(e.style).add(g);j&&!e.y&&y.attr({y:b+ja(y.styles.lineHeight)*0.9-y.getBBox().height/2})}if(P&&d.stacking&&y){z=H.barY;M=H.barW;H=H.barH;y.align(e,null,{x:j?h.plotWidth-z-H:U,y:j?h.plotHeight-U-M:z,width:j?H:M,height:j?M:H})}})}},drawGraph:function(){var a=this,b=a.options,c=a.graph,d=[],e,f=a.area,g=a.group,h=b.lineColor||a.color,i=b.lineWidth,j=b.dashStyle,m,v=a.chart.renderer,P=a.yAxis.getThreshold(b.threshold||0),T=/^area/.test(a.type),
3125-Y=[],H=[];u(a.segments,function(U){m=[];u(U,function(C,Z){if(a.getPointSpline)m.push.apply(m,a.getPointSpline(U,C,Z));else{m.push(Z?Ka:Za);Z&&b.step&&m.push(C.plotX,U[Z-1].plotY);m.push(C.plotX,C.plotY)}});if(U.length>1)d=d.concat(m);else Y.push(U[0]);if(T){var z=[],M,y=m.length;for(M=0;M<y;M++)z.push(m[M]);y===3&&z.push(Ka,m[1],m[2]);if(b.stacking&&a.type!=="areaspline")for(M=U.length-1;M>=0;M--)z.push(U[M].plotX,U[M].yBottom);else z.push(Ka,U[U.length-1].plotX,P,Ka,U[0].plotX,P);H=H.concat(z)}});
3126-a.graphPath=d;a.singlePoints=Y;if(T){e=A(b.fillColor,bc(a.color).setOpacity(b.fillOpacity||0.75).get());if(f)f.animate({d:H});else a.area=a.chart.renderer.path(H).attr({fill:e}).add(g)}if(c){Hc(c);c.animate({d:d})}else if(i){c={stroke:h,"stroke-width":i};if(j)c.dashstyle=j;a.graph=v.path(d).attr(c).add(g).shadow(b.shadow)}},render:function(){var a=this,b=a.chart,c,d,e=a.options,f=e.animation,g=f&&a.animate;f=g?f&&f.duration||500:0;var h=a.clipRect,i=b.renderer;if(!h){h=a.clipRect=!b.hasRendered&&
3127-b.clipRect?b.clipRect:i.clipRect(0,0,b.plotSizeX,b.plotSizeY);if(!b.clipRect)b.clipRect=h}if(!a.group){c=a.group=i.g("series");if(b.inverted){d=function(){c.attr({width:b.plotWidth,height:b.plotHeight}).invert()};d();Qa(b,"resize",d);Qa(a,"destroy",function(){pb(b,"resize",d)})}c.clip(a.clipRect).attr({visibility:a.visible?Ab:ob,zIndex:e.zIndex}).translate(b.plotLeft,b.plotTop).add(b.seriesGroup)}a.drawDataLabels();g&&a.animate(true);a.drawGraph&&a.drawGraph();a.drawPoints();a.options.enableMouseTracking!==
3128-false&&a.drawTracker();g&&a.animate();setTimeout(function(){h.isAnimating=false;if((c=a.group)&&h!==b.clipRect&&h.renderer){c.clip(a.clipRect=b.clipRect);h.destroy()}},f);a.isDirty=false},redraw:function(){var a=this.chart,b=this.group;if(b){a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight});b.animate({translateX:a.plotLeft,translateY:a.plotTop})}this.translate();this.setTooltipPoints(true);this.render()},setState:function(a){var b=this.options,c=this.graph,d=b.states;b=b.lineWidth;a=a||
3129-ib;if(this.state!==a){this.state=a;if(!(d[a]&&d[a].enabled===false)){if(a)b=d[a].lineWidth||b+1;if(c&&!c.dashstyle)c.attr({"stroke-width":b},a?0:500)}}},setVisible:function(a,b){var c=this.chart,d=this.legendItem,e=this.group,f=this.tracker,g=this.dataLabelsGroup,h,i=this.data,j=c.options.chart.ignoreHiddenSeries;h=this.visible;h=(this.visible=a=a===Wa?!h:a)?"show":"hide";e&&e[h]();if(f)f[h]();else for(e=i.length;e--;){f=i[e];f.tracker&&f.tracker[h]()}g&&g[h]();d&&c.legend.colorizeItem(this,a);this.isDirty=
3130-true;this.options.stacking&&u(c.series,function(m){if(m.options.stacking&&m.visible)m.isDirty=true});if(j)c.isDirtyBox=true;b!==false&&c.redraw();Pa(this,h)},show:function(){this.setVisible(true)},hide:function(){this.setVisible(false)},select:function(a){this.selected=a=a===Wa?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;Pa(this,a?"select":"unselect")},drawTracker:function(){var a=this,b=a.options,c=[].concat(a.graphPath),d=c.length,e=a.chart,f=e.options.tooltip.snap,g=a.tracker,h=b.cursor;
3131-h=h&&{cursor:h};var i=a.singlePoints,j;if(d)for(j=d+1;j--;){c[j]===Za&&c.splice(j+1,0,c[j+1]-f,c[j+2],Ka);if(j&&c[j]===Za||j===d)c.splice(j,0,Ka,c[j-2]+f,c[j-1])}for(j=0;j<i.length;j++){d=i[j];c.push(Za,d.plotX-f,d.plotY,Ka,d.plotX+f,d.plotY)}if(g)g.attr({d:c});else a.tracker=e.renderer.path(c).attr({isTracker:true,stroke:ce,fill:jb,"stroke-width":b.lineWidth+2*f,visibility:a.visible?Ab:ob,zIndex:b.zIndex||1}).on(Kb?"touchstart":"mouseover",function(){e.hoverSeries!==a&&a.onMouseOver()}).on("mouseout",
3132-function(){b.stickyTracking||a.onMouseOut()}).css(h).add(e.trackerGroup)}};ma=yb(sb);wb.line=ma;ma=yb(sb,{type:"area"});wb.area=ma;ma=yb(sb,{type:"spline",getPointSpline:function(a,b,c){var d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1],h,i,j,m;if(c&&c<a.length-1){a=f.plotY;j=g.plotX;g=g.plotY;var v;h=(1.5*d+f.plotX)/2.5;i=(1.5*e+a)/2.5;j=(1.5*d+j)/2.5;m=(1.5*e+g)/2.5;v=(m-i)*(j-d)/(j-h)+e-m;i+=v;m+=v;if(i>a&&i>e){i=Ia(a,e);m=2*e-i}else if(i<a&&i<e){i=tb(a,e);m=2*e-i}if(m>g&&m>e){m=Ia(g,e);i=2*e-m}else if(m<
3133-g&&m<e){m=tb(g,e);i=2*e-m}b.rightContX=j;b.rightContY=m}if(c){b=["C",f.rightContX||f.plotX,f.rightContY||f.plotY,h||d,i||e,d,e];f.rightContX=f.rightContY=null}else b=[Za,d,e];return b}});wb.spline=ma;ma=yb(ma,{type:"areaspline"});wb.areaspline=ma;var hd=yb(sb,{type:"column",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},init:function(){sb.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasColumn=true;b.hasRendered&&u(b.series,function(c){if(c.type===
3134-a.type)c.isDirty=true})},translate:function(){var a=this,b=a.chart,c=a.options,d=c.stacking,e=c.borderWidth,f=0,g=a.xAxis.reversed,h=a.xAxis.categories,i={},j,m;sb.prototype.translate.apply(a);u(b.series,function(C){if(C.type===a.type&&C.visible){if(C.options.stacking){j=C.stackKey;if(i[j]===Wa)i[j]=f++;m=i[j]}else m=f++;C.columnIndex=m}});var v=a.data,P=a.closestPoints;h=bb(v[1]?v[P].plotX-v[P-1].plotX:b.plotSizeX/(h&&h.length||1));P=h*c.groupPadding;var T=(h-2*P)/f,Y=c.pointWidth,H=K(Y)?(T-Y)/2:
3135-T*c.pointPadding,U=Ia(A(Y,T-2*H),1),z=H+(P+((g?f-a.columnIndex:a.columnIndex)||0)*T-h/2)*(g?-1:1),M=a.yAxis.getThreshold(c.threshold||0),y=A(c.minPointLength,5);u(v,function(C){var Z=C.plotY,Sa=C.yBottom||M,Na=C.plotX+z,Ea=md(tb(Z,Sa)),gb=md(Ia(Z,Sa)-Ea),Lb=a.yAxis.stacks[(C.y<0?"-":"")+a.stackKey],Rb;d&&a.visible&&Lb&&Lb[C.x]&&Lb[C.x].setOffset(z,U);if(bb(gb)<y){if(y){gb=y;Ea=bb(Ea-M)>y?Sa-y:M-(Z<=M?y:0)}Rb=Ea-3}sa(C,{barX:Na,barY:Ea,barW:U,barH:gb});C.shapeType="rect";Z=sa(b.renderer.Element.prototype.crisp.apply({},
3136-[e,Na,Ea,U,gb]),{r:c.borderRadius});if(e%2){Z.y-=1;Z.height+=1}C.shapeArgs=Z;C.trackerArgs=K(Rb)&&Ca(C.shapeArgs,{height:Ia(6,gb+3),y:Rb})})},getSymbol:function(){},drawGraph:function(){},drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer,d,e;u(a.data,function(f){var g=f.plotY;if(g!==Wa&&!isNaN(g)&&f.y!==null){d=f.graphic;e=f.shapeArgs;if(d){Hc(d);d.animate(e)}else f.graphic=c[f.shapeType](e).attr(f.pointAttr[f.selected?"select":ib]).add(a.group).shadow(b.shadow)}})},drawTracker:function(){var a=
3137-this,b=a.chart,c=b.renderer,d,e,f=+new Date,g=a.options,h=g.cursor,i=h&&{cursor:h},j;u(a.data,function(m){e=m.tracker;d=m.trackerArgs||m.shapeArgs;delete d.strokeWidth;if(m.y!==null)if(e)e.attr(d);else m.tracker=c[m.shapeType](d).attr({isTracker:f,fill:ce,visibility:a.visible?Ab:ob,zIndex:g.zIndex||1}).on(Kb?"touchstart":"mouseover",function(v){j=v.relatedTarget||v.fromElement;b.hoverSeries!==a&&Ga(j,"isTracker")!==f&&a.onMouseOver();m.onMouseOver()}).on("mouseout",function(v){if(!g.stickyTracking){j=
3138-v.relatedTarget||v.toElement;Ga(j,"isTracker")!==f&&a.onMouseOut()}}).css(i).add(m.group||b.trackerGroup)})},animate:function(a){var b=this,c=b.data;if(!a){u(c,function(d){var e=d.graphic;d=d.shapeArgs;if(e){e.attr({height:0,y:b.yAxis.translate(0,0,1)});e.animate({height:d.height,y:d.y},b.options.animation)}});b.animate=null}},remove:function(){var a=this,b=a.chart;b.hasRendered&&u(b.series,function(c){if(c.type===a.type)c.isDirty=true});sb.prototype.remove.apply(a,arguments)}});wb.column=hd;ma=yb(hd,
3139-{type:"bar",init:function(a){a.inverted=this.inverted=true;hd.prototype.init.apply(this,arguments)}});wb.bar=ma;ma=yb(sb,{type:"scatter",translate:function(){var a=this;sb.prototype.translate.apply(a);u(a.data,function(b){b.shapeType="circle";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){var a=this,b=a.options.cursor,c=b&&{cursor:b},d;u(a.data,function(e){(d=e.graphic)&&d.attr({isTracker:true}).on("mouseover",function(){a.onMouseOver();e.onMouseOver()}).on("mouseout",
3140-function(){a.options.stickyTracking||a.onMouseOut()}).css(c)})},cleanData:function(){}});wb.scatter=ma;ma=yb(Oc,{init:function(){Oc.prototype.init.apply(this,arguments);var a=this,b;sa(a,{visible:a.visible!==false,name:A(a.name,"Slice")});b=function(){a.slice()};Qa(a,"select",b);Qa(a,"unselect",b);return a},setVisible:function(a){var b=this.series.chart,c=this.tracker,d=this.dataLabel,e=this.connector,f=this.shadowGroup,g;g=(this.visible=a=a===Wa?!this.visible:a)?"show":"hide";this.group[g]();c&&
3141-c[g]();d&&d[g]();e&&e[g]();f&&f[g]();this.legendItem&&b.legend.colorizeItem(this,a)},slice:function(a,b,c){var d=this.series.chart,e=this.slicedTranslation;oc(c,d);A(b,true);a=this.sliced=K(a)?a:!this.sliced;a={translateX:a?e[0]:d.plotLeft,translateY:a?e[1]:d.plotTop};this.group.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}});ma=yb(sb,{type:"pie",isCartesian:false,pointClass:ma,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=
3142-this.chart.counters.color},animate:function(){var a=this;u(a.data,function(b){var c=b.graphic;b=b.shapeArgs;var d=-kc/2;if(c){c.attr({r:0,start:d,end:d});c.animate({r:b.r,start:b.start,end:b.end},a.options.animation)}});a.animate=null},translate:function(){var a=0,b=-0.25,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,f=c.center.concat([c.size,c.innerSize||0]),g=this.chart,h=g.plotWidth,i=g.plotHeight,j,m,v,P=this.data,T=2*kc,Y,H=tb(h,i),U,z,M,y=c.dataLabels.distance;f=tc(f,function(C,Z){return(U=
3143-/%$/.test(C))?[h,i,H,H][Z]*ja(C)/100:C});this.getX=function(C,Z){v=Fa.asin((C-f[1])/(f[2]/2+y));return f[0]+(Z?-1:1)*rb(v)*(f[2]/2+y)};this.center=f;u(P,function(C){a+=C.y});u(P,function(C){Y=a?C.y/a:0;j=W(b*T*1E3)/1E3;b+=Y;m=W(b*T*1E3)/1E3;C.shapeType="arc";C.shapeArgs={x:f[0],y:f[1],r:f[2]/2,innerR:f[3]/2,start:j,end:m};v=(m+j)/2;C.slicedTranslation=tc([rb(v)*d+g.plotLeft,Cb(v)*d+g.plotTop],W);z=rb(v)*f[2]/2;M=Cb(v)*f[2]/2;C.tooltipPos=[f[0]+z*0.7,f[1]+M*0.7];C.labelPos=[f[0]+z+rb(v)*y,f[1]+M+Cb(v)*
3144-y,f[0]+z+rb(v)*e,f[1]+M+Cb(v)*e,f[0]+z,f[1]+M,y<0?"center":v<T/4?"left":"right",v];C.percentage=Y*100;C.total=a});this.setTooltipPoints()},render:function(){this.drawPoints();this.options.enableMouseTracking!==false&&this.drawTracker();this.drawDataLabels();this.options.animation&&this.animate&&this.animate();this.isDirty=false},drawPoints:function(){var a=this.chart,b=a.renderer,c,d,e,f=this.options.shadow,g,h;u(this.data,function(i){d=i.graphic;h=i.shapeArgs;e=i.group;g=i.shadowGroup;if(f&&!g)g=
3145-i.shadowGroup=b.g("shadow").attr({zIndex:4}).add();if(!e)e=i.group=b.g("point").attr({zIndex:5}).add();c=i.sliced?i.slicedTranslation:[a.plotLeft,a.plotTop];e.translate(c[0],c[1]);g&&g.translate(c[0],c[1]);if(d)d.animate(h);else i.graphic=b.arc(h).attr(sa(i.pointAttr[ib],{"stroke-linejoin":"round"})).add(i.group).shadow(f,g);i.visible===false&&i.setVisible(false)})},drawDataLabels:function(){var a=this.data,b,c=this.chart,d=this.options.dataLabels,e=A(d.connectorPadding,10),f=A(d.connectorWidth,1),
3146-g,h,i=A(d.softConnector,true),j=d.distance,m=this.center,v=m[2]/2;m=m[1];var P=j>0,T=[[],[]],Y,H,U,z,M=2,y;if(d.enabled){sb.prototype.drawDataLabels.apply(this);u(a,function(gb){if(gb.dataLabel)T[gb.labelPos[7]<kc/2?0:1].push(gb)});T[1].reverse();z=function(gb,Lb){return Lb.y-gb.y};for(a=T[0][0]&&T[0][0].dataLabel&&ja(T[0][0].dataLabel.styles.lineHeight);M--;){var C=[],Z=[],Sa=T[M],Na=Sa.length,Ea;for(y=m-v-j;y<=m+v+j;y+=a)C.push(y);U=C.length;if(Na>U){h=[].concat(Sa);h.sort(z);for(y=Na;y--;)h[y].rank=
3147-y;for(y=Na;y--;)Sa[y].rank>=U&&Sa.splice(y,1);Na=Sa.length}for(y=0;y<Na;y++){b=Sa[y];h=b.labelPos;b=9999;for(H=0;H<U;H++){g=bb(C[H]-h[1]);if(g<b){b=g;Ea=H}}if(Ea<y&&C[y]!==null)Ea=y;else{if(U<Na-y+Ea&&C[y]!==null)Ea=U-Na+y;for(;C[Ea]===null;)Ea++}Z.push({i:Ea,y:C[Ea]});C[Ea]=null}Z.sort(z);for(y=0;y<Na;y++){b=Sa[y];h=b.labelPos;g=b.dataLabel;H=Z.pop();Y=h[1];U=b.visible===false?ob:Ab;Ea=H.i;H=H.y;if(Y>H&&C[Ea+1]!==null||Y<H&&C[Ea-1]!==null)H=Y;Y=this.getX(Ea===0||Ea===C.length-1?Y:H,M);g.attr({visibility:U,
3148-align:h[6]})[g.moved?"animate":"attr"]({x:Y+d.x+({left:e,right:-e}[h[6]]||0),y:H+d.y});g.moved=true;if(P&&f){g=b.connector;h=i?[Za,Y+(h[6]==="left"?5:-5),H,"C",Y,H,2*h[2]-h[4],2*h[3]-h[5],h[2],h[3],Ka,h[4],h[5]]:[Za,Y+(h[6]==="left"?5:-5),H,Ka,h[2],h[3],Ka,h[4],h[5]];if(g){g.animate({d:h});g.attr("visibility",U)}else b.connector=g=this.chart.renderer.path(h).attr({"stroke-width":f,stroke:d.connectorColor||b.color||"#606060",visibility:U,zIndex:3}).translate(c.plotLeft,c.plotTop).add()}}}}},drawTracker:hd.prototype.drawTracker,
3149-getSymbol:function(){}});wb.pie=ma;db.Highcharts={Chart:Nd,dateFormat:Zc,pathAnim:Nc,getOptions:function(){return Xa},hasRtlBug:me,numberFormat:Ed,Point:Oc,Color:bc,Renderer:fd,seriesTypes:wb,setOptions:function(a){Xa=Ca(Xa,a);Id();return Xa},Series:sb,addEvent:Qa,removeEvent:pb,createElement:hb,discardElement:pc,css:Ja,each:u,extend:sa,map:tc,merge:Ca,pick:A,extendClass:yb,product:"Highcharts",version:"2.1.9"}})();
3150
3151=== removed file 'media/js/highcharts_219/highcharts.src.js'
3152--- media/js/highcharts_219/highcharts.src.js 2011-11-18 22:51:37 +0000
3153+++ media/js/highcharts_219/highcharts.src.js 1970-01-01 00:00:00 +0000
3154@@ -1,11454 +0,0 @@
3155-// ==ClosureCompiler==
3156-// @compilation_level SIMPLE_OPTIMIZATIONS
3157-
3158-/**
3159- * @license Highcharts JS v2.1.9 (2011-11-11)
3160- *
3161- * (c) 2009-2011 Torstein Hønsi
3162- *
3163- * License: www.highcharts.com/license
3164- */
3165-
3166-// JSLint options:
3167-/*global document, window, navigator, setInterval, clearInterval, clearTimeout, setTimeout, location, jQuery, $ */
3168-
3169-(function () {
3170-// encapsulated variables
3171-var doc = document,
3172- win = window,
3173- math = Math,
3174- mathRound = math.round,
3175- mathFloor = math.floor,
3176- mathCeil = math.ceil,
3177- mathMax = math.max,
3178- mathMin = math.min,
3179- mathAbs = math.abs,
3180- mathCos = math.cos,
3181- mathSin = math.sin,
3182- mathPI = math.PI,
3183- deg2rad = mathPI * 2 / 360,
3184-
3185-
3186- // some variables
3187- userAgent = navigator.userAgent,
3188- isIE = /msie/i.test(userAgent) && !win.opera,
3189- docMode8 = doc.documentMode === 8,
3190- isWebKit = /AppleWebKit/.test(userAgent),
3191- isFirefox = /Firefox/.test(userAgent),
3192- SVG_NS = 'http://www.w3.org/2000/svg',
3193- hasSVG = !!doc.createElementNS && !!doc.createElementNS(SVG_NS, 'svg').createSVGRect,
3194- hasRtlBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4, // issue #38
3195- Renderer,
3196- hasTouch = doc.documentElement.ontouchstart !== undefined,
3197- symbolSizes = {},
3198- idCounter = 0,
3199- timeFactor = 1, // 1 = JavaScript time, 1000 = Unix time
3200- garbageBin,
3201- defaultOptions,
3202- dateFormat, // function
3203- globalAnimation,
3204- pathAnim,
3205-
3206-
3207- // some constants for frequently used strings
3208- UNDEFINED,
3209- DIV = 'div',
3210- ABSOLUTE = 'absolute',
3211- RELATIVE = 'relative',
3212- HIDDEN = 'hidden',
3213- PREFIX = 'highcharts-',
3214- VISIBLE = 'visible',
3215- PX = 'px',
3216- NONE = 'none',
3217- M = 'M',
3218- L = 'L',
3219- /*
3220- * Empirical lowest possible opacities for TRACKER_FILL
3221- * IE6: 0.002
3222- * IE7: 0.002
3223- * IE8: 0.002
3224- * IE9: 0.00000000001 (unlimited)
3225- * FF: 0.00000000001 (unlimited)
3226- * Chrome: 0.000001
3227- * Safari: 0.000001
3228- * Opera: 0.00000000001 (unlimited)
3229- */
3230- TRACKER_FILL = 'rgba(192,192,192,' + (hasSVG ? 0.000001 : 0.002) + ')', // invisible but clickable
3231- NORMAL_STATE = '',
3232- HOVER_STATE = 'hover',
3233- SELECT_STATE = 'select',
3234-
3235- // time methods, changed based on whether or not UTC is used
3236- makeTime,
3237- getMinutes,
3238- getHours,
3239- getDay,
3240- getDate,
3241- getMonth,
3242- getFullYear,
3243- setMinutes,
3244- setHours,
3245- setDate,
3246- setMonth,
3247- setFullYear,
3248-
3249- // check for a custom HighchartsAdapter defined prior to this file
3250- globalAdapter = win.HighchartsAdapter,
3251- adapter = globalAdapter || {},
3252-
3253- // Utility functions. If the HighchartsAdapter is not defined, adapter is an empty object
3254- // and all the utility functions will be null. In that case they are populated by the
3255- // default adapters below.
3256- each = adapter.each,
3257- grep = adapter.grep,
3258- map = adapter.map,
3259- merge = adapter.merge,
3260- addEvent = adapter.addEvent,
3261- removeEvent = adapter.removeEvent,
3262- fireEvent = adapter.fireEvent,
3263- animate = adapter.animate,
3264- stop = adapter.stop,
3265-
3266- // lookup over the types and the associated classes
3267- seriesTypes = {};
3268-
3269-/**
3270- * Extend an object with the members of another
3271- * @param {Object} a The object to be extended
3272- * @param {Object} b The object to add to the first one
3273- */
3274-function extend(a, b) {
3275- var n;
3276- if (!a) {
3277- a = {};
3278- }
3279- for (n in b) {
3280- a[n] = b[n];
3281- }
3282- return a;
3283-}
3284-
3285-/**
3286- * Shortcut for parseInt
3287- * @param {Object} s
3288- */
3289-function pInt(s, mag) {
3290- return parseInt(s, mag || 10);
3291-}
3292-
3293-/**
3294- * Check for string
3295- * @param {Object} s
3296- */
3297-function isString(s) {
3298- return typeof s === 'string';
3299-}
3300-
3301-/**
3302- * Check for object
3303- * @param {Object} obj
3304- */
3305-function isObject(obj) {
3306- return typeof obj === 'object';
3307-}
3308-
3309-/**
3310- * Check for array
3311- * @param {Object} obj
3312- */
3313-function isArray(obj) {
3314- return Object.prototype.toString.call(obj) === '[object Array]';
3315-}
3316-
3317-/**
3318- * Check for number
3319- * @param {Object} n
3320- */
3321-function isNumber(n) {
3322- return typeof n === 'number';
3323-}
3324-
3325-function log2lin(num) {
3326- return math.log(num) / math.LN10;
3327-}
3328-function lin2log(num) {
3329- return math.pow(10, num);
3330-}
3331-
3332-/**
3333- * Remove last occurence of an item from an array
3334- * @param {Array} arr
3335- * @param {Mixed} item
3336- */
3337-function erase(arr, item) {
3338- var i = arr.length;
3339- while (i--) {
3340- if (arr[i] === item) {
3341- arr.splice(i, 1);
3342- break;
3343- }
3344- }
3345- //return arr;
3346-}
3347-
3348-/**
3349- * Returns true if the object is not null or undefined. Like MooTools' $.defined.
3350- * @param {Object} obj
3351- */
3352-function defined(obj) {
3353- return obj !== UNDEFINED && obj !== null;
3354-}
3355-
3356-/**
3357- * Set or get an attribute or an object of attributes. Can't use jQuery attr because
3358- * it attempts to set expando properties on the SVG element, which is not allowed.
3359- *
3360- * @param {Object} elem The DOM element to receive the attribute(s)
3361- * @param {String|Object} prop The property or an abject of key-value pairs
3362- * @param {String} value The value if a single property is set
3363- */
3364-function attr(elem, prop, value) {
3365- var key,
3366- setAttribute = 'setAttribute',
3367- ret;
3368-
3369- // if the prop is a string
3370- if (isString(prop)) {
3371- // set the value
3372- if (defined(value)) {
3373-
3374- elem[setAttribute](prop, value);
3375-
3376- // get the value
3377- } else if (elem && elem.getAttribute) { // elem not defined when printing pie demo...
3378- ret = elem.getAttribute(prop);
3379- }
3380-
3381- // else if prop is defined, it is a hash of key/value pairs
3382- } else if (defined(prop) && isObject(prop)) {
3383- for (key in prop) {
3384- elem[setAttribute](key, prop[key]);
3385- }
3386- }
3387- return ret;
3388-}
3389-/**
3390- * Check if an element is an array, and if not, make it into an array. Like
3391- * MooTools' $.splat.
3392- */
3393-function splat(obj) {
3394- return isArray(obj) ? obj : [obj];
3395-}
3396-
3397-
3398-/**
3399- * Return the first value that is defined. Like MooTools' $.pick.
3400- */
3401-function pick() {
3402- var args = arguments,
3403- i,
3404- arg,
3405- length = args.length;
3406- for (i = 0; i < length; i++) {
3407- arg = args[i];
3408- if (typeof arg !== 'undefined' && arg !== null) {
3409- return arg;
3410- }
3411- }
3412-}
3413-
3414-/**
3415- * Set CSS on a given element
3416- * @param {Object} el
3417- * @param {Object} styles Style object with camel case property names
3418- */
3419-function css(el, styles) {
3420- if (isIE) {
3421- if (styles && styles.opacity !== UNDEFINED) {
3422- styles.filter = 'alpha(opacity=' + (styles.opacity * 100) + ')';
3423- }
3424- }
3425- extend(el.style, styles);
3426-}
3427-
3428-/**
3429- * Utility function to create element with attributes and styles
3430- * @param {Object} tag
3431- * @param {Object} attribs
3432- * @param {Object} styles
3433- * @param {Object} parent
3434- * @param {Object} nopad
3435- */
3436-function createElement(tag, attribs, styles, parent, nopad) {
3437- var el = doc.createElement(tag);
3438- if (attribs) {
3439- extend(el, attribs);
3440- }
3441- if (nopad) {
3442- css(el, {padding: 0, border: NONE, margin: 0});
3443- }
3444- if (styles) {
3445- css(el, styles);
3446- }
3447- if (parent) {
3448- parent.appendChild(el);
3449- }
3450- return el;
3451-}
3452-
3453-/**
3454- * Extend a prototyped class by new members
3455- * @param {Object} parent
3456- * @param {Object} members
3457- */
3458-function extendClass(parent, members) {
3459- var object = function () {};
3460- object.prototype = new parent();
3461- extend(object.prototype, members);
3462- return object;
3463-}
3464-
3465-/**
3466- * Format a number and return a string based on input settings
3467- * @param {Number} number The input number to format
3468- * @param {Number} decimals The amount of decimals
3469- * @param {String} decPoint The decimal point, defaults to the one given in the lang options
3470- * @param {String} thousandsSep The thousands separator, defaults to the one given in the lang options
3471- */
3472-function numberFormat(number, decimals, decPoint, thousandsSep) {
3473- var lang = defaultOptions.lang,
3474- // http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_number_format/
3475- n = number,
3476- c = isNaN(decimals = mathAbs(decimals)) ? 2 : decimals,
3477- d = decPoint === undefined ? lang.decimalPoint : decPoint,
3478- t = thousandsSep === undefined ? lang.thousandsSep : thousandsSep,
3479- s = n < 0 ? "-" : "",
3480- i = String(pInt(n = mathAbs(+n || 0).toFixed(c))),
3481- j = i.length > 3 ? i.length % 3 : 0;
3482-
3483- return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) +
3484- (c ? d + mathAbs(n - i).toFixed(c).slice(2) : "");
3485-}
3486-
3487-/**
3488- * Based on http://www.php.net/manual/en/function.strftime.php
3489- * @param {String} format
3490- * @param {Number} timestamp
3491- * @param {Boolean} capitalize
3492- */
3493-dateFormat = function (format, timestamp, capitalize) {
3494- function pad(number) {
3495- return number.toString().replace(/^([0-9])$/, '0$1');
3496- }
3497-
3498- if (!defined(timestamp) || isNaN(timestamp)) {
3499- return 'Invalid date';
3500- }
3501- format = pick(format, '%Y-%m-%d %H:%M:%S');
3502-
3503- var date = new Date(timestamp * timeFactor),
3504- key, // used in for constuct below
3505- // get the basic time values
3506- hours = date[getHours](),
3507- day = date[getDay](),
3508- dayOfMonth = date[getDate](),
3509- month = date[getMonth](),
3510- fullYear = date[getFullYear](),
3511- lang = defaultOptions.lang,
3512- langWeekdays = lang.weekdays,
3513- /* // uncomment this and the 'W' format key below to enable week numbers
3514- weekNumber = function() {
3515- var clone = new Date(date.valueOf()),
3516- day = clone[getDay]() == 0 ? 7 : clone[getDay](),
3517- dayNumber;
3518- clone.setDate(clone[getDate]() + 4 - day);
3519- dayNumber = mathFloor((clone.getTime() - new Date(clone[getFullYear](), 0, 1, -6)) / 86400000);
3520- return 1 + mathFloor(dayNumber / 7);
3521- },
3522- */
3523-
3524- // list all format keys
3525- replacements = {
3526-
3527- // Day
3528- 'a': langWeekdays[day].substr(0, 3), // Short weekday, like 'Mon'
3529- 'A': langWeekdays[day], // Long weekday, like 'Monday'
3530- 'd': pad(dayOfMonth), // Two digit day of the month, 01 to 31
3531- 'e': dayOfMonth, // Day of the month, 1 through 31
3532-
3533- // Week (none implemented)
3534- //'W': weekNumber(),
3535-
3536- // Month
3537- 'b': lang.shortMonths[month], // Short month, like 'Jan'
3538- 'B': lang.months[month], // Long month, like 'January'
3539- 'm': pad(month + 1), // Two digit month number, 01 through 12
3540-
3541- // Year
3542- 'y': fullYear.toString().substr(2, 2), // Two digits year, like 09 for 2009
3543- 'Y': fullYear, // Four digits year, like 2009
3544-
3545- // Time
3546- 'H': pad(hours), // Two digits hours in 24h format, 00 through 23
3547- 'I': pad((hours % 12) || 12), // Two digits hours in 12h format, 00 through 11
3548- 'l': (hours % 12) || 12, // Hours in 12h format, 1 through 12
3549- 'M': pad(date[getMinutes]()), // Two digits minutes, 00 through 59
3550- 'p': hours < 12 ? 'AM' : 'PM', // Upper case AM or PM
3551- 'P': hours < 12 ? 'am' : 'pm', // Lower case AM or PM
3552- 'S': pad(date.getSeconds()) // Two digits seconds, 00 through 59
3553-
3554- };
3555-
3556-
3557- // do the replaces
3558- for (key in replacements) {
3559- format = format.replace('%' + key, replacements[key]);
3560- }
3561-
3562- // Optionally capitalize the string and return
3563- return capitalize ? format.substr(0, 1).toUpperCase() + format.substr(1) : format;
3564-};
3565-
3566-/**
3567- * Loop up the node tree and add offsetWidth and offsetHeight to get the
3568- * total page offset for a given element. Used by Opera and iOS on hover and
3569- * all browsers on point click.
3570- *
3571- * @param {Object} el
3572- *
3573- */
3574-function getPosition(el) {
3575- var p = { left: el.offsetLeft, top: el.offsetTop };
3576- el = el.offsetParent;
3577- while (el) {
3578- p.left += el.offsetLeft;
3579- p.top += el.offsetTop;
3580- if (el !== doc.body && el !== doc.documentElement) {
3581- p.left -= el.scrollLeft;
3582- p.top -= el.scrollTop;
3583- }
3584- el = el.offsetParent;
3585- }
3586- return p;
3587-}
3588-
3589-/**
3590- * Helper class that contains variuos counters that are local to the chart.
3591- */
3592-function ChartCounters() {
3593- this.color = 0;
3594- this.symbol = 0;
3595-}
3596-
3597-ChartCounters.prototype = {
3598- /**
3599- * Wraps the color counter if it reaches the specified length.
3600- */
3601- wrapColor: function (length) {
3602- if (this.color >= length) {
3603- this.color = 0;
3604- }
3605- },
3606-
3607- /**
3608- * Wraps the symbol counter if it reaches the specified length.
3609- */
3610- wrapSymbol: function (length) {
3611- if (this.symbol >= length) {
3612- this.symbol = 0;
3613- }
3614- }
3615-};
3616-
3617-/**
3618- * Utility method extracted from Tooltip code that places a tooltip in a chart without spilling over
3619- * and not covering the point it self.
3620- */
3621-function placeBox(boxWidth, boxHeight, outerLeft, outerTop, outerWidth, outerHeight, point) {
3622- // keep the box within the chart area
3623- var pointX = point.x,
3624- pointY = point.y,
3625- x = pointX - boxWidth + outerLeft - 25,
3626- y = pointY - boxHeight + outerTop + 10,
3627- alignedRight;
3628-
3629- // it is too far to the left, adjust it
3630- if (x < 7) {
3631- x = outerLeft + pointX + 15;
3632- }
3633-
3634- // Test to see if the tooltip is to far to the right,
3635- // if it is, move it back to be inside and then up to not cover the point.
3636- if ((x + boxWidth) > (outerLeft + outerWidth)) {
3637- x -= (x + boxWidth) - (outerLeft + outerWidth);
3638- y -= boxHeight;
3639- alignedRight = true;
3640- }
3641-
3642- if (y < 5) {
3643- y = 5; // above
3644-
3645- // If the tooltip is still covering the point, move it below instead
3646- if (alignedRight && pointY >= y && pointY <= (y + boxHeight)) {
3647- y = pointY + boxHeight - 5; // below
3648- }
3649- } else if (y + boxHeight > outerTop + outerHeight) {
3650- y = outerTop + outerHeight - boxHeight - 5; // below
3651- }
3652-
3653- return {x: x, y: y};
3654-}
3655-
3656-/**
3657- * Utility method that sorts an object array and keeping the order of equal items.
3658- * ECMA script standard does not specify the behaviour when items are equal.
3659- */
3660-function stableSort(arr, sortFunction) {
3661- var length = arr.length,
3662- i;
3663-
3664- // Add index to each item
3665- for (i = 0; i < length; i++) {
3666- arr[i].ss_i = i; // stable sort index
3667- }
3668-
3669- arr.sort(function (a, b) {
3670- var sortValue = sortFunction(a, b);
3671- return sortValue === 0 ? a.ss_i - b.ss_i : sortValue;
3672- });
3673-
3674- // Remove index from items
3675- for (i = 0; i < length; i++) {
3676- delete arr[i].ss_i; // stable sort index
3677- }
3678-}
3679-
3680-/**
3681- * Utility method that destroys any SVGElement or VMLElement that are properties on the given object.
3682- * It loops all properties and invokes destroy if there is a destroy method. The property is
3683- * then delete'ed.
3684- */
3685-function destroyObjectProperties(obj) {
3686- var n;
3687- for (n in obj) {
3688- // If the object is non-null and destroy is defined
3689- if (obj[n] && obj[n].destroy) {
3690- // Invoke the destroy
3691- obj[n].destroy();
3692- }
3693-
3694- // Delete the property from the object.
3695- delete obj[n];
3696- }
3697-}
3698-
3699-/**
3700- * Path interpolation algorithm used across adapters
3701- */
3702-pathAnim = {
3703- /**
3704- * Prepare start and end values so that the path can be animated one to one
3705- */
3706- init: function (elem, fromD, toD) {
3707- fromD = fromD || '';
3708- var shift = elem.shift,
3709- bezier = fromD.indexOf('C') > -1,
3710- numParams = bezier ? 7 : 3,
3711- endLength,
3712- slice,
3713- i,
3714- start = fromD.split(' '),
3715- end = [].concat(toD), // copy
3716- startBaseLine,
3717- endBaseLine,
3718- sixify = function (arr) { // in splines make move points have six parameters like bezier curves
3719- i = arr.length;
3720- while (i--) {
3721- if (arr[i] === M) {
3722- arr.splice(i + 1, 0, arr[i + 1], arr[i + 2], arr[i + 1], arr[i + 2]);
3723- }
3724- }
3725- };
3726-
3727- if (bezier) {
3728- sixify(start);
3729- sixify(end);
3730- }
3731-
3732- // pull out the base lines before padding
3733- if (elem.isArea) {
3734- startBaseLine = start.splice(start.length - 6, 6);
3735- endBaseLine = end.splice(end.length - 6, 6);
3736- }
3737-
3738- // if shifting points, prepend a dummy point to the end path
3739- if (shift) {
3740-
3741- end = [].concat(end).splice(0, numParams).concat(end);
3742- elem.shift = false; // reset for following animations
3743- }
3744-
3745- // copy and append last point until the length matches the end length
3746- if (start.length) {
3747- endLength = end.length;
3748- while (start.length < endLength) {
3749-
3750- //bezier && sixify(start);
3751- slice = [].concat(start).splice(start.length - numParams, numParams);
3752- if (bezier) { // disable first control point
3753- slice[numParams - 6] = slice[numParams - 2];
3754- slice[numParams - 5] = slice[numParams - 1];
3755- }
3756- start = start.concat(slice);
3757- }
3758- }
3759-
3760- if (startBaseLine) { // append the base lines for areas
3761- start = start.concat(startBaseLine);
3762- end = end.concat(endBaseLine);
3763- }
3764- return [start, end];
3765- },
3766-
3767- /**
3768- * Interpolate each value of the path and return the array
3769- */
3770- step: function (start, end, pos, complete) {
3771- var ret = [],
3772- i = start.length,
3773- startVal;
3774-
3775- if (pos === 1) { // land on the final path without adjustment points appended in the ends
3776- ret = complete;
3777-
3778- } else if (i === end.length && pos < 1) {
3779- while (i--) {
3780- startVal = parseFloat(start[i]);
3781- ret[i] =
3782- isNaN(startVal) ? // a letter instruction like M or L
3783- start[i] :
3784- pos * (parseFloat(end[i] - startVal)) + startVal;
3785-
3786- }
3787- } else { // if animation is finished or length not matching, land on right value
3788- ret = end;
3789- }
3790- return ret;
3791- }
3792-};
3793-
3794-
3795-/**
3796- * Set the global animation to either a given value, or fall back to the
3797- * given chart's animation option
3798- * @param {Object} animation
3799- * @param {Object} chart
3800- */
3801-function setAnimation(animation, chart) {
3802- globalAnimation = pick(animation, chart.animation);
3803-}
3804-
3805-/*
3806- * Define the adapter for frameworks. If an external adapter is not defined,
3807- * Highcharts reverts to the built-in jQuery adapter.
3808- */
3809-if (globalAdapter && globalAdapter.init) {
3810- // Initialize the adapter with the pathAnim object that takes care
3811- // of path animations.
3812- globalAdapter.init(pathAnim);
3813-}
3814-if (!globalAdapter && win.jQuery) {
3815- var jQ = jQuery;
3816-
3817- /**
3818- * Utility for iterating over an array. Parameters are reversed compared to jQuery.
3819- * @param {Array} arr
3820- * @param {Function} fn
3821- */
3822- each = function (arr, fn) {
3823- var i = 0,
3824- len = arr.length;
3825- for (; i < len; i++) {
3826- if (fn.call(arr[i], arr[i], i, arr) === false) {
3827- return i;
3828- }
3829- }
3830- };
3831-
3832- /**
3833- * Filter an array
3834- */
3835- grep = jQ.grep;
3836-
3837- /**
3838- * Map an array
3839- * @param {Array} arr
3840- * @param {Function} fn
3841- */
3842- map = function (arr, fn) {
3843- //return jQuery.map(arr, fn);
3844- var results = [],
3845- i = 0,
3846- len = arr.length;
3847- for (; i < len; i++) {
3848- results[i] = fn.call(arr[i], arr[i], i, arr);
3849- }
3850- return results;
3851-
3852- };
3853-
3854- /**
3855- * Deep merge two objects and return a third object
3856- */
3857- merge = function () {
3858- var args = arguments;
3859- return jQ.extend(true, null, args[0], args[1], args[2], args[3]);
3860- };
3861-
3862- /**
3863- * Add an event listener
3864- * @param {Object} el A HTML element or custom object
3865- * @param {String} event The event type
3866- * @param {Function} fn The event handler
3867- */
3868- addEvent = function (el, event, fn) {
3869- jQ(el).bind(event, fn);
3870- };
3871-
3872- /**
3873- * Remove event added with addEvent
3874- * @param {Object} el The object
3875- * @param {String} eventType The event type. Leave blank to remove all events.
3876- * @param {Function} handler The function to remove
3877- */
3878- removeEvent = function (el, eventType, handler) {
3879- // workaround for jQuery issue with unbinding custom events:
3880- // http://forum.jquery.com/topic/javascript-error-when-unbinding-a-custom-event-using-jquery-1-4-2
3881- var func = doc.removeEventListener ? 'removeEventListener' : 'detachEvent';
3882- if (doc[func] && !el[func]) {
3883- el[func] = function () {};
3884- }
3885-
3886- jQ(el).unbind(eventType, handler);
3887- };
3888-
3889- /**
3890- * Fire an event on a custom object
3891- * @param {Object} el
3892- * @param {String} type
3893- * @param {Object} eventArguments
3894- * @param {Function} defaultFunction
3895- */
3896- fireEvent = function (el, type, eventArguments, defaultFunction) {
3897- var event = jQ.Event(type),
3898- detachedType = 'detached' + type;
3899- extend(event, eventArguments);
3900-
3901- // Prevent jQuery from triggering the object method that is named the
3902- // same as the event. For example, if the event is 'select', jQuery
3903- // attempts calling el.select and it goes into a loop.
3904- if (el[type]) {
3905- el[detachedType] = el[type];
3906- el[type] = null;
3907- }
3908-
3909- // trigger it
3910- jQ(el).trigger(event);
3911-
3912- // attach the method
3913- if (el[detachedType]) {
3914- el[type] = el[detachedType];
3915- el[detachedType] = null;
3916- }
3917-
3918- if (defaultFunction && !event.isDefaultPrevented()) {
3919- defaultFunction(event);
3920- }
3921- };
3922-
3923- /**
3924- * Animate a HTML element or SVG element wrapper
3925- * @param {Object} el
3926- * @param {Object} params
3927- * @param {Object} options jQuery-like animation options: duration, easing, callback
3928- */
3929- animate = function (el, params, options) {
3930- var $el = jQ(el);
3931- if (params.d) {
3932- el.toD = params.d; // keep the array form for paths, used in jQ.fx.step.d
3933- params.d = 1; // because in jQuery, animating to an array has a different meaning
3934- }
3935-
3936- $el.stop();
3937- $el.animate(params, options);
3938-
3939- };
3940- /**
3941- * Stop running animation
3942- */
3943- stop = function (el) {
3944- jQ(el).stop();
3945- };
3946-
3947-
3948- //=== Extend jQuery on init
3949-
3950- /*jslint unparam: true*//* allow unused param x in this function */
3951- jQ.extend(jQ.easing, {
3952- easeOutQuad: function (x, t, b, c, d) {
3953- return -c * (t /= d) * (t - 2) + b;
3954- }
3955- });
3956- /*jslint unparam: false*/
3957-
3958- // extend the animate function to allow SVG animations
3959- var jFx = jQuery.fx,
3960- jStep = jFx.step;
3961-
3962- // extend some methods to check for elem.attr, which means it is a Highcharts SVG object
3963- each(['cur', '_default', 'width', 'height'], function (fn, i) {
3964- var obj = i ? jStep : jFx.prototype, // 'cur', the getter' relates to jFx.prototype
3965- base = obj[fn],
3966- elem;
3967-
3968- if (base) { // step.width and step.height don't exist in jQuery < 1.7
3969-
3970- // create the extended function replacement
3971- obj[fn] = function (fx) {
3972-
3973- // jFx.prototype.cur does not use fx argument
3974- fx = i ? fx : this;
3975-
3976- // shortcut
3977- elem = fx.elem;
3978-
3979- // jFX.prototype.cur returns the current value. The other ones are setters
3980- // and returning a value has no effect.
3981- return elem.attr ? // is SVG element wrapper
3982- elem.attr(fx.prop, fx.now) : // apply the SVG wrapper's method
3983- base.apply(this, arguments); // use jQuery's built-in method
3984- };
3985- }
3986- });
3987-
3988- // animate paths
3989- jStep.d = function (fx) {
3990- var elem = fx.elem;
3991-
3992-
3993- // Normally start and end should be set in state == 0, but sometimes,
3994- // for reasons unknown, this doesn't happen. Perhaps state == 0 is skipped
3995- // in these cases
3996- if (!fx.started) {
3997- var ends = pathAnim.init(elem, elem.d, elem.toD);
3998- fx.start = ends[0];
3999- fx.end = ends[1];
4000- fx.started = true;
4001- }
4002-
4003-
4004- // interpolate each value of the path
4005- elem.attr('d', pathAnim.step(fx.start, fx.end, fx.pos, elem.toD));
4006-
4007- };
4008-}
4009-
4010-
4011-/**
4012- * Add a global listener for mousemove events
4013- */
4014-/*addEvent(doc, 'mousemove', function(e) {
4015- if (globalMouseMove) {
4016- globalMouseMove(e);
4017- }
4018-});*/
4019-/**
4020- * Set the time methods globally based on the useUTC option. Time method can be either
4021- * local time or UTC (default).
4022- */
4023-function setTimeMethods() {
4024- var useUTC = defaultOptions.global.useUTC;
4025-
4026- makeTime = useUTC ? Date.UTC : function (year, month, date, hours, minutes, seconds) {
4027- return new Date(
4028- year,
4029- month,
4030- pick(date, 1),
4031- pick(hours, 0),
4032- pick(minutes, 0),
4033- pick(seconds, 0)
4034- ).getTime();
4035- };
4036- getMinutes = useUTC ? 'getUTCMinutes' : 'getMinutes';
4037- getHours = useUTC ? 'getUTCHours' : 'getHours';
4038- getDay = useUTC ? 'getUTCDay' : 'getDay';
4039- getDate = useUTC ? 'getUTCDate' : 'getDate';
4040- getMonth = useUTC ? 'getUTCMonth' : 'getMonth';
4041- getFullYear = useUTC ? 'getUTCFullYear' : 'getFullYear';
4042- setMinutes = useUTC ? 'setUTCMinutes' : 'setMinutes';
4043- setHours = useUTC ? 'setUTCHours' : 'setHours';
4044- setDate = useUTC ? 'setUTCDate' : 'setDate';
4045- setMonth = useUTC ? 'setUTCMonth' : 'setMonth';
4046- setFullYear = useUTC ? 'setUTCFullYear' : 'setFullYear';
4047-
4048-}
4049-
4050-/**
4051- * Merge the default options with custom options and return the new options structure
4052- * @param {Object} options The new custom options
4053- */
4054-function setOptions(options) {
4055- defaultOptions = merge(defaultOptions, options);
4056-
4057- // apply UTC
4058- setTimeMethods();
4059-
4060- return defaultOptions;
4061-}
4062-
4063-/**
4064- * Get the updated default options. Merely exposing defaultOptions for outside modules
4065- * isn't enough because the setOptions method creates a new object.
4066- */
4067-function getOptions() {
4068- return defaultOptions;
4069-}
4070-
4071-/**
4072- * Discard an element by moving it to the bin and delete
4073- * @param {Object} The HTML node to discard
4074- */
4075-function discardElement(element) {
4076- // create a garbage bin element, not part of the DOM
4077- if (!garbageBin) {
4078- garbageBin = createElement(DIV);
4079- }
4080-
4081- // move the node and empty bin
4082- if (element) {
4083- garbageBin.appendChild(element);
4084- }
4085- garbageBin.innerHTML = '';
4086-}
4087-
4088-/* ****************************************************************************
4089- * Handle the options *
4090- *****************************************************************************/
4091-var
4092-
4093-defaultLabelOptions = {
4094- enabled: true,
4095- // rotation: 0,
4096- align: 'center',
4097- x: 0,
4098- y: 15,
4099- /*formatter: function() {
4100- return this.value;
4101- },*/
4102- style: {
4103- color: '#666',
4104- fontSize: '11px',
4105- lineHeight: '14px'
4106- }
4107-};
4108-
4109-defaultOptions = {
4110- colors: ['#4572A7', '#AA4643', '#89A54E', '#80699B', '#3D96AE',
4111- '#DB843D', '#92A8CD', '#A47D7C', '#B5CA92'],
4112- symbols: ['circle', 'diamond', 'square', 'triangle', 'triangle-down'],
4113- lang: {
4114- loading: 'Loading...',
4115- months: ['January', 'February', 'March', 'April', 'May', 'June', 'July',
4116- 'August', 'September', 'October', 'November', 'December'],
4117- shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
4118- weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
4119- decimalPoint: '.',
4120- resetZoom: 'Reset zoom',
4121- resetZoomTitle: 'Reset zoom level 1:1',
4122- thousandsSep: ','
4123- },
4124- global: {
4125- useUTC: true
4126- },
4127- chart: {
4128- //animation: true,
4129- //alignTicks: false,
4130- //reflow: true,
4131- //className: null,
4132- //events: { load, selection },
4133- //margin: [null],
4134- //marginTop: null,
4135- //marginRight: null,
4136- //marginBottom: null,
4137- //marginLeft: null,
4138- borderColor: '#4572A7',
4139- //borderWidth: 0,
4140- borderRadius: 5,
4141- defaultSeriesType: 'line',
4142- ignoreHiddenSeries: true,
4143- //inverted: false,
4144- //shadow: false,
4145- spacingTop: 10,
4146- spacingRight: 10,
4147- spacingBottom: 15,
4148- spacingLeft: 10,
4149- style: {
4150- fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif', // default font
4151- fontSize: '12px'
4152- },
4153- backgroundColor: '#FFFFFF',
4154- //plotBackgroundColor: null,
4155- plotBorderColor: '#C0C0C0'
4156- //plotBorderWidth: 0,
4157- //plotShadow: false,
4158- //zoomType: ''
4159- },
4160- title: {
4161- text: 'Chart title',
4162- align: 'center',
4163- // floating: false,
4164- // margin: 15,
4165- // x: 0,
4166- // verticalAlign: 'top',
4167- y: 15,
4168- style: {
4169- color: '#3E576F',
4170- fontSize: '16px'
4171- }
4172-
4173- },
4174- subtitle: {
4175- text: '',
4176- align: 'center',
4177- // floating: false
4178- // x: 0,
4179- // verticalAlign: 'top',
4180- y: 30,
4181- style: {
4182- color: '#6D869F'
4183- }
4184- },
4185-
4186- plotOptions: {
4187- line: { // base series options
4188- allowPointSelect: false,
4189- showCheckbox: false,
4190- animation: {
4191- duration: 1000
4192- },
4193- //connectNulls: false,
4194- //cursor: 'default',
4195- //dashStyle: null,
4196- //enableMouseTracking: true,
4197- events: {},
4198- //legendIndex: 0,
4199- lineWidth: 2,
4200- shadow: true,
4201- // stacking: null,
4202- marker: {
4203- enabled: true,
4204- //symbol: null,
4205- lineWidth: 0,
4206- radius: 4,
4207- lineColor: '#FFFFFF',
4208- //fillColor: null,
4209- states: { // states for a single point
4210- hover: {
4211- //radius: base + 2
4212- },
4213- select: {
4214- fillColor: '#FFFFFF',
4215- lineColor: '#000000',
4216- lineWidth: 2
4217- }
4218- }
4219- },
4220- point: {
4221- events: {}
4222- },
4223- dataLabels: merge(defaultLabelOptions, {
4224- enabled: false,
4225- y: -6,
4226- formatter: function () {
4227- return this.y;
4228- }
4229- }),
4230-
4231- //pointStart: 0,
4232- //pointInterval: 1,
4233- showInLegend: true,
4234- states: { // states for the entire series
4235- hover: {
4236- //enabled: false,
4237- //lineWidth: base + 1,
4238- marker: {
4239- // lineWidth: base + 1,
4240- // radius: base + 1
4241- }
4242- },
4243- select: {
4244- marker: {}
4245- }
4246- },
4247- stickyTracking: true
4248- //zIndex: null
4249- }
4250- },
4251- labels: {
4252- //items: [],
4253- style: {
4254- //font: defaultFont,
4255- position: ABSOLUTE,
4256- color: '#3E576F'
4257- }
4258- },
4259- legend: {
4260- enabled: true,
4261- align: 'center',
4262- //floating: false,
4263- layout: 'horizontal',
4264- labelFormatter: function () {
4265- return this.name;
4266- },
4267- borderWidth: 1,
4268- borderColor: '#909090',
4269- borderRadius: 5,
4270- // margin: 10,
4271- // reversed: false,
4272- shadow: false,
4273- // backgroundColor: null,
4274- style: {
4275- padding: '5px'
4276- },
4277- itemStyle: {
4278- cursor: 'pointer',
4279- color: '#3E576F'
4280- },
4281- itemHoverStyle: {
4282- cursor: 'pointer',
4283- color: '#000000'
4284- },
4285- itemHiddenStyle: {
4286- color: '#C0C0C0'
4287- },
4288- itemCheckboxStyle: {
4289- position: ABSOLUTE,
4290- width: '13px', // for IE precision
4291- height: '13px'
4292- },
4293- // itemWidth: undefined,
4294- symbolWidth: 16,
4295- symbolPadding: 5,
4296- verticalAlign: 'bottom',
4297- // width: undefined,
4298- x: 0,
4299- y: 0
4300- },
4301-
4302- loading: {
4303- hideDuration: 100,
4304- labelStyle: {
4305- fontWeight: 'bold',
4306- position: RELATIVE,
4307- top: '1em'
4308- },
4309- showDuration: 100,
4310- style: {
4311- position: ABSOLUTE,
4312- backgroundColor: 'white',
4313- opacity: 0.5,
4314- textAlign: 'center'
4315- }
4316- },
4317-
4318- tooltip: {
4319- enabled: true,
4320- //crosshairs: null,
4321- backgroundColor: 'rgba(255, 255, 255, .85)',
4322- borderWidth: 2,
4323- borderRadius: 5,
4324- //formatter: defaultFormatter,
4325- shadow: true,
4326- //shared: false,
4327- snap: hasTouch ? 25 : 10,
4328- style: {
4329- color: '#333333',
4330- fontSize: '12px',
4331- padding: '5px',
4332- whiteSpace: 'nowrap'
4333- }
4334- },
4335-
4336- toolbar: {
4337- itemStyle: {
4338- color: '#4572A7',
4339- cursor: 'pointer'
4340- }
4341- },
4342-
4343- credits: {
4344- enabled: true,
4345- text: 'Highcharts.com',
4346- href: 'http://www.highcharts.com',
4347- position: {
4348- align: 'right',
4349- x: -10,
4350- verticalAlign: 'bottom',
4351- y: -5
4352- },
4353- style: {
4354- cursor: 'pointer',
4355- color: '#909090',
4356- fontSize: '10px'
4357- }
4358- }
4359-};
4360-
4361-// Axis defaults
4362-var defaultXAxisOptions = {
4363- // allowDecimals: null,
4364- // alternateGridColor: null,
4365- // categories: [],
4366- dateTimeLabelFormats: {
4367- second: '%H:%M:%S',
4368- minute: '%H:%M',
4369- hour: '%H:%M',
4370- day: '%e. %b',
4371- week: '%e. %b',
4372- month: '%b \'%y',
4373- year: '%Y'
4374- },
4375- endOnTick: false,
4376- gridLineColor: '#C0C0C0',
4377- // gridLineDashStyle: 'solid', // docs
4378- // gridLineWidth: 0,
4379- // reversed: false,
4380-
4381- labels: defaultLabelOptions,
4382- // { step: null },
4383- lineColor: '#C0D0E0',
4384- lineWidth: 1,
4385- //linkedTo: null,
4386- max: null,
4387- min: null,
4388- minPadding: 0.01,
4389- maxPadding: 0.01,
4390- //maxZoom: null,
4391- minorGridLineColor: '#E0E0E0',
4392- // minorGridLineDashStyle: null,
4393- minorGridLineWidth: 1,
4394- minorTickColor: '#A0A0A0',
4395- //minorTickInterval: null,
4396- minorTickLength: 2,
4397- minorTickPosition: 'outside', // inside or outside
4398- //minorTickWidth: 0,
4399- //opposite: false,
4400- //offset: 0,
4401- //plotBands: [{
4402- // events: {},
4403- // zIndex: 1,
4404- // labels: { align, x, verticalAlign, y, style, rotation, textAlign }
4405- //}],
4406- //plotLines: [{
4407- // events: {}
4408- // dashStyle: {}
4409- // zIndex:
4410- // labels: { align, x, verticalAlign, y, style, rotation, textAlign }
4411- //}],
4412- //reversed: false,
4413- // showFirstLabel: true,
4414- // showLastLabel: false,
4415- startOfWeek: 1,
4416- startOnTick: false,
4417- tickColor: '#C0D0E0',
4418- //tickInterval: null,
4419- tickLength: 5,
4420- tickmarkPlacement: 'between', // on or between
4421- tickPixelInterval: 100,
4422- tickPosition: 'outside',
4423- tickWidth: 1,
4424- title: {
4425- //text: null,
4426- align: 'middle', // low, middle or high
4427- //margin: 0 for horizontal, 10 for vertical axes,
4428- //rotation: 0,
4429- //side: 'outside',
4430- style: {
4431- color: '#6D869F',
4432- //font: defaultFont.replace('normal', 'bold')
4433- fontWeight: 'bold'
4434- }
4435- //x: 0,
4436- //y: 0
4437- },
4438- type: 'linear' // linear, logarithmic or datetime
4439-},
4440-
4441-defaultYAxisOptions = merge(defaultXAxisOptions, {
4442- endOnTick: true,
4443- gridLineWidth: 1,
4444- tickPixelInterval: 72,
4445- showLastLabel: true,
4446- labels: {
4447- align: 'right',
4448- x: -8,
4449- y: 3
4450- },
4451- lineWidth: 0,
4452- maxPadding: 0.05,
4453- minPadding: 0.05,
4454- startOnTick: true,
4455- tickWidth: 0,
4456- title: {
4457- rotation: 270,
4458- text: 'Y-values'
4459- },
4460- stackLabels: {
4461- enabled: false,
4462- //align: dynamic,
4463- //y: dynamic,
4464- //x: dynamic,
4465- //verticalAlign: dynamic,
4466- //textAlign: dynamic,
4467- //rotation: 0,
4468- formatter: function () {
4469- return this.total;
4470- },
4471- style: defaultLabelOptions.style
4472- }
4473-}),
4474-
4475-defaultLeftAxisOptions = {
4476- labels: {
4477- align: 'right',
4478- x: -8,
4479- y: null
4480- },
4481- title: {
4482- rotation: 270
4483- }
4484-},
4485-defaultRightAxisOptions = {
4486- labels: {
4487- align: 'left',
4488- x: 8,
4489- y: null
4490- },
4491- title: {
4492- rotation: 90
4493- }
4494-},
4495-defaultBottomAxisOptions = { // horizontal axis
4496- labels: {
4497- align: 'center',
4498- x: 0,
4499- y: 14
4500- // staggerLines: null
4501- },
4502- title: {
4503- rotation: 0
4504- }
4505-},
4506-defaultTopAxisOptions = merge(defaultBottomAxisOptions, {
4507- labels: {
4508- y: -5
4509- // staggerLines: null
4510- }
4511-});
4512-
4513-
4514-
4515-
4516-// Series defaults
4517-var defaultPlotOptions = defaultOptions.plotOptions,
4518- defaultSeriesOptions = defaultPlotOptions.line;
4519-//defaultPlotOptions.line = merge(defaultSeriesOptions);
4520-defaultPlotOptions.spline = merge(defaultSeriesOptions);
4521-defaultPlotOptions.scatter = merge(defaultSeriesOptions, {
4522- lineWidth: 0,
4523- states: {
4524- hover: {
4525- lineWidth: 0
4526- }
4527- }
4528-});
4529-defaultPlotOptions.area = merge(defaultSeriesOptions, {
4530- // threshold: 0,
4531- // lineColor: null, // overrides color, but lets fillColor be unaltered
4532- // fillOpacity: 0.75,
4533- // fillColor: null
4534-
4535-});
4536-defaultPlotOptions.areaspline = merge(defaultPlotOptions.area);
4537-defaultPlotOptions.column = merge(defaultSeriesOptions, {
4538- borderColor: '#FFFFFF',
4539- borderWidth: 1,
4540- borderRadius: 0,
4541- //colorByPoint: undefined,
4542- groupPadding: 0.2,
4543- marker: null, // point options are specified in the base options
4544- pointPadding: 0.1,
4545- //pointWidth: null,
4546- minPointLength: 0,
4547- states: {
4548- hover: {
4549- brightness: 0.1,
4550- shadow: false
4551- },
4552- select: {
4553- color: '#C0C0C0',
4554- borderColor: '#000000',
4555- shadow: false
4556- }
4557- },
4558- dataLabels: {
4559- y: null,
4560- verticalAlign: null
4561- }
4562-});
4563-defaultPlotOptions.bar = merge(defaultPlotOptions.column, {
4564- dataLabels: {
4565- align: 'left',
4566- x: 5,
4567- y: 0
4568- }
4569-});
4570-defaultPlotOptions.pie = merge(defaultSeriesOptions, {
4571- //dragType: '', // n/a
4572- borderColor: '#FFFFFF',
4573- borderWidth: 1,
4574- center: ['50%', '50%'],
4575- colorByPoint: true, // always true for pies
4576- dataLabels: {
4577- // align: null,
4578- // connectorWidth: 1,
4579- // connectorColor: point.color,
4580- // connectorPadding: 5,
4581- distance: 30,
4582- enabled: true,
4583- formatter: function () {
4584- return this.point.name;
4585- },
4586- // softConnector: true,
4587- y: 5
4588- },
4589- //innerSize: 0,
4590- legendType: 'point',
4591- marker: null, // point options are specified in the base options
4592- size: '75%',
4593- showInLegend: false,
4594- slicedOffset: 10,
4595- states: {
4596- hover: {
4597- brightness: 0.1,
4598- shadow: false
4599- }
4600- }
4601-
4602-});
4603-
4604-// set the default time methods
4605-setTimeMethods();
4606-
4607-
4608-/**
4609- * Handle color operations. The object methods are chainable.
4610- * @param {String} input The input color in either rbga or hex format
4611- */
4612-var Color = function (input) {
4613- // declare variables
4614- var rgba = [], result;
4615-
4616- /**
4617- * Parse the input color to rgba array
4618- * @param {String} input
4619- */
4620- function init(input) {
4621-
4622- // rgba
4623- result = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(input);
4624- if (result) {
4625- rgba = [pInt(result[1]), pInt(result[2]), pInt(result[3]), parseFloat(result[4], 10)];
4626- } else { // hex
4627- result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(input);
4628- if (result) {
4629- rgba = [pInt(result[1], 16), pInt(result[2], 16), pInt(result[3], 16), 1];
4630- }
4631- }
4632-
4633- }
4634- /**
4635- * Return the color a specified format
4636- * @param {String} format
4637- */
4638- function get(format) {
4639- var ret;
4640-
4641- // it's NaN if gradient colors on a column chart
4642- if (rgba && !isNaN(rgba[0])) {
4643- if (format === 'rgb') {
4644- ret = 'rgb(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ')';
4645- } else if (format === 'a') {
4646- ret = rgba[3];
4647- } else {
4648- ret = 'rgba(' + rgba.join(',') + ')';
4649- }
4650- } else {
4651- ret = input;
4652- }
4653- return ret;
4654- }
4655-
4656- /**
4657- * Brighten the color
4658- * @param {Number} alpha
4659- */
4660- function brighten(alpha) {
4661- if (isNumber(alpha) && alpha !== 0) {
4662- var i;
4663- for (i = 0; i < 3; i++) {
4664- rgba[i] += pInt(alpha * 255);
4665-
4666- if (rgba[i] < 0) {
4667- rgba[i] = 0;
4668- }
4669- if (rgba[i] > 255) {
4670- rgba[i] = 255;
4671- }
4672- }
4673- }
4674- return this;
4675- }
4676- /**
4677- * Set the color's opacity to a given alpha value
4678- * @param {Number} alpha
4679- */
4680- function setOpacity(alpha) {
4681- rgba[3] = alpha;
4682- return this;
4683- }
4684-
4685- // initialize: parse the input
4686- init(input);
4687-
4688- // public methods
4689- return {
4690- get: get,
4691- brighten: brighten,
4692- setOpacity: setOpacity
4693- };
4694-};
4695-
4696-/**
4697- * A wrapper object for SVG elements
4698- */
4699-function SVGElement() {}
4700-
4701-SVGElement.prototype = {
4702- /**
4703- * Initialize the SVG renderer
4704- * @param {Object} renderer
4705- * @param {String} nodeName
4706- */
4707- init: function (renderer, nodeName) {
4708- this.element = doc.createElementNS(SVG_NS, nodeName);
4709- this.renderer = renderer;
4710- },
4711- /**
4712- * Animate a given attribute
4713- * @param {Object} params
4714- * @param {Number} options The same options as in jQuery animation
4715- * @param {Function} complete Function to perform at the end of animation
4716- */
4717- animate: function (params, options, complete) {
4718- var animOptions = pick(options, globalAnimation, true);
4719- if (animOptions) {
4720- animOptions = merge(animOptions);
4721- if (complete) { // allows using a callback with the global animation without overwriting it
4722- animOptions.complete = complete;
4723- }
4724- animate(this, params, animOptions);
4725- } else {
4726- this.attr(params);
4727- if (complete) {
4728- complete();
4729- }
4730- }
4731- },
4732- /**
4733- * Set or get a given attribute
4734- * @param {Object|String} hash
4735- * @param {Mixed|Undefined} val
4736- */
4737- attr: function (hash, val) {
4738- var key,
4739- value,
4740- i,
4741- child,
4742- element = this.element,
4743- nodeName = element.nodeName,
4744- renderer = this.renderer,
4745- skipAttr,
4746- shadows = this.shadows,
4747- htmlNode = this.htmlNode,
4748- hasSetSymbolSize,
4749- ret = this;
4750-
4751- // single key-value pair
4752- if (isString(hash) && defined(val)) {
4753- key = hash;
4754- hash = {};
4755- hash[key] = val;
4756- }
4757-
4758- // used as a getter: first argument is a string, second is undefined
4759- if (isString(hash)) {
4760- key = hash;
4761- if (nodeName === 'circle') {
4762- key = { x: 'cx', y: 'cy' }[key] || key;
4763- } else if (key === 'strokeWidth') {
4764- key = 'stroke-width';
4765- }
4766- ret = attr(element, key) || this[key] || 0;
4767-
4768- if (key !== 'd' && key !== 'visibility') { // 'd' is string in animation step
4769- ret = parseFloat(ret);
4770- }
4771-
4772- // setter
4773- } else {
4774-
4775- for (key in hash) {
4776- skipAttr = false; // reset
4777- value = hash[key];
4778-
4779- // paths
4780- if (key === 'd') {
4781- if (value && value.join) { // join path
4782- value = value.join(' ');
4783- }
4784- if (/(NaN| {2}|^$)/.test(value)) {
4785- value = 'M 0 0';
4786- }
4787- this.d = value; // shortcut for animations
4788-
4789- // update child tspans x values
4790- } else if (key === 'x' && nodeName === 'text') {
4791- for (i = 0; i < element.childNodes.length; i++) {
4792- child = element.childNodes[i];
4793- // if the x values are equal, the tspan represents a linebreak
4794- if (attr(child, 'x') === attr(element, 'x')) {
4795- //child.setAttribute('x', value);
4796- attr(child, 'x', value);
4797- }
4798- }
4799-
4800- if (this.rotation) {
4801- attr(element, 'transform', 'rotate(' + this.rotation + ' ' + value + ' ' +
4802- pInt(hash.y || attr(element, 'y')) + ')');
4803- }
4804-
4805- // apply gradients
4806- } else if (key === 'fill') {
4807- value = renderer.color(value, element, key);
4808-
4809- // circle x and y
4810- } else if (nodeName === 'circle' && (key === 'x' || key === 'y')) {
4811- key = { x: 'cx', y: 'cy' }[key] || key;
4812-
4813- // translation and text rotation
4814- } else if (key === 'translateX' || key === 'translateY' || key === 'rotation' || key === 'verticalAlign') {
4815- this[key] = value;
4816- this.updateTransform();
4817- skipAttr = true;
4818-
4819- // apply opacity as subnode (required by legacy WebKit and Batik)
4820- } else if (key === 'stroke') {
4821- value = renderer.color(value, element, key);
4822-
4823- // emulate VML's dashstyle implementation
4824- } else if (key === 'dashstyle') {
4825- key = 'stroke-dasharray';
4826- value = value && value.toLowerCase();
4827- if (value === 'solid') {
4828- value = NONE;
4829- } else if (value) {
4830- value = value
4831- .replace('shortdashdotdot', '3,1,1,1,1,1,')
4832- .replace('shortdashdot', '3,1,1,1')
4833- .replace('shortdot', '1,1,')
4834- .replace('shortdash', '3,1,')
4835- .replace('longdash', '8,3,')
4836- .replace(/dot/g, '1,3,')
4837- .replace('dash', '4,3,')
4838- .replace(/,$/, '')
4839- .split(','); // ending comma
4840-
4841- i = value.length;
4842- while (i--) {
4843- value[i] = pInt(value[i]) * hash['stroke-width'];
4844- }
4845-
4846- value = value.join(',');
4847- }
4848-
4849- // special
4850- } else if (key === 'isTracker') {
4851- this[key] = value;
4852-
4853- // IE9/MooTools combo: MooTools returns objects instead of numbers and IE9 Beta 2
4854- // is unable to cast them. Test again with final IE9.
4855- } else if (key === 'width') {
4856- value = pInt(value);
4857-
4858- // Text alignment
4859- } else if (key === 'align') {
4860- key = 'text-anchor';
4861- value = { left: 'start', center: 'middle', right: 'end' }[value];
4862-
4863-
4864- // Title requires a subnode, #431
4865- } else if (key === 'title') {
4866- var title = doc.createElementNS(SVG_NS, 'title');
4867- title.appendChild(doc.createTextNode(value));
4868- element.appendChild(title);
4869- }
4870-
4871-
4872-
4873- // jQuery animate changes case
4874- if (key === 'strokeWidth') {
4875- key = 'stroke-width';
4876- }
4877-
4878- // Chrome/Win < 6 bug (http://code.google.com/p/chromium/issues/detail?id=15461)
4879- if (isWebKit && key === 'stroke-width' && value === 0) {
4880- value = 0.000001;
4881- }
4882-
4883- // symbols
4884- if (this.symbolName && /^(x|y|r|start|end|innerR)/.test(key)) {
4885-
4886-
4887- if (!hasSetSymbolSize) {
4888- this.symbolAttr(hash);
4889- hasSetSymbolSize = true;
4890- }
4891- skipAttr = true;
4892- }
4893-
4894- // let the shadow follow the main element
4895- if (shadows && /^(width|height|visibility|x|y|d)$/.test(key)) {
4896- i = shadows.length;
4897- while (i--) {
4898- attr(shadows[i], key, value);
4899- }
4900- }
4901-
4902- // validate heights
4903- if ((key === 'width' || key === 'height') && nodeName === 'rect' && value < 0) {
4904- value = 0;
4905- }
4906-
4907- if (key === 'text') {
4908- // only one node allowed
4909- this.textStr = value;
4910- if (this.added) {
4911- renderer.buildText(this);
4912- }
4913- } else if (!skipAttr) {
4914- //element.setAttribute(key, value);
4915- attr(element, key, value);
4916- }
4917-
4918- // Issue #38
4919- if (htmlNode && (key === 'x' || key === 'y' ||
4920- key === 'translateX' || key === 'translateY' || key === 'visibility')) {
4921- var wrapper = this,
4922- bBox,
4923- arr = htmlNode.length ? htmlNode : [this],
4924- length = arr.length,
4925- itemWrapper,
4926- j;
4927-
4928- for (j = 0; j < length; j++) {
4929- itemWrapper = arr[j];
4930- bBox = itemWrapper.getBBox();
4931- htmlNode = itemWrapper.htmlNode; // reassign to child item
4932- css(htmlNode, extend(wrapper.styles, {
4933- left: (bBox.x + (wrapper.translateX || 0)) + PX,
4934- top: (bBox.y + (wrapper.translateY || 0)) + PX
4935- }));
4936-
4937- if (key === 'visibility') {
4938- css(htmlNode, {
4939- visibility: value
4940- });
4941- }
4942- }
4943- }
4944-
4945- }
4946-
4947- }
4948- return ret;
4949- },
4950-
4951- /**
4952- * If one of the symbol size affecting parameters are changed,
4953- * check all the others only once for each call to an element's
4954- * .attr() method
4955- * @param {Object} hash
4956- */
4957- symbolAttr: function (hash) {
4958- var wrapper = this;
4959-
4960- each(['x', 'y', 'r', 'start', 'end', 'width', 'height', 'innerR'], function (key) {
4961- wrapper[key] = pick(hash[key], wrapper[key]);
4962- });
4963-
4964- wrapper.attr({
4965- d: wrapper.renderer.symbols[wrapper.symbolName](
4966- mathRound(wrapper.x * 2) / 2, // Round to halves. Issue #274.
4967- mathRound(wrapper.y * 2) / 2,
4968- wrapper.r,
4969- {
4970- start: wrapper.start,
4971- end: wrapper.end,
4972- width: wrapper.width,
4973- height: wrapper.height,
4974- innerR: wrapper.innerR
4975- }
4976- )
4977- });
4978- },
4979-
4980- /**
4981- * Apply a clipping path to this object
4982- * @param {String} id
4983- */
4984- clip: function (clipRect) {
4985- return this.attr('clip-path', 'url(' + this.renderer.url + '#' + clipRect.id + ')');
4986- },
4987-
4988- /**
4989- * Calculate the coordinates needed for drawing a rectangle crisply and return the
4990- * calculated attributes
4991- * @param {Number} strokeWidth
4992- * @param {Number} x
4993- * @param {Number} y
4994- * @param {Number} width
4995- * @param {Number} height
4996- */
4997- crisp: function (strokeWidth, x, y, width, height) {
4998-
4999- var wrapper = this,
5000- key,
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches