fairnet/src/main/webapp/innorix/innorix_svr.js

141 lines
887 KiB
JavaScript

/*
* innorix-wp9 1.0.0
* INNORIX Transfer solution
* Thu, 20 Mar 2025 01:59:46 GMT
*
* Copyright (C) INNORIX / innorix-dev-team, http://innorix.com
*/
var INNORIX_LICENSE = "RIfVrY2sXEQfh3eogVLAn1pVnB8XfcdC02WX/2ReTAQs8EcApQcdJ90jbybPS/EiUptvnOEEqR2JysNSySyMW3iKidLLK0bIajVKGT2exy0beybrjbTISPnnOMcLkr/sWOUW82QQ+1NUlgVX2vOQdCoRNJxDj513k//e++7tqBV7WCiX4xPK3KwPn2lZgcLGZsDZSRk3DhebMWrNyTOaihyOM1ZpgbeB8bjP/Kz22I0dC9DbO0Ma4SwHVhHCRI5JbOrFQENkntwPHAklZBSO2mqq2j6iJjXPXHfh/gA6rk6KjnlC8xEeSo4G2QyPWvPoV++6sz6CKNrdyiJ+3QLFUA==";
var INNORIX_SIGNATURE = "qcFHynkt8zcwst10kle0yd0AnvQx0989RcJ5oS46SZwNkk8QswA4lu6rt8heIp6qHUn3ernHQTdNDKyNxB/us0fGENTqcwNlWAmhBT0mJ7W+EUdv+C0GTxlqCRbBHuYQgC8rTCUS4JkSfCSzo/cEFLzI1o9pcdO4ZDg7TFnChhwWhi6nxdzOJGrnt7NVMggW4zrxTETaB/Eq0rJuL3cFgg3pHjbeLszXa5LATxdEeWVKyksrDDT6D+muH+3UK5jZd2cHj56n5v5ox3scnO9og3Iwovl58Uatz15Ny9carxwhvqGsdRzt5wndiw5wO/KEG+kWHc66Z9zLbM7raCx4zA==";
var INNORIX_VERSION = '1.3.5.539'
var INNORIX_WIN_VERSION = '1.3.5.539'
var INNORIX_MAC_VERSION = '1.3.5.535'
var INNORIX_LINUX_VERSION = '1.3.5.535'
var INNORIX_WHITELIST = []
var innorix_install_retry_count = 3
Math.cryptoRandom=function(){for(var e,t,n=[];(t="."+n.join("")).length<30;){e=(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(5));for(var r=0;r<e.length;r++){var i=e[r]<4e9?e[r].toString().slice(1):"";i.length>0&&(n[n.length]=i)}}return Number(t)},function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(Ae)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(qe,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:He.test(n)?pe.parseJSON(n):n)}catch(ie){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(Le(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?null==(i=o[t])&&(i=o[pe.camelCase(t)]):i=o,i}}function d(e,t,n){if(Le(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):de.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function f(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{o=o||".5",c/=o,pe.style(e,t,c+l)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=$e.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Pe.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t,n,r,i){for(var o,a,s,u,l,c,d,f=e.length,v=p(t),y=[],x=0;f>x;x++)if((a=e[x])||0===a)if("object"===pe.type(a))pe.merge(y,a.nodeType?[a]:a);else if(Xe.test(a)){for(u=u||v.appendChild(t.createElement("div")),l=(Be.exec(a)||["",""])[1].toLowerCase(),d=ze[l]||ze._default,u.innerHTML=d[1]+pe.htmlPrefilter(a)+d[2],o=d[0];o--;)u=u.lastChild;if(!de.leadingWhitespace&&Ie.test(a)&&y.push(t.createTextNode(Ie.exec(a)[0])),!de.tbody)for(a="table"!==l||Ue.test(a)?"<table>"!==d[1]||Ue.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(y,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=v.lastChild}else y.push(t.createTextNode(a));for(u&&v.removeChild(u),de.appendChecked||pe.grep(h(y,"input"),m),x=0;a=y[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(v.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)We.test(a.type||"")&&n.push(a);return u=null,v}function y(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){console.log(e)}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)pe.event.add(t,n,s[n][r])}a.data&&(a.data=pe.extend({},a.data))}}function k(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!de.noCloneEvent&&t[pe.expando]){i=pe._data(t);for(r in i.events)pe.removeEvent(t,r,i.handle);t.removeAttribute(pe.expando)}"script"===n&&t.text!==e.text?(C(t).text=e.text,E(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),de.html5Clone&&e.innerHTML&&!pe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Pe.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function S(e,t,n,r){t=oe.apply([],t);var i,o,a,s,u,l,c=0,d=e.length,f=d-1,p=t[0],g=pe.isFunction(p);if(g||d>1&&"string"==typeof p&&!de.checkClone&&nt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(d&&(l=v(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;d>c;c++)o=l,c!==f&&(o=pe.clone(o,!0,!0),a&&pe.merge(s,h(o,"script"))),n.call(e[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,pe.map(s,E),c=0;a>c;c++)o=s[c],We.test(o.type||"")&&!pe._data(o,"globalEval")&&pe.contains(u,o)&&(o.src?pe._evalUrl&&pe._evalUrl(o.src):pe.globalEval((o.text||o.textContent||o.innerHTML||"").replace(it,"")));l=i=null}return e}function A(e,t,n){for(var r,i=t?pe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||pe.cleanData(h(r)),r.parentNode&&(n&&pe.contains(r.ownerDocument,r)&&g(h(r,"script")),r.parentNode.removeChild(r));return e}function D(e,t){var n=pe(t.createElement(e)).appendTo(t.body),r=pe.css(n[0],"display");return n.detach(),r}function j(e){var t=re,n=ut[e];return n||(n=D(e,t),"none"!==n&&n||(st=(st||pe("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(st[0].contentWindow||st[0].contentDocument).document,t.write(),t.close(),n=D(e,t),st.detach()),ut[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Ct)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Tt.length;n--;)if((e=Tt[n]+t)in Ct)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;s>a;a++)r=e[a],r.style&&(o[a]=pe._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&Oe(r)&&(o[a]=pe._data(r,"olddisplay",j(r.nodeName)))):(i=Oe(r),(n&&"none"!==n||!i)&&pe._data(r,"olddisplay",i?n:pe.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function _(e,t,n){var r=xt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function M(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=pe.css(e,n+Fe[o],!0,i)),r?("content"===n&&(a-=pe.css(e,"padding"+Fe[o],!0,i)),"margin"!==n&&(a-=pe.css(e,"border"+Fe[o]+"Width",!0,i))):(a+=pe.css(e,"padding"+Fe[o],!0,i),"padding"!==n&&(a+=pe.css(e,"border"+Fe[o]+"Width",!0,i)));return a}function F(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=pt(e),a=de.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=ht(e,t,o),(0>i||null==i)&&(i=e.style[t]),ct.test(i))return i;r=a&&(de.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+M(e,t,n||(a?"border":"content"),r,o)+"px"}function O(e,t,n,r,i){return new O.prototype.init(e,t,n,r,i)}function R(){return e.setTimeout(function(){Et=void 0}),Et=pe.now()}function P(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Fe[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function B(e,t,n){for(var r,i=($.tweeners[t]||[]).concat($.tweeners["*"]),o=0,a=i.length;a>o;o++)if(r=i[o].call(n,t,e))return r}function W(e,t,n){var r,i,o,a,s,u,l,c=this,d={},f=e.style,p=e.nodeType&&Oe(e),h=pe._data(e,"fxshow");n.queue||(s=pe._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,u=s.empty.fire,s.empty.fire=function(){s.unqueued||u()}),s.unqueued++,c.always(function(){c.always(function(){s.unqueued--,pe.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],l=pe.css(e,"display"),"inline"===("none"===l?pe._data(e,"olddisplay")||j(e.nodeName):l)&&"none"===pe.css(e,"float")&&(de.inlineBlockNeedsLayout&&"inline"!==j(e.nodeName)?f.zoom=1:f.display="inline-block")),n.overflow&&(f.overflow="hidden",de.shrinkWrapBlocks()||c.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],kt.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(p?"hide":"show")){if("show"!==i||!h||void 0===h[r])continue;p=!0}d[r]=h&&h[r]||pe.style(e,r)}else l=void 0;if(pe.isEmptyObject(d))"inline"===("none"===l?j(e.nodeName):l)&&(f.display=l);else{h?"hidden"in h&&(p=h.hidden):h=pe._data(e,"fxshow",{}),o&&(h.hidden=!p),p?pe(e).show():c.done(function(){pe(e).hide()}),c.done(function(){var t;pe._removeData(e,"fxshow");for(t in d)pe.style(e,t,d[t])});for(r in d)a=B(p?h[r]:0,r,c),r in h||(h[r]=a.start,p&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function I(e,t){var n,r,i,o,a;for(n in e)if(r=pe.camelCase(n),i=t[r],o=e[n],pe.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=pe.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function $(e,t,n){var r,i,o=0,a=$.prefilters.length,s=pe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Et||R(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:pe.extend({},t),opts:pe.extend(!0,{specialEasing:{},easing:pe.easing._default},n),originalProperties:t,originalOptions:n,startTime:Et||R(),duration:n.duration,tweens:[],createTween:function(t,n){var r=pe.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(I(c,l.opts.specialEasing);a>o;o++)if(r=$.prefilters[o].call(l,e,c,l.opts))return pe.isFunction(r.stop)&&(pe._queueHooks(l.elem,l.opts.queue).stop=pe.proxy(r.stop,r)),r;return pe.map(c,B,l),pe.isFunction(l.opts.start)&&l.opts.start.call(e,l),pe.fx.timer(pe.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function z(e){return pe.attr(e,"class")||""}function X(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(Ae)||[];if(pe.isFunction(n))for(;r=o[i++];)"+"===r.charAt(0)?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function U(e,t,n,r){function i(s){var u;return o[s]=!0,pe.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===Qt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function V(e,t){var n,r,i=pe.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((i[r]?e:n||(n={}))[r]=t[r]);return n&&pe.extend(!0,e,n),e}function Y(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(a in s)if(s[a]&&s[a].test(i)){u.unshift(a);break}if(u[0]in n)o=u[0];else{for(a in n){if(!u[0]||e.converters[a+" "+u[0]]){o=a;break}r||(r=a)}o=o||r}return o?(o!==u[0]&&u.unshift(o),n[o]):void 0}function J(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(de){return{state:"parsererror",error:a?de:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function G(e){return e.style&&e.style.display||pe.css(e,"display")}function Q(e){if(!pe.contains(e.ownerDocument||re,e))return!0;for(;e&&1===e.nodeType;){if("none"===G(e)||"hidden"===e.type)return!0;e=e.parentNode}return!1}function K(e,t,n,r){var i;if(pe.isArray(t))pe.each(t,function(t,i){n||nn.test(e)?r(e,i):K(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==pe.type(t))r(e,t);else for(i in t)K(e+"["+i+"]",t[i],n,r)}function Z(){try{return new e.XMLHttpRequest}catch(t){}}function ee(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function te(e){return pe.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}var ne=[],re=e.document,ie=ne.slice,oe=ne.concat,ae=ne.push,se=ne.indexOf,ue={},le=ue.toString,ce=ue.hasOwnProperty,de={},fe="1.12.4",pe=function(e,t){return new pe.fn.init(e,t)},he=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ge=/^-ms-/,me=/-([\da-z])/gi,ve=function(e,t){return t.toUpperCase()};pe.fn=pe.prototype={jquery:fe,constructor:pe,selector:"",length:0,toArray:function(){return ie.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:ie.call(this)},pushStack:function(e){var t=pe.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return pe.each(this,e)},map:function(e){return this.pushStack(pe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(ie.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ae,sort:ne.sort,splice:ne.splice},pe.extend=pe.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||pe.isFunction(a)||(a={}),s===u&&(a=this,s--);u>s;s++)if(null!=(i=arguments[s]))for(r in i)e=a[r],n=i[r],a!==n&&(l&&n&&(pe.isPlainObject(n)||(t=pe.isArray(n)))?(t?(t=!1,o=e&&pe.isArray(e)?e:[]):o=e&&pe.isPlainObject(e)?e:{},a[r]=pe.extend(l,o,n)):void 0!==n&&(a[r]=n));return a},pe.extend({expando:"jQuery"+(fe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===pe.type(e)},isArray:Array.isArray||function(e){return"array"===pe.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){var t=e&&e.toString();return!pe.isArray(e)&&t-parseFloat(t)+1>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(ne){return!1}if(!de.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ve)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;r>i&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(he,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?pe.merge(r,"string"==typeof e?[e]:e):ae.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(se)return se.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;)e[i++]=t[r++];if(n!==n)for(;void 0!==t[r];)e[i++]=t[r++];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;o>i;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,r){var i,o,a=0,s=[];if(n(e))for(i=e.length;i>a;a++)null!=(o=t(e[a],a,r))&&s.push(o);else for(a in e)null!=(o=t(e[a],a,r))&&s.push(o);return oe.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(i=e[t],t=e,e=i),pe.isFunction(e)?(n=ie.call(arguments,2),r=function(){return e.apply(t||this,n.concat(ie.call(arguments)))},r.guid=e.guid=e.guid||pe.guid++,r):void 0},now:function(){return+new Date},support:de}),"function"==typeof Symbol&&(pe.fn[Symbol.iterator]=ne[Symbol.iterator]),pe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ue["[object "+t+"]"]=t.toLowerCase()});var ye=function(e){function t(e,t,n,r){var i,o,a,s,l,d,f,p,h=t&&t.ownerDocument,g=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==g&&9!==g&&11!==g)return n;if(!r&&((t?t.ownerDocument||t:R)!==j&&D(t),t=t||j,H)){if(11!==g&&(d=ge.exec(e)))if(i=d[1]){if(9===g){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(h&&(a=h.getElementById(i))&&F(t,a)&&a.id===i)return n.push(a),n}else{if(d[2])return G.apply(n,t.getElementsByTagName(e)),n;if((i=d[3])&&x.getElementsByClassName&&t.getElementsByClassName)return G.apply(n,t.getElementsByClassName(i)),n}if(x.qsa&&!$[e+" "]&&(!q||!q.test(e))){if(1!==g)h=t,p=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(ve,"\\$&"):t.setAttribute("id",s=O),f=C(e),o=f.length,l=ce.test(s)?"#"+s:"[id='"+s+"']";o--;)f[o]=l+" "+c(f[o]);p=f.join(","),h=me.test(e)&&u(t.parentNode)||t}if(p)try{return G.apply(n,h.querySelectorAll(p)),n}catch(W){}finally{s===O&&t.removeAttribute("id")}}}return N(e.replace(oe,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>b.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[O]=!0,e}function i(e){var t=j.createElement("div");try{return!!e(t)}catch(x){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function l(){}function c(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=B++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,u,l,c=[P,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(l=t[O]||(t[O]={}),u=l[t.uniqueID]||(l[t.uniqueID]={}),(s=u[r])&&s[0]===P&&s[1]===o)return c[2]=s[2];if(u[r]=c,c[2]=e(t,n,a))return!0}}}function f(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function p(e,n,r){for(var i=0,o=n.length;o>i;i++)t(e,n[i],r);return r}function h(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;u>s;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function g(e,t,n,i,o,a){return i&&!i[O]&&(i=g(i)),o&&!o[O]&&(o=g(o,a)),r(function(r,a,s,u){var l,c,d,f=[],g=[],m=a.length,v=r||p(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:h(v,f,e,s,u),x=n?o||(r?e:m||i)?[]:a:y;if(n&&n(y,x,s,u),i)for(l=h(x,g),i(l,[],s,u),c=l.length;c--;)(d=l[c])&&(x[g[c]]=!(y[g[c]]=d));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(d=x[c])&&l.push(y[c]=d);o(null,x=[],l,u)}for(c=x.length;c--;)(d=x[c])&&(l=o?K(r,d):f[c])>-1&&(r[l]=!(a[l]=d))}}else x=h(x===a?x.splice(m,x.length):x),o?o(null,a,x,u):G.apply(a,x)})}function m(e){for(var t,n,r,i=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return K(t,e)>-1},a,!0),p=[function(e,n,r){var i=!o&&(r||n!==k)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];i>s;s++)if(n=b.relative[e[s].type])p=[d(f(p),n)];else{if(n=b.filter[e[s].type].apply(null,e[s].matches),n[O]){for(r=++s;i>r&&!b.relative[e[r].type];r++);return g(s>1&&f(p),s>1&&c(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,r>s&&m(e.slice(s,r)),i>r&&m(e=e.slice(r)),i>r&&c(e))}p.push(n)}return f(p)}function v(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,d,f,p=0,g="0",m=r&&[],v=[],y=k,x=r||o&&b.find.TAG("*",l),w=P+=null==y?1:Math.random()||.1,T=x.length;for(l&&(k=a===j||a||l);g!==T&&null!=(c=x[g]);g++){if(o&&c){for(d=0,a||c.ownerDocument===j||(D(c),s=!H);f=e[d++];)if(f(c,a||j,s)){u.push(c);break}l&&(P=w)}i&&((c=!f&&c)&&p--,r&&m.push(c))}if(p+=g,i&&g!==p){for(d=0;f=n[d++];)f(m,v,a,s);if(r){if(p>0)for(;g--;)m[g]||v[g]||(v[g]=Y.call(u));v=h(v)}G.apply(u,v),l&&!r&&v.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(P=w,k=y),m};return i?r(a):a}var y,x,b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,M,F,O="sizzle"+1*new Date,R=e.document,P=0,B=0,W=n(),I=n(),$=n(),z=function(e,t){return e===t&&(A=!0),0},X=1<<31,U={}.hasOwnProperty,V=[],Y=V.pop,J=V.push,G=V.push,Q=V.slice,K=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),oe=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),de={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},fe=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ve=/'|\\/g,ye=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},be=function(){D()};try{G.apply(V=Q.call(R.childNodes),R.childNodes),V[R.childNodes.length].nodeType}catch(h){G={apply:V.length?function(e,t){J.apply(e,Q.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=t.support={},T=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},D=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:R;return r!==j&&9===r.nodeType&&r.documentElement?(j=r,L=j.documentElement,H=!T(j),(n=j.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",be,!1):n.attachEvent&&n.attachEvent("onunload",be)),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(j.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=he.test(j.getElementsByClassName),x.getById=i(function(e){return L.appendChild(e).id=O,!j.getElementsByName||!j.getElementsByName(O).length}),x.getById?(b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&H){var n=t.getElementById(e);return n?[n]:[]}},b.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),b.find.TAG=x.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=x.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&H?t.getElementsByClassName(e):void 0},_=[],q=[],(x.qsa=he.test(j.querySelectorAll))&&(i(function(e){L.appendChild(e).innerHTML="<a id='"+O+"'></a><select id='"+O+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||q.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+O+"-]").length||q.push("~="),e.querySelectorAll(":checked").length||q.push(":checked"),e.querySelectorAll("a#"+O+"+*").length||q.push(".#.+[+~]")}),i(function(e){var t=j.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&q.push("name"+ee+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),q.push(",.*:")})),(x.matchesSelector=he.test(M=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){x.disconnectedMatch=M.call(e,"div"),M.call(e,"[s!='']:x"),_.push("!=",re)}),q=q.length&&new RegExp(q.join("|")),_=_.length&&new RegExp(_.join("|")),t=he.test(L.compareDocumentPosition),F=t||he.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===j||e.ownerDocument===R&&F(R,e)?-1:t===j||t.ownerDocument===R&&F(R,t)?1:S?K(S,e)-K(S,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===j?-1:t===j?1:i?-1:o?1:S?K(S,e)-K(S,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===R?-1:u[r]===R?1:0},j):j},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==j&&D(e),n=n.replace(ue,"='$1']"),x.matchesSelector&&H&&!$[n+" "]&&(!_||!_.test(n))&&(!q||!q.test(n)))try{var r=M.call(e,n);if(r||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(w){}return t(n,j,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==j&&D(e),F(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==j&&D(e);var n=b.attrHandle[t.toLowerCase()],r=n&&U.call(b.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==r?r:x.attributes||!H?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!x.detectDuplicates,S=!x.sortStable&&e.slice(0),e.sort(z),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return S=null,e},w=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=w(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=w(t);return n},b=t.selectors={cacheLength:50,createPseudo:r,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,d,f,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(f=m,d=f[O]||(f[O]={}),
c=d[f.uniqueID]||(d[f.uniqueID]={}),l=c[e]||[],p=l[0]===P&&l[1],x=p&&l[2],f=p&&m.childNodes[p];f=++p&&f&&f[g]||(x=p=0)||h.pop();)if(1===f.nodeType&&++x&&f===t){c[e]=[P,p,x];break}}else if(y&&(f=t,d=f[O]||(f[O]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),l=c[e]||[],p=l[0]===P&&l[1],x=p),!1===x)for(;(f=++p&&f&&f[g]||(x=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++x||(y&&(d=f[O]||(f[O]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),c[e]=[P,x]),f!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=b.pseudos[e]||b.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[O]?o(n):o.length>1?(i=[e,e,"",n],b.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=K(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=E(e.replace(oe,"$1"));return i[O]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(ye,xe),function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,xe).toLowerCase(),function(t){var n;do{if(n=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===j.activeElement&&(!j.hasFocus||j.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return fe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[0>n?n+t:n]}),even:s(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:s(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:s(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:s(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},b.pseudos.nth=b.pseudos.eq;for(y in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[y]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(y);for(y in{submit:!0,reset:!0})b.pseudos[y]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(y);return l.prototype=b.filters=b.pseudos,b.setFilters=new l,C=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=I[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=b.preFilter;s;){r&&!(i=ae.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(oe," ")}),s=s.slice(r.length));for(a in b.filter)!(i=de[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):I(e,u).slice(0)},E=t.compile=function(e,t){var n,r=[],i=[],o=$[e+" "];if(!o){for(t||(t=C(e)),n=t.length;n--;)o=m(t[n]),o[O]?r.push(o):i.push(o);o=$(e,v(i,r)),o.selector=e}return o},N=t.select=function(e,t,n,r){var i,o,a,s,l,d="function"==typeof e&&e,f=!r&&C(e=d.selector||e);if(n=n||[],1===f.length){if(o=f[0]=f[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&H&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(ye,xe),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=de.needsContext.test(e)?0:o.length;i--&&(a=o[i],!b.relative[s=a.type]);)if((l=b.find[s])&&(r=l(a.matches[0].replace(ye,xe),me.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&c(o)))return G.apply(n,r),n;break}}return(d||E(e,f))(r,t,!H,n,!t||me.test(e)&&u(t.parentNode)||t),n},x.sortStable=O.split("").sort(z).join("")===O,x.detectDuplicates=!!A,D(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(j.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;return n?void 0:!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ye,pe.expr=ye.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ye.uniqueSort,pe.text=ye.getText,pe.isXMLDoc=ye.isXML,pe.contains=ye.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;i>t;t++)if(pe.contains(r[t],this))return!0}));for(t=0;i>t;t++)pe.find(e,r[t],n);return n=this.pushStack(i>1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(!(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if((i=re.getElementById(r[2]))&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))}).prototype=pe.fn,Ee=pe(re);var ke=/^(?:parents|prev(?:Until|All))/,Se={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(pe.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=we.test(e)||"string"!=typeof e?pe(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Se[e]||(i=pe.uniqueSort(i)),ke.test(e)&&(i=i.reverse())),this.pushStack(i)}});var Ae=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u<a.length;)!1===a[u].apply(n[0],n[1])&&e.stopOnFalse&&(u=a.length,n=!1);e.memory||(n=!1),t=!1,i&&(a=n?[]:"")},c={add:function(){return a&&(n&&!t&&(u=a.length-1,s.push(n)),function r(t){pe.each(t,function(t,n){pe.isFunction(n)?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==pe.type(n)&&r(n)})}(arguments),n&&!t&&l()),this},remove:function(){return pe.each(arguments,function(e,t){for(var n;(n=pe.inArray(t,a,n))>-1;)a.splice(n,1),u>=n&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);a>i;i++)o[i]&&pe.isFunction(o[i].promise)?o[i].promise().progress(l(i,n,t)).done(l(i,r,o)).fail(u.reject):--s;return s||u.resolveWith(r,o),u.promise()}});var De;pe.fn.ready=function(e){return pe.ready.promise().done(e),this},pe.extend({isReady:!1,readyWait:1,holdReady:function(e){e?pe.readyWait++:pe.ready(!0)},ready:function(e){(!0===e?--pe.readyWait:pe.isReady)||(pe.isReady=!0,!0!==e&&--pe.readyWait>0||(De.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!De)if(De=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(ie){}n&&n.doScroll&&function r(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(r,50)}a(),pe.ready()}}()}return De.promise(t)},pe.ready.promise();var je;for(je in pe(de))break;de.ownFirst="0"===je,de.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;(n=re.getElementsByTagName("body")[0])&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",de.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");de.deleteExpando=!0;try{delete e.test}catch(t){de.deleteExpando=!1}e=null}();var Le=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)},He=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,qe=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando])&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return d(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return d(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?pe.queue(this[0],e):void 0===t?this:this.each(function(){var n=pe.queue(this,e,t);pe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&pe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){pe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=pe.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=pe._data(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}}),function(){var e;de.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,r;return n=re.getElementsByTagName("body")[0],n&&n.style?(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(re.createElement("div")).style.width="5px",e=3!==t.offsetWidth),n.removeChild(r),e):void 0}}();var _e=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Me=new RegExp("^(?:([+-])=|)("+_e+")([a-z%]*)$","i"),Fe=["Top","Right","Bottom","Left"],Oe=function(e,t){return e=t||e,"none"===pe.css(e,"display")||!pe.contains(e.ownerDocument,e)},Re=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===pe.type(n)){i=!0;for(s in n)Re(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,pe.isFunction(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(pe(e),n)})),t))for(;u>s;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},Pe=/^(?:checkbox|radio)$/i,Be=/<([\w:-]+)/,We=/^$|\/(?:java|ecma)script/i,Ie=/^\s+/,$e="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";!function(){var e=re.createElement("div"),t=re.createDocumentFragment(),n=re.createElement("input");e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",de.leadingWhitespace=3===e.firstChild.nodeType,de.tbody=!e.getElementsByTagName("tbody").length,de.htmlSerialize=!!e.getElementsByTagName("link").length,de.html5Clone="<:nav></:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),de.appendChecked=n.checked,e.innerHTML="<textarea>x</textarea>",de.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),de.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,de.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,de.attributes=!e.getAttribute(pe.expando)}();var ze={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:de.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};ze.optgroup=ze.option,ze.tbody=ze.tfoot=ze.colgroup=ze.caption=ze.thead,ze.th=ze.td;var Xe=/<|&#?\w+;/,Ue=/<tbody/i;!function(){var t,n,r=re.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(de[t]=n in e)||(r.setAttribute(n,"t"),de[t]=!1===r.attributes[n].expando);r=null}();var Ve=/^(?:input|select|textarea)$/i,Ye=/^key/,Je=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ge=/^(?:focusinfocus|focusoutblur)$/,Qe=/^([^.]*)(?:\.(.+)|)/;pe.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,d,f,p,h,g,m=pe._data(e);if(m){for(n.handler&&(u=n,n=u.handler,i=u.selector),n.guid||(n.guid=pe.guid++),(a=m.events)||(a=m.events={}),(c=m.handle)||(c=m.handle=function(e){return void 0===pe||e&&pe.event.triggered===e.type?void 0:pe.event.dispatch.apply(c.elem,arguments)},c.elem=e),t=(t||"").match(Ae)||[""],s=t.length;s--;)o=Qe.exec(t[s])||[],p=g=o[1],h=(o[2]||"").split(".").sort(),p&&(l=pe.event.special[p]||{},p=(i?l.delegateType:l.bindType)||p,l=pe.event.special[p]||{},d=pe.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&pe.expr.match.needsContext.test(i),namespace:h.join(".")},u),(f=a[p])||(f=a[p]=[],f.delegateCount=0,l.setup&&!1!==l.setup.call(e,r,h,c)||(e.addEventListener?e.addEventListener(p,c,!1):e.attachEvent&&e.attachEvent("on"+p,c))),l.add&&(l.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,d):f.push(d),pe.event.global[p]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,d,f,p,h,g,m=pe.hasData(e)&&pe._data(e);if(m&&(c=m.events)){for(t=(t||"").match(Ae)||[""],l=t.length;l--;)if(s=Qe.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(d=pe.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,f=c[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;o--;)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,d.remove&&d.remove.call(e,a));u&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,m.handle)||pe.removeEvent(e,p,m.handle),delete c[p])}else for(p in c)pe.event.remove(e,p+t[l],n,r,!0);pe.isEmptyObject(c)&&(delete m.handle,pe._removeData(e,"events"))}},trigger:function(t,r,i,o){var a,s,u,l,c,d,f,p=[i||re],h=ce.call(t,"type")?t.type:t,g=ce.call(t,"namespace")?t.namespace.split("."):[];if(u=d=i=i||re,3!==i.nodeType&&8!==i.nodeType&&!Ge.test(h+pe.event.triggered)&&(h.indexOf(".")>-1&&(g=h.split("."),h=g.shift(),g.sort()),s=h.indexOf(":")<0&&"on"+h,t=t[pe.expando]?t:new pe.Event(h,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),r=null==r?[t]:pe.makeArray(r,[t]),c=pe.event.special[h]||{},o||!c.trigger||!1!==c.trigger.apply(i,r))){if(!o&&!c.noBubble&&!pe.isWindow(i)){for(l=c.delegateType||h,Ge.test(l+h)||(u=u.parentNode);u;u=u.parentNode)p.push(u),d=u;d===(i.ownerDocument||re)&&p.push(d.defaultView||d.parentWindow||e)}for(f=0;(u=p[f++])&&!t.isPropagationStopped();)t.type=f>1?l:c.bindType||h,a=(pe._data(u,"events")||{})[t.type]&&pe._data(u,"handle"),a&&a.apply(u,r),(a=s&&u[s])&&a.apply&&Le(u)&&(t.result=a.apply(u,r),!1===t.result&&t.preventDefault());if(t.type=h,!o&&!t.isDefaultPrevented()&&(!c._default||!1===c._default.apply(p.pop(),r))&&Le(i)&&s&&i[h]&&!pe.isWindow(i)){d=i[s],d&&(i[s]=null),pe.event.triggered=h;try{i[h]()}catch(n){console.log(n)}pe.event.triggered=void 0,d&&(i[s]=d)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,e)){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,void 0!==(r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==e.type)){for(r=[],n=0;s>n;n++)o=t[n],i=o.selector+" ",void 0===r[i]&&(r[i]=o.needsContext?pe(i,this).index(u)>-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[pe.expando])return e;var t,n,r,i=e.type,o=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=Je.test(i)?this.mouseHooks:Ye.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new pe.Event(o),t=r.length;t--;)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||re),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(r=e.target.ownerDocument||re,i=r.documentElement,n=r.body,e.pageX=t.clientX+(i&&i.scrollLeft||n&&n.scrollLeft||0)-(i&&i.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||n&&n.scrollTop||0)-(i&&i.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==b()&&this.focus)try{return this.focus(),!1}catch(e){console.log(e)}},delegateType:"focusin"},blur:{trigger:function(){return this===b()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return pe.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return pe.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n){var r=pe.extend(new pe.Event,n,{type:e,isSimulated:!0});pe.event.trigger(r,null,t),r.isDefaultPrevented()&&n.preventDefault()}},pe.removeEvent=re.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)}:function(e,t,n){var r="on"+t;e.detachEvent&&("undefined"==typeof e[r]&&(e[r]=null),e.detachEvent(r,n))},pe.Event=function(e,t){return this instanceof pe.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?y:x):this.type=e,t&&pe.extend(this,t),this.timeStamp=e&&e.timeStamp||pe.now(),void(this[pe.expando]=!0)):new pe.Event(e,t)},pe.Event.prototype={constructor:pe.Event,isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=y,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=y,e&&!this.isSimulated&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=y,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},pe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){pe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||pe.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),de.submit||(pe.event.special.submit={setup:function(){return!pe.nodeName(this,"form")&&void pe.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=pe.nodeName(t,"input")||pe.nodeName(t,"button")?pe.prop(t,"form"):void 0;n&&!pe._data(n,"submit")&&(pe.event.add(n,"submit._submit",function(e){e._submitBubble=!0}),pe._data(n,"submit",!0))})},postDispatch:function(e){e._submitBubble&&(delete e._submitBubble,this.parentNode&&!e.isTrigger&&pe.event.simulate("submit",this.parentNode,e))},teardown:function(){return!pe.nodeName(this,"form")&&void pe.event.remove(this,"._submit")}}),de.change||(pe.event.special.change={setup:function(){return Ve.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(pe.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._justChanged=!0)}),pe.event.add(this,"click._change",function(e){this._justChanged&&!e.isTrigger&&(this._justChanged=!1),pe.event.simulate("change",this,e)})),!1):void pe.event.add(this,"beforeactivate._change",function(e){var t=e.target;Ve.test(t.nodeName)&&!pe._data(t,"change")&&(pe.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||pe.event.simulate("change",this.parentNode,e)}),pe._data(t,"change",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return pe.event.remove(this,"._change"),!Ve.test(this.nodeName)}}),de.focusin||pe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){pe.event.simulate(t,e.target,pe.event.fix(e))};pe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=pe._data(r,t);i||r.addEventListener(e,n,!0),pe._data(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=pe._data(r,t)-1;i?pe._data(r,t,i):(r.removeEventListener(e,n,!0),pe._removeData(r,t))}}}),pe.fn.extend({on:function(e,t,n,r){return w(this,e,t,n,r)},one:function(e,t,n,r){return w(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,pe(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=x),this.each(function(){pe.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){pe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?pe.event.trigger(e,t,n,!0):void 0}});var Ke=/ jQuery\d+="(?:null|\d+)"/g,Ze=new RegExp("<(?:"+$e+")[\\s/>]","i"),et=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,tt=/<script|<style|<link/i,nt=/checked\s*(?:[^=]|=\s*.checked.)/i,rt=/^true\/(.*)/,it=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ot=p(re),at=ot.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(et,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(de.html5Clone||pe.isXMLDoc(e)||!Ze.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(at.innerHTML=e.outerHTML,at.removeChild(o=at.firstChild)),!(de.noCloneEvent&&de.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=de.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||Le(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Re(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){T(this,e).appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Re(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ke,""):void 0;if("string"==typeof e&&!tt.test(e)&&(de.htmlSerialize||!Ze.test(e))&&(de.leadingWhitespace||!Ie.test(e))&&!ze[(Be.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e)
;try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(pe.cleanData(h(t,!1)),t.innerHTML=e);t=0}catch(ie){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return S(this,arguments,function(t){var n=this.parentNode;pe.inArray(this,e)<0&&(pe.cleanData(h(this)),n&&n.replaceChild(t,this))},e)}}),pe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){pe.fn[e]=function(e){for(var n,r=0,i=[],o=pe(e),a=o.length-1;a>=r;r++)n=r===a?this:this.clone(!0),pe(o[r])[t](n),ae.apply(i,n.get());return this.pushStack(i)}});var st,ut={HTML:"block",BODY:"block"},lt=/^margin/,ct=new RegExp("^("+_e+")(?!px)[a-z%]+$","i"),dt=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},ft=re.documentElement;!function(){function t(){var t,c,d=re.documentElement;d.appendChild(u),l.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",n=i=s=!1,r=a=!0,e.getComputedStyle&&(c=e.getComputedStyle(l),n="1%"!==(c||{}).top,s="2px"===(c||{}).marginLeft,i="4px"===(c||{width:"4px"}).width,l.style.marginRight="50%",r="4px"===(c||{marginRight:"4px"}).marginRight,t=l.appendChild(re.createElement("div")),t.style.cssText=l.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",l.style.width="1px",a=!parseFloat((e.getComputedStyle(t)||{}).marginRight),l.removeChild(t)),l.style.display="none",o=0===l.getClientRects().length,o&&(l.style.display="",l.innerHTML="<table><tr><td></td><td>t</td></tr></table>",l.childNodes[0].style.borderCollapse="separate",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",(o=0===t[0].offsetHeight)&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),d.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",de.opacity="0.5"===l.style.opacity,de.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",de.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),de.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(de,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var pt,ht,gt=/^(top|right|bottom|left)$/;e.getComputedStyle?(pt=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},ht=function(e,t,n){var r,i,o,a,s=e.style;return n=n||pt(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!de.pixelMarginRight()&&ct.test(a)&&lt.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):ft.currentStyle&&(pt=function(e){return e.currentStyle},ht=function(e,t,n){var r,i,o,a,s=e.style;return n=n||pt(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ct.test(a)&&!gt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var mt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,yt=/^(none|table(?!-c[ea]).+)/,xt=new RegExp("^("+_e+")(.*)$","i"),bt={position:"absolute",visibility:"hidden",display:"block"},wt={letterSpacing:"0",fontWeight:"400"},Tt=["Webkit","O","Moz","ms"],Ct=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ht(e,"opacity");return""===n?"1":n}}}},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":de.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=f(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),de.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(le){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=ht(e,t,r)),"normal"===o&&t in wt&&(o=wt[t]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){return n?yt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,bt,function(){return F(e,t,r)}):F(e,t,r):void 0},set:function(e,n,r){var i=r&&pt(e);return _(e,n,r?M(e,t,r,de.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),de.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(mt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=mt.test(o)?o.replace(mt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(de.reliableMarginRight,function(e,t){return t?dt(e,{display:"inline-block"},ht,[e,"marginRight"]):void 0}),pe.cssHooks.marginLeft=L(de.reliableMarginLeft,function(e,t){return t?(parseFloat(ht(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px":void 0}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+Fe[r]+t]=o[r]||o[r-2]||o[0];return i}},lt.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Re(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=pt(e),i=t.length;i>a;a++)o[t[a]]=pe.css(e,t[a],!1,r);return o}return void 0!==n?pe.style(e,t,n):pe.css(e,t)},e,t,arguments.length>1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Oe(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Et,Nt,kt=/^(?:toggle|show|hide)$/,St=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return f(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(Ae);for(var n,r=0,i=e.length;i>r;r++)n=e[r],$.tweeners[n]=$.tweeners[n]||[],$.tweeners[n].unshift(t)},prefilters:[W],prefilter:function(e,t){t?$.prefilters.unshift(e):$.prefilters.push(e)}}),pe.speed=function(e,t,n){var r=e&&"object"==typeof e?pe.extend({},e):{complete:n||!n&&t||pe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!pe.isFunction(t)&&t};return r.duration=pe.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in pe.fx.speeds?pe.fx.speeds[r.duration]:pe.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){pe.isFunction(r.old)&&r.old.call(this),r.queue&&pe.dequeue(this,r.queue)},r},pe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Oe).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=pe.isEmptyObject(e),o=pe.speed(t,n,r),a=function(){var t=$(this,pe.extend({},e),o);(i||pe._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=pe.timers,a=pe._data(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&St.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||pe.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=pe._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=pe.timers,a=r?r.length:0;for(n.finish=!0,pe.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),pe.each(["toggle","show","hide"],function(e,t){var n=pe.fn[t];pe.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(P(t,!0),e,r,i)}}),pe.each({slideDown:P("show"),slideUp:P("hide"),slideToggle:P("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){pe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),pe.timers=[],pe.fx.tick=function(){var e,t=pe.timers,n=0;for(Et=pe.now();n<t.length;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||pe.fx.stop(),Et=void 0},pe.fx.timer=function(e){pe.timers.push(e),e()?pe.fx.start():pe.timers.pop()},pe.fx.interval=13,pe.fx.start=function(){Nt||(Nt=e.setInterval(pe.fx.tick,pe.fx.interval))},pe.fx.stop=function(){e.clearInterval(Nt),Nt=null},pe.fx.speeds={slow:600,fast:200,_default:400},pe.fn.delay=function(t,n){return t=pe.fx?pe.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e,t=re.createElement("input"),n=re.createElement("div"),r=re.createElement("select"),i=r.appendChild(re.createElement("option"));n=re.createElement("div"),n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",de.getSetAttribute="t"!==n.className,de.style=/top/.test(e.getAttribute("style")),de.hrefNormalized="/a"===e.getAttribute("href"),de.checkOn=!!t.value,de.optSelected=i.selected,de.enctype=!!re.createElement("form").enctype,r.disabled=!0,de.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),de.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),de.radioValue="t"===t.value}();var At=/\r/g,Dt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),(t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(At,""):null==n?"":n)):void 0}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(Dt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;s>u;u++)if(n=r[u],(n.selected||u===i)&&(de.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!pe.nodeName(n.parentNode,"optgroup"))){if(t=pe(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=pe.makeArray(t),a=i.length;a--;)if(r=i[a],pe.inArray(pe.valHooks.option.get(r),o)>-1)try{r.selected=n=!0}catch(se){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){return pe.isArray(t)?e.checked=pe.inArray(pe(e).val(),t)>-1:void 0}},de.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var jt,Lt,Ht=pe.expr.attrHandle,qt=/^(?:checked|selected)$/i,_t=de.getSetAttribute,Mt=de.input;pe.fn.extend({attr:function(e,t){return Re(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Lt:jt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!de.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(Ae);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&_t||!qt.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(_t?n:r)}}),Lt={set:function(e,t,n){return!1===t?pe.removeAttr(e,n):Mt&&_t||!qt.test(n)?e.setAttribute(!_t&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Ht[t]||pe.find.attr;Mt&&_t||!qt.test(t)?Ht[t]=function(e,t,r){var i,o;return r||(o=Ht[t],Ht[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,Ht[t]=o),i}:Ht[t]=function(e,t,n){return n?void 0:e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&_t||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):jt&&jt.set(e,t,n)}}),_t||(jt={set:function(e,t,n){var r=e.getAttributeNode(n);return r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n)?t:void 0}},Ht.id=Ht.name=Ht.coords=function(e,t,n){var r;return n?void 0:(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:void 0},set:jt.set},pe.attrHooks.contenteditable={set:function(e,t,n){jt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){return""===n?(e.setAttribute(t,"auto"),n):void 0}}})),de.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ft=/^(?:input|select|textarea|button|object)$/i,Ot=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Re(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ft.test(e.nodeName)||Ot.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),de.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),de.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),de.enctype||(pe.propFix.enctype="encoding");var Rt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(Ae)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Rt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Ae)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Rt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(Ae)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||!1===e?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Rt," ").indexOf(t)>-1)return!0;return!1}}),pe.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(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Pt=e.location,Bt=pe.now(),Wt=/\?/,It=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace(It,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(ie){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var $t=/#.*$/,zt=/([?&])_=[^&]*/,Xt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ut=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Vt=/^(?:GET|HEAD)$/,Yt=/^\/\//,Jt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Gt={},Qt={},Kt="*/".concat("*"),Zt=Pt.href,en=Jt.exec(Zt.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Zt,type:"GET",isLocal:Ut.test(en[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kt,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":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Gt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,d,y,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&300>t||304===t,r&&(x=Y(f,T,r)),x=J(f,x,T,o),o?(f.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),(w=T.getResponseHeader("etag"))&&(pe.etag[a]=w)),204===t||"HEAD"===f.type?C="nocontent":304===t?C="notmodified":(C=x.state,d=x.data,y=x.error,o=!y)):(y=C,!t&&C||(C="error",0>t&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[d,C,T]):g.rejectWith(p,[T,C,y]),T.statusCode(v),v=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,f,o?d:y]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,f]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,d,f=pe.ajaxSetup({},n),p=f.context||f,h=f.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),v=f.statusCode||{},y={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!d)for(d={};t=Xt.exec(s);)d[t[1].toLowerCase()]=t[2];t=d[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)v[t]=[v[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,f.url=((t||f.url||Zt)+"").replace($t,"").replace(Yt,en[1]+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=pe.trim(f.dataType||"*").toLowerCase().match(Ae)||[""],null==f.crossDomain&&(i=Jt.exec(f.url.toLowerCase()),f.crossDomain=!(!i||i[1]===en[1]&&i[2]===en[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(en[3]||("http:"===en[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=pe.param(f.data,f.traditional)),U(Gt,f,n,T),2===b)return T;l=pe.event&&f.global,l&&0==pe.active++&&pe.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Vt.test(f.type),a=f.url,f.hasContent||(f.data&&(a=f.url+=(Wt.test(a)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=zt.test(a)?a.replace(zt,"$1_="+Bt++):a+(Wt.test(a)?"&":"?")+"_="+Bt++)),f.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Kt+"; q=0.01":""):f.accepts["*"]);for(o in f.headers)T.setRequestHeader(o,f.headers[o]);if(f.beforeSend&&(!1===f.beforeSend.call(p,T,f)||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](f[o]);if(c=U(Qt,f,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,f]),2===b)return T;f.async&&f.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},f.timeout));try{b=1,c.send(y,r)}catch(Te){if(!(2>b))throw Te;r(-1,Te)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return de.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:Q(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var tn=/%20/g,nn=/\[\]$/,rn=/\r?\n/g,on=/^(?:submit|button|image|reset|file)$/i,an=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)K(n,e[n],t,i);return r.join("&").replace(tn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&an.test(this.nodeName)&&!on.test(e)&&(this.checked||!Pe.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(rn,"\r\n")}}):{name:t.name,value:n.replace(rn,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var sn=0,un={},ln=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in un)un[e](void 0,!0)}),de.cors=!!ln&&"withCredentials"in ln,(ln=de.ajax=!!ln)&&pe.ajaxTransport(function(t){if(!t.crossDomain||de.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++sn;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete un[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(ce){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=un[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var cn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=cn.pop()||pe.expando+"_"+Bt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):!1!==t.jsonp&&(t.url+=(Wt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,cn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=v([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var fn=pe.fn.load;pe.fn.load=function(e,t,n){if("string"!=typeof e&&fn)return fn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("<div>").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),d=pe(e),f={};"static"===c&&(e.style.position="relative"),s=d.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=d.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):d.css(f)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;return o?(t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r):void 0},position:function(){if(this[0]){
var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||ft})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Re(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(de.pixelPosition,function(e,n){return n?(n=ht(e,t),ct.test(n)?pe(e).position()[t]+"px":n):void 0})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===i?"margin":"border");return Re(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pe});var pn=e.jQuery,hn=e.$;return pe.noConflict=function(t){return e.$===pe&&(e.$=hn),t&&e.jQuery===pe&&(e.jQuery=pn),pe},t||(e.jQuery=e.$=pe),pe});
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(p.inline?p.dpDiv.parent()[0]:p.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{(s=t._data(n,"events"))&&s.remove&&t(n).triggerHandler("remove")}catch(a){console.log(a)}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?void(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}()):void(r[e]=s)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=l.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=t(e.add?t.unique(a.get().concat(e.element.get())):a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||!0!==o.options.disabled&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&!1===a.apply(this.element[0],[i].concat(s))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?!0===n||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:s||n?{left:0,top:0}:t(e).offset(),scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,h=t(this),l=h.outerWidth(),c=h.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=l+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),I=e(k.my,h.outerWidth(),h.outerHeight());"right"===n.my[0]?D.left-=l:"center"===n.my[0]&&(D.left-=l/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=I[0],D.top+=I[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+I[0],u[1]+I[1]],my:n.my,at:n.at,within:b,elem:h})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-l,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:h,left:D.left,top:D.top,width:l,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(0>(i=t.left+d+p+f+e.collisionWidth-r-o)||a(c)>i)&&(t.left+=d+p+f):u>0&&((s=t.left-e.collisionPosition.marginLeft+d+p+f-h)>0||u>a(s))&&(t.left+=d+p+f)},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(0>(s=t.top+p+f+g+e.collisionHeight-r-o)||a(c)>s)&&(t.top+=p+f+g):u>0&&((i=t.top-e.collisionPosition.marginTop+p+f+g-h)>0||u>a(i))&&(t.top+=p+f+g)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,!(!i.href||!o||"map"!==n.nodeName.toLowerCase())&&(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled)&&(h=t(i).closest("fieldset")[0])&&(r=!h.disabled):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return(!s||"static"!==e.css("position"))&&n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var c=!1;t(document).on("mouseup",function(){c=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!c){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(s&&!n&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),c=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,c=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(!1===this._trigger("drag",e,s))return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==i._trigger("stop",e)&&i._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,
n.containment?"window"===n.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===n.containment?void(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):n.containment.constructor===Array?void(this.containment=n.containment):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),void((s=i[0])&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i))):void(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),!1!==o&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,h,l,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)h=s.snapElements[d].left-s.margins.left,l=h+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,h-g>_||m>l+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(h-_),r=g>=Math.abs(l-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(h-m),r=g>=Math.abs(l-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?void(e=arguments[0]):e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight})},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return!(!s||(s.currentItem||s.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&u(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),!n&&(!!this.accept.call(this.element[0],s.currentItem||s.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var u=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,h=a+e.helperProportions.height,l=i.offset.left,c=i.offset.top,u=l+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=l&&u>=r&&a>=c&&d>=h;case"intersect":return o+e.helperProportions.width/2>l&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>h-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,l,i.proportions().width);case"touch":return(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d)&&(o>=l&&u>=o||r>=l&&u>=r||l>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&u(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=u(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},!1!==t.uiBackCompat&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0||(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)((s=t(this.handles[i])[0])===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),!!h&&(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,
a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),g&&(p-=l),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),!!s&&(!(this.options.handle&&!i&&(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),!n))&&(this.currentItem=s,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),!1!==r&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],(o=this._intersectsWithPointer(s))&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"!==this.options.type||!t.contains(this.element[0],n))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!s||!n)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s],this.document[0]),n=o.length-1;n>=0;n--)(a=t.data(o[n],this.widgetFullName))&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)(o=t.data(n[s],this.widgetFullName))&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,h,l,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[a],l=!1,e[u]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(e[u]-h)&&(n=Math.abs(e[u]-h),o=this.items[s],this.direction=l?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,
!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),void("icons"===t&&(this._destroyIcons(),e&&this._createIcons())))},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=t()):!1===e.active?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:h?t():a,newPanel:l};e.preventDefault(),r&&!n.collapsible||!1===this._trigger("beforeActivate",e,u)||(n.active=!h&&this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,h=t.css("box-sizing"),l=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=l&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(n=u),n=n||u.easing||c.easing,o=o||u.duration||c.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-r),r=0)}})):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]))&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,h=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=h.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=h.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?void(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,s,n;return this.active?void(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,void(i=!0);e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault());if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)})):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),void((s=i.item.attr("aria-label")||n.value)&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion))))},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),--this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var d=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?(o=e.element.find(n),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),void(i=i.concat(o.get()))):void(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var h=n[s]("widget");t.data(h[0],"ui-controlgroup-data",o||n[s]("instance")),i.push(h[0])}}))):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),s=i.data("ui-controlgroup-data");s&&s[e]&&s[e]()})},_updateCornerClass:function(t,e){var i=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,i)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(n){var o=i.options.classes[n]||"";o=t.trim(o.replace(d,"")),s[n]=(o+" "+e[n]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?void this._callChildMethod(e?"disable":"enable"):void this.refresh()},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},
_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e)):void this.refresh()):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==t.uiBackCompat&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?void this._super("showLabel",e):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),void this._superApply(arguments))}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.12.1"}});var p;t.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,h,l,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+c,l/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),p===n&&(p=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,h,l=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),void(l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),a(l.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,r)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l))))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{t.datepicker.parseDate(t.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i))&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var s,n,o,r,h,l,c;s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),!1!==(o=n?n.apply(e,[e,s]):{})&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return!(r|="fixed"===t(this).css("position"))}),h={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),h=t.datepicker._checkOffset(s,h,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),s.inline||(l=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?s.dpDiv.show(l,t.datepicker._get(s,"showOptions"),c):s.dpDiv[l||"show"](l?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s))}},_updateDatepicker:function(e){this.maxRows=4,p=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=e.dpDiv.find("."+this._dayOverClass+" a");a.length>0&&o.apply(a.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",17*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?""+i:i+""))return null;var n,o,a,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(h).match(o);if(!a)throw"Missing number at position "+h;return h+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],h+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+h},x=function(){if(i.charAt(h)!==e.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>h&&(a=i.substr(h),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;!((o=this._getDaysInMonth(g,m-1))>=_);)m++,_-=o;if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=null==i||""===i?s:"string"==typeof i?function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){console.log(s)}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)}(i):"number"==typeof i?isNaN(i)?s:function(t){var e=new Date;return e.setDate(e.getDate()+t),e}(i):new Date(i.getTime());return n=n&&"Invalid Date"==""+n?s:n,n&&(n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0)),this._daylightSavingAdjust(n)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,I,T,P,M,S,H,z,O,A,N,W,E,F,L,R=new Date,B=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),$=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,tt=t.drawYear;if(0>Z&&(Z+=12,tt--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=Q&&Q>e?Q:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)0>--Z&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-$,1)),this._getFormatConfig(t)):i,
s=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z+$,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),I=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:T+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:T+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:T+=" ui-datepicker-group-middle",I=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,tt,Q,J,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[M]+"'>"+p[M]+"</span></th>";for(T+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),H=(this._getFirstDayOfMonth(tt,Z)-c+7)%7,z=Math.ceil((H+S)/7),O=X&&this.maxRows>z?this.maxRows:z,this.maxRows=O,A=this._daylightSavingAdjust(new Date(tt,Z,1-H)),N=0;O>N;N++){for(T+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)E=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!E[0]||Q&&Q>A||J&&A>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+E[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!E[2]?"":" title='"+E[2].replace(/'/g,"&#39;")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?"&#xa0;":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===B.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);T+=W+"</tr>"}Z++,Z>11&&(Z=0,tt++),T+="</tbody></table>"+(X?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=T}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&!1!==this._trigger("beforeClose",e)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===e||t.contains(this.uiDialog[0],e)||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?void this._removeClass(this.uiDialog,"ui-dialog-buttons"):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),h=a.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" top"+(h>=0?"+":"")+h,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(s=o.is(":data(ui-draggable)"),s&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=o.is(":data(ui-resizable)"),n&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||!1===i||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!t(e.target).closest(".ui-dialog").length||!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==t.uiBackCompat&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),void this._refreshValue())},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return!1===t?void this.button.css("width",""):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),void this.button.outerWidth(t))},_resizeMenu:function(){
this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push("<span tabindex='0'></span>");this.handles=n.add(t(o.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l=this,c=this.options;return!c.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-l.values(e));(n>i||n===i&&(e===l._lastChangedValue||l.values(e)===c.min))&&(n=i,o=t(this),a=e)}),!1!==this._start(e,a)&&(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),r=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-r.left-o.width()/2,top:e.pageY-r.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n=this.value(),o=this.values();this._hasMultipleValues()&&(s=this.values(e?0:1),n=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(s,i):Math.max(s,i)),o[e]=i),i!==n&&!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&!0===this.options.range&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;t=Math.round((t-e)/i)*i+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=!this._animateOff&&r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=(h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())*100,c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),!0===h.options.range&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?(s-n)/(o-n)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,o)))return}switch(n=this.options.step,i=s=this._hasMultipleValues()?this.values(o):this.value(),e.keyCode){case t.ui.keyCode.HOME:s=this._valueMin();break;case t.ui.keyCode.END:s=this._valueMax();break;case t.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;s=this._trimAlignValue(i+n);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;s=this._trimAlignValue(i-n)}this._slide(e,o,s)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){this.element[0]===t.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),!1!==this._start(e)&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?!1!==this._start(e)&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(i))):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),void this._super(t,e))},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void r(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),!1!==t.uiBackCompat&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=!1!==this.options.active&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=!!this.tabs.length&&0)),!1!==e&&-1===(e=this.tabs.index(this.tabs.eq(e)))&&(e=!i&&0),!i&&!1===e&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s!==this.options.active&&s);default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){for(var s=this.tabs.length-1;-1!==t.inArray(function(){return e>s&&(e=0),0>e&&(e=s),e}(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?void this._activate(e):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),void("heightStyle"===t&&this._setupHeightStyle(e)))},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),!1!==e.active&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),h=t(s).closest("li"),l=h.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=h.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+a,o=e.element.find(n),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),!0===e||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===e)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||!1===this._trigger("beforeActivate",e,c)||(i.active=!r&&this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return!1===e?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;!1!==i&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(!0!==i){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},h=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),h(n,e)},1)}).fail(function(t,e){setTimeout(function(){h(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),!1!==t.uiBackCompat&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),
e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):void((i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}))&&this._open(e,t,i))},_open:function(e,i,s){function n(t){l.of=t,a.is(":hidden")||a.position(l)}var o,a,r,h,l=t.extend({},this.options.position);if(s){if(o=this._find(i))return void o.tooltip.find(".ui-tooltip-content").html(s);i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),h=t("<div>").html(a.find(".ui-tooltip-content").html()),h.removeAttr("name").find("[name]").removeAttr("name"),h.removeAttr("id").find("[id]").removeAttr("id"),h.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(l.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,void(o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)))):void n.removeData("ui-tooltip-open")},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==t.uiBackCompat&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip;var f="ui-effects-",g="ui-effects-style",m="ui-effects-animated",_=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=c[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),p(r,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),c=o.space||"rgba";return h?(a=s[c](h),s[l[c].cache]=a[l[c].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a=/^([\-+])=\s*(\d+\.?\d*)/,r=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},l={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"}}}},c={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},u=h.support={},d=t("<p>")[0],p=t.each;d.style.cssText="background-color:rgba(1,1,1,.5)",u.rgba=d.style.backgroundColor.indexOf("rgba")>-1,p(l,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,a,r,c){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),f=this._rgba=[];return a!==e&&(n=[n,a,r,c],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(p(l.rgba.props,function(t,e){f[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?p(l,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):p(l,function(e,s){var o=s.cache;p(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return p(l,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],p(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return p(l,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),o=l[n],a=0===this.alpha()?h("transparent"):this,r=a[o.cache]||o.to(a._rgba),u=r.slice();return s=s[o.cache],p(o.props,function(t,n){var o=n.idx,a=r[o],h=s[o],l=c[n.type]||{};null!==h&&(null===a?u[o]=h:(l.mod&&(h-a>l.mod/2?a+=l.mod:a-h>l.mod/2&&(a-=l.mod)),u[o]=i((h-a)*e+a,n)))}),this[n](u)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,l.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},l.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},p(l,function(s,n){var o=n.props,r=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[r]&&(this[r]=l(this._rgba)),s===e)return this[r].slice();var n,a=t.type(s),u="array"===a||"object"===a?s:arguments,d=this[r].slice();return p(o,function(t,e){var s=u["object"===a?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[r]=d,n):h(d)},p(o,function(e,i){h.fn[e]||(h.fn[e]=function(n){var o,r=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===r?c:("function"===r&&(n=n.call(this,c),r=t.type(n)),null==n&&i.empty?this:("string"===r&&(o=a.exec(n))&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1)),l[i.idx]=n,this[h](l)))})})}),h.hook=function(e){var i=e.split(" ");p(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=h(o||n),!u.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(r){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(r){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return p(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.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"}}(_),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(_.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){return{el:t(this),start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})},o(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(m)||e(i)}}(t.expr.filters.animated)),!1!==t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(f+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(f+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(g,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(g)||"",t.removeData(g)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(f+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=f+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(m),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(h)&&h.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),!1===t.uiBackCompat||o?"none"===s.mode?(r[l](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===l:"show"===l)?(r[l](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",h=s.complete,l=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,l)||o;i.data(m,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?l?this[l](s.duration,h):this.each(function(){h&&h.call(this)}):!1===a?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,h="hide"===r,l="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(l||h?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),l&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,h=r||"horizontal"===a,l=r||"vertical"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r?"-=":"+=",c="+="===l?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,u[h]=l+s,a&&(n.css(u),u[h]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?l*_:0),top:h+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:l*_),top:h+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,h=/([0-9]+)%/.exec(r),l=!!e.horizFirst,c=l?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(s),p=s.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;h&&(r=parseInt(h[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,h,n.from.y,_),v=t.effects.setTransition(a,h,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,l,n.from.x,_),v=t.effects.setTransition(a,l,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(h=h.concat(["marginTop","marginBottom"]).concat(r),l=l.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,h,n.from.y,o),a=t.effects.setTransition(i,h,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,l,n.from.x,o),a=t.effects.setTransition(i,l,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=o||a,h=2*(e.times||5)+(r?1:0),l=e.duration/h,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);h>u;u++)s.animate({opacity:c},l,e.easing),c=1-c;s.animate({opacity:c},l,e.easing),s.queue(i),t.effects.unshift(s,d,h+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,h=2*r+1,l=Math.round(e.duration/h),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,l,e.easing);r>s;s++)n.animate(p,l,e.easing).animate(f,l,e.easing);n.animate(p,l,e.easing).animate(d,l/2,e.easing).queue(i),t.effects.unshift(n,g,h+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[l],d[l]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[h][1]]=d.clip[a[h][0]],"show"===r&&(o.cssClip(d.clip),o.css(l,d[l]),d.clip=s,d[l]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});!1!==t.uiBackCompat&&t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})});
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Chart=t()}}(function(){return function t(e,a,i){function n(r,s){if(!a[r]){if(!e[r]){var l="function"==typeof require&&require;if(!s&&l)return l(r,!0);if(o)return o(r,!0);var u=new Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}var d=a[r]={exports:{}};e[r][0].call(d.exports,function(t){var a=e[r][1][t];return n(a||t)},d,d.exports,t,e,a,i)}return a[r].exports}for(var o="function"==typeof require&&require,r=0;r<i.length;r++)n(i[r]);return n}({1:[function(t,e,a){},{}],2:[function(t,e,a){function i(t){if(t){var e=/^#([a-fA-F0-9]{3})$/,a=/^#([a-fA-F0-9]{6})$/,i=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,o=/(\w+)/,r=[0,0,0],s=1,l=t.match(e);if(l){l=l[1];for(var u=0;u<r.length;u++)r[u]=parseInt(l[u]+l[u],16)}else if(l=t.match(a)){l=l[1];for(var u=0;u<r.length;u++)r[u]=parseInt(l.slice(2*u,2*u+2),16)}else if(l=t.match(i)){for(var u=0;u<r.length;u++)r[u]=parseInt(l[u+1]);s=parseFloat(l[4])}else if(l=t.match(n)){for(var u=0;u<r.length;u++)r[u]=Math.round(2.55*parseFloat(l[u+1]));s=parseFloat(l[4])}else if(l=t.match(o)){if("transparent"==l[1])return[0,0,0,0];if(!(r=y[l[1]]))return}for(var u=0;u<r.length;u++)r[u]=b(r[u],0,255);return s=s||0==s?b(s,0,1):1,r[3]=s,r}}function n(t){if(t){var e=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,a=t.match(e);if(a){var i=parseFloat(a[4]);return[b(parseInt(a[1]),0,360),b(parseFloat(a[2]),0,100),b(parseFloat(a[3]),0,100),b(isNaN(i)?1:i,0,1)]}}}function o(t){if(t){var e=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,a=t.match(e);if(a){var i=parseFloat(a[4]);return[b(parseInt(a[1]),0,360),b(parseFloat(a[2]),0,100),b(parseFloat(a[3]),0,100),b(isNaN(i)?1:i,0,1)]}}}function r(t){var e=i(t);return e&&e.slice(0,3)}function s(t){var e=n(t);return e&&e.slice(0,3)}function l(t){var e=i(t);return e?e[3]:(e=n(t))?e[3]:(e=o(t))?e[3]:void 0}function u(t){return"#"+x(t[0])+x(t[1])+x(t[2])}function d(t,e){return e<1||t[3]&&t[3]<1?c(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function c(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function h(t,e){return e<1||t[3]&&t[3]<1?f(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"}function f(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function g(t,e){return e<1||t[3]&&t[3]<1?p(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"}function v(t){return k[t.slice(0,3)]}function b(t,e,a){return Math.min(Math.max(e,t),a)}function x(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var y=t(6);e.exports={getRgba:i,getHsla:n,getRgb:r,getHsl:s,getHwb:o,getAlpha:l,hexString:u,rgbString:d,rgbaString:c,percentString:h,percentaString:f,hslString:g,hslaString:p,hwbString:m,keyword:v};var k={};for(var S in y)k[y[S]]=S},{6:6}],3:[function(t,e,a){var i=t(5),n=t(2),o=function(t){if(t instanceof o)return t;if(!(this instanceof o))return new o(t);this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var e;if("string"==typeof t)if(e=n.getRgba(t))this.setValues("rgb",e);else if(e=n.getHsla(t))this.setValues("hsl",e);else{if(!(e=n.getHwb(t)))throw new Error('Unable to parse color from string "'+t+'"');this.setValues("hwb",e)}else if("object"==typeof t)if(e=t,void 0!==e.r||void 0!==e.red)this.setValues("rgb",e);else if(void 0!==e.l||void 0!==e.lightness)this.setValues("hsl",e);else if(void 0!==e.v||void 0!==e.value)this.setValues("hsv",e);else if(void 0!==e.w||void 0!==e.whiteness)this.setValues("hwb",e);else{if(void 0===e.c&&void 0===e.cyan)throw new Error("Unable to parse color from object "+JSON.stringify(t));this.setValues("cmyk",e)}};o.prototype={rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t%=360,t=t<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return n.hexString(this.values.rgb)},rgbString:function(){return n.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return n.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return n.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return n.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return n.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return n.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return n.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],a=0;a<t.length;a++){var i=t[a]/255;e[a]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),a=t.luminosity();return e>a?(e+.05)/(a+.05):(a+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,a=(e[0]+t)%360;return e[0]=a<0?360+a:a,this.setValues("hsl",e),this},mix:function(t,e){var a=this,i=t,n=void 0===e?.5:e,o=2*n-1,r=a.alpha()-i.alpha(),s=((o*r==-1?o:(o+r)/(1+o*r))+1)/2,l=1-s;return this.rgb(s*a.red()+l*i.red(),s*a.green()+l*i.green(),s*a.blue()+l*i.blue()).alpha(a.alpha()*n+i.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var t,e,a=new o,i=this.values,n=a.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],e={}.toString.call(t),"[object Array]"===e?n[r]=t.slice(0):"[object Number]"===e?n[r]=t:console.error("unexpected color value:",t));return a}},o.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.prototype.getValues=function(t){for(var e=this.values,a={},i=0;i<t.length;i++)a[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(a.a=e.alpha),a},o.prototype.setValues=function(t,e){var a,n=this.values,o=this.spaces,r=this.maxes,s=1;if("alpha"===t)s=e;else if(e.length)n[t]=e.slice(0,t.length),s=e[t.length];else if(void 0!==e[t.charAt(0)]){for(a=0;a<t.length;a++)n[t][a]=e[t.charAt(a)];s=e.a}else if(void 0!==e[o[t][0]]){var l=o[t];for(a=0;a<t.length;a++)n[t][a]=e[l[a]];s=e.alpha}if(n.alpha=Math.max(0,Math.min(1,void 0===s?n.alpha:s)),"alpha"===t)return!1;var u;for(a=0;a<t.length;a++)u=Math.max(0,Math.min(r[t][a],n[t][a])),n[t][a]=Math.round(u);for(var d in o)d!==t&&(n[d]=i[t][d](n[t]));return!0},o.prototype.setSpace=function(t,e){var a=e[0];return void 0===a?this.getValues(t):("number"==typeof a&&(a=Array.prototype.slice.call(e)),this.setValues(t,a),this)},o.prototype.setChannel=function(t,e,a){var i=this.values[t];return void 0===a?i[e]:a===i[e]?this:(i[e]=a,this.setValues(t,i),this)},"undefined"!=typeof window&&(window.Color=o),e.exports=o},{2:2,5:5}],4:[function(t,e,a){function i(t){var e,a,i,n=t[0]/255,o=t[1]/255,r=t[2]/255,s=Math.min(n,o,r),l=Math.max(n,o,r),u=l-s;return l==s?e=0:n==l?e=(o-r)/u:o==l?e=2+(r-n)/u:r==l&&(e=4+(n-o)/u),e=Math.min(60*e,360),e<0&&(e+=360),i=(s+l)/2,a=l==s?0:i<=.5?u/(l+s):u/(2-l-s),[e,100*a,100*i]}function n(t){var e,a,i,n=t[0],o=t[1],r=t[2],s=Math.min(n,o,r),l=Math.max(n,o,r),u=l-s;return a=0==l?0:u/l*1e3/10,l==s?e=0:n==l?e=(o-r)/u:o==l?e=2+(r-n)/u:r==l&&(e=4+(n-o)/u),e=Math.min(60*e,360),e<0&&(e+=360),i=l/255*1e3/10,[e,a,i]}function o(t){var e=t[0],a=t[1],n=t[2],o=i(t)[0],r=1/255*Math.min(e,Math.min(a,n)),n=1-1/255*Math.max(e,Math.max(a,n));return[o,100*r,100*n]}function s(t){var e,a,i,n,o=t[0]/255,r=t[1]/255,s=t[2]/255;return n=Math.min(1-o,1-r,1-s),e=(1-o-n)/(1-n)||0,a=(1-r-n)/(1-n)||0,i=(1-s-n)/(1-n)||0,[100*e,100*a,100*i,100*n]}function l(t){return Z[JSON.stringify(t)]}function u(t){var e=t[0]/255,a=t[1]/255,i=t[2]/255;return e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,[100*(.4124*e+.3576*a+.1805*i),100*(.2126*e+.7152*a+.0722*i),100*(.0193*e+.1192*a+.9505*i)]}function d(t){var e,a,i,n=u(t),o=n[0],r=n[1],s=n[2];return o/=95.047,r/=100,s/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,e=116*r-16,a=500*(o-r),i=200*(r-s),[e,a,i]}function c(t){return z(d(t))}function h(t){var e,a,i,n,o,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return o=255*l,[o,o,o];a=l<.5?l*(1+s):l+s-l*s,e=2*l-a,n=[0,0,0];for(var u=0;u<3;u++)i=r+1/3*-(u-1),i<0&&i++,i>1&&i--,o=6*i<1?e+6*(a-e)*i:2*i<1?a:3*i<2?e+(a-e)*(2/3-i)*6:e,n[u]=255*o;return n}function f(t){var e,a,i=t[0],n=t[1]/100,o=t[2]/100;return 0===o?[0,0,0]:(o*=2,n*=o<=1?o:2-o,a=(o+n)/2,e=2*n/(o+n),[i,100*e,100*a])}function p(t){return o(h(t))}function m(t){return s(h(t))}function v(t){return l(h(t))}function x(t){var e=t[0]/60,a=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,o=e-Math.floor(e),r=255*i*(1-a),s=255*i*(1-a*o),l=255*i*(1-a*(1-o)),i=255*i;switch(n){case 0:return[i,l,r];case 1:return[s,i,r];case 2:return[r,i,l];case 3:return[r,s,i];case 4:return[l,r,i];case 5:return[i,r,s]}}function y(t){var e,a,i=t[0],n=t[1]/100,o=t[2]/100;return a=(2-n)*o,e=n*o,e/=a<=1?a:2-a,e=e||0,a/=2,[i,100*e,100*a]}function k(t){return o(x(t))}function S(t){return s(x(t))}function M(t){return l(x(t))}function w(t){var e,a,i,n,o=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),e=Math.floor(6*o),a=1-l,i=6*o-e,0!=(1&e)&&(i=1-i),n=s+i*(a-s),e){default:case 6:case 0:r=a,g=n,b=s;break;case 1:r=n,g=a,b=s;break;case 2:r=s,g=a,b=n;break;case 3:r=s,g=n,b=a;break;case 4:r=n,g=s,b=a;break;case 5:r=a,g=s,b=n}return[255*r,255*g,255*b]}function C(t){return i(w(t))}function I(t){return n(w(t))}function D(t){return s(w(t))}function A(t){return l(w(t))}function T(t){var e,a,i,n=t[0]/100,o=t[1]/100,r=t[2]/100,s=t[3]/100;return e=1-Math.min(1,n*(1-s)+s),a=1-Math.min(1,o*(1-s)+s),i=1-Math.min(1,r*(1-s)+s),[255*e,255*a,255*i]}function P(t){return i(T(t))}function _(t){return n(T(t))}function F(t){return o(T(t))}function V(t){return l(T(t))}function R(t){var e,a,i,n=t[0]/100,o=t[1]/100,r=t[2]/100;return e=3.2406*n+-1.5372*o+-.4986*r,a=-.9689*n+1.8758*o+.0415*r,i=.0557*n+-.204*o+1.057*r,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,e=Math.min(Math.max(0,e),1),a=Math.min(Math.max(0,a),1),i=Math.min(Math.max(0,i),1),[255*e,255*a,255*i]}function O(t){var e,a,i,n=t[0],o=t[1],r=t[2];return n/=95.047,o/=100,r/=108.883,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,e=116*o-16,a=500*(n-o),i=200*(o-r),[e,a,i]}function L(t){return z(O(t))}function B(t){var e,a,i,n,o=t[0],r=t[1],s=t[2];return o<=8?(a=100*o/903.3,n=a/100*7.787+16/116):(a=100*Math.pow((o+16)/116,3),n=Math.pow(a/100,1/3)),e=e/95.047<=.008856?e=95.047*(r/500+n-16/116)/7.787:95.047*Math.pow(r/500+n,3),i=i/108.883<=.008859?i=108.883*(n-s/200-16/116)/7.787:108.883*Math.pow(n-s/200,3),[e,a,i]}function z(t){var e,a,i,n=t[0],o=t[1],r=t[2];return e=Math.atan2(r,o),a=360*e/2/Math.PI,a<0&&(a+=360),i=Math.sqrt(o*o+r*r),[n,i,a]}function W(t){return R(B(t))}function N(t){var e,a,i,n=t[0],o=t[1];return i=t[2]/360*2*Math.PI,e=o*Math.cos(i),a=o*Math.sin(i),[n,e,a]}function E(t){return B(N(t))}function H(t){return W(N(t))}function j(t){return G[t]}function U(t){return i(j(t))}function q(t){return n(j(t))}function Y(t){return o(j(t))}function X(t){return s(j(t))}function K(t){return d(j(t))}function J(t){return u(j(t))}e.exports={rgb2hsl:i,rgb2hsv:n,rgb2hwb:o,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:d,rgb2lch:c,hsl2rgb:h,hsl2hsv:f,hsl2hwb:p,hsl2cmyk:m,hsl2keyword:v,hsv2rgb:x,hsv2hsl:y,hsv2hwb:k,hsv2cmyk:S,hsv2keyword:M,hwb2rgb:w,hwb2hsl:C,hwb2hsv:I,hwb2cmyk:D,hwb2keyword:A,cmyk2rgb:T,cmyk2hsl:P,cmyk2hsv:_,cmyk2hwb:F,cmyk2keyword:V,keyword2rgb:j,keyword2hsl:U,keyword2hsv:q,keyword2hwb:Y,keyword2cmyk:X,keyword2lab:K,keyword2xyz:J,xyz2rgb:R,xyz2lab:O,xyz2lch:L,lab2xyz:B,lab2rgb:W,lab2lch:z,lch2lab:N,lch2xyz:E,lch2rgb:H};var G={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Z={};for(var Q in G)Z[JSON.stringify(G[Q])]=Q},{}],5:[function(t,e,a){var i=t(4),n=function(){return new u};for(var o in i){n[o+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),i[t](e)}}(o);var r=/(\w+)2(\w+)/.exec(o),s=r[1],l=r[2];n[s]=n[s]||{},n[s][l]=n[o]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var a=i[t](e);if("string"==typeof a||void 0===a)return a;for(var n=0;n<a.length;n++)a[n]=Math.round(a[n]);return a}}(o)}var u=function(){this.convs={}};u.prototype.routeSpace=function(t,e){var a=e[0];return void 0===a?this.getValues(t):("number"==typeof a&&(a=Array.prototype.slice.call(e)),this.setValues(t,a))},u.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},u.prototype.getValues=function(t){var e=this.convs[t];if(!e){var a=this.space,i=this.convs[a];e=n[a][t](i),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){u.prototype[t]=function(e){return this.routeSpace(t,arguments)}}),e.exports=n},{4:4}],6:[function(t,e,a){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],7:[function(t,e,a){var i=t(28)();t(26)(i),t(42)(i),t(22)(i),t(31)(i),t(25)(i),t(21)(i),t(23)(i),t(24)(i),t(29)(i),t(33)(i),t(34)(i),t(32)(i),t(35)(i),t(30)(i),t(27)(i),t(36)(i),t(37)(i),t(38)(i),t(39)(i),t(40)(i),t(45)(i),t(43)(i),t(44)(i),t(46)(i),t(47)(i),t(48)(i),t(15)(i),t(16)(i),t(17)(i),t(18)(i),t(19)(i),t(20)(i),t(8)(i),t(9)(i),t(10)(i),t(11)(i),t(12)(i),t(13)(i),t(14)(i),window.Chart=e.exports=i},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,42:42,43:43,44:44,45:45,46:46,47:47,48:48,8:8,9:9}],8:[function(t,e,a){"use strict";e.exports=function(t){t.Bar=function(e,a){return a.type="bar",new t(e,a)}}},{}],9:[function(t,e,a){"use strict";e.exports=function(t){t.Bubble=function(e,a){return a.type="bubble",new t(e,a)}}},{}],10:[function(t,e,a){"use strict";e.exports=function(t){t.Doughnut=function(e,a){return a.type="doughnut",new t(e,a)}}},{}],11:[function(t,e,a){"use strict";e.exports=function(t){t.Line=function(e,a){return a.type="line",new t(e,a)}}},{}],12:[function(t,e,a){"use strict";e.exports=function(t){t.PolarArea=function(e,a){return a.type="polarArea",new t(e,a)}}},{}],13:[function(t,e,a){"use strict";e.exports=function(t){t.Radar=function(e,a){return a.type="radar",new t(e,a)}}},{}],14:[function(t,e,a){"use strict";e.exports=function(t){var e={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-1"}],yAxes:[{type:"linear",position:"left",id:"y-axis-1"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}};t.defaults.scatter=e,t.controllers.scatter=t.controllers.line,t.Scatter=function(e,a){return a.type="scatter",new t(e,a)}}},{}],15:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.bar={hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}},t.controllers.bar=t.DatasetController.extend({dataElementType:t.elements.Rectangle,initialize:function(e,a){t.DatasetController.prototype.initialize.call(this,e,a);var i=this,n=i.getMeta(),o=i.getDataset();n.stack=o.stack,n.bar=!0},getStackCount:function(){var t=this,a=t.getMeta(),i=t.getScaleForId(a.yAxisID),n=[];return e.each(t.chart.data.datasets,function(e,a){var o=t.chart.getDatasetMeta(a);o.bar&&t.chart.isDatasetVisible(a)&&(!1===i.options.stacked||!0===i.options.stacked&&-1===n.indexOf(o.stack)||void 0===i.options.stacked&&(void 0===o.stack||-1===n.indexOf(o.stack)))&&n.push(o.stack)},t),n.length},update:function(t){var a=this;e.each(a.getMeta().data,function(e,i){a.updateElement(e,i,t)},a)},updateElement:function(t,a,i){var n=this,o=n.getMeta(),r=n.getScaleForId(o.xAxisID),s=n.getScaleForId(o.yAxisID),l=s.getBasePixel(),u=n.chart.options.elements.rectangle,d=t.custom||{},c=n.getDataset();t._xScale=r,t._yScale=s,t._datasetIndex=n.index,t._index=a;var h=n.getRuler(a);t._model={x:n.calculateBarX(a,n.index,h),y:i?l:n.calculateBarY(a,n.index),label:n.chart.data.labels[a],datasetLabel:c.label,horizontal:!1,base:i?l:n.calculateBarBase(n.index,a),width:n.calculateBarWidth(h),backgroundColor:d.backgroundColor?d.backgroundColor:e.getValueAtIndexOrDefault(c.backgroundColor,a,u.backgroundColor),borderSkipped:d.borderSkipped?d.borderSkipped:u.borderSkipped,borderColor:d.borderColor?d.borderColor:e.getValueAtIndexOrDefault(c.borderColor,a,u.borderColor),borderWidth:d.borderWidth?d.borderWidth:e.getValueAtIndexOrDefault(c.borderWidth,a,u.borderWidth)},t.pivot()},calculateBarBase:function(t,e){var a=this,i=a.getMeta(),n=a.getScaleForId(i.yAxisID),o=n.getBaseValue(),r=o;if(!0===n.options.stacked||void 0===n.options.stacked&&void 0!==i.stack){for(var s=a.chart,l=s.data.datasets,u=Number(l[t].data[e]),d=0;d<t;d++){var c=l[d],h=s.getDatasetMeta(d);if(h.bar&&h.yAxisID===n.id&&s.isDatasetVisible(d)&&i.stack===h.stack){var f=Number(c.data[e]);o+=u<0?Math.min(f,r):Math.max(f,r)}}return n.getPixelForValue(o)}return n.getBasePixel()},getRuler:function(){var t=this,e=t.getMeta(),a=t.getScaleForId(e.xAxisID),i=t.getStackCount(),n=a.width/a.ticks.length,o=n*a.options.categoryPercentage,r=(n-n*a.options.categoryPercentage)/2,s=o/i;return{stackCount:i,tickWidth:n,categoryWidth:o,categorySpacing:r,fullBarWidth:s,barWidth:s*a.options.barPercentage,barSpacing:s-s*a.options.barPercentage}},calculateBarWidth:function(t){var e=this,a=e.getMeta(),i=e.getScaleForId(a.xAxisID);return i.options.barThickness?i.options.barThickness:t.barWidth},getStackIndex:function(t){var e,a,i=this,n=i.chart.getDatasetMeta(t),o=i.getScaleForId(n.yAxisID),r=[n.stack];for(a=0;a<t;++a)e=this.chart.getDatasetMeta(a),e.bar&&this.chart.isDatasetVisible(a)&&(!1===o.options.stacked||!0===o.options.stacked&&-1===r.indexOf(e.stack)||void 0===o.options.stacked&&(void 0===e.stack||-1===r.indexOf(e.stack)))&&r.push(e.stack);return r.length-1},calculateBarX:function(t,e,a){var i=this,n=i.getMeta(),o=i.getScaleForId(n.xAxisID),r=i.getStackIndex(e),s=o.getPixelForValue(null,t,e,i.chart.isCombo);return(s-=i.chart.isCombo?a.tickWidth/2:0)+a.barWidth/2+a.categorySpacing+a.barWidth*r+a.barSpacing/2+a.barSpacing*r},calculateBarY:function(t,e){var a=this,i=a.getMeta(),n=a.getScaleForId(i.yAxisID),o=Number(a.getDataset().data[t]);if(n.options.stacked||void 0===n.options.stacked&&void 0!==i.stack){for(var r=n.getBaseValue(),s=r,l=r,u=0;u<e;u++){var d=a.chart.data.datasets[u],c=a.chart.getDatasetMeta(u);if(c.bar&&c.yAxisID===n.id&&a.chart.isDatasetVisible(u)&&i.stack===c.stack){var h=Number(d.data[t]);h<0?l+=h||0:s+=h||0}}return o<0?n.getPixelForValue(l+o):n.getPixelForValue(s+o)}return n.getPixelForValue(o)},draw:function(e){var a,i,n=this,o=e||1,r=n.getMeta().data,s=n.getDataset();for(t.canvasHelpers.clipArea(n.chart.chart.ctx,n.chart.chartArea),a=0,i=r.length;a<i;++a){var l=s.data[a];null===l||void 0===l||isNaN(l)||r[a].transition(o).draw()}t.canvasHelpers.unclipArea(n.chart.chart.ctx)},setHoverStyle:function(t){var a=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},o=t._model;o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:e.getValueAtIndexOrDefault(a.hoverBackgroundColor,i,e.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:e.getValueAtIndexOrDefault(a.hoverBorderColor,i,e.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:e.getValueAtIndexOrDefault(a.hoverBorderWidth,i,o.borderWidth)},removeHoverStyle:function(t){var a=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},o=t._model,r=this.chart.options.elements.rectangle;o.backgroundColor=n.backgroundColor?n.backgroundColor:e.getValueAtIndexOrDefault(a.backgroundColor,i,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:e.getValueAtIndexOrDefault(a.borderColor,i,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:e.getValueAtIndexOrDefault(a.borderWidth,i,r.borderWidth)}}),t.defaults.horizontalBar={hover:{mode:"label"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var a="";return t.length>0&&(t[0].yLabel?a=t[0].yLabel:e.labels.length>0&&t[0].index<e.labels.length&&(a=e.labels[t[0].index])),a},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.xLabel}}}},t.controllers.horizontalBar=t.controllers.bar.extend({getStackCount:function(){var t=this,a=t.getMeta(),i=t.getScaleForId(a.xAxisID),n=[];return e.each(t.chart.data.datasets,function(e,a){var o=t.chart.getDatasetMeta(a);o.bar&&t.chart.isDatasetVisible(a)&&(!1===i.options.stacked||!0===i.options.stacked&&-1===n.indexOf(o.stack)||void 0===i.options.stacked&&(void 0===o.stack||-1===n.indexOf(o.stack)))&&n.push(o.stack)},t),n.length},updateElement:function(t,a,i){var n=this,o=n.getMeta(),r=n.getScaleForId(o.xAxisID),s=n.getScaleForId(o.yAxisID),l=r.getBasePixel(),u=t.custom||{},d=n.getDataset(),c=n.chart.options.elements.rectangle;t._xScale=r,t._yScale=s,t._datasetIndex=n.index,t._index=a;var h=n.getRuler(a);t._model={x:i?l:n.calculateBarX(a,n.index),y:n.calculateBarY(a,n.index,h),label:n.chart.data.labels[a],datasetLabel:d.label,horizontal:!0,base:i?l:n.calculateBarBase(n.index,a),height:n.calculateBarHeight(h),backgroundColor:u.backgroundColor?u.backgroundColor:e.getValueAtIndexOrDefault(d.backgroundColor,a,c.backgroundColor),borderSkipped:u.borderSkipped?u.borderSkipped:c.borderSkipped,borderColor:u.borderColor?u.borderColor:e.getValueAtIndexOrDefault(d.borderColor,a,c.borderColor),
borderWidth:u.borderWidth?u.borderWidth:e.getValueAtIndexOrDefault(d.borderWidth,a,c.borderWidth)},t.pivot()},calculateBarBase:function(t,e){var a=this,i=a.getMeta(),n=a.getScaleForId(i.xAxisID),o=n.getBaseValue(),r=o;if(n.options.stacked||void 0===n.options.stacked&&void 0!==i.stack){for(var s=a.chart,l=s.data.datasets,u=Number(l[t].data[e]),d=0;d<t;d++){var c=l[d],h=s.getDatasetMeta(d);if(h.bar&&h.xAxisID===n.id&&s.isDatasetVisible(d)&&i.stack===h.stack){var f=Number(c.data[e]);o+=u<0?Math.min(f,r):Math.max(f,r)}}return n.getPixelForValue(o)}return n.getBasePixel()},getRuler:function(){var t=this,e=t.getMeta(),a=t.getScaleForId(e.yAxisID),i=t.getStackCount(),n=a.height/a.ticks.length,o=n*a.options.categoryPercentage,r=(n-n*a.options.categoryPercentage)/2,s=o/i;return{stackCount:i,tickHeight:n,categoryHeight:o,categorySpacing:r,fullBarHeight:s,barHeight:s*a.options.barPercentage,barSpacing:s-s*a.options.barPercentage}},calculateBarHeight:function(t){var e=this,a=e.getMeta(),i=e.getScaleForId(a.yAxisID);return i.options.barThickness?i.options.barThickness:t.barHeight},getStackIndex:function(t){var e,a,i=this,n=i.chart.getDatasetMeta(t),o=i.getScaleForId(n.xAxisID),r=[n.stack];for(a=0;a<t;++a)e=this.chart.getDatasetMeta(a),e.bar&&this.chart.isDatasetVisible(a)&&(!1===o.options.stacked||!0===o.options.stacked&&-1===r.indexOf(e.stack)||void 0===o.options.stacked&&(void 0===e.stack||-1===r.indexOf(e.stack)))&&r.push(e.stack);return r.length-1},calculateBarX:function(t,e){var a=this,i=a.getMeta(),n=a.getScaleForId(i.xAxisID),o=Number(a.getDataset().data[t]);if(n.options.stacked||void 0===n.options.stacked&&void 0!==i.stack){for(var r=n.getBaseValue(),s=r,l=r,u=0;u<e;u++){var d=a.chart.data.datasets[u],c=a.chart.getDatasetMeta(u);if(c.bar&&c.xAxisID===n.id&&a.chart.isDatasetVisible(u)&&i.stack===c.stack){var h=Number(d.data[t]);h<0?l+=h||0:s+=h||0}}return o<0?n.getPixelForValue(l+o):n.getPixelForValue(s+o)}return n.getPixelForValue(o)},calculateBarY:function(t,e,a){var i=this,n=i.getMeta(),o=i.getScaleForId(n.yAxisID),r=i.getStackIndex(e),s=o.getPixelForValue(null,t,e,i.chart.isCombo);return(s-=i.chart.isCombo?a.tickHeight/2:0)+a.barHeight/2+a.categorySpacing+a.barHeight*r+a.barSpacing/2+a.barSpacing*r}})}},{}],16:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.bubble={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var a=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return a+": ("+t.xLabel+", "+t.yLabel+", "+i.r+")"}}}},t.controllers.bubble=t.DatasetController.extend({dataElementType:t.elements.Point,update:function(t){var a=this,i=a.getMeta(),n=i.data;e.each(n,function(e,i){a.updateElement(e,i,t)})},updateElement:function(a,i,n){var o=this,r=o.getMeta(),s=o.getScaleForId(r.xAxisID),l=o.getScaleForId(r.yAxisID),u=a.custom||{},d=o.getDataset(),c=d.data[i],h=o.chart.options.elements.point,f=o.index;e.extend(a,{_xScale:s,_yScale:l,_datasetIndex:f,_index:i,_model:{x:n?s.getPixelForDecimal(.5):s.getPixelForValue("object"==typeof c?c:NaN,i,f,o.chart.isCombo),y:n?l.getBasePixel():l.getPixelForValue(c,i,f),radius:n?0:u.radius?u.radius:o.getRadius(c),hitRadius:u.hitRadius?u.hitRadius:e.getValueAtIndexOrDefault(d.hitRadius,i,h.hitRadius)}}),t.DatasetController.prototype.removeHoverStyle.call(o,a,h);var g=a._model;g.skip=u.skip?u.skip:isNaN(g.x)||isNaN(g.y),a.pivot()},getRadius:function(t){return t.r||this.chart.options.elements.point.radius},setHoverStyle:function(a){var i=this;t.DatasetController.prototype.setHoverStyle.call(i,a);var n=i.chart.data.datasets[a._datasetIndex],o=a._index,r=a.custom||{};a._model.radius=r.hoverRadius?r.hoverRadius:e.getValueAtIndexOrDefault(n.hoverRadius,o,i.chart.options.elements.point.hoverRadius)+i.getRadius(n.data[o])},removeHoverStyle:function(e){var a=this;t.DatasetController.prototype.removeHoverStyle.call(a,e,a.chart.options.elements.point);var i=a.chart.data.datasets[e._datasetIndex].data[e._index],n=e.custom||{};e._model.radius=n.radius?n.radius:a.getRadius(i)}})}},{}],17:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers,a=t.defaults;a.doughnut={animation:{animateRotate:!0,animateScale:!1},aspectRatio:1,hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var a=t.data,i=a.datasets,n=a.labels;if(i.length)for(var o=0;o<i[0].data.length;++o)e.push('<li><span style="background-color:'+i[0].backgroundColor[o]+'"></span>'),n[o]&&e.push(n[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var a=t.data;return a.labels.length&&a.datasets.length?a.labels.map(function(i,n){var o=t.getDatasetMeta(0),r=a.datasets[0],s=o.data[n],l=s&&s.custom||{},u=e.getValueAtIndexOrDefault,d=t.options.elements.arc;return{text:i,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,n,d.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,n,d.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,n,d.borderWidth),hidden:isNaN(r.data[n])||o.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var a,i,n,o=e.index,r=this.chart;for(a=0,i=(r.data.datasets||[]).length;a<i;++a)n=r.getDatasetMeta(a),n.data[o]&&(n.data[o].hidden=!n.data[o].hidden);r.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,a){var i=a.labels[t.index],n=": "+a.datasets[t.datasetIndex].data[t.index];return e.isArray(i)?(i=i.slice(),i[0]+=n):i+=n,i}}}},a.pie=e.clone(a.doughnut),e.extend(a.pie,{cutoutPercentage:0}),t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,getRingIndex:function(t){for(var e=0,a=0;a<t;++a)this.chart.isDatasetVisible(a)&&++e;return e},update:function(t){var a=this,i=a.chart,n=i.chartArea,o=i.options,r=o.elements.arc,s=n.right-n.left-r.borderWidth,l=n.bottom-n.top-r.borderWidth,u=Math.min(s,l),d={x:0,y:0},c=a.getMeta(),h=o.cutoutPercentage,f=o.circumference;if(f<2*Math.PI){var g=o.rotation%(2*Math.PI);g+=2*Math.PI*(g>=Math.PI?-1:g<-Math.PI?1:0);var p=g+f,m={x:Math.cos(g),y:Math.sin(g)},v={x:Math.cos(p),y:Math.sin(p)},b=g<=0&&0<=p||g<=2*Math.PI&&2*Math.PI<=p,x=g<=.5*Math.PI&&.5*Math.PI<=p||g<=2.5*Math.PI&&2.5*Math.PI<=p,y=g<=-Math.PI&&-Math.PI<=p||g<=Math.PI&&Math.PI<=p,k=g<=.5*-Math.PI&&.5*-Math.PI<=p||g<=1.5*Math.PI&&1.5*Math.PI<=p,S=h/100,M={x:y?-1:Math.min(m.x*(m.x<0?1:S),v.x*(v.x<0?1:S)),y:k?-1:Math.min(m.y*(m.y<0?1:S),v.y*(v.y<0?1:S))},w={x:b?1:Math.max(m.x*(m.x>0?1:S),v.x*(v.x>0?1:S)),y:x?1:Math.max(m.y*(m.y>0?1:S),v.y*(v.y>0?1:S))},C={width:.5*(w.x-M.x),height:.5*(w.y-M.y)};u=Math.min(s/C.width,l/C.height),d={x:-.5*(w.x+M.x),y:-.5*(w.y+M.y)}}i.borderWidth=a.getMaxBorderWidth(c.data),i.outerRadius=Math.max((u-i.borderWidth)/2,0),i.innerRadius=Math.max(h?i.outerRadius/100*h:0,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),i.offsetX=d.x*i.outerRadius,i.offsetY=d.y*i.outerRadius,c.total=a.calculateTotal(),a.outerRadius=i.outerRadius-i.radiusLength*a.getRingIndex(a.index),a.innerRadius=Math.max(a.outerRadius-i.radiusLength,0),e.each(c.data,function(e,i){a.updateElement(e,i,t)})},updateElement:function(t,a,i){var n=this,o=n.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,c=s.rotation,h=s.rotation,f=n.getDataset(),g=i&&l.animateRotate?0:t.hidden?0:n.calculateCircumference(f.data[a])*(s.circumference/(2*Math.PI)),p=i&&l.animateScale?0:n.innerRadius,m=i&&l.animateScale?0:n.outerRadius,v=e.getValueAtIndexOrDefault;e.extend(t,{_datasetIndex:n.index,_index:a,_model:{x:u+o.offsetX,y:d+o.offsetY,startAngle:c,endAngle:h,circumference:g,outerRadius:m,innerRadius:p,label:v(f.label,a,o.data.labels[a])}});var b=t._model;this.removeHoverStyle(t),i&&l.animateRotate||(b.startAngle=0===a?s.rotation:n.getMeta().data[a-1]._model.endAngle,b.endAngle=b.startAngle+b.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,a=this.getDataset(),i=this.getMeta(),n=0;return e.each(i.data,function(e,i){t=a.data[i],isNaN(t)||e.hidden||(n+=Math.abs(t))}),n},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,a,i=0,n=this.index,o=t.length,r=0;r<o;r++)e=t[r]._model?t[r]._model.borderWidth:0,a=t[r]._chart?t[r]._chart.config.data.datasets[n].hoverBorderWidth:0,i=e>i?e:i,i=a>i?a:i;return i}})}},{}],18:[function(t,e,a){"use strict";e.exports=function(t){function e(t,e){return a.getValueOrDefault(t.showLine,e.showLines)}var a=t.helpers;t.defaults.line={showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},t.controllers.line=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,update:function(t){var i,n,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],d=r.chart.options,c=d.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),g=e(f,d);for(g&&(o=l.custom||{},void 0!==f.tension&&void 0===f.lineTension&&(f.lineTension=f.tension),l._scale=h,l._datasetIndex=r.index,l._children=u,l._model={spanGaps:f.spanGaps?f.spanGaps:d.spanGaps,tension:o.tension?o.tension:a.getValueOrDefault(f.lineTension,c.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||c.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||c.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||c.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||c.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||c.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||c.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||c.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:c.fill,steppedLine:o.steppedLine?o.steppedLine:a.getValueOrDefault(f.steppedLine,c.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:a.getValueOrDefault(f.cubicInterpolationMode,c.cubicInterpolationMode),scaleTop:h.top,scaleBottom:h.bottom,scaleZero:h.getBasePixel()},l.pivot()),i=0,n=u.length;i<n;++i)r.updateElement(u[i],i,t);for(g&&0!==l._model.tension&&r.updateBezierControlPoints(),i=0,n=u.length;i<n;++i)u[i].pivot()},getPointBackgroundColor:function(t,e){var i=this.chart.options.elements.point.backgroundColor,n=this.getDataset(),o=t.custom||{};return o.backgroundColor?i=o.backgroundColor:n.pointBackgroundColor?i=a.getValueAtIndexOrDefault(n.pointBackgroundColor,e,i):n.backgroundColor&&(i=n.backgroundColor),i},getPointBorderColor:function(t,e){var i=this.chart.options.elements.point.borderColor,n=this.getDataset(),o=t.custom||{};return o.borderColor?i=o.borderColor:n.pointBorderColor?i=a.getValueAtIndexOrDefault(n.pointBorderColor,e,i):n.borderColor&&(i=n.borderColor),i},getPointBorderWidth:function(t,e){var i=this.chart.options.elements.point.borderWidth,n=this.getDataset(),o=t.custom||{};return isNaN(o.borderWidth)?isNaN(n.pointBorderWidth)?isNaN(n.borderWidth)||(i=n.borderWidth):i=a.getValueAtIndexOrDefault(n.pointBorderWidth,e,i):i=o.borderWidth,i},updateElement:function(t,e,i){var n,o,r=this,s=r.getMeta(),l=t.custom||{},u=r.getDataset(),d=r.index,c=u.data[e],h=r.getScaleForId(s.yAxisID),f=r.getScaleForId(s.xAxisID),g=r.chart.options.elements.point,p=r.chart.data.labels||[],m=1===p.length||1===u.data.length||r.chart.isCombo;void 0!==u.radius&&void 0===u.pointRadius&&(u.pointRadius=u.radius),void 0!==u.hitRadius&&void 0===u.pointHitRadius&&(u.pointHitRadius=u.hitRadius),n=f.getPixelForValue("object"==typeof c?c:NaN,e,d,m),o=i?h.getBasePixel():r.calculatePointY(c,e,d),t._xScale=f,t._yScale=h,t._datasetIndex=d,t._index=e,t._model={x:n,y:o,skip:l.skip||isNaN(n)||isNaN(o),radius:l.radius||a.getValueAtIndexOrDefault(u.pointRadius,e,g.radius),pointStyle:l.pointStyle||a.getValueAtIndexOrDefault(u.pointStyle,e,g.pointStyle),backgroundColor:r.getPointBackgroundColor(t,e),borderColor:r.getPointBorderColor(t,e),borderWidth:r.getPointBorderWidth(t,e),tension:s.dataset._model?s.dataset._model.tension:0,steppedLine:!!s.dataset._model&&s.dataset._model.steppedLine,hitRadius:l.hitRadius||a.getValueAtIndexOrDefault(u.pointHitRadius,e,g.hitRadius)}},calculatePointY:function(t,e,a){var i,n,o,r=this,s=r.chart,l=r.getMeta(),u=r.getScaleForId(l.yAxisID),d=0,c=0;if(u.options.stacked){for(i=0;i<a;i++)if(n=s.data.datasets[i],o=s.getDatasetMeta(i),"line"===o.type&&o.yAxisID===u.id&&s.isDatasetVisible(i)){var h=Number(u.getRightValue(n.data[e]));h<0?c+=h||0:d+=h||0}var f=Number(u.getRightValue(t));return f<0?u.getPixelForValue(c+f):u.getPixelForValue(d+f)}return u.getPixelForValue(t)},updateBezierControlPoints:function(){function t(t,e,a){return Math.max(Math.min(t,a),e)}var e,i,n,o,r,s=this,l=s.getMeta(),u=s.chart.chartArea,d=l.data||[];if(l.dataset._model.spanGaps&&(d=d.filter(function(t){return!t._model.skip})),"monotone"===l.dataset._model.cubicInterpolationMode)a.splineCurveMonotone(d);else for(e=0,i=d.length;e<i;++e)n=d[e],o=n._model,r=a.splineCurve(a.previousItem(d,e)._model,o,a.nextItem(d,e)._model,l.dataset._model.tension),o.controlPointPreviousX=r.previous.x,o.controlPointPreviousY=r.previous.y,o.controlPointNextX=r.next.x,o.controlPointNextY=r.next.y;if(s.chart.options.elements.line.capBezierPoints)for(e=0,i=d.length;e<i;++e)o=d[e]._model,o.controlPointPreviousX=t(o.controlPointPreviousX,u.left,u.right),o.controlPointPreviousY=t(o.controlPointPreviousY,u.top,u.bottom),o.controlPointNextX=t(o.controlPointNextX,u.left,u.right),o.controlPointNextY=t(o.controlPointNextY,u.top,u.bottom)},draw:function(a){var i,n,o=this,r=o.getMeta(),s=r.data||[],l=a||1;for(i=0,n=s.length;i<n;++i)s[i].transition(l);for(t.canvasHelpers.clipArea(o.chart.chart.ctx,o.chart.chartArea),e(o.getDataset(),o.chart.options)&&r.dataset.transition(l).draw(),t.canvasHelpers.unclipArea(o.chart.chart.ctx),i=0,n=s.length;i<n;++i)s[i].draw(o.chart.chartArea)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},o=t._model;o.radius=n.hoverRadius||a.getValueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor||a.getValueAtIndexOrDefault(e.pointHoverBackgroundColor,i,a.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor||a.getValueAtIndexOrDefault(e.pointHoverBorderColor,i,a.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth||a.getValueAtIndexOrDefault(e.pointHoverBorderWidth,i,o.borderWidth)},removeHoverStyle:function(t){var e=this,i=e.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},r=t._model;void 0!==i.radius&&void 0===i.pointRadius&&(i.pointRadius=i.radius),r.radius=o.radius||a.getValueAtIndexOrDefault(i.pointRadius,n,e.chart.options.elements.point.radius),r.backgroundColor=e.getPointBackgroundColor(t,n),r.borderColor=e.getPointBorderColor(t,n),r.borderWidth=e.getPointBorderWidth(t,n)}})}},{}],19:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0,ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,aspectRatio:1,legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var a=t.data,i=a.datasets,n=a.labels;if(i.length)for(var o=0;o<i[0].data.length;++o)e.push('<li><span style="background-color:'+i[0].backgroundColor[o]+'"></span>'),n[o]&&e.push(n[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var a=t.data;return a.labels.length&&a.datasets.length?a.labels.map(function(i,n){var o=t.getDatasetMeta(0),r=a.datasets[0],s=o.data[n],l=s.custom||{},u=e.getValueAtIndexOrDefault,d=t.options.elements.arc;return{text:i,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,n,d.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,n,d.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,n,d.borderWidth),hidden:isNaN(r.data[n])||o.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var a,i,n,o=e.index,r=this.chart;for(a=0,i=(r.data.datasets||[]).length;a<i;++a)n=r.getDatasetMeta(a),n.data[o].hidden=!n.data[o].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}},t.controllers.polarArea=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,update:function(t){var a=this,i=a.chart,n=i.chartArea,o=a.getMeta(),r=i.options,s=r.elements.arc,l=Math.min(n.right-n.left,n.bottom-n.top);i.outerRadius=Math.max((l-s.borderWidth/2)/2,0),i.innerRadius=Math.max(r.cutoutPercentage?i.outerRadius/100*r.cutoutPercentage:1,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),a.outerRadius=i.outerRadius-i.radiusLength*a.index,a.innerRadius=a.outerRadius-i.radiusLength,o.count=a.countVisibleElements(),e.each(o.data,function(e,i){a.updateElement(e,i,t)})},updateElement:function(t,a,i){for(var n=this,o=n.chart,r=n.getDataset(),s=o.options,l=s.animation,u=o.scale,d=e.getValueAtIndexOrDefault,c=o.data.labels,h=n.calculateCircumference(r.data[a]),f=u.xCenter,g=u.yCenter,p=0,m=n.getMeta(),v=0;v<a;++v)isNaN(r.data[v])||m.data[v].hidden||++p;var b=s.startAngle,x=t.hidden?0:u.getDistanceFromCenterForValue(r.data[a]),y=b+h*p,k=y+(t.hidden?0:h),S=l.animateScale?0:u.getDistanceFromCenterForValue(r.data[a]);e.extend(t,{_datasetIndex:n.index,_index:a,_scale:u,_model:{x:f,y:g,innerRadius:0,outerRadius:i?S:x,startAngle:i&&l.animateRotate?b:y,endAngle:i&&l.animateRotate?b:k,label:d(c,a,c[a])}}),n.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),a=this.getMeta(),i=0;return e.each(a.data,function(e,a){isNaN(t.data[a])||e.hidden||i++}),i},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{}],20:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.radar={aspectRatio:1,scale:{type:"radialLinear"},elements:{line:{tension:0}}},t.controllers.radar=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,linkScales:e.noop,update:function(t){var a=this,i=a.getMeta(),n=i.dataset,o=i.data,r=n.custom||{},s=a.getDataset(),l=a.chart.options.elements.line,u=a.chart.scale;void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),e.extend(i.dataset,{_datasetIndex:a.index,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:e.getValueOrDefault(s.lineTension,l.tension),backgroundColor:r.backgroundColor?r.backgroundColor:s.backgroundColor||l.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:s.borderWidth||l.borderWidth,borderColor:r.borderColor?r.borderColor:s.borderColor||l.borderColor,fill:r.fill?r.fill:void 0!==s.fill?s.fill:l.fill,borderCapStyle:r.borderCapStyle?r.borderCapStyle:s.borderCapStyle||l.borderCapStyle,borderDash:r.borderDash?r.borderDash:s.borderDash||l.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:s.borderDashOffset||l.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:s.borderJoinStyle||l.borderJoinStyle,scaleTop:u.top,scaleBottom:u.bottom,scaleZero:u.getBasePosition()}}),i.dataset.pivot(),e.each(o,function(e,i){a.updateElement(e,i,t)},a),a.updateBezierControlPoints()},updateElement:function(t,a,i){var n=this,o=t.custom||{},r=n.getDataset(),s=n.chart.scale,l=n.chart.options.elements.point,u=s.getPointPositionForValue(a,r.data[a]);e.extend(t,{_datasetIndex:n.index,_index:a,_scale:s,_model:{x:i?s.xCenter:u.x,y:i?s.yCenter:u.y,tension:o.tension?o.tension:e.getValueOrDefault(r.lineTension,n.chart.options.elements.line.tension),radius:o.radius?o.radius:e.getValueAtIndexOrDefault(r.pointRadius,a,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:e.getValueAtIndexOrDefault(r.pointBackgroundColor,a,l.backgroundColor),borderColor:o.borderColor?o.borderColor:e.getValueAtIndexOrDefault(r.pointBorderColor,a,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:e.getValueAtIndexOrDefault(r.pointBorderWidth,a,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:e.getValueAtIndexOrDefault(r.pointStyle,a,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:e.getValueAtIndexOrDefault(r.hitRadius,a,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,a=this.getMeta();e.each(a.data,function(i,n){var o=i._model,r=e.splineCurve(e.previousItem(a.data,n,!0)._model,o,e.nextItem(a.data,n,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),i.pivot()})},draw:function(t){var a=this.getMeta(),i=t||1;e.each(a.data,function(t){t.transition(i)}),a.dataset.transition(i).draw(),e.each(a.data,function(t){t.draw()})},setHoverStyle:function(t){var a=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,o=t._model;o.radius=i.hoverRadius?i.hoverRadius:e.getValueAtIndexOrDefault(a.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),o.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:e.getValueAtIndexOrDefault(a.pointHoverBackgroundColor,n,e.getHoverColor(o.backgroundColor)),o.borderColor=i.hoverBorderColor?i.hoverBorderColor:e.getValueAtIndexOrDefault(a.pointHoverBorderColor,n,e.getHoverColor(o.borderColor)),o.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:e.getValueAtIndexOrDefault(a.pointHoverBorderWidth,n,o.borderWidth)},removeHoverStyle:function(t){var a=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=i.radius?i.radius:e.getValueAtIndexOrDefault(a.radius,n,r.radius),o.backgroundColor=i.backgroundColor?i.backgroundColor:e.getValueAtIndexOrDefault(a.pointBackgroundColor,n,r.backgroundColor),o.borderColor=i.borderColor?i.borderColor:e.getValueAtIndexOrDefault(a.pointBorderColor,n,r.borderColor),o.borderWidth=i.borderWidth?i.borderWidth:e.getValueAtIndexOrDefault(a.pointBorderWidth,n,r.borderWidth)}})}},{}],21:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:e.noop,onComplete:e.noop},t.Animation=t.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,a,i){var n=this;i||(t.animating=!0);for(var o=0;o<n.animations.length;++o)if(n.animations[o].chartInstance===t)return void(n.animations[o].animationObject=e);n.animations.push({chartInstance:t,animationObject:e}),1===n.animations.length&&n.requestAnimationFrame()},cancelAnimation:function(t){var a=e.findIndex(this.animations,function(e){return e.chartInstance===t});-1!==a&&(this.animations.splice(a,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=e.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this,e=Date.now(),a=0;t.dropFrames>1&&(a=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1);for(var i=0;i<t.animations.length;)null===t.animations[i].animationObject.currentStep&&(t.animations[i].animationObject.currentStep=0),t.animations[i].animationObject.currentStep+=1+a,t.animations[i].animationObject.currentStep>t.animations[i].animationObject.numSteps&&(t.animations[i].animationObject.currentStep=t.animations[i].animationObject.numSteps),t.animations[i].animationObject.render(t.animations[i].chartInstance,t.animations[i].animationObject),t.animations[i].animationObject.onAnimationProgress&&t.animations[i].animationObject.onAnimationProgress.call&&t.animations[i].animationObject.onAnimationProgress.call(t.animations[i].chartInstance,t.animations[i]),t.animations[i].animationObject.currentStep===t.animations[i].animationObject.numSteps?(t.animations[i].animationObject.onAnimationComplete&&t.animations[i].animationObject.onAnimationComplete.call&&t.animations[i].animationObject.onAnimationComplete.call(t.animations[i].chartInstance,t.animations[i]),t.animations[i].chartInstance.animating=!1,t.animations.splice(i,1)):++i;var n=Date.now(),o=(n-e)/t.frameDuration;t.dropFrames+=o,t.animations.length>0&&t.requestAnimationFrame()}}}},{}],22:[function(t,e,a){"use strict";e.exports=function(t){var e=t.canvasHelpers={};e.drawPoint=function(e,a,i,n,o){var r,s,l,u,d,c;if("object"==typeof a&&("[object HTMLImageElement]"===(r=a.toString())||"[object HTMLCanvasElement]"===r))return void e.drawImage(a,n-a.width/2,o-a.height/2);if(!(isNaN(i)||i<=0)){switch(a){default:e.beginPath(),e.arc(n,o,i,0,2*Math.PI),e.closePath(),e.fill();break;case"triangle":e.beginPath(),s=3*i/Math.sqrt(3),d=s*Math.sqrt(3)/2,e.moveTo(n-s/2,o+d/3),e.lineTo(n+s/2,o+d/3),e.lineTo(n,o-2*d/3),e.closePath(),e.fill();break;case"rect":c=1/Math.SQRT2*i,e.beginPath(),e.fillRect(n-c,o-c,2*c,2*c),e.strokeRect(n-c,o-c,2*c,2*c);break;case"rectRounded":var h=i/Math.SQRT2,f=n-h,g=o-h,p=Math.SQRT2*i;t.helpers.drawRoundedRectangle(e,f,g,p,p,i/2),e.fill();break;case"rectRot":c=1/Math.SQRT2*i,e.beginPath(),e.moveTo(n-c,o),e.lineTo(n,o+c),e.lineTo(n+c,o),e.lineTo(n,o-c),e.closePath(),e.fill();break;case"cross":e.beginPath(),e.moveTo(n,o+i),e.lineTo(n,o-i),e.moveTo(n-i,o),e.lineTo(n+i,o),e.closePath();break;case"crossRot":e.beginPath(),l=Math.cos(Math.PI/4)*i,u=Math.sin(Math.PI/4)*i,e.moveTo(n-l,o-u),e.lineTo(n+l,o+u),e.moveTo(n-l,o+u),e.lineTo(n+l,o-u),e.closePath();break;case"star":e.beginPath(),e.moveTo(n,o+i),e.lineTo(n,o-i),e.moveTo(n-i,o),e.lineTo(n+i,o),l=Math.cos(Math.PI/4)*i,u=Math.sin(Math.PI/4)*i,e.moveTo(n-l,o-u),e.lineTo(n+l,o+u),e.moveTo(n-l,o+u),e.lineTo(n+l,o-u),e.closePath();break;case"line":e.beginPath(),e.moveTo(n-i,o),e.lineTo(n+i,o),e.closePath();break;case"dash":e.beginPath(),e.moveTo(n,o),e.lineTo(n+i,o),e.closePath()}e.stroke()}},e.clipArea=function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},e.unclipArea=function(t){t.restore()}}},{}],23:[function(t,e,a){"use strict";e.exports=function(t){function e(e){e=e||{};var a=e.data=e.data||{};return a.datasets=a.datasets||[],a.labels=a.labels||[],e.options=i.configMerge(t.defaults.global,t.defaults[e.type],e.options||{}),e}function a(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach(function(e){t.scales[e.id].options=e}),t.tooltip._options=e.tooltips}var i=t.helpers,n=t.plugins,o=t.platform;t.types={},t.instances={},t.controllers={},t.Controller=function(a,n,r){var s=this;n=e(n);var l=o.acquireContext(a,n),u=l&&l.canvas,d=u&&u.height,c=u&&u.width;return r.ctx=l,r.canvas=u,r.config=n,r.width=c,r.height=d,r.aspectRatio=d?c/d:null,s.id=i.uid(),s.chart=r,s.config=n,s.options=n.options,s._bufferedRender=!1,t.instances[s.id]=s,Object.defineProperty(s,"data",{get:function(){return s.config.data}}),l&&u?(s.initialize(),s.update(),s):(console.error("Failed to create chart: can't acquire context from the given item"),s)},i.extend(t.Controller.prototype,{initialize:function(){var t=this;return n.notify(t,"beforeInit"),i.retinaScale(t.chart),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),n.notify(t,"afterInit"),t},clear:function(){return i.clear(this.chart),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,a=e.chart,o=e.options,r=a.canvas,s=o.maintainAspectRatio&&a.aspectRatio||null,l=Math.floor(i.getMaximumWidth(r)),u=Math.floor(s?l/s:i.getMaximumHeight(r));if((a.width!==l||a.height!==u)&&(r.width=a.width=l,r.height=a.height=u,r.style.width=l+"px",r.style.height=u+"px",i.retinaScale(a),!t)){var d={width:l,height:u};n.notify(e,"resize",[d]),e.options.onResize&&e.options.onResize(e,d),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},a=t.scale;i.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),i.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),a&&(a.id=a.id||"scale")},buildScales:function(){var e=this,a=e.options,n=e.scales={},o=[];a.scales&&(o=o.concat((a.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category"}}),(a.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear"}}))),a.scale&&o.push({options:a.scale,dtype:"radialLinear",isDefault:!0}),i.each(o,function(a){var o=a.options,r=i.getValueOrDefault(o.type,a.dtype),s=t.scaleService.getScaleConstructor(r);if(s){var l=new s({id:o.id,options:o,ctx:e.chart.ctx,chart:e});n[l.id]=l,a.isDefault&&(e.scale=l)}}),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,a=[],n=[];if(i.each(e.data.datasets,function(i,o){var r=e.getDatasetMeta(o);r.type||(r.type=i.type||e.config.type),a.push(r.type),r.controller?r.controller.updateIndex(o):(r.controller=new t.controllers[r.type](e,o),n.push(r.controller))},e),a.length>1)for(var o=1;o<a.length;o++)if(a[o]!==a[o-1]){e.isCombo=!0;break}return n},resetElements:function(){var t=this;i.each(t.data.datasets,function(e,a){t.getDatasetMeta(a).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t,e){var o=this;if(a(o),!1!==n.notify(o,"beforeUpdate")){o.tooltip._data=o.data;var r=o.buildOrUpdateControllers();i.each(o.data.datasets,function(t,e){o.getDatasetMeta(e).controller.buildOrUpdateElements()},o),o.updateLayout(),i.each(r,function(t){t.reset()}),o.updateDatasets(),n.notify(o,"afterUpdate"),o._bufferedRender?o._bufferedRequest={lazy:e,duration:t}:o.render(t,e)}},updateLayout:function(){var e=this;!1!==n.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.chart.width,this.chart.height),n.notify(e,"afterScaleUpdate"),n.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==n.notify(t,"beforeDatasetsUpdate")){for(var e=0,a=t.data.datasets.length;e<a;++e)t.getDatasetMeta(e).controller.update();n.notify(t,"afterDatasetsUpdate")}},render:function(e,a){var o=this;if(!1!==n.notify(o,"beforeRender")){var r=o.options.animation,s=function(){n.notify(o,"afterRender");var t=r&&r.onComplete;t&&t.call&&t.call(o)};if(r&&(void 0!==e&&0!==e||void 0===e&&0!==r.duration)){var l=new t.Animation;l.numSteps=(e||r.duration)/16.66,l.easing=r.easing,l.render=function(t,e){var a=i.easingEffects[e.easing],n=e.currentStep/e.numSteps,o=a(n);t.draw(o,n,e.currentStep)},l.onAnimationProgress=r.onProgress,l.onAnimationComplete=s,t.animationService.addAnimation(o,l,e,a)}else o.draw(),s();return o}},draw:function(t){var e=this;e.clear(),void 0!==t&&null!==t||(t=1),!1!==n.notify(e,"beforeDraw",[t])&&(i.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.scale&&e.scale.draw(),e.drawDatasets(t),e.tooltip.transition(t).draw(),n.notify(e,"afterDraw",[t]))},drawDatasets:function(t){var e=this;!1!==n.notify(e,"beforeDatasetsDraw",[t])&&(i.each(e.data.datasets,function(a,i){e.isDatasetVisible(i)&&e.getDatasetMeta(i).controller.draw(t)},e,!0),n.notify(e,"afterDatasetsDraw",[t]))},getElementAtEvent:function(e){return t.Interaction.modes.single(this,e)},getElementsAtEvent:function(e){return t.Interaction.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return t.Interaction.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,a,i){var n=t.Interaction.modes[a]
;return"function"==typeof n?n(this,e,i):[]},getDatasetAtEvent:function(e){return t.Interaction.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(t){var e=this,a=e.data.datasets[t];a._meta||(a._meta={});var i=a._meta[e.id];return i||(i=a._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,a=this.data.datasets.length;e<a;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var e,a,r,s=this,l=s.chart.canvas;for(s.stop(),a=0,r=s.data.datasets.length;a<r;++a)e=s.getDatasetMeta(a),e.controller&&(e.controller.destroy(),e.controller=null);l&&(s.unbindEvents(),i.clear(s.chart),o.releaseContext(s.chart.ctx),s.chart.canvas=null,s.chart.ctx=null),n.notify(s,"destroy"),delete t.instances[s.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e.chart,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e),e.tooltip.initialize()},bindEvents:function(){var t=this,e=t._listeners={},a=function(){t.eventHandler.apply(t,arguments)};i.each(t.options.events,function(i){o.addEventListener(t,i,a),e[i]=a}),t.options.responsive&&(a=function(){t.resize()},o.addEventListener(t,"resize",a),e.resize=a)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,i.each(e,function(e,a){o.removeEventListener(t,a,e)}))},updateHoverStyle:function(t,e,a){var i,n,o,r=a?"setHoverStyle":"removeHoverStyle";for(n=0,o=t.length;n<o;++n)(i=t[n])&&this.getDatasetMeta(i._datasetIndex).controller[r](i)},eventHandler:function(t){var e=this,a=e.tooltip;if(!1!==n.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);i|=a&&a.handleEvent(t),n.notify(e,"afterEvent",[t]);var o=e._bufferedRequest;return o?e.render(o.duration,o.lazy):i&&!e.animating&&(e.stop(),e.render(e.options.hover.animationDuration,!0)),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e=this,a=e.options||{},n=a.hover,o=!1;return e.lastActive=e.lastActive||[],"mouseout"===t.type?e.active=[]:e.active=e.getElementsAtEventForMode(t,n.mode,n),n.onHover&&n.onHover.call(e,t["native"],e.active),"mouseup"!==t.type&&"click"!==t.type||a.onClick&&a.onClick.call(e,t["native"],e.active),e.lastActive.length&&e.updateHoverStyle(e.lastActive,n.mode,!1),e.active.length&&n.mode&&e.updateHoverStyle(e.active,n.mode,!0),o=!i.arrayEquals(e.active,e.lastActive),e.lastActive=e.active,o}})}},{}],24:[function(t,e,a){"use strict";e.exports=function(t){function e(t,e){return t._chartjs?void t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),void n.forEach(function(e){var a="onData"+e.charAt(0).toUpperCase()+e.slice(1),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),o=n.apply(this,e);return i.each(t._chartjs.listeners,function(t){"function"==typeof t[a]&&t[a].apply(t,e)}),o}})}))}function a(t,e){var a=t._chartjs;if(a){var i=a.listeners,o=i.indexOf(e);-1!==o&&i.splice(o,1),i.length>0||(n.forEach(function(e){delete t[e]}),delete t._chartjs)}}var i=t.helpers,n=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},i.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var a=this;a.chart=t,a.index=e,a.linkScales(),a.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),a=t.getDataset();null===e.xAxisID&&(e.xAxisID=a.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=a.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},destroy:function(){this._data&&a(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,a=e.dataElementType;return a&&new a({_chart:e.chart.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,a=this,i=a.getMeta(),n=a.getDataset().data||[],o=i.data;for(t=0,e=n.length;t<e;++t)o[t]=o[t]||a.createMetaData(t);i.dataset=i.dataset||a.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t=this,i=t.getDataset(),n=i.data||(i.data=[]);t._data!==n&&(t._data&&a(t._data,t),e(n,t),t._data=n),t.resyncElements()},update:i.noop,draw:function(t){var e,a,i=t||1,n=this.getMeta().data;for(e=0,a=n.length;e<a;++e)n[e].transition(i).draw()},removeHoverStyle:function(t,e){var a=this.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},r=i.getValueAtIndexOrDefault,s=t._model;s.backgroundColor=o.backgroundColor?o.backgroundColor:r(a.backgroundColor,n,e.backgroundColor),s.borderColor=o.borderColor?o.borderColor:r(a.borderColor,n,e.borderColor),s.borderWidth=o.borderWidth?o.borderWidth:r(a.borderWidth,n,e.borderWidth)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],a=t._index,n=t.custom||{},o=i.getValueAtIndexOrDefault,r=i.getHoverColor,s=t._model;s.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:o(e.hoverBackgroundColor,a,r(s.backgroundColor)),s.borderColor=n.hoverBorderColor?n.hoverBorderColor:o(e.hoverBorderColor,a,r(s.borderColor)),s.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:o(e.hoverBorderWidth,a,s.borderWidth)},resyncElements:function(){var t=this,e=t.getMeta(),a=t.getDataset().data,i=e.data.length,n=a.length;n<i?e.data.splice(n,i-n):n>i&&t.insertElements(i,n-i)},insertElements:function(t,e){for(var a=0;a<e;++a)this.addElementAndReset(t+a)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),t.DatasetController.extend=i.inherits}},{}],25:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers;t.elements={},t.Element=function(t){e.extend(this,t),this.initialize.apply(this,arguments)},e.extend(t.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=e.clone(t._model)),t._start=e.clone(t._view),t},transition:function(t){var a=this;return a._view||(a._view=e.clone(a._model)),1===t?(a._view=a._model,a._start=null,a):(a._start||a.pivot(),e.each(a._model,function(i,n){if("_"===n[0]);else if(a._view.hasOwnProperty(n))if(i===a._view[n]);else if("string"==typeof i)try{var o=e.color(a._model[n]).mix(e.color(a._start[n]),t);a._view[n]=o.rgbString()}catch(t){a._view[n]=i}else if("number"==typeof i){var r=void 0!==a._start[n]&&!1===isNaN(a._start[n])?a._start[n]:0;a._view[n]=(a._model[n]-r)*t+r}else a._view[n]=i;else"number"!=typeof i||isNaN(a._view[n])?a._view[n]=i:a._view[n]=i*t},a),a)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return e.isNumber(this._model.x)&&e.isNumber(this._model.y)}}),t.Element.extend=e.inherits}},{}],26:[function(t,e,a){"use strict";var i=t(3);e.exports=function(t){function e(t,e,a){var i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[a])):i=t,i}function a(t){return void 0!==t&&null!==t&&"none"!==t}function n(t,i,n){var o=document.defaultView,r=t.parentNode,s=o.getComputedStyle(t)[i],l=o.getComputedStyle(r)[i],u=a(s),d=a(l),c=Number.POSITIVE_INFINITY;return u||d?Math.min(u?e(s,t,n):c,d?e(l,r,n):c):"none"}var o=t.helpers={};o.each=function(t,e,a,i){var n,r;if(o.isArray(t))if(r=t.length,i)for(n=r-1;n>=0;n--)e.call(a,t[n],n);else for(n=0;n<r;n++)e.call(a,t[n],n);else if("object"==typeof t){var s=Object.keys(t);for(r=s.length,n=0;n<r;n++)e.call(a,t[s[n]],s[n])}},o.clone=function(t){var e={};return o.each(t,function(t,a){o.isArray(t)?e[a]=t.slice(0):e[a]="object"==typeof t&&null!==t?o.clone(t):t}),e},o.extend=function(t){for(var e=function(e,a){t[a]=e},a=1,i=arguments.length;a<i;a++)o.each(arguments[a],e);return t},o.configMerge=function(e){var a=o.clone(e);return o.each(Array.prototype.slice.call(arguments,1),function(e){o.each(e,function(e,i){var n=a.hasOwnProperty(i),r=n?a[i]:{};"scales"===i?a[i]=o.scaleMerge(r,e):"scale"===i?a[i]=o.configMerge(r,t.scaleService.getScaleDefaults(e.type),e):!n||"object"!=typeof r||o.isArray(r)||null===r||"object"!=typeof e||o.isArray(e)?a[i]=e:a[i]=o.configMerge(r,e)})}),a},o.scaleMerge=function(e,a){var i=o.clone(e);return o.each(a,function(e,a){"xAxes"===a||"yAxes"===a?i.hasOwnProperty(a)?o.each(e,function(e,n){var r=o.getValueOrDefault(e.type,"xAxes"===a?"category":"linear"),s=t.scaleService.getScaleDefaults(r);n>=i[a].length||!i[a][n].type?i[a].push(o.configMerge(s,e)):e.type&&e.type!==i[a][n].type?i[a][n]=o.configMerge(i[a][n],s,e):i[a][n]=o.configMerge(i[a][n],e)}):(i[a]=[],o.each(e,function(e){var n=o.getValueOrDefault(e.type,"xAxes"===a?"category":"linear");i[a].push(o.configMerge(t.scaleService.getScaleDefaults(n),e))})):i.hasOwnProperty(a)&&"object"==typeof i[a]&&null!==i[a]&&"object"==typeof e?i[a]=o.configMerge(i[a],e):i[a]=e}),i},o.getValueAtIndexOrDefault=function(t,e,a){return void 0===t||null===t?a:o.isArray(t)?e<t.length?t[e]:a:t},o.getValueOrDefault=function(t,e){return void 0===t?e:t},o.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var a=0,i=t.length;a<i;++a)if(t[a]===e)return a;return-1},o.where=function(t,e){if(o.isArray(t)&&Array.prototype.filter)return t.filter(e);var a=[];return o.each(t,function(t){e(t)&&a.push(t)}),a},o.findIndex=Array.prototype.findIndex?function(t,e,a){return t.findIndex(e,a)}:function(t,e,a){a=void 0===a?t:a;for(var i=0,n=t.length;i<n;++i)if(e.call(a,t[i],i,t))return i;return-1},o.findNextWhere=function(t,e,a){void 0!==a&&null!==a||(a=-1);for(var i=a+1;i<t.length;i++){var n=t[i];if(e(n))return n}},o.findPreviousWhere=function(t,e,a){void 0!==a&&null!==a||(a=t.length);for(var i=a-1;i>=0;i--){var n=t[i];if(e(n))return n}},o.inherits=function(t){var e=this,a=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=a};return i.prototype=e.prototype,a.prototype=new i,a.extend=o.inherits,t&&o.extend(a.prototype,t),a.__super__=e.prototype,a},o.noop=function(){},o.uid=function(){var t=0;return function(){return t++}}(),o.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.almostEquals=function(t,e,a){return Math.abs(t-e)<a},o.almostWhole=function(t,e){var a=Math.round(t);return a-e<t&&a+e>t},o.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},o.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},o.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return t=+t,0===t||isNaN(t)?t:t>0?1:-1},o.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},o.toRadians=function(t){return t*(Math.PI/180)},o.toDegrees=function(t){return t*(180/Math.PI)},o.getAngleFromPoint=function(t,e){var a=e.x-t.x,i=e.y-t.y,n=Math.sqrt(a*a+i*i),o=Math.atan2(i,a);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:n}},o.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},o.aliasPixel=function(t){return t%2==0?0:.5},o.splineCurve=function(t,e,a,i){var n=t.skip?e:t,o=e,r=a.skip?e:a,s=Math.sqrt(Math.pow(o.x-n.x,2)+Math.pow(o.y-n.y,2)),l=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),u=s/(s+l),d=l/(s+l);u=isNaN(u)?0:u,d=isNaN(d)?0:d;var c=i*u,h=i*d;return{previous:{x:o.x-c*(r.x-n.x),y:o.y-c*(r.y-n.y)},next:{x:o.x+h*(r.x-n.x),y:o.y+h*(r.y-n.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(t){var e,a,i,n,r=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),s=r.length;for(e=0;e<s;++e)if(i=r[e],!i.model.skip){if(a=e>0?r[e-1]:null,(n=e<s-1?r[e+1]:null)&&!n.model.skip){var l=n.model.x-i.model.x;i.deltaK=0!==l?(n.model.y-i.model.y)/l:0}!a||a.model.skip?i.mK=i.deltaK:!n||n.model.skip?i.mK=a.deltaK:this.sign(a.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(a.deltaK+i.deltaK)/2}var u,d,c,h;for(e=0;e<s-1;++e)i=r[e],n=r[e+1],i.model.skip||n.model.skip||(o.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=n.mK=0:(u=i.mK/i.deltaK,d=n.mK/i.deltaK,(h=Math.pow(u,2)+Math.pow(d,2))<=9||(c=3/Math.sqrt(h),i.mK=u*c*i.deltaK,n.mK=d*c*i.deltaK)));var f;for(e=0;e<s;++e)i=r[e],i.model.skip||(a=e>0?r[e-1]:null,n=e<s-1?r[e+1]:null,a&&!a.model.skip&&(f=(i.model.x-a.model.x)/3,i.model.controlPointPreviousX=i.model.x-f,i.model.controlPointPreviousY=i.model.y-f*i.mK),n&&!n.model.skip&&(f=(n.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+f,i.model.controlPointNextY=i.model.y+f*i.mK))},o.nextItem=function(t,e,a){return a?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},o.previousItem=function(t,e,a){return a?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},o.niceNum=function(t,e){var a=Math.floor(o.log10(t)),i=t/Math.pow(10,a);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,a)};var r=o.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(1-Math.pow(2,-10*t/1))},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,a=0,i=1;return 0===t?0:1==(t/=1)?1:(a||(a=.3),i<Math.abs(1)?(i=1,e=a/4):e=a/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/a))},easeOutElastic:function(t){var e=1.70158,a=0,i=1;return 0===t?0:1==(t/=1)?1:(a||(a=.3),i<Math.abs(1)?(i=1,e=a/4):e=a/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((1*t-e)*(2*Math.PI)/a)+1)},easeInOutElastic:function(t){var e=1.70158,a=0,i=1;return 0===t?0:2==(t/=.5)?1:(a||(a=.3*1.5*1),i<Math.abs(1)?(i=1,e=a/4):e=a/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/a)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/a)*.5+1)},easeInBack:function(t){var e=1.70158;return 1*(t/=1)*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return 1*((t=t/1-1)*t*((e+1)*t+e)+1)},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-r.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t*1:t<2/2.75?1*(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return t<.5?.5*r.easeInBounce(2*t):.5*r.easeOutBounce(2*t-1)+.5}};o.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),o.getRelativePosition=function(t,e){var a,i,n=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=n.touches;l&&l.length>0?(a=l[0].clientX,i=l[0].clientY):(a=n.clientX,i=n.clientY);var u=parseFloat(o.getStyle(r,"padding-left")),d=parseFloat(o.getStyle(r,"padding-top")),c=parseFloat(o.getStyle(r,"padding-right")),h=parseFloat(o.getStyle(r,"padding-bottom")),f=s.right-s.left-u-c,g=s.bottom-s.top-d-h;return a=Math.round((a-s.left-u)/f*r.width/e.currentDevicePixelRatio),i=Math.round((i-s.top-d)/g*r.height/e.currentDevicePixelRatio),{x:a,y:i}},o.addEvent=function(t,e,a){t.addEventListener?t.addEventListener(e,a):t.attachEvent?t.attachEvent("on"+e,a):t["on"+e]=a},o.removeEvent=function(t,e,a){t.removeEventListener?t.removeEventListener(e,a,!1):t.detachEvent?t.detachEvent("on"+e,a):t["on"+e]=o.noop},o.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},o.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},o.getMaximumWidth=function(t){var e=t.parentNode,a=parseInt(o.getStyle(e,"padding-left"),10),i=parseInt(o.getStyle(e,"padding-right"),10),n=e.clientWidth-a-i,r=o.getConstraintWidth(t);return isNaN(r)?n:Math.min(n,r)},o.getMaximumHeight=function(t){var e=t.parentNode,a=parseInt(o.getStyle(e,"padding-top"),10),i=parseInt(o.getStyle(e,"padding-bottom"),10),n=e.clientHeight-a-i,r=o.getConstraintHeight(t);return isNaN(r)?n:Math.min(n,r)},o.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},o.retinaScale=function(t){var e=t.currentDevicePixelRatio=window.devicePixelRatio||1;if(1!==e){var a=t.canvas,i=t.height,n=t.width;a.height=i*e,a.width=n*e,t.ctx.scale(e,e),a.style.height=i+"px",a.style.width=n+"px"}},o.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},o.fontString=function(t,e,a){return e+" "+t+"px "+a},o.longestText=function(t,e,a,i){i=i||{};var n=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(n=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var s=0;o.each(a,function(e){void 0!==e&&null!==e&&!0!==o.isArray(e)?s=o.measureText(t,n,r,s,e):o.isArray(e)&&o.each(e,function(e){void 0===e||null===e||o.isArray(e)||(s=o.measureText(t,n,r,s,e))})});var l=r.length/2;if(l>a.length){for(var u=0;u<l;u++)delete n[r[u]];r.splice(0,l)}return s},o.measureText=function(t,e,a,i,n){var o=e[n];return o||(o=e[n]=t.measureText(n).width,a.push(n)),o>i&&(i=o),i},o.numberOfLabelLines=function(t){var e=1;return o.each(t,function(t){o.isArray(t)&&t.length>e&&(e=t.length)}),e},o.drawRoundedRectangle=function(t,e,a,i,n,o){t.beginPath(),t.moveTo(e+o,a),t.lineTo(e+i-o,a),t.quadraticCurveTo(e+i,a,e+i,a+o),t.lineTo(e+i,a+n-o),t.quadraticCurveTo(e+i,a+n,e+i-o,a+n),t.lineTo(e+o,a+n),t.quadraticCurveTo(e,a+n,e,a+n-o),t.lineTo(e,a+o),t.quadraticCurveTo(e,a,e+o,a),t.closePath()},o.color=function(e){return i?i(e instanceof CanvasGradient?t.defaults.global.defaultColor:e):(console.error("Color.js not found!"),e)},o.isArray=Array.isArray?function(t){return Array.isArray(t)}:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o.arrayEquals=function(t,e){var a,i,n,r;if(!t||!e||t.length!==e.length)return!1;for(a=0,i=t.length;a<i;++a)if(n=t[a],r=e[a],n instanceof Array&&r instanceof Array){if(!o.arrayEquals(n,r))return!1}else if(n!==r)return!1;return!0},o.callCallback=function(t,e,a){t&&"function"==typeof t.call&&t.apply(a,e)},o.getHoverColor=function(t){return t instanceof CanvasPattern?t:o.color(t).saturate(.5).darken(.1).rgbString()}}},{3:3}],27:[function(t,e,a){"use strict";e.exports=function(t){function e(t,e){return t["native"]?{x:t.x,y:t.y}:r.getRelativePosition(t,e)}function a(t,e){var a,i,n,o,r,s=t.data.datasets;for(i=0,o=s.length;i<o;++i)if(t.isDatasetVisible(i))for(a=t.getDatasetMeta(i),n=0,r=a.data.length;n<r;++n){var l=a.data[n];l._view.skip||e(l)}}function i(t,e){var i=[];return a(t,function(t){t.inRange(e.x,e.y)&&i.push(t)}),i}function n(t,e,i,n){var o=Number.POSITIVE_INFINITY,s=[];return n||(n=r.distanceBetweenPoints),a(t,function(t){if(!i||t.inRange(e.x,e.y)){var a=t.getCenterPoint(),r=n(e,a);r<o?(s=[t],o=r):r===o&&s.push(t)}}),s}function o(t,a,o){var r=e(a,t.chart),s=function(t,e){return Math.abs(t.x-e.x)},l=o.intersect?i(t,r):n(t,r,!1,s),u=[];return l.length?(t.data.datasets.forEach(function(e,a){if(t.isDatasetVisible(a)){var i=t.getDatasetMeta(a),n=i.data[l[0]._index];n&&!n._view.skip&&u.push(n)}}),u):[]}var r=t.helpers;t.Interaction={modes:{single:function(t,i){var n=e(i,t.chart),o=[];return a(t,function(t){if(t.inRange(n.x,n.y))return o.push(t),o}),o.slice(0,1)},label:o,index:o,dataset:function(t,a,o){var r=e(a,t.chart),s=o.intersect?i(t,r):n(t,r,!1);return s.length>0&&(s=t.getDatasetMeta(s[0]._datasetIndex).data),s},"x-axis":function(t,e){return o(t,e,!0)},point:function(t,a){return i(t,e(a,t.chart))},nearest:function(t,a,i){var o=e(a,t.chart),r=n(t,o,i.intersect);return r.length>1&&r.sort(function(t,e){var a=t.getArea(),i=e.getArea(),n=a-i;return 0===n&&(n=t._datasetIndex-e._datasetIndex),n}),r.slice(0,1)},x:function(t,i,n){var o=e(i,t.chart),r=[],s=!1;return a(t,function(t){t.inXRange(o.x)&&r.push(t),t.inRange(o.x,o.y)&&(s=!0)}),n.intersect&&!s&&(r=[]),r},y:function(t,i,n){var o=e(i,t.chart),r=[],s=!1;return a(t,function(t){t.inYRange(o.y)&&r.push(t),t.inRange(o.x,o.y)&&(s=!0)}),n.intersect&&!s&&(r=[]),r}}}}},{}],28:[function(t,e,a){"use strict";e.exports=function(){var t=function(e,a){return this.controller=new t.Controller(e,a,this),this.controller};return t.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var a=0;a<t.data.datasets.length;a++)e.push('<li><span style="background-color:'+t.data.datasets[a].backgroundColor+'"></span>'),t.data.datasets[a].label&&e.push(t.data.datasets[a].label),e.push("</li>");return e.push("</ul>"),e.join("")}}},t.Chart=t,t}},{}],29:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers;t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),t.boxes.push(e)},removeBox:function(t,e){t.boxes&&t.boxes.splice(t.boxes.indexOf(e),1)},update:function(t,a,i){function n(t){var e,a=t.isHorizontal();a?(e=t.update(t.options.fullWidth?x:C,w),I-=e.height):(e=t.update(M,S),C-=e.width),D.push({horizontal:a,minSize:e,box:t})}function o(t){var a=e.findNextWhere(D,function(e){return e.box===t});if(a)if(t.isHorizontal()){var i={left:Math.max(F,A),right:Math.max(V,T),top:0,bottom:0};t.update(t.options.fullWidth?x:C,y/2,i)}else t.update(a.minSize.width,I)}function r(t){var a=e.findNextWhere(D,function(e){return e.box===t}),i={left:0,right:0,top:R,bottom:O};a&&t.update(a.minSize.width,I,i)}function s(t){t.isHorizontal()?(t.left=t.options.fullWidth?d:F,t.right=t.options.fullWidth?a-c:F+C,t.top=E,t.bottom=E+t.height,E=t.bottom):(t.left=N,t.right=N+t.width,t.top=R,t.bottom=R+I,N=t.right)}if(t){var l=t.options.layout,u=l?l.padding:null,d=0,c=0,h=0,f=0;isNaN(u)?(d=u.left||0,c=u.right||0,h=u.top||0,f=u.bottom||0):(d=u,c=u,h=u,f=u);var g=e.where(t.boxes,function(t){return"left"===t.options.position}),p=e.where(t.boxes,function(t){return"right"===t.options.position}),m=e.where(t.boxes,function(t){return"top"===t.options.position}),v=e.where(t.boxes,function(t){return"bottom"===t.options.position}),b=e.where(t.boxes,function(t){return"chartArea"===t.options.position});m.sort(function(t,e){return(e.options.fullWidth?1:0)-(t.options.fullWidth?1:0)}),v.sort(function(t,e){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)});var x=a-d-c,y=i-h-f,k=x/2,S=y/2,M=(a-k)/(g.length+p.length),w=(i-S)/(m.length+v.length),C=x,I=y,D=[];e.each(g.concat(p,m,v),n);var A=0,T=0,P=0,_=0;e.each(m.concat(v),function(t){if(t.getPadding){var e=t.getPadding();A=Math.max(A,e.left),T=Math.max(T,e.right)}}),e.each(g.concat(p),function(t){if(t.getPadding){var e=t.getPadding();P=Math.max(P,e.top),_=Math.max(_,e.bottom)}});var F=d,V=c,R=h,O=f;e.each(g.concat(p),o),e.each(g,function(t){F+=t.width}),e.each(p,function(t){V+=t.width}),e.each(m.concat(v),o),e.each(m,function(t){R+=t.height}),e.each(v,function(t){O+=t.height}),e.each(g.concat(p),r),F=d,V=c,R=h,O=f,e.each(g,function(t){F+=t.width}),e.each(p,function(t){V+=t.width}),e.each(m,function(t){R+=t.height}),e.each(v,function(t){O+=t.height});var L=Math.max(A-F,0);F+=L,V+=Math.max(T-V,0);var B=Math.max(P-R,0);R+=B,O+=Math.max(_-O,0);var z=i-R-O,W=a-F-V;W===C&&z===I||(e.each(g,function(t){t.height=z}),e.each(p,function(t){t.height=z}),e.each(m,function(t){t.options.fullWidth||(t.width=W)}),e.each(v,function(t){t.options.fullWidth||(t.width=W)}),I=z,C=W);var N=d+L,E=h+B;e.each(g.concat(m),s),N+=C,E+=I,e.each(p,s),e.each(v,s),t.chartArea={left:F,top:R,right:F+C,bottom:R+I},e.each(b,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(C,I)})}}}}},{}],30:[function(t,e,a){"use strict";e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function a(e,a){var i=new t.Legend({ctx:e.chart.ctx,options:a,chart:e});e.legend=i,t.layoutService.addBox(e,i)}var i=t.helpers,n=i.noop;t.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(t,e){var a=e.datasetIndex,i=this.chart,n=i.getDatasetMeta(a);n.hidden=null===n.hidden?!i.data.datasets[a].hidden:null,i.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return i.isArray(e.datasets)?e.datasets.map(function(e,a){return{text:e.label,fillStyle:i.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(a),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:a}},this):[]}}},t.Legend=t.Element.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:n,update:function(t,e,a){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=a,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:n,beforeSetDimensions:n,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:n,beforeBuildLabels:n,buildLabels:function(){var t=this,e=t.options.labels,a=e.generateLabels.call(t,t.chart);e.filter&&(a=a.filter(function(a){return e.filter(a,t.chart.data)})),t.options.reverse&&a.reverse(),t.legendItems=a},afterBuildLabels:n,beforeFit:n,fit:function(){var a=this,n=a.options,o=n.labels,r=n.display,s=a.ctx,l=t.defaults.global,u=i.getValueOrDefault,d=u(o.fontSize,l.defaultFontSize),c=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(d,c,h),g=a.legendHitBoxes=[],p=a.minSize,m=a.isHorizontal();if(m?(p.width=a.maxWidth,p.height=r?10:0):(p.width=r?10:0,p.height=a.maxHeight),r)if(s.font=f,m){var v=a.lineWidths=[0],b=a.legendItems.length?d+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(a.legendItems,function(t,i){var n=e(o,d),r=n+d/2+s.measureText(t.text).width;v[v.length-1]+r+o.padding>=a.width&&(b+=d+o.padding,v[v.length]=a.left),g[i]={left:0,top:0,width:r,height:d},v[v.length-1]+=r+o.padding}),p.height+=b}else{var x=o.padding,y=a.columnWidths=[],k=o.padding,S=0,M=0,w=d+x;i.each(a.legendItems,function(t,a){var i=e(o,d),n=i+d/2+s.measureText(t.text).width;M+w>p.height&&(k+=S+o.padding,y.push(S),S=0,M=0),S=Math.max(S,n),M+=w,g[a]={left:0,top:0,width:n,height:d}}),k+=S,y.push(S),p.width+=k}a.width=p.width,a.height=p.height},afterFit:n,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var a=this,n=a.options,o=n.labels,r=t.defaults.global,s=r.elements.line,l=a.width,u=a.lineWidths;if(n.display){var d,c=a.ctx,h=i.getValueOrDefault,f=h(o.fontColor,r.defaultFontColor),g=h(o.fontSize,r.defaultFontSize),p=h(o.fontStyle,r.defaultFontStyle),m=h(o.fontFamily,r.defaultFontFamily),v=i.fontString(g,p,m);c.textAlign="left",c.textBaseline="top",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=v;var b=e(o,g),x=a.legendHitBoxes,y=function(e,a,i){if(!(isNaN(b)||b<=0)){c.save(),c.fillStyle=h(i.fillStyle,r.defaultColor),c.lineCap=h(i.lineCap,s.borderCapStyle),c.lineDashOffset=h(i.lineDashOffset,s.borderDashOffset),c.lineJoin=h(i.lineJoin,s.borderJoinStyle),c.lineWidth=h(i.lineWidth,s.borderWidth),c.strokeStyle=h(i.strokeStyle,r.defaultColor);var o=0===h(i.lineWidth,s.borderWidth);if(c.setLineDash&&c.setLineDash(h(i.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=g*Math.SQRT2/2,u=l/Math.SQRT2,d=e+u,f=a+u;t.canvasHelpers.drawPoint(c,i.pointStyle,l,d,f)}else o||c.strokeRect(e,a,b,g),c.fillRect(e,a,b,g);c.restore()}},k=function(t,e,a,i){c.fillText(a.text,b+g/2+t,e),a.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(b+g/2+t,e+g/2),c.lineTo(b+g/2+t+i,e+g/2),c.stroke())},S=a.isHorizontal();d=S?{x:a.left+(l-u[0])/2,y:a.top+o.padding,line:0}:{x:a.left+o.padding,y:a.top+o.padding,line:0};var M=g+o.padding;i.each(a.legendItems,function(t,e){var i=c.measureText(t.text).width,n=b+g/2+i,r=d.x,s=d.y;S?r+n>=l&&(s=d.y+=M,d.line++,r=d.x=a.left+(l-u[d.line])/2):s+M>a.bottom&&(r=d.x=r+a.columnWidths[d.line]+o.padding,s=d.y=a.top+o.padding,d.line++),y(r,s,t),x[e].left=r,x[e].top=s,k(r,s,t,i),S?d.x+=n+o.padding:d.y+=M})}},handleEvent:function(t){var e=this,a=e.options,i="mouseup"===t.type?"click":t.type,n=!1;if("mousemove"===i){if(!a.onHover)return}else{if("click"!==i)return;if(!a.onClick)return}var o=t.x,r=t.y;if(o>=e.left&&o<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l<s.length;++l){var u=s[l];if(o>=u.left&&o<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===i){a.onClick.call(e,t["native"],e.legendItems[l]),n=!0;break}if("mousemove"===i){a.onHover.call(e,t["native"],e.legendItems[l]),n=!0;break}}}return n}}),t.plugins.register({beforeInit:function(t){var e=t.options.legend;e&&a(t,e)},beforeUpdate:function(e){var n=e.options.legend;n?(n=i.configMerge(t.defaults.global.legend,n),e.legend?e.legend.options=n:a(e,n)):(t.layoutService.removeBox(e,e.legend),delete e.legend)},afterEvent:function(t,e){var a=t.legend;a&&a.handleEvent(e)}})}},{}],31:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.plugins={},t.plugins={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var a=e.indexOf(t);-1!==a&&e.splice(a,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins
},notify:function(t,e,a){var i,n,o,r,s,l=this.descriptors(t),u=l.length;for(i=0;i<u;++i)if(n=l[i],o=n.plugin,"function"==typeof(s=o[e])&&(r=[t].concat(a||[]),r.push(n.options),!1===s.apply(o,r)))return!1;return!0},descriptors:function(a){var i=a._plugins||(a._plugins={});if(i.id===this._cacheId)return i.descriptors;var n=[],o=[],r=a&&a.config||{},s=t.defaults.global.plugins,l=r.options&&r.options.plugins||{};return this._plugins.concat(r.plugins||[]).forEach(function(t){if(-1===n.indexOf(t)){var a=t.id,i=l[a];!1!==i&&(!0===i&&(i=e.clone(s[a])),n.push(t),o.push({plugin:t,options:i||{}}))}}),i.descriptors=o,i.id=this._cacheId,o}},t.pluginService=t.plugins,t.PluginBase=e.inherits({})}},{}],32:[function(t,e,a){"use strict";e.exports=function(t){function e(t,e,a){return i.isArray(e)?i.longestText(t,a,e):t.measureText(e).width}function a(e){var a=i.getValueOrDefault,n=t.defaults.global,o=a(e.fontSize,n.defaultFontSize),r=a(e.fontStyle,n.defaultFontStyle),s=a(e.fontFamily,n.defaultFontFamily);return{size:o,style:r,family:s,font:i.fontString(o,r,s)}}var i=t.helpers;t.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:t.Ticks.formatters.values}},t.Scale=t.Element.extend({getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},beforeUpdate:function(){i.callCallback(this.options.beforeUpdate,[this])},update:function(t,e,a){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i.extend({left:0,right:0,top:0,bottom:0},a),n.longestTextCache=n.longestTextCache||{},n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeDataLimits(),n.determineDataLimits(),n.afterDataLimits(),n.beforeBuildTicks(),n.buildTicks(),n.afterBuildTicks(),n.beforeTickToLabelConversion(),n.convertTicksToLabels(),n.afterTickToLabelConversion(),n.beforeCalculateTickRotation(),n.calculateTickRotation(),n.afterCalculateTickRotation(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:function(){i.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){i.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){i.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){i.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:i.noop,afterDataLimits:function(){i.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){i.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:i.noop,afterBuildTicks:function(){i.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){i.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback)},afterTickToLabelConversion:function(){i.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){i.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,n=t.options.ticks,o=a(n);e.font=o.font;var r=n.minRotation||0;if(t.options.display&&t.isHorizontal())for(var s,l=i.longestText(e,o.font,t.ticks,t.longestTextCache),u=l,d=t.getPixelForTick(1)-t.getPixelForTick(0)-6;u>d&&r<n.maxRotation;){var c=i.toRadians(r);if(s=Math.cos(c),Math.sin(c)*l>t.maxHeight){r--;break}r++,u=s*l}t.labelRotation=r},afterCalculateTickRotation:function(){i.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){i.callCallback(this.options.beforeFit,[this])},fit:function(){var t=this,n=t.minSize={width:0,height:0},o=t.options,r=o.ticks,s=o.scaleLabel,l=o.gridLines,u=o.display,d=t.isHorizontal(),c=a(r),h=1.5*a(s).size,f=o.gridLines.tickMarkLength;if(n.width=d?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:u&&l.drawTicks?f:0,n.height=d?u&&l.drawTicks?f:0:t.maxHeight,s.display&&u&&(d?n.height+=h:n.width+=h),r.display&&u){var g=i.longestText(t.ctx,c.font,t.ticks,t.longestTextCache),p=i.numberOfLabelLines(t.ticks),m=.5*c.size;if(d){t.longestLabelWidth=g;var v=i.toRadians(t.labelRotation),b=Math.cos(v),x=Math.sin(v),y=x*g+c.size*p+m*p;n.height=Math.min(t.maxHeight,n.height+y),t.ctx.font=c.font;var k=t.ticks[0],S=e(t.ctx,k,c.font),M=t.ticks[t.ticks.length-1],w=e(t.ctx,M,c.font);0!==t.labelRotation?(t.paddingLeft="bottom"===o.position?b*S+3:b*m+3,t.paddingRight="bottom"===o.position?b*m+3:b*w+3):(t.paddingLeft=S/2+3,t.paddingRight=w/2+3)}else r.mirror?g=0:g+=t.options.ticks.padding,n.width+=g,t.paddingTop=c.size/2,t.paddingBottom=c.size/2}t.handleMargins(),t.width=n.width,t.height=n.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){i.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){return null===t||void 0===t?NaN:"number"!=typeof t||isFinite(t)?"object"==typeof t?t instanceof Date||t.isValid?t:this.getRightValue(this.isHorizontal()?t.x:t.y):t:NaN},getLabelForIndex:i.noop,getPixelForValue:i.noop,getValueForPixel:i.noop,getPixelForTick:function(t,e){var a=this;if(a.isHorizontal()){var i=a.width-(a.paddingLeft+a.paddingRight),n=i/Math.max(a.ticks.length-(a.options.gridLines.offsetGridLines?0:1),1),o=n*t+a.paddingLeft;e&&(o+=n/2);var r=a.left+Math.round(o);return r+=a.isFullWidth()?a.margins.left:0}var s=a.height-(a.paddingTop+a.paddingBottom);return a.top+t*(s/(a.ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var a=e.width-(e.paddingLeft+e.paddingRight),i=a*t+e.paddingLeft,n=e.left+Math.round(i);return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,a=t.max;return t.beginAtZero?0:e<0&&a<0?a:e>0&&a>0?e:0},draw:function(e){var n=this,o=n.options;if(o.display){var r,s,l=n.ctx,u=t.defaults.global,d=o.ticks,c=o.gridLines,h=o.scaleLabel,f=0!==n.labelRotation,g=d.autoSkip,p=n.isHorizontal();d.maxTicksLimit&&(s=d.maxTicksLimit);var m=i.getValueOrDefault(d.fontColor,u.defaultFontColor),v=a(d),b=c.drawTicks?c.tickMarkLength:0,x=i.getValueOrDefault(c.borderDash,u.borderDash),y=i.getValueOrDefault(c.borderDashOffset,u.borderDashOffset),k=i.getValueOrDefault(h.fontColor,u.defaultFontColor),S=a(h),M=i.toRadians(n.labelRotation),w=Math.cos(M),C=n.longestLabelWidth*w;l.fillStyle=m;var I=[];if(p){if(r=!1,f&&(C/=2),(C+d.autoSkipPadding)*n.ticks.length>n.width-(n.paddingLeft+n.paddingRight)&&(r=1+Math.floor((C+d.autoSkipPadding)*n.ticks.length/(n.width-(n.paddingLeft+n.paddingRight)))),s&&n.ticks.length>s)for(;!r||n.ticks.length/(r||1)>s;)r||(r=1),r+=1;g||(r=!1)}var D="right"===o.position?n.left:n.right-b,A="right"===o.position?n.left+b:n.right,T="bottom"===o.position?n.top:n.bottom-b,P="bottom"===o.position?n.top+b:n.bottom;if(i.each(n.ticks,function(t,a){if(void 0!==t&&null!==t){var s=n.ticks.length===a+1;if((!(r>1&&a%r>0||a%r==0&&a+r>=n.ticks.length)||s)&&void 0!==t&&null!==t){var l,u;a===("undefined"!=typeof n.zeroLineIndex?n.zeroLineIndex:0)?(l=c.zeroLineWidth,u=c.zeroLineColor):(l=i.getValueAtIndexOrDefault(c.lineWidth,a),u=i.getValueAtIndexOrDefault(c.color,a));var h,g,m,v,k,S,w,C,_,F,V="middle",R="middle";if(p){"bottom"===o.position?(R=f?"middle":"top",V=f?"right":"center",F=n.top+b):(R=f?"middle":"bottom",V=f?"left":"center",F=n.bottom-b);var O=n.getPixelForTick(a)+i.aliasPixel(l);_=n.getPixelForTick(a,c.offsetGridLines)+d.labelOffset,h=m=k=w=O,g=T,v=P,S=e.top,C=e.bottom}else{var L,B="left"===o.position,z=d.padding;d.mirror?(V=B?"left":"right",L=z):(V=B?"right":"left",L=b+z),_=B?n.right-L:n.left+L;var W=n.getPixelForTick(a);W+=i.aliasPixel(l),F=n.getPixelForTick(a,c.offsetGridLines),h=D,m=A,k=e.left,w=e.right,g=v=S=C=W}I.push({tx1:h,ty1:g,tx2:m,ty2:v,x1:k,y1:S,x2:w,y2:C,labelX:_,labelY:F,glWidth:l,glColor:u,glBorderDash:x,glBorderDashOffset:y,rotation:-1*M,label:t,textBaseline:R,textAlign:V})}}}),i.each(I,function(t){if(c.display&&(l.save(),l.lineWidth=t.glWidth,l.strokeStyle=t.glColor,l.setLineDash&&(l.setLineDash(t.glBorderDash),l.lineDashOffset=t.glBorderDashOffset),l.beginPath(),c.drawTicks&&(l.moveTo(t.tx1,t.ty1),l.lineTo(t.tx2,t.ty2)),c.drawOnChartArea&&(l.moveTo(t.x1,t.y1),l.lineTo(t.x2,t.y2)),l.stroke(),l.restore()),d.display){l.save(),l.translate(t.labelX,t.labelY),l.rotate(t.rotation),l.font=v.font,l.textBaseline=t.textBaseline,l.textAlign=t.textAlign;var e=t.label;if(i.isArray(e))for(var a=0,n=0;a<e.length;++a)l.fillText(""+e[a],0,n),n+=1.5*v.size;else l.fillText(e,0,0);l.restore()}}),h.display){var _,F,V=0;if(p)_=n.left+(n.right-n.left)/2,F="bottom"===o.position?n.bottom-S.size/2:n.top+S.size/2;else{var R="left"===o.position;_=R?n.left+S.size/2:n.right-S.size/2,F=n.top+(n.bottom-n.top)/2,V=R?-.5*Math.PI:.5*Math.PI}l.save(),l.translate(_,F),l.rotate(V),l.textAlign="center",l.textBaseline="middle",l.fillStyle=k,l.font=S.font,l.fillText(h.labelString,0,0),l.restore()}if(c.drawBorder){l.lineWidth=i.getValueAtIndexOrDefault(c.lineWidth,0),l.strokeStyle=i.getValueAtIndexOrDefault(c.color,0);var O=n.left,L=n.right,B=n.top,z=n.bottom,W=i.aliasPixel(l.lineWidth);p?(B=z="top"===o.position?n.bottom:n.top,B+=W,z+=W):(O=L="left"===o.position?n.right:n.left,O+=W,L+=W),l.beginPath(),l.moveTo(O,B),l.lineTo(L,z),l.stroke()}}}})}},{}],33:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers;t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,a,i){this.constructors[t]=a,this.defaults[t]=e.clone(i)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(a){return this.defaults.hasOwnProperty(a)?e.scaleMerge(t.defaults.scale,this.defaults[a]):{}},updateScaleDefaults:function(t,a){var i=this.defaults;i.hasOwnProperty(t)&&(i[t]=e.extend(i[t],a))},addScalesToLayout:function(a){e.each(a.scales,function(e){t.layoutService.addBox(a,e)})}}}},{}],34:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers;t.Ticks={generators:{linear:function(t,a){var i,n=[];if(t.stepSize&&t.stepSize>0)i=t.stepSize;else{var o=e.niceNum(a.max-a.min,!1);i=e.niceNum(o/(t.maxTicks-1),!0)}var r=Math.floor(a.min/i)*i,s=Math.ceil(a.max/i)*i;t.min&&t.max&&t.stepSize&&e.almostWhole((t.max-t.min)/t.stepSize,i/1e3)&&(r=t.min,s=t.max);var l=(s-r)/i;l=e.almostEquals(l,Math.round(l),i/1e3)?Math.round(l):Math.ceil(l),n.push(void 0!==t.min?t.min:r);for(var u=1;u<l;++u)n.push(r+u*i);return n.push(void 0!==t.max?t.max:s),n},logarithmic:function(t,a){var i,n,o=[],r=e.getValueOrDefault,s=r(t.min,Math.pow(10,Math.floor(e.log10(a.min)))),l=Math.floor(e.log10(a.max)),u=Math.ceil(a.max/Math.pow(10,l));0===s?(i=Math.floor(e.log10(a.minNotZero)),n=Math.floor(a.minNotZero/Math.pow(10,i)),o.push(s),s=n*Math.pow(10,i)):(i=Math.floor(e.log10(s)),n=Math.floor(s/Math.pow(10,i)));do{o.push(s),++n,10===n&&(n=1,++i),s=n*Math.pow(10,i)}while(i<l||i===l&&n<u);var d=r(t.max,s);return o.push(d),o}},formatters:{values:function(t){return e.isArray(t)?t:""+t},linear:function(t,a,i){var n=i.length>3?i[2]-i[1]:i[1]-i[0];Math.abs(n)>1&&t!==Math.floor(t)&&(n=t-Math.floor(t));var o=e.log10(Math.abs(n)),r="";if(0!==t){var s=-1*Math.floor(o);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,a,i){var n=t/Math.pow(10,Math.floor(e.log10(t)));return 0===t?"0":1===n||2===n||5===n||0===a||a===i.length-1?t.toExponential():""}}}}},{}],35:[function(t,e,a){"use strict";e.exports=function(t){function e(e,a){var i=new t.Title({ctx:e.chart.ctx,options:a,chart:e});e.titleBlock=i,t.layoutService.addBox(e,i)}var a=t.helpers;t.defaults.global.title={display:!1,position:"top",fullWidth:!0,fontStyle:"bold",padding:10,text:""};var i=a.noop;t.Title=t.Element.extend({initialize:function(t){var e=this;a.extend(e,t),e.legendHitBoxes=[]},beforeUpdate:i,update:function(t,e,a){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=a,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:i,beforeSetDimensions:i,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:i,beforeBuildLabels:i,buildLabels:i,afterBuildLabels:i,beforeFit:i,fit:function(){var e=this,i=a.getValueOrDefault,n=e.options,o=t.defaults.global,r=n.display,s=i(n.fontSize,o.defaultFontSize),l=e.minSize;e.isHorizontal()?(l.width=e.maxWidth,l.height=r?s+2*n.padding:0):(l.width=r?s+2*n.padding:0,l.height=e.maxHeight),e.width=l.width,e.height=l.height},afterFit:i,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var e=this,i=e.ctx,n=a.getValueOrDefault,o=e.options,r=t.defaults.global;if(o.display){var s,l,u,d=n(o.fontSize,r.defaultFontSize),c=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=a.fontString(d,c,h),g=0,p=e.top,m=e.left,v=e.bottom,b=e.right;i.fillStyle=n(o.fontColor,r.defaultFontColor),i.font=f,e.isHorizontal()?(s=m+(b-m)/2,l=p+(v-p)/2,u=b-m):(s="left"===o.position?m+d/2:b-d/2,l=p+(v-p)/2,u=v-p,g=Math.PI*("left"===o.position?-.5:.5)),i.save(),i.translate(s,l),i.rotate(g),i.textAlign="center",i.textBaseline="middle",i.fillText(o.text,0,0,u),i.restore()}}}),t.plugins.register({beforeInit:function(t){var a=t.options.title;a&&e(t,a)},beforeUpdate:function(i){var n=i.options.title;n?(n=a.configMerge(t.defaults.global.title,n),i.titleBlock?i.titleBlock.options=n:e(i,n)):(t.layoutService.removeBox(i,i.titleBlock),delete i.titleBlock)}})}},{}],36:[function(t,e,a){"use strict";e.exports=function(t){function e(t,e){var a=l.color(t);return a.alpha(e*a.alpha()).rgbaString()}function a(t,e){return e&&(l.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function i(t){var e=t._xScale,a=t._yScale||t._scale,i=t._index,n=t._datasetIndex;return{xLabel:e?e.getLabelForIndex(i,n):"",yLabel:a?a.getLabelForIndex(i,n):"",index:i,datasetIndex:n,x:t._model.x,y:t._model.y}}function n(e){var a=t.defaults.global,i=l.getValueOrDefault;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,bodyFontColor:e.bodyFontColor,_bodyFontFamily:i(e.bodyFontFamily,a.defaultFontFamily),_bodyFontStyle:i(e.bodyFontStyle,a.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:i(e.bodyFontSize,a.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:i(e.titleFontFamily,a.defaultFontFamily),_titleFontStyle:i(e.titleFontStyle,a.defaultFontStyle),titleFontSize:i(e.titleFontSize,a.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:i(e.footerFontFamily,a.defaultFontFamily),_footerFontStyle:i(e.footerFontStyle,a.defaultFontStyle),footerFontSize:i(e.footerFontSize,a.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors}}function o(t,e){var a=t._chart.ctx,i=2*e.yPadding,n=0,o=e.body,r=o.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);r+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,u=e.footer.length,d=e.titleFontSize,c=e.bodyFontSize,h=e.footerFontSize;i+=s*d,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=r*c,i+=r?(r-1)*e.bodySpacing:0,i+=u?e.footerMarginTop:0,i+=u*h,i+=u?(u-1)*e.footerSpacing:0;var f=0,g=function(t){n=Math.max(n,a.measureText(t).width+f)};return a.font=l.fontString(d,e._titleFontStyle,e._titleFontFamily),l.each(e.title,g),a.font=l.fontString(c,e._bodyFontStyle,e._bodyFontFamily),l.each(e.beforeBody.concat(e.afterBody),g),f=e.displayColors?c+2:0,l.each(o,function(t){l.each(t.before,g),l.each(t.lines,g),l.each(t.after,g)}),f=0,a.font=l.fontString(h,e._footerFontStyle,e._footerFontFamily),l.each(e.footer,g),n+=2*e.xPadding,{width:n,height:i}}function r(t,e){var a=t._model,i=t._chart,n=t._chartInstance.chartArea,o="center",r="center";a.y<e.height?r="top":a.y>i.height-e.height&&(r="bottom");var s,l,u,d,c,h=(n.left+n.right)/2,f=(n.top+n.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=i.width-e.width/2}),u=function(t){return t+e.width>i.width},d=function(t){return t-e.width<0},c=function(t){return t<=f?"top":"bottom"},s(a.x)?(o="left",u(a.x)&&(o="center",r=c(a.y))):l(a.x)&&(o="right",d(a.x)&&(o="center",r=c(a.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:o,yAlign:g.yAlign?g.yAlign:r}}function s(t,e,a){var i=t.x,n=t.y,o=t.caretSize,r=t.caretPadding,s=t.cornerRadius,l=a.xAlign,u=a.yAlign,d=o+r,c=s+r;return"right"===l?i-=e.width:"center"===l&&(i-=e.width/2),"top"===u?n+=d:n-="bottom"===u?e.height+d:e.height/2,"center"===u?"left"===l?i+=d:"right"===l&&(i-=d):"left"===l?i-=c:"right"===l&&(i+=c),{x:i,y:n}}var l=t.helpers;t.defaults.global.tooltips={enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,callbacks:{beforeTitle:l.noop,title:function(t,e){var a="",i=e.labels,n=i?i.length:0;if(t.length>0){var o=t[0];o.xLabel?a=o.xLabel:n>0&&o.index<n&&(a=i[o.index])}return a},afterTitle:l.noop,beforeBody:l.noop,beforeLabel:l.noop,label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.yLabel},labelColor:function(t,e){var a=e.getDatasetMeta(t.datasetIndex),i=a.data[t.index],n=i._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},afterLabel:l.noop,afterBody:l.noop,beforeFooter:l.noop,footer:l.noop,afterFooter:l.noop}},t.Tooltip=t.Element.extend({initialize:function(){this._model=n(this._options)},getTitle:function(){var t=this,e=t._options,i=e.callbacks,n=i.beforeTitle.apply(t,arguments),o=i.title.apply(t,arguments),r=i.afterTitle.apply(t,arguments),s=[];return s=a(s,n),s=a(s,o),s=a(s,r)},getBeforeBody:function(){var t=this._options.callbacks.beforeBody.apply(this,arguments);return l.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,e){var i=this,n=i._options.callbacks,o=[];return l.each(t,function(t){var r={before:[],lines:[],after:[]};a(r.before,n.beforeLabel.call(i,t,e)),a(r.lines,n.label.call(i,t,e)),a(r.after,n.afterLabel.call(i,t,e)),o.push(r)}),o},getAfterBody:function(){var t=this._options.callbacks.afterBody.apply(this,arguments);return l.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var t=this,e=t._options.callbacks,i=e.beforeFooter.apply(t,arguments),n=e.footer.apply(t,arguments),o=e.afterFooter.apply(t,arguments),r=[];return r=a(r,i),r=a(r,n),r=a(r,o)},update:function(e){var a,u,d=this,c=d._options,h=d._model,f=d._model=n(c),g=d._active,p=d._data,m=d._chartInstance,v={xAlign:h.xAlign,yAlign:h.yAlign},b={x:h.x,y:h.y},x={width:h.width,height:h.height},y={x:h.caretX,y:h.caretY};if(g.length){f.opacity=1;var k=[];y=t.Tooltip.positioners[c.position](g,d._eventPosition);var S=[];for(a=0,u=g.length;a<u;++a)S.push(i(g[a]));c.filter&&(S=S.filter(function(t){return c.filter(t,p)})),c.itemSort&&(S=S.sort(function(t,e){return c.itemSort(t,e,p)})),l.each(S,function(t){k.push(c.callbacks.labelColor.call(d,t,m))}),f.title=d.getTitle(S,p),f.beforeBody=d.getBeforeBody(S,p),f.body=d.getBody(S,p),f.afterBody=d.getAfterBody(S,p),f.footer=d.getFooter(S,p),f.x=Math.round(y.x),f.y=Math.round(y.y),f.caretPadding=l.getValueOrDefault(y.padding,2),f.labelColors=k,f.dataPoints=S,x=o(this,f),v=r(this,x),b=s(f,x,v)}else f.opacity=0;return f.xAlign=v.xAlign,f.yAlign=v.yAlign,f.x=b.x,f.y=b.y,f.width=x.width,f.height=x.height,f.caretX=y.x,f.caretY=y.y,d._model=f,e&&c.custom&&c.custom.call(d,f),d},drawCaret:function(t,a,i){var n,o,r,s,l,u,d=this._view,c=this._chart.ctx,h=d.caretSize,f=d.cornerRadius,g=d.xAlign,p=d.yAlign,m=t.x,v=t.y,b=a.width,x=a.height;"center"===p?("left"===g?(n=m,o=n-h,r=n):(n=m+b,o=n+h,r=n),l=v+x/2,s=l-h,u=l+h):("left"===g?(n=m+f,o=n+h,r=o+h):"right"===g?(n=m+b-f,o=n-h,r=o-h):(o=m+b/2,n=o-h,r=o+h),"top"===p?(s=v,l=s-h,u=s):(s=v+x,l=s+h,u=s)),c.fillStyle=e(d.backgroundColor,i),c.beginPath(),c.moveTo(n,s),c.lineTo(o,l),c.lineTo(r,u),c.closePath(),c.fill()},drawTitle:function(t,a,i,n){var o=a.title;if(o.length){i.textAlign=a._titleAlign,i.textBaseline="top";var r=a.titleFontSize,s=a.titleSpacing;i.fillStyle=e(a.titleFontColor,n),i.font=l.fontString(r,a._titleFontStyle,a._titleFontFamily);var u,d;for(u=0,d=o.length;u<d;++u)i.fillText(o[u],t.x,t.y),t.y+=r+s,u+1===o.length&&(t.y+=a.titleMarginBottom-s)}},drawBody:function(t,a,i,n){var o=a.bodyFontSize,r=a.bodySpacing,s=a.body;i.textAlign=a._bodyAlign,i.textBaseline="top";var u=e(a.bodyFontColor,n);i.fillStyle=u,i.font=l.fontString(o,a._bodyFontStyle,a._bodyFontFamily);var d=0,c=function(e){i.fillText(e,t.x+d,t.y),t.y+=o+r};l.each(a.beforeBody,c);var h=a.displayColors;d=h?o+2:0,l.each(s,function(r,s){l.each(r.before,c),l.each(r.lines,function(r){h&&(i.fillStyle=e(a.legendColorBackground,n),i.fillRect(t.x,t.y,o,o),i.strokeStyle=e(a.labelColors[s].borderColor,n),i.strokeRect(t.x,t.y,o,o),i.fillStyle=e(a.labelColors[s].backgroundColor,n),i.fillRect(t.x+1,t.y+1,o-2,o-2),i.fillStyle=u),c(r)}),l.each(r.after,c)}),d=0,l.each(a.afterBody,c),t.y-=r},drawFooter:function(t,a,i,n){var o=a.footer;o.length&&(t.y+=a.footerMarginTop,i.textAlign=a._footerAlign,i.textBaseline="top",i.fillStyle=e(a.footerFontColor,n),i.font=l.fontString(a.footerFontSize,a._footerFontStyle,a._footerFontFamily),l.each(o,function(e){i.fillText(e,t.x,t.y),t.y+=a.footerFontSize+a.footerSpacing}))},drawBackground:function(t,a,i,n,o){i.fillStyle=e(a.backgroundColor,o),l.drawRoundedRectangle(i,t.x,t.y,n.width,n.height,a.cornerRadius),i.fill()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var a={width:e.width,height:e.height},i={x:e.x,y:e.y},n=Math.abs(e.opacity<.001)?0:e.opacity;this._options.enabled&&(this.drawBackground(i,e,t,a,n),this.drawCaret(i,a,n),i.x+=e.xPadding,i.y+=e.yPadding,this.drawTitle(i,e,t,n),this.drawBody(i,e,t,n),this.drawFooter(i,e,t,n))}},handleEvent:function(t){var e=this,a=e._options,i=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chartInstance.getElementsAtEventForMode(t,a.mode,a),i=!l.arrayEquals(e._active,e._lastActive),e._lastActive=e._active,a.enabled||a.custom){e._eventPosition={x:t.x,y:t.y};var n=e._model;e.update(!0),e.pivot(),i|=n.x!==e._model.x||n.y!==e._model.y}return i}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,a,i=0,n=0,o=0;for(e=0,a=t.length;e<a;++e){var r=t[e];if(r&&r.hasValue()){var s=r.tooltipPosition();i+=s.x,n+=s.y,++o}}return{x:Math.round(i/o),y:Math.round(n/o)}},nearest:function(t,e){var a,i,n,o=e.x,r=e.y,s=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){var u=t[i];if(u&&u.hasValue()){var d=u.getCenterPoint(),c=l.distanceBetweenPoints(e,d);c<s&&(s=c,a=u)}}if(a){var h=a.tooltipPosition();o=h.x,r=h.y}return{x:o,y:r}}}}},{}],37:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers,a=t.defaults.global;a.elements.arc={backgroundColor:a.defaultColor,borderColor:"#fff",borderWidth:2},t.elements.Arc=t.Element.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,a){var i=this._view;if(i){for(var n=e.getAngleFromPoint(i,{x:t,y:a}),o=n.angle,r=n.distance,s=i.startAngle,l=i.endAngle;l<s;)l+=2*Math.PI;for(;o>l;)o-=2*Math.PI;for(;o<s;)o+=2*Math.PI;var u=o>=s&&o<=l,d=r>=i.innerRadius&&r<=i.outerRadius;return u&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,a=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*a,y:t.y+Math.sin(e)*a}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,a=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*a,y:t.y+Math.sin(e)*a}},draw:function(){var t=this._chart.ctx,e=this._view,a=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,a,i),t.arc(e.x,e.y,e.innerRadius,i,a,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}},{}],38:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers,a=t.defaults.global;t.defaults.global.elements.line={tension:.4,backgroundColor:a.defaultColor,borderWidth:3,borderColor:a.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0},t.elements.Line=t.Element.extend({draw:function(){function t(t,e){var a=e._view;!0===e._view.steppedLine?(l.lineTo(a.x,t._view.y),l.lineTo(a.x,a.y)):0===e._view.tension?l.lineTo(a.x,a.y):l.bezierCurveTo(t._view.controlPointNextX,t._view.controlPointNextY,a.controlPointPreviousX,a.controlPointPreviousY,a.x,a.y)}var i=this,n=i._view,o=n.spanGaps,r=n.scaleZero,s=i._loop;s||("top"===n.fill?r=n.scaleTop:"bottom"===n.fill&&(r=n.scaleBottom));var l=i._chart.ctx;l.save();var u=i._children.slice(),d=-1;s&&u.length&&u.push(u[0]);var c,h,f,g;if(u.length&&n.fill){for(l.beginPath(),c=0;c<u.length;++c)h=u[c],f=e.previousItem(u,c),g=h._view,0===c?(s?l.moveTo(r.x,r.y):l.moveTo(g.x,r),g.skip||(d=c,l.lineTo(g.x,g.y))):(f=-1===d?f:u[d],g.skip?o||d!==c-1||(s?l.lineTo(r.x,r.y):l.lineTo(f._view.x,r)):(d!==c-1?o&&-1!==d?t(f,h):s?l.lineTo(g.x,g.y):(l.lineTo(g.x,r),l.lineTo(g.x,g.y)):t(f,h),d=c));s||-1===d||l.lineTo(u[d]._view.x,r),l.fillStyle=n.backgroundColor||a.defaultColor,l.closePath(),l.fill()}var p=a.elements.line;for(l.lineCap=n.borderCapStyle||p.borderCapStyle,l.setLineDash&&l.setLineDash(n.borderDash||p.borderDash),l.lineDashOffset=n.borderDashOffset||p.borderDashOffset,l.lineJoin=n.borderJoinStyle||p.borderJoinStyle,l.lineWidth=n.borderWidth||p.borderWidth,l.strokeStyle=n.borderColor||a.defaultColor,l.beginPath(),d=-1,c=0;c<u.length;++c)h=u[c],f=e.previousItem(u,c),g=h._view,0===c?g.skip||(l.moveTo(g.x,g.y),d=c):(f=-1===d?f:u[d],g.skip||(d!==c-1&&!o||-1===d?l.moveTo(g.x,g.y):t(f,h),d=c));l.stroke(),l.restore()}})}},{}],39:[function(t,e,a){"use strict";e.exports=function(t){function e(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hitRadius,2)}function a(t){var e=this._view;return!!e&&Math.pow(t-e.y,2)<Math.pow(e.radius+e.hitRadius,2)}var i=t.helpers,n=t.defaults.global,o=n.defaultColor;n.elements.point={radius:3,pointStyle:"circle",backgroundColor:o,borderWidth:1,borderColor:o,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},t.elements.Point=t.Element.extend({inRange:function(t,e){var a=this._view;return!!a&&Math.pow(t-a.x,2)+Math.pow(e-a.y,2)<Math.pow(a.hitRadius+a.radius,2)},inLabelRange:e,inXRange:e,inYRange:a,getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(e){var a=this._view,r=this._model,s=this._chart.ctx,l=a.pointStyle,u=a.radius,d=a.x,c=a.y,h=t.helpers.color,f=1.01,g=0;a.skip||(s.strokeStyle=a.borderColor||o,s.lineWidth=i.getValueOrDefault(a.borderWidth,n.elements.point.borderWidth),s.fillStyle=a.backgroundColor||o,void 0!==e&&(r.x<e.left||e.right*f<r.x||r.y<e.top||e.bottom*f<r.y)&&(r.x<e.left?g=(d-r.x)/(e.left-r.x):e.right*f<r.x?g=(r.x-d)/(r.x-e.right):r.y<e.top?g=(c-r.y)/(e.top-r.y):e.bottom*f<r.y&&(g=(r.y-c)/(r.y-e.bottom)),g=Math.round(100*g)/100,s.strokeStyle=h(s.strokeStyle).alpha(g).rgbString(),s.fillStyle=h(s.fillStyle).alpha(g).rgbString()),t.canvasHelpers.drawPoint(s,l,u,d,c))}})}},{}],40:[function(t,e,a){"use strict";e.exports=function(t){function e(t){return void 0!==t._view.width}function a(t){var a,i,n,o,r=t._view;if(e(t)){var s=r.width/2;a=r.x-s,i=r.x+s,n=Math.min(r.y,r.base),o=Math.max(r.y,r.base)}else{var l=r.height/2;a=Math.min(r.x,r.base),i=Math.max(r.x,r.base),n=r.y-l,o=r.y+l}return{left:a,top:n,right:i,bottom:o}}var i=t.defaults.global;i.elements.rectangle={backgroundColor:i.defaultColor,borderWidth:0,borderColor:i.defaultColor,borderSkipped:"bottom"},t.elements.Rectangle=t.Element.extend({draw:function(){function t(t){return v[(x+t)%4]}var e,a,i,n,o,r,s,l=this._chart.ctx,u=this._view,d=u.borderWidth;if(u.horizontal?(e=u.base,a=u.x,i=u.y-u.height/2,n=u.y+u.height/2,o=a>e?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,a=u.x+u.width/2,i=u.y,n=u.base,o=1,r=n>i?1:-1,s=u.borderSkipped||"bottom"),d){var c=Math.min(Math.abs(e-a),Math.abs(i-n));d=d>c?c:d;var h=d/2,f=e+("left"!==s?h*o:0),g=a+("right"!==s?-h*o:0),p=i+("top"!==s?h*r:0),m=n+("bottom"!==s?-h*r:0);f!==g&&(i=p,n=m),p!==m&&(e=f,a=g)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=d;var v=[[e,n],[e,i],[a,i],[a,n]],b=["bottom","left","top","right"],x=b.indexOf(s,0);-1===x&&(x=0);var y=t(0);l.moveTo(y[0],y[1]);for(var k=1;k<4;k++)y=t(k),l.lineTo(y[0],y[1]);l.fill(),d&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=!1;if(this._view){var n=a(this);i=t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom}return i},inLabelRange:function(t,i){var n=this;if(!n._view)return!1;var o=a(n);return e(n)?t>=o.left&&t<=o.right:i>=o.top&&i<=o.bottom},inXRange:function(t){var e=a(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=a(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,a,i=this._view;return e(this)?(t=i.x,a=(i.y+i.base)/2):(t=(i.x+i.base)/2,a=i.y),{x:t,y:a}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})}},{}],41:[function(t,e,a){"use strict";e.exports=function(t){function e(t,e){var a=l.getStyle(t,e),i=a&&a.match(/(\d+)px/);return i?Number(i[1]):void 0}function a(t,a){var i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t._chartjs={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===o||""===o){var r=e(t,"width");void 0!==r&&(t.width=r)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(a.options.aspectRatio||2);else{var s=e(t,"height");void 0!==r&&(t.height=s)}return t}function i(t,e,a,i,n){return{type:t,chart:e,"native":n||null,x:void 0!==a?a:null,y:void 0!==i?i:null}}function n(t,e){var a=u[t.type]||t.type,n=l.getRelativePosition(t,e);return i(a,e,n.x,n.y,t)}
function o(t){var e=document.createElement("iframe");return e.className="chartjs-hidden-iframe",e.style.cssText="display:block;overflow:hidden;border:0;margin:0;top:0;left:0;bottom:0;right:0;height:100%;width:100%;position:absolute;pointer-events:none;z-index:-1;",e.tabIndex=-1,l.addEvent(e,"load",function(){l.addEvent(e.contentWindow||e,"resize",t),t()}),e}function r(t,e,a){var n=t._chartjs={ticking:!1},r=function(){n.ticking||(n.ticking=!0,l.requestAnimFrame.call(window,function(){if(n.resizer)return n.ticking=!1,e(i("resize",a))}))};n.resizer=o(r),t.insertBefore(n.resizer,t.firstChild)}function s(t){if(t&&t._chartjs){var e=t._chartjs.resizer;e&&(e.parentNode.removeChild(e),t._chartjs.resizer=null),delete t._chartjs}}var l=t.helpers,u={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};return{acquireContext:function(t,e){if("string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t instanceof HTMLCanvasElement){var i=t.getContext&&t.getContext("2d");if(i instanceof CanvasRenderingContext2D)return a(t,e),i}return null},releaseContext:function(t){var e=t.canvas;if(e._chartjs){var a=e._chartjs.initial;["height","width"].forEach(function(t){var i=a[t];void 0===i||null===i?e.removeAttribute(t):e.setAttribute(t,i)}),l.each(a.style||{},function(t,a){e.style[a]=t}),e.width=e.width,delete e._chartjs}},addEventListener:function(t,e,a){var i=t.chart.canvas;if("resize"===e)return void r(i.parentNode,a,t.chart);var o=a._chartjs||(a._chartjs={}),s=o.proxies||(o.proxies={}),u=s[t.id+"_"+e]=function(e){a(n(e,t.chart))};l.addEvent(i,e,u)},removeEventListener:function(t,e,a){var i=t.chart.canvas;if("resize"===e)return void s(i.parentNode);var n=a._chartjs||{},o=n.proxies||{},r=o[t.id+"_"+e];r&&l.removeEvent(i,e,r)}}}},{}],42:[function(t,e,a){"use strict";var i=t(41);e.exports=function(t){t.platform={acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},t.helpers.extend(t.platform,i(t))}},{41:41}],43:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers,a={position:"bottom"},i=t.Scale.extend({getLabels:function(){var t=this.chart.data;return(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t=this,a=t.getLabels();t.minIndex=0,t.maxIndex=a.length-1;var i;void 0!==t.options.ticks.min&&(i=e.indexOf(a,t.options.ticks.min),t.minIndex=-1!==i?i:t.minIndex),void 0!==t.options.ticks.max&&(i=e.indexOf(a,t.options.ticks.max),t.maxIndex=-1!==i?i:t.maxIndex),t.min=a[t.minIndex],t.max=a[t.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var a=this,i=a.chart.data,n=a.isHorizontal();return i.yLabels&&!n?a.getRightValue(i.datasets[e].data[t]):a.ticks[t-a.minIndex]},getPixelForValue:function(t,e,a,i){var n=this,o=Math.max(n.maxIndex+1-n.minIndex-(n.options.gridLines.offsetGridLines?0:1),1);if(void 0!==t&&isNaN(e)){var r=n.getLabels(),s=r.indexOf(t);e=-1!==s?s:e}if(n.isHorizontal()){var l=n.width/o,u=l*(e-n.minIndex);return(n.options.gridLines.offsetGridLines&&i||n.maxIndex===n.minIndex&&i)&&(u+=l/2),n.left+Math.round(u)}var d=n.height/o,c=d*(e-n.minIndex);return n.options.gridLines.offsetGridLines&&i&&(c+=d/2),n.top+Math.round(c)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null,e)},getValueForPixel:function(t){var e=this,a=Math.max(e.ticks.length-(e.options.gridLines.offsetGridLines?0:1),1),i=e.isHorizontal(),n=(i?e.width:e.height)/a;return t-=i?e.left:e.top,e.options.gridLines.offsetGridLines&&(t-=n/2),t<=0?0:Math.round(t/n)},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",i,a)}},{}],44:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers,a={position:"left",ticks:{callback:t.Ticks.formatters.linear}},i=t.LinearScaleBase.extend({determineDataLimits:function(){function t(t){return s?t.xAxisID===a.id:t.yAxisID===a.id}var a=this,i=a.options,n=a.chart,o=n.data,r=o.datasets,s=a.isHorizontal();a.min=null,a.max=null;var l=i.stacked;if(void 0===l&&e.each(r,function(e,a){if(!l){var i=n.getDatasetMeta(a);n.isDatasetVisible(a)&&t(i)&&void 0!==i.stack&&(l=!0)}}),i.stacked||l){var u={};e.each(r,function(o,r){var s=n.getDatasetMeta(r),l=[s.type,void 0===i.stacked&&void 0===s.stack?r:"",s.stack].join(".");void 0===u[l]&&(u[l]={positiveValues:[],negativeValues:[]});var d=u[l].positiveValues,c=u[l].negativeValues;n.isDatasetVisible(r)&&t(s)&&e.each(o.data,function(t,e){var n=+a.getRightValue(t);isNaN(n)||s.data[e].hidden||(d[e]=d[e]||0,c[e]=c[e]||0,i.relativePoints?d[e]=100:n<0?c[e]+=n:d[e]+=n)})}),e.each(u,function(t){var i=t.positiveValues.concat(t.negativeValues),n=e.min(i),o=e.max(i);a.min=null===a.min?n:Math.min(a.min,n),a.max=null===a.max?o:Math.max(a.max,o)})}else e.each(r,function(i,o){var r=n.getDatasetMeta(o);n.isDatasetVisible(o)&&t(r)&&e.each(i.data,function(t,e){var i=+a.getRightValue(t);isNaN(i)||r.data[e].hidden||(null===a.min?a.min=i:i<a.min&&(a.min=i),null===a.max?a.max=i:i>a.max&&(a.max=i))})});this.handleTickRangeOptions()},getTickLimit:function(){var a,i=this,n=i.options.ticks;if(i.isHorizontal())a=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(i.width/50));else{var o=e.getValueOrDefault(n.fontSize,t.defaults.global.defaultFontSize);a=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(i.height/(2*o)))}return a},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,a=this,i=a.start,n=+a.getRightValue(t),o=a.end-i;return a.isHorizontal()?(e=a.left+a.width/o*(n-i),Math.round(e)):(e=a.bottom-a.height/o*(n-i),Math.round(e))},getValueForPixel:function(t){var e=this,a=e.isHorizontal(),i=a?e.width:e.height,n=(a?t-e.left:e.bottom-t)/i;return e.start+(e.end-e.start)*n},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",i,a)}},{}],45:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers,a=e.noop;t.LinearScaleBase=t.Scale.extend({handleTickRangeOptions:function(){var t=this,a=t.options,i=a.ticks;if(i.beginAtZero){var n=e.sign(t.min),o=e.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}void 0!==i.min?t.min=i.min:void 0!==i.suggestedMin&&(t.min=Math.min(t.min,i.suggestedMin)),void 0!==i.max?t.max=i.max:void 0!==i.suggestedMax&&(t.max=Math.max(t.max,i.suggestedMax)),t.min===t.max&&(t.max++,i.beginAtZero||t.min--)},getTickLimit:a,handleDirectionalChanges:a,buildTicks:function(){var a=this,i=a.options,n=i.ticks,o=a.getTickLimit();o=Math.max(2,o);var r={maxTicks:o,min:n.min,max:n.max,stepSize:e.getValueOrDefault(n.fixedStepSize,n.stepSize)},s=a.ticks=t.Ticks.generators.linear(r,a);a.handleDirectionalChanges(),a.max=e.max(s),a.min=e.min(s),n.reverse?(s.reverse(),a.start=a.max,a.end=a.min):(a.start=a.min,a.end=a.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{}],46:[function(t,e,a){"use strict";e.exports=function(t){var e=t.helpers,a={position:"left",ticks:{callback:t.Ticks.formatters.logarithmic}},i=t.Scale.extend({determineDataLimits:function(){function t(t){return u?t.xAxisID===a.id:t.yAxisID===a.id}var a=this,i=a.options,n=i.ticks,o=a.chart,r=o.data,s=r.datasets,l=e.getValueOrDefault,u=a.isHorizontal();a.min=null,a.max=null,a.minNotZero=null;var d=i.stacked;if(void 0===d&&e.each(s,function(e,a){if(!d){var i=o.getDatasetMeta(a);o.isDatasetVisible(a)&&t(i)&&void 0!==i.stack&&(d=!0)}}),i.stacked||d){var c={};e.each(s,function(n,r){var s=o.getDatasetMeta(r),l=[s.type,void 0===i.stacked&&void 0===s.stack?r:"",s.stack].join(".");o.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),e.each(n.data,function(t,e){var n=c[l],o=+a.getRightValue(t);isNaN(o)||s.data[e].hidden||(n[e]=n[e]||0,i.relativePoints?n[e]=100:n[e]+=o)}))}),e.each(c,function(t){var i=e.min(t),n=e.max(t);a.min=null===a.min?i:Math.min(a.min,i),a.max=null===a.max?n:Math.max(a.max,n)})}else e.each(s,function(i,n){var r=o.getDatasetMeta(n);o.isDatasetVisible(n)&&t(r)&&e.each(i.data,function(t,e){var i=+a.getRightValue(t);isNaN(i)||r.data[e].hidden||(null===a.min?a.min=i:i<a.min&&(a.min=i),null===a.max?a.max=i:i>a.max&&(a.max=i),0!==i&&(null===a.minNotZero||i<a.minNotZero)&&(a.minNotZero=i))})});a.min=l(n.min,a.min),a.max=l(n.max,a.max),a.min===a.max&&(0!==a.min&&null!==a.min?(a.min=Math.pow(10,Math.floor(e.log10(a.min))-1),a.max=Math.pow(10,Math.floor(e.log10(a.max))+1)):(a.min=1,a.max=10))},buildTicks:function(){var a=this,i=a.options,n=i.ticks,o={min:n.min,max:n.max},r=a.ticks=t.Ticks.generators.logarithmic(o,a);a.isHorizontal()||r.reverse(),a.max=e.max(r),a.min=e.min(r),n.reverse?(r.reverse(),a.start=a.max,a.end=a.min):(a.start=a.min,a.end=a.max)},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),t.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},getPixelForValue:function(t){var a,i,n,o=this,r=o.start,s=+o.getRightValue(t),l=o.options,u=l.ticks;return o.isHorizontal()?(n=e.log10(o.end)-e.log10(r),0===s?i=o.left:(a=o.width,i=o.left+a/n*(e.log10(s)-e.log10(r)))):(a=o.height,0!==r||u.reverse?0===o.end&&u.reverse?(n=e.log10(o.start)-e.log10(o.minNotZero),i=s===o.end?o.top:s===o.minNotZero?o.top+.02*a:o.top+.02*a+.98*a/n*(e.log10(s)-e.log10(o.minNotZero))):(n=e.log10(o.end)-e.log10(r),a=o.height,i=o.bottom-a/n*(e.log10(s)-e.log10(r))):(n=e.log10(o.end)-e.log10(o.minNotZero),i=s===r?o.bottom:s===o.minNotZero?o.bottom-.02*a:o.bottom-.02*a-.98*a/n*(e.log10(s)-e.log10(o.minNotZero)))),i},getValueForPixel:function(t){var a,i,n=this,o=e.log10(n.end)-e.log10(n.start);return n.isHorizontal()?(i=n.width,a=n.start*Math.pow(10,(t-n.left)*o/i)):(i=n.height,a=Math.pow(10,(n.bottom-t)*o/i)/n.start),a}});t.scaleService.registerScaleType("logarithmic",i,a)}},{}],47:[function(t,e,a){"use strict";e.exports=function(t){function e(t){return t.options.lineArc?0:t.chart.data.labels.length}function a(t){var e=t.options.pointLabels,a=f.getValueOrDefault(e.fontSize,g.defaultFontSize),i=f.getValueOrDefault(e.fontStyle,g.defaultFontStyle),n=f.getValueOrDefault(e.fontFamily,g.defaultFontFamily);return{size:a,style:i,family:n,font:f.fontString(a,i,n)}}function i(t,e,a){return f.isArray(a)?{w:f.longestText(t,t.font,a),h:a.length*e+1.5*(a.length-1)*e}:{w:t.measureText(a).width,h:e}}function n(t,e,a,i,n){return t===i||t===n?{start:e-a/2,end:e+a/2}:t<i||t>n?{start:e-a-5,end:e}:{start:e,end:e+a+5}}function o(t){var o,r,s,l=a(t),u=Math.min(t.height/2,t.width/2),d={l:t.width,r:0,t:t.height,b:0},c={};t.ctx.font=l.font,t._pointLabelSizes=[];var h=e(t);for(o=0;o<h;o++){s=t.getPointPosition(o,u),r=i(t.ctx,l.size,t.pointLabels[o]||""),t._pointLabelSizes[o]=r;var g=t.getIndexAngle(o),p=f.toDegrees(g)%360,m=n(p,s.x,r.w,0,180),v=n(p,s.y,r.h,90,270);m.start<d.l&&(d.l=m.start,c.l=g),m.end>d.r&&(d.r=m.end,c.r=g),v.start<d.t&&(d.t=v.start,c.t=g),v.end>d.b&&(d.b=v.end,c.b=g)}t.setReductions(u,d,c)}function r(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}function s(t){return 0===t||180===t?"center":t<180?"left":"right"}function l(t,e,a,i){if(f.isArray(e))for(var n=a.y,o=1.5*i,r=0;r<e.length;++r)t.fillText(e[r],a.x,n),n+=o;else t.fillText(e,a.x,a.y)}function u(t,e,a){90===t||270===t?a.y-=e.h/2:(t>270||t<90)&&(a.y-=e.h)}function d(t){var i=t.ctx,n=f.getValueOrDefault,o=t.options,r=o.angleLines,d=o.pointLabels;i.lineWidth=r.lineWidth,i.strokeStyle=r.color;var c=t.getDistanceFromCenterForValue(o.reverse?t.min:t.max),h=a(t);i.textBaseline="top";for(var p=e(t)-1;p>=0;p--){if(r.display){var m=t.getPointPosition(p,c);i.beginPath(),i.moveTo(t.xCenter,t.yCenter),i.lineTo(m.x,m.y),i.stroke(),i.closePath()}var v=t.getPointPosition(p,c+5),b=n(d.fontColor,g.defaultFontColor);i.font=h.font,i.fillStyle=b;var x=t.getIndexAngle(p),y=f.toDegrees(x);i.textAlign=s(y),u(y,t._pointLabelSizes[p],v),l(i,t.pointLabels[p]||"",v,h.size)}}function c(t,a,i,n){var o=t.ctx;if(o.strokeStyle=f.getValueAtIndexOrDefault(a.color,n-1),o.lineWidth=f.getValueAtIndexOrDefault(a.lineWidth,n-1),t.options.lineArc)o.beginPath(),o.arc(t.xCenter,t.yCenter,i,0,2*Math.PI),o.closePath(),o.stroke();else{var r=e(t);if(0===r)return;o.beginPath();var s=t.getPointPosition(0,i);o.moveTo(s.x,s.y);for(var l=1;l<r;l++)s=t.getPointPosition(l,i),o.lineTo(s.x,s.y);o.closePath(),o.stroke()}}function h(t){return f.isNumber(t)?t:0}var f=t.helpers,g=t.defaults.global,p={display:!0,animate:!0,lineArc:!1,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:t.Ticks.formatters.linear},pointLabels:{fontSize:10,callback:function(t){return t}}},m=t.LinearScaleBase.extend({setDimensions:function(){var t=this,e=t.options,a=e.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var i=f.min([t.height,t.width]),n=f.getValueOrDefault(a.fontSize,g.defaultFontSize);t.drawingArea=e.display?i/2-(n/2+a.backdropPaddingY):i/2},determineDataLimits:function(){var t=this,e=t.chart,a=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;f.each(e.data.datasets,function(n,o){if(e.isDatasetVisible(o)){var r=e.getDatasetMeta(o);f.each(n.data,function(e,n){var o=+t.getRightValue(e);isNaN(o)||r.data[n].hidden||(a=Math.min(o,a),i=Math.max(o,i))})}}),t.min=a===Number.POSITIVE_INFINITY?0:a,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,e=f.getValueOrDefault(t.fontSize,g.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*e)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){this.options.lineArc?r(this):o(this)},setReductions:function(t,e,a){var i=this,n=e.l/Math.sin(a.l),o=Math.max(e.r-i.width,0)/Math.sin(a.r),r=-e.t/Math.cos(a.t),s=-Math.max(e.b-i.height,0)/Math.cos(a.b);n=h(n),o=h(o),r=h(r),s=h(s),i.drawingArea=Math.min(Math.round(t-(n+o)/2),Math.round(t-(r+s)/2)),i.setCenterPoint(n,o,r,s)},setCenterPoint:function(t,e,a,i){var n=this,o=n.width-e-n.drawingArea,r=t+n.drawingArea,s=a+n.drawingArea,l=n.height-i-n.drawingArea;n.xCenter=Math.round((r+o)/2+n.left),n.yCenter=Math.round((s+l)/2+n.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var a=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*a:(t-e.min)*a},getPointPosition:function(t,e){var a=this,i=a.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(i)*e)+a.xCenter,y:Math.round(Math.sin(i)*e)+a.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,a=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&a<0?a:e>0&&a>0?e:0)},draw:function(){var t=this,e=t.options,a=e.gridLines,i=e.ticks,n=f.getValueOrDefault;if(e.display){var o=t.ctx,r=n(i.fontSize,g.defaultFontSize),s=n(i.fontStyle,g.defaultFontStyle),l=n(i.fontFamily,g.defaultFontFamily),u=f.fontString(r,s,l);f.each(t.ticks,function(s,l){if(l>0||e.reverse){var d=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),h=t.yCenter-d;if(a.display&&0!==l&&c(t,a,d,l),i.display){var f=n(i.fontColor,g.defaultFontColor);if(o.font=u,i.showLabelBackdrop){var p=o.measureText(s).width;o.fillStyle=i.backdropColor,o.fillRect(t.xCenter-p/2-i.backdropPaddingX,h-r/2-i.backdropPaddingY,p+2*i.backdropPaddingX,r+2*i.backdropPaddingY)}o.textAlign="center",o.textBaseline="middle",o.fillStyle=f,o.fillText(s,t.xCenter,h)}}}),e.lineArc||d(t)}}});t.scaleService.registerScaleType("radialLinear",m,p)}},{}],48:[function(t,e,a){"use strict";var i=t(1);i="function"==typeof i?i:window.moment,e.exports=function(t){var e=t.helpers,a={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},n={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},o=t.Scale.extend({initialize:function(){if(!i)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");t.Scale.prototype.initialize.call(this)},getLabelMoment:function(t,e){return null===t||null===e?null:"undefined"!=typeof this.labelMoments[t]?this.labelMoments[t][e]:null},getLabelDiff:function(t,e){var a=this;return null===t||null===e?null:(void 0===a.labelDiffs&&a.buildLabelDiffs(),"undefined"!=typeof a.labelDiffs[t]?a.labelDiffs[t][e]:null)},getMomentStartOf:function(t){var e=this;return"week"===e.options.time.unit&&!1!==e.options.time.isoWeekday?t.clone().startOf("isoWeek").isoWeekday(e.options.time.isoWeekday):t.clone().startOf(e.tickUnit)},determineDataLimits:function(){var t=this;t.labelMoments=[];var a=[];t.chart.data.labels&&t.chart.data.labels.length>0?(e.each(t.chart.data.labels,function(e){var i=t.parseTime(e);i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),a.push(i))},t),t.firstTick=i.min.call(t,a),t.lastTick=i.max.call(t,a)):(t.firstTick=null,t.lastTick=null),e.each(t.chart.data.datasets,function(n,o){var r=[],s=t.chart.isDatasetVisible(o);"object"==typeof n.data[0]&&null!==n.data[0]?e.each(n.data,function(e){var a=t.parseTime(t.getRightValue(e));a.isValid()&&(t.options.time.round&&a.startOf(t.options.time.round),r.push(a),s&&(t.firstTick=null!==t.firstTick?i.min(t.firstTick,a):a,t.lastTick=null!==t.lastTick?i.max(t.lastTick,a):a))},t):r=a,t.labelMoments.push(r)},t),t.options.time.min&&(t.firstTick=t.parseTime(t.options.time.min)),t.options.time.max&&(t.lastTick=t.parseTime(t.options.time.max)),t.firstTick=(t.firstTick||i()).clone(),t.lastTick=(t.lastTick||i()).clone()},buildLabelDiffs:function(){var t=this;t.labelDiffs=[];var a=[];t.chart.data.labels&&t.chart.data.labels.length>0&&e.each(t.chart.data.labels,function(e){var i=t.parseTime(e);i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),a.push(i.diff(t.firstTick,t.tickUnit,!0)))},t),e.each(t.chart.data.datasets,function(i){var n=[];"object"==typeof i.data[0]&&null!==i.data[0]?e.each(i.data,function(e){var a=t.parseTime(t.getRightValue(e));a.isValid()&&(t.options.time.round&&a.startOf(t.options.time.round),n.push(a.diff(t.firstTick,t.tickUnit,!0)))},t):n=a,t.labelDiffs.push(n)},t)},buildTicks:function(){var i=this;i.ctx.save();var n=e.getValueOrDefault(i.options.ticks.fontSize,t.defaults.global.defaultFontSize),o=e.getValueOrDefault(i.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),r=e.getValueOrDefault(i.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),s=e.fontString(n,o,r);if(i.ctx.font=s,i.ticks=[],i.unitScale=1,i.scaleSizeInUnits=0,i.options.time.unit)i.tickUnit=i.options.time.unit||"day",i.displayFormat=i.options.time.displayFormats[i.tickUnit],i.scaleSizeInUnits=i.lastTick.diff(i.firstTick,i.tickUnit,!0),i.unitScale=e.getValueOrDefault(i.options.time.unitStepSize,1);else{var l=i.isHorizontal()?i.width:i.height,u=i.tickFormatFunction(i.firstTick,0,[]),d=i.ctx.measureText(u).width;d=d*Math.cos(e.toRadians(i.options.ticks.maxRotation))+n*Math.sin(e.toRadians(i.options.ticks.maxRotation));var c=l/d;i.tickUnit=i.options.time.minUnit,i.scaleSizeInUnits=i.lastTick.diff(i.firstTick,i.tickUnit,!0),i.displayFormat=i.options.time.displayFormats[i.tickUnit];for(var h=0,f=a.units[h];h<a.units.length;){if(i.unitScale=1,e.isArray(f.steps)&&Math.ceil(i.scaleSizeInUnits/c)<e.max(f.steps)){for(var g=0;g<f.steps.length;++g)if(f.steps[g]>=Math.ceil(i.scaleSizeInUnits/c)){i.unitScale=e.getValueOrDefault(i.options.time.unitStepSize,f.steps[g]);break}break}if(!1===f.maxStep||Math.ceil(i.scaleSizeInUnits/c)<f.maxStep){i.unitScale=e.getValueOrDefault(i.options.time.unitStepSize,Math.ceil(i.scaleSizeInUnits/c));break}++h,f=a.units[h],i.tickUnit=f.name;var p=i.firstTick.diff(i.getMomentStartOf(i.firstTick),i.tickUnit,!0),m=i.getMomentStartOf(i.lastTick.clone().add(1,i.tickUnit)).diff(i.lastTick,i.tickUnit,!0);i.scaleSizeInUnits=i.lastTick.diff(i.firstTick,i.tickUnit,!0)+p+m,i.displayFormat=i.options.time.displayFormats[f.name]}}var v;if(i.options.time.min?v=i.getMomentStartOf(i.firstTick):(i.firstTick=i.getMomentStartOf(i.firstTick),v=i.firstTick),!i.options.time.max){var b=i.getMomentStartOf(i.lastTick),x=b.diff(i.lastTick,i.tickUnit,!0);x<0?i.lastTick=i.getMomentStartOf(i.lastTick.add(1,i.tickUnit)):x>=0&&(i.lastTick=b),i.scaleSizeInUnits=i.lastTick.diff(i.firstTick,i.tickUnit,!0)}i.options.time.displayFormat&&(i.displayFormat=i.options.time.displayFormat),i.ticks.push(i.firstTick.clone());for(var y=i.unitScale;y<=i.scaleSizeInUnits;y+=i.unitScale){var k=v.clone().add(y,i.tickUnit);if(i.options.time.max&&k.diff(i.lastTick,i.tickUnit,!0)>=0)break;i.ticks.push(k)}0===i.ticks[i.ticks.length-1].diff(i.lastTick,i.tickUnit)&&0!==i.scaleSizeInUnits||(i.options.time.max?(i.ticks.push(i.lastTick.clone()),i.scaleSizeInUnits=i.lastTick.diff(i.ticks[0],i.tickUnit,!0)):(i.ticks.push(i.lastTick.clone()),i.scaleSizeInUnits=i.lastTick.diff(i.firstTick,i.tickUnit,!0))),i.ctx.restore(),i.labelDiffs=void 0},getLabelForIndex:function(t,e){var a=this,i=a.chart.data.labels&&t<a.chart.data.labels.length?a.chart.data.labels[t]:"",n=a.chart.data.datasets[e].data[t];return null!==n&&"object"==typeof n&&(i=a.getRightValue(n)),a.options.time.tooltipFormat&&(i=a.parseTime(i).format(a.options.time.tooltipFormat)),i},tickFormatFunction:function(t,a,i){var n=t.format(this.displayFormat),o=this.options.ticks,r=e.getValueOrDefault(o.callback,o.userCallback);return r?r(n,a,i):n},convertTicksToLabels:function(){var t=this;t.tickMoments=t.ticks,t.ticks=t.ticks.map(t.tickFormatFunction,t)},getPixelForValue:function(t,e,a){var i=this,n=null;if(void 0!==e&&void 0!==a&&(n=i.getLabelDiff(a,e)),null===n&&(t&&t.isValid||(t=i.parseTime(i.getRightValue(t))),t&&t.isValid&&t.isValid()&&(n=t.diff(i.firstTick,i.tickUnit,!0))),null!==n){var o=0!==n?n/i.scaleSizeInUnits:n;if(i.isHorizontal()){var r=i.width*o;return i.left+Math.round(r)}var s=i.height*o;return i.top+Math.round(s)}},getPixelForTick:function(t){return this.getPixelForValue(this.tickMoments[t],null,null)},getValueForPixel:function(t){var e=this,a=e.isHorizontal()?e.width:e.height,n=(t-(e.isHorizontal()?e.left:e.top))/a;return n*=e.scaleSizeInUnits,e.firstTick.clone().add(i.duration(n,e.tickUnit).asSeconds(),"seconds")},parseTime:function(t){var e=this;return"string"==typeof e.options.time.parser?i(t,e.options.time.parser):"function"==typeof e.options.time.parser?e.options.time.parser(t):"function"==typeof t.getMonth||"number"==typeof t?i(t):t.isValid&&t.isValid()?t:"string"!=typeof e.options.time.format&&e.options.time.format.call?(console.warn("options.time.format is deprecated and replaced by options.time.parser. See http://nnnick.github.io/Chart.js/docs-v2/#scales-time-scale"),e.options.time.format(t)):i(t,e.options.time.format)}});t.scaleService.registerScaleType("time",o,n)}},{1:1}]},{},[7])(7)});
!function(t,e,i){!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):jQuery&&!jQuery.fn.sparkline&&t(jQuery)}(function(s){"use strict";var n,r,a,h,o,l,g,p,u,c,d,f,v,m,x,y,C,w,b,R,S,k,M,_,H,W,I,T,q,j,P,L={},A=0;n=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!1,disableInteraction:!1},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:i,normalRangeMax:i,normalRangeColor:"#ccc",drawNormalOnTop:!1,chartRangeMin:i,chartRangeMax:i,chartRangeMinX:i,chartRangeMaxX:i,tooltipFormat:new a('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:i,nullColor:i,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:i,chartRangeMin:i,chartRangeClip:!1,colorMap:i,tooltipFormat:new a('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new a('<span style="color: {{color}}">&#9679;</span> {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss",0:"Draw",1:"Win"}}},discrete:{lineHeight:"auto",thresholdColor:i,thresholdValue:0,chartRangeMax:i,chartRangeMin:i,chartRangeClip:!1,tooltipFormat:new a("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:i,tooltipFormat:new a("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new a('<span style="color: {{color}}">&#9679;</span> {{value}} ({{percent.1}}%)')},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:i,targetColor:"#4a2",chartRangeMax:i,chartRangeMin:i,tooltipFormat:new a("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}},H='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',r=function(){var t,e;return t=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(t.prototype=s.extend(new arguments[0],arguments[arguments.length-1]),t._super=arguments[0].prototype):t.prototype=arguments[arguments.length-1],arguments.length>2&&(e=Array.prototype.slice.call(arguments,1,-1),e.unshift(t.prototype),s.extend.apply(s,e))):t.prototype=arguments[0],t.prototype.cls=t,t},s.SPFormatClass=a=r({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(t,e){this.format=t,this.fclass=e},render:function(t,e,s){var n,r,a,h,o,l=this,g=t;return this.format.replace(this.fre,function(){var t;return r=arguments[1],a=arguments[3],n=l.precre.exec(r),n?(o=n[2],r=n[1]):o=!1,h=g[r],h===i?"":a&&e&&e[a]?(t=e[a],t.get?e[a].get(h)||h:e[a][h]||h):(u(h)&&(h=s.get("numberFormatter")?s.get("numberFormatter")(h):v(h,o,s.get("numberDigitGroupCount"),s.get("numberDigitGroupSep"),s.get("numberDecimalMark"))),h)})}}),s.spformat=function(t,e){return new a(t,e)},h=function(t,e,i){return t<e?e:t>i?i:t},o=function(t,i){var s;return 2===i?(s=e.floor(t.length/2),t.length%2?t[s]:(t[s-1]+t[s])/2):t.length%2?(s=(t.length*i+i)/4,s%1?(t[e.floor(s)]+t[e.floor(s)-1])/2:t[s-1]):(s=(t.length*i+2)/4,s%1?(t[e.floor(s)]+t[e.floor(s)-1])/2:t[s-1])},l=function(t){var e;switch(t){case"undefined":t=i;break;case"null":t=null;break;case"true":t=!0;break;case"false":t=!1;break;default:e=parseFloat(t),t==e&&(t=e)}return t},g=function(t){var e,i=[];for(e=t.length;e--;)i[e]=l(t[e]);return i},p=function(t,e){var i,s,n=[];for(i=0,s=t.length;i<s;i++)t[i]!==e&&n.push(t[i]);return n},u=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},v=function(t,e,i,n,r){var a,h;for(t=(!1===e?parseFloat(t).toString():t.toFixed(e)).split(""),(a=(a=s.inArray(".",t))<0?t.length:a)<t.length&&(t[a]=r),h=a-i;h>0;h-=i)t.splice(h,0,n);return t.join("")},c=function(t,e,i){var s;for(s=e.length;s--;)if((!i||null!==e[s])&&e[s]!==t)return!1;return!0},function(t){var e,i=0;for(e=t.length;e--;)i+="number"==typeof t[e]?t[e]:0;return i},f=function(t){return s.isArray(t)?t:[t]},d=function(e){var i;t.createStyleSheet?t.createStyleSheet().cssText=e:(i=t.createElement("style"),i.type="text/css",t.getElementsByTagName("head")[0].appendChild(i),i["string"==typeof t.body.style.WebkitAppearance?"innerText":"innerHTML"]=e)},s.fn.simpledraw=function(e,n,r,a){var h,o;if(r&&(h=this.data("_jqs_vcanvas")))return h;if(!1===s.fn.sparkline.canvas)return!1;if(s.fn.sparkline.canvas===i){var l=t.createElement("canvas");if(l.getContext&&l.getContext("2d"))s.fn.sparkline.canvas=function(t,e,i,s){return new q(t,e,i,s)};else{if(!t.namespaces||t.namespaces.v)return s.fn.sparkline.canvas=!1,!1;t.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),s.fn.sparkline.canvas=function(t,e,i,s){return new j(t,e,i)}}}return e===i&&(e=s(this).innerWidth()),n===i&&(n=s(this).innerHeight()),h=s.fn.sparkline.canvas(e,n,this,a),o=s(this).data("_jqs_mhandler"),o&&o.registerCanvas(h),h},s.fn.cleardraw=function(){var t=this.data("_jqs_vcanvas");t&&t.reset()},s.RangeMapClass=m=r({init:function(t){var e,i,s=[];for(e in t)t.hasOwnProperty(e)&&"string"==typeof e&&e.indexOf(":")>-1&&(i=e.split(":"),i[0]=0===i[0].length?-Infinity:parseFloat(i[0]),i[1]=0===i[1].length?Infinity:parseFloat(i[1]),i[2]=t[e],s.push(i));this.map=t,this.rangelist=s||!1},get:function(t){var e,s,n,r=this.rangelist;if((n=this.map[t])!==i)return n;if(r)for(e=r.length;e--;)if(s=r[e],s[0]<=t&&s[1]>=t)return s[2];return i}}),s.range_map=function(t){return new m(t)},x=r({init:function(t,e){var i=s(t);this.$el=i,this.options=e,this.currentPageX=0,this.currentPageY=0,this.el=t,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!e.get("disableTooltips"),this.highlightEnabled=!e.get("disableHighlight")},registerSparkline:function(t){this.splist.push(t),this.over&&this.updateDisplay()},registerCanvas:function(t){var e=s(t.canvas);this.canvas=t,this.$canvas=e,e.mouseenter(s.proxy(this.mouseenter,this)),e.mouseleave(s.proxy(this.mouseleave,this)),e.click(s.proxy(this.mouseclick,this))},reset:function(t){this.splist=[],this.tooltip&&t&&(this.tooltip.remove(),this.tooltip=i)},mouseclick:function(t){var e=s.Event("sparklineClick");e.originalEvent=t,e.sparklines=this.splist,this.$el.trigger(e)},mouseenter:function(e){s(t.body).unbind("mousemove.jqs"),s(t.body).bind("mousemove.jqs",s.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=e.pageX,this.currentPageY=e.pageY,this.currentEl=e.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new y(this.options),this.tooltip.updatePosition(e.pageX,e.pageY)),this.updateDisplay()},mouseleave:function(){s(t.body).unbind("mousemove.jqs");var e,i,n=this.splist,r=n.length,a=!1;for(this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null),i=0;i<r;i++)e=n[i],e.clearRegionHighlight()&&(a=!0);a&&this.canvas.render()},mousemove:function(t){this.currentPageX=t.pageX,this.currentPageY=t.pageY,this.currentEl=t.target,this.tooltip&&this.tooltip.updatePosition(t.pageX,t.pageY),this.updateDisplay()},updateDisplay:function(){var t,e,i,n,r,a=this.splist,h=a.length,o=!1,l=this.$canvas.offset(),g=this.currentPageX-l.left,p=this.currentPageY-l.top;if(this.over){for(i=0;i<h;i++)e=a[i],(n=e.setRegionHighlight(this.currentEl,g,p))&&(o=!0);if(o){if(r=s.Event("sparklineRegionChange"),r.sparklines=this.splist,this.$el.trigger(r),this.tooltip){for(t="",i=0;i<h;i++)e=a[i],t+=e.getCurrentRegionTooltip();this.tooltip.setContent(t)}this.disableHighlight||this.canvas.render()}null===n&&this.mouseleave()}}}),y=r({sizeStyle:"position: static !important;display: block !important;visibility: hidden !important;float: left !important;",init:function(e){var i,n=e.get("tooltipClassname","jqstooltip"),r=this.sizeStyle;this.container=e.get("tooltipContainer")||t.body,this.tooltipOffsetX=e.get("tooltipOffsetX",10),this.tooltipOffsetY=e.get("tooltipOffsetY",12),s("#jqssizetip").remove(),s("#jqstooltip").remove(),this.sizetip=s("<div/>",{id:"jqssizetip",style:r,"class":n}),this.tooltip=s("<div/>",{id:"jqstooltip","class":n}).appendTo(this.container),i=this.tooltip.offset(),this.offsetLeft=i.left,this.offsetTop=i.top,this.hidden=!0,s(window).unbind("resize.jqs scroll.jqs"),s(window).bind("resize.jqs scroll.jqs",s.proxy(this.updateWindowDims,this)),this.updateWindowDims()},updateWindowDims:function(){this.scrollTop=s(window).scrollTop(),this.scrollLeft=s(window).scrollLeft(),this.scrollRight=this.scrollLeft+s(window).width(),this.updatePosition()},getSize:function(t){this.sizetip.html(t).appendTo(this.container),this.width=this.sizetip.width()+1,this.height=this.sizetip.height(),this.sizetip.remove()},setContent:function(t){if(!t)return this.tooltip.css("visibility","hidden"),void(this.hidden=!0);this.getSize(t),this.tooltip.html(t).css({width:this.width,height:this.height,visibility:"visible"}),this.hidden&&(this.hidden=!1,this.updatePosition())},updatePosition:function(t,e){if(t===i){if(this.mousex===i)return;t=this.mousex-this.offsetLeft,e=this.mousey-this.offsetTop}else this.mousex=t-=this.offsetLeft,this.mousey=e-=this.offsetTop;this.height&&this.width&&!this.hidden&&(e-=this.height+this.tooltipOffsetY,t+=this.tooltipOffsetX,e<this.scrollTop&&(e=this.scrollTop),t<this.scrollLeft?t=this.scrollLeft:t+this.width>this.scrollRight&&(t=this.scrollRight-this.width),this.tooltip.css({left:t,top:e}))},remove:function(){this.tooltip.remove(),this.sizetip.remove(),this.sizetip=this.tooltip=i,s(window).unbind("resize.jqs scroll.jqs")}}),W=function(){d(H)},s(W),P=[],s.fn.sparkline=function(e,n){return this.each(function(){var r,a,h=new s.fn.sparkline.options(this,n),o=s(this);if(r=function(){var n,r,a,l,g,p,u;if("html"===e||e===i?(u=this.getAttribute(h.get("tagValuesAttribute")),u!==i&&null!==u||(u=o.html()),n=u.replace(/(^\s*<!--)|(-->\s*$)|\s+/g,"").split(",")):n=e,r="auto"===h.get("width")?n.length*h.get("defaultPixelsPerValue"):h.get("width"),"auto"===h.get("height")?h.get("composite")&&s.data(this,"_jqs_vcanvas")||(l=t.createElement("span"),l.innerHTML="a",o.html(l),a=s(l).innerHeight()||s(l).height(),s(l).remove(),l=null):a=h.get("height"),h.get("disableInteraction")?g=!1:(g=s.data(this,"_jqs_mhandler"),g?h.get("composite")||g.reset():(g=new x(this,h),s.data(this,"_jqs_mhandler",g))),h.get("composite")&&!s.data(this,"_jqs_vcanvas"))return void(s.data(this,"_jqs_errnotify")||(alert("Attempted to attach a composite sparkline to an element with no existing sparkline"),s.data(this,"_jqs_errnotify",!0)));p=new(s.fn.sparkline[h.get("type")])(this,n,h,r,a),p.render(),g&&g.registerSparkline(p)},s(this).html()&&!h.get("disableHiddenCheck")&&s(this).is(":hidden")||!s(this).parents("body").length){if(!h.get("composite")&&s.data(this,"_jqs_pending"))for(a=P.length;a;a--)P[a-1][0]==this&&P.splice(a-1,1);P.push([this,r]),s.data(this,"_jqs_pending",!0)}else r.call(this)})},s.fn.sparkline.defaults=n(),s.sparkline_display_visible=function(){var t,e,i,n=[];for(e=0,i=P.length;e<i;e++)t=P[e][0],s(t).is(":visible")&&!s(t).parents().is(":hidden")?(P[e][1].call(t),s.data(P[e][0],"_jqs_pending",!1),n.push(e)):!s(t).closest("html").length&&!s.data(t,"_jqs_pending")&&(s.data(P[e][0],"_jqs_pending",!1),n.push(e));for(e=n.length;e;e--)P.splice(n[e-1],1)},s.fn.sparkline.options=r({init:function(t,e){var i,n,r,a;this.userOptions=e=e||{},this.tag=t,this.tagValCache={},n=s.fn.sparkline.defaults,r=n.common,this.tagOptionsPrefix=e.enableTagOptions&&(e.tagOptionsPrefix||r.tagOptionsPrefix),a=this.getTagSetting("type"),i=a===L?n[e.type||r.type]:n[a],this.mergedOptions=s.extend({},r,i,e)},getTagSetting:function(t){var e,s,n,r,a=this.tagOptionsPrefix;if(!1===a||a===i)return L;if(this.tagValCache.hasOwnProperty(t))e=this.tagValCache.key;else{if((e=this.tag.getAttribute(a+t))===i||null===e)e=L;else if("["===e.substr(0,1))for(e=e.substr(1,e.length-2).split(","),s=e.length;s--;)e[s]=l(e[s].replace(/(^\s*)|(\s*$)/g,""));else if("{"===e.substr(0,1))for(n=e.substr(1,e.length-2).split(","),e={},s=n.length;s--;)r=n[s].split(":",2),e[r[0].replace(/(^\s*)|(\s*$)/g,"")]=l(r[1].replace(/(^\s*)|(\s*$)/g,""));else e=l(e);this.tagValCache.key=e}return e},get:function(t,e){var s,n=this.getTagSetting(t);return n!==L?n:(s=this.mergedOptions[t])===i?e:s}}),s.fn.sparkline._base=r({disabled:!1,init:function(t,e,n,r,a){this.el=t,this.$el=s(t),this.values=e,this.options=n,this.width=r,this.height=a,this.currentRegion=i},initTarget:function(){var t=!this.options.get("disableInteraction");(this.target=this.$el.simpledraw(this.width,this.height,this.options.get("composite"),t))?(this.canvasWidth=this.target.pixelWidth,this.canvasHeight=this.target.pixelHeight):this.disabled=!0},render:function(){return!this.disabled||(this.el.innerHTML="",!1)},getRegion:function(t,e){},setRegionHighlight:function(t,e,s){var n,r=this.currentRegion,a=!this.options.get("disableHighlight");return e>this.canvasWidth||s>this.canvasHeight||e<0||s<0?null:(n=this.getRegion(t,e,s),r!==n&&(r!==i&&a&&this.removeHighlight(),this.currentRegion=n,n!==i&&a&&this.renderHighlight(),!0))},clearRegionHighlight:function(){return this.currentRegion!==i&&(this.removeHighlight(),this.currentRegion=i,!0)},renderHighlight:function(){this.changeHighlight(!0)},removeHighlight:function(){this.changeHighlight(!1)},changeHighlight:function(t){},getCurrentRegionTooltip:function(){var t,e,n,r,h,o,l,g,p,u,c,d,f,v,m=this.options,x="",y=[];if(this.currentRegion===i)return"";if(t=this.getCurrentRegionFields(),c=m.get("tooltipFormatter"))return c(this,m,t);if(m.get("tooltipChartTitle")&&(x+='<div class="jqs jqstitle">'+m.get("tooltipChartTitle")+"</div>\n"),!(e=this.options.get("tooltipFormat")))return"";if(s.isArray(e)||(e=[e]),s.isArray(t)||(t=[t]),l=this.options.get("tooltipFormatFieldlist"),g=this.options.get("tooltipFormatFieldlistKey"),l&&g){for(p=[],o=t.length;o--;)u=t[o][g],-1!=(v=s.inArray(u,l))&&(p[v]=t[o]);t=p}for(n=e.length,f=t.length,o=0;o<n;o++)for(d=e[o],"string"==typeof d&&(d=new a(d)),r=d.fclass||"jqsfield",v=0;v<f;v++)t[v].isNull&&m.get("tooltipSkipNull")||(s.extend(t[v],{prefix:m.get("tooltipPrefix"),suffix:m.get("tooltipSuffix")}),h=d.render(t[v],m.get("tooltipValueLookups"),m),y.push('<div class="'+r+'">'+h+"</div>"));return y.length?x+y.join("\n"):""},getCurrentRegionFields:function(){},calcHighlightColor:function(t,i){var s,n,r,a,o=i.get("highlightColor"),l=i.get("highlightLighten");if(o)return o;if(l&&(s=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(t)||/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t))){for(r=[],n=4===t.length?16:1,a=0;a<3;a++)r[a]=h(e.round(parseInt(s[a+1],16)*n*l),0,255);return"rgb("+r.join(",")+")"}return t}}),C={changeHighlight:function(t){var e,i=this.currentRegion,n=this.target,r=this.regionShapes[i];r&&(e=this.renderRegion(i,t),s.isArray(e)||s.isArray(r)?(n.replaceWithShapes(r,e),this.regionShapes[i]=s.map(e,function(t){return t.id})):(n.replaceWithShape(r,e),this.regionShapes[i]=e.id))},render:function(){var t,e,i,n,r=this.values,a=this.target,h=this.regionShapes;if(this.cls._super.render.call(this)){for(i=r.length;i--;)if(t=this.renderRegion(i))if(s.isArray(t)){for(e=[],n=t.length;n--;)t[n].append(),e.push(t[n].id);h[i]=e}else t.append(),h[i]=t.id;else h[i]=null;a.render()}}},s.fn.sparkline.line=w=r(s.fn.sparkline._base,{type:"line",init:function(t,e,i,s,n){w._super.init.call(this,t,e,i,s,n),this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.initTarget()},getRegion:function(t,e,s){var n,r=this.regionMap;for(n=r.length;n--;)if(null!==r[n]&&e>=r[n][0]&&e<=r[n][1])return r[n][2];return i},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:null===this.yvalues[t],x:this.xvalues[t],y:this.yvalues[t],color:this.options.get("lineColor"),fillColor:this.options.get("fillColor"),offset:t}},renderHighlight:function(){var t,e,s=this.currentRegion,n=this.target,r=this.vertices[s],a=this.options,h=a.get("spotRadius"),o=a.get("highlightSpotColor"),l=a.get("highlightLineColor");r&&(h&&o&&(t=n.drawCircle(r[0],r[1],h,i,o),this.highlightSpotId=t.id,n.insertAfterShape(this.lastShapeId,t)),l&&(e=n.drawLine(this.canvasTop,r[1],this.canvasWidth,r[1],l),this.highlightLineId=e.id,n.insertAfterShape(this.lastShapeId,e)))},removeHighlight:function(){var t=this.target;this.highlightSpotId&&(t.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(t.removeShapeId(this.highlightLineId),this.highlightLineId=null)},scanValues:function(){var t,i,s,n,r,a=this.values,h=a.length,o=this.xvalues,l=this.yvalues,g=this.yminmax;for(t=0;t<h;t++)i=a[t],s="string"==typeof a[t],n="object"==typeof a[t]&&a[t]instanceof Array,r=s&&a[t].split(":"),s&&2===r.length?(o.push(Number(r[0])),l.push(Number(r[1])),g.push(Number(r[1]))):n?(o.push(i[0]),l.push(i[1]),g.push(i[1])):(o.push(t),null===a[t]||"null"===a[t]?l.push(null):(l.push(Number(i)),g.push(Number(i))));this.options.get("xvalues")&&(o=this.options.get("xvalues")),this.maxy=this.maxyorg=e.max.apply(e,g),this.miny=this.minyorg=e.min.apply(e,g),this.maxx=e.max.apply(e,o),this.minx=e.min.apply(e,o),this.xvalues=o,this.yvalues=l,this.yminmax=g},processRangeOptions:function(){var t=this.options,e=t.get("normalRangeMin"),s=t.get("normalRangeMax");e!==i&&(e<this.miny&&(this.miny=e),s>this.maxy&&(this.maxy=s)),t.get("chartRangeMin")!==i&&(t.get("chartRangeClip")||t.get("chartRangeMin")<this.miny)&&(this.miny=t.get("chartRangeMin")),t.get("chartRangeMax")!==i&&(t.get("chartRangeClip")||t.get("chartRangeMax")>this.maxy)&&(this.maxy=t.get("chartRangeMax")),t.get("chartRangeMinX")!==i&&(t.get("chartRangeClipX")||t.get("chartRangeMinX")<this.minx)&&(this.minx=t.get("chartRangeMinX")),t.get("chartRangeMaxX")!==i&&(t.get("chartRangeClipX")||t.get("chartRangeMaxX")>this.maxx)&&(this.maxx=t.get("chartRangeMaxX"))},drawNormalRange:function(t,s,n,r,a){var h=this.options.get("normalRangeMin"),o=this.options.get("normalRangeMax"),l=s+e.round(n-n*((o-this.miny)/a)),g=e.round(n*(o-h)/a);this.target.drawRect(t,l,r,g,i,this.options.get("normalRangeColor")).append()},render:function(){var t,n,r,a,h,o,l,g,p,u,c,d,f,v,x,y,C,b,R,S,k,M,_,H,W,I=this.options,T=this.target,q=this.canvasWidth,j=this.canvasHeight,P=this.vertices,L=I.get("spotRadius"),A=this.regionMap;if(w._super.render.call(this)&&(this.scanValues(),this.processRangeOptions(),_=this.xvalues,H=this.yvalues,this.yminmax.length&&!(this.yvalues.length<2))){for(a=h=0,t=this.maxx-this.minx==0?1:this.maxx-this.minx,n=this.maxy-this.miny==0?1:this.maxy-this.miny,r=this.yvalues.length-1,L&&(q<4*L||j<4*L)&&(L=0),L&&(k=I.get("highlightSpotColor")&&!I.get("disableInteraction"),(k||I.get("minSpotColor")||I.get("spotColor")&&H[r]===this.miny)&&(j-=e.ceil(L)),(k||I.get("maxSpotColor")||I.get("spotColor")&&H[r]===this.maxy)&&(j-=e.ceil(L),a+=e.ceil(L)),(k||(I.get("minSpotColor")||I.get("maxSpotColor"))&&(H[0]===this.miny||H[0]===this.maxy))&&(h+=e.ceil(L),q-=e.ceil(L)),(k||I.get("spotColor")||I.get("minSpotColor")||I.get("maxSpotColor")&&(H[r]===this.miny||H[r]===this.maxy))&&(q-=e.ceil(L))),j--,I.get("normalRangeMin")!==i&&!I.get("drawNormalOnTop")&&this.drawNormalRange(h,a,j,q,n),l=[],g=[l],v=x=null,y=H.length,W=0;W<y;W++)p=_[W],c=_[W+1],u=H[W],d=h+e.round((p-this.minx)*(q/t)),f=W<y-1?h+e.round((c-this.minx)*(q/t)):q,x=d+(f-d)/2,A[W]=[v||0,x,W],v=x,null===u?W&&(null!==H[W-1]&&(l=[],g.push(l)),P.push(null)):(u<this.miny&&(u=this.miny),u>this.maxy&&(u=this.maxy),l.length||l.push([d,a+j]),o=[d,a+e.round(j-j*((u-this.miny)/n))],l.push(o),P.push(o));for(C=[],b=[],R=g.length,W=0;W<R;W++)l=g[W],l.length&&(I.get("fillColor")&&(l.push([l[l.length-1][0],a+j]),b.push(l.slice(0)),l.pop()),l.length>2&&(l[0]=[l[0][0],l[1][1]]),C.push(l));for(R=b.length,W=0;W<R;W++)T.drawShape(b[W],I.get("fillColor"),I.get("fillColor")).append();for(I.get("normalRangeMin")!==i&&I.get("drawNormalOnTop")&&this.drawNormalRange(h,a,j,q,n),R=C.length,W=0;W<R;W++)T.drawShape(C[W],I.get("lineColor"),i,I.get("lineWidth")).append();if(L&&I.get("valueSpots"))for(S=I.get("valueSpots"),S.get===i&&(S=new m(S)),W=0;W<y;W++)(M=S.get(H[W]))&&T.drawCircle(h+e.round((_[W]-this.minx)*(q/t)),a+e.round(j-j*((H[W]-this.miny)/n)),L,i,M).append();L&&I.get("spotColor")&&null!==H[r]&&T.drawCircle(h+e.round((_[_.length-1]-this.minx)*(q/t)),a+e.round(j-j*((H[r]-this.miny)/n)),L,i,I.get("spotColor")).append(),this.maxy!==this.minyorg&&(L&&I.get("minSpotColor")&&(p=_[s.inArray(this.minyorg,H)],T.drawCircle(h+e.round((p-this.minx)*(q/t)),a+e.round(j-j*((this.minyorg-this.miny)/n)),L,i,I.get("minSpotColor")).append()),L&&I.get("maxSpotColor")&&(p=_[s.inArray(this.maxyorg,H)],T.drawCircle(h+e.round((p-this.minx)*(q/t)),a+e.round(j-j*((this.maxyorg-this.miny)/n)),L,i,I.get("maxSpotColor")).append())),this.lastShapeId=T.getLastShapeId(),this.canvasTop=a,T.render()}}}),s.fn.sparkline.bar=b=r(s.fn.sparkline._base,C,{type:"bar",init:function(t,n,r,a,o){var u,c,d,f,v,x,y,C,w,R,S,k,M,_,H,W,I,T,q,j,P,L,A=parseInt(r.get("barWidth"),10),F=parseInt(r.get("barSpacing"),10),B=r.get("chartRangeMin"),O=r.get("chartRangeMax"),V=r.get("chartRangeClip"),X=Infinity,z=-Infinity;for(b._super.init.call(this,t,n,r,a,o),x=0,y=n.length;x<y;x++)j=n[x],u="string"==typeof j&&j.indexOf(":")>-1,(u||s.isArray(j))&&(H=!0,u&&(j=n[x]=g(j.split(":"))),j=p(j,null),c=e.min.apply(e,j),d=e.max.apply(e,j),c<X&&(X=c),d>z&&(z=d));this.stacked=H,this.regionShapes={},this.barWidth=A,this.barSpacing=F,this.totalBarWidth=A+F,this.width=a=n.length*A+(n.length-1)*F,this.initTarget(),V&&(M=B===i?-Infinity:B,_=O===i?Infinity:O),v=[],f=H?[]:v;var N=[],E=[];for(x=0,y=n.length;x<y;x++)if(H)for(W=n[x],n[x]=q=[],N[x]=0,f[x]=E[x]=0,I=0,T=W.length;I<T;I++)null!==(j=q[I]=V?h(W[I],M,_):W[I])&&(j>0&&(N[x]+=j),X<0&&z>0?j<0?E[x]+=e.abs(j):f[x]+=j:f[x]+=e.abs(j-(j<0?z:X)),v.push(j));else j=V?h(n[x],M,_):n[x],null!==(j=n[x]=l(j))&&v.push(j);this.max=k=e.max.apply(e,v),this.min=S=e.min.apply(e,v),this.stackMax=z=H?e.max.apply(e,N):k,this.stackMin=X=H?e.min.apply(e,v):S,r.get("chartRangeMin")!==i&&(r.get("chartRangeClip")||r.get("chartRangeMin")<S)&&(S=r.get("chartRangeMin")),r.get("chartRangeMax")!==i&&(r.get("chartRangeClip")||r.get("chartRangeMax")>k)&&(k=r.get("chartRangeMax")),this.zeroAxis=w=r.get("zeroAxis",!0),R=S<=0&&k>=0&&w?0:0==w?S:S>0?S:k,this.xaxisOffset=R,C=H?e.max.apply(e,f)+e.max.apply(e,E):k-S,this.canvasHeightEf=w&&S<0?this.canvasHeight-2:this.canvasHeight-1,S<R?(L=H&&k>=0?z:k,(P=(L-R)/C*this.canvasHeight)!==e.ceil(P)&&(this.canvasHeightEf-=2,P=e.ceil(P))):P=this.canvasHeight,this.yoffset=P,s.isArray(r.get("colorMap"))?(this.colorMapByIndex=r.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=r.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===i&&(this.colorMapByValue=new m(this.colorMapByValue))),this.range=C},getRegion:function(t,s,n){var r=e.floor(s/this.totalBarWidth);return r<0||r>=this.values.length?i:r},getCurrentRegionFields:function(){var t,e,i=this.currentRegion,s=f(this.values[i]),n=[];for(e=s.length;e--;)t=s[e],n.push({isNull:null===t,value:t,color:this.calcColor(e,t,i),offset:i});return n},calcColor:function(t,e,n){var r,a,h=this.colorMapByIndex,o=this.colorMapByValue,l=this.options;return r=this.stacked?l.get("stackedBarColor"):e<0?l.get("negBarColor"):l.get("barColor"),0===e&&l.get("zeroColor")!==i&&(r=l.get("zeroColor")),o&&(a=o.get(e))?r=a:h&&h.length>n&&(r=h[n]),s.isArray(r)?r[t%r.length]:r},renderRegion:function(t,n){var r,a,h,o,l,g,p,u,d,f,v=this.values[t],m=this.options,x=this.xaxisOffset,y=[],C=this.range,w=this.stacked,b=this.target,R=t*this.totalBarWidth,S=this.canvasHeightEf,k=this.yoffset;if(v=s.isArray(v)?v:[v],p=v.length,u=v[0],o=c(null,v),f=c(x,v,!0),o)return m.get("nullColor")?(h=n?m.get("nullColor"):this.calcHighlightColor(m.get("nullColor"),m),r=k>0?k-1:k,b.drawRect(R,r,this.barWidth-1,0,h,h)):i;for(l=k,g=0;g<p;g++){if(u=v[g],w&&u===x){if(!f||d)continue;d=!0}a=C>0?e.floor(S*(e.abs(u-x)/C))+1:1,u<x||u===x&&0===k?(r=l,l+=a):(r=k-a,k-=a),h=this.calcColor(g,u,t),n&&(h=this.calcHighlightColor(h,m)),y.push(b.drawRect(R,r,this.barWidth-1,a-1,h,h))}return 1===y.length?y[0]:y}}),s.fn.sparkline.tristate=R=r(s.fn.sparkline._base,C,{type:"tristate",init:function(t,e,n,r,a){var h=parseInt(n.get("barWidth"),10),o=parseInt(n.get("barSpacing"),10);R._super.init.call(this,t,e,n,r,a),this.regionShapes={},this.barWidth=h,this.barSpacing=o,this.totalBarWidth=h+o,this.values=s.map(e,Number),this.width=r=e.length*h+(e.length-1)*o,s.isArray(n.get("colorMap"))?(this.colorMapByIndex=n.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=n.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===i&&(this.colorMapByValue=new m(this.colorMapByValue))),this.initTarget()},getRegion:function(t,i,s){return e.floor(i/this.totalBarWidth)},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:this.values[t]===i,value:this.values[t],color:this.calcColor(this.values[t],t),offset:t}},calcColor:function(t,e){var i,s=this.values,n=this.options,r=this.colorMapByIndex,a=this.colorMapByValue;return a&&(i=a.get(t))?i:r&&r.length>e?r[e]:s[e]<0?n.get("negBarColor"):s[e]>0?n.get("posBarColor"):n.get("zeroBarColor")},renderRegion:function(t,i){var s,n,r,a,h,o,l=this.values,g=this.options,p=this.target;if(s=p.pixelHeight,r=e.round(s/2),a=t*this.totalBarWidth,l[t]<0?(h=r,n=r-1):l[t]>0?(h=0,n=r-1):(h=r-1,n=2),o=this.calcColor(l[t],t),null!==o)return i&&(o=this.calcHighlightColor(o,g)),p.drawRect(a,h,this.barWidth-1,n-1,o,o)}}),s.fn.sparkline.discrete=S=r(s.fn.sparkline._base,C,{type:"discrete",init:function(t,n,r,a,h){S._super.init.call(this,t,n,r,a,h),this.regionShapes={},this.values=n=s.map(n,Number),this.min=e.min.apply(e,n),this.max=e.max.apply(e,n),this.range=this.max-this.min,this.width=a="auto"===r.get("width")?2*n.length:this.width,this.interval=e.floor(a/n.length),this.itemWidth=a/n.length,r.get("chartRangeMin")!==i&&(r.get("chartRangeClip")||r.get("chartRangeMin")<this.min)&&(this.min=r.get("chartRangeMin")),r.get("chartRangeMax")!==i&&(r.get("chartRangeClip")||r.get("chartRangeMax")>this.max)&&(this.max=r.get("chartRangeMax")),this.initTarget(),this.target&&(this.lineHeight="auto"===r.get("lineHeight")?e.round(.3*this.canvasHeight):r.get("lineHeight"))},getRegion:function(t,i,s){return e.floor(i/this.itemWidth)},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:this.values[t]===i,value:this.values[t],offset:t}},renderRegion:function(t,i){var s,n,r,a,o=this.values,l=this.options,g=this.min,p=this.max,u=this.range,c=this.interval,d=this.target,f=this.canvasHeight,v=this.lineHeight,m=f-v;return n=h(o[t],g,p),a=t*c,s=e.round(m-m*((n-g)/u)),r=l.get("thresholdColor")&&n<l.get("thresholdValue")?l.get("thresholdColor"):l.get("lineColor"),i&&(r=this.calcHighlightColor(r,l)),d.drawLine(a,s,a,s+v,r)}}),s.fn.sparkline.bullet=k=r(s.fn.sparkline._base,{type:"bullet",init:function(t,s,n,r,a){var h,o,l;k._super.init.call(this,t,s,n,r,a),this.values=s=g(s),l=s.slice(),l[0]=null===l[0]?l[2]:l[0],l[1]=null===s[1]?l[2]:l[1],h=e.min.apply(e,s),o=e.max.apply(e,s),h=n.get("base")===i?h<0?h:0:n.get("base"),this.min=h,this.max=o,this.range=o-h,this.shapes={},this.valueShapes={},this.regiondata={},this.width=r="auto"===n.get("width")?"4.0em":r,this.target=this.$el.simpledraw(r,a,n.get("composite")),s.length||(this.disabled=!0),this.initTarget()},getRegion:function(t,e,s){var n=this.target.getShapeAt(t,e,s);return n!==i&&this.shapes[n]!==i?this.shapes[n]:i},getCurrentRegionFields:function(){var t=this.currentRegion;return{fieldkey:t.substr(0,1),value:this.values[t.substr(1)],region:t}},changeHighlight:function(t){var e,i=this.currentRegion,s=this.valueShapes[i];switch(delete this.shapes[s],i.substr(0,1)){case"r":e=this.renderRange(i.substr(1),t);break;case"p":e=this.renderPerformance(t);break;case"t":e=this.renderTarget(t)}this.valueShapes[i]=e.id,this.shapes[e.id]=i,this.target.replaceWithShape(s,e)},renderRange:function(t,i){var s=this.values[t],n=e.round(this.canvasWidth*((s-this.min)/this.range)),r=this.options.get("rangeColors")[t-2];return i&&(r=this.calcHighlightColor(r,this.options)),this.target.drawRect(0,0,n-1,this.canvasHeight-1,r,r)},renderPerformance:function(t){var i=this.values[1],s=e.round(this.canvasWidth*((i-this.min)/this.range)),n=this.options.get("performanceColor");return t&&(n=this.calcHighlightColor(n,this.options)),this.target.drawRect(0,e.round(.3*this.canvasHeight),s-1,e.round(.4*this.canvasHeight)-1,n,n)},renderTarget:function(t){var i=this.values[0],s=e.round(this.canvasWidth*((i-this.min)/this.range)-this.options.get("targetWidth")/2),n=e.round(.1*this.canvasHeight),r=this.canvasHeight-2*n,a=this.options.get("targetColor");return t&&(a=this.calcHighlightColor(a,this.options)),this.target.drawRect(s,n,this.options.get("targetWidth")-1,r-1,a,a)},render:function(){var t,e,i=this.values.length,s=this.target;if(k._super.render.call(this)){for(t=2;t<i;t++)e=this.renderRange(t).append(),this.shapes[e.id]="r"+t,this.valueShapes["r"+t]=e.id;null!==this.values[1]&&(e=this.renderPerformance().append(),this.shapes[e.id]="p1",this.valueShapes.p1=e.id),null!==this.values[0]&&(e=this.renderTarget().append(),this.shapes[e.id]="t0",this.valueShapes.t0=e.id),s.render()}}}),s.fn.sparkline.pie=M=r(s.fn.sparkline._base,{type:"pie",init:function(t,i,n,r,a){var h,o=0;if(M._super.init.call(this,t,i,n,r,a),this.shapes={},this.valueShapes={},this.values=i=s.map(i,Number),"auto"===n.get("width")&&(this.width=this.height),i.length>0)for(h=i.length;h--;)o+=i[h];this.total=o,this.initTarget(),this.radius=e.floor(e.min(this.canvasWidth,this.canvasHeight)/2)},getRegion:function(t,e,s){var n=this.target.getShapeAt(t,e,s);return n!==i&&this.shapes[n]!==i?this.shapes[n]:i},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:this.values[t]===i,value:this.values[t],percent:this.values[t]/this.total*100,color:this.options.get("sliceColors")[t%this.options.get("sliceColors").length],offset:t}},changeHighlight:function(t){var e=this.currentRegion,i=this.renderSlice(e,t),s=this.valueShapes[e];delete this.shapes[s],this.target.replaceWithShape(s,i),this.valueShapes[e]=i.id,this.shapes[i.id]=e},renderSlice:function(t,s){var n,r,a,h,o,l=this.target,g=this.options,p=this.radius,u=g.get("borderWidth"),c=g.get("offset"),d=2*e.PI,f=this.values,v=this.total,m=c?2*e.PI*(c/360):0;for(h=f.length,a=0;a<h;a++){if(n=m,r=m,v>0&&(r=m+d*(f[a]/v)),t===a)return o=g.get("sliceColors")[a%g.get("sliceColors").length],s&&(o=this.calcHighlightColor(o,g)),l.drawPieSlice(p,p,p-u,n,r,i,o);m=r}},render:function(){
var t,s,n=this.target,r=this.values,a=this.options,h=this.radius,o=a.get("borderWidth");if(M._super.render.call(this)){for(o&&n.drawCircle(h,h,e.floor(h-o/2),a.get("borderColor"),i,o).append(),s=r.length;s--;)r[s]&&(t=this.renderSlice(s).append(),this.valueShapes[s]=t.id,this.shapes[t.id]=s);n.render()}}}),s.fn.sparkline.box=_=r(s.fn.sparkline._base,{type:"box",init:function(t,e,i,n,r){_._super.init.call(this,t,e,i,n,r),this.values=s.map(e,Number),this.width="auto"===i.get("width")?"4.0em":n,this.initTarget(),this.values.length||(this.disabled=1)},getRegion:function(){return 1},getCurrentRegionFields:function(){var t=[{field:"lq",value:this.quartiles[0]},{field:"med",value:this.quartiles[1]},{field:"uq",value:this.quartiles[2]}];return this.loutlier!==i&&t.push({field:"lo",value:this.loutlier}),this.routlier!==i&&t.push({field:"ro",value:this.routlier}),this.lwhisker!==i&&t.push({field:"lw",value:this.lwhisker}),this.rwhisker!==i&&t.push({field:"rw",value:this.rwhisker}),t},render:function(){var t,s,n,r,a,h,l,g,p,u,c,d=this.target,f=this.values,v=f.length,m=this.options,x=this.canvasWidth,y=this.canvasHeight,C=m.get("chartRangeMin")===i?e.min.apply(e,f):m.get("chartRangeMin"),w=m.get("chartRangeMax")===i?e.max.apply(e,f):m.get("chartRangeMax"),b=0;if(_._super.render.call(this)){if(m.get("raw"))m.get("showOutliers")&&f.length>5?(s=f[0],t=f[1],r=f[2],a=f[3],h=f[4],l=f[5],g=f[6]):(t=f[0],r=f[1],a=f[2],h=f[3],l=f[4]);else if(f.sort(function(t,e){return t-e}),r=o(f,1),a=o(f,2),h=o(f,3),n=h-r,m.get("showOutliers")){for(t=l=i,p=0;p<v;p++)t===i&&f[p]>r-n*m.get("outlierIQR")&&(t=f[p]),f[p]<h+n*m.get("outlierIQR")&&(l=f[p]);s=f[0],g=f[v-1]}else t=f[0],l=f[v-1];this.quartiles=[r,a,h],this.lwhisker=t,this.rwhisker=l,this.loutlier=s,this.routlier=g,c=x/(w-C+1),m.get("showOutliers")&&(b=e.ceil(m.get("spotRadius")),x-=2*e.ceil(m.get("spotRadius")),c=x/(w-C+1),s<t&&d.drawCircle((s-C)*c+b,y/2,m.get("spotRadius"),m.get("outlierLineColor"),m.get("outlierFillColor")).append(),g>l&&d.drawCircle((g-C)*c+b,y/2,m.get("spotRadius"),m.get("outlierLineColor"),m.get("outlierFillColor")).append()),d.drawRect(e.round((r-C)*c+b),e.round(.1*y),e.round((h-r)*c),e.round(.8*y),m.get("boxLineColor"),m.get("boxFillColor")).append(),d.drawLine(e.round((t-C)*c+b),e.round(y/2),e.round((r-C)*c+b),e.round(y/2),m.get("lineColor")).append(),d.drawLine(e.round((t-C)*c+b),e.round(y/4),e.round((t-C)*c+b),e.round(y-y/4),m.get("whiskerColor")).append(),d.drawLine(e.round((l-C)*c+b),e.round(y/2),e.round((h-C)*c+b),e.round(y/2),m.get("lineColor")).append(),d.drawLine(e.round((l-C)*c+b),e.round(y/4),e.round((l-C)*c+b),e.round(y-y/4),m.get("whiskerColor")).append(),d.drawLine(e.round((a-C)*c+b),e.round(.1*y),e.round((a-C)*c+b),e.round(.9*y),m.get("medianColor")).append(),m.get("target")&&(u=e.ceil(m.get("spotRadius")),d.drawLine(e.round((m.get("target")-C)*c+b),e.round(y/2-u),e.round((m.get("target")-C)*c+b),e.round(y/2+u),m.get("targetColor")).append(),d.drawLine(e.round((m.get("target")-C)*c+b-u),e.round(y/2),e.round((m.get("target")-C)*c+b+u),e.round(y/2),m.get("targetColor")).append()),d.render()}}}),I=r({init:function(t,e,i,s){this.target=t,this.id=e,this.type=i,this.args=s},append:function(){return this.target.appendShape(this),this}}),T=r({_pxregex:/(\d+)(px)?\s*$/i,init:function(t,e,i){t&&(this.width=t,this.height=e,this.target=i,this.lastShapeId=null,i[0]&&(i=i[0]),s.data(i,"_jqs_vcanvas",this))},drawLine:function(t,e,i,s,n,r){return this.drawShape([[t,e],[i,s]],n,r)},drawShape:function(t,e,i,s){return this._genShape("Shape",[t,e,i,s])},drawCircle:function(t,e,i,s,n,r){return this._genShape("Circle",[t,e,i,s,n,r])},drawPieSlice:function(t,e,i,s,n,r,a){return this._genShape("PieSlice",[t,e,i,s,n,r,a])},drawRect:function(t,e,i,s,n,r){return this._genShape("Rect",[t,e,i,s,n,r])},getElement:function(){return this.canvas},getLastShapeId:function(){return this.lastShapeId},reset:function(){alert("reset not implemented")},_insert:function(t,e){s(e).html(t)},_calculatePixelDims:function(t,e,i){var n;n=this._pxregex.exec(e),this.pixelHeight=n?n[1]:s(i).height(),n=this._pxregex.exec(t),this.pixelWidth=n?n[1]:s(i).width()},_genShape:function(t,e){var i=A++;return e.unshift(i),new I(this,i,t,e)},appendShape:function(t){alert("appendShape not implemented")},replaceWithShape:function(t,e){alert("replaceWithShape not implemented")},insertAfterShape:function(t,e){alert("insertAfterShape not implemented")},removeShapeId:function(t){alert("removeShapeId not implemented")},getShapeAt:function(t,e,i){alert("getShapeAt not implemented")},render:function(){alert("render not implemented")}}),q=r(T,{init:function(e,n,r,a){q._super.init.call(this,e,n,r),this.canvas=t.createElement("canvas"),r[0]&&(r=r[0]),s.data(r,"_jqs_vcanvas",this),s(this.canvas).css({display:"inline-block",width:e,height:n,verticalAlign:"top"}),this._insert(this.canvas,r),this._calculatePixelDims(e,n,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,this.interact=a,this.shapes={},this.shapeseq=[],this.currentTargetShapeId=i,s(this.canvas).css({width:this.pixelWidth,height:this.pixelHeight})},_getContext:function(t,e,s){var n=this.canvas.getContext("2d");return t!==i&&(n.strokeStyle=t),n.lineWidth=s===i?1:s,e!==i&&(n.fillStyle=e),n},reset:function(){this._getContext().clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=i},_drawShape:function(t,e,s,n,r){var a,h,o=this._getContext(s,n,r);for(o.beginPath(),o.moveTo(e[0][0]+.5,e[0][1]+.5),a=1,h=e.length;a<h;a++)o.lineTo(e[a][0]+.5,e[a][1]+.5);s!==i&&o.stroke(),n!==i&&o.fill(),this.targetX!==i&&this.targetY!==i&&o.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t)},_drawCircle:function(t,s,n,r,a,h,o){var l=this._getContext(a,h,o);l.beginPath(),l.arc(s,n,r,0,2*e.PI,!1),this.targetX!==i&&this.targetY!==i&&l.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t),a!==i&&l.stroke(),h!==i&&l.fill()},_drawPieSlice:function(t,e,s,n,r,a,h,o){var l=this._getContext(h,o);l.beginPath(),l.moveTo(e,s),l.arc(e,s,n,r,a,!1),l.lineTo(e,s),l.closePath(),h!==i&&l.stroke(),o&&l.fill(),this.targetX!==i&&this.targetY!==i&&l.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t)},_drawRect:function(t,e,i,s,n,r,a){return this._drawShape(t,[[e,i],[e+s,i],[e+s,i+n],[e,i+n],[e,i]],r,a)},appendShape:function(t){return this.shapes[t.id]=t,this.shapeseq.push(t.id),this.lastShapeId=t.id,t.id},replaceWithShape:function(t,e){var i,s=this.shapeseq;for(this.shapes[e.id]=e,i=s.length;i--;)s[i]==t&&(s[i]=e.id);delete this.shapes[t]},replaceWithShapes:function(t,e){var i,s,n,r=this.shapeseq,a={};for(s=t.length;s--;)a[t[s]]=!0;for(s=r.length;s--;)i=r[s],a[i]&&(r.splice(s,1),delete this.shapes[i],n=s);for(s=e.length;s--;)r.splice(n,0,e[s].id),this.shapes[e[s].id]=e[s]},insertAfterShape:function(t,e){var i,s=this.shapeseq;for(i=s.length;i--;)if(s[i]===t)return s.splice(i+1,0,e.id),void(this.shapes[e.id]=e)},removeShapeId:function(t){var e,i=this.shapeseq;for(e=i.length;e--;)if(i[e]===t){i.splice(e,1);break}delete this.shapes[t]},getShapeAt:function(t,e,i){return this.targetX=e,this.targetY=i,this.render(),this.currentTargetShapeId},render:function(){var t,e,i,s=this.shapeseq,n=this.shapes,r=s.length,a=this._getContext();for(a.clearRect(0,0,this.pixelWidth,this.pixelHeight),i=0;i<r;i++)t=s[i],e=n[t],this["_draw"+e.type].apply(this,e.args);this.interact||(this.shapes={},this.shapeseq=[])}}),j=r(T,{init:function(e,i,n){var r;j._super.init.call(this,e,i,n),n[0]&&(n=n[0]),s.data(n,"_jqs_vcanvas",this),this.canvas=t.createElement("span"),s(this.canvas).css({display:"inline-block",position:"relative",overflow:"hidden",width:e,height:i,margin:"0px",padding:"0px",verticalAlign:"top"}),this._insert(this.canvas,n),this._calculatePixelDims(e,i,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,r='<v:group coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" style="position:absolute;top:0;left:0;width:'+this.pixelWidth+"px;height="+this.pixelHeight+'px;"></v:group>',this.canvas.insertAdjacentHTML("beforeEnd",r),this.group=s(this.canvas).children()[0],this.rendered=!1,this.prerender=""},_drawShape:function(t,e,s,n,r){var a,h,o,l,g,p,u=[];for(p=0,g=e.length;p<g;p++)u[p]=e[p][0]+","+e[p][1];return a=u.splice(0,1),r=r===i?1:r,h=s===i?' stroked="false" ':' strokeWeight="'+r+'px" strokeColor="'+s+'" ',o=n===i?' filled="false"':' fillColor="'+n+'" filled="true" ',l=u[0]===u[u.length-1]?"x ":"",'<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" id="jqsshape'+t+'" '+h+o+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" path="m '+a+" l "+u.join(", ")+" "+l+'e"> </v:shape>'},_drawCircle:function(t,e,s,n,r,a,h){var o,l;return e-=n,s-=n,o=r===i?' stroked="false" ':' strokeWeight="'+h+'px" strokeColor="'+r+'" ',l=a===i?' filled="false"':' fillColor="'+a+'" filled="true" ','<v:oval id="jqsshape'+t+'" '+o+l+' style="position:absolute;top:'+s+"px; left:"+e+"px; width:"+2*n+"px; height:"+2*n+'px"></v:oval>'},_drawPieSlice:function(t,s,n,r,a,h,o,l){var g,p,u,c,d,f,v;if(a===h)return"";if(h-a==2*e.PI&&(a=0,h=2*e.PI),p=s+e.round(e.cos(a)*r),u=n+e.round(e.sin(a)*r),c=s+e.round(e.cos(h)*r),d=n+e.round(e.sin(h)*r),p===c&&u===d){if(h-a<e.PI)return"";p=c=s+r,u=d=n}return p===c&&u===d&&h-a<e.PI?"":(g=[s-r,n-r,s+r,n+r,p,u,c,d],f=o===i?' stroked="false" ':' strokeWeight="1px" strokeColor="'+o+'" ',v=l===i?' filled="false"':' fillColor="'+l+'" filled="true" ','<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" id="jqsshape'+t+'" '+f+v+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" path="m '+s+","+n+" wa "+g.join(", ")+' x e"> </v:shape>')},_drawRect:function(t,e,i,s,n,r,a){return this._drawShape(t,[[e,i],[e,i+n],[e+s,i+n],[e+s,i],[e,i]],r,a)},reset:function(){this.group.innerHTML=""},appendShape:function(t){var e=this["_draw"+t.type].apply(this,t.args);return this.rendered?this.group.insertAdjacentHTML("beforeEnd",e):this.prerender+=e,this.lastShapeId=t.id,t.id},replaceWithShape:function(t,e){var i=s("#jqsshape"+t),n=this["_draw"+e.type].apply(this,e.args);i[0].outerHTML=n},replaceWithShapes:function(t,e){var i,n=s("#jqsshape"+t[0]),r="",a=e.length;for(i=0;i<a;i++)r+=this["_draw"+e[i].type].apply(this,e[i].args);for(n[0].outerHTML=r,i=1;i<t.length;i++)s("#jqsshape"+t[i]).remove()},insertAfterShape:function(t,e){var i=s("#jqsshape"+t),n=this["_draw"+e.type].apply(this,e.args);i[0].insertAdjacentHTML("afterEnd",n)},removeShapeId:function(t){var e=s("#jqsshape"+t);this.group.removeChild(e[0])},getShapeAt:function(t,e,i){return t.id.substr(8)},render:function(){this.rendered||(this.group.innerHTML=this.prerender,this.rendered=!0)}})})}(document,Math);
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,r){return void 0===r&&(r="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(r),r}:e(jQuery)}(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).closest("form").ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=r.form;if(i.clk=r,"image"===r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n=/\r?\n/g,i={};i.fileapi=void 0!==e('<input type="file">').get(0).files,i.formdata=void 0!==window.FormData;var o=!!e.fn.prop;e.fn.attr2=function(){if(!o)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t,r,n,s){function u(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;a<o;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function c(r){function n(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(e){a("cannot get iframe.contentWindow document: "+e)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){a("cannot get iframe.contentDocument: "+r),t=e.document}return t}function i(){function t(){try{var e=n(v).readyState;a("state = "+e),e&&"uninitialized"===e.toLowerCase()&&setTimeout(t,50)}catch(e){a("Server abort: ",e," (",e.name,")"),s(L),j&&clearTimeout(j),j=void 0}}var r=p.attr2("target"),i=p.attr2("action"),o=p.attr("enctype")||p.attr("encoding")||"multipart/form-data";w.setAttribute("target",m),l&&!/post/i.test(l)||w.setAttribute("method","POST"),i!==f.url&&w.setAttribute("action",f.url),f.skipEncodingOverride||l&&!/post/i.test(l)||p.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),f.timeout&&(j=setTimeout(function(){T=!0,s(A)},f.timeout));var u=[];try{if(f.extraData)for(var c in f.extraData)f.extraData.hasOwnProperty(c)&&(e.isPlainObject(f.extraData[c])&&f.extraData[c].hasOwnProperty("name")&&f.extraData[c].hasOwnProperty("value")?u.push(e('<input type="hidden" name="'+f.extraData[c].name+'">',k).val(f.extraData[c].value).appendTo(w)[0]):u.push(e('<input type="hidden" name="'+c+'">',k).val(f.extraData[c]).appendTo(w)[0]));f.iframeTarget||h.appendTo(D),v.attachEvent?v.attachEvent("onload",s):v.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(e){document.createElement("form").submit.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",o),r?w.setAttribute("target",r):p.removeAttr("target"),e(u).remove()}}function s(t){if(!x.aborted&&!X){if((O=n(v))||(a("cannot access response document"),t=L),t===A&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t===L&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(O&&O.location.href!==f.iframeSrc||T){v.detachEvent?v.detachEvent("onload",s):v.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"===f.dataType||O.XMLDocument||e.isXMLDoc(O);if(a("isXml="+o),!o&&window.opera&&(null===O.body||!O.body.innerHTML)&&--C)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=O.body?O.body:O.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=O.XMLDocument?O.XMLDocument:O,o&&(f.dataType="xml"),x.getResponseHeader=function(e){return{"content-type":f.dataType}[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(f.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||f.textarea){var p=O.getElementsByTagName("textarea")[0];if(p)x.responseText=p.value,x.status=Number(p.getAttribute("status"))||x.status,x.statusText=p.getAttribute("statusText")||x.statusText;else if(l){var m=O.getElementsByTagName("pre")[0],g=O.getElementsByTagName("body")[0];m?x.responseText=m.textContent?m.textContent:m.innerText:g&&(x.responseText=g.textContent?g.textContent:g.innerText)}}else"xml"===c&&!x.responseXML&&x.responseText&&(x.responseXML=q(x.responseText));try{M=N(x,c,f)}catch(e){i="parsererror",x.error=r=e||i}}catch(e){a("error caught: ",e),i="error",x.error=r=e||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(f.success&&f.success.call(f.context,M,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,f])):i&&(void 0===r&&(r=x.statusText),f.error&&f.error.call(f.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,f,r])),d&&e.event.trigger("ajaxComplete",[x,f]),d&&!--e.active&&e.event.trigger("ajaxStop"),f.complete&&f.complete.call(f.context,x,i),X=!0,f.timeout&&clearTimeout(j),setTimeout(function(){f.iframeTarget?h.attr("src",f.iframeSrc):h.remove(),x.responseXML=null},100)}}}var u,c,f,d,m,h,v,x,y,b,T,j,w=p[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(c=0;c<g.length;c++)u=e(g[c]),o?u.prop("disabled",!1):u.removeAttr("disabled");(f=e.extend(!0,{},e.ajaxSettings,t)).context=f.context||f,m="jqFormIO"+(new Date).getTime();var k=w.ownerDocument,D=p.closest("body");if(f.iframeTarget?(b=(h=e(f.iframeTarget,k)).attr2("name"))?m=b:h.attr2("name",m):(h=e('<iframe name="'+m+'" src="'+f.iframeSrc+'" />',k)).css({position:"absolute",top:"-1000px",left:"-1000px"}),v=h[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(e){}h.attr("src",f.iframeSrc),x.error=r,f.error&&f.error.call(f.context,x,r,t),d&&e.event.trigger("ajaxError",[x,f,r]),f.complete&&f.complete.call(f.context,x,r)}},(d=f.global)&&0==e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,f]),f.beforeSend&&!1===f.beforeSend.call(f.context,x,f))return f.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;(y=w.clk)&&(b=y.name)&&!y.disabled&&(f.extraData=f.extraData||{},f.extraData[b]=y.value,"image"===y.type&&(f.extraData[b+".x"]=w.clk_x,f.extraData[b+".y"]=w.clk_y));var A=1,L=2,F=e("meta[name=csrf-token]").attr("content"),E=e("meta[name=csrf-param]").attr("content");E&&F&&(f.extraData=f.extraData||{},f.extraData[E]=F),f.forceSync?i():setTimeout(i,10);var M,O,X,C=50,q=e.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},_=e.parseJSON||function(e){return window.eval("("+e+")")},N=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i=("xml"===r||!r)&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&(("json"===r||!r)&&n.indexOf("json")>=0?o=_(o):("script"===r||!r)&&n.indexOf("javascript")>=0&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var l,f,d,p=this;"function"==typeof t?t={success:t}:"string"==typeof t||!1===t&&arguments.length>0?(t={url:t,data:r,dataType:n},"function"==typeof s&&(t.success=s)):void 0===t&&(t={}),l=t.method||t.type||this.attr2("method"),(d=(d="string"==typeof(f=t.url||this.attr2("action"))?e.trim(f):"")||window.location.href||"")&&(d=(d.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:d,success:e.ajaxSettings.success,type:l||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&!1===t.beforeSerialize(this,t))return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var h=t.traditional;void 0===h&&(h=e.ajaxSettings.traditional);var v,g=[],x=this.formToArray(t.semantic,g,t.filtering);if(t.data){var y=e.isFunction(t.data)?t.data(x):t.data;t.extraData=y,v=e.param(y,h)}if(t.beforeSubmit&&!1===t.beforeSubmit(x,this,t))return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[x,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var b=e.param(x,h);v&&(b=b?b+"&"+v:v),"GET"===t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+b,t.data=null):t.data=b;var T=[];if(t.resetForm&&T.push(function(){p.resetForm()}),t.clearForm&&T.push(function(){p.clearForm(t.includeHidden)}),!t.dataType&&t.target){var j=t.success||function(){};T.push(function(r,a,n){var i=arguments,o=t.replaceTarget?"replaceWith":"html";e(t.target)[o](r).each(function(){j.apply(this,i)})})}else t.success&&(e.isArray(t.success)?e.merge(T,t.success):T.push(t.success));if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=T.length;i<o;i++)T[i].apply(n,[e,r,a||p,p])},t.error){var w=t.error;t.error=function(e,r,a){var n=t.context||this;w.apply(n,[e,r,a,p])}}if(t.complete){var S=t.complete;t.complete=function(e,r){var a=t.context||this;S.apply(a,[e,r,p])}}var k=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}).length>0,D="multipart/form-data",A=p.attr("enctype")===D||p.attr("encoding")===D,L=i.fileapi&&i.formdata;a("fileAPI :"+L);var F,E=(k||A)&&!L;!1!==t.iframe&&(t.iframe||E)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){F=c(x)}):F=c(x):F=(k||A)&&L?function(r){for(var a=new FormData,n=0;n<r.length;n++)a.append(r[n].name,r[n].value);if(t.extraData){var i=u(t.extraData);for(n=0;n<i.length;n++)i[n]&&a.append(i[n][0],i[n][1])}t.data=null;var o=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:l||"POST"});t.uploadProgress&&(o.xhr=function(){var r=e.ajaxSettings.xhr();return r.upload&&r.upload.addEventListener("progress",function(e){var r=0,a=e.loaded||e.position,n=e.total;e.lengthComputable&&(r=Math.ceil(a/n*100)),t.uploadProgress(e,a,n,r)},!1),r}),o.data=null;var s=o.beforeSend;return o.beforeSend=function(e,r){t.formData?r.data=t.formData:r.data=a,s&&s.call(this,e,r)},e.ajax(o)}(x):e.ajax(t),p.removeData("jqxhr").data("jqxhr",F);for(var M=0;M<g.length;M++)g[M]=null;return this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(n,i,o,s){if(("string"==typeof n||!1===n&&arguments.length>0)&&(n={url:n,data:i,dataType:o},"function"==typeof s&&(n.success=s)),n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var u={s:this.selector,c:this.context};return!e.isReady&&u.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(u.s,u.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().on("submit.form-plugin",n,t).on("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r,a){var n=[];if(0===this.length)return n;var o,s=this[0],u=this.attr("id"),c=t||void 0===s.elements?s.getElementsByTagName("*"):s.elements;if(c&&(c=e.makeArray(c)),u&&(t||/(Edge|Trident)\//.test(navigator.userAgent))&&(o=e(':input[form="'+u+'"]').get()).length&&(c=(c||[]).concat(o)),!c||!c.length)return n;e.isFunction(a)&&(c=e.map(c,a));var l,f,d,p,m,h,v;for(l=0,h=c.length;l<h;l++)if(m=c[l],(d=m.name)&&!m.disabled)if(t&&s.clk&&"image"===m.type)s.clk===m&&(n.push({name:d,value:e(m).val(),type:m.type}),n.push({name:d+".x",value:s.clk_x},{name:d+".y",value:s.clk_y}));else if((p=e.fieldValue(m,!0))&&p.constructor===Array)for(r&&r.push(m),f=0,v=p.length;f<v;f++)n.push({name:d,value:p[f]});else if(i.fileapi&&"file"===m.type){r&&r.push(m);var g=m.files;if(g.length)for(f=0;f<g.length;f++)n.push({name:d,value:g[f],type:m.type});else n.push({name:d,value:"",type:m.type})}else null!==p&&void 0!==p&&(r&&r.push(m),n.push({name:d,value:p,type:m.type,required:!0}));if(!t&&s.clk){var x=e(s.clk),y=x[0];(d=y.name)&&!y.disabled&&"image"===y.type&&(n.push({name:d,value:x.val()}),n.push({name:d+".x",value:s.clk_x},{name:d+".y",value:s.clk_y}))}return n},e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var r=[];return this.each(function(){var a=this.name;if(a){var n=e.fieldValue(this,t);if(n&&n.constructor===Array)for(var i=0,o=n.length;i<o;i++)r.push({name:a,value:n[i]});else null!==n&&void 0!==n&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;a<n;a++){var i=this[a],o=e.fieldValue(i,t);null===o||void 0===o||o.constructor===Array&&!o.length||(o.constructor===Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,i=t.type,o=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"===i||"button"===i||("checkbox"===i||"radio"===i)&&!t.checked||("submit"===i||"image"===i)&&t.form&&t.form.clk!==t||"select"===o&&-1===t.selectedIndex))return null;if("select"===o){var s=t.selectedIndex;if(s<0)return null;for(var u=[],c=t.options,l="select-one"===i,f=l?s+1:c.length,d=l?s:0;d<f;d++){var p=c[d];if(p.selected&&!p.disabled){var m=p.value;if(m||(m=p.attributes&&p.attributes.value&&!p.attributes.value.specified?p.text:p.value),l)return m;u.push(m)}}return u}return e(t).val().replace(n,"\r\n")},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"===n?this.value="":"checkbox"===a||"radio"===a?this.checked=!1:"select"===n?this.selectedIndex=-1:"file"===a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(!0===t&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){var t=e(this),r=this.tagName.toLowerCase();switch(r){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var a=t.parents("select");return a.length&&a[0].multiple?"option"===r?this.selected=this.defaultSelected:t.find("option").resetForm():a.resetForm(),!0;case"select":return t.find("option").each(function(e){if(this.selected=this.defaultSelected,this.defaultSelected&&!t[0].multiple)return t[0].selectedIndex=e,!1}),!0;case"label":var n=e(t.attr("for")),i=t.find("input,select,textarea");return n[0]&&i.unshift(n[0]),i.resetForm(),!0;case"form":return("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset(),!0;default:return t.find("form,input,label,select,textarea").resetForm(),!0}})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"===r||"radio"===r)this.checked=t;else if("option"===this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"===a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1});
var QRCode;!function(){function t(t){this.mode=h.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,r=this.data.length;e<r;e++){var o=[],i=this.data.charCodeAt(e);i>65536?(o[0]=240|(1835008&i)>>>18,o[1]=128|(258048&i)>>>12,o[2]=128|(4032&i)>>>6,o[3]=128|63&i):i>2048?(o[0]=224|(61440&i)>>>12,o[1]=128|(4032&i)>>>6,o[2]=128|63&i):i>128?(o[0]=192|(1984&i)>>>6,o[1]=128|63&i):o[0]=i,this.parsedData.push(o)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function e(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function r(t,e){if(t.length==undefined)throw new Error(t.length+"/"+e);for(var r=0;r<t.length&&0==t[r];)r++;this.num=new Array(t.length-r+e);for(var o=0;o<t.length-r;o++)this.num[o]=t[o+r]}function o(t,e){this.totalCount=t,this.dataCount=e}function i(){this.buffer=[],this.length=0}function n(){var t=!1,e=navigator.userAgent;if(/android/i.test(e)){t=!0;var r=e.toString().match(/android ([0-9]\.[0-9])/i);r&&r[1]&&(t=parseFloat(r[1]))}return t}function a(t,e){for(var r=1,o=s(t),i=0,n=c.length;i<=n;i++){var a=0;switch(e){case u.L:a=c[i][0];break;case u.M:a=c[i][1];break;case u.Q:a=c[i][2];break;case u.H:a=c[i][3]}if(o<=a)break;r++}if(r>c.length)throw new Error("Too long data");return r}function s(t){var e=encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return e.length+(e.length!=t?3:0)}t.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,r=this.parsedData.length;e<r;e++)t.put(this.parsedData[e],8)}},e.prototype={addData:function(e){var r=new t(e);this.dataList.push(r),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,r){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var o=0;o<this.moduleCount;o++){this.modules[o]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[o][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,r),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=e.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,r)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var o=-1;o<=7;o++)e+o<=-1||this.moduleCount<=e+o||(this.modules[t+r][e+o]=0<=r&&r<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=o&&o<=4)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var o=f.getLostPoint(this);(0==r||t>o)&&(t=o,e=r)}return e},createMovieClip:function(t,e,r){var o=t.createEmptyMovieClip(e,r);this.make();for(var i=0;i<this.modules.length;i++)for(var n=1*i,a=0;a<this.modules[i].length;a++){var s=1*a,h=this.modules[i][a];h&&(o.beginFill(0,100),o.moveTo(s,n),o.lineTo(s+1,n),o.lineTo(s+1,n+1),o.lineTo(s,n+1),o.endFill())}return o},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=f.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var r=0;r<t.length;r++){var o=t[e],i=t[r];if(null==this.modules[o][i])for(var n=-2;n<=2;n++)for(var a=-2;a<=2;a++)this.modules[o+n][i+a]=-2==n||2==n||-2==a||2==a||0==n&&0==a}},setupTypeNumber:function(t){for(var e=f.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var o=!t&&1==(e>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=o}for(var r=0;r<18;r++){var o=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=o}},setupTypeInfo:function(t,e){for(var r=this.errorCorrectLevel<<3|e,o=f.getBCHTypeInfo(r),i=0;i<15;i++){var n=!t&&1==(o>>i&1);i<6?this.modules[i][8]=n:i<8?this.modules[i+1][8]=n:this.modules[this.moduleCount-15+i][8]=n}for(var i=0;i<15;i++){var n=!t&&1==(o>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=n:i<9?this.modules[8][15-i-1+1]=n:this.modules[8][15-i-1]=n}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,o=this.moduleCount-1,i=7,n=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var s=0;s<2;s++)if(null==this.modules[o][a-s]){var h=!1;n<t.length&&(h=1==(t[n]>>>i&1));var u=f.getMask(e,o,a-s);u&&(h=!h),this.modules[o][a-s]=h,i--,-1==i&&(n++,i=7)}if((o+=r)<0||this.moduleCount<=o){o-=r,r=-r;break}}}},e.PAD0=236,e.PAD1=17,e.createData=function(t,r,n){for(var a=o.getRSBlocks(t,r),s=new i,h=0;h<n.length;h++){var u=n[h];s.put(u.mode,4),s.put(u.getLength(),f.getLengthInBits(u.mode,t)),u.write(s)}for(var l=0,h=0;h<a.length;h++)l+=a[h].dataCount;if(s.getLengthInBits()>8*l)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*l+")");for(s.getLengthInBits()+4<=8*l&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;;){if(s.getLengthInBits()>=8*l)break;if(s.put(e.PAD0,8),s.getLengthInBits()>=8*l)break;s.put(e.PAD1,8)}return e.createBytes(s,a)},e.createBytes=function(t,e){for(var o=0,i=0,n=0,a=new Array(e.length),s=new Array(e.length),h=0;h<e.length;h++){var u=e[h].dataCount,l=e[h].totalCount-u;i=Math.max(i,u),n=Math.max(n,l),a[h]=new Array(u);for(var g=0;g<a[h].length;g++)a[h][g]=255&t.buffer[g+o];o+=u;var d=f.getErrorCorrectPolynomial(l),c=new r(a[h],d.getLength()-1),p=c.mod(d);s[h]=new Array(d.getLength()-1);for(var g=0;g<s[h].length;g++){var m=g+p.getLength()-s[h].length;s[h][g]=m>=0?p.get(m):0}}for(var v=0,g=0;g<e.length;g++)v+=e[g].totalCount;for(var _=new Array(v),C=0,g=0;g<i;g++)for(var h=0;h<e.length;h++)g<a[h].length&&(_[C++]=a[h][g]);for(var g=0;g<n;g++)for(var h=0;h<e.length;h++)g<s[h].length&&(_[C++]=s[h][g]);return _};for(var h={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},u={L:1,M:0,Q:3,H:2},l={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},f={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;f.getBCHDigit(e)-f.getBCHDigit(f.G15)>=0;)e^=f.G15<<f.getBCHDigit(e)-f.getBCHDigit(f.G15);return(t<<10|e)^f.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;f.getBCHDigit(e)-f.getBCHDigit(f.G18)>=0;)e^=f.G18<<f.getBCHDigit(e)-f.getBCHDigit(f.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return f.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case l.PATTERN000:return(e+r)%2==0;case l.PATTERN001:return e%2==0;case l.PATTERN010:return r%3==0;case l.PATTERN011:return(e+r)%3==0;case l.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case l.PATTERN101:return e*r%2+e*r%3==0;case l.PATTERN110:return(e*r%2+e*r%3)%2==0;case l.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new r([1],0),o=0;o<t;o++)e=e.multiply(new r([1,g.gexp(o)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case h.MODE_NUMBER:return 10;case h.MODE_ALPHA_NUM:return 9;case h.MODE_8BIT_BYTE:case h.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case h.MODE_NUMBER:return 12;case h.MODE_ALPHA_NUM:return 11;case h.MODE_8BIT_BYTE:return 16;case h.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case h.MODE_NUMBER:return 14;case h.MODE_ALPHA_NUM:return 13;case h.MODE_8BIT_BYTE:return 16;case h.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,o=0;o<e;o++)for(var i=0;i<e;i++){for(var n=0,a=t.isDark(o,i),s=-1;s<=1;s++)if(!(o+s<0||e<=o+s))for(var h=-1;h<=1;h++)i+h<0||e<=i+h||0==s&&0==h||a==t.isDark(o+s,i+h)&&n++;n>5&&(r+=3+n-5)}for(var o=0;o<e-1;o++)for(var i=0;i<e-1;i++){var u=0;t.isDark(o,i)&&u++,t.isDark(o+1,i)&&u++,t.isDark(o,i+1)&&u++,t.isDark(o+1,i+1)&&u++,0!=u&&4!=u||(r+=3)}for(var o=0;o<e;o++)for(var i=0;i<e-6;i++)t.isDark(o,i)&&!t.isDark(o,i+1)&&t.isDark(o,i+2)&&t.isDark(o,i+3)&&t.isDark(o,i+4)&&!t.isDark(o,i+5)&&t.isDark(o,i+6)&&(r+=40);for(var i=0;i<e;i++)for(var o=0;o<e-6;o++)t.isDark(o,i)&&!t.isDark(o+1,i)&&t.isDark(o+2,i)&&t.isDark(o+3,i)&&t.isDark(o+4,i)&&!t.isDark(o+5,i)&&t.isDark(o+6,i)&&(r+=40);for(var l=0,i=0;i<e;i++)for(var o=0;o<e;o++)t.isDark(o,i)&&l++;return r+=Math.abs(100*l/e/e-50)/5*10}},g={glog:function(t){if(t<1)throw new Error("glog("+t+")");return g.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return g.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},d=0;d<8;d++)g.EXP_TABLE[d]=1<<d;for(var d=8;d<256;d++)g.EXP_TABLE[d]=g.EXP_TABLE[d-4]^g.EXP_TABLE[d-5]^g.EXP_TABLE[d-6]^g.EXP_TABLE[d-8];for(var d=0;d<255;d++)g.LOG_TABLE[g.EXP_TABLE[d]]=d;r.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),o=0;o<this.getLength();o++)for(var i=0;i<t.getLength();i++)e[o+i]^=g.gexp(g.glog(this.get(o))+g.glog(t.get(i)));return new r(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=g.glog(this.get(0))-g.glog(t.get(0)),o=new Array(this.getLength()),i=0;i<this.getLength();i++)o[i]=this.get(i);for(var i=0;i<t.getLength();i++)o[i]^=g.gexp(g.glog(t.get(i))+e);return new r(o,0).mod(t)}},o.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],o.getRSBlocks=function(t,e){var r=o.getRsBlockTable(t,e);if(r==undefined)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var i=r.length/3,n=[],a=0;a<i;a++)for(var s=r[3*a+0],h=r[3*a+1],u=r[3*a+2],l=0;l<s;l++)n.push(new o(h,u));return n},o.getRsBlockTable=function(t,e){switch(e){case u.L:return o.RS_BLOCK_TABLE[4*(t-1)+0];case u.M:return o.RS_BLOCK_TABLE[4*(t-1)+1];case u.Q:return o.RS_BLOCK_TABLE[4*(t-1)+2];case u.H:return o.RS_BLOCK_TABLE[4*(t-1)+3];default:return undefined}},i.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var c=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],p=function(){var t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){function e(t,e){var r=document.createElementNS("http://www.w3.org/2000/svg",t);for(var o in e)e.hasOwnProperty(o)&&r.setAttribute(o,e[o]);return r}var r=this._htOption,o=this._el,i=t.getModuleCount();Math.floor(r.width/i),Math.floor(r.height/i);this.clear();var n=e("svg",{viewBox:"0 0 "+String(i)+" "+String(i),width:"100%",height:"100%",fill:r.colorLight});n.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),o.append(n),n.append(e("rect",{fill:r.colorLight,width:"100%",height:"100%"})),n.append(e("rect",{fill:r.colorDark,width:"1",height:"1",id:"template"}));for(var a=0;a<i;a++)for(var s=0;s<i;s++)if(t.isDark(a,s)){var h=e("use",{x:String(s),y:String(a)});h.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),n.append(h)}},t.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},t}(),m="svg"===document.documentElement.tagName.toLowerCase(),v=m?p:function(){return"undefined"!=typeof CanvasRenderingContext2D}()?function(){function t(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function e(t,e){var r=this;if(r._fFail=e,r._fSuccess=t,null===r._bSupportDataURI){var o=document.createElement("img"),i=function(){r._bSupportDataURI=!1,r._fFail&&r._fFail.call(r)},n=function(){r._bSupportDataURI=!0,r._fSuccess&&r._fSuccess.call(r)};return o.onabort=i,o.onerror=i,o.onload=n,void(o.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}!0===r._bSupportDataURI&&r._fSuccess?r._fSuccess.call(r):!1===r._bSupportDataURI&&r._fFail&&r._fFail.call(r)}if(this._android&&this._android<=2.1){var r=1/window.devicePixelRatio,o=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(t,e,i,n,a,s,h,u,l){if("nodeName"in t&&/img/i.test(t.nodeName))for(var f=arguments.length-1;f>=1;f--)arguments[f]=arguments[f]*r;else void 0===u&&(arguments[1]*=r,arguments[2]*=r,arguments[3]*=r,arguments[4]*=r);o.apply(this,arguments)}}var i=function(t,e){this._bIsPainted=!1,this._android=n(),this._htOption=e,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=e.width,this._elCanvas.height=e.height,t.append(this._elCanvas),this._el=t,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.append(this._elImage),this._bSupportDataURI=null};return i.prototype.draw=function(t){var e=this._elImage,r=this._oContext,o=this._htOption,i=t.getModuleCount(),n=o.width/i,a=o.height/i,s=Math.round(n),h=Math.round(a);e.style.display="none",this.clear();for(var u=0;u<i;u++)for(var l=0;l<i;l++){var f=t.isDark(u,l),g=l*n,d=u*a;r.strokeStyle=f?o.colorDark:o.colorLight,r.lineWidth=1,r.fillStyle=f?o.colorDark:o.colorLight,r.fillRect(g,d,n,a),r.strokeRect(Math.floor(g)+.5,Math.floor(d)+.5,s,h),r.strokeRect(Math.ceil(g)-.5,Math.ceil(d)-.5,s,h)}this._bIsPainted=!0},i.prototype.makeImage=function(){this._bIsPainted&&e.call(this,t)},i.prototype.isPainted=function(){return this._bIsPainted},i.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},i.prototype.round=function(t){return t?Math.floor(1e3*t)/1e3:t},i}():function(){var t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){for(var e=this._htOption,r=this._el,o=t.getModuleCount(),i=Math.floor(e.width/o),n=Math.floor(e.height/o),a=['<table style="border:0;border-collapse:collapse;">'],s=0;s<o;s++){a.push("<tr>");for(var h=0;h<o;h++)a.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+i+"px;height:"+n+"px;background-color:"+(t.isDark(s,h)?e.colorDark:e.colorLight)+';"></td>');a.push("</tr>")}a.push("</table>"),r.innerHTML=a.join("");var u=r.childNodes[0],l=(e.width-u.offsetWidth)/2,f=(e.height-u.offsetHeight)/2;l>0&&f>0&&(u.style.margin=f+"px "+l+"px")},t.prototype.clear=function(){this._el.innerHTML=""},t}();QRCode=function(t,e){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:u.H},"string"==typeof e&&(e={text:e}),e)for(var r in e)this._htOption[r]=e[r];"string"==typeof t&&(t=document.getElementById(t)),this._htOption.useSVG&&(v=p),this._android=n(),this._el=t,this._oQRCode=null,this._oDrawing=new v(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(t){this._oQRCode=new e(a(t,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(t),this._oQRCode.make(),this._el.title=t,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=u}();
!function(r,n){"use strict";var o=n.noConflict(!0),t={},e={innoJquery:o},c=r.innorix=function(r,n){t[r]=n},i=c._load=function(r){if(t[r]&&(e[r]=t[r](i),delete t[r]),!e.hasOwnProperty(r))throw'not find module "'+r+'"';return e[r]};e.klass=function(r,n){n||(n=r,r=[]),o.each(r.reverse(),function(r,o){var t=o.prototype||{};for(var e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}),n.hasOwnProperty("constructor")||(n.constructor=function(){});var t=n.constructor;return t.prototype=n,t}}(window,jQuery);
innorix("api",function(n){"use strict";var e,t=n("innoJquery"),o=n("singleton/agent"),r=n("singleton/agentUpdater"),i=n("singleton/controlBoxAll"),a=n("ControlBox/ControlBox"),c=n("Klass/Composite"),l=n("i18n/lang"),u=n("CONSTANT/ENV"),s=n("CONSTANT/EVENT"),d=n("ControlBox/defaultOption");return{all:i,agent:function(){return o},getUserAgent:function(){return n("userAgent")},create:function(n){for(var e in n)n.hasOwnProperty(e)&&("true"==n[e]&&(n[e]=!0),"false"==n[e]&&(n[e]=!1));if(!n.el)throw"required {option.el}";if(n.$el=t(n.el).eq(0),0===n.$el.length)throw'not exist "option.el"';var o=/iPhone|iPad|iPod|Android|SamsungBrowser/i.test(navigator.userAgent);!o&&navigator.userAgent.indexOf("Mac")>-1&&navigator.maxTouchPoints&&(o=!0);this.getUserAgent();n.isMobile=o,"undefined"==typeof n.agent&&(n.agent=!0),l.set(n.controlLang);var r;return 1==n.autoHtmlMode?this.checkAgentInstalledNoHandle(function(e){n.agent=!!e,r=new a(n),i.__add(r),r.on(s.CONTROL_DESTROY,function(){i.__remove(r)})}):(r=new a(n),i.__add(r),r.on(s.CONTROL_DESTROY,function(){i.__remove(r)})),r},group:function(){var n=new c(a),e=t.makeArray(arguments);return t.each(e,function(e){e instanceof a&&(n.__add(e),e.on(s.CONTROL_DESTROY,function(){n.__remove(e)}))}),n},setConnectUrl:function(n){return o.setBaseUrl(n),r.agent.setBaseUrl(n),this},autoConnect:function(n){n=n||u.AGENT_HTTP_PRE_PORTS;var t=this;return e=o.findConnectUrl(n).done(function(n){t.setConnectUrl(n)})},onAutoConnect:function(n){return e||this.autoConnect(),e.done(function(){n(!0)}).fail(function(){n(!1)})},setLanguage:function(n){try{l.set(n)}catch(e){console.log(e)}return this},setEnvironment:function(n){return t.extend(u,n),this},addLanguageResource:function(n,e){return l.addResource(n,e),this},checkVersion:function(n){return"undefined"==typeof FormData?o.checkVersionFallback(n):o.checkVersion(n||t.noop)},checkAgentInstalled:function(n){return"undefined"==typeof FormData?o.checkOneTimeVersionFallback(n):o.checkOneTimeVersion(n||t.noop)},getAgentVersion:function(n){return o.getVersionNoHandle(n)},checkVersionNoHandle:function(n){return o.checkVersionNoHandle(n)},checkAgentInstalledNoHandle:function(n){return o.checkAgentInstalledNoHandle(n)},execute:function(n){return"undefined"==typeof FormData?o.executeFallback(n,function(n){}):o.execute(n)},getFileExists:function(n){return o.getFileExists(n)},checkImageFile:function(n){return o.checkImageFile(n)},checkTrayVersion:function(n){return"undefined"==typeof FormData?o.checkTrayVersionFallback(n):o.checkTrayVersion(n||t.noop)},pluginUpdateOrInstall:function(){var n=this.pluginResource;this.pluginResource;n=n||{};var e="http://";"https:"==window.location.protocol&&(e="https://");var t=(n.installUrl||e+window.location.host+u.INSTALL_PAGE)+"?redirect="+encodeURIComponent(window.location.href);-1!=n.installUrl.indexOf("redirect")&&(t=this.option.installUrl);n.updateFileUrl||(window.location.host,u.UPDATE_FILE_URL);return this.checkVersion(function(n){return null===n?window.location.href=t:!1===n&&(window.location.href=t),!1}),this},setPluginResource:function(n){this.pluginResource={installUrl:n.installUrl,updateFileUrl:n.updateFileUrl}},setModuleOption:function(n){if(t.isArray(n))for(var e in n)n.hasOwnProperty(e)&&(d[n[e].key]=n[e].value);else d[n.key]=n.value}}});
innorix("server",function(e){"use strict";var t=e("innoJquery"),o=e("ControlBox/defaultOption"),r=e("ControlBox/cachedOption"),n=e("i18n/lang"),u=e("Server/Client"),s=e("CONSTANT/EVENT"),i=new u;return{command:function(){var e=Array.prototype.slice.call(arguments);return this[e.shift()].apply(this,e)},use:function(e){if(e.url)-1==e.url.indexOf("http")?"https:"==window.location.protocol?i.setBaseUrl("https://"+e.url):i.setBaseUrl("http://"+e.url):i.setBaseUrl(e.url);else{var n="http://";"https:"==window.location.protocol&&(n="https://"),e.url=n+window.location.host}var u=[];u.push({key:"apiUrl",value:e.url}),e.key&&(i.setKey(e.key),u.push({key:"apiKey",value:e.key})),innorix.setModuleOption(u);var a={};a[s.TRANSFER_UPLOAD_COMPLETE]=function(e){var o=r.getOption();if(0==o.platformDepend)return!1;var n=t.extend({},e);n.pathName=location.pathname;var u="";o.custom.product&&(u=o.custom.product);var s="";o.custom.subproduct&&(s=o.custom.subproduct),n.product=u,n.subproduct=s,n.files=encodeURIComponent(JSON.stringify(n.files)),i.request("post","webpage/onUpload",n)},a[s.TRANSFER_DOWNLOAD_COMPLETE]=function(e){var o=r.getOption();if(0==o.platformDepend)return!1;var n=t.extend({},e);n.pathName=location.pathname;var u="";o.custom.product&&(u=o.custom.product);var s="";o.custom.subProduct&&(s=o.custom.subProduct),n.product=u,n.subproduct=s,n.files=encodeURIComponent(JSON.stringify(n.files)),i.request("post","webpage/onDownload",n)},t.extend(o,{uploadUrl:e.url+"/upload.jsp",events:a})},getBaseUrl:function(){return i.getBaseUrl()},getKey:function(){return i.getKey()},getFile:function(e){return i.request("get","webpage/file/"+e)},getTransfer:function(e){return i.request("get","webpage/transfer/"+e)},getGroupSessionId:function(){return i.request("get","webpage/groupid")},setDownloadFilesByTransferId:function(e,t){return this.getTransfer(t).done(function(t){t&&0!==t.length?e.presetDownloadFiles(t):alert(n("webpage.noFiles"))})},setDownloadFilesByFileId:function(e,t){return this.getFile(t).done(function(t){t&&t.downloadUrl?e.presetDownloadFiles([t]):alert(n("webpage.noFiles"))})}}});
innorix("userAgent",function(){"use strict";function e(e,r){var i,n,o=s.defaultString.browser.version,t=new RegExp("("+e+")","i").exec(r);return t?(n=t.index,e=t[0],n>-1&&(i=n+e.length+1,o=r.substring(i).split(" ")[0].replace(/_/g,".").replace(/\;|\)/g,"")),o):o}function r(e){return n(s.os,e)}function i(e){return n(s.browser,e)}function n(e,r){for(var i,n,o,s=0;o=e[s];s++)if(i=o.criteria,n=new RegExp(o.identity,"i").test(r),i?n&&t(a,i):n)return o}function o(e,r){for(var i,n=0;i=e[n];n++)if(t(a,i.criteria))return i.identity||r.name;return r.name}function t(e,r){return r&&r.test?!!r.test(e):e.indexOf(r)>-1}var s={browser:[{criteria:"PhantomJS",identity:"PhantomJS"},{criteria:/Opera|OPR/,identity:"Opera",versionSearch:"Version"},{criteria:/Edge/,identity:"Edge",versionSearch:"Edge"},{criteria:/MSIE|Trident|Windows Phone/,identity:"IE",versionSearch:"IEMobile|MSIE|rv"},{criteria:/SAMSUNG|SamsungBrowser/,identity:"SBrowser",versionSearch:"Chrome"},{criteria:/Chrome|CriOS/,identity:"Chrome"},{criteria:/Android/,identity:"default"},{criteria:/iPhone|iPad/,identity:"Safari",versionSearch:"Version"},{criteria:"Apple",identity:"Safari",versionSearch:"Version"},{criteria:"Firefox",identity:"Firefox"}],os:[{criteria:/Windows Phone|Windows NT/,identity:"Window",versionSearch:"Windows Phone|Windows NT"},{criteria:"Windows 2000",identity:"Window",versionAlias:"5.0"},{criteria:/iPhone|iPad/,identity:"iOS",versionSearch:"iPhone OS|CPU OS"},{criteria:"Mac",versionSearch:"OS X",identity:"MAC"},{criteria:/Android/,identity:"Android"}],webview:[{criteria:/iPhone|iPad/,browserVersionSearch:"Version",webviewBrowserVersion:/-1/},{criteria:/iPhone|iPad|Android/,webviewToken:/NAVER|DAUM|; wv/}],defaultString:{browser:{version:"-1",name:"default"},os:{version:"-1",name:"unknown"}}},a=window.navigator.userAgent,c={os:{},browser:{}};return c.browser.name=function(e){return o(e,s.defaultString.browser)}(s.browser),c.browser.version=function(r){var n;if(r)return n=i(r).versionSearch||r,e(n,a)}(c.browser.name),c.os.name=function(e){return o(e,s.defaultString.os)}(s.os),c.os.version=function(e){var i,n,o,t,c=a,w=r(e)||{},d=s.defaultString.os.version;if(e)return w.versionAlias?w.versionAlias:(n=w.versionSearch||e,o=new RegExp("("+n+")\\s([\\d_\\.]+|\\d_0)","i"),t=o.exec(c),t&&(i=o.exec(c)[2].replace(/_/g,".").replace(/\;|\)/g,"")),i||d)}(c.os.name),c.browser.webview=function(){for(var r,i,n=a,o=s.webview,c=!1,w=0;i=o[w];w++)if(t(n,i.criteria)&&(r=e(i.browserVersionSearch,n),t(n,i.webviewToken)||t(r,i.webviewBrowserVersion))){c=!0;break}return c}(),function(e){return e.browser.name=e.browser.name.toLowerCase(),e.os.name=e.os.name.toLowerCase(),"ios"===e.os.name&&e.browser.webview&&(e.browser.version="-1"),e}(c)});
innorix("util",function(e){"use strict";return{log:e("utils/log"),url:e("utils/url"),string:e("utils/string"),array:e("utils/array"),promise:e("utils/promise"),object:e("utils/object"),decorator:e("utils/decorator"),cookie:e("utils/cookie"),getZoom:function(){var e=1;return window.screen.systemXDPI&&window.screen.logicalXDPI&&window.screen.systemXDPI>window.screen.logicalXDPI?e=window.screen.systemXDPI/window.screen.logicalXDPI:window.devicePixelRatio&&(e=window.devicePixelRatio),e},getBoundingScreenRect:function(e,o,n){var t=(/^((?!chrome|android).)*safari/i.test(navigator.userAgent),!!document.documentMode),i=!1,l=(!t&&window.StyleMedia,navigator.userAgent.toLowerCase());l.match("webkit"),l.match("chrome")&&(i=!0);var c=this.getBoundingClientRect(o),s=this.getZoom(),r="undefined"!=typeof window.screenX?window.screenX:window.screenLeft,w="undefined"!=typeof window.screenY?window.screenY:window.screenTop;if(i){var d=r,g=e.screenY-e.clientY,a=-1,u=-1;return a=window.screen.availLeft,u=window.screen.availTop,n&&n.isDebugDropZone&&(console.log("----------------------------"),console.log(n.iframeView),console.log(n.iframeNestedView),console.log(window.screenLeft),console.log(window.screenX),console.log(e.screenX),console.log(e.clientX),console.log(e.offsetX),console.log(e.layerX),console.log(e.x),console.log(d),console.log(c.left),console.log(s),console.log(d+s*c.left),console.log(window.screenTop),console.log(window.screenY),console.log(e.screenY),console.log(e.clientY),console.log(e.offsetY),console.log(e.layerY),console.log(e.y),console.log(g),console.log(c.top),console.log(s),console.log(g+s*c.top),console.log("----------------------------")),{left:d+s*c.left,top:g+s*c.top,width:s*c.width,height:s*c.height,newLeft:c.left,newTop:c.top,newWidth:c.width,newHeight:c.height,screenX:r,screenY:w,availLeft:a,availTop:u,screenWidth:window.screen.width,screenHeight:window.screen.height,mouseClientX:e.clientX,mouseClientY:e.clientY,mouseScreenX:e.screenX,mouseScreenY:e.screenY,zoom:s,isChrome:i}}var d=r,g=e.screenY-Math.ceil(s*e.clientY);return n&&((n.iframeView||n.iframeNestedView)&&(d=e.screenX-Math.ceil(s*e.clientX)),n.isDebugDropZone&&(console.log("----------------------------"),console.log(n.iframeView),console.log(n.iframeNestedView),console.log(window.screenLeft),console.log(window.screenX),console.log(e.screenX),console.log(e.clientX),console.log(e.offsetX),console.log(e.layerX),console.log(e.x),console.log(d),console.log(c.left),console.log(s),console.log(d+s*c.left),console.log(window.screenTop),console.log(window.screenY),console.log(e.screenY),console.log(e.clientY),console.log(e.offsetY),console.log(e.layerY),console.log(e.y),console.log(g),console.log(c.top),console.log(s),console.log(g+s*c.top),console.log("----------------------------"))),{left:d+s*c.left,top:g+s*c.top,width:s*c.width,height:s*c.height}},getBoundingClientRect:function(e){var o=e.getBoundingClientRect();return{left:o.left,top:o.top,width:o.width||e.offsetWidth,height:o.height||e.offsetHeight}},popupWindow:function(e,o,n,t,i,l){var c=window.screenLeft!=undefined?window.screenLeft:window.screenX,s=window.screenTop!=undefined?window.screenTop:window.screenY,r=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,w=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,d=r/2-n/2+c,g=w/2-t/2+s;i&&(g=i),l&&(d=l);var a=window.open(e,o,"scrollbars=yes, width="+n+", height="+t+", top="+g+", left="+d);window.focus&&a.focus()},generatePopupButton:function(e,o,n,t,i,l){var c=window.screenLeft!=undefined?window.screenLeft:window.screenX,s=window.screenTop!=undefined?window.screenTop:window.screenY,r=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,w=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,d=r/2-t/2+c,g=w/2-n/2+s;i&&(g=i),l&&(d=l);var a=window.open(e,"myWindow","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, top="+g+", left="+d+", width="+t+", height="+n);try{if(a){return'<button id="popupWindow" style="opacity:1;" target="_blank" onclick="window.open(\''+e+"', '"+o+"', 'width="+t+", height="+n+", top="+g+", left="+d+"')\"> </button>"}return!1}catch(u){return!1}},calcWatermarkPosition:function(e,o,n,t,i){var l,c,s,r;switch(e=e.split("|"),1===e.length?["LEFT","RIGHT","CENTER"].indexOf(e[0])>-1?(l="CENTER",c=e[0]):(l=e[0],c="CENTER"):["LEFT","RIGHT","CENTER"].indexOf(e[0])>-1?(l=e[1],c=e[0]):(l=e[0],c=e[1]),l){case"TOP":r=0;break;case"BOTTOM":r=n-i-0;break;default:r=(n-i)/2}switch(c){case"LEFT":s=0;break;case"RIGHT":s=o-t-0;break;default:s=(o-t)/2}return{left:s,top:r}}}});
innorix("Agent/ActiveCommandManager",function(t){"use strict";var n=t("klass"),i=t("util"),e=t("CONSTANT/EVENT");return n({constructor:function(t){this.event=t,this.actives=[]},add:function(t){return this.actives.push(t),this.attachEvents(t),this},attachEvents:function(t){var n=this;this.event.emit(e.AGENT_ADD_COMMAND,t),t.getClientDeferred().done(function(){n.event.emit(e.AGENT_DONE_COMMAND,t)}).fail(function(){n.event.emit(e.AGENT_FAIL_COMMAND,t)}).always(function(){n.remove(t),n.event.emit(e.AGENT_COMPLETE_COMMAND,t)})},remove:function(t){return this.has(t)?(this.actives.splice(this.indexOf(t),1),this):this},has:function(t){return-1!==this.indexOf(t)},indexOf:function(t){return this.actives.indexOf(t)},findByUUID:function(t){return i.array.find(this.actives,function(n){return n.uuid===t})},findByDefer:function(t){return i.array.find(this.actives,function(n){return n.getClientDeferred()===t})}})});
innorix("Agent/Agent",function(e){"use strict";var t=e("innoJquery"),o=e("klass"),n=e("util"),a=n.decorator.throttle,i=e("Agent/Client"),r=e("Klass/Event"),s=e("Agent/CommandFactory"),l=e("Agent/ConnectFinder"),d=e("Agent/ActiveCommandManager"),u=e("i18n/lang"),c={ENV:e("CONSTANT/ENV"),EVENT:e("CONSTANT/EVENT")};return o({constructor:function(e){this.event=new r,this.actives=new d(this.event),this.client=new i(e),this.connectFinder=new l(this.client),this.ajaxStatus={retry:0,state:null,alert:!1}},setOption:function(e){this.option=e},setControlBox:function(e){this.controlBox=e},setBaseUrl:function(e){this.client.setBaseUrl(e)},isConnect:function(){return this.client.isConnect()},findConnectUrl:function(e){return this.connectFinder.find(e||[])},callCommand:function(e,o,n){var a=this;n||(n={}),this.option?n.autoCheckVersion=this.option.autoCheckVersion:n.autoCheckVersion=!1;var i=s[e](o,n||{}),r=this.client.send(i,t.proxy(this.deferredCallback,a));return this.actives.add(i),r},callCommandNoHandle:function(e,o,n){var a=this,i=s[e](o,n||{}),r=this.client.sendPending(i,t.proxy(function(){},a));return this.actives.add(i),r},callCommandFallback:function(e,o,a){var i=this,r=e.action,s=JSON.stringify(e.getAjaxParam()),l=n.string.cryptoRandom().toString().substr(2),d="-----------------------------"+l+"\r\n";d+='Content-Disposition: form-data; name="_action"\r\n\r\n',d+=r+"\r\n",d+="-----------------------------"+l+"\r\n",d+='Content-Disposition: form-data; name="_param"\r\n\r\n',d+=s+"\r\n",d+="-----------------------------"+l+"--\r\n";var u=c.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(u=c.ENV.AGENT_HTTPS_URL);var p=new XDomainRequest;p.onload=function(){a(t.parseJSON(p.responseText))},p.ontimeout=function(){},p.onprogress=function(){},p.onerror=function(){var t="";if(null!=i.option&&(i.option.isMobile?(t=i.option.installUrlMobile+"?redirect="+encodeURIComponent(window.location.href),-1!=i.option.installUrlMobile.indexOf("redirect")&&(t=i.option.installUrlMobile)):(t=i.option.installUrl+"?redirect="+encodeURIComponent(window.location.href),-1!=i.option.installUrl.indexOf("redirect")&&(t=i.option.installUrl))),"upload"!=r&&"uploadState"!=r&&"download"!=r&&"downloadState"!=r){if(i.ajaxStatus.retry>=3){if(null!=i.controlBox&&(i.controlBox.state="freeze"),i.ajaxStatus.alert=!1,i.ajaxStatus.retry=0,""!=t)if(i.option.installPopupWindow){var s=n.generatePopupButton(t,"Install Page",i.option.installPopupWindowHeight,i.option.installPopupWindowWidth);0==s&&i.controlBox.emit(c.EVENT.POPUP_BLOCKED)}else window.location.href=t;return!1}i.ajaxStatus.retry++}else{if(i.ajaxStatus.retry>=50){if(null!=i.controlBox&&(i.controlBox.state="freeze"),i.ajaxStatus.alert=!1,i.ajaxStatus.retry=0,""!=t)if(i.option.installPopupWindow){var s=n.generatePopupButton(t,"Install Page",i.option.installPopupWindowHeight,i.option.installPopupWindowWidth);0==s&&i.controlBox.emit(c.EVENT.POPUP_BLOCKED)}else window.location.href=t;return!1}"uploadState"!=r&&"downloadState"!=r||i.ajaxStatus.retry++}i.callCommandFallback(e,o,a)},p.open("POST",u+"/"+o),p.send(d)},openFileDialog:a(function(e,o,n,a){return this.checkVersion(function(){}),this.callCommand("comet","openFileDialog",{license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,mode:e,allowExtension:JSON.stringify(n),path:o,resource:u.resourceGetter("openFileDialog")}).done(a||t.noop)}),openFileDialogFallback:function(e,t,o,n){this.checkVersionFallback(function(){});var a=s.comet("openFileDialog",{license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,mode:e,allowExtension:JSON.stringify(o),path:t,resource:u.resourceGetter("openFileDialog")});this.callCommandFallback(a,"webpage",n)},openFileDialogSingle:a(function(e,o,n,a){return this.checkVersion(function(){}),this.callCommand("comet","openFileDialog",{license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,mode:e,allowExtension:JSON.stringify(n),path:o,resource:u.resourceGetter("openFileDialog"),isAddOneFile:!0}).done(a||t.noop)}),openFileDialogSingleFallback:function(e,t,o,n){this.checkVersionFallback(function(){});var a=s.comet("openFileDialog",{license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,mode:e,allowExtension:JSON.stringify(o),path:t,resource:u.resourceGetter("openFileDialog"),isAddOneFile:!0});this.callCommandFallback(a,"webpage",n)},directoryDialog:a(function(e,o,n,a){return this.checkVersion(function(){}),this.callCommand("comet","directoryDialog",{license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,mode:e,addEmptyDirectory:n,path:o,resource:u.resourceGetter("directoryDialog")}).done(a||t.noop)}),directoryDialogFallback:function(e,t,o,n){this.checkVersionFallback(function(){});var a=s.comet("directoryDialog",{license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,mode:e,addEmptyDirectory:o,path:t,resource:u.resourceGetter("directoryDialog")});this.callCommandFallback(a,"webpage",n)},dirDialog:a(function(e,o){return this.checkVersion(function(){}),this.callCommand("comet","dirDialog",{defaultPath:o,resouce:u.resourceGetter("directoryDialog")}).done(e||t.noop)}),dirDialogFallback:function(e,t){this.checkVersionFallback(function(){});var o=s.comet("dirDialog",{defaultPath:t,resouce:u.resourceGetter("directoryDialog")});this.callCommandFallback(o,"webpage",e)},showDropZone:a(function(e,o){return this.checkVersion(function(){}),this.callCommand("comet","showDropZone",e).done(o||t.noop)}),showDropZoneFallback:function(e,t){this.checkVersionFallback(function(){});var o=s.comet("showDropZone",e);this.callCommandFallback(o,"webpage",t)},showDropState:a(function(e,o){return this.checkVersion(function(){}),this.callCommand("comet","existDropZone",e).done(o||t.noop)}),showDropStateFallback:function(e,t){this.checkVersionFallback(function(){});var o=s.comet("existDropZone",e);this.callCommandFallback(o,"webpage",t)},downloadPathDialog:a(function(e,o){return this.checkVersion(function(){}),this.callCommand("comet","downloadPathDialog",{defaultPath:e,resource:u.resourceGetter("total")}).done(o||t.noop)}),downloadPathDialogFallback:function(e,t){this.checkVersionFallback(function(){});var o=s.comet("downloadPathDialog",{defaultPath:e,resource:u.resourceGetter("total")});this.callCommandFallback(o,"webpage",t)},addLocalFiles:a(function(e,o,n){return this.callCommand("comet","addLocalFiles",{license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,mode:e,filePath:o}).done(n||t.noop)}),addLocalFilesFallback:function(e,t,o){var n=s.comet("addLocalFiles",{license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,mode:e,filePath:t});this.callCommandFallback(n,"webpage",o)},checkVersion:function(e,t){return this.callCommand("base","version").done(function(o){var a=c.ENV.TRAY_VERSION;"Win32"==navigator.platform&&"undefined"!=typeof INNORIX_WIN_VERSION?a=INNORIX_WIN_VERSION:"Linux x86_64"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?a=INNORIX_LINUX_VERSION:"Linux i686"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?a=INNORIX_LINUX_VERSION:"MacIntel"==navigator.platform&&"undefined"!=typeof INNORIX_MAC_VERSION&&(a=INNORIX_MAC_VERSION),e(n.string.versionCompare(o.value,a)>=0,t)}).fail(function(){e(null,t)})},checkOneTimeVersion:function(e,t){return this.callCommand("instant","version").done(function(o){var a=c.ENV.TRAY_VERSION;"Win32"==navigator.platform&&"undefined"!=typeof INNORIX_WIN_VERSION?a=INNORIX_WIN_VERSION:"Linux x86_64"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?a=INNORIX_LINUX_VERSION:"Linux i686"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?a=INNORIX_LINUX_VERSION:"MacIntel"==navigator.platform&&"undefined"!=typeof INNORIX_MAC_VERSION&&(a=INNORIX_MAC_VERSION),e(n.string.versionCompare(o.value,a)>=0,t)}).fail(function(){e(null,t)})},checkVersionNoHandle:function(e,t){return this.callCommandNoHandle("instant","version").done(function(o){var a=c.ENV.TRAY_VERSION;"Win32"==navigator.platform&&"undefined"!=typeof INNORIX_WIN_VERSION?a=INNORIX_WIN_VERSION:"Linux x86_64"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?a=INNORIX_LINUX_VERSION:"Linux i686"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?a=INNORIX_LINUX_VERSION:"MacIntel"==navigator.platform&&"undefined"!=typeof INNORIX_MAC_VERSION&&(a=INNORIX_MAC_VERSION),e(n.string.versionCompare(o.value,a)>=0,t)}).fail(function(){e(null,t)})},getVersionNoHandle:function(e,t){return this.callCommandNoHandle("instant","version").done(function(o){e(o.value,t)}).fail(function(){e(null,t)})},checkAgentInstalledNoHandle:function(e,t){return this.callCommandNoHandle("instant","version").done(function(o){c.ENV.TRAY_VERSION;"Win32"==navigator.platform&&"undefined"!=typeof INNORIX_WIN_VERSION?INNORIX_WIN_VERSION:"Linux x86_64"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?INNORIX_LINUX_VERSION:"Linux i686"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?INNORIX_LINUX_VERSION:"MacIntel"==navigator.platform&&"undefined"!=typeof INNORIX_MAC_VERSION&&INNORIX_MAC_VERSION,e(!0,t)}).fail(function(){e(null,t)})},checkVersionFallback:function(e,t){var o=s.base("version",{});this.callCommandFallback(o,"webpage",e)},checkTrayVersion:function(e){return this.callCommand("base","trayVersion").done(e||t.noop)},checkTrayVersionFallback:function(e){var t=s.base("trayVersion",{});this.callCommandFallback(t,"webpage",e)},getFileExists:function(e){var o=!1,n=c.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(n=c.ENV.AGENT_HTTPS_URL);var a={action:"existPath",path:e};if("undefined"!=typeof FormData){var i=new FormData;i.append("_action","existPath"),i.append("_param",JSON.stringify(a));var r={url:n+"/webpage",method:"POST",async:!1,processData:!1,contentType:!1,dataType:"text",timeout:3e3,data:i};t.ajax(r).done(function(e){"true"==e&&(o=!0)})}return o},checkImageFile:function(e){var o=!1,n=c.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(n=c.ENV.AGENT_HTTPS_URL);var a={action:"checkImageFile",path:e};if("undefined"!=typeof FormData){var i=new FormData;i.append("_action","checkImageFile"),i.append("_param",JSON.stringify(a));var r={url:n+"/webpage",method:"POST",async:!1,processData:!1,contentType:!1,dataType:"text",timeout:3e3,data:i};t.ajax(r).done(function(e){"true"==e&&(o=!0)})}return o},getDownloadPath:function(e){return this.callCommand("retry","getDownloadPath").done(e||t.noop)},getDownloadPathFallback:function(e){var t=s.retry("getDownloadPath",{});this.callCommandFallback(t,"webpage",e)},getFolderPath:function(e,o){return this.callCommand("comet","selectFolderDialog",{id:e.id}).done(o||t.noop)},getFolderPathFallback:function(e,t){var o=s.comet("selectFolderDialog",{id:e.id});this.callCommandFallback(o,"webpage",t)},messageCount:function(e){return this.callCommand("retry","messageCount",{messageCount:e})},upload:function(e,o,a,i,r){if(null!=a.incompleteTransfer&&(i=!0,a.incompleteTransfer=null),1==a.resumeCondition&&(i=!0),1!=a.isSliceTransfer)for(var s in o)o.hasOwnProperty(s)&&(o[s].uniqueFileName="");var l=a.sliceSize;0!=a.uploadSliceSize&&(l=a.uploadSliceSize);var d=a.sessionCount;0!=a.uploadSessionCount&&(d=a.uploadSessionCount);var p=a.resumeType;""!=a.resumeUploadType&&(p=a.resumeUploadType);var m=a.uploadUrl;t.isArray(a.uploadUrl)&&(m=JSON.stringify(a.uploadUrl));var f=a.maxMassFileListCount<o.length,h=0;f&&(h=this.controlBox.getTotalSize());var S=null,N=null;if(r.list_thumbnail_agent.length>0)for(var I in r.list_thumbnail_agent)if(r.list_thumbnail_agent.hasOwnProperty(I)){N||(N=[]);var g=r.list_thumbnail_agent[I],C=[];if(isNaN(parseInt(g.index)))for(var s=0;s<o.length;s++)C.push(s);else C.push(parseInt(g.index));N.push({width:g.width,height:g.height,baseLine:g.baseline,index:C})}if(r.list_watermark_agent.length>0)for(var I in r.list_watermark_agent)if(r.list_watermark_agent.hasOwnProperty(I)){S||(S={});var w=r.list_watermark_agent[I],y=[];if(isNaN(parseInt(w.index)))for(var s=0;s<o.length;s++)y.push(s);else y.push(parseInt(w.index));var E=w.position.split("|"),T="",v="";1==E.length?["LEFT","RIGHT","CENTER"].indexOf(E[0])>-1?(T="CENTER",v=E[0]):(T=E[0],v="CENTER"):["LEFT","RIGHT","CENTER"].indexOf(E[0])>-1?(T=E[1],v=E[0]):(T=E[0],v=E[1]),S={url:w.markImgUrl,position_x:v,position_y:T,index:y}}return this.controlBox.cleanAgentImageCommand(),this.callCommand("transfer","upload",{transferID:e,transferServer:m,files:o||[],cookie:a.cookie,customHeader:a.customHeader,postData:a.postData,retryCount:a.retryCount,retryDelay:a.retryDelay,resume:!!i,limitRate:a.limitRate>0?a.limitRate:null,useCrypt:!!a.useCrypt,encryptMetaData:a.encryptMetaData,monitorServer:a.monitorServer,domain:n.url.getCurrentPage(),userid:a.userid,UserPart:a.UserPart,custom:t.extend({webpage:!0},a.custom||{}),isHighSpeed:a.isHighSpeed,useProxy:a.useProxy,timeout:a.timeout,resumeType:p,resumeId:a.resumeId,isSliceTransfer:a.isSliceTransfer,isPresignedUrl:a.isPresignedUrl,hideClientPath:a.hideClientPath,skipErrorFile:a.skipErrorFile,showTransferFileStatus:a.showTransferFileStatus,virtualTransfer:a.virtualTransfer,isSpeedCheck:!!a.isSpeedCheck,useSmoothGraph:a.useSmoothGraph,charset:a.charset,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null,advanced:{security:a.security,integrity:a.integrity},isCompress:a.isCompress,license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,mode:a.transferMode,sliceSize:l,sessionCount:d,mrtVersion2:a.mrtVersion2,multipartMrt:a.multipartMrt,useDb:a.useDb,massFileTransfer:f,totalFileSize:h,browserCheckTime:a.browserCheckTime,uploadCompletedEvent:a.uploadCompletedEvent,resource:u.resourceGetter("total"),thumbnail:N,watermark:S})},uploadFallback:function(e,o,a,i,r,l){if(null!=a.incompleteTransfer&&(i=!0,a.incompleteTransfer=null),1==a.resumeCondition&&(i=!0),1!=a.isSliceTransfer)for(var d in o)o.hasOwnProperty(d)&&(o[d].uniqueFileName="");var p=a.sliceSize;0!=a.uploadSliceSize&&(p=a.uploadSliceSize);var m=a.sessionCount;0!=a.uploadSessionCount&&(m=a.uploadSessionCount);var f=a.resumeType;""!=a.resumeUploadType&&(f=a.resumeUploadType);var h=a.uploadUrl;t.isArray(a.uploadUrl)&&(h=JSON.stringify(a.uploadUrl));var S=a.maxMassFileListCount<o.length,N=0;S&&(N=this.controlBox.getTotalSize());var I=s.transfer("upload",{transferID:e,transferServer:h,files:o||[],cookie:a.cookie,customHeader:a.customHeader,postData:a.postData,retryCount:a.retryCount,retryDelay:a.retryDelay,resume:!!i,limitRate:a.limitRate>0?a.limitRate:null,useCrypt:!!a.useCrypt,encryptMetaData:a.encryptMetaData,monitorServer:a.monitorServer,domain:n.url.getCurrentPage(),userid:a.userid,UserPart:a.UserPart,custom:t.extend({webpage:!0},a.custom||{}),isHighSpeed:a.isHighSpeed,isSliceTransfer:a.isSliceTransfer,isPresignedUrl:a.isPresignedUrl,hideClientPath:a.hideClientPath,useProxy:a.useProxy,timeout:a.timeout,resumeType:f,resumeId:a.resumeId,skipErrorFile:a.skipErrorFile,showTransferFileStatus:a.showTransferFileStatus,virtualTransfer:a.virtualTransfer,isSpeedCheck:!!a.isSpeedCheck,useSmoothGraph:a.useSmoothGraph,charset:a.charset,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null,advanced:{security:a.security,integrity:a.integrity},isCompress:a.isCompress,license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,mode:a.transferMode,sliceSize:p,sessionCount:m,mrtVersion2:a.mrtVersion2,multipartMrt:a.multipartMrt,useDb:a.useDb,massFileTransfer:S,totalFileSize:N,browserCheckTime:a.browserCheckTime,uploadCompletedEvent:a.uploadCompletedEvent,resource:u.resourceGetter("total")});this.callCommandFallback(I,"webpage",l)},uploadState:function(e){return this.callCommand("retry","uploadState",{transferID:e})},uploadStateFallback:function(e,t){var o=s.retry("uploadState",{transferID:e});this.callCommandFallback(o,"webpage",t)},uploadCancel:function(e){return this.callCommand("base","uploadCancel",{transferID:e})},uploadCancelFallback:function(e,t){var o=s.base("uploadCancel",{transferID:e});this.callCommandFallback(o,"webpage",t)},download:function(e,o,a,i){var r=!1,s=a.sliceSize,l=o[0];l.isCrypt&&(r=l.isCrypt),l.sliceSize&&(s=l.sliceSize),0!=a.downloadSliceSize&&(s=a.downloadSliceSize);var d=JSON.parse(JSON.stringify(o));for(var p in d)d.hasOwnProperty(p)&&(d[p].fixedFileSize&&(d[p].fileSize=d[p].fixedFileSize),1==a.folderIntact&&(d[p].printFileName=d[p].printFileName,d[p].subFolder=d[p].rootName));var m=a.sessionCount;0!=a.downloadSessionCount&&(m=a.downloadSessionCount);var f=a.resumeType;""!=a.resumeDownloadType&&(f=a.resumeDownloadType);var h=a.maxMassFileListCount<o.length,S=0;return h&&(S=this.controlBox.getTotalSize()),this.callCommand("transfer","download",{transferID:e,downloadPath:a.downloadPath,files:d,cookie:a.cookie,retryCount:a.retryCount,retryDelay:a.retryDelay,isStream:a.isStream,resume:!!i,limitRate:a.limitRate>0?a.limitRate:null,useCrypt:r,monitorServer:a.monitorServer,viaUrl:a.viaUrl,domain:n.url.getCurrentPage(),userid:a.userid,UserPart:a.UserPart,custom:t.extend({webpage:!0},a.custom||{}),isHighSpeed:a.isHighSpeed,isSliceTransfer:a.isSliceTransfer,isPresignedUrl:a.isPresignedUrl,useProxy:a.useProxy,timeout:a.timeout,useDownloadAction:a.useDownloadAction,useOpenFolder:a.useOpenFolder,useExecute:a.useExecute,skipErrorFile:a.skipErrorFile,showTransferFileStatus:a.showTransferFileStatus,virtualTransfer:a.virtualTransfer,isSpeedCheck:!!a.isSpeedCheck,serverInfoUrl:a.downloadServerInfoUrl,customHeader:a.customHeader,postData:a.postData,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null,downloadIntegrity:a.downloadIntegrity,downloadIntegrityFile:a.downloadIntegrityFile,advanced:{security:a.security,integrity:a.integrity},"target-action":f,resumeType:f,resumeId:a.resumeId,license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,mode:a.transferMode,sliceSize:s,sessionCount:m,mrtVersion2:a.mrtVersion2,multipartMrt:a.multipartMrt,useDb:a.useDb,massFileTransfer:h,totalFileSize:S,browserCheckTime:a.browserCheckTime,downloadCompletedEvent:a.downloadCompletedEvent,resource:u.resourceGetter("total")})},downloadFallback:function(e,o,a,i,r){var l=!1,d=a.sliceSize,p=o[0];p.isCrypt&&(l=p.isCrypt),p.sliceSize&&(d=p.sliceSize),0!=a.downloadSliceSize&&(d=a.downloadSliceSize);var m=JSON.parse(JSON.stringify(o));for(var f in m)m.hasOwnProperty(f)&&(m[f].fixedFileSize&&(m[f].fileSize=m[f].fixedFileSize),1==a.folderIntact&&(m[f].printFileName=m[f].printFileName,m[f].subFolder=m[f].rootName));var h=a.sessionCount;0!=a.downloadSessionCount&&(h=a.downloadSessionCount);var S=a.resumeType;""!=a.resumeDownloadType&&(S=a.resumeDownloadType);var N=a.maxMassFileListCount<o.length,I=0;N&&(I=this.controlBox.getTotalSize());var g=s.transfer("download",{transferID:e,downloadPath:a.downloadPath,files:m,cookie:a.cookie,retryCount:a.retryCount,retryDelay:a.retryDelay,isStream:a.isStream,resume:!!i,limitRate:a.limitRate>0?a.limitRate:null,useCrypt:l,monitorServer:a.monitorServer,viaUrl:a.viaUrl,domain:n.url.getCurrentPage(),userid:a.userid,UserPart:a.UserPart,custom:t.extend({webpage:!0},a.custom||{}),isHighSpeed:a.isHighSpeed,isSliceTransfer:a.isSliceTransfer,isPresignedUrl:a.isPresignedUrl,useProxy:a.useProxy,timeout:a.timeout,useDownloadAction:a.useDownloadAction,useOpenFolder:a.useOpenFolder,useExecute:a.useExecute,skipErrorFile:a.skipErrorFile,showTransferFileStatus:a.showTransferFileStatus,virtualTransfer:a.virtualTransfer,isSpeedCheck:!!a.isSpeedCheck,serverInfoUrl:a.downloadServerInfoUrl,customHeader:a.customHeader,postData:a.postData,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null,downloadIntegrity:a.downloadIntegrity,downloadIntegrityFile:a.downloadIntegrityFile,advanced:{security:a.security,integrity:a.integrity},"target-action":S,resumeType:S,resumeId:a.resumeId,license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,mode:a.transferMode,sliceSize:d,sessionCount:h,mrtVersion2:a.mrtVersion2,multipartMrt:a.multipartMrt,useDb:a.useDb,massFileTransfer:N,totalFileSize:I,browserCheckTime:a.browserCheckTime,downloadCompletedEvent:a.downloadCompletedEvent,resource:u.resourceGetter("total")});this.callCommandFallback(g,"webpage",r)},downloadState:function(e){return this.callCommand("retry","downloadState",{transferID:e})},downloadStateFallback:function(e,t){var o=s.retry("downloadState",{transferID:e});this.callCommandFallback(o,"webpage",t)},downloadCancel:function(e){return this.callCommand("retry","downloadCancel",{transferID:e})},downloadCancelFallback:function(e,t){var o=s.retry("downloadCancel",{transferID:e});this.callCommandFallback(o,"webpage",t)},immediateOpen:function(e,o,a,i){var r=!1,s=a.sliceSize,l=o[0];l.isCrypt&&(r=l.isCrypt),l.sliceSize&&(s=l.sliceSize),0!=a.downloadSliceSize&&(s=a.downloadSliceSize);var d=JSON.parse(JSON.stringify(o));for(var p in d)d.hasOwnProperty(p)&&(d[p].fixedFileSize&&(d[p].fileSize=d[p].fixedFileSize),1==a.folderIntact&&(d[p].printFileName=d[p].printFileName,d[p].subFolder=d[p].rootName));var m=a.sessionCount;0!=a.downloadSessionCount&&(m=a.downloadSessionCount);var f="base";return a.skipDownloadOpenCheck&&(f="baseinstant"),this.callCommand(f,"immediateOpen",{transferID:e,files:d,cookie:a.cookie,retryCount:a.retryCount,retryDelay:a.retryDelay,isStream:a.isStream,resume:!!i,limitRate:a.limitRate>0?a.limitRate:null,monitorServer:a.monitorServer,userid:a.userid,UserPart:a.UserPart,custom:t.extend({webpage:!0},a.custom||{}),isHighSpeed:a.isHighSpeed,useProxy:a.useProxy,timeout:a.timeout,useDownloadAction:a.useDownloadAction,skipErrorFile:a.skipErrorFile,showTransferFileStatus:a.showTransferFileStatus,serverInfoUrl:a.downloadServerInfoUrl,customHeader:a.customHeader,postData:a.postData,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null,domain:n.url.getLocationOrigin(),license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,mode:a.transferMode,sliceSize:s,sessionCount:m,resource:u.resourceGetter("total"),useCrypt:r,downloadIntegrity:a.downloadIntegrity,downloadIntegrityFile:a.downloadIntegrityFile,isSliceTransfer:a.isSliceTransfer,isPresignedUrl:a.isPresignedUrl,mrtVersion2:a.mrtVersion2,multipartMrt:a.multipartMrt,useDb:a.useDb,browserCheckTime:a.browserCheckTime})},immediateOpenFallback:function(e,o,a,i,r){var l=!1,d=a.sliceSize,p=o[0];p.isCrypt&&(l=p.isCrypt),p.sliceSize&&(d=p.sliceSize),0!=a.downloadSliceSize&&(d=a.downloadSliceSize);var m=JSON.parse(JSON.stringify(o));for(var f in m)m.hasOwnProperty(f)&&(m[f].fixedFileSize&&(m[f].fileSize=m[f].fixedFileSize),1==a.folderIntact&&(m[f].printFileName=m[f].printFileName,m[f].subFolder=m[f].rootName));var h=a.sessionCount;0!=a.downloadSessionCount&&(h=a.downloadSessionCount);var S=s.base("immediateOpen",{transferID:e,files:o,cookie:a.cookie,retryCount:a.retryCount,retryDelay:a.retryDelay,isStream:a.isStream,resume:!!i,limitRate:a.limitRate>0?a.limitRate:null,monitorServer:a.monitorServer,userid:a.userid,UserPart:a.UserPart,custom:t.extend({webpage:!0},a.custom||{}),isHighSpeed:a.isHighSpeed,useProxy:a.useProxy,timeout:a.timeout,useDownloadAction:a.useDownloadAction,skipErrorFile:a.skipErrorFile,showTransferFileStatus:a.showTransferFileStatus,serverInfoUrl:a.downloadServerInfoUrl,customHeader:a.customHeader,postData:a.postData,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null,domain:n.url.getLocationOrigin(),license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE,useCrypt:l,downloadIntegrity:a.downloadIntegrity,downloadIntegrityFile:a.downloadIntegrityFile,mode:a.transferMode,sliceSize:d,sessionCount:h,isSliceTransfer:a.isSliceTransfer,isPresignedUrl:a.isPresignedUrl,mrtVersion2:a.mrtVersion2,multipartMrt:a.multipartMrt,useDb:a.useDb,browserCheckTime:a.browserCheckTime,resource:u.resourceGetter("total")});this.callCommandFallback(S,"webpage",r)},openDownloadFolder:function(e,o){var a=c.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(a=c.ENV.AGENT_HTTPS_URL);var i={action:"openFolder",folderPath:o.downloadPath};if("undefined"==typeof FormData){var r=n.string.cryptoRandom().toString().substr(2),s="-----------------------------"+r+"\r\n";s+='Content-Disposition: form-data; name="_action"\r\n\r\n',s+="openFolder\r\n",s+="-----------------------------"+r+"\r\n",s+='Content-Disposition: form-data; name="_param"\r\n\r\n',s+=JSON.stringify(i)+"\r\n",s+="-----------------------------"+r+"--\r\n";var l=new XDomainRequest;l.onload=function(){e(t.parseJSON(l.responseText))},l.ontimeout=function(){},l.onprogress=function(){},l.open("POST",a+"/webpage"),l.send(s)}else{var d=new FormData;d.append("_action","openFolder"),d.append("_param",JSON.stringify(i));var o={url:a+"/webpage",method:"POST",processData:!1,contentType:!1,dataType:"json",data:d,success:e};t.ajax(o)}},uploadSpeedCheck:function(e,o,a,i,r,s,l){var d=c.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(d=c.ENV.AGENT_HTTPS_URL);var u=e;t.isArray(e)&&(u=JSON.stringify(e));var p={action:"uploadSpeedCheck",url:u,useProxy:i,isSave:void 0!==r&&r,discount:void 0!==s?s:0,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null};if(0!=o&&(p.sessionCount=o),0!=a&&(p.speedCheckTime=a),"undefined"==typeof FormData){var m=n.string.cryptoRandom().toString().substr(2),f="-----------------------------"+m+"\r\n";f+='Content-Disposition: form-data; name="_action"\r\n\r\n',f+="uploadSpeedCheck\r\n",f+="-----------------------------"+m+"\r\n",f+='Content-Disposition: form-data; name="_param"\r\n\r\n',f+=JSON.stringify(p)+"\r\n",f+="-----------------------------"+m+"--\r\n";var h=new XDomainRequest;h.onload=function(){l(t.parseJSON(h.responseText))},h.ontimeout=function(){},h.onprogress=function(){},h.open("POST",d+"/speedcheck"),h.send(f)}else{var S=new FormData;S.append("_action","uploadSpeedCheck"),S.append("_param",JSON.stringify(p));var N={url:d+"/speedcheck",method:"POST",processData:!1,contentType:!1,dataType:"json",data:S,success:l};t.ajax(N)}},downloadSpeedCheck:function(e,o,n,a,i,r,s,l,d){var u=c.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(u=c.ENV.AGENT_HTTPS_URL);var p=e;t.isArray(e)&&(p=JSON.stringify(e));var m={action:"downloadSpeedCheck",url:p,fileSize:o,useProxy:r,isStream:i,isSave:void 0!==s&&s,discount:void 0!==l?l:0,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null};0!=n&&(m.sessionCount=n),0!=a&&(m.speedCheckTime=a);var f=new FormData;f.append("_action","downloadSpeedCheck"),f.append("_param",JSON.stringify(m));var h={url:u+"/speedcheck",method:"POST",processData:!1,contentType:!1,dataType:"json",data:f,success:d};t.ajax(h)},downloadSpeedCheckFallback:function(e,o,a,i,r,s,l,d,u){var p=c.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(p=c.ENV.AGENT_HTTPS_URL);var m=e;t.isArray(e)&&(m=JSON.stringify(e));var f={action:"downloadSpeedCheck",url:m,fileSize:o,useProxy:s,isStream:r,isSave:void 0!==l&&l,discount:void 0!==d?d:0,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null};0!=a&&(f.sessionCount=a),0!=i&&(f.speedCheckTime=i);var h=n.string.cryptoRandom().toString().substr(2),S="-----------------------------"+h+"\r\n";S+='Content-Disposition: form-data; name="_action"\r\n\r\n',S+="downloadSpeedCheck\r\n",S+="-----------------------------"+h+"\r\n",S+='Content-Disposition: form-data; name="_param"\r\n\r\n',S+=JSON.stringify(f)+"\r\n",S+="-----------------------------"+h+"--\r\n";var N=new XDomainRequest;N.onload=function(){u(t.parseJSON(N.responseText))},N.ontimeout=function(){},N.onprogress=function(){},N.open("POST",p+"/speedcheck"),N.send(S)},downloadPause:function(e){return this.callCommand("base","downloadPause",{transferID:e})},downloadPauseFallback:function(e,t){var o=s.base("downloadPause",{transferID:e});this.callCommandFallback(o,"webpage",t)},uploadPause:function(e){return this.callCommand("base","uploadPause",{transferID:e})},uploadPauseFallback:function(e,t){var o=s.base("uploadPause",{transferID:e});this.callCommandFallback(o,"webpage",t)},getIncompleteTransfer:function(e,o,a){return void 0!==a&&null!=a||(a=""),this.callCommand("base","getResumeListInfo",{domain:n.url.getCurrentPage(),isUpload:o,resumeId:a}).done(e||t.noop)},getIncompleteTransferFallback:function(e,t,o){void 0!==o&&null!=o||(o="");var a=s.base("getResumeListInfo",{domain:n.url.getCurrentPage(),isUpload:t,resumeId:o});this.callCommandFallback(a,"webpage",e)},deleteIncompleteTransfer:function(e,o,a){return void 0!==a&&null!=a||(a=""),this.callCommand("base","removeResumeListInfo",{domain:n.url.getCurrentPage(),isUpload:o,resumeId:a}).done(e||t.noop)},deleteIncompleteTransferFallback:function(e,t,o){void 0!==o&&null!=o||(o="");var a=s.base("removeResumeListInfo",{domain:n.url.getCurrentPage(),isUpload:t,resumeId:o});this.callCommandFallback(a,"webpage",e)},execute:function(e){if(e.hasOwnProperty("filePath"))return this.callCommand("base","execute",{path:e.filePath,license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE})},executeFallback:function(e,t){if(e.hasOwnProperty("filePath")){var o=s.base("execute",{path:e.filePath,license:c.ENV.LICENSE,signature:c.ENV.SIGNATURE});this.callCommandFallback(o,"webpage",t)}},deferredCallback:function(e,t){var o=t.action,a=t.clientDefer.state(),i="";if(this.option&&(this.option.isMobile?(i=this.option.installUrlMobile+"?redirect="+encodeURIComponent(window.location.href),-1!=this.option.installUrlMobile.indexOf("redirect")&&(i=this.option.installUrlMobile)):(i=this.option.installUrl+"?redirect="+encodeURIComponent(window.location.href),-1!=this.option.installUrl.indexOf("redirect")&&(i=this.option.installUrl))),!this.controlBox)return!1;if(t.param&&t.param.notifyReady&&(this.controlBox.notifyReadyEvent=!0,this.controlBox.compareTrayVersion()),"freeze"==this.controlBox.state)return!1;if("ready"!=this.controlBox.state&&"rejected"==a){if(this.controlBox.state="freeze",0==this.controlBox.getInstallCheck())if(this.option.installPopupWindow){var r=n.generatePopupButton(i,"Install Page",this.option.installPopupWindowHeight,this.option.installPopupWindowWidth);0==r&&this.controlBox.emit(c.EVENT.POPUP_BLOCKED)}else window.location.href=i;return!1}if(this.ajaxStatus.state=null,"rejected"==a||"pending"==a)if("upload"!=o&&"uploadState"!=o&&"download"!=o&&"downloadState"!=o){if(this.ajaxStatus.retry>=3){if(this.controlBox.state="freeze",this.option.autoHtmlMode)return!1;if(this.option.installPopupWindow){var r=n.generatePopupButton(i,"Install Page",this.option.installPopupWindowHeight,this.option.installPopupWindowWidth);0==r&&this.controlBox.emit(c.EVENT.POPUP_BLOCKED)}else window.location.href=i;return!1}0==this.ajaxStatus.alert&&(this.ajaxStatus.alert=!0),this.ajaxStatus.retry++}else{if(this.ajaxStatus.retry>=50){if(this.controlBox.state="freeze",this.option.installPopupWindow){var r=n.generatePopupButton(i,"Install Page",this.option.installPopupWindowHeight,this.option.installPopupWindowWidth);0==r&&this.controlBox.emit(c.EVENT.POPUP_BLOCKED)}else window.location.href=i;return!1}"uploadState"!=o&&"downloadState"!=o||this.ajaxStatus.retry++}else this.ajaxStatus.alert=!1,this.ajaxStatus.retry=0},licenseNotValidate:function(e,t){1==e?alert(u("license.unauth")):2==e?alert(u("license.end")):3==e?alert(u("license.mode.invalid")):void 0===e&&"immediateOpen"==t?alert(u("agent.exception.immediateOpen.0")):alert(u("license.invalid"))}})});
innorix("Agent/Client",function(e){"use strict";var t=e("innoJquery"),n={method:"POST",processData:!1,contentType:!1,dataType:"json"},r={method:"POST",processData:!1,contentType:!1,async:!1,dataType:"json"};return e("klass")({constructor:function(e){this.url=e?this.makeUrl(e):null},isConnect:function(){return!!this.url},setBaseUrl:function(e){return this.url=this.makeUrl(e),this},getUrl:function(e){return this.url},makeUrl:function(e){return e+"/webpage"},send:function(e,n){var r=t.Deferred();return e.setClientDeferred(r),this.request(e,n),r},sendPending:function(e,n){var r=t.Deferred();return e.setClientDeferred(r),this.requestPending(e,n),r},request:function(e,t){var n=this.makeAjaxParam(e.action,e.getAjaxParam()),r=this.makeAjaxOption(e.getAjaxOption(),n);e.handle(this.requestGenerator(e.getClientDeferred(),r),t)},requestPending:function(e,t){var n=this.makeAjaxParam(e.action,e.getAjaxParam()),r=this.makeAjaxOptionPending(e.getAjaxOption(),n);e.handle(this.requestGenerator(e.getClientDeferred(),r),t)},makeAjaxOption:function(e,r){return t.extend({url:this.url,data:r},n,e||{})},makeAjaxOptionPending:function(e,n){return t.extend({url:this.url,data:n},r,e||{})},makeAjaxParam:function(e,t){var n=new FormData;return n.append("_action",e),n.append("_param",JSON.stringify(t)),n},requestGenerator:function(e,n){return function(){return t.ajax(n)}}})});
innorix("Agent/Command",function(t){"use strict";var e=t("innoJquery"),n=t("klass"),i=t("util");return n({constructor:function(t,e,n){this.action=t,this.param=e||{},this.uuid=i.string.generateUUID(),this.handler=null,this.clientDefer=null,this.ajaxOption=n||{}},setHandler:function(t){return this.handler=t,this},setClientDeferred:function(t){return this.clientDefer=t,this},getClientDeferred:function(){if(!this.clientDefer)throw'not exists client deferred. :"'+this.action+'"';return this.clientDefer},handle:function(t,e){return this.handler.handle(this.clientDefer,t,this,e)},getAjaxOption:function(){var t=this.ajaxOption;return this.handler&&this.handler.getAjaxOption&&e.extend(t,this.handler.getAjaxOption()),t},getAjaxParam:function(){var t={action:this.action,uuid:this.uuid};return this.handler&&this.handler.getAjaxParam&&e.extend(t,this.handler.getAjaxParam(),this.param),t}})});
innorix("Agent/CommandFactory",function(n){"use strict";var e=n("Agent/Command"),r=n("Agent/CommandHandler/Base"),t=n("Agent/CommandHandler/Transfer"),a=n("Agent/CommandHandler/Comet"),o=n("Agent/CommandHandler/Retry"),d=n("Agent/CommandHandler/Instant"),s=n("Agent/CommandHandler/BaseInstant");return{base:function(n,t){var a=new e(n,t);return a.setHandler(new r),a},transfer:function(n,r){var a=new e(n,r);return a.setHandler(new t),a},comet:function(n,r){var t=new e(n,r);return t.setHandler(new a),t},retry:function(n,r){var t=new e(n,r);return t.setHandler(new o),t},instant:function(n,r){var t=new e(n,r);return t.setHandler(new d),t},baseinstant:function(n,r){var t=new e(n,r);return t.setHandler(new s),t},connect:function(n){var t=new e("version",null,{url:n});return t.setHandler(new r),t}}});
innorix("Agent/ConnectFinder",function(n){"use strict";var e=n("innoJquery"),t=n("util"),r=n("klass"),o=n("Agent/CommandFactory");return r({constructor:function(n){this.client=n,this.foundBaseUrl=t.cookie.get("__irx-connected-url__")||null},setClient:function(n){this.client=n},find:function(n){var r=e.Deferred(),o=this,i=function(n){t.cookie.set("__irx-connected-url__",n),o.foundBaseUrl=n,r.resolve(o.foundBaseUrl)};return this.foundBaseUrl?this.connect(this.foundBaseUrl).then(null,function(){return o.findUrlByPorts(n).fail(function(){r.reject()})}).done(i):this.findUrlByPorts(n).done(i).fail(function(){r.reject()}),r},findUrlByPorts:function(n){var r=e.Deferred(),o=this,i=[];return e.each(n,function(n,e){i.push(o.connect(o.makeBaseUrl(e,!1))),i.push(o.connect(o.makeBaseUrl(e,!0)))}),t.promise.race(i).done(function(n){r.resolve(n)}).fail(function(){r.reject()}),r},makeBaseUrl:function(n,e){return(e?"https":"http")+"://127.0.0.1:"+n},connect:function(n){var t=this.client,r=o.connect(t.makeUrl(n)),i=e.Deferred();return t.send(r).done(function(e){e.value?i.resolve(n):i.reject()}).fail(function(){i.reject()}),i}})});
innorix("AgentUpdater/Agent",function(e){"use strict";var t=e("klass"),n=e("util"),r=e("Agent/Agent"),i=e("AgentUpdater/Client"),a=e("CONSTANT/ENV");return t([r],{constructor:function(e){r.call(this,e),this.client=new i(e),this.connectFinder.setClient(this.client)},update:function(e,t){return this.callCommand("base","update",{version:a.TRAY_VERSION,transferID:n.string.generateUUID(),downloadUrl:e,printFileName:n.string.getFileName(e),transferType:"download",isStream:t||!1,resume:!1,domain:n.url.getLocationOrigin()})},updateExecute:function(){return this.callCommand("base","updateExecute",{version:a.TRAY_VERSION,transferID:n.string.generateUUID()})}})});
innorix("AgentUpdater/AgentUpdater",function(t){"use strict";var e=t("innoJquery"),n=t("klass"),i=t("AgentUpdater/Agent"),s=t("Klass/Event"),a=t("AgentUpdater/View/MessageBox"),o=t("singleton/agent"),r=t("CONSTANT/EVENT"),c=t("CONSTANT/UPDATE_STATE");return n([s],{constructor:function(t){s.call(this),this.agent=new i(t),this.messageBox=new a(this),this.on(r.UPDATE_PATCH_EXECUTE,e.proxy(this.onPatchExecute,this))},setAgentBaseUrl:function(t){this.agent.setBaseUrl(t)},patchDownloadOrExecute:function(t,e){var n=this;return this.agent.update(t,e).done(function(t){t.isDownload===c.ALREADY_FILE&&n.agent.updateExecute().done(function(){n.emit(r.UPDATE_PATCH_EXECUTE)})})},onPatchExecute:function(){var t=this,e=setInterval(function(){o.checkVersion(function(n){null!==n&&(t.emit(r.UPDATE_PATCH_COMPLETE),clearInterval(e))})},3e3)}})});
innorix("AgentUpdater/Client",function(n){"use strict";return n("klass")([n("Agent/Client")],{makeUrl:function(n){return n+"/update"}})});
innorix("HTML/HTML",function(e){"use strict";var t=e("innoJquery"),r=e("klass"),a=e("util"),n=(e("i18n/lang"),e("server")),i=e("CONSTANT/TRANSFER_STATE"),o={ENV:e("CONSTANT/ENV"),EVENT:e("CONSTANT/EVENT")};return r({constructor:function(){this.speedCheck=!1,this.uploader={},this.fileIndex=0,this.showAnimationServer=!1},openFileDialog:function(e,r,a,n,i){var o=this,s=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);i.find(".irx-hidden-input").remove();var l=t("<input>").addClass("irx-hidden-input").attr("type","file").attr("multiple","multiple");if(a){var f="";if(a.length>0)for(var u=0;u<a.length;++u)f+="."+a[u]+", ";else if("object"==typeof a)for(var d in a)if(a[d].length>0)for(var u=0;u<a[d].length;++u)f+="."+a[d][u]+", ";""!=l&&l.attr("accept",f)}l.css({position:"absolute",top:0,left:0,width:0,height:0}),l.bind("change",function(){var e=o.parseAgentFileType(t(this).prop("files"));n({value:e}),t(this).remove()}),l.appendTo(i),s?setTimeout(function(){l.click()},100):l.click()},openFileDialogSingle:function(e,r,a,n,i){var o=this;i.find(".irx-hidden-input").remove();var s=t("<input>").addClass("irx-hidden-input").attr("type","file");if(a){var l="";if(a.length>0)for(var f=0;f<a.length;++f)l+="."+a[f]+", ";else if("object"==typeof a)for(var u in a)if(a[u].length>0)for(var f=0;f<a[u].length;++f)l+="."+a[u][f]+", ";""!=s&&s.attr("accept",l)}s.css({position:"absolute",top:0,left:0,width:0,height:0}),s.on("change",function(){var e=o.parseAgentFileType(t(this).prop("files"));n({value:e}),t(this).remove()}),s.appendTo(i),s.click()},directoryDialog:function(e,r,a){var n=this;a.find(".irx-hidden-input").remove();var i=t("<input>").addClass("irx-hidden-input").attr("type","file").attr("multiple","multiple").attr("webkitdirectory","");i.css({position:"absolute",top:0,left:0,width:0,height:0}),i.on("change",function(){var e=n.parseAgentFileType(t(this).prop("files"));r({value:e}),t(this).remove()}),i.appendTo(a),i.click()},parseAgentFileType:function(e){for(var t=[],r="",n=0;n<e.length;n++)r=a.string.generateUUID(),t.push({basePath:"",filePath:""+e[n].name,fileSize:e[n].size,id:r,printFileName:e[n].name,fileExtType:a.string.getFileExtType(e[n].name).toLowerCase(),rootName:"",folderName:"",rowID:r,selected:!1,transferType:"upload",file:e[n]});return t},htmlUpload:function(e,t,r,a){r.draggableTransferWindow&&0==r.iframeView&&a.views.initDraggable();var n=this;this.uploader.files=e,this.fileIndex=0,this.uploader.controlBox=t,this.uploader.option=r,this.uploader.manager=a,this.uploader.errorCount=0,this.uploader.transferData={transferID:a.lastTransferring.id,files:[],totalSize:0},this.uploader.transferringSessionCount=0,this.uploader.lastTimestamp=Date.now(),this.uploader.displayTimestamp=Date.now(),!1===this.speedCheck?this.uploadSpeedCheck(r).done(function(){n.speedCheck=!0,n.getServerInfo(e,t,r,a),a.emit(o.EVENT.TRANSFER_UPLOAD_CREATE,a.lastTransferring.lastStatus)}).fail(function(i){n.getServerInfo(e,t,r,a),a.emit(o.EVENT.TRANSFER_UPLOAD_CREATE,a.lastTransferring.lastStatus)}):(n.getServerInfo(),a.emit(o.EVENT.TRANSFER_UPLOAD_CREATE,a.lastTransferring.lastStatus))},htmlAjaxOption:function(e){var r=this,a=t("meta[name='_csrf']").attr("content"),n=t("meta[name='_csrf_header']").attr("content");return{url:this.uploader.option.uploadUrl,data:e,method:"POST",processData:!1,contentType:!1,dataType:"text",beforeSend:function(e){e.setRequestHeader("html5",!0),r.uploader.option.useCsrf&&e.setRequestHeader(n,a);for(var t in r.uploader.option.customHeader)e.setRequestHeader(t,r.uploader.option.customHeader[t])}}},uploadSpeedCheck:function(){var e=new FormData;return e.append("_action","speedCheck"),t.ajax(this.htmlAjaxOption(e))},prepareHtmlUpload:function(e){this.setHtmlTransferUI(e)},getServerInfo:function(){var e=this,r={_action:"getServerInfo",_innorix:"MultiSessionUpload",_product:"MS"};for(var a in this.uploader.manager.lastTransferring.option.postData)r[a]=encodeURIComponent(this.uploader.manager.lastTransferring.option.postData[a]);var n=this.getHTMLFormData(r);if(this.showAnimationServer=!1,this.uploader.errorCount>this.uploader.option.retryCount){this.uploader.manager.lastTransferring.lastStatus.state="Error",this.uploader.manager.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,this.uploader.manager.lastTransferring.lastStatus),this.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,this.uploader.manager.lastTransferring.lastStatus)}else t.ajax(this.htmlAjaxOption(n)).done(function(t){"0000"==e.parseResponseText(t).file_code&&e.getFileInfo()}).fail(function(t){if(e.uploader.controlBox.option.htmlTransferErrorLog){var r={errCode:t.status};try{r=Object.assign(e.uploader.manager.lastTransferring.lastStatus,r)}catch(a){}e.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,r)}})},setHtmlTransferUI:function(e){if("compact"==e.skin)if(e.iframeView){var r=null;r="parent"==e.iframeViewLocation?parent:"top"==e.iframeViewLocation?top:parent,r.jQuery(".irx_transferWin_wrapper").find(".irx_btnGroup .irx_controller").hide(),r.jQuery(".irx_transferWin_wrapper").find(".irx_toggle_graph").css({display:"none"})}else t(".irx_transferWin_wrapper").find(".irx_btnGroup .irx_controller").hide(),t(".irx_transferWin_wrapper").find(".irx_toggle_graph").css({display:"none"});else if(e.iframeView){var r=null;r="parent"==e.iframeViewLocation?parent:"top"==e.iframeViewLocation?top:parent,r.jQuery(".irx_transferWin_wrapper").find(".irx_btnGroup .irx_controller").hide(),r.jQuery(".irx_transferWin_wrapper").find(".irx_toggle_graph").css({display:"none"})}else t(".irx_transferWin_wrapper").find(".irx_btnGroup .irx_controller").hide(),t(".irx_transferWin_wrapper").find(".irx_toggle_graph").css({display:"none"})},getFileInfo:function(){this.showAnimationServer=!1;var e=this,r=this.uploader.files[e.fileIndex];"undefined"==typeof r.customValue&&(r.customValue=[]),e.uploader.files[e.fileIndex].startTotalTransferTime=(new Date).getTime(),r.transferSize=0,r.transferringCount=0,r.nextStartOffset=0;var a=this.uploader.manager,n={_action:"getFileInfo",_innorix:"MultiSessionUpload",_product:"MS",_orig_filename:encodeURIComponent(r.printFileName),_unique_filename:encodeURIComponent(r.uniqueFileName),_filesize:r.fileSize,_folder:"",_clientpath:"",_compressed:"0"};for(var i in a.lastTransferring.option.postData)n[i]=encodeURIComponent(a.lastTransferring.option.postData[i]);for(var i in r.postData)n[i]=encodeURIComponent(r.postData[i]);var s=this.getHTMLFormData(n);t.ajax(this.htmlAjaxOption(s)).done(function(t){var r=e.parseResponseText(t);if("0000"==r.file_code){if(e.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_START,a.lastTransferring.lastStatus),e.setHtmlTransferUI(e.uploader.controlBox.option),a.emit(o.EVENT.TRANSFER_UPLOAD_START,a.lastTransferring.lastStatus),a.isPlayingHtml()){if("undefined"!=typeof r.file_customvalue&&r.file_customvalue){var n=JSON.parse(r.file_customvalue);for(var i in n)e.uploader.files[e.fileIndex].customValue[i]=n[i]}"undefined"!=typeof r.file_uploadid&&r.file_uploadid&&(e.uploader.files[e.fileIndex].uploadId=r.file_uploadid,e.uploader.files[e.fileIndex].fileSlices=[]);for(var s=e.uploader.transferringSessionCount;s<e.uploader.option.sessionCount&&e.attachFile(r);s++);}}else a.isPlayingHtml()&&(e.setHtmlTransferUI(e.uploader.controlBox.option),e.uploader.errorCount=e.uploader.errorCount+1,e.getFileInfo())}).fail(function(t){if(e.uploader.controlBox.option.htmlTransferErrorLog){var r={errCode:t.status};try{r=Object.assign(e.uploader.manager.lastTransferring.lastStatus,r),r.files[e.fileIndex].errCode=t.status}catch(n){}e.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,r)}a.isPlayingHtml()&&(e.setHtmlTransferUI(e.uploader.controlBox.option),e.uploader.errorCount=e.uploader.errorCount+1,e.getFileInfo())})},attachFile:function(e){this.showAnimationServer=!1;var r=this,n=this.uploader.files[r.fileIndex],s=this.uploader.manager;if(0==n.nextStartOffset&&(r.uploader.files[r.fileIndex].startTransferTime=(new Date).getTime()),0==n.fileSize)return r.uploader.files[r.fileIndex].endTransferTime=(new Date).getTime(),r.attachFileCompleted(e),!1;if(n.nextStartOffset==n.fileSize||r.uploader.transferringSessionCount>=r.uploader.option.sessionCount)return!1;var l=1e6;0<this.uploader.option.uploadSliceSize?l=this.uploader.option.uploadSliceSize:0<this.uploader.option.sliceSize&&(l=this.uploader.option.sliceSize),this.uploader.option.isPresignedUrl&&5242880>l&&(l=5242880);var f=n.nextStartOffset,u=f+l-1;u>n.fileSize&&(u=n.fileSize-1);var d=1;0<f&&(d=f/l+1),n.nextStartOffset=u+1;var p=a.string.getFilePath(e.file_savepath),c={_action:"attachFile",_innorix:"MultiSessionUpload",_product:"MS",_orig_filename:encodeURIComponent(n.printFileName),_new_filename:encodeURIComponent(e.file_savefilename),_serverpath:encodeURIComponent(e.file_savepath),_unique_filename:encodeURIComponent(n.uniqueFileName),_unique_filepath:encodeURIComponent(p+"/"+n.uniqueFileName),_filesize:n.fileSize,_folder:"",_clientpath:"",_compressed:"0",_encrypt:"0",_index:d,_empty_folder:"0",_start_offset:f,_end_offset:u};this.uploader.option.isPresignedUrl&&(c._presigngedUrl="1"),"undefined"!=typeof n.uploadId&&""!=n.uploadId&&(c._uploadId=n.uploadId);var m=n;m.state="Transferring",m.statusMode="html",s.emit(o.EVENT.TRANSFER_UPLOAD_ALWAYS,m);for(var g in s.lastTransferring.option.postData)c[g]=encodeURIComponent(s.lastTransferring.option.postData[g]);for(var g in n.postData)c[g]=encodeURIComponent(n.postData[g]);for(var g in n.customValue)c[g]=encodeURIComponent(n.customValue[g]);if(!this.uploader.option.isPresignedUrl){var T=n.file.slice(f,u+1);c._file=T}var S=0,_=0,h=this.getHTMLFormData(c),R=this.htmlAjaxOption(h);return R.xhr=function(){var e=new window.XMLHttpRequest;return e.upload.addEventListener("progress",function(t){if(s.isPlayingHtml()||e.abort(),!r.uploader.option.isPresignedUrl&&t.lengthComputable){var a=t.total-(u-f+1);if(0<t.loaded-a){var l=t.loaded-a;s.lastTransferring.lastStatus.state=i.TRANSFERRING;var d=r.uploader.lastTimestamp,p=Date.now();s.lastTransferring.lastStatus.transferSize+=l-_,s.lastTransferring.lastStatus.speed=s.lastTransferring.lastStatus.transferSize*(1e3/(p-d)),s.lastTransferring.lastStatus.progress=Math.ceil(s.lastTransferring.lastStatus.transferSize/s.lastTransferring.lastStatus.totalSize*100),n.transferSize+=l-_,S+=l-_,_=l,250<p-r.uploader.displayTimestamp&&(r.uploader.displayTimestamp=p,r.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_PROGRESS,s.lastTransferring.lastStatus),s.emit(o.EVENT.TRANSFER_UPLOAD_PROGRESS,s.lastTransferring.lastStatus))}}},!1),e},r.uploader.transferringSessionCount++,n.transferringCount++,t.ajax(R).done(function(t){var a=r.parseResponseText(t);if("0000"!=a.file_code){if(n.transferSize-=S,s.lastTransferring.lastStatus.transferSize-=S,s.isPlayingHtml()){if(r.uploader.errorCount=r.uploader.errorCount+1,r.uploader.errorCount>r.uploader.option.retryCount){return s.lastTransferring.lastStatus.state="Error",s.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,s.lastTransferring.lastStatus),r.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,s.lastTransferring.lastStatus),!1}return r.retryAttachFile(e,f,u)}return!1}if("undefined"!=typeof a.file_presignedurl&&a.file_presignedurl&&(r.uploader.files[r.fileIndex].fileSlices[d]={},r.uploader.files[r.fileIndex].fileSlices[d].presignedUrl=a.file_presignedurl),"undefined"!=typeof a.file_blockid&&a.file_blockid&&(r.uploader.files[r.fileIndex].fileSlices[d].eTag=a.file_blockid),r.uploader.option.isPresignedUrl)return r.attachFileByPut(e,d,f,u);if(r.uploader.transferringSessionCount--,n.transferringCount--,n.transferSize==n.fileSize&&0==n.transferringCount){if("undefined"!=typeof a.file_customvalue&&a.file_customvalue){var i=JSON.parse(a.file_customvalue);for(var l in i)r.uploader.files[r.fileIndex].customValue[l]=i[l]}r.uploader.files[r.fileIndex].endTransferTime=(new Date).getTime(),r.attachFileCompleted(e)}else if(n.nextStartOffset!=n.fileSize)return!!s.isPlayingHtml()&&r.attachFile(e)}).fail(function(t){if(r.uploader.controlBox.option.htmlTransferErrorLog){var a={errCode:t.status};try{a=Object.assign(r.uploader.manager.lastTransferring.lastStatus,a),a.files[r.fileIndex].errCode=t.status}catch(i){}r.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,a)}if(n.transferSize-=S,s.lastTransferring.lastStatus.transferSize-=S,r.uploader.transferringSessionCount--,n.transferringCount--,s.isPlayingHtml()){if(r.uploader.errorCount=r.uploader.errorCount+1,r.uploader.errorCount>r.uploader.option.retryCount){return s.lastTransferring.lastStatus.state="Error",s.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,s.lastTransferring.lastStatus),r.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,s.lastTransferring.lastStatus),!1}return r.retryAttachFile(e,f,u)}return!1}),!0},retryAttachFile:function(e,r,n){this.showAnimationServer=!1;var s=this,l=this.uploader.files[s.fileIndex],f=this.uploader.manager;if(0==l.nextStartOffset&&(s.uploader.files[s.fileIndex].startTransferTime=(new Date).getTime()),r==l.fileSize||s.uploader.transferringSessionCount>=s.uploader.option.sessionCount)return!1;var u=1e6;0<this.uploader.option.uploadSliceSize?u=this.uploader.option.uploadSliceSize:0<this.uploader.option.sliceSize&&(u=this.uploader.option.sliceSize),this.uploader.option.isPresignedUrl&&5242880>u&&(u=5242880);var d=1;0<r&&(d=r/u+1),n>l.fileSize&&(n=l.fileSize-1);var p=a.string.getFilePath(e.file_savepath),c={_action:"attachFile",_innorix:"MultiSessionUpload",_product:"MS",_orig_filename:encodeURIComponent(l.printFileName),_new_filename:encodeURIComponent(e.file_savefilename),_serverpath:encodeURIComponent(e.file_savepath),_unique_filename:encodeURIComponent(l.uniqueFileName),_unique_filepath:encodeURIComponent(p+"/"+l.uniqueFileName),_filesize:l.fileSize,_folder:"",_clientpath:"",_compressed:"0",_encrypt:"0",_index:d,_empty_folder:"0",_start_offset:r,_end_offset:n};this.uploader.option.isPresignedUrl&&(c._presigngedUrl="1"),"undefined"!=typeof l.uploadId&&""!=l.uploadId&&(c._uploadId=l.uploadId);for(var m in f.lastTransferring.option.postData)c[m]=encodeURIComponent(f.lastTransferring.option.postData[m]);for(var m in l.postData)c[m]=encodeURIComponent(l.postData[m]);for(var m in l.customValue)c[m]=encodeURIComponent(l.customValue[m]);if(!this.uploader.option.isPresignedUrl){var g=l.file.slice(r,n+1);c._file=g}var T=0,S=0,_=this.getHTMLFormData(c),h=this.htmlAjaxOption(_);return h.xhr=function(){var e=new window.XMLHttpRequest;return e.upload.addEventListener("progress",function(t){if(f.isPlayingHtml()||e.abort(),!s.uploader.option.isPresignedUrl&&t.lengthComputable){var a=t.total-(n-r+1);if(0<t.loaded-a){var u=t.loaded-a;f.lastTransferring.lastStatus.state=i.TRANSFERRING;var d=s.uploader.lastTimestamp,p=Date.now();f.lastTransferring.lastStatus.transferSize+=u-S,f.lastTransferring.lastStatus.speed=f.lastTransferring.lastStatus.transferSize*(1e3/(p-d)),f.lastTransferring.lastStatus.progress=Math.ceil(f.lastTransferring.lastStatus.transferSize/f.lastTransferring.lastStatus.totalSize*100),l.transferSize+=u-S,T+=u-S,S=u,250<p-s.uploader.displayTimestamp&&(s.uploader.displayTimestamp=p,s.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_PROGRESS,f.lastTransferring.lastStatus),f.emit(o.EVENT.TRANSFER_UPLOAD_PROGRESS,f.lastTransferring.lastStatus))}}},!1),e},s.uploader.transferringSessionCount++,l.transferringCount++,t.ajax(h).done(function(t){var a=s.parseResponseText(t);if("0000"!=a.file_code){if(l.transferSize-=T,f.lastTransferring.lastStatus.transferSize-=T,f.isPlayingHtml()){if(s.uploader.errorCount=s.uploader.errorCount+1,s.uploader.errorCount>s.uploader.option.retryCount){return f.lastTransferring.lastStatus.state="Error",f.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,f.lastTransferring.lastStatus),s.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,f.lastTransferring.lastStatus),!1}return s.retryAttachFile(e,r,n)}return!1}if("undefined"!=typeof a.file_presignedurl&&a.file_presignedurl&&(s.uploader.files[s.fileIndex].fileSlices[d]={},s.uploader.files[s.fileIndex].fileSlices[d].presignedUrl=a.file_presignedurl),"undefined"!=typeof a.file_blockid&&a.file_blockid&&(s.uploader.files[s.fileIndex].fileSlices[d].eTag=a.file_blockid),s.uploader.option.isPresignedUrl)return s.attachFileByPut(e,d,r,n);if(s.uploader.transferringSessionCount--,l.transferringCount--,l.transferSize==l.fileSize&&0==l.transferringCount){if("undefined"!=typeof a.file_customvalue&&a.file_customvalue){var i=JSON.parse(a.file_customvalue);for(var u in i)s.uploader.files[s.fileIndex].customValue[u]=i[u]}s.uploader.files[s.fileIndex].endTransferTime=(new Date).getTime(),s.attachFileCompleted(e)}else if(l.nextStartOffset!=l.fileSize)return!!f.isPlayingHtml()&&s.attachFile(e)}).fail(function(t){if(s.uploader.controlBox.option.htmlTransferErrorLog){var a={errCode:t.status};try{a=Object.assign(s.uploader.manager.lastTransferring.lastStatus,a),a.files[s.fileIndex].errCode=t.status}catch(i){}}if(l.transferSize-=T,f.lastTransferring.lastStatus.transferSize-=T,s.uploader.transferringSessionCount--,l.transferringCount--,f.isPlayingHtml()){if(s.uploader.errorCount=s.uploader.errorCount+1,s.uploader.errorCount>s.uploader.option.retryCount){return f.lastTransferring.lastStatus.state="Error",f.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,f.lastTransferring.lastStatus),s.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,f.lastTransferring.lastStatus),!1}return s.retryAttachFile(e,r,n)}return!1}),!0},attachFileByPut:function(e,r,a,n){this.showAnimationServer=!1;var s=this,l=this.uploader.files[s.fileIndex],f=this.uploader.manager,u=l.file.slice(a,n+1),d=l.fileSlices[r].presignedUrl,p=0,c=0,m=t("meta[name='_csrf']").attr("content"),g=t("meta[name='_csrf_header']").attr("content"),T={url:d,data:u,method:"PUT",timeout:3e4,processData:!1,beforeSend:function(e){s.uploader.option.useCsrf&&e.setRequestHeader(g,m)}};return T.xhr=function(){var e=new window.XMLHttpRequest;return e.upload.addEventListener("progress",function(t){if(f.isPlayingHtml()||e.abort(),t.lengthComputable){var r=t.total-(n-a+1);if(0<t.loaded-r){var u=t.loaded-r;f.lastTransferring.lastStatus.state=i.TRANSFERRING;var d=s.uploader.lastTimestamp,m=Date.now();f.lastTransferring.lastStatus.transferSize+=u-c,f.lastTransferring.lastStatus.speed=f.lastTransferring.lastStatus.transferSize*(1e3/(m-d)),f.lastTransferring.lastStatus.progress=Math.ceil(f.lastTransferring.lastStatus.transferSize/f.lastTransferring.lastStatus.totalSize*100),l.transferSize+=u-c,p+=u-c,c=u,250<m-s.uploader.displayTimestamp&&(s.uploader.displayTimestamp=m,s.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_PROGRESS,f.lastTransferring.lastStatus),f.emit(o.EVENT.TRANSFER_UPLOAD_PROGRESS,f.lastTransferring.lastStatus))}}},!1),e},t.ajax(T).done(function(t,a,n){s.uploader.transferringSessionCount--,l.transferringCount--;var i=n.getResponseHeader("ETag");if(i&&(i=i.replace(/\"/gi,""),s.uploader.files[s.fileIndex].fileSlices[r].eTag=i),l.transferSize==l.fileSize&&0==l.transferringCount)s.uploader.files[s.fileIndex].endTransferTime=(new Date).getTime(),s.attachFileCompleted(e);else if(l.nextStartOffset!=l.fileSize)return!!f.isPlayingHtml()&&(s.attachFile(e),!0)}).fail(function(t){if(s.uploader.controlBox.option.htmlTransferErrorLog){var r={errCode:t.status};try{r=Object.assign(s.uploader.manager.lastTransferring.lastStatus,r),r.files[s.fileIndex].errCode=t.status}catch(i){}}if(s.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,r),l.transferSize-=p,f.lastTransferring.lastStatus.transferSize-=p,s.uploader.transferringSessionCount--,l.transferringCount--,f.isPlayingHtml()){if(s.uploader.errorCount=s.uploader.errorCount+1,s.uploader.errorCount>s.uploader.option.retryCount){return f.lastTransferring.lastStatus.state="Error",f.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,f.lastTransferring.lastStatus),s.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,f.lastTransferring.lastStatus),!1}return s.retryAttachFile(e,a,n)}return!1}),!0},attachFileCompleted:function(e){var r=this,n=e,i=this.uploader.files[r.fileIndex],s=r.uploader.manager,l=a.string.getFilePath(e.file_savepath),f={_action:"attachFileCompleted",_innorix:"MultiSessionUpload",_product:"MS",_orig_filename:encodeURIComponent(i.printFileName),_new_filename:encodeURIComponent(e.file_savefilename),_filepath:encodeURIComponent(e.file_savepath),_unique_filename:encodeURIComponent(i.uniqueFileName),_unique_filepath:encodeURIComponent(l+"/"+i.uniqueFileName),_filesize:i.fileSize,_compressed:"0",_compress_crc32:"0",_compressed_size:"0",_uncompressed_size:"0",_check_integrity:"0",_compress_upload_type:"0",_integrity_crc32:"0",_integrity_md5:"0",_merging:"0",_encrypt:"0"};if("undefined"!=typeof i.uploadId&&""!=i.uploadId){f._uploadId=i.uploadId;var u=[];for(var d in i.fileSlices){var p={};p.index=d,p.eTag=i.fileSlices[d].eTag,u.push(p)}var c=JSON.stringify(u);f._partETags=c}for(var m in s.lastTransferring.option.postData)f[m]=encodeURIComponent(s.lastTransferring.option.postData[m]);for(var m in i.postData)f[m]=encodeURIComponent(i.postData[m]);for(var m in i.customValue)f[m]=encodeURIComponent(i.customValue[m]);var g=this.getHTMLFormData(f);this.showAnimationServer=!0,s.emit(o.EVENT.TRANSFER_HTML5_UPLOAD_WORKING_STOP),setTimeout(function(){r.showAnimationServer},3e3),t.ajax(this.htmlAjaxOption(g)).done(function(e){var t=r.parseResponseText(e);if("undefined"!=typeof t.file_customvalue&&t.file_customvalue){var a=JSON.parse(t.file_customvalue);for(var l in a)r.uploader.files[r.fileIndex].customValue[l]=a[l]}r.showAnimationServer=!1,r.uploader.files[r.fileIndex].endTotalTransferTime=(new Date).getTime();var f=r.uploader.files[r.fileIndex].endTotalTransferTime-r.uploader.files[r.fileIndex].startTotalTransferTime,u=r.uploader.files[r.fileIndex].endTransferTime-r.uploader.files[r.fileIndex].startTransferTime,d={rowID:i.id,serverFileName:n.file_savefilename,serverFilePath:n.file_savepath,fileSize:i.fileSize,clientFileName:i.printFileName,rootName:"",postData:i.postData,customValue:i.customValue,state:"Complete",statusMode:"html"};r.uploader.files[r.fileIndex].totalTransferTime=f,r.uploader.files[r.fileIndex].transferTime=u,r.uploader.transferData.totalSize+=parseFloat(i.fileSize),r.uploader.transferData.files.push(d),s.emit(o.EVENT.TRANSFER_UPLOAD_ALWAYS,d),r.fileIndex++,r.uploader.files.length>r.fileIndex?r.getFileInfo():r.uploadComplete()}).fail(function(e){if(r.uploader.controlBox.option.htmlTransferErrorLog){var t={errCode:e.status};try{t=Object.assign(r.uploader.manager.lastTransferring.lastStatus,t),t.files[r.fileIndex].errCode=e.status}catch(a){}r.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,t)}})},uploadComplete:function(){var e=this,r=this.uploader.transferData;e.fileIndex=0;var a=t.extend({},r);a.pathName=location.pathname,a.sliceSize=0,a.files=encodeURIComponent(JSON.stringify(a.files)),a.product=this.uploader.option.custom.product?this.uploader.option.custom.product:"webpages",a.subproduct=this.uploader.option.custom.subproduct?this.uploader.option.custom.subproduct:"html5",a.postData=this.uploader.option.postData,a.type="upload",a.retries=0,a.state=i.COMPLETE,a.speed=0,a.transferSize=a.totalSize,a.progress=100,a.usetime=Date.now()-this.uploader.lastTimestamp;var s=e.uploader.manager;s.lastTransferring.lastStatus.state=i.COMPLETE,s.lastTransferring.lastStatus.postData=s.lastTransferring.option.postData;for(var l in s.lastTransferring.lastStatus.files)if(s.lastTransferring.lastStatus.files.hasOwnProperty(l)){var f=s.lastTransferring.lastStatus.files[l];for(var u in r.files)if(r.files.hasOwnProperty(u)){var d=r.files[u];if(f.id==d.rowID){s.lastTransferring.lastStatus.files[l].clientFileName=d.clientFileName,s.lastTransferring.lastStatus.files[l].serverFileName=d.serverFileName,s.lastTransferring.lastStatus.files[l].serverFilePath=d.serverFilePath,s.lastTransferring.lastStatus.files[l].fileState="complete",s.lastTransferring.lastStatus.files[l].clientFilePath="sandbox\\"+s.lastTransferring.lastStatus.files[l].filePath;for(var p in s.lastTransferring.option.postData)s.lastTransferring.lastStatus.files[l][p]=s.lastTransferring.option.postData[p];for(var p in d.postData)s.lastTransferring.lastStatus.files[l][p]=d.postData[p];for(var p in d.customValue)s.lastTransferring.lastStatus.files[l][p]=d.customValue[p];break}}}if(this.uploader.option.platformDepend){var c=t("meta[name='_csrf']").attr("content"),m=t("meta[name='_csrf_header']").attr("content");t.ajax({url:n.getBaseUrl()+"/api/webpage/onUpload?api_key="+n.getKey(),data:a,method:"POST",dataType:"json",beforeSend:function(t){e.uploader.option.useCsrf&&t.setRequestHeader(m,c)}}).done(function(e){s.emit(o.EVENT.TRANSFER_UPLOAD_COMPLETE,s.lastTransferring.lastStatus),s.emit(o.EVENT.TRANSFER_UPLOAD_COMPLETE_USER,s.lastTransferring.lastStatus),s.lastTransferring=null}).fail(function(t){if(console.log("transferData input fail"),e.uploader.controlBox.option.htmlTransferErrorLog){var r={errCode:t.status};try{r=Object.assign(e.uploader.manager.lastTransferring.lastStatus,r),r.files[e.fileIndex].errCode=t.status}catch(a){}e.uploader.controlBox.emit(o.EVENT.TRANSFER_UPLOAD_ERROR,r)}})}else s.emit(o.EVENT.TRANSFER_UPLOAD_COMPLETE,s.lastTransferring.lastStatus),s.emit(o.EVENT.TRANSFER_UPLOAD_COMPLETE_USER,s.lastTransferring.lastStatus),s.lastTransferring=null},htmlDownload:function(e,r,a){this.uploader.controlBox=r,this.uploader.files=e,r.emit(o.EVENT.TRANSFER_DOWNLOAD_START),r.view.$el.find("a.irx-fake-link").remove();var n=t("<a>").addClass("irx-fake-link");n.css({width:0,height:0,display:"none"}),r.view.$el.append(n),"string"==typeof a.downloadServerInfoUrl&&a.downloadServerInfoUrl&&""!==a.downloadServerInfoUrl?this.downloadGetServerInfo(e,n[0],0,r,a):this.doDownload(e,n[0],0,r,a)},downloadAndOpen:function(e,t,r){return console.log("not supported"),!0},parseResponseText:function(e){var t=!0;try{var r=unescape(decodeURIComponent(e))}catch(f){t=!1;var r=e}for(var a=r.split("\n"),n={},i=0;i<a.length;i++){var o=a[i].match(/<(.*)>(.*)<\/(.*)>/);if(null!==o&&4==o.length){var s=o[1],l=o[2];n[s]=l}}var o=e.match(/<file_presignedurl>(.*)<\/file_presignedurl>/);return null!==o&&2==o.length&&(n.file_presignedurl=o[1]),n.isDecodeResponseText=t,n},getHTMLFormData:function(e){var t=new FormData;for(var r in e)if(e.hasOwnProperty(r)){if(null===e[r])continue;if("postData"==r)for(var a in e[r])t.append(a,e[r][a]);else t.append(r,e[r])}return t},getDropFile:function(e){return{value:this.parseAgentFileType(e.originalEvent.dataTransfer.files)}},parseDownloadResponse:function(e){var t=!0;try{var r=decodeURIComponent(e)}catch(f){t=!1;var r=e}if(t)try{r=decodeURIComponent(r)}catch(f){}for(var a=r.split("\n"),n={},i=0;i<a.length;i++){var o=a[i].match(/<(.*)>(.*)<\/(.*)>/);if(null!==o&&4==o.length){var s=o[1],l=o[2];n[s]=l}}var o=e.match(/<file_presignedurl>(.*)<\/file_presignedurl>/);return null!==o&&2==o.length&&(n.file_presignedurl=o[1]),n.isDecodeResponseText=t,n},downloadGetServerInfo:function(e,r,a,n,i){var s=this,l={_action:"getServerInfo",_innorix:"MultiSessionUpload",_product:"MS"};for(var f in i.postData)l[f]=encodeURIComponent(i.postData[f]);var u=this.getHTMLFormData(l),d=t("meta[name='_csrf']").attr("content"),p=t("meta[name='_csrf_header']").attr("content"),c={url:i.downloadServerInfoUrl,data:u,method:"POST",processData:!1,contentType:!1,dataType:"text",beforeSend:function(e){e.setRequestHeader("html5",!0),i.useCsrf&&e.setRequestHeader(p,d);for(var t in self.uploader.option.customHeader)e.setRequestHeader(t,self.uploader.option.customHeader[t])}};t.ajax(c).done(function(t){"0000"==s.parseDownloadResponse(t).file_code&&s.doDownload(e,r,a,n,i)}).fail(function(e){if(s.uploader.controlBox.option.htmlTransferErrorLog){var t={errCode:e.status};try{t=Object.assign(s.uploader.manager.lastTransferring.lastStatus,t)}catch(r){}s.uploader.controlBox.emit(o.EVENT.TRANSFER_DOWNLOAD_ERROR,t)}})},downloadStartAction:function(e,r,a,n,i){var s=this,l=e[a];"undefined"==typeof l.customValue&&(l.customValue=[]);var f=l.downloadUrl;if("direct"!==i.downloadType){var u="_Action=DownloadStart";u=-1==f.indexOf("?")?"?"+u:"&"+u,f+=u}t.ajax({url:f,method:"GET"}).done(function(e){var t=s.parseDownloadResponse(e);if(!("undefined"!=typeof t.file_customerrorcode&&t.file_customerrorcode||"undefined"!=typeof t.file_code&&t.file_code&&"0000"!=t.file_code)){if("undefined"!=typeof t.file_customvalue&&t.file_customvalue){var a=JSON.parse(t.file_customvalue);for(var n in a)l.customValue[n]=a[n]}"undefined"!=typeof l.customValue.fileSize&&l.customValue.fileSize&&(l.fileSize=l.customValue.fileSize);var o=l.downloadUrl;if("direct"!==i.downloadType){var f="_Html5=true";i.skipFileSizeCheck&&"undefined"!==i.skipFileSizeCheck||(f+="&_StartOffset=0&_EndOffset="+String(l.fileSize-1));for(var n in l.customValue){var a=l.customValue[n];t.isDecodeResponseText&&(a=encodeURIComponent(a)),f+="&"+n+"="+a}f=-1==o.indexOf("?")?"?"+f:"&"+f,o+=f}r.href=o,r.target="_self",r.click()}}).fail(function(e){if(console.log("transferData input fail"),s.uploader.controlBox.option.htmlTransferErrorLog){var t={errCode:e.status};try{t=Object.assign(s.uploader.manager.lastTransferring.lastStatus,t),t.files[IDX].errCode=e.status}catch(r){}s.uploader.controlBox.emit(o.EVENT.TRANSFER_DOWNLOAD_ERROR,t)}})},doDownload:function(e,r,s,l,f){var u=this;s||(s=0);try{if(0==e.length||e.length<=s){if(f.platformDepend){for(var d=0,p=0;p<e.length;p++)d+=e[p].fileSize;var c=a.string.generateUUID(),m={};m.pathName=location.pathname,m.sliceSize=0,m.files=encodeURIComponent(JSON.stringify(e)),m.product=f.custom.product?f.custom.product:"webpages",m.subproduct=f.custom.subproduct?f.custom.subproduct:"html5",m.progress=100,m.retries=0,m.speed=0,m.state=i.COMPLETE,m.transferID=c,m.postData=f.postData,m.type="download",m.totalSize=d,m.transferSize=d;var g=t("meta[name='_csrf']").attr("content"),T=t("meta[name='_csrf_header']").attr("content");t.ajax({url:n.getBaseUrl()+"/api/webpage/onDownload?api_key="+n.getKey(),data:m,method:"POST",dataType:"json",beforeSend:function(e){f.useCsrf&&e.setRequestHeader(T,g)}}).done(function(e){}).fail(function(e){if(console.log("transferData input fail"),u.uploader.controlBox.option.htmlTransferErrorLog){var t={errCode:e.status};try{t=Object.assign(u.uploader.manager.lastTransferring.lastStatus,t)}catch(r){}u.uploader.controlBox.emit(o.EVENT.TRANSFER_DOWNLOAD_ERROR,t)}})}return!0}if(1==f.useDownloadAction&&"direct"!==f.downloadType)this.downloadStartAction(e,r,s,l,f),setTimeout(function(){s++,u.doDownload(e,r,s,l,f)},f.downloadDelay);else{var S=e[s];if(f.isPresignedUrl){var _=S.downloadUrl;t.ajax({url:_,method:"GET"}).done(function(t){var a=JSON.parse(t),n=a.presignedUrl;r.href=n,r.target="_self",r.click(),setTimeout(function(){s++,u.doDownload(e,r,s,l,f)},f.downloadDelay)}).fail(function(e){if(u.uploader.controlBox.option.htmlTransferErrorLog){var t={errCode:e.status};try{t=Object.assign(u.uploader.manager.lastTransferring.lastStatus,t),t.files[s].errCode=e.status}catch(r){}u.uploader.controlBox.emit(o.EVENT.TRANSFER_DOWNLOAD_ERROR,t)}})}else{var h=!0;if(u.uploader.controlBox.option.htmlTransferErrorLog&&t.ajax({url:S.downloadUrl,async:!1,type:"HEAD",timeout:500}).done(function(e,t,r){}).fail(function(e){h=!1;var t={errCode:e.status};try{t=Object.assign(u.uploader.manager.lastTransferring.lastStatus,t),t.files[s].errCode=e.status}catch(r){}u.uploader.controlBox.emit(o.EVENT.TRANSFER_DOWNLOAD_ERROR,t)}),h){var _=S.downloadUrl;if("direct"!==f.downloadType){var R="_Html5=true";f.skipFileSizeCheck&&"undefined"!==f.skipFileSizeCheck||(R+="&_StartOffset=0&_EndOffset="+String(S.fileSize-1)),R=-1==_.indexOf("?")?"?"+R:"&"+R,_+=R}r.href=_,r.target="_self",r.click()}setTimeout(function(){s++,u.doDownload(e,r,s,l,f)},f.downloadDelay)}}}catch(v){console.log(v),console.log("error.doDownload")}}})});
innorix("CONSTANT/COMMAND_HANDLER",function(){"use strict";return{BASE:0,COMET:1,RETRY:2}});
innorix("CONSTANT/ENV",function(N){"use strict";var E=N("userAgent"),T="https://127.0.0.1:4523";return"mac"==E.os.name&&(T="https://localhost:4523"),{AGENT_HTTP_URL:"http://127.0.0.1:4033",AGENT_HTTPS_URL:T,AGENT_HTTP_PRE_PORTS:["4033","4034","4035","4036","36039"],TRAY_VERSION:INNORIX_VERSION,INSTALL_PAGE:"/wp9/install/install.html",UPDATE_FILE_URL:"install/innowp9.exe",LICENSE:INNORIX_LICENSE,SIGNATURE:INNORIX_SIGNATURE,DEBUG:!1}});
innorix("CONSTANT/EVENT",function(){"use strict";return{AGENT_ADD_COMMAND:"addCommand",AGENT_READY:"agentReady",AGENT_COMPLETE_COMMAND:"completeCommand",AGENT_DONE_COMMAND:"doneCommand",AGENT_FAIL_COMMAND:"failCommand",CONTROL_LOAD_COMPLETE:"loadComplete",CONTROL_BEFORE_ADD_FILE:"beforeAddFile",CONTROL_AFTER_ADD_FILES:"afterAddFiles",CONTROL_CANCEL_ADD_FILES:"attachCancel",CONTROL_BEFORE_REMOVE_FILES:"beforeRemoveFiles",CONTROL_REMOVE_FILES:"removeFiles",CONTROL_ADD_FILE_ERROR:"addFileError",CONTROL_SELECT_ROWS:"onSelectRows",CONTROL_UNSELECT_ROWS:"onUnSelectRows",CONTROL_DESTROY:"onDestroy",CONTROL_DBL_CLICK_ROWS:"onDblClickRows",CONTROL_SET_DROPZONE_ERROR:"setDropzoneError",CONTROL_SORT:"afterSortFiles",TRANSFER_UPLOAD_ALWAYS:"uploadAlways",TRANSFER_UPLOAD_CREATE:"uploadCreate",TRANSFER_UPLOAD_CREATE_GUIDE:"uploadCreateGuide",TRANSFER_UPLOAD_CREATE_QR:"uploadCreateQr",TRANSFER_UPLOAD_START:"uploadStart",TRANSFER_UPLOAD_COMPLETE:"__uploadComplete",TRANSFER_UPLOAD_COMPLETE_USER:"uploadComplete",TRANSFER_UPLOAD_CANCEL:"uploadCancel",TRANSFER_UPLOAD_ERROR:"uploadError",TRANSFER_UPLOAD_PAUSE:"uploadPause",TRANSFER_UPLOAD_PAUSING:"uploadPausing",TRANSFER_UPLOAD_RESUME:"uploadResume",TRANSFER_UPLOAD_PROGRESS:"uploadProgress",TRANSFER_UPLOAD_RETRY:"uploadRetry",TRANSFER_UPLOAD_WORKING:"workingServer",TRANSFER_UPLOAD_WORKING_STOP:"workingServerStop",TRANSFER_HTML5_UPLOAD_WORKING_STOP:"htmlWorkingServerStop",TRANSFER_UPLOAD_THUMBNAIL:"thumbnailStart",TRANSFER_UPLOAD_THUMBNAIL_STOP:"thumbnailComplete",TRANSFER_DOWNLOAD_ALWAYS:"downloadAlways",TRANSFER_DOWNLOAD_CREATE:"downloadCreate",TRANSFER_DOWNLOAD_CREATE_GUIDE:"downloadCreateGuide",TRANSFER_DOWNLOAD_CREATE_QR:"downloadCreateQr",TRANSFER_DOWNLOAD_START:"downloadStart",TRANSFER_DOWNLOAD_COMPLETE:"__downloadComplete",TRANSFER_DOWNLOAD_COMPLETE_USER:"downloadComplete",TRANSFER_DOWNLOAD_CANCEL:"downloadCancel",TRANSFER_DOWNLOAD_ERROR:"downloadError",TRANSFER_DOWNLOAD_PAUSE:"downloadPause",TRANSFER_DOWNLOAD_PAUSING:"downloadPausing",TRANSFER_DOWNLOAD_RESUME:"downloadResume",TRANSFER_DOWNLOAD_PROGRESS:"downloadProgress",TRANSFER_DOWNLOAD_RETRY:"downloadRetry",TRANSFER_DOWNLOAD_WORKING:"downloadWorkingServer",TRANSFER_DOWNLOAD_WORKING_STOP:"downloadWorkingServerStop",TRANSFER_CHANGE_DOWNLOADPATH:"changeDownloadPath",TRANSFER_GUIDE_MESSAGE:"transferGuideMessage",UPDATE_PATCH_EXECUTE:"updatePatchExecute",UPDATE_PATCH_COMPLETE:"updatePatchComplete",DROPZONE_SHOW:"dropzoneShow",DROPZONE_HIDE:"dropzoneHide",DROPZONE_STATE_SHOW:"dropstateShow",DROPZONE_STATE_HIDE:"dropstateHide",TRANSFER_GRAPH_SHOW:"transferGraphShow",TRANSFER_GRAPH_HIDE:"transferGraphHide",FILE_PROCESSING_STATE_SHOW:"fileProcessingStateShow",FILE_PROCESSING_STATE_HIDE:"fileProcessingStateHide",GRAPH_SHOW:"graphShow",GRAPH_HIDE:"graphHide",AGENT_FILE_DIALOG_SHOW:"agentFileDialogShow",AGENT_FILE_DIALOG_HIDE:"agentFileDialogHide",POPUP_BLOCKED:"installPopupBlocked"}});
innorix("CONSTANT/LOGIN_ERROR",function(){"use strict";return{AREADY_LOGGED_ANOTHER_ID:1,TRANSFFERING:2,LICENSE_EXPIRED:3}});
innorix("CONSTANT/TRANSFER_STATE",function(){"use strict";return{BEFORE:"Before",READY:"Ready",TRANSFERRING:"Transferring",COMPLETE:"Complete",CANCEL:"Cancel",ERROR:"Error",PAUSE:"Pause"}});
innorix("CONSTANT/UPDATE_STATE",function(){"use strict";return{DOWNLOAD_START:1,DOWNLOADING:2,ALREADY_FILE:3,NEWEST_VERSION:4}});
innorix("ControlBox/cachedOption",function(){"use strict";return{setOption:function(t){this.option=t},getOption:function(){return this.option}}});
innorix("ControlBox/ControlBox",function(e){"use strict";var t=e("innoJquery"),i=e("klass"),o=e("util"),n=e("i18n/lang"),r=e("singleton/agent"),a=e("singleton/html"),s=e("singleton/transferManager"),l=e("Klass/Event"),d=e("ControlBox/FileValidator"),p=e("ControlBox/FileList"),h=e("CONSTANT/ENV"),f={ENV:e("CONSTANT/ENV"),EVENT:e("CONSTANT/EVENT")},u=e("server"),c={base:e("ControlBox/Skin/Base/View"),input:e("ControlBox/Skin/Input/View"),tester:e("ControlBox/Skin/Basic/View"),compact:e("ControlBox/Skin/Compact/View"),basic:e("ControlBox/Skin/Basic/View")},m=e("CONSTANT/EVENT"),g=e("ControlBox/defaultOption"),w=e("ControlBox/cachedOption"),_=(e("Agent/CommandFactory"),{additionalProcess:!1,_defers:[],await:function(e){var i=this._defers.slice(0);return t.when.apply(null,i).done(e)},push:function(e){this._defers.push(e),e.always(function(){_.remove(e)})},remove:function(e){var t=this._defers.indexOf(e);-1!==t&&this._defers.splice(t,1)}});return i([l],{constructor:function(e){if(this.list_thumbnail_agent=[],this.list_watermark_agent=[],!e.url&&e.monitorServer){var i=e.monitorServer.split("://"),o=i[0],n=i[1].split("/")[0];e.url=o+"://"+n}e.iframeNestedView&&(e.iframeView=!1);var s=this;this.cloneTransferWindow=null,this.notifyReadyEvent=!1,"undefined"!=typeof inno_api_key&&""!=inno_api_key&&(e.key=inno_api_key,e.platformDepend=!1),"undefined"!=typeof inno_platform_user&&""!=inno_platform_user&&(e.custom?e.custom.inno_platform_user=inno_platform_user:e.custom={inno_platform_user:inno_platform_user}),"undefined"!=typeof inno_platform_groupId&&""!=inno_platform_groupId&&(e.custom?e.custom.groupId=inno_platform_groupId:e.custom={groupId:inno_platform_groupId}),"undefined"!=typeof inno_url&&""!=inno_url&&(e.url=inno_url),"undefined"!=typeof inno_monitorServer&&""!=inno_monitorServer&&(e.monitorServer=inno_monitorServer),l.call(this),g.custom=e.custom,e.showFuncBtn&&(g.showFuncBtn=e.showFuncBtn),e.skin&&"basic"!=e.skin&&"compact"!=e.skin&&(e.guideMessage=""),this.option=t.extend(!0,{},g,e),this.disabledState=!1;var h=this.getBrowserCookie("forceHtml5Mode");0!=h.length&&("undefined"==typeof FormData?(e.agent=!0,this.option.agent=!0):"true"==h&&(e.agent=!1,this.option.agent=!1,"undefined"==typeof FormData&&(e.agent=!0,this.option.agent=!0))),this.option.agent||(this.option.showQrCode=!1),this.option.isMobile?this.option.enableMobileAgent||(e.agent=!1,this.option.agent=!1):window.navigator.userAgent.indexOf("ARM")>-1?(e.agent=!1,this.option.agent=!1):-1!=window.navigator.platform.indexOf("Win")||-1!=window.navigator.platform.indexOf("Mac")||-1!=window.navigator.platform.indexOf("Linux")||(e.agent=!1,this.option.agent=!1),u.use(e),w.setOption(this.option),this.fileList=new p,this.fileValidator=new d(this,this.option),this.connection={},c.hasOwnProperty(this.option.skin)?this.Skin=c[this.option.skin]:this.Skin=c.base,this.view=new this.Skin(this.option.$el,this),this.state="wait",this.installCheck=!1,this.loadingState="",this.fileloadingState="",this.module=r,this.transferMode=this.option.transferMode,r.setOption(this.option),r.setControlBox(this),this._init(),e.iframeView,t(window).on("beforeunload",function(){s.transferCancel()}),0==e.agent?(this.module=a,this.state="ready",setTimeout(function(){s.emit(m.CONTROL_LOAD_COMPLETE),s.option.skipAgentCheck||(s.option.installCheckDelay?setTimeout(function(){s._initConnectionProperty()},1e3*s.option.installCheckDelay):s._initConnectionProperty())},100)):e.skipAgentCheck?(this.state="ready",setTimeout(function(){s.emit(m.CONTROL_LOAD_COMPLETE),s.option.skipAgentCheck||(s.option.installCheckDelay?setTimeout(function(){s._initConnectionProperty()},1e3*s.option.installCheckDelay):s._initConnectionProperty())},100)):(this.showInstallLoading(),this.option.installCheckDelay?setTimeout(function(){s.compareVersion()},1e3*s.option.installCheckDelay+1e3):s.compareVersion())},compareTrayVersion:function(){var e=this;this.option.isMobile?(e.state="ready",1==e.installCheck?e.emit(m.AGENT_READY):(e.notifyReadyEvent,e.emit(m.AGENT_READY)),e.emit(m.CONTROL_LOAD_COMPLETE),e.hideInstallLoading(),e.option.skipAgentCheck||(e.option.installCheckDelay?setTimeout(function(){e._initConnectionProperty()},1e3*e.option.installCheckDelay):e._initConnectionProperty())):"undefined"==typeof FormData?r.checkTrayVersionFallback(function(t){null!=t?(e.state="ready",1==e.installCheck?e.emit(m.AGENT_READY):(e.notifyReadyEvent,e.emit(m.AGENT_READY)),e.hideInstallLoading(),e.option.skipAgentCheck||(e.option.installCheckDelay?setTimeout(function(){e._initConnectionProperty()},1e3*e.option.installCheckDelay):e._initConnectionProperty())):e.compareTrayVersion()}):r.checkTrayVersion(function(t){null!=t&&""!=t.value?(e.state="ready",1==e.installCheck?e.emit(m.AGENT_READY):(e.notifyReadyEvent,e.emit(m.AGENT_READY)),e.hideInstallLoading(),e.option.skipAgentCheck||(e.option.installCheckDelay?setTimeout(function(){e._initConnectionProperty()},1e3*e.option.installCheckDelay):e._initConnectionProperty())):e.compareTrayVersion()})},compareVersion:function(){var e=this;"undefined"==typeof FormData?r.checkVersionFallback(function(t){var i=f.ENV.TRAY_VERSION;if("Win32"==navigator.platform&&"undefined"!=typeof INNORIX_WIN_VERSION?i=INNORIX_WIN_VERSION:"Linux x86_64"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?i=INNORIX_LINUX_VERSION:"Linux i686"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?i=INNORIX_LINUX_VERSION:"MacIntel"==navigator.platform&&"undefined"!=typeof INNORIX_MAC_VERSION&&(i=INNORIX_MAC_VERSION),o.string.versionCompare(t.value,i)>=0)1!=e.option.agentReadyCheck?(e.state="ready",e.hideInstallLoading(),e.option.skipAgentCheck||(e.option.installCheckDelay?setTimeout(function(){e._initConnectionProperty()},1e3*e.option.installCheckDelay):e._initConnectionProperty())):(e.emit(m.CONTROL_LOAD_COMPLETE),e.compareTrayVersion());else if(0==e.installCheck&&1==e.option.autoCheckVersion){var n="";if(e.option.isMobile?(n=e.option.installUrlMobile+"?redirect="+encodeURIComponent(window.location.href),-1!=e.option.installUrlMobile.indexOf("redirect")&&(n=e.option.installUrlMobile)):(n=e.option.installUrl+"?redirect="+encodeURIComponent(window.location.href),-1!=e.option.installUrl.indexOf("redirect")&&(n=e.option.installUrl)),e.option.installPopupWindow){if(0==e.installCheck){var r=o.generatePopupButton(n,"Install Page",e.option.installPopupWindowHeight,e.option.installPopupWindowWidth);0==r&&0==e.installCheck&&e.emit(f.EVENT.POPUP_BLOCKED)}e.installCheck=!0,e.compareVersion()}else location.href=n}else 1==e.option.autoCheckVersion&&e.compareVersion()}):r.checkVersion(function(t,i){if(null!=t)if(0==t)if(0==e.installCheck&&1==e.option.autoCheckVersion){var n="";if(e.option.isMobile?(n=e.option.installUrlMobile+"?redirect="+encodeURIComponent(window.location.href),-1!=e.option.installUrlMobile.indexOf("redirect")&&(n=e.option.installUrlMobile)):(n=e.option.installUrl+"?redirect="+encodeURIComponent(window.location.href),-1!=e.option.installUrl.indexOf("redirect")&&(n=e.option.installUrl)),e.option.installPopupWindow){if(0==e.installCheck){var r=o.generatePopupButton(n,"Install Page",e.option.installPopupWindowHeight,e.option.installPopupWindowWidth);0==r&&0==e.installCheck&&e.emit(f.EVENT.POPUP_BLOCKED)}e.installCheck=!0,e.compareVersion()}else location.href=n}else if(1==e.option.autoCheckVersion)e.compareVersion();else{var n="";if(e.option.isMobile?(n=e.option.installUrlMobile+"?redirect="+encodeURIComponent(window.location.href),-1!=e.option.installUrlMobile.indexOf("redirect")&&(n=e.option.installUrlMobile)):(n=e.option.installUrl+"?redirect="+encodeURIComponent(window.location.href),-1!=e.option.installUrl.indexOf("redirect")&&(n=e.option.installUrl)),e.option.installPopupWindow){if(0==e.installCheck){var r=o.generatePopupButton(n,"Install Page",e.option.installPopupWindowHeight,e.option.installPopupWindowWidth);0==r&&0==e.installCheck&&e.emit(f.EVENT.POPUP_BLOCKED)}}else location.href=n}else 1!=e.option.agentReadyCheck?(e.state="ready",e.emit(m.CONTROL_LOAD_COMPLETE),e.hideInstallLoading(),e.option.skipAgentCheck||(e.option.installCheckDelay?setTimeout(function(){e._initConnectionProperty()},1e3*e.option.installCheckDelay):e._initConnectionProperty())):(e.emit(m.CONTROL_LOAD_COMPLETE),e.compareTrayVersion())},this)},setOption:function(e){return t.extend(this.option,e),w.setOption(this.option),this._init("refresh"),this},setCookie:function(e){return this.option.cookie=e,w.setOption(this.option),r.setOption(this.option),!0},setResumeType:function(e){return this.option.resumeType=e,w.setOption(this.option),r.setOption(this.option),!0},getCookie:function(){return this.option.cookie},getOption:function(){return this.option},getDownloadPath:function(e){var t=this;if(!this.option.downloadPath&&e)"undefined"==typeof FormData?t.module.getDownloadPathFallback(function(i){t.option.downloadPath=i.path||"",e&&e(i.path)}):t.module.getDownloadPath(function(i){t.option.downloadPath=i.path||"",e&&e(i.path)});else{if(!e)return this.option.downloadPath;e(this.option.downloadPath)}},deleteCookie:function(){return this.option.cookie="",w.setOption(this.option),r.setOption(this.option),!0},setCustomHeader:function(e){return this.option.customHeader=e,w.setOption(this.option),this._init(),this},setPostData:function(e){return this.option.postData=e,w.setOption(this.option),this._init(),this},setFilePostDataByIndex:function(e,t){return this.fileList.setPostDataByIndex(e,t),!0},setFilePostDataById:function(e,t){return this.fileList.setPostDataById(e,t),!0},setAgentMode:function(e){return 0==e?(this.option.agent=!1,this.module=a):(this.option.agent=!0,this.module=r),w.setOption(this.option),r.setOption(this.option),!0},getAgentMode:function(){return this.option.agent},setVirtualTransfer:function(e){return this.option.virtualTransfer=e,w.setOption(this.option),r.setOption(this.option),!0},setLimitRate:function(e){return this.option.limitRate=e,w.setOption(this.option),r.setOption(this.option),!0},setUploadSessionCount:function(e){return this.option.uploadSessionCount=e,w.setOption(this.option),r.setOption(this.option),!0},setDownloadSessionCount:function(e){return this.option.downloadSessionCount=e,w.setOption(this.option),r.setOption(this.option),!0},getVirtualTransfer:function(){return this.option.virtualTransfer},setDownloadSlice:function(e){return this.option.downloadSliceSize=e,w.setOption(this.option),r.setOption(this.option),!0},getDownloadSlice:function(){return this.option.downloadSliceSize},setUploadSlice:function(e){return this.option.uploadSliceSize=e,w.setOption(this.option),r.setOption(this.option),!0},getUploadSlice:function(){return this.option.uploadSliceSize},setUploadUrl:function(e){return this.option.uploadUrl=e,this.option.uploadUrl=o.url.addOriginIfNot(this.option.uploadUrl),w.setOption(this.option),r.setOption(this.option),!0},getUploadUrl:function(){return this.option.uploadUrl},setResumeId:function(e){return this.option.resumeId=e,w.setOption(this.option),r.setOption(this.option),!0},getResumeId:function(){return this.option.resumeId},closeTransferWindow:function(){if(this.option.iframeView){var e;e="parent"==this.option.iframeViewLocation?parent:"top"==this.option.iframeViewLocation?top:parent,e.jQuery(".irx_transferWin_wrapper").hide()}else t(".irx_transferWin_wrapper").hide();s.isActive()&&s.inactive()},_init:function(e){var i=this.option;i.presetDownloadFiles&&(this.presetOptionDownloadFiles(i.presetDownloadFiles),i.presetDownloadFiles=null),i.uploadUrl&&(i.uploadUrl=o.url.addOriginIfNot(i.uploadUrl)),i.uploadCompletedEvent&&i.uploadCompletedEvent.url&&(i.uploadCompletedEvent.url=o.url.addOriginIfNot(i.uploadCompletedEvent.url)),i.downloadCompletedEvent&&i.downloadCompletedEvent.url&&(i.downloadCompletedEvent.url=o.url.addOriginIfNot(i.downloadCompletedEvent.url)),i.downloadType&&"stream"==i.downloadType&&(i.isStream=!0),i.width=i.width||this.view.defaultSize.width,i.height=i.height||this.view.defaultSize.height,this.setSize(i.width,i.height),i.hasOwnProperty("progressTitle")&&t(".irx_transferWin_wrapper .irx_custom_title").text(i.progressTitle),"download"==i.transferMode&&(this.option.$el.find(".irx_filetree").removeClass("empty-uploader"),this.option.$el.find(".irx_filetree").addClass("empty-downloader"),i.hasOwnProperty("emptyDownloadFileText")&&this.option.$el.find(".irx_filetree").find(".irx-empty-download-text").html(i.emptyDownloadFileText),this.option.$el.find(".irx_filetree").find(".irx-empty-download-text").show()),this.option.transferWindowMode&&(this.option.transferStart={upload:"manual",download:"manual"},this.option.$el.hide()),this.option.transferWindowModeOpen&&(this.option.transferStart={upload:"manual",download:"manual"},this.option.$el.hide());var n=this;if(i.events&&t.each(i.events,function(e,t){n.hasHandler(e,t)||n.on(e,t)}),i.alwaysShowFuncBtn){t(".btn-group").css("display","block");var r=Element.prototype.appendChild;Element.prototype.appendChild=function(e){if(e&&e.querySelectorAll){var i=e.querySelectorAll(".btn-group");i.length>0&&t(i).css("display","block")}return r.call(this,e)};var a=Element.prototype.insertBefore;Element.prototype.insertBefore=function(e,i){if(e&&e.querySelectorAll){var o=e.querySelectorAll(".btn-group");o.length>0&&t(o).css("display","block")}return a.call(this,e,i)}}!1===i.showDownloadPath?t(".irx_folderPath_wrapper").css("visibility","hidden"):t(".irx_folderPath_wrapper").css("visibility","visible")},addLocalFiles:function(e){if(!this.checkState())return!1;if(0==this.option.agent)return!1;if("undefined"==typeof FormData){var t=this;return this.module.addLocalFilesFallback(this.option.transferMode,e,function(e){!1===e.value?t.module.licenseNotValidate(e.error):t._addFiles(e.value)}),this}var t=this;return this.module.addLocalFiles(this.option.transferMode,e,function(e){!1===e.value?t.module.licenseNotValidate(e.error):t._addFiles(e.value)},this.option.$el),this},checkState:function(){return"ready"!=this.state?(this.option.agentReadyMessage?alert(this.option.agentReadyMessage):alert(n("agent.exception.notReady")),!1):1!=this.getControlDisabledState()},openFileDialogInput:function(e){this.openFileDialog()},openFileDialog:function(e){function t(){o||(o=!0,i.emit(m.CONTROL_CANCEL_ADD_FILES),i.hideFileLoading()),window.removeEventListener("focus",t)}var i=this;if(!this.checkState())return!1;if(this.showFileLoading(),"undefined"==typeof FormData){var i=this;return this.module.openFileDialogFallback(this.option.transferMode,e,this.option.allowExtension,function(e){!1===e.value?(i.module.licenseNotValidate(e.error),i.hideFileLoading()):(0==e.value.length&&i.emit(m.CONTROL_CANCEL_ADD_FILES),i._addFiles(e.value))}),this}var i=this,o=!1;return window.addEventListener("focus",t),this.module.openFileDialog(this.option.transferMode,e,this.option.allowExtension,function(e){o=!0,window.removeEventListener("focus",t),!1===e.value?(i.module.licenseNotValidate(e.error),i.hideFileLoading()):(0==e.value.length&&i.emit(m.CONTROL_CANCEL_ADD_FILES),i._addFiles(e.value))},this.option.$el),this},openFileDialogSingle:function(e){function t(){o||(o=!0,i.emit(m.CONTROL_CANCEL_ADD_FILES),i.hideFileLoading()),window.removeEventListener("focus",t)}if(!this.checkState())return!1;if(this.showFileLoading(),"undefined"==typeof FormData){var i=this;return this.module.openFileDialogSingleFallback(this.option.transferMode,e,this.option.allowExtension,function(e){!1===e.value?(i.module.licenseNotValidate(e.error),i.hideFileLoading()):(0==e.value.length&&i.emit(m.CONTROL_CANCEL_ADD_FILES),i._addFiles(e.value))}),this}var i=this,o=!1;return window.addEventListener("focus",t),this.module.openFileDialogSingle(this.option.transferMode,e,this.option.allowExtension,function(e){o=!0,window.removeEventListener("focus",t),!1===e.value?(i.module.licenseNotValidate(e.error),i.hideFileLoading()):(0==e.value.length&&i.emit(m.CONTROL_CANCEL_ADD_FILES),i._addFiles(e.value))},this.option.$el),this},openDirectorySelectDialog:function(e,t){if(!this.checkState())return!1;if("function"==typeof e&&(t=e,e=""),0==this.option.agent){if(void 0!==t){var i={value:"",result:!1};t(i)}}else"undefined"==typeof FormData?this.module.downloadPathDialogFallback(e,t):this.module.downloadPathDialog(e,t)},execute:function(e){if(!this.checkState())return!1;"undefined"==typeof FormData?this.module.executeFallback(e,function(e){}):this.module.execute(e)},setDownloadPathValue:function(e,t){if(!this.checkState())return!1;if("function"==typeof e&&(t=e,e=""),0==this.option.agent){if(void 0!==t){var i={result:!0};t(i)}}else{this.option.downloadPath=e,w.setOption(this.option),r.setOption(this.option)}},setDownloadPath:function(e,i){if(!this.checkState())return!1;if("function"==typeof e&&(i=e,e=""),0==this.option.agent){if(void 0!==i){var o={result:!0};i(o)}}else{var n=this;this.setControlDisabledState(!0),s.setDisabledState(!0),"undefined"==typeof FormData?this.module.downloadPathDialogFallback(e,function(e){n.setControlDisabledState(!1),s.setDisabledState(!1),n.option.downloadPath=e.value,n.setOption(n.option),i(e),t(".irx-file-inner-wrapper").length>0&&(t(".empty-downloader").removeClass("empty-downloader"),t(".irx-empty-download-text").hide())}):this.module.downloadPathDialog(e,function(e){n.setControlDisabledState(!1),s.setDisabledState(!1),n.option.downloadPath=e.value,n.setOption(n.option),i(e),t(".irx-file-inner-wrapper").length>0&&(t(".empty-downloader").removeClass("empty-downloader"),t(".irx-empty-download-text").hide())})}},setTransferDownloadPath:function(e,t){if(!this.checkState())return!1;if("function"==typeof e&&(t=e,e=""),0==this.option.agent){if(void 0!==t){var i={result:!0};t(i)}}else{var o=this;this.setControlDisabledState(!0),s.setDisabledState(!0),"undefined"==typeof FormData?this.module.downloadPathDialogFallback(e,function(e){o.setControlDisabledState(!1),s.setDisabledState(!1),o.option.downloadPath=e.value,o.setOption(o.option),s.setManagerDownloadPath(e.value),t(e)}):this.module.downloadPathDialog(e,function(e){o.setControlDisabledState(!1),s.setDisabledState(!1),o.option.downloadPath=e.value,o.setOption(o.option),s.setManagerDownloadPath(e.value),t(e)})}},openFolderDialog:function(e){return!!this.checkState()&&(0!=this.option.agent&&void this.directoryDialog(e))},openDownloadFolder:function(){if(!this.checkState())return!1;if(0==this.option.agent)return!1;var e=this;if(!e.option.downloadPath)return void("undefined"==typeof FormData?e.module.getDownloadPathFallback(function(t){e.option.downloadPath=t.path||"",e.openDownloadFolder()}):e.module.getDownloadPath(function(t){e.option.downloadPath=t.path||"",e.openDownloadFolder()}));this.module.openDownloadFolder(function(e){},this.option)},directoryDialog:function(e){if(!this.checkState())return!1;var t=this;return this.showFileLoading(),"undefined"==typeof FormData?this.module.directoryDialogFallback(this.option.transferMode,e,this.option.folderIntact,function(e){!1===e.value?(t.module.licenseNotValidate(e.error),t.hideFileLoading()):(0==e.value.length&&t.emit(m.CONTROL_CANCEL_ADD_FILES),t._addFiles(e.value))}):this.module.directoryDialog(this.option.transferMode,e,this.option.folderIntact,function(e){!1===e.value?(t.module.licenseNotValidate(e.error),t.hideFileLoading()):(0==e.value.length&&t.emit(m.CONTROL_CANCEL_ADD_FILES),t._addFiles(e.value))},this.option.$el),this},getFolderPath:function(e,t){"undefined"==typeof FormData?this.module.getFolderPathFallback({id:e},t):this.module.getFolderPath({id:e},t)},uploadInput:function(e){this.upload()},upload:function(e){var i=this;return!!this.checkState()&&(1==_.additionalProcess?(s.prepareHtmlThumbnailUpload([],i,i.option),s.emit(m.TRANSFER_UPLOAD_THUMBNAIL),_.await(function(){_.additionalProcess=!1,s.emit(m.TRANSFER_UPLOAD_THUMBNAIL_STOP),setTimeout(function(){i._upload(null,!0)},1e3)})):(t(".irx_thumb_prog_wrapper").hide(),t(".irx_thumb_progressBar").parent().hide(),this._upload()),this)},_upload:function(e,i){var r=this;if(!this.checkState())return!1;var a={},l=!0;if(void 0===e||null==e?a=this.fileList.getUploadFiles():(l=!1,a=e),this.qqoInformation)for(var d=0;d<a.length;d++)a[d].mrtInfo={sessionID:this.qqoInformation.sessionID,folderID:this.qqoInformation.folderID,rootName:a[d].rootName};if(0===a.length||null!=a&&"object"==typeof a&&!Object.keys(a).length)return alert(n("controlBox.noFile")),this;if(!this.option.uploadUrl)return console.log(n("controlBox.notSetUploadUrl")),this;if(1==this.option.platformDepend){var p=0;if(l)p=this.getTotalSize();else for(var h=0;h<a.length;h++)(a[h].transferType="upload")&&(p+=a[h].fileSize);1==this.option.cloudPlatformMode?t.ajax({url:u.getBaseUrl()+"/api/webpage/getGroupId",data:{api_key:u.getKey()},method:"get",dataType:"html"}).done(function(e){r.option.custom||(r.option.custom={}),r.option.custom.groupId=e,t.ajax({url:u.getBaseUrl()+"/api/transfer/"+r.option.licenseGroup,data:{api_key:u.getKey(),fileSize:p},method:"get",dataType:"json"}).done(function(e){if(e.result)r.option.custom||(r.option.custom={}),r.connection.currentPosition&&(r.option.custom.clientLatitude=r.connection.currentPosition.latitude,r.option.custom.clientLongitude=r.connection.currentPosition.longitude),r.connection.serverPosition&&(r.option.custom.serverLatitude=r.connection.serverPosition.latitude,r.option.custom.serverLongitude=r.connection.serverPosition.longitude),r.setDefaultElement(),"compact"==r.option.skin?r.setCompactTemplate():r.option.iframeView?r.setIframeTemplate():r.option.isMobile&&r.setMobileTemplate(),s.upload(a,r,r.option,i);else if("disabled"==e.remain)alert(n("license.disabled"));else if("expired"==e.remain)alert(n("license.expired"));else if("storageLimit"==e.remain)alert(n("license.storageLimit"));else if("trafficLimit"==e.remain)alert(n("license.trafficLimit"));else{var t=o.string.humanFileSize(e.remain);alert(n("wp.overlimit",{size:t}))}})}):t.ajax({url:u.getBaseUrl()+"/api/transfer/"+r.option.licenseGroup,data:{api_key:u.getKey(),fileSize:p},method:"get",dataType:"json"}).done(function(e){if(e.result)r.option.custom||(r.option.custom={}),r.connection.currentPosition&&(r.option.custom.clientLatitude=r.connection.currentPosition.latitude,r.option.custom.clientLongitude=r.connection.currentPosition.longitude),r.connection.serverPosition&&(r.option.custom.serverLatitude=r.connection.serverPosition.latitude,r.option.custom.serverLongitude=r.connection.serverPosition.longitude),r.setDefaultElement(),"compact"==r.option.skin?r.setCompactTemplate():r.option.iframeView?r.setIframeTemplate():r.option.isMobile&&r.setMobileTemplate(),s.upload(a,r,r.option,i);else if("disabled"==e.remain)alert(n("license.disabled"));else if("expired"==e.remain)alert(n("license.expired"));else if("storageLimit"==e.remain)alert(n("license.storageLimit"));else if("trafficLimit"==e.remain)alert(n("license.trafficLimit"));else{var t=o.string.humanFileSize(e.remain);alert(n("wp.overlimit",{size:t}))}})}else r.option.custom||(r.option.custom={}),r.connection.currentPosition&&(r.option.custom.clientLatitude=r.connection.currentPosition.latitude,r.option.custom.clientLongitude=r.connection.currentPosition.longitude),r.connection.serverPosition&&(r.option.custom.serverLatitude=r.connection.serverPosition.latitude,r.option.custom.serverLongitude=r.connection.serverPosition.longitude),r.setDefaultElement(),"compact"==r.option.skin?r.setCompactTemplate():r.option.iframeView?r.setIframeTemplate():r.option.isMobile&&r.setMobileTemplate(),s.upload(a,r,r.option,i);return this},download:function(e){if(!this.checkState()&&!this.option.transferWindowMode)return!1;t(".irx_thumb_prog_wrapper").hide(),t(".irx_thumb_progressBar").parent().hide();var i=!1;if(e)if(t.isArray(e)){var o=[];for(var n in e){var r=this.getFileById(e[n]);r&&o.push(r)}o.length>0&&(i=!0,this._download(o))}else{var r=this.getFileById(e);r&&(i=!0,this._download([r]))}return 0==i&&this._download(this.fileList.getDownloadFiles()),this},downloadAll:function(){return!!this.checkState()&&(t(".irx_thumb_prog_wrapper").hide(),t(".irx_thumb_progressBar").parent().hide(),this.download())},downloadSelectedFiles:function(){return!!this.checkState()&&(t(".irx_thumb_prog_wrapper").hide(),t(".irx_thumb_progressBar").parent().hide(),this._download(this.fileList.getSelectedDownloadFiles()),this)},downloadAndOpen:function(){if(!this.checkState()&&!this.option.transferWindowMode)return!1;var e=this,t=this.fileList.getSelectedDownloadFiles();0==t.length&&(t=this.fileList.getDownloadFiles());var i=t[t.length-1];return i?(0==this.option.agent?a.downloadAndOpen(i,this,this.option):(e.setDefaultElement(),"compact"==this.option.skin?e.setCompactTemplate():e.option.iframeView?e.setIframeTemplate():e.option.isMobile&&e.setMobileTemplate(),s.downloadAndOpen(i,this,this.option)),this):(alert(n("controlBox.noFile")),this)},downloadAndOpenFile:function(e){if(!this.checkState())return!1;var i=this,r=this.getTotalSize();if(1==this.option.platformDepend)1==this.option.cloudPlatformMode?t.ajax({url:u.getBaseUrl()+"/api/webpage/getGroupId",data:{api_key:u.getKey()},method:"get",dataType:"html"}).done(function(l){i.option.custom||(i.option.custom={}),i.option.custom.groupId=l,t.ajax({url:u.getBaseUrl()+"/api/transfer/"+i.option.licenseGroup,data:{api_key:u.getKey(),fileSize:r},method:"get",dataType:"json"}).done(function(t){if(t.result){if(0==i.option.agent)return a.downloadAndOpen(e,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(t){i.option.downloadPath=t.path||"",i.downloadAndOpenFile(e)}):i.module.getDownloadPath(function(t){i.option.downloadPath=t.path||"",i.downloadAndOpenFile(e)}));i.setDefaultElement(),"compact"==i.option.skin?i.setCompactTemplate():i.option.iframeView?i.setIframeTemplate():i.option.isMobile&&i.setMobileTemplate(),s.downloadAndOpen(e,i,i.option)}else if("disabled"==t.remain)alert(n("license.disabled"));else if("expired"==t.remain)alert(n("license.expired"));else if("storageLimit"==t.remain)alert(n("license.storageLimit"));else if("trafficLimit"==t.remain)alert(n("license.trafficLimit"));else{var r=o.string.humanFileSize(t.remain);alert(n("wp.overlimit",{size:r}))}})}):t.ajax({url:u.getBaseUrl()+"/api/transfer/"+i.option.licenseGroup,data:{api_key:u.getKey(),fileSize:r},method:"get",dataType:"json"}).done(function(t){if(t.result){if(0==i.option.agent)return a.downloadAndOpen(e,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(t){i.option.downloadPath=t.path||"",i.downloadAndOpenFile(e)}):i.module.getDownloadPath(function(t){i.option.downloadPath=t.path||"",i.downloadAndOpenFile(e)}));s.downloadAndOpen(e,i,i.option)}else if("disabled"==t.remain)alert(n("license.disabled"));else if("expired"==t.remain)alert(n("license.expired"));else if("storageLimit"==t.remain)alert(n("license.storageLimit"));else if("trafficLimit"==t.remain)alert(n("license.trafficLimit"));else{var r=o.string.humanFileSize(t.remain);alert(n("wp.overlimit",{size:r}))}});else{if(0==i.option.agent)return a.htmlDownload(files,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(t){i.option.downloadPath=t.path||"",i.downloadAndOpenFile(e)}):i.module.getDownloadPath(function(t){i.option.downloadPath=t.path||"",i.downloadAndOpenFile(e)}));i.setDefaultElement(),"compact"==i.option.skin?i.setCompactTemplate():i.option.iframeView?i.setIframeTemplate():i.option.isMobile&&i.setMobileTemplate(),s.downloadAndOpen(e,this,this.option)}return this},_download:function(e){var i=this;if(!this.checkState()&&!this.option.transferWindowMode)return!1;if(0===e.length)return void alert(n("controlBox.noFile"));if(this.qqoInformation)for(var r=0;r<e.length;r++)e[r].mrtInfo={sessionID:this.qqoInformation.sessionID,folderID:this.qqoInformation.folderID,rootName:""};var l=this.getTotalSize();if(1==this.option.platformDepend)1==this.option.cloudPlatformMode?t.ajax({url:u.getBaseUrl()+"/api/webpage/getGroupId",data:{api_key:u.getKey()},method:"get",dataType:"html"}).done(function(r){i.option.custom||(i.option.custom={}),i.option.custom.groupId=r,t.ajax({url:u.getBaseUrl()+"/api/transfer/"+i.option.licenseGroup,data:{api_key:u.getKey(),fileSize:l},method:"get",dataType:"json"}).done(function(t){if(t.result){if(i.option.custom||(i.option.custom={}),i.connection.currentPosition&&(i.option.custom.clientLatitude=i.connection.currentPosition.latitude,i.option.custom.clientLongitude=i.connection.currentPosition.longitude),i.connection.serverPosition&&(i.option.custom.serverLatitude=i.connection.serverPosition.latitude,i.option.custom.serverLongitude=i.connection.serverPosition.longitude),0==i.option.agent)return a.htmlDownload(e,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(t){i.option.downloadPath=t.path||"",i._download(e)}):i.module.getDownloadPath(function(t){i.option.downloadPath=t.path||"",i._download(e)}));i.setDefaultElement(),"compact"==i.option.skin?i.setCompactTemplate():i.option.iframeView?i.setIframeTemplate():i.option.isMobile&&i.setMobileTemplate(),s.download(e,i,i.option)}else if("disabled"==t.remain)alert(n("license.disabled"));else if("expired"==t.remain)alert(n("license.expired"));else if("storageLimit"==t.remain)alert(n("license.storageLimit"));else if("trafficLimit"==t.remain)alert(n("license.trafficLimit"));else{var r=o.string.humanFileSize(t.remain);alert(n("wp.overlimit",{size:r}))}})}):t.ajax({url:u.getBaseUrl()+"/api/transfer/"+i.option.licenseGroup,data:{api_key:u.getKey(),fileSize:l},method:"get",dataType:"json"}).done(function(t){if(t.result){if(i.option.custom||(i.option.custom={}),i.connection.currentPosition&&(i.option.custom.clientLatitude=i.connection.currentPosition.latitude,i.option.custom.clientLongitude=i.connection.currentPosition.longitude),i.connection.serverPosition&&(i.option.custom.serverLatitude=i.connection.serverPosition.latitude,i.option.custom.serverLongitude=i.connection.serverPosition.longitude),0==i.option.agent)return a.htmlDownload(e,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(t){i.option.downloadPath=t.path||"",i._download(e)}):i.module.getDownloadPath(function(t){i.option.downloadPath=t.path||"",i._download(e)}));i.setDefaultElement(),"compact"==i.option.skin?i.setCompactTemplate():i.option.iframeView?i.setIframeTemplate():i.option.isMobile&&i.setMobileTemplate(),s.download(e,i,i.option)}else if("disabled"==t.remain)alert(n("license.disabled"));else if("expired"==t.remain)alert(n("license.expired"));else if("storageLimit"==t.remain)alert(n("license.storageLimit"));else if("trafficLimit"==t.remain)alert(n("license.trafficLimit"));else{var r=o.string.humanFileSize(t.remain);alert(n("wp.overlimit",{size:r}))}});else{if(0==i.option.agent)return a.htmlDownload(e,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(t){i.option.downloadPath=t.path||"",i._download(e)}):i.module.getDownloadPath(function(t){i.option.downloadPath=t.path||"",i._download(e)}));i.setDefaultElement(),"compact"==i.option.skin?i.setCompactTemplate():i.option.iframeView?i.setIframeTemplate():i.option.isMobile&&i.setMobileTemplate(),s.download(e,i,i.option)}},setCompactTemplate:function(){if(s.views.initView(),t(".irx_transferWin_wrapper").find(".irx_filetree").html(this.option.$el.find(".irx_filetree").html()),t(".irx_transferWin_wrapper").find(".irx_close").attr("onclick","forceCloseTransferWindow(this)"),t(".irx_transferWin_wrapper").find(".irx_transferWin").removeClass("transferCompact"),t(".irx_transferWin_wrapper").find(".irx_transferWin").removeClass("transferCompactP"),t(".irx_transferWin_wrapper").find(".irx_transferWin").removeAttr("style"),t(".irx_transferWin_wrapper").find(".irx_container").removeAttr("style"),t(".irx_transferWin_wrapper").find(".irx_bottom").removeAttr("style"),
this.option.transferWindowPolicy?(t(".irx_transferWin_wrapper").find(".irx_transferWin").addClass("transferCompactP"),t(".irx_transferWin_wrapper").find(".irx_bottom_policy").show()):(t(".irx_transferWin_wrapper").find(".irx_bottom_policy").hide(),t(".irx_transferWin_wrapper").find(".irx_transferWin").addClass("transferCompact")),t(".irx_transferWin_wrapper").find(".irx_filetree").show(),this.option.iframeView){var e=this.option.el,i=null;t(".irx_transferWin_wrapper").addClass("iframeControl_"+e.replace("#","")),i="parent"==this.option.iframeViewLocation?parent:"top"==this.option.iframeViewLocation?top:parent;var o=this.option.iframeViewCssUrl;""!=o&&i.jQuery("head").append(o);i.jQuery("head").append("<script>function forceCloseTransferWindow(el){setTimeout(function(){if (!jQuery('.irx_transferWin_wrapper').hasClass('isClosing')){jQuery('.irx_transferWin_wrapper').remove()}},1000);}<\/script>"),t(".irx_transferWin_wrapper").appendTo(i.jQuery("body"));var n=i.jQuery(".iframeControl_"+e.replace("#",""));try{1==this.option.draggableTransferWindow&&n.find(".irx_transferWin").draggable({handle:".irx_header",stop:function(e,i){t(e.target)}})}catch(p){}var r=(i.innerHeight-395)/2+"px",a=(i.innerWidth-500)/2+"px",l="0px",d="0px";if("default"!=this.option.iframeViewTop&&(r=this.option.iframeViewTop),"default"!=this.option.iframeViewLeft&&(a=this.option.iframeViewLeft),"default"!=this.option.iframeViewMarginLeft&&(l=this.option.iframeViewMarginLeft),"default"!=this.option.iframeViewMarginTop&&(d=this.option.iframeViewMarginTop),this.option.transferWindowMode){try{1==this.option.draggableTransferWindow&&i.jQuery(".irx_transferWin").draggable({handle:".irx_header",stop:function(e,i){t(e.target)}})}catch(p){}i.jQuery(".irx_transferWin_wrapper").find(".irx_filetree").html(this.option.$el.find(".irx_filetree").html()),i.jQuery(".irx_transferWin").css({top:r,left:a,"margin-left":l,"margin-top":d})}else n.find(".irx_filetree").html(this.option.$el.find(".irx_filetree").html()),n.find(".irx_transferWin").css({top:r,left:a,"margin-left":l,"margin-top":d})}else t.fn.center=function(e){return e=e?this.parent():window,(t(e).height()-this.outerHeight())/2+t(e).scrollTop()<0?this.css({top:"0px"}):this.css({top:(t(e).height()-this.outerHeight())/2+t(e).scrollTop()+"px"}),this},t(".irx_transferWin_wrapper").find(".irx_transferWin").center(!1),1==this.option.draggableTransferWindow&&t(".irx_transferWin_wrapper").find(".irx_transferWin").draggable({handle:".irx_header",stop:function(e,i){t(e.target)}}),this.option.transferWindowMode&&t(".irx_transferWin_wrapper").find(".irx_transferWin").css({top:"0px",left:"0px","margin-top":"0px","margin-left":"0px"})},setMobileTemplate:function(){s.views.initMobile()},setEncodingTemplate:function(e){var t="",i=0;e.status&&(t=e.status),e.percentage&&(i=e.percentage),s.views.initEncoding(this.option.isMobile,i,t)},setIframeTemplate:function(){if(s.views.initView(),t(".irx_transferWin_wrapper").find(".irx_close").attr("onclick","forceCloseTransferWindow(this)"),this.option.iframeView){var e=this.option.el,i=null;t(".irx_transferWin_wrapper").addClass("iframeControl_"+e.replace("#","")),i="parent"==this.option.iframeViewLocation?parent:"top"==this.option.iframeViewLocation?top:parent;var o=this.option.iframeViewCssUrl;""!=o&&i.jQuery("head").append(o);i.jQuery("head").append("<script>function forceCloseTransferWindow(el){setTimeout(function(){if (!jQuery('.irx_transferWin_wrapper').hasClass('isClosing')){jQuery('.irx_transferWin_wrapper').remove()}},1000);}<\/script>"),t(".irx_transferWin_wrapper").appendTo(i.jQuery("body"));var n=i.jQuery(".iframeControl_"+e.replace("#",""));try{1==this.option.draggableTransferWindow&&n.find(".irx_transferWin").draggable({handle:".irx_header",stop:function(e,i){t(e.target)}})}catch(p){}var r=(i.innerHeight-180)/2+"px",a=(i.innerWidth-500)/2+"px",l="0px",d="0px";if("default"!=this.option.iframeViewTop&&(r=this.option.iframeViewTop),"default"!=this.option.iframeViewLeft&&(a=this.option.iframeViewLeft),"default"!=this.option.iframeViewMarginLeft&&(l=this.option.iframeViewMarginLeft),"default"!=this.option.iframeViewMarginTop&&(d=this.option.iframeViewMarginTop),this.option.transferWindowMode||this.option.transferWindowModeOpen){try{1==this.option.draggableTransferWindow&&i.jQuery(".irx_transferWin").draggable({handle:".irx_header",stop:function(e,i){t(e.target)}})}catch(p){}i.jQuery(".irx_transferWin_wrapper").find(".irx_filetree").html(this.option.$el.find(".irx_filetree").html()),i.jQuery(".irx_transferWin").css({top:r,left:a,"margin-left":l,"margin-top":d})}else n.find(".irx_filetree").html(this.option.$el.find(".irx_filetree").html()),n.find(".irx_transferWin").css({top:r,left:a,"margin-left":l,"margin-top":d})}else t.fn.center=function(e){return e=e?this.parent():window,(t(e).height()-this.outerHeight())/2+t(e).scrollTop()<0?this.css({top:"0px"}):this.css({top:(t(e).height()-this.outerHeight())/2+t(e).scrollTop()+"px"}),this},t(".irx_transferWin_wrapper").find(".irx_transferWin").center(!1),1==this.option.draggableTransferWindow&&t(".irx_transferWin_wrapper").find(".irx_transferWin").draggable({handle:".irx_header",stop:function(e,i){t(e.target)}}),(this.option.transferWindowMode||this.option.transferWindowModeOpen)&&t(".irx_transferWin_wrapper").find(".irx_transferWin").css({top:"0px",left:"0px","margin-top":"0px","margin-left":"0px"})},transferResume:function(){return!!this.checkState()&&(s.resume(),this)},transferPause:function(){return!!this.checkState()&&(s.pause(),this)},transferCancel:function(){return!!this.checkState()&&(s.cancel(),this)},setDropZone:function(e,i){if(e.originalEvent&&e.originalEvent.dataTransfer&&e.originalEvent.dataTransfer.types&&-1==t.inArray("Files",e.originalEvent.dataTransfer.types))return e.preventDefault(),this.emit(m.CONTROL_SET_DROPZONE_ERROR,e),!1;var n=o.getBoundingScreenRect(e.originalEvent,i,this.option),r=o.string.generateUUID();navigator.userAgent.toLowerCase().match("chrome")?this.showDropZone({x:parseInt(n.left-10),y:parseInt(n.top-10),width:parseInt(n.width+20),height:parseInt(n.height+20),newLeft:parseInt(n.newLeft-10),newTop:parseInt(n.newTop-10),newWidth:parseInt(n.newWidth+20),newHeight:parseInt(n.newHeight+20),availLeft:n.availLeft,availTop:n.availTop,screenX:n.screenX,screenY:n.screenY,screenWidth:n.screenWidth,screenHeight:n.screenHeight,mouseClientX:n.mouseClientX,mouseClientY:n.mouseClientY,mouseScreenX:n.mouseScreenX,mouseScreenY:n.mouseScreenY,zoom:n.zoom,isChrome:n.isChrome,dropId:r,uuid:r,debug:this.option.isDebugDropZone,element:i}):this.showDropZone({x:parseInt(n.left-10),y:parseInt(n.top-10),width:parseInt(n.width+20),height:parseInt(n.height+20),dropId:r,uuid:r,debug:this.option.isDebugDropZone,element:i})},showDropZone:function(e){if(!this.checkState()||"download"==this.option.transferMode||0==this.option.enableDropZone)return!1;var i=this;if(this.emit(m.DROPZONE_SHOW),this.option.agent,1==this.option.agent)return e.license=f.ENV.LICENSE,e.signature=f.ENV.SIGNATURE,e.transferMode=this.option.transferMode,e.element&&delete e.element,i.showFileLoading(),"undefined"==typeof FormData?this.module.showDropZoneFallback(e,function(e){!1===e.value?(i.module.licenseNotValidate(e.error),i.hideFileLoading()):i._addFiles(e.value),i.emit(m.DROPZONE_HIDE),i.emit(m.DROPZONE_STATE_HIDE),i.loadingState="hide"}):this.module.showDropZone(e).done(function(e){!1===e.value?(i.module.licenseNotValidate(e.error),i.hideFileLoading()):i._addFiles(e.value)}).always(function(){i.emit(m.DROPZONE_HIDE),i.emit(m.DROPZONE_STATE_HIDE),i.loadingState="hide",i.hideFileLoading()}),this;var o=this.view.$el;if(e.element&&(o=t(e.element)),o.hasClass("evt-dropzone"))return!1;o.off("dragenter"),o.off("dragover"),o.off("dragleave"),o.off("drop"),o.on("dragenter dragover",function(e){i.emit(m.DROPZONE_SHOW),e.preventDefault()}),o.on("dragleave",function(e){i.emit(m.DROPZONE_HIDE),e.preventDefault()});o.on("drop",function(e){i.emit(m.DROPZONE_HIDE);var t=i.module.getDropFile(e);i._addFiles(t.value),e.preventDefault(),e.stopPropagation()})},showDropState:function(e){if(!this.checkState()||"download"==this.option.transferMode||0==this.option.enableDropZone)return!1;this.loadingState="";var t=this;return 1==this.option.agent&&("undefined"==typeof FormData?this.module.showDropStateFallback(e,function(e){1==e.value&&(t.emit(m.DROPZONE_STATE_HIDE),t.loadingState="hide")}):this.module.showDropState(e).done(function(e){1==e.value&&(t.emit(m.DROPZONE_STATE_HIDE),t.loadingState="hide")}).always(function(){}),this)},hideDropZone:function(e){var i=h.AGENT_HTTP_URL;"https:"==window.location.protocol&&(i=h.AGENT_HTTPS_URL);var n={action:"hideDropZone",uuid:e};if("undefined"==typeof FormData){var r=o.string.cryptoRandom().toString().substr(2),a="-----------------------------"+r+"\r\n";a+='Content-Disposition: form-data; name="_action"\r\n\r\n',a+="hideDropZone\r\n",a+="-----------------------------"+r+"\r\n",a+='Content-Disposition: form-data; name="_param"\r\n\r\n',a+=JSON.stringify(n)+"\r\n",a+="-----------------------------"+r+"--\r\n";var s=new XDomainRequest;s.onload=function(){},s.ontimeout=function(){},s.onprogress=function(){},s.open("POST",i+"/webpage"),s.send(a)}else{var l=new FormData;l.append("_action","hideDropZone"),l.append("_param",JSON.stringify(n));var d={url:i+"/webpage",method:"POST",processData:!1,contentType:!1,dataType:"json",data:l};t.ajax(d)}},_addFiles:function(e){var t=this;if("download"==this.option.transferMode)return!1;var i,o,n=[],r=this.fileValidator.checkDemo(e);if(r)return void this.emit(m.CONTROL_ADD_FILE_ERROR,r,e);t.showFileLoading(),0==e.length&&t.hideFileLoading();var a=[],l=[];for(var d in e)if(e.hasOwnProperty(d)){if(i=e[d],i.mode="upload",i.uploadUrl=t.option.uploadUrl,i.fileSize=parseInt(i.fileSize),0==t.option.folderIntact&&(i.rootName=""),i.hasOwnProperty("thumbnail")||(i.thumbnail=!1),i.hasOwnProperty("viaUrl")||(i.viaUrl=this.option.viaUrl),i.hasOwnProperty("controlId")||(i.controlId=this.option.$el.attr("id")),i.hasOwnProperty("basePath"));else{var p=i.filePath.split("/");1==p.length&&(p=i.filePath.split("\\"));for(var h="",f=0;f<p.length-1;f++)h+=p[f]+"\\";i.basePath=h}if("MacIntel"==navigator.platform&&("undefined"!=typeof i.filePath&&"undefined"!=typeof i.filePath.normalize&&(i.filePath=i.filePath.normalize("NFC")),"undefined"!=typeof i.printFileName&&"undefined"!=typeof i.printFileName.normalize&&(i.printFileName=i.printFileName.normalize("NFC"))),(o=this.fileValidator.checkUploadFile(i,e))&&(a.push(i),l.push(o),"maxFileCount"==o.type||"maxTotalSize"==o.type))break;if(0==this.option.agent&&!i.hasOwnProperty("file"))break;!1!==this.emit(m.CONTROL_BEFORE_ADD_FILE,i)&&(o||(this.fileList.addUploadFile(i),n.push(i)))}l.length>0&&this.emit(m.CONTROL_ADD_FILE_ERROR,l,a),n.length>0?this.emit(m.CONTROL_AFTER_ADD_FILES,n):t.hideFileLoading(),s.resetResumeCondition()},addFiles:function(e){if(!this.checkState())return!1;this._addFiles(e)},presetDownloadFiles:function(e){if("undefined"==typeof this.fileList)return!1;var t=this;if("upload"==this.option.transferMode)return!1;for(var i=0;i<e.length;i++)e.hasOwnProperty(i)&&(e[i].thumbnail=!1,e[i].validate=!1,t.option.skipDownloadCheck?(e[i].validate=!0,e[i].fileSize&&(e[i].fileSize=parseInt(e[i].fileSize))):e[i].fileSize?(e[i].validate=!0,e[i].fileSize=parseInt(e[i].fileSize)):t.option.skipFileSizeCheck?(e[i].validate=!0,t.option.agent&&(e[i].isTempFileSize=!0)):t.checkDownloadUrl(e[i]),e[i].sliceSize||(e[i].sliceSize=this.option.sliceSize));for(var o=!0,i=0;i<e.length;i++)e.hasOwnProperty(i)&&(e[i].validate||(o=!1));o&&t._presetDownloadFiles(e)},checkDownloadUrl:function(e){var i=this;t.ajax({url:e.downloadUrl,async:!1,type:"HEAD",timeout:i.option.checkDownloadTimeout}).done(function(t,i,o){var n=o.getResponseHeader("content-length");e.fileSize=n?parseInt(n):0,e.validate=!0}).fail(function(){e.validate=!0})},_presetDownloadFiles:function(e){if("upload"==this.option.transferMode)return!1;e=e.slice(0);for(var t,i,o=[];e.length>0;){if(t=e.shift(),t.mode="download",i=this.fileValidator.checkDownloadFile(t,this.fileList)){this.emit(m.CONTROL_ADD_FILE_ERROR,i,e);break}!1!==this.emit(m.CONTROL_BEFORE_ADD_FILE,t)&&(i||(this.fileList.addDownloadFile(t),o.push(t)))}var n=this;return o.length>0?n.emit(m.CONTROL_AFTER_ADD_FILES,o):n.hideFileLoading(),this},clearFiles:function(){if(!this.checkState())return!1;if(!1!==this.emit(m.CONTROL_BEFORE_REMOVE_FILES,e)){var e=this.fileList.removeAllFiles();this.emit(m.CONTROL_REMOVE_FILES,e),s.resetResumeCondition()}return this},getAllFiles:function(e){return this.fileList.getAllFiles(e)},getFileCount:function(){return this.fileList.getFileCount()},getSelectedFileCount:function(){return this.fileList.getSelectedFileCount()},getTotalFolderCount:function(){return this.fileList.getTotalFolderCount(this.option.$el)},getTotalFolderNames:function(){return this.fileList.getTotalFolderNames()},getSelectedFolderCount:function(){return this.fileList.getSelectedFolderCount(this.option.$el)},getUploadFiles:function(){return this.fileList.getUploadFiles()},getDownloadFiles:function(){return this.fileList.getDownloadFiles()},getUploadFilesSize:function(){return this.fileList.getUploadFilesSize()},getDownloadFilesSize:function(){return this.fileList.getDownloadFilesSize()},getSelectedFiles:function(){return this.fileList.getSelectedFiles()},getFileByIndex:function(e){return this.fileList.getFileByIndex(e)},getFileById:function(e){return this.fileList.getFileById(e)},getTotalSize:function(){return this.fileList.getTotalSize()},getSelectSize:function(){return this.fileList.getSelectSize()},removeFileByIndex:function(e){if(!this.checkState())return!1;var t=this.fileList.getFileByIndex(e);if(t&&!1!==this.emit(m.CONTROL_BEFORE_REMOVE_FILES,[t])){var t=this.fileList.removeFileByIndex(e);this.emit(m.CONTROL_REMOVE_FILES,[t]),s.resetResumeCondition()}return this},removeFileById:function(e){if(!this.checkState())return!1;var t=this.fileList.getFileIndexById(e);if(t>-1){var i=this.fileList.getFileByIndex(t);if(i)if(i.thumbnail)var i=this.fileList.removeFileById(e);else if(!1!==this.emit(m.CONTROL_BEFORE_REMOVE_FILES,[i])){var i=this.fileList.removeFileById(e);this.emit(m.CONTROL_REMOVE_FILES,[i]),s.resetResumeCondition()}}return this},removeFolderByName:function(e){if(!this.checkState())return!1;this.fileList.removeFileById(id);var t=this.fileList.getFileIndexById(id),i=this.fileList.getFileByIndex(t);if(!1!==this.emit(m.CONTROL_BEFORE_REMOVE_FILES,[i])){var i=this.fileList.removeFileById(id);this.emit(m.CONTROL_REMOVE_FILES,[i]),s.resetResumeCondition()}return this},removeAllFiles:function(e){return!!this.checkState()&&(this.clearFiles(),e&&e(),this)},removeSelectedFiles:function(){if(!this.checkState())return!1;var e=this.fileList.getSelectedFiles();if(!1!==this.emit(m.CONTROL_BEFORE_REMOVE_FILES,e)){var e=this.fileList.removeSelectedFiles();this.emit(m.CONTROL_REMOVE_FILES,e),s.resetResumeCondition()}return this},selectAllFiles:function(){if(!this.checkState())return!1;var e=this.fileList.addSelectFilesById();return this.emit(m.CONTROL_SELECT_ROWS,e),this},unselectAllFiles:function(){if(!this.checkState())return!1;var e=this.fileList.unSelectFilesById();return this.emit(m.CONTROL_UNSELECT_ROWS,e),this},addSelectFilesById:function(e){if(!this.checkState())return!1;var t=this.fileList.addSelectFilesById(e);return this.emit(m.CONTROL_SELECT_ROWS,t),this},unSelectFilesById:function(e){if(!this.checkState())return!1;var t=this.fileList.unSelectFilesById(e);return this.emit(m.CONTROL_UNSELECT_ROWS,t),this},setSize:function(e,t){return this.view.setSize(e,t,this.option),this},destroy:function(){this.view.destroy(),this.emit(m.CONTROL_DESTROY);for(var e in this)this.hasOwnProperty(e)&&delete this[e]},getTransferMode:function(){return this.option.transferMode},isEnsureMode:function(e){return e===this.getTransferMode()||!("both"!==this.getTransferMode()||!t.inArray(e,["upload","download"]))},estimateUploadTime:function(e){if(!this.isEnsureMode("upload")||!this.option.uploadUrl)return e(!1),this;var t=this;return this.module.uploadSpeedCheck(this.option.uploadUrl,0,0,this.option.useProxy,function(i){var o=t.getUploadFilesSize()/Math.pow(1024,2)/(i.mbytePerSeconde||1);e(o)}).fail(function(){e(!1)}),this},estimateDownloadTime:function(e){if(!this.isEnsureMode("download"))return e(!1),this;var i=o.array.sampleSize(this.getDownloadFiles(),3),n=t.map(i,function(e,t){if("undefined"!=typeof FormData)return this.module.downloadSpeedCheck(t.downloadUrl,t.fileSize,0,0,this.option.isStream,this.option.useProxy);this.module.downloadSpeedCheckFallback(t.downloadUrl,t.fileSize,0,0,this.option.isStream,this.option.useProxy,function(e){return e})}),r=this;return t.when.apply(null,n).fail(function(){e(!1)}).done(function(){var i=t.makeArray(arguments),o=0;t.each(i,function(e,t){o+=t.mbytePerSeconde});var n=o/i.length,a=r.getDownloadFilesSize()/Math.pow(1024,2)/(n||1);e(a)}),this},showGraph:function(){try{this.view.infoBox.showGraph()}catch(e){}},hideGraph:function(){try{this.view.infoBox.hideGraph()}catch(e){}},_initConnectionProperty:function(){this.option.initSpeedCheck&&this.option.uploadUrl&&this.uploadSpeedCheck();this.connection.serverPosition=null,this.connection.currentPosition=null,this.connection.uploadSpeed=0,this.getCurrentPosition(),this.getServerPosition(),0!=this.option.agent&&1==this.option.loadTransfer&&this.getIncompleteTransfer()},getBrowserCookie:function(e){for(var t,i=e+"=",o=0;o<=document.cookie.length;){var n=o+i.length;if(document.cookie.substring(o,n)==i)return-1==(t=document.cookie.indexOf(";",n))&&(t=document.cookie.length),unescape(document.cookie.substring(n,t));if(0===(o=document.cookie.indexOf(" ",o)+1))break}return""},getCurrentPositionData:function(){return this.connection.currentPosition},getServerPositionData:function(){return this.connection.serverPosition},getCurrentPosition:function(){var e=this;return 0==e.option.platformDepend&&0==e.option.checkLocation?(e.connection.currentPosition={latitude:0,longitude:0},!1):""==e.option.locationUrl?(e.connection.currentPosition={latitude:0,longitude:0},!1):void t.ajax({url:e.option.locationUrl,dataType:"json",success:function(t){var i=t;e.connection.currentPosition={latitude:i.lat,longitude:i["long"]}},error:function(t){var i=t;e.connection.currentPosition={latitude:i.lat,longitude:i["long"]}}})},getServerPosition:function(){var e=this;return 0==e.option.platformDepend&&0==e.option.checkLocation?(e.connection.serverPosition={latitude:0,longitude:0},!1):""==e.option.locationUrl?(e.connection.serverPosition={latitude:0,longitude:0},!1):void t.ajax({url:u.getBaseUrl()+"/api/webpage/getLocation",data:{api_key:u.getKey(),locationUrl:e.option.locationUrl},method:"GET",dataType:"json",success:function(t){var i=t;e.connection.serverPosition={latitude:i.lat,longitude:i["long"]}}})},uploadSpeedCheck:function(e,t,i,o,n){if(0!=this.option.agent){var r=this,a=this.option.uploadUrl,s=this.option.useProxy;e=void 0!==e?e:0,t=void 0!==t?t:0,this.module.uploadSpeedCheck(a,e,t,s,o,n,function(e){r.connection.uploadSpeed=parseFloat(e.mbytePerSecond);var t=r.connection.uploadSpeed,o=Math.round(1024*t*1024/1);if(o||(o=2097152),r.option.sessionCount=16,o=2097152,r.option.sliceSize=o,void 0!==i){i(e)}})}},downloadSpeedCheck:function(e,t,i,o,n,r,a){i=void 0!==i?i:0,o=void 0!==o?o:0,"undefined"==typeof FormData?this.module.downloadSpeedCheckFallback(e,t,i,o,this.option.isStream,this.option.useProxy,r,a,n):this.module.downloadSpeedCheck(e,t,i,o,this.option.isStream,this.option.useProxy,r,a,n)},estimateTime:function(){var e=this.getTotalSize();return 0!=this.connection.uploadSpeed&&{mbytePerSecond:this.connection.uploadSpeed,totalUploadSize:e,estimateTime:Math.ceil(e/parseFloat(1024*this.connection.uploadSpeed*1024))}},transferDistance:function(){function e(e){return e*Math.PI/180}var t=this.connection.currentPosition,i=this.connection.serverPosition;if(!t||!i)return{currentPosition:t,serverPosition:i,distance:0};var o,n,r=parseFloat(t.latitude),a=parseFloat(i.latitude),s=parseFloat(t.longitude),l=parseFloat(i.longitude);return o=s-l,n=Math.sin(e(r))*Math.sin(e(a))+Math.cos(e(r))*Math.cos(e(a))*Math.cos(e(o)),n=Math.acos(n),n=function(e){return 180*e/Math.PI}(n),n=60*n*1.1515,n*=1.609344,{currentPosition:t,serverPosition:i,distance:n}},getIncompleteTransfer:function(){var e=this.transferMode,i=this;"both"!=e&&"upload"!=e||("undefined"==typeof FormData?r.getIncompleteTransferFallback(function(e){i.setUploadTransfer(e)},!0):r.getIncompleteTransfer(t.proxy(this.setUploadTransfer,this),!0))},getUploadResumeInfo:function(e){var i=this.transferMode,o=this;"both"!=i&&"upload"!=i||("undefined"==typeof FormData?r.getIncompleteTransferFallback(function(i){o.setUploadTransfer(i);var n=[];if(0==i.value)return void e(n);var r=t.parseJSON(decodeURIComponent(i.param));n=t.parseJSON(r.files),e(n)},!0,this.option.resumeId):r.getIncompleteTransfer(function(i){o.setUploadTransfer(i);var n=[];if(0==i.value)return void e(n);var r=t.parseJSON(decodeURIComponent(i.param));n=t.parseJSON(r.files),e(n)},!0,this.option.resumeId))},getDownloadResumeInfo:function(e){var i=this.transferMode,o=this;"both"!=i&&"download"!=i||("undefined"==typeof FormData?r.getIncompleteTransferFallback(function(i){o.setDownloadTransfer(i);var n=[];if(0==i.value)return void e(n);var r=t.parseJSON(decodeURIComponent(i.param));n=t.parseJSON(r.files),e(n)},!1,this.option.resumeId):r.getIncompleteTransfer(function(i){o.setDownloadTransfer(i);var n=[];if(0==i.value)return void e(n);var r=t.parseJSON(decodeURIComponent(i.param));n=t.parseJSON(r.files),e(n)},!1,this.option.resumeId))},deleteUploadResumeInfo:function(e){0!=this.option.agent&&(void 0!==e&&null!=e||(e=""),"undefined"==typeof FormData?r.deleteIncompleteTransferFallback(function(){},e):r.deleteIncompleteTransfer(function(){},!0,e))},deleteDownloadResumeInfo:function(e){0!=this.option.agent&&(void 0!==e&&null!=e||(e=""),"undefined"==typeof FormData?r.deleteIncompleteTransferFallback(function(){},!1,e):r.deleteIncompleteTransfer(function(){},!1,e))},setUploadTransfer:function(e){var i=this;if(0==e.value)return!1;var o=t.parseJSON(decodeURIComponent(e.param)),a=t.parseJSON(o.files),s=[],l=[],d=[];for(var p in a)if(a.hasOwnProperty(p)){var h=a[p];"#"+h.controlId==i.option.el&&(o.isChangeFile&&h.isRemove?(d.push({type:"file_is_modified",message:n("controlBox.fileIsModified"),file:h}),l.push(h)):s.push(h))}d.length>0&&this.emit(m.CONTROL_ADD_FILE_ERROR,d,l),s.length>0&&"undefined"!=typeof o.resumeId&&null!=o.resumeId&&""!=o.resumeId?(this.option.incompleteTransfer={transferId:o.transferId},i._addFiles(s)):s.length>0&&1==this.option.autoLoadTransfer?(this.option.incompleteTransfer={transferId:o.transferId},i._addFiles(s)):s.length>0&&confirm(n("controlBox.resumeTransfer"))?(this.option.incompleteTransfer={transferId:o.transferId},i._addFiles(s)):"undefined"==typeof FormData?r.deleteIncompleteTransferFallback(function(){},!0):r.deleteIncompleteTransfer(function(){},!0)},setDownloadTransfer:function(e){var i=this;if(0==e.value)return!1;var o=t.parseJSON(decodeURIComponent(e.param)),a=t.parseJSON(o.files);a.length>0&&"undefined"!=typeof o.resumeId&&null!=o.resumeId&&""!=o.resumeId?(this.option.incompleteTransfer={transferId:o.transferId},i.presetDownloadFiles(a)):a.length>0&&confirm(n("controlBox.resumeTransfer"))?(this.option.incompleteTransfer={transferId:o.transferId},i.presetDownloadFiles(a)):"undefined"==typeof FormData?r.deleteIncompleteTransferFallback(function(){},!1):r.deleteIncompleteTransfer(function(){},!1)},getServerBaseUrl:function(){return u.getBaseUrl()},openPopupWindowInstaller:function(){o.popupWindow(this.option.installUrl,"Install Page",700,500)},stopUploadServerProcessBar:function(e){1==this.option.agent&&s.emit(m.TRANSFER_UPLOAD_WORKING_STOP),setTimeout(function(){e&&e(!0)},1600)},startTransferProgress:function(){s.play()},stopDownloadServerProcessBar:function(e){s.emit(m.TRANSFER_DOWNLOAD_WORKING_STOP),setTimeout(function(){e&&e(!0)},1600)},setControlDisabledState:function(e){1==e?this.emit(m.AGENT_FILE_DIALOG_SHOW):this.emit(m.AGENT_FILE_DIALOG_HIDE),this.disabledState=e},getControlDisabledState:function(){return this.disabledState},removeParentTransferWindow:function(){1==this.option.iframeView&&(parent.jQuery('[class*="iframeControl"]').remove(),top.jQuery('[class*="iframeControl"]').remove())},isAgentInstalled:function(e){this.module.checkVersionNoHandle(function(t){e&&e(t)})},getInstallCheck:function(){return this.installCheck},stopTransfer:function(){s.cancel()},insertQqoInformation:function(e){var t="",i="";e&&(e.sessionID&&(t=e.sessionID),e.folderID&&(i=e.folderID)),""!=t&&""!=i&&(this.qqoInformation={sessionID:t,folderID:i})},sortName:function(e){this.fileList.sortList("printFileName",e),this.emit(m.CONTROL_SORT,this.getAllFiles())},createThumbFiles:function(e,i,n,r){var a=[];for(var s in e)if(e.hasOwnProperty(s)){var l=e[s],d=o.string.generateUUID(),p=l.printFileName,h=p.split("."),f=h[h.length-1];h.pop();var u=h.join(".");u=u+"_thumb_"+i+"x"+n+"_"+r+"."+f;var c=t.extend({},l,{id:d,rowID:d,parentID:l.rowID,filePath:u,printFileName:u,thumbnail:!0});a.push(c)}return a},loadImage:function(e,t){try{var i=new FileReader;i.readAsDataURL(e.file),i.onload=function(){var e=new Image;e.src=i.result,e.onload=function(){t(this)}}}catch(o){return console.log(o),!1}},makeThumbnail:function(e,i,o,n){var r=this;try{var a=t.Deferred();return r.loadImage(e,function(t){var r=document.createElement("canvas"),s=r.getContext("2d"),l=t.width,d=t.height;switch("VERTICAL"!=n&&"HORIZONTAL"!=n&&"FIX"!=n&&(n=d>l?"VERTICAL":"HORIZONTAL"),n){case"VERTICAL":var p=o/d;r.width=l*p,r.height=o,s.drawImage(t,0,0,l*p,o);break;case"HORIZONTAL":var h=i/l;r.width=i,r.height=d*h,s.drawImage(t,0,0,i,d*h);break;default:r.width=i,r.height=o,s.drawImage(t,0,0,i,o)}r.toBlob(function(t){e.file=t,e.fileSize=t.size,a.resolve(e)},"image/png")}),a}catch(s){return console.log(s),!1}},attachWaterMark:function(e,i,n){var r=this,a=t.Deferred();return r.loadImage(e,function(t){var r=document.createElement("canvas"),s=r.getContext("2d");r.width=t.width,r.height=t.height,s.drawImage(t,0,0,t.width,t.height);var l=new Image;l.src=i,l.onload=function(){var i=this.width,l=this.height,d=o.calcWatermarkPosition(n,t.width,r.height,i,l);s.drawImage(this,d.left,d.top,i,l),r.toBlob(function(t){e.file=t,e.fileSize=t.size,a.resolve(e)},"image/png")}}),a},cleanAgentImageCommand:function(){this.list_thumbnail_agent=[],this.list_watermark_agent=[]},appendThumbnailProperty:function(e,i,o,n){if(this.option.agent)return this.list_thumbnail_agent.push({index:e,width:i,height:o,baseline:n}),!0;var r=this,a=t.Deferred(),s=[];return _.additionalProcess=!0,_.await(function(){var l=r.getAllFiles("ORIGINAL");t.isNumeric(e)&&l[e]&&(l=[l[e]]),r.numOfGeneratedThumb||(r.numOfGeneratedThumb=0),r.numOfGeneratedThumb=r.numOfGeneratedThumb+1;var d=r.createThumbFiles(l,i,o,r.numOfGeneratedThumb),p=d.length;for(var h in d)if(d.hasOwnProperty(h)){var f=d[h];"picture"==f.fileExtType?r.makeThumbnail(f,i,o,n).done(function(e){s.push(e),0==--p&&(r._addFiles(s),a.resolve())}):0==--p&&(s.length>0&&r._addFiles(s),a.resolve())}}),_.push(a),!0},appendWatermarkProperty:function(e,i,n){var r=this;i=i.replace(/^\/+/,"");var a=o.string.getFileExt(i);if("jpg"!=(a=a.toLowerCase())&&"jpeg"!=a&&"png"!=a)return"not_supported";if(this.option.agent)return this.list_watermark_agent.push({index:e,markImgUrl:o.url.addOriginIfNot(i),where:"ALL",position:n}),!0;var s=t.Deferred(),l=r.getAllFiles("ALL");return t.isNumeric(e)&&l[e]&&(l=[l[e]]),_.additionalProcess=!0,_.await(function(){var e=l.length;for(var t in l)if(l.hasOwnProperty(t)){var o=l[t];"picture"==o.fileExtType?r.attachWaterMark(o,i,n,t).done(function(t){var i=r.fileList.getFileIndexById(t.id);r.fileList.updateSelectedFile(i,t),0==--e&&s.resolve()}):0==--e&&s.resolve()}}),_.push(s),!0},showFileLoading:function(){var e=this;""==e.fileloadingState&&(e.fileloadingState="wait",e.option.$el.find(".circle_loading_wrapper").show(),setTimeout(function(){"receive"==e.fileloadingState?(e.fileloadingState="",e.emit(m.FILE_PROCESSING_STATE_HIDE),e.option.$el.find(".circle_loading_wrapper").hide()):e.fileloadingState="wait_receive"},1e3))},hideFileLoading:function(){var e=this;"wait"==e.fileloadingState?e.fileloadingState="receive":"wait_receive"==e.fileloadingState&&(e.fileloadingState="receive",e.fileloadingState="",e.option.$el.find(".circle_loading_wrapper").hide())},showInstallLoading:function(){var e=this;this.agentloadingState="wait",e.option.$el.find(".circle_loading_wrapper").show(),setTimeout(function(){"install"==e.agentloadingState?e.option.$el.find(".circle_loading_wrapper").hide():e.agentloadingState="wait_install"},1e3)},hideInstallLoading:function(){var e=this;"wait"==e.agentloadingState?e.agentloadingState="install":"wait_install"==e.agentloadingState&&(e.agentloadingState="install",e.option.$el.find(".circle_loading_wrapper").hide())},setDefaultElement:function(){t(".irx_transferWin_wrapper").find(".irx_bottom_policy").hide(),t(".irx_transferWin_wrapper").find(".irx_filetree").html(""),t(".irx_transferWin_wrapper").find(".irx_filetree").hide(),t(".irx_transferWin_wrapper").find(".irx_transferWin").removeClass("transferCompact"),t(".irx_transferWin_wrapper").find(".irx_transferWin").removeClass("transferCompactP")},resetThumbnailWatermark:function(){this.list_thumbnail_agent=[],this.list_watermark_agent=[];try{var e=this.getAllFiles("THUMBNAIL");for(var t in e)this.removeFileById(e[t].id)}catch(i){}}})});
innorix("ControlBox/defaultOption",function(){"use strict";return{skin:"basic",transferMode:"both",transferStart:{upload:"auto",download:"manual"},viaUrl:"",downloadPath:null,downloadType:"stream",limitRate:0,isStream:!0,useCrypt:!1,encryptMetaData:!1,custom:{},resumeType:"overwrite",resumeUploadType:"",resumeDownloadType:"",resumeCondition:!1,loadTransfer:!0,autoLoadTransfer:!1,showFolderItems:!1,showFolderItemsTree:!0,enableDropZone:!0,cloudPlatformMode:!1,transferWindowMode:!1,transferWindowModeOpen:!1,transferWindowPolicy:!1,showQrCode:!1,usePlugin:!0,iframeView:!1,iframeNestedView:!1,iframeViewCssUrl:"",iframeViewLocation:"top",iframeViewTop:"default",iframeViewLeft:"default",iframeViewMarginLeft:"default",iframeViewMarginTop:"default",cancelConfirmation:!1,draggableTransferWindow:!0,showTransferFileStatus:!1,showTransferWindow:!0,useSmoothGraph:!0,showFileListHeader:!1,showTransferStatusIcon:!0,charset:"UTF-8",isHighSpeed:!0,virtualTransfer:!1,downloadIntegrity:!1,downloadIntegrityFile:!1,advanced:{security:!0,integrity:"both"},isCompress:!1,folderIntact:!0,showGraph:!1,showGraphClose:!0,alwaysShowTransferGraph:!1,checkDownloadTimeout:1e3,skipDownloadCheck:!1,skipFileSizeCheck:!1,isPresignedUrl:!1,hideClientPath:!1,uploadCompletedEvent:{use:!1,url:""},downloadCompletedEvent:{use:!1,url:""},resumeId:"",browserCheckTime:0,userid:null,UserPart:null,limitExtension:null,allowExtension:null,addDuplicateFile:!1,maxFileCount:null,maxFileSize:null,maxTotalSize:null,maxMassFileListCount:1e3,isDebugDropZone:!1,showByteSize:!1,cookie:document.cookie,installRetry:0,customHeader:{},postData:{},retryCount:5,retryDelay:3,downloadDelay:200,keyboardDeleteEvent:!1,autoReTransfer:!0,maximumErrorCount:9999,useProxy:!1,limitContextMenu:!1,timeout:{minSeconds:60,bytes:0,seconds:0},width:null,height:null,monitorServer:null,ServerHost:null,agent:!0,demo:!1,demo2:!1,sliceSize:2097152,downloadSliceSize:0,uploadSliceSize:0,sessionCount:15,uploadSessionCount:0,downloadSessionCount:0,isSliceTransfer:!1,showSelectBox:!0,showFuncBtn:["remove","move"],useContextMenu:!0,initSpeedCheck:!1,useDb:!0,showRemovedFiles:!1,installUrl:"/wp9/install/install.html",installUrlMobile:"/wp9/install/installMobile.html",installPopupWindow:!1,installPopupWindowHeight:1875,installPopupWindowWidth:975,installPopupWindowTop:0,installPopupWindowLeft:0,autoCheckVersion:!1,enableMobileAgent:!1,autoHtmlMode:!1,agentReadyCheck:!1,licenseGroup:"wp",platformDepend:!1,skipAgentCheck:!1,checkLocation:!1,mrtVersion2:!1,multipartMrt:!1,locationUrl:"",progressTitle:"WP",controlLang:"en",autoSortFile:"",installCheckDelay:0,emptyDownloadFileText:"There is no download file here.",showPreviewImage:!1,showPreviewPdf:!1,setPreviewDiv:null,skipDownloadOpenCheck:!0,guideMessage:"",htmlTransferErrorLog:!0,alwaysShowFuncBtn:!1,showDownloadPath:!0}});
innorix("ControlBox/FileList",function(e){"use strict";var t=e("innoJquery"),i=e("util"),n=e("klass"),r=i.decorator.caching,l=i.decorator.removeCache;return n({constructor:function(){this.files=[],this.folders=[]},addUploadFile:l(function(e){var n=this,r="";r=this.getFileTree(e);var l=r.split("/");1==l.length&&(l=r.split("\\"));for(var s="",o=0;o<l.length;o++)s+=l[o],-1==n.folders.indexOf(s)&&""!=s&&n.folders.push(s);var f="";e.filePath&&(f=i.string.getFileName(e.filePath)),e.printFileName&&(f=e.printFileName);var a=i.string.generateUUID(),u=i.string.generateUUID()+".dat";0==e.isFile&&this.folders.push(a);var d=a;e.id&&(d=e.id),e.rowID&&(d=e.rowID);var c={};"undefined"!=typeof e.encoding&&(c=e.encoding);var h="";"undefined"!=typeof e.mediaType&&(h=e.mediaType);var p="";p=e.fileExtType?""==e.fileExtType?i.string.getFileExtType(f).toLowerCase():e.fileExtType:i.string.getFileExtType(f).toLowerCase();var g=-1;if(e.parentID){g=this.getFileIndexById(e.parentID),delete e.parentID}t.extend(e,{id:d,rowID:d,fileExtType:p,transferType:"upload",selected:!1,printFileName:f,uniqueFileName:u,folderName:r,rootName:r,encoding:c,mediaType:h}),-1!=g?this.files.splice(g+1,0,e):this.files.push(e)}),addDownloadFile:l(function(e){var n=i.string.generateUUID(),r=this,r=this,l="";e.rootName&&(l=e.rootName);var s=l.split("/");1==s.length&&(s=l.split("\\"));for(var o="",f=0;f<s.length;f++)o+=s[f],-1==r.folders.indexOf(o)&&""!=o&&r.folders.push(o);0!=e.isFile&&1!=e.isVirtual||this.folders.push(n);var a=n;e.id&&(a=e.id),e.rowID&&(a=e.rowID);var u="";e.printFileName&&(u=e.printFileName);var d="";d=e.fileExtType?""==e.fileExtType?i.string.getFileExtType(u).toLowerCase():e.fileExtType:i.string.getFileExtType(u).toLowerCase(),t.extend(e,{id:a,rowID:a,transferType:"download",selected:!1,fileExtType:d,downloadUrl:i.url.addOriginIfNot(e.downloadUrl),fileSize:e.fileSize,isVirtual:e.isVirtual}),this.files.push(e)}),addSelectFilesById:l(function(e){var i=[];return t.each(this.files,function(t,n){e&&-1===e.indexOf(n.id)||(n.selected=!0,i.push(n))}),i}),unSelectFilesById:l(function(e){var i=[];return t.each(this.files,function(t,n){e&&-1===e.indexOf(n.id)||(n.selected=!1,i.push(n))}),i}),updateSelectedFile:function(e,t){return this.files[e]=t,this.files},getAllFiles:function(e){return e?"ORIGINAL"==e?t.grep(this.files,function(e){return!0!==e.thumbnail}):"THUMBNAIL"==e?t.grep(this.files,function(e){return!0===e.thumbnail}):this.files:t.grep(this.files,function(e){return!0!==e.thumbnail})},getUploadFiles:r(function(){return t.grep(this.files,function(e){return"upload"===e.transferType})}),getDownloadFiles:r(function(){return t.grep(this.files,function(e){return"download"===e.transferType})}),getSelectedFiles:r(function(){return t.grep(this.files,function(e){return!0===e.selected})}),getSelectedDownloadFiles:r(function(){return t.grep(this.files,function(e){if(!0===e.selected&&"download"===e.transferType)return e})}),getFileById:function(e){return i.array.find(this.files,function(t){return t.id===e})},getFileByIndex:function(e){return this.files[e]},getFileIndexById:function(e){var t=-1;return i.array.find(this.files,function(i,n){return i.id===e&&(t=n,!0)}),t},getFolderIndexByName:function(e){var t;return i.array.find(this.folders,function(i,n){return i===e&&(t=n,!0)}),t},setPostDataById:function(e,t){var i=this.getFileIndexById(e);return this.setPostDataByIndex(i,t)},setPostDataByIndex:l(function(e,t){return this.files[e].postData=t,this.files[e]}),removeFileById:function(e){var t=this.getFileIndexById(e);return this.removeFileByIndex(t)},removeFolderByName:function(e){var t=this.getFolderIndexByName(e);return this.removeFolderByIndex(t)},removeFileByIndex:l(function(e){var t=this.files[e];return this.files.splice(e,1),t}),removeFolderByIndex:l(function(e){var t=this.folders[e];return this.folders.splice(e,1),t}),removeAllFiles:l(function(){var e=this.files;return this.files=[],e}),removeSelectedFiles:l(function(){var e=[];return this.files=t.grep(this.files,function(t){return!t.selected||(e.push(t),!1)}),e}),getFileCount:function(){return this.files.length},getSelectedFileCount:function(){return this.getSelectedFiles().length},getSelectedFolderCount:function(e){var i=0;return t(e).find(".is-directory").each(function(e){t(this).hasClass("selected")&&i++}),i},getTotalFolderCount:function(e){var i=0;return t(e).find(".is-directory").each(function(e){i++}),i},getTotalFolderNames:function(){return this.folders},getTotalSize:r(function(){var e=0;return t.each(this.files,function(t,i){e+=i.fileSize}),e}),getUploadFilesSize:r(function(){var e=0;return t.each(this.getUploadFiles(),function(t,i){e+=i.fileSize}),e}),getDownloadFilesSize:r(function(){var e=0;return t.each(this.getDownloadFiles(),function(t,i){e+=i.fileSize}),e}),getSelectSize:r(function(){var e=0;return t.each(this.files,function(t,i){i.selected&&(e+=i.fileSize)}),e}),getFileTree:function(e){var t="",i=e.basePath.split("/");1==i.length&&(i=e.basePath.split("\\"));var n=e.filePath.split("/");1==n.length&&(n=e.filePath.split("\\"));try{for(var r=0;r<i.length;r++)n.shift();n.pop(),t=n.length>0?n.join("/"):""}catch(l){console.log(l),t=""}return t},sortList:function(e,t){this.unSelectFilesById(),"asc"==t?this.files.sort(function(t,i){return t[e]<i[e]?-1:t[e]==i[e]?0:1}):this.files.sort(function(t,i){return t[e]>i[e]?-1:t[e]==i[e]?0:1})}})});
innorix("ControlBox/fileValidateRules",function(e){"use strict";var t=e("util"),i=e("i18n/lang");return{addDuplicateFile:function(e,n,o){return!n&&(!(o.option.maxMassFileListCount<o.getAllFiles().length)&&(!!t.array.find(o.getAllFiles(),function(t){return e.filePath===t.filePath})&&i("controlBox.fileDuplicate")))},maxFileCount:function(e,t,n){return t>0&&n.getFileCount()>=t&&i("controlBox.overFileCount",{count:t})},maxTotalSize:function(e,n,o){return n>0&&o.getTotalSize()+e.fileSize>n&&i("controlBox.overTotalSize",{size:t.string.humanFileSize(n)})},limitExtension:function(e,n){if(!n||0===n.length)return!1;var o=t.string.getFileExt(e.filePath).toLowerCase();return-1!=n.indexOf(o)&&i("controlBox.cannotFileExt",{ext:o})},allowExtension:function(e,n){if(!n)return!1;var o=t.string.getFileExt(e.filePath).toLowerCase();if(n.length>0){var l=n.indexOf(o);if(-1==l)return i("controlBox.cannotFileExt",{ext:o})}else if("object"==typeof n){var l=!1;for(var r in n)if(n[r].length>0&&-1!=n[r].indexOf(o)){l=!0;break}if(!l)return i("controlBox.cannotFileExt",{ext:o})}return!1},maxFileSize:function(e,n){return n>0&&e.fileSize>n&&i("controlBox.overFileSize",{size:t.string.humanFileSize(n)})},existUploadFile:function(e,t){return 0==e.exist&&i("controlBox.fileNotExist")}}});
innorix("ControlBox/FileValidator",function(o){"use strict";var i=o("klass"),t=o("util"),e=o("i18n/lang"),n=o("ControlBox/fileValidateRules");return i({constructor:function(o,i){this.controlBox=o,this.option=i},checkDemo:function(o){var i="";if(1==this.option.demo&&0==this.option.virtualTransfer){if(this.option.maxFileCount=10,this.option.maxTotalSize=2147483648,o.length>10||this.controlBox.getFileCount()+o.length>10)return i=e("controlBox.demo.overFileCount"),alert(i),{type:"overFileCount",message:e("controlBox.overFileCount"),file:null};var t=this.controlBox.getUploadFilesSize();for(var n in o)o.hasOwnProperty(n)&&(t+=o[n].fileSize);if(t>this.option.maxTotalSize)return i=e("controlBox.demo.overTotalSize"),alert(i),{type:"overTotalSize",message:e("controlBox.overFileCount"),file:null}}return!1},checkUploadFile:function(o,i){var e=this;return 1==this.option.demo&&0==this.option.virtualTransfer&&(this.option.maxFileCount=10,this.option.maxTotalSize=2147483648),t.array.some(n,function(i,t){var n=i(o,e.option[t],e.controlBox);return!!n&&("existUploadFile"==t&&(t="attachFileError"),{type:t,message:n,file:o})})},checkDownloadFile:function(o,i){var t,n=i.files;if(o.downloadUrl||(t="{file.downloadUrl} is required"),o.printFileName||(t="{file.printFileName} is required"),this.controlBox.option.skipFileSizeCheck||"undefined"==typeof o.fileSize&&(t="{file.fileSize} is required"),this.controlBox.option.maxFileCount&&this.controlBox.getFileCount()>=this.controlBox.option.maxFileCount&&(t=e("controlBox.overFileCount",{count:this.controlBox.option.maxFileCount})),!this.controlBox.option.addDuplicateFile)for(var l in n)n.hasOwnProperty(l)&&o.downloadUrl==n[l].downloadUrl&&(t=e("controlBox.fileDuplicate"));return!!t&&{type:"invalid_download_file",message:t,file:o}}})});
innorix("i18n/lang",function(_){"use strict";function I(I,D){D=D||{};var E=_("i18n/resource/"+A),T=E[I]||I;for(var L in D)D.hasOwnProperty(L)&&(T=T.replace(new RegExp("{"+L+"}","g"),D[L]));return T}var D=["en","ko","auto"],A="en";return-1===D.indexOf(A)&&(A=D[0]),I.get=function(){return A},I.set=function(_){if(-1!==D.indexOf(_))if("auto"==_){var I=(window.navigator.language||window.navigator.userLanguage).substring(0,2);-1!==D.indexOf(I)&&(A=I)}else A=_},I.addResource=function(_,I){D.push(_),innorix("i18n/resource/"+_,function(){return I})},I.resourceGetter=function(_){var D={openFileDialog:{ID_OPEN_FILE_DIALOG_TITLE:I("ID_OPEN_FILE_DIALOG_TITLE")},directoryDialog:{ID_DIR_DIALOG_TITLE:I("ID_DIR_DIALOG_TITLE"),ID_DIR_DIALOG_BUTTON:I("ID_DIR_DIALOG_BUTTON")},total:{ID_ASK_TITLE:I("ID_ASK_TITLE"),ID_ASK_FILENAME:I("ID_ASK_FILENAME"),ID_ASK_EXIST:I("ID_ASK_EXIST"),ID_ASK_NEWFILESIZE:I("ID_ASK_NEWFILESIZE"),ID_ASK_ALLCHECK:I("ID_ASK_ALLCHECK"),ID_ASK_BTN_OVERWRITE:I("ID_ASK_BTN_OVERWRITE"),ID_ASK_BTN_RESUME:I("ID_ASK_BTN_RESUME"),ID_ASK_BTN_SAVEAS:I("ID_ASK_BTN_SAVEAS"),ID_ASK_BTN_CANCEL:I("ID_ASK_BTN_CANCEL"),ID_ASK_BTN_JUMP:I("ID_ASK_BTN_JUMP"),ID_ASK_BTN_SAVEAUTO:I("ID_ASK_BTN_SAVEAUTO"),ID_ASK_TEXT_AUTONAME_TAIL:I("ID_ASK_TEXT_AUTONAME_TAIL"),ID_ASK_ALLCHECK_NEW:I("ID_ASK_ALLCHECK_NEW"),ID_ASK_SUN:I("ID_ASK_SUN"),ID_ASK_MON:I("ID_ASK_MON"),ID_ASK_TUE:I("ID_ASK_TUE"),ID_ASK_WED:I("ID_ASK_WED"),ID_ASK_THU:I("ID_ASK_THU"),ID_ASK_FRI:I("ID_ASK_FRI"),ID_ASK_SAT:I("ID_ASK_SAT"),ID_ASK_AM:I("ID_ASK_AM"),ID_ASK_PM:I("ID_ASK_PM"),ID_MSG_ACCESS_DENIED:I("ID_MSG_ACCESS_DENIED"),ID_ERRTITLE_FILE_DOWNLOAD_FAIL:I("ID_ERRTITLE_FILE_DOWNLOAD_FAIL"),ID_ERRTITLE_HTTP_CONNECT_INFO_FAIL:I("ID_ERRTITLE_HTTP_CONNECT_INFO_FAIL"),ID_ERRTITLE_HTTP_CONNECT_DATA_FAIL:I("ID_ERRTITLE_HTTP_CONNECT_DATA_FAIL"),ID_ERRTITLE_NOT_PATH_UPLOAD_ERROR:I("ID_ERRTITLE_NOT_PATH_UPLOAD_ERROR"),ID_ERRTITLE_SERVER_SCRIPT_ERROR:I("ID_ERRTITLE_SERVER_SCRIPT_ERROR"),ID_ERRTITLE_SEND_INFO_FAIL:I("ID_ERRTITLE_SEND_INFO_FAIL"),ID_ERRTITLE_WRITE_UPLOAD_ERROR:I("ID_ERRTITLE_WRITE_UPLOAD_ERROR"),ID_ERRMSG_SEND_HEADER_FAIL:I("ID_ERRMSG_SEND_HEADER_FAIL"),ID_OPEN_FILE_DIALOG_TITLE:I("ID_OPEN_FILE_DIALOG_TITLE"),ID_DIR_DIALOG_TITLE:I("ID_DIR_DIALOG_TITLE"),ID_DIR_DIALOG_BUTTON:I("ID_DIR_DIALOG_BUTTON"),ID_DOWNLOAD_PATH_DIALOG:I("ID_DOWNLOAD_PATH_DIALOG"),ID_DOWNLOAD_PATH_DIALOG_BUTTON:I("ID_DOWNLOAD_PATH_DIALOG_BUTTON")}},A=/iPhone|iPad|iPod|Android|SamsungBrowser/i.test(navigator.userAgent);return!A&&navigator.userAgent.indexOf("Mac")>-1&&navigator.maxTouchPoints&&(A=!0),D[_]?A?D[_]:JSON.stringify(D[_]):A?D.total:JSON.stringify(D.total)},I});
innorix("Klass/Composite",function(n){"use strict";var s=n("innoJquery");return n("klass")({constructor:function(n,t){this.__definedKlass=n,this.__instances=t||[];var i=this,e=n.prototype;s.each(e,function(n,t){!e.hasOwnProperty(n)&&i[n]||(i[n]=function(){var n=arguments;return s.map(i.__instances,function(s){return t.apply(s,n)})})})},__add:function(n){n instanceof this.__definedKlass&&this.__instances.push(n)},__remove:function(n){var s=this.__instances.indexOf(n);this.__instances.splice(s,1)}})});
innorix("Klass/Event",function(n){"use strict";var r=n("innoJquery");return n("klass")({constructor:function(){this._handlers={}},on:function(n,t){if(r.isPlainObject(n)){for(var i in n)n.hasOwnProperty(i)&&this.on(i,n[i]);return this}if(this.hasHandler(n)||(this._handlers[n]=[]),!r.isFunction(t))throw"not function! : "+n;return this._handlers[n].push(t),this},off:function(n,r){if(!r)return delete this._handlers[n],this;var t=this._handlers[n].indexOf(r);return-1!==t&&this._handlers.splice(t,1),this},emit:function(){var n=r.makeArray(arguments),t=n.shift();if(!this.hasHandler(t))return null;var i,s=this._handlers[t];for(var e in s)if(s.hasOwnProperty(e)){if(!s.hasOwnProperty(e))break;if(i=s[e],!1===i.apply(null,n))return!1}return!0},hasHandler:function(n,r){return!(!this._handlers.hasOwnProperty(n)||r&&-1===this._handlers[n].indexOf(r))}})});
innorix("Server/Client",function(e){"use strict";var t=e("innoJquery");return e("klass")({constructor:function(e,t){e&&this.setBaseUrl(e),t&&(this.key=t),this.lastRequest=null},setBaseUrl:function(e){this.baseUrl=e.replace(/[\/\s]+innoJquery/,"")},getBaseUrl:function(){return this.baseUrl},setKey:function(e){this.key=e},getKey:function(){return this.key},makeRequestUrl:function(e){return this.baseUrl+"/api/"+e+"?api_key="+this.key},request:function(e,s,n){return this.lastRequest=t.ajax({url:this.makeRequestUrl(s),type:e.toUpperCase(),dataType:"json",data:n||{}}),this.lastRequest}})});
innorix("singleton/agent",function(n){"use strict";var t=n("CONSTANT/ENV"),o=n("Agent/Agent");return new o("https:"==window.location.protocol?t.AGENT_HTTPS_URL:t.AGENT_HTTP_URL)});
innorix("singleton/agentUpdater",function(t){"use strict";var n=t("CONSTANT/ENV"),e=t("AgentUpdater/AgentUpdater");return new e("https:"==window.location.protocol?n.AGENT_HTTPS_URL:n.AGENT_HTTP_URL)});
innorix("singleton/controlBoxAll",function(o){"use strict";var n=o("ControlBox/ControlBox");return new(o("Klass/Composite"))(n)});
innorix("singleton/html",function(n){"use strict";var t=n("CONSTANT/ENV"),T=n("HTML/HTML");return new T("https:"==window.location.protocol?t.AGENT_HTTPS_URL:t.AGENT_HTTP_URL)});
innorix("singleton/transferManager",function(n){"use strict";return new(n("Transfer/Manager"))});
innorix("Transfer/Manager",function(t){"use strict";var i=t("klass"),s=t("Klass/Event"),n=t("Transfer/View/Views"),r=t("Transfer/Transferring/Upload"),e=t("Transfer/Transferring/Download"),a=t("Transfer/Transferring/DownloadAndOpen"),h=t("singleton/agent"),o=t("singleton/html"),l=t("CONSTANT/EVENT");return i([s],{constructor:function(){s.call(this),this.lastTransferring=null,this.views=new n(this),this.currentErrorCount=0,this.stuckCount=0,this.htmlCancel=!1,this.workingServer=!1,this.resumeCondition=!1,this.disabledState=!1},isActive:function(){return this.lastTransferring&&!this.lastTransferring.ended},isPlaying:function(){return this.isActive()&&this.lastTransferring.playing},isPlayingHtml:function(){return!this.htmlCancel},isStarted:function(){return this.isActive()&&this.lastTransferring.started},isPause:function(){return this.isStarted()&&!this.lastTransferring.playing},inactive:function(){this.isActive()&&(this.lastTransferring.ended=!0)},getTransferring:function(){return this.isActive()?this.lastTransferring:null},prepareHtmlThumbnailUpload:function(t,i,s){this.isActive()||(s.draggableTransferWindow&&0==s.iframeView&&this.views.initDraggable(),s.resumeCondition=this.resumeCondition,this.lastTransferring=new r(t,this,i,s),!1===s.agent&&o.prepareHtmlUpload(s),this.emit(l.TRANSFER_UPLOAD_CREATE,this.lastTransferring.lastStatus))},upload:function(t,i,s,n){if(1==n);else if(this.isActive())return;s.draggableTransferWindow&&0==s.iframeView&&this.views.initDraggable(),s.resumeCondition=this.resumeCondition,this.lastTransferring=new r(t,this,i,s),s.showQrCode&&this.emit(l.TRANSFER_UPLOAD_CREATE_QR,this.lastTransferring),!1===s.agent?(this.htmlCancel=!1,o.htmlUpload(t,i,s,this)):("basic"==s.skin&&this.views.refreshStyle(),this.emit(l.TRANSFER_GUIDE_MESSAGE,this.lastTransferring),this.emit(l.TRANSFER_UPLOAD_CREATE,this.lastTransferring.lastStatus),"auto"==s.transferStart.upload?this.lastTransferring.play():this.emit(l.TRANSFER_UPLOAD_CREATE_GUIDE,this.lastTransferring.lastStatus))},download:function(t,i,s){this.isActive()||(s.draggableTransferWindow&&0==s.iframeView&&this.views.initDraggable(),this.lastTransferring=new e(t,this,i,s),this.emit(l.TRANSFER_DOWNLOAD_CREATE,this.lastTransferring.lastStatus),s.showQrCode&&this.emit(l.TRANSFER_DOWNLOAD_CREATE_QR,this.lastTransferring),"basic"==s.skin&&this.views.refreshStyle(),this.emit(l.TRANSFER_GUIDE_MESSAGE,this.lastTransferring),"auto"==s.transferStart.download?this.lastTransferring.play():this.emit(l.TRANSFER_DOWNLOAD_CREATE_GUIDE,this.lastTransferring.lastStatus))},downloadAndOpen:function(t,i,s){s.draggableTransferWindow&&0==s.iframeView&&this.views.initDraggable(),s.showQrCode&&this.emit(l.TRANSFER_DOWNLOAD_CREATE_QR,this.lastTransferring),this.lastTransferring=new a(t,this,i,s),this.emit(l.TRANSFER_DOWNLOAD_CREATE,this.lastTransferring.lastStatus),"basic"==s.skin&&this.views.refreshStyle(),this.emit(l.TRANSFER_GUIDE_MESSAGE,this.lastTransferring),s.transferStart.download,this.lastTransferring.play()},play:function(){this.isActive()&&!this.isStarted()&&this.lastTransferring.play()},cancel:function(){this.htmlCancel=!0,this.isActive()&&(this.isStarted()&&this.lastTransferring.paused?(this.lastTransferring.cancel(),this.lastTransferring.handleOnCancel()):this.isStarted()&&!this.lastTransferring.paused?this.lastTransferring.cancel():this.lastTransferring.handleOnCancel(),this.resumeCondition=!0)},pause:function(){100!=this.lastTransferring.lastStatus.progress&&this.isActive()&&this.isPlaying()&&this.lastTransferring.pause()},resume:function(){this.isActive()&&this.isPause()&&this.lastTransferring.resume()},canChangeDownloadPath:function(){var t=this.lastTransferring;return this.isActive()&&"download"===t.getType()&&!t.started},downloadPathDialog:function(t){if(this.canChangeDownloadPath()){var i=this,s=this.lastTransferring;this.setDisabledState(!0),"undefined"==typeof FormData?h.downloadPathDialogFallback(t,function(t){i.canChangeDownloadPath()&&(s.setDownloadPath(t.value),i.setDisabledState(!1),i.emit(l.TRANSFER_CHANGE_DOWNLOADPATH,t.value))}):h.downloadPathDialog(t,function(t){i.canChangeDownloadPath()&&(s.setDownloadPath(t.value),i.setDisabledState(!1),i.emit(l.TRANSFER_CHANGE_DOWNLOADPATH,t.value))})}},showGraph:function(){},setWorkingServer:function(){this.workingServer=!0,this.emit(l.TRANSFER_UPLOAD_WORKING)},stopWorkingServer:function(){this.workingServer&&(this.workingServer=!1,this.emit(l.TRANSFER_UPLOAD_WORKING_STOP))},initErrorCount:function(){this.currentErrorCount=0},addErrorCount:function(){return++this.currentErrorCount>this.lastTransferring.option.maximumErrorCount&&(this.currentErrorCount=0,!0)},addStuckCount:function(){this.stuckCount=0},resetStuckCount:function(){this.stuckCount=0},getStuckCount:function(){return this.stuckCount},resetResumeCondition:function(){this.resumeCondition=!1},setResumeType:function(t){this.lastTransferring.option.resumeType=t},setManagerDownloadPath:function(t){this.lastTransferring.setDownloadPath(t),this.emit(l.TRANSFER_CHANGE_DOWNLOADPATH,t)},setDisabledState:function(t){1==t?this.emit(l.AGENT_FILE_DIALOG_SHOW):this.emit(l.AGENT_FILE_DIALOG_HIDE),this.disabledState=t},getDisabledState:function(){return this.disabledState}})});
innorix("utils/array",function(r){"use strict";var n=r("innoJquery");return{cryptoRandom:function(){try{for(var r,n,t=[];(n="."+t.join("")).length<30;){r=(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(5));for(var e=0;e<r.length;e++){var i=r[e]<4e9?r[e].toString().slice(1):"";i.length>0&&(t[t.length]=i)}}return Number(n)}catch(o){return Math.random()}},find:function(r,t){if(n.isArray(r)){for(var e=r.length-1;e>=0;e--)if(t(r[e],e))return r[e];return null}for(var i in r)if(r.hasOwnProperty(i)&&t(r[i],i))return r[i];return null},some:function(r,t){var e;if(n.isArray(r)){for(var i=r.length-1;i>=0;i--)if(e=t(r[i],i))return e;return null}for(var o in r)if(r.hasOwnProperty(o)&&(e=t(r[o],o)))return e;return null},sampleSize:function(r,n){var t=this,e=null===r?0:r.length;if(!e||n<1)return[];n=n>e?e:n;for(var i,o=-1,u=r.slice(0),a=[];++o<n;)i=Math.floor(t.cryptoRandom()*u.length),a.push(u.splice(i,1).shift());return a}}});
innorix("utils/cookie",function(){"use strict";return{set:function(t,e,n){var i,o;n=n||30,i=new Date,i.setDate(i.getDate()+n),o="expires="+i.toUTCString(),document.cookie=t+"="+e+"; "+o+"; path=/"},get:function(t){var e,n,i,o;for(t+="=",e=document.cookie.split("; "),n=0,i=e.length;n<i;n++)if(o=e[n],-1!==o.indexOf(t))return o.substring(t.length);return""},unset:function(t){return!!this.get(t)&&(document.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/",!0)}}});
innorix("utils/decorator",function(n){"use strict";var t=n("innoJquery"),r=t.Deferred().promise(),e=0;return{throttle:function(n){var t=null;return function(){return t?r:(t=n.apply(this,arguments),t.always(function(){t=null}),t)}},caching:function(n){var t=e++;return function(){return this.__cached=this.__cached||{},this.__cached[t]||(this.__cached[t]=n.apply(this,arguments)),this.__cached[t]}},removeCache:function(n){return function(){return this.__cached={},n.apply(this,arguments)}},debounce:function(n,t,r){var e;return function(){var c=this,i=arguments,u=r&&!e;clearTimeout(e),e=setTimeout(function(){e=null,r||n.apply(c,i)},t),u&&n.apply(c,i)}}}});
innorix("utils/log",function(o){"use strict";var n=o("innoJquery").noop,l=o("CONSTANT/ENV"),e=l.DEBUG;return{info:function(o,l){e&&(void 0===l?(console.info||console.log||n)(o,l):(console.info||console.log||n)(o))},error:function(o){e&&(console.error||console.log||alert)(o)},table:function(o,l){e&&(this.info(o),(console.table||console.log||n)(l))}}});
innorix("utils/object",function(r){"use strict";var n=r("innoJquery");return{pick:function(r,t){if(!n.isPlainObject(r))return{};var i={};if("string"==typeof t)return r[t]&&(i[t]=r[t]),i;for(var e,u=-1;++u<t.length;)e=t[u],r[e]&&(i[e]=r[e]);return i}}});
innorix("utils/promise",function(n){"use strict";var r=n("innoJquery"),e=r.Deferred().promise();return{race:function(n){var e=r.Deferred(),t=r.proxy(e.resolve,e),i=r.proxy(e.reject,e),o=n.length;return r.each(n,function(n,r){r.done(t).fail(function(){0==--o&&i()})}),e},throttle:function(n){var r=null;return function(){return r?e:(r=n.apply(this,arguments),r.always(function(){r=null}),r)}}}});
innorix("utils/string",function(e){"use strict";var t=e("i18n/lang");return{cryptoRandom:function(){try{for(var e,t,r=[];(t="."+r.join("")).length<30;){e=(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(5));for(var n=0;n<e.length;n++){var i=e[n]<4e9?e[n].toString().slice(1):"";i.length>0&&(r[r.length]=i)}}return Number(t)}catch(a){return Math.random()}},versionCompare:function(e,t){if(typeof e+typeof t!="stringstring")return!1;for(var r=e.split("."),n=t.split("."),i=0,a=Math.max(r.length,n.length);i<a;i++){if(r[i]&&!n[i]&&parseInt(r[i])>0||parseInt(r[i])>parseInt(n[i]))return 1;if(n[i]&&!r[i]&&parseInt(n[i])>0||parseInt(r[i])<parseInt(n[i]))return-1}return 0},formatMoney:function(e,t,r,n){var t=isNaN(t=Math.abs(t))?0:t,r=r==undefined?".":r,n=n==undefined?",":n,i=e<0?"-":"",a=String(parseInt(e=Math.abs(Number(e)||0).toFixed(t))),o=(o=a.length)>3?o%3:0;return i+(o?a.substr(0,o)+n:"")+a.substr(o).replace(/(\d{3})(?=\d)/g,"$1"+n)+(t?r+Math.abs(e-a).toFixed(t).slice(2):"")},generateUUID:function(){var e=this;try{var t=(new Date).getTime(),r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){var n=(t+16*e.cryptoRandom())%16|0;return t=Math.floor(t/16),("x"===r?n:7&n|8).toString(16)})}catch(n){var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"}return r},humanFileSize:function(e){var t=this.humanFileSizeObject(e),r=t.number.toFixed(2)+" "+t.unit;return r=r.replace(/\.00([^\d])/g,"$1")},humanFileSizeObject:function(e){if(Math.abs(e)<1024)return{number:e,unit:"B"};var t=["KB","MB","GB","TB","PB","EB","ZB","YB"],r=-1;do{e/=1024,++r}while(Math.abs(e)>=1e3&&r<t.length-1);return{number:e,unit:t[r]}},humanFileSizeBit:function(e){var t=this.humanFileSizeObjectBit(e),r=t.number.toFixed(2)+" "+t.unit;return r=r.replace(/\.00([^\d])/g,"$1")},humanFileSizeObjectBit:function(e){if(Math.abs(e)<1024)return{number:e,unit:"bps"};var t=["Kbps","Mbps","Gbps","Tbps","Pbps","Ebps","Zbps","Ybps"],r=-1;do{e/=1024,++r}while(Math.abs(e)>=1024&&r<t.length-1);return{number:e,unit:t[r]}},deparam:function(e){e=e.substring(e.indexOf("?")+1).split("&");var t,r,n={},i=decodeURIComponent;for(r=e.length;r>0;)t=e[--r].split("="),n[i(t[0])]=i(t[1]);return n},getFileExt:function(e){var t=e.replace(/\\/gi,"/");return t.substring(t.lastIndexOf(".")+1)},getFileExtType:function(e){var t=e.replace(/\\/gi,"/"),r=t.substring(t.lastIndexOf(".")+1);r=r.toLowerCase();var n={"3gp":"Video",afp:"Code",afpa:"Code",asp:"Code",aspx:"Code",avi:"Video",bat:"Application",bmp:"Picture",c:"Code",cfm:"Code",cgi:"Code",com:"Application",cpp:"Code",css:"CSS",doc:"Document",docx:"Document",exe:"Application",gif:"Picture",fla:"Flash",h:"Code",htm:"HTML",html:"HTML",jar:"Java",jpg:"Picture",jpeg:"Picture",js:"Script",lasso:"Code",log:"Text",m4p:"Audio",mov:"Video",mp3:"Audio",mp4:"Video",mpg:"Video",mpeg:"Video",ogg:"Audio",pcx:"Other Picture",pdf:"PDF",php:"Php",png:"Picture",ppt:"Presentation",pptx:"Presentation",psd:"Psd",pl:"Script",py:"Script",rb:"Ruby",rbx:"Ruby",rhtml:"Ruby",rpm:"Linux",ruby:"Ruby",sql:"Database",swf:"Flash",tif:"Other Picture",tiff:"Other Picture",txt:"Text",vb:"Code",wav:"Audio",wmv:"Video",xls:"Spreadsheet",xlsx:"Spreadsheet",csv:"Spreadsheet",xml:"Code",zip:"Compressed",rar:"Compressed",gz:"Compressed",directory:"Directory",ms4:"MS4"};return n[r]?n[r]:"File"},getFileName:function(e){var t=e.replace(/\\/gi,"/");return t.substring(t.lastIndexOf("/")+1)},getFilePath:function(e){var t=e.replace(/\\/gi,"/");return t.substring(0,t.lastIndexOf("/"))},toHHMMSS:function(e){var r,n,i;return e*=1,e=e>0?e:0,r=Math.floor(e/3600),n=Math.floor((e-3600*r)/60),i=Math.round(e-3600*r-60*n),n>0||r>0?(i=i>0?" "+i+" "+t("time.sec"):"",n>0?(n=n+" "+t("time.min"),r>0?(n=" "+n,r=r+" "+t("time.hour")):r=""):(n="",r=r+" "+t("time.hour"))):(i=i>0?i+" "+t("time.sec"):"1 "+t("time.sec"),n="",r=""),r+n+i}}});
innorix("utils/url",function(t){"use strict";var n=t("utils/string");return{getLocationOrigin:function(){var t=window.location;return t.origin?t.origin:t.protocol+"//"+t.host},getCurrentPage:function(){return window.location.href},getBaseUrl:function(){return window.location.host},addOriginIfNot:function(t){try{return/^http(s?):\/\//.test(t)?t:/^\//.test(t)?this.getLocationOrigin()+t:this.getLocationOrigin()+n.getFilePath(window.location.pathname)+"/"+t}catch(i){return t}}}});
innorix("Agent/CommandHandler/Base",function(n){"use strict";var e=n("klass"),t=n("CONSTANT/COMMAND_HANDLER"),a="undefined"!=typeof INNORIX_COMMAND_TIMEOUT?INNORIX_COMMAND_TIMEOUT:3e3,r=0;return e({getType:function(){return t.BASE},handle:function(n,e,t,a){var i=this;return e().fail(function(){var o=t.clientDefer.state();if(++r<4)setTimeout(function(){i.handle(n,e,t,a)},300);else{var u=this;n.reject.apply(null,arguments),a(u,t),"upload"!=o&&"download"!=o&&i.handle(n,e,t,a)}}).done(function(e){r>4&&t.param&&(t.param.notifyReady=!0),r=0,n.resolve(e),a(this,t)}),n},getAjaxOption:function(){return{timeout:a}},getAjaxParam:function(){return{}}})});
innorix("Agent/CommandHandler/BaseInstant",function(n){"use strict";var t=n("klass"),e=n("Agent/CommandHandler/Base"),r=n("CONSTANT/COMMAND_HANDLER");return t([e],{constructor:function(){e.apply(this,arguments),this.trise=0},getType:function(){return r.COMET},handle:function(n,t,e,r){return t().error(function(){n.reject.apply(null,arguments),r(this,e)}).done(function(t){n.resolve(t),r(this,e)}),n},getAjaxOption:function(){return{timeout:3e3}}})});
innorix("Agent/CommandHandler/Comet",function(n){"use strict";var t=n("klass"),e=n("Agent/CommandHandler/Base"),r=n("CONSTANT/COMMAND_HANDLER"),o="undefined"!=typeof INNORIX_COMMAND_TIMEOUT?INNORIX_COMMAND_TIMEOUT:3e4;return t([e],{constructor:function(){e.apply(this,arguments),this.trise=0},getType:function(){return r.COMET},handle:function(n,t,e,r){var o=this;return t().error(function(){o.handle(n,t,e,r)}).done(function(t){n.resolve(t),r(this,e)}),n},getAjaxOption:function(){return{timeout:o}}})});
innorix("Agent/CommandHandler/Instant",function(n){"use strict";var t=n("klass"),e=n("Agent/CommandHandler/Base"),i=n("CONSTANT/COMMAND_HANDLER"),r=(n("CONSTANT/ENV"),"undefined"!=typeof INNORIX_COMMAND_TIMEOUT?INNORIX_COMMAND_TIMEOUT:1e4);return t([e],{constructor:function(){e.apply(this,arguments),this.trise=0},getType:function(){return i.RETRY},handle:function(n,t,e,i){return t().fail(function(){n.reject.apply(null,arguments),i(this,e)}).done(function(t){n.resolve(t),i(this,e)}),n},getAjaxOption:function(){return{timeout:r}}})});
innorix("Agent/CommandHandler/Retry",function(n){"use strict";var t=n("klass"),e=n("Agent/CommandHandler/Base"),i=n("CONSTANT/COMMAND_HANDLER"),r=(n("CONSTANT/ENV"),"undefined"!=typeof INNORIX_COMMAND_TIMEOUT?INNORIX_COMMAND_TIMEOUT:1e4);return t([e],{constructor:function(){e.apply(this,arguments),this.trise=0},getType:function(){return i.RETRY},handle:function(n,t,e,i){var r=this;return t().fail(function(){++r.trise<3?r.handle(n,t,e,i):(n.reject.apply(null,arguments),i(this,e))}).done(function(t){n.resolve(t),i(this,e)}),n},getAjaxOption:function(){return{timeout:r}}})});
innorix("Agent/CommandHandler/Transfer",function(n){"use strict";var t=n("klass"),e=n("Agent/CommandHandler/Base"),r=n("CONSTANT/COMMAND_HANDLER"),i="undefined"!=typeof INNORIX_COMMAND_TIMEOUT?INNORIX_COMMAND_TIMEOUT:3e4;return t([e],{constructor:function(){e.apply(this,arguments),this.trise=0},getType:function(){return r.COMET},handle:function(n,t,e,r){var i=this;return t().fail(function(){e.clientDefer.state();++i.trise<1?i.handle(n,t,e,r):(n.reject.apply(null,arguments),r(this,e))}).done(function(t){n.resolve(t),r(this,e)}),n},getAjaxOption:function(){return{timeout:i}}})});
innorix("AgentUpdater/View/MessageBox",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("i18n/lang"),s=t("CONSTANT/EVENT"),a=t("AgentUpdater/View/template");return i({constructor:function(t){this.updater=t,this.$wrap=e(a),this.$message=this.$wrap.find(".irx_messageBox"),this.initView(),this.listenUpdater()},listenUpdater:function(){this.updater.on(s.UPDATE_PATCH_EXECUTE,e.proxy(this.onExecute,this)),this.updater.on(s.UPDATE_PATCH_COMPLETE,e.proxy(this.onComplete,this))},initView:function(){var t=this;this.$wrap.hide(),e(document).ready(function(){e("body").append(t.$wrap)})},onExecute:function(){this.$message.text(n("agentUpdater.start")),this.$wrap.fadeIn(250)},onComplete:function(){this.$message.text(n("agentUpdater.complete")),this.$wrap.delay(3e3).fadeOut(250)}})});
innorix("AgentUpdater/View/template",function(e){"use strict";return e("innoJquery").parseHTML('<div class="irx_messageBox_wrapper"> <div class="irx_messageBox"> </div></div>')});
innorix("ControlBox/Skin/View",function(i){"use strict";var t=i("innoJquery"),n=i("klass");i("CONSTANT/EVENT");return n({constructor:function(i,t){this.$el=i,this.controlBox=t,this.initView(),this.initLanguage()},onLoad:function(){},initView:function(){this.$el.empty().addClass("innorix_"+this.skinName);setTimeout(function(){},0)},setSize:function(i,t,n){if(i){this.$el.css("width",i),this.$el.find(".irx_filetree").css({width:this.$el.width()-160})}t&&(this.$el.css("height",t),this.$el.find(".irx_filetree").css({height:t}),this.$el.find(".irx_infoBox").css({height:t}))},destroy:function(){this.$el.empty()},initLanguage:t.noop})});
innorix("i18n/resource/en",function(){"use strict";return{"transfer.controller.start":"Start","transfer.controller.pause":"Pause","transfer.controller.resume":"Resume","transfer.controller.complete":"Complete","transfer.qr.desc":"1. Download INNORIX MRT App.<br/> 2. Take picture of the QR code.<br/> 3. You can monitor this status on your phone.","transferStatus.initDownload":" ","transferStatus.initDownloadGuide":"Choose the path and click the start button.","transferStatus.initUpload":" ","transferStatus.initUploadGuide":"Click the start button to upload.","transferStatus.transferCanceling":"Transfer canceled.","transferStatus.transferPreparation":"Creating reliable transfers.","transferStatus.finishTransferList":"Creating reliable transfers.","transferStatus.makeTransferList":"Creating reliable transfers.","transferStatus.errorSocket":"Server error {errorCode}","transferStatus.errorClient":"Client error.","transferStatus.errorServer":"Server error.","transferStatus.errorNetwork":"Network error.","transferStatus.errorLicense":"Wrong INNORIX license","transferStatus.transferring":"Transferring","transferStatus.errorAndRetry":"Exception {count}","transferStatus.encrypt":"Encrypting.","transferStatus.decrypt":"Decrypting.","transferStatus.workingServer":"Closing the transfer","transferStatus.transferCompleted":"Transfer complete. Verifying all files.","transferStatus.confirmCancelTransfer":"Want to cancel this transfer?","transferStatus.10001":"Transfer thread creation error.","transferStatus.10002":"Transfer status thread start error.","transferStatus.10003":"Transfer schedule thread start error.","transferStatus.10004":"File write thread creation error.","transferStatus.10005":"Decryption thread start error.","transferStatus.10006":"Integrity information creation error.","transferStatus.10007":"File access error.","transferStatus.10009":"Real-time folder load thread creation error.","transferStatus.10010":"Fragment information creation error.","transferStatus.10011":"Fragment information transfer error.","transferStatus.10012":"Download action thread start error.","transferStatus.20001":"File open error.","transferStatus.20002":"Folder creation error.","transferStatus.20003":"File read error.","transferStatus.20004":"File write error.","transferStatus.20005":"File name change error.","transferStatus.20008":"File path length error.","transferStatus.30000":"Server script error.","transferStatus.40000":"Server script error.","transferStatus.40001":"Server file creation error.","transferStatus.40002":"Server file writing Error.","transferStatus.40003":"Integrity check error.","transferStatus.40004":"Integrity comparison error after decryption.","transferStatus.40006":"File decryption error.","transferStatus.50000":"Server script error.","transferStatus.50001":"No server file.","transferStatus.50002":"Server file writing error.","transferStatus.50003":"Integrity check error.","transferStatus.60000":"Server script error.","transferStatus.60002":"Upload file corrupted error.","transferStatus.60003":"Integrity check error.","transferStatus.60004":"Integrity comparison error after decryption.","transferStatus.60005":"Integrity comparison error after decompression.","controlBox.fileTotalSelInfo":"{totalItemSelected} {textItem}{totalFolderSelected} {textFolder}<br/>selected","controlBox.fileTotalCount":"{totalItem} {textItem}{totalFolder} {textFolder}","controlBox.massFileTitle":"Mass File Mode","controlBox.massFileInfo":"<span class='massFileNumber'>{totalItemSize}</span> <span class='massFileText'>{totalItemSizeInfo}</span>, <span class='massFileNumber'>{totalItemCount}</span> <span class='massFileText'>Files</span>, <span class='massFileNumber'>{totalItemFolderCount}</span> <span class='massFileText'>Folders</span>","controlBox.massFileContent":"Are attached.","controlBox.noFile":"File does not exist.","controlBox.notSetUploadUrl":'"option.uploadUrl"속성이 설정되어 있지 않습니다.',"controlBox.resumeTransfer":"The last transfer has not completed. Do you want to resume transferring?","controlBox.demo.overTotalSize":"You can not transfer files over 2 GB in Live Demo.","controlBox.demo.overFileCount":"You can not select more than 10 files in Live Demo.","controlBox.cannotFileExt":"*.{ext} file can not be attached.","controlBox.fileDuplicate":"The same file is already attached.","controlBox.overFileCount":"The maximum number of files is {count}.","controlBox.overFileSize":"The maximum limit of a single file is {size}.","controlBox.overTotalSize":"The maximum limit of total files is {size}","controlBox.fileNotExist":"File can not be attached.","controlBox.fileIsModified":"File has been modified.","controlBox.input.uploadBtn":"Upload","controlBox.input.downloadBtn":"Download","controlBox.input.descriptionOne":"{fileName}({size})","controlBox.input.descriptionMany":"{fileName} and {count} file(s)({size})","license.invalid":"license not validate.","license.unauth":"The current domain does not match the license key.","license.end":"Trial version has expired.","license.expired":"The license has expired.","license.disabled":"It is not a licensed product.","license.storageLimit":"Service is stopped becaused all licenced traffic was used.","license.trafficLimit":"Service is stopped becaused all licenced traffic was used.","license.mode.invalid":"The selected mode does not match the license key.","time.hour":"hour","time.min":"min","time.sec":"sec","agentUpdater.start":"INNORIX Agent is being updated to the latest version.","agentUpdater.complete":"INNORIX Agent has been updated to the latest version.","agent.exception.notReady":"File transfer is not ready yet, Please try again later.","agent.exception.error":"To fix unknown exceptions, please reinstall file transfer agent.","agent.exception.popupBlocked":"Pop-up Blocker is enabled! Please add this site to your exception list.","agent.exception.immediateOpen.0":"innorixst.exe is not responding.","webpage.noFiles":"There is no file item information.","wp.overlimit":"You can only transfer up to {size} in this license.",ID_ASK_TITLE:"INNORIX Confirm",ID_ASK_FILENAME:"The '%s' file already exists in the folder.",ID_ASK_EXIST:"Existing file",ID_ASK_NEWFILESIZE:"The size of the new file is %s.",ID_ASK_ALLCHECK:"Apply this option to all files",ID_ASK_BTN_OVERWRITE:"Overwrite",ID_ASK_BTN_RESUME:"Resume",ID_ASK_BTN_SAVEAS:"Save as...",ID_ASK_BTN_CANCEL:"Cancel",ID_ASK_BTN_JUMP:"Skip",ID_ASK_BTN_SAVEAUTO:"Autosave",ID_ASK_TEXT_AUTONAME_TAIL:"It will be saved as '%s'",ID_ASK_ALLCHECK_NEW:"Do this for the next %d conflicts",ID_ASK_SUN:"Sun",ID_ASK_MON:"Mon",ID_ASK_TUE:"Tue",ID_ASK_WED:"Wed",ID_ASK_THU:"Thu",ID_ASK_FRI:"Fri",ID_ASK_SAT:"Sat",ID_ASK_AM:"AM",ID_ASK_PM:"PM",ID_MSG_ACCESS_DENIED:" Access denied for the selected file.",ID_ERRTITLE_FILE_DOWNLOAD_FAIL:"Exception has occurred while downloading.",ID_ERRTITLE_HTTP_CONNECT_INFO_FAIL:"Exception has occurred when checking connection.",ID_ERRTITLE_HTTP_CONNECT_DATA_FAIL:"Exception has occurred while transferring data.",ID_ERRTITLE_NOT_PATH_UPLOAD_ERROR:"Save path does not exist in the server.",ID_ERRTITLE_SERVER_SCRIPT_ERROR:"Exception has occurred in the server script.",ID_ERRTITLE_SEND_INFO_FAIL:"Exception has occurred while checking the server.",ID_ERRTITLE_WRITE_UPLOAD_ERROR:"No permission to write in the upload path of the server ",ID_ERRMSG_SEND_HEADER_FAIL:"Exception has occurred while transferring header.",ID_OPEN_FILE_DIALOG_TITLE:"Open File",ID_DIR_DIALOG_TITLE:"Select a directory",ID_DIR_DIALOG_BUTTON:" ",ID_DOWNLOAD_PATH_DIALOG:"Select a directory",ID_DOWNLOAD_PATH_DIALOG_BUTTON:" ","fileListHeader.label":"Selected Files","fileListHeader.removeBtn":"Remove","fileListHeader.downloadBtn":"Download","context.addFile":"Add file","context.upload":"Upload","context.downloadSelect":"Download Selected files","context.download":"Download","context.downloadAndOpen":"Download and open","context.removeSelect":"Remove selected files","context.removeAll":"Remove all files"}});
innorix("i18n/resource/ko",function(){"use strict";return{"transfer.controller.start":"전송시작","transfer.controller.pause":"전송중지","transfer.controller.resume":"전송재개","transfer.controller.complete":"전송완료","transfer.qr.desc":"1. Download INNORIX MRT App and take picture of the QR code. <br/> 2. You can monitor this transfer status on your smart phone.","transferStatus.initDownload":" ","transferStatus.initDownloadGuide":"경로 설정 후 Start를 클릭하면 전송이 시작됩니다.","transferStatus.initUpload":" ","transferStatus.initUploadGuide":"Start 버튼을 클릭하면 전송이 시작됩니다.","transferStatus.transferCanceling":"전송 취소 중입니다.","transferStatus.transferPreparation":"서버와의 전송 안정화 채널을 생성하고 있습니다.","transferStatus.finishTransferList":"전송 목록 생성이 완료되었습니다.","transferStatus.makeTransferList":"전송 목록을 생성 중입니다.","transferStatus.errorSocket":"서버 예외사항({errorCode})이 발생 했습니다.","transferStatus.errorClient":"클라이언트 오류로 전송 대기중 입니다.","transferStatus.errorServer":"서버 오류로 전송 대기중 입니다.","transferStatus.errorNetwork":"네트워크 오류로 전송 대기중 입니다.","transferStatus.errorLicense":"라이선스 범위 초과로 전송할 수 없습니다.","transferStatus.transferring":"파일 전송 중입니다.","transferStatus.errorAndRetry":"예외사항이 발생 했습니다. ({count})","transferStatus.encrypt":"파일 암호화 중입니다.","transferStatus.decrypt":"파일 복호화 중입니다.","transferStatus.workingServer":"서버에서 작업 중입니다.","transferStatus.transferCompleted":"전송완료, 파일들을 점검하고 있습니다.","transferStatus.confirmCancelTransfer":"전송을 취소 하시겠습니까?","transferStatus.10001":"전송 쓰레드 생성 에러.","transferStatus.10002":"전송 상태 쓰레드 구동 에러.","transferStatus.10003":"전송 스케쥴 쓰레드 구동 에러.","transferStatus.10004":"파일 쓰기 쓰레드 생성 에러.","transferStatus.10005":"복호화 쓰레드 구동 에러.","transferStatus.10006":"무결성 정보 생성 에러.","transferStatus.10007":"파일 액세스 에러.","transferStatus.10009":"실시간 폴더 로드 쓰레드 생성 에러.","transferStatus.10010":"조각 정보 생성 에러.","transferStatus.10011":"조각 정보 전송 에러.","transferStatus.10012":"다운로드 액션 쓰레드 구동 에러.","transferStatus.20001":"파일 열기 에러.","transferStatus.20002":"폴더 생성 에러.","transferStatus.20003":"파일 읽기 에러.","transferStatus.20004":"파일 쓰기 에러.","transferStatus.20005":"파일명 변경 에러.","transferStatus.20008":"파일 경로 길이 에러.","transferStatus.30000":"서버 스크립트 에러.","transferStatus.40000":"서버 스크립트 에러.","transferStatus.40001":"서버 파일 생성 에러.","transferStatus.40002":"서버 파일 쓰기 에러.","transferStatus.40003":"무결성 체크 에러.","transferStatus.40004":"파일 복호화 후 원본 비교 에러.","transferStatus.40006":"파일 복호화 에러.","transferStatus.50000":"서버 스크립트 에러.","transferStatus.50001":"서버 파일 없음.","transferStatus.50002":"서버 파일 쓰기 에러.","transferStatus.50003":"무결성 체크 에러.","transferStatus.60000":"서버 스크립트 에러.","transferStatus.60002":"업로드 파일 깨짐 에러.","transferStatus.60003":"무결성 체크 에러.","transferStatus.60004":"파일 복호 화 후 원본 비교 에러.","transferStatus.60005":"파일 압축 해제 후 원본 비교 에러.","controlBox.fileTotalSelInfo":"{totalItemSelected} {textItem}, {totalFolderSelected} {textFolder}<br/>selected","controlBox.fileTotalCount":"{totalItem} {textItem}, {totalFolder} {textFolder}","controlBox.massFileTitle":"Mass File Mode","controlBox.massFileInfo":"<span class='massFileNumber'>{totalItemSize}</span> <span class='massFileText'>{totalItemSizeInfo}</span>, <span class='massFileNumber'>{totalItemCount}</span> <span class='massFileText'>Files</span>, <span class='massFileNumber'>{totalItemFolderCount}</span> <span class='massFileText'>Folders</span>","controlBox.massFileContent":"첨부가 완료되었습니다.","controlBox.noFile":"파일이 존재하지 않습니다.","controlBox.notSetUploadUrl":'"option.uploadUrl"속성이 설정되어 있지 않습니다.',"controlBox.resumeTransfer":"최근 전송이 완료되지 않았습니다. 이어서 전송 하시겠습니까?","controlBox.demo.overTotalSize":"라이브 데모에서는 2 GB 이상의 파일을 전송할 수 없습니다.","controlBox.demo.overFileCount":"라이브 데모에서는 10개 이상의 파일을 선택할 수 없습니다.","controlBox.cannotFileExt":"확장자 .{ext} 첨부할 수 없습니다.","controlBox.fileDuplicate":"동일한 파일이 이미 첨부되어 있습니다.","controlBox.overFileCount":"파일은 {count}개까지 첨부할 수 있습니다.","controlBox.overFileSize":"{size} 초과 파일은 첨부할 수 없습니다.","controlBox.overTotalSize":"첨부 가능한 총 용량은 {size} 입니다.","controlBox.fileNotExist":"파일을 첨부할 수 없습니다.","controlBox.fileIsModified":"파일이 변경되었습니다.","controlBox.input.uploadBtn":"업로드","controlBox.input.downloadBtn":"다운로드","controlBox.input.descriptionOne":"{fileName}({size})","controlBox.input.descriptionMany":"{fileName}외 {count}개 파일들({size})","license.invalid":"라이선스키 정보를 인식할 수 없습니다.","license.unauth":"지정된 도메인에서만 사용할 수 있습니다.","license.end":"체험버전 사용기간이 만료 되었습니다.","license.expired":"기간이 만료되었습니다.","license.disabled":"허가된 제품이 아닙니다.","license.storageLimit":"모든 트래픽이 사용되어, 서비스가 중지되었습니다.","license.trafficLimit":"모든 트래픽이 사용되어, 서비스가 중지되었습니다.","license.mode.invalid":"현재 라이선스에서 지원하지 않는 모드 입니다.","time.hour":"시간","time.min":"분","time.sec":"초","agentUpdater.start":"INNORIX Agent를 최신 버전으로 업데이트 중입니다.","agentUpdater.complete":"INNORIX Agent를 최신 버전으로 자동 업데이트 되었습니다.","agent.exception.notReady":"파일 전송이 아직 준비되지 않았습니다. 잠시 후 다시 시도하십시오.","agent.exception.error":"알려지지 않은 예외사항 복원을 위해 Agent를 재설치 합니다.","agent.exception.popupBlocked":"Pop-up Blocker is enabled! Please add this site to your exception list.","agent.exception.immediateOpen.0":"innorixst.exe가 응답이 없습니다.","webpage.noFiles":"파일 아이템 정보가 없습니다.","wp.overlimit":"남은 용량인 {size} 까지만 전송할 수 있습니다.",ID_ASK_TITLE:"INNORIX Confirm",ID_ASK_FILENAME:"폴더에 이미 '%s' 파일이 있습니다.",ID_ASK_EXIST:"기존 파일",ID_ASK_NEWFILESIZE:"새로 받을 파일의 용량은 %s 입니다.",ID_ASK_ALLCHECK:"모든 파일에 이 옵션을 적용합니다.",ID_ASK_BTN_OVERWRITE:"덮어쓰기",ID_ASK_BTN_RESUME:"이어쓰기",ID_ASK_BTN_SAVEAS:"다른 이름으로 저장",ID_ASK_BTN_CANCEL:"취소",ID_ASK_BTN_JUMP:"건너뛰기",ID_ASK_BTN_SAVEAUTO:"자동 변경하여 저장",ID_ASK_TEXT_AUTONAME_TAIL:"%s 로 저장됨",ID_ASK_ALLCHECK_NEW:"다음 %d개 중복에 대해서도 동일하게 적용",ID_ASK_SUN:"일요일",ID_ASK_MON:"월요일",ID_ASK_TUE:"화요일",ID_ASK_WED:"수요일",ID_ASK_THU:"목요일",ID_ASK_FRI:"금요일",ID_ASK_SAT:"토요일",ID_ASK_AM:"오전",ID_ASK_PM:"오후",ID_MSG_ACCESS_DENIED:" Access denied for the selected file.",ID_ERRTITLE_FILE_DOWNLOAD_FAIL:"Exception has occurred while downloading.",ID_ERRTITLE_HTTP_CONNECT_INFO_FAIL:"Exception has occurred when checking connection.",ID_ERRTITLE_HTTP_CONNECT_DATA_FAIL:"Exception has occurred while transferring data.",ID_ERRTITLE_NOT_PATH_UPLOAD_ERROR:"Save path does not exist in the server.",ID_ERRTITLE_SERVER_SCRIPT_ERROR:"Exception has occurred in the server script.",ID_ERRTITLE_SEND_INFO_FAIL:"Exception has occurred while checking the server.",ID_ERRTITLE_WRITE_UPLOAD_ERROR:"No permission to write in the upload path of the server ",ID_ERRMSG_SEND_HEADER_FAIL:"Exception has occurred while transferring header.",ID_OPEN_FILE_DIALOG_TITLE:"파일 열기",ID_DIR_DIALOG_TITLE:"디렉토리 선택",ID_DIR_DIALOG_BUTTON:" ",ID_DOWNLOAD_PATH_DIALOG:"디렉토리 선택",ID_DOWNLOAD_PATH_DIALOG_BUTTON:" ","fileListHeader.label":"선택 파일","fileListHeader.removeBtn":"삭제","fileListHeader.downloadBtn":"다운로드","context.addFile":"파일추가","context.upload":"업로드","context.downloadSelect":"선택파일 받기","context.download":"전체파일 받기","context.downloadAndOpen":"바로열기","context.removeSelect":"선택제거","context.removeAll":"전체제거"}});
innorix("Transfer/Transferring/Abstract",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),s=t("util"),n=t("CONSTANT/TRANSFER_STATE"),a=t("CONSTANT/EVENT");return i({constructor:function(t,e,i){this.id=s.string.generateUUID(),null!=i.option.incompleteTransfer&&(this.id=i.option.incompleteTransfer.transferId),this.files=t,this.manager=e,this.controlBox=i,this.totalSize=this.computeTotalSize(),this.ended=!1,this.playing=!1,this.started=!1,this.canceling=!1,this.paused=!1,this.updateCountAfterCancel=0,this.cancelCommand=!1,this.preventEvent=!1,this.lastStatus={transferID:this.id,files:this.files,type:this.getType(),retries:0,state:n.BEFORE,speed:0,progress:0,totalSize:this.totalSize,transferSize:0},this.EVENT=this.getEvents()},computeTotalSize:function(){var t=0;return e.each(this.files,function(e,i){t+=i.fileSize}),t},emit:function(t){if(t==a.TRANSFER_DOWNLOAD_ERROR||t==a.TRANSFER_UPLOAD_ERROR)for(var e in this.lastStatus.files)this.lastStatus.files[e].fileState||(this.lastStatus.files[e].fileState="Error");return this.manager.emit(t,this.lastStatus),t!=a.TRANSFER_UPLOAD_COMPLETE_USER&&t!=a.TRANSFER_UPLOAD_COMPLETE_USER||this.controlBox.resetThumbnailWatermark(),this.controlBox.emit(t,this.lastStatus)},updateStateHandler:function(t){if(0==t)return this.emit(this.EVENT.CANCEL),!1;if(this.playing||this.paused){if(this.canceling&&++this.updateCountAfterCancel>=20)return void this.handleOnCancel();this.lastStatus;switch(this.lastStatus=this.nomalizeStatus(t),this.lastStatus.state){case n.READY:case n.TRANSFERRING:this.handleOnProgress();break;case n.COMPLETE:this.handleOnComplete();break;case n.CANCEL:if(this.cancelCommand){this.handleOnCancel();break}this.lastStatus.state=n.TRANSFERRING,this.handleOnProgress();break;case n.ERROR:this.handleOnError(this.lastStatus.stopRetrying);break;case n.PAUSE:this.handleOnPause()}this.emit(this.EVENT.ALWAYS)}},handleOnStart:function(){this.playing=!0,this.started=!0,this.emit(this.EVENT.START)},handleOnProgress:function(){this.emit(this.EVENT.PROGRESS);var t=this;setTimeout(function(){(t.playing||t.paused||t.canceling)&&t.updateState()},500)},handleOnComplete:function(){this.handleOnEnd(),this.emit(this.EVENT.COMPLETE)},handleOnEnd:function(){this.ended=!0,this.playing=!1},handleOnCancel:function(){this.handleOnEnd(),this.emit(this.EVENT.CANCEL)},handleOnCanceling:function(){this.canceling=!0,this.paused=!1},handleOnError:function(t){if(this.emit(this.EVENT.ERROR),this.paused)return void(this.preventEvent=!1);if(this.playing)if(this.lastStatus.retries++,t){var i=this;this.manager.initErrorCount(),setTimeout(function(){i.playing=!1,i.paused=!0,i.emit(i.EVENT.PAUSE)},1e3)}else if(this.manager.addErrorCount()){var i=this;setTimeout(function(){i.playing=!1,i.paused=!0,i.emit(i.EVENT.PAUSE)},1e3)}else if(this.controlBox.option.autoReTransfer)setTimeout(e.proxy(this.retryPlay,this),1e3),this.emit(this.EVENT.RETRY);else{var i=this;setTimeout(function(){i.playing=!1,i.paused=!0,i.emit(i.EVENT.PAUSE)},1e3)}},handleOnPausing:function(){this.emit(this.EVENT.PAUSING)},handleOnPause:function(){this.playing=!1,this.paused=!0,this.preventEvent=!0,this.emit(this.EVENT.PAUSE)},handleOnResume:function(){this.playing=!0,this.paused=!1,this.emit(this.EVENT.RESUME)},nomalizeStatus:function(t){t.totalBytes!=this.totalSize&&(this.totalSize=t.totalBytes);var e=Math.ceil((t.transferBytes||0)/(this.totalSize||1)*100);return{transferID:this.id,type:this.getType(),retries:this.lastStatus.retries||0,files:t.files?t.files:this.files,state:t.transferState,speed:t.transferSpeed||0,totalSize:this.totalSize,transferSize:t.transferBytes||0,progress:e<100?e:100,stopRetrying:t.stopRetrying,client_ip:t.client_ip||"",statusMessage:{customError:t.customError||"",errorCode:t.resourceCode||!1,id:t.resourceID||""}}}})});
innorix("Transfer/Transferring/Download",function(n){"use strict";var t=n("innoJquery"),a=n("klass"),i=n("singleton/agent"),o=n("Transfer/Transferring/Abstract"),e=n("CONSTANT/EVENT");return a([o],{constructor:function(n,t,a,i){o.apply(this,[n,t,a]),this.option=i},getType:function(){return"download"},setDownloadPath:function(n){this.option.downloadPath=n},getDownloadPath:function(){return this.option.downloadPath?this.option.downloadPath:""},getEvents:function(){return{ALWAYS:e.TRANSFER_DOWNLOAD_ALWAYS,CREATE:e.TRANSFER_DOWNLOAD_CREATE,START:e.TRANSFER_DOWNLOAD_START,COMPLETE:e.TRANSFER_DOWNLOAD_COMPLETE,COMPLETE_USER:e.TRANSFER_DOWNLOAD_COMPLETE_USER,CANCEL:e.TRANSFER_DOWNLOAD_CANCEL,ERROR:e.TRANSFER_DOWNLOAD_ERROR,PAUSE:e.TRANSFER_DOWNLOAD_PAUSE,PAUSING:e.TRANSFER_DOWNLOAD_PAUSING,RESUME:e.TRANSFER_DOWNLOAD_RESUME,PROGRESS:e.TRANSFER_DOWNLOAD_PROGRESS,RETRY:e.TRANSFER_DOWNLOAD_RETRY}},startDownload:function(){var n=this;"undefined"==typeof FormData?(i.downloadFallback(this.id,this.files,this.option,!1,function(t){!1===t.value?(i.licenseNotValidate(t.error),n.updateStateHandler(!1)):n.updateState()}),this.handleOnStart()):(i.download(this.id,this.files,this.option).done(function(t){!1===t.value?(i.licenseNotValidate(t.error),n.updateStateHandler(!1)):n.updateState()}).fail(function(){n.handleOnError()}),this.handleOnStart())},play:function(){this.startDownload()},retryPlay:function(){var n=this;"undefined"==typeof FormData?i.downloadFallback(this.id,this.files,this.option,!0,function(t){n.updateState()}):i.download(this.id,this.files,this.option,!0).done(function(){n.updateState()}).fail(function(){n.handleOnError()})},updateState:function(){var n=this;"undefined"==typeof FormData?i.downloadStateFallback(this.id,function(t){n.updateStateHandler(t)}):i.downloadState(this.id).done(t.proxy(this.updateStateHandler,this)).fail(function(){n.handleOnError()})},cancel:function(){var n=this;this.cancelCommand=!0,"undefined"==typeof FormData?i.downloadCancelFallback(this.id,function(t){n.handleOnCanceling()}):i.downloadCancel(this.id).always(function(){n.handleOnCanceling()})},pause:function(){var n=this;"undefined"==typeof FormData?i.downloadPauseFallback(this.id,function(t){n.handleOnPausing()}):i.downloadPause(this.id).always(function(){n.handleOnPausing()})},resume:function(){this.retryPlay(),this.handleOnResume()}})});
innorix("Transfer/Transferring/DownloadAndOpen",function(t){"use strict";var e=t("klass"),n=t("singleton/agent"),a=t("Transfer/Transferring/Abstract");return e([t("Transfer/Transferring/Download")],{constructor:function(t,e,n,i){Array.isArray(t)||(t=[t]),a.apply(this,[t,e,n]),this.option=i},getDownloadPath:function(){return""},play:function(){var t=this;"undefined"==typeof FormData?(n.immediateOpenFallback(this.id,this.files,this.option,!1,function(e){!1===e.value?(n.licenseNotValidate(e.error,"immediateOpen"),t.updateStateHandler(!1)):t.updateState()}),this.handleOnStart()):(n.immediateOpen(this.id,this.files,this.option,!1).done(function(e){!1===e.value?(n.licenseNotValidate(e.error,"immediateOpen"),t.updateStateHandler(!1)):t.updateState()}).fail(function(){t.option.skipDownloadOpenCheck?t.updateState():t.handleOnError()}),this.handleOnStart())},retryPlay:function(){var t=this;"undefined"==typeof FormData?(n.immediateOpenFallback(this.id,this.files,this.option,!1,function(e){!1===e.value?(n.licenseNotValidate(e.error,"immediateOpen"),t.updateStateHandler(!1)):t.updateState()}),this.handleOnStart()):(n.immediateOpen(this.id,this.files,this.option,!0).done(function(e){!1===e.value?(n.licenseNotValidate(e.error,"immediateOpen"),t.updateStateHandler(!1)):t.updateState()}).fail(function(){t.handleOnError()}),this.handleOnStart())}})});
innorix("Transfer/Transferring/Upload",function(e){"use strict";var t=e("innoJquery"),a=e("klass"),n=e("singleton/agent"),i=e("Transfer/Transferring/Abstract"),o=e("CONSTANT/EVENT");return a([i],{constructor:function(e,t,a,n){i.apply(this,[e,t,a]),this.option=n},getType:function(){return"upload"},getEvents:function(){return{ALWAYS:o.TRANSFER_UPLOAD_ALWAYS,CREATE:o.TRANSFER_UPLOAD_CREATE,START:o.TRANSFER_UPLOAD_START,COMPLETE:o.TRANSFER_UPLOAD_COMPLETE,COMPLETE_USER:o.TRANSFER_UPLOAD_COMPLETE_USER,CANCEL:o.TRANSFER_UPLOAD_CANCEL,ERROR:o.TRANSFER_UPLOAD_ERROR,PAUSE:o.TRANSFER_UPLOAD_PAUSE,PAUSING:o.TRANSFER_UPLOAD_PAUSING,RESUME:o.TRANSFER_UPLOAD_RESUME,PROGRESS:o.TRANSFER_UPLOAD_PROGRESS,RETRY:o.TRANSFER_UPLOAD_RETRY}},play:function(){var e=this,a={transferID:this.id,files:this.files,sliceSize:this.option.sliceSize},n=[];for(var i in this.files){var o=this.files[i];o.sliceSize=this.option.sliceSize,n.push({rowID:o.rowID,fileSize:o.fileSize,fixedFileSize:o.fileSize,sliceSize:o.sliceSize,printFileName:o.printFileName,uniqueFileName:o.uniqueFileName,rootName:o.rootName})}a.files=encodeURIComponent(JSON.stringify(n)),e.option.platformDepend?t.ajax({url:e.option.url+"/api/webpage/onPreUpload?api_key="+e.option.apiKey,type:"POST",data:a}).done(function(t){e.startUpload()}):e.startUpload()},startUpload:function(){var e=this,a={list_thumbnail_agent:e.controlBox.list_thumbnail_agent,list_watermark_agent:e.controlBox.list_watermark_agent};"relay"!=e.option.resumeType&&"relay"!=e.option.resumeUploadType||1!=e.option.agent||1!=e.option.resumeCondition?"undefined"==typeof FormData?(n.uploadFallback(e.id,e.files,e.option,!1,a,function(t){!1===t.value?(n.licenseNotValidate(t.error),e.updateStateHandler(!1)):e.updateState()}),e.handleOnStart()):(n.upload(e.id,e.files,e.option,!1,a).done(function(t){!1===t.value?(n.licenseNotValidate(t.error),e.updateStateHandler(!1)):e.updateState()}).fail(function(){e.handleOnError()}),e.handleOnStart()):"undefined"==typeof FormData?n.getIncompleteTransferFallback(function(i){if(0==i.value)n.uploadFallback(e.id,e.files,e.option,!1,a,function(t){!1===t.value?(n.licenseNotValidate(t.error),e.updateStateHandler(!1)):e.updateState()}),e.handleOnStart();else{var o=t.parseJSON(decodeURIComponent(i.param));0==o.isChangeFile?(e.id=o.transferId,n.uploadFallback(e.id,e.files,e.option,!1,a,function(t){!1===t.value?(n.licenseNotValidate(t.error),e.updateStateHandler(!1)):e.updateState()})):n.uploadFallback(e.id,e.files,e.option,!1,a,function(t){!1===t.value?(n.licenseNotValidate(t.error),e.updateStateHandler(!1)):e.updateState()}),e.handleOnStart()}},!0):n.getIncompleteTransfer(t.proxy(function(i){if(0==i.value)n.upload(e.id,e.files,e.option,!1,a).done(function(t){!1===t.value?(n.licenseNotValidate(t.error),e.updateStateHandler(!1)):e.updateState()}).fail(function(){e.handleOnError()}),e.handleOnStart();else{var o=t.parseJSON(decodeURIComponent(i.param));0==o.isChangeFile?(e.id=o.transferId,n.upload(e.id,e.files,e.option,!1,a).done(function(t){!1===t.value?(n.licenseNotValidate(t.error),e.updateStateHandler(!1)):e.updateState()}).fail(function(){e.handleOnError()})):n.upload(e.id,e.files,e.option,!1,e.controlBox.list_thumbnail_agent).done(function(t){!1===t.value?(n.licenseNotValidate(t.error),e.updateStateHandler(!1)):e.updateState()}).fail(function(){e.handleOnError()}),e.handleOnStart()}},this),!0)},retryPlay:function(){var e=this,t={list_thumbnail_agent:e.controlBox.list_thumbnail_agent,list_watermark_agent:e.controlBox.list_watermark_agent};"undefined"==typeof FormData?(n.uploadFallback(this.id,this.files,this.option,!0,t,function(t){e.updateState()}),e.handleOnStart()):n.upload(this.id,this.files,this.option,!0,t).done(function(){e.updateState()}).fail(function(){e.handleOnError()})},updateState:function(){var e=this;"undefined"==typeof FormData?n.uploadStateFallback(this.id,function(t){e.updateStateHandler(t)}):n.uploadState(this.id).done(t.proxy(this.updateStateHandler,this)).fail(function(){e.handleOnError()})},cancel:function(){var e=this;this.cancelCommand=!0,"undefined"==typeof FormData?n.uploadCancelFallback(this.id,function(t){e.handleOnCanceling()}):n.uploadCancel(this.id).always(function(){e.handleOnCanceling()})},pause:function(){var e=this;"undefined"==typeof FormData?n.uploadPauseFallback(this.id,function(t){e.handleOnPausing()}):n.uploadPause(this.id).always(function(){e.handleOnPausing()})},resume:function(){this.retryPlay(),this.handleOnResume()}})});
innorix("Transfer/View/ControlButtons",function(t){"use strict";var r=t("innoJquery"),s=t("klass"),a=t("i18n/lang"),n=t("CONSTANT/EVENT"),i=t("CONSTANT/TRANSFER_STATE");return s({constructor:function(t,r){this.manager=r,this.lastStatus=null,this.$btnGroup=t.find(".irx_btnGroup");var s=t.find(".irx_btnGroup");this.$play=s.children(".irx_controller"),this.$status=s.children(".irx_trn_status"),this.$graph=s.children(".irx_toggle_graph"),this.$graphWrapper=t.find(".irx_graph_wrapper"),this.$container=t.find(".irx_container"),this.$window=t.find(".irx_transferWin"),this.$showQrCodeButton=t.find(".irx_qr_code"),this.listenManager(),this.attachEvents()},listenManager:function(){var t=r.proxy(this.renderOnCreate,this);this.manager.on(n.TRANSFER_DOWNLOAD_CREATE,t),this.manager.on(n.TRANSFER_UPLOAD_CREATE,t);var s=r.proxy(this.renderOnStart,this);this.manager.on(n.TRANSFER_DOWNLOAD_START,s),this.manager.on(n.TRANSFER_UPLOAD_START,s);var a=r.proxy(this.renderOnPause,this);this.manager.on(n.TRANSFER_DOWNLOAD_PAUSE,a),this.manager.on(n.TRANSFER_UPLOAD_PAUSE,a);var i=r.proxy(this.renderOnResume,this);this.manager.on(n.TRANSFER_DOWNLOAD_RESUME,i),this.manager.on(n.TRANSFER_UPLOAD_RESUME,i);var e=r.proxy(this.renderOnCompelte,this);this.manager.on(n.TRANSFER_DOWNLOAD_COMPLETE,e),this.manager.on(n.TRANSFER_UPLOAD_COMPLETE,e);var o=r.proxy(this.renderStatusBtn,this);this.manager.on(n.TRANSFER_DOWNLOAD_ALWAYS,o),this.manager.on(n.TRANSFER_UPLOAD_ALWAYS,o),this.manager.on(n.TRANSFER_DOWNLOAD_ERROR,o),this.manager.on(n.TRANSFER_UPLOAD_ERROR,o);var h=r.proxy(this.renderStatusWarningBtn,this);this.manager.on(n.TRANSFER_UPLOAD_RETRY,h),this.manager.on(n.TRANSFER_DOWNLOAD_RETRY,h);var l=r.proxy(this.renderGraphBtn,this);this.manager.on(n.GRAPH_SHOW,l),this.manager.on(n.GRAPH_HIDE,l);var g=(r.proxy(this.renderQrCodeView,this),r.proxy(this.renderDisableState,this)),u=r.proxy(this.renderActiveState,this);this.manager.on(n.AGENT_FILE_DIALOG_SHOW,g),this.manager.on(n.AGENT_FILE_DIALOG_HIDE,u)},renderOnCreate:function(t){this.$btnGroup.show(),this.manager.lastTransferring&&this.manager.lastTransferring.controlBox.option.isMobile&&this.$play.css("width","60px"),this.manager.lastTransferring&&(this.manager.lastTransferring.controlBox.option.showTransferStatusIcon||(this.$status.css("opacity",0),this.$status.hide()));var r=!0;this.manager.lastTransferring&&(r=this.manager.lastTransferring.controlBox.option.usePlugin),r&&this.manager.lastTransferring&&this.manager.lastTransferring.controlBox.option.alwaysShowTransferGraph&&(this.$window.toggleClass("show-graph"),this.manager.lastTransferring&&(this.$window.hasClass("show-graph")?this.manager.lastTransferring.controlBox.emit(n.TRANSFER_GRAPH_SHOW):this.manager.lastTransferring.controlBox.emit(n.TRANSFER_GRAPH_HIDE))),this.$play.removeClass("irx_on").text(a("transfer.controller.start"))},renderOnStart:function(){this.$play.addClass("irx_on").text(a("transfer.controller.pause"))},renderOnPause:function(){this.$play.removeClass("irx_on").text(a("transfer.controller.resume"))},renderOnResume:function(){this.$play.addClass("irx_on").text(a("transfer.controller.pause"))},renderOnCompelte:function(){this.$play.addClass("irx_on").text(a("transfer.controller.complete"))},attachEvents:function(){this.$play.on("click",r.proxy(this.onControllerClick,this)),this.$graph.on("click",r.proxy(this.renderGraphBtn,this)),this.$showQrCodeButton.on("click",r.proxy(this.renderQrCodeView,this))},renderDisableState:function(){this.$play.css("cursor","default"),this.$status.css("cursor","default"),this.$graph.css("cursor","default")},renderActiveState:function(){this.$play.css("cursor","pointer"),this.$status.css("cursor","pointer"),this.$graph.css("cursor","pointer")},onControllerClick:function(){0==this.manager.getDisabledState()&&(this.manager.isPlaying()?this.lastStatus.state!=i.COMPLETE&&this.manager.pause():this.manager.isPause()?this.manager.resume():this.manager.play())},renderStatusBtn:function(t){if(this.$status.hasClass("irx_warn")&&t.state===i.READY)return!1;t.state===i.ERROR?this.$status.addClass("irx_warn"):this.$status.hasClass("irx_warn")?null==this.lastStatus||this.lastStatus.transferSize!=t.transferSize&&this.$status.removeClass("irx_warn"):this.$status.removeClass("irx_warn"),this.lastStatus=t},renderStatusWarningBtn:function(t){this.$status.addClass("irx_warn")},renderGraphBtn:function(t){if(0==this.manager.getDisabledState()){var r=!0;this.manager.lastTransferring&&(r=this.manager.lastTransferring.controlBox.option.usePlugin),r&&(this.$window.hasClass("show-qr")&&this.$window.toggleClass("show-qr"),this.$window.toggleClass("show-graph"),this.manager.lastTransferring&&(this.$window.hasClass("show-graph")?this.manager.lastTransferring.controlBox.emit(n.TRANSFER_GRAPH_SHOW):this.manager.lastTransferring.controlBox.emit(n.TRANSFER_GRAPH_HIDE)))}},renderQrCodeView:function(t){if(0==this.manager.getDisabledState()){var r=!0,s=!1;this.manager.lastTransferring&&(r=this.manager.lastTransferring.controlBox.option.usePlugin,s=this.manager.lastTransferring.controlBox.option.showQrCode),r&&s&&(this.$window.hasClass("show-graph")&&this.$window.toggleClass("show-graph"),this.$window.toggleClass("show-qr"),this.manager.lastTransferring&&this.$window.hasClass("show-qr"))}}})});
innorix("Transfer/View/FolderPath",function(t){"use strict";var i=t("innoJquery"),e=t("klass"),r=t("CONSTANT/EVENT");return e({constructor:function(t,i){this.manager=i,this.$el=t,this.$folderPath=t.find(".irx_folderPath"),this.$btn=this.$folderPath.children(".irx_folderDialog"),this.$text=this.$folderPath.children(".irx_folderPath_str"),this.listenManager(),this.attachEvents()},listenManager:function(){var t=i.proxy(this.render,this),e=i.proxy(this.renderPath,this),n=i.proxy(this.renderDisableState,this),s=i.proxy(this.renderActiveState,this);this.manager.on(r.TRANSFER_DOWNLOAD_CREATE,t),this.manager.on(r.TRANSFER_UPLOAD_CREATE,t),this.manager.on(r.TRANSFER_CHANGE_DOWNLOADPATH,e),this.manager.on(r.AGENT_FILE_DIALOG_SHOW,n),this.manager.on(r.AGENT_FILE_DIALOG_HIDE,s)},attachEvents:function(){this.$btn.on("click",i.proxy(this.onClick,this)),this.$text.on("click",i.proxy(this.onClick,this))},render:function(){"download"===this.manager.getTransferring().getType()?(this.$folderPath.show(),this.$folderPath.parent().css({"margin-bottom":"5px"}),this.renderPath(),this.$el.find(".irx_transferWin").removeClass("upload"),this.$el.find(".irx_transferWin").addClass("download")):(this.$el.find(".irx_transferWin").addClass("upload"),this.$el.find(".irx_transferWin").removeClass("download"),this.$folderPath.parent().css({"margin-bottom":"0px"}),this.$folderPath.hide())},renderDisableState:function(){this.$btn.css("cursor","default"),this.$text.css("cursor","default")},renderActiveState:function(){this.$btn.css("cursor","pointer"),this.$text.css("cursor","pointer")},renderPath:function(){this.$text.text(this.manager.getTransferring().getDownloadPath())},onClick:function(){0==this.manager.getDisabledState()&&this.manager.downloadPathDialog(this.$text.text())}})});
!function(n,t){"use strict";function r(n,t){var r,e,i,o,a;return n*=1,o=t?" ":"",n>0?(r=1024,e=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.floor(Math.log(n)/Math.log(r)),a=(n/Math.pow(r,i)).toFixed(1)+o+e[i]):a="0"+o+"Byte",a}function e(n){try{var r,e;for(u=n,h=t('<div class="innorix_trn_rate"></div>').prependTo(u),s=t('<div class="innorix_avg_trn_rate"></div>').prependTo(u),c=[],p=20,f=[],d=20,r=0,e=p-1;r<e;r++)c.push(0);for(r=0,e=d-1;r<e;r++)f.push(0);return!0}catch(i){return!1}}function i(n,t){try{return n*=1,c.push(n>0?n:0),c.length>p&&c.splice(0,1),t*=1,f.push(t>0?t:0),f.length>d&&f.splice(0,1),!0}catch(r){return!1}}function o(n){return r(n)+"/s"}function a(){try{return!(c.length<p)&&(t.fn.sparkline.defaults.common.opacity=.5,s.sparkline(f,{type:"line",width:"100%",height:"100%",chartRangeMin:0,spotRadius:!1,lineColor:"#10bbe6",fillColor:"#10bbe6",disableInteraction:!0}),h.sparkline(c,{type:"line",width:"100%",height:"100%",chartRangeMin:0,spotRadius:!1,lineColor:"#108ee6",fillColor:"#108ee6",highlightLineColor:"#1de7bf",tooltipContainer:u[0],tooltipClassname:"innorix_jqstooltip",numberFormatter:o}),!0)}catch(n){return!1}}var l,u,h,s,c,p,f,d;l=innorix||(n.innorix={}),l.transferGraph={init:function(n){return e(n)},setGraph:function(n,t){return i(n,t)},drawGraph:function(){return a()}}}(window,jQuery);
innorix("Transfer/View/Progress",function(r){"use strict";var t=r("innoJquery"),e=r("klass"),s=r("util"),i=r("CONSTANT/EVENT"),a=r("CONSTANT/TRANSFER_STATE");return e({constructor:function(r,t){this.manager=t,this.$el=r,this.$window=r.find(".irx_transferWin"),this.$percent=r.find(".irx_percent"),this.$progressStrLeft=r.find(".irx_progressStr_left"),this.$progressStrRight=r.find(".irx_progressStr_right"),this.$progressBar=r.find(".irx_progressBar"),this.$progressBarServer=r.find(".irx_validate_progress_server"),this.$container=r.find(".irx_container"),this.$footerGroup=r.find(".irx_bottom"),this.$graphWrapper=r.find(".irx_graph_wrapper"),this.$graphSpeedWrapper=r.find(".irx_avg_trn_rate_txt"),this.$tooltip=r.find(".innorix_jqstooltip"),this.$validateProgress=r.find(".irx_validate_progress"),this.transferring=null,this.lastStatus=null,this.graphInterval=null,this.lastProgress=0,this.fileValidate=null,this.processThumbnail=!1,this.listenManager()},listenManager:function(){var r=t.proxy(this.renderInit,this),e=t.proxy(this.renderProgress,this),s=t.proxy(this.renderComplete,this),a=t.proxy(this.renderCancel,this),n=t.proxy(this.renderServerAnimation,this),o=t.proxy(this.renderServerAnimationStop,this),h=t.proxy(this.renderHtmlServerAnimationStop,this),p=t.proxy(this.animateThumbnailProcess,this),g=t.proxy(this.stopThumbnailProcess,this);this.manager.on(i.TRANSFER_DOWNLOAD_CREATE,r),this.manager.on(i.TRANSFER_DOWNLOAD_PROGRESS,e),this.manager.on(i.TRANSFER_DOWNLOAD_ERROR,e),this.manager.on(i.TRANSFER_DOWNLOAD_COMPLETE,s),this.manager.on(i.TRANSFER_DOWNLOAD_CANCEL,a),this.manager.on(i.TRANSFER_UPLOAD_CREATE,r),this.manager.on(i.TRANSFER_UPLOAD_PROGRESS,e),this.manager.on(i.TRANSFER_UPLOAD_ERROR,e),this.manager.on(i.TRANSFER_UPLOAD_COMPLETE,s),this.manager.on(i.TRANSFER_UPLOAD_CANCEL,a),this.manager.on(i.TRANSFER_UPLOAD_WORKING,n),this.manager.on(i.TRANSFER_UPLOAD_WORKING_STOP,o),this.manager.on(i.TRANSFER_HTML5_UPLOAD_WORKING_STOP,h),this.manager.on(i.TRANSFER_DOWNLOAD_WORKING,n),this.manager.on(i.TRANSFER_DOWNLOAD_WORKING_STOP,o),this.manager.on(i.TRANSFER_UPLOAD_THUMBNAIL,p),this.manager.on(i.TRANSFER_UPLOAD_THUMBNAIL_STOP,g)},renderInit:function(r){this.hideServerProcess=!1,this.$progressBarServer.stop(!0).animate({width:"0%"},1,function(){}),this.transferring=this.manager.getTransferring(),this.lastStatus=this.transferring.lastStatus,this.$percent.text("0%"),this.renderProgressStrLeft(r,!0),this.renderProgressStrRight(r,!0),this.$progressBar.css("width","0%").attr("data-progress",0),this.$validateProgress.css("width","0%").attr("data-progress",0),this.$trnRate&&this.$avgTrnRate&&(this.$trnRate.remove(),this.$avgTrnRate.remove()),this.$trnRate=t('<div class="innorix_trn_rate"></div>').prependTo(this.$graphWrapper),this.$avgTrnRate=t('<div class="innorix_avg_trn_rate"></div>').prependTo(this.$graphWrapper),this.trnRateArray=[],this.maxLenOfTrnRateArray=40,this.avgTrnRateArray=[],this.maxLenOfAvgTrnRateArray=40;for(var e=0,s=this.maxLenOfTrnRateArray-1;e<s;e++)this.trnRateArray.push(0);for(var e=0,s=this.maxLenOfAvgTrnRateArray-1;e<s;e++)this.avgTrnRateArray.push(0);this.$graphSpeedWrapper.html("0bps"),this.drawGraph(),this.transferring.controlBox.option.showTransferWindow&&this.renderOpen()},renderProgressStrLeft:function(r,t){(t||r.transferSize>=this.lastStatus.transferSize)&&this.$progressStrLeft.text(this.makeProgressStrLeft(r))},renderProgressStrRight:function(r,t){(t||r.speed>0)&&this.$progressStrRight.text(this.makeProgressStrRight(r))},makeProgressStrLeft:function(r){var e=r.progress;return t.isNumeric(e)||(e=0),this.manager.lastTransferring&&this.manager.lastTransferring.controlBox.option.isMobile?e+"%":e+"% ("+s.string.humanFileSize(r.transferSize)+"/"+s.string.humanFileSize(r.totalSize)+")"},makeProgressStrRight:function(r){var t=Math.floor((r.totalSize-r.transferSize)/r.speed),e="";return isFinite(t)&&(e+=s.string.toHHMMSS(t)+" "),100==r.progress&&(e="0 sec "),e+"("+s.string.humanFileSizeBit(8*r.speed)+")"},renderProgress:function(r){0==this.processThumbnail&&r.statusMessage&&"makeTransferList"==r.statusMessage.id&&(this.processThumbnail=!0,this.animateThumbnailProcess()),r.statusMessage&&("finishTransferList"!=r.statusMessage.id&&"transferring"!=r.statusMessage.id||1==this.processThumbnail&&(this.processThumbnail=!1,this.stopThumbnailProcess())),this.animate(r)},renderServerAnimation:function(r){this.$progressBarServer.css("opacity","1");this.hideServerProcess=!1,this.animateServerProcess(r)},renderServerAnimationStop:function(r){this.hideServerProcess=!0,this.$progressBarServer.css("width","91.5%"),this.$progressBarServer.css("opacity","1")},renderHtmlServerAnimationStop:function(r){this.hideServerProcess=!0,this.$progressBarServer.css("width","0%"),this.$progressBarServer.css("opacity","0")},renderComplete:function(r){var e=this;e.$progressBarServer.css("width","0%"),this.animate(r,function(){setTimeout(function(){for(var s=0,a=e.maxLenOfTrnRateArray;s<a;s++)e.trnRateArray[s]=0;for(var s=0,a=e.maxLenOfAvgTrnRateArray;s<a;s++)e.avgTrnRateArray[s]=0;e.drawGraph(),t(".innorix_trn_rate").remove(),t(".innorix_avg_trn_rate").remove(),this.$trnRate=t('<div class="innorix_trn_rate"></div>').prependTo(this.$graphWrapper),this.$avgTrnRate=t('<div class="innorix_avg_trn_rate"></div>').prependTo(this.$graphWrapper),e.lastStatus=r;e.manager.lastTransferring&&e.manager.lastTransferring.controlBox.option.skin,"upload"===r.type&&!1!==e.transferring.emit(i.TRANSFER_UPLOAD_COMPLETE_USER)&&e.renderClose(),"download"===r.type&&(e.manager.emit(i.TRANSFER_DOWNLOAD_WORKING),!1!==e.transferring.emit(i.TRANSFER_DOWNLOAD_COMPLETE_USER)&&e.renderClose())},500)})},animate:function(r,e){var s=this;r.state==a.COMPLETE&&(r.progress=100),s.renderGraph(r),s.lastProgress=s.lastStatus.progress,this.renderProgressStrLeft(r),this.renderProgressStrRight(r),r.transferSize>this.lastStatus.transferSize&&(this.lastStatus=r),(parseFloat(this.$progressBar.attr("data-progress"))<r.progress||100==r.progress)&&(this.$percent.text(r.progress+"%"),this.$progressBar.stop(!0).animate({width:r.progress+"%"},function(){t(this).attr("data-progress",r.progress),e&&e()}))},animateThumbnailProcess:function(r){this.$progressBarServer.animate({width:"91.5%"},1e4,function(){})},stopThumbnailProcess:function(r){var t=this,e=1e3;this.manager&&this.manager.lastTransferring&&this.manager.lastTransferring.controlBox.option.agent&&(e=250),this.$progressBarServer.stop(!0).animate({width:"91.5%"},e,function(){t.$progressBarServer.stop(!0).animate({width:"0"},1,function(){})})},animateServerProcess:function(r){var t=this;0==this.hideServerProcess?this.$progressBarServer.stop(!0).animate({width:"91.5%"},1500,function(){t.$progressBarServer.css("width","0%"),0==t.hideServerProcess?t.animateServerProcess():t.$progressBarServer.css("width","91.5%")}):t.$progressBarServer.css("width","91.5%")},renderCancel:function(r){this.hideServerProcess=!0,this.renderClose()},renderOpen:function(){this.$window.removeClass("show-graph"),this.$el.show()},renderClose:function(){this.hideServerProcess=!0,this.transferring.option&&1==this.transferring.option.iframeView&&(window.top?"top"==this.transferring.option.iframeViewLocation&&window.top.jQuery('[class*="iframeControl"]').detach():this.$el.remove(),window.parent?"top"==this.transferring.option.iframeViewLocation&&window.parent.jQuery('[class*="iframeControl"]').detach():this.$el.remove()),this.$el.hide()},setGraph:function(r){this.trnRateArray.push(r>0?r:0),this.trnRateArray.length>this.maxLenOfTrnRateArray&&this.trnRateArray.splice(0,1);var t=r;this.avgTrnRateArray.push(t>0?t:0),this.avgTrnRateArray.length>this.maxLenOfAvgTrnRateArray&&this.avgTrnRateArray.splice(0,1)},numberFormatter:function(r){return"/s"},drawGraph:function(){this.transferring.controlBox.option.usePlugin&&(this.$avgTrnRate.sparkline(this.avgTrnRateArray,{type:"line",width:"100%",height:"100%",chartRangeMin:0,spotRadius:!1,lineColor:"#10bbe6",fillColor:"#10bbe6",disableInteraction:!0}),this.$trnRate.sparkline(this.trnRateArray,{type:"line",width:"100%",height:"100%",opacity:.5,chartRangeMin:0,spotRadius:!1,lineColor:"#10bbe6",fillColor:"#108ee6",highlightLineColor:"#1de7bf",tooltipClassname:"innorix_jqstooltip",tooltipSuffix:this.trnRateType+"/s",tooltipContainer:this.$graphWrapper,tooltipFormatter:function(r,t,e){var i=e.y;return s.string.humanFileSizeBit(8*i)}}))},bytesToSize:function(r,t){var e,s,i,a,n;return r*=1,a=" ",r>0?(e=1024,s=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.floor(Math.log(r)/Math.log(e)),n=(r/Math.pow(e,i)).toFixed(1)+a+s[i]):n="0"+a+"Byte",n},renderGraph:function(r){if("Transferring"==r.state){var t=r.speed,e=Math.ceil(1),i=Math.floor(10),a=Math.floor(s.string.cryptoRandom()*(i-e))+e;a/=100;t-=a*t;var n=this.bytesToSize(t);n=n.split(" ");n[0],this.bytesToSize(t);this.trnRateType=n[1],this.$graphSpeedWrapper.html(s.string.humanFileSizeBit(8*t)),this.setGraph(t),this.drawGraph()}},renderValidateStart:function(){var r=this;r.fileValidate=setInterval(function(){var t=r.$validateProgress,e=parseInt(t.attr("data-progress"));if(e<100){var s=e+20;t.attr("data-progress",s),t.stop().animate({width:s+"%"},250)}else t.stop().css("width","0%"),t.attr("data-progress",0)},250)},renderValidateEnd:function(){var r=this;r.$validateProgress.stop().css("width","100%").attr("data-progress",100),clearInterval(r.fileValidate),r.fileValidate=null}})});
innorix("Transfer/View/QrCodeWrapper",function(e){"use strict";var t=e("innoJquery"),r=e("klass"),n=e("i18n/lang"),o=e("CONSTANT/EVENT");e("CONSTANT/TRANSFER_STATE");return r({constructor:function(e,t){this.manager=t,this.lastStatus=null,this.innoJquerycodeWrapper=e.find(".irx_qr_wrapper"),this.descWrapper=this.innoJquerycodeWrapper.find(".desc"),this.$showQrCodeButton=e.find(".irx_qr_code"),this.innoJquerycode=e.find(".qr_code"),this.listenManager(),this.attachEvents()},listenManager:function(){var e=t.proxy(this.renderOnCreate,this);this.manager.on(o.TRANSFER_DOWNLOAD_CREATE_QR,e),this.manager.on(o.TRANSFER_UPLOAD_CREATE_QR,e)},renderOnCreate:function(e){this.$showQrCodeButton.hasClass("enable")||e.option.showQrCode&&"compact"!=e.option.skin&&(this.$showQrCodeButton.show(),this.$showQrCodeButton.toggleClass("enable")),this.descWrapper.html(n("transfer.qr.desc"));var t=new QRCode(this.innoJquerycode,{width:125,height:125}),r="http://"+window.location.host;e.option.custom&&(e.option.custom.product&&e.option.custom.product,e.option.custom.userID&&e.option.custom.userID),e.option.url&&(r=e.option.url);var o=r;r=r.replace("http://",""),r=r.replace("https://",""),r=r.split("/");var s={serverIP:r[0],transferID:e.id};o=o.replace("http://",""),o=o.replace("https://",""),o=o.split("/");o[0],e.id;t.makeCode(JSON.stringify(s))},renderOnStart:function(){this.$play.addClass("irx_on").text(n("transfer.controller.pause"))},renderOnPause:function(){this.$play.removeClass("irx_on").text(n("transfer.controller.resume"))},renderOnResume:function(){this.$play.addClass("irx_on").text(n("transfer.controller.pause"))},renderOnCompelte:function(){this.innoJquerycheckGroup.prop("disabled",!1)},attachEvents:function(){},onControllerClick:function(e,r){if(this.manager.isPlaying());else if(this.manager.isPause());else{var n=t(e.target);n.is(":checked")?(this.innoJquerycheckGroup.prop("checked",!1),n.prop("checked",!0)):n.prop("checked",!0),this.manager.setResumeType(n.val())}},renderCheckboxBtn:function(e){this.innoJquerycheckGroup.prop("disabled",!0)},renderStatusWarningBtn:function(e){this.$status.addClass("irx_warn")},renderGraphBtn:function(e){this.$window.toggleClass("show-graph")}})});
innorix("Transfer/View/ResumePolicy",function(n){"use strict";var e=n("innoJquery"),r=n("klass"),t=n("i18n/lang"),i=n("CONSTANT/EVENT");n("CONSTANT/TRANSFER_STATE");return r({constructor:function(n,e){this.manager=e,this.lastStatus=null,this.innoJquerycheckGroup=n.find(".resume_policy_checkbox"),this.$graphWrapper=n.find(".irx_graph_wrapper"),this.$container=n.find(".irx_container"),this.$window=n.find(".irx_transferWin"),this.innoJquerycheckGroup.prop("disabled",!1),this.listenManager(),this.attachEvents()},listenManager:function(){var n=e.proxy(this.renderCheckboxBtn,this);this.manager.on(i.TRANSFER_DOWNLOAD_ALWAYS,n),this.manager.on(i.TRANSFER_UPLOAD_ALWAYS,n),this.manager.on(i.TRANSFER_DOWNLOAD_ERROR,n),this.manager.on(i.TRANSFER_UPLOAD_ERROR,n),this.manager.on(i.AGENT_FILE_DIALOG_SHOW,n);var r=e.proxy(this.renderOnCompelte,this);this.manager.on(i.TRANSFER_DOWNLOAD_CREATE,r),this.manager.on(i.TRANSFER_UPLOAD_CREATE,r),this.manager.on(i.TRANSFER_DOWNLOAD_COMPLETE,r),this.manager.on(i.TRANSFER_UPLOAD_COMPLETE,r),this.manager.on(i.AGENT_FILE_DIALOG_HIDE,r)},renderOnCreate:function(){this.$play.removeClass("irx_on").text(t("transfer.controller.start"))},renderOnStart:function(){this.$play.addClass("irx_on").text(t("transfer.controller.pause"))},renderOnPause:function(){this.$play.removeClass("irx_on").text(t("transfer.controller.resume"))},renderOnResume:function(){this.$play.addClass("irx_on").text(t("transfer.controller.pause"))},renderOnCompelte:function(){this.innoJquerycheckGroup.prop("disabled",!1)},attachEvents:function(){this.innoJquerycheckGroup.on("change",e.proxy(this.onControllerClick,this))},onControllerClick:function(n,r){if(this.manager.isPlaying());else if(this.manager.isPause());else{var t=e(n.target);t.is(":checked")?(this.innoJquerycheckGroup.prop("checked",!1),t.prop("checked",!0)):t.prop("checked",!0),this.manager.setResumeType(t.val())}},renderCheckboxBtn:function(n){this.innoJquerycheckGroup.prop("disabled",!0)},renderStatusWarningBtn:function(n){this.$status.addClass("irx_warn")},renderGraphBtn:function(n){this.$window.toggleClass("show-graph")}})});
innorix("Transfer/View/SpeedLight",function(n){"use strict";var t=n("innoJquery"),i=n("klass"),e=n("CONSTANT/EVENT");return i({constructor:function(n,t){this.manager=t,this.innoJquerylights=n.find(".irx_speed_light > li");var i=n.find(".irx_btnGroup");this.$status=i.children(".irx_trn_status"),this.nextAnimateTimer=null,this.listenManager()},listenManager:function(){var n=t.proxy(this.renderStart,this),i=t.proxy(this.renderStop,this);this.manager.on(e.TRANSFER_DOWNLOAD_ALWAYS,n),this.manager.on(e.TRANSFER_DOWNLOAD_START,n),this.manager.on(e.TRANSFER_DOWNLOAD_RESUME,n),this.manager.on(e.TRANSFER_DOWNLOAD_PAUSE,i),this.manager.on(e.TRANSFER_DOWNLOAD_COMPLETE,i),this.manager.on(e.TRANSFER_DOWNLOAD_CANCEL,i),this.manager.on(e.TRANSFER_DOWNLOAD_RETRY,i),this.manager.on(e.TRANSFER_UPLOAD_ALWAYS,n),this.manager.on(e.TRANSFER_UPLOAD_START,n),this.manager.on(e.TRANSFER_UPLOAD_RESUME,n),this.manager.on(e.TRANSFER_UPLOAD_PAUSE,i),this.manager.on(e.TRANSFER_UPLOAD_COMPLETE,i),this.manager.on(e.TRANSFER_UPLOAD_CANCEL,i),this.manager.on(e.TRANSFER_UPLOAD_RETRY,i)},renderStart:function(n){if(this.renderStop(),this.$status.hasClass("irx_warn"));else{var t=0,i=this;this.nextAnimateTimer=setInterval(function(){3===t&&(t=0),i.innoJquerylights.removeClass("innorix_on").eq(t).addClass("innorix_on"),t++},100)}},renderStop:function(){this.nextAnimateTimer&&(clearInterval(this.nextAnimateTimer),this.nextAnimateTimer=null)}})});
innorix("Transfer/View/Status",function(r){"use strict";var e=r("innoJquery"),t=r("klass"),n=r("i18n/lang"),s=r("CONSTANT/EVENT"),a=r("CONSTANT/TRANSFER_STATE"),i=["makeTransferList","finishTransferList"];return t({constructor:function(r,e){this.manager=e,this.$el=r,this.$status=r.find(".irx_status"),this.$guideMessage=r.find(".irx_message_wrapper"),this.isCanceling=!1,this.isPausing=!1,this.alreadyShownMessageMap={},this.lastStatus=null,this.listenManager()},listenManager:function(){var r=e.proxy(this.renderRetry,this),t=e.proxy(this.renderInit,this),n=e.proxy(this.renderInitOnDownload,this),a=e.proxy(this.renderInitOnDownloadGuide,this),i=e.proxy(this.renderInitOnUpload,this),o=e.proxy(this.renderInitOnUploadGuide,this),h=e.proxy(this.render,this),l=e.proxy(this.renderPause,this),g=e.proxy(this.renderPausing,this),u=e.proxy(this.renderGuideMessage,this);this.manager.on(s.TRANSFER_DOWNLOAD_RETRY,r),this.manager.on(s.TRANSFER_DOWNLOAD_CREATE,n),this.manager.on(s.TRANSFER_DOWNLOAD_CREATE_GUIDE,a),this.manager.on(s.TRANSFER_DOWNLOAD_CANCEL,t),this.manager.on(s.TRANSFER_DOWNLOAD_ALWAYS,h),this.manager.on(s.TRANSFER_DOWNLOAD_PAUSE,l),this.manager.on(s.TRANSFER_DOWNLOAD_PAUSING,g),this.manager.on(s.TRANSFER_UPLOAD_RETRY,r),this.manager.on(s.TRANSFER_UPLOAD_CREATE,i),this.manager.on(s.TRANSFER_UPLOAD_CREATE_GUIDE,o),this.manager.on(s.TRANSFER_UPLOAD_CANCEL,t),this.manager.on(s.TRANSFER_UPLOAD_ALWAYS,h),this.manager.on(s.TRANSFER_UPLOAD_PAUSE,l),this.manager.on(s.TRANSFER_UPLOAD_PAUSING,g),this.manager.on(s.TRANSFER_GUIDE_MESSAGE,u)},renderRetry:function(r){this.isCanceling||this.renderByLang("errorAndRetry",{count:r.retries})},renderInit:function(){this.isCanceling=!1,this.isPausing=!1,this.$status.empty(),this.alreadyShownMessageMap={}},renderInitOnUpload:function(){this.renderInit(),this.renderByLang("initUpload")},renderInitOnUploadGuide:function(){this.renderByLang("initUploadGuide")},renderInitOnDownload:function(){this.renderInit(),this.renderByLang("initDownload")},renderInitOnDownloadGuide:function(){this.renderByLang("initDownloadGuide")},renderGuideMessage:function(){var r=this,e="";this.manager.lastTransferring&&this.manager.lastTransferring&&this.manager.lastTransferring.controlBox&&(this.manager.lastTransferring.controlBox.option.guideMessage&&(e=this.manager.lastTransferring.controlBox.option.guideMessage),this.manager.lastTransferring.controlBox.option.skin),e?(r.$guideMessage.show(),r.$guideMessage.text(e)):(r.$guideMessage.hide(),r.$guideMessage.text(""))},render:function(r){var t=this;if(r.statusMode){if("html"==r.statusMode){var n=r,s=this.$el.find("#"+n.rowID);if(s.length){var o=s.find(".filestatus"),h="green";"Error"==r.state?h="red":"Transferring"==r.state&&(h="blue"),o.html('<span style="color:'+h+';">'+r.state+"</span>")}}}else{for(var l=r.files,g=0;g<l.length;g++){var n=l[g];try{if(this.$el.length){var s=this.$el.find("#"+n.rowID);if(s.length){var o=s.find(".filestatus"),h="blue",u=n.fileState,d=n.clientFilePath;if("error"==n.fileState){h="red",u="Error",d=n.errorTitle?n.errorTitle:n.errorCode;var f='<span class="errorState" data-state="'+u+'" data-error="'+d+'" style="color:'+h+';">'+u+"</span>";o.html(f),o.hover(function(){var r=e(this).find(".errorState");r.length&&t.$status.html("<span style='color:red;'>"+r.data("error")+"</span>")},function(){e(this).find(".errorState").length&&t.$status.html("<span style='color:#646464;'>"+t.$status.data("textt")+"</span>")})}else"transferring"==n.fileState?(h="blue",u="Transferring"):"complete"==n.fileState?(h="green",u="Complete"):"pass"==n.fileState?(h="blue",u="Skip"):"cancel"==n.fileState?(h="blue",u="Cancel"):"pause"==n.fileState?(h="blue",u="Pause"):(h="blue",u="Working"),o.html('<span style="color:'+h+';">'+u+"</span>")}}}catch(c){}}if(this.isCanceling||this.isPausing)return;r.state!=a.COMPLETE?null!=this.lastStatus&&(this.lastStatus.transferSize==r.transferSize?this.manager.addStuckCount():this.manager.resetStuckCount()):this.manager.resetStuckCount(),100==r.progress&&this.manager.resetStuckCount();var S=r.statusMessage;if(this.manager.lastTransferring&&this.manager.lastTransferring.option.isMobile)return void(this.lastStatus=r);if(!S.id)return;if(this.alreadyShownMessageMap[S.id])return void(this.status=r);-1!==i.indexOf(S.id)&&(this.alreadyShownMessageMap[S.id]=!0),this.renderByLang(S.id,S.errorCode?{errorCode:S.errorCode,customError:S.customError}:null),this.lastStatus=r}},renderByLang:function(r,e){"workingServer"==r||"transferCompleted"==r?this.manager.setWorkingServer():this.manager.stopWorkingServer();var t=n("transferStatus."+r,e);if(this.manager.lastTransferring&&this.manager.lastTransferring.option.isMobile){t="upload"==this.manager.lastTransferring.files[0].mode?"Uploading":"Downloading"}if("errorSocket"==r){console.log(e);var s=parseInt(e.errorCode),a="transferStatus."+e.errorCode;t=0==s?n("transferStatus.errorClient"):5e3==s?n("transferStatus.errorLicense"):s>=1&&s<=399?n("transferStatus.errorServer"):s>=400&&s<=599?n("transferStatus.errorNetwork"):s>=1e3&&s<=1003?n("transferStatus.errorServer"):s>=1e3&&s<=1999?e.customError?e.customError:n("transferStatus.errorServer"):n(n(a)!=a?a:"transferStatus.errorNetwork")}this.$status.attr("data-textt",t),this.$status.text(t)},renderCanceling:function(){this.isCanceling=!0,this.renderByLang("transferCanceling")},renderPausing:function(){this.isPausing=!0},renderPause:function(){this.isPausing=!1}})});
innorix("Transfer/View/template",function(s){"use strict";s("innoJquery");return'<div class="irx_transferWin_wrapper"> <div class="irx_transferWin"> <div class="irx_header"> <span class="irx_title"> <span class="irx_percent">0%</span> - <span class="irx_custom_title">WP</span> </span> <button class="irx_close" type="button">X</button> </div> <div class="irx_container"> <div class="irx_filetree"> </div> <div class="irx_indicator"> <ol class="irx_speed_light"> <li class="irx_speed1"></li> <li class="irx_speed2"></li> <li class="irx_speed3"></li> </ol> </div> <div class="irx_validate_progress_server"></div> <div class="irx_progress"> <span class="irx_progressStr_left">0% (0Byte / 0Byte)</span> <span class="irx_progressStr_right irx_right">0 sec (0B/s)</span> <div class="irx_progressBar"> <span class="irx_progressStr_left">0% (0Byte / 0Byte)</span> <span class="irx_progressStr_right">0 sec (0B/s)</span> <div class="irx_validate_progress"></div> </div> </div> <div class="irx_center"> <div data-textt="status" class="irx_status"> </div> <div class="irx_btnGroup"> <button type="button" class="irx_trn_status">Connection Status</button> <button type="button" class="irx_toggle_graph">Graph</button> <button type="button" class="irx_qr_code">QR Code</button> <button type="button" class="irx_controller">Start</button> </div> </div> <div class="irx_folderPath_wrapper"> <div class="irx_folderPath"> <button type="button" class="irx_folderDialog">Open</button> <span class="irx_folderPath_str">C:/ASDF</span> </div> </div> <div class="irx_bottom_policy"> <span>Resume Policy</span>'+" <label for='irx_resume_policy'><input type='checkbox' value='resume' checked id='irx_resume_policy' class='resume_policy_checkbox'> Resume </label> <label for='irx_overwrite_policy'><input type='checkbox' value='overwrite' id='irx_overwrite_policy' class='resume_policy_checkbox'> Overwrite <label for='irx_confirm_policy'><input type='checkbox' value='confirm' id='irx_confirm_policy' class='resume_policy_checkbox'> Confirm </div> <div class=\"irx_qr_wrapper\"> <div class='gplayLogo'></div> <div class='desc'></div> <div class = 'qr_code'> </div> </div> <div class=\"irx_message_wrapper\"></div> <div class=\"irx_bottom\"> <span>INNORIX</span> </div> <div class=\"irx_graph_wrapper\"> <span class=\"irx_avg_trn_rate_txt\">0Byte/s</span> </div> </div> </div ></div >"});
innorix("Transfer/View/Views",function(t){"use strict";var i=t("innoJquery"),s=t("klass"),e=t("Transfer/View/template"),n=t("Transfer/View/SpeedLight"),r=t("Transfer/View/Progress"),o=t("Transfer/View/Status"),a=t("Transfer/View/ControlButtons"),l=t("Transfer/View/FolderPath"),h=t("Transfer/View/ResumePolicy"),w=t("Transfer/View/QrCodeWrapper"),c=t("i18n/lang"),f=t("CONSTANT/EVENT");return s({constructor:function(t){this.manager=t,this.$el=i(e),this.speedLight=new n(this.$el,t),this.progress=new r(this.$el,t),this.status=new o(this.$el,t),this.controlButtons=new a(this.$el,t),this.folderPath=new l(this.$el,t),this.resumePolicy=new h(this.$el,t),this.showQrCodeWrapper=new w(this.$el,t),this.$window=this.$el.find(".irx_transferWin"),this.initView(),this.attachEvents()},initView:function(){var t=this;this.clickingClose=!1,this.$el.hide(),this.manager.on(f.TRANSFER_UPLOAD_PAUSE,function(){setTimeout(function(){1==t.clickingClose&&t.showConfirmCancel()},100)}),this.manager.on(f.TRANSFER_DOWNLOAD_PAUSE,function(){setTimeout(function(){1==t.clickingClose&&t.showConfirmCancel()},100)}),i(document).ready(function(){t.$el.appendTo("body")})},refreshStyle:function(){this.$window.find(".irx_btnGroup .irx_controller").show(),this.$window.removeClass("transferCompact"),this.$window.removeClass("transferCompactP"),this.$window.find(".irx_filetree").html(""),this.$window.find(".irx_filetree").hide(),this.$window.find(".irx_toggle_graph").show()},initDraggable:function(){this.$el.find(".irx_transferWin").draggable({handle:".irx_header",stop:function(t,s){i(t.target)}})},initMobile:function(){i.fn.center=function(t){return t=t?this.parent():window,(i(t).height()-this.outerHeight())/2+i(t).scrollTop()<0?this.css({top:"0px"}):this.css({top:(i(t).height()-this.outerHeight())/2+i(t).scrollTop()+"px"}),this},this.$window.css("width","300px"),this.$window.find(".irx_controller").hide(),this.$window.find(".irx_progress").css("width","258px"),this.$window.find(".irx_status").css("opacity",0),this.$window.find(".irx_progressStr_left").css("width","240px"),this.$window.find(".irx_progressStr_right").css("width","240px"),this.$window.find(".irx_folderPath_wrapper").hide(),this.$window.find(".irx_bottom").css("top","132px"),this.$window.find(".irx_container").animate({height:100},10,function(){}),this.$window.animate({height:156},10,function(){}),this.$window.css("margin-top","0px"),this.$window.css("margin-left","0px"),this.$window.css("top","45%"),this.$window.css("left",Math.max(0,(i(window).width()-this.$window.outerWidth())/2+i(window).scrollLeft())+"px"),this.attachEvents()},initEncoding:function(t,i,s){t&&this.initMobile(),this.$el.show(),this.$window.find(".irx_progressStr_left").text(i+"%"),this.$window.find(".irx_progressStr_right").text(""),this.$window.find(".irx_folderPath_wrapper").hide(),this.$window.find(".irx_status").show(),this.$window.find(".irx_status").text("Encoding"),this.$window.find(".irx_btnGroup").hide(),this.$window.find(".irx_progressBar").stop(!0).animate({width:i+"%"})},attachEvents:function(){this.$el.find(".irx_close").on("click",i.proxy(this.onClickClose,this))},attachEventsParent:function(t){t.jQuery('[class*="iframeControl"]').find(".irx_close").on("click",i.proxy(this.onClickClose,this))},showConfirmCancel:function(){var t=this;try{if(this.iframeView)var i=window.top.confirm(c("transferStatus.confirmCancelTransfer"));else var i=confirm(c("transferStatus.confirmCancelTransfer"));1==i&&(this.status.manager&&this.status.manager.lastTransferring&&this.status.manager.lastTransferring.controlBox&&this.status.manager.lastTransferring.controlBox.deleteUploadResumeInfo(),null!=t.status.lastStatus&&"Complete"==t.status.lastStatus.state?(t.$el.hide(),window.parent.jQuery('[class*="iframeControl"]').remove(),window.top.jQuery('[class*="iframeControl"]').remove()):(t.status.renderCanceling(),t.manager.cancel(),null==t.status.lastStatus&&(t.$el.hide(),window.parent.jQuery('[class*="iframeControl"]').remove(),window.top.jQuery('[class*="iframeControl"]').remove())),t.manager.isActive()&&t.manager.inactive())}catch(s){console.log(s),t.$el.hide(),window.parent?window.parent.jQuery('[class*="iframeControl"]').remove():t.$el.remove(),window.top?window.top.jQuery('[class*="iframeControl"]').remove():t.$el.remove()}this.clickingClose=!1},showConfirmCancelDirectClose:function(){1==confirm(c("transferStatus.confirmCancelTransfer"))&&this.destroyParentTransferWindow(),this.clickingClose=!1},destroyParentTransferWindow:function(){if(this.status.manager&&this.status.manager.lastTransferring&&this.status.manager.lastTransferring.controlBox&&1==this.status.manager.lastTransferring.controlBox.option.iframeView){"parent"==this.status.manager.lastTransferring.controlBox.option.iframeViewLocation?(parent,window.parent.jQuery('[class*="iframeControl"]').remove()):(top,window.top.jQuery('[class*="iframeControl"]').remove())}},onClickClose:function(t,i){this.$el.addClass("isClosing");var s=!1;this.iframeView=!1;this.status.manager&&this.status.manager.lastTransferring&&this.status.manager.lastTransferring.controlBox&&(1==this.status.manager.lastTransferring.controlBox.option.cancelConfirmation&&(s=!0),1==this.status.manager.lastTransferring.controlBox.option.iframeView&&(this.iframeView=!0)),1==s?0==this.manager.getDisabledState()&&(this.clickingClose=!0,this.manager.isPause()?this.showConfirmCancel():null!=this.status.lastStatus&&"Complete"==this.status.lastStatus.state?this.showConfirmCancel():null==this.status.lastStatus?this.showConfirmCancel():this.manager.pause()):0==this.manager.getDisabledState()&&(null!=this.status.lastStatus&&"Complete"==this.status.lastStatus.state?(this.$el.hide(),this.iframeView&&(window.top?window.top.jQuery('[class*="iframeControl"]').remove():this.$el.remove(),window.parent?window.parent.jQuery('[class*="iframeControl"]').remove():this.$el.remove())):(this.status.renderCanceling(),this.manager.cancel(),null==this.status.lastStatus&&(this.$el.hide(),this.iframeView&&(window.top?window.top.jQuery('[class*="iframeControl"]').remove():this.$el.remove(),window.parent?window.parent.jQuery('[class*="iframeControl"]').remove():this.$el.remove()))),this.manager.isActive()&&this.manager.inactive())}})});
innorix("ControlBox/Skin/Base/Dropzone",function(o){"use strict";var t=o("innoJquery"),n=o("klass"),e=o("util"),i=o("CONSTANT/EVENT");return n({constructor:function(o,t){this.$inner=o,this.controlBox=t,this.attachEvents(),this.listenControlBox()},attachEvents:function(){this.$inner.parent().on("dragenter",t.proxy(this.onDragEnter,this)),this.$inner.parent().on("drop",t.proxy(this.onDrop,this)),this.$inner.parent().on("dragover",t.proxy(this.onDrop,this))},listenControlBox:function(){this.controlBox.on(i.DROPZONE_SHOW,t.proxy(this.renderShow,this)),this.controlBox.on(i.DROPZONE_HIDE,t.proxy(this.renderHide,this)),this.controlBox.on(i.DROPZONE_STATE_SHOW,t.proxy(this.renderLoadingShow,this)),this.controlBox.on(i.DROPZONE_STATE_HIDE,t.proxy(this.renderLoadingHide,this)),this.controlBox.on(i.FILE_PROCESSING_STATE_SHOW,t.proxy(this.renderFileLoadingShow,this)),this.controlBox.on(i.FILE_PROCESSING_STATE_HIDE,t.proxy(this.renderFileLoadingHide,this)),this.controlBox.on(i.CONTROL_DESTROY,t.proxy(this.resetEvent,this))},resetEvent:function(o){this.controlBox.off(i.DROPZONE_SHOW,t.proxy(this.renderShow,this)),this.controlBox.off(i.DROPZONE_HIDE,t.proxy(this.renderHide,this)),this.controlBox.off(i.DROPZONE_STATE_SHOW,t.proxy(this.renderLoadingShow,this)),this.controlBox.off(i.DROPZONE_STATE_HIDE,t.proxy(this.renderLoadingHide,this)),this.controlBox.off(i.FILE_PROCESSING_STATE_SHOW,t.proxy(this.renderFileLoadingShow,this)),this.controlBox.off(i.FILE_PROCESSING_STATE_HIDE,t.proxy(this.renderFileLoadingHide,this)),this.controlBox.off(i.CONTROL_DESTROY,t.proxy(this.resetEvent,this)),this.dropzone.off("dragenter",t.proxy(this.onDragEnter,this)),this.dropzone.off("drop",t.proxy(this.onDrop,this)),this.dropzone.off("dragover",t.proxy(this.onDrop,this))},onDragEnter:function(o){var t=e.getBoundingScreenRect(o.originalEvent,this.$inner.get(0),this.controlBox.option),n=e.string.generateUUID();this.controlBox.showDropState({dropId:n,uuid:n}),navigator.userAgent.toLowerCase().match("chrome")?this.controlBox.showDropZone({x:parseInt(t.left-10),y:parseInt(t.top-10),width:parseInt(t.width+20),height:parseInt(t.height+20),newLeft:parseInt(t.newLeft-10),newTop:parseInt(t.newTop-10),newWidth:parseInt(t.newWidth+20),newHeight:parseInt(t.newHeight+20),availLeft:t.availLeft,availTop:t.availTop,screenX:t.screenX,screenY:t.screenY,screenWidth:t.screenWidth,screenHeight:t.screenHeight,mouseClientX:t.mouseClientX,mouseClientY:t.mouseClientY,mouseScreenX:t.mouseScreenX,mouseScreenY:t.mouseScreenY,zoom:t.zoom,isChrome:t.isChrome,dropId:n,uuid:n,addEmptyDirectory:this.controlBox.option.folderIntact,debug:this.controlBox.option.isDebugDropZone}):this.controlBox.showDropZone({x:parseInt(t.left-10),y:parseInt(t.top-10),width:parseInt(t.width+20),height:parseInt(t.height+20),dropId:n,uuid:n,addEmptyDirectory:this.controlBox.option.folderIntact,debug:this.controlBox.option.isDebugDropZone})},onDrop:function(o){o.preventDefault()},renderShow:function(){this.$inner.addClass("_irx_dragging")},renderHide:function(){this.$inner.removeClass("_irx_dragging")},renderLoadingShow:function(){this.$inner.find(".loading-layout").show()},renderLoadingHide:function(){this.$inner.find(".loading-layout").hide()},renderFileLoadingShow:function(){},renderFileLoadingHide:function(){}})});
innorix("ControlBox/Skin/Base/Empty",function(t){"use strict";var n=t("innoJquery"),o=t("klass"),i=t("CONSTANT/EVENT");return o({constructor:function(t,n){this.$empty=t.children(".irx_empty"),this.$contents=t.children(".irx_contents"),this.controlBox=n,this.listenControlBox()},listenControlBox:function(){var t=n.proxy(this.render,this);this.controlBox.on(i.CONTROL_AFTER_ADD_FILES,t),this.controlBox.on(i.CONTROL_REMOVE_FILES,t)},render:function(){this.controlBox.getFileCount()>0?(this.$empty.hide(),this.$contents.show()):(this.$empty.show(),this.$contents.hide())}})});
innorix("ControlBox/Skin/Base/InfoBox",function(t){"use strict";var i=t("innoJquery"),o=t("klass"),n=t("util"),e=t("i18n/lang"),r=t("CONSTANT/EVENT");return o({constructor:function(t,i){this.$infobox=t.find(".irx_infoBox"),this.controlBox=i,this.listenControlBox()},listenControlBox:function(){var t=i.proxy(this.renderSelectSize,this);this.controlBox.on(r.CONTROL_AFTER_ADD_FILES,i.proxy(this.renderTotalSize,this)),this.controlBox.on(r.CONTROL_REMOVE_FILES,t),this.controlBox.on(r.CONTROL_SELECT_ROWS,t),this.controlBox.on(r.CONTROL_UNSELECT_ROWS,t)},renderTotalSize:function(){var t=n.string.humanFileSizeObject(this.controlBox.getTotalSize());this.$infobox.find(".irx_size").text(t.number.toFixed(1)),this.$infobox.find(".irx_unit").text(t.unit+"yte"),this.$infobox.find(".irx_text").empty()},renderSelectSize:function(){var t=this.controlBox.getSelectedFileCount();if(0===t)return void this.renderTotalSize();var i=n.string.humanFileSizeObject(this.controlBox.getSelectSize());this.$infobox.find(".irx_size").text(i.number.toFixed(1)),this.$infobox.find(".irx_unit").text(i.unit+"yte"),this.$infobox.find(".irx_text").text(e("controlBox.fileTotalSelInfo",{total:this.controlBox.getFileCount(),select:t}))}})});
innorix("ControlBox/Skin/Base/ListGrid",function(i){"use strict";var t=i("innoJquery"),e=i("klass"),n=i("util"),o=i("CONSTANT/EVENT");return e({constructor:function(i,t){this.$inner=i,this.$listGrid=i.find(".irx_listGrid"),this.controlBox=t,this.lastOdd=!1,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){this.controlBox.on(o.CONTROL_REMOVE_FILES,t.proxy(this.renderRemoveFiles,this)),this.controlBox.on(o.CONTROL_AFTER_ADD_FILES,t.proxy(this.renderAddFiles,this))},attachEvents:function(){this.$listGrid.on("click",".irx_remove",t.proxy(this.onRemoveClick,this))},renderAddFiles:function(i){var e=this,o="";t.each(i,function(i,t){e.lastOdd=!e.lastOdd;var r=t.printFileName,s=t.filePath?t.filePath:t.printFileName;r.length>25&&(r=r.slice(0,25)+"...");var l="";t.fileSize&&(l=n.string.humanFileSize(t.fileSize)),o+=(e.lastOdd?'<li class="irx_odd"':"<li")+' id="'+t.id+'"title="'+s+'"> <input type="checkbox">'+r+' <span class="irx_info">('+l+')</span><span class="irx_remove">X</span></li>'}),o+="",this.$listGrid.append(o)},renderClearFiles:function(){this.$listGrid.empty()},renderRemoveFiles:function(i){if(0===this.controlBox.getFileCount())return void this.renderClearFiles();var e=this.$listGrid;t.each(i,function(i,t){e.find("#"+t.id).remove()})},onRemoveClick:function(i){if(0==this.controlBox.getControlDisabledState()){i.stopPropagation();var e=t(i.currentTarget).parent("li"),n=e.attr("id");this.controlBox.removeFileById(n)}},onKeyupEvent:function(i){}})});
innorix("ControlBox/Skin/Base/Loading",function(n){"use strict";var i=n("innoJquery"),t=n("klass"),o=n("singleton/agent"),e=n("CONSTANT/EVENT"),r=["openFileDialog"];return t({constructor:function(n){this.$loading=n.children(".irx_loading"),this.commandStackCount=0,this.listenAgent()},listenAgent:function(){var n=o.event;n.on(e.AGENT_ADD_COMMAND,i.proxy(this.renderShow,this)),n.on(e.AGENT_COMPLETE_COMMAND,i.proxy(this.renderHide,this))},renderShow:function(n){-1!==r.indexOf(n.action)&&0==this.commandStackCount++&&this.$loading.show()},renderHide:function(n){-1!==r.indexOf(n.action)&&0==--this.commandStackCount&&this.$loading.hide()}})});
innorix("ControlBox/Skin/Base/RowSelection",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),o=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$listGrid=t.find(".irx_listGrid"),this.controlBox=e,this.lastSelectedIndex=!1,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){this.controlBox.on(o.CONTROL_SELECT_ROWS,e.proxy(this.renderSelectRows,this)),this.controlBox.on(o.CONTROL_UNSELECT_ROWS,e.proxy(this.renderUnSelectRows,this))},renderSelectRows:function(t){var i=this.$listGrid;e.each(t,function(t,e){i.find("#"+e.id).addClass("selected").find(":checkbox").prop("checked",!0)})},renderUnSelectRows:function(t){var i=this.$listGrid;e.each(t,function(t,e){i.find("#"+e.id).removeClass("selected").find(":checkbox").prop("checked",!1)})},attachEvents:function(){this.$listGrid.on("click","li",e.proxy(this.onRowClick,this))},onRowClick:function(t){if(0==this.controlBox.getControlDisabledState()){var i=e(t.currentTarget),o=i.index(),n=i.attr("id"),s=this.controlBox.getFileById(n);t.shiftKey&&!1!==this.lastSelectedIndex?this.selectMultipleRows(this.lastSelectedIndex,o,t.ctrlKey):t.shiftKey||!s.selected?this.selectRow(n):this.unSelectRow(n),this.lastSelectedIndex=o}},selectMultipleRows:function(t,i,o){t>i&&(i=[t,t=i][0]);var n=this.controlBox.getAllFiles().slice(t,i+1),s=e.map(n,function(t){return t.id});o||this.controlBox.unSelectFilesById(),this.controlBox.addSelectFilesById(s)},selectRow:function(t){this.controlBox.addSelectFilesById([t])},unSelectRow:function(t){this.controlBox.unSelectFilesById([t])}})});
innorix("ControlBox/Skin/Base/template",function(i){"use strict";return i("innoJquery").parseHTML('<div class="irx_inner"> <div class="irx_contents"> <div class="irx_infoBox"> <div class="irx_infoBox_inner"> <div class="irx_top"> <span class="irx_size"></span> <span class="irx_unit"></span> </div> <div class="irx_bottom"> <span class="irx_text"></span> </div> </div> </div> <div class="irx_listGrid_wrap"> <ul class="irx_listGrid"> </ul> </div> </div> <div class="irx_empty"> </div> <div class="irx_loading"> <span></span> </div></div>')});
innorix("ControlBox/Skin/Base/View",function(n){"use strict";var i,t=n("innoJquery"),e=n("klass"),o=n("ControlBox/Skin/View"),s=n("ControlBox/Skin/Base/Dropzone"),r=n("ControlBox/Skin/Base/ListGrid"),h=n("ControlBox/Skin/Base/InfoBox"),a=n("ControlBox/Skin/Base/Empty"),l=n("ControlBox/Skin/Base/RowSelection"),B=n("ControlBox/Skin/Base/Loading");return e([o],{constructor:function(e,x){i=n("ControlBox/Skin/Base/template"),o.call(this,e,x),this.$inner=t(i).appendTo(e),this.$first=this.$inner.children(".irx_first"),this.$contents=this.$inner.children(".irx_contents"),this.dropzone=new s(this.$inner,x),this.listGrid=new r(this.$inner,x),this.infoBox=new h(this.$inner,x),this.empty=new a(this.$inner,x),this.rowSelection=new l(this.$inner,x),this.loading=new B(this.$inner,x),this.addThemeIfExist()},addThemeIfExist:function(){var n=this.controlBox.option.skinTheme;n&&this.$el.addClass("irx_theme_"+n)},defaultSize:{width:550,height:200},skinName:"base"})});
innorix("ControlBox/Skin/Basic/Dropzone",function(o){"use strict";var t=o("innoJquery"),n=o("klass"),e=o("util"),i=o("CONSTANT/EVENT");return n({constructor:function(o,t){this.$inner=o,this.controlBox=t,this.lastDropId="",this.dropzone=this.$inner.parent(),this.attachEvents(),this.listenControlBox()},attachEvents:function(){this.dropzone.on("dragenter",t.proxy(this.onDragEnter,this)),this.dropzone.on("drop",t.proxy(this.onDrop,this)),this.dropzone.on("dragover",t.proxy(this.onDrop,this))},listenControlBox:function(){this.controlBox.on(i.DROPZONE_SHOW,t.proxy(this.renderShow,this)),this.controlBox.on(i.DROPZONE_HIDE,t.proxy(this.renderHide,this)),this.controlBox.on(i.DROPZONE_STATE_SHOW,t.proxy(this.renderLoadingShow,this)),this.controlBox.on(i.DROPZONE_STATE_HIDE,t.proxy(this.renderLoadingHide,this)),this.controlBox.on(i.FILE_PROCESSING_STATE_SHOW,t.proxy(this.renderFileLoadingShow,this)),this.controlBox.on(i.FILE_PROCESSING_STATE_HIDE,t.proxy(this.renderFileLoadingHide,this)),this.controlBox.on(i.CONTROL_DESTROY,t.proxy(this.resetEvent,this))},resetEvent:function(o){this.controlBox.off(i.DROPZONE_SHOW,t.proxy(this.renderShow,this)),this.controlBox.off(i.DROPZONE_HIDE,t.proxy(this.renderHide,this)),this.controlBox.off(i.DROPZONE_STATE_SHOW,t.proxy(this.renderLoadingShow,this)),this.controlBox.off(i.DROPZONE_STATE_HIDE,t.proxy(this.renderLoadingHide,this)),this.controlBox.off(i.FILE_PROCESSING_STATE_SHOW,t.proxy(this.renderFileLoadingShow,this)),this.controlBox.off(i.FILE_PROCESSING_STATE_HIDE,t.proxy(this.renderFileLoadingHide,this)),this.controlBox.off(i.CONTROL_DESTROY,t.proxy(this.resetEvent,this)),this.dropzone.off("dragenter",t.proxy(this.onDragEnter,this)),this.dropzone.off("drop",t.proxy(this.onDrop,this)),this.dropzone.off("dragover",t.proxy(this.onDrop,this))},onDragEnter:function(o){var t=e.getBoundingScreenRect(o.originalEvent,this.dropzone.get(0),this.controlBox.option),n=e.string.generateUUID();this.lastDropId=n,this.controlBox.showDropState({dropId:n,uuid:n}),navigator.userAgent.toLowerCase().match("chrome")?this.controlBox.showDropZone({x:parseInt(t.left-10),y:parseInt(t.top-10),width:parseInt(t.width+20),height:parseInt(t.height+20),newLeft:parseInt(t.newLeft-10),newTop:parseInt(t.newTop-10),newWidth:parseInt(t.newWidth+20),newHeight:parseInt(t.newHeight+20),availLeft:t.availLeft,availTop:t.availTop,screenX:t.screenX,screenY:t.screenY,screenWidth:t.screenWidth,screenHeight:t.screenHeight,mouseClientX:t.mouseClientX,mouseClientY:t.mouseClientY,mouseScreenX:t.mouseScreenX,mouseScreenY:t.mouseScreenY,zoom:t.zoom,isChrome:t.isChrome,dropId:n,uuid:n,addEmptyDirectory:this.controlBox.option.folderIntact,debug:this.controlBox.option.isDebugDropZone}):this.controlBox.showDropZone({x:parseInt(t.left-10),y:parseInt(t.top-10),width:parseInt(t.width+20),height:parseInt(t.height+20),dropId:n,uuid:n,addEmptyDirectory:this.controlBox.option.folderIntact,debug:this.controlBox.option.isDebugDropZone})},onDrop:function(o){o.preventDefault()},renderShow:function(){this.controlBox.view.$el.addClass("_irx_dragging"),this.$inner.addClass("_irx_dragging")},renderHide:function(){this.controlBox.view.$el.removeClass("_irx_dragging"),this.$inner.removeClass("_irx_dragging")},renderLoadingShow:function(){this.$inner.find(".loading-layout").show()},renderLoadingHide:function(){this.$inner.find(".loading-layout").hide()},renderFileLoadingShow:function(){},renderFileLoadingHide:function(){}})});
innorix("ControlBox/Skin/Basic/Empty",function(t){"use strict";var n=t("innoJquery"),o=t("klass"),i=t("CONSTANT/EVENT");return o({constructor:function(t,n){this.$empty=t.children(".irx_empty"),this.$contents=t.children(".irx_contents"),this.controlBox=n,this.listenControlBox()},listenControlBox:function(){var t=n.proxy(this.render,this);this.controlBox.on(i.CONTROL_AFTER_ADD_FILES,t),this.controlBox.on(i.CONTROL_REMOVE_FILES,t)},render:function(){this.controlBox.getFileCount()>0?(this.$empty.hide(),this.$contents.show()):(this.$empty.show(),this.$contents.hide())}})});
innorix("ControlBox/Skin/Basic/InfoBox",function(t){"use strict";var e=t("innoJquery"),o=t("klass"),i=t("util"),r=t("i18n/lang"),l=(t("CONSTANT/ENV"),t("CONSTANT/EVENT"));return o({constructor:function(t,o){this.$inner=t,this.$infobox=e(t[2]),this.$fileSizeWrapper=t.find(".irx-chart-file-size"),this.$fileCountWrapper=t.find(".irx-chart-file-count"),this.$massFileWrapper=t.find(".irx-mass-wrapper"),this.$massFileWrapperTitle=t.find(".irx-mass-file-title"),this.$massFileWrapperSize=t.find(".irx-mass-file-size"),this.$massFileWrapperCount=t.find(".irx-mass-file-count"),this.$massFileWrapperContent=t.find(".irx-mass-file-content"),this.$closeGraphBtn=t.find(".irx-chart-toggle"),this.$chartCanvas=t.find(".irx-chart-canvas"),this.$chartObj=null,this.controlBox=o,this.listenControlBox(),this.attachEvents(),this.hideGraph(),this.controlBox.option.showGraph&&this.showGraph()},listenControlBox:function(){var t=e.proxy(this.renderChart,this);this.controlBox.on(l.CONTROL_AFTER_ADD_FILES,e.proxy(this.renderChart,this)),this.controlBox.on(l.CONTROL_REMOVE_FILES,t),this.controlBox.on(l.CONTROL_SELECT_ROWS,t),this.controlBox.on(l.CONTROL_UNSELECT_ROWS,t)},attachEvents:function(){this.$infobox.on("click",".irx-chart-toggle",e.proxy(this.hideGraph,this)),this.$infobox.on("click",".irx-mass-toggle",e.proxy(this.hideMass,this))},renderChart:function(){var t=this;setTimeout(function(){t.$massFileWrapperTitle.html(r("controlBox.massFileTitle")),t.$massFileWrapperContent.html(r("controlBox.massFileContent"));var e=t.controlBox.getTotalSize(),o=t.controlBox.getSelectSize(),l=i.string.humanFileSizeObject(e),a=l.number.toFixed(2);a=a.replace(/\.00([^\d])/g,"$1");var s=l.unit;l=l.number.toFixed(2)+l.unit,l=l.replace(/\.00([^\d])/g,"$1");var n=i.string.humanFileSizeObject(o);n=n.number.toFixed(2)+n.unit,n=n.replace(/\.00([^\d])/g,"$1");var h=t.controlBox.getSelectedFileCount(),c=t.controlBox.getFileCount(),d=t.controlBox.getTotalFolderCount(),p=t.controlBox.getSelectedFolderCount(),f='<div class="selected-file-size">'+n+"</div><br/>";if(f+='<div class="total-file-size"></div>',h>0){f='<div class="selected-file-size">'+n+"</div>",f+='<div class="total-file-size"><div class="topBorder"></div>'+l+"</div>";var x="file",u="folder";1==p?(p=", "+p,u="folder"):p>1?(p=", "+p,u="folders"):0==h?(p=", "+p,u="folder"):(u="",p=""),h>1&&(x="files"),t.$fileSizeWrapper.addClass("file-select"),t.$fileCountWrapper.html(r("controlBox.fileTotalSelInfo",{totalFolderSelected:p,totalItemSelected:h,textItem:x,textFolder:u}))}else{var x="file",u="folder";1==d?(d=", "+d,u="folder"):d>1?(d=", "+d,u="folders"):(u="",d=""),c>1&&(x="files"),f='<div class="selected-file-size">'+l+"</div>",t.$fileSizeWrapper.removeClass("file-select"),t.$fileCountWrapper.html(r("controlBox.fileTotalCount",{totalItem:c,totalFolder:d,textItem:x,textFolder:u}))}t.$massFileWrapperSize.html(r("controlBox.massFileInfo",{totalItemSize:a,totalItemSizeInfo:s,totalItemCount:c,totalItemFolderCount:d}));t.controlBox.option.maxMassFileListCount<c?t.$massFileWrapper.show():t.$massFileWrapper.hide(),t.$fileSizeWrapper.html(f);var m={labels:["SELECTED FILESIZE","TOTAL FILESIZE"],datasets:[{data:[o,0===e?1:e-o],backgroundColor:["#44C8FF","#09A3E4"],borderWidth:[0,0]}]};if("undefined"==typeof HTMLCanvasElement);else if(t.controlBox.option.usePlugin){if(0!=o);null!==t.$chartObj?(t.$chartObj.data.datasets[0].data[0]=o,t.$chartObj.data.datasets[0].data[1]=0===e?1:e-o,t.$chartObj.update()):t.$chartObj=new Chart(t.$chartCanvas,{type:"doughnut",data:m,options:{legend:{display:!1},tooltips:{enabled:!1},animation:{animateScale:!1,animateRotate:!0},hover:!1,cutoutPercentage:75}})}},200);var o=this.controlBox.getSelectedFiles(),l=null;e.each(o,function(t,e){l="picture"==e.fileExtType?e:null})},toggleChart:function(){this.controlBox.option.$el.toggleClass("chart-hide")},showCloseGraph:function(){this.$closeGraphBtn.stop().animate({opacity:1},300)},hideCloseGraph:function(){this.$closeGraphBtn.stop().animate({opacity:0},300)},showGraph:function(){if(this.controlBox.option.showGraph){var t=this.controlBox.option.$el;0==this.controlBox.option.showGraphClose&&t.find(".irx-chart-btn-group").hide(),t.removeClass("chart-hide"),this.renderChart()}},hideGraph:function(){var t=this.controlBox.option.$el;t.addClass("chart-hide"),t.removeClass("preview-show")},hideMass:function(){this.controlBox.clearFiles(),this.$massFileWrapper.hide()}})});
innorix("ControlBox/Skin/Basic/ListGrid",function(i){"use strict";var t=i("innoJquery"),e=i("klass"),o=i("util"),n=i("i18n/lang"),s=i("CONSTANT/EVENT");return e({constructor:function(i,t){this.$inner=i,this.$listGrid=i.find(".irx_listGrid"),this.$fileHeader=i.find(".irx-file-header"),this.$fileHeaderCheck=this.$fileHeader.find(".fileheader-checkbox"),this.$fileHeaderRemoveBtn=this.$fileHeader.find(".irx-file-remove-button"),this.$fileHeaderDownloadBtn=this.$fileHeader.find(".irx-file-download-button"),this.controlBox=t,this.lastOdd=!1,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){this.controlBox.on(s.CONTROL_REMOVE_FILES,t.proxy(this.renderRemoveFiles,this)),this.controlBox.on(s.CONTROL_AFTER_ADD_FILES,t.proxy(this.renderAddFiles,this));for(var i in this.controlBox.option.showFuncBtn)"move"==this.controlBox.option.showFuncBtn[i]&&this.controlBox.on(s.CONTROL_AFTER_ADD_FILES,t.proxy(this.sortableList,this));this.controlBox.on(s.CONTROL_REMOVE_FILES,t.proxy(this.updateListGrid,this)),this.controlBox.on(s.CONTROL_AFTER_ADD_FILES,t.proxy(this.updateListGrid,this)),this.controlBox.option.showFileListHeader&&(this.controlBox.on(s.CONTROL_SELECT_ROWS,t.proxy(this.updateFileHeader,this)),this.controlBox.on(s.CONTROL_UNSELECT_ROWS,t.proxy(this.updateFileHeader,this))),this.controlBox.on(s.CONTROL_SORT,t.proxy(this.updateDisplayGrid,this)),this.controlBox.on(s.FILE_PROCESSING_STATE_SHOW,t.proxy(this.renderFileLoadingShow,this)),this.controlBox.on(s.FILE_PROCESSING_STATE_HIDE,t.proxy(this.renderFileLoadingHide,this))},attachEvents:function(){this.$listGrid.off("click"),this.controlBox.option.showFuncBtn.indexOf("remove")>-1&&this.$listGrid.on("click",".irx_remove",t.proxy(this.onRemoveClick,this)),this.controlBox.option.showFolderItemsTree&&this.$listGrid.on("click",".tree-icon.directory",t.proxy(this.toggleFileTree,this)),this.controlBox.option.showFileListHeader&&(this.$fileHeaderCheck.on("click",t.proxy(this.toggleFileHeaderCheck,this)),this.$fileHeaderRemoveBtn.on("click",t.proxy(this.toggleFileHeaderRemoveBtn,this)),this.$fileHeaderDownloadBtn.on("click",t.proxy(this.toggleFileHeaderDownloadBtn,this))),this.controlBox.option.keyboardDeleteEvent&&t("html").on("keyup",t.proxy(this.onKeyupEvent,this))},renderAddFiles:function(i){this.controlBox.option.showFileListHeader&&(this.controlBox.getFileCount()>0?(t(".irx-file-header-desc").text(n("fileListHeader.label")),t(".irx-file-remove-button").text(n("fileListHeader.removeBtn")),t(".irx-file-download-button").text(n("fileListHeader.downloadBtn")),this.$listGrid.parent().find(".irx_filetree_list").css("position","relative"),this.$listGrid.parent().find(".irx_filetree_list").css("top","30px"),this.$listGrid.parent().find(".irx_filetree_list").css("height",parseInt(this.controlBox.option.height)-30+"px"),this.$fileHeader.css("width",parseInt(this.controlBox.option.width)-11+"px"),this.$fileHeader.css("position","absolute"),this.$fileHeader.show()):this.$fileHeader.hide());var e=this,s="",r=this.controlBox.option.folderIntact;this.controlBox.option.maxMassFileListCount>=this.controlBox.getFileCount()&&t.each(i,function(i,t){if(0==t.thumbnail){var n=t.printFileName;t.description&&(n+=" "+t.description);var l=o.string.getFileExt(t.printFileName).toLowerCase();0!=t.isFile&&1!=t.isVirtual||(l="directory");var a="";if(t.fileSize)if(1==e.controlBox.option.showByteSize)var a="("+o.string.formatMoney(t.fileSize)+" Byte)";else var a="("+o.string.humanFileSize(t.fileSize)+")";var d="";if(1==r)var d=t.rootName;var h=e.getRootObj(d),c=!1;t.isRemove&&(c=t.isRemove);t.isFile,s='<li id="'+t.id+'" class="irx-file-wrapper is-file '+(c?"is-removed":"")+'" title=""><div class="irx-file-inner-wrapper" title="'+n+'" data-fileId="'+t.id+'">',1==e.controlBox.option.showSelectBox&&(s+=' <div class="tree-icon filetree-checkbox"></div>'),s+=' <div class="tree-icon file-icon ext_'+l+'"></div> <div class="filename">'+n+'</div> <div class="filesize">'+(c?"(file not found)":a)+"</div>";var p=!1,x=!1;for(var f in e.controlBox.option.showFuncBtn)"move"==e.controlBox.option.showFuncBtn[f]?p=!0:"remove"==e.controlBox.option.showFuncBtn[f]&&(x=!0);1!=p&&1!=x||(1==p&&1==x?s+=' <div class="btn-group"> <span class="irx_btn_move" tabindex="1">&nbsp;</span> <span class="irx_btn_del irx_remove" tabindex="1">&nbsp;</span> </div>':1==x?s+=' <div class="btn-group"> <span class="irx_btn_del irx_remove" tabindex="1">&nbsp;</span> </div>':1==p&&(s+=' <div class="btn-group"> <span class="irx_btn_move" style=\'margin-left: -30px\' tabindex="1">&nbsp;</span> </div>')),s+="</div></li>",h.append(s)}}),this.updateListGrid(),this.controlBox.option.showFolderItems&&this.showAllFolderItems(),this.controlBox.option.transferWindowMode&&this.controlBox.download(),this.controlBox.option.transferWindowModeOpen&&this.controlBox.downloadAndOpen(),"asc"==this.controlBox.option.autoSortFile&&this.controlBox.sortName("asc"),"desc"==this.controlBox.option.autoSortFile&&this.controlBox.sortName("desc")},updateDisplayGrid:function(i){this.controlBox.option.showFileListHeader&&(this.controlBox.getFileCount()>0?(t(".irx-file-header-desc").text(n("fileListHeader.label")),t(".irx-file-remove-button").text(n("fileListHeader.removeBtn")),t(".irx-file-download-button").text(n("fileListHeader.downloadBtn")),this.$listGrid.parent().find(".irx_filetree_list").css("position","relative"),this.$listGrid.parent().find(".irx_filetree_list").css("top","30px"),this.$listGrid.parent().find(".irx_filetree_list").css("height",parseInt(this.controlBox.option.height)-30+"px"),this.$fileHeader.css("width",parseInt(this.controlBox.option.width)-11+"px"),this.$fileHeader.css("position","absolute"),this.$fileHeader.show()):this.$fileHeader.hide());var e=this,s="";e.controlBox.option.$el.find("ul.irx_filetree_list").html("");var r=this.controlBox.option.folderIntact;this.controlBox.option.maxMassFileListCount>=this.controlBox.getFileCount()&&t.each(i,function(i,t){if(0==t.thumbnail){var n=t.printFileName;t.description&&(n+=" "+t.description);var l=o.string.getFileExt(t.printFileName).toLowerCase();0!=t.isFile&&1!=t.isVirtual||(l="directory");var a="";if(t.fileSize)if(1==e.controlBox.option.showByteSize)var a="("+o.string.formatMoney(t.fileSize)+" Byte)";else var a="("+o.string.humanFileSize(t.fileSize)+")";var d="";if(1==r)var d=t.rootName;var h=e.getRootObj(d),c=!1;t.isRemove&&(c=t.isRemove);t.isFile,s='<li id="'+t.id+'" class="irx-file-wrapper is-file '+(c?"is-removed":"")+'" title=""><div class="irx-file-inner-wrapper" data-fileId="'+t.id+'">',1==e.controlBox.option.showSelectBox&&(s+=' <div class="tree-icon filetree-checkbox"></div>'),s+=' <div class="tree-icon file-icon ext_'+l+'"></div> <div class="filename">'+n+'</div> <div class="filesize">'+(c?"(file not found)":a)+"</div>";var p=!1,x=!1;for(var f in e.controlBox.option.showFuncBtn)"move"==e.controlBox.option.showFuncBtn[f]?p=!0:"remove"==e.controlBox.option.showFuncBtn[f]&&(x=!0);1!=p&&1!=x||(1==p&&1==x?s+=' <div class="btn-group"> <span class="irx_btn_move" tabindex="1">&nbsp;</span> <span class="irx_btn_del irx_remove" tabindex="1">&nbsp;</span> </div>':1==x?s+=' <div class="btn-group"> <span class="irx_btn_del irx_remove" tabindex="1">&nbsp;</span> </div>':1==p&&(s+=' <div class="btn-group"> <span class="irx_btn_move" style=\'margin-left: -30px\' tabindex="1">&nbsp;</span> </div>')),s+="</div></li>",h.append(s)}}),this.updateListGrid(),this.controlBox.option.showFolderItems&&this.showAllFolderItems(),this.controlBox.option.transferWindowMode&&this.controlBox.download(),this.controlBox.option.transferWindowModeOpen&&this.controlBox.downloadAndOpen()},sortableList:function(){var i=this.controlBox.view.$el.find(".irx_filetree").find("ul");this.controlBox.option.usePlugin&&t(i).sortable({connectWith:i,axis:"y",stop:t.proxy(this.sortableStop,this),sort:function(){}})},sortableStop:function(){this.updateFileIndex(),this.updateListGrid()},updateFileIndex:function(){var i,e=t(this.controlBox.fileList.files),o=this.$listGrid.find("li"),n=[];o.each(function(o,s){i=s.id,e.each(function(e,o){i===o.id&&(o.rootName=t("#"+i).closest("ul").attr("data-root"),n.push(o))})}),this.controlBox.fileList.files=n},renderClearFiles:function(){this.$listGrid.empty()},renderRemoveFiles:function(i){if(0===this.controlBox.getFileCount())return void this.renderClearFiles();var e=this.$listGrid;i.reverse(),t.each(i,function(i,t){e.find("#"+t.id).remove(),t.rootName&&0==e.find('.irx_filetree_list[data-root="'+t.rootName+'"]').find("li").length&&e.find('.irx_filetree_list[data-root="'+t.rootName+'"]').parent().remove()})},onRemoveClick:function(i){if(i.stopPropagation(),0==this.controlBox.getControlDisabledState()){var e=this,o=t(i.currentTarget).closest("li");if(o.hasClass("is-directory")){o.find(".irx-file-wrapper.is-file").each(function(){var i=t(this).attr("id");e.controlBox.removeFileById(i)});o.find("ul").eq(0).attr("data-root").split("/");o.remove()}else{var n=o.attr("id");e.controlBox.removeFileById(n)}}},updateFileHeader:function(){for(var i=!1,t=this.controlBox.getSelectedFiles(),e=0;e<t.length;e++){"upload"==t[e].mode&&(i=!0)}i?(this.$fileHeaderRemoveBtn.parent().css("float","none"),this.$fileHeaderDownloadBtn.parent().hide()):0==t.length?(this.$fileHeaderRemoveBtn.parent().css("float","none"),this.$fileHeaderDownloadBtn.parent().hide()):(this.$fileHeaderRemoveBtn.parent().css("float","left"),this.$fileHeaderDownloadBtn.parent().show())},updateListGrid:function(){var i=this;this.controlBox.option.showFileListHeader&&(0==i.controlBox.getFileCount()&&i.$fileHeader.hide(),setTimeout(function(){},100)),0==this.$listGrid.find("li.irx-file-wrapper").length?"download"==this.controlBox.option.transferMode?(this.$listGrid.parent().addClass("empty-downloader"),this.$listGrid.parent().find(".irx-empty-download-text").text(this.controlBox.option.emptyDownloadFileText),this.$listGrid.parent().find(".irx-empty-download-text").show()):(this.$listGrid.parent().find(".irx-empty-download-text").hide(),this.$listGrid.parent().removeClass("empty-downloader"),this.$listGrid.parent().addClass("empty-uploader")):"download"==this.controlBox.option.transferMode?(this.$listGrid.parent().removeClass("empty-downloader"),this.$listGrid.parent().find(".irx-empty-download-text").hide()):(this.$listGrid.parent().removeClass("empty-downloader"),this.$listGrid.parent().find(".irx-empty-download-text").hide(),this.$listGrid.parent().removeClass("empty-uploader"));var e=this.controlBox.view.$el.parents().length;this.$listGrid.find("li.irx-file-wrapper").each(function(){var i=t(this).parents().length-e-3,o=t(this).find(".irx-file-inner-wrapper").eq(0);i>0?o.css({"padding-left":10*i+"px"}):o.css({"padding-left":"0px"})}),i.controlBox.hideFileLoading()},getRootObj:function(i){var e=this;if(!i||0==i.length)return this.$listGrid;i=i.split("/");for(var o=this.$listGrid,n="",s=0;s<i.length;s++){var r=!1;e.controlBox.option.$el.find("ul.irx_filetree_list").each(function(){n+i[s]==t(this).attr("data-root")&&(r=!0,o=t(this))}),0==r&&(o=e.addRootObj(i[s],o,n+i[s])),n=n+i[s]+"/"}return o},addRootObj:function(i,e,o){var n=this,s=t('<li class="irx-file-wrapper is-directory" title="fileURI">');0==o.length&&(o="");var r='<div class="irx-file-inner-wrapper">';1==n.controlBox.option.showSelectBox&&(r+=' <div class="tree-icon filetree-checkbox"></div>'),r+=' <div class="tree-icon directory"></div>',r+=' <div class="filename">'+i+"</div>",r+=' <div class="filesize"></div>';var l=!1,a=!1;for(var d in n.controlBox.option.showFuncBtn)"move"==n.controlBox.option.showFuncBtn[d]?l=!0:"remove"==n.controlBox.option.showFuncBtn[d]&&(a=!0);return 1!=l&&1!=a||(1==l&&1==a?r+=' <div class="btn-group"> <span class="irx_btn_move" tabindex="1">&nbsp;</span> <span class="irx_btn_del irx_remove" tabindex="1">&nbsp;</span> </div>':1==a?r+=' <div class="btn-group"> <span class="irx_btn_del irx_remove" tabindex="1">&nbsp;</span> </div>':1==l&&(r+=' <div class="btn-group"> <span class="irx_btn_move" style=\'margin-left: -30px\' tabindex="1">&nbsp;</span> </div>')),r+="</div>",r+='<ul class="irx_filetree_list irx_listGrid" style="display: none;" data-root="'+o+'">',r+="</ul>",s.append(r).appendTo(e),s.find("ul.irx_filetree_list").eq(0)},toggleFileTree:function(i){if(0==this.controlBox.getControlDisabledState()){var e=t(i.target),o=e.closest("li.irx-file-wrapper");e.hasClass("open")?(e.removeClass("open"),o.find("ul.irx_filetree_list").eq(0).hide()):(e.addClass("open"),o.find("ul.irx_filetree_list").eq(0).show())}return!1},toggleFileHeaderRemoveBtn:function(i,t){this.controlBox.removeSelectedFiles()},toggleFileHeaderDownloadBtn:function(i,t){this.controlBox.downloadSelectedFiles()},toggleFileHeaderCheck:function(i,e){return t(i.target).hasClass("active")?(t(i.target).removeClass("active"),this.controlBox.unselectAllFiles()):(t(i.target).addClass("active"),this.controlBox.selectAllFiles()),!1},showAllFolderItems:function(){return this.$listGrid.find(".directory").each(function(){var i=t(this),e=i.closest("li.irx-file-wrapper");i.hasClass("open")||(i.addClass("open"),e.find("ul.irx_filetree_list").eq(0).show())}),!1},onKeyupEvent:function(i){46==i.keyCode&&this.controlBox.removeSelectedFiles()},renderFileLoadingShow:function(){},renderFileLoadingHide:function(){}})});
innorix("ControlBox/Skin/Basic/Loading",function(n){"use strict";var i=n("innoJquery"),t=n("klass"),o=n("singleton/agent"),e=n("CONSTANT/EVENT"),r=["openFileDialog"];return t({constructor:function(n){this.$loading=n.children(".irx_loading"),this.commandStackCount=0,this.listenAgent()},listenAgent:function(){var n=o.event;n.on(e.AGENT_ADD_COMMAND,i.proxy(this.renderShow,this)),n.on(e.AGENT_COMPLETE_COMMAND,i.proxy(this.renderHide,this))},renderShow:function(n){-1!==r.indexOf(n.action)&&0==this.commandStackCount++&&this.$loading.show()},renderHide:function(n){-1!==r.indexOf(n.action)&&0==--this.commandStackCount&&this.$loading.hide()}})});
innorix("ControlBox/Skin/Basic/RowSelection",function(i){"use strict";var e=i("innoJquery"),t=i("klass"),r=i("util"),n=i("CONSTANT/ENV"),o=i("CONSTANT/EVENT");return t({constructor:function(i,e){this.$inner=i,this.$listGrid=i.find(".irx_listGrid"),this.controlBox=e,this.lastSelectedIndex=!1,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){this.controlBox.on(o.CONTROL_SELECT_ROWS,e.proxy(this.renderSelectRows,this)),this.controlBox.on(o.CONTROL_UNSELECT_ROWS,e.proxy(this.renderUnSelectRows,this))},renderSelectRows:function(i){var t=this,o=this.$listGrid,s=null;e.each(i,function(i,e){null!=s||"picture"!=e.fileExtType&&"pdf"!=e.fileExtType||(s=e),o.find("#"+e.id).addClass("selected").find(":checkbox").prop("checked",!0)});var l=this.controlBox.getSelectedFiles();if(e.each(l,function(i,e){null!=s||"picture"!=e.fileExtType&&"pdf"!=e.fileExtType||(s=e)}),s){if("picture"==s.fileExtType&&this.controlBox.option.showPreviewImage){var c=r.string.humanFileSizeObject(s.fileSize);c=c.number.toFixed(2)+c.unit,c=c.replace(/\.00([^\d])/g,"$1");var a="";if(s.thumbnailUrl){var h=n.AGENT_HTTP_URL;"https:"==window.location.protocol&&(h=n.AGENT_HTTPS_URL),a=h+s.thumbnailUrl,this.$inner.find(".irx-preview-image").attr("src",h+s.thumbnailUrl)}else a=s.downloadUrl?s.downloadUrl:URL.createObjectURL(s.file);if(a){if(this.controlBox.option.setPreviewDiv){if(e.isArray(this.controlBox.option.setPreviewDiv)){var d=this.controlBox.option.setPreviewDiv[0],p=this.controlBox.option.setPreviewDiv[1],v=this.controlBox.option.setPreviewDiv[2];e("#"+d).css({width:p+"px",height:v+"px"}),e("#"+d).html('<img crossorigin="anonymous" src="'+a+'" style="object-fit: contain; width: 100%; height: 100%" />')}}else this.$inner.find(".irx-preview-image").attr("src",a),this.$inner.find(".irx-preview-file-size").text(c),this.$inner.find(".irx-preview-image").show(),this.$inner.find(".irx-preview-pdf").hide(),this.$inner.parent().addClass("preview-show");this.$inner.find(".irx-preview-file-name").text(s.printFileName)}}else if("pdf"==s.fileExtType&&this.controlBox.option.showPreviewPdf){var c=r.string.humanFileSizeObject(s.fileSize);c=c.number.toFixed(2)+c.unit,c=c.replace(/\.00([^\d])/g,"$1");var f="";if(s.thumbnailUrl){var h=n.AGENT_HTTP_URL;"https:"==window.location.protocol&&(h=n.AGENT_HTTPS_URL),f=h+s.thumbnailUrl}else s.downloadUrl?f=s.downloadUrl:s.file&&(f=URL.createObjectURL(s.file));if(f){var x="";if(this.controlBox.option.setPreviewDiv){if(e.isArray(this.controlBox.option.setPreviewDiv)){var d=this.controlBox.option.setPreviewDiv[0],p=this.controlBox.option.setPreviewDiv[1],v=this.controlBox.option.setPreviewDiv[2];e("#"+d).css({width:p+"px",height:v+"px"}),e("#"+d).html('<canvas crossorigin="anonymous" style="object-fit: contain; width: 100%; height: 100%" ></canvas>'),x=d}}else this.$inner.find(".irx-preview-file-size").text(c),this.$inner.find(".irx-preview-image").hide(),this.$inner.find(".irx-preview-pdf").show(),this.$inner.parent().addClass("preview-show");this.$inner.find(".irx-preview-file-name").text(s.printFileName);var w=pdfjsLib.getDocument(f);w.promise.then(function(i){i.getPage(1).then(function(i){var r=i.getViewport({scale:1.5});if(x)var n=e("#"+d).find("canvas")[0];else var n=t.$inner.find(".irx-preview-pdf")[0];var o=n.getContext("2d");n.height=r.height,n.width=r.width;var s={canvasContext:o,viewport:r};i.render(s).promise.then(function(){})})})}}else if(this.$inner.find(".irx-preview-image").attr("src",""),this.$inner.find(".irx-preview-pdf").attr("src",""),this.$inner.parent().removeClass("preview-show"),this.controlBox.option.setPreviewDiv&&e.isArray(this.controlBox.option.setPreviewDiv)){var d=this.controlBox.option.setPreviewDiv[0];e("#"+d).css({width:"0px",height:"0px"}),e("#"+d).html("")}}else if(this.$inner.find(".irx-preview-image").attr("src",""),this.$inner.find(".irx-preview-pdf").attr("src",""),this.$inner.parent().removeClass("preview-show"),this.controlBox.option.setPreviewDiv&&e.isArray(this.controlBox.option.setPreviewDiv)){var d=this.controlBox.option.setPreviewDiv[0];e("#"+d).css({width:"0px",height:"0px"}),e("#"+d).html("")}},renderUnSelectRows:function(i){var t=this.$listGrid,r=this;e.each(i,function(i,n){if(r.$inner.find(".irx-preview-file-name").text()==n.printFileName&&(r.$inner.find(".irx-preview-image").attr("src",""),r.$inner.parent().removeClass("preview-show"),r.controlBox.option.setPreviewDiv&&e.isArray(r.controlBox.option.setPreviewDiv))){var o=r.controlBox.option.setPreviewDiv[0];e("#"+o).css({width:"0px",height:"0px"}),e("#"+o).html("")}t.find("#"+n.id).removeClass("selected").find(":checkbox").prop("checked",!1)})},attachEvents:function(){this.$listGrid.on("click dblclick contextmenu","li > div",e.proxy(this.onRowClick,this))},onRowClick:function(i){if(0==this.controlBox.getControlDisabledState()){var t=this,r=e(i.currentTarget).closest("li");r.removeClass("dblClick");var n=r.hasClass("is-directory"),s=r.index(),l=r.hasClass("selected");if(l&&"contextmenu"==i.originalEvent.type)return!0;if(n)l?r.removeClass("selected"):r.addClass("selected"),r.find(".irx-file-wrapper.is-file").each(function(){var i=e(this).attr("id");l?t.unSelectRow(i):t.selectRow(i)});else{var c=r.attr("id"),a=this.controlBox.getFileById(c);"dblclick"==i.originalEvent.type&&(this.controlBox.emit(o.CONTROL_DBL_CLICK_ROWS,a),r.addClass("dblClick")),a.selected?setTimeout(function(){r.hasClass("dblClick")||t.unSelectRow(c)},175):t.selectRow(c)}this.lastSelectedIndex=s,this.updateDirectorySelect()}},selectMultipleRows:function(i,t,r){i>t&&(t=[i,i=t][0]);var n=this.controlBox.getAllFiles().slice(i,t+1),o=e.map(n,function(i){return i.id});r||this.controlBox.unSelectFilesById(),this.controlBox.addSelectFilesById(o)},selectRow:function(i){this.controlBox.addSelectFilesById([i])},unSelectRow:function(i){this.controlBox.unSelectFilesById([i])},updateDirectorySelect:function(){this.$listGrid.find(".irx-file-wrapper.is-directory").each(function(){var i=!0;0==e(this).find(".irx-file-wrapper.is-file").length&&(i=!1),e(this).find(".irx-file-wrapper.is-file").each(function(){e(this).hasClass("selected")||(i=!1)}),i?e(this).addClass("selected"):e(this).removeClass("selected")})}})});
innorix("ControlBox/Skin/Basic/template",function(i){"use strict";var e=(i("innoJquery"),i("i18n/lang"));return{controlBox:'<div style="display: none;" class="circle_loading_wrapper"><div class="circle_loading"></div></div><div class="irx_filetree empty-uploader"><div style=\'display:none;\' class="irx-empty-download-text">There is no download file here.</div><div class="irx-file-header" > <div class="tree-icon fileheader-checkbox"></div> <div class="irx-file-header-desc">Selected Files</div> <div class="irx-file-remove-button-wrapper"><button class="irx-file-remove-button">Remove</button></div> <div class="irx-file-download-button-wrapper"><button class="irx-file-download-button">Download</button></div></div><ul class="irx_filetree_list irx_listGrid" data-filetree=""></ul></div><div class="irx_infoBox "><div class="irx-chart-wrapper"><div class="irx-chart-btn-group"><div class="irx_btn_del irx-chart-toggle"></div></div><div class="irx-canvas-wrapper"><canvas class="irx-chart-canvas"></canvas></div><div class="irx-chart-file-size"></div><div class="irx-chart-file-count"></div></div><div class="irx-preview-wrapper"> <div class="irx-chart-btn-group"><div class="irx_btn_del irx-chart-toggle"></div></div> <div class="irx-preview-element"> <img src="" class="irx-preview-image"> <canvas id="irx-preview-pdf" class="irx-preview-pdf"></canvas> </div> <div class="irx-preview-file-name"></div> <div class="irx-preview-file-size"></div></div><div class="irx-mass-wrapper"><div class="irx-mass-file-title"></div><div class="irx-mass-file-size"></div><div class="irx-mass-file-content"></div><div class="irx-chart-btn-group"><div class="irx-mass-toggle">&times;</div></div><div class="irx-mass-wrapper-paper-image"></div></div></div>',contextMenu:'<div class="__irx context-menu-layer" style="display:none;"></div><ul class="__irx context-menu-list context-menu-root innorix" style="display:none; text-align: left;"><li class="context-menu-item action-openFileDialog" data-action="openFileDialog">'+e("context.addFile")+'</li><li class="context-menu-item action-upload" data-action="upload">'+e("context.upload")+'</li><li class="context-menu-item action-downloadSelectedFiles" data-action="downloadSelectedFiles">'+e("context.downloadSelect")+'</li><li class="context-menu-item action-download" data-action="download">'+e("context.download")+'</li><li class="context-menu-item action-downloadAndOpen" data-action="downloadAndOpen">'+e("context.downloadAndOpen")+'</li><li class="context-menu-item action-removeSelectedFiles" data-action="removeSelectedFiles">'+e("context.removeSelect")+'</li><li class="context-menu-item action-clearFiles" data-action="clearFiles">'+e("context.removeAll")+"</li></ul>"}});
innorix("ControlBox/Skin/Basic/View",function(i){"use strict";var t,n=i("innoJquery"),e=i("klass"),o=i("ControlBox/Skin/View"),s=i("ControlBox/Skin/Basic/Dropzone"),l=i("ControlBox/Skin/Basic/ListGrid"),d=i("ControlBox/Skin/Basic/InfoBox"),a=i("ControlBox/Skin/Basic/Empty"),h=i("ControlBox/Skin/Basic/RowSelection"),c=i("ControlBox/Skin/Basic/Loading");return e([o],{constructor:function(e,r){t=i("ControlBox/Skin/Basic/template"),o.call(this,e,r),this.controlBox=r,this.$el=e,this.$inner=n(t.controlBox).appendTo(e),this.$contenxtMenu=n(t.contextMenu).appendTo(e),this.$first=this.$inner.children(".irx_first"),this.$contents=this.$inner.children(".irx_contents"),this.dropzone=new s(this.$inner,r),this.listGrid=new l(this.$inner,r),this.infoBox=new d(this.$inner,r),this.empty=new a(this.$inner,r),this.rowSelection=new h(this.$inner,r),this.loading=new c(this.$inner,r),this.addThemeIfExist(),this.controlBox.option.useContextMenu&&this.contextMenuEvent(r)},contextMenuEvent:function(){var i=this;i.menuLayer=i.$el.find(".__irx.context-menu-layer"),i.menuList=i.$el.find(".__irx.context-menu-list"),i.$el.on("contextmenu",function(t){i.showContextMenu(t)}),i.menuList.on("contextmenu",function(i){i.preventDefault()}),i.menuList.find("li").on("click contextmenu",function(t){i.hideContextMenu(t);var e=n(this).attr("data-action");i.controlBox[e]()}),i.menuLayer.on("click",function(t){i.hideContextMenu(t)}),n(window).scroll(function(t){i.hideContextMenu(t)})},showContextMenu:function(i){if(i.preventDefault(),0==this.controlBox.getControlDisabledState()){var t=this,e=t.controlBox,o=e.option.transferMode,s={total:0,select:0,upload:0,uploadSelect:0,download:0,downloadSelect:0},l=e.getAllFiles();for(var d in l)l.hasOwnProperty(d)&&(s.total++,1==l[d].selected&&s.select++,"upload"==l[d].mode&&(s.upload++,1==l[d].selected&&s.uploadSelect++),"download"==l[d].mode&&(s.download++,1==l[d].selected&&s.downloadSelect++));if(this.menuList.find("li").hide(),"upload"==o)this.menuList.find("li.action-openFileDialog").show(),s.total>0&&(this.menuList.find("li.action-upload").show(),this.menuList.find("li.action-clearFiles").show()),s.select>0&&this.menuList.find("li.action-removeSelectedFiles").show();else if("download"==o){if(0==s.total)return!1;this.menuList.find("li.action-download").show(),this.menuList.find("li.action-clearFiles").show(),s.select>0&&(this.menuList.find("li.action-downloadSelectedFiles").show(),this.menuList.find("li.action-downloadAndOpen").show(),this.menuList.find("li.action-removeSelectedFiles").show())}else this.menuList.find("li.action-openFileDialog").show(),s.total>0&&this.menuList.find("li.action-clearFiles").show(),s.select>0&&this.menuList.find("li.action-removeSelectedFiles").show(),s.upload>0&&this.menuList.find("li.action-upload").show(),s.download>0&&this.menuList.find("li.action-download").show(),s.downloadSelect>0&&(this.menuList.find("li.action-downloadSelectedFiles").show(),this.menuList.find("li.action-downloadAndOpen").show());var a=i.clientY,h=i.pageX;if(this.controlBox.option.limitContextMenu){this.menuList.css("position","absolute");var a=i.pageY-n(this.$el).offset().top}var c=this.menuList.width();h+c+50>n(window).width()&&(h-=c),this.menuList.css({top:a+"px",left:h+"px"}),this.menuLayer.show(),this.menuList.show()}},hideContextMenu:function(i){i.preventDefault(),this.menuLayer.hide(),this.menuList.hide()},addThemeIfExist:function(){var i=this.controlBox.option.skinTheme;i&&this.$el.addClass("irx_theme_"+i)},defaultSize:{width:550,height:200},skinName:"basic"})});
innorix("ControlBox/Skin/Compact/Dropzone",function(o){"use strict";var t=o("innoJquery"),n=o("klass"),e=o("util"),i=o("CONSTANT/EVENT");return n({constructor:function(o,t){this.$inner=o,this.controlBox=t,this.lastDropId="",this.dropzone=this.$inner.parent(),this.attachEvents(),this.listenControlBox()},attachEvents:function(){this.dropzone.on("dragenter",t.proxy(this.onDragEnter,this)),this.dropzone.on("drop",t.proxy(this.onDrop,this)),this.dropzone.on("dragover",t.proxy(this.onDrop,this))},listenControlBox:function(){this.controlBox.on(i.DROPZONE_SHOW,t.proxy(this.renderShow,this)),this.controlBox.on(i.DROPZONE_HIDE,t.proxy(this.renderHide,this)),this.controlBox.on(i.DROPZONE_STATE_SHOW,t.proxy(this.renderLoadingShow,this)),this.controlBox.on(i.DROPZONE_STATE_HIDE,t.proxy(this.renderLoadingHide,this)),this.controlBox.on(i.FILE_PROCESSING_STATE_SHOW,t.proxy(this.renderFileLoadingShow,this)),this.controlBox.on(i.FILE_PROCESSING_STATE_HIDE,t.proxy(this.renderFileLoadingHide,this)),this.controlBox.on(i.CONTROL_DESTROY,t.proxy(this.resetEvent,this))},resetEvent:function(o){this.controlBox.off(i.DROPZONE_SHOW,t.proxy(this.renderShow,this)),this.controlBox.off(i.DROPZONE_HIDE,t.proxy(this.renderHide,this)),this.controlBox.off(i.DROPZONE_STATE_SHOW,t.proxy(this.renderLoadingShow,this)),this.controlBox.off(i.DROPZONE_STATE_HIDE,t.proxy(this.renderLoadingHide,this)),this.controlBox.off(i.FILE_PROCESSING_STATE_SHOW,t.proxy(this.renderFileLoadingShow,this)),this.controlBox.off(i.FILE_PROCESSING_STATE_HIDE,t.proxy(this.renderFileLoadingHide,this)),this.controlBox.off(i.CONTROL_DESTROY,t.proxy(this.resetEvent,this)),this.dropzone.off("dragenter",t.proxy(this.onDragEnter,this)),this.dropzone.off("drop",t.proxy(this.onDrop,this)),this.dropzone.off("dragover",t.proxy(this.onDrop,this))},onDragEnter:function(o){var t=e.getBoundingScreenRect(o.originalEvent,this.dropzone.get(0),this.controlBox.option),n=e.string.generateUUID();this.lastDropId=n,this.controlBox.showDropState({dropId:n,uuid:n}),navigator.userAgent.toLowerCase().match("chrome")?this.controlBox.showDropZone({x:parseInt(t.left-10),y:parseInt(t.top-10),width:parseInt(t.width+20),height:parseInt(t.height+20),newLeft:parseInt(t.newLeft-10),newTop:parseInt(t.newTop-10),newWidth:parseInt(t.newWidth+20),newHeight:parseInt(t.newHeight+20),availLeft:t.availLeft,availTop:t.availTop,screenX:t.screenX,screenY:t.screenY,screenWidth:t.screenWidth,screenHeight:t.screenHeight,mouseClientX:t.mouseClientX,mouseClientY:t.mouseClientY,mouseScreenX:t.mouseScreenX,mouseScreenY:t.mouseScreenY,zoom:t.zoom,isChrome:t.isChrome,dropId:n,uuid:n,addEmptyDirectory:this.controlBox.option.folderIntact,debug:this.controlBox.option.isDebugDropZone}):this.controlBox.showDropZone({x:parseInt(t.left-10),y:parseInt(t.top-10),width:parseInt(t.width+20),height:parseInt(t.height+20),dropId:n,uuid:n,addEmptyDirectory:this.controlBox.option.folderIntact,debug:this.controlBox.option.isDebugDropZone})},onDrop:function(o){o.preventDefault()},renderShow:function(){this.controlBox.view.$el.addClass("_irx_dragging"),this.$inner.addClass("_irx_dragging")},renderHide:function(){this.controlBox.view.$el.removeClass("_irx_dragging"),this.$inner.removeClass("_irx_dragging")},renderLoadingShow:function(){this.$inner.find(".loading-layout").show()},renderLoadingHide:function(){this.$inner.find(".loading-layout").hide()},renderFileLoadingShow:function(){},renderFileLoadingHide:function(){}})});
innorix("ControlBox/Skin/Compact/Empty",function(t){"use strict";var o=t("innoJquery"),n=t("klass"),i=t("CONSTANT/EVENT");return n({constructor:function(t,o){this.$empty=t.children(".irx_empty"),this.$contents=t.children(".irx_contents"),this.controlBox=o,this.listenControlBox()},listenControlBox:function(){var t=o.proxy(this.render,this);this.controlBox.on(i.CONTROL_AFTER_ADD_FILES,t),this.controlBox.on(i.CONTROL_REMOVE_FILES,t)},render:function(){this.controlBox.getFileCount()>0?(this.$empty.hide(),this.$contents.show()):(this.$empty.show(),this.$contents.hide())}})});
innorix("ControlBox/Skin/Compact/InfoBox",function(e){"use strict";var t=e("innoJquery"),i=e("klass"),o=e("util"),r=e("i18n/lang"),n=e("CONSTANT/ENV"),s=e("CONSTANT/EVENT");return i({constructor:function(e,i){this.$inner=e,this.$infobox=t(e[1]),this.$fileSizeWrapper=e.find(".irx-chart-file-size"),this.$fileCountWrapper=e.find(".irx-chart-file-count"),this.$massFileWrapper=e.find(".irx-mass-wrapper"),this.$massFileWrapperTitle=e.find(".irx-mass-file-title"),this.$massFileWrapperSize=e.find(".irx-mass-file-size"),this.$massFileWrapperCount=e.find(".irx-mass-file-count"),this.$massFileWrapperContent=e.find(".irx-mass-file-content"),this.$chartCanvas=e.find(".irx-chart-canvas"),this.$chartObj=null,this.controlBox=i,this.listenControlBox(),this.attachEvents(),this.hideGraph(),this.controlBox.option.showGraph&&this.showGraph()},listenControlBox:function(){var e=t.proxy(this.renderChart,this);this.controlBox.on(s.CONTROL_AFTER_ADD_FILES,t.proxy(this.renderChart,this)),this.controlBox.on(s.CONTROL_REMOVE_FILES,e),this.controlBox.on(s.CONTROL_SELECT_ROWS,e),this.controlBox.on(s.CONTROL_UNSELECT_ROWS,e)},attachEvents:function(){this.$infobox.on("click",".irx-chart-toggle",t.proxy(this.hideGraph,this)),this.$infobox.on("click",".irx-mass-toggle",t.proxy(this.hideMass,this))},renderChart:function(){var e=this;setTimeout(function(){e.$massFileWrapperTitle.html(r("controlBox.massFileTitle")),e.$massFileWrapperContent.html(r("controlBox.massFileContent"));var t=e.controlBox.getTotalSize(),i=e.controlBox.getSelectSize(),n=o.string.humanFileSizeObject(t),s=n.number.toFixed(2),l=n.unit;n=n.number.toFixed(2)+n.unit;var a=o.string.humanFileSizeObject(i);a=a.number.toFixed(2)+a.unit;var h=e.controlBox.getSelectedFileCount(),c=e.controlBox.getFileCount(),d=e.controlBox.getTotalFolderCount(),p=e.controlBox.getSelectedFolderCount(),f='<div class="selected-file-size">'+a+"</div><br/>";if(f+='<div class="total-file-size"></div>',h>0){f='<div class="selected-file-size">'+a+"</div>",f+='<div class="total-file-size"><div class="topBorder"></div>'+n+"</div>";var x="file",m="folder";p>1&&(m="folders"),h>1&&(x="files"),e.$fileSizeWrapper.addClass("file-select"),e.$fileCountWrapper.html(r("controlBox.fileTotalSelInfo",{totalFolderSelected:p,totalItemSelected:h,textItem:x,textFolder:m}))}else{var x="file",m="folder";d>1&&(m="folders"),c>1&&(x="files"),f='<div class="selected-file-size">'+n+"</div>",e.$fileSizeWrapper.removeClass("file-select"),e.$fileCountWrapper.html(r("controlBox.fileTotalCount",{totalItem:c,totalFolder:d,textItem:x,textFolder:m}))}e.$massFileWrapperSize.html(r("controlBox.massFileInfo",{totalItemSize:s,totalItemSizeInfo:l,totalItemCount:c,totalItemFolderCount:d}));e.controlBox.option.maxMassFileListCount<c?e.$massFileWrapper.show():e.$massFileWrapper.hide(),e.$fileSizeWrapper.html(f);var u={labels:["SELECTED FILESIZE","TOTAL FILESIZE"],datasets:[{data:[i,0===t?1:t-i],backgroundColor:["#44C8FF","#09A3E4"],borderWidth:[0,0]}]};null!==e.$chartObj&&e.$chartObj.destroy(),"undefined"==typeof HTMLCanvasElement||e.controlBox.option.usePlugin&&(e.$chartObj=new Chart(e.$chartCanvas,{type:"doughnut",data:u,options:{legend:{display:!1},tooltips:{enabled:!1},animation:!1,hover:!1,cutoutPercentage:75}}))},200);var i=this.controlBox.getSelectedFiles(),s=null;if(t.each(i,function(e,t){s="picture"==t.fileExtType?t:null}),s&&this.controlBox.option.showPreviewImage)if("picture"==s.fileExtType){var l=o.string.humanFileSizeObject(s.fileSize);if(l=l.number.toFixed(2)+l.unit,l=l.replace(/\.00([^\d])/g,"$1"),this.controlBox.option.agent){var a=n.AGENT_HTTP_URL;"https:"==window.location.protocol&&(a=n.AGENT_HTTPS_URL),this.$inner.find(".irx-preview-image").attr("src",a+s.thumbnailUrl)}else this.$inner.find(".irx-preview-image").attr("src",URL.createObjectURL(s.file));this.$inner.find(".irx-preview-file-name").text(s.printFileName),this.$inner.find(".irx-preview-file-size").text(l),this.$inner.find(".irx-preview-image").show(),this.$inner.parent().addClass("preview-show")}else this.$inner.find(".irx-preview-file-name").text(""),this.$inner.find(".irx-preview-file-size").text(""),this.$inner.find(".irx-preview-image").hide(),this.$inner.parent().addClass("preview-show");else this.$inner.find(".irx-preview-image").attr("src",""),this.$inner.parent().removeClass("preview-show")},toggleChart:function(){this.controlBox.option.$el.toggleClass("chart-hide")},showGraph:function(){if(this.controlBox.option.showGraph){var e=this.controlBox.option.$el;0==this.controlBox.option.showGraphClose&&e.find(".irx-chart-btn-group").hide(),e.removeClass("chart-hide"),this.renderChart()}},hideGraph:function(){var e=this.controlBox.option.$el;e.addClass("chart-hide"),e.removeClass("preview-show")},hideMass:function(){this.controlBox.clearFiles(),this.$massFileWrapper.hide()}})});
innorix("ControlBox/Skin/Compact/ListGrid",function(i){"use strict";var t=i("innoJquery"),o=i("klass"),e=i("util"),r=i("CONSTANT/EVENT");return o({constructor:function(i,t){this.$listGrid=i.find(".irx_listGrid"),this.controlBox=t,this.lastOdd=!1,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){this.controlBox.on(r.CONTROL_REMOVE_FILES,t.proxy(this.renderRemoveFiles,this)),this.controlBox.on(r.CONTROL_AFTER_ADD_FILES,t.proxy(this.renderAddFiles,this));for(var i in this.controlBox.option.showFuncBtn)"move"==this.controlBox.option.showFuncBtn[i]&&this.controlBox.on(r.CONTROL_AFTER_ADD_FILES,t.proxy(this.sortableList,this));this.controlBox.on(r.CONTROL_REMOVE_FILES,t.proxy(this.updateListGrid,this)),this.controlBox.on(r.CONTROL_AFTER_ADD_FILES,t.proxy(this.updateListGrid,this)),this.controlBox.on(r.FILE_PROCESSING_STATE_SHOW,t.proxy(this.renderFileLoadingShow,this)),this.controlBox.on(r.FILE_PROCESSING_STATE_HIDE,t.proxy(this.renderFileLoadingHide,this))},attachEvents:function(){this.$listGrid.off("click"),this.controlBox.option.showFuncBtn.indexOf("remove")>-1&&this.$listGrid.on("click",".irx_remove",t.proxy(this.onRemoveClick,this)),this.controlBox.option.showFolderItemsTree&&this.$listGrid.on("click",".tree-icon.directory",t.proxy(this.toggleFileTree,this))},renderAddFiles:function(i){var o=this,r="",n=this.controlBox.option.folderIntact;this.controlBox.option.maxMassFileListCount>=this.controlBox.getFileCount()&&t.each(i,function(i,t){if(0==t.thumbnail){var s=t.printFileName;t.description&&(s+=" "+t.description);var l=t.filePath?t.filePath:t.printFileName,a=e.string.getFileExt(t.printFileName).toLowerCase();0!=t.isFile&&1!=t.isVirtual||(a="directory");var d="";if(t.fileSize)if(1==o.controlBox.option.showByteSize)var d="("+e.string.formatMoney(t.fileSize)+" Byte)";else var d="("+e.string.humanFileSize(t.fileSize)+")";var c="";if(1==n)var c=t.rootName;var p=o.getRootObj(c),h=!1;t.isRemove&&(h=t.isRemove);t.isFile;var f="display:none;";o.controlBox.option.showTransferFileStatus&&(f=""),r='<li id="'+t.id+'" class="irx-file-wrapper is-file '+(h?"is-removed":"")+'" title="'+l+'"><div class="irx-file-inner-wrapper" title="'+s+'" data-fileId="'+t.id+'"> <div class="tree-icon filetree-checkbox"></div> <div class="tree-icon file-icon ext_'+a+'"></div> <div class="filename">'+s+'</div> <div class="filesize">'+(h?"(file not found)":d)+'</div> <div class="filestatus" style="'+f+'"><span style="color:blue;">Ready</div>';var x=!1,v=!1;for(var u in o.controlBox.option.showFuncBtn)"move"==o.controlBox.option.showFuncBtn[u]?x=!0:"remove"==o.controlBox.option.showFuncBtn[u]&&(v=!0);1!=x&&1!=v||(1==x&&1==v?r+=' <div class="btn-group"> <span class="irx_btn_move" tabindex="1">&nbsp;</span> <span class="irx_btn_del irx_remove" tabindex="1">&nbsp;</span> </div>':1==v?r+=' <div class="btn-group"> <span class="irx_btn_del irx_remove" tabindex="1">&nbsp;</span> </div>':1==x&&(r+=' <div class="btn-group"> <span class="irx_btn_move" style=\'margin-left: -30px\' tabindex="1">&nbsp;</span> </div>')),r+="</div></li>",p.append(r)}}),this.updateListGrid(),this.controlBox.option.showFolderItems&&this.showAllFolderItems(),this.controlBox.option.transferWindowMode&&this.controlBox.download(),this.controlBox.option.transferWindowModeOpen&&this.controlBox.downloadAndOpen()},sortableList:function(){var i=this.controlBox.view.$el.find(".irx_filetree").find("ul");this.controlBox.option.usePlugin&&t(i).sortable({connectWith:i,axis:"y",stop:t.proxy(this.sortableStop,this),sort:function(){}})},sortableStop:function(){this.updateFileIndex(),this.updateListGrid()},updateFileIndex:function(){var i,o=t(this.controlBox.fileList.files),e=this.$listGrid.find("li"),r=[];e.each(function(e,n){i=n.id,o.each(function(o,e){i===e.id&&(e.rootName=t("#"+i).closest("ul").attr("data-root"),r.push(e))})}),this.controlBox.fileList.files=r},renderClearFiles:function(){this.$listGrid.empty()},renderRemoveFiles:function(i){if(0===this.controlBox.getFileCount())return void this.renderClearFiles();var o=this.$listGrid;i.reverse(),t.each(i,function(i,t){o.find("#"+t.id).remove(),t.rootName&&0==o.find('.irx_filetree_list[data-root="'+t.rootName+'"]').find("li").length&&o.find('.irx_filetree_list[data-root="'+t.rootName+'"]').parent().remove()})},onRemoveClick:function(i){if(i.stopPropagation(),0==this.controlBox.getControlDisabledState()){var o=this,e=t(i.currentTarget).closest("li");if(e.hasClass("is-directory")){e.find(".irx-file-wrapper.is-file").each(function(){var i=t(this).attr("id");o.controlBox.removeFileById(i)});e.find("ul").eq(0).attr("data-root").split("/");e.remove()}else{var r=e.attr("id");o.controlBox.removeFileById(r)}}},updateListGrid:function(){var i=this;0==this.$listGrid.find("li.irx-file-wrapper").length?"download"==this.controlBox.option.transferMode?(this.$listGrid.parent().addClass("empty-downloader"),this.$listGrid.parent().find(".irx-empty-download-text").html(this.controlBox.option.emptyDownloadFileText),this.$listGrid.parent().find(".irx-empty-download-text").show()):(this.$listGrid.parent().find(".irx-empty-download-text").hide(),this.$listGrid.parent().removeClass("empty-downloader"),this.$listGrid.parent().addClass("empty-uploader")):"download"==this.controlBox.option.transferMode?(this.$listGrid.parent().removeClass("empty-downloader"),this.$listGrid.parent().find(".irx-empty-download-text").hide()):(this.$listGrid.parent().removeClass("empty-downloader"),this.$listGrid.parent().find(".irx-empty-download-text").hide(),this.$listGrid.parent().removeClass("empty-uploader"));var o=this.controlBox.view.$el.parents().length;this.$listGrid.find("li.irx-file-wrapper").each(function(){var i=t(this).parents().length-o-3,e=t(this).find(".irx-file-inner-wrapper").eq(0);i>0?e.css({"padding-left":10*i+"px"}):e.css({"padding-left":"0px"})});try{i.controlBox.hideFileLoading()}catch(e){}},getRootObj:function(i){var o=this;if(!i||0==i.length)return this.$listGrid;i=i.split("/");for(var e=this.$listGrid,r="",n=0;n<i.length;n++){var s=!1;o.controlBox.option.$el.find("ul.irx_filetree_list").each(function(){r+i[n]==t(this).attr("data-root")&&(s=!0,e=t(this))}),0==s&&(e=o.addRootObj(i[n],e,r+i[n])),r=r+i[n]+"/"}return e},addRootObj:function(i,o,e){var r=t('<li class="irx-file-wrapper is-directory" title="fileURI">');0==e.length&&(e="");var n='<div class="irx-file-inner-wrapper"> <div class="tree-icon filetree-checkbox"></div> <div class="tree-icon directory"></div> <div class="filename">'+i+'</div> <div class="filesize"></div>',s=!1,l=!1;for(var a in self.controlBox.option.showFuncBtn)"move"==self.controlBox.option.showFuncBtn[a]?s=!0:"remove"==self.controlBox.option.showFuncBtn[a]&&(l=!0);return 1!=s&&1!=l||(1==s&&1==l?n+=' <div class="btn-group"> <span class="irx_btn_move" tabindex="1">&nbsp;</span> <span class="irx_btn_del irx_remove" tabindex="1">&nbsp;</span> </div>':1==l?n+=' <div class="btn-group"> <span class="irx_btn_del irx_remove" tabindex="1">&nbsp;</span> </div>':1==s&&(n+=' <div class="btn-group"> <span class="irx_btn_move" style=\'margin-left: -30px\' tabindex="1">&nbsp;</span> </div>')),n+="</div>",n+='<ul class="irx_filetree_list irx_listGrid" style="display: none;" data-root="'+e+'">',n+="</ul>",r.append(n).appendTo(o),r.find("ul.irx_filetree_list").eq(0)},toggleFileTree:function(i){if(0==this.controlBox.getControlDisabledState()){var o=t(i.target),e=o.closest("li.irx-file-wrapper");o.hasClass("open")?(o.removeClass("open"),e.find("ul.irx_filetree_list").eq(0).hide()):(o.addClass("open"),e.find("ul.irx_filetree_list").eq(0).show())}return!1},showAllFolderItems:function(){return this.$listGrid.find(".directory").each(function(){var i=t(this),o=i.closest("li.irx-file-wrapper");i.hasClass("open")||(i.addClass("open"),o.find("ul.irx_filetree_list").eq(0).show())}),!1},renderFileLoadingShow:function(){},renderFileLoadingHide:function(){}})});
innorix("ControlBox/Skin/Compact/Loading",function(n){"use strict";var i=n("innoJquery"),t=n("klass"),o=n("singleton/agent"),e=n("CONSTANT/EVENT"),r=["openFileDialog"];return t({constructor:function(n){this.$loading=n.children(".irx_loading"),this.commandStackCount=0,this.listenAgent()},listenAgent:function(){var n=o.event;n.on(e.AGENT_ADD_COMMAND,i.proxy(this.renderShow,this)),n.on(e.AGENT_COMPLETE_COMMAND,i.proxy(this.renderHide,this))},renderShow:function(n){-1!==r.indexOf(n.action)&&0==this.commandStackCount++&&this.$loading.show()},renderHide:function(n){-1!==r.indexOf(n.action)&&0==--this.commandStackCount&&this.$loading.hide()}})});
innorix("ControlBox/Skin/Compact/RowSelection",function(e){"use strict";var i=e("innoJquery"),t=e("klass"),n=e("CONSTANT/EVENT");return t({constructor:function(e,i){this.$inner=e,this.$listGrid=e.find(".irx_listGrid"),this.controlBox=i,this.lastSelectedIndex=!1,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){this.controlBox.on(n.CONTROL_SELECT_ROWS,i.proxy(this.renderSelectRows,this)),this.controlBox.on(n.CONTROL_UNSELECT_ROWS,i.proxy(this.renderUnSelectRows,this))},renderSelectRows:function(e){var t=this.$listGrid,n=null;if(i.each(e,function(e,i){n="picture"==i.fileExtType?i:null,t.find("#"+i.id).addClass("selected").find(":checkbox").prop("checked",!0)}),n&&this.controlBox.option.showPreviewImage)if("picture"==n.fileExtType){var r=util.string.humanFileSizeObject(n.fileSize);if(r=r.number.toFixed(2)+r.unit,r=r.replace(/\.00([^\d])/g,"$1"),this.controlBox.option.agent){var s=ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(s=ENV.AGENT_HTTPS_URL),this.$inner.find(".irx-preview-image").attr("src",s+n.thumbnailUrl)}else this.$inner.find(".irx-preview-image").attr("src",URL.createObjectURL(n.file));this.$inner.find(".irx-preview-file-name").text(n.printFileName),this.$inner.find(".irx-preview-file-size").text(r),this.$inner.find(".irx-preview-image").show(),this.$inner.parent().addClass("preview-show")}else this.$inner.find(".irx-preview-file-name").text(""),this.$inner.find(".irx-preview-file-size").text(""),this.$inner.find(".irx-preview-image").hide(),this.$inner.parent().addClass("preview-show");else this.$inner.find(".irx-preview-image").attr("src",""),this.$inner.parent().removeClass("preview-show")},renderUnSelectRows:function(e){var t=this.$listGrid,n=this;i.each(e,function(e,i){n.$inner.find(".irx-preview-file-name").text()==i.printFileName&&(n.$inner.find(".irx-preview-image").attr("src",""),n.$inner.parent().removeClass("preview-show")),t.find("#"+i.id).removeClass("selected").find(":checkbox").prop("checked",!1)})},attachEvents:function(){this.$listGrid.on("click dblclick contextmenu","li > div",i.proxy(this.onRowClick,this))},onRowClick:function(e){if(0==this.controlBox.getControlDisabledState()){var t=this,r=i(e.currentTarget).closest("li");r.removeClass("dblClick");var s=r.hasClass("is-directory"),l=r.index(),o=r.hasClass("selected");if(o&&"contextmenu"==e.originalEvent.type)return!0;if(s)o?r.removeClass("selected"):r.addClass("selected"),r.find(".irx-file-wrapper.is-file").each(function(){var e=i(this).attr("id");o?t.unSelectRow(e):t.selectRow(e)});else{var c=r.attr("id"),a=this.controlBox.getFileById(c);"dblclick"==e.originalEvent.type&&(this.controlBox.emit(n.CONTROL_DBL_CLICK_ROWS,a),r.addClass("dblClick")),a.selected?setTimeout(function(){r.hasClass("dblClick")||t.unSelectRow(c)},175):t.selectRow(c)}this.lastSelectedIndex=l,this.updateDirectorySelect()}},selectMultipleRows:function(e,t,n){e>t&&(t=[e,e=t][0]);var r=this.controlBox.getAllFiles().slice(e,t+1),s=i.map(r,function(e){return e.id});n||this.controlBox.unSelectFilesById(),this.controlBox.addSelectFilesById(s)},selectRow:function(e){this.controlBox.addSelectFilesById([e])},unSelectRow:function(e){this.controlBox.unSelectFilesById([e])},updateDirectorySelect:function(){this.$listGrid.find(".irx-file-wrapper.is-directory").each(function(){var e=!0;0==i(this).find(".irx-file-wrapper.is-file").length&&(e=!1),i(this).find(".irx-file-wrapper.is-file").each(function(){i(this).hasClass("selected")||(e=!1)}),e?i(this).addClass("selected"):i(this).removeClass("selected")})}})});
innorix("ControlBox/Skin/Compact/template",function(i){"use strict";var e=(i("innoJquery"),i("i18n/lang"));return{controlBox:'<div style="display: none;" class="circle_loading_wrapper"><div class="circle_loading"></div></div><div class="irx_filetree empty-uploader"><ul class="irx_filetree_list irx_listGrid" data-filetree=""></ul></div><div class="irx_infoBox "><div class="irx-chart-wrapper"><div class="irx-chart-btn-group"><div class="irx_btn_del irx-chart-toggle"></div></div><div class="irx-canvas-wrapper"><canvas class="irx-chart-canvas"></canvas></div><div class="irx-chart-file-size"></div><div class="irx-chart-file-count"></div></div><div class="irx-preview-wrapper"> <div class="irx-chart-btn-group"><div class="irx_btn_del irx-chart-toggle"></div></div> <div class="irx-preview-element"> <img src="" class="irx-preview-image"> </div> <div class="irx-preview-file-name"></div> <div class="irx-preview-file-size"></div></div><div class="irx-mass-wrapper"><div class="irx-mass-file-title"></div><div class="irx-mass-file-size"></div><div class="irx-mass-file-content"></div><div class="irx-chart-btn-group"><div class="irx-mass-toggle">&times;</div></div><div class="irx-mass-wrapper-paper-image"></div></div></div><div class="cust-transfer-window-wrapper"></div></div>',contextMenu:'<div class="__irx context-menu-layer" style="display:none;"></div><ul class="__irx context-menu-list context-menu-root innorix" style="display:none;"><li class="context-menu-item action-openFileDialog" data-action="openFileDialog">'+e("context.addFile")+'</li><li class="context-menu-item action-upload" data-action="upload">'+e("context.upload")+'</li><li class="context-menu-item action-downloadSelectedFiles" data-action="downloadSelectedFiles">'+e("context.downloadSelect")+'</li><li class="context-menu-item action-download" data-action="download">'+e("context.download")+'</li><li class="context-menu-item action-downloadAndOpen" data-action="downloadAndOpen">'+e("context.downloadAndOpen")+'</li><li class="context-menu-item action-removeSelectedFiles" data-action="removeSelectedFiles">'+e("context.removeSelect")+'</li><li class="context-menu-item action-clearFiles" data-action="clearFiles">'+e("context.removeAll")+"</li></ul>"}});
innorix("ControlBox/Skin/Compact/View",function(t){"use strict";var n,i=t("innoJquery"),e=t("klass"),o=t("ControlBox/Skin/View"),s=t("ControlBox/Skin/Compact/Dropzone"),l=t("ControlBox/Skin/Compact/ListGrid"),d=t("ControlBox/Skin/Compact/InfoBox"),a=t("ControlBox/Skin/Compact/Empty"),h=t("ControlBox/Skin/Compact/RowSelection"),c=t("ControlBox/Skin/Compact/Loading");return e([o],{constructor:function(e,r){n=t("ControlBox/Skin/Compact/template"),o.call(this,e,r),this.controlBox=r,this.$el=e,this.$inner=i(n.controlBox).appendTo(e),this.$contenxtMenu=i(n.contextMenu).appendTo(e),this.$first=this.$inner.children(".irx_first"),this.$contents=this.$inner.children(".irx_contents"),this.dropzone=new s(this.$inner,r),this.listGrid=new l(this.$inner,r),this.infoBox=new d(this.$inner,r),this.empty=new a(this.$inner,r),this.rowSelection=new h(this.$inner,r),this.loading=new c(this.$inner,r);this.addThemeIfExist(),this.controlBox.option.useContextMenu&&this.contextMenuEvent(r)},contextMenuEvent:function(){var t=this;t.menuLayer=t.$el.find(".__irx.context-menu-layer"),t.menuList=t.$el.find(".__irx.context-menu-list"),t.$el.on("contextmenu",function(n){t.showContextMenu(n)}),t.menuList.on("contextmenu",function(t){t.preventDefault()}),t.menuList.find("li").on("click contextmenu",function(n){t.hideContextMenu(n);var e=i(this).attr("data-action");t.controlBox[e]()}),t.menuLayer.on("click",function(n){t.hideContextMenu(n)}),i(window).scroll(function(n){t.hideContextMenu(n)})},showContextMenu:function(t){if(t.preventDefault(),0==this.controlBox.getControlDisabledState()){var n=this,e=n.controlBox,o=e.option.transferMode,s={total:0,select:0,upload:0,uploadSelect:0,download:0,downloadSelect:0},l=e.getAllFiles();for(var d in l)l.hasOwnProperty(d)&&(s.total++,1==l[d].selected&&s.select++,"upload"==l[d].mode&&(s.upload++,1==l[d].selected&&s.uploadSelect++),"download"==l[d].mode&&(s.download++,1==l[d].selected&&s.downloadSelect++));if(this.menuList.find("li").hide(),"upload"==o)this.menuList.find("li.action-openFileDialog").show(),s.total>0&&(this.menuList.find("li.action-upload").show(),this.menuList.find("li.action-clearFiles").show()),s.select>0&&this.menuList.find("li.action-removeSelectedFiles").show();else if("download"==o){if(0==s.total)return!1;this.menuList.find("li.action-download").show(),this.menuList.find("li.action-clearFiles").show(),s.select>0&&(this.menuList.find("li.action-downloadSelectedFiles").show(),this.menuList.find("li.action-downloadAndOpen").show(),this.menuList.find("li.action-removeSelectedFiles").show())}else this.menuList.find("li.action-openFileDialog").show(),s.total>0&&this.menuList.find("li.action-clearFiles").show(),s.select>0&&this.menuList.find("li.action-removeSelectedFiles").show(),s.upload>0&&this.menuList.find("li.action-upload").show(),s.download>0&&this.menuList.find("li.action-download").show(),s.downloadSelect>0&&(this.menuList.find("li.action-downloadSelectedFiles").show(),this.menuList.find("li.action-downloadAndOpen").show());var a=t.pageY,h=t.pageX,c=this.menuList.width();h+c+50>i(window).width()&&(h-=c),this.menuList.css({top:a+"px",left:h+"px"}),this.menuLayer.show(),this.menuList.show()}},hideContextMenu:function(t){t.preventDefault(),this.menuLayer.hide(),this.menuList.hide()},addThemeIfExist:function(){var t=this.controlBox.option.skinTheme;t&&this.$el.addClass("irx_theme_"+t)},defaultSize:{width:550,height:300},skinName:"compact"})});
innorix("ControlBox/Skin/Input/Download",function(t){"use strict";var o=t("innoJquery"),n=t("klass"),i=t("util"),r=t("i18n/lang"),e=t("CONSTANT/EVENT");return n({constructor:function(t,o){this.$el=t.find(".irx_download").show(),this.$input=t.find(".irx_download_input"),this.controlBox=o,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){var t=o.proxy(this.render,this);this.controlBox.on(e.CONTROL_REMOVE_FILES,t),this.controlBox.on(e.CONTROL_AFTER_ADD_FILES,t)},attachEvents:function(){this.$el.find(".irx_download_button").click(o.proxy(this.controlBox.downloadAll,this.controlBox))},render:function(){var t=this.controlBox.getDownloadFiles(),o=t.length;if(0===o)return void this.$input.text("");var n,e=t[0],l=i.string.humanFileSize(this.controlBox.getDownloadFilesSize());n=o>1?r("controlBox.input.descriptionMany",{fileName:e.printFileName,size:l,count:o}):r("controlBox.input.descriptionOne",{fileName:e.printFileName,size:l}),this.$input.text(n)}})});
innorix("ControlBox/Skin/Input/template",function(n){"use strict";var a=n("innoJquery");n("i18n/lang");return a.parseHTML('<div class="irx_inner"> <div class="irx_upload"> <span class="irx_upload_input"></span> <input class="irx_upload_button" type="button" value="Upload"> </div> <div class="irx_download"> <span class="irx_download_input"></span> <input class="irx_download_button" type="button" value="Download"> </div></div>')});
innorix("ControlBox/Skin/Input/Upload",function(t){"use strict";var i=t("innoJquery"),o=t("klass"),n=t("util"),r=t("i18n/lang"),l=t("CONSTANT/EVENT");return o({constructor:function(t,i){this.$el=t.find(".irx_upload").show(),this.$input=t.find(".irx_upload_input"),this.controlBox=i,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){var t=i.proxy(this.render,this);this.controlBox.on(l.CONTROL_REMOVE_FILES,t),this.controlBox.on(l.CONTROL_AFTER_ADD_FILES,t)},attachEvents:function(){this.$el.find(".irx_upload_input").click(i.proxy(this.controlBox.openFileDialogInput,this.controlBox)),this.$el.find(".irx_upload_button").click(i.proxy(this.controlBox.uploadInput,this.controlBox))},render:function(){var t=this.controlBox.getUploadFiles(),i=t.length;if(0===i)return void this.$input.text("");var o,l=t[0],e=n.string.humanFileSize(this.controlBox.getUploadFilesSize());o=i>1?r("controlBox.input.descriptionMany",{fileName:l.printFileName,size:e,count:i}):r("controlBox.input.descriptionOne",{fileName:l.printFileName,size:e}),this.$input.text(o)}})});
innorix("ControlBox/Skin/Input/View",function(n){"use strict";var o,t=n("innoJquery"),i=n("klass"),e=n("i18n/lang"),l=n("ControlBox/Skin/View"),a=n("ControlBox/Skin/Input/Upload"),r=n("ControlBox/Skin/Input/Download");return i([l],{constructor:function(i,e){o=n("ControlBox/Skin/Input/template"),l.call(this,i,e),this.$inner=t(o).appendTo(i),"upload"===e.getTransferMode()&&(this.upload=new a(this.$inner,e)),"download"===e.getTransferMode()&&(this.download=new r(this.$inner,e)),"both"===e.getTransferMode()&&(this.upload=new a(this.$inner,e),this.download=new r(this.$inner,e),this.defaultSize.height*=2)},defaultSize:{width:480,height:30},skinName:"input",initLanguage:function(){this.$el.find(".irx_upload_button").val(e("controlBox.input.uploadBtn")),this.$el.find(".irx_download_button").val(e("controlBox.input.downloadBtn"))}})});
!function(e){"use strict";var o=e._load("innoJquery"),n=e._load("api"),r=e._load("server");o.extend(e,n,{server:r}),"function"==typeof define&&define.amd?define(function(){return e}):"object"==typeof module&&module.exports&&(module.exports=e)}(innorix);