mirror of
https://github.com/humhub/humhub.git
synced 2025-01-18 22:58:06 +01:00
117 lines
372 KiB
JavaScript
117 lines
372 KiB
JavaScript
/*!
|
||
* jQuery JavaScript Library v2.2.4
|
||
* http://jquery.com/
|
||
*
|
||
* Includes Sizzle.js
|
||
* http://sizzlejs.com/
|
||
*
|
||
* Copyright jQuery Foundation and other contributors
|
||
* Released under the MIT license
|
||
* http://jquery.org/license
|
||
*
|
||
* Date: 2016-05-20T17:23Z
|
||
*/
|
||
function parseHtml(a){for(var b,c=/<script type="text\/javascript" src="([\s\S]*?)"><\/script>/gm;b=c.exec(a);)js=b[1],currentLoadedJavaScripts.hasItem(js)?a=a.replace(b[0],""):currentLoadedJavaScripts.setItem(js,1);return a}function HashTable(a){this.length=0,this.items={};for(var b in a)a.hasOwnProperty(b)&&(this.items[b]=a[b],this.length++);this.setItem=function(a,b){var c=void 0;return this.hasItem(a)?c=this.items[a]:this.length++,this.items[a]=b,c},this.getItem=function(a){return this.hasItem(a)?this.items[a]:void 0},this.hasItem=function(a){return this.items.hasOwnProperty(a)},this.removeItem=function(a){return this.hasItem(a)?(previous=this.items[a],this.length--,delete this.items[a],previous):void 0},this.keys=function(){var a=[];for(var b in this.items)this.hasItem(b)&&a.push(b);return a},this.values=function(){var a=[];for(var b in this.items)this.hasItem(b)&&a.push(this.items[b]);return a},this.each=function(a){for(var b in this.items)this.hasItem(b)&&a(b,this.items[b])},this.clear=function(){this.items={},this.length=0}}function setModalLoader(){$(".modal-footer .btn").hide(),$(".modal-footer .loader").removeClass("hidden")}function setModalHandler(){$("a[data-target='#globalModal']").unbind(),$(document).off("click.humhub"),$(document).on("click.humhub","a[data-target='#globalModal']",function(a){a.preventDefault();var b={show:!0,backdrop:$(this).data("backdrop")};$("#globalModal").modal(b);var c=$(this).attr("href");$("#globalModal").load(c,function(){})})}function initPlugins(){$(".tt").tooltip({html:!1,container:"body"}),$(".po").popover({html:!0}),$("input, textarea").placeholder(),$("body").find(":checkbox, :radio").flatelements(),$('a[data-loader="modal"], button[data-loader="modal"]').loader()}function setModalsAndBackdropsOrder(){var a=1040;$(".modal.in").each(function(b){var c=$(this);a++,c.css("zIndex",a),c.next(".modal-backdrop.in").addClass("hidden").css("zIndex",a-1)}),$(".modal.in:visible:last").focus().next(".modal-backdrop.in").removeClass("hidden")}function htmlEncode(a){return $("<div/>").text(a).html()}function htmlDecode(a){return $("<div/>").html(a).text()}function installUploader(a){$("#fileUploaderButton_"+a).each(function(){$("#fileUploaderButton_"+a).fileupload({dropZone:$(this),dataType:"json",done:function(b,c){$.each(c.result.files,function(b,c){c.error?showFileUploadError(c):(hiddenValueField=$("#fileUploaderHiddenField_"+a),hiddenValueField.val(hiddenValueField.val()+","+c.guid),addToUploadList(a,c.guid,c.name,c.mimeIcon))})},progressall:function(b,c){var d=parseInt(c.loaded/c.total*100,10);$("#fileUploaderProgressbar_"+a).show(),100==d?($("#fileUploaderProgressbar_"+a).children().css("width","100%"),$("#fileUploaderProgressbar_"+a).hide()):$("#fileUploaderProgressbar_"+a).children().css("width",d+"%")}}).prop("disabled",!$.support.fileInput).parent().addClass($.support.fileInput?void 0:"disabled")})}function addToUploadList(a,b,c,d){$("#fileUploaderList_"+a).fadeIn("slow"),$("#fileUploaderListUl_"+a).append('<li style="padding-left: 24px;" class="mime '+d+'">'+c+' <span data-guid="'+b+'" class="file_upload_remove_link"> <i class="fa fa-times-circle"></i></span></li>'),$(".file_upload_remove_link").off("click"),$(".file_upload_remove_link").on("click",function(){$(this).parent().remove(),$.ajax({type:"POST",data:{guid:$(this).data("guid")},url:file_delete_url}).done(function(){$(this).data("guid")})})}function resetUploader(a){$("#fileUploaderHiddenField_"+a).val(""),$("#fileUploaderList_"+a).hide(),$("#fileUploaderListUl_"+a).html("")}function showFileUploadError(a){errorMessage="",jQuery.each(a.errors,function(){jQuery.each(this,function(){errorMessage+=this})}),$("#fileModal").remove();var b='<div class="modal" id="fileModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"aria-hidden="true"><div class="modal-dialog modal-dialog-extra-small animated pulse"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title" id="myModalLabel">'+fileuploader_error_modal_title+'</h4> </div><div class="modal-body text-center">'+fileuploader_error_modal_errormsg+" "+htmlEncode(a.name)+"<br>"+htmlEncode(errorMessage)+'</div><div class="modal-footer"><button type="button" class="btn btn-primary" data-dismiss="modal">'+fileuploader_error_modal_btn_close+"</button></div></div></div></div>";$("body").append(b),$("#fileModal").modal("show")}/*!
|
||
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
||
* Copyright 2011-2016 Twitter, Inc.
|
||
* Licensed under the MIT license
|
||
*/
|
||
if(function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=!!a&&"length"in a&&a.length,c=fa.type(a);return"function"!==c&&!fa.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}function d(a,b,c){if(fa.isFunction(b))return fa.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return fa.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(pa.test(b))return fa.filter(b,a,c);b=fa.filter(b,a)}return fa.grep(a,function(a){return _.call(b,a)>-1!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b={};return fa.each(a.match(va)||[],function(a,c){b[c]=!0}),b}function g(){X.removeEventListener("DOMContentLoaded",g),a.removeEventListener("load",g),fa.ready()}function h(){this.expando=fa.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Ca,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:Ba.test(c)?fa.parseJSON(c):c)}catch(e){}Aa.set(a,b,c)}else c=void 0;return c}function j(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return fa.css(a,b,"")},i=h(),j=c&&c[3]||(fa.cssNumber[b]?"":"px"),k=(fa.cssNumber[b]||"px"!==j&&+i)&&Ea.exec(fa.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,fa.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}function k(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&fa.nodeName(a,b)?fa.merge([a],c):c}function l(a,b){for(var c=0,d=a.length;c<d;c++)za.set(a[c],"globalEval",!b||za.get(b[c],"globalEval"))}function m(a,b,c,d,e){for(var f,g,h,i,j,m,n=b.createDocumentFragment(),o=[],p=0,q=a.length;p<q;p++)if(f=a[p],f||0===f)if("object"===fa.type(f))fa.merge(o,f.nodeType?[f]:f);else if(La.test(f)){for(g=g||n.appendChild(b.createElement("div")),h=(Ia.exec(f)||["",""])[1].toLowerCase(),i=Ka[h]||Ka._default,g.innerHTML=i[1]+fa.htmlPrefilter(f)+i[2],m=i[0];m--;)g=g.lastChild;fa.merge(o,g.childNodes),g=n.firstChild,g.textContent=""}else o.push(b.createTextNode(f));for(n.textContent="",p=0;f=o[p++];)if(d&&fa.inArray(f,d)>-1)e&&e.push(f);else if(j=fa.contains(f.ownerDocument,f),g=k(n.appendChild(f),"script"),j&&l(g),c)for(m=0;f=g[m++];)Ja.test(f.type||"")&&c.push(f);return n}function n(){return!0}function o(){return!1}function p(){try{return X.activeElement}catch(a){}}function q(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)q(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=o;else if(!e)return a;return 1===f&&(g=e,e=function(a){return fa().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=fa.guid++)),a.each(function(){fa.event.add(this,b,e,d,c)})}function r(a,b){return fa.nodeName(a,"table")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function s(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function t(a){var b=Sa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function u(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(za.hasData(a)&&(f=za.access(a),g=za.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)fa.event.add(b,e,j[e][c])}Aa.hasData(a)&&(h=Aa.access(a),i=fa.extend({},h),Aa.set(b,i))}}function v(a,b){var c=b.nodeName.toLowerCase();"input"===c&&Ha.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function w(a,b,c,d){b=Z.apply([],b);var e,f,g,h,i,j,l=0,n=a.length,o=n-1,p=b[0],q=fa.isFunction(p);if(q||n>1&&"string"==typeof p&&!da.checkClone&&Ra.test(p))return a.each(function(e){var f=a.eq(e);q&&(b[0]=p.call(this,e,f.html())),w(f,b,c,d)});if(n&&(e=m(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(g=fa.map(k(e,"script"),s),h=g.length;l<n;l++)i=e,l!==o&&(i=fa.clone(i,!0,!0),h&&fa.merge(g,k(i,"script"))),c.call(a[l],i,l);if(h)for(j=g[g.length-1].ownerDocument,fa.map(g,t),l=0;l<h;l++)i=g[l],Ja.test(i.type||"")&&!za.access(i,"globalEval")&&fa.contains(j,i)&&(i.src?fa._evalUrl&&fa._evalUrl(i.src):fa.globalEval(i.textContent.replace(Ta,"")))}return a}function x(a,b,c){for(var d,e=b?fa.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||fa.cleanData(k(d)),d.parentNode&&(c&&fa.contains(d.ownerDocument,d)&&l(k(d,"script")),d.parentNode.removeChild(d));return a}function y(a,b){var c=fa(b.createElement(a)).appendTo(b.body),d=fa.css(c[0],"display");return c.detach(),d}function z(a){var b=X,c=Va[a];return c||(c=y(a,b),"none"!==c&&c||(Ua=(Ua||fa("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=Ua[0].contentDocument,b.write(),b.close(),c=y(a,b),Ua.detach()),Va[a]=c),c}function A(a,b,c){var d,e,f,g,h=a.style;return c=c||Ya(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||fa.contains(a.ownerDocument,a)||(g=fa.style(a,b)),c&&!da.pixelMarginRight()&&Xa.test(g)&&Wa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0!==g?g+"":g}function B(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}function C(a){if(a in db)return a;for(var b=a[0].toUpperCase()+a.slice(1),c=cb.length;c--;)if(a=cb[c]+b,a in db)return a}function D(a,b,c){var d=Ea.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function E(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;f<4;f+=2)"margin"===c&&(g+=fa.css(a,c+Fa[f],!0,e)),d?("content"===c&&(g-=fa.css(a,"padding"+Fa[f],!0,e)),"margin"!==c&&(g-=fa.css(a,"border"+Fa[f]+"Width",!0,e))):(g+=fa.css(a,"padding"+Fa[f],!0,e),"padding"!==c&&(g+=fa.css(a,"border"+Fa[f]+"Width",!0,e)));return g}function F(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ya(a),g="border-box"===fa.css(a,"boxSizing",!1,f);if(e<=0||null==e){if(e=A(a,b,f),(e<0||null==e)&&(e=a.style[b]),Xa.test(e))return e;d=g&&(da.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+E(a,b,c||(g?"border":"content"),d,f)+"px"}function G(a,b){for(var c,d,e,f=[],g=0,h=a.length;g<h;g++)d=a[g],d.style&&(f[g]=za.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&Ga(d)&&(f[g]=za.access(d,"olddisplay",z(d.nodeName)))):(e=Ga(d),"none"===c&&e||za.set(d,"olddisplay",e?c:fa.css(d,"display"))));for(g=0;g<h;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function H(a,b,c,d,e){return new H.prototype.init(a,b,c,d,e)}function I(){return a.setTimeout(function(){eb=void 0}),eb=fa.now()}function J(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=Fa[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function K(a,b,c){for(var d,e=(N.tweeners[b]||[]).concat(N.tweeners["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function L(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},n=a.style,o=a.nodeType&&Ga(a),p=za.get(a,"fxshow");c.queue||(h=fa._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,fa.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[n.overflow,n.overflowX,n.overflowY],j=fa.css(a,"display"),k="none"===j?za.get(a,"olddisplay")||z(a.nodeName):j,"inline"===k&&"none"===fa.css(a,"float")&&(n.display="inline-block")),c.overflow&&(n.overflow="hidden",l.always(function(){n.overflow=c.overflow[0],n.overflowX=c.overflow[1],n.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],gb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(o?"hide":"show")){if("show"!==e||!p||void 0===p[d])continue;o=!0}m[d]=p&&p[d]||fa.style(a,d)}else j=void 0;if(fa.isEmptyObject(m))"inline"===("none"===j?z(a.nodeName):j)&&(n.display=j);else{p?"hidden"in p&&(o=p.hidden):p=za.access(a,"fxshow",{}),f&&(p.hidden=!o),o?fa(a).show():l.done(function(){fa(a).hide()}),l.done(function(){var b;za.remove(a,"fxshow");for(b in m)fa.style(a,b,m[b])});for(d in m)g=K(o?p[d]:0,d,l),d in p||(p[d]=g.start,o&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function M(a,b){var c,d,e,f,g;for(c in a)if(d=fa.camelCase(c),e=b[d],f=a[c],fa.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=fa.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function N(a,b,c){var d,e,f=0,g=N.prefilters.length,h=fa.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=eb||I(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:fa.extend({},b),opts:fa.extend(!0,{specialEasing:{},easing:fa.easing._default},c),originalProperties:b,originalOptions:c,startTime:eb||I(),duration:c.duration,tweens:[],createTween:function(b,c){var d=fa.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(M(k,j.opts.specialEasing);f<g;f++)if(d=N.prefilters[f].call(j,a,k,j.opts))return fa.isFunction(d.stop)&&(fa._queueHooks(j.elem,j.opts.queue).stop=fa.proxy(d.stop,d)),d;return fa.map(k,K,j),fa.isFunction(j.opts.start)&&j.opts.start.call(a,j),fa.fx.timer(fa.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function O(a){return a.getAttribute&&a.getAttribute("class")||""}function P(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(va)||[];if(fa.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Q(a,b,c,d){function e(h){var i;return f[h]=!0,fa.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Ab;return e(b.dataTypes[0])||!f["*"]&&e("*")}function R(a,b){var c,d,e=fa.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&fa.extend(!0,a,d),a}function S(a,b,c){for(var d,e,f,g,h=a.contents,i=a.dataTypes;"*"===i[0];)i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function T(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];for(f=k.shift();f;)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}function U(a,b,c,d){var e;if(fa.isArray(b))fa.each(b,function(b,e){c||Eb.test(a)?d(a,e):U(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==fa.type(b))d(a,b);else for(e in b)U(a+"["+e+"]",b[e],c,d)}function V(a){return fa.isWindow(a)?a:9===a.nodeType&&a.defaultView}var W=[],X=a.document,Y=W.slice,Z=W.concat,$=W.push,_=W.indexOf,aa={},ba=aa.toString,ca=aa.hasOwnProperty,da={},ea="2.2.4",fa=function(a,b){return new fa.fn.init(a,b)},ga=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ha=/^-ms-/,ia=/-([\da-z])/gi,ja=function(a,b){return b.toUpperCase()};fa.fn=fa.prototype={jquery:ea,constructor:fa,selector:"",length:0,toArray:function(){return Y.call(this)},get:function(a){return null!=a?a<0?this[a+this.length]:this[a]:Y.call(this)},pushStack:function(a){var b=fa.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return fa.each(this,a)},map:function(a){return this.pushStack(fa.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(Y.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:$,sort:W.sort,splice:W.splice},fa.extend=fa.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||fa.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(fa.isPlainObject(d)||(e=fa.isArray(d)))?(e?(e=!1,f=c&&fa.isArray(c)?c:[]):f=c&&fa.isPlainObject(c)?c:{},g[b]=fa.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},fa.extend({expando:"jQuery"+(ea+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===fa.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!fa.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==fa.type(a)||a.nodeType||fa.isWindow(a))return!1;if(a.constructor&&!ca.call(a,"constructor")&&!ca.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||ca.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?aa[ba.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=fa.trim(a),a&&(1===a.indexOf("use strict")?(b=X.createElement("script"),b.text=a,X.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(ha,"ms-").replace(ia,ja)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var d,e=0;if(c(a))for(d=a.length;e<d&&b.call(a[e],e,a[e])!==!1;e++);else for(e in a)if(b.call(a[e],e,a[e])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(ga,"")},makeArray:function(a,b){var d=b||[];return null!=a&&(c(Object(a))?fa.merge(d,"string"==typeof a?[a]:a):$.call(d,a)),d},inArray:function(a,b,c){return null==b?-1:_.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,d){var e,f,g=0,h=[];if(c(a))for(e=a.length;g<e;g++)f=b(a[g],g,d),null!=f&&h.push(f);else for(g in a)f=b(a[g],g,d),null!=f&&h.push(f);return Z.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),fa.isFunction(a))return d=Y.call(arguments,2),e=function(){return a.apply(b||this,d.concat(Y.call(arguments)))},e.guid=a.guid=a.guid||fa.guid++,e},now:Date.now,support:da}),"function"==typeof Symbol&&(fa.fn[Symbol.iterator]=W[Symbol.iterator]),fa.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){aa["[object "+b+"]"]=b.toLowerCase()});var ka=/*!
|
||
* Sizzle CSS Selector Engine v2.2.1
|
||
* http://sizzlejs.com/
|
||
*
|
||
* Copyright jQuery Foundation and other contributors
|
||
* Released under the MIT license
|
||
* http://jquery.org/license
|
||
*
|
||
* Date: 2015-10-17
|
||
*/
|
||
function(a){function b(a,b,c,d){var e,f,g,h,i,j,l,n,o=b&&b.ownerDocument,p=b?b.nodeType:9;if(c=c||[],"string"!=typeof a||!a||1!==p&&9!==p&&11!==p)return c;if(!d&&((b?b.ownerDocument||b:O)!==G&&F(b),b=b||G,I)){if(11!==p&&(j=ra.exec(a)))if(e=j[1]){if(9===p){if(!(g=b.getElementById(e)))return c;if(g.id===e)return c.push(g),c}else if(o&&(g=o.getElementById(e))&&M(b,g)&&g.id===e)return c.push(g),c}else{if(j[2])return $.apply(c,b.getElementsByTagName(a)),c;if((e=j[3])&&v.getElementsByClassName&&b.getElementsByClassName)return $.apply(c,b.getElementsByClassName(e)),c}if(v.qsa&&!T[a+" "]&&(!J||!J.test(a))){if(1!==p)o=b,n=a;else if("object"!==b.nodeName.toLowerCase()){for((h=b.getAttribute("id"))?h=h.replace(ta,"\\$&"):b.setAttribute("id",h=N),l=z(a),f=l.length,i=ma.test(h)?"#"+h:"[id='"+h+"']";f--;)l[f]=i+" "+m(l[f]);n=l.join(","),o=sa.test(a)&&k(b.parentNode)||b}if(n)try{return $.apply(c,o.querySelectorAll(n)),c}catch(q){}finally{h===N&&b.removeAttribute("id")}}}return B(a.replace(ha,"$1"),b,c,d)}function c(){function a(c,d){return b.push(c+" ")>w.cacheLength&&delete a[b.shift()],a[c+" "]=d}var b=[];return a}function d(a){return a[N]=!0,a}function e(a){var b=G.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function f(a,b){for(var c=a.split("|"),d=c.length;d--;)w.attrHandle[c[d]]=b}function g(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||V)-(~a.sourceIndex||V);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function h(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function i(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function j(a){return d(function(b){return b=+b,d(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function k(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}function l(){}function m(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function n(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=Q++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[P,f];if(g){for(;b=b[d];)if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;b=b[d];)if(1===b.nodeType||e){if(j=b[N]||(b[N]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===P&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function o(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,c,d){for(var e=0,f=c.length;e<f;e++)b(a,c[e],d);return d}function q(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function r(a,b,c,e,f,g){return e&&!e[N]&&(e=r(e)),f&&!f[N]&&(f=r(f,g)),d(function(d,g,h,i){var j,k,l,m=[],n=[],o=g.length,r=d||p(b||"*",h.nodeType?[h]:h,[]),s=!a||!d&&b?r:q(r,m,a,h,i),t=c?f||(d?a:o||e)?[]:g:s;if(c&&c(s,t,h,i),e)for(j=q(t,n),e(j,[],h,i),k=j.length;k--;)(l=j[k])&&(t[n[k]]=!(s[n[k]]=l));if(d){if(f||a){if(f){for(j=[],k=t.length;k--;)(l=t[k])&&j.push(s[k]=l);f(null,t=[],j,i)}for(k=t.length;k--;)(l=t[k])&&(j=f?aa(d,l):m[k])>-1&&(d[j]=!(g[j]=l))}}else t=q(t===g?t.splice(o,t.length):t),f?f(null,g,t,i):$.apply(g,t)})}function s(a){for(var b,c,d,e=a.length,f=w.relative[a[0].type],g=f||w.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return aa(b,a)>-1},g,!0),k=[function(a,c,d){var e=!f&&(d||c!==C)||((b=c).nodeType?i(a,c,d):j(a,c,d));return b=null,e}];h<e;h++)if(c=w.relative[a[h].type])k=[n(o(k),c)];else{if(c=w.filter[a[h].type].apply(null,a[h].matches),c[N]){for(d=++h;d<e&&!w.relative[a[d].type];d++);return r(h>1&&o(k),h>1&&m(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(ha,"$1"),c,h<d&&s(a.slice(h,d)),d<e&&s(a=a.slice(d)),d<e&&m(a))}k.push(c)}return o(k)}function t(a,c){var e=c.length>0,f=a.length>0,g=function(d,g,h,i,j){var k,l,m,n=0,o="0",p=d&&[],r=[],s=C,t=d||f&&w.find.TAG("*",j),u=P+=null==s?1:Math.random()||.1,v=t.length;for(j&&(C=g===G||g||j);o!==v&&null!=(k=t[o]);o++){if(f&&k){for(l=0,g||k.ownerDocument===G||(F(k),h=!I);m=a[l++];)if(m(k,g||G,h)){i.push(k);break}j&&(P=u)}e&&((k=!m&&k)&&n--,d&&p.push(k))}if(n+=o,e&&o!==n){for(l=0;m=c[l++];)m(p,r,g,h);if(d){if(n>0)for(;o--;)p[o]||r[o]||(r[o]=Y.call(i));r=q(r)}$.apply(i,r),j&&!d&&r.length>0&&n+c.length>1&&b.uniqueSort(i)}return j&&(P=u,C=s),p};return e?d(g):g}var u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+1*new Date,O=a.document,P=0,Q=0,R=c(),S=c(),T=c(),U=function(a,b){return a===b&&(E=!0),0},V=1<<31,W={}.hasOwnProperty,X=[],Y=X.pop,Z=X.push,$=X.push,_=X.slice,aa=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},ba="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ca="[\\x20\\t\\r\\n\\f]",da="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ea="\\["+ca+"*("+da+")(?:"+ca+"*([*^$|!~]?=)"+ca+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+da+"))|)"+ca+"*\\]",fa=":("+da+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ea+")*)|.*)\\)|)",ga=new RegExp(ca+"+","g"),ha=new RegExp("^"+ca+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ca+"+$","g"),ia=new RegExp("^"+ca+"*,"+ca+"*"),ja=new RegExp("^"+ca+"*([>+~]|"+ca+")"+ca+"*"),ka=new RegExp("="+ca+"*([^\\]'\"]*?)"+ca+"*\\]","g"),la=new RegExp(fa),ma=new RegExp("^"+da+"$"),na={ID:new RegExp("^#("+da+")"),CLASS:new RegExp("^\\.("+da+")"),TAG:new RegExp("^("+da+"|[*])"),ATTR:new RegExp("^"+ea),PSEUDO:new RegExp("^"+fa),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ca+"*(even|odd|(([+-]|)(\\d*)n|)"+ca+"*(?:([+-]|)"+ca+"*(\\d+)|))"+ca+"*\\)|)","i"),bool:new RegExp("^(?:"+ba+")$","i"),needsContext:new RegExp("^"+ca+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ca+"*((?:-\\d)?\\d*)"+ca+"*\\)|)(?=[^-]|$)","i")},oa=/^(?:input|select|textarea|button)$/i,pa=/^h\d$/i,qa=/^[^{]+\{\s*\[native \w/,ra=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,sa=/[+~]/,ta=/'|\\/g,ua=new RegExp("\\\\([\\da-f]{1,6}"+ca+"?|("+ca+")|.)","ig"),va=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},wa=function(){F()};try{$.apply(X=_.call(O.childNodes),O.childNodes),X[O.childNodes.length].nodeType}catch(xa){$={apply:X.length?function(a,b){Z.apply(a,_.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}v=b.support={},y=b.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},F=b.setDocument=function(a){var b,c,d=a?a.ownerDocument||a:O;return d!==G&&9===d.nodeType&&d.documentElement?(G=d,H=G.documentElement,I=!y(G),(c=G.defaultView)&&c.top!==c&&(c.addEventListener?c.addEventListener("unload",wa,!1):c.attachEvent&&c.attachEvent("onunload",wa)),v.attributes=e(function(a){return a.className="i",!a.getAttribute("className")}),v.getElementsByTagName=e(function(a){return a.appendChild(G.createComment("")),!a.getElementsByTagName("*").length}),v.getElementsByClassName=qa.test(G.getElementsByClassName),v.getById=e(function(a){return H.appendChild(a).id=N,!G.getElementsByName||!G.getElementsByName(N).length}),v.getById?(w.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&I){var c=b.getElementById(a);return c?[c]:[]}},w.filter.ID=function(a){var b=a.replace(ua,va);return function(a){return a.getAttribute("id")===b}}):(delete w.find.ID,w.filter.ID=function(a){var b=a.replace(ua,va);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),w.find.TAG=v.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):v.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},w.find.CLASS=v.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&I)return b.getElementsByClassName(a)},K=[],J=[],(v.qsa=qa.test(G.querySelectorAll))&&(e(function(a){H.appendChild(a).innerHTML="<a id='"+N+"'></a><select id='"+N+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&J.push("[*^$]="+ca+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||J.push("\\["+ca+"*(?:value|"+ba+")"),a.querySelectorAll("[id~="+N+"-]").length||J.push("~="),a.querySelectorAll(":checked").length||J.push(":checked"),a.querySelectorAll("a#"+N+"+*").length||J.push(".#.+[+~]")}),e(function(a){var b=G.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&J.push("name"+ca+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||J.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),J.push(",.*:")})),(v.matchesSelector=qa.test(L=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&e(function(a){v.disconnectedMatch=L.call(a,"div"),L.call(a,"[s!='']:x"),K.push("!=",fa)}),J=J.length&&new RegExp(J.join("|")),K=K.length&&new RegExp(K.join("|")),b=qa.test(H.compareDocumentPosition),M=b||qa.test(H.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},U=b?function(a,b){if(a===b)return E=!0,0;var c=!a.compareDocumentPosition-!b.compareDocumentPosition;return c?c:(c=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&c||!v.sortDetached&&b.compareDocumentPosition(a)===c?a===G||a.ownerDocument===O&&M(O,a)?-1:b===G||b.ownerDocument===O&&M(O,b)?1:D?aa(D,a)-aa(D,b):0:4&c?-1:1)}:function(a,b){if(a===b)return E=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===G?-1:b===G?1:e?-1:f?1:D?aa(D,a)-aa(D,b):0;if(e===f)return g(a,b);for(c=a;c=c.parentNode;)h.unshift(c);for(c=b;c=c.parentNode;)i.unshift(c);for(;h[d]===i[d];)d++;return d?g(h[d],i[d]):h[d]===O?-1:i[d]===O?1:0},G):G},b.matches=function(a,c){return b(a,null,null,c)},b.matchesSelector=function(a,c){if((a.ownerDocument||a)!==G&&F(a),c=c.replace(ka,"='$1']"),v.matchesSelector&&I&&!T[c+" "]&&(!K||!K.test(c))&&(!J||!J.test(c)))try{var d=L.call(a,c);if(d||v.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return b(c,G,null,[a]).length>0},b.contains=function(a,b){return(a.ownerDocument||a)!==G&&F(a),M(a,b)},b.attr=function(a,b){(a.ownerDocument||a)!==G&&F(a);var c=w.attrHandle[b.toLowerCase()],d=c&&W.call(w.attrHandle,b.toLowerCase())?c(a,b,!I):void 0;return void 0!==d?d:v.attributes||!I?a.getAttribute(b):(d=a.getAttributeNode(b))&&d.specified?d.value:null},b.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},b.uniqueSort=function(a){var b,c=[],d=0,e=0;if(E=!v.detectDuplicates,D=!v.sortStable&&a.slice(0),a.sort(U),E){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return D=null,a},x=b.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=x(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d++];)c+=x(b);return c},w=b.selectors={cacheLength:50,createPseudo:d,match:na,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ua,va),a[3]=(a[3]||a[4]||a[5]||"").replace(ua,va),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||b.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&b.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return na.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&la.test(c)&&(b=z(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ua,va).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=R[a+" "];return b||(b=new RegExp("(^|"+ca+")"+a+"("+ca+"|$)"))&&R(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,c,d){return function(e){var f=b.attr(e,a);return null==f?"!="===c:!c||(f+="","="===c?f===d:"!="===c?f!==d:"^="===c?d&&0===f.indexOf(d):"*="===c?d&&f.indexOf(d)>-1:"$="===c?d&&f.slice(-d.length)===d:"~="===c?(" "+f.replace(ga," ")+" ").indexOf(d)>-1:"|="===c&&(f===d||f.slice(0,d.length+1)===d+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){for(;p;){for(m=b;m=m[p];)if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(m=q,l=m[N]||(m[N]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===P&&j[1],t=n&&j[2],m=n&&q.childNodes[n];m=++n&&m&&m[p]||(t=n=0)||o.pop();)if(1===m.nodeType&&++t&&m===b){k[a]=[P,n,t];break}}else if(s&&(m=b,l=m[N]||(m[N]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===P&&j[1],t=n),t===!1)for(;(m=++n&&m&&m[p]||(t=n=0)||o.pop())&&((h?m.nodeName.toLowerCase()!==r:1!==m.nodeType)||!++t||(s&&(l=m[N]||(m[N]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[P,t]),m!==b)););return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,c){var e,f=w.pseudos[a]||w.setFilters[a.toLowerCase()]||b.error("unsupported pseudo: "+a);return f[N]?f(c):f.length>1?(e=[a,a,"",c],w.setFilters.hasOwnProperty(a.toLowerCase())?d(function(a,b){for(var d,e=f(a,c),g=e.length;g--;)d=aa(a,e[g]),a[d]=!(b[d]=e[g])}):function(a){return f(a,0,e)}):f}},pseudos:{not:d(function(a){var b=[],c=[],e=A(a.replace(ha,"$1"));return e[N]?d(function(a,b,c,d){for(var f,g=e(a,null,d,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,d,f){return b[0]=a,e(b,null,f,c),b[0]=null,!c.pop()}}),has:d(function(a){return function(c){return b(a,c).length>0}}),contains:d(function(a){return a=a.replace(ua,va),function(b){return(b.textContent||b.innerText||x(b)).indexOf(a)>-1}}),lang:d(function(a){return ma.test(a||"")||b.error("unsupported lang: "+a),a=a.replace(ua,va).toLowerCase(),function(b){var c;do if(c=I?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===H},focus:function(a){return a===G.activeElement&&(!G.hasFocus||G.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!w.pseudos.empty(a)},header:function(a){return pa.test(a.nodeName)},input:function(a){return oa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:j(function(){return[0]}),last:j(function(a,b){return[b-1]}),eq:j(function(a,b,c){return[c<0?c+b:c]}),even:j(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:j(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:j(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:j(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},w.pseudos.nth=w.pseudos.eq;for(u in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[u]=h(u);for(u in{submit:!0,reset:!0})w.pseudos[u]=i(u);return l.prototype=w.filters=w.pseudos,w.setFilters=new l,z=b.tokenize=function(a,c){var d,e,f,g,h,i,j,k=S[a+" "];if(k)return c?0:k.slice(0);for(h=a,i=[],j=w.preFilter;h;){d&&!(e=ia.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),d=!1,(e=ja.exec(h))&&(d=e.shift(),f.push({value:d,type:e[0].replace(ha," ")}),h=h.slice(d.length));for(g in w.filter)!(e=na[g].exec(h))||j[g]&&!(e=j[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e}),h=h.slice(d.length));if(!d)break}return c?h.length:h?b.error(a):S(a,i).slice(0)},A=b.compile=function(a,b){var c,d=[],e=[],f=T[a+" "];if(!f){for(b||(b=z(a)),c=b.length;c--;)f=s(b[c]),f[N]?d.push(f):e.push(f);f=T(a,t(e,d)),f.selector=a}return f},B=b.select=function(a,b,c,d){var e,f,g,h,i,j="function"==typeof a&&a,l=!d&&z(a=j.selector||a);if(c=c||[],1===l.length){if(f=l[0]=l[0].slice(0),f.length>2&&"ID"===(g=f[0]).type&&v.getById&&9===b.nodeType&&I&&w.relative[f[1].type]){if(b=(w.find.ID(g.matches[0].replace(ua,va),b)||[])[0],!b)return c;j&&(b=b.parentNode),a=a.slice(f.shift().value.length)}for(e=na.needsContext.test(a)?0:f.length;e--&&(g=f[e],!w.relative[h=g.type]);)if((i=w.find[h])&&(d=i(g.matches[0].replace(ua,va),sa.test(f[0].type)&&k(b.parentNode)||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return $.apply(c,d),c;break}}return(j||A(a,l))(d,b,!I,c,!b||sa.test(a)&&k(b.parentNode)||b),c},v.sortStable=N.split("").sort(U).join("")===N,v.detectDuplicates=!!E,F(),v.sortDetached=e(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),e(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||f("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),v.attributes&&e(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||f("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),e(function(a){return null==a.getAttribute("disabled")})||f(ba,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),b}(a);fa.find=ka,fa.expr=ka.selectors,fa.expr[":"]=fa.expr.pseudos,fa.uniqueSort=fa.unique=ka.uniqueSort,fa.text=ka.getText,fa.isXMLDoc=ka.isXML,fa.contains=ka.contains;var la=function(a,b,c){for(var d=[],e=void 0!==c;(a=a[b])&&9!==a.nodeType;)if(1===a.nodeType){if(e&&fa(a).is(c))break;d.push(a)}return d},ma=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},na=fa.expr.match.needsContext,oa=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,pa=/^.[^:#\[\.,]*$/;fa.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?fa.find.matchesSelector(d,a)?[d]:[]:fa.find.matches(a,fa.grep(b,function(a){return 1===a.nodeType}))},fa.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(fa(a).filter(function(){for(b=0;b<c;b++)if(fa.contains(e[b],this))return!0}));for(b=0;b<c;b++)fa.find(a,e[b],d);return d=this.pushStack(c>1?fa.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(d(this,a||[],!1))},not:function(a){return this.pushStack(d(this,a||[],!0))},is:function(a){return!!d(this,"string"==typeof a&&na.test(a)?fa(a):a||[],!1).length}});var qa,ra=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,sa=fa.fn.init=function(a,b,c){var d,e;if(!a)return this;if(c=c||qa,"string"==typeof a){if(d="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:ra.exec(a),!d||!d[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(d[1]){if(b=b instanceof fa?b[0]:b,fa.merge(this,fa.parseHTML(d[1],b&&b.nodeType?b.ownerDocument||b:X,!0)),oa.test(d[1])&&fa.isPlainObject(b))for(d in b)fa.isFunction(this[d])?this[d](b[d]):this.attr(d,b[d]);return this}return e=X.getElementById(d[2]),e&&e.parentNode&&(this.length=1,this[0]=e),this.context=X,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):fa.isFunction(a)?void 0!==c.ready?c.ready(a):a(fa):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),fa.makeArray(a,this))};sa.prototype=fa.fn,qa=fa(X);var ta=/^(?:parents|prev(?:Until|All))/,ua={children:!0,contents:!0,next:!0,prev:!0};fa.fn.extend({has:function(a){var b=fa(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(fa.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=na.test(a)||"string"!=typeof a?fa(a,b||this.context):0;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&fa.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?fa.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?_.call(fa(a),this[0]):_.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(fa.uniqueSort(fa.merge(this.get(),fa(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),fa.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return la(a,"parentNode")},parentsUntil:function(a,b,c){return la(a,"parentNode",c)},next:function(a){return e(a,"nextSibling")},prev:function(a){return e(a,"previousSibling")},nextAll:function(a){return la(a,"nextSibling")},prevAll:function(a){return la(a,"previousSibling")},nextUntil:function(a,b,c){return la(a,"nextSibling",c)},prevUntil:function(a,b,c){return la(a,"previousSibling",c)},siblings:function(a){return ma((a.parentNode||{}).firstChild,a)},children:function(a){return ma(a.firstChild)},contents:function(a){return a.contentDocument||fa.merge([],a.childNodes)}},function(a,b){fa.fn[a]=function(c,d){var e=fa.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=fa.filter(d,e)),this.length>1&&(ua[a]||fa.uniqueSort(e),ta.test(a)&&e.reverse()),this.pushStack(e)}});var va=/\S+/g;fa.Callbacks=function(a){a="string"==typeof a?f(a):fa.extend({},a);var b,c,d,e,g=[],h=[],i=-1,j=function(){for(e=a.once,d=b=!0;h.length;i=-1)for(c=h.shift();++i<g.length;)g[i].apply(c[0],c[1])===!1&&a.stopOnFalse&&(i=g.length,c=!1);a.memory||(c=!1),b=!1,e&&(g=c?[]:"")},k={add:function(){return g&&(c&&!b&&(i=g.length-1,h.push(c)),function d(b){fa.each(b,function(b,c){fa.isFunction(c)?a.unique&&k.has(c)||g.push(c):c&&c.length&&"string"!==fa.type(c)&&d(c)})}(arguments),c&&!b&&j()),this},remove:function(){return fa.each(arguments,function(a,b){for(var c;(c=fa.inArray(b,g,c))>-1;)g.splice(c,1),c<=i&&i--}),this},has:function(a){return a?fa.inArray(a,g)>-1:g.length>0},empty:function(){return g&&(g=[]),this},disable:function(){return e=h=[],g=c="",this},disabled:function(){return!g},lock:function(){return e=h=[],c||(g=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],h.push(c),b||j()),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},fa.extend({Deferred:function(a){var b=[["resolve","done",fa.Callbacks("once memory"),"resolved"],["reject","fail",fa.Callbacks("once memory"),"rejected"],["notify","progress",fa.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return fa.Deferred(function(c){fa.each(b,function(b,f){var g=fa.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&fa.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?fa.extend(a,d):d}},e={};return d.pipe=d.then,fa.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=Y.call(arguments),g=f.length,h=1!==g||a&&fa.isFunction(a.promise)?g:0,i=1===h?a:fa.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?Y.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e<g;e++)f[e]&&fa.isFunction(f[e].promise)?f[e].promise().progress(j(e,c,b)).done(j(e,d,f)).fail(i.reject):--h;return h||i.resolveWith(d,f),i.promise()}});var wa;fa.fn.ready=function(a){return fa.ready.promise().done(a),this},fa.extend({isReady:!1,readyWait:1,holdReady:function(a){a?fa.readyWait++:fa.ready(!0)},ready:function(a){(a===!0?--fa.readyWait:fa.isReady)||(fa.isReady=!0,a!==!0&&--fa.readyWait>0||(wa.resolveWith(X,[fa]),fa.fn.triggerHandler&&(fa(X).triggerHandler("ready"),fa(X).off("ready"))))}}),fa.ready.promise=function(b){return wa||(wa=fa.Deferred(),"complete"===X.readyState||"loading"!==X.readyState&&!X.documentElement.doScroll?a.setTimeout(fa.ready):(X.addEventListener("DOMContentLoaded",g),a.addEventListener("load",g))),wa.promise(b)},fa.ready.promise();var xa=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===fa.type(c)){e=!0;for(h in c)xa(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,fa.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(fa(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},ya=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};h.uid=1,h.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!ya(a))return{};var b=a[this.expando];return b||(b={},ya(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,fa.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{fa.isArray(b)?d=b.concat(b.map(fa.camelCase)):(e=fa.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(va)||[])),c=d.length;for(;c--;)delete f[d[c]]}(void 0===b||fa.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!fa.isEmptyObject(b)}};var za=new h,Aa=new h,Ba=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ca=/[A-Z]/g;fa.extend({hasData:function(a){return Aa.hasData(a)||za.hasData(a)},data:function(a,b,c){return Aa.access(a,b,c)},removeData:function(a,b){Aa.remove(a,b)},_data:function(a,b,c){return za.access(a,b,c)},_removeData:function(a,b){za.remove(a,b)}}),fa.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=Aa.get(f),1===f.nodeType&&!za.get(f,"hasDataAttrs"))){for(c=g.length;c--;)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=fa.camelCase(d.slice(5)),i(f,d,e[d])));za.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){Aa.set(this,a)}):xa(this,function(b){var c,d;if(f&&void 0===b){if(c=Aa.get(f,a)||Aa.get(f,a.replace(Ca,"-$&").toLowerCase()),void 0!==c)return c;if(d=fa.camelCase(a),c=Aa.get(f,d),void 0!==c)return c;if(c=i(f,d,void 0),void 0!==c)return c}else d=fa.camelCase(a),this.each(function(){var c=Aa.get(this,d);Aa.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&Aa.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){Aa.remove(this,a)})}}),fa.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=za.get(a,b),c&&(!d||fa.isArray(c)?d=za.access(a,b,fa.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=fa.queue(a,b),d=c.length,e=c.shift(),f=fa._queueHooks(a,b),g=function(){fa.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return za.get(a,c)||za.access(a,c,{empty:fa.Callbacks("once memory").add(function(){za.remove(a,[b+"queue",c])})})}}),fa.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?fa.queue(this[0],a):void 0===b?this:this.each(function(){var c=fa.queue(this,a,b);fa._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&fa.dequeue(this,a)})},dequeue:function(a){return this.each(function(){fa.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=fa.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};for("string"!=typeof a&&(b=a,a=void 0),a=a||"fx";g--;)c=za.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Da=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ea=new RegExp("^(?:([+-])=|)("+Da+")([a-z%]*)$","i"),Fa=["Top","Right","Bottom","Left"],Ga=function(a,b){return a=b||a,"none"===fa.css(a,"display")||!fa.contains(a.ownerDocument,a)},Ha=/^(?:checkbox|radio)$/i,Ia=/<([\w:-]+)/,Ja=/^$|\/(?:java|ecma)script/i,Ka={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ka.optgroup=Ka.option,Ka.tbody=Ka.tfoot=Ka.colgroup=Ka.caption=Ka.thead,Ka.th=Ka.td;var La=/<|&#?\w+;/;!function(){var a=X.createDocumentFragment(),b=a.appendChild(X.createElement("div")),c=X.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),da.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",da.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var Ma=/^key/,Na=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Oa=/^([^.]*)(?:\.(.+)|)/;fa.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=za.get(a);if(q)for(c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=fa.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof fa&&fa.event.triggered!==b.type?fa.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(va)||[""],j=b.length;j--;)h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=fa.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=fa.event.special[n]||{},k=fa.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&fa.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),fa.event.global[n]=!0)},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=za.hasData(a)&&za.get(a);if(q&&(i=q.events)){for(b=(b||"").match(va)||[""],j=b.length;j--;)if(h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=fa.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;f--;)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),
|
||
k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||fa.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)fa.event.remove(a,n+b[j],c,d,!0);fa.isEmptyObject(i)&&za.remove(a,"handle events")}},dispatch:function(a){a=fa.event.fix(a);var b,c,d,e,f,g=[],h=Y.call(arguments),i=(za.get(this,"events")||{})[a.type]||[],j=fa.event.special[a.type]||{};if(h[0]=a,a.delegateTarget=this,!j.preDispatch||j.preDispatch.call(this,a)!==!1){for(g=fa.event.handlers.call(this,a,i),b=0;(e=g[b++])&&!a.isPropagationStopped();)for(a.currentTarget=e.elem,c=0;(f=e.handlers[c++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(f.namespace)||(a.handleObj=f,a.data=f.data,d=((fa.event.special[f.origType]||{}).handle||f.handler).apply(e.elem,h),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()));return j.postDispatch&&j.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;c<h;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?fa(e,this).index(i)>-1:fa.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||X,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[fa.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];for(g||(this.fixHooks[e]=g=Na.test(e)?this.mouseHooks:Ma.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new fa.Event(f),b=d.length;b--;)c=d[b],a[c]=f[c];return a.target||(a.target=X),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==p()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===p()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&fa.nodeName(this,"input"))return this.click(),!1},_default:function(a){return fa.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},fa.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},fa.Event=function(a,b){return this instanceof fa.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?n:o):this.type=a,b&&fa.extend(this,b),this.timeStamp=a&&a.timeStamp||fa.now(),void(this[fa.expando]=!0)):new fa.Event(a,b)},fa.Event.prototype={constructor:fa.Event,isDefaultPrevented:o,isPropagationStopped:o,isImmediatePropagationStopped:o,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=n,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=n,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=n,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},fa.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){fa.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||fa.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),fa.fn.extend({on:function(a,b,c,d){return q(this,a,b,c,d)},one:function(a,b,c,d){return q(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,fa(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=o),this.each(function(){fa.event.remove(this,a,c,b)})}});var Pa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Qa=/<script|<style|<link/i,Ra=/checked\s*(?:[^=]|=\s*.checked.)/i,Sa=/^true\/(.*)/,Ta=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;fa.extend({htmlPrefilter:function(a){return a.replace(Pa,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=fa.contains(a.ownerDocument,a);if(!(da.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||fa.isXMLDoc(a)))for(g=k(h),f=k(a),d=0,e=f.length;d<e;d++)v(f[d],g[d]);if(b)if(c)for(f=f||k(a),g=g||k(h),d=0,e=f.length;d<e;d++)u(f[d],g[d]);else u(a,h);return g=k(h,"script"),g.length>0&&l(g,!i&&k(a,"script")),h},cleanData:function(a){for(var b,c,d,e=fa.event.special,f=0;void 0!==(c=a[f]);f++)if(ya(c)){if(b=c[za.expando]){if(b.events)for(d in b.events)e[d]?fa.event.remove(c,d):fa.removeEvent(c,d,b.handle);c[za.expando]=void 0}c[Aa.expando]&&(c[Aa.expando]=void 0)}}}),fa.fn.extend({domManip:w,detach:function(a){return x(this,a,!0)},remove:function(a){return x(this,a)},text:function(a){return xa(this,function(a){return void 0===a?fa.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return w(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=r(this,a);b.appendChild(a)}})},prepend:function(){return w(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=r(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return w(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return w(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(fa.cleanData(k(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return fa.clone(this,a,b)})},html:function(a){return xa(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Qa.test(a)&&!Ka[(Ia.exec(a)||["",""])[1].toLowerCase()]){a=fa.htmlPrefilter(a);try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(fa.cleanData(k(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return w(this,arguments,function(b){var c=this.parentNode;fa.inArray(this,a)<0&&(fa.cleanData(k(this)),c&&c.replaceChild(b,this))},a)}}),fa.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){fa.fn[a]=function(a){for(var c,d=[],e=fa(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),fa(e[g])[b](c),$.apply(d,c.get());return this.pushStack(d)}});var Ua,Va={HTML:"block",BODY:"block"},Wa=/^margin/,Xa=new RegExp("^("+Da+")(?!px)[a-z%]+$","i"),Ya=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Za=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},$a=X.documentElement;!function(){function b(){h.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",h.innerHTML="",$a.appendChild(g);var b=a.getComputedStyle(h);c="1%"!==b.top,f="2px"===b.marginLeft,d="4px"===b.width,h.style.marginRight="50%",e="4px"===b.marginRight,$a.removeChild(g)}var c,d,e,f,g=X.createElement("div"),h=X.createElement("div");h.style&&(h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",da.clearCloneStyle="content-box"===h.style.backgroundClip,g.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",g.appendChild(h),fa.extend(da,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return null==d&&b(),d},pixelMarginRight:function(){return null==d&&b(),e},reliableMarginLeft:function(){return null==d&&b(),f},reliableMarginRight:function(){var b,c=h.appendChild(X.createElement("div"));return c.style.cssText=h.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",h.style.width="1px",$a.appendChild(g),b=!parseFloat(a.getComputedStyle(c).marginRight),$a.removeChild(g),h.removeChild(c),b}}))}();var _a=/^(none|table(?!-c[ea]).+)/,ab={position:"absolute",visibility:"hidden",display:"block"},bb={letterSpacing:"0",fontWeight:"400"},cb=["Webkit","O","Moz","ms"],db=X.createElement("div").style;fa.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=A(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=fa.camelCase(b),i=a.style;return b=fa.cssProps[h]||(fa.cssProps[h]=C(h)||h),g=fa.cssHooks[b]||fa.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Ea.exec(c))&&e[1]&&(c=j(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(fa.cssNumber[h]?"":"px")),da.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=fa.camelCase(b);return b=fa.cssProps[h]||(fa.cssProps[h]=C(h)||h),g=fa.cssHooks[b]||fa.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=A(a,b,d)),"normal"===e&&b in bb&&(e=bb[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),fa.each(["height","width"],function(a,b){fa.cssHooks[b]={get:function(a,c,d){if(c)return _a.test(fa.css(a,"display"))&&0===a.offsetWidth?Za(a,ab,function(){return F(a,b,d)}):F(a,b,d)},set:function(a,c,d){var e,f=d&&Ya(a),g=d&&E(a,b,d,"border-box"===fa.css(a,"boxSizing",!1,f),f);return g&&(e=Ea.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=fa.css(a,b)),D(a,c,g)}}}),fa.cssHooks.marginLeft=B(da.reliableMarginLeft,function(a,b){if(b)return(parseFloat(A(a,"marginLeft"))||a.getBoundingClientRect().left-Za(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),fa.cssHooks.marginRight=B(da.reliableMarginRight,function(a,b){if(b)return Za(a,{display:"inline-block"},A,[a,"marginRight"])}),fa.each({margin:"",padding:"",border:"Width"},function(a,b){fa.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+Fa[d]+b]=f[d]||f[d-2]||f[0];return e}},Wa.test(a)||(fa.cssHooks[a+b].set=D)}),fa.fn.extend({css:function(a,b){return xa(this,function(a,b,c){var d,e,f={},g=0;if(fa.isArray(b)){for(d=Ya(a),e=b.length;g<e;g++)f[b[g]]=fa.css(a,b[g],!1,d);return f}return void 0!==c?fa.style(a,b,c):fa.css(a,b)},a,b,arguments.length>1)},show:function(){return G(this,!0)},hide:function(){return G(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){Ga(this)?fa(this).show():fa(this).hide()})}}),fa.Tween=H,H.prototype={constructor:H,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||fa.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(fa.cssNumber[c]?"":"px")},cur:function(){var a=H.propHooks[this.prop];return a&&a.get?a.get(this):H.propHooks._default.get(this)},run:function(a){var b,c=H.propHooks[this.prop];return this.options.duration?this.pos=b=fa.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):H.propHooks._default.set(this),this}},H.prototype.init.prototype=H.prototype,H.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=fa.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){fa.fx.step[a.prop]?fa.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[fa.cssProps[a.prop]]&&!fa.cssHooks[a.prop]?a.elem[a.prop]=a.now:fa.style(a.elem,a.prop,a.now+a.unit)}}},H.propHooks.scrollTop=H.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},fa.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},fa.fx=H.prototype.init,fa.fx.step={};var eb,fb,gb=/^(?:toggle|show|hide)$/,hb=/queueHooks$/;fa.Animation=fa.extend(N,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return j(c.elem,a,Ea.exec(b),c),c}]},tweener:function(a,b){fa.isFunction(a)?(b=a,a=["*"]):a=a.match(va);for(var c,d=0,e=a.length;d<e;d++)c=a[d],N.tweeners[c]=N.tweeners[c]||[],N.tweeners[c].unshift(b)},prefilters:[L],prefilter:function(a,b){b?N.prefilters.unshift(a):N.prefilters.push(a)}}),fa.speed=function(a,b,c){var d=a&&"object"==typeof a?fa.extend({},a):{complete:c||!c&&b||fa.isFunction(a)&&a,duration:a,easing:c&&b||b&&!fa.isFunction(b)&&b};return d.duration=fa.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in fa.fx.speeds?fa.fx.speeds[d.duration]:fa.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){fa.isFunction(d.old)&&d.old.call(this),d.queue&&fa.dequeue(this,d.queue)},d},fa.fn.extend({fadeTo:function(a,b,c,d){return this.filter(Ga).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=fa.isEmptyObject(a),f=fa.speed(b,c,d),g=function(){var b=N(this,fa.extend({},a),f);(e||za.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=fa.timers,g=za.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&hb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||fa.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=za.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=fa.timers,g=d?d.length:0;for(c.finish=!0,fa.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),fa.each(["toggle","show","hide"],function(a,b){var c=fa.fn[b];fa.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(J(b,!0),a,d,e)}}),fa.each({slideDown:J("show"),slideUp:J("hide"),slideToggle:J("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){fa.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),fa.timers=[],fa.fx.tick=function(){var a,b=0,c=fa.timers;for(eb=fa.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||fa.fx.stop(),eb=void 0},fa.fx.timer=function(a){fa.timers.push(a),a()?fa.fx.start():fa.timers.pop()},fa.fx.interval=13,fa.fx.start=function(){fb||(fb=a.setInterval(fa.fx.tick,fa.fx.interval))},fa.fx.stop=function(){a.clearInterval(fb),fb=null},fa.fx.speeds={slow:600,fast:200,_default:400},fa.fn.delay=function(b,c){return b=fa.fx?fa.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=X.createElement("input"),b=X.createElement("select"),c=b.appendChild(X.createElement("option"));a.type="checkbox",da.checkOn=""!==a.value,da.optSelected=c.selected,b.disabled=!0,da.optDisabled=!c.disabled,a=X.createElement("input"),a.value="t",a.type="radio",da.radioValue="t"===a.value}();var ib,jb=fa.expr.attrHandle;fa.fn.extend({attr:function(a,b){return xa(this,fa.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){fa.removeAttr(this,a)})}}),fa.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?fa.prop(a,b,c):(1===f&&fa.isXMLDoc(a)||(b=b.toLowerCase(),e=fa.attrHooks[b]||(fa.expr.match.bool.test(b)?ib:void 0)),void 0!==c?null===c?void fa.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=fa.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!da.radioValue&&"radio"===b&&fa.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(va);if(f&&1===a.nodeType)for(;c=f[e++];)d=fa.propFix[c]||c,fa.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)}}),ib={set:function(a,b,c){return b===!1?fa.removeAttr(a,c):a.setAttribute(c,c),c}},fa.each(fa.expr.match.bool.source.match(/\w+/g),function(a,b){var c=jb[b]||fa.find.attr;jb[b]=function(a,b,d){var e,f;return d||(f=jb[b],jb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,jb[b]=f),e}});var kb=/^(?:input|select|textarea|button)$/i,lb=/^(?:a|area)$/i;fa.fn.extend({prop:function(a,b){return xa(this,fa.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[fa.propFix[a]||a]})}}),fa.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&fa.isXMLDoc(a)||(b=fa.propFix[b]||b,e=fa.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=fa.find.attr(a,"tabindex");return b?parseInt(b,10):kb.test(a.nodeName)||lb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),da.optSelected||(fa.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),fa.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){fa.propFix[this.toLowerCase()]=this});var mb=/[\t\r\n\f]/g;fa.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(fa.isFunction(a))return this.each(function(b){fa(this).addClass(a.call(this,b,O(this)))});if("string"==typeof a&&a)for(b=a.match(va)||[];c=this[i++];)if(e=O(c),d=1===c.nodeType&&(" "+e+" ").replace(mb," ")){for(g=0;f=b[g++];)d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=fa.trim(d),e!==h&&c.setAttribute("class",h)}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(fa.isFunction(a))return this.each(function(b){fa(this).removeClass(a.call(this,b,O(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a)for(b=a.match(va)||[];c=this[i++];)if(e=O(c),d=1===c.nodeType&&(" "+e+" ").replace(mb," ")){for(g=0;f=b[g++];)for(;d.indexOf(" "+f+" ")>-1;)d=d.replace(" "+f+" "," ");h=fa.trim(d),e!==h&&c.setAttribute("class",h)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):fa.isFunction(a)?this.each(function(c){fa(this).toggleClass(a.call(this,c,O(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c)for(d=0,e=fa(this),f=a.match(va)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else void 0!==a&&"boolean"!==c||(b=O(this),b&&za.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":za.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;for(b=" "+a+" ";c=this[d++];)if(1===c.nodeType&&(" "+O(c)+" ").replace(mb," ").indexOf(b)>-1)return!0;return!1}});var nb=/\r/g,ob=/[\x20\t\r\n\f]+/g;fa.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=fa.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,fa(this).val()):a,null==e?e="":"number"==typeof e?e+="":fa.isArray(e)&&(e=fa.map(e,function(a){return null==a?"":a+""})),b=fa.valHooks[this.type]||fa.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=fa.valHooks[e.type]||fa.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(nb,""):null==c?"":c)}}}),fa.extend({valHooks:{option:{get:function(a){var b=fa.find.attr(a,"value");return null!=b?b:fa.trim(fa.text(a)).replace(ob," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i<h;i++)if(c=d[i],(c.selected||i===e)&&(da.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!fa.nodeName(c.parentNode,"optgroup"))){if(b=fa(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=fa.makeArray(b),g=e.length;g--;)d=e[g],(d.selected=fa.inArray(fa.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),fa.each(["radio","checkbox"],function(){fa.valHooks[this]={set:function(a,b){if(fa.isArray(b))return a.checked=fa.inArray(fa(a).val(),b)>-1}},da.checkOn||(fa.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;fa.extend(fa.event,{trigger:function(b,c,d,e){var f,g,h,i,j,k,l,m=[d||X],n=ca.call(b,"type")?b.type:b,o=ca.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||X,3!==d.nodeType&&8!==d.nodeType&&!pb.test(n+fa.event.triggered)&&(n.indexOf(".")>-1&&(o=n.split("."),n=o.shift(),o.sort()),j=n.indexOf(":")<0&&"on"+n,b=b[fa.expando]?b:new fa.Event(n,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=o.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:fa.makeArray(c,[b]),l=fa.event.special[n]||{},e||!l.trigger||l.trigger.apply(d,c)!==!1)){if(!e&&!l.noBubble&&!fa.isWindow(d)){for(i=l.delegateType||n,pb.test(i+n)||(g=g.parentNode);g;g=g.parentNode)m.push(g),h=g;h===(d.ownerDocument||X)&&m.push(h.defaultView||h.parentWindow||a)}for(f=0;(g=m[f++])&&!b.isPropagationStopped();)b.type=f>1?i:l.bindType||n,k=(za.get(g,"events")||{})[b.type]&&za.get(g,"handle"),k&&k.apply(g,c),k=j&&g[j],k&&k.apply&&ya(g)&&(b.result=k.apply(g,c),b.result===!1&&b.preventDefault());return b.type=n,e||b.isDefaultPrevented()||l._default&&l._default.apply(m.pop(),c)!==!1||!ya(d)||j&&fa.isFunction(d[n])&&!fa.isWindow(d)&&(h=d[j],h&&(d[j]=null),fa.event.triggered=n,d[n](),fa.event.triggered=void 0,h&&(d[j]=h)),b.result}},simulate:function(a,b,c){var d=fa.extend(new fa.Event,c,{type:a,isSimulated:!0});fa.event.trigger(d,null,b)}}),fa.fn.extend({trigger:function(a,b){return this.each(function(){fa.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return fa.event.trigger(a,b,c,!0)}}),fa.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){fa.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),fa.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),da.focusin="onfocusin"in a,da.focusin||fa.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){fa.event.simulate(b,a.target,fa.event.fix(a))};fa.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=za.access(d,b);e||d.addEventListener(a,c,!0),za.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=za.access(d,b)-1;e?za.access(d,b,e):(d.removeEventListener(a,c,!0),za.remove(d,b))}}});var qb=a.location,rb=fa.now(),sb=/\?/;fa.parseJSON=function(a){return JSON.parse(a+"")},fa.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||fa.error("Invalid XML: "+b),c};var tb=/#.*$/,ub=/([?&])_=[^&]*/,vb=/^(.*?):[ \t]*([^\r\n]*)$/gm,wb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,xb=/^(?:GET|HEAD)$/,yb=/^\/\//,zb={},Ab={},Bb="*/".concat("*"),Cb=X.createElement("a");Cb.href=qb.href,fa.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:wb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":fa.parseJSON,"text xml":fa.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?R(R(a,fa.ajaxSettings),b):R(fa.ajaxSettings,a)},ajaxPrefilter:P(zb),ajaxTransport:P(Ab),ajax:function(b,c){function d(b,c,d,h){var j,l,s,t,v,x=c;2!==u&&(u=2,i&&a.clearTimeout(i),e=void 0,g=h||"",w.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(t=S(m,w,d)),t=T(m,t,w,j),j?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(fa.lastModified[f]=v),v=w.getResponseHeader("etag"),v&&(fa.etag[f]=v)),204===b||"HEAD"===m.type?x="nocontent":304===b?x="notmodified":(x=t.state,l=t.data,s=t.error,j=!s)):(s=x,!b&&x||(x="error",b<0&&(b=0))),w.status=b,w.statusText=(c||x)+"",j?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=void 0,k&&o.trigger(j?"ajaxSuccess":"ajaxError",[w,m,j?l:s]),q.fireWith(n,[w,x]),k&&(o.trigger("ajaxComplete",[w,m]),--fa.active||fa.event.trigger("ajaxStop")))}"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m=fa.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?fa(n):fa.event,p=fa.Deferred(),q=fa.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!h)for(h={};b=vb.exec(g);)h[b[1].toLowerCase()]=b[2];b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(u<2)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return e&&e.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((b||m.url||qb.href)+"").replace(tb,"").replace(yb,qb.protocol+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=fa.trim(m.dataType||"*").toLowerCase().match(va)||[""],null==m.crossDomain){j=X.createElement("a");try{j.href=m.url,j.href=j.href,m.crossDomain=Cb.protocol+"//"+Cb.host!=j.protocol+"//"+j.host}catch(x){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=fa.param(m.data,m.traditional)),Q(zb,m,c,w),2===u)return w;k=fa.event&&m.global,k&&0===fa.active++&&fa.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!xb.test(m.type),f=m.url,m.hasContent||(m.data&&(f=m.url+=(sb.test(f)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=ub.test(f)?f.replace(ub,"$1_="+rb++):f+(sb.test(f)?"&":"?")+"_="+rb++)),m.ifModified&&(fa.lastModified[f]&&w.setRequestHeader("If-Modified-Since",fa.lastModified[f]),fa.etag[f]&&w.setRequestHeader("If-None-Match",fa.etag[f])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Bb+"; q=0.01":""):m.accepts["*"]);for(l in m.headers)w.setRequestHeader(l,m.headers[l]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(l in{success:1,error:1,complete:1})w[l](m[l]);if(e=Q(Ab,m,c,w)){if(w.readyState=1,k&&o.trigger("ajaxSend",[w,m]),2===u)return w;m.async&&m.timeout>0&&(i=a.setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,e.send(s,d)}catch(x){if(!(u<2))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getJSON:function(a,b,c){return fa.get(a,b,c,"json")},getScript:function(a,b){return fa.get(a,void 0,b,"script")}}),fa.each(["get","post"],function(a,b){fa[b]=function(a,c,d,e){return fa.isFunction(c)&&(e=e||d,d=c,c=void 0),fa.ajax(fa.extend({url:a,type:b,dataType:e,data:c,success:d},fa.isPlainObject(a)&&a))}}),fa._evalUrl=function(a){return fa.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},fa.fn.extend({wrapAll:function(a){var b;return fa.isFunction(a)?this.each(function(b){fa(this).wrapAll(a.call(this,b))}):(this[0]&&(b=fa(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstElementChild;)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return fa.isFunction(a)?this.each(function(b){fa(this).wrapInner(a.call(this,b))}):this.each(function(){var b=fa(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=fa.isFunction(a);return this.each(function(c){fa(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){fa.nodeName(this,"body")||fa(this).replaceWith(this.childNodes)}).end()}}),fa.expr.filters.hidden=function(a){return!fa.expr.filters.visible(a)},fa.expr.filters.visible=function(a){return a.offsetWidth>0||a.offsetHeight>0||a.getClientRects().length>0};var Db=/%20/g,Eb=/\[\]$/,Fb=/\r?\n/g,Gb=/^(?:submit|button|image|reset|file)$/i,Hb=/^(?:input|select|textarea|keygen)/i;fa.param=function(a,b){var c,d=[],e=function(a,b){b=fa.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=fa.ajaxSettings&&fa.ajaxSettings.traditional),fa.isArray(a)||a.jquery&&!fa.isPlainObject(a))fa.each(a,function(){e(this.name,this.value)});else for(c in a)U(c,a[c],b,e);return d.join("&").replace(Db,"+")},fa.fn.extend({serialize:function(){return fa.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=fa.prop(this,"elements");return a?fa.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!fa(this).is(":disabled")&&Hb.test(this.nodeName)&&!Gb.test(a)&&(this.checked||!Ha.test(a))}).map(function(a,b){var c=fa(this).val();return null==c?null:fa.isArray(c)?fa.map(c,function(a){return{name:b.name,value:a.replace(Fb,"\r\n")}}):{name:b.name,value:c.replace(Fb,"\r\n")}}).get()}}),fa.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ib={0:200,1223:204},Jb=fa.ajaxSettings.xhr();da.cors=!!Jb&&"withCredentials"in Jb,da.ajax=Jb=!!Jb,fa.ajaxTransport(function(b){var c,d;if(da.cors||Jb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");
|
||
for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ib[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),fa.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return fa.globalEval(a),a}}}),fa.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),fa.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=fa("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),X.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Kb=[],Lb=/(=)\?(?=&|$)|\?\?/;fa.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Kb.pop()||fa.expando+"_"+rb++;return this[a]=!0,a}}),fa.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Lb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Lb.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=fa.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Lb,"$1"+e):b.jsonp!==!1&&(b.url+=(sb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||fa.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?fa(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Kb.push(e)),g&&fa.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),fa.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||X;var d=oa.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m([a],b,e),e&&e.length&&fa(e).remove(),fa.merge([],d.childNodes))};var Mb=fa.fn.load;fa.fn.load=function(a,b,c){if("string"!=typeof a&&Mb)return Mb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=fa.trim(a.slice(h)),a=a.slice(0,h)),fa.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&fa.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?fa("<div>").append(fa.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},fa.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){fa.fn[b]=function(a){return this.on(b,a)}}),fa.expr.filters.animated=function(a){return fa.grep(fa.timers,function(b){return a===b.elem}).length},fa.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=fa.css(a,"position"),l=fa(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=fa.css(a,"top"),i=fa.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),fa.isFunction(b)&&(b=b.call(a,c,fa.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},fa.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){fa.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,fa.contains(b,d)?(e=d.getBoundingClientRect(),c=V(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===fa.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),fa.nodeName(a[0],"html")||(d=a.offset()),d.top+=fa.css(a[0],"borderTopWidth",!0),d.left+=fa.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-fa.css(c,"marginTop",!0),left:b.left-d.left-fa.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent;a&&"static"===fa.css(a,"position");)a=a.offsetParent;return a||$a})}}),fa.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;fa.fn[a]=function(d){return xa(this,function(a,d,e){var f=V(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),fa.each(["top","left"],function(a,b){fa.cssHooks[b]=B(da.pixelPosition,function(a,c){if(c)return c=A(a,b),Xa.test(c)?fa(a).position()[b]+"px":c})}),fa.each({Height:"height",Width:"width"},function(a,b){fa.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){fa.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return xa(this,function(b,c,d){var e;return fa.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?fa.css(b,c,g):fa.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),fa.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)},size:function(){return this.length}}),fa.fn.andSelf=fa.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return fa});var Nb=a.jQuery,Ob=a.$;return fa.noConflict=function(b){return a.$===fa&&(a.$=Ob),b&&a.jQuery===fa&&(a.jQuery=Nb),fa},b||(a.jQuery=a.$=fa),fa}),/**
|
||
* Yii JavaScript module.
|
||
*
|
||
* @link http://www.yiiframework.com/
|
||
* @copyright Copyright (c) 2008 Yii Software LLC
|
||
* @license http://www.yiiframework.com/license/
|
||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||
* @since 2.0
|
||
*/
|
||
yii=function(a){function b(){a(document).ajaxComplete(function(a,b,c){var d=b&&b.getResponseHeader("X-Redirect");d&&(window.location=d)})}function c(){a.ajaxPrefilter(function(a,b,c){!a.crossDomain&&f.getCsrfParam()&&c.setRequestHeader("X-CSRF-Token",f.getCsrfToken())}),f.refreshCsrfToken()}function d(){var b=function(b){var c=a(this),d=c.data("method"),e=c.data("confirm"),g=c.data("form");return void 0===d&&void 0===e&&void 0===g||(void 0!==e?a.proxy(f.confirm,this)(e,function(){f.handleAction(c,b)}):f.handleAction(c,b),b.stopImmediatePropagation(),!1)};a(document).on("click.yii",f.clickableSelector,b).on("change.yii",f.changeableSelector,b)}function e(){var b=location.protocol+"//"+location.host,c=a("script[src]").map(function(){return"/"===this.src.charAt(0)?b+this.src:this.src}).toArray();a.ajaxPrefilter("script",function(d,e,g){if("jsonp"!=d.dataType){var h="/"===d.url.charAt(0)?b+d.url:d.url;if(a.inArray(h,c)===-1)c.push(h);else{var i=a.inArray(h,a.map(f.reloadableScripts,function(a){return"/"===a.charAt(0)?b+a:a}))!==-1;i||g.abort()}}}),a(document).ajaxComplete(function(b,c,d){var e=[];a("link[rel=stylesheet]").each(function(){a.inArray(this.href,f.reloadableScripts)===-1&&(a.inArray(this.href,e)==-1?e.push(this.href):a(this).remove())})})}var f={reloadableScripts:[],clickableSelector:'a, button, input[type="submit"], input[type="button"], input[type="reset"], input[type="image"]',changeableSelector:"select, input, textarea",getCsrfParam:function(){return a("meta[name=csrf-param]").attr("content")},getCsrfToken:function(){return a("meta[name=csrf-token]").attr("content")},setCsrfToken:function(b,c){a("meta[name=csrf-param]").attr("content",b),a("meta[name=csrf-token]").attr("content",c)},refreshCsrfToken:function(){var b=f.getCsrfToken();b&&a('form input[name="'+f.getCsrfParam()+'"]').val(b)},confirm:function(a,b,c){confirm(a)?!b||b():!c||c()},handleAction:function(b,c){var d,e=b.attr("data-form")?a("#"+b.attr("data-form")):b.closest("form"),g=!b.data("method")&&e?e.attr("method"):b.data("method"),h=b.attr("href"),i=b.data("params"),j=b.data("pjax"),k=!!b.data("pjax-push-state"),l=!!b.data("pjax-replace-state"),m=b.data("pjax-timeout"),n=b.data("pjax-scrollto"),o=b.data("pjax-push-redirect"),p=b.data("pjax-replace-redirect"),q=b.data("pjax-skip-outer-containers"),r={};if(void 0!==j&&a.support.pjax&&(d=b.data("pjax-container")?b.data("pjax-container"):b.closest('[data-pjax-container=""]'),d.length||(d=a("body")),r={container:d,push:k,replace:l,scrollTo:n,pushRedirect:o,replaceRedirect:p,pjaxSkipOuterContainers:q,timeout:m,originalEvent:c,originalTarget:b}),void 0===g)return void(h&&"#"!=h?void 0!==j&&a.support.pjax?a.pjax.click(c,r):window.location=h:b.is(":submit")&&e.length&&(void 0!==j&&a.support.pjax&&e.on("submit",function(b){a.pjax.submit(b,r)}),e.trigger("submit")));var s=!e.length;if(s){h&&h.match(/(^\/|:\/\/)/)||(h=window.location.href),e=a("<form/>",{method:g,action:h});var t=b.attr("target");if(t&&e.attr("target",t),g.match(/(get|post)/i)||(e.append(a("<input/>",{name:"_method",value:g,type:"hidden"})),g="POST"),!g.match(/(get|head|options)/i)){var u=f.getCsrfParam();u&&e.append(a("<input/>",{name:u,value:f.getCsrfToken(),type:"hidden"}))}e.hide().appendTo("body")}var v=e.data("yiiActiveForm");v&&(v.submitObject=b),i&&a.isPlainObject(i)&&a.each(i,function(b,c){e.append(a("<input/>").attr({name:b,value:c,type:"hidden"}))});var w=e.attr("method");e.attr("method",g);var x=null;h&&"#"!=h&&(x=e.attr("action"),e.attr("action",h)),void 0!==j&&a.support.pjax&&e.on("submit",function(b){a.pjax.submit(b,r)}),e.trigger("submit"),a.when(e.data("yiiSubmitFinalizePromise")).then(function(){null!=x&&e.attr("action",x),e.attr("method",w),i&&a.isPlainObject(i)&&a.each(i,function(b,c){a('input[name="'+b+'"]',e).remove()}),s&&e.remove()})},getQueryParams:function(b){var c=b.indexOf("?");if(c<0)return{};var d,e,f=b.substring(c+1).split("#")[0].split("&"),g={};for(e=0;e<f.length;e++){d=f[e].split("=");var h=decodeURIComponent(d[0]),i=decodeURIComponent(d[1]);h.length&&(void 0!==g[h]?(a.isArray(g[h])||(g[h]=[g[h]]),g[h].push(i||"")):g[h]=i||"")}return g},initModule:function(b){(void 0===b.isActive||b.isActive)&&(a.isFunction(b.init)&&b.init(),a.each(b,function(){a.isPlainObject(this)&&f.initModule(this)}))},init:function(){c(),b(),e(),d()}};return f}(jQuery),jQuery(function(){yii.initModule(yii)}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){document===a.target||this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented())return f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=window.SVGElement&&c instanceof window.SVGElement,g=d?{top:0,left:0}:f?null:b.offset(),h={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},i=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,h,i,g)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");
|
||
return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery),/* @preserve
|
||
* The MIT License (MIT)
|
||
*
|
||
* Copyright (c) 2013-2015 Petka Antonov
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in
|
||
* all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||
* THE SOFTWARE.
|
||
*
|
||
*/
|
||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.Promise=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof _dereq_&&_dereq_;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof _dereq_&&_dereq_,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";b.exports=function(a){function b(a){var b=new c(a),d=b.promise();return b.setHowMany(1),b.setUnwrap(),b.init(),d}var c=a._SomePromiseArray;a.any=function(a){return b(a)},a.prototype.any=function(){return b(this)}}},{}],2:[function(a,b,c){"use strict";function d(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new k(16),this._normalQueue=new k(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var a=this;this.drainQueues=function(){a._drainQueues()},this._schedule=j}function e(a,b,c){this._lateQueue.push(a,b,c),this._queueTick()}function f(a,b,c){this._normalQueue.push(a,b,c),this._queueTick()}function g(a){this._normalQueue._pushOne(a),this._queueTick()}var h;try{throw new Error}catch(i){h=i}var j=a("./schedule"),k=a("./queue"),l=a("./util");d.prototype.setScheduler=function(a){var b=this._schedule;return this._schedule=a,this._customScheduler=!0,b},d.prototype.hasCustomScheduler=function(){return this._customScheduler},d.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},d.prototype.disableTrampolineIfNecessary=function(){l.hasDevTools&&(this._trampolineEnabled=!1)},d.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},d.prototype.fatalError=function(a,b){b?(process.stderr.write("Fatal "+(a instanceof Error?a.stack:a)+"\n"),process.exit(2)):this.throwLater(a)},d.prototype.throwLater=function(a,b){if(1===arguments.length&&(b=a,a=function(){throw b}),"undefined"!=typeof setTimeout)setTimeout(function(){a(b)},0);else try{this._schedule(function(){a(b)})}catch(c){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},l.hasDevTools?(d.prototype.invokeLater=function(a,b,c){this._trampolineEnabled?e.call(this,a,b,c):this._schedule(function(){setTimeout(function(){a.call(b,c)},100)})},d.prototype.invoke=function(a,b,c){this._trampolineEnabled?f.call(this,a,b,c):this._schedule(function(){a.call(b,c)})},d.prototype.settlePromises=function(a){this._trampolineEnabled?g.call(this,a):this._schedule(function(){a._settlePromises()})}):(d.prototype.invokeLater=e,d.prototype.invoke=f,d.prototype.settlePromises=g),d.prototype.invokeFirst=function(a,b,c){this._normalQueue.unshift(a,b,c),this._queueTick()},d.prototype._drainQueue=function(a){for(;a.length()>0;){var b=a.shift();if("function"==typeof b){var c=a.shift(),d=a.shift();b.call(c,d)}else b._settlePromises()}},d.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},d.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},d.prototype._reset=function(){this._isTickUsed=!1},b.exports=d,b.exports.firstLineError=h},{"./queue":26,"./schedule":29,"./util":36}],3:[function(a,b,c){"use strict";b.exports=function(a,b,c,d){var e=!1,f=function(a,b){this._reject(b)},g=function(a,b){b.promiseRejectionQueued=!0,b.bindingPromise._then(f,f,null,this,a)},h=function(a,b){0===(50397184&this._bitField)&&this._resolveCallback(b.target)},i=function(a,b){b.promiseRejectionQueued||this._reject(a)};a.prototype.bind=function(f){e||(e=!0,a.prototype._propagateFrom=d.propagateFromFunction(),a.prototype._boundValue=d.boundValueFunction());var j=c(f),k=new a(b);k._propagateFrom(this,1);var l=this._target();if(k._setBoundTo(j),j instanceof a){var m={promiseRejectionQueued:!1,promise:k,target:l,bindingPromise:j};l._then(b,g,void 0,k,m),j._then(h,i,void 0,k,m),k._setOnCancel(j)}else k._resolveCallback(l);return k},a.prototype._setBoundTo=function(a){void 0!==a?(this._bitField=2097152|this._bitField,this._boundTo=a):this._bitField=-2097153&this._bitField},a.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},a.bind=function(b,c){return a.resolve(c).bind(b)}}},{}],4:[function(a,b,c){"use strict";function d(){try{Promise===f&&(Promise=e)}catch(a){}return f}var e;"undefined"!=typeof Promise&&(e=Promise);var f=a("./promise")();f.noConflict=d,b.exports=f},{"./promise":22}],5:[function(a,b,c){"use strict";var d=Object.create;if(d){var e=d(null),f=d(null);e[" size"]=f[" size"]=0}b.exports=function(b){function c(a,c){var d;if(null!=a&&(d=a[c]),"function"!=typeof d){var e="Object "+h.classString(a)+" has no method '"+h.toString(c)+"'";throw new b.TypeError(e)}return d}function d(a){var b=this.pop(),d=c(a,b);return d.apply(a,this)}function e(a){return a[this]}function f(a){var b=+this;return 0>b&&(b=Math.max(0,b+a.length)),a[b]}var g,h=a("./util"),i=h.canEvaluate;h.isIdentifier,b.prototype.call=function(a){var b=[].slice.call(arguments,1);return b.push(a),this._then(d,void 0,void 0,b,void 0)},b.prototype.get=function(a){var b,c="number"==typeof a;if(c)b=f;else if(i){var d=g(a);b=null!==d?d:e}else b=e;return this._then(b,void 0,void 0,a,void 0)}}},{"./util":36}],6:[function(a,b,c){"use strict";b.exports=function(b,c,d,e){var f=a("./util"),g=f.tryCatch,h=f.errorObj,i=b._async;b.prototype["break"]=b.prototype.cancel=function(){if(!e.cancellation())return this._warn("cancellation is disabled");for(var a=this,b=a;a._isCancellable();){if(!a._cancelBy(b)){b._isFollowing()?b._followee().cancel():b._cancelBranched();break}var c=a._cancellationParent;if(null==c||!c._isCancellable()){a._isFollowing()?a._followee().cancel():a._cancelBranched();break}a._isFollowing()&&a._followee().cancel(),a._setWillBeCancelled(),b=a,a=c}},b.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},b.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},b.prototype._cancelBy=function(a){return a===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},b.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},b.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),i.invoke(this._cancelPromises,this,void 0))},b.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},b.prototype._unsetOnCancel=function(){this._onCancelField=void 0},b.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},b.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},b.prototype._doInvokeOnCancel=function(a,b){if(f.isArray(a))for(var c=0;c<a.length;++c)this._doInvokeOnCancel(a[c],b);else if(void 0!==a)if("function"==typeof a){if(!b){var d=g(a).call(this._boundValue());d===h&&(this._attachExtraTrace(d.e),i.throwLater(d.e))}}else a._resultCancelled(this)},b.prototype._invokeOnCancel=function(){var a=this._onCancel();this._unsetOnCancel(),i.invoke(this._doInvokeOnCancel,this,a)},b.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},b.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(a,b,c){"use strict";b.exports=function(b){function c(a,c,h){return function(i){var j=h._boundValue();a:for(var k=0;k<a.length;++k){var l=a[k];if(l===Error||null!=l&&l.prototype instanceof Error){if(i instanceof l)return f(c).call(j,i)}else if("function"==typeof l){var m=f(l).call(j,i);if(m===g)return m;if(m)return f(c).call(j,i)}else if(d.isObject(i)){for(var n=e(l),o=0;o<n.length;++o){var p=n[o];if(l[p]!=i[p])continue a}return f(c).call(j,i)}}return b}}var d=a("./util"),e=a("./es5").keys,f=d.tryCatch,g=d.errorObj;return c}},{"./es5":13,"./util":36}],8:[function(a,b,c){"use strict";b.exports=function(a){function b(){this._trace=new b.CapturedTrace(d())}function c(){return e?new b:void 0}function d(){var a=f.length-1;return a>=0?f[a]:void 0}var e=!1,f=[];return a.prototype._promiseCreated=function(){},a.prototype._pushContext=function(){},a.prototype._popContext=function(){return null},a._peekContext=a.prototype._peekContext=function(){},b.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,f.push(this._trace))},b.prototype._popContext=function(){if(void 0!==this._trace){var a=f.pop(),b=a._promiseCreated;return a._promiseCreated=null,b}return null},b.CapturedTrace=null,b.create=c,b.deactivateLongStackTraces=function(){},b.activateLongStackTraces=function(){var c=a.prototype._pushContext,f=a.prototype._popContext,g=a._peekContext,h=a.prototype._peekContext,i=a.prototype._promiseCreated;b.deactivateLongStackTraces=function(){a.prototype._pushContext=c,a.prototype._popContext=f,a._peekContext=g,a.prototype._peekContext=h,a.prototype._promiseCreated=i,e=!1},e=!0,a.prototype._pushContext=b.prototype._pushContext,a.prototype._popContext=b.prototype._popContext,a._peekContext=a.prototype._peekContext=d,a.prototype._promiseCreated=function(){var a=this._peekContext();a&&null==a._promiseCreated&&(a._promiseCreated=this)}},b}},{}],9:[function(a,b,c){"use strict";b.exports=function(b,c){function d(a,b){return{promise:b}}function e(){return!1}function f(a,b,c){var d=this;try{a(b,c,function(a){if("function"!=typeof a)throw new TypeError("onCancel must be a function, got: "+M.toString(a));d._attachCancellationCallback(a)})}catch(e){return e}}function g(a){if(!this._isCancellable())return this;var b=this._onCancel();void 0!==b?M.isArray(b)?b.push(a):this._setOnCancel([b,a]):this._setOnCancel(a)}function h(){return this._onCancelField}function i(a){this._onCancelField=a}function j(){this._cancellationParent=void 0,this._onCancelField=void 0}function k(a,b){if(0!==(1&b)){this._cancellationParent=a;var c=a._branchesRemainingToCancel;void 0===c&&(c=0),a._branchesRemainingToCancel=c+1}0!==(2&b)&&a._isBound()&&this._setBoundTo(a._boundTo)}function l(a,b){0!==(2&b)&&a._isBound()&&this._setBoundTo(a._boundTo)}function m(){var a=this._boundTo;return void 0!==a&&a instanceof b?a.isFulfilled()?a.value():void 0:a}function n(){this._trace=new F(this._peekContext())}function o(a,b){if(N(a)){var c=this._trace;if(void 0!==c&&b&&(c=c._parent),void 0!==c)c.attachExtraTrace(a);else if(!a.__stackCleaned__){var d=x(a);M.notEnumerableProp(a,"stack",d.message+"\n"+d.stack.join("\n")),M.notEnumerableProp(a,"__stackCleaned__",!0)}}}function p(a,b,c,d,e){if(void 0===a&&null!==b&&X){if(void 0!==e&&e._returnedNonUndefined())return;if(0===(65535&d._bitField))return;c&&(c+=" ");var f="",g="";if(b._trace){for(var h=b._trace.stack.split("\n"),i=v(h),j=i.length-1;j>=0;--j){var k=i[j];if(!P.test(k)){var l=k.match(Q);l&&(f="at "+l[1]+":"+l[2]+":"+l[3]+" ");break}}if(i.length>0)for(var m=i[0],j=0;j<h.length;++j)if(h[j]===m){j>0&&(g="\n"+h[j-1]);break}}var n="a promise was created in a "+c+"handler "+f+"but was not returned from it, see http://goo.gl/rRqMUw"+g;d._warn(n,!0,b)}}function q(a,b){var c=a+" is deprecated and will be removed in a future version.";return b&&(c+=" Use "+b+" instead."),r(c)}function r(a,c,d){if(fa.warnings){var e,f=new L(a);if(c)d._attachExtraTrace(f);else if(fa.longStackTraces&&(e=b._peekContext()))e.attachExtraTrace(f);else{var g=x(f);f.stack=g.message+"\n"+g.stack.join("\n")}aa("warning",f)||y(f,"",!0)}}function s(a,b){for(var c=0;c<b.length-1;++c)b[c].push("From previous event:"),b[c]=b[c].join("\n");return c<b.length&&(b[c]=b[c].join("\n")),a+"\n"+b.join("\n")}function t(a){for(var b=0;b<a.length;++b)(0===a[b].length||b+1<a.length&&a[b][0]===a[b+1][0])&&(a.splice(b,1),b--)}function u(a){for(var b=a[0],c=1;c<a.length;++c){for(var d=a[c],e=b.length-1,f=b[e],g=-1,h=d.length-1;h>=0;--h)if(d[h]===f){g=h;break}for(var h=g;h>=0;--h){var i=d[h];if(b[e]!==i)break;b.pop(),e--}b=d}}function v(a){for(var b=[],c=0;c<a.length;++c){var d=a[c],e=" (No stack trace)"===d||R.test(d),f=e&&ca(d);e&&!f&&(T&&" "!==d.charAt(0)&&(d=" "+d),b.push(d))}return b}function w(a){for(var b=a.stack.replace(/\s+$/g,"").split("\n"),c=0;c<b.length;++c){var d=b[c];if(" (No stack trace)"===d||R.test(d))break}return c>0&&(b=b.slice(c)),b}function x(a){var b=a.stack,c=a.toString();return b="string"==typeof b&&b.length>0?w(a):[" (No stack trace)"],{message:c,stack:v(b)}}function y(a,b,c){if("undefined"!=typeof console){var d;if(M.isObject(a)){var e=a.stack;d=b+S(e,a)}else d=b+String(a);"function"==typeof I?I(d,c):("function"==typeof console.log||"object"==typeof console.log)&&console.log(d)}}function z(a,b,c,d){var e=!1;try{"function"==typeof b&&(e=!0,"rejectionHandled"===a?b(d):b(c,d))}catch(f){K.throwLater(f)}"unhandledRejection"===a?aa(a,c,d)||e||y(c,"Unhandled rejection "):aa(a,d)}function A(a){var b;if("function"==typeof a)b="[function "+(a.name||"anonymous")+"]";else{b=a&&"function"==typeof a.toString?a.toString():M.toString(a);var c=/\[object [a-zA-Z0-9$_]+\]/;if(c.test(b))try{var d=JSON.stringify(a);b=d}catch(e){}0===b.length&&(b="(empty array)")}return"(<"+B(b)+">, no stack trace)"}function B(a){var b=41;return a.length<b?a:a.substr(0,b-3)+"..."}function C(){return"function"==typeof ea}function D(a){var b=a.match(da);return b?{fileName:b[1],line:parseInt(b[2],10)}:void 0}function E(a,b){if(C()){for(var c,d,e=a.stack.split("\n"),f=b.stack.split("\n"),g=-1,h=-1,i=0;i<e.length;++i){var j=D(e[i]);if(j){c=j.fileName,g=j.line;break}}for(var i=0;i<f.length;++i){var j=D(f[i]);if(j){d=j.fileName,h=j.line;break}}0>g||0>h||!c||!d||c!==d||g>=h||(ca=function(a){if(O.test(a))return!0;var b=D(a);return!!(b&&b.fileName===c&&g<=b.line&&b.line<=h)})}}function F(a){this._parent=a,this._promisesCreated=0;var b=this._length=1+(void 0===a?0:a._length);ea(this,F),b>32&&this.uncycle()}var G,H,I,J=b._getDomain,K=b._async,L=a("./errors").Warning,M=a("./util"),N=M.canAttachTrace,O=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,P=/\((?:timers\.js):\d+:\d+\)/,Q=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,R=null,S=null,T=!1,U=!(0==M.env("BLUEBIRD_DEBUG")||!M.env("BLUEBIRD_DEBUG")&&"development"!==M.env("NODE_ENV")),V=!(0==M.env("BLUEBIRD_WARNINGS")||!U&&!M.env("BLUEBIRD_WARNINGS")),W=!(0==M.env("BLUEBIRD_LONG_STACK_TRACES")||!U&&!M.env("BLUEBIRD_LONG_STACK_TRACES")),X=0!=M.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(V||!!M.env("BLUEBIRD_W_FORGOTTEN_RETURN"));b.prototype.suppressUnhandledRejections=function(){var a=this._target();a._bitField=-1048577&a._bitField|524288},b.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),K.invokeLater(this._notifyUnhandledRejection,this,void 0))},b.prototype._notifyUnhandledRejectionIsHandled=function(){z("rejectionHandled",G,void 0,this)},b.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},b.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},b.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var a=this._settledValue();this._setUnhandledRejectionIsNotified(),z("unhandledRejection",H,a,this)}},b.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},b.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},b.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},b.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},b.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},b.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},b.prototype._warn=function(a,b,c){return r(a,b,c||this)},b.onPossiblyUnhandledRejection=function(a){var b=J();H="function"==typeof a?null===b?a:M.domainBind(b,a):void 0},b.onUnhandledRejectionHandled=function(a){var b=J();G="function"==typeof a?null===b?a:M.domainBind(b,a):void 0};var Y=function(){};b.longStackTraces=function(){if(K.haveItemsQueued()&&!fa.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!fa.longStackTraces&&C()){var a=b.prototype._captureStackTrace,d=b.prototype._attachExtraTrace;fa.longStackTraces=!0,Y=function(){if(K.haveItemsQueued()&&!fa.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");b.prototype._captureStackTrace=a,b.prototype._attachExtraTrace=d,c.deactivateLongStackTraces(),K.enableTrampoline(),fa.longStackTraces=!1},b.prototype._captureStackTrace=n,b.prototype._attachExtraTrace=o,c.activateLongStackTraces(),K.disableTrampolineIfNecessary()}},b.hasLongStackTraces=function(){return fa.longStackTraces&&C()};var Z=function(){try{if("function"==typeof CustomEvent){var a=new CustomEvent("CustomEvent");return M.global.dispatchEvent(a),function(a,b){var c=new CustomEvent(a.toLowerCase(),{detail:b,cancelable:!0});return!M.global.dispatchEvent(c)}}if("function"==typeof Event){var a=new Event("CustomEvent");return M.global.dispatchEvent(a),function(a,b){var c=new Event(a.toLowerCase(),{cancelable:!0});return c.detail=b,!M.global.dispatchEvent(c)}}var a=document.createEvent("CustomEvent");return a.initCustomEvent("testingtheevent",!1,!0,{}),M.global.dispatchEvent(a),function(a,b){var c=document.createEvent("CustomEvent");return c.initCustomEvent(a.toLowerCase(),!1,!0,b),!M.global.dispatchEvent(c)}}catch(b){}return function(){return!1}}(),$=function(){return M.isNode?function(){return process.emit.apply(process,arguments)}:M.global?function(a){var b="on"+a.toLowerCase(),c=M.global[b];return!!c&&(c.apply(M.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),_={promiseCreated:d,promiseFulfilled:d,promiseRejected:d,promiseResolved:d,promiseCancelled:d,promiseChained:function(a,b,c){return{promise:b,child:c}},warning:function(a,b){return{warning:b}},unhandledRejection:function(a,b,c){return{reason:b,promise:c}},rejectionHandled:d},aa=function(a){var b=!1;try{b=$.apply(null,arguments)}catch(c){K.throwLater(c),b=!0}var d=!1;try{d=Z(a,_[a].apply(null,arguments))}catch(c){K.throwLater(c),d=!0}return d||b};b.config=function(a){if(a=Object(a),"longStackTraces"in a&&(a.longStackTraces?b.longStackTraces():!a.longStackTraces&&b.hasLongStackTraces()&&Y()),"warnings"in a){var c=a.warnings;fa.warnings=!!c,X=fa.warnings,M.isObject(c)&&"wForgottenReturn"in c&&(X=!!c.wForgottenReturn)}if("cancellation"in a&&a.cancellation&&!fa.cancellation){if(K.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");b.prototype._clearCancellationData=j,b.prototype._propagateFrom=k,b.prototype._onCancel=h,b.prototype._setOnCancel=i,b.prototype._attachCancellationCallback=g,b.prototype._execute=f,ba=k,fa.cancellation=!0}"monitoring"in a&&(a.monitoring&&!fa.monitoring?(fa.monitoring=!0,b.prototype._fireEvent=aa):!a.monitoring&&fa.monitoring&&(fa.monitoring=!1,b.prototype._fireEvent=e))},b.prototype._fireEvent=e,b.prototype._execute=function(a,b,c){try{a(b,c)}catch(d){return d}},b.prototype._onCancel=function(){},b.prototype._setOnCancel=function(a){},b.prototype._attachCancellationCallback=function(a){},b.prototype._captureStackTrace=function(){},b.prototype._attachExtraTrace=function(){},b.prototype._clearCancellationData=function(){},b.prototype._propagateFrom=function(a,b){};var ba=l,ca=function(){return!1},da=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;M.inherits(F,Error),c.CapturedTrace=F,F.prototype.uncycle=function(){var a=this._length;if(!(2>a)){for(var b=[],c={},d=0,e=this;void 0!==e;++d)b.push(e),e=e._parent;a=this._length=d;for(var d=a-1;d>=0;--d){var f=b[d].stack;void 0===c[f]&&(c[f]=d)}for(var d=0;a>d;++d){var g=b[d].stack,h=c[g];if(void 0!==h&&h!==d){h>0&&(b[h-1]._parent=void 0,b[h-1]._length=1),b[d]._parent=void 0,b[d]._length=1;var i=d>0?b[d-1]:this;a-1>h?(i._parent=b[h+1],i._parent.uncycle(),i._length=i._parent._length+1):(i._parent=void 0,i._length=1);for(var j=i._length+1,k=d-2;k>=0;--k)b[k]._length=j,j++;return}}}},F.prototype.attachExtraTrace=function(a){if(!a.__stackCleaned__){this.uncycle();for(var b=x(a),c=b.message,d=[b.stack],e=this;void 0!==e;)d.push(v(e.stack.split("\n"))),e=e._parent;u(d),t(d),M.notEnumerableProp(a,"stack",s(c,d)),M.notEnumerableProp(a,"__stackCleaned__",!0)}};var ea=function(){var a=/^\s*at\s*/,b=function(a,b){return"string"==typeof a?a:void 0!==b.name&&void 0!==b.message?b.toString():A(b)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,R=a,S=b;var c=Error.captureStackTrace;return ca=function(a){return O.test(a)},function(a,b){Error.stackTraceLimit+=6,c(a,b),Error.stackTraceLimit-=6}}var d=new Error;if("string"==typeof d.stack&&d.stack.split("\n")[0].indexOf("stackDetection@")>=0)return R=/@/,S=b,T=!0,function(a){a.stack=(new Error).stack};var e;try{throw new Error}catch(f){e="stack"in f}return"stack"in d||!e||"number"!=typeof Error.stackTraceLimit?(S=function(a,b){return"string"==typeof a?a:"object"!=typeof b&&"function"!=typeof b||void 0===b.name||void 0===b.message?A(b):b.toString()},null):(R=a,S=b,function(a){Error.stackTraceLimit+=6;try{throw new Error}catch(b){a.stack=b.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(I=function(a){console.warn(a)},M.isNode&&process.stderr.isTTY?I=function(a,b){var c=b?"[33m":"[31m";console.warn(c+a+"[0m\n")}:M.isNode||"string"!=typeof(new Error).stack||(I=function(a,b){console.warn("%c"+a,b?"color: darkorange":"color: red")}));var fa={warnings:V,longStackTraces:!1,cancellation:!1,monitoring:!1};return W&&b.longStackTraces(),{longStackTraces:function(){return fa.longStackTraces},warnings:function(){return fa.warnings},cancellation:function(){return fa.cancellation},monitoring:function(){return fa.monitoring},propagateFromFunction:function(){return ba},boundValueFunction:function(){return m},checkForgottenReturns:p,setBounds:E,warn:r,deprecated:q,CapturedTrace:F,fireDomEvent:Z,fireGlobalEvent:$}}},{"./errors":12,"./util":36}],10:[function(a,b,c){"use strict";b.exports=function(a){function b(){return this.value}function c(){throw this.reason}a.prototype["return"]=a.prototype.thenReturn=function(c){return c instanceof a&&c.suppressUnhandledRejections(),this._then(b,void 0,void 0,{value:c},void 0)},a.prototype["throw"]=a.prototype.thenThrow=function(a){return this._then(c,void 0,void 0,{reason:a},void 0)},a.prototype.catchThrow=function(a){if(arguments.length<=1)return this._then(void 0,c,void 0,{reason:a},void 0);var b=arguments[1],d=function(){throw b};return this.caught(a,d)},a.prototype.catchReturn=function(c){if(arguments.length<=1)return c instanceof a&&c.suppressUnhandledRejections(),this._then(void 0,b,void 0,{value:c},void 0);var d=arguments[1];d instanceof a&&d.suppressUnhandledRejections();var e=function(){return d};return this.caught(c,e)}}},{}],11:[function(a,b,c){"use strict";b.exports=function(a,b){function c(){return f(this)}function d(a,c){return e(a,c,b,b)}var e=a.reduce,f=a.all;a.prototype.each=function(a){return e(this,a,b,0)._then(c,void 0,void 0,this,void 0)},a.prototype.mapSeries=function(a){return e(this,a,b,b)},a.each=function(a,d){return e(a,d,b,0)._then(c,void 0,void 0,a,void 0)},a.mapSeries=d}},{}],12:[function(a,b,c){"use strict";function d(a,b){function c(d){return this instanceof c?(l(this,"message","string"==typeof d?d:b),l(this,"name",a),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new c(d)}return k(c,Error),c}function e(a){return this instanceof e?(l(this,"name","OperationalError"),l(this,"message",a),this.cause=a,this.isOperational=!0,void(a instanceof Error?(l(this,"message",a.message),l(this,"stack",a.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new e(a)}var f,g,h=a("./es5"),i=h.freeze,j=a("./util"),k=j.inherits,l=j.notEnumerableProp,m=d("Warning","warning"),n=d("CancellationError","cancellation error"),o=d("TimeoutError","timeout error"),p=d("AggregateError","aggregate error");try{f=TypeError,g=RangeError}catch(q){f=d("TypeError","type error"),g=d("RangeError","range error")}for(var r="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),s=0;s<r.length;++s)"function"==typeof Array.prototype[r[s]]&&(p.prototype[r[s]]=Array.prototype[r[s]]);h.defineProperty(p.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),p.prototype.isOperational=!0;var t=0;p.prototype.toString=function(){var a=Array(4*t+1).join(" "),b="\n"+a+"AggregateError of:\n";t++,a=Array(4*t+1).join(" ");for(var c=0;c<this.length;++c){for(var d=this[c]===this?"[Circular AggregateError]":this[c]+"",e=d.split("\n"),f=0;f<e.length;++f)e[f]=a+e[f];d=e.join("\n"),b+=d+"\n"}return t--,b},k(e,Error);var u=Error.__BluebirdErrorTypes__;u||(u=i({CancellationError:n,TimeoutError:o,OperationalError:e,RejectionError:e,AggregateError:p}),h.defineProperty(Error,"__BluebirdErrorTypes__",{value:u,writable:!1,enumerable:!1,configurable:!1})),b.exports={Error:Error,TypeError:f,RangeError:g,CancellationError:u.CancellationError,OperationalError:u.OperationalError,TimeoutError:u.TimeoutError,AggregateError:u.AggregateError,Warning:m}},{"./es5":13,"./util":36}],13:[function(a,b,c){var d=function(){"use strict";return void 0===this}();if(d)b.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:d,propertyIsWritable:function(a,b){var c=Object.getOwnPropertyDescriptor(a,b);return!(c&&!c.writable&&!c.set)}};else{var e={}.hasOwnProperty,f={}.toString,g={}.constructor.prototype,h=function(a){var b=[];for(var c in a)e.call(a,c)&&b.push(c);return b},i=function(a,b){return{value:a[b]}},j=function(a,b,c){return a[b]=c.value,a},k=function(a){return a},l=function(a){try{return Object(a).constructor.prototype}catch(b){return g}},m=function(a){try{return"[object Array]"===f.call(a)}catch(b){return!1}};b.exports={isArray:m,keys:h,names:h,defineProperty:j,getDescriptor:i,freeze:k,getPrototypeOf:l,isES5:d,propertyIsWritable:function(){return!0}}}},{}],14:[function(a,b,c){"use strict";b.exports=function(a,b){var c=a.map;a.prototype.filter=function(a,d){return c(this,a,d,b)},a.filter=function(a,d,e){return c(a,d,e,b)}}},{}],15:[function(a,b,c){"use strict";b.exports=function(b,c){function d(a,b,c){this.promise=a,this.type=b,this.handler=c,this.called=!1,this.cancelPromise=null}function e(a){this.finallyHandler=a}function f(a,b){return null!=a.cancelPromise&&(arguments.length>1?a.cancelPromise._reject(b):a.cancelPromise._cancel(),a.cancelPromise=null,!0)}function g(){return i.call(this,this.promise._target()._settledValue())}function h(a){return f(this,a)?void 0:(l.e=a,l)}function i(a){var d=this.promise,i=this.handler;if(!this.called){this.called=!0;var j=this.isFinallyHandler()?i.call(d._boundValue()):i.call(d._boundValue(),a);if(void 0!==j){d._setReturnedNonUndefined();var m=c(j,d);if(m instanceof b){if(null!=this.cancelPromise){if(m._isCancelled()){var n=new k("late cancellation observer");return d._attachExtraTrace(n),l.e=n,l}m.isPending()&&m._attachCancellationCallback(new e(this))}return m._then(g,h,void 0,this,void 0)}}}return d.isRejected()?(f(this),l.e=a,l):(f(this),a)}var j=a("./util"),k=b.CancellationError,l=j.errorObj;return d.prototype.isFinallyHandler=function(){return 0===this.type},e.prototype._resultCancelled=function(){f(this.finallyHandler)},b.prototype._passThrough=function(a,b,c,e){return"function"!=typeof a?this.then():this._then(c,e,void 0,new d(this,b,a),void 0)},b.prototype.lastly=b.prototype["finally"]=function(a){return this._passThrough(a,0,i,i)},b.prototype.tap=function(a){return this._passThrough(a,1,i)},d}},{"./util":36}],16:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f,g){function h(a,c,d){for(var f=0;f<c.length;++f){d._pushContext();var g=n(c[f])(a);if(d._popContext(),g===m){d._pushContext();var h=b.reject(m.e);return d._popContext(),h}var i=e(g,d);if(i instanceof b)return i}return null}function i(a,c,e,f){if(g.cancellation()){var h=new b(d),i=this._finallyPromise=new b(d);this._promise=h.lastly(function(){return i}),h._captureStackTrace(),h._setOnCancel(this)}else{var j=this._promise=new b(d);j._captureStackTrace()}this._stack=f,this._generatorFunction=a,this._receiver=c,this._generator=void 0,this._yieldHandlers="function"==typeof e?[e].concat(o):o,this._yieldedPromise=null,this._cancellationPhase=!1}var j=a("./errors"),k=j.TypeError,l=a("./util"),m=l.errorObj,n=l.tryCatch,o=[];l.inherits(i,f),i.prototype._isResolved=function(){return null===this._promise},i.prototype._cleanup=function(){this._promise=this._generator=null,g.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},i.prototype._promiseCancelled=function(){if(!this._isResolved()){var a,c="undefined"!=typeof this._generator["return"];if(c)this._promise._pushContext(),a=n(this._generator["return"]).call(this._generator,void 0),this._promise._popContext();else{var d=new b.CancellationError("generator .return() sentinel");b.coroutine.returnSentinel=d,this._promise._attachExtraTrace(d),this._promise._pushContext(),a=n(this._generator["throw"]).call(this._generator,d),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(a)}},i.prototype._promiseFulfilled=function(a){this._yieldedPromise=null,this._promise._pushContext();var b=n(this._generator.next).call(this._generator,a);this._promise._popContext(),this._continue(b)},i.prototype._promiseRejected=function(a){this._yieldedPromise=null,this._promise._attachExtraTrace(a),this._promise._pushContext();var b=n(this._generator["throw"]).call(this._generator,a);this._promise._popContext(),this._continue(b)},i.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof b){var a=this._yieldedPromise;this._yieldedPromise=null,a.cancel()}},i.prototype.promise=function(){return this._promise},i.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},i.prototype._continue=function(a){var c=this._promise;if(a===m)return this._cleanup(),this._cancellationPhase?c.cancel():c._rejectCallback(a.e,!1);var d=a.value;if(a.done===!0)return this._cleanup(),this._cancellationPhase?c.cancel():c._resolveCallback(d);var f=e(d,this._promise);if(!(f instanceof b)&&(f=h(f,this._yieldHandlers,this._promise),null===f))return void this._promiseRejected(new k("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",d)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));f=f._target();var g=f._bitField;0===(50397184&g)?(this._yieldedPromise=f,f._proxy(this,null)):0!==(33554432&g)?b._async.invoke(this._promiseFulfilled,this,f._value()):0!==(16777216&g)?b._async.invoke(this._promiseRejected,this,f._reason()):this._promiseCancelled()},b.coroutine=function(a,b){if("function"!=typeof a)throw new k("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var c=Object(b).yieldHandler,d=i,e=(new Error).stack;return function(){var b=a.apply(this,arguments),f=new d((void 0),(void 0),c,e),g=f.promise();return f._generator=b,
|
||
f._promiseFulfilled(void 0),g}},b.coroutine.addYieldHandler=function(a){if("function"!=typeof a)throw new k("expecting a function but got "+l.classString(a));o.push(a)},b.spawn=function(a){if(g.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof a)return c("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var d=new i(a,this),e=d.promise();return d._run(b.spawn),e}}},{"./errors":12,"./util":36}],17:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f,g){var h=a("./util");h.canEvaluate,h.tryCatch,h.errorObj,b.join=function(){var a,b=arguments.length-1;if(b>0&&"function"==typeof arguments[b]){a=arguments[b];var d}var e=[].slice.call(arguments);a&&e.pop();var d=new c(e).promise();return void 0!==a?d.spread(a):d}}},{"./util":36}],18:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f,g){function h(a,b,c,d){this.constructor$(a),this._promise._captureStackTrace();var e=j();this._callback=null===e?b:k.domainBind(e,b),this._preservedValues=d===f?new Array(this.length()):null,this._limit=c,this._inFlight=0,this._queue=[],n.invoke(this._asyncInit,this,void 0)}function i(a,c,e,f){if("function"!=typeof c)return d("expecting a function but got "+k.classString(c));var g=0;if(void 0!==e){if("object"!=typeof e||null===e)return b.reject(new TypeError("options argument must be an object but it is "+k.classString(e)));if("number"!=typeof e.concurrency)return b.reject(new TypeError("'concurrency' must be a number but it is "+k.classString(e.concurrency)));g=e.concurrency}return g="number"==typeof g&&isFinite(g)&&g>=1?g:0,new h(a,c,g,f).promise()}var j=b._getDomain,k=a("./util"),l=k.tryCatch,m=k.errorObj,n=b._async;k.inherits(h,c),h.prototype._asyncInit=function(){this._init$(void 0,-2)},h.prototype._init=function(){},h.prototype._promiseFulfilled=function(a,c){var d=this._values,f=this.length(),h=this._preservedValues,i=this._limit;if(0>c){if(c=-1*c-1,d[c]=a,i>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(i>=1&&this._inFlight>=i)return d[c]=a,this._queue.push(c),!1;null!==h&&(h[c]=a);var j=this._promise,k=this._callback,n=j._boundValue();j._pushContext();var o=l(k).call(n,a,c,f),p=j._popContext();if(g.checkForgottenReturns(o,p,null!==h?"Promise.filter":"Promise.map",j),o===m)return this._reject(o.e),!0;var q=e(o,this._promise);if(q instanceof b){q=q._target();var r=q._bitField;if(0===(50397184&r))return i>=1&&this._inFlight++,d[c]=q,q._proxy(this,-1*(c+1)),!1;if(0===(33554432&r))return 0!==(16777216&r)?(this._reject(q._reason()),!0):(this._cancel(),!0);o=q._value()}d[c]=o}var s=++this._totalResolved;return s>=f&&(null!==h?this._filter(d,h):this._resolve(d),!0)},h.prototype._drainQueue=function(){for(var a=this._queue,b=this._limit,c=this._values;a.length>0&&this._inFlight<b;){if(this._isResolved())return;var d=a.pop();this._promiseFulfilled(c[d],d)}},h.prototype._filter=function(a,b){for(var c=b.length,d=new Array(c),e=0,f=0;c>f;++f)a[f]&&(d[e++]=b[f]);d.length=e,this._resolve(d)},h.prototype.preservedValues=function(){return this._preservedValues},b.prototype.map=function(a,b){return i(this,a,b,null)},b.map=function(a,b,c,d){return i(a,b,c,d)}}},{"./util":36}],19:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f){var g=a("./util"),h=g.tryCatch;b.method=function(a){if("function"!=typeof a)throw new b.TypeError("expecting a function but got "+g.classString(a));return function(){var d=new b(c);d._captureStackTrace(),d._pushContext();var e=h(a).apply(this,arguments),g=d._popContext();return f.checkForgottenReturns(e,g,"Promise.method",d),d._resolveFromSyncValue(e),d}},b.attempt=b["try"]=function(a){if("function"!=typeof a)return e("expecting a function but got "+g.classString(a));var d=new b(c);d._captureStackTrace(),d._pushContext();var i;if(arguments.length>1){f.deprecated("calling Promise.try with more than 1 argument");var j=arguments[1],k=arguments[2];i=g.isArray(j)?h(a).apply(k,j):h(a).call(k,j)}else i=h(a)();var l=d._popContext();return f.checkForgottenReturns(i,l,"Promise.try",d),d._resolveFromSyncValue(i),d},b.prototype._resolveFromSyncValue=function(a){a===g.errorObj?this._rejectCallback(a.e,!1):this._resolveCallback(a,!0)}}},{"./util":36}],20:[function(a,b,c){"use strict";function d(a){return a instanceof Error&&k.getPrototypeOf(a)===Error.prototype}function e(a){var b;if(d(a)){b=new j(a),b.name=a.name,b.message=a.message,b.stack=a.stack;for(var c=k.keys(a),e=0;e<c.length;++e){var f=c[e];l.test(f)||(b[f]=a[f])}return b}return g.markAsOriginatingFromRejection(a),a}function f(a,b){return function(c,d){if(null!==a){if(c){var f=e(h(c));a._attachExtraTrace(f),a._reject(f)}else if(b){var g=[].slice.call(arguments,1);a._fulfill(g)}else a._fulfill(d);a=null}}}var g=a("./util"),h=g.maybeWrapAsError,i=a("./errors"),j=i.OperationalError,k=a("./es5"),l=/^(?:name|message|stack|cause)$/;b.exports=f},{"./errors":12,"./es5":13,"./util":36}],21:[function(a,b,c){"use strict";b.exports=function(b){function c(a,b){var c=this;if(!f.isArray(a))return d.call(c,a,b);var e=h(b).apply(c._boundValue(),[null].concat(a));e===i&&g.throwLater(e.e)}function d(a,b){var c=this,d=c._boundValue(),e=void 0===a?h(b).call(d,null):h(b).call(d,null,a);e===i&&g.throwLater(e.e)}function e(a,b){var c=this;if(!a){var d=new Error(a+"");d.cause=a,a=d}var e=h(b).call(c._boundValue(),a);e===i&&g.throwLater(e.e)}var f=a("./util"),g=b._async,h=f.tryCatch,i=f.errorObj;b.prototype.asCallback=b.prototype.nodeify=function(a,b){if("function"==typeof a){var f=d;void 0!==b&&Object(b).spread&&(f=c),this._then(f,e,void 0,this,a)}return this}}},{"./util":36}],22:[function(a,b,c){"use strict";b.exports=function(){function c(){}function d(a,b){if("function"!=typeof b)throw new s("expecting a function but got "+n.classString(b));if(a.constructor!==e)throw new s("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function e(a){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,a!==u&&(d(this,a),this._resolveFromExecutor(a)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function f(a){this.promise._resolveCallback(a)}function g(a){this.promise._rejectCallback(a,!1)}function h(a){var b=new e(u);b._fulfillmentHandler0=a,b._rejectionHandler0=a,b._promise0=a,b._receiver0=a}var i,j=function(){return new s("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},k=function(){return new e.PromiseInspection(this._target())},l=function(a){return e.reject(new s(a))},m={},n=a("./util");i=n.isNode?function(){var a=process.domain;return void 0===a&&(a=null),a}:function(){return null},n.notEnumerableProp(e,"_getDomain",i);var o=a("./es5"),p=a("./async"),q=new p;o.defineProperty(e,"_async",{value:q});var r=a("./errors"),s=e.TypeError=r.TypeError;e.RangeError=r.RangeError;var t=e.CancellationError=r.CancellationError;e.TimeoutError=r.TimeoutError,e.OperationalError=r.OperationalError,e.RejectionError=r.OperationalError,e.AggregateError=r.AggregateError;var u=function(){},v={},w={},x=a("./thenables")(e,u),y=a("./promise_array")(e,u,x,l,c),z=a("./context")(e),A=z.create,B=a("./debuggability")(e,z),C=(B.CapturedTrace,a("./finally")(e,x)),D=a("./catch_filter")(w),E=a("./nodeback"),F=n.errorObj,G=n.tryCatch;return e.prototype.toString=function(){return"[object Promise]"},e.prototype.caught=e.prototype["catch"]=function(a){var b=arguments.length;if(b>1){var c,d=new Array(b-1),e=0;for(c=0;b-1>c;++c){var f=arguments[c];if(!n.isObject(f))return l("expecting an object but got A catch statement predicate "+n.classString(f));d[e++]=f}return d.length=e,a=arguments[c],this.then(void 0,D(d,a,this))}return this.then(void 0,a)},e.prototype.reflect=function(){return this._then(k,k,void 0,this,void 0)},e.prototype.then=function(a,b){if(B.warnings()&&arguments.length>0&&"function"!=typeof a&&"function"!=typeof b){var c=".then() only accepts functions but was passed: "+n.classString(a);arguments.length>1&&(c+=", "+n.classString(b)),this._warn(c)}return this._then(a,b,void 0,void 0,void 0)},e.prototype.done=function(a,b){var c=this._then(a,b,void 0,void 0,void 0);c._setIsFinal()},e.prototype.spread=function(a){return"function"!=typeof a?l("expecting a function but got "+n.classString(a)):this.all()._then(a,void 0,void 0,v,void 0)},e.prototype.toJSON=function(){var a={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(a.fulfillmentValue=this.value(),a.isFulfilled=!0):this.isRejected()&&(a.rejectionReason=this.reason(),a.isRejected=!0),a},e.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new y(this).promise()},e.prototype.error=function(a){return this.caught(n.originatesFromRejection,a)},e.getNewLibraryCopy=b.exports,e.is=function(a){return a instanceof e},e.fromNode=e.fromCallback=function(a){var b=new e(u);b._captureStackTrace();var c=arguments.length>1&&!!Object(arguments[1]).multiArgs,d=G(a)(E(b,c));return d===F&&b._rejectCallback(d.e,!0),b._isFateSealed()||b._setAsyncGuaranteed(),b},e.all=function(a){return new y(a).promise()},e.cast=function(a){var b=x(a);return b instanceof e||(b=new e(u),b._captureStackTrace(),b._setFulfilled(),b._rejectionHandler0=a),b},e.resolve=e.fulfilled=e.cast,e.reject=e.rejected=function(a){var b=new e(u);return b._captureStackTrace(),b._rejectCallback(a,!0),b},e.setScheduler=function(a){if("function"!=typeof a)throw new s("expecting a function but got "+n.classString(a));return q.setScheduler(a)},e.prototype._then=function(a,b,c,d,f){var g=void 0!==f,h=g?f:new e(u),j=this._target(),k=j._bitField;g||(h._propagateFrom(this,3),h._captureStackTrace(),void 0===d&&0!==(2097152&this._bitField)&&(d=0!==(50397184&k)?this._boundValue():j===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,h));var l=i();if(0!==(50397184&k)){var m,o,p=j._settlePromiseCtx;0!==(33554432&k)?(o=j._rejectionHandler0,m=a):0!==(16777216&k)?(o=j._fulfillmentHandler0,m=b,j._unsetRejectionIsUnhandled()):(p=j._settlePromiseLateCancellationObserver,o=new t("late cancellation observer"),j._attachExtraTrace(o),m=b),q.invoke(p,j,{handler:null===l?m:"function"==typeof m&&n.domainBind(l,m),promise:h,receiver:d,value:o})}else j._addCallbacks(a,b,h,d,l);return h},e.prototype._length=function(){return 65535&this._bitField},e.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},e.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},e.prototype._setLength=function(a){this._bitField=-65536&this._bitField|65535&a},e.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},e.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},e.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},e.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},e.prototype._isFinal=function(){return(4194304&this._bitField)>0},e.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},e.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},e.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},e.prototype._setAsyncGuaranteed=function(){q.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},e.prototype._receiverAt=function(a){var b=0===a?this._receiver0:this[4*a-4+3];return b===m?void 0:void 0===b&&this._isBound()?this._boundValue():b},e.prototype._promiseAt=function(a){return this[4*a-4+2]},e.prototype._fulfillmentHandlerAt=function(a){return this[4*a-4+0]},e.prototype._rejectionHandlerAt=function(a){return this[4*a-4+1]},e.prototype._boundValue=function(){},e.prototype._migrateCallback0=function(a){var b=(a._bitField,a._fulfillmentHandler0),c=a._rejectionHandler0,d=a._promise0,e=a._receiverAt(0);void 0===e&&(e=m),this._addCallbacks(b,c,d,e,null)},e.prototype._migrateCallbackAt=function(a,b){var c=a._fulfillmentHandlerAt(b),d=a._rejectionHandlerAt(b),e=a._promiseAt(b),f=a._receiverAt(b);void 0===f&&(f=m),this._addCallbacks(c,d,e,f,null)},e.prototype._addCallbacks=function(a,b,c,d,e){var f=this._length();if(f>=65531&&(f=0,this._setLength(0)),0===f)this._promise0=c,this._receiver0=d,"function"==typeof a&&(this._fulfillmentHandler0=null===e?a:n.domainBind(e,a)),"function"==typeof b&&(this._rejectionHandler0=null===e?b:n.domainBind(e,b));else{var g=4*f-4;this[g+2]=c,this[g+3]=d,"function"==typeof a&&(this[g+0]=null===e?a:n.domainBind(e,a)),"function"==typeof b&&(this[g+1]=null===e?b:n.domainBind(e,b))}return this._setLength(f+1),f},e.prototype._proxy=function(a,b){this._addCallbacks(void 0,void 0,b,a,null)},e.prototype._resolveCallback=function(a,b){if(0===(117506048&this._bitField)){if(a===this)return this._rejectCallback(j(),!1);var c=x(a,this);if(!(c instanceof e))return this._fulfill(a);b&&this._propagateFrom(c,2);var d=c._target();if(d===this)return void this._reject(j());var f=d._bitField;if(0===(50397184&f)){var g=this._length();g>0&&d._migrateCallback0(this);for(var h=1;g>h;++h)d._migrateCallbackAt(this,h);this._setFollowing(),this._setLength(0),this._setFollowee(d)}else if(0!==(33554432&f))this._fulfill(d._value());else if(0!==(16777216&f))this._reject(d._reason());else{var i=new t("late cancellation observer");d._attachExtraTrace(i),this._reject(i)}}},e.prototype._rejectCallback=function(a,b,c){var d=n.ensureErrorObject(a),e=d===a;if(!e&&!c&&B.warnings()){var f="a promise was rejected with a non-error: "+n.classString(a);this._warn(f,!0)}this._attachExtraTrace(d,!!b&&e),this._reject(a)},e.prototype._resolveFromExecutor=function(a){var b=this;this._captureStackTrace(),this._pushContext();var c=!0,d=this._execute(a,function(a){b._resolveCallback(a)},function(a){b._rejectCallback(a,c)});c=!1,this._popContext(),void 0!==d&&b._rejectCallback(d,!0)},e.prototype._settlePromiseFromHandler=function(a,b,c,d){var e=d._bitField;if(0===(65536&e)){d._pushContext();var f;b===v?c&&"number"==typeof c.length?f=G(a).apply(this._boundValue(),c):(f=F,f.e=new s("cannot .spread() a non-array: "+n.classString(c))):f=G(a).call(b,c);var g=d._popContext();e=d._bitField,0===(65536&e)&&(f===w?d._reject(c):f===F?d._rejectCallback(f.e,!1):(B.checkForgottenReturns(f,g,"",d,this),d._resolveCallback(f)))}},e.prototype._target=function(){for(var a=this;a._isFollowing();)a=a._followee();return a},e.prototype._followee=function(){return this._rejectionHandler0},e.prototype._setFollowee=function(a){this._rejectionHandler0=a},e.prototype._settlePromise=function(a,b,d,f){var g=a instanceof e,h=this._bitField,i=0!==(134217728&h);0!==(65536&h)?(g&&a._invokeInternalOnCancel(),d instanceof C&&d.isFinallyHandler()?(d.cancelPromise=a,G(b).call(d,f)===F&&a._reject(F.e)):b===k?a._fulfill(k.call(d)):d instanceof c?d._promiseCancelled(a):g||a instanceof y?a._cancel():d.cancel()):"function"==typeof b?g?(i&&a._setAsyncGuaranteed(),this._settlePromiseFromHandler(b,d,f,a)):b.call(d,f,a):d instanceof c?d._isResolved()||(0!==(33554432&h)?d._promiseFulfilled(f,a):d._promiseRejected(f,a)):g&&(i&&a._setAsyncGuaranteed(),0!==(33554432&h)?a._fulfill(f):a._reject(f))},e.prototype._settlePromiseLateCancellationObserver=function(a){var b=a.handler,c=a.promise,d=a.receiver,f=a.value;"function"==typeof b?c instanceof e?this._settlePromiseFromHandler(b,d,f,c):b.call(d,f,c):c instanceof e&&c._reject(f)},e.prototype._settlePromiseCtx=function(a){this._settlePromise(a.promise,a.handler,a.receiver,a.value)},e.prototype._settlePromise0=function(a,b,c){var d=this._promise0,e=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(d,a,e,b)},e.prototype._clearCallbackDataAtIndex=function(a){var b=4*a-4;this[b+2]=this[b+3]=this[b+0]=this[b+1]=void 0},e.prototype._fulfill=function(a){var b=this._bitField;if(!((117506048&b)>>>16)){if(a===this){var c=j();return this._attachExtraTrace(c),this._reject(c)}this._setFulfilled(),this._rejectionHandler0=a,(65535&b)>0&&(0!==(134217728&b)?this._settlePromises():q.settlePromises(this))}},e.prototype._reject=function(a){var b=this._bitField;if(!((117506048&b)>>>16))return this._setRejected(),this._fulfillmentHandler0=a,this._isFinal()?q.fatalError(a,n.isNode):void((65535&b)>0?q.settlePromises(this):this._ensurePossibleRejectionHandled())},e.prototype._fulfillPromises=function(a,b){for(var c=1;a>c;c++){var d=this._fulfillmentHandlerAt(c),e=this._promiseAt(c),f=this._receiverAt(c);this._clearCallbackDataAtIndex(c),this._settlePromise(e,d,f,b)}},e.prototype._rejectPromises=function(a,b){for(var c=1;a>c;c++){var d=this._rejectionHandlerAt(c),e=this._promiseAt(c),f=this._receiverAt(c);this._clearCallbackDataAtIndex(c),this._settlePromise(e,d,f,b)}},e.prototype._settlePromises=function(){var a=this._bitField,b=65535&a;if(b>0){if(0!==(16842752&a)){var c=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,c,a),this._rejectPromises(b,c)}else{var d=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,d,a),this._fulfillPromises(b,d)}this._setLength(0)}this._clearCancellationData()},e.prototype._settledValue=function(){var a=this._bitField;return 0!==(33554432&a)?this._rejectionHandler0:0!==(16777216&a)?this._fulfillmentHandler0:void 0},e.defer=e.pending=function(){B.deprecated("Promise.defer","new Promise");var a=new e(u);return{promise:a,resolve:f,reject:g}},n.notEnumerableProp(e,"_makeSelfResolutionError",j),a("./method")(e,u,x,l,B),a("./bind")(e,u,x,B),a("./cancel")(e,y,l,B),a("./direct_resolve")(e),a("./synchronous_inspection")(e),a("./join")(e,y,x,u,q,i),e.Promise=e,e.version="3.4.6",a("./map.js")(e,y,l,x,u,B),a("./call_get.js")(e),a("./using.js")(e,l,x,A,u,B),a("./timers.js")(e,u,B),a("./generators.js")(e,l,u,x,c,B),a("./nodeify.js")(e),a("./promisify.js")(e,u),a("./props.js")(e,y,x,l),a("./race.js")(e,u,x,l),a("./reduce.js")(e,y,l,x,u,B),a("./settle.js")(e,y,B),a("./some.js")(e,y,l),a("./filter.js")(e,u),a("./each.js")(e,u),a("./any.js")(e),n.toFastProperties(e),n.toFastProperties(e.prototype),h({a:1}),h({b:2}),h({c:3}),h(1),h(function(){}),h(void 0),h(!1),h(new e(u)),B.setBounds(p.firstLineError,n.lastLineError),e}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f){function g(a){switch(a){case-2:return[];case-3:return{}}}function h(a){var d=this._promise=new b(c);a instanceof b&&d._propagateFrom(a,3),d._setOnCancel(this),this._values=a,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var i=a("./util");return i.isArray,i.inherits(h,f),h.prototype.length=function(){return this._length},h.prototype.promise=function(){return this._promise},h.prototype._init=function j(a,c){var f=d(this._values,this._promise);if(f instanceof b){f=f._target();var h=f._bitField;if(this._values=f,0===(50397184&h))return this._promise._setAsyncGuaranteed(),f._then(j,this._reject,void 0,this,c);if(0===(33554432&h))return 0!==(16777216&h)?this._reject(f._reason()):this._cancel();f=f._value()}if(f=i.asArray(f),null===f){var k=e("expecting an array or an iterable object but got "+i.classString(f)).reason();return void this._promise._rejectCallback(k,!1)}return 0===f.length?void(-5===c?this._resolveEmptyArray():this._resolve(g(c))):void this._iterate(f)},h.prototype._iterate=function(a){var c=this.getActualLength(a.length);this._length=c,this._values=this.shouldCopyValues()?new Array(c):this._values;for(var e=this._promise,f=!1,g=null,h=0;c>h;++h){var i=d(a[h],e);i instanceof b?(i=i._target(),g=i._bitField):g=null,f?null!==g&&i.suppressUnhandledRejections():null!==g?0===(50397184&g)?(i._proxy(this,h),this._values[h]=i):f=0!==(33554432&g)?this._promiseFulfilled(i._value(),h):0!==(16777216&g)?this._promiseRejected(i._reason(),h):this._promiseCancelled(h):f=this._promiseFulfilled(i,h)}f||e._setAsyncGuaranteed()},h.prototype._isResolved=function(){return null===this._values},h.prototype._resolve=function(a){this._values=null,this._promise._fulfill(a)},h.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},h.prototype._reject=function(a){this._values=null,this._promise._rejectCallback(a,!1)},h.prototype._promiseFulfilled=function(a,b){this._values[b]=a;var c=++this._totalResolved;return c>=this._length&&(this._resolve(this._values),!0)},h.prototype._promiseCancelled=function(){return this._cancel(),!0},h.prototype._promiseRejected=function(a){return this._totalResolved++,this._reject(a),!0},h.prototype._resultCancelled=function(){if(!this._isResolved()){var a=this._values;if(this._cancel(),a instanceof b)a.cancel();else for(var c=0;c<a.length;++c)a[c]instanceof b&&a[c].cancel()}},h.prototype.shouldCopyValues=function(){return!0},h.prototype.getActualLength=function(a){return a},h}},{"./util":36}],24:[function(a,b,c){"use strict";b.exports=function(b,c){function d(a){return!w.test(a)}function e(a){try{return a.__isPromisified__===!0}catch(b){return!1}}function f(a,b,c){var d=n.getDataPropertyOrDefault(a,b+c,u);return!!d&&e(d)}function g(a,b,c){for(var d=0;d<a.length;d+=2){var e=a[d];if(c.test(e))for(var f=e.replace(c,""),g=0;g<a.length;g+=2)if(a[g]===f)throw new s("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",b))}}function h(a,b,c,d){for(var h=n.inheritedDataKeys(a),i=[],j=0;j<h.length;++j){var k=h[j],l=a[k],m=d===x||x(k,l,a);"function"!=typeof l||e(l)||f(a,k,b)||!d(k,l,a,m)||i.push(k,l)}return g(i,b,c),i}function i(a,d,e,f,g,h){function i(){var e=d;d===m&&(e=this);var f=new b(c);f._captureStackTrace();var g="string"==typeof k&&this!==j?this[k]:a,i=o(f,h);try{g.apply(e,p(arguments,i))}catch(l){f._rejectCallback(q(l),!0,!0)}return f._isFateSealed()||f._setAsyncGuaranteed(),f}var j=function(){return this}(),k=a;return"string"==typeof k&&(a=f),n.notEnumerableProp(i,"__isPromisified__",!0),i}function j(a,b,c,d,e){for(var f=new RegExp(y(b)+"$"),g=h(a,b,f,c),i=0,j=g.length;j>i;i+=2){var k=g[i],l=g[i+1],o=k+b;if(d===z)a[o]=z(k,m,k,l,b,e);else{var p=d(l,function(){return z(k,m,k,l,b,e)});n.notEnumerableProp(p,"__isPromisified__",!0),a[o]=p}}return n.toFastProperties(a),a}function k(a,b,c){return z(a,b,void 0,a,null,c)}var l,m={},n=a("./util"),o=a("./nodeback"),p=n.withAppended,q=n.maybeWrapAsError,r=n.canEvaluate,s=a("./errors").TypeError,t="Async",u={__isPromisified__:!0},v=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],w=new RegExp("^(?:"+v.join("|")+")$"),x=function(a){return n.isIdentifier(a)&&"_"!==a.charAt(0)&&"constructor"!==a},y=function(a){return a.replace(/([$])/,"\\$")},z=r?l:i;b.promisify=function(a,b){if("function"!=typeof a)throw new s("expecting a function but got "+n.classString(a));if(e(a))return a;b=Object(b);var c=void 0===b.context?m:b.context,f=!!b.multiArgs,g=k(a,c,f);return n.copyDescriptors(a,g,d),g},b.promisifyAll=function(a,b){if("function"!=typeof a&&"object"!=typeof a)throw new s("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");b=Object(b);var c=!!b.multiArgs,d=b.suffix;"string"!=typeof d&&(d=t);var e=b.filter;"function"!=typeof e&&(e=x);var f=b.promisifier;if("function"!=typeof f&&(f=z),!n.isIdentifier(d))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var g=n.inheritedDataKeys(a),h=0;h<g.length;++h){var i=a[g[h]];"constructor"!==g[h]&&n.isClass(i)&&(j(i.prototype,d,e,f,c),j(i,d,e,f,c))}return j(a,d,e,f,c)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(a,b,c){"use strict";b.exports=function(b,c,d,e){function f(a){var b,c=!1;if(void 0!==h&&a instanceof h)b=l(a),c=!0;else{var d=k.keys(a),e=d.length;b=new Array(2*e);for(var f=0;e>f;++f){var g=d[f];b[f]=a[g],b[f+e]=g}}this.constructor$(b),this._isMap=c,this._init$(void 0,-3)}function g(a){var c,g=d(a);return j(g)?(c=g instanceof b?g._then(b.props,void 0,void 0,void 0,void 0):new f(g).promise(),g instanceof b&&c._propagateFrom(g,2),c):e("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var h,i=a("./util"),j=i.isObject,k=a("./es5");"function"==typeof Map&&(h=Map);var l=function(){function a(a,d){this[b]=a,this[b+c]=d,b++}var b=0,c=0;return function(d){c=d.size,b=0;var e=new Array(2*d.size);return d.forEach(a,e),e}}(),m=function(a){for(var b=new h,c=a.length/2|0,d=0;c>d;++d){var e=a[c+d],f=a[d];b.set(e,f)}return b};i.inherits(f,c),f.prototype._init=function(){},f.prototype._promiseFulfilled=function(a,b){this._values[b]=a;var c=++this._totalResolved;if(c>=this._length){var d;if(this._isMap)d=m(this._values);else{d={};for(var e=this.length(),f=0,g=this.length();g>f;++f)d[this._values[f+e]]=this._values[f]}return this._resolve(d),!0}return!1},f.prototype.shouldCopyValues=function(){return!1},f.prototype.getActualLength=function(a){return a>>1},b.prototype.props=function(){return g(this)},b.props=function(a){return g(a)}}},{"./es5":13,"./util":36}],26:[function(a,b,c){"use strict";function d(a,b,c,d,e){for(var f=0;e>f;++f)c[f+d]=a[f+b],a[f+b]=void 0}function e(a){this._capacity=a,this._length=0,this._front=0}e.prototype._willBeOverCapacity=function(a){return this._capacity<a},e.prototype._pushOne=function(a){var b=this.length();this._checkCapacity(b+1);var c=this._front+b&this._capacity-1;this[c]=a,this._length=b+1},e.prototype._unshiftOne=function(a){var b=this._capacity;this._checkCapacity(this.length()+1);var c=this._front,d=(c-1&b-1^b)-b;this[d]=a,this._front=d,this._length=this.length()+1},e.prototype.unshift=function(a,b,c){this._unshiftOne(c),this._unshiftOne(b),this._unshiftOne(a)},e.prototype.push=function(a,b,c){var d=this.length()+3;if(this._willBeOverCapacity(d))return this._pushOne(a),this._pushOne(b),void this._pushOne(c);var e=this._front+d-3;this._checkCapacity(d);var f=this._capacity-1;this[e+0&f]=a,this[e+1&f]=b,this[e+2&f]=c,this._length=d},e.prototype.shift=function(){var a=this._front,b=this[a];return this[a]=void 0,this._front=a+1&this._capacity-1,this._length--,b},e.prototype.length=function(){return this._length},e.prototype._checkCapacity=function(a){this._capacity<a&&this._resizeTo(this._capacity<<1)},e.prototype._resizeTo=function(a){var b=this._capacity;this._capacity=a;var c=this._front,e=this._length,f=c+e&b-1;d(this,0,this,b,f)},b.exports=e},{}],27:[function(a,b,c){"use strict";b.exports=function(b,c,d,e){function f(a,f){var i=d(a);if(i instanceof b)return h(i);if(a=g.asArray(a),null===a)return e("expecting an array or an iterable object but got "+g.classString(a));var j=new b(c);void 0!==f&&j._propagateFrom(f,3);for(var k=j._fulfill,l=j._reject,m=0,n=a.length;n>m;++m){var o=a[m];(void 0!==o||m in a)&&b.cast(o)._then(k,l,void 0,j,null)}return j}var g=a("./util"),h=function(a){return a.then(function(b){return f(b,a)})};b.race=function(a){return f(a,void 0)},b.prototype.race=function(){return f(this,void 0)}}},{"./util":36}],28:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f,g){function h(a,c,d,e){this.constructor$(a);var g=m();this._fn=null===g?c:n.domainBind(g,c),void 0!==d&&(d=b.resolve(d),d._attachCancellationCallback(this)),this._initialValue=d,this._currentCancellable=null,e===f?this._eachValues=Array(this._length):0===e?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function i(a,b){this.isFulfilled()?b._resolve(a):b._reject(a)}function j(a,b,c,e){if("function"!=typeof b)return d("expecting a function but got "+n.classString(b));var f=new h(a,b,c,e);return f.promise()}function k(a){this.accum=a,this.array._gotAccum(a);var c=e(this.value,this.array._promise);return c instanceof b?(this.array._currentCancellable=c,c._then(l,void 0,void 0,this,void 0)):l.call(this,c)}function l(a){var c=this.array,d=c._promise,e=o(c._fn);d._pushContext();var f;f=void 0!==c._eachValues?e.call(d._boundValue(),a,this.index,this.length):e.call(d._boundValue(),this.accum,a,this.index,this.length),f instanceof b&&(c._currentCancellable=f);var h=d._popContext();return g.checkForgottenReturns(f,h,void 0!==c._eachValues?"Promise.each":"Promise.reduce",d),f}var m=b._getDomain,n=a("./util"),o=n.tryCatch;n.inherits(h,c),h.prototype._gotAccum=function(a){void 0!==this._eachValues&&null!==this._eachValues&&a!==f&&this._eachValues.push(a)},h.prototype._eachComplete=function(a){return null!==this._eachValues&&this._eachValues.push(a),this._eachValues},h.prototype._init=function(){},h.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},h.prototype.shouldCopyValues=function(){return!1},h.prototype._resolve=function(a){this._promise._resolveCallback(a),this._values=null},h.prototype._resultCancelled=function(a){return a===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof b&&this._currentCancellable.cancel(),this._initialValue instanceof b&&this._initialValue.cancel()))},h.prototype._iterate=function(a){this._values=a;var c,d,e=a.length;if(void 0!==this._initialValue?(c=this._initialValue,d=0):(c=b.resolve(a[0]),d=1),this._currentCancellable=c,!c.isRejected())for(;e>d;++d){var f={accum:null,value:a[d],index:d,length:e,array:this};c=c._then(k,void 0,void 0,f,void 0)}void 0!==this._eachValues&&(c=c._then(this._eachComplete,void 0,void 0,this,void 0)),c._then(i,i,void 0,c,this)},b.prototype.reduce=function(a,b){return j(this,a,b,null)},b.reduce=function(a,b,c,d){return j(a,b,c,d)}}},{"./util":36}],29:[function(a,b,c){"use strict";var d,e=a("./util"),f=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},g=e.getNativePromise();if(e.isNode&&"undefined"==typeof MutationObserver){var h=global.setImmediate,i=process.nextTick;d=e.isRecentNode?function(a){h.call(global,a)}:function(a){i.call(process,a)}}else if("function"==typeof g&&"function"==typeof g.resolve){var j=g.resolve();d=function(a){j.then(a)}}else d="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(a){setImmediate(a)}:"undefined"!=typeof setTimeout?function(a){setTimeout(a,0)}:f:function(){var a=document.createElement("div"),b={attributes:!0},c=!1,d=document.createElement("div"),e=new MutationObserver(function(){a.classList.toggle("foo"),c=!1});e.observe(d,b);var f=function(){c||(c=!0,d.classList.toggle("foo"))};return function(c){var d=new MutationObserver(function(){d.disconnect(),c()});d.observe(a,b),f()}}();b.exports=d},{"./util":36}],30:[function(a,b,c){"use strict";b.exports=function(b,c,d){function e(a){this.constructor$(a)}var f=b.PromiseInspection,g=a("./util");g.inherits(e,c),e.prototype._promiseResolved=function(a,b){this._values[a]=b;var c=++this._totalResolved;return c>=this._length&&(this._resolve(this._values),!0)},e.prototype._promiseFulfilled=function(a,b){var c=new f;return c._bitField=33554432,c._settledValueField=a,this._promiseResolved(b,c)},e.prototype._promiseRejected=function(a,b){var c=new f;return c._bitField=16777216,c._settledValueField=a,this._promiseResolved(b,c)},b.settle=function(a){return d.deprecated(".settle()",".reflect()"),new e(a).promise()},b.prototype.settle=function(){return b.settle(this)}}},{"./util":36}],31:[function(a,b,c){"use strict";b.exports=function(b,c,d){function e(a){this.constructor$(a),this._howMany=0,this._unwrap=!1,this._initialized=!1}function f(a,b){
|
||
if((0|b)!==b||0>b)return d("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var c=new e(a),f=c.promise();return c.setHowMany(b),c.init(),f}var g=a("./util"),h=a("./errors").RangeError,i=a("./errors").AggregateError,j=g.isArray,k={};g.inherits(e,c),e.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var a=j(this._values);!this._isResolved()&&a&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},e.prototype.init=function(){this._initialized=!0,this._init()},e.prototype.setUnwrap=function(){this._unwrap=!0},e.prototype.howMany=function(){return this._howMany},e.prototype.setHowMany=function(a){this._howMany=a},e.prototype._promiseFulfilled=function(a){return this._addFulfilled(a),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},e.prototype._promiseRejected=function(a){return this._addRejected(a),this._checkOutcome()},e.prototype._promiseCancelled=function(){return this._values instanceof b||null==this._values?this._cancel():(this._addRejected(k),this._checkOutcome())},e.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var a=new i,b=this.length();b<this._values.length;++b)this._values[b]!==k&&a.push(this._values[b]);return a.length>0?this._reject(a):this._cancel(),!0}return!1},e.prototype._fulfilled=function(){return this._totalResolved},e.prototype._rejected=function(){return this._values.length-this.length()},e.prototype._addRejected=function(a){this._values.push(a)},e.prototype._addFulfilled=function(a){this._values[this._totalResolved++]=a},e.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},e.prototype._getRangeError=function(a){var b="Input array must contain at least "+this._howMany+" items but contains only "+a+" items";return new h(b)},e.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},b.some=function(a,b){return f(a,b)},b.prototype.some=function(a){return f(this,a)},b._SomePromiseArray=e}},{"./errors":12,"./util":36}],32:[function(a,b,c){"use strict";b.exports=function(a){function b(a){void 0!==a?(a=a._target(),this._bitField=a._bitField,this._settledValueField=a._isFateSealed()?a._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}b.prototype._settledValue=function(){return this._settledValueField};var c=b.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},d=b.prototype.error=b.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},e=b.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},f=b.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},g=b.prototype.isPending=function(){return 0===(50397184&this._bitField)},h=b.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};b.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},a.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},a.prototype._isCancelled=function(){return this._target().__isCancelled()},a.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},a.prototype.isPending=function(){return g.call(this._target())},a.prototype.isRejected=function(){return f.call(this._target())},a.prototype.isFulfilled=function(){return e.call(this._target())},a.prototype.isResolved=function(){return h.call(this._target())},a.prototype.value=function(){return c.call(this._target())},a.prototype.reason=function(){var a=this._target();return a._unsetRejectionIsUnhandled(),d.call(a)},a.prototype._value=function(){return this._settledValue()},a.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},a.PromiseInspection=b}},{}],33:[function(a,b,c){"use strict";b.exports=function(b,c){function d(a,d){if(k(a)){if(a instanceof b)return a;var e=f(a);if(e===j){d&&d._pushContext();var i=b.reject(e.e);return d&&d._popContext(),i}if("function"==typeof e){if(g(a)){var i=new b(c);return a._then(i._fulfill,i._reject,void 0,i,null),i}return h(a,e,d)}}return a}function e(a){return a.then}function f(a){try{return e(a)}catch(b){return j.e=b,j}}function g(a){try{return l.call(a,"_promise0")}catch(b){return!1}}function h(a,d,e){function f(a){h&&(h._resolveCallback(a),h=null)}function g(a){h&&(h._rejectCallback(a,l,!0),h=null)}var h=new b(c),k=h;e&&e._pushContext(),h._captureStackTrace(),e&&e._popContext();var l=!0,m=i.tryCatch(d).call(a,f,g);return l=!1,h&&m===j&&(h._rejectCallback(m.e,!0,!0),h=null),k}var i=a("./util"),j=i.errorObj,k=i.isObject,l={}.hasOwnProperty;return d}},{"./util":36}],34:[function(a,b,c){"use strict";b.exports=function(b,c,d){function e(a){this.handle=a}function f(a){return clearTimeout(this.handle),a}function g(a){throw clearTimeout(this.handle),a}var h=a("./util"),i=b.TimeoutError;e.prototype._resultCancelled=function(){clearTimeout(this.handle)};var j=function(a){return k(+this).thenReturn(a)},k=b.delay=function(a,f){var g,h;return void 0!==f?(g=b.resolve(f)._then(j,null,null,a,void 0),d.cancellation()&&f instanceof b&&g._setOnCancel(f)):(g=new b(c),h=setTimeout(function(){g._fulfill()},+a),d.cancellation()&&g._setOnCancel(new e(h)),g._captureStackTrace()),g._setAsyncGuaranteed(),g};b.prototype.delay=function(a){return k(a,this)};var l=function(a,b,c){var d;d="string"!=typeof b?b instanceof Error?b:new i("operation timed out"):new i(b),h.markAsOriginatingFromRejection(d),a._attachExtraTrace(d),a._reject(d),null!=c&&c.cancel()};b.prototype.timeout=function(a,b){a=+a;var c,h,i=new e(setTimeout(function(){c.isPending()&&l(c,b,h)},a));return d.cancellation()?(h=this.then(),c=h._then(f,g,void 0,i,void 0),c._setOnCancel(i)):c=this._then(f,g,void 0,i,void 0),c}}},{"./util":36}],35:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f,g){function h(a){setTimeout(function(){throw a},0)}function i(a){var b=d(a);return b!==a&&"function"==typeof a._isDisposable&&"function"==typeof a._getDisposer&&a._isDisposable()&&b._setDisposable(a._getDisposer()),b}function j(a,c){function e(){if(g>=j)return k._fulfill();var f=i(a[g++]);if(f instanceof b&&f._isDisposable()){try{f=d(f._getDisposer().tryDispose(c),a.promise)}catch(l){return h(l)}if(f instanceof b)return f._then(e,h,null,null,null)}e()}var g=0,j=a.length,k=new b(f);return e(),k}function k(a,b,c){this._data=a,this._promise=b,this._context=c}function l(a,b,c){this.constructor$(a,b,c)}function m(a){return k.isDisposer(a)?(this.resources[this.index]._setDisposable(a),a.promise()):a}function n(a){this.length=a,this.promise=null,this[a-1]=null}var o=a("./util"),p=a("./errors").TypeError,q=a("./util").inherits,r=o.errorObj,s=o.tryCatch,t={};k.prototype.data=function(){return this._data},k.prototype.promise=function(){return this._promise},k.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():t},k.prototype.tryDispose=function(a){var b=this.resource(),c=this._context;void 0!==c&&c._pushContext();var d=b!==t?this.doDispose(b,a):null;return void 0!==c&&c._popContext(),this._promise._unsetDisposable(),this._data=null,d},k.isDisposer=function(a){return null!=a&&"function"==typeof a.resource&&"function"==typeof a.tryDispose},q(l,k),l.prototype.doDispose=function(a,b){var c=this.data();return c.call(a,a,b)},n.prototype._resultCancelled=function(){for(var a=this.length,c=0;a>c;++c){var d=this[c];d instanceof b&&d.cancel()}},b.using=function(){var a=arguments.length;if(2>a)return c("you must pass at least 2 arguments to Promise.using");var e=arguments[a-1];if("function"!=typeof e)return c("expecting a function but got "+o.classString(e));var f,h=!0;2===a&&Array.isArray(arguments[0])?(f=arguments[0],a=f.length,h=!1):(f=arguments,a--);for(var i=new n(a),l=0;a>l;++l){var p=f[l];if(k.isDisposer(p)){var q=p;p=p.promise(),p._setDisposable(q)}else{var t=d(p);t instanceof b&&(p=t._then(m,null,null,{resources:i,index:l},void 0))}i[l]=p}for(var u=new Array(i.length),l=0;l<u.length;++l)u[l]=b.resolve(i[l]).reflect();var v=b.all(u).then(function(a){for(var b=0;b<a.length;++b){var c=a[b];if(c.isRejected())return r.e=c.error(),r;if(!c.isFulfilled())return void v.cancel();a[b]=c.value()}w._pushContext(),e=s(e);var d=h?e.apply(void 0,a):e(a),f=w._popContext();return g.checkForgottenReturns(d,f,"Promise.using",w),d}),w=v.lastly(function(){var a=new b.PromiseInspection(v);return j(i,a)});return i.promise=w,w._setOnCancel(i),w},b.prototype._setDisposable=function(a){this._bitField=131072|this._bitField,this._disposer=a},b.prototype._isDisposable=function(){return(131072&this._bitField)>0},b.prototype._getDisposer=function(){return this._disposer},b.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},b.prototype.disposer=function(a){if("function"==typeof a)return new l(a,this,e());throw new p}}},{"./errors":12,"./util":36}],36:[function(a,b,c){"use strict";function d(){try{var a=A;return A=null,a.apply(this,arguments)}catch(b){return D.e=b,D}}function e(a){return A=a,d}function f(a){return null==a||a===!0||a===!1||"string"==typeof a||"number"==typeof a}function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return f(a)?new Error(q(a)):a}function i(a,b){var c,d=a.length,e=new Array(d+1);for(c=0;d>c;++c)e[c]=a[c];return e[c]=b,e}function j(a,b,c){if(!B.isES5)return{}.hasOwnProperty.call(a,b)?a[b]:void 0;var d=Object.getOwnPropertyDescriptor(a,b);return null!=d?null==d.get&&null==d.set?d.value:c:void 0}function k(a,b,c){if(f(a))return a;var d={value:c,configurable:!0,enumerable:!1,writable:!0};return B.defineProperty(a,b,d),a}function l(a){throw a}function m(a){try{if("function"==typeof a){var b=B.names(a.prototype),c=B.isES5&&b.length>1,d=b.length>0&&!(1===b.length&&"constructor"===b[0]),e=H.test(a+"")&&B.names(a).length>0;if(c||d||e)return!0}return!1}catch(f){return!1}}function n(a){function b(){}b.prototype=a;for(var c=8;c--;)new b;return a}function o(a){return I.test(a)}function p(a,b,c){for(var d=new Array(a),e=0;a>e;++e)d[e]=b+e+c;return d}function q(a){try{return a+""}catch(b){return"[no string representation]"}}function r(a){return null!==a&&"object"==typeof a&&"string"==typeof a.message&&"string"==typeof a.name}function s(a){try{k(a,"isOperational",!0)}catch(b){}}function t(a){return null!=a&&(a instanceof Error.__BluebirdErrorTypes__.OperationalError||a.isOperational===!0)}function u(a){return r(a)&&B.propertyIsWritable(a,"stack")}function v(a){return{}.toString.call(a)}function w(a,b,c){for(var d=B.names(a),e=0;e<d.length;++e){var f=d[e];if(c(f))try{B.defineProperty(b,f,B.getDescriptor(a,f))}catch(g){}}}function x(a,b){return M?process.env[a]:b}function y(){if("function"==typeof Promise)try{var a=new Promise(function(){});if("[object Promise]"==={}.toString.call(a))return Promise}catch(b){}}function z(a,b){return a.bind(b)}var A,B=a("./es5"),C="undefined"==typeof navigator,D={e:{}},E="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,F=function(a,b){function c(){this.constructor=a,this.constructor$=b;for(var c in b.prototype)d.call(b.prototype,c)&&"$"!==c.charAt(c.length-1)&&(this[c+"$"]=b.prototype[c])}var d={}.hasOwnProperty;return c.prototype=b.prototype,a.prototype=new c,a.prototype},G=function(){var a=[Array.prototype,Object.prototype,Function.prototype],b=function(b){for(var c=0;c<a.length;++c)if(a[c]===b)return!0;return!1};if(B.isES5){var c=Object.getOwnPropertyNames;return function(a){for(var d=[],e=Object.create(null);null!=a&&!b(a);){var f;try{f=c(a)}catch(g){return d}for(var h=0;h<f.length;++h){var i=f[h];if(!e[i]){e[i]=!0;var j=Object.getOwnPropertyDescriptor(a,i);null!=j&&null==j.get&&null==j.set&&d.push(i)}}a=B.getPrototypeOf(a)}return d}}var d={}.hasOwnProperty;return function(c){if(b(c))return[];var e=[];a:for(var f in c)if(d.call(c,f))e.push(f);else{for(var g=0;g<a.length;++g)if(d.call(a[g],f))continue a;e.push(f)}return e}}(),H=/this\s*\.\s*\S+\s*=/,I=/^[a-z$_][a-z$_0-9]*$/i,J=function(){return"stack"in new Error?function(a){return u(a)?a:new Error(q(a))}:function(a){if(u(a))return a;try{throw new Error(q(a))}catch(b){return b}}}(),K=function(a){return B.isArray(a)?a:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var L="function"==typeof Array.from?function(a){return Array.from(a)}:function(a){for(var b,c=[],d=a[Symbol.iterator]();!(b=d.next()).done;)c.push(b.value);return c};K=function(a){return B.isArray(a)?a:null!=a&&"function"==typeof a[Symbol.iterator]?L(a):null}}var M="undefined"!=typeof process&&"[object process]"===v(process).toLowerCase(),N={isClass:m,isIdentifier:o,inheritedDataKeys:G,getDataPropertyOrDefault:j,thrower:l,isArray:B.isArray,asArray:K,notEnumerableProp:k,isPrimitive:f,isObject:g,isError:r,canEvaluate:C,errorObj:D,tryCatch:e,inherits:F,withAppended:i,maybeWrapAsError:h,toFastProperties:n,filledRange:p,toString:q,canAttachTrace:u,ensureErrorObject:J,originatesFromRejection:t,markAsOriginatingFromRejection:s,classString:v,copyDescriptors:w,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:M,env:x,global:E,getNativePromise:y,domainBind:z};N.isRecentNode=N.isNode&&function(){var a=process.versions.node.split(".").map(Number);return 0===a[0]&&a[1]>10||a[0]>0}(),N.isNode&&N.toFastProperties(process);try{throw new Error}catch(O){N.lastLineError=O}b.exports=N},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise),/**
|
||
* Timeago is a jQuery plugin that makes it easy to support automatically
|
||
* updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
|
||
*
|
||
* @name timeago
|
||
* @version 1.4.3
|
||
* @requires jQuery v1.2.3+
|
||
* @author Ryan McGeary
|
||
* @license MIT License - http://www.opensource.org/licenses/mit-license.php
|
||
*
|
||
* For usage and examples, visit:
|
||
* http://timeago.yarp.com/
|
||
*
|
||
* Copyright (c) 2008-2015, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
|
||
*/
|
||
function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof module&&"object"==typeof module.exports?require("jquery"):jQuery)}(function(a){function b(){if(!a.contains(document.documentElement,this))return a(this).timeago("dispose"),this;var b=c(this),g=f.settings;return isNaN(b.datetime)||(0==g.cutoff||Math.abs(e(b.datetime))<g.cutoff)&&a(this).text(d(b.datetime)),this}function c(b){if(b=a(b),!b.data("timeago")){b.data("timeago",{datetime:f.datetime(b)});var c=a.trim(b.text());f.settings.localeTitle?b.attr("title",b.data("timeago").datetime.toLocaleString()):!(c.length>0)||f.isTime(b)&&b.attr("title")||b.attr("title",c)}return b.data("timeago")}function d(a){return f.inWords(e(a))}function e(a){return(new Date).getTime()-a.getTime()}a.timeago=function(b){return d(b instanceof Date?b:"string"==typeof b?a.timeago.parse(b):"number"==typeof b?new Date(b):a.timeago.datetime(b))};var f=a.timeago;a.extend(a.timeago,{settings:{refreshMillis:6e4,allowPast:!0,allowFuture:!1,localeTitle:!1,cutoff:0,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",inPast:"any moment now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" ",numbers:[]}},inWords:function(b){function c(c,e){var f=a.isFunction(c)?c(e,b):c,g=d.numbers&&d.numbers[e]||e;return f.replace(/%d/i,g)}if(!this.settings.allowPast&&!this.settings.allowFuture)throw"timeago allowPast and allowFuture settings can not both be set to false.";var d=this.settings.strings,e=d.prefixAgo,f=d.suffixAgo;if(this.settings.allowFuture&&b<0&&(e=d.prefixFromNow,f=d.suffixFromNow),!this.settings.allowPast&&b>=0)return this.settings.strings.inPast;var g=Math.abs(b)/1e3,h=g/60,i=h/60,j=i/24,k=j/365,l=g<45&&c(d.seconds,Math.round(g))||g<90&&c(d.minute,1)||h<45&&c(d.minutes,Math.round(h))||h<90&&c(d.hour,1)||i<24&&c(d.hours,Math.round(i))||i<42&&c(d.day,1)||j<30&&c(d.days,Math.round(j))||j<45&&c(d.month,1)||j<365&&c(d.months,Math.round(j/30))||k<1.5&&c(d.year,1)||c(d.years,Math.round(k)),m=d.wordSeparator||"";return void 0===d.wordSeparator&&(m=" "),a.trim([e,l,f].join(m))},parse:function(b){var c=a.trim(b);return c=c.replace(/\.\d+/,""),c=c.replace(/-/,"/").replace(/-/,"/"),c=c.replace(/T/," ").replace(/Z/," UTC"),c=c.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),c=c.replace(/([\+\-]\d\d)$/," $100"),new Date(c)},datetime:function(b){var c=f.isTime(b)?a(b).attr("datetime"):a(b).attr("title");return f.parse(c)},isTime:function(b){return"time"===a(b).get(0).tagName.toLowerCase()}});var g={init:function(){var c=a.proxy(b,this);c();var d=f.settings;d.refreshMillis>0&&(this._timeagoInterval=setInterval(c,d.refreshMillis))},update:function(c){var d=f.parse(c);a(this).data("timeago",{datetime:d}),f.settings.localeTitle&&a(this).attr("title",d.toLocaleString()),b.apply(this)},updateFromDOM:function(){a(this).data("timeago",{datetime:f.parse(f.isTime(this)?a(this).attr("datetime"):a(this).attr("title"))}),b.apply(this)},dispose:function(){this._timeagoInterval&&(window.clearInterval(this._timeagoInterval),this._timeagoInterval=null)}};a.fn.timeago=function(a,b){var c=a?g[a]:g.init;if(!c)throw new Error("Unknown function name '"+a+"' for timeago");return this.each(function(){c.call(this,b)}),this},document.createElement("abbr"),document.createElement("time")}),jQuery.timeago.settings.strings={prefixAgo:"vor",prefixFromNow:"in",suffixAgo:"",suffixFromNow:"",seconds:"wenigen Sekunden",minute:"etwa einer Minute",minutes:"%d Minuten",hour:"etwa einer Stunde",hours:"%d Stunden",day:"etwa einem Tag",days:"%d Tagen",month:"etwa einem Monat",months:"%d Monaten",year:"etwa einem Jahr",years:"%d Jahren"},/*! jQuery UI - v1.11.4 - 2015-03-13
|
||
* http://jqueryui.com
|
||
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
||
function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){var b=0,c=Array.prototype.slice;return a.cleanData=function(b){return function(c){var d,e,f;for(f=0;null!=(e=c[f]);f++)try{d=a._data(e,"events"),d&&d.remove&&a(e).triggerHandler("remove")}catch(g){}b(c)}}(a.cleanData),a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];return b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var b,c=this._super,f=this._superApply;return this._super=a,this._superApply=e,b=d.apply(this,arguments),this._super=c,this._superApply=f,b}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix||b:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g),g},a.widget.extend=function(b){for(var d,e,f=c.call(arguments,1),g=0,h=f.length;h>g;g++)for(d in f[g])e=f[g][d],f[g].hasOwnProperty(d)&&void 0!==e&&(b[d]=a.isPlainObject(e)?a.isPlainObject(b[d])?a.widget.extend({},b[d],e):a.widget.extend({},e):e);return b},a.widget.bridge=function(b,d){var e=d.prototype.widgetFullName||b;a.fn[b]=function(f){var g="string"==typeof f,h=c.call(arguments,1),i=this;return g?this.each(function(){var c,d=a.data(this,e);return"instance"===f?(i=d,!1):d?a.isFunction(d[f])&&"_"!==f.charAt(0)?(c=d[f].apply(d,h),c!==d&&void 0!==c?(i=c&&c.jquery?i.pushStack(c.get()):c,!1):void 0):a.error("no such method '"+f+"' for "+b+" widget instance"):a.error("cannot call methods on "+b+" prior to initialization; attempted to call method '"+f+"'")}):(h.length&&(f=a.widget.extend.apply(null,[f].concat(h))),this.each(function(){var b=a.data(this,e);b?(b.option(f||{}),b._init&&b._init()):a.data(this,e,new d(f,this))})),i}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(c,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=b++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this.options=a.widget.extend({},this.options,this._getCreateOptions(),c),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(a.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:a.noop,widget:function(){return this.element},option:function(b,c){var d,e,f,g=b;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof b)if(g={},d=b.split("."),b=d.shift(),d.length){for(e=g[b]=a.widget.extend({},this.options[b]),f=0;d.length-1>f;f++)e[d[f]]=e[d[f]]||{},e=e[d[f]];if(b=d.pop(),1===arguments.length)return void 0===e[b]?null:e[b];e[b]=c}else{if(1===arguments.length)return void 0===this.options[b]?null:this.options[b];g[b]=c}return this._setOptions(g),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!b),b&&(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(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){return b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled")?("string"==typeof g?f[g]:g).apply(f,arguments):void 0}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^([\w:-]*)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.delegate(k,j,h):c.bind(j,h)})},_off:function(b,c){c=(c||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,b.unbind(c).undelegate(c),this.bindings=a(this.bindings.not(b).get()),this.focusable=a(this.focusable.not(b).get()),this.hoverable=a(this.hoverable.not(b).get())},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}}),a.widget}),/*!
|
||
* jQuery Color Animations v@VERSION
|
||
* https://github.com/jquery/jquery-color
|
||
*
|
||
* Copyright 2013 jQuery Foundation and other contributors
|
||
* Released under the MIT license.
|
||
* http://jquery.org/license
|
||
*
|
||
* Date: @DATE
|
||
*/
|
||
function(a,b){function c(a,b,c){var d=l[b.type]||{};return null==a?c||!b.def?null:b.def:(a=d.floor?~~a:parseFloat(a),isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max<a?d.max:a)}function d(b){var c=j(),d=c._rgba=[];return b=b.toLowerCase(),o(i,function(a,e){var f,g=e.re.exec(b),h=g&&e.parse(g),i=e.space||"rgba";if(h)return f=c[i](h),c[k[i].cache]=f[k[i].cache],d=c._rgba=f._rgba,!1}),d.length?("0,0,0,0"===d.join()&&a.extend(d,f.transparent),c):f[b]}function e(a,b,c){return c=(c+1)%1,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(2/3-c)*6:a}var f,g="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",h=/^([\-+])=\s*(\d+\.?\d*)/,i=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],j=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},k={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},l={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},m=j.support={},n=a("<p>")[0],o=a.each;n.style.cssText="background-color:rgba(1,1,1,.5)",m.rgba=n.style.backgroundColor.indexOf("rgba")>-1,o(k,function(a,b){b.cache="_"+a,b.props.alpha={idx:3,type:"percent",def:1}}),j.fn=a.extend(j.prototype,{parse:function(e,g,h,i){if(e===b)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=a(e).css(g),g=b);var l=this,m=a.type(e),n=this._rgba=[];return g!==b&&(e=[e,g,h,i],m="array"),"string"===m?this.parse(d(e)||f._default):"array"===m?(o(k.rgba.props,function(a,b){n[b.idx]=c(e[b.idx],b)}),this):"object"===m?(e instanceof j?o(k,function(a,b){e[b.cache]&&(l[b.cache]=e[b.cache].slice())}):o(k,function(b,d){var f=d.cache;o(d.props,function(a,b){if(!l[f]&&d.to){if("alpha"===a||null==e[a])return;l[f]=d.to(l._rgba)}l[f][b.idx]=c(e[a],b,!0)}),l[f]&&a.inArray(null,l[f].slice(0,3))<0&&(l[f][3]=1,d.from&&(l._rgba=d.from(l[f])))}),this):void 0},is:function(a){var b=j(a),c=!0,d=this;return o(k,function(a,e){var f,g=b[e.cache];return g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],o(e.props,function(a,b){if(null!=g[b.idx])return c=g[b.idx]===f[b.idx]})),c}),c},_space:function(){var a=[],b=this;return o(k,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var d=j(a),e=d._space(),f=k[e],g=0===this.alpha()?j("transparent"):this,h=g[f.cache]||f.to(g._rgba),i=h.slice();return d=d[f.cache],o(f.props,function(a,e){var f=e.idx,g=h[f],j=d[f],k=l[e.type]||{};null!==j&&(null===g?i[f]=j:(k.mod&&(j-g>k.mod/2?g+=k.mod:g-j>k.mod/2&&(g-=k.mod)),i[f]=c((j-g)*b+g,e)))}),this[e](i)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=j(b)._rgba;return j(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return null==a?b>2?1:0:a});return 1===c[3]&&(c.pop(),b="rgb("),b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){return null==a&&(a=b>2?1:0),b&&b<3&&(a=Math.round(100*a)+"%"),a});return 1===c[3]&&(c.pop(),b="hsl("),b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();return b&&c.push(~~(255*d)),"#"+a.map(c,function(a){return a=(a||0).toString(16),1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),j.fn.parse.prototype=j.fn,k.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b,c,d=a[0]/255,e=a[1]/255,f=a[2]/255,g=a[3],h=Math.max(d,e,f),i=Math.min(d,e,f),j=h-i,k=h+i,l=.5*k;return b=i===h?0:d===h?60*(e-f)/j+360:e===h?60*(f-d)/j+120:60*(d-e)/j+240,c=0===j?0:l<=.5?j/k:j/(2-k),[Math.round(b)%360,c,l,null==g?1:g]},k.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],f=a[3],g=d<=.5?d*(1+c):d+c-d*c,h=2*d-g;return[Math.round(255*e(h,g,b+1/3)),Math.round(255*e(h,g,b)),Math.round(255*e(h,g,b-1/3)),f]},o(k,function(d,e){var f=e.props,g=e.cache,i=e.to,k=e.from;j.fn[d]=function(d){if(i&&!this[g]&&(this[g]=i(this._rgba)),d===b)return this[g].slice();var e,h=a.type(d),l="array"===h||"object"===h?d:arguments,m=this[g].slice();return o(f,function(a,b){var d=l["object"===h?a:b.idx];null==d&&(d=m[b.idx]),m[b.idx]=c(d,b)}),k?(e=j(k(m)),e[g]=m,e):j(m)},o(f,function(b,c){j.fn[b]||(j.fn[b]=function(e){var f,g=a.type(e),i="alpha"===b?this._hsla?"hsla":"rgba":d,j=this[i](),k=j[c.idx];return"undefined"===g?k:("function"===g&&(e=e.call(this,k),g=a.type(e)),null==e&&c.empty?this:("string"===g&&(f=h.exec(e),f&&(e=k+parseFloat(f[2])*("+"===f[1]?1:-1))),j[c.idx]=e,this[i](j)))})})}),j.hook=function(b){var c=b.split(" ");o(c,function(b,c){a.cssHooks[c]={set:function(b,e){var f,g,h="";if("transparent"!==e&&("string"!==a.type(e)||(f=d(e)))){if(e=j(f||e),!m.rgba&&1!==e._rgba[3]){for(g="backgroundColor"===c?b.parentNode:b;(""===h||"transparent"===h)&&g&&g.style;)try{h=a.css(g,"backgroundColor"),g=g.parentNode}catch(i){}e=e.blend(h&&"transparent"!==h?h:"_default")}e=e.toRgbaString()}try{b.style[c]=e}catch(i){}}},a.fx.step[c]=function(b){b.colorInit||(b.start=j(b.elem,c),b.end=j(b.end),b.colorInit=!0),a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})},j.hook(g),a.cssHooks.borderColor={expand:function(a){var b={};return o(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a}),b}},f=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(a){function b(b){var c={},d=/^jQuery\d+$/;return a.each(b.attributes,function(a,b){b.specified&&!d.test(b.name)&&(c[b.name]=b.value)}),c}function c(b,c){var d=this,f=a(this);if(d.value===f.attr(h?"placeholder-x":"placeholder")&&f.hasClass(n.customClass))if(d.value="",f.removeClass(n.customClass),f.data("placeholder-password")){if(f=f.hide().nextAll('input[type="password"]:first').show().attr("id",f.removeAttr("id").data("placeholder-id")),b===!0)return f[0].value=c,c;f.focus()}else d==e()&&d.select()}function d(d){var e,f=this,g=a(this),i=f.id;if(!d||"blur"!==d.type||!g.hasClass(n.customClass))if(""===f.value){if("password"===f.type){if(!g.data("placeholder-textinput")){try{e=g.clone().prop({type:"text"})}catch(j){e=a("<input>").attr(a.extend(b(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-enabled":!0,"placeholder-password":g,"placeholder-id":i}).bind("focus.placeholder",c),g.data({"placeholder-textinput":e,"placeholder-id":i}).before(e)}f.value="",g=g.removeAttr("id").hide().prevAll('input[type="text"]:first').attr("id",g.data("placeholder-id")).show()}else{var k=g.data("placeholder-password");k&&(k[0].value="",g.attr("id",g.data("placeholder-id")).show().nextAll('input[type="password"]:last').hide().removeAttr("id"))}g.addClass(n.customClass),g[0].value=g.attr(h?"placeholder-x":"placeholder")}else g.removeClass(n.customClass)}function e(){try{return document.activeElement}catch(a){}}var f,g,h=!1,i="[object OperaMini]"===Object.prototype.toString.call(window.operamini),j="placeholder"in document.createElement("input")&&!i&&!h,k="placeholder"in document.createElement("textarea")&&!i&&!h,l=a.valHooks,m=a.propHooks,n={};j&&k?(g=a.fn.placeholder=function(){return this},g.input=!0,g.textarea=!0):(g=a.fn.placeholder=function(b){var e={customClass:"placeholder"};return n=a.extend({},e,b),this.filter((j?"textarea":":input")+"["+(h?"placeholder-x":"placeholder")+"]").not("."+n.customClass).not(":radio, :checkbox, [type=hidden]").bind({"focus.placeholder":c,"blur.placeholder":d}).data("placeholder-enabled",!0).trigger("blur.placeholder")},g.input=j,g.textarea=k,f={get:function(b){var c=a(b),d=c.data("placeholder-password");return d?d[0].value:c.data("placeholder-enabled")&&c.hasClass(n.customClass)?"":b.value},set:function(b,f){var g,h,i=a(b);return""!==f&&(g=i.data("placeholder-textinput"),h=i.data("placeholder-password"),g?(c.call(g[0],!0,f)||(b.value=f),g[0].value=f):h&&(c.call(b,!0,f)||(h[0].value=f),b.value=f)),i.data("placeholder-enabled")?(""===f?(b.value=f,b!=e()&&d.call(b)):(i.hasClass(n.customClass)&&c.call(b),b.value=f),i):(b.value=f,i)}},j||(l.input=f,m.value=f),k||(l.textarea=f,m.value=f),a(function(){a(document).delegate("form","submit.placeholder",function(){var b=a("."+n.customClass,this).each(function(){c.call(this,!0,"")});setTimeout(function(){b.each(d)},10)})}),a(window).bind("beforeunload.placeholder",function(){var b=!0;try{"javascript:void(0)"===document.activeElement.toString()&&(b=!1)}catch(c){}b&&a("."+n.customClass).each(function(){this.value=""})}))}),function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery.ui.widget"],a):"object"==typeof exports?a(require("jquery"),require("./vendor/jquery.ui.widget")):a(window.jQuery)}(function(a){"use strict";function b(b){var c="dragover"===b;return function(d){d.dataTransfer=d.originalEvent&&d.originalEvent.dataTransfer;var e=d.dataTransfer;e&&a.inArray("Files",e.types)!==-1&&this._trigger(b,a.Event(b,{delegatedEvent:d}))!==!1&&(d.preventDefault(),c&&(e.dropEffect="copy"))}}a.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||a('<input type="file">').prop("disabled")),a.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),a.support.xhrFormDataFileUpload=!!window.FormData,a.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),a.widget("blueimp.fileupload",{options:{dropZone:a(document),pasteZone:void 0,fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,limitMultiFileUploadSize:void 0,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(b,c){return b=this.messages[b]||b.toString(),c&&a.each(c,function(a,c){b=b.replace("{"+a+"}",c)}),b},formData:function(a){return a.serializeArray()},add:function(b,c){return!b.isDefaultPrevented()&&void((c.autoUpload||c.autoUpload!==!1&&a(this).fileupload("option","autoUpload"))&&c.process().done(function(){c.submit()}))},processData:!1,contentType:!1,cache:!1,timeout:0},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:a.support.blobSlice&&function(){var a=this.slice||this.webkitSlice||this.mozSlice;return a.apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(a,b,c){var d=a-this.timestamp;return(!this.bitrate||!c||d>c)&&(this.bitrate=(b-this.loaded)*(1e3/d)*8,this.loaded=b,this.timestamp=a),this.bitrate}},_isXHRUpload:function(b){return!b.forceIframeTransport&&(!b.multipart&&a.support.xhrFileUpload||a.support.xhrFormDataFileUpload)},_getFormData:function(b){var c;return"function"===a.type(b.formData)?b.formData(b.form):a.isArray(b.formData)?b.formData:"object"===a.type(b.formData)?(c=[],a.each(b.formData,function(a,b){c.push({name:a,value:b})}),c):[]},_getTotal:function(b){var c=0;return a.each(b,function(a,b){c+=b.size||1}),c},_initProgressObject:function(b){var c={loaded:0,total:0,bitrate:0};b._progress?a.extend(b._progress,c):b._progress=c},_initResponseObject:function(a){var b;if(a._response)for(b in a._response)a._response.hasOwnProperty(b)&&delete a._response[b];else a._response={}},_onProgress:function(b,c){if(b.lengthComputable){var d,e=Date.now?Date.now():(new Date).getTime();if(c._time&&c.progressInterval&&e-c._time<c.progressInterval&&b.loaded!==b.total)return;c._time=e,d=Math.floor(b.loaded/b.total*(c.chunkSize||c._progress.total))+(c.uploadedBytes||0),this._progress.loaded+=d-c._progress.loaded,this._progress.bitrate=this._bitrateTimer.getBitrate(e,this._progress.loaded,c.bitrateInterval),c._progress.loaded=c.loaded=d,c._progress.bitrate=c.bitrate=c._bitrateTimer.getBitrate(e,d,c.bitrateInterval),this._trigger("progress",a.Event("progress",{delegatedEvent:b}),c),this._trigger("progressall",a.Event("progressall",{delegatedEvent:b}),this._progress)}},_initProgressListener:function(b){var c=this,d=b.xhr?b.xhr():a.ajaxSettings.xhr();d.upload&&(a(d.upload).bind("progress",function(a){var d=a.originalEvent;a.lengthComputable=d.lengthComputable,a.loaded=d.loaded,a.total=d.total,c._onProgress(a,b)}),b.xhr=function(){return d})},_isInstanceOf:function(a,b){return Object.prototype.toString.call(b)==="[object "+a+"]"},_initXHRData:function(b){var c,d=this,e=b.files[0],f=b.multipart||!a.support.xhrFileUpload,g="array"===a.type(b.paramName)?b.paramName[0]:b.paramName;b.headers=a.extend({},b.headers),b.contentRange&&(b.headers["Content-Range"]=b.contentRange),f&&!b.blob&&this._isInstanceOf("File",e)||(b.headers["Content-Disposition"]='attachment; filename="'+encodeURI(e.name)+'"'),f?a.support.xhrFormDataFileUpload&&(b.postMessage?(c=this._getFormData(b),b.blob?c.push({name:g,value:b.blob}):a.each(b.files,function(d,e){c.push({name:"array"===a.type(b.paramName)&&b.paramName[d]||g,value:e})})):(d._isInstanceOf("FormData",b.formData)?c=b.formData:(c=new FormData,a.each(this._getFormData(b),function(a,b){c.append(b.name,b.value)})),b.blob?c.append(g,b.blob,e.name):a.each(b.files,function(e,f){(d._isInstanceOf("File",f)||d._isInstanceOf("Blob",f))&&c.append("array"===a.type(b.paramName)&&b.paramName[e]||g,f,f.uploadName||f.name)})),b.data=c):(b.contentType=e.type||"application/octet-stream",b.data=b.blob||e),b.blob=null},_initIframeSettings:function(b){var c=a("<a></a>").prop("href",b.url).prop("host");b.dataType="iframe "+(b.dataType||""),b.formData=this._getFormData(b),b.redirect&&c&&c!==location.host&&b.formData.push({name:b.redirectParamName||"redirect",value:b.redirect})},_initDataSettings:function(a){this._isXHRUpload(a)?(this._chunkedUpload(a,!0)||(a.data||this._initXHRData(a),this._initProgressListener(a)),a.postMessage&&(a.dataType="postmessage "+(a.dataType||""))):this._initIframeSettings(a)},_getParamName:function(b){var c=a(b.fileInput),d=b.paramName;return d?a.isArray(d)||(d=[d]):(d=[],c.each(function(){for(var b=a(this),c=b.prop("name")||"files[]",e=(b.prop("files")||[1]).length;e;)d.push(c),e-=1}),d.length||(d=[c.prop("name")||"files[]"])),d},_initFormSettings:function(b){b.form&&b.form.length||(b.form=a(b.fileInput.prop("form")),b.form.length||(b.form=a(this.options.fileInput.prop("form")))),b.paramName=this._getParamName(b),b.url||(b.url=b.form.prop("action")||location.href),b.type=(b.type||"string"===a.type(b.form.prop("method"))&&b.form.prop("method")||"").toUpperCase(),"POST"!==b.type&&"PUT"!==b.type&&"PATCH"!==b.type&&(b.type="POST"),b.formAcceptCharset||(b.formAcceptCharset=b.form.attr("accept-charset"))},_getAJAXSettings:function(b){var c=a.extend({},this.options,b);return this._initFormSettings(c),this._initDataSettings(c),c},_getDeferredState:function(a){return a.state?a.state():a.isResolved()?"resolved":a.isRejected()?"rejected":"pending"},_enhancePromise:function(a){return a.success=a.done,a.error=a.fail,a.complete=a.always,a},_getXHRPromise:function(b,c,d){var e=a.Deferred(),f=e.promise();return c=c||this.options.context||f,b===!0?e.resolveWith(c,d):b===!1&&e.rejectWith(c,d),f.abort=e.promise,this._enhancePromise(f)},_addConvenienceMethods:function(b,c){var d=this,e=function(b){return a.Deferred().resolveWith(d,b).promise()};c.process=function(b,f){return(b||f)&&(c._processQueue=this._processQueue=(this._processQueue||e([this])).pipe(function(){return c.errorThrown?a.Deferred().rejectWith(d,[c]).promise():e(arguments)}).pipe(b,f)),this._processQueue||e([this])},c.submit=function(){return"pending"!==this.state()&&(c.jqXHR=this.jqXHR=d._trigger("submit",a.Event("submit",{delegatedEvent:b}),this)!==!1&&d._onSend(b,this)),this.jqXHR||d._getXHRPromise()},c.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",d._trigger("fail",null,this),d._getXHRPromise(!1))},c.state=function(){return this.jqXHR?d._getDeferredState(this.jqXHR):this._processQueue?d._getDeferredState(this._processQueue):void 0},c.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===d._getDeferredState(this._processQueue)},c.progress=function(){return this._progress},c.response=function(){return this._response}},_getUploadedBytes:function(a){var b=a.getResponseHeader("Range"),c=b&&b.split("-"),d=c&&c.length>1&&parseInt(c[1],10);return d&&d+1},_chunkedUpload:function(b,c){b.uploadedBytes=b.uploadedBytes||0;var d,e,f=this,g=b.files[0],h=g.size,i=b.uploadedBytes,j=b.maxChunkSize||h,k=this._blobSlice,l=a.Deferred(),m=l.promise();return!(!(this._isXHRUpload(b)&&k&&(i||j<h))||b.data)&&(!!c||(i>=h?(g.error=b.i18n("uploadedBytes"),this._getXHRPromise(!1,b.context,[null,"error",g.error])):(e=function(){var c=a.extend({},b),m=c._progress.loaded;c.blob=k.call(g,i,i+j,g.type),c.chunkSize=c.blob.size,c.contentRange="bytes "+i+"-"+(i+c.chunkSize-1)+"/"+h,f._initXHRData(c),f._initProgressListener(c),d=(f._trigger("chunksend",null,c)!==!1&&a.ajax(c)||f._getXHRPromise(!1,c.context)).done(function(d,g,j){i=f._getUploadedBytes(j)||i+c.chunkSize,m+c.chunkSize-c._progress.loaded&&f._onProgress(a.Event("progress",{lengthComputable:!0,loaded:i-c.uploadedBytes,total:i-c.uploadedBytes}),c),b.uploadedBytes=c.uploadedBytes=i,c.result=d,c.textStatus=g,c.jqXHR=j,f._trigger("chunkdone",null,c),f._trigger("chunkalways",null,c),i<h?e():l.resolveWith(c.context,[d,g,j])}).fail(function(a,b,d){c.jqXHR=a,c.textStatus=b,c.errorThrown=d,f._trigger("chunkfail",null,c),f._trigger("chunkalways",null,c),l.rejectWith(c.context,[a,b,d])})},this._enhancePromise(m),m.abort=function(){return d.abort()},e(),m)))},_beforeSend:function(a,b){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(b),this._initProgressObject(b),b._progress.loaded=b.loaded=b.uploadedBytes||0,b._progress.total=b.total=this._getTotal(b.files)||1,b._progress.bitrate=b.bitrate=0,this._active+=1,this._progress.loaded+=b.loaded,this._progress.total+=b.total},_onDone:function(b,c,d,e){var f=e._progress.total,g=e._response;e._progress.loaded<f&&this._onProgress(a.Event("progress",{lengthComputable:!0,loaded:f,total:f}),e),g.result=e.result=b,g.textStatus=e.textStatus=c,g.jqXHR=e.jqXHR=d,this._trigger("done",null,e)},_onFail:function(a,b,c,d){var e=d._response;d.recalculateProgress&&(this._progress.loaded-=d._progress.loaded,this._progress.total-=d._progress.total),e.jqXHR=d.jqXHR=a,e.textStatus=d.textStatus=b,e.errorThrown=d.errorThrown=c,this._trigger("fail",null,d)},_onAlways:function(a,b,c,d){this._trigger("always",null,d)},_onSend:function(b,c){c.submit||this._addConvenienceMethods(b,c);var d,e,f,g,h=this,i=h._getAJAXSettings(c),j=function(){return h._sending+=1,i._bitrateTimer=new h._BitrateTimer,d=d||((e||h._trigger("send",a.Event("send",{delegatedEvent:b}),i)===!1)&&h._getXHRPromise(!1,i.context,e)||h._chunkedUpload(i)||a.ajax(i)).done(function(a,b,c){h._onDone(a,b,c,i)}).fail(function(a,b,c){h._onFail(a,b,c,i)}).always(function(a,b,c){if(h._onAlways(a,b,c,i),h._sending-=1,h._active-=1,i.limitConcurrentUploads&&i.limitConcurrentUploads>h._sending)for(var d=h._slots.shift();d;){if("pending"===h._getDeferredState(d)){d.resolve();break}d=h._slots.shift()}0===h._active&&h._trigger("stop")})};return this._beforeSend(b,i),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(f=a.Deferred(),this._slots.push(f),g=f.pipe(j)):(this._sequence=this._sequence.pipe(j,j),g=this._sequence),g.abort=function(){return e=[void 0,"abort","abort"],d?d.abort():(f&&f.rejectWith(i.context,e),j())},this._enhancePromise(g)):j()},_onAdd:function(b,c){var d,e,f,g,h=this,i=!0,j=a.extend({},this.options,c),k=c.files,l=k.length,m=j.limitMultiFileUploads,n=j.limitMultiFileUploadSize,o=j.limitMultiFileUploadSizeOverhead,p=0,q=this._getParamName(j),r=0;if(!l)return!1;if(n&&void 0===k[0].size&&(n=void 0),(j.singleFileUploads||m||n)&&this._isXHRUpload(j))if(j.singleFileUploads||n||!m)if(!j.singleFileUploads&&n)for(f=[],d=[],g=0;g<l;g+=1)p+=k[g].size+o,(g+1===l||p+k[g+1].size+o>n||m&&g+1-r>=m)&&(f.push(k.slice(r,g+1)),e=q.slice(r,g+1),e.length||(e=q),d.push(e),r=g+1,p=0);else d=q;else for(f=[],d=[],g=0;g<l;g+=m)f.push(k.slice(g,g+m)),e=q.slice(g,g+m),e.length||(e=q),d.push(e);else f=[k],d=[q];return c.originalFiles=k,a.each(f||k,function(e,g){var j=a.extend({},c);return j.files=f?g:[g],j.paramName=d[e],h._initResponseObject(j),h._initProgressObject(j),h._addConvenienceMethods(b,j),i=h._trigger("add",a.Event("add",{delegatedEvent:b}),j)}),i},_replaceFileInput:function(b){var c=b.fileInput,d=c.clone(!0),e=c.is(document.activeElement);b.fileInputClone=d,a("<form></form>").append(d)[0].reset(),c.after(d).detach(),e&&d.focus(),a.cleanData(c.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(a,b){return b===c[0]?d[0]:b}),c[0]===this.element[0]&&(this.element=d)},_handleFileTreeEntry:function(b,c){var d,e=this,f=a.Deferred(),g=function(a){a&&!a.entry&&(a.entry=b),f.resolve([a])},h=function(a){e._handleFileTreeEntries(a,c+b.name+"/").done(function(a){f.resolve(a)}).fail(g)},i=function(){d.readEntries(function(a){a.length?(j=j.concat(a),i()):h(j)},g)},j=[];return c=c||"",b.isFile?b._file?(b._file.relativePath=c,f.resolve(b._file)):b.file(function(a){a.relativePath=c,f.resolve(a)},g):b.isDirectory?(d=b.createReader(),i()):f.resolve([]),f.promise()},_handleFileTreeEntries:function(b,c){var d=this;return a.when.apply(a,a.map(b,function(a){return d._handleFileTreeEntry(a,c)})).pipe(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(b){b=b||{};var c=b.items;return c&&c.length&&(c[0].webkitGetAsEntry||c[0].getAsEntry)?this._handleFileTreeEntries(a.map(c,function(a){var b;return a.webkitGetAsEntry?(b=a.webkitGetAsEntry(),b&&(b._file=a.getAsFile()),b):a.getAsEntry()})):a.Deferred().resolve(a.makeArray(b.files)).promise()},_getSingleFileInputFiles:function(b){b=a(b);var c,d,e=b.prop("webkitEntries")||b.prop("entries");if(e&&e.length)return this._handleFileTreeEntries(e);if(c=a.makeArray(b.prop("files")),c.length)void 0===c[0].name&&c[0].fileName&&a.each(c,function(a,b){b.name=b.fileName,b.size=b.fileSize});else{if(d=b.prop("value"),!d)return a.Deferred().resolve([]).promise();c=[{name:d.replace(/^.*\\/,"")}]}return a.Deferred().resolve(c).promise()},_getFileInputFiles:function(b){return b instanceof a&&1!==b.length?a.when.apply(a,a.map(b,this._getSingleFileInputFiles)).pipe(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(b)},_onChange:function(b){var c=this,d={fileInput:a(b.target),form:a(b.target.form)};this._getFileInputFiles(d.fileInput).always(function(e){d.files=e,c.options.replaceFileInput&&c._replaceFileInput(d),c._trigger("change",a.Event("change",{delegatedEvent:b}),d)!==!1&&c._onAdd(b,d)})},_onPaste:function(b){var c=b.originalEvent&&b.originalEvent.clipboardData&&b.originalEvent.clipboardData.items,d={files:[]};c&&c.length&&(a.each(c,function(a,b){var c=b.getAsFile&&b.getAsFile();c&&d.files.push(c)}),this._trigger("paste",a.Event("paste",{delegatedEvent:b}),d)!==!1&&this._onAdd(b,d))},_onDrop:function(b){b.dataTransfer=b.originalEvent&&b.originalEvent.dataTransfer;var c=this,d=b.dataTransfer,e={};d&&d.files&&d.files.length&&(b.preventDefault(),this._getDroppedFiles(d).always(function(d){e.files=d,c._trigger("drop",a.Event("drop",{delegatedEvent:b}),e)!==!1&&c._onAdd(b,e)}))},_onDragOver:b("dragover"),_onDragEnter:b("dragenter"),_onDragLeave:b("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),a.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_setOption:function(b,c){var d=a.inArray(b,this._specialOptions)!==-1;d&&this._destroyEventHandlers(),this._super(b,c),d&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var b=this.options;void 0===b.fileInput?b.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):b.fileInput instanceof a||(b.fileInput=a(b.fileInput)),b.dropZone instanceof a||(b.dropZone=a(b.dropZone)),b.pasteZone instanceof a||(b.pasteZone=a(b.pasteZone))},_getRegExp:function(a){var b=a.split("/"),c=b.pop();return b.shift(),new RegExp(b.join("/"),c)},_isRegExpOption:function(b,c){return"url"!==b&&"string"===a.type(c)&&/^\/.*\/[igm]{0,3}$/.test(c)},_initDataAttributes:function(){var b=this,c=this.options,d=this.element.data();a.each(this.element[0].attributes,function(a,e){var f,g=e.name.toLowerCase();/^data-/.test(g)&&(g=g.slice(5).replace(/-[a-z]/g,function(a){return a.charAt(1).toUpperCase()}),f=d[g],b._isRegExpOption(g,f)&&(f=b._getRegExp(f)),c[g]=f)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(b){var c=this;b&&!this.options.disabled&&(b.fileInput&&!b.files?this._getFileInputFiles(b.fileInput).always(function(a){b.files=a,c._onAdd(null,b)}):(b.files=a.makeArray(b.files),this._onAdd(null,b)))},send:function(b){if(b&&!this.options.disabled){if(b.fileInput&&!b.files){var c,d,e=this,f=a.Deferred(),g=f.promise();return g.abort=function(){return d=!0,c?c.abort():(f.reject(null,"abort","abort"),g)},this._getFileInputFiles(b.fileInput).always(function(a){if(!d){if(!a.length)return void f.reject();b.files=a,c=e._onSend(null,b),c.then(function(a,b,c){f.resolve(a,b,c)},function(a,b,c){f.reject(a,b,c)})}}),this._enhancePromise(g)}if(b.files=a.makeArray(b.files),b.files.length)return this._onSend(null,b)}return this._getXHRPromise(!1,b&&b.context)}})}),function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery)}(function(a){"use strict";var b=0;a.ajaxTransport("iframe",function(c){if(c.async){var d,e,f,g=c.initialIframeSrc||"javascript:false;";return{send:function(h,i){d=a('<form style="display:none;"></form>'),d.attr("accept-charset",c.formAcceptCharset),f=/\?/.test(c.url)?"&":"?","DELETE"===c.type?(c.url=c.url+f+"_method=DELETE",c.type="POST"):"PUT"===c.type?(c.url=c.url+f+"_method=PUT",c.type="POST"):"PATCH"===c.type&&(c.url=c.url+f+"_method=PATCH",c.type="POST"),b+=1,e=a('<iframe src="'+g+'" name="iframe-transport-'+b+'"></iframe>').bind("load",function(){var b,f=a.isArray(c.paramName)?c.paramName:[c.paramName];e.unbind("load").bind("load",function(){var b;try{if(b=e.contents(),!b.length||!b[0].firstChild)throw new Error}catch(c){b=void 0}i(200,"success",{iframe:b}),a('<iframe src="'+g+'"></iframe>').appendTo(d),window.setTimeout(function(){d.remove()},0)}),d.prop("target",e.prop("name")).prop("action",c.url).prop("method",c.type),c.formData&&a.each(c.formData,function(b,c){a('<input type="hidden"/>').prop("name",c.name).val(c.value).appendTo(d)}),c.fileInput&&c.fileInput.length&&"POST"===c.type&&(b=c.fileInput.clone(),c.fileInput.after(function(a){return b[a]}),c.paramName&&c.fileInput.each(function(b){a(this).prop("name",f[b]||c.paramName)}),d.append(c.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data"),c.fileInput.removeAttr("form")),d.submit(),b&&b.length&&c.fileInput.each(function(c,d){var e=a(b[c]);a(d).prop("name",e.prop("name")).attr("form",e.attr("form")),e.replaceWith(d)})}),d.append(e).appendTo(document.body)},abort:function(){e&&e.unbind("load").prop("src",g),d&&d.remove()}}}}),a.ajaxSetup({converters:{"iframe text":function(b){return b&&a(b[0].body).text()},"iframe json":function(b){return b&&a.parseJSON(a(b[0].body).text())},"iframe html":function(b){return b&&a(b[0].body).html()},"iframe xml":function(b){var c=b&&b[0];return c&&a.isXMLDoc(c)?c:a.parseXML(c.XMLDocument&&c.XMLDocument.xml||a(c.body).html())},"iframe script":function(b){return b&&a.globalEval(a(b[0].body).text())}}})}),jQuery.fn.highlight=function(a){function b(a,c){var d=0;if(3==a.nodeType){var e=a.data.toUpperCase().indexOf(c);if(0<=e){d=document.createElement("span"),d.className="highlight",e=a.splitText(e),e.splitText(c.length);var f=e.cloneNode(!0);d.appendChild(f),e.parentNode.replaceChild(d,e),d=1}}else if(1==a.nodeType&&a.childNodes&&!/(script|style)/i.test(a.tagName))for(e=0;e<a.childNodes.length;++e)e+=b(a.childNodes[e],c);return d}return this.length&&a&&a.length?this.each(function(){b(this,a.toUpperCase())}):this},jQuery.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){with(this.parentNode.firstChild.nodeName,this.parentNode)replaceChild(this.firstChild,this),normalize()}).end()},/*!
|
||
* jQuery Cookie Plugin v1.4.1
|
||
* https://github.com/carhartl/jquery-cookie
|
||
*
|
||
* Copyright 2013 Klaus Hartl
|
||
* Released under the MIT license
|
||
*/
|
||
function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;n<o;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0!==a.cookie(b)&&(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}),/*!
|
||
Autosize 1.18.18
|
||
license: MIT
|
||
http://www.jacklmoore.com/autosize
|
||
*/
|
||
!function(a){var b,c={className:"autosizejs",id:"autosizejs",append:"\n",callback:!1,resizeDelay:10,placeholder:!0},d=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent","whiteSpace"],e=a('<textarea tabindex="-1"/>').data("autosize",!0)[0];e.style.cssText="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;",e.style.lineHeight="99px","99px"===a(e).css("lineHeight")&&d.push("lineHeight"),e.style.lineHeight="",a.fn.autosize=function(f){return this.length?(f=a.extend({},c,f||{}),e.parentNode!==document.body&&a(document.body).append(e),this.each(function(){function c(){var b,c=window.getComputedStyle?window.getComputedStyle(m,null):null;c?(b=parseFloat(c.width),("border-box"===c.boxSizing||"border-box"===c.webkitBoxSizing||"border-box"===c.mozBoxSizing)&&a.each(["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],function(a,d){b-=parseFloat(c[d])})):b=n.width(),e.style.width=Math.max(b,0)+"px"}function g(){var g={};if(b=m,e.className=f.className,e.id=f.id,j=parseFloat(n.css("maxHeight")),a.each(d,function(a,b){g[b]=n.css(b)}),a(e).css(g).attr("wrap",n.attr("wrap")),c(),window.chrome){var h=m.style.width;m.style.width="0px",m.offsetWidth,m.style.width=h}}function h(){var a,d;b!==m?g():c(),e.value=!m.value&&f.placeholder?n.attr("placeholder")||"":m.value,e.value+=f.append||"",e.style.overflowY=m.style.overflowY,d=parseFloat(m.style.height)||0,e.scrollTop=0,e.scrollTop=9e4,a=e.scrollTop,j&&a>j?(m.style.overflowY="scroll",a=j):(m.style.overflowY="hidden",k>a&&(a=k)),a+=o,Math.abs(d-a)>.01&&(m.style.height=a+"px",e.className=e.className,p&&f.callback.call(m,m),n.trigger("autosize.resized"))}function i(){clearTimeout(l),l=setTimeout(function(){var a=n.width();a!==r&&(r=a,h())},parseInt(f.resizeDelay,10))}var j,k,l,m=this,n=a(m),o=0,p=a.isFunction(f.callback),q={height:m.style.height,overflow:m.style.overflow,overflowY:m.style.overflowY,wordWrap:m.style.wordWrap,resize:m.style.resize},r=n.width(),s=n.css("resize");n.data("autosize")||(n.data("autosize",!0),("border-box"===n.css("box-sizing")||"border-box"===n.css("-moz-box-sizing")||"border-box"===n.css("-webkit-box-sizing"))&&(o=n.outerHeight()-n.height()),k=Math.max(parseFloat(n.css("minHeight"))-o||0,n.height()),n.css({overflow:"hidden",overflowY:"hidden",wordWrap:"break-word"}),"vertical"===s?n.css("resize","none"):"both"===s&&n.css("resize","horizontal"),"onpropertychange"in m?"oninput"in m?n.on("input.autosize keyup.autosize",h):n.on("propertychange.autosize",function(){"value"===event.propertyName&&h()}):n.on("input.autosize",h),f.resizeDelay!==!1&&a(window).on("resize.autosize",i),n.on("autosize.resize",h),n.on("autosize.resizeIncludeStyle",function(){b=null,h()}),n.on("autosize.destroy",function(){b=null,clearTimeout(l),a(window).off("resize",i),n.off("autosize").off(".autosize").css(q).removeData("autosize")}),h())})):this}}(jQuery||$),/*!
|
||
* Copyright 2012, Chris Wanstrath
|
||
* Released under the MIT License
|
||
* https://github.com/defunkt/jquery-pjax
|
||
*/
|
||
function(a){function b(b,d,e){var f=this;return this.on("click.pjax",b,function(b){var g=a.extend({},p(d,e));g.container||(g.container=a(this).attr("data-pjax")||f),c(b,g)})}function c(b,c,d){d=p(c,d);var f=b.currentTarget;if("A"!==f.tagName.toUpperCase())throw"$.fn.pjax or $.pjax.click requires an anchor element";if(!(b.which>1||b.metaKey||b.ctrlKey||b.shiftKey||b.altKey||location.protocol!==f.protocol||location.hostname!==f.hostname||f.href.indexOf("#")>-1&&o(f)==o(location)||b.isDefaultPrevented())){var g={url:f.href,container:a(f).attr("data-pjax"),target:f},h=a.extend({},g,d),i=a.Event("pjax:click");a(f).trigger(i,[h]),i.isDefaultPrevented()||(e(h),b.preventDefault(),a(f).trigger("pjax:clicked",[h]))}}function d(b,c,d){d=p(c,d);var f=b.currentTarget;if("FORM"!==f.tagName.toUpperCase())throw"$.pjax.submit requires a form element";var g={type:f.method.toUpperCase(),url:f.action,container:a(f).attr("data-pjax"),target:f};if("GET"!==g.type&&void 0!==window.FormData)g.data=new FormData(f),g.processData=!1,g.contentType=!1;else{if(a(f).find(":file").length)return;g.data=a(f).serializeArray()}e(a.extend({},g,d)),b.preventDefault()}function e(b){function c(b,c,e){e||(e={}),e.relatedTarget=d;var f=a.Event(b,e);return h.trigger(f,c),!f.isDefaultPrevented()}b=a.extend(!0,{},a.ajaxSettings,e.defaults,b),a.isFunction(b.url)&&(b.url=b.url());var d=b.target,f=n(b.url).hash,h=b.context=q(b.container);b.data||(b.data={}),a.isArray(b.data)?b.data.push({name:"_pjax",value:h.selector}):b.data._pjax=h.selector;var i;b.beforeSend=function(a,d){if("GET"!==d.type&&(d.timeout=0),a.setRequestHeader("X-PJAX","true"),a.setRequestHeader("X-PJAX-Container",h.selector),!c("pjax:beforeSend",[a,d]))return!1;d.timeout>0&&(i=setTimeout(function(){c("pjax:timeout",[a,b])&&a.abort("timeout")},d.timeout),d.timeout=0);var e=n(d.url);f&&(e.hash=f),b.requestUrl=m(e)},b.complete=function(a,d){i&&clearTimeout(i),c("pjax:complete",[a,d,b]),c("pjax:end",[a,b])},b.error=function(a,d,e){var f=t("",a,b),h=c("pjax:error",[a,d,e,b]);"GET"==b.type&&"abort"!==d&&h&&g(f.url)},b.success=function(d,i,j){var l=e.state,m="function"==typeof a.pjax.defaults.version?a.pjax.defaults.version():a.pjax.defaults.version,o=j.getResponseHeader("X-PJAX-Version"),p=t(d,j,b),q=n(p.url);if(f&&(q.hash=f,p.url=q.href),m&&o&&m!==o)return void g(p.url);if(!p.contents)return void g(p.url);e.state={id:b.id||k(),url:p.url,title:p.title,container:h.selector,fragment:b.fragment,timeout:b.timeout},(b.push||b.replace)&&window.history.replaceState(e.state,p.title,p.url);try{document.activeElement.blur()}catch(r){}p.title&&(document.title=p.title),c("pjax:beforeReplace",[p.contents,b],{state:e.state,previousState:l}),h.html(p.contents);var s=h.find("input[autofocus], textarea[autofocus]").last()[0];s&&document.activeElement!==s&&s.focus(),u(p.scripts);var v=b.scrollTo;if(f){var w=decodeURIComponent(f.slice(1)),x=document.getElementById(w)||document.getElementsByName(w)[0];x&&(v=a(x).offset().top)}"number"==typeof v&&a(window).scrollTop(v),c("pjax:success",[d,i,j,b])},e.state||(e.state={id:k(),url:window.location.href,title:document.title,container:h.selector,fragment:b.fragment,timeout:b.timeout},window.history.replaceState(e.state,document.title)),j(e.xhr),e.options=b;var o=e.xhr=a.ajax(b);return o.readyState>0&&(b.push&&!b.replace&&(v(e.state.id,l(h)),window.history.pushState(null,"",b.requestUrl)),c("pjax:start",[o,b]),c("pjax:send",[o,b])),e.xhr}function f(b,c){var d={url:window.location.href,push:!1,replace:!0,scrollTo:!1};return e(a.extend(d,p(b,c)))}function g(a){window.history.replaceState(null,"",e.state.url),window.location.replace(a)}function h(b){B||j(e.xhr);var c,d=e.state,f=b.state;if(f&&f.container){if(B&&C==f.url)return;if(d){if(d.id===f.id)return;c=d.id<f.id?"forward":"back"}var h=E[f.id]||[],i=a(h[0]||f.container),k=h[1];if(i.length){d&&w(c,d.id,l(i));var m=a.Event("pjax:popstate",{state:f,direction:c});i.trigger(m);var n={id:f.id,url:f.url,container:i,push:!1,fragment:f.fragment,timeout:f.timeout,scrollTo:!1};if(k){i.trigger("pjax:start",[null,n]),e.state=f,f.title&&(document.title=f.title);var o=a.Event("pjax:beforeReplace",{state:f,previousState:d});i.trigger(o,[k,n]),i.html(k),i.trigger("pjax:end",[null,n])}else e(n);i[0].offsetHeight}else g(location.href)}B=!1}function i(b){var c=a.isFunction(b.url)?b.url():b.url,d=b.type?b.type.toUpperCase():"GET",e=a("<form>",{method:"GET"===d?"GET":"POST",action:c,style:"display:none"});"GET"!==d&&"POST"!==d&&e.append(a("<input>",{type:"hidden",name:"_method",value:d.toLowerCase()}));var f=b.data;if("string"==typeof f)a.each(f.split("&"),function(b,c){var d=c.split("=");e.append(a("<input>",{type:"hidden",name:d[0],value:d[1]}))});else if(a.isArray(f))a.each(f,function(b,c){e.append(a("<input>",{type:"hidden",name:c.name,value:c.value}))});else if("object"==typeof f){var g;for(g in f)e.append(a("<input>",{type:"hidden",name:g,value:f[g]}))}a(document.body).append(e),e.submit()}function j(b){b&&b.readyState<4&&(b.onreadystatechange=a.noop,b.abort())}function k(){return(new Date).getTime()}function l(a){var b=a.clone();return b.find("script").each(function(){this.src||jQuery._data(this,"globalEval",!1)}),[a.selector,b.contents()]}function m(a){return a.search=a.search.replace(/([?&])(_pjax|_)=[^&]*/g,""),a.href.replace(/\?($|#)/,"$1")}function n(a){var b=document.createElement("a");return b.href=a,b}function o(a){return a.href.replace(/#.*/,"")}function p(b,c){return b&&c?c.container=b:c=a.isPlainObject(b)?b:{container:b},c.container&&(c.container=q(c.container)),c}function q(b){if(b=a(b),b.length){if(""!==b.selector&&b.context===document)return b;if(b.attr("id"))return a("#"+b.attr("id"));throw"cant get selector for pjax container!"}throw"no pjax container for "+b.selector}function r(a,b){return a.filter(b).add(a.find(b))}function s(b){return a.parseHTML(b,document,!0)}function t(b,c,d){var e={},f=/<html/i.test(b),g=c.getResponseHeader("X-PJAX-URL");if(e.url=g?m(n(g)):d.requestUrl,f)var h=a(s(b.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0])),i=a(s(b.match(/<body[^>]*>([\s\S.]*)<\/body>/i)[0]));else var h=i=a(s(b));if(0===i.length)return e;if(e.title=r(h,"title").last().text(),d.fragment){if("body"===d.fragment)var j=i;else var j=r(i,d.fragment).first();j.length&&(e.contents="body"===d.fragment?j:j.contents(),e.title||(e.title=j.attr("title")||j.data("title")))}else f||(e.contents=i);return e.contents&&(e.contents=e.contents.not(function(){return a(this).is("title")}),e.contents.find("title").remove(),e.scripts=r(e.contents,"script[src]").remove(),e.contents=e.contents.not(e.scripts)),e.title&&(e.title=a.trim(e.title)),e}function u(b){if(b){var c=a("script[src]");b.each(function(){var b=this.src,d=c.filter(function(){return this.src===b});if(!d.length){var e=document.createElement("script"),f=a(this).attr("type");f&&(e.type=f),e.src=a(this).attr("src"),document.head.appendChild(e)}})}}function v(a,b){E[a]=b,G.push(a),x(F,0),x(G,e.defaults.maxCacheLength)}function w(a,b,c){var d,f;E[b]=c,"forward"===a?(d=G,f=F):(d=F,f=G),d.push(b),(b=f.pop())&&delete E[b],x(d,e.defaults.maxCacheLength)}function x(a,b){for(;a.length>b;)delete E[a.shift()]}function y(){return a("meta").filter(function(){var b=a(this).attr("http-equiv");return b&&"X-PJAX-VERSION"===b.toUpperCase()}).attr("content")}function z(){a.fn.pjax=b,a.pjax=e,a.pjax.enable=a.noop,a.pjax.disable=A,a.pjax.click=c,a.pjax.submit=d,a.pjax.reload=f,a.pjax.defaults={timeout:650,push:!0,replace:!1,type:"GET",dataType:"html",scrollTo:0,maxCacheLength:20,version:y},a(window).on("popstate.pjax",h)}function A(){a.fn.pjax=function(){return this},a.pjax=i,a.pjax.enable=z,a.pjax.disable=a.noop,a.pjax.click=a.noop,a.pjax.submit=a.noop,a.pjax.reload=function(){window.location.reload()},a(window).off("popstate.pjax",h)}var B=!0,C=window.location.href,D=window.history.state;D&&D.container&&(e.state=D),"state"in window.history&&(B=!1);var E={},F=[],G=[];a.inArray("state",a.event.props)<0&&a.event.props.push("state"),a.support.pjax=window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/),a.support.pjax?z():A()}(jQuery),/*! jquery.caret 2016-02-27 */
|
||
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return a.returnExportsGlobal=b(c)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){"use strict";var b,c,d,e,f,g,h,i,j,k,l;k="caret",b=function(){function b(a){this.$inputor=a,this.domInputor=this.$inputor[0]}return b.prototype.setPos=function(a){var b,c,d,e;return(e=j.getSelection())&&(d=0,c=!1,(b=function(a,f){var g,i,j,k,l,m;for(l=f.childNodes,m=[],j=0,k=l.length;k>j&&(g=l[j],!c);j++)if(3===g.nodeType){if(d+g.length>=a){c=!0,i=h.createRange(),i.setStart(g,a-d),e.removeAllRanges(),e.addRange(i);break}m.push(d+=g.length)}else m.push(b(a,g));return m})(a,this.domInputor)),this.domInputor},b.prototype.getIEPosition=function(){return this.getPosition()},b.prototype.getPosition=function(){var a,b;return b=this.getOffset(),a=this.$inputor.offset(),b.left-=a.left,b.top-=a.top,b},b.prototype.getOldIEPos=function(){var a,b;return b=h.selection.createRange(),a=h.body.createTextRange(),a.moveToElementText(this.domInputor),a.setEndPoint("EndToEnd",b),a.text.length},b.prototype.getPos=function(){var a,b,c;return(c=this.range())?(a=c.cloneRange(),a.selectNodeContents(this.domInputor),a.setEnd(c.endContainer,c.endOffset),b=a.toString().length,a.detach(),b):h.selection?this.getOldIEPos():void 0},b.prototype.getOldIEOffset=function(){var a,b;return a=h.selection.createRange().duplicate(),a.moveStart("character",-1),b=a.getBoundingClientRect(),{height:b.bottom-b.top,left:b.left,top:b.top}},b.prototype.getOffset=function(){var b,c,d,e,f;return j.getSelection&&(d=this.range())?(d.endOffset-1>0&&d.endContainer!==this.domInputor&&(b=d.cloneRange(),b.setStart(d.endContainer,d.endOffset-1),b.setEnd(d.endContainer,d.endOffset),e=b.getBoundingClientRect(),c={height:e.height,left:e.left+e.width,top:e.top},b.detach()),c&&0!==(null!=c?c.height:void 0)||(b=d.cloneRange(),f=a(h.createTextNode("|")),b.insertNode(f[0]),b.selectNode(f[0]),e=b.getBoundingClientRect(),c={height:e.height,left:e.left,top:e.top},f.remove(),b.detach())):h.selection&&(c=this.getOldIEOffset()),c&&(c.top+=a(j).scrollTop(),c.left+=a(j).scrollLeft()),c},b.prototype.range=function(){var a;if(j.getSelection)return a=j.getSelection(),a.rangeCount>0?a.getRangeAt(0):null},b}(),c=function(){function b(a){this.$inputor=a,this.domInputor=this.$inputor[0]}return b.prototype.getIEPos=function(){var a,b,c,d,e,f,g;return b=this.domInputor,f=h.selection.createRange(),e=0,f&&f.parentElement()===b&&(d=b.value.replace(/\r\n/g,"\n"),c=d.length,g=b.createTextRange(),g.moveToBookmark(f.getBookmark()),a=b.createTextRange(),a.collapse(!1),e=g.compareEndPoints("StartToEnd",a)>-1?c:-g.moveStart("character",-c)),e},b.prototype.getPos=function(){return h.selection?this.getIEPos():this.domInputor.selectionStart},b.prototype.setPos=function(a){var b,c;return b=this.domInputor,h.selection?(c=b.createTextRange(),c.move("character",a),c.select()):b.setSelectionRange&&b.setSelectionRange(a,a),b},b.prototype.getIEOffset=function(a){var b,c,d,e;return c=this.domInputor.createTextRange(),a||(a=this.getPos()),c.move("character",a),d=c.boundingLeft,e=c.boundingTop,b=c.boundingHeight,{left:d,top:e,height:b}},b.prototype.getOffset=function(b){var c,d,e;return c=this.$inputor,h.selection?(d=this.getIEOffset(b),d.top+=a(j).scrollTop()+c.scrollTop(),d.left+=a(j).scrollLeft()+c.scrollLeft(),d):(d=c.offset(),e=this.getPosition(b),d={left:d.left+e.left-c.scrollLeft(),top:d.top+e.top-c.scrollTop(),height:e.height})},b.prototype.getPosition=function(a){var b,c,e,f,g,h,i;return b=this.$inputor,f=function(a){return a=a.replace(/<|>|`|"|&/g,"?").replace(/\r\n|\r|\n/g,"<br/>"),/firefox/i.test(navigator.userAgent)&&(a=a.replace(/\s/g," ")),a},void 0===a&&(a=this.getPos()),i=b.val().slice(0,a),e=b.val().slice(a),g="<span style='position: relative; display: inline;'>"+f(i)+"</span>",g+="<span id='caret' style='position: relative; display: inline;'>|</span>",g+="<span style='position: relative; display: inline;'>"+f(e)+"</span>",h=new d(b),c=h.create(g).rect()},b.prototype.getIEPosition=function(a){var b,c,d,e,f;return d=this.getIEOffset(a),c=this.$inputor.offset(),e=d.left-c.left,f=d.top-c.top,b=d.height,{left:e,top:f,height:b}},b}(),d=function(){function b(a){this.$inputor=a}return b.prototype.css_attr=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopWidth","boxSizing","fontFamily","fontSize","fontWeight","height","letterSpacing","lineHeight","marginBottom","marginLeft","marginRight","marginTop","outlineWidth","overflow","overflowX","overflowY","paddingBottom","paddingLeft","paddingRight","paddingTop","textAlign","textOverflow","textTransform","whiteSpace","wordBreak","wordWrap"],b.prototype.mirrorCss=function(){var b,c=this;return b={position:"absolute",left:-9999,top:0,zIndex:-2e4},"TEXTAREA"===this.$inputor.prop("tagName")&&this.css_attr.push("width"),a.each(this.css_attr,function(a,d){return b[d]=c.$inputor.css(d)}),b},b.prototype.create=function(b){return this.$mirror=a("<div></div>"),this.$mirror.css(this.mirrorCss()),this.$mirror.html(b),this.$inputor.after(this.$mirror),this},b.prototype.rect=function(){var a,b,c;return a=this.$mirror.find("#caret"),b=a.position(),c={left:b.left,top:b.top,height:a.height()},this.$mirror.remove(),c},b}(),e={contentEditable:function(a){return!(!a[0].contentEditable||"true"!==a[0].contentEditable)}},g={pos:function(a){return a||0===a?this.setPos(a):this.getPos()},position:function(a){return h.selection?this.getIEPosition(a):this.getPosition(a)},offset:function(a){var b;return b=this.getOffset(a)}},h=null,j=null,i=null,l=function(a){var b;return(b=null!=a?a.iframe:void 0)?(i=b,j=b.contentWindow,h=b.contentDocument||j.document):(i=void 0,j=window,h=document)},f=function(a){var b;h=a[0].ownerDocument,j=h.defaultView||h.parentWindow;try{return i=j.frameElement}catch(c){b=c}},a.fn.caret=function(d,f,h){var i;return g[d]?(a.isPlainObject(f)?(l(f),f=void 0):l(h),i=e.contentEditable(this)?new b(this):new c(this),g[d].apply(i,[f])):a.error("Method "+d+" does not exist on jQuery.caret")},a.fn.caret.EditableCaret=b,a.fn.caret.InputCaret=c,a.fn.caret.Utils=e,a.fn.caret.apis=g}),function(){!function(a){return"function"==typeof define&&define.amd?define(["jquery"],a):a(window.jQuery)}(function(a){var b,c,d,e,f,g,h,i,j=[].slice;d=function(){function b(b){this.current_flag=null,this.controllers={},this.alias_maps={},this.$inputor=a(b),this.iframe=null,this.setIframe(),this.listen()}return b.prototype.setIframe=function(a){return a?(this.window=a.contentWindow,this.document=a.contentDocument||this.window.document,this.iframe=a):(this.document=document,this.window=window,this.iframe=null)},b.prototype.controller=function(a){var b,c,d,e;if(this.alias_maps[a])c=this.controllers[this.alias_maps[a]];else{e=this.controllers;for(d in e)if(b=e[d],d===a){c=b;break}}return c?c:this.controllers[this.current_flag]},b.prototype.set_context_for=function(a){return this.current_flag=a,this},b.prototype.reg=function(a,b){var c,d;return c=(d=this.controllers)[a]||(d[a]=new e(this,a)),b.alias&&(this.alias_maps[b.alias]=a),c.init(b),this},b.prototype.listen=function(){return this.$inputor.on("keyup.atwhoInner",function(a){return function(b){return a.on_keyup(b)}}(this)).on("keydown.atwhoInner",function(a){return function(b){return a.on_keydown(b)}}(this)).on("scroll.atwhoInner",function(a){return function(b){var c;return null!=(c=a.controller())?c.view.hide(b):void 0}}(this)).on("blur.atwhoInner",function(a){return function(b){var c;return(c=a.controller())?c.view.hide(b,c.get_opt("display_timeout")):void 0}}(this)).on("click.atwhoInner",function(a){return function(b){var c;return null!=(c=a.controller())?c.view.hide(b):void 0}}(this))},b.prototype.shutdown=function(){var a,b,c;c=this.controllers;for(b in c)a=c[b],a.destroy(),delete this.controllers[b];return this.$inputor.off(".atwhoInner")},b.prototype.dispatch=function(){return a.map(this.controllers,function(a){return function(b){var c;return(c=b.get_opt("delay"))?(clearTimeout(a.delayedCallback),a.delayedCallback=setTimeout(function(){return b.look_up()?a.set_context_for(b.at):void 0},c)):b.look_up()?a.set_context_for(b.at):void 0}}(this))},b.prototype.on_keyup=function(b){var c;switch(b.keyCode){case g.ESC:b.preventDefault(),null!=(c=this.controller())&&c.view.hide();break;case g.DOWN:case g.UP:case g.CTRL:a.noop();break;case g.P:case g.N:b.ctrlKey||this.dispatch();break;default:this.dispatch()}},b.prototype.on_keydown=function(b){var c,d;if(c=null!=(d=this.controller())?d.view:void 0,c&&c.visible())switch(b.keyCode){case g.ESC:b.preventDefault(),c.hide(b);break;case g.UP:b.preventDefault(),c.prev();break;case g.DOWN:b.preventDefault(),c.next();break;case g.P:if(!b.ctrlKey)return;b.preventDefault(),c.prev();break;case g.N:if(!b.ctrlKey)return;b.preventDefault(),c.next();break;case g.TAB:case g.ENTER:if(!c.visible())return;b.preventDefault(),c.choose(b);break;default:a.noop()}},b}(),e=function(){function c(c,d){this.app=c,this.at=d,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.setting=null,this.query=null,this.pos=0,this.cur_rect=null,this.range=null,b.append(this.$el=a("<div id='atwho-ground-"+this.id+"'></div>")),this.model=new h(this),this.view=new i(this)}return c.prototype.uid=function(){return(Math.random().toString(16)+"000000000").substr(2,8)+(new Date).getTime()},c.prototype.init=function(b){return this.setting=a.extend({},this.setting||a.fn.atwho["default"],b),this.view.init(),this.model.reload(this.setting.data)},c.prototype.destroy=function(){return this.trigger("beforeDestroy"),this.model.destroy(),this.view.destroy(),this.$el.remove()},c.prototype.call_default=function(){var b,c,d;d=arguments[0],b=2<=arguments.length?j.call(arguments,1):[];try{return f[d].apply(this,b)}catch(e){return c=e,a.error(""+c+" Or maybe At.js doesn't have function "+d)}},c.prototype.trigger=function(a,b){var c,d;return null==b&&(b=[]),b.push(this),c=this.get_opt("alias"),d=c?""+a+"-"+c+".atwho":""+a+".atwho",this.$inputor.trigger(d,b)},c.prototype.callbacks=function(a){return this.get_opt("callbacks")[a]||f[a]},c.prototype.get_opt=function(a){var b;try{return this.setting[a]}catch(c){return b=c,null}},c.prototype.content=function(){return this.$inputor.is("textarea, input")?this.$inputor.val():this.$inputor.text()},c.prototype.catch_query=function(){var a,b,c,d,e,f;return b=this.content(),a=this.$inputor.caret("pos",{iframe:this.app.iframe}),f=b.slice(0,a),d=this.callbacks("matcher").call(this,this.at,f,this.get_opt("start_with_space")),"string"==typeof d&&d.length<=this.get_opt("max_len",20)?(e=a-d.length,c=e+d.length,this.pos=e,d={text:d,head_pos:e,end_pos:c},this.trigger("matched",[this.at,d.text])):(d=null,this.view.hide()),this.query=d},c.prototype.rect=function(){var a,b;if(a=this.$inputor.caret("offset",this.pos-1,{iframe:this.app.iframe}))return"true"===this.$inputor.attr("contentEditable")&&(a=this.cur_rect||(this.cur_rect=a)||a),b=this.app.document.selection?0:2,{left:a.left,top:a.top,bottom:a.top+a.height+b}},c.prototype.reset_rect=function(){return"true"===this.$inputor.attr("contentEditable")?this.cur_rect=null:void 0},c.prototype.mark_range=function(){return"true"===this.$inputor.attr("contentEditable")&&(this.app.window.getSelection&&(this.range=this.app.window.getSelection().getRangeAt(0)),this.app.document.selection)?this.ie8_range=this.app.document.selection.createRange():void 0},c.prototype.insert_content_for=function(b){var c,d,e;return d=b.data("value"),e=this.get_opt("insert_tpl"),this.$inputor.is("textarea, input")||!e?d:(c=a.extend({},b.data("item-data"),{"atwho-data-value":d,"atwho-at":this.at}),this.callbacks("tpl_eval").call(this,e,c))},c.prototype.insert=function(b){var c,d,e,f,g,h,i,j,k;return c=this.$inputor,k=this.callbacks("inserting_wrapper").call(this,c,b,this.get_opt("suffix")),c.is("textarea, input")?(h=c.val(),i=h.slice(0,Math.max(this.query.head_pos-this.at.length,0)),j=""+i+k+h.slice(this.query.end_pos||0),c.val(j),c.caret("pos",i.length+k.length,{iframe:this.app.iframe})):(f=this.range)?(e=f.startOffset-(this.query.end_pos-this.query.head_pos)-this.at.length,f.setStart(f.endContainer,Math.max(e,0)),f.setEnd(f.endContainer,f.endOffset),f.deleteContents(),d=a(k,this.app.document)[0],f.insertNode(d),f.setEndAfter(d),f.collapse(!1),g=this.app.window.getSelection(),g.removeAllRanges(),g.addRange(f)):(f=this.ie8_range)&&(f.moveStart("character",this.query.end_pos-this.query.head_pos-this.at.length),f.pasteHTML(k),f.collapse(!1),f.select()),c.is(":focus")||c.focus(),c.change()},c.prototype.render_view=function(a){var b;return b=this.get_opt("search_key"),a=this.callbacks("sorter").call(this,this.query.text,a.slice(0,1001),b),this.view.render(a.slice(0,this.get_opt("limit")))},c.prototype.look_up=function(){var b,c;if(b=this.catch_query())return c=function(a){return a&&a.length>0?this.render_view(a):this.view.hide()},this.model.query(b.text,a.proxy(c,this)),b},c}(),h=function(){function b(a){this.context=a,this.at=this.context.at,this.storage=this.context.$inputor}return b.prototype.destroy=function(){return this.storage.data(this.at,null)},b.prototype.saved=function(){return this.fetch()>0},b.prototype.query=function(a,b){var c,d,e;return c=this.fetch(),d=this.context.get_opt("search_key"),c=this.context.callbacks("filter").call(this.context,a,c,d)||[],e=this.context.callbacks("remote_filter"),c.length>0||!e&&0===c.length?b(c):e.call(this.context,a,b)},b.prototype.fetch=function(){return this.storage.data(this.at)||[]},b.prototype.save=function(a){return this.storage.data(this.at,this.context.callbacks("before_save").call(this.context,a||[]))},b.prototype.load=function(a){return!this.saved()&&a?this._load(a):void 0},b.prototype.reload=function(a){return this._load(a)},b.prototype._load=function(b){return"string"==typeof b?a.ajax(b,{dataType:"json"}).done(function(a){return function(b){return a.save(b)}}(this)):this.save(b)},b}(),i=function(){function b(b){this.context=b,this.$el=a("<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>"),this.timeout_id=null,this.context.$el.append(this.$el),this.bind_event()}return b.prototype.init=function(){var a;return a=this.context.get_opt("alias")||this.context.at.charCodeAt(0),this.$el.attr({id:"at-view-"+a})},b.prototype.destroy=function(){return this.$el.remove()},b.prototype.bind_event=function(){var b;return b=this.$el.find("ul"),b.on("mouseenter.atwho-view","li",function(c){return b.find(".cur").removeClass("cur"),a(c.currentTarget).addClass("cur")}).on("click",function(a){return function(b){return a.choose(b),b.preventDefault()}}(this))},b.prototype.visible=function(){return this.$el.is(":visible")},b.prototype.choose=function(a){var b,c;return(b=this.$el.find(".cur")).length&&(c=this.context.insert_content_for(b),this.context.insert(this.context.callbacks("before_insert").call(this.context,c,b),b),this.context.trigger("inserted",[b,a]),this.hide(a)),this.context.get_opt("hide_without_suffix")?this.stop_showing=!0:void 0},b.prototype.reposition=function(b){var c,d;return b.bottom+this.$el.height()-a(window).scrollTop()>a(window).height()&&(b.bottom=b.top-this.$el.height()),c={left:b.left,top:b.bottom},null!=(d=this.context.callbacks("before_reposition"))&&d.call(this.context,c),this.$el.offset(c),this.context.trigger("reposition",[c])},b.prototype.next=function(){var a,b;return a=this.$el.find(".cur").removeClass("cur"),b=a.next(),b.length||(b=this.$el.find("li:first")),b.addClass("cur")},b.prototype.prev=function(){var a,b;return a=this.$el.find(".cur").removeClass("cur"),b=a.prev(),b.length||(b=this.$el.find("li:last")),b.addClass("cur")},b.prototype.show=function(){var a;return this.stop_showing?void(this.stop_showing=!1):(this.context.mark_range(),this.visible()||(this.$el.show(),this.context.trigger("shown")),(a=this.context.rect())?this.reposition(a):void 0)},b.prototype.hide=function(a,b){var c;if(this.visible())return isNaN(b)?(this.context.reset_rect(),this.$el.hide(),this.context.trigger("hidden",[a])):(c=function(a){return function(){return a.hide()}}(this),clearTimeout(this.timeout_id),this.timeout_id=setTimeout(c,b))},b.prototype.render=function(b){var c,d,e,f,g,h,i;if(!(a.isArray(b)&&b.length>0))return void this.hide();for(this.$el.find("ul").empty(),d=this.$el.find("ul"),g=this.context.get_opt("tpl"),h=0,i=b.length;i>h;h++)e=b[h],e=a.extend({},e,{"atwho-at":this.context.at}),f=this.context.callbacks("tpl_eval").call(this.context,g,e),c=a(this.context.callbacks("highlighter").call(this.context,f,this.context.query.text)),c.data("item-data",e),d.append(c);return this.show(),this.context.get_opt("highlight_first")?d.find("li:first").addClass("cur"):void 0},b}(),g={DOWN:40,UP:38,ESC:27,TAB:9,ENTER:13,CTRL:17,P:80,N:78},f={before_save:function(b){var c,d,e,f;if(!a.isArray(b))return b;for(f=[],d=0,e=b.length;e>d;d++)c=b[d],f.push(a.isPlainObject(c)?c:{name:c});return f},matcher:function(a,b,c){var d,e;return a=a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),c&&(a="(?:^|\\s)"+a),e=new RegExp(a+"([A-Za-z0-9_+-]*)$|"+a+"([^\\x00-\\xff]*)$","gi"),d=e.exec(b),d?d[2]||d[1]:null},filter:function(a,b,c){var d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],~d[c].toLowerCase().indexOf(a.toLowerCase())&&g.push(d);return g},remote_filter:null,sorter:function(a,b,c){var d,e,f,g;if(!a)return b;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],d.atwho_order=d[c].toLowerCase().indexOf(a.toLowerCase()),d.atwho_order>-1&&g.push(d);return g.sort(function(a,b){return a.atwho_order-b.atwho_order})},tpl_eval:function(a,b){var c;try{return a.replace(/\$\{([^\}]*)\}/g,function(a,c){return b[c]})}catch(d){return c=d,""}},highlighter:function(a,b){var c;return b?(c=new RegExp(">\\s*(\\w*?)("+b.replace("+","\\+")+")(\\w*)\\s*<","ig"),a.replace(c,function(a,b,c,d){return"> "+b+"<strong>"+c+"</strong>"+d+" <"})):a},before_insert:function(a){return a},inserting_wrapper:function(a,b,c){var d,e;return d=""===c?c:c||" ",a.is("textarea, input")?""+b+d:"true"===a.attr("contentEditable")?(d=""===c?c:c||" ",/firefox/i.test(navigator.userAgent)?e="<span>"+b+d+"</span>":(c="<span contenteditable='false'>"+d+"<span>",e="<span contenteditable='false'>"+b+c+"</span>"),this.app.document.selection&&(e="<span contenteditable='true'>"+b+"</span>"),e):void 0}},c={load:function(a,b){var c;return(c=this.controller(a))?c.model.load(b):void 0},setIframe:function(a){return this.setIframe(a),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data("atwho",null)}},b=a("<div id='atwho-container'></div>"),a.fn.atwho=function(e){var f,g;return g=arguments,a("body").append(b),f=null,this.filter("textarea, input, [contenteditable=true]").each(function(){var b,h;return(h=(b=a(this)).data("atwho"))||b.data("atwho",h=new d(this)),"object"!=typeof e&&e?c[e]&&h?f=c[e].apply(h,Array.prototype.slice.call(g,1)):a.error("Method "+e+" does not exist on jQuery.caret"):h.reg(e.at,e)}),f||this},a.fn.atwho["default"]={at:void 0,alias:void 0,data:null,tpl:"<li data-value='${atwho-at}${name}'>${name}</li>",insert_tpl:"<span id='${id}'>${atwho-data-value}</span>",callbacks:f,search_key:"name",suffix:void 0,hide_without_suffix:!1,start_with_space:!0,highlight_first:!0,limit:5,max_len:20,display_timeout:300,delay:null}})}.call(this),function(a){a.fn.flatelements=function(b){function c(a){return"checkbox"==a.attr("type")&&"LABEL"==a.parent().prop("tagName")||"radio"==a.attr("type")&&"LABEL"==a.parent().prop("tagName")}a.extend({},a.fn.flatelements.defaults,b);return this.each(function(){if($this=a(this),1==c($this))if("checkbox"==$this.attr("type"))if("slider"==$this.attr("data-view")){if("checkbox"==$this.parent().parent().attr("class")&&"LABEL"==$this.parent().prop("tagName")){$this.parent().parent().removeClass("checkbox"),$this.parent().parent().addClass("onoffswitch"),$this.addClass("onoffswitch-checkbox");var b=a.trim($this.parent().parent().text());$this.parent().html($this.parent().find("input"));var d='<label class="onoffswitch-label" for="'+$this.attr("id")+'"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>';$this.parent().append(d),d='<label class="onoffswitch-label" for="'+$this.attr("id")+'">'+b+'</label><div class="onoffswitch-clear"></div>',$this.parent().parent().after(d),$this.parent().replaceWith($this.parent().html())}}else"checkbox"==$this.parent().parent().attr("class")&&($this.parent().parent().addClass("regular-checkbox-container"),$this.parent().parent().append('<div class="regular-checkbox-clear"></div>')),"LABEL"==$this.parent().prop("tagName")&&void 0==$this.parent().attr("for")&&($this.parent().attr("for",$this.attr("id")),$this.parent().append('<div class="regular-checkbox-box"></div>')),$this.addClass("regular-checkbox");else"radio"==$this.attr("type")&&("radio"==$this.parent().parent().attr("class")&&$this.parent().parent().addClass("regular-radio-container"),"LABEL"==$this.parent().prop("tagName")&&void 0==$this.parent().attr("for")&&($this.parent().attr("for",$this.attr("id")),$this.parent().append('<div class="regular-radio-button"></div>')),$this.addClass("regular-radio"))})},a.fn.flatelements.defaults={}}(jQuery),function(a){a.fn.loader=function(b){function c(b){var c='<div class="modal" id="loaderModal"><div class="modal-dialog modal-dialog-extra-small" style=""><div class="modal-content"><div class="modal-header"><h4 class="modal-title" id="myModalLabel">'+b+'</h4></div><div class="modal-body text-center"><div class="loader" style="padding: 0 0 20px 0"><div class="sk-spinner sk-spinner-three-bounce"><div class="sk-bounce1"></div><div class="sk-bounce2"></div><div class="sk-bounce3"></div></div></div></div></div></div>';a("body").append(c),a("#loaderModal").modal({backdrop:"static",keyboard:!1,show:!0})}a.extend({},a.fn.loader.defaults,b);return this.each(function(){$this=a(this),$this.unbind(),$this.click(function(){c($this.data("message"))})})},a.fn.loader.defaults={}}(jQuery);var currentLoadedJavaScripts=new HashTable;$.fn.modal.Constructor.prototype.enforceFocus=function(){var a=this;$(document).on("focusin.modal",function(b){return!(!$(b.target).hasClass("select2-input")&&!$(b.target).hasClass("hexInput"))||void(a.$element[0]===b.target||a.$element.has(b.target).length||a.$element.focus())})},$(document).ready(function(){$("#globalModal").on("hidden.bs.modal",function(a){$(this).removeData("bs.modal"),$(this).html('<div class="modal-dialog"><div class="modal-content"><div class="modal-body">\n<div class="loader"><div class="sk-spinner sk-spinner-three-bounce"><div class="sk-bounce1"></div><div class="sk-bounce2"></div><div class="sk-bounce3"></div></div></div></div></div></div>')}),setModalHandler(),initPlugins(),$("a[data-ui-loader], button[data-ui-loader]").on("click",function(){var a=$(this);if(a.find(".loader").length)return!1;var b=a.css("color")||"#ffffff",c=$('<span class="loader"><span class="sk-spinner sk-spinner-three-bounce"><span class="sk-bounce1"></span><span class="sk-bounce2"></span><span class="sk-bounce3"></span></span></span>');c.find(".sk-bounce1, .sk-bounce2, .sk-bounce3").addClass("disabled").css({"background-color":b,width:"10px",height:"10px"}),a.css("overflow","hidden"),a.addClass("disabled"),a.css("min-width",this.getBoundingClientRect().width),a.data("text",a.text()),a.html(c)}),$(document).on("afterValidate",function(a,b,c){c.length&&$("[data-ui-loader]").each(function(){var a=$(this);a.find(".loader").length&&(a.html(a.data("text")),a.removeClass("disabled"))})})}),$(document).ajaxComplete(function(a,b,c){initPlugins(),setModalHandler()}),$("#globalModal").on("shown.bs.modal",function(a){$(".modal-dialog").css("width","300px")}),$(document).on("show.bs.modal",".modal",function(a){$(this).appendTo($("body"))}),$(document).on("shown.bs.modal",".modal.in",function(a){setModalsAndBackdropsOrder()}),$(document).on("hidden.bs.modal",".modal",function(a){setModalsAndBackdropsOrder()}),$.fn.format=function(a){var b=$(this).attr("id"),c=function(){var c=$("#"+b).val();if(""!=c){if("daytime"==a.type){if(c<=23)for(var d=1;d<24;d++)c==d&&(c=d+":00");c>23&&c<=59&&(c="0:"+c)}c>=60&&c<1e3&&(c=c.substr(0,1)+":"+c.substr(1,2)),c>=1e3&&c<1e4&&(c=c.substr(0,2)+":"+c.substr(2,3)),0==a.zero&&"0:00"==c&&(c="");var e=c,f=e.split(":");return c.length<5&&f[0]<10&&(c="0"+f[0]+":"+f[1]),c}};$("#"+b).focusout(function(){"euro"==a.type?$("#"+b).val(setEuroFormat()):$("#"+b).val(c())})};var humhub=humhub||function(a){var b={},c=[],d=!1,e=function(b,e){var h=g(b,!0);h.id="humhub.modules."+i(b),h.require=f,h["export"]=function(b){a.extend(h,b)};try{e(h,f,a)}catch(j){console.error("Error while creating module: "+b,j)}d?h.init():c.push(h)},f=function(a){var b=g(a);return b||console.warn("No module found for id: "+a),b},g=function(c,d){try{var e=i(c),f=b;return a.each(e.split("."),function(a,b){if(b in f)f=f[b];else{if(!d)return f=void 0,!1;f=f[b]={}}}),f}catch(g){return}},h={get:function(a,b,c){if(1===arguments.length)return this.getModuleConfig(a);if(l(b)){var d=this.getModuleConfig(a)[b];return l(d)?d:c}},getModuleConfig:function(a){return this[a]||(this[a]={}),this[a]},is:function(a,b,c){return this.get(a,b,c)===!0},set:function(b,c,d){if(1===arguments.length){var e=this;a.each(b,function(a,b){e.set(a,b)})}else 2===arguments.length?a.extend(this.getModuleConfig(b),c):3===arguments.length&&(this.getModuleConfig(b)[c]=d)}},i=function(a){return j(j(a,"humhub."),"modules.")},j=function(a,b){return k(a,b)?a.substring(b.length,a.length):a},k=function(a,b){return!(!a||!b)&&0===a.indexOf(b)},l=function(a){return"undefined"!=typeof a};return a(document).ready(function(){a.each(c,function(a,b){if(b.init)try{b.init()}catch(c){console.error("Could not initialize module: "+b.id,c)}d=!0,console.log("Module initialized: "+b.id)})}),{initModule:e,modules:b,config:h}}($);humhub.initModule("util",function(a,b,c){var d={isFunction:function(a){return c.isFunction(a)},isObject:function(a){return c.isPlainObject(a)},isJQuery:function(a){return this.isDefined(a)&&a.jquery},isArray:function(a){return c.isArray(a)},isEmpty:function(a){return c.isEmptyObject(a)},isString:function(a){return"string"==typeof a},isNumber:function(a){return this.isDefined(a)&&!isNaN(parseFloat(a))&&isFinite(a)},isBoolean:function(a){return"boolean"==typeof a},isDefined:function(a){if(arguments.length>1){var b=!0,c=this;return this.each(arguments,function(a,b){if(!c.isDefined(b))return!1}),b}return"undefined"!=typeof a},inherits:function(a,b){a.prototype=Object.create(b.prototype),a._super=b.prototype}},e={cutprefix:function(a,b){return this.startsWith(a,b)?a.substring(b.length,a.length):a},cutsuffix:function(a,b){return a.slice(0,b.length*-1)},startsWith:function(a,b){return!(!d.isDefined(a)||!d.isDefined(b))&&0===a.indexOf(b)},endsWith:function(a,b){return!(!d.isDefined(a)||!d.isDefined(b))&&a.indexOf(b,a.length-b.length)!==-1}};a["export"]({object:d,string:e})}),humhub.initModule("additions",function(a,b,c){var d={};a.registerAddition=function(a,b){d[a]||(d[a]=[]),d[a].push(b)},a.applyTo=function(a){var b=c(a);c.each(d,function(a,d){c.each(d,function(d,e){c.each(b.find(a).addBack(a),function(){try{var d=c(this);e.apply(d,[d,b])}catch(f){console.error("Error while applying addition "+e+" on selector "+a)}})})})},a.init=function(){}}),humhub.initModule("client",function(a,b,c){var d=b("util").object,e=function(){},f=function(a){c.extend(this,a)};f.prototype.isConfirmation=function(){return 0===this.getStatus()},f.prototype.isError=function(){return this.getStatus()>0||this.getErrors().length},f.prototype.getStatus=function(){return this.status?this.status:-1},f.prototype.getFirstError=function(){var a=this.getErrors();if(a.length)return a[0]},f.prototype.setAjaxError=function(a,b,c,d,e){this.xhr=a,this.textStatus=c,this.status=e||a.status,this.errors=[b]},f.prototype.getErrors=function(){var a=this.errors||[];return d.isString(a)?[a]:a},f.prototype.toString=function(){return"{ status: "+this.getStatus()+" error: "+this.getErrors()+" data: "+this.getContent()+" }"};var g=function(a,b){var b=b||{};a=d.isString(a)?c(a):a,b.type=a.attr("method")||"post",b.data=a.serialize(),i(a.attr("action"),b)},h=function(a,b){var b=b||{};return b.type="POST",b.method="POST",i(a,b)},i=function(a,b){var e=new Promise(function(g,h){b=b||{};var i=b.error,j=function(a,b,c,e,g){if(i&&d.isFunction(i)){var j=new f;j.setAjaxError(a,c,b,e,g),i(j)}h(a,b,c,e,g)},k=b.success,l=function(a,b,d){var h=new f(a);return h.isError()?j(d,"application",h.getErrors(),a,h.getStatus()):(k&&(h.textStatus=b,h.xhr=d,k(h)),g(h),void e.then(function(){c(document).trigger("ajaxComplete")}))};b.success=l,b.error=j,b.url=a,b.dataType=b.dataType||"json",c.ajax(b)});return e};a["export"]({ajax:i,post:h,submit:g,init:e})}),humhub.initModule("ui",function(a,b,c){var d=b("additions");a.init=function(){d.registerAddition(".autosize",function(a){a.autosize()})}}),humhub.initModule("ui.modal",function(a,b,c){var d=b("util").object,e=b("additions"),f=humhub.config.getModuleConfig("ui.modal"),g=[],h='<div class="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none; background:rgba(0,0,0,0.1)"><div class="modal-dialog"><div class="modal-content"></div></div></div>',i='<div class="modal-header"><button type="button" class="close" data-modal-close="true" aria-hidden="true">×</button><h4 class="modal-title"></h4></div>',j='<div class="modal-body"></div>',k="Error",l="An unknown error occured!",m=function(a){this.$modal=c("#"+a),this.$modal.length||this.createModal(a),this.initModal(),g.push(this)};m.prototype.createModal=function(a){this.$modal=c(h).attr("id",a),c("body").append(this.$modal)},m.prototype.initModal=function(){this.reset();var a=this;this.getDialog().on("click","[data-modal-close]",function(){a.close()}).on("click","[data-modal-clear-error]",function(){a.clearErrorMessage()})},m.prototype.close=function(){var a=this;this.$modal.fadeOut("fast",function(){a.$modal.modal("hide"),a.reset()})},m.prototype.loader=function(){this.reset(),this.show()},m.prototype.reset=function(){this.setBody('<div class="loader"><div class="sk-spinner sk-spinner-three-bounce"><div class="sk-bounce1"></div><div class="sk-bounce2"></div><div class="sk-bounce3"></div></div></div>'),this.isFilled=!1},m.prototype.content=function(a,b){try{var c=this;this.clearErrorMessage(),this.getContent().html(a).promise().always(function(){e.applyTo(c.getContent()),!b||b(this.$modal)}),this.isFilled=!0}catch(d){console.error("Error while setting modal content",d),this.setErrorMessage(d.message),e.applyTo(c.$modal)}},m.prototype.error=function(a,b){1===arguments.length&&a&&(b=a.getFirstError?a.getFirstError():a,a=a.getErrorTitle?a.getErrorTitle():k),a=a||k,b=b||l,this.isFilled?this.setErrorMessage(b):(this.clear(),this.setTitle(a),this.setBody(""),this.setErrorMessage(b),this.show())},m.prototype.clearErrorMessage=function(){var a=this.getErrorMessage();a.length&&a.fadeOut("fast",function(){a.remove()})},m.prototype.setErrorMessage=function(a){var b=this.getErrorMessage();b.length?(b.css("opacity",0),b.text(a),b.animate({opacity:1},"fast")):this.getBody().prepend('<div class="modal-error alert alert-danger">'+a+"</div>")},m.prototype.getErrorMessage=function(){return this.getContent().find(".modal-error")},m.prototype.show=function(){this.$modal.modal("show")},m.prototype.clear=function(){this.getContent().empty()},m.prototype.getContent=function(){return this.$modal.find(".modal-content:first")},m.prototype.getDialog=function(){return this.$modal.find(".modal-dialog")},m.prototype.getForm=function(){return this.$modal.find("form")},m.prototype.setTitle=function(a){var b=this.getHeader();b.length||(this.getContent().prepend(c(i)),b=this.getHeader()),b.find(".modal-title").html(a)},m.prototype.setBody=function(a){var b=this.getBody();b.length||(this.getContent().append(c(j)),b=this.getBody()),b.html(a)},m.prototype.getHeader=function(){return this.$modal.find(".modal-header");
|
||
},m.prototype.getBody=function(){return this.$modal.find(".modal-body")};var n=function(a,b){m.call(this,a)};d.inherits(n,m),n.prototype.open=function(a){this.clear(),a.header=a.header||f.defaultConfirmHeader,a.body=a.body||f.defaultConfirmBody,a.confirmText=a.confirmText||f.defaultConfirmText,a.cancleText=a.cancleText||f.defaultCancelText,this.setTitle(a.header),this.setBody(a.body),this.initButtons(a),this.show()},n.prototype.clear=function(a){this.$modal.find("[data-modal-confirm]").off("click"),this.$modal.find("[data-modal-cancel]").off("click")},n.prototype.initButtons=function(a){var b=this.$modal.find("[data-modal-cancel]");b.text(a.cancleText);var c=this.$modal.find("[data-modal-confirm]");c.text(a.confirmText);var d=this;a.confirm&&c.one("click",function(b){d.clear(),a.confirm(b)}),a.cancel&&b.one("click",function(b){d.clear(),a.cancel(b)})},a["export"]({init:function(){a.global=new m("globalModal"),a.globalConfirm=new n("globalModalConfirm"),a.confirm=function(b){a.globalConfirm.open(b)}},Modal:m})}),humhub.initModule("actions",function(a,b,c){var d={},e=b("util").object,f=b("util").string,g=b("client"),h="action-component",i="[data-"+h+"]",j=function(a){a&&(this.$=e.isString(a)?c("#"+a):a,this.base=this.$.data(h))};j.prototype.data=function(a){var b=this.$.data(a);if(!b){var c=this.parent();if(c)return c.data(a)}return b},j.prototype.parent=function(){var a=this.$.parent().closest(i);if(a.length)try{var c=b(a.data(h));return new c(a)}catch(d){console.error("Could not instantiate parent component: "+a.data(h))}},j.prototype.children=function(){var a=[];return this.$.find(i).each(function(){var b=j.getInstance(c(this));b&&a.push(b)}),a},j.prototype.hasAction=function(a){return this.actions().indexOf(a)>=0},j.prototype.actions=function(){return[]},j.getInstance=function(a){a=e.isString(a)?c("#"+a):a;var d=a.data(h)?a:j.getClosestComponentNode(a),f=d.data(h),g=b(f);return g?new g(d):void console.error("Tried to instantiate component with invalid type: "+f)},j.getClosestComponentNode=function(a){return a.closest(i)},j.handleAction=function(a){var b=j.getInstance(a.$trigger);return!!(b&&a.handler&&b[a.handler])&&(b[a.handler](a),!0)},a.init=function(){this.bindAction(document,"click","[data-action-click]"),this.bindAction(document,"dblclick","[data-action-dblclick]"),this.bindAction(document,"change","[data-action-mouseout]"),b("additions").registerAddition("[data-action-load-button]",function(){var a=this;this.on("click.humhub-action-load-button",function(b){a.find(".action-loader").length||a.append('<span class="action-loader"><i class="fa fa-spinner fa-pulse"></i></span>')})})},a.registerHandler=function(a,b){a&&b&&(d[a]=b)},a.registerAjaxHandler=function(a,b,f,h){h=h||{},a&&(e.isFunction(b)?(h.success=b,h.error=f):h=b,b&&(d[a]=function(a){var b=c(this).data("action-url-"+a.type)||c(this).data("action-url");g.ajax(b,h)}))},a.bindAction=function(a,g,h,i){a=a||document;var l=a.jquery?a:c(a);l.on(g+".humhub-action",h,function(a){a.preventDefault(),$trigger=c(this);var h=$trigger.data("action-"+g),l={type:g,$trigger:$trigger,handler:h};l.finish=function(){k(a)};try{if(e.isFunction(i))return void i.apply($trigger,[l]);if(j.handleAction(l))return;if(d[h]){var m=d[h];return void m.apply($trigger,[l])}var n=h.split("."),m=n[n.length-1],o=b(f.cutsuffix(h,"."+m));e.isFunction(o)?o[m]({type:g,$trigger:$trigger}):console.error("Could not determine actionhandler for: "+h)}catch(p){console.error('Error while handling action event for handler "'+h+'"',p),k(a)}})};var k=function(a){a.target&&($target=c(a.target),$loader=$target.find(".action-loader"),$loader.length&&$loader.remove())};a["export"]({Component:j})}),humhub.initModule("content",function(a,b,c){var d=b("client"),e=b("util").object,f=b("actions"),g=f.Component,h="content-key",i="content-edit-url",j="[data-content-save]",k="content-delete-url",l=function(a){g.call(this,a)};e.inherits(l,g),l.prototype.actions=function(){return["create","edit","delete"]},l.prototype.getKey=function(){return this.$.data(h)},l.prototype.create=function(a){this.hasAction("create")||this.edit(a)},l.prototype.edit=function(a){if(this.hasAction("edit")){var c=this.data(i),g=this.getKey(),h=b("ui.modal").global;if(!c)return void console.error("No editUrl found for edit content action editUrl: "+c+" contentId "+g);var k=this;d.ajax(c,{data:{id:g},beforeSend:function(){h.loader()},success:function(b){h.content(b.getContent(),function(){f.bindAction(h.getBody(),"click",j,function(b){d.submit(h.getForm(),{success:function(c){e.isFunction(a)?a(c,h)&&h.close():(k.replaceContent(c.getContent()),h.close()),b.finish()},error:function(a){h.error(a),console.error("Error while submitting form :"+a),b.finish()}})})})},error:function(a){h.error(a),console.log("Error occured while editing content: "+a.getFirstError())}})}},l.prototype["delete"]=function(){if(this.hasAction("delete")){var a=this;b("ui.modal").confirm({confirm:function(){var b=a.data(k);b?d.post(b,{data:{id:a.getKey()}}).then(function(b){a.remove()})["catch"](function(a){console.error("Error removing content",a)}):console.error("Content delete was called, but no url could be determined for "+this.base)}})}},l.prototype.remove=function(){var a=this;this.$.animate({height:"toggle",opacity:"toggle"},"fast",function(){a.$.remove()})},a["export"]({Content:l})}),function(){"use strict";var a;a=function(a,b){var c,d,e,f,g=this;return this.options=$.extend({gallery_parent_selector:"*:not(.row)",title:null,footer:null,remote:null,left_arrow_class:".glyphicon .glyphicon-chevron-left",right_arrow_class:".glyphicon .glyphicon-chevron-right",directional_arrows:!0,type:null,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},id:!1},b||{}),this.$element=$(a),c="",this.modal_id=this.options.modal_id?this.options.modal_id:"ekkoLightbox-"+Math.floor(1e3*Math.random()+1),e='<div class="modal-header"'+(this.options.title?"":' style="display:none"')+'><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title">'+this.options.title+"</h4></div>",d='<div class="modal-footer"'+(this.options.footer?"":' style="display:none"')+">"+this.options.footer+"</div>",$(document.body).append('<div id="'+this.modal_id+'" class="ekko-lightbox modal" tabindex="-1"><div class="modal-dialog" style="margin-top: 0 !important"><div class="modal-content">'+e+'<div class="modal-body"><div class="ekko-lightbox-container"><div></div></div></div>'+d+"</div></div></div>"),this.modal=$("#"+this.modal_id),this.modal_body=this.modal.find(".modal-body").first(),this.lightbox_container=this.modal_body.find(".ekko-lightbox-container").first(),this.lightbox_body=this.lightbox_container.find("> div:first-child").first(),this.modal_arrows=null,this.padding={left:parseFloat(this.modal_body.css("padding-left"),10),right:parseFloat(this.modal_body.css("padding-right"),10),bottom:parseFloat(this.modal_body.css("padding-bottom"),10),top:parseFloat(this.modal_body.css("padding-top"),10)},this.options.remote?(this.gallery=this.$element.data("gallery"),this.gallery&&("document.body"===this.options.gallery_parent_selector||""===this.options.gallery_parent_selector?this.gallery_items=$(document.body).find('*[data-toggle="lightbox"][data-gallery="'+this.gallery+'"]'):this.gallery_items=this.$element.parents(this.options.gallery_parent_selector).first().find('*[data-toggle="lightbox"][data-gallery="'+this.gallery+'"]'),this.gallery_index=this.gallery_items.index(this.$element),$(document).on("keydown.ekkoLightbox",this.navigate.bind(this)),this.options.directional_arrows&&(this.lightbox_container.prepend('<div class="ekko-lightbox-nav-overlay"><a href="#" class="'+this.strip_stops(this.options.left_arrow_class)+'"></a><a href="#" class="'+this.strip_stops(this.options.right_arrow_class)+'"></a></div>'),this.modal_arrows=this.lightbox_container.find("div.ekko-lightbox-nav-overlay").first(),this.lightbox_container.find("a"+this.strip_spaces(this.options.left_arrow_class)).on("click",function(a){return a.preventDefault(),g.navigate_left()}),this.lightbox_container.find("a"+this.strip_spaces(this.options.right_arrow_class)).on("click",function(a){return a.preventDefault(),g.navigate_right()}))),this.options.type?"image"===this.options.type?this.preloadImage(this.options.remote,!0):"youtube"===this.options.type&&(f=this.getYoutubeId(this.options.remote))?this.showYoutubeVideo(f):"vimeo"===this.options.type?this.showVimeoVideo(this.options.remote):this.error('Could not detect remote target type. Force the type using data-type="image|youtube|vimeo"'):this.detectRemoteType(this.options.remote)):this.error("No remote target given"),this.modal.on("show.bs.modal",this.options.onShow.bind(this)).on("shown.bs.modal",function(){return g.modal_arrows&&g.resize(g.lightbox_body.width()),g.options.onShown.call(g)}).on("hide.bs.modal",this.options.onHide.bind(this)).on("hidden.bs.modal",function(){return g.gallery&&$(document).off("keydown.ekkoLightbox"),g.modal.remove(),g.options.onHidden.call(g)}).modal("show",b),this.modal},a.prototype={strip_stops:function(a){return a.replace(/\./g,"")},strip_spaces:function(a){return a.replace(/\s/g,"")},isImage:function(a){return a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSwf:function(a){return a.match(/\.(swf)((\?|#).*)?$/i)},getYoutubeId:function(a){var b;return b=a.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/),!(!b||11!==b[2].length)&&b[2]},getVimeoId:function(a){return a.indexOf("vimeo")>0&&a},navigate:function(a){if(a=a||window.event,39===a.keyCode||37===a.keyCode){if(39===a.keyCode)return this.navigate_right();if(37===a.keyCode)return this.navigate_left()}},navigate_left:function(){var a;return 0===this.gallery_index?this.gallery_index=this.gallery_items.length-1:this.gallery_index--,this.$element=$(this.gallery_items.get(this.gallery_index)),this.updateTitleAndFooter(),a=this.$element.attr("data-remote")||this.$element.attr("href"),this.detectRemoteType(a)},navigate_right:function(){var a,b;if(this.gallery_index===this.gallery_items.length-1?this.gallery_index=0:this.gallery_index++,this.$element=$(this.gallery_items.get(this.gallery_index)),b=this.$element.attr("data-remote")||this.$element.attr("href"),this.updateTitleAndFooter(),this.detectRemoteType(b),this.gallery_index+1<this.gallery_items.length&&(a=$(this.gallery_items.get(this.gallery_index+1),!1),b=a.attr("data-remote")||a.attr("href"),this.isImage(b)))return this.preloadImage(b,!1)},detectRemoteType:function(a){var b;return this.isImage(a)?this.preloadImage(a,!0):(b=this.getYoutubeId(a))?this.showYoutubeVideo(b):(b=this.getVimeoId(a))?this.showVimeoVideo(b):this.error('Could not detect remote target type. Force the type using data-type="image|youtube|vimeo"')},updateTitleAndFooter:function(){var a,b,c,d;return c=this.modal.find(".modal-dialog .modal-content .modal-header"),b=this.modal.find(".modal-dialog .modal-content .modal-footer"),d=this.$element.data("title")||"",a=this.$element.data("footer")||"",d?c.css("display","").find(".modal-title").html(d):c.css("display","none"),a?b.css("display","").html(a):b.css("display","none"),this},showLoading:function(){return this.lightbox_body.html('<div class="modal-loading"><br><div class="loader"><div class="sk-spinner sk-spinner-three-bounce"><div class="sk-bounce1"></div><div class="sk-bounce2"></div><div class="sk-bounce3"></div></div></div></div>'),this},showYoutubeVideo:function(a){if(this.resize(560),this.lightbox_body.html('<iframe width="560" height="315" src="//www.youtube.com/embed/'+a+'?badge=0&autoplay=1" frameborder="0" allowfullscreen></iframe>'),this.modal_arrows)return this.modal_arrows.css("display","none")},showVimeoVideo:function(a){if(this.resize(500),this.lightbox_body.html('<iframe width="500" height="281" src="'+a+'?autoplay=1" frameborder="0" allowfullscreen></iframe>'),this.modal_arrows)return this.modal_arrows.css("display","none")},error:function(a){return this.lightbox_body.html(a),this},preloadImage:function(a,b){var c,d=this;if(d.showLoading(),c=new Image,null==b||b===!0){var e=700,f=700;c.onload=function(){var a,b=c.width,a=$("<img />");return a.attr("src",c.src),a.css("max-width",e+"px"),a.css("max-height",f+"px"),a.css("width","auto"),a.css("height","auto"),a.css("display","block"),a.css("margin","auto"),d.lightbox_body.html(a),d.modal_arrows&&d.modal_arrows.css("display","block"),d.resize(b<e?b:e)},c.onerror=function(){return d.error("Failed to load image: "+a)}}return c.src=a,c},resize:function(a){var b;return b=a+this.padding.left+this.padding.right,console.log("width: "+a+" incPadding: "+b),this.modal.find(".modal-content").animate({width:b},200),this.modal.find(".modal-dialog").animate({width:b+20},200),this.lightbox_container.find("a").css("padding-top",function(){}),this},checkImageDimensions:function(a){var b,c;return b=$(window),c=a,a+(this.padding.left+this.padding.right+20)>b.width()&&(c=b.width()-(this.padding.left+this.padding.right+20)),c-20},close:function(){return this.modal.modal("hide")}},$.fn.ekkoLightbox=function(b){return this.each(function(){var c;return c=$(this),b=$.extend({remote:c.attr("data-remote")||c.attr("href"),gallery_parent_selector:c.attr("data-parent"),type:c.attr("data-type")},b,c.data()),new a(this,b),this})},$(document).delegate('*[data-toggle="lightbox"]',"click",function(a){var b;return a.preventDefault(),b=$(this),b.ekkoLightbox({remote:b.attr("data-remote")||b.attr("href"),gallery_parent_selector:b.attr("data-parent"),onShown:function(){if(window.console)return console.log("Checking our the events huh?")}}).one("hide",function(){return b.is(":visible")&&b.focus()})})}.call(this),jQuery.fn.highlight=function(a){function b(a,c){var d=0;if(3==a.nodeType){var e=a.data.toUpperCase().indexOf(c);if(0<=e){d=document.createElement("span"),d.className="highlight",e=a.splitText(e),e.splitText(c.length);var f=e.cloneNode(!0);d.appendChild(f),e.parentNode.replaceChild(d,e),d=1}}else if(1==a.nodeType&&a.childNodes&&!/(script|style)/i.test(a.tagName))for(e=0;e<a.childNodes.length;++e)e+=b(a.childNodes[e],c);return d}return this.length&&a&&a.length?this.each(function(){b(this,a.toUpperCase())}):this},jQuery.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){with(this.parentNode.firstChild.nodeName,this.parentNode)replaceChild(this.firstChild,this),normalize()}).end()},!function(a){function b(b,c){var d;return a.Notification?d=new a.Notification(b,{icon:s(c.icon)?c.icon:c.icon.x32,body:c.body||o,tag:c.tag||o}):a.webkitNotifications?(d=a.webkitNotifications.createNotification(c.icon,b,c.body),d.show()):navigator.mozNotification?(d=navigator.mozNotification.createNotification(b,c.body,c.icon),d.show()):a.external&&a.external.msIsSiteMode()&&(a.external.msSiteModeClearIconOverlay(),a.external.msSiteModeSetIconOverlay(s(c.icon)?c.icon:c.icon.x16,b),a.external.msSiteModeActivate(),d={ieVerification:q+1}),d}function c(b){return{close:function(){b&&(b.close?b.close():a.external&&a.external.msIsSiteMode()&&b.ieVerification===q&&a.external.msSiteModeClearIconOverlay())}}}function d(b){if(p){var c=r(b)?b:v;a.webkitNotifications&&a.webkitNotifications.checkPermission?a.webkitNotifications.requestPermission(c):a.Notification&&a.Notification.requestPermission&&a.Notification.requestPermission(c)}}function e(){var b;if(p)return a.Notification&&a.Notification.permissionLevel?b=a.Notification.permissionLevel():a.webkitNotifications&&a.webkitNotifications.checkPermission?b=l[a.webkitNotifications.checkPermission()]:a.Notification&&a.Notification.permission?b=a.Notification.permission:navigator.mozNotification?b=j:a.external&&void 0!==a.external.msIsSiteMode()&&(b=a.external.msIsSiteMode()?j:i),b}function f(a){return a&&t(a)&&u(w,a),w}function g(){return!w.pageVisibility||(document.hidden||document.msHidden||document.mozHidden||document.webkitHidden)}function h(d,f){var h,i;return p&&g()&&s(d)&&f&&(s(f.icon)||t(f.icon))&&e()===j&&(h=b(d,f)),i=c(h),w.autoClose&&h&&!h.ieVerification&&h.addEventListener&&h.addEventListener("show",function(){var b=i;a.setTimeout(function(){b.close()},w.autoClose)}),i}var i="default",j="granted",k="denied",l=[j,i,k],m={pageVisibility:!1,autoClose:0},n={},o="",p=function(){var b=!1;try{b=!!(a.Notification||a.webkitNotifications||navigator.mozNotification||a.external&&void 0!==a.external.msIsSiteMode())}catch(c){}return b}(),q=Math.floor(10*Math.random()+1),r=function(a){return a&&a.constructor===Function},s=function(a){return a&&a.constructor===String},t=function(a){return a&&a.constructor===Object},u=function(a,b){var c,d;for(c in b)d=b[c],c in a&&(a[c]===d||c in n&&n[c]===d)||(a[c]=d);return a},v=function(){},w=m;a.notify={PERMISSION_DEFAULT:i,PERMISSION_GRANTED:j,PERMISSION_DENIED:k,isSupported:p,config:f,createNotification:h,permissionLevel:e,requestPermission:d},r(Object.seal)&&Object.seal(a.notify)}(window),notify.isSupported&&(notify.config({pageVisibility:!1,autoClose:5e3}),notify.permissionLevel()!=notify.PERMISSION_GRANTED&¬ify.requestPermission()),/*! jquery.nicescroll 3.6.6 InuYaksa*2015 MIT http://nicescroll.areaaperta.com */
|
||
function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){var b=!1,c=!1,d=0,e=2e3,f=0,g=["webkit","ms","moz","o"],h=window.requestAnimationFrame||!1,i=window.cancelAnimationFrame||!1;if(!h)for(var j in g){var k=g[j];h||(h=window[k+"RequestAnimationFrame"]),i||(i=window[k+"CancelAnimationFrame"]||window[k+"CancelRequestAnimationFrame"])}var l=window.MutationObserver||window.WebKitMutationObserver||!1,m={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"5px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:24,touchbehavior:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var a=document.getElementsByTagName("script"),a=a.length?a[a.length-1].src.split("?")[0]:"";return 0<a.split("/").length?a.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0},n=!1,o=function(){if(n)return n;var a=document.createElement("DIV"),b=a.style,c=navigator.userAgent,d=navigator.platform,e={haspointerlock:"pointerLockElement"in document||"webkitPointerLockElement"in document||"mozPointerLockElement"in document};e.isopera="opera"in window,e.isopera12=e.isopera&&"getUserMedia"in navigator,e.isoperamini="[object OperaMini]"===Object.prototype.toString.call(window.operamini),e.isie="all"in document&&"attachEvent"in a&&!e.isopera,e.isieold=e.isie&&!("msInterpolationMode"in b),e.isie7=e.isie&&!e.isieold&&(!("documentMode"in document)||7==document.documentMode),e.isie8=e.isie&&"documentMode"in document&&8==document.documentMode,e.isie9=e.isie&&"performance"in window&&9<=document.documentMode,e.isie10=e.isie&&"performance"in window&&10==document.documentMode,e.isie11="msRequestFullscreen"in a&&11<=document.documentMode,e.isieedge=navigator.userAgent.match(/Edge\/12\./),e.isie9mobile=/iemobile.9/i.test(c),e.isie9mobile&&(e.isie9=!1),e.isie7mobile=!e.isie9mobile&&e.isie7&&/iemobile/i.test(c),e.ismozilla="MozAppearance"in b,e.iswebkit="WebkitAppearance"in b,e.ischrome="chrome"in window,e.ischrome22=e.ischrome&&e.haspointerlock,e.ischrome26=e.ischrome&&"transition"in b,e.cantouch="ontouchstart"in document.documentElement||"ontouchstart"in window,e.hasmstouch=window.MSPointerEvent||!1,e.hasw3ctouch=(window.PointerEvent||!1)&&(0<navigator.MaxTouchPoints||0<navigator.msMaxTouchPoints),e.ismac=/^mac$/i.test(d),e.isios=e.cantouch&&/iphone|ipad|ipod/i.test(d),e.isios4=e.isios&&!("seal"in Object),e.isios7=e.isios&&"webkitHidden"in document,e.isandroid=/android/i.test(c),e.haseventlistener="addEventListener"in a,e.trstyle=!1,e.hastransform=!1,e.hastranslate3d=!1,e.transitionstyle=!1,e.hastransition=!1,e.transitionend=!1,d=["transform","msTransform","webkitTransform","MozTransform","OTransform"];for(c=0;c<d.length;c++)if("undefined"!=typeof b[d[c]]){e.trstyle=d[c];break}e.hastransform=!!e.trstyle,e.hastransform&&(b[e.trstyle]="translate3d(1px,2px,3px)",e.hastranslate3d=/translate3d/.test(b[e.trstyle])),e.transitionstyle=!1,e.prefixstyle="",e.transitionend=!1;for(var d="transition webkitTransition msTransition MozTransition OTransition OTransition KhtmlTransition".split(" "),f=" -webkit- -ms- -moz- -o- -o -khtml-".split(" "),g="transitionend webkitTransitionEnd msTransitionEnd transitionend otransitionend oTransitionEnd KhtmlTransitionEnd".split(" "),c=0;c<d.length;c++)if(d[c]in b){e.transitionstyle=d[c],e.prefixstyle=f[c],e.transitionend=g[c];break}e.ischrome26&&(e.prefixstyle=f[1]),e.hastransition=e.transitionstyle;a:{for(c=["-webkit-grab","-moz-grab","grab"],(e.ischrome&&!e.ischrome22||e.isie)&&(c=[]),d=0;d<c.length;d++)if(f=c[d],b.cursor=f,b.cursor==f){b=f;break a}b="url(//mail.google.com/mail/images/2/openhand.cur),n-resize"}return e.cursorgrabvalue=b,e.hasmousecapture="setCapture"in a,e.hasMutationObserver=!1!==l,n=e},p=function(g,j){function k(){var a=t.doc.css(v.trstyle);return!(!a||"matrix"!=a.substr(0,6))&&a.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}function n(){var a=t.win;if("zIndex"in a)return a.zIndex();for(;0<a.length&&9!=a[0].nodeType;){var b=a.css("zIndex");if(!isNaN(b)&&0!=b)return parseInt(b);a=a.parent()}return!1}function p(a,b,c){return b=a.css(b),a=parseFloat(b),isNaN(a)?(a=z[b]||0,c=3==a?c?t.win.outerHeight()-t.win.innerHeight():t.win.outerWidth()-t.win.innerWidth():1,t.isie8&&a&&(a+=1),c?a:0):a}function r(a,b,c,d){t._bind(a,b,function(d){d=d?d:window.event;var e={original:d,target:d.target||d.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==d.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return d.preventDefault?d.preventDefault():d.returnValue=!1,!1},stopImmediatePropagation:function(){d.stopImmediatePropagation?d.stopImmediatePropagation():d.cancelBubble=!0}};return"mousewheel"==b?(e.deltaY=-.025*d.wheelDelta,d.wheelDeltaX&&(e.deltaX=-.025*d.wheelDeltaX)):e.deltaY=d.detail,c.call(a,e)},d)}function s(a,b,c){var d,e;if(0==a.deltaMode?(d=-Math.floor(t.opt.mousescrollstep/54*a.deltaX),e=-Math.floor(t.opt.mousescrollstep/54*a.deltaY)):1==a.deltaMode&&(d=-Math.floor(a.deltaX*t.opt.mousescrollstep),e=-Math.floor(a.deltaY*t.opt.mousescrollstep)),b&&t.opt.oneaxismousemode&&0==d&&e&&(d=e,e=0,c&&(0>d?t.getScrollLeft()>=t.page.maxw:0>=t.getScrollLeft())&&(e=d,d=0)),d&&(t.scrollmom&&t.scrollmom.stop(),t.lastdeltax+=d,t.debounced("mousewheelx",function(){var a=t.lastdeltax;t.lastdeltax=0,t.rail.drag||t.doScrollLeftBy(a)},15)),e){if(t.opt.nativeparentscrolling&&c&&!t.ispage&&!t.zoomactive)if(0>e){if(t.getScrollTop()>=t.page.maxh)return!0}else if(0>=t.getScrollTop())return!0;t.scrollmom&&t.scrollmom.stop(),t.lastdeltay+=e,t.debounced("mousewheely",function(){var a=t.lastdeltay;t.lastdeltay=0,t.rail.drag||t.doScrollBy(a)},15)}return a.stopImmediatePropagation(),a.preventDefault()}var t=this;if(this.version="3.6.6",this.name="nicescroll",this.me=j,this.opt={doc:a("body"),win:!1},a.extend(this.opt,m),this.opt.snapbackspeed=80,g)for(var u in t.opt)"undefined"!=typeof g[u]&&(t.opt[u]=g[u]);this.iddoc=(this.doc=t.opt.doc)&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/^BODY|HTML/.test(t.opt.win?t.opt.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==t.opt.win,this.win=t.opt.win||(this.ispage?a(window):this.doc),this.docscroll=this.ispage&&!this.haswrapper?a(window):this.win,this.body=a("body"),this.iframe=this.isfixed=this.viewport=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=t.opt.autohidemode,this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,this.isrtlmode="auto"==this.opt.rtlmode?"rtl"==(this.win[0]==window?this.body:this.win).css("direction"):!0===this.opt.rtlmode,this.observerbody=this.observerremover=this.observer=this.scrollmom=this.scrollrunning=!1;do this.id="ascrail"+e++;while(document.getElementById(this.id));this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=this.rail=!1,this.visibility=!0,this.hidden=this.locked=this.railslocked=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=t.opt.overflowx,this.overflowy=t.opt.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltay=this.lastdeltax=0,this.detected=o();var v=a.extend({},this.detected);this.ishwscroll=(this.canhwscroll=v.hastransform&&t.opt.hwacceleration)&&t.haswrapper,this.hasreversehr=this.isrtlmode&&!v.iswebkit,this.istouchcapable=!1,!v.cantouch||v.isios||v.isandroid||!v.iswebkit&&!v.ismozilla||(this.istouchcapable=!0,v.cantouch=!1),t.opt.enablemouselockapi||(v.hasmousecapture=!1,v.haspointerlock=!1),this.debounced=function(a,b,c){var d=t.delaylist[a];t.delaylist[a]=b,d||(t.debouncedelayed=setTimeout(function(){if(t){var b=t.delaylist[a];t.delaylist[a]=!1,b.call(t)}},c))};var w=!1;this.synched=function(a,b){return t.synclist[a]=b,function(){w||(h(function(){w=!1;for(var a in t.synclist){var b=t.synclist[a];b&&b.call(t),t.synclist[a]=!1}}),w=!0)}(),a},this.unsynched=function(a){t.synclist[a]&&(t.synclist[a]=!1)},this.css=function(a,b){for(var c in b)t.saved.css.push([a,c,a.css(c)]),a.css(c,b[c])},this.scrollTop=function(a){return"undefined"==typeof a?t.getScrollTop():t.setScrollTop(a)},this.scrollLeft=function(a){return"undefined"==typeof a?t.getScrollLeft():t.setScrollLeft(a)};var x=function(a,b,c,d,e,f,g){this.st=a,this.ed=b,this.spd=c,this.p1=d||0,this.p2=e||1,this.p3=f||0,this.p4=g||1,this.ts=(new Date).getTime(),this.df=this.ed-this.st};if(x.prototype={B2:function(a){return 3*a*a*(1-a)},B3:function(a){return 3*a*(1-a)*(1-a)},B4:function(a){return(1-a)*(1-a)*(1-a)},getNow:function(){var a=1-((new Date).getTime()-this.ts)/this.spd,b=this.B2(a)+this.B3(a)+this.B4(a);return 0>a?this.ed:this.st+Math.round(this.df*b)},update:function(a,b){return this.st=this.getNow(),this.ed=a,this.spd=b,this.ts=(new Date).getTime(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},v.hastranslate3d&&v.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(a){if(!a){if(a=k())return 16==a.length?-a[13]:-a[5];if(t.timerscroll&&t.timerscroll.bz)return t.timerscroll.bz.getNow()}return t.doc.translate.y},this.getScrollLeft=function(a){if(!a){if(a=k())return 16==a.length?-a[12]:-a[4];if(t.timerscroll&&t.timerscroll.bh)return t.timerscroll.bh.getNow()}return t.doc.translate.x},this.notifyScrollEvent=function(a){var b=document.createEvent("UIEvents");b.initUIEvent("scroll",!1,!0,window,1),b.niceevent=!0,a.dispatchEvent(b)};var y=this.isrtlmode?1:-1;v.hastranslate3d&&t.opt.enabletranslate3d?(this.setScrollTop=function(a,b){t.doc.translate.y=a,t.doc.translate.ty=-1*a+"px",t.doc.css(v.trstyle,"translate3d("+t.doc.translate.tx+","+t.doc.translate.ty+",0px)"),b||t.notifyScrollEvent(t.win[0])},this.setScrollLeft=function(a,b){t.doc.translate.x=a,t.doc.translate.tx=a*y+"px",t.doc.css(v.trstyle,"translate3d("+t.doc.translate.tx+","+t.doc.translate.ty+",0px)"),b||t.notifyScrollEvent(t.win[0])}):(this.setScrollTop=function(a,b){t.doc.translate.y=a,t.doc.translate.ty=-1*a+"px",t.doc.css(v.trstyle,"translate("+t.doc.translate.tx+","+t.doc.translate.ty+")"),b||t.notifyScrollEvent(t.win[0])},this.setScrollLeft=function(a,b){t.doc.translate.x=a,t.doc.translate.tx=a*y+"px",t.doc.css(v.trstyle,"translate("+t.doc.translate.tx+","+t.doc.translate.ty+")"),b||t.notifyScrollEvent(t.win[0])})}else this.getScrollTop=function(){return t.docscroll.scrollTop()},this.setScrollTop=function(a){return setTimeout(function(){t.docscroll.scrollTop(a)},1)},this.getScrollLeft=function(){return t.detected.ismozilla&&t.isrtlmode?Math.abs(t.docscroll.scrollLeft()):t.docscroll.scrollLeft()},this.setScrollLeft=function(a){return setTimeout(function(){t.docscroll.scrollLeft(t.detected.ismozilla&&t.isrtlmode?-a:a)},1)};this.getTarget=function(a){return!!a&&(a.target?a.target:!!a.srcElement&&a.srcElement)},this.hasParent=function(a,b){if(!a)return!1;for(var c=a.target||a.srcElement||a||!1;c&&c.id!=b;)c=c.parentNode||!1;return!1!==c};var z={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:window.pageYOffset||document.documentElement.scrollTop,left:window.pageXOffset||document.documentElement.scrollLeft}},this.getOffset=function(){if(t.isfixed){var a=t.win.offset(),b=t.getDocumentScrollOffset();return a.top-=b.top,a.left-=b.left,a}return a=t.win.offset(),t.viewport?(b=t.viewport.offset(),{top:a.top-b.top,left:a.left-b.left}):a},this.updateScrollBar=function(a){if(t.ishwscroll)t.rail.css({height:t.win.innerHeight()-(t.opt.railpadding.top+t.opt.railpadding.bottom)}),t.railh&&t.railh.css({width:t.win.innerWidth()-(t.opt.railpadding.left+t.opt.railpadding.right)});else{var b=t.getOffset(),c=b.top,d=b.left-(t.opt.railpadding.left+t.opt.railpadding.right),c=c+p(t.win,"border-top-width",!0),d=d+(t.rail.align?t.win.outerWidth()-p(t.win,"border-right-width")-t.rail.width:p(t.win,"border-left-width")),e=t.opt.railoffset;e&&(e.top&&(c+=e.top),e.left&&(d+=e.left)),t.railslocked||t.rail.css({top:c,left:d,height:(a?a.h:t.win.innerHeight())-(t.opt.railpadding.top+t.opt.railpadding.bottom)}),t.zoom&&t.zoom.css({top:c+1,left:1==t.rail.align?d-20:d+t.rail.width+4}),t.railh&&!t.railslocked&&(c=b.top,d=b.left,(e=t.opt.railhoffset)&&(e.top&&(c+=e.top),e.left&&(d+=e.left)),a=t.railh.align?c+p(t.win,"border-top-width",!0)+t.win.innerHeight()-t.railh.height:c+p(t.win,"border-top-width",!0),d+=p(t.win,"border-left-width"),t.railh.css({top:a-(t.opt.railpadding.top+t.opt.railpadding.bottom),left:d,width:t.railh.width}))}},this.doRailClick=function(a,b,c){var d;t.railslocked||(t.cancelEvent(a),b?(b=c?t.doScrollLeft:t.doScrollTop,d=c?(a.pageX-t.railh.offset().left-t.cursorwidth/2)*t.scrollratio.x:(a.pageY-t.rail.offset().top-t.cursorheight/2)*t.scrollratio.y,b(d)):(b=c?t.doScrollLeftBy:t.doScrollBy,d=c?t.scroll.x:t.scroll.y,a=c?a.pageX-t.railh.offset().left:a.pageY-t.rail.offset().top,c=c?t.view.w:t.view.h,b(d>=a?c:-c)))},t.hasanimationframe=h,t.hascancelanimationframe=i,t.hasanimationframe?t.hascancelanimationframe||(i=function(){t.cancelAnimationFrame=!0}):(h=function(a){return setTimeout(a,15-Math.floor(+new Date/1e3)%16)},i=clearInterval),this.init=function(){if(t.saved.css=[],v.isie7mobile||v.isoperamini)return!0;if(v.hasmstouch&&t.css(t.ispage?a("html"):t.win,{"-ms-touch-action":"none"}),t.zindex="auto",t.zindex=t.ispage||"auto"!=t.opt.zindex?t.opt.zindex:n()||"auto",!t.ispage&&"auto"!=t.zindex&&t.zindex>f&&(f=t.zindex),t.isie&&0==t.zindex&&"auto"==t.opt.zindex&&(t.zindex="auto"),!t.ispage||!v.cantouch&&!v.isieold&&!v.isie9mobile){var e=t.docscroll;t.ispage&&(e=t.haswrapper?t.win:t.doc),v.isie9mobile||t.css(e,{"overflow-y":"hidden"}),t.ispage&&v.isie7&&("BODY"==t.doc[0].nodeName?t.css(a("html"),{"overflow-y":"hidden"}):"HTML"==t.doc[0].nodeName&&t.css(a("body"),{"overflow-y":"hidden"})),!v.isios||t.ispage||t.haswrapper||t.css(a("body"),{"-webkit-overflow-scrolling":"touch"});var g=a(document.createElement("div"));g.css({position:"relative",top:0,"float":"right",width:t.opt.cursorwidth,height:"0px","background-color":t.opt.cursorcolor,border:t.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":t.opt.cursorborderradius,"-moz-border-radius":t.opt.cursorborderradius,"border-radius":t.opt.cursorborderradius}),g.hborder=parseFloat(g.outerHeight()-g.innerHeight()),g.addClass("nicescroll-cursors"),t.cursor=g;var h=a(document.createElement("div"));h.attr("id",t.id),h.addClass("nicescroll-rails nicescroll-rails-vr");var i,j,k,m=["left","right","top","bottom"];for(k in m)j=m[k],(i=t.opt.railpadding[j])?h.css("padding-"+j,i+"px"):t.opt.railpadding[j]=0;h.append(g),h.width=Math.max(parseFloat(t.opt.cursorwidth),g.outerWidth()),h.css({width:h.width+"px",zIndex:t.zindex,background:t.opt.background,cursor:"default"}),h.visibility=!0,h.scrollable=!0,h.align="left"==t.opt.railalign?0:1,t.rail=h,g=t.rail.drag=!1,!t.opt.boxzoom||t.ispage||v.isieold||(g=document.createElement("div"),t.bind(g,"click",t.doZoom),t.bind(g,"mouseenter",function(){t.zoom.css("opacity",t.opt.cursoropacitymax)}),t.bind(g,"mouseleave",function(){t.zoom.css("opacity",t.opt.cursoropacitymin)}),t.zoom=a(g),t.zoom.css({cursor:"pointer","z-index":t.zindex,backgroundImage:"url("+t.opt.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),t.opt.dblclickzoom&&t.bind(t.win,"dblclick",t.doZoom),v.cantouch&&t.opt.gesturezoom&&(t.ongesturezoom=function(a){return 1.5<a.scale&&t.doZoomIn(a),.8>a.scale&&t.doZoomOut(a),t.cancelEvent(a)},t.bind(t.win,"gestureend",t.ongesturezoom))),t.railh=!1;var o;if(t.opt.horizrailenabled&&(t.css(e,{"overflow-x":"hidden"}),g=a(document.createElement("div")),g.css({position:"absolute",top:0,height:t.opt.cursorwidth,width:"0px","background-color":t.opt.cursorcolor,border:t.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":t.opt.cursorborderradius,"-moz-border-radius":t.opt.cursorborderradius,"border-radius":t.opt.cursorborderradius}),v.isieold&&g.css({overflow:"hidden"}),g.wborder=parseFloat(g.outerWidth()-g.innerWidth()),g.addClass("nicescroll-cursors"),t.cursorh=g,o=a(document.createElement("div")),o.attr("id",t.id+"-hr"),o.addClass("nicescroll-rails nicescroll-rails-hr"),o.height=Math.max(parseFloat(t.opt.cursorwidth),g.outerHeight()),o.css({height:o.height+"px",zIndex:t.zindex,background:t.opt.background}),o.append(g),o.visibility=!0,o.scrollable=!0,o.align="top"==t.opt.railvalign?0:1,t.railh=o,t.railh.drag=!1),t.ispage?(h.css({position:"fixed",top:"0px",height:"100%"}),h.align?h.css({right:"0px"}):h.css({left:"0px"}),t.body.append(h),t.railh&&(o.css({position:"fixed",left:"0px",width:"100%"}),o.align?o.css({bottom:"0px"}):o.css({top:"0px"}),t.body.append(o))):(t.ishwscroll?("static"==t.win.css("position")&&t.css(t.win,{position:"relative"}),e="HTML"==t.win[0].nodeName?t.body:t.win,a(e).scrollTop(0).scrollLeft(0),t.zoom&&(t.zoom.css({position:"absolute",top:1,right:0,"margin-right":h.width+4}),e.append(t.zoom)),h.css({position:"absolute",top:0}),h.align?h.css({right:0}):h.css({left:0}),e.append(h),o&&(o.css({position:"absolute",left:0,bottom:0}),o.align?o.css({bottom:0}):o.css({top:0}),e.append(o))):(t.isfixed="fixed"==t.win.css("position"),e=t.isfixed?"fixed":"absolute",t.isfixed||(t.viewport=t.getViewport(t.win[0])),t.viewport&&(t.body=t.viewport,0==/fixed|absolute/.test(t.viewport.css("position"))&&t.css(t.viewport,{position:"relative"})),h.css({position:e}),t.zoom&&t.zoom.css({position:e}),t.updateScrollBar(),t.body.append(h),t.zoom&&t.body.append(t.zoom),t.railh&&(o.css({position:e}),t.body.append(o))),v.isios&&t.css(t.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),v.isie&&t.opt.disableoutline&&t.win.attr("hideFocus","true"),v.iswebkit&&t.opt.disableoutline&&t.win.css({outline:"none"})),!1===t.opt.autohidemode?(t.autohidedom=!1,t.rail.css({opacity:t.opt.cursoropacitymax}),t.railh&&t.railh.css({opacity:t.opt.cursoropacitymax})):!0===t.opt.autohidemode||"leave"===t.opt.autohidemode?(t.autohidedom=a().add(t.rail),v.isie8&&(t.autohidedom=t.autohidedom.add(t.cursor)),t.railh&&(t.autohidedom=t.autohidedom.add(t.railh)),t.railh&&v.isie8&&(t.autohidedom=t.autohidedom.add(t.cursorh))):"scroll"==t.opt.autohidemode?(t.autohidedom=a().add(t.rail),t.railh&&(t.autohidedom=t.autohidedom.add(t.railh))):"cursor"==t.opt.autohidemode?(t.autohidedom=a().add(t.cursor),t.railh&&(t.autohidedom=t.autohidedom.add(t.cursorh))):"hidden"==t.opt.autohidemode&&(t.autohidedom=!1,t.hide(),t.railslocked=!1),v.isie9mobile)t.scrollmom=new q(t),t.onmangotouch=function(){var a=t.getScrollTop(),b=t.getScrollLeft();if(a==t.scrollmom.lastscrolly&&b==t.scrollmom.lastscrollx)return!0;var c=a-t.mangotouch.sy,d=b-t.mangotouch.sx;if(0!=Math.round(Math.sqrt(Math.pow(d,2)+Math.pow(c,2)))){var e=0>c?-1:1,f=0>d?-1:1,g=+new Date;t.mangotouch.lazy&&clearTimeout(t.mangotouch.lazy),80<g-t.mangotouch.tm||t.mangotouch.dry!=e||t.mangotouch.drx!=f?(t.scrollmom.stop(),t.scrollmom.reset(b,a),t.mangotouch.sy=a,t.mangotouch.ly=a,t.mangotouch.sx=b,t.mangotouch.lx=b,t.mangotouch.dry=e,t.mangotouch.drx=f,t.mangotouch.tm=g):(t.scrollmom.stop(),t.scrollmom.update(t.mangotouch.sx-d,t.mangotouch.sy-c),t.mangotouch.tm=g,c=Math.max(Math.abs(t.mangotouch.ly-a),Math.abs(t.mangotouch.lx-b)),t.mangotouch.ly=a,t.mangotouch.lx=b,2<c&&(t.mangotouch.lazy=setTimeout(function(){t.mangotouch.lazy=!1,t.mangotouch.dry=0,t.mangotouch.drx=0,t.mangotouch.tm=0,t.scrollmom.doMomentum(30)},100)))}},h=t.getScrollTop(),o=t.getScrollLeft(),t.mangotouch={sy:h,ly:h,dry:0,sx:o,lx:o,drx:0,lazy:!1,tm:0},t.bind(t.docscroll,"scroll",t.onmangotouch);else{if(v.cantouch||t.istouchcapable||t.opt.touchbehavior||v.hasmstouch){t.scrollmom=new q(t),t.ontouchstart=function(b){if(b.pointerType&&2!=b.pointerType&&"touch"!=b.pointerType)return!1;if(t.hasmoving=!1,!t.railslocked){var c;if(v.hasmstouch)for(c=!!b.target&&b.target;c;){var d=a(c).getNiceScroll();if(0<d.length&&d[0].me==t.me)break;if(0<d.length)return!1;if("DIV"==c.nodeName&&c.id==t.id)break;c=!!c.parentNode&&c.parentNode}if(t.cancelScroll(),(c=t.getTarget(b))&&/INPUT/i.test(c.nodeName)&&/range/i.test(c.type))return t.stopPropagation(b);if(!("clientX"in b)&&"changedTouches"in b&&(b.clientX=b.changedTouches[0].clientX,b.clientY=b.changedTouches[0].clientY),t.forcescreen&&(d=b,b={original:b.original?b.original:b},b.clientX=d.screenX,b.clientY=d.screenY),t.rail.drag={x:b.clientX,y:b.clientY,sx:t.scroll.x,sy:t.scroll.y,st:t.getScrollTop(),sl:t.getScrollLeft(),pt:2,dl:!1},t.ispage||!t.opt.directionlockdeadzone)t.rail.drag.dl="f";else{var d=a(window).width(),e=a(window).height(),e=Math.max(0,Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)-e),d=Math.max(0,Math.max(document.body.scrollWidth,document.documentElement.scrollWidth)-d);t.rail.drag.ck=!t.rail.scrollable&&t.railh.scrollable?0<e&&"v":!(!t.rail.scrollable||t.railh.scrollable)&&(0<d&&"h"),t.rail.drag.ck||(t.rail.drag.dl="f")}if(t.opt.touchbehavior&&t.isiframe&&v.isie&&(d=t.win.position(),t.rail.drag.x+=d.left,t.rail.drag.y+=d.top),t.hasmoving=!1,t.lastmouseup=!1,t.scrollmom.reset(b.clientX,b.clientY),!v.cantouch&&!this.istouchcapable&&!b.pointerType){if(!c||!/INPUT|SELECT|TEXTAREA/i.test(c.nodeName))return!t.ispage&&v.hasmousecapture&&c.setCapture(),t.opt.touchbehavior?(c.onclick&&!c._onclick&&(c._onclick=c.onclick,c.onclick=function(a){return!t.hasmoving&&void c._onclick.call(this,a)}),t.cancelEvent(b)):t.stopPropagation(b);/SUBMIT|CANCEL|BUTTON/i.test(a(c).attr("type"))&&(pc={tg:c,click:!1},t.preventclick=pc)}}},t.ontouchend=function(a){if(!t.rail.drag)return!0;if(2==t.rail.drag.pt){if(a.pointerType&&2!=a.pointerType&&"touch"!=a.pointerType)return!1;if(t.scrollmom.doMomentum(),t.rail.drag=!1,t.hasmoving&&(t.lastmouseup=!0,t.hideCursor(),v.hasmousecapture&&document.releaseCapture(),!v.cantouch))return t.cancelEvent(a)}else if(1==t.rail.drag.pt)return t.onmouseup(a)};var p=t.opt.touchbehavior&&t.isiframe&&!v.hasmousecapture;t.ontouchmove=function(b,c){if(!t.rail.drag||b.targetTouches&&t.opt.preventmultitouchscrolling&&1<b.targetTouches.length||b.pointerType&&2!=b.pointerType&&"touch"!=b.pointerType)return!1;if(2==t.rail.drag.pt){if(v.cantouch&&v.isios&&"undefined"==typeof b.original)return!0;if(t.hasmoving=!0,t.preventclick&&!t.preventclick.click&&(t.preventclick.click=t.preventclick.tg.onclick||!1,t.preventclick.tg.onclick=t.onpreventclick),b=a.extend({original:b},b),"changedTouches"in b&&(b.clientX=b.changedTouches[0].clientX,b.clientY=b.changedTouches[0].clientY),t.forcescreen){var d=b;b={original:b.original?b.original:b},b.clientX=d.screenX,b.clientY=d.screenY}var e,d=e=0;p&&!c&&(e=t.win.position(),d=-e.left,e=-e.top);var f=b.clientY+e;e=f-t.rail.drag.y;var g=b.clientX+d,h=g-t.rail.drag.x,i=t.rail.drag.st-e;t.ishwscroll&&t.opt.bouncescroll?0>i?i=Math.round(i/2):i>t.page.maxh&&(i=t.page.maxh+Math.round((i-t.page.maxh)/2)):(0>i&&(f=i=0),i>t.page.maxh&&(i=t.page.maxh,f=0));var j;if(t.railh&&t.railh.scrollable&&(j=t.isrtlmode?h-t.rail.drag.sl:t.rail.drag.sl-h,t.ishwscroll&&t.opt.bouncescroll?0>j?j=Math.round(j/2):j>t.page.maxw&&(j=t.page.maxw+Math.round((j-t.page.maxw)/2)):(0>j&&(g=j=0),j>t.page.maxw&&(j=t.page.maxw,g=0))),d=!1,t.rail.drag.dl)d=!0,"v"==t.rail.drag.dl?j=t.rail.drag.sl:"h"==t.rail.drag.dl&&(i=t.rail.drag.st);else{e=Math.abs(e);var h=Math.abs(h),k=t.opt.directionlockdeadzone;if("v"==t.rail.drag.ck){if(e>k&&h<=.3*e)return t.rail.drag=!1,!0;h>k&&(t.rail.drag.dl="f",a("body").scrollTop(a("body").scrollTop()))}else if("h"==t.rail.drag.ck){if(h>k&&e<=.3*h)return t.rail.drag=!1,!0;e>k&&(t.rail.drag.dl="f",a("body").scrollLeft(a("body").scrollLeft()))}}if(t.synched("touchmove",function(){t.rail.drag&&2==t.rail.drag.pt&&(t.prepareTransition&&t.prepareTransition(0),t.rail.scrollable&&t.setScrollTop(i),t.scrollmom.update(g,f),t.railh&&t.railh.scrollable?(t.setScrollLeft(j),t.showCursor(i,j)):t.showCursor(i),v.isie10&&document.selection.clear())}),v.ischrome&&t.istouchcapable&&(d=!1),d)return t.cancelEvent(b)}else if(1==t.rail.drag.pt)return t.onmousemove(b)}}if(t.onmousedown=function(a,b){if(!t.rail.drag||1==t.rail.drag.pt){if(t.railslocked)return t.cancelEvent(a);t.cancelScroll(),t.rail.drag={x:a.clientX,y:a.clientY,sx:t.scroll.x,sy:t.scroll.y,pt:1,hr:!!b};var c=t.getTarget(a);return!t.ispage&&v.hasmousecapture&&c.setCapture(),t.isiframe&&!v.hasmousecapture&&(t.saved.csspointerevents=t.doc.css("pointer-events"),t.css(t.doc,{"pointer-events":"none"})),t.hasmoving=!1,t.cancelEvent(a)}},t.onmouseup=function(a){if(t.rail.drag)return 1!=t.rail.drag.pt||(v.hasmousecapture&&document.releaseCapture(),t.isiframe&&!v.hasmousecapture&&t.doc.css("pointer-events",t.saved.csspointerevents),t.rail.drag=!1,t.hasmoving&&t.triggerScrollEnd(),t.cancelEvent(a))},t.onmousemove=function(a){if(t.rail.drag){if(1==t.rail.drag.pt){if(v.ischrome&&0==a.which)return t.onmouseup(a);if(t.cursorfreezed=!0,t.hasmoving=!0,t.rail.drag.hr){t.scroll.x=t.rail.drag.sx+(a.clientX-t.rail.drag.x),0>t.scroll.x&&(t.scroll.x=0);var b=t.scrollvaluemaxw;t.scroll.x>b&&(t.scroll.x=b)}else t.scroll.y=t.rail.drag.sy+(a.clientY-t.rail.drag.y),0>t.scroll.y&&(t.scroll.y=0),b=t.scrollvaluemax,t.scroll.y>b&&(t.scroll.y=b);return t.synched("mousemove",function(){t.rail.drag&&1==t.rail.drag.pt&&(t.showCursor(),t.rail.drag.hr?t.hasreversehr?t.doScrollLeft(t.scrollvaluemaxw-Math.round(t.scroll.x*t.scrollratio.x),t.opt.cursordragspeed):t.doScrollLeft(Math.round(t.scroll.x*t.scrollratio.x),t.opt.cursordragspeed):t.doScrollTop(Math.round(t.scroll.y*t.scrollratio.y),t.opt.cursordragspeed))}),t.cancelEvent(a)}}else t.checkarea=0},v.cantouch||t.opt.touchbehavior)t.onpreventclick=function(a){if(t.preventclick)return t.preventclick.tg.onclick=t.preventclick.click,t.preventclick=!1,t.cancelEvent(a)},t.bind(t.win,"mousedown",t.ontouchstart),t.onclick=!v.isios&&function(a){return!t.lastmouseup||(t.lastmouseup=!1,t.cancelEvent(a))},t.opt.grabcursorenabled&&v.cursorgrabvalue&&(t.css(t.ispage?t.doc:t.win,{cursor:v.cursorgrabvalue}),t.css(t.rail,{cursor:v.cursorgrabvalue}));else{var r=function(a){if(t.selectiondrag){if(a){var b=t.win.outerHeight();a=a.pageY-t.selectiondrag.top,0<a&&a<b&&(a=0),a>=b&&(a-=b),t.selectiondrag.df=a}0!=t.selectiondrag.df&&(t.doScrollBy(2*-Math.floor(t.selectiondrag.df/6)),t.debounced("doselectionscroll",function(){r()},50))}};t.hasTextSelected="getSelection"in document?function(){return 0<document.getSelection().rangeCount}:"selection"in document?function(){return"None"!=document.selection.type}:function(){return!1},t.onselectionstart=function(a){t.ispage||(t.selectiondrag=t.win.offset())},t.onselectionend=function(a){t.selectiondrag=!1},t.onselectiondrag=function(a){t.selectiondrag&&t.hasTextSelected()&&t.debounced("selectionscroll",function(){r(a)},250)}}v.hasw3ctouch?(t.css(t.rail,{"touch-action":"none"}),t.css(t.cursor,{"touch-action":"none"}),t.bind(t.win,"pointerdown",t.ontouchstart),t.bind(document,"pointerup",t.ontouchend),t.bind(document,"pointermove",t.ontouchmove)):v.hasmstouch?(t.css(t.rail,{"-ms-touch-action":"none"}),t.css(t.cursor,{"-ms-touch-action":"none"}),t.bind(t.win,"MSPointerDown",t.ontouchstart),t.bind(document,"MSPointerUp",t.ontouchend),t.bind(document,"MSPointerMove",t.ontouchmove),t.bind(t.cursor,"MSGestureHold",function(a){a.preventDefault()}),t.bind(t.cursor,"contextmenu",function(a){a.preventDefault()})):this.istouchcapable&&(t.bind(t.win,"touchstart",t.ontouchstart),t.bind(document,"touchend",t.ontouchend),t.bind(document,"touchcancel",t.ontouchend),t.bind(document,"touchmove",t.ontouchmove)),(t.opt.cursordragontouch||!v.cantouch&&!t.opt.touchbehavior)&&(t.rail.css({cursor:"default"}),t.railh&&t.railh.css({cursor:"default"}),t.jqbind(t.rail,"mouseenter",function(){return!(!t.ispage&&!t.win.is(":visible"))&&(t.canshowonmouseevent&&t.showCursor(),void(t.rail.active=!0))}),t.jqbind(t.rail,"mouseleave",function(){t.rail.active=!1,t.rail.drag||t.hideCursor()}),t.opt.sensitiverail&&(t.bind(t.rail,"click",function(a){t.doRailClick(a,!1,!1)}),t.bind(t.rail,"dblclick",function(a){t.doRailClick(a,!0,!1)}),t.bind(t.cursor,"click",function(a){t.cancelEvent(a)}),t.bind(t.cursor,"dblclick",function(a){t.cancelEvent(a)})),t.railh&&(t.jqbind(t.railh,"mouseenter",function(){return!(!t.ispage&&!t.win.is(":visible"))&&(t.canshowonmouseevent&&t.showCursor(),void(t.rail.active=!0))}),t.jqbind(t.railh,"mouseleave",function(){t.rail.active=!1,t.rail.drag||t.hideCursor()}),t.opt.sensitiverail&&(t.bind(t.railh,"click",function(a){t.doRailClick(a,!1,!0)}),t.bind(t.railh,"dblclick",function(a){t.doRailClick(a,!0,!0)}),t.bind(t.cursorh,"click",function(a){t.cancelEvent(a)}),t.bind(t.cursorh,"dblclick",function(a){t.cancelEvent(a)})))),v.cantouch||t.opt.touchbehavior?(t.bind(v.hasmousecapture?t.win:document,"mouseup",t.ontouchend),t.bind(document,"mousemove",t.ontouchmove),t.onclick&&t.bind(document,"click",t.onclick),t.opt.cursordragontouch&&(t.bind(t.cursor,"mousedown",t.onmousedown),t.bind(t.cursor,"mouseup",t.onmouseup),t.cursorh&&t.bind(t.cursorh,"mousedown",function(a){t.onmousedown(a,!0)}),t.cursorh&&t.bind(t.cursorh,"mouseup",t.onmouseup))):(t.bind(v.hasmousecapture?t.win:document,"mouseup",t.onmouseup),t.bind(document,"mousemove",t.onmousemove),t.onclick&&t.bind(document,"click",t.onclick),t.bind(t.cursor,"mousedown",t.onmousedown),t.bind(t.cursor,"mouseup",t.onmouseup),t.railh&&(t.bind(t.cursorh,"mousedown",function(a){t.onmousedown(a,!0)}),t.bind(t.cursorh,"mouseup",t.onmouseup)),!t.ispage&&t.opt.enablescrollonselection&&(t.bind(t.win[0],"mousedown",t.onselectionstart),t.bind(document,"mouseup",t.onselectionend),t.bind(t.cursor,"mouseup",t.onselectionend),t.cursorh&&t.bind(t.cursorh,"mouseup",t.onselectionend),t.bind(document,"mousemove",t.onselectiondrag)),t.zoom&&(t.jqbind(t.zoom,"mouseenter",function(){t.canshowonmouseevent&&t.showCursor(),t.rail.active=!0}),t.jqbind(t.zoom,"mouseleave",function(){t.rail.active=!1,t.rail.drag||t.hideCursor()}))),t.opt.enablemousewheel&&(t.isiframe||t.bind(v.isie&&t.ispage?document:t.win,"mousewheel",t.onmousewheel),t.bind(t.rail,"mousewheel",t.onmousewheel),t.railh&&t.bind(t.railh,"mousewheel",t.onmousewheelhr)),t.ispage||v.cantouch||/HTML|^BODY/.test(t.win[0].nodeName)||(t.win.attr("tabindex")||t.win.attr({tabindex:d++}),t.jqbind(t.win,"focus",function(a){b=t.getTarget(a).id||!0,t.hasfocus=!0,t.canshowonmouseevent&&t.noticeCursor()}),t.jqbind(t.win,"blur",function(a){b=!1,t.hasfocus=!1}),t.jqbind(t.win,"mouseenter",function(a){c=t.getTarget(a).id||!0,t.hasmousefocus=!0,t.canshowonmouseevent&&t.noticeCursor()}),t.jqbind(t.win,"mouseleave",function(){c=!1,t.hasmousefocus=!1,t.rail.drag||t.hideCursor()}))}if(t.onkeypress=function(d){if(t.railslocked&&0==t.page.maxh)return!0;d=d?d:window.e;var e=t.getTarget(d);if(e&&/INPUT|TEXTAREA|SELECT|OPTION/.test(e.nodeName)&&(!e.getAttribute("type")&&!e.type||!/submit|button|cancel/i.tp)||a(e).attr("contenteditable"))return!0;if(t.hasfocus||t.hasmousefocus&&!b||t.ispage&&!b&&!c){if(e=d.keyCode,t.railslocked&&27!=e)return t.cancelEvent(d);var f=d.ctrlKey||!1,g=d.shiftKey||!1,h=!1;
|
||
switch(e){case 38:case 63233:t.doScrollBy(72),h=!0;break;case 40:case 63235:t.doScrollBy(-72),h=!0;break;case 37:case 63232:t.railh&&(f?t.doScrollLeft(0):t.doScrollLeftBy(72),h=!0);break;case 39:case 63234:t.railh&&(f?t.doScrollLeft(t.page.maxw):t.doScrollLeftBy(-72),h=!0);break;case 33:case 63276:t.doScrollBy(t.view.h),h=!0;break;case 34:case 63277:t.doScrollBy(-t.view.h),h=!0;break;case 36:case 63273:t.railh&&f?t.doScrollPos(0,0):t.doScrollTo(0),h=!0;break;case 35:case 63275:t.railh&&f?t.doScrollPos(t.page.maxw,t.page.maxh):t.doScrollTo(t.page.maxh),h=!0;break;case 32:t.opt.spacebarenabled&&(g?t.doScrollBy(t.view.h):t.doScrollBy(-t.view.h),h=!0);break;case 27:t.zoomactive&&(t.doZoom(),h=!0)}if(h)return t.cancelEvent(d)}},t.opt.enablekeyboard&&t.bind(document,v.isopera&&!v.isopera12?"keypress":"keydown",t.onkeypress),t.bind(document,"keydown",function(a){a.ctrlKey&&(t.wheelprevented=!0)}),t.bind(document,"keyup",function(a){a.ctrlKey||(t.wheelprevented=!1)}),t.bind(window,"blur",function(a){t.wheelprevented=!1}),t.bind(window,"resize",t.lazyResize),t.bind(window,"orientationchange",t.lazyResize),t.bind(window,"load",t.lazyResize),v.ischrome&&!t.ispage&&!t.haswrapper){var s=t.win.attr("style"),h=parseFloat(t.win.css("width"))+1;t.win.css("width",h),t.synched("chromefix",function(){t.win.attr("style",s)})}t.onAttributeChange=function(a){t.lazyResize(t.isieold?250:30)},!1!==l&&(t.observerbody=new l(function(b){if(b.forEach(function(b){if("attributes"==b.type)return a("body").hasClass("modal-open")&&!a.contains(a(".modal-dialog")[0],t.doc[0])?t.hide():t.show()}),document.body.scrollHeight!=t.page.maxh)return t.lazyResize(30)}),t.observerbody.observe(document.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),t.ispage||t.haswrapper||(!1!==l?(t.observer=new l(function(a){a.forEach(t.onAttributeChange)}),t.observer.observe(t.win[0],{childList:!0,characterData:!1,attributes:!0,subtree:!1}),t.observerremover=new l(function(a){a.forEach(function(a){if(0<a.removedNodes.length)for(var b in a.removedNodes)if(t&&a.removedNodes[b]==t.win[0])return t.remove()})}),t.observerremover.observe(t.win[0].parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(t.bind(t.win,v.isie&&!v.isie9?"propertychange":"DOMAttrModified",t.onAttributeChange),v.isie9&&t.win[0].attachEvent("onpropertychange",t.onAttributeChange),t.bind(t.win,"DOMNodeRemoved",function(a){a.target==t.win[0]&&t.remove()}))),!t.ispage&&t.opt.boxzoom&&t.bind(window,"resize",t.resizeZoom),t.istextarea&&(t.bind(t.win,"keydown",t.lazyResize),t.bind(t.win,"mouseup",t.lazyResize)),t.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var u=function(){t.iframexd=!1;var b;try{b="contentDocument"in this?this.contentDocument:this.contentWindow.document}catch(c){t.iframexd=!0,b=!1}if(t.iframexd)return"console"in window&&console.log("NiceScroll error: policy restriced iframe"),!0;if(t.forcescreen=!0,t.isiframe&&(t.iframe={doc:a(b),html:t.doc.contents().find("html")[0],body:t.doc.contents().find("body")[0]},t.getContentSize=function(){return{w:Math.max(t.iframe.html.scrollWidth,t.iframe.body.scrollWidth),h:Math.max(t.iframe.html.scrollHeight,t.iframe.body.scrollHeight)}},t.docscroll=a(t.iframe.body)),!v.isios&&t.opt.iframeautoresize&&!t.isiframe){t.win.scrollTop(0),t.doc.height("");var d=Math.max(b.getElementsByTagName("html")[0].scrollHeight,b.body.scrollHeight);t.doc.height(d)}t.lazyResize(30),v.isie7&&t.css(a(t.iframe.html),{"overflow-y":"hidden"}),t.css(a(t.iframe.body),{"overflow-y":"hidden"}),v.isios&&t.haswrapper&&t.css(a(b.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?t.bind(this.contentWindow,"scroll",t.onscroll):t.bind(b,"scroll",t.onscroll),t.opt.enablemousewheel&&t.bind(b,"mousewheel",t.onmousewheel),t.opt.enablekeyboard&&t.bind(b,v.isopera?"keypress":"keydown",t.onkeypress),(v.cantouch||t.opt.touchbehavior)&&(t.bind(b,"mousedown",t.ontouchstart),t.bind(b,"mousemove",function(a){return t.ontouchmove(a,!0)}),t.opt.grabcursorenabled&&v.cursorgrabvalue&&t.css(a(b.body),{cursor:v.cursorgrabvalue})),t.bind(b,"mouseup",t.ontouchend),t.zoom&&(t.opt.dblclickzoom&&t.bind(b,"dblclick",t.doZoom),t.ongesturezoom&&t.bind(b,"gestureend",t.ongesturezoom))};this.doc[0].readyState&&"complete"==this.doc[0].readyState&&setTimeout(function(){u.call(t.doc[0],!1)},500),t.bind(this.doc,"load",u)}},this.showCursor=function(a,b){if(t.cursortimeout&&(clearTimeout(t.cursortimeout),t.cursortimeout=0),t.rail){if(t.autohidedom&&(t.autohidedom.stop().css({opacity:t.opt.cursoropacitymax}),t.cursoractive=!0),t.rail.drag&&1==t.rail.drag.pt||("undefined"!=typeof a&&!1!==a&&(t.scroll.y=Math.round(1*a/t.scrollratio.y)),"undefined"!=typeof b&&(t.scroll.x=Math.round(1*b/t.scrollratio.x))),t.cursor.css({height:t.cursorheight,top:t.scroll.y}),t.cursorh){var c=t.hasreversehr?t.scrollvaluemaxw-t.scroll.x:t.scroll.x;!t.rail.align&&t.rail.visibility?t.cursorh.css({width:t.cursorwidth,left:c+t.rail.width}):t.cursorh.css({width:t.cursorwidth,left:c}),t.cursoractive=!0}t.zoom&&t.zoom.stop().css({opacity:t.opt.cursoropacitymax})}},this.hideCursor=function(a){t.cursortimeout||!t.rail||!t.autohidedom||t.hasmousefocus&&"leave"==t.opt.autohidemode||(t.cursortimeout=setTimeout(function(){t.rail.active&&t.showonmouseevent||(t.autohidedom.stop().animate({opacity:t.opt.cursoropacitymin}),t.zoom&&t.zoom.stop().animate({opacity:t.opt.cursoropacitymin}),t.cursoractive=!1),t.cursortimeout=0},a||t.opt.hidecursordelay))},this.noticeCursor=function(a,b,c){t.showCursor(b,c),t.rail.active||t.hideCursor(a)},this.getContentSize=t.ispage?function(){return{w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}}:t.haswrapper?function(){return{w:t.doc.outerWidth()+parseInt(t.win.css("paddingLeft"))+parseInt(t.win.css("paddingRight")),h:t.doc.outerHeight()+parseInt(t.win.css("paddingTop"))+parseInt(t.win.css("paddingBottom"))}}:function(){return{w:t.docscroll[0].scrollWidth,h:t.docscroll[0].scrollHeight}},this.onResize=function(a,b){if(!t||!t.win)return!1;if(!t.haswrapper&&!t.ispage){if("none"==t.win.css("display"))return t.visibility&&t.hideRail().hideRailHr(),!1;t.hidden||t.visibility||t.showRail().showRailHr()}var c=t.page.maxh,d=t.page.maxw,e=t.view.h,f=t.view.w;if(t.view={w:t.ispage?t.win.width():parseInt(t.win[0].clientWidth),h:t.ispage?t.win.height():parseInt(t.win[0].clientHeight)},t.page=b?b:t.getContentSize(),t.page.maxh=Math.max(0,t.page.h-t.view.h),t.page.maxw=Math.max(0,t.page.w-t.view.w),t.page.maxh==c&&t.page.maxw==d&&t.view.w==f&&t.view.h==e){if(t.ispage)return t;if(c=t.win.offset(),t.lastposition&&(d=t.lastposition,d.top==c.top&&d.left==c.left))return t;t.lastposition=c}return 0==t.page.maxh?(t.hideRail(),t.scrollvaluemax=0,t.scroll.y=0,t.scrollratio.y=0,t.cursorheight=0,t.setScrollTop(0),t.rail&&(t.rail.scrollable=!1)):(t.page.maxh-=t.opt.railpadding.top+t.opt.railpadding.bottom,t.rail.scrollable=!0),0==t.page.maxw?(t.hideRailHr(),t.scrollvaluemaxw=0,t.scroll.x=0,t.scrollratio.x=0,t.cursorwidth=0,t.setScrollLeft(0),t.railh&&(t.railh.scrollable=!1)):(t.page.maxw-=t.opt.railpadding.left+t.opt.railpadding.right,t.railh&&(t.railh.scrollable=t.opt.horizrailenabled)),t.railslocked=t.locked||0==t.page.maxh&&0==t.page.maxw,t.railslocked?(t.ispage||t.updateScrollBar(t.view),!1):(t.hidden||t.visibility?!t.railh||t.hidden||t.railh.visibility||t.showRailHr():t.showRail().showRailHr(),t.istextarea&&t.win.css("resize")&&"none"!=t.win.css("resize")&&(t.view.h-=20),t.cursorheight=Math.min(t.view.h,Math.round(t.view.h/t.page.h*t.view.h)),t.cursorheight=t.opt.cursorfixedheight?t.opt.cursorfixedheight:Math.max(t.opt.cursorminheight,t.cursorheight),t.cursorwidth=Math.min(t.view.w,Math.round(t.view.w/t.page.w*t.view.w)),t.cursorwidth=t.opt.cursorfixedheight?t.opt.cursorfixedheight:Math.max(t.opt.cursorminheight,t.cursorwidth),t.scrollvaluemax=t.view.h-t.cursorheight-t.cursor.hborder-(t.opt.railpadding.top+t.opt.railpadding.bottom),t.railh&&(t.railh.width=0<t.page.maxh?t.view.w-t.rail.width:t.view.w,t.scrollvaluemaxw=t.railh.width-t.cursorwidth-t.cursorh.wborder-(t.opt.railpadding.left+t.opt.railpadding.right)),t.ispage||t.updateScrollBar(t.view),t.scrollratio={x:t.page.maxw/t.scrollvaluemaxw,y:t.page.maxh/t.scrollvaluemax},t.getScrollTop()>t.page.maxh?t.doScrollTop(t.page.maxh):(t.scroll.y=Math.round(t.getScrollTop()*(1/t.scrollratio.y)),t.scroll.x=Math.round(t.getScrollLeft()*(1/t.scrollratio.x)),t.cursoractive&&t.noticeCursor()),t.scroll.y&&0==t.getScrollTop()&&t.doScrollTo(Math.floor(t.scroll.y*t.scrollratio.y)),t)},this.resize=t.onResize,this.lazyResize=function(a){return a=isNaN(a)?30:a,t.debounced("resize",t.resize,a),t},this.jqbind=function(b,c,d){t.events.push({e:b,n:c,f:d,q:!0}),a(b).bind(c,d)},this.bind=function(a,b,c,d){var e="jquery"in a?a[0]:a;"mousewheel"==b?"onwheel"in t.win?t._bind(e,"wheel",c,d||!1):(a="undefined"!=typeof document.onmousewheel?"mousewheel":"DOMMouseScroll",r(e,a,c,d||!1),"DOMMouseScroll"==a&&r(e,"MozMousePixelScroll",c,d||!1)):e.addEventListener?(v.cantouch&&/mouseup|mousedown|mousemove/.test(b)&&t._bind(e,"mousedown"==b?"touchstart":"mouseup"==b?"touchend":"touchmove",function(a){if(a.touches){if(2>a.touches.length){var b=a.touches.length?a.touches[0]:a;b.original=a,c.call(this,b)}}else a.changedTouches&&(b=a.changedTouches[0],b.original=a,c.call(this,b))},d||!1),t._bind(e,b,c,d||!1),v.cantouch&&"mouseup"==b&&t._bind(e,"touchcancel",c,d||!1)):t._bind(e,b,function(a){return(a=a||window.event||!1)&&a.srcElement&&(a.target=a.srcElement),"pageY"in a||(a.pageX=a.clientX+document.documentElement.scrollLeft,a.pageY=a.clientY+document.documentElement.scrollTop),!1!==c.call(e,a)&&!1!==d||t.cancelEvent(a)})},v.haseventlistener?(this._bind=function(a,b,c,d){t.events.push({e:a,n:b,f:c,b:d,q:!1}),a.addEventListener(b,c,d||!1)},this.cancelEvent=function(a){return!!a&&(a=a.original?a.original:a,a.preventDefault(),a.stopPropagation(),a.preventManipulation&&a.preventManipulation(),!1)},this.stopPropagation=function(a){return!!a&&(a=a.original?a.original:a,a.stopPropagation(),!1)},this._unbind=function(a,b,c,d){a.removeEventListener(b,c,d)}):(this._bind=function(a,b,c,d){t.events.push({e:a,n:b,f:c,b:d,q:!1}),a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c},this.cancelEvent=function(a){return!!(a=window.event||!1)&&(a.cancelBubble=!0,a.cancel=!0,a.returnValue=!1)},this.stopPropagation=function(a){return!!(a=window.event||!1)&&(a.cancelBubble=!0,!1)},this._unbind=function(a,b,c,d){a.detachEvent?a.detachEvent("on"+b,c):a["on"+b]=!1}),this.unbindAll=function(){for(var a=0;a<t.events.length;a++){var b=t.events[a];b.q?b.e.unbind(b.n,b.f):t._unbind(b.e,b.n,b.f,b.b)}},this.showRail=function(){return 0==t.page.maxh||!t.ispage&&"none"==t.win.css("display")||(t.visibility=!0,t.rail.visibility=!0,t.rail.css("display","block")),t},this.showRailHr=function(){return t.railh?(0==t.page.maxw||!t.ispage&&"none"==t.win.css("display")||(t.railh.visibility=!0,t.railh.css("display","block")),t):t},this.hideRail=function(){return t.visibility=!1,t.rail.visibility=!1,t.rail.css("display","none"),t},this.hideRailHr=function(){return t.railh?(t.railh.visibility=!1,t.railh.css("display","none"),t):t},this.show=function(){return t.hidden=!1,t.railslocked=!1,t.showRail().showRailHr()},this.hide=function(){return t.hidden=!0,t.railslocked=!0,t.hideRail().hideRailHr()},this.toggle=function(){return t.hidden?t.show():t.hide()},this.remove=function(){t.stop(),t.cursortimeout&&clearTimeout(t.cursortimeout),t.debouncedelayed&&clearTimeout(t.debouncedelayed),t.doZoomOut(),t.unbindAll(),v.isie9&&t.win[0].detachEvent("onpropertychange",t.onAttributeChange),!1!==t.observer&&t.observer.disconnect(),!1!==t.observerremover&&t.observerremover.disconnect(),!1!==t.observerbody&&t.observerbody.disconnect(),t.events=null,t.cursor&&t.cursor.remove(),t.cursorh&&t.cursorh.remove(),t.rail&&t.rail.remove(),t.railh&&t.railh.remove(),t.zoom&&t.zoom.remove();for(var b=0;b<t.saved.css.length;b++){var c=t.saved.css[b];c[0].css(c[1],"undefined"==typeof c[2]?"":c[2])}t.saved=!1,t.me.data("__nicescroll","");var d=a.nicescroll;d.each(function(a){if(this&&this.id===t.id){delete d[a];for(var b=++a;b<d.length;b++,a++)d[a]=d[b];d.length--,d.length&&delete d[d.length]}});for(var e in t)t[e]=null,delete t[e];t=null},this.scrollstart=function(a){return this.onscrollstart=a,t},this.scrollend=function(a){return this.onscrollend=a,t},this.scrollcancel=function(a){return this.onscrollcancel=a,t},this.zoomin=function(a){return this.onzoomin=a,t},this.zoomout=function(a){return this.onzoomout=a,t},this.isScrollable=function(b){if(b=b.target?b.target:b,"OPTION"==b.nodeName)return!0;for(;b&&1==b.nodeType&&!/^BODY|HTML/.test(b.nodeName);){var c=a(b),c=c.css("overflowY")||c.css("overflowX")||c.css("overflow")||"";if(/scroll|auto/.test(c))return b.clientHeight!=b.scrollHeight;b=!!b.parentNode&&b.parentNode}return!1},this.getViewport=function(b){for(b=!(!b||!b.parentNode)&&b.parentNode;b&&1==b.nodeType&&!/^BODY|HTML/.test(b.nodeName);){var c=a(b);if(/fixed|absolute/.test(c.css("position")))return c;var d=c.css("overflowY")||c.css("overflowX")||c.css("overflow")||"";if(/scroll|auto/.test(d)&&b.clientHeight!=b.scrollHeight||0<c.getNiceScroll().length)return c;b=!!b.parentNode&&b.parentNode}return!1},this.triggerScrollEnd=function(){if(t.onscrollend){var a=t.getScrollLeft(),b=t.getScrollTop();t.onscrollend.call(t,{type:"scrollend",current:{x:a,y:b},end:{x:a,y:b}})}},this.onmousewheel=function(a){if(!t.wheelprevented){if(t.railslocked)return t.debounced("checkunlock",t.resize,250),!0;if(t.rail.drag)return t.cancelEvent(a);if("auto"==t.opt.oneaxismousemode&&0!=a.deltaX&&(t.opt.oneaxismousemode=!1),t.opt.oneaxismousemode&&0==a.deltaX&&!t.rail.scrollable)return!t.railh||!t.railh.scrollable||t.onmousewheelhr(a);var b=+new Date,c=!1;return t.opt.preservenativescrolling&&t.checkarea+600<b&&(t.nativescrollingarea=t.isScrollable(a),c=!0),t.checkarea=b,!!t.nativescrollingarea||((a=s(a,!1,c))&&(t.checkarea=0),a)}},this.onmousewheelhr=function(a){if(!t.wheelprevented){if(t.railslocked||!t.railh.scrollable)return!0;if(t.rail.drag)return t.cancelEvent(a);var b=+new Date,c=!1;return t.opt.preservenativescrolling&&t.checkarea+600<b&&(t.nativescrollingarea=t.isScrollable(a),c=!0),t.checkarea=b,!!t.nativescrollingarea||(t.railslocked?t.cancelEvent(a):s(a,!0,c))}},this.stop=function(){return t.cancelScroll(),t.scrollmon&&t.scrollmon.stop(),t.cursorfreezed=!1,t.scroll.y=Math.round(t.getScrollTop()*(1/t.scrollratio.y)),t.noticeCursor(),t},this.getTransitionSpeed=function(a){return a=Math.min(Math.round(10*t.opt.scrollspeed),Math.round(a/20*t.opt.scrollspeed)),20<a?a:0},t.opt.smoothscroll?t.ishwscroll&&v.hastransition&&t.opt.usetransition&&t.opt.smoothscroll?(this.prepareTransition=function(a,b){var c=b?20<a?a:0:t.getTransitionSpeed(a),d=c?v.prefixstyle+"transform "+c+"ms ease-out":"";return t.lasttransitionstyle&&t.lasttransitionstyle==d||(t.lasttransitionstyle=d,t.doc.css(v.transitionstyle,d)),c},this.doScrollLeft=function(a,b){var c=t.scrollrunning?t.newscrolly:t.getScrollTop();t.doScrollPos(a,c,b)},this.doScrollTop=function(a,b){var c=t.scrollrunning?t.newscrollx:t.getScrollLeft();t.doScrollPos(c,a,b)},this.doScrollPos=function(a,b,c){var d=t.getScrollTop(),e=t.getScrollLeft();return(0>(t.newscrolly-d)*(b-d)||0>(t.newscrollx-e)*(a-e))&&t.cancelScroll(),0==t.opt.bouncescroll&&(0>b?b=0:b>t.page.maxh&&(b=t.page.maxh),0>a?a=0:a>t.page.maxw&&(a=t.page.maxw)),(!t.scrollrunning||a!=t.newscrollx||b!=t.newscrolly)&&(t.newscrolly=b,t.newscrollx=a,t.newscrollspeed=c||!1,!t.timer&&void(t.timer=setTimeout(function(){var c=t.getScrollTop(),d=t.getScrollLeft(),e=Math.round(Math.sqrt(Math.pow(a-d,2)+Math.pow(b-c,2))),e=t.newscrollspeed&&1<t.newscrollspeed?t.newscrollspeed:t.getTransitionSpeed(e);t.newscrollspeed&&1>=t.newscrollspeed&&(e*=t.newscrollspeed),t.prepareTransition(e,!0),t.timerscroll&&t.timerscroll.tm&&clearInterval(t.timerscroll.tm),0<e&&(!t.scrollrunning&&t.onscrollstart&&t.onscrollstart.call(t,{type:"scrollstart",current:{x:d,y:c},request:{x:a,y:b},end:{x:t.newscrollx,y:t.newscrolly},speed:e}),v.transitionend?t.scrollendtrapped||(t.scrollendtrapped=!0,t.bind(t.doc,v.transitionend,t.onScrollTransitionEnd,!1)):(t.scrollendtrapped&&clearTimeout(t.scrollendtrapped),t.scrollendtrapped=setTimeout(t.onScrollTransitionEnd,e)),t.timerscroll={bz:new x(c,t.newscrolly,e,0,0,.58,1),bh:new x(d,t.newscrollx,e,0,0,.58,1)},t.cursorfreezed||(t.timerscroll.tm=setInterval(function(){t.showCursor(t.getScrollTop(),t.getScrollLeft())},60))),t.synched("doScroll-set",function(){t.timer=0,t.scrollendtrapped&&(t.scrollrunning=!0),t.setScrollTop(t.newscrolly),t.setScrollLeft(t.newscrollx),t.scrollendtrapped||t.onScrollTransitionEnd()})},50)))},this.cancelScroll=function(){if(!t.scrollendtrapped)return!0;var a=t.getScrollTop(),b=t.getScrollLeft();return t.scrollrunning=!1,v.transitionend||clearTimeout(v.transitionend),t.scrollendtrapped=!1,t._unbind(t.doc[0],v.transitionend,t.onScrollTransitionEnd),t.prepareTransition(0),t.setScrollTop(a),t.railh&&t.setScrollLeft(b),t.timerscroll&&t.timerscroll.tm&&clearInterval(t.timerscroll.tm),t.timerscroll=!1,t.cursorfreezed=!1,t.showCursor(a,b),t},this.onScrollTransitionEnd=function(){t.scrollendtrapped&&t._unbind(t.doc[0],v.transitionend,t.onScrollTransitionEnd),t.scrollendtrapped=!1,t.prepareTransition(0),t.timerscroll&&t.timerscroll.tm&&clearInterval(t.timerscroll.tm),t.timerscroll=!1;var a=t.getScrollTop(),b=t.getScrollLeft();return t.setScrollTop(a),t.railh&&t.setScrollLeft(b),t.noticeCursor(!1,a,b),t.cursorfreezed=!1,0>a?a=0:a>t.page.maxh&&(a=t.page.maxh),0>b?b=0:b>t.page.maxw&&(b=t.page.maxw),a!=t.newscrolly||b!=t.newscrollx?t.doScrollPos(b,a,t.opt.snapbackspeed):(t.onscrollend&&t.scrollrunning&&t.triggerScrollEnd(),void(t.scrollrunning=!1))}):(this.doScrollLeft=function(a,b){var c=t.scrollrunning?t.newscrolly:t.getScrollTop();t.doScrollPos(a,c,b)},this.doScrollTop=function(a,b){var c=t.scrollrunning?t.newscrollx:t.getScrollLeft();t.doScrollPos(c,a,b)},this.doScrollPos=function(a,b,c){function d(){if(t.cancelAnimationFrame)return!0;if(t.scrollrunning=!0,l=1-l)return t.timer=h(d)||1;var a,b,c=0,e=b=t.getScrollTop();t.dst.ay?(e=t.bzscroll?t.dst.py+t.bzscroll.getNow()*t.dst.ay:t.newscrolly,a=e-b,(0>a&&e<t.newscrolly||0<a&&e>t.newscrolly)&&(e=t.newscrolly),t.setScrollTop(e),e==t.newscrolly&&(c=1)):c=1,b=a=t.getScrollLeft(),t.dst.ax?(b=t.bzscroll?t.dst.px+t.bzscroll.getNow()*t.dst.ax:t.newscrollx,a=b-a,(0>a&&b<t.newscrollx||0<a&&b>t.newscrollx)&&(b=t.newscrollx),t.setScrollLeft(b),b==t.newscrollx&&(c+=1)):c+=1,2==c?(t.timer=0,t.cursorfreezed=!1,t.bzscroll=!1,t.scrollrunning=!1,0>e?e=0:e>t.page.maxh&&(e=t.page.maxh),0>b?b=0:b>t.page.maxw&&(b=t.page.maxw),b!=t.newscrollx||e!=t.newscrolly?t.doScrollPos(b,e):t.onscrollend&&t.triggerScrollEnd()):t.timer=h(d)||1}if(b="undefined"==typeof b||!1===b?t.getScrollTop(!0):b,t.timer&&t.newscrolly==b&&t.newscrollx==a)return!0;t.timer&&i(t.timer),t.timer=0;var e=t.getScrollTop(),f=t.getScrollLeft();(0>(t.newscrolly-e)*(b-e)||0>(t.newscrollx-f)*(a-f))&&t.cancelScroll(),t.newscrolly=b,t.newscrollx=a,t.bouncescroll&&t.rail.visibility||(0>t.newscrolly?t.newscrolly=0:t.newscrolly>t.page.maxh&&(t.newscrolly=t.page.maxh)),t.bouncescroll&&t.railh.visibility||(0>t.newscrollx?t.newscrollx=0:t.newscrollx>t.page.maxw&&(t.newscrollx=t.page.maxw)),t.dst={},t.dst.x=a-f,t.dst.y=b-e,t.dst.px=f,t.dst.py=e;var g=Math.round(Math.sqrt(Math.pow(t.dst.x,2)+Math.pow(t.dst.y,2)));t.dst.ax=t.dst.x/g,t.dst.ay=t.dst.y/g;var j=0,k=g;if(0==t.dst.x?(j=e,k=b,t.dst.ay=1,t.dst.py=0):0==t.dst.y&&(j=f,k=a,t.dst.ax=1,t.dst.px=0),g=t.getTransitionSpeed(g),c&&1>=c&&(g*=c),t.bzscroll=0<g&&(t.bzscroll?t.bzscroll.update(k,g):new x(j,k,g,0,1,0,1)),!t.timer){(e==t.page.maxh&&b>=t.page.maxh||f==t.page.maxw&&a>=t.page.maxw)&&t.checkContentSize();var l=1;t.cancelAnimationFrame=!1,t.timer=1,t.onscrollstart&&!t.scrollrunning&&t.onscrollstart.call(t,{type:"scrollstart",current:{x:f,y:e},request:{x:a,y:b},end:{x:t.newscrollx,y:t.newscrolly},speed:g}),d(),(e==t.page.maxh&&b>=e||f==t.page.maxw&&a>=f)&&t.checkContentSize(),t.noticeCursor()}},this.cancelScroll=function(){return t.timer&&i(t.timer),t.timer=0,t.bzscroll=!1,t.scrollrunning=!1,t}):(this.doScrollLeft=function(a,b){var c=t.getScrollTop();t.doScrollPos(a,c,b)},this.doScrollTop=function(a,b){var c=t.getScrollLeft();t.doScrollPos(c,a,b)},this.doScrollPos=function(a,b,c){var d=a>t.page.maxw?t.page.maxw:a;0>d&&(d=0);var e=b>t.page.maxh?t.page.maxh:b;0>e&&(e=0),t.synched("scroll",function(){t.setScrollTop(e),t.setScrollLeft(d)})},this.cancelScroll=function(){}),this.doScrollBy=function(a,b){var c=0,c=b?Math.floor((t.scroll.y-a)*t.scrollratio.y):(t.timer?t.newscrolly:t.getScrollTop(!0))-a;if(t.bouncescroll){var d=Math.round(t.view.h/2);c<-d?c=-d:c>t.page.maxh+d&&(c=t.page.maxh+d)}return t.cursorfreezed=!1,d=t.getScrollTop(!0),0>c&&0>=d?t.noticeCursor():c>t.page.maxh&&d>=t.page.maxh?(t.checkContentSize(),t.noticeCursor()):void t.doScrollTop(c)},this.doScrollLeftBy=function(a,b){var c=0,c=b?Math.floor((t.scroll.x-a)*t.scrollratio.x):(t.timer?t.newscrollx:t.getScrollLeft(!0))-a;if(t.bouncescroll){var d=Math.round(t.view.w/2);c<-d?c=-d:c>t.page.maxw+d&&(c=t.page.maxw+d)}return t.cursorfreezed=!1,d=t.getScrollLeft(!0),0>c&&0>=d||c>t.page.maxw&&d>=t.page.maxw?t.noticeCursor():void t.doScrollLeft(c)},this.doScrollTo=function(a,b){t.cursorfreezed=!1,t.doScrollTop(a)},this.checkContentSize=function(){var a=t.getContentSize();a.h==t.page.h&&a.w==t.page.w||t.resize(!1,a)},t.onscroll=function(a){t.rail.drag||t.cursorfreezed||t.synched("scroll",function(){t.scroll.y=Math.round(t.getScrollTop()*(1/t.scrollratio.y)),t.railh&&(t.scroll.x=Math.round(t.getScrollLeft()*(1/t.scrollratio.x))),t.noticeCursor()})},t.bind(t.docscroll,"scroll",t.onscroll),this.doZoomIn=function(b){if(!t.zoomactive){t.zoomactive=!0,t.zoomrestore={style:{}};var c,d="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),e=t.win[0].style;for(c in d){var g=d[c];t.zoomrestore.style[g]="undefined"!=typeof e[g]?e[g]:""}return t.zoomrestore.style.width=t.win.css("width"),t.zoomrestore.style.height=t.win.css("height"),t.zoomrestore.padding={w:t.win.outerWidth()-t.win.width(),h:t.win.outerHeight()-t.win.height()},v.isios4&&(t.zoomrestore.scrollTop=a(window).scrollTop(),a(window).scrollTop(0)),t.win.css({position:v.isios4?"absolute":"fixed",top:0,left:0,"z-index":f+100,margin:"0px"}),d=t.win.css("backgroundColor"),(""==d||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(d))&&t.win.css("backgroundColor","#fff"),t.rail.css({"z-index":f+101}),t.zoom.css({"z-index":f+102}),t.zoom.css("backgroundPosition","0px -18px"),t.resizeZoom(),t.onzoomin&&t.onzoomin.call(t),t.cancelEvent(b)}},this.doZoomOut=function(b){if(t.zoomactive)return t.zoomactive=!1,t.win.css("margin",""),t.win.css(t.zoomrestore.style),v.isios4&&a(window).scrollTop(t.zoomrestore.scrollTop),t.rail.css({"z-index":t.zindex}),t.zoom.css({"z-index":t.zindex}),t.zoomrestore=!1,t.zoom.css("backgroundPosition","0px 0px"),t.onResize(),t.onzoomout&&t.onzoomout.call(t),t.cancelEvent(b)},this.doZoom=function(a){return t.zoomactive?t.doZoomOut(a):t.doZoomIn(a)},this.resizeZoom=function(){if(t.zoomactive){var b=t.getScrollTop();t.win.css({width:a(window).width()-t.zoomrestore.padding.w+"px",height:a(window).height()-t.zoomrestore.padding.h+"px"}),t.onResize(),t.setScrollTop(Math.min(t.page.maxh,b))}},this.init(),a.nicescroll.push(this)},q=function(a){var b=this;this.nc=a,this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0,this.snapy=this.snapx=!1,this.demuly=this.demulx=0,this.lastscrolly=this.lastscrollx=-1,this.timer=this.chky=this.chkx=0,this.time=function(){return+new Date},this.reset=function(a,c){b.stop();var d=b.time();b.steptime=0,b.lasttime=d,b.speedx=0,b.speedy=0,b.lastx=a,b.lasty=c,b.lastscrollx=-1,b.lastscrolly=-1},this.update=function(a,c){var d=b.time();b.steptime=d-b.lasttime,b.lasttime=d;var d=c-b.lasty,e=a-b.lastx,f=b.nc.getScrollTop(),g=b.nc.getScrollLeft(),f=f+d,g=g+e;b.snapx=0>g||g>b.nc.page.maxw,b.snapy=0>f||f>b.nc.page.maxh,b.speedx=e,b.speedy=d,b.lastx=a,b.lasty=c},this.stop=function(){b.nc.unsynched("domomentum2d"),b.timer&&clearTimeout(b.timer),b.timer=0,b.lastscrollx=-1,b.lastscrolly=-1},this.doSnapy=function(a,c){var d=!1;0>c?(c=0,d=!0):c>b.nc.page.maxh&&(c=b.nc.page.maxh,d=!0),0>a?(a=0,d=!0):a>b.nc.page.maxw&&(a=b.nc.page.maxw,d=!0),d?b.nc.doScrollPos(a,c,b.nc.opt.snapbackspeed):b.nc.triggerScrollEnd()},this.doMomentum=function(a){var c=b.time(),d=a?c+a:b.lasttime;a=b.nc.getScrollLeft();var e=b.nc.getScrollTop(),f=b.nc.page.maxh,g=b.nc.page.maxw;if(b.speedx=0<g?Math.min(60,b.speedx):0,b.speedy=0<f?Math.min(60,b.speedy):0,d=d&&60>=c-d,(0>e||e>f||0>a||a>g)&&(d=!1),a=!(!b.speedx||!d)&&b.speedx,b.speedy&&d&&b.speedy||a){var h=Math.max(16,b.steptime);50<h&&(a=h/50,b.speedx*=a,b.speedy*=a,h=50),b.demulxy=0,b.lastscrollx=b.nc.getScrollLeft(),b.chkx=b.lastscrollx,b.lastscrolly=b.nc.getScrollTop(),b.chky=b.lastscrolly;var i=b.lastscrollx,j=b.lastscrolly,k=function(){var a=600<b.time()-c?.04:.02;b.speedx&&(i=Math.floor(b.lastscrollx-b.speedx*(1-b.demulxy)),b.lastscrollx=i,0>i||i>g)&&(a=.1),b.speedy&&(j=Math.floor(b.lastscrolly-b.speedy*(1-b.demulxy)),b.lastscrolly=j,0>j||j>f)&&(a=.1),b.demulxy=Math.min(1,b.demulxy+a),b.nc.synched("domomentum2d",function(){b.speedx&&(b.nc.getScrollLeft()!=b.chkx&&b.stop(),b.chkx=i,b.nc.setScrollLeft(i)),b.speedy&&(b.nc.getScrollTop()!=b.chky&&b.stop(),b.chky=j,b.nc.setScrollTop(j)),b.timer||(b.nc.hideCursor(),b.doSnapy(i,j))}),1>b.demulxy?b.timer=setTimeout(k,h):(b.stop(),b.nc.hideCursor(),b.doSnapy(i,j))};k()}else b.doSnapy(b.nc.getScrollLeft(),b.nc.getScrollTop())}},r=a.fn.scrollTop;a.cssHooks.pageYOffset={get:function(b,c,d){return(c=a.data(b,"__nicescroll")||!1)&&c.ishwscroll?c.getScrollTop():r.call(b)},set:function(b,c){var d=a.data(b,"__nicescroll")||!1;return d&&d.ishwscroll?d.setScrollTop(parseInt(c)):r.call(b,c),this}},a.fn.scrollTop=function(b){if("undefined"==typeof b){var c=!!this[0]&&(a.data(this[0],"__nicescroll")||!1);return c&&c.ishwscroll?c.getScrollTop():r.call(this)}return this.each(function(){var c=a.data(this,"__nicescroll")||!1;c&&c.ishwscroll?c.setScrollTop(parseInt(b)):r.call(a(this),b)})};var s=a.fn.scrollLeft;a.cssHooks.pageXOffset={get:function(b,c,d){return(c=a.data(b,"__nicescroll")||!1)&&c.ishwscroll?c.getScrollLeft():s.call(b)},set:function(b,c){var d=a.data(b,"__nicescroll")||!1;return d&&d.ishwscroll?d.setScrollLeft(parseInt(c)):s.call(b,c),this}},a.fn.scrollLeft=function(b){if("undefined"==typeof b){var c=!!this[0]&&(a.data(this[0],"__nicescroll")||!1);return c&&c.ishwscroll?c.getScrollLeft():s.call(this)}return this.each(function(){var c=a.data(this,"__nicescroll")||!1;c&&c.ishwscroll?c.setScrollLeft(parseInt(b)):s.call(a(this),b)})};var t=function(b){var c=this;if(this.length=0,this.name="nicescrollarray",this.each=function(a){for(var b=0,d=0;b<c.length;b++)a.call(c[b],d++);return c},this.push=function(a){c[c.length]=a,c.length++},this.eq=function(a){return c[a]},b)for(var d=0;d<b.length;d++){var e=a.data(b[d],"__nicescroll")||!1;e&&(this[this.length]=e,this.length++)}return this};!function(a,b,c){for(var d=0;d<b.length;d++)c(a,b[d])}(t.prototype,"show hide toggle onResize resize remove stop doScrollPos".split(" "),function(a,b){a[b]=function(){var a=arguments;return this.each(function(){this[b].apply(this,a)})}}),a.fn.getNiceScroll=function(b){return"undefined"==typeof b?new t(this):this[b]&&a.data(this[b],"__nicescroll")||!1},a.extend(a.expr[":"],{nicescroll:function(b){return!!a.data(b,"__nicescroll")}}),a.fn.niceScroll=function(b,c){"undefined"!=typeof c||"object"!=typeof b||"jquery"in b||(c=b,b=!1),c=a.extend({},c);var d=new t;"undefined"==typeof c&&(c={}),b&&(c.doc=a(b),c.win=a(this));var e=!("doc"in c);return e||"win"in c||(c.win=a(this)),this.each(function(){var b=a(this).data("__nicescroll")||!1;b||(c.doc=e?a(this):c.doc,b=new p(c,a(this)),a(this).data("__nicescroll",b)),d.push(b)}),1==d.length?d[0]:d},window.NiceScroll={getjQuery:function(){return a}},a.nicescroll||(a.nicescroll=new t,a.nicescroll.options=m)});var userCount=0;$.fn.userpicker=function(a){function b(){g=a.inputId.substr(1);var b='<div class="'+g+'_user_picker_container"><ul class="tag_input" id="'+g+'_invite_tags"><li id="'+g+'_tag_input"><input type="text" id="'+g+'_tag_input_field" class="tag_input_field" value="" autocomplete="off"></li></ul><ul class="dropdown-menu" id="'+g+'_userpicker" role="menu" aria-labelledby="dropdownMenu"></ul></div>';$("."+g+"_user_picker_container").remove(),0==$("."+g+"_user_picker_container").length&&$(a.inputId).after(b),$(a.inputId).hide(),""!=a.currentValue&&c(a.currentValue),$("#"+g+"_tag_input_field").attr("placeholder",a.placeholderText),1==a.focus&&($("#"+g+"_tag_input_field").focus(),$("#"+g+"_invite_tags").addClass("focus")),$("#"+g+"_tag_input_field").focusin(function(){$("#"+g+"_invite_tags").addClass("focus")}),$("#"+g+"_tag_input_field").focusout(function(){$("#"+g+"_invite_tags").removeClass("focus")})}function c(a){$("#"+g+"_invite_tags .userInput").remove(),$("#"+g+"_invite_tags").prepend(a),$("#"+g+"_invite_tags .userInput i").each(function(){$(this).click(function(){$(this).parent().remove(),userCount--}),userCount++})}function d(b){$("#"+g+"_userpicker li").remove(),$("#"+g+"_userpicker").html('<li><div class="loader"><div class="sk-spinner sk-spinner-three-bounce"><div class="sk-bounce1"></div><div class="sk-bounce2"></div><div class="sk-bounce3"></div></div></div></li>');var c=a.data||{};a.searchUrl.indexOf("-keywordPlaceholder-")<0&&(c.keyword=b),a.userRole&&(c.userRole=a.userRole),console.log(c),jQuery.getJSON(a.searchUrl.replace("-keywordPlaceholder-",b),c,function(c){if($("#"+g+"_userpicker li").remove(),c.sort(function(a,c){return a.disabled!==c.disabled?a.disabled<c.disabled?-1:1:a.priority!==c.priority?a.priority>c.priority?-1:1:a.displayName.indexOf(b)>=0&&c.displayName.indexOf(b)<0?-1:a.displayName.indexOf(b)<0&&c.displayName.indexOf(b)>=0?1:0}),c.length>0){for(var d=0;d<c.length;d++){var e="",h=!1;(1==c[d].disabled||$("#"+g+"_"+c[d].guid).length||$("#"+c[d].guid).length||1==c[d].isMember||c[d].guid==a.userGuid)&&(e="opacity: 0.4;",h=!0);var i='<li id="user_'+c[d].guid+'"><a style="'+e+'" data-taken="'+h+'" tabindex="-1" href="javascript:$.fn.userpicker.addUserTag(\''+c[d].guid+"', '"+c[d].image+"', '"+c[d].displayName.replace(/'/g,"\\'")+"', '"+g+'\');"><img class="img-rounded" src="'+c[d].image+'" height="20" width="20" alt=""/> '+c[d].displayName+"</a></li>";$("#"+g+"_userpicker").append(i)}0==$("#"+g+"_userpicker").children().length&&$("#"+g+"_userpicker").hide(),f=""}else $("#"+g+"_userpicker").hide();$("#"+g+"_userpicker li").removeHighlight(),$("#"+g+"_userpicker li").highlight(b),$("#"+g+"_userpicker li:eq(0)").addClass("selected")})}function e(){$("#maxUsersHint").remove();var b='<div id="maxUsersHint" style="display: none;" class="alert alert-danger"><button type="button" class="close" data-dismiss="alert">x</button><strong>Sorry!</strong> You can add a maximum of '+a.maxUsers+" users as admin for this group.</div>";$("#"+g+"_invite_tags").after(b),$("#maxUsersHint").fadeIn("fast")}a=$.extend({inputId:"",maxUsers:0,searchUrl:"",currentValue:"",renderType:"normal",focus:!1,userGuid:"",data:{},placeholderText:"Add an user"},a);var f="",g="";b(),jQuery("#"+g+"_invite_tags").click(function(){$("#"+g+"_tag_input_field").focus()}),$("#"+g+"_tag_input_field").keydown(function(b){""==$(this).val()&&9==b.keyCode||40!=b.keyCode&&38!=b.keyCode&&13!=b.keyCode&&9!=b.keyCode||b.preventDefault(),0!=a.maxUsers&&9!=b.keyCode&&userCount==a.maxUsers&&(e(),b.preventDefault())}),$("#"+g+"_tag_input_field").keyup(function(a){if($("#"+g+"_tag_input_field").val().length>=3){if($("#"+g+"_userpicker").css({position:"absolute",top:$("#"+g+"_tag_input_field").position().top+30,left:$("#"+g+"_tag_input_field").position().left+0
|
||
}),40==a.keyCode)return""===f?f=1:f+1<$("#"+g+"_userpicker li").length&&f++,$("#"+g+"_userpicker li").removeClass("selected"),$("#"+g+"_userpicker li:eq("+f+")").addClass("selected"),!1;if(38==a.keyCode)return""===f?f=1:f>0&&f--,$("#"+g+"_userpicker li").removeClass("selected"),$("#"+g+"_userpicker li:eq("+f+")").addClass("selected"),!1;if(13==a.keyCode||9==a.keyCode){var b=$("#"+g+"_userpicker .selected a").attr("href");void 0!==b&&(window.location.href=b)}else{var c=$("#"+g+"_tag_input_field").val();$("#"+g+"_userpicker").show(),d(c)}}else $("#"+g+"_userpicker").hide()}),$("#"+g+"_tag_input_field").focusout(function(){$(a.inputId).val($.fn.userpicker.parseUserInput(g))})},$.fn.userpicker.addUserTag=function(a,b,c,d){if("true"!=$("#user_"+a+" a").attr("data-taken")){var e='<li class="userInput" id="'+d+"_"+a+'"><img class="img-rounded" alt="24x24" data-src="holder.js/24x24" style="width: 24px; height: 24px;" src="'+b+'" alt="'+c+'" width="24" height="24" />'+c+'<i class="fa fa-times-circle"></i></li>';$("#"+d+"_tag_input").before(e),$("#"+d+"_"+a+" i").click(function(){$("#"+d+"_"+a).remove(),userCount--}),$("#"+d+"_userpicker").hide(),$("#"+d+"_tag_input_field").focus(),$("#"+d+"_tag_input_field").val("")}},$.fn.userpicker.parseUserInput=function(a){$("#"+a+"_invite_tags").after('<div id="'+a+'_inputResult"></div>'),$("#"+a+"_inputResult").html($("#"+a+"_invite_tags").html()),$("#"+a+"_inputResult .userInput").each(function(){var b=this.id.replace(a+"_","");$(this).after(b+","),$(this).remove()});var b=$("#"+a+"_inputResult").text();return $("#"+a+"_inputResult").remove(),b}; |