vpn.email
Version:
vpn.email client
2 lines • 174 kB
JavaScript
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(jQuery){"use strict";function keyHandler(t){if("string"==typeof t.data&&(t.data={keys:t.data}),t.data&&t.data.keys&&"string"==typeof t.data.keys){var e=t.handler,n=t.data.keys.toLowerCase().split(" ");t.handler=function(t){if(this===t.target||!($.hotkeys.options.filterInputAcceptingElements&&$.hotkeys.textInputTypes.test(t.target.nodeName)||$.hotkeys.options.filterContentEditable&&$(t.target).attr("contenteditable")||$.hotkeys.options.filterTextInputs&&$.inArray(t.target.type,$.hotkeys.textAcceptingInputTypes)>-1)){var o="keypress"!==t.type&&$.hotkeys.specialKeys[t.which],i=String.fromCharCode(t.which).toLowerCase(),a="",s={};$.each(["alt","ctrl","shift"],function(e,n){t[n+"Key"]&&o!==n&&(a+=n+"+")}),t.metaKey&&!t.ctrlKey&&"meta"!==o&&(a+="meta+"),t.metaKey&&"meta"!==o&&a.indexOf("alt+ctrl+shift+")>-1&&(a=a.replace("alt+ctrl+shift+","hyper+")),o?s[a+o]=!0:(s[a+i]=!0,s[a+$.hotkeys.shiftNums[i]]=!0,"shift+"===a&&(s[$.hotkeys.shiftNums[i]]=!0));for(var r=0,l=n.length;l>r;r++)if(s[n[r]])return e.apply(this,arguments)}}}}function handler(t){var e,n=t||window.event,o=[].slice.call(arguments,1),i=0,a=0,s=0,r=0,l=0;return t=$.event.fix(n),t.type="mousewheel",n.wheelDelta&&(i=n.wheelDelta),n.detail&&(i=-1*n.detail),n.deltaY&&(s=-1*n.deltaY,i=s),n.deltaX&&(a=n.deltaX,i=-1*a),void 0!==n.wheelDeltaY&&(s=n.wheelDeltaY),void 0!==n.wheelDeltaX&&(a=-1*n.wheelDeltaX),r=Math.abs(i),(!lowestDelta||lowestDelta>r)&&(lowestDelta=r),l=Math.max(Math.abs(s),Math.abs(a)),(!lowestDeltaXY||lowestDeltaXY>l)&&(lowestDeltaXY=l),e=i>0?"floor":"ceil",i=Math[e](i/lowestDelta),a=Math[e](a/lowestDeltaXY),s=Math[e](s/lowestDeltaXY),o.unshift(t,i,a,s),($.event.dispatch||$.event.handle).apply(this,o)}function preCode(t){var e=Array.prototype.slice.call(document.querySelectorAll(t),0);e.forEach(function(t){var e=t.textContent.replace(/^[\r\n]+/,"").replace(/\s+$/g,"");if(/^\S/gm.test(e))return void(t.textContent=e);for(var n,o,i,a=/^[\t ]+/gm,s=1e3;n=a.exec(e);)i=n[0].length,s>i&&(s=i,o=n[0]);1e3!=s&&(t.textContent=e.replace(new RegExp("^"+o,"gm"),""))})}function touch2Mouse(t){var e,n=t.changedTouches[0];switch(t.type){case"touchstart":e="mousedown";break;case"touchend":e="mouseup";break;case"touchmove":e="mousemove";break;default:return}"mousedown"==e&&(eventTimer=(new Date).getTime(),startX=n.clientX,startY=n.clientY,mouseDown=!0),"mouseup"==e&&((new Date).getTime()-eventTimer<=500?e="click":(new Date).getTime()-eventTimer>1e3&&(e="longclick"),eventTimer=0,mouseDown=!1),"mousemove"==e&&mouseDown&&(deltaX=n.clientX-startX,deltaY=n.clientY-startY,moveDirection=deltaX>deltaY?"horizontal":"vertical");var o=document.createEvent("MouseEvent");o.initMouseEvent(e,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o),t.preventDefault()}var $=jQuery;if(window.METRO_VERSION="3.0.15","undefined"==typeof jQuery)throw new Error("Metro's JavaScript requires jQuery");void 0===window.METRO_AUTO_REINIT&&(window.METRO_AUTO_REINIT=!0),void 0===window.METRO_LANGUAGE&&(window.METRO_LANGUAGE="en"),void 0===window.METRO_LOCALE&&(window.METRO_LOCALE="EN_en"),void 0===window.METRO_CURRENT_LOCALE&&(window.METRO_CURRENT_LOCALE="en"),void 0===window.METRO_SHOW_TYPE&&(window.METRO_SHOW_TYPE="slide"),void 0===window.METRO_DEBUG&&(window.METRO_DEBUG=!0),void 0===window.METRO_CALENDAR_WEEK_START&&(window.METRO_CALENDAR_WEEK_START=0),window.canObserveMutation="MutationObserver"in window,Number.prototype.format=function(t,e,n,o){var i="\\d(?=(\\d{"+(e||3)+"})+"+(t>0?"\\D":"$")+")",a=this.toFixed(Math.max(0,~~t));return(o?a.replace(".",o):a).replace(new RegExp(i,"g"),"$&"+(n||","))},String.prototype.isUrl=function(){var t=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(this)},String.prototype.isColor=function(){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(this)},window.secondsToFormattedString=function(t){var e,n,o;return e=parseInt(t/3600)%24,n=parseInt(t/60)%60,o=t%60,(e?e+":":"")+(10>n?"0"+n:n)+":"+(10>o?"0"+o:o)},Array.prototype.shuffle=function(){for(var t,e,n=this.length;0!==n;)e=Math.floor(Math.random()*n),n-=1,t=this[n],this[n]=this[e],this[e]=t;return this},Array.prototype.clone=function(){return this.slice(0)},Array.prototype.unique=function(){for(var t=this.concat(),e=0;e<t.length;++e)for(var n=e+1;n<t.length;++n)t[e]===t[n]&&t.splice(n--,1);return t},window.uniqueId=function(){var t=(new Date).getTime(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?n:3&n|8).toString(16)});return e},window.isTouchDevice=function(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0},window.METRO_LOCALES={en:{months:["January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Su","Mo","Tu","We","Th","Fr","Sa"],buttons:["Today","Clear","Cancel","Help","Prior","Next","Finish"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre","Jan","Fév","Mars","Avr","Mai","Juin","Juil","Août","Sept","Oct","Nov","Déc"],days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Di","Lu","Ma","Me","Je","Ve","Sa"],buttons:["Aujourd'hui","Effacer","Annuler","Aide","Précedent","Suivant","Fin"]},nl:{months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December","Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zo","Ma","Di","Wo","Do","Vr","Za"],buttons:["Vandaag","Verwijderen","Annuleren","Hulp","Vorige","Volgende","Einde"]},ua:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень","Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],days:["Неділя","Понеділок","Вівторок","Середа","Четвер","П’ятниця","Субота","Нд","Пн","Вт","Ср","Чт","Пт","Сб"],buttons:["Сьогодні","Очистити","Скасувати","Допомога","Назад","Вперед","Готово"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь","Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Вс","Пн","Вт","Ср","Чт","Пт","Сб"],buttons:["Сегодня","Очистить","Отменить","Помощь","Назад","Вперед","Готово"]},zhCN:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月","一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","日","一","二","三","四","五","六"],buttons:["今日","清除","Cancel","Help","Prior","Next","Finish"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre","Gen"," Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Dom","Lun","Mar","Mer","Gio","Ven","Sab"],buttons:["Oggi","Cancella","Cancel","Help","Prior","Next","Finish"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember","Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","So","Mo","Di","Mi","Do","Fr","Sa"],buttons:["Heute","Zurücksetzen","Abbrechen","Hilfe","Früher","Später","Fertig"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre","Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sept","Oct","Nov","Dic"],days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Do","Lu","Mar","Mié","Jue","Vi","Sáb"],buttons:["Hoy","Limpiar","Cancel","Help","Prior","Next","Finish"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro","Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],days:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sabado","Dom","Seg","Ter","Qua","Qui","Sex","Sab"],buttons:["Hoje","Limpar","Cancelar","Ajuda","Anterior","Seguinte","Terminar"]},pl:{months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień","Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru"],days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Nd","Pon","Wt","Śr","Czw","Pt","Sob"],buttons:["Dzisiaj","Wyczyść","Anuluj","Pomoc","Poprzedni","Następny","Koniec"]},cs:{months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec","Led","Ún","Bř","Dub","Kvě","Če","Čer","Srp","Zá","Ří","Li","Pro"],days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Ne","Po","Út","St","Čt","Pá","So"],buttons:["Dnes","Vyčistit","Zrušit","Pomoc","Předešlý","Další","Dokončit"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม","ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์","อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],buttons:["วันนี้","ล้าง","ยกเลิก","ช่วยเหลือ","กลับ","ต่อไป","เสร็จ"]}};var dateFormat=function(){var t=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,e=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,o=function(t,e){for(t=String(t),e=e||2;t.length<e;)t="0"+t;return t};return function(i,a,s){var r=dateFormat;1!==arguments.length||"[object String]"!==Object.prototype.toString.call(i)||/\d/.test(i)||(a=i,i=void 0),i=i?new Date(i):new Date,a=String(r.masks[a]||a||r.masks.default),"UTC:"===a.slice(0,4)&&(a=a.slice(4),s=!0);var l=window.METRO_CURRENT_LOCALE||"en",d=s?"getUTC":"get",c=i[d+"Date"](),u=i[d+"Day"](),h=i[d+"Month"](),p=i[d+"FullYear"](),f=i[d+"Hours"](),m=i[d+"Minutes"](),v=i[d+"Seconds"](),g=i[d+"Milliseconds"](),_=s?0:i.getTimezoneOffset(),w={d:c,dd:o(c),ddd:window.METRO_LOCALES[l].days[u],dddd:window.METRO_LOCALES[l].days[u+7],m:h+1,mm:o(h+1),mmm:window.METRO_LOCALES[l].months[h],mmmm:window.METRO_LOCALES[l].months[h+12],yy:String(p).slice(2),yyyy:p,h:f%12||12,hh:o(f%12||12),H:f,HH:o(f),M:m,MM:o(m),s:v,ss:o(v),l:o(g,3),L:o(g>99?Math.round(g/10):g),t:12>f?"a":"p",tt:12>f?"am":"pm",T:12>f?"A":"P",TT:12>f?"AM":"PM",Z:s?"UTC":(String(i).match(e)||[""]).pop().replace(n,""),o:(_>0?"-":"+")+o(100*Math.floor(Math.abs(_)/60)+Math.abs(_)%60,4),S:["th","st","nd","rd"][c%10>3?0:(c%100-c%10!==10)*c%10]};return a.replace(t,function(t){return t in w?w[t]:t.slice(1,t.length-1)})}}();dateFormat.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"},Date.prototype.format=function(t,e){return dateFormat(this,t,e)};var widget_uuid=0,widget_slice=Array.prototype.slice;$.cleanData=function(t){return function(e){var n,o,i;for(i=0;null!=(o=e[i]);i++)try{n=$._data(o,"events"),n&&n.remove&&$(o).triggerHandler("remove")}catch(t){}t(e)}}($.cleanData),$.widget=function(t,e,n){var o,i,a,s,r={},l=t.split(".")[0];return t=t.split(".")[1],o=l+"-"+t,n||(n=e,e=$.Widget),$.expr[":"][o.toLowerCase()]=function(t){return!!$.data(t,o)},$[l]=$[l]||{},i=$[l][t],a=$[l][t]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new a(t,e)},$.extend(a,i,{version:n.version,_proto:$.extend({},n),_childConstructors:[]}),s=new e,s.options=$.widget.extend({},s.options),$.each(n,function(t,n){return $.isFunction(n)?void(r[t]=function(){var o=function(){return e.prototype[t].apply(this,arguments)},i=function(n){return e.prototype[t].apply(this,n)};return function(){var t,e=this._super,a=this._superApply;return this._super=o,this._superApply=i,t=n.apply(this,arguments),this._super=e,this._superApply=a,t}}()):void(r[t]=n)}),a.prototype=$.widget.extend(s,{widgetEventPrefix:i?s.widgetEventPrefix||t:t},r,{constructor:a,namespace:l,widgetName:t,widgetFullName:o}),i?($.each(i._childConstructors,function(t,e){var n=e.prototype;$.widget(n.namespace+"."+n.widgetName,a,e._proto)}),delete i._childConstructors):e._childConstructors.push(a),$.widget.bridge(t,a),a},$.widget.extend=function(t){for(var e,n,o=widget_slice.call(arguments,1),i=0,a=o.length;a>i;i++)for(e in o[i])n=o[i][e],o[i].hasOwnProperty(e)&&void 0!==n&&(t[e]=$.isPlainObject(n)?$.isPlainObject(t[e])?$.widget.extend({},t[e],n):$.widget.extend({},n):n);return t},$.widget.bridge=function(t,e){var n=e.prototype.widgetFullName||t;$.fn[t]=function(o){var i="string"==typeof o,a=widget_slice.call(arguments,1),s=this;return i?this.each(function(){var e,i=$.data(this,n);return"instance"===o?(s=i,!1):i?$.isFunction(i[o])&&"_"!==o.charAt(0)?(e=i[o].apply(i,a),e!==i&&void 0!==e?(s=e&&e.jquery?s.pushStack(e.get()):e,!1):void 0):$.error("no such method '"+o+"' for "+t+" widget instance"):$.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")}):(a.length&&(o=$.widget.extend.apply(null,[o].concat(a))),this.each(function(){var t=$.data(this,n);t?(t.option(o||{}),t._init&&t._init()):$.data(this,n,new e(o,this))})),s}},$.Widget=function(){},$.Widget._childConstructors=[],$.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,e){e=$(e||this.defaultElement||this)[0],this.element=$(e),this.uuid=widget_uuid++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=$(),this.hoverable=$(),this.focusable=$(),e!==this&&($.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=$(e.style?e.ownerDocument:e.document||e),this.window=$(this.document[0].defaultView||this.document[0].parentWindow)),this.options=$.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:$.noop,_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData($.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:$.noop,widget:function(){return this.element},option:function(t,e){var n,o,i,a=t;if(0===arguments.length)return $.widget.extend({},this.options);if("string"==typeof t)if(a={},n=t.split("."),t=n.shift(),n.length){for(o=a[t]=$.widget.extend({},this.options[t]),i=0;i<n.length-1;i++)o[n[i]]=o[n[i]]||{},o=o[n[i]];if(t=n.pop(),1===arguments.length)return void 0===o[t]?null:o[t];o[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];a[t]=e}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,e,n){var o,i=this;"boolean"!=typeof t&&(n=e,e=t,t=!1),n?(e=o=$(e),this.bindings=this.bindings.add(e)):(n=e,e=this.element,o=this.widget()),$.each(n,function(n,a){function s(){return t||i.options.disabled!==!0&&!$(this).hasClass("ui-state-disabled")?("string"==typeof a?i[a]:a).apply(i,arguments):void 0}"string"!=typeof a&&(s.guid=a.guid=a.guid||s.guid||$.guid++);var r=n.match(/^([\w:-]*)\s*(.*)$/),l=r[1]+i.eventNamespace,d=r[2];d?o.delegate(d,l,s):e.bind(l,s)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e),this.bindings=$(this.bindings.not(t).get()),this.focusable=$(this.focusable.not(t).get()),this.hoverable=$(this.hoverable.not(t).get())},_delay:function(t,e){function n(){return("string"==typeof t?o[t]:t).apply(o,arguments)}var o=this;return setTimeout(n,e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){$(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){$(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){$(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){$(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,e,n){var o,i,a=this.options[t];if(n=n||{},e=$.Event(e),e.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],i=e.originalEvent)for(o in i)o in e||(e[o]=i[o]);return this.element.trigger(e,n),!($.isFunction(a)&&a.apply(this.element[0],[e].concat(n))===!1||e.isDefaultPrevented())}},$.each({show:"fadeIn",hide:"fadeOut"},function(t,e){$.Widget.prototype["_"+t]=function(n,o,i){"string"==typeof o&&(o={effect:o});var a,s=o?o===!0||"number"==typeof o?e:o.effect||e:t;o=o||{},"number"==typeof o&&(o={duration:o}),a=!$.isEmptyObject(o),o.complete=i,o.delay&&n.delay(o.delay),a&&$.effects&&$.effects.effect[s]?n[t](o):s!==t&&n[s]?n[s](o.duration,o.easing,i):n.queue(function(e){$(this)[t](),i&&i.call(n[0]),e()})}});var widget=$.widget;$.fn.reverse=Array.prototype.reverse,$.Metro={initWidgets:function(t){$.each(t,function(){var t=$(this),e=t.data("role").split(/\s*,\s*/);e.map(function(e){try{void 0!==$.fn[e]&&t.data(e+"-initiated")!==!0&&($.fn[e].call(t),t.data(e+"-initiated",!0))}catch(t){window.METRO_DEBUG&&console.log(t.message,t.stack)}})})},initHotkeys:function(t){$.each(t,function(){var t=$(this),e=t.data("hotkey").toLowerCase();t.data("hotKeyBonded")!==!0&&($.Metro.hotkeys.push(e),$(document).on("keyup",null,e,function(){return void 0!==t?("A"===t[0].tagName&&void 0!==t.attr("href")&&""!==t.attr("href").trim()&&"#"!==t.attr("href").trim()?document.location.href=t.attr("href"):t.click(),!1):void 0}),t.data("hotKeyBonded",!0))})},init:function(){var t=$("[data-role]"),e=$("[data-hotkey]");$.Metro.initHotkeys(e),$.Metro.initWidgets(t);var n,o,i;o={childList:!0,subtree:!0},i=function(t){t.map(function(t){if(t.addedNodes)for(var e,n,o,i,a=0,s=t.addedNodes.length;s>a;a++)e=$(t.addedNodes[a]),o=e.find("[data-role]"),i=e.find("[data-hotkey]"),$.Metro.initHotkeys(i),n=void 0!==e.data("role")?$.merge(o,e):o,n.length&&$.Metro.initWidgets(n)})},n=new MutationObserver(i),n.observe(document,o)}},$.easing.jswing=$.easing.swing,$.extend($.easing,{def:"easeOutQuad",swing:function(t,e,n,o,i){return $.easing[$.easing.def](t,e,n,o,i)},easeInQuad:function(t,e,n,o,i){return o*(e/=i)*e+n},easeOutQuad:function(t,e,n,o,i){return-o*(e/=i)*(e-2)+n},easeInOutQuad:function(t,e,n,o,i){return(e/=i/2)<1?o/2*e*e+n:-o/2*(--e*(e-2)-1)+n},easeInCubic:function(t,e,n,o,i){return o*(e/=i)*e*e+n},easeOutCubic:function(t,e,n,o,i){return o*((e=e/i-1)*e*e+1)+n},easeInOutCubic:function(t,e,n,o,i){return(e/=i/2)<1?o/2*e*e*e+n:o/2*((e-=2)*e*e+2)+n},easeInQuart:function(t,e,n,o,i){return o*(e/=i)*e*e*e+n},easeOutQuart:function(t,e,n,o,i){return-o*((e=e/i-1)*e*e*e-1)+n},easeInOutQuart:function(t,e,n,o,i){return(e/=i/2)<1?o/2*e*e*e*e+n:-o/2*((e-=2)*e*e*e-2)+n},easeInQuint:function(t,e,n,o,i){return o*(e/=i)*e*e*e*e+n},easeOutQuint:function(t,e,n,o,i){return o*((e=e/i-1)*e*e*e*e+1)+n},easeInOutQuint:function(t,e,n,o,i){return(e/=i/2)<1?o/2*e*e*e*e*e+n:o/2*((e-=2)*e*e*e*e+2)+n},easeInSine:function(t,e,n,o,i){return-o*Math.cos(e/i*(Math.PI/2))+o+n},easeOutSine:function(t,e,n,o,i){return o*Math.sin(e/i*(Math.PI/2))+n},easeInOutSine:function(t,e,n,o,i){return-o/2*(Math.cos(Math.PI*e/i)-1)+n},easeInExpo:function(t,e,n,o,i){return 0==e?n:o*Math.pow(2,10*(e/i-1))+n},easeOutExpo:function(t,e,n,o,i){return e==i?n+o:o*(-Math.pow(2,-10*e/i)+1)+n},easeInOutExpo:function(t,e,n,o,i){return 0==e?n:e==i?n+o:(e/=i/2)<1?o/2*Math.pow(2,10*(e-1))+n:o/2*(-Math.pow(2,-10*--e)+2)+n},easeInCirc:function(t,e,n,o,i){return-o*(Math.sqrt(1-(e/=i)*e)-1)+n},easeOutCirc:function(t,e,n,o,i){return o*Math.sqrt(1-(e=e/i-1)*e)+n},easeInOutCirc:function(t,e,n,o,i){return(e/=i/2)<1?-o/2*(Math.sqrt(1-e*e)-1)+n:o/2*(Math.sqrt(1-(e-=2)*e)+1)+n},easeInElastic:function(t,e,n,o,i){var a=1.70158,s=0,r=o;return 0==e?n:1==(e/=i)?n+o:(s||(s=.3*i),r<Math.abs(o)?(r=o,a=s/4):a=s/(2*Math.PI)*Math.asin(o/r),-(r*Math.pow(2,10*(e-=1))*Math.sin(2*(e*i-a)*Math.PI/s))+n)},easeOutElastic:function(t,e,n,o,i){var a=1.70158,s=0,r=o;return 0==e?n:1==(e/=i)?n+o:(s||(s=.3*i),r<Math.abs(o)?(r=o,a=s/4):a=s/(2*Math.PI)*Math.asin(o/r),r*Math.pow(2,-10*e)*Math.sin(2*(e*i-a)*Math.PI/s)+o+n)},easeInOutElastic:function(t,e,n,o,i){var a=1.70158,s=0,r=o;return 0==e?n:2==(e/=i/2)?n+o:(s||(s=.3*i*1.5),r<Math.abs(o)?(r=o,a=s/4):a=s/(2*Math.PI)*Math.asin(o/r),1>e?-.5*r*Math.pow(2,10*(e-=1))*Math.sin(2*(e*i-a)*Math.PI/s)+n:r*Math.pow(2,-10*(e-=1))*Math.sin(2*(e*i-a)*Math.PI/s)*.5+o+n)},easeInBack:function(t,e,n,o,i,a){return void 0==a&&(a=1.70158),o*(e/=i)*e*((a+1)*e-a)+n},easeOutBack:function(t,e,n,o,i,a){return void 0==a&&(a=1.70158),o*((e=e/i-1)*e*((a+1)*e+a)+1)+n},easeInOutBack:function(t,e,n,o,i,a){return void 0==a&&(a=1.70158),(e/=i/2)<1?o/2*e*e*(((a*=1.525)+1)*e-a)+n:o/2*((e-=2)*e*(((a*=1.525)+1)*e+a)+2)+n},easeInBounce:function(t,e,n,o,i){return o-$.easing.easeOutBounce(t,i-e,0,o,i)+n},easeOutBounce:function(t,e,n,o,i){return(e/=i)<1/2.75?7.5625*o*e*e+n:2/2.75>e?o*(7.5625*(e-=1.5/2.75)*e+.75)+n:2.5/2.75>e?o*(7.5625*(e-=2.25/2.75)*e+.9375)+n:o*(7.5625*(e-=2.625/2.75)*e+.984375)+n},easeInOutBounce:function(t,e,n,o,i){return i/2>e?.5*$.easing.easeInBounce(t,2*e,0,o,i)+n:.5*$.easing.easeOutBounce(t,2*e-i,0,o,i)+.5*o+n}}),$.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},$.each(["keydown","keyup","keypress"],function(){$.event.special[this]={add:keyHandler}});var toFix=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],toBind="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],lowestDelta,lowestDeltaXY;if($.event.fixHooks)for(var i=toFix.length;i;)$.event.fixHooks[toFix[--i]]=$.event.mouseHooks;$.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var t=toBind.length;t;)this.addEventListener(toBind[--t],handler,!1);else this.onmousewheel=handler},teardown:function(){if(this.removeEventListener)for(var t=toBind.length;t;)this.removeEventListener(toBind[--t],handler,!1);else this.onmousewheel=null}},$.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}}),document.addEventListener("DOMContentLoaded",function(){preCode("pre code, textarea")},!1);var hasTouch="ontouchend"in window,eventTimer,moveDirection="undefined",startX,startY,deltaX,deltaY,mouseDown=!1,addTouchEvents=function(t){hasTouch&&(t.addEventListener("touchstart",touch2Mouse,!0),t.addEventListener("touchmove",touch2Mouse,!0),t.addEventListener("touchend",touch2Mouse,!0))};$.widget("metro.accordion",{version:"3.0.0",options:{closeAny:!1,speed:"fast",onFrameOpen:function(){return!0},onFrameOpened:function(){},onFrameClose:function(){return!0},onFrameClosed:function(){}},init:function(){var t=this,e=this.element;e.on("click",".heading",function(e){var n=$(this).parent();return!n.hasClass("disabled")&&(n.hasClass("active")?t._closeFrame(n):t._openFrame(n),e.preventDefault(),void e.stopPropagation())})},_closeAllFrames:function(){var t=this,e=this.element.children(".frame.active");$.each(e,function(){t._closeFrame($(this))})},_openFrame:function(frame){var o=this.options,content=frame.children(".content"),result;if("function"==typeof o.onFrameOpen){if(!o.onFrameOpen(frame))return!1}else if("function"==typeof window[o.onFrameOpen]){if(!window[o.onFrameOpen](frame))return!1}else if(result=eval("(function(){"+o.onFrameOpen+"})"),!result.call(frame))return!1;o.closeAny&&this._closeAllFrames(),content.slideDown(o.speed),frame.addClass("active"),"function"==typeof o.onFrameOpened?o.onFrameOpened(frame):"function"==typeof window[o.onFrameOpened]?window[o.onFrameOpened](frame):(result=eval("(function(){"+o.onFrameOpened+"})"),result.call(frame))},_closeFrame:function(frame){var o=this.options,content=frame.children(".content"),result;if("function"==typeof o.onFrameClose){if(!o.onFrameClose(frame))return!1}else if("function"==typeof window[o.onFrameClose]){if(!window[o.onFrameClose](frame))return!1}else if(result=eval("(function(){"+o.onFrameClose+"})"),!result.call(frame))return!1;content.slideUp(o.speed,function(){frame.removeClass("active")}),"function"==typeof o.onFrameClosed?o.onFrameClosed(frame):"function"==typeof window[o.onFrameClosed]?window[o.onFrameClosed](frame):(result=eval("(function(){"+o.onFrameClosed+"})"),result.call(frame))},_create:function(){var t=this,e=this.options,n=this.element;$.each(this.element.data(),function(t,n){if(t in e)try{e[t]=$.parseJSON(n)}catch(o){e[t]=n}}),t.init(),n.data("accordion",this)},_destroy:function(){},_setOption:function(t,e){this._super("_setOption",t,e)}}),$.widget("metro.appbar",{version:"3.0.0",options:{flexstyle:"app-bar-menu",flexclean:!1,flextolerance:3},_create:function(){var t=this.element,e=this.options;$.each(t.data(),function(t,n){if(t in e)try{e[t]=$.parseJSON(n)}catch(o){e[t]=n}}),this._initBar(),t.data("appbar",this)},_calculateFreeSpace:function(){var t,e,n=this,o=(this.element,this.options,0),i=0;o=$(n.menusParent).width(),t=$(n.menusParent).children(":visible").not(".app-bar-pullmenu");for(var a,s=[],r=[],l=[],d=0,c=t.length;c>d;d++)switch(a=$(t[d]).css("float")){case"left":s.push(t[d]);break;case"right":r.push(t[d]);break;default:l.push(t[d])}r.reverse(),t=new Array,t=s.concat(l,r),t=$(t),i+=parseInt($(t).first().css("margin-left"));for(var d=0,c=t.length-1;c>=d;d++)i+=$(t[d]).outerWidth(),d!==c&&(i+=Math.max(parseInt($(t[d]).css("margin-right")),parseInt($(t[d+1]).css("margin-left"))));return i+=parseInt($(t[c]).css("margin-right")),e=o-i,n.freeSpace=e,n.childrenWidth=i,n.menusParentWidth=o,e},_originIndexMove:function(t,e){var n=$(t).children().filter(function(){return parseInt($(this).attr("data-flexorderorigin"))<parseInt($(e).attr("data-flexorderorigin"))});n.length>0?$(n).last().after(e):(n=$(t).children().filter(function(){return parseInt($(this).attr("data-flexorderorigin"))>parseInt($(e).attr("data-flexorderorigin"))}),n.length>0?$(n).first().before(e):$(t).append(e))},_moveMenuEntry:function(t){var e=this;if(this.element,this.options,t=t||"toPullMenu","toPullMenu"===t){var n=$(e.allMenuEntries).not(".app-bar-pullmenu-entry").last();if(0===n.length)return!1;var o=$(n).parent(),i=$(e.flexVisibles).index($(n).parent()),a=$(e.pullMenu).find(".app-bar-pullmenubar").eq(i);return e._originIndexMove(a,n),$(n).addClass("app-bar-pullmenu-entry"),$(a).removeClass("hidden").show(),0===$(o).children().length&&$(o).addClass("hidden"),$(e.pullButton).show(),n}if("fromPullMenu"===t){var s=$(e.allMenuEntries).filter(".app-bar-pullmenu-entry").first(),a=$(s).parent(),i=$(a).index(),o=$(e.flexVisibles).eq(i);return $(o).removeClass("hidden"),$(s).removeClass("app-bar-pullmenu-entry"),e._originIndexMove(o,s),0===$(a).children().length&&$(a).addClass("hidden").hide(),0===$(e.pullMenu).children(".app-bar-pullmenubar").not(".hidden").length&&($(e.pullMenu).hide().addClass("hidden"),$(e.pullButton).hide()),0!==s.length&&s}},_checkMenuEntries:function(){for(var t=this,e=(this.element,this.options),n=!1,o=0,i=t.allMenuEntries.length;i>o;o++){t._calculateFreeSpace();var a=t.freeSpace;if(!(a<e.flextolerance||e.flexclean)){if(t._moveMenuEntry("fromPullMenu")){n=!0;continue}break}if(!t._moveMenuEntry("toPullMenu"))break;if(n)break}},resize:function(){var t=this;this.element,this.options,t.initiatedAsFlex&&this._checkMenuEntries()},_initBar:function(){var t=this,e=this.element,n=this.options;t.lastFlexAction=void 0,t.pullButton=$(e).find(".app-bar-pullbutton");var o=$(e).find(".app-bar-menu");t.initiatedAsFlex=!1,n.flexclean=$(e).is("[data-flexclean='true']")||n.flexclean,n.flexstyle=$(e).attr("data-flexstyle")||n.flexstyle;var i,a;t.flexVisibles=$(),t.allMenuEntries=$(),t.menusParent=$(),t.pullMenu=$(),o.length>0&&$(e).is(":not('.no-flexible')")&&(t.flexVisibles=$(o).not(".no-flexible"),t.flexVisibles.length>0&&(t.initiatedAsFlex=!0,t.flexVisibles.sort(function(t,e){var n=parseInt($(t).data("flexorder"))||$(t).index()+1,o=parseInt($(e).data("flexorder"))||$(e).index()+1;return n-o}),$(t.flexVisibles).each(function(){i=this,a=$(i).children(),$(a).each(function(){$(this).attr("data-flexorderorigin",$(this).index()),$(this).is("[data-flexorder]")||$(this).attr("data-flexorder",$(this).index()+1)}),a.sort(function(t,e){var n=parseInt($(t).data("flexorder")),o=parseInt($(e).data("flexorder"));return n-o}),$(i).is("[data-flexdirection='reverse']")&&a.reverse(),$.merge(t.allMenuEntries,$(a).not(".no-flexible"))}),t.menusParent=$(e).find(".app-bar-menu").first().parent(),t.pullButton.length>0||(t.pullButton=$('<div class="app-bar-pullbutton automatic"></div>'),$(t.menusParent).append(t.pullButton)),t.pullMenu=$('<nav class="app-bar-pullmenu hidden" />'),t.flexVisibles.each(function(){$(t.pullMenu).append($('<ul class="app-bar-pullmenubar hidden '+n.flexstyle+'" />'))}),$(t.menusParent).append($('<div class="clearfix" style="width: 0;">')),$(t.pullMenu).addClass("flexstyle-"+n.flexstyle),$(t.menusParent).append(t.pullMenu),t._checkMenuEntries(),$(t.pullButton).on("click",function(){t=$(this).closest("[data-role=appbar]").data("appbar"),$(t.pullMenu).is(":hidden")?($(t.pullMenu).show(),$(t.pullMenu).find(".app-bar-pullmenubar").hide().not(".hidden").slideDown("fast")):$(t.pullMenu).find(".app-bar-pullmenubar").not(".hidden").show().slideUp("fast",function(){$(t.pullMenu).hide()})}),$(window).resize(function(){$("[data-role=appbar]:not(.no-flexible)").each(function(){$(this).data("appbar").resize()})}),$(window).load(function(){$("[data-role=appbar]:not(.no-flexible)").each(function(){$(this).data("appbar").resize()})}),$("[data-role=appbar]:not(.no-flexible) [src]").on("load",function(){
var t=$(this).closest("[data-role=appbar]").data("appbar");t.resize()})))},_destroy:function(){},_setOption:function(t,e){this._super("_setOption",t,e)}}),$.widget("metro.audio",{version:"3.0.14",options:{src:!1,volume:.5,muted:!1,loop:!1,preload:!1,autoplay:!1,playList:!1,mode:"full",loopButton:"<span class='mif-loop'></span>",stopButton:"<span class='mif-stop'></span>",playButton:"<span class='mif-play'></span>",pauseButton:"<span class='mif-pause'></span>",muteButton:"<span class='mif-volume-mute2'></span>",shuffleButton:"<span class='mif-shuffle'></span>",nextButton:"<span class='mif-forward'></span>",prevButton:"<span class='mif-backward'></span>",randomButton:"<span class='mif-dice'></span>",playListButton:"<span class='mif-list2'></span>",volumeLowButton:"<span class='mif-volume-low'></span>",volumeMediumButton:"<span class='mif-volume-medium'></span>",volumeHighButton:"<span class='mif-volume-high'></span>"},_create:function(){var t=this.element;this.options,this._setOptionsFromDOM(),this._createPlayer(),this._addControls(),this._addEvents(),this._addPlayList(),this._setControlsVisibility(),t.data("audio",this)},_setControlsVisibility:function(){var t=this.element;this.options,0==t.find(".play-list").length&&(t.find(".controls .plist").hide(),t.find(".controls .next").hide(),t.find(".controls .prev").hide(),t.find(".controls .random").hide())},_addPlayList:function(){var t,e,n,o,i,a,s=this,r=this.element,l=this.options;if(r.find("audio"),l.playList&&void 0!=window[l.playList]&&"function"==typeof window[l.playList]&&(t=window[l.playList](),e=t.items,n=$("<div>").addClass("play-list-wrapper").insertBefore(r.find("audio")),void 0!=t.title&&(i=$("<h1>").addClass("album-title").html(t.title).appendTo(n)),void 0!=t.poster&&(o=$("<div>").addClass("poster").html($("<img>").attr("src",t.poster)).appendTo(n)),void 0!=t.desc&&$("<div>").addClass("album-desc").html(t.desc).appendTo(o),a=$("<ul>").addClass("play-list").appendTo(n),void 0!=e&&$.each(t.items,function(){var t,e=this;t=$("<li>").appendTo(a),t.data("src",e.file),void 0!=e.type&&t.data("type",e.type),t.html(void 0!=e.title?e.title:e.file.replace(/^.*[\\\/]/,""))})),a=r.find("ul"),0==a.length)return this;a.addClass("play-list");var d=a.find("li");return 0==d.length?this:($.each(d,function(){var t=$(this);$("<div>").addClass("progress-bar small no-margin-top").data("role","progress").appendTo(t).hide(),t.on("click",function(){d.removeClass("current"),d.find(".progress-bar").hide();var e=t.data("src"),n=t.data("type");t.addClass("current"),t.find(".progress-bar").show(),r.data("current",t),s.play(e,n)})}),$(d[0]).click(),this._stop(),void r.data("current",$(d[0])))},_createPlayer:function(){var t=this.element,e=this.options,n=t.find("audio");t.addClass("audio-player"),t.addClass(e.mode),0==n.length&&(n=$("<audio>").appendTo(t)),$.each(["autoplay","controls","muted","loop","preload"],function(){n.removeAttr(this)}),e.src&&n.attr(src,e.src),e.loop&&n.attr("loop","loop"),e.preload&&n.attr("preload","auto"),e.autoplay&&n.attr("autoplay","autoplay"),n[0].volume=e.volume,n[0].muted=e.muted,t.data("muted",!1),t.data("duration",0),t.data("played",!1),t.data("volume",n[0].volume),t.data("current",!1)},_addControls:function(){var t,e,n,o,i,a,s,r,l,d,c,u,h,p,f=this,m=this.element,v=this.options,g=m.find("audio"),_=g[0];t=$("<div>").addClass("controls").appendTo(m),v.playListButton!==!1&&(p=$("<button/>").addClass("square-button control-element plist").html(v.playListButton).appendTo(t),p.on("click",function(){var t=m.find(".play-list-wrapper");return 0==t.length?f:void t.toggleClass("not-visible")})),v.loopButton!==!1&&(n=$("<button/>").addClass("square-button control-element loop").html(v.loopButton).appendTo(t),n.on("click",function(){n.toggleClass("active"),n.hasClass("active")?g.attr("loop","loop"):g.removeAttr("loop")})),v.playButton!==!1&&(e=$("<button/>").addClass("square-button control-element play").html(v.playButton).appendTo(t),e.on("click",function(){f._play()})),v.prevButton!==!1&&(u=$("<button/>").addClass("square-button control-element prev").html(v.prevButton).appendTo(t),u.on("click",function(){f._playPrev()})),v.nextButton!==!1&&(c=$("<button/>").addClass("square-button control-element next").html(v.nextButton).appendTo(t),c.on("click",function(){f._playNext()})),v.randomButton!==!1&&(h=$("<button/>").addClass("square-button control-element random").html(v.randomButton).appendTo(t),h.on("click",function(){f._playRandom()})),v.stopButton!==!1&&(o=$("<button/>").addClass("square-button control-element stop").html(v.stopButton).appendTo(t),o.attr("disabled",!0),o.on("click",function(){f._stop()})),l=$("<div/>").addClass("control-element stream-wrapper").appendTo(t),s=$("<div/>").addClass("slider stream-slider").appendTo(l),s.slider({showHint:!0,animate:!1,markerColor:"bg-red",completeColor:"bg-cyan",onStartChange:function(){_.pause()},onChanged:function(t){_.seekable.length>0&&(_.currentTime=(m.data("duration")*t/100).toFixed(0)),m.data("played")&&_.currentTime>=0&&_.play()}}),s.data("slider").value(0),r=$("<div/>").addClass("control-element info-box").appendTo(t),r.html("00:00 / 00:00");var w=$("<div/>").addClass("place-right").appendTo(t);i=$("<button/>").addClass("square-button control-element volume").html(v.volumeLowButton).appendTo(w),i.on("click",function(){var t=m.find(".volume-slider").data("slider");m.data("muted",!m.data("muted")),m.data("muted")?(m.data("volume",_.volume),i.html(v.muteButton),t.value(0)):(_.volume=m.data("volume"),t.value(100*m.data("volume")),f._setupVolumeButton()),_.muted=m.data("muted")}),this._setupVolumeButton(),d=$("<div/>").addClass("control-element volume-wrapper").appendTo(w),a=$("<div/>").addClass("slider volume-slider").appendTo(d),a.slider({showHint:!0,animate:!1,markerColor:"bg-red",completeColor:"bg-green",onChange:function(t){_.volume=t/100,f._setupVolumeButton()}}),a.data("slider").value(100*_.volume)},_setupVolumeButton:function(){var t=this.element,e=this.options,n=t.find("audio"),o=n[0],i=t.find(".controls"),a=i.find(".volume"),s=o.volume;a.html(s>0&&.3>s?e.volumeLowButton:s>=.3&&.6>s?e.volumeMediumButton:s>=.6&&1>=s?e.volumeHighButton:e.muteButton)},_addEvents:function(){var t=this,e=this.element,n=(this.options,e.find("audio")),o=n[0],i=(e.find(".controls"),e.find(".info-box"));n.on("loadedmetadata",function(){e.data("duration",o.duration.toFixed(0)),i.html("00:00 / "+secondsToFormattedString(e.data("duration")))}),n.on("canplay",function(){var e=o.buffered.length?Math.round(Math.floor(o.buffered.end(0))/Math.floor(o.duration)*100):0;t._setBufferSize(e)}),n.on("progress",function(){var e=o.buffered.length?Math.round(Math.floor(o.buffered.end(0))/Math.floor(o.duration)*100):0;t._setBufferSize(e)}),n.on("timeupdate",function(){if(t._setInfoData(),t._setStreamSliderPosition(),e.data("current")){var n=e.data("current").find(".progress-bar").data("progress"),i=Math.round(100*o.currentTime/e.data("duration"));n.value(i)}}),n.on("waiting",function(){}),n.on("loadeddata",function(){}),n.on("ended",function(){t._stop(),e.find(".play-list li").length>0&&t._playNext()})},_setInfoData:function(){var t=this.element,e=(t[0],this.options,t.find("audio")),n=e[0],o=t.find(".controls .info-box"),i=Math.round(n.currentTime);o.html(secondsToFormattedString(i)+" / "+secondsToFormattedString(t.data("duration")))},_setStreamSliderPosition:function(){var t=this.element,e=(t[0],this.options,t.find("audio")),n=e[0],o=t.find(".stream-slider").data("slider"),i=Math.round(100*n.currentTime/t.data("duration"));o.value(i)},_setBufferSize:function(t){var e=this.element,n=(e[0],this.options,e.find("audio")),o=(n[0],e.find(".stream-slider").data("slider"));o.buffer(Math.round(t))},_play:function(){var t=this.element,e=(t[0],this.options),n=t.find("audio"),o=n[0],i=t.find(".controls .play"),a=t.find(".controls .stop");o.paused?(i.html(e.pauseButton),o.play(),a.removeAttr("disabled"),t.data("played",!0),t.trigger("play")):(i.html(e.playButton),o.pause(),t.data("played",!1),t.trigger("pause"))},_playRandom:function(){var t=this.element,e=(t[0],this.options,t.find("audio")),n=(e[0],t.find(".play-list")),o=t.find(".play-list li");if(0==o.length)return this;var i=Math.floor(Math.random()*o.length)+1,a=n.find("li:nth-child("+i+")");a.click()},_playNext:function(){var t=this.element,e=(t[0],this.options,t.find("audio")),n=(e[0],t.find(".play-list")),o=t.find(".play-list li");if(0==o.length)return this;var i=n.find(".current").next();0==i.length&&(i=n.find("li:nth-child(1)")),i.click()},_playPrev:function(){var t=this.element,e=(t[0],this.options,t.find("audio")),n=(e[0],t.find(".play-list")),o=t.find(".play-list li");if(0==o.length)return this;var i=n.find(".current").prev();0==i.length&&(i=n.find("li:last-child")),i.click()},_stop:function(){var t=this.element,e=(t[0],this.options),n=t.find("audio"),o=n[0],i=t.find(".controls .stop"),a=t.find(".controls .play");o.pause(),o.currentTime=0,a.html(e.playButton),i.attr("disabled","disabled"),t.data("played",!1),t.find(".stream-slider").data("slider").value(0),t.trigger("stop")},play:function(t,e){var n,o=this.element,i=(o[0],this.options,o.find("audio")),a=i[0];this._stop(),i.find("source").remove(),i.removeAttr("src"),n=$("<source>").attr("src",t),void 0!=e&&n.attr("type",e),a.load(),n.appendTo(i),this._play()},pause:function(){var t=this.element,e=(t[0],this.options),n=t.find("audio"),o=n[0],i=t.find(".play");i.html(e.playButton),o.pause(),t.data("played",!1),t.trigger("pause")},resume:function(){var t=this.element,e=(t[0],this.options),n=t.find("audio"),o=n[0],i=t.find(".play"),a=t.find(".stop");i.html(e.pauseButton),o.play(),a.removeAttr("disabled"),t.data("played",!0),t.trigger("play")},stop:function(){this._stop()},_setOptionsFromDOM:function(){var t=this.element,e=this.options;$.each(t.data(),function(t,n){if(t in e)try{e[t]=$.parseJSON(n)}catch(o){e[t]=n}})},_destroy:function(){},_setOption:function(t,e){this._super("_setOption",t,e)}}),$.widget("metro.group",{version:"3.0.0",options:{groupType:"one-state",buttonStyle:!1,onChange:function(){return!0},onChanged:function(){}},_create:function(){var that=this,element=this.element,o=this.options,result;$.each(element.data(),function(t,e){if(t in o)try{o[t]=$.parseJSON(e)}catch(n){o[t]=e}}),element.hasClass("group-of-buttons")||element.addClass("group-of-buttons");for(var buttons=element.find(".button, .toolbar-button"),i=0;i<buttons.length;i++)$(buttons[i]).data("index",i);o.buttonStyle!==!1&&buttons.addClass(o.buttonStyle),element.on("click",".button, .toolbar-button",function(){var button=$(this),index=button.data("index");if("function"==typeof o.onChange){if(!o.onChange(index,button))return!1}else if("function"==typeof window[o.onChange]){if(!window[o.onChange](index,button))return!1}else if(result=eval("(function(){"+o.onChange+"})"),!result.call(index,button))return!1;"one-state"===o.groupType?(buttons.removeClass("active"),$(this).addClass("active")):$(this).toggleClass("active"),"function"==typeof o.onChanged?o.onChanged(index,button):"function"==typeof window[o.onChanged]?window[o.onChanged](index,button):(result=eval("(function(){"+o.onChanged+"})"),result.call(index,button))}),element.data("group",this)},_destroy:function(){},_setOption:function(t,e){this._super("_setOption",t,e)}}),$.widget("metro.calendar",{version:"3.0.0",options:{format:"yyyy-mm-dd",multiSelect:!1,startMode:"day",weekStart:window.METRO_CALENDAR_WEEK_START,otherDays:!0,date:new Date,minDate:!1,maxDate:!1,preset:!1,exclude:!1,stored:!1,buttons:!0,buttonToday:!0,buttonClear:!0,syncCalenderToDateField:!0,locale:window.METRO_CURRENT_LOCALE,actions:!0,condensedGrid:!1,scheme:"default",getDates:function(){},dayClick:function(){}},_year:0,_month:0,_day:0,_today:new Date,_event:"",_mode:"day",_distance:0,_events:[],_create:function(){var t=this,e=this.element,n=this.options;$.each(e.data(),function(t,e){if(t in n)try{n[t]=$.parseJSON(e)}catch(o){n[t]=e}}),"string"==typeof n.date&&(n.date=new Date(n.date)),n.minDate!==!1&&"string"==typeof n.minDate&&(n.minDate=new Date(n.minDate+"T00:00:00Z")-864e5),n.maxDate!==!1&&"string"==typeof n.maxDate&&(n.maxDate=new Date(n.maxDate+"T00:00:00Z")),this.locales=window.METRO_LOCALES,this._year=n.date.getFullYear(),this._distance=n.date.getFullYear()-4,this._month=n.date.getMonth(),this._day=n.date.getDate(),this._mode=n.startMode,e.data("_storage",[]),e.data("_exclude",[]),e.data("_stored",[]),e.hasClass("calendar")||e.addClass("calendar");var o,i;n.preset&&(o=/\s*,\s*/,i=n.preset.split(o),$.each(i,function(){void 0!==new Date(this)&&t.setDate(this)})),n.exclude&&(o=/\s*,\s*/,i=n.exclude.split(o),$.each(i,function(){void 0!==new Date(this)&&t.setDateExclude(this)})),n.stored&&(o=/\s*,\s*/,i=n.stored.split(o),$.each(i,function(){void 0!==new Date(this)&&t.setDateStored(this)})),"default"!==n.scheme&&e.addClass(n.scheme),this._renderCalendar(),e.data("calendar",this)},_renderButtons:function(t){var e,n,o=this.options;if(this.options.buttons){var i=o.buttonToday?"<button class='button calendar-btn-today small-button success'>"+this.locales[o.locale].buttons[0]+"</button>":"",a=o.buttonClear?"<button class='button calendar-btn-clear small-button warning'>"+this.locales[o.locale].buttons[1]+"</button>":"";e=$("<div/>").addClass("calendar-row calendar-actions"),n=$("<div/>").addClass("align-center").html(i+a),n.appendTo(e),e.appendTo(t)}},_renderMonth:function(){var t=this.options,e=this._year,n=this._month,o=(this._day,this._event,28);1===n&&(e%100!==0&&e%4===0||e%400===0)&&(o=29);var i,a,s,r,l,d=["31",""+o,"31","30","31","30","31","31","30","31","30","31"],c=d[n],u=this._dateFromNumbers(e,n+1,1).getDay();this.element.html(""),i=$("<div/>").addClass("calendar-grid"),t.condensedGrid&&i.addClass("condensed no-border"),a=$("<div/>").addClass("calendar-row no-margin"),$("<div/>").addClass("calendar-cell align-center").html("<a class='btn-previous-year' href='#'>-</a>").appendTo(a),$("<div/>").addClass("calendar-cell align-center").html("<a class='btn-previous-month' href='#'>〈</a>").appendTo(a),$("<div/>").addClass("calendar-cell sel-month align-center").html("<a class='btn-select-month' href='#'>"+this.locales[t.locale].months[n]+" "+e+"</a>").appendTo(a),$("<div/>").addClass("calendar-cell align-center").html("<a class='btn-next-month' href='#'>〉</a>").appendTo(a),$("<div/>").addClass("calendar-cell align-center").html("<a class='btn-next-year' href='#'>+</a>").appendTo(a),a.addClass("calendar-header").appendTo(i);var h;for(a=$("<div/>").addClass("calendar-row week-days"),r=0;7>r;r++)t.weekStart?(h=r+1,7===h&&(h=0),s=$("<div/>").addClass("calendar-cell align-center day-of-week").appendTo(a),l=$("<div/>").html(this.locales[t.locale].days[h+7]).appendTo(s)):(s=$("<div/>").addClass("calendar-cell align-center day-of-week").appendTo(a),l=$("<div/>").html(this.locales[t.locale].days[r+7]).appendTo(s));a.addClass("calendar-subheader").appendTo(i);var p=this._month-1;0>p&&(p=11);var f=d[p],m=(t.weekStart?u+6:u)%7,v="";for(a=$("<div/>").addClass("calendar-row"),r=0;m>r;r++)t.otherDays&&(v=f-(m-r-1)),s=$("<div/>").addClass("calendar-cell empty").appendTo(a),l=$("<div/>").addClass("other-day").html(v).appendTo(s),t.otherDays||l.css("visibility","hidden");var g,_,w,y=(t.weekStart?u+6:u)%7;for(r=1;c>=r;r++)y%=7,0===y&&(a.appendTo(i),a=$("<div/>").addClass("calendar-row")),s=$("<div/>").addClass("calendar-cell align-center day"),l=$("<div/>").appendTo(s),t.minDate!==!1&&this._dateFromNumbers(e,n+1,r)<t.minDate||t.maxDate!==!1&&this._dateFromNumbers(e,n+1,r)>t.maxDate?(s.removeClass("day"),l.addClass("other-day"),w=r):w="<a href='#'>"+r+"</a>",l.html(w),e===this._today.getFullYear()&&n===this._today.getMonth()&&this._today.getDate()===r&&s.addClass("today"),g=this._dateNumberStringyFy(this._year,this._month+1,r),this.element.data("_storage").indexOf(g)>=0&&(_=s.find("a"),_.parent().parent().addClass("selected")),this.element.data("_exclude").indexOf(g)>=0&&(_=s.find("a"),_.parent().parent().addClass("exclude")),this.element.data("_stored").indexOf(g)>=0&&(_=s.find("a"),_.parent().parent().addClass("stored")),s.appendTo(a),y++;var b="";for(r=y+1;7>=r;r++)t.otherDays&&(b=r-y),s=$("<div/>").addClass("calendar-cell empty").appendTo(a),l=$("<div/>").addClass("other-day").html(b).appendTo(s),t.otherDays||l.css("visibility","hidden");a.appendTo(i),this._renderButtons(i),i.appendTo(this.element)},_renderMonths:function(){var t,e,n,o,i;for(this.element.html(""),t=$("<div/>").addClass("calendar-grid"),this.options.condensedGrid&&t.addClass("condensed no-border"),e=$("<div/>").addClass("calendar-row"),$("<div/>").addClass("calendar-cell sel-minus align-center").html("<a class='btn-previous-year' href='#'>-</a>").appendTo(e),$("<div/>").addClass("calendar-cell sel-year align-center").html("<a class='btn-select-year' href='#'>"+this._year+"</a>").appendTo(e),$("<div/>").addClass("calendar-cell sel-plus align-center").html("<a class='btn-next-year' href='#'>+</a>").appendTo(e),e.addClass("calendar-header").appendTo(t),e=$("<div/>").addClass("calendar-row"),i=0,o=0;12>o;o++)n=$("<div/>").addClass("calendar-cell month-cell align-center month").html("<a href='#' data-month='"+o+"'>"+this.locales[this.options.locale].months[o+12]+"</a>"),this._month===o&&(new Date).getFullYear()===this._year&&n.addClass("today"),n.appendTo(e),(i+1)%4===0&&(e.appendTo(t),e=$("<div/>").addClass("calendar-row")),i+=1;this._renderButtons(t),t.appendTo(this.element)},_renderYears:function(){var t,e,n,o,i;for(this.element.html(""),t=$("<div/>").addClass("calendar-grid"),this.options.condensedGrid&&t.addClass("condensed no-border"),e=$("<div/>").addClass("calendar-row cells4"),$("<div/>").addClass("calendar-cell sel-minus align-center").html("<a class='btn-previous-year' href='#'>-</a>").appendTo(e),$("<div/>").addClass("calendar-cell sel-year align-center").html("<a class='btn-none-btn'>"+this._distance+"-"+(this._distance+11)+"</a>").appendTo(e),$("<div/>").add