|
...
|
...
|
@@ -153,7 +153,6 @@
|
|
153
|
153
|
// assets/dist.java/java/img/icons/quartz/quarz.png
|
|
154
|
154
|
// assets/dist.java/java/img/logo-origin-thin.svg
|
|
155
|
155
|
// assets/dist.java/java/index.html
|
|
156
|
|
-// assets/dist.java/java/libs-0416b4c7.js
|
|
157
|
156
|
// assets/dist.java/java/libs-a7b6e223.js
|
|
158
|
157
|
// assets/dist.java/java/style.css
|
|
159
|
158
|
// DO NOT EDIT!
|
|
...
|
...
|
@@ -3207,99 +3206,6 @@ func javaIndexHtml() (*asset, error) {
|
|
3207
|
3207
|
return a, nil
|
|
3208
|
3208
|
}
|
|
3209
|
3209
|
|
|
3210
|
|
-var _javaLibs0416b4c7Js = []byte(`function aa(e){var t=e.cloneNode;delete e.cloneNode,e.cloneNode=function(e){return e===g&&(e=j),t.call(this,e)}}function ba(e){(e=e.__proto__||e.constructor.prototype)&&e!==Array.prototype&&ca.forEach(function(t){e[t]||(e[t]=Array.prototype[t])})}function v(e,t,n){return da.call(e,t,q.call(arguments,2))}function w(e,t){for(var n=1;n<arguments.length;n++){var i,r=arguments[n];for(i in r)u(r,i)&&!u(e,i)&&(e[i]=r[i])}return e}function x(e,t){if(e==k&&!t)throw new TypeError;return ha&&"string"==typeof e&&e?r.call(e,""):Object(e)}function ja(e){var t=Object.create(DOMException.prototype);throw t.code=DOMException[e],t.message=e+": DOM Exception "+t.code,t}function ka(){return l}function la(e){return e}function Ja(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function Ka(e){try{return e.sentinel2=0,0===Object.getOwnPropertyDescriptor(e,"sentinel2").value}catch(t){}}function _log(e,t){if(_canLog){var n=Array.prototype.slice.apply(arguments,[1]),i=new Date,r=i.getHours()+":"+i.getMinutes()+":"+i.getSeconds()+"."+i.getMilliseconds();n[0]=r+" - "+n[0];try{switch(e){case"info":window.console.info.apply(window.console,n);break;case"warn":window.console.warn.apply(window.console,n);break;default:window.console.log.apply(window.console,n)}}catch(o){window.console||(_canLog=!1)}}}function logMsg(e){Array.prototype.unshift.apply(arguments,["debug"]),_log.apply(this,arguments)}var g=void 0,j=!0,k=null,l=!1,n=window,o,p=Object.prototype,da=Function.prototype.apply,q=Array.prototype.slice,r=String.prototype.split,ea=Array.prototype.splice,s,fa,ga,t=Function.prototype.bind||function(e,t){var n=this,i=q.call(arguments,1);return function(){return da.call(n,e,i.concat(q.call(arguments)))}},u=t.call(Function.prototype.call,p.hasOwnProperty),ha="a"!=Object("a")[0]||!(0 in Object("a")),ia=p.toString,ca="every filter forEach indexOf join lastIndexOf map reduce reduceRight reverse slice some toString".split(" "),y=n.Element&&n.Element.prototype||{},z=t.call(document.__orig__createElement__||document.createElement,document),A=z("p"),B,ma=/\\s+$/g,na=/\\s+/g,C=1,D,oa=/^(\w+)?((?:\.(?:[\w\-]+))+)?$|^#([\w\-]+$)/,pa=/\s*([,>+~ ])\s*/g,qa,E,F,G,I,J,K,ra,sa,ta,ua,L,va,M,N=" \n\f\r \u2028\u2029\ufeff",wa,xa,ya,za,O,Q,Aa,Ba,R,S=n.Date,T,Ca,U,V,W,Da,Ga,X,Y;for(W={},W.names=(W.agent=navigator.userAgent.toLowerCase()).match(/(mozilla|compatible|chrome|webkit|safari|opera|msie|iphone|ipod|ipad)/gi),D=W.names&&W.names.length||0;0<D--;)W[W.names[D]]=j;W.mozilla=W.mozilla&&!W.compatible&&!W.webkit,W.safari=W.safari&&!W.chrome,W.msie=W.msie&&!W.opera,o=W.msie||g,n.browser=W,n.HTMLDocument||(n.HTMLDocument=n.Document),n.Document||(n.Document=n.HTMLDocument),Object.append=w,Object.extend||(Object.extend=function(e,t){for(var n=1;n<arguments.length;n++){var i,r=arguments[n];for(i in r)u(r,i)&&(e[i]=r[i])}return e}),Object.inherit=function(e,t){(e.prototype=Object.create(e.superclass=t.prototype)).constructor=e},Function.prototype.bind||(Function.prototype.bind=function(e,t){function n(){return da.call(i,this instanceof n?this:e,r.concat(q.call(arguments)))}if("function"!=typeof this&&(!o||0!==M.call(this+"").indexOf("function")))throw new TypeError("Function.prototype.bind called on incompatible "+this);var i=this,r=q.call(arguments,1);return i.prototype&&(n.prototype=Object.create(i.prototype)),n});var $="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),Ha=!{toString:k}.propertyIsEnumerable($[0]),Ia=$.length;if(w(Object,{keys:function(e){if("object"!=typeof e&&"function"!=typeof e||e===k)throw new TypeError("Object.keys called on a non-object");var t,n=[];for(t in e)u(e,t)&&n.push(t);if(Ha)for(t=0;Ia>t;t++)u(e,$[t])&&n.push($[t]);return n},getOwnPropertyNames:function(e){return Object.keys(e)},seal:la,freeze:la,preventExtensions:la,isSealed:ka,isFrozen:ka,isExtensible:function(e){if(Object(e)!==e)throw new TypeError;for(var t="";u(e,t);)t+="?";e[t]=j;var n=u(e,t);return delete e[t],n},getPrototypeOf:function(e){return e.__proto__||(e.constructor?e.constructor.prototype:p)},create:function(e,t){var n;if(e===k)n={__proto__:k};else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");n=function(){},n.prototype=e,n=new n,n.__proto__=e}return t&&Object.defineProperties(n,t),n},is:function(e,t){return e===t?0===e?1/e===1/t:j:e!==e&&t!==t},isnt:function(e,t){return!Object.is(e,t)}}),!Object.defineProperty||(ya=Ja({}),za=Ja(A),ya&&za)||(O=Object.defineProperty,Q=Object.defineProperties),(!Object.defineProperty||O)&&(Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||e===k)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof n&&"function"!=typeof n||n===k)throw new TypeError("Property description must be an object: "+n);if(O)try{return O.call(Object,e,t,n)}catch(i){if(-2146823252===i.number){n.enumerable=l;try{return O.call(Object,e,t,n)}catch(r){}}}if(n.value!==g)if(e.__defineGetter__&&(e.__lookupGetter__(t)||e.__lookupSetter__(t))){var o=e.__proto__;e.__proto__=p,delete e[t],e[t]=n.value,e.__proto__=o}else e[t]=n.value;else if(e.__defineGetter__)n.get!==g&&e.__defineGetter__(t,n.get),n.set!==g&&e.__defineSetter__(t,n.set);else{if(!Object.defineProperty.ielt8)throw new TypeError("getters & setters not supported");n.get!==g&&(e["get"+t]=n.get),n.set!==g&&(e["set"+t]=n.set)}return e}),y.ie&&8>o&&(y.ielt8=Object.defineProperty.ielt8=j),(!Object.defineProperties||Q)&&(Object.defineProperties=function(e,t){if(Q)try{return Q.call(Object,e,t)}catch(n){}for(var i in t)u(t,i)&&Object.defineProperty(e,i,t[i]);return e}),!Object.getOwnPropertyDescriptor||(Aa=Ka({}),Ba=Ka(A),Ba&&Aa)||(R=Object.getOwnPropertyDescriptor),(!Object.getOwnPropertyDescriptor||R)&&(Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||e===k)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(R)try{return R.call(Object,e,t)}catch(n){}if(u(e,t)){var i,r,o={enumerable:j,configurable:j};if(e.__defineGetter__){var a=e.__proto__;e.__proto__=p,i=e.__lookupGetter__(t),r=e.__lookupSetter__(t),e.__proto__=a}else Object.defineProperty.ielt8&&(i=e["get"+t],r=e["set"+t]);return i||r?(i&&(o.get=i),r&&(o.set=r),o):(o.value=e[t],o)}}),2!=[1,2].splice(0).length&&(Array.prototype.splice=function(e,t){return e===g&&t===g?[]:ea.apply(this,[e===g?0:e,t===g?this.length-e:t].concat(q.call(arguments,2)))}),ga=function(e){if(e instanceof Array||Array.isArray(e))return e;if(e.k)return e.k();var t,e=x(e,j),n=e.length>>>0;try{t=q.call(e)}catch(i){}if(t&&t.length===n)return t;t=[];for(var r=0;n>r;r++)r in e&&(t[r]=e[r]);return t},w(Array,{isArray:function(e){return"[object Array]"==ia.call(e)},from:ga,of:function(e){return q.call(arguments)}}),w(Array.prototype,{reduce:function(e,t){var n=x(this),i=n.length>>>0,r=0;if(0===i&&arguments.length<=1)throw new TypeError("Array length is 0 and no second argument");for(t===g&&(++r,t=n[0]);i>r;++r)r in n&&(t=v(e,g,t,n[r],r,n));return t},reduceRight:function(e,t){var n=x(this),i=n.length>>>0;if(0===i&&arguments.length<=1)throw new TypeError("Array length is 0 and no second argument");for(--i,t===g&&(--i,t=n[i+1]);i>=0;--i)i in n&&(t=v(e,g,t,n[i],i,n));return t},forEach:function(e,t){for(var n=x(this),i=n.length>>>0,r=-1;++r<i;)r in n&&v(e,t,n[r],r,n)},indexOf:function(e,t){var n=x(this),i=n.length>>>0;if((t=~~t)>i)return-1;for(t=(i+t)%i;i>t&&(!(t in n)||n[t]!==e);t++);return t^i?t:-1},lastIndexOf:function(e,t){var n,i=x(this),r=i.length>>>0;if(!r)return-1;for(n=r-1,t!==g&&(n=Math.min(n,Number.toInteger(t))),n=n>=0?n:r-Math.abs(n);n>=0;n--)if(n in i&&i[n]===e)return n;return-1},every:function(e,t,n){n===g&&(n=j);var i=n;return L(this,function(r,o){i==n&&(i=!!v(e,t,r,o,this))},this),i},some:function(e,t){return va.call(this,e,t,l)},filter:function(e,t){for(var n,i=x(this),r=i.length>>>0,o=[],a=0;r>a;a++)a in i&&(n=i[a],v(e,t,n,a,i)&&o.push(n));return o},map:function(e,t){for(var n=x(this),i=n.length>>>0,r=[],o=0;i>o;o++)o in n&&(r[o]=v(e,t,n[o],o,this));return r},contains:function(e){return!!~this.indexOf(e)}}),!Array.prototype.unique){var La=function(e,t,n){return n.indexOf(e,t+1)<0};Array.prototype.unique=function(){return this.filter(La)}}L=t.call(Function.prototype.call,Array.prototype.forEach),fa=Array.prototype.map,va=Array.prototype.every,String.random||(String.random=function(e){return!e||0>e?"":Array(++e).join(0).replace(/./g,function(){return(0|32*Math.random()).toString(32)})}),(!String.prototype.trim||N.trim())&&(N="["+N+"]",wa=RegExp("^"+N+N+"*"),xa=RegExp(N+N+"*$"),String.prototype.trim=function(){return String(this).replace(wa,"").replace(xa,"")}),M=String.prototype.trim,"0".split(g,0).length&&(String.prototype.split=function(e,t){return e===g&&0===t?[]:r.call(this,e,t)}),s=function(e,t){return!!~this.indexOf(e,t)},w(String.prototype,{repeat:function(e){return Array(++e).join(this+"")},startsWith:function(e,t){return this.lastIndexOf(e,t)===(t||0)},endsWith:function(e,t){return e+="",this.substr(-e.length-(t||0),t)==e},contains:s,toArray:function(){return r.call(this,"")},reverse:function(){return Array.prototype.reverse.call(r.call(this+"","")).join("")}}),w(Number,{isFinite:function(e){return"number"==typeof e&&n.i(e)},isInteger:function(e){return Number.isFinite(e)&&e>=-9007199254740992&&9007199254740992>=e&&Math.floor(e)===e},isNaN:function(e){return Object.is(e,NaN)},toInteger:function(e){return e=+e,Number.isNaN(e)?0:0!==e&&n.i(e)?(0>e?-1:1)*Math.floor(Math.abs(e)):e}}),E=function(e,t){var n=document.createEvent("Events"),t=t||{};return n.initEvent(e,t.bubbles||l,t.cancelable||l),"isTrusted"in n||(n.j=l),n};try{G=Event.prototype,new Event("click")}catch(Ma){n.Event=E,G&&(E.prototype=G)}F=function(e,t){var n,i;try{n=document.createEvent("CustomEvent")}catch(r){n=document.createEvent("Event")}return t=t||{},i=t.detail!==g?t.detail:k,(n.initCustomEvent||(n.detail=i,n.initEvent)).call(n,e,t.bubbles||l,t.cancelable||l,i),"isTrusted"in n||(n.j=l),n};try{I=(n.CustomEvent||Event).prototype,new CustomEvent("magic")}catch(Na){n.CustomEvent=F,(I||G)&&(F.prototype=I||G)}if(G.stopImmediatePropagation||(J=function(e){var t=this.f,n=this.g;if("function"!=typeof t){if(!("handleEvent"in t))return;n=t,t=t.handleEvent}return e.__stopNow?void e.stopPropagation():t.apply(n,arguments)},G.stopImmediatePropagation=function(){this.__stopNow=j}),"addEventListener"in A&&!A.addEventListener.__shim__){D=0;try{B=function(){D++},A.addEventListener("click",B),A.addEventListener("click",B),A.click?A.click():A.dispatchEvent(new E("click"))}catch(Oa){}finally{if(0==D||2==D||J){var Pa=2==D;L([n.HTMLDocument&&n.HTMLDocument.prototype||n.document,n.Window&&n.Window.prototype||n,y],function(e){if(e){var n=e.addEventListener,i=e.removeEventListener;n&&(e.addEventListener=function(e,i,r){var o,a,r=r||l;if(Pa||J){if(a="_e_8vj"+(r?"-":"")+(i.__UUID__||(i.__UUID__=++C))+e,(o=this._)||(o=this._={}),a in o)return;i=J?o[a]=t.call(J,{f:i,g:this}):o[a]=g}return n.call(this,e,i,r)},i&&(e.removeEventListener=function(e,t,n){var r,o,n=n||l;return(Pa||J)&&(r=this._)&&r[o="_e_8vj"+(n?"-":"")+t.__UUID__+e]&&(t=r[o],delete r[o]),i.call(this,e,t,n)}))}})}}}K=function(e,t,n){this.e=e,this.a=t,this.c=n,this.length=0,this.value="",this.b("1")},ra=function(e,t){var n=t||"",i=!!e.length;if(i){for(;e.length>0;)delete e[--e.length];e.value=""}n&&((n=M.call(n))&&r.call(n,na).forEach(sa,e),e.value=t),i&&e.a&&e.a.call(e.c,e.value)},sa=function(e){this[this.length++]=e},w(K.prototype,{b:function(e){var t=this.e.call(this.c);t!=this.value&&ra(this,t),""===e&&ja("SYNTAX_ERR"),s.call(e+""," ")&&ja("INVALID_CHARACTER_ERR")},add:function(e){var t=this.value;this.contains(e)||(this.value=this.value+((t&&!t.match(ma)?" ":"")+e),this[this.length++]=e,this.a&&this.a.call(this.c,this.value))},remove:function(e){this.b(e);var t;for(this.value=this.value.replace(RegExp("((?: +|^)"+e+"(?: +|$))","g"),function(e,t,n,i){return n&&e.length+n<i.length?" ":""}),t=r.call(this.value," "),e=this.length-1;e>0;--e)(this[e]=t[e])||(this.length--,delete this[e]);this.a&&this.a.call(this.c,this.value)},contains:function(e){return this.b(e),s.call(" "+this.value+" "," "+e+" ")},item:function(e){return this.b("1"),this[e]||k},toggle:function(e){var t=thisObj.contains(e);return this[t?"add":"remove"](e),t}}),K.prototype.toString=function(){return this.value||""},ua=function(e){this.className=e},ta=function(){return this.className},n.Utils||(n.Utils={}),n.Utils.Dom||(n.Utils.Dom={}),n.Utils.Dom.DOMStringCollection=K,G.AT_TARGET||(G.AT_TARGET=2,G.BUBBLING_PHASE=3,G.CAPTURING_PHASE=1),Event.AT_TARGET||(Event.AT_TARGET=2,Event.BUBBLING_PHASE=3,Event.CAPTURING_PHASE=1);try{n.getComputedStyle(A)}catch(Qa){n.getComputedStyle=t(function(e,t){return this.call(n,e,t||k)},n.getComputedStyle)}if("classList"in A||Object.defineProperty(y,"classList",{get:function(){if(this.tagName){var e=this._||(this._={});return e._ccl_||(e._ccl_=new K(ta,ua,this)),e._ccl_}}}),"parentElement"in A||Object.defineProperty(y,"parentElement",{get:function(){var e=this.parentNode;return e&&1===e.nodeType?e:k}}),"contains"in A||(n.Node.prototype.contains=function(e){return!!(16&this.compareDocumentPosition(e))}),"insertAdjacentHTML"in A||(n.HTMLElement.prototype.insertAdjacentHTML=function(e,t){var n,i=this.ownerDocument.createElement("_"),r={beforebegin:"before",afterbegin:"prepend",beforeend:"append",afterend:"after"};i.innerHTML=t,(i=i.childNodes)&&i.length&&(n=this[r[e]])&&n.apply(this,i)}),document.importNode&&!document.importNode.shim)try{document.importNode(A)}catch(Ra){var Sa=document.importNode;delete document.importNode,document.importNode=function(e,t){return t===g&&(t=j),Sa.call(this,e,t)}}try{A.cloneNode()}catch(Ta){[Node.prototype,y,Document.prototype,DocumentFragment.prototype].forEach(aa)}A.prepend||(B=function(e){var t,n=k,i=0,r=e.length,e=fa.call(e,function(e){return"string"==typeof e?document.createTextNode(e):e});if(1===r)n=e[0];else for(n=document.createDocumentFragment(),i=0,r=e.length;i<(t=e.length);++i)i-=r-t,n.appendChild(e[i]);return n},y.after=function(){this.parentNode&&this.parentNode.insertBefore(B(arguments),this.nextSibling)},y.before=function(){this.parentNode&&this.parentNode.insertBefore(B(arguments),this)},y.append=function(){this.appendChild(B(arguments))},y.prepend=function(){this.insertBefore(B(arguments),this.firstChild)},y.replace=function(){this.parentNode&&this.parentNode.replaceChild(B(arguments),this)},y.remove=function(){this.parentNode&&this.parentNode.removeChild(this)},"prepend"in document||(document.prepend=function(){y.prepend.apply(this.documentElement,arguments)},document.append=function(){y.append.apply(this.documentElement,arguments)})),y.matchesSelector||(y.matchesSelector=y.webkitMatchesSelector||y.mozMatchesSelector||y.msMatchesSelector||y.oMatchesSelector||function(e,t){if(!e)return l;if("*"===e)return j;var n,i,r,o,a,u,c=0;t?"length"in t?n=t[0]:(n=t,t=g):n=this;do if(u=l,n===document.documentElement?u=":root"===e:n===document.body&&(u="BODY"===e.toUpperCase()),!u){if(e=M.call(e.replace(pa,"$1")),o=e.match(oa))switch(e.charAt(0)){case"#":u=n.id===e.slice(1);break;default:if((u=!(o[1]&&"tagName"in n&&n.tagName.toUpperCase()!==o[1].toUpperCase()))&&o[2])for(r=-1,a=o[2].slice(1).split("."),o=" "+n.className+" ";a[++r]&&u;)u=s.call(o," "+a[r]+" ")}if(!/([,>+~ ])/.test(e)&&(i=n.parentNode)&&i.querySelector&&(u=i.querySelector(e)===n),!u&&(i=n.ownerDocument))for(a=i.querySelectorAll(e),r=-1;!u&&a[++r];)u=a[r]===n}while(u&&t&&(n=t[++c]));return t&&"length"in t?u&&t.length==c:u}),document.documentElement.matchesSelector||(document.documentElement.matchesSelector=y.matchesSelector),"matches"in y||(y.matches=document.documentElement.matches=y.matchesSelector),"find"in document||(qa=/(\:scope)(?=[ >~+])/,document.find=DocumentFragment.prototype.find=function(e,t){t&&("length"in t||(t=[t]))||(t=[this]);var n,i,r=0,o=t.length;do i=t[r],e=e.replace(qa,9==i.nodeType?":root":document_find_scopedreplacer=function(){return"#"+(i.id||(i.id="find"+ ++C))}),n=i.querySelector(e);while(!n&&++r<o);return n||k},document.findAll=DocumentFragment.prototype.findAll=function(e,t){t&&("length"in t||(t=[t]))||(t=[this]);var n,i,r,o,a,s,u=[],c=0,d=t.length,p={};do for(n=t[c],e=e.replace(qa,9==n.nodeType?":root":document_find_scopedreplacer=function(){return"#"+(n.id||(n.id="find"+ ++C))}),i=n.querySelectorAll(e),o=0,a=i.length;a>o;++o)r=i[o],s=l,r=r.__UUID__||(s=j,r.__UUID__=++C),!s&&r in p||(p[r]=g,u.push(i[o]));while(++c<d);return u}),"find"in y||(y.find=y.querySelector,y.findAll=y.querySelectorAll),"labels"in z("input")||Object.defineProperty(y,"labels",{enumerable:j,get:function(){if(s.call(" INPUT BUTTON KEYGEN METER OUTPUT PROGRESS TEXTAREA SELECT "," "+this.nodeName.toUpperCase()+" ")){for(var e=this,t=this.id?ga(document.querySelectorAll("label[for='"+this.id+"']")):[],n=t.length-1;(e=e.parentNode)&&(!e.h||e.h===this);)if("LABEL"===e.nodeName.toUpperCase()){for(;t[n]&&2&t[n].compareDocumentPosition(e);)n--;ea.call(t,n+1,0,e)}return t}}}),"control"in z("label")||(Da=function(e,t){for(var n=0,i=e.length;i>n;n++){var r=e[n],o=t(r);if(o)return o;if(r.childNodes&&r.childNodes.length>0&&(o=Da(r.childNodes,t)))return o}},Object.defineProperty(n.HTMLLabelElement&&n.HTMLLabelElement.prototype||y,"control",{enumerable:j,get:function(){return"LABEL"!==this.nodeName.toUpperCase()?g:this.hasAttribute("for")?document.getElementById(this.htmlFor):Da(this.childNodes,function(e){return s.call(" INPUT BUTTON KEYGEN METER OUTPUT PROGRESS TEXTAREA SELECT "," "+e.nodeName.toUpperCase()+" ")?e:void 0})||k}})),"reversed"in z("ol")||(Ga=function(e){var t,n,i=e.getAttribute("reversed"),r=e._;r||(r=e._={}),"olreversed"in r&&r.olreversed==(i!==k)||(t=e.children,n=e.getAttribute("start"),n!==k&&(n=Number(n),isNaN(n)&&(n=k)),i!==k?(r.olreversed=j,n===k&&(n=t.length),L(t,function(e){e.value=n--})):(r.olreversed=l,t[0]&&(t[0].value=n||0),L(t,function(e){e.removeAttribute("value")})))},Object.defineProperty(n.HTMLOListElement&&n.HTMLOListElement.prototype||y,"reversed",{get:function(){return"OL"!==(this.nodeName||"").toUpperCase()?g:this.getAttribute("reversed")!==k},set:function(e){return"OL"===(this.nodeName||"").toUpperCase()?(this[(e?"set":"remove")+"Attribute"]("reversed",""),Ga(this),e):void 0}}),X=function(){document.removeEventListener("DOMContentLoaded",X,l),X=g,L(document.getElementsByTagName("ol"),Ga)},"complete"==document.readyState?X():document.addEventListener("DOMContentLoaded",X,l)),document.getElementsByClassName&&ba(document.getElementsByClassName("")),document.querySelectorAll&&ba(document.querySelectorAll("#z")),Y=n.XHR=function(e,t){e=w(e||{},Y.d),Object.keys(Y.d).forEach(function(t){"object"==typeof this[t]&&w(e[t],this[t])},Y.d);var n=new XMLHttpRequest,i=e.data||"",r="post"==e.method.toLowerCase(),o=e.uri;"object"==typeof i&&e==Y.d.headers["Content-Type"]&&(i=Object.keys(i).map(function(e){var t=this[e];return"object"==typeof t?Object.keys(t).map(function(t){return e+"="+this[t]},t).join("&"):e+"="+t},i).join("&")),n.onreadystatechange=function(){4===this.readyState&&t.call(this,k,this.response||this.responseText||this.responseXML)},n.onerror=function(e){t.call(this,e)};try{n.open(e.method,o+(r?"":o.indexOf("?")?"&":"?"+i)),e.headers&&Object.keys(e.headers).forEach(function(t){n.setRequestHeader(t,e.headers[t])}),n.send(r&&i||k)}catch(a){t.call(this,a)}return n},Y.d={headers:{"X-Requested-With":"HTTPRequest","Content-Type":"application/x-www-form-urlencoded;charset=utf-8"}},(!S.prototype.toISOString||s.call(new S(-621987552e5).toISOString(),"-000001")||"1969-12-31T23:59:59.999Z"!==new S(-1).toISOString())&&(S.prototype.toISOString=function(){var e,t,n,i;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(i=this.getUTCFullYear(),e=this.getUTCMonth(),i+=~~(e/12),e=[(e%12+12)%12+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],i=(0>i?"-":i>9999?"+":"")+("00000"+Math.abs(i)).slice(i>=0&&9999>=i?-4:-6),t=e.length;t--;)n=e[t],10>n&&(e[t]="0"+n);return i+"-"+e.slice(0,2).join("-")+"T"+e.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"}),S.now||(S.now=function(){return(new S).getTime()});var Ua;if(!(Ua=!S.prototype.toJSON)){var Va;if(!(Va=s.call(new S(-621987552e5).toJSON(),"-000001"))){var Wa;e:{try{Wa=S.prototype.toJSON.call({toISOString:function(){return-1}});break e}catch(Xa){}Wa=g}Va=~Wa}Ua=Va}if(Ua&&(S.prototype.toJSON=function(){return v(this.toISOString,this)}),!S.parse){T=function(e,t,n,i,r,o,a){var s=arguments.length;return this instanceof S?(s=1==s&&String(e)===e?new S(T.parse(e)):s>=7?new S(e,t,n,i,r,o,a):s>=6?new S(e,t,n,i,r,o):s>=5?new S(e,t,n,i,r):s>=4?new S(e,t,n,i):s>=3?new S(e,t,n):s>=2?new S(e,t):s>=1?new S(e):new S,s.constructor=T,s):S.apply(this,arguments)},Ca=RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),U=[0,31,59,90,120,151,181,212,243,273,304,334,365],V=function(e){return Math.ceil(e/4)-Math.ceil(e/100)+Math.ceil(e/400)};for(D in S)T[D]=S[D];T.now=S.now,T.UTC=S.UTC,T.prototype=S.prototype,T.prototype.constructor=T,T.parse=function(e){var t=Ca.exec(e);if(t){var n=Number(t[1]),i=Number(t[2]||1),r=Number(t[3]||1),o=Number(t[4]||0),a=Number(t[5]||0),s=Number(t[6]||0),l=Number(t[7]||0),u=t[8]?0:Number(new Date(1970,0)),c="-"===t[9]?1:-1,d=Number(t[10]||0),t=Number(t[11]||0),p=V(n),h=V(n+1);return(a>0||s>0||l>0?24:25)>o&&60>a&&60>s&&1e3>l&&24>d&&60>t&&i>0&&13>i&&r>0&&r<1+U[i]-U[i-1]+(2===i?h-p:0)&&(n=365*(n-1970)+(i>2?h:p)-V(1970)+U[i-1]+r-1,n=1e3*(60*(60*(24*n+o+d*c)+a+t*c)+s)+l+u,n>=-864e13&&864e13>=n)?n:NaN}return S.parse.apply(this,arguments)},n.Date=T}if((D=n._)&&D.ielt9shims&&(D.ielt9shims.forEach(v),n._=D.orig_),w=D=A=ca=z=E=F=G=I=y=T=ka=g,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="length"in e&&e.length,n=Z.type(e);return"function"===n||Z.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(Z.isFunction(t))return Z.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return Z.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(se.test(t))return Z.filter(t,e,n);t=Z.filter(t,e)}return Z.grep(e,function(e){return W.call(t,e)>=0!==n})}function r(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=fe[e]={};return Z.each(e.match(he)||[],function(e,n){t[n]=!0}),t}function a(){K.removeEventListener("DOMContentLoaded",a,!1),e.removeEventListener("load",a,!1),Z.ready()}function s(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Z.expando+s.uid++}function l(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(we,"-$1").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:be.test(n)?Z.parseJSON(n):n}catch(r){}ye.set(e,t,n)}else n=void 0;return n}function u(){return!0}function c(){return!1}function d(){try{return K.activeElement}catch(e){}}function p(e,t){return Z.nodeName(e,"table")&&Z.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function h(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function f(e){var t=Oe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,i=e.length;i>n;n++)ve.set(e[n],"globalEval",!t||ve.get(t[n],"globalEval"))}function m(e,t){var n,i,r,o,a,s,l,u;if(1===t.nodeType){if(ve.hasData(e)&&(o=ve.access(e),a=ve.set(t,o),u=o.events)){delete a.handle,a.events={};for(r in u)for(n=0,i=u[r].length;i>n;n++)Z.event.add(t,r,u[r][n])}ye.hasData(e)&&(s=ye.access(e),l=Z.extend({},s),ye.set(t,l))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&Z.nodeName(e,t)?Z.merge([e],n):n}function y(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Se.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function b(t,n){var i,r=Z(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(r[0]))?i.display:Z.css(r[0],"display");return r.detach(),o}function w(e){var t=K,n=qe[e];return n||(n=b(e,t),"none"!==n&&n||(Fe=(Fe||Z("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Fe[0].contentDocument,t.write(),t.close(),n=b(e,t),Fe.detach()),qe[e]=n),n}function x(e,t,n){var i,r,o,a,s=e.style;return n=n||Be(e),n&&(a=n.getPropertyValue(t)||n[t]),n&&(""!==a||Z.contains(e.ownerDocument,e)||(a=Z.style(e,t)),Ue.test(a)&&He.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0!==a?a+"":a}function k(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function C(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),i=t,r=Xe.length;r--;)if(t=Xe[r]+n,t in e)return t;return i}function S(e,t,n){var i=Ve.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function _(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=Z.css(e,n+ke[o],!0,r)),i?("content"===n&&(a-=Z.css(e,"padding"+ke[o],!0,r)),"margin"!==n&&(a-=Z.css(e,"border"+ke[o]+"Width",!0,r))):(a+=Z.css(e,"padding"+ke[o],!0,r),"padding"!==n&&(a+=Z.css(e,"border"+ke[o]+"Width",!0,r)));return a}function T(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=Be(e),a="border-box"===Z.css(e,"boxSizing",!1,o);if(0>=r||null==r){if(r=x(e,t,o),(0>r||null==r)&&(r=e.style[t]),Ue.test(r))return r;i=a&&(Y.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+_(e,t,n||(a?"border":"content"),i,o)+"px"}function $(e,t){for(var n,i,r,o=[],a=0,s=e.length;s>a;a++)i=e[a],i.style&&(o[a]=ve.get(i,"olddisplay"),n=i.style.display,t?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&Ce(i)&&(o[a]=ve.access(i,"olddisplay",w(i.nodeName)))):(r=Ce(i),"none"===n&&r||ve.set(i,"olddisplay",r?n:Z.css(i,"display"))));for(a=0;s>a;a++)i=e[a],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[a]||"":"none"));return e}function E(e,t,n,i,r){return new E.prototype.init(e,t,n,i,r)}function D(){return setTimeout(function(){Ye=void 0}),Ye=Z.now()}function M(e,t){var n,i=0,r={height:e};for(t=t?1:0;4>i;i+=2-t)n=ke[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function I(e,t,n){for(var i,r=(nt[t]||[]).concat(nt["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,t,e))return i}function P(e,t,n){var i,r,o,a,s,l,u,c,d=this,p={},h=e.style,f=e.nodeType&&Ce(e),g=ve.get(e,"fxshow");n.queue||(s=Z._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,Z.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],u=Z.css(e,"display"),c="none"===u?ve.get(e,"olddisplay")||w(e.nodeName):u,"inline"===c&&"none"===Z.css(e,"float")&&(h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}));for(i in t)if(r=t[i],Qe.exec(r)){if(delete t[i],o=o||"toggle"===r,r===(f?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;f=!0}p[i]=g&&g[i]||Z.style(e,i)}else u=void 0;if(Z.isEmptyObject(p))"inline"===("none"===u?w(e.nodeName):u)&&(h.display=u);else{g?"hidden"in g&&(f=g.hidden):g=ve.access(e,"fxshow",{}),o&&(g.hidden=!f),f?Z(e).show():d.done(function(){Z(e).hide()}),d.done(function(){var t;ve.remove(e,"fxshow");for(t in p)Z.style(e,t,p[t])});for(i in p)a=I(f?g[i]:0,i,d),i in g||(g[i]=a.start,f&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function A(e,t){var n,i,r,o,a;for(n in e)if(i=Z.camelCase(n),r=t[i],o=e[n],Z.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),a=Z.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function j(e,t,n){var i,r,o=0,a=tt.length,s=Z.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=Ye||D(),n=Math.max(0,u.startTime+u.duration-t),i=n/u.duration||0,o=1-i,a=0,l=u.tweens.length;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:Z.extend({},t),opts:Z.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Ye||D(),duration:n.duration,tweens:[],createTween:function(t,n){var i=Z.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(i),i},stop:function(t){var n=0,i=t?u.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(A(c,u.opts.specialEasing);a>o;o++)if(i=tt[o].call(u,e,c,u.opts))return i;return Z.map(c,I,u),Z.isFunction(u.opts.start)&&u.opts.start.call(e,u),Z.fx.timer(Z.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function N(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(he)||[];if(Z.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function O(e,t,n,i){function r(s){var l;return o[s]=!0,Z.each(e[s]||[],function(e,s){var u=s(t,n,i);return"string"!=typeof u||a||o[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),r(u),!1)}),l}var o={},a=e===bt;return r(t.dataTypes[0])||!o["*"]&&r("*")}function L(e,t){var n,i,r=Z.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&Z.extend(!0,e,i),e}function R(e,t,n){for(var i,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function F(e,t,n,i){var r,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(r in u)if(s=r.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[r]:u[r]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function q(e,t,n,i){var r;if(Z.isArray(t))Z.each(t,function(t,r){n||St.test(e)?i(e,r):q(e+"["+("object"==typeof r?t:"")+"]",r,n,i)});else if(n||"object"!==Z.type(t))i(e,t);else for(r in t)q(e+"["+r+"]",t[r],n,i)}function H(e){return Z.isWindow(e)?e:9===e.nodeType&&e.defaultView}var U=[],B=U.slice,z=U.concat,V=U.push,W=U.indexOf,G={},J=G.toString,X=G.hasOwnProperty,Y={},K=e.document,Q="2.1.4",Z=function(e,t){return new Z.fn.init(e,t)},ee=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,te=/^-ms-/,ne=/-([\da-z])/gi,ie=function(e,t){return t.toUpperCase()};Z.fn=Z.prototype={jquery:Q,constructor:Z,selector:"",length:0,toArray:function(){return B.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:B.call(this)},pushStack:function(e){var t=Z.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return Z.each(this,e,t)},map:function(e){
|
|
3211
|
|
-return this.pushStack(Z.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(B.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(null)},push:V,sort:U.sort,splice:U.splice},Z.extend=Z.fn.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||Z.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],i=e[t],a!==i&&(u&&i&&(Z.isPlainObject(i)||(r=Z.isArray(i)))?(r?(r=!1,o=n&&Z.isArray(n)?n:[]):o=n&&Z.isPlainObject(n)?n:{},a[t]=Z.extend(u,o,i)):void 0!==i&&(a[t]=i));return a},Z.extend({expando:"jQuery"+(Q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===Z.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!Z.isArray(e)&&e-parseFloat(e)+1>=0},isPlainObject:function(e){return"object"!==Z.type(e)||e.nodeType||Z.isWindow(e)?!1:e.constructor&&!X.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?G[J.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=Z.trim(e),e&&(1===e.indexOf("use strict")?(t=K.createElement("script"),t.text=e,K.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(te,"ms-").replace(ne,ie)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var r,o=0,a=e.length,s=n(e);if(i){if(s)for(;a>o&&(r=t.apply(e[o],i),r!==!1);o++);else for(o in e)if(r=t.apply(e[o],i),r===!1)break}else if(s)for(;a>o&&(r=t.call(e[o],o,e[o]),r!==!1);o++);else for(o in e)if(r=t.call(e[o],o,e[o]),r===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ee,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?Z.merge(i,"string"==typeof e?[e]:e):V.call(i,e)),i},inArray:function(e,t,n){return null==t?-1:W.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;n>i;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],o=0,a=e.length,s=!n;a>o;o++)i=!t(e[o],o),i!==s&&r.push(e[o]);return r},map:function(e,t,i){var r,o=0,a=e.length,s=n(e),l=[];if(s)for(;a>o;o++)r=t(e[o],o,i),null!=r&&l.push(r);else for(o in e)r=t(e[o],o,i),null!=r&&l.push(r);return z.apply([],l)},guid:1,proxy:function(e,t){var n,i,r;return"string"==typeof t&&(n=e[t],t=e,e=n),Z.isFunction(e)?(i=B.call(arguments,2),r=function(){return e.apply(t||this,i.concat(B.call(arguments)))},r.guid=e.guid=e.guid||Z.guid++,r):void 0},now:Date.now,support:Y}),Z.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){G["[object "+t+"]"]=t.toLowerCase()});var re=function(e){function t(e,t,n,i){var r,o,a,s,l,u,d,h,f,g;if((t?t.ownerDocument||t:q)!==P&&I(t),t=t||P,n=n||[],s=t.nodeType,"string"!=typeof e||!e||1!==s&&9!==s&&11!==s)return n;if(!i&&j){if(11!==s&&(r=ye.exec(e)))if(a=r[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&R(t,o)&&o.id===a)return n.push(o),n}else{if(r[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((a=r[3])&&x.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(a)),n}if(x.qsa&&(!N||!N.test(e))){if(h=d=F,f=t,g=1!==s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(u=_(e),(d=t.getAttribute("id"))?h=d.replace(we,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=u.length;l--;)u[l]=h+p(u[l]);f=be.test(e)&&c(t.parentNode)||t,g=u.join(",")}if(g)try{return Q.apply(n,f.querySelectorAll(g)),n}catch(m){}finally{d||t.removeAttribute("id")}}}return $(e.replace(le,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>k.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[F]=!0,e}function r(e){var t=P.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=e.length;i--;)k.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||G)-(~e.sourceIndex||G);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function p(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function h(e,t,n){var i=t.dir,r=n&&"parentNode"===i,o=U++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o)}:function(t,n,a){var s,l,u=[H,o];if(a){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||r){if(l=t[F]||(t[F]={}),(s=l[i])&&s[0]===H&&s[1]===o)return u[2]=s[2];if(l[i]=u,u[2]=e(t,n,a))return!0}}}function f(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function g(e,n,i){for(var r=0,o=n.length;o>r;r++)t(e,n[r],i);return i}function m(e,t,n,i,r){for(var o,a=[],s=0,l=e.length,u=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,i,r))&&(a.push(o),u&&t.push(s));return a}function v(e,t,n,r,o,a){return r&&!r[F]&&(r=v(r)),o&&!o[F]&&(o=v(o,a)),i(function(i,a,s,l){var u,c,d,p=[],h=[],f=a.length,v=i||g(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?v:m(v,p,e,s,l),b=n?o||(i?e:f||r)?[]:a:y;if(n&&n(y,b,s,l),r)for(u=m(b,h),r(u,[],s,l),c=u.length;c--;)(d=u[c])&&(b[h[c]]=!(y[h[c]]=d));if(i){if(o||e){if(o){for(u=[],c=b.length;c--;)(d=b[c])&&u.push(y[c]=d);o(null,b=[],u,l)}for(c=b.length;c--;)(d=b[c])&&(u=o?ee(i,d):p[c])>-1&&(i[u]=!(a[u]=d))}}else b=m(b===a?b.splice(f,b.length):b),o?o(null,a,b,l):Q.apply(a,b)})}function y(e){for(var t,n,i,r=e.length,o=k.relative[e[0].type],a=o||k.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),u=h(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,i){var r=!o&&(i||n!==E)||((t=n).nodeType?l(e,n,i):u(e,n,i));return t=null,r}];r>s;s++)if(n=k.relative[e[s].type])c=[h(f(c),n)];else{if(n=k.filter[e[s].type].apply(null,e[s].matches),n[F]){for(i=++s;r>i&&!k.relative[e[i].type];i++);return v(s>1&&f(c),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(le,"$1"),n,i>s&&y(e.slice(s,i)),r>i&&y(e=e.slice(i)),r>i&&p(e))}c.push(n)}return f(c)}function b(e,n){var r=n.length>0,o=e.length>0,a=function(i,a,s,l,u){var c,d,p,h=0,f="0",g=i&&[],v=[],y=E,b=i||o&&k.find.TAG("*",u),w=H+=null==y?1:Math.random()||.1,x=b.length;for(u&&(E=a!==P&&a);f!==x&&null!=(c=b[f]);f++){if(o&&c){for(d=0;p=e[d++];)if(p(c,a,s)){l.push(c);break}u&&(H=w)}r&&((c=!p&&c)&&h--,i&&g.push(c))}if(h+=f,r&&f!==h){for(d=0;p=n[d++];)p(g,v,a,s);if(i){if(h>0)for(;f--;)g[f]||v[f]||(v[f]=Y.call(l));v=m(v)}Q.apply(l,v),u&&!i&&v.length>0&&h+n.length>1&&t.uniqueSort(l)}return u&&(H=w,E=y),g};return r?i(a):a}var w,x,k,C,S,_,T,$,E,D,M,I,P,A,j,N,O,L,R,F="sizzle"+1*new Date,q=e.document,H=0,U=0,B=n(),z=n(),V=n(),W=function(e,t){return e===t&&(M=!0),0},G=1<<31,J={}.hasOwnProperty,X=[],Y=X.pop,K=X.push,Q=X.push,Z=X.slice,ee=function(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",re=ie.replace("w","w#"),oe="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp(ne+"+","g"),le=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ue=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),de=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),pe=new RegExp(ae),he=new RegExp("^"+re+"$"),fe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie.replace("w","w*")+")"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},ge=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,be=/[+~]/,we=/'|\\/g,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),ke=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},Ce=function(){I()};try{Q.apply(X=Z.call(q.childNodes),q.childNodes),X[q.childNodes.length].nodeType}catch(Se){Q={apply:X.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}x=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},I=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:q;return i!==P&&9===i.nodeType&&i.documentElement?(P=i,A=i.documentElement,n=i.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),j=!S(i),x.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=r(function(e){return e.appendChild(i.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ve.test(i.getElementsByClassName),x.getById=r(function(e){return A.appendChild(e).id=F,!i.getElementsByName||!i.getElementsByName(F).length}),x.getById?(k.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&j){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},k.filter.ID=function(e){var t=e.replace(xe,ke);return function(e){return e.getAttribute("id")===t}}):(delete k.find.ID,k.filter.ID=function(e){var t=e.replace(xe,ke);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),k.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,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},k.find.CLASS=x.getElementsByClassName&&function(e,t){return j?t.getElementsByClassName(e):void 0},O=[],N=[],(x.qsa=ve.test(i.querySelectorAll))&&(r(function(e){A.appendChild(e).innerHTML="<a id='"+F+"'></a><select id='"+F+"-\f]' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&N.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||N.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+F+"-]").length||N.push("~="),e.querySelectorAll(":checked").length||N.push(":checked"),e.querySelectorAll("a#"+F+"+*").length||N.push(".#.+[+~]")}),r(function(e){var t=i.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&N.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||N.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),N.push(",.*:")})),(x.matchesSelector=ve.test(L=A.matches||A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&r(function(e){x.disconnectedMatch=L.call(e,"div"),L.call(e,"[s!='']:x"),O.push("!=",ae)}),N=N.length&&new RegExp(N.join("|")),O=O.length&&new RegExp(O.join("|")),t=ve.test(A.compareDocumentPosition),R=t||ve.test(A.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},W=t?function(e,t){if(e===t)return M=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===i||e.ownerDocument===q&&R(q,e)?-1:t===i||t.ownerDocument===q&&R(q,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return M=!0,0;var n,r=0,o=e.parentNode,s=t.parentNode,l=[e],u=[t];if(!o||!s)return e===i?-1:t===i?1:o?-1:s?1:D?ee(D,e)-ee(D,t):0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;l[r]===u[r];)r++;return r?a(l[r],u[r]):l[r]===q?-1:u[r]===q?1:0},i):P},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==P&&I(e),n=n.replace(de,"='$1']"),x.matchesSelector&&j&&(!O||!O.test(n))&&(!N||!N.test(n)))try{var i=L.call(e,n);if(i||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return t(n,P,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==P&&I(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==P&&I(e);var n=k.attrHandle[t.toLowerCase()],i=n&&J.call(k.attrHandle,t.toLowerCase())?n(e,t,!j):void 0;return void 0!==i?i:x.attributes||!j?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(M=!x.detectDuplicates,D=!x.sortStable&&e.slice(0),e.sort(W),M){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return D=null,e},C=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=C(t);return n},k=t.selectors={cacheLength:50,createPseudo:i,match:fe,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(xe,ke),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,ke),"~="===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 fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&pe.test(n)&&(t=_(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(xe,ke).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=B[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&B(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(se," ")+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,p,h,f,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=g="only"===e&&!f&&"nextSibling"}return!0}if(f=[a?m.firstChild:m.lastChild],a&&y){for(c=m[F]||(m[F]={}),u=c[e]||[],h=u[0]===H&&u[1],p=u[0]===H&&u[2],d=h&&m.childNodes[h];d=++h&&d&&d[g]||(p=h=0)||f.pop();)if(1===d.nodeType&&++p&&d===t){c[e]=[H,h,p];break}}else if(y&&(u=(t[F]||(t[F]={}))[e])&&u[0]===H)p=u[1];else for(;(d=++h&&d&&d[g]||(p=h=0)||f.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++p||(y&&((d[F]||(d[F]={}))[e]=[H,p]),d!==t)););return p-=r,p===i||p%i===0&&p/i>=0}}},PSEUDO:function(e,n){var r,o=k.pseudos[e]||k.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[F]?o(n):o.length>1?(r=[e,e,"",n],k.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)i=ee(e,r[a]),e[i]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=T(e.replace(le,"$1"));return r[F]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(xe,ke),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:i(function(e){return he.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,ke).toLowerCase(),function(t){var n;do if(n=j?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===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===A},focus:function(e){return e===P.activeElement&&(!P.hasFocus||P.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},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,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!k.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return ge.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:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:u(function(e,t,n){for(var i=0>n?n+t:n;++i<t;)e.push(i);return e})}},k.pseudos.nth=k.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[w]=s(w);for(w in{submit:!0,reset:!0})k.pseudos[w]=l(w);return d.prototype=k.filters=k.pseudos,k.setFilters=new d,_=t.tokenize=function(e,n){var i,r,o,a,s,l,u,c=z[e+" "];if(c)return n?0:c.slice(0);for(s=e,l=[],u=k.preFilter;s;){(!i||(r=ue.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(o=[])),i=!1,(r=ce.exec(s))&&(i=r.shift(),o.push({value:i,type:r[0].replace(le," ")}),s=s.slice(i.length));for(a in k.filter)!(r=fe[a].exec(s))||u[a]&&!(r=u[a](r))||(i=r.shift(),o.push({value:i,type:a,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):z(e,l).slice(0)},T=t.compile=function(e,t){var n,i=[],r=[],o=V[e+" "];if(!o){for(t||(t=_(e)),n=t.length;n--;)o=y(t[n]),o[F]?i.push(o):r.push(o);o=V(e,b(r,i)),o.selector=e}return o},$=t.select=function(e,t,n,i){var r,o,a,s,l,u="function"==typeof e&&e,d=!i&&_(e=u.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&j&&k.relative[o[1].type]){if(t=(k.find.ID(a.matches[0].replace(xe,ke),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=fe.needsContext.test(e)?0:o.length;r--&&(a=o[r],!k.relative[s=a.type]);)if((l=k.find[s])&&(i=l(a.matches[0].replace(xe,ke),be.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(r,1),e=i.length&&p(o),!e)return Q.apply(n,i),n;break}}return(u||T(e,d))(i,t,!j,n,be.test(e)&&c(t.parentNode)||t),n},x.sortStable=F.split("").sort(W).join("")===F,x.detectDuplicates=!!M,I(),x.sortDetached=r(function(e){return 1&e.compareDocumentPosition(P.createElement("div"))}),r(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&&r(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}),r(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var i;return n?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);Z.find=re,Z.expr=re.selectors,Z.expr[":"]=Z.expr.pseudos,Z.unique=re.uniqueSort,Z.text=re.getText,Z.isXMLDoc=re.isXML,Z.contains=re.contains;var oe=Z.expr.match.needsContext,ae=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,se=/^.[^:#\[\.,]*$/;Z.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?Z.find.matchesSelector(i,e)?[i]:[]:Z.find.matches(e,Z.grep(t,function(e){return 1===e.nodeType}))},Z.fn.extend({find:function(e){var t,n=this.length,i=[],r=this;if("string"!=typeof e)return this.pushStack(Z(e).filter(function(){for(t=0;n>t;t++)if(Z.contains(r[t],this))return!0}));for(t=0;n>t;t++)Z.find(e,r[t],i);return i=this.pushStack(n>1?Z.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&oe.test(e)?Z(e):e||[],!1).length}});var le,ue=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ce=Z.fn.init=function(e,t){var n,i;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ue.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||le).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof Z?t[0]:t,Z.merge(this,Z.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:K,!0)),ae.test(n[1])&&Z.isPlainObject(t))for(n in t)Z.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return i=K.getElementById(n[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=K,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):Z.isFunction(e)?"undefined"!=typeof le.ready?le.ready(e):e(Z):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),Z.makeArray(e,this))};ce.prototype=Z.fn,le=Z(K);var de=/^(?:parents|prev(?:Until|All))/,pe={children:!0,contents:!0,next:!0,prev:!0};Z.extend({dir:function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&Z(e).is(n))break;i.push(e)}return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),Z.fn.extend({has:function(e){var t=Z(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(Z.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,i=0,r=this.length,o=[],a=oe.test(e)||"string"!=typeof e?Z(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&Z.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Z.unique(o):o)},index:function(e){return e?"string"==typeof e?W.call(Z(e),this[0]):W.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Z.unique(Z.merge(this.get(),Z(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Z.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Z.dir(e,"parentNode")},parentsUntil:function(e,t,n){return Z.dir(e,"parentNode",n)},next:function(e){return r(e,"nextSibling")},prev:function(e){return r(e,"previousSibling")},nextAll:function(e){return Z.dir(e,"nextSibling")},prevAll:function(e){return Z.dir(e,"previousSibling")},nextUntil:function(e,t,n){return Z.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return Z.dir(e,"previousSibling",n)},siblings:function(e){return Z.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Z.sibling(e.firstChild)},contents:function(e){return e.contentDocument||Z.merge([],e.childNodes)}},function(e,t){Z.fn[e]=function(n,i){var r=Z.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=Z.filter(i,r)),this.length>1&&(pe[e]||Z.unique(r),de.test(e)&&r.reverse()),this.pushStack(r)}});var he=/\S+/g,fe={};Z.Callbacks=function(e){e="string"==typeof e?fe[e]||o(e):Z.extend({},e);var t,n,i,r,a,s,l=[],u=!e.once&&[],c=function(o){for(t=e.memory&&o,n=!0,s=r||0,r=0,a=l.length,i=!0;l&&a>s;s++)if(l[s].apply(o[0],o[1])===!1&&e.stopOnFalse){t=!1;break}i=!1,l&&(u?u.length&&c(u.shift()):t?l=[]:d.disable())},d={add:function(){if(l){var n=l.length;!function o(t){Z.each(t,function(t,n){var i=Z.type(n);"function"===i?e.unique&&d.has(n)||l.push(n):n&&n.length&&"string"!==i&&o(n)})}(arguments),i?a=l.length:t&&(r=n,c(t))}return this},remove:function(){return l&&Z.each(arguments,function(e,t){for(var n;(n=Z.inArray(t,l,n))>-1;)l.splice(n,1),i&&(a>=n&&a--,s>=n&&s--)}),this},has:function(e){return e?Z.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],a=0,this},disable:function(){return l=u=t=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,t||d.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||n&&!u||(t=t||[],t=[e,t.slice?t.slice():t],i?u.push(t):c(t)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!n}};return d},Z.extend({Deferred:function(e){var t=[["resolve","done",Z.Callbacks("once memory"),"resolved"],["reject","fail",Z.Callbacks("once memory"),"rejected"],["notify","progress",Z.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Z.Deferred(function(n){Z.each(t,function(t,o){var a=Z.isFunction(e[t])&&e[t];r[o[1]](function(){var e=a&&a.apply(this,arguments);e&&Z.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?Z.extend(e,i):i}},r={};return i.pipe=i.then,Z.each(t,function(e,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,o=B.call(arguments),a=o.length,s=1!==a||e&&Z.isFunction(e.promise)?a:0,l=1===s?e:Z.Deferred(),u=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?B.call(arguments):r,i===t?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);a>r;r++)o[r]&&Z.isFunction(o[r].promise)?o[r].promise().done(u(r,i,o)).fail(l.reject).progress(u(r,n,t)):--s;return s||l.resolveWith(i,o),l.promise()}});var ge;Z.fn.ready=function(e){return Z.ready.promise().done(e),this},Z.extend({isReady:!1,readyWait:1,holdReady:function(e){e?Z.readyWait++:Z.ready(!0)},ready:function(e){(e===!0?--Z.readyWait:Z.isReady)||(Z.isReady=!0,e!==!0&&--Z.readyWait>0||(ge.resolveWith(K,[Z]),Z.fn.triggerHandler&&(Z(K).triggerHandler("ready"),Z(K).off("ready"))))}}),Z.ready.promise=function(t){return ge||(ge=Z.Deferred(),"complete"===K.readyState?setTimeout(Z.ready):(K.addEventListener("DOMContentLoaded",a,!1),e.addEventListener("load",a,!1))),ge.promise(t)},Z.ready.promise();var me=Z.access=function(e,t,n,i,r,o,a){var s=0,l=e.length,u=null==n;if("object"===Z.type(n)){r=!0;for(s in n)Z.access(e,t,s,n[s],!0,o,a)}else if(void 0!==i&&(r=!0,Z.isFunction(i)||(a=!0),u&&(a?(t.call(e,i),t=null):(u=t,t=function(e,t,n){return u.call(Z(e),n)})),t))for(;l>s;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return r?e:u?t.call(e):l?t(e[0],n):o};Z.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},s.uid=1,s.accepts=Z.acceptData,s.prototype={key:function(e){if(!s.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=s.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(i){t[this.expando]=n,Z.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var i,r=this.key(e),o=this.cache[r];if("string"==typeof t)o[t]=n;else if(Z.isEmptyObject(o))Z.extend(this.cache[r],t);else for(i in t)o[i]=t[i];return o},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var i;return void 0===t||t&&"string"==typeof t&&void 0===n?(i=this.get(e,t),void 0!==i?i:this.get(e,Z.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i,r,o=this.key(e),a=this.cache[o];if(void 0===t)this.cache[o]={};else{Z.isArray(t)?i=t.concat(t.map(Z.camelCase)):(r=Z.camelCase(t),t in a?i=[t,r]:(i=r,i=i in a?[i]:i.match(he)||[])),n=i.length;for(;n--;)delete a[i[n]]}},hasData:function(e){return!Z.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var ve=new s,ye=new s,be=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,we=/([A-Z])/g;Z.extend({hasData:function(e){return ye.hasData(e)||ve.hasData(e)},data:function(e,t,n){return ye.access(e,t,n)},removeData:function(e,t){ye.remove(e,t)},_data:function(e,t,n){return ve.access(e,t,n)},_removeData:function(e,t){ve.remove(e,t)}}),Z.fn.extend({data:function(e,t){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(r=ye.get(o),1===o.nodeType&&!ve.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=Z.camelCase(i.slice(5)),l(o,i,r[i])));ve.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){ye.set(this,e)}):me(this,function(t){var n,i=Z.camelCase(e);if(o&&void 0===t){if(n=ye.get(o,e),void 0!==n)return n;if(n=ye.get(o,i),void 0!==n)return n;if(n=l(o,i,void 0),void 0!==n)return n}else this.each(function(){var n=ye.get(this,i);ye.set(this,i,t),-1!==e.indexOf("-")&&void 0!==n&&ye.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ye.remove(this,e)})}}),Z.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=ve.get(e,t),n&&(!i||Z.isArray(n)?i=ve.access(e,t,Z.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=Z.queue(e,t),i=n.length,r=n.shift(),o=Z._queueHooks(e,t),a=function(){Z.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ve.get(e,n)||ve.access(e,n,{empty:Z.Callbacks("once memory").add(function(){ve.remove(e,[t+"queue",n])})})}}),Z.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?Z.queue(this[0],e):void 0===t?this:this.each(function(){var n=Z.queue(this,e,t);Z._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&Z.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Z.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=Z.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o]);
|
|
3212
|
|
-};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=ve.get(o[a],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}});var xe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ke=["Top","Right","Bottom","Left"],Ce=function(e,t){return e=t||e,"none"===Z.css(e,"display")||!Z.contains(e.ownerDocument,e)},Se=/^(?:checkbox|radio)$/i;!function(){var e=K.createDocumentFragment(),t=e.appendChild(K.createElement("div")),n=K.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),Y.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",Y.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var _e="undefined";Y.focusinBubbles="onfocusin"in e;var Te=/^key/,$e=/^(?:mouse|pointer|contextmenu)|click/,Ee=/^(?:focusinfocus|focusoutblur)$/,De=/^([^.]*)(?:\.(.+)|)$/;Z.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,u,c,d,p,h,f,g,m=ve.get(e);if(m)for(n.handler&&(o=n,n=o.handler,r=o.selector),n.guid||(n.guid=Z.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(t){return typeof Z!==_e&&Z.event.triggered!==t.type?Z.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(he)||[""],u=t.length;u--;)s=De.exec(t[u])||[],h=g=s[1],f=(s[2]||"").split(".").sort(),h&&(d=Z.event.special[h]||{},h=(r?d.delegateType:d.bindType)||h,d=Z.event.special[h]||{},c=Z.extend({type:h,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&Z.expr.match.needsContext.test(r),namespace:f.join(".")},o),(p=l[h])||(p=l[h]=[],p.delegateCount=0,d.setup&&d.setup.call(e,i,f,a)!==!1||e.addEventListener&&e.addEventListener(h,a,!1)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,c):p.push(c),Z.event.global[h]=!0)},remove:function(e,t,n,i,r){var o,a,s,l,u,c,d,p,h,f,g,m=ve.hasData(e)&&ve.get(e);if(m&&(l=m.events)){for(t=(t||"").match(he)||[""],u=t.length;u--;)if(s=De.exec(t[u])||[],h=g=s[1],f=(s[2]||"").split(".").sort(),h){for(d=Z.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,p=l[h]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!r&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(e,c));a&&!p.length&&(d.teardown&&d.teardown.call(e,f,m.handle)!==!1||Z.removeEvent(e,h,m.handle),delete l[h])}else for(h in l)Z.event.remove(e,h+t[u],n,i,!0);Z.isEmptyObject(l)&&(delete m.handle,ve.remove(e,"events"))}},trigger:function(t,n,i,r){var o,a,s,l,u,c,d,p=[i||K],h=X.call(t,"type")?t.type:t,f=X.call(t,"namespace")?t.namespace.split("."):[];if(a=s=i=i||K,3!==i.nodeType&&8!==i.nodeType&&!Ee.test(h+Z.event.triggered)&&(h.indexOf(".")>=0&&(f=h.split("."),h=f.shift(),f.sort()),u=h.indexOf(":")<0&&"on"+h,t=t[Z.expando]?t:new Z.Event(h,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=f.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:Z.makeArray(n,[t]),d=Z.event.special[h]||{},r||!d.trigger||d.trigger.apply(i,n)!==!1)){if(!r&&!d.noBubble&&!Z.isWindow(i)){for(l=d.delegateType||h,Ee.test(l+h)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(i.ownerDocument||K)&&p.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=p[o++])&&!t.isPropagationStopped();)t.type=o>1?l:d.bindType||h,c=(ve.get(a,"events")||{})[t.type]&&ve.get(a,"handle"),c&&c.apply(a,n),c=u&&a[u],c&&c.apply&&Z.acceptData(a)&&(t.result=c.apply(a,n),t.result===!1&&t.preventDefault());return t.type=h,r||t.isDefaultPrevented()||d._default&&d._default.apply(p.pop(),n)!==!1||!Z.acceptData(i)||u&&Z.isFunction(i[h])&&!Z.isWindow(i)&&(s=i[u],s&&(i[u]=null),Z.event.triggered=h,i[h](),Z.event.triggered=void 0,s&&(i[u]=s)),t.result}},dispatch:function(e){e=Z.event.fix(e);var t,n,i,r,o,a=[],s=B.call(arguments),l=(ve.get(this,"events")||{})[e.type]||[],u=Z.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(a=Z.event.handlers.call(this,e,l),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,i=((Z.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,s),void 0!==i&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,r,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!==this;l=l.parentNode||this)if(l.disabled!==!0||"click"!==e.type){for(i=[],n=0;s>n;n++)o=t[n],r=o.selector+" ",void 0===i[r]&&(i[r]=o.needsContext?Z(r,this).index(l)>=0:Z.find(r,this,null,[l]).length),i[r]&&i.push(o);i.length&&a.push({elem:l,handlers:i})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget 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 offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,r,o=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||K,i=n.documentElement,r=n.body,e.pageX=t.clientX+(i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[Z.expando])return e;var t,n,i,r=e.type,o=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=$e.test(r)?this.mouseHooks:Te.test(r)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new Z.Event(o),t=i.length;t--;)n=i[t],e[n]=o[n];return e.target||(e.target=K),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==d()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===d()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&Z.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return Z.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var r=Z.extend(new Z.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?Z.event.trigger(r,null,t):Z.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},Z.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},Z.Event=function(e,t){return this instanceof Z.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?u:c):this.type=e,t&&Z.extend(this,t),this.timeStamp=e&&e.timeStamp||Z.now(),void(this[Z.expando]=!0)):new Z.Event(e,t)},Z.Event.prototype={isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=u,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=u,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=u,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},Z.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){Z.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,o=e.handleObj;return(!r||r!==i&&!Z.contains(i,r))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),Y.focusinBubbles||Z.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){Z.event.simulate(t,e.target,Z.event.fix(e),!0)};Z.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=ve.access(i,t);r||i.addEventListener(e,n,!0),ve.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=ve.access(i,t)-1;r?ve.access(i,t,r):(i.removeEventListener(e,n,!0),ve.remove(i,t))}}}),Z.fn.extend({on:function(e,t,n,i,r){var o,a;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(a in e)this.on(a,t,n,e[a],r);return this}if(null==n&&null==i?(i=t,n=t=void 0):null==i&&("string"==typeof t?(i=n,n=void 0):(i=n,n=t,t=void 0)),i===!1)i=c;else if(!i)return this;return 1===r&&(o=i,i=function(e){return Z().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=Z.guid++)),this.each(function(){Z.event.add(this,e,i,n,t)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,Z(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=c),this.each(function(){Z.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){Z.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?Z.event.trigger(e,t,n,!0):void 0}});var Me=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ie=/<([\w:]+)/,Pe=/<|&#?\w+;/,Ae=/<(?:script|style|link)/i,je=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^$|\/(?:java|ecma)script/i,Oe=/^true\/(.*)/,Le=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Re={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Re.optgroup=Re.option,Re.tbody=Re.tfoot=Re.colgroup=Re.caption=Re.thead,Re.th=Re.td,Z.extend({clone:function(e,t,n){var i,r,o,a,s=e.cloneNode(!0),l=Z.contains(e.ownerDocument,e);if(!(Y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Z.isXMLDoc(e)))for(a=v(s),o=v(e),i=0,r=o.length;r>i;i++)y(o[i],a[i]);if(t)if(n)for(o=o||v(e),a=a||v(s),i=0,r=o.length;r>i;i++)m(o[i],a[i]);else m(e,s);return a=v(s,"script"),a.length>0&&g(a,!l&&v(e,"script")),s},buildFragment:function(e,t,n,i){for(var r,o,a,s,l,u,c=t.createDocumentFragment(),d=[],p=0,h=e.length;h>p;p++)if(r=e[p],r||0===r)if("object"===Z.type(r))Z.merge(d,r.nodeType?[r]:r);else if(Pe.test(r)){for(o=o||c.appendChild(t.createElement("div")),a=(Ie.exec(r)||["",""])[1].toLowerCase(),s=Re[a]||Re._default,o.innerHTML=s[1]+r.replace(Me,"<$1></$2>")+s[2],u=s[0];u--;)o=o.lastChild;Z.merge(d,o.childNodes),o=c.firstChild,o.textContent=""}else d.push(t.createTextNode(r));for(c.textContent="",p=0;r=d[p++];)if((!i||-1===Z.inArray(r,i))&&(l=Z.contains(r.ownerDocument,r),o=v(c.appendChild(r),"script"),l&&g(o),n))for(u=0;r=o[u++];)Ne.test(r.type||"")&&n.push(r);return c},cleanData:function(e){for(var t,n,i,r,o=Z.event.special,a=0;void 0!==(n=e[a]);a++){if(Z.acceptData(n)&&(r=n[ve.expando],r&&(t=ve.cache[r]))){if(t.events)for(i in t.events)o[i]?Z.event.remove(n,i):Z.removeEvent(n,i,t.handle);ve.cache[r]&&delete ve.cache[r]}delete ye.cache[n[ye.expando]]}}}),Z.fn.extend({text:function(e){return me(this,function(e){return void 0===e?Z.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?Z.filter(e,this):this,r=0;null!=(n=i[r]);r++)t||1!==n.nodeType||Z.cleanData(v(n)),n.parentNode&&(t&&Z.contains(n.ownerDocument,n)&&g(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Z.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return Z.clone(this,e,t)})},html:function(e){return me(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!Re[(Ie.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Me,"<$1></$2>");try{for(;i>n;n++)t=this[n]||{},1===t.nodeType&&(Z.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,Z.cleanData(v(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=z.apply([],e);var n,i,r,o,a,s,l=0,u=this.length,c=this,d=u-1,p=e[0],g=Z.isFunction(p);if(g||u>1&&"string"==typeof p&&!Y.checkClone&&je.test(p))return this.each(function(n){var i=c.eq(n);g&&(e[0]=p.call(this,n,i.html())),i.domManip(e,t)});if(u&&(n=Z.buildFragment(e,this[0].ownerDocument,!1,this),i=n.firstChild,1===n.childNodes.length&&(n=i),i)){for(r=Z.map(v(n,"script"),h),o=r.length;u>l;l++)a=n,l!==d&&(a=Z.clone(a,!0,!0),o&&Z.merge(r,v(a,"script"))),t.call(this[l],a,l);if(o)for(s=r[r.length-1].ownerDocument,Z.map(r,f),l=0;o>l;l++)a=r[l],Ne.test(a.type||"")&&!ve.access(a,"globalEval")&&Z.contains(s,a)&&(a.src?Z._evalUrl&&Z._evalUrl(a.src):Z.globalEval(a.textContent.replace(Le,"")))}return this}}),Z.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Z.fn[e]=function(e){for(var n,i=[],r=Z(e),o=r.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),Z(r[a])[t](n),V.apply(i,n.get());return this.pushStack(i)}});var Fe,qe={},He=/^margin/,Ue=new RegExp("^("+xe+")(?!px)[a-z%]+$","i"),Be=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):e.getComputedStyle(t,null)};!function(){function t(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",a.innerHTML="",r.appendChild(o);var t=e.getComputedStyle(a,null);n="1%"!==t.top,i="4px"===t.width,r.removeChild(o)}var n,i,r=K.documentElement,o=K.createElement("div"),a=K.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",Y.clearCloneStyle="content-box"===a.style.backgroundClip,o.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",o.appendChild(a),e.getComputedStyle&&Z.extend(Y,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==i&&t(),i},reliableMarginRight:function(){var t,n=a.appendChild(K.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",r.appendChild(o),t=!parseFloat(e.getComputedStyle(n,null).marginRight),r.removeChild(o),a.removeChild(n),t}}))}(),Z.swap=function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return r};var ze=/^(none|table(?!-c[ea]).+)/,Ve=new RegExp("^("+xe+")(.*)$","i"),We=new RegExp("^([+-])=("+xe+")","i"),Ge={position:"absolute",visibility:"hidden",display:"block"},Je={letterSpacing:"0",fontWeight:"400"},Xe=["Webkit","O","Moz","ms"];Z.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=x(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=Z.camelCase(t),l=e.style;return t=Z.cssProps[s]||(Z.cssProps[s]=C(l,s)),a=Z.cssHooks[t]||Z.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(r=a.get(e,!1,i))?r:l[t]:(o=typeof n,"string"===o&&(r=We.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(Z.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||Z.cssNumber[s]||(n+="px"),Y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,i))||(l[t]=n)),void 0)}},css:function(e,t,n,i){var r,o,a,s=Z.camelCase(t);return t=Z.cssProps[s]||(Z.cssProps[s]=C(e.style,s)),a=Z.cssHooks[t]||Z.cssHooks[s],a&&"get"in a&&(r=a.get(e,!0,n)),void 0===r&&(r=x(e,t,i)),"normal"===r&&t in Je&&(r=Je[t]),""===n||n?(o=parseFloat(r),n===!0||Z.isNumeric(o)?o||0:r):r}}),Z.each(["height","width"],function(e,t){Z.cssHooks[t]={get:function(e,n,i){return n?ze.test(Z.css(e,"display"))&&0===e.offsetWidth?Z.swap(e,Ge,function(){return T(e,t,i)}):T(e,t,i):void 0},set:function(e,n,i){var r=i&&Be(e);return S(e,n,i?_(e,t,i,"border-box"===Z.css(e,"boxSizing",!1,r),r):0)}}}),Z.cssHooks.marginRight=k(Y.reliableMarginRight,function(e,t){return t?Z.swap(e,{display:"inline-block"},x,[e,"marginRight"]):void 0}),Z.each({margin:"",padding:"",border:"Width"},function(e,t){Z.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[e+ke[i]+t]=o[i]||o[i-2]||o[0];return r}},He.test(e)||(Z.cssHooks[e+t].set=S)}),Z.fn.extend({css:function(e,t){return me(this,function(e,t,n){var i,r,o={},a=0;if(Z.isArray(t)){for(i=Be(e),r=t.length;r>a;a++)o[t[a]]=Z.css(e,t[a],!1,i);return o}return void 0!==n?Z.style(e,t,n):Z.css(e,t)},e,t,arguments.length>1)},show:function(){return $(this,!0)},hide:function(){return $(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ce(this)?Z(this).show():Z(this).hide()})}}),Z.Tween=E,E.prototype={constructor:E,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(Z.cssNumber[n]?"":"px")},cur:function(){var e=E.propHooks[this.prop];return e&&e.get?e.get(this):E.propHooks._default.get(this)},run:function(e){var t,n=E.propHooks[this.prop];return this.options.duration?this.pos=t=Z.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):E.propHooks._default.set(this),this}},E.prototype.init.prototype=E.prototype,E.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=Z.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){Z.fx.step[e.prop]?Z.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[Z.cssProps[e.prop]]||Z.cssHooks[e.prop])?Z.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},E.propHooks.scrollTop=E.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Z.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Z.fx=E.prototype.init,Z.fx.step={};var Ye,Ke,Qe=/^(?:toggle|show|hide)$/,Ze=new RegExp("^(?:([+-])=|)("+xe+")([a-z%]*)$","i"),et=/queueHooks$/,tt=[P],nt={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),r=Ze.exec(t),o=r&&r[3]||(Z.cssNumber[e]?"":"px"),a=(Z.cssNumber[e]||"px"!==o&&+i)&&Ze.exec(Z.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],r=r||[],a=+i||1;do s=s||".5",a/=s,Z.style(n.elem,e,a+o);while(s!==(s=n.cur()/i)&&1!==s&&--l)}return r&&(a=n.start=+a||+i||0,n.unit=o,n.end=r[1]?a+(r[1]+1)*r[2]:+r[2]),n}]};Z.Animation=Z.extend(j,{tweener:function(e,t){Z.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,r=e.length;r>i;i++)n=e[i],nt[n]=nt[n]||[],nt[n].unshift(t)},prefilter:function(e,t){t?tt.unshift(e):tt.push(e)}}),Z.speed=function(e,t,n){var i=e&&"object"==typeof e?Z.extend({},e):{complete:n||!n&&t||Z.isFunction(e)&&e,duration:e,easing:n&&t||t&&!Z.isFunction(t)&&t};return i.duration=Z.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in Z.fx.speeds?Z.fx.speeds[i.duration]:Z.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){Z.isFunction(i.old)&&i.old.call(this),i.queue&&Z.dequeue(this,i.queue)},i},Z.fn.extend({fadeTo:function(e,t,n,i){return this.filter(Ce).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=Z.isEmptyObject(e),o=Z.speed(t,n,i),a=function(){var t=j(this,Z.extend({},e),o);(r||ve.get(this,"finish"))&&t.stop(!0)};return a.finish=a,r||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=Z.timers,a=ve.get(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&et.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));(t||!n)&&Z.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=ve.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=Z.timers,a=i?i.length:0;for(n.finish=!0,Z.queue(this,e,[]),r&&r.stop&&r.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++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),Z.each(["toggle","show","hide"],function(e,t){var n=Z.fn[t];Z.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(M(t,!0),e,i,r)}}),Z.each({slideDown:M("show"),slideUp:M("hide"),slideToggle:M("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Z.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),Z.timers=[],Z.fx.tick=function(){var e,t=0,n=Z.timers;for(Ye=Z.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||Z.fx.stop(),Ye=void 0},Z.fx.timer=function(e){Z.timers.push(e),e()?Z.fx.start():Z.timers.pop()},Z.fx.interval=13,Z.fx.start=function(){Ke||(Ke=setInterval(Z.fx.tick,Z.fx.interval))},Z.fx.stop=function(){clearInterval(Ke),Ke=null},Z.fx.speeds={slow:600,fast:200,_default:400},Z.fn.delay=function(e,t){return e=Z.fx?Z.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},function(){var e=K.createElement("input"),t=K.createElement("select"),n=t.appendChild(K.createElement("option"));e.type="checkbox",Y.checkOn=""!==e.value,Y.optSelected=n.selected,t.disabled=!0,Y.optDisabled=!n.disabled,e=K.createElement("input"),e.value="t",e.type="radio",Y.radioValue="t"===e.value}();var it,rt,ot=Z.expr.attrHandle;Z.fn.extend({attr:function(e,t){return me(this,Z.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Z.removeAttr(this,e)})}}),Z.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===_e?Z.prop(e,t,n):(1===o&&Z.isXMLDoc(e)||(t=t.toLowerCase(),i=Z.attrHooks[t]||(Z.expr.match.bool.test(t)?rt:it)),void 0===n?i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=Z.find.attr(e,t),null==r?void 0:r):null!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):void Z.removeAttr(e,t))},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(he);if(o&&1===e.nodeType)for(;n=o[r++];)i=Z.propFix[n]||n,Z.expr.match.bool.test(n)&&(e[i]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!Y.radioValue&&"radio"===t&&Z.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),rt={set:function(e,t,n){return t===!1?Z.removeAttr(e,n):e.setAttribute(n,n),n}},Z.each(Z.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ot[t]||Z.find.attr;ot[t]=function(e,t,i){var r,o;return i||(o=ot[t],ot[t]=r,r=null!=n(e,t,i)?t.toLowerCase():null,ot[t]=o),r}});var at=/^(?:input|select|textarea|button)$/i;Z.fn.extend({prop:function(e,t){return me(this,Z.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Z.propFix[e]||e]})}}),Z.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var i,r,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!Z.isXMLDoc(e),o&&(t=Z.propFix[t]||t,r=Z.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||at.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),Y.optSelected||(Z.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),Z.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Z.propFix[this.toLowerCase()]=this});var st=/[\t\r\n\f]/g;Z.fn.extend({addClass:function(e){var t,n,i,r,o,a,s="string"==typeof e&&e,l=0,u=this.length;if(Z.isFunction(e))return this.each(function(t){Z(this).addClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(he)||[];u>l;l++)if(n=this[l],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(st," "):" ")){for(o=0;r=t[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=Z.trim(i),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,i,r,o,a,s=0===arguments.length||"string"==typeof e&&e,l=0,u=this.length;if(Z.isFunction(e))return this.each(function(t){Z(this).removeClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(he)||[];u>l;l++)if(n=this[l],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(st," "):"")){for(o=0;r=t[o++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");a=e?Z.trim(i):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):Z.isFunction(e)?this.each(function(n){Z(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,i=0,r=Z(this),o=e.match(he)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else(n===_e||"boolean"===n)&&(this.className&&ve.set(this,"__className__",this.className),this.className=this.className||e===!1?"":ve.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(st," ").indexOf(t)>=0)return!0;return!1}});var lt=/\r/g;Z.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=Z.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,Z(this).val()):e,null==r?r="":"number"==typeof r?r+="":Z.isArray(r)&&(r=Z.map(r,function(e){return null==e?"":e+""})),t=Z.valHooks[this.type]||Z.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return t=Z.valHooks[r.type]||Z.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(lt,""):null==n?"":n)}}}),Z.extend({valHooks:{option:{get:function(e){var t=Z.find.attr(e,"value");return null!=t?t:Z.trim(Z.text(e))}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type||0>r,a=o?null:[],s=o?r+1:i.length,l=0>r?s:o?r:0;s>l;l++)if(n=i[l],(n.selected||l===r)&&(Y.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!Z.nodeName(n.parentNode,"optgroup"))){if(t=Z(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=Z.makeArray(t),a=r.length;a--;)i=r[a],(i.selected=Z.inArray(i.value,o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),Z.each(["radio","checkbox"],function(){Z.valHooks[this]={set:function(e,t){return Z.isArray(t)?e.checked=Z.inArray(Z(e).val(),t)>=0:void 0}},Y.checkOn||(Z.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),Z.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){Z.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),Z.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},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,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var ut=Z.now(),ct=/\?/;Z.parseJSON=function(e){return JSON.parse(e+"")},Z.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(i){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&Z.error("Invalid XML: "+e),t};var dt=/#.*$/,pt=/([?&])_=[^&]*/,ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,ft=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,gt=/^(?:GET|HEAD)$/,mt=/^\/\//,vt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,yt={},bt={},wt="*/".concat("*"),xt=e.location.href,kt=vt.exec(xt.toLowerCase())||[];Z.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt,type:"GET",isLocal:ft.test(kt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":wt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":Z.parseJSON,"text xml":Z.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?L(L(e,Z.ajaxSettings),t):L(Z.ajaxSettings,e)},ajaxPrefilter:N(yt),ajaxTransport:N(bt),ajax:function(e,t){function n(e,t,n,a){var l,c,v,y,w,k=t;2!==b&&(b=2,s&&clearTimeout(s),i=void 0,o=a||"",x.readyState=e>0?4:0,l=e>=200&&300>e||304===e,n&&(y=R(d,x,n)),y=F(d,y,x,l),l?(d.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(Z.lastModified[r]=w),w=x.getResponseHeader("etag"),w&&(Z.etag[r]=w)),204===e||"HEAD"===d.type?k="nocontent":304===e?k="notmodified":(k=y.state,c=y.data,v=y.error,l=!v)):(v=k,(e||!k)&&(k="error",0>e&&(e=0))),x.status=e,x.statusText=(t||k)+"",l?f.resolveWith(p,[c,k,x]):f.rejectWith(p,[x,k,v]),x.statusCode(m),m=void 0,u&&h.trigger(l?"ajaxSuccess":"ajaxError",[x,d,l?c:v]),g.fireWith(p,[x,k]),u&&(h.trigger("ajaxComplete",[x,d]),--Z.active||Z.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,o,a,s,l,u,c,d=Z.ajaxSetup({},t),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?Z(p):Z.event,f=Z.Deferred(),g=Z.Callbacks("once memory"),m=d.statusCode||{},v={},y={},b=0,w="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!a)for(a={};t=ht.exec(o);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||w;return i&&i.abort(t),n(0,t),this}};if(f.promise(x).complete=g.add,
|
|
3213
|
|
-x.success=x.done,x.error=x.fail,d.url=((e||d.url||xt)+"").replace(dt,"").replace(mt,kt[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=Z.trim(d.dataType||"*").toLowerCase().match(he)||[""],null==d.crossDomain&&(l=vt.exec(d.url.toLowerCase()),d.crossDomain=!(!l||l[1]===kt[1]&&l[2]===kt[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(kt[3]||("http:"===kt[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=Z.param(d.data,d.traditional)),O(yt,d,t,x),2===b)return x;u=Z.event&&d.global,u&&0===Z.active++&&Z.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!gt.test(d.type),r=d.url,d.hasContent||(d.data&&(r=d.url+=(ct.test(r)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=pt.test(r)?r.replace(pt,"$1_="+ut++):r+(ct.test(r)?"&":"?")+"_="+ut++)),d.ifModified&&(Z.lastModified[r]&&x.setRequestHeader("If-Modified-Since",Z.lastModified[r]),Z.etag[r]&&x.setRequestHeader("If-None-Match",Z.etag[r])),(d.data&&d.hasContent&&d.contentType!==!1||t.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+wt+"; q=0.01":""):d.accepts["*"]);for(c in d.headers)x.setRequestHeader(c,d.headers[c]);if(d.beforeSend&&(d.beforeSend.call(p,x,d)===!1||2===b))return x.abort();w="abort";for(c in{success:1,error:1,complete:1})x[c](d[c]);if(i=O(bt,d,t,x)){x.readyState=1,u&&h.trigger("ajaxSend",[x,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){x.abort("timeout")},d.timeout));try{b=1,i.send(v,n)}catch(k){if(!(2>b))throw k;n(-1,k)}}else n(-1,"No Transport");return x},getJSON:function(e,t,n){return Z.get(e,t,n,"json")},getScript:function(e,t){return Z.get(e,void 0,t,"script")}}),Z.each(["get","post"],function(e,t){Z[t]=function(e,n,i,r){return Z.isFunction(n)&&(r=r||i,i=n,n=void 0),Z.ajax({url:e,type:t,dataType:r,data:n,success:i})}}),Z._evalUrl=function(e){return Z.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},Z.fn.extend({wrapAll:function(e){var t;return Z.isFunction(e)?this.each(function(t){Z(this).wrapAll(e.call(this,t))}):(this[0]&&(t=Z(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return Z.isFunction(e)?this.each(function(t){Z(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Z(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Z.isFunction(e);return this.each(function(n){Z(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){Z.nodeName(this,"body")||Z(this).replaceWith(this.childNodes)}).end()}}),Z.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},Z.expr.filters.visible=function(e){return!Z.expr.filters.hidden(e)};var Ct=/%20/g,St=/\[\]$/,_t=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,$t=/^(?:input|select|textarea|keygen)/i;Z.param=function(e,t){var n,i=[],r=function(e,t){t=Z.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=Z.ajaxSettings&&Z.ajaxSettings.traditional),Z.isArray(e)||e.jquery&&!Z.isPlainObject(e))Z.each(e,function(){r(this.name,this.value)});else for(n in e)q(n,e[n],t,r);return i.join("&").replace(Ct,"+")},Z.fn.extend({serialize:function(){return Z.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Z.prop(this,"elements");return e?Z.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Z(this).is(":disabled")&&$t.test(this.nodeName)&&!Tt.test(e)&&(this.checked||!Se.test(e))}).map(function(e,t){var n=Z(this).val();return null==n?null:Z.isArray(n)?Z.map(n,function(e){return{name:t.name,value:e.replace(_t,"\r\n")}}):{name:t.name,value:n.replace(_t,"\r\n")}}).get()}}),Z.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Et=0,Dt={},Mt={0:200,1223:204},It=Z.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in Dt)Dt[e]()}),Y.cors=!!It&&"withCredentials"in It,Y.ajax=It=!!It,Z.ajaxTransport(function(e){var t;return Y.cors||It&&!e.crossDomain?{send:function(n,i){var r,o=e.xhr(),a=++Et;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)o[r]=e.xhrFields[r];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)o.setRequestHeader(r,n[r]);t=function(e){return function(){t&&(delete Dt[a],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?i(o.status,o.statusText):i(Mt[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=Dt[a]=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(s){if(t)throw s}},abort:function(){t&&t()}}:void 0}),Z.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return Z.globalEval(e),e}}}),Z.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Z.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=Z("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),K.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Pt=[],At=/(=)\?(?=&|$)|\?\?/;Z.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Pt.pop()||Z.expando+"_"+ut++;return this[e]=!0,e}}),Z.ajaxPrefilter("json jsonp",function(t,n,i){var r,o,a,s=t.jsonp!==!1&&(At.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&At.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(r=t.jsonpCallback=Z.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(At,"$1"+r):t.jsonp!==!1&&(t.url+=(ct.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return a||Z.error(r+" was not called"),a[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){a=arguments},i.always(function(){e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,Pt.push(r)),a&&Z.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),Z.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||K;var i=ae.exec(e),r=!n&&[];return i?[t.createElement(i[1])]:(i=Z.buildFragment([e],t,r),r&&r.length&&Z(r).remove(),Z.merge([],i.childNodes))};var jt=Z.fn.load;Z.fn.load=function(e,t,n){if("string"!=typeof e&&jt)return jt.apply(this,arguments);var i,r,o,a=this,s=e.indexOf(" ");return s>=0&&(i=Z.trim(e.slice(s)),e=e.slice(0,s)),Z.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),a.length>0&&Z.ajax({url:e,type:r,dataType:"html",data:t}).done(function(e){o=arguments,a.html(i?Z("<div>").append(Z.parseHTML(e)).find(i):e)}).complete(n&&function(e,t){a.each(n,o||[e.responseText,t,e])}),this},Z.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Z.fn[t]=function(e){return this.on(t,e)}}),Z.expr.filters.animated=function(e){return Z.grep(Z.timers,function(t){return e===t.elem}).length};var Nt=e.document.documentElement;Z.offset={setOffset:function(e,t,n){var i,r,o,a,s,l,u,c=Z.css(e,"position"),d=Z(e),p={};"static"===c&&(e.style.position="relative"),s=d.offset(),o=Z.css(e,"top"),l=Z.css(e,"left"),u=("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1,u?(i=d.position(),a=i.top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),Z.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+r),"using"in t?t.using.call(e,p):d.css(p)}},Z.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){Z.offset.setOffset(this,e,t)});var t,n,i=this[0],r={top:0,left:0},o=i&&i.ownerDocument;if(o)return t=o.documentElement,Z.contains(t,i)?(typeof i.getBoundingClientRect!==_e&&(r=i.getBoundingClientRect()),n=H(o),{top:r.top+n.pageYOffset-t.clientTop,left:r.left+n.pageXOffset-t.clientLeft}):r},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===Z.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),Z.nodeName(e[0],"html")||(i=e.offset()),i.top+=Z.css(e[0],"borderTopWidth",!0),i.left+=Z.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-Z.css(n,"marginTop",!0),left:t.left-i.left-Z.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Nt;e&&!Z.nodeName(e,"html")&&"static"===Z.css(e,"position");)e=e.offsetParent;return e||Nt})}}),Z.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var i="pageYOffset"===n;Z.fn[t]=function(r){return me(this,function(t,r,o){var a=H(t);return void 0===o?a?a[n]:t[r]:void(a?a.scrollTo(i?e.pageXOffset:o,i?o:e.pageYOffset):t[r]=o)},t,r,arguments.length,null)}}),Z.each(["top","left"],function(e,t){Z.cssHooks[t]=k(Y.pixelPosition,function(e,n){return n?(n=x(e,t),Ue.test(n)?Z(e).position()[t]+"px":n):void 0})}),Z.each({Height:"height",Width:"width"},function(e,t){Z.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){Z.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(i===!0||r===!0?"margin":"border");return me(this,function(t,n,i){var r;return Z.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===i?Z.css(t,n,a):Z.style(t,n,i,a)},t,o?i:void 0,o,null)}})}),Z.fn.size=function(){return this.length},Z.fn.andSelf=Z.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return Z});var Ot=e.jQuery,Lt=e.$;return Z.noConflict=function(t){return e.$===Z&&(e.$=Lt),t&&e.jQuery===Z&&(e.jQuery=Ot),Z},typeof t===_e&&(e.jQuery=e.$=Z),Z}),function(e,t,n){"use strict";function i(e,t){return t=t||Error,function(){var n,i,r=arguments[0],o="["+(e?e+":":"")+r+"] ",a=arguments[1],s=arguments;for(n=o+a.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1);return t+2<s.length?pe(s[t+2]):e}),n=n+"\nhttp://errors.angularjs.org/1.3.18/"+(e?e+"/":"")+r,i=2;i<arguments.length;i++)n=n+(2==i?"?":"&")+"p"+(i-2)+"="+encodeURIComponent(pe(arguments[i]));return new t(n)}}function r(e){if(null==e||_(e))return!1;var t="length"in Object(e)&&e.length;return e.nodeType===bi&&t?!0:w(e)||pi(e)||0===t||"number"==typeof t&&t>0&&t-1 in e}function o(e,t,n){var i,a;if(e)if(C(e))for(i in e)"prototype"==i||"length"==i||"name"==i||e.hasOwnProperty&&!e.hasOwnProperty(i)||t.call(n,e[i],i,e);else if(pi(e)||r(e)){var s="object"!=typeof e;for(i=0,a=e.length;a>i;i++)(s||i in e)&&t.call(n,e[i],i,e)}else if(e.forEach&&e.forEach!==o)e.forEach(t,n,e);else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e);return e}function a(e){return Object.keys(e).sort()}function s(e,t,n){for(var i=a(e),r=0;r<i.length;r++)t.call(n,e[i[r]],i[r]);return i}function l(e){return function(t,n){e(n,t)}}function u(){return++ci}function c(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function d(e){for(var t=e.$$hashKey,n=1,i=arguments.length;i>n;n++){var r=arguments[n];if(r)for(var o=Object.keys(r),a=0,s=o.length;s>a;a++){var l=o[a];e[l]=r[l]}}return c(e,t),e}function p(e){return parseInt(e,10)}function h(e,t){return d(Object.create(e),t)}function f(){}function g(e){return e}function m(e){return function(){return e}}function v(e){return"undefined"==typeof e}function y(e){return"undefined"!=typeof e}function b(e){return null!==e&&"object"==typeof e}function w(e){return"string"==typeof e}function x(e){return"number"==typeof e}function k(e){return"[object Date]"===si.call(e)}function C(e){return"function"==typeof e}function S(e){return"[object RegExp]"===si.call(e)}function _(e){return e&&e.window===e}function T(e){return e&&e.$evalAsync&&e.$watch}function $(e){return"[object File]"===si.call(e)}function E(e){return"[object FormData]"===si.call(e)}function D(e){return"[object Blob]"===si.call(e)}function M(e){return"boolean"==typeof e}function I(e){return e&&C(e.then)}function P(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function A(e){var t,n={},i=e.split(",");for(t=0;t<i.length;t++)n[i[t]]=!0;return n}function j(e){return Xn(e.nodeName||e[0]&&e[0].nodeName)}function N(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),t}function O(e,t,n,i){if(_(e)||T(e))throw li("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(t){if(e===t)throw li("cpi","Can't copy! Source and destination are identical.");if(n=n||[],i=i||[],b(e)){var r=n.indexOf(e);if(-1!==r)return i[r];n.push(e),i.push(t)}var a;if(pi(e)){t.length=0;for(var s=0;s<e.length;s++)a=O(e[s],null,n,i),b(e[s])&&(n.push(e[s]),i.push(a)),t.push(a)}else{var l=t.$$hashKey;pi(t)?t.length=0:o(t,function(e,n){delete t[n]});for(var u in e)e.hasOwnProperty(u)&&(a=O(e[u],null,n,i),b(e[u])&&(n.push(e[u]),i.push(a)),t[u]=a);c(t,l)}}else if(t=e,e)if(pi(e))t=O(e,[],n,i);else if(k(e))t=new Date(e.getTime());else if(S(e))t=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]),t.lastIndex=e.lastIndex;else if(b(e)){var d=Object.create(Object.getPrototypeOf(e));t=O(e,d,n,i)}return t}function L(e,t){if(pi(e)){t=t||[];for(var n=0,i=e.length;i>n;n++)t[n]=e[n]}else if(b(e)){t=t||{};for(var r in e)("$"!==r.charAt(0)||"$"!==r.charAt(1))&&(t[r]=e[r])}return t||e}function R(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var i,r,o,a=typeof e,s=typeof t;if(a==s&&"object"==a){if(!pi(e)){if(k(e))return k(t)?R(e.getTime(),t.getTime()):!1;if(S(e))return S(t)?e.toString()==t.toString():!1;if(T(e)||T(t)||_(e)||_(t)||pi(t)||k(t)||S(t))return!1;o={};for(r in e)if("$"!==r.charAt(0)&&!C(e[r])){if(!R(e[r],t[r]))return!1;o[r]=!0}for(r in t)if(!o.hasOwnProperty(r)&&"$"!==r.charAt(0)&&t[r]!==n&&!C(t[r]))return!1;return!0}if(!pi(t))return!1;if((i=e.length)==t.length){for(r=0;i>r;r++)if(!R(e[r],t[r]))return!1;return!0}}return!1}function F(e,t,n){return e.concat(ri.call(t,n))}function q(e,t){return ri.call(e,t||0)}function H(e,t){var n=arguments.length>2?q(arguments,2):[];return!C(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,F(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function U(e,i){var r=i;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?r=n:_(i)?r="$WINDOW":i&&t===i?r="$DOCUMENT":T(i)&&(r="$SCOPE"),r}function B(e,t){return"undefined"==typeof e?n:(x(t)||(t=t?2:null),JSON.stringify(e,U,t))}function z(e){return w(e)?JSON.parse(e):e}function V(e){e=ti(e).clone();try{e.empty()}catch(t){}var n=ti("<div>").append(e).html();try{return e[0].nodeType===xi?Xn(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Xn(t)})}catch(t){return Xn(n)}}function W(e){try{return decodeURIComponent(e)}catch(t){}}function G(e){var t,n,i={};return o((e||"").split("&"),function(e){if(e&&(t=e.replace(/\+/g,"%20").split("="),n=W(t[0]),y(n))){var r=y(t[1])?W(t[1]):!0;Yn.call(i,n)?pi(i[n])?i[n].push(r):i[n]=[i[n],r]:i[n]=r}}),i}function J(e){var t=[];return o(e,function(e,n){pi(e)?o(e,function(e){t.push(Y(n,!0)+(e===!0?"":"="+Y(e,!0)))}):t.push(Y(n,!0)+(e===!0?"":"="+Y(e,!0)))}),t.length?t.join("&"):""}function X(e){return Y(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Y(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function K(e,t){var n,i,r=mi.length;for(e=ti(e),i=0;r>i;++i)if(n=mi[i]+t,w(n=e.attr(n)))return n;return null}function Q(e,t){var n,i,r={};o(mi,function(t){var r=t+"app";!n&&e.hasAttribute&&e.hasAttribute(r)&&(n=e,i=e.getAttribute(r))}),o(mi,function(t){var r,o=t+"app";!n&&(r=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=r,i=r.getAttribute(o))}),n&&(r.strictDi=null!==K(n,"strict-di"),t(n,i?[i]:[],r))}function Z(n,i,r){b(r)||(r={});var a={strictDi:!1};r=d(a,r);var s=function(){if(n=ti(n),n.injector()){var e=n[0]===t?"document":V(n);throw li("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(/</,"<").replace(/>/,">"))}i=i||[],i.unshift(["$provide",function(e){e.value("$rootElement",n)}]),r.debugInfoEnabled&&i.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),i.unshift("ng");var o=ze(i,r.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,i){e.$apply(function(){t.data("$injector",i),n(t)(e)})}]),o},l=/^NG_ENABLE_DEBUG_INFO!/,u=/^NG_DEFER_BOOTSTRAP!/;return e&&l.test(e.name)&&(r.debugInfoEnabled=!0,e.name=e.name.replace(l,"")),e&&!u.test(e.name)?s():(e.name=e.name.replace(u,""),ui.resumeBootstrap=function(e){return o(e,function(e){i.push(e)}),s()},void(C(ui.resumeDeferredBootstrap)&&ui.resumeDeferredBootstrap()))}function ee(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function te(e){var t=ui.element(e).injector();if(!t)throw li("test","no injector found for element argument to getTestability");return t.get("$$testability")}function ne(e,t){return t=t||"_",e.replace(vi,function(e,n){return(n?t:"")+e.toLowerCase()})}function ie(){var t;yi||(ni=e.jQuery,ni&&ni.fn.on?(ti=ni,d(ni.fn,{scope:Fi.scope,isolateScope:Fi.isolateScope,controller:Fi.controller,injector:Fi.injector,inheritedData:Fi.inheritedData}),t=ni.cleanData,ni.cleanData=function(e){var n;if(di)di=!1;else for(var i,r=0;null!=(i=e[r]);r++)n=ni._data(i,"events"),n&&n.$destroy&&ni(i).triggerHandler("$destroy");t(e)}):ti=we,ui.element=ti,yi=!0)}function re(e,t,n){if(!e)throw li("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function oe(e,t,n){return n&&pi(e)&&(e=e[e.length-1]),re(C(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function ae(e,t){if("hasOwnProperty"===e)throw li("badname","hasOwnProperty is not a valid {0} name",t)}function se(e,t,n){if(!t)return e;for(var i,r=t.split("."),o=e,a=r.length,s=0;a>s;s++)i=r[s],e&&(e=(o=e)[i]);return!n&&C(e)?H(o,e):e}function le(e){var t=e[0],n=e[e.length-1],i=[t];do{if(t=t.nextSibling,!t)break;i.push(t)}while(t!==n);return ti(i)}function ue(){return Object.create(null)}function ce(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=i("$injector"),r=i("ng"),o=t(e,"angular",Object);return o.$$minErr=o.$$minErr||i,t(o,"module",function(){var e={};return function(i,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw r("badname","hasOwnProperty is not a valid {0} name",t)};return s(i,"module"),o&&e.hasOwnProperty(i)&&(e[i]=null),t(e,i,function(){function e(e,n,i,r){return r||(r=t),function(){return r[i||"push"]([e,n,arguments]),u}}if(!o)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",i);var t=[],r=[],s=[],l=e("$injector","invoke","push",r),u={_invokeQueue:t,_configBlocks:r,_runBlocks:s,requires:o,name:i,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),animation:e("$animateProvider","register"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:l,run:function(e){return s.push(e),this}};return a&&l(a),u})}})}function de(e){var t=[];return JSON.stringify(e,function(e,n){if(n=U(e,n),b(n)){if(t.indexOf(n)>=0)return"<<already seen>>";t.push(n)}return n})}function pe(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?de(e):e}function he(t){d(t,{bootstrap:Z,copy:O,extend:d,equals:R,element:ti,forEach:o,injector:ze,noop:f,bind:H,toJson:B,fromJson:z,identity:g,isUndefined:v,isDefined:y,isString:w,isFunction:C,isObject:b,isNumber:x,isElement:P,isArray:pi,version:_i,isDate:k,lowercase:Xn,uppercase:Kn,callbacks:{counter:0},getTestability:te,$$minErr:i,$$csp:gi,reloadWithDebugInfo:ee}),ii=ce(e);try{ii("ngLocale")}catch(n){ii("ngLocale",[]).provider("$locale",mt)}ii("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Jt}),e.provider("$compile",Ke).directive({a:Ir,input:Jr,textarea:Jr,form:Or,script:Ro,select:Ho,style:Bo,option:Uo,ngBind:Kr,ngBindHtml:Zr,ngBindTemplate:Qr,ngClass:to,ngClassEven:io,ngClassOdd:no,ngCloak:ro,ngController:oo,ngForm:Lr,ngHide:Po,ngIf:lo,ngInclude:uo,ngInit:po,ngNonBindable:To,ngPluralize:$o,ngRepeat:Eo,ngShow:Io,ngStyle:Ao,ngSwitch:jo,ngSwitchWhen:No,ngSwitchDefault:Oo,ngOptions:qo,ngTransclude:Lo,ngModel:Co,ngList:ho,ngChange:eo,pattern:Vo,ngPattern:Vo,required:zo,ngRequired:zo,minlength:Go,ngMinlength:Go,maxlength:Wo,ngMaxlength:Wo,ngValue:Yr,ngModelOptions:_o}).directive({ngInclude:co}).directive(Pr).directive(ao),e.provider({$anchorScroll:Ve,$animate:Xi,$browser:Je,$cacheFactory:Xe,$controller:tt,$document:nt,$exceptionHandler:it,$filter:sn,$interpolate:ft,$interval:gt,$http:ct,$httpBackend:pt,$location:Mt,$log:It,$parse:Ut,$rootScope:Gt,$q:Bt,$$q:zt,$sce:Qt,$sceDelegate:Kt,$sniffer:Zt,$templateCache:Ye,$templateRequest:en,$$testability:tn,$timeout:nn,$window:an,$$rAF:Wt,$$asyncCallback:We,$$jqLite:Fe})}])}function fe(){return++$i}function ge(e){return e.replace(Mi,function(e,t,n,i){return i?n.toUpperCase():n}).replace(Ii,"Moz$1")}function me(e){return!Ni.test(e)}function ve(e){var t=e.nodeType;return t===bi||!t||t===Ci}function ye(e,t){var n,i,r,a,s=t.createDocumentFragment(),l=[];if(me(e))l.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),i=(Oi.exec(e)||["",""])[1].toLowerCase(),r=Ri[i]||Ri._default,n.innerHTML=r[1]+e.replace(Li,"<$1></$2>")+r[2],a=r[0];a--;)n=n.lastChild;l=F(l,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(l,function(e){s.appendChild(e)}),s}function be(e,n){n=n||t;var i;return(i=ji.exec(e))?[n.createElement(i[1])]:(i=ye(e,n))?i.childNodes:[]}function we(e){if(e instanceof we)return e;var t;if(w(e)&&(e=hi(e),t=!0),!(this instanceof we)){if(t&&"<"!=e.charAt(0))throw Ai("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new we(e)}t?Me(this,be(e)):Me(this,e)}function xe(e){return e.cloneNode(!0)}function ke(e,t){if(t||Se(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),i=0,r=n.length;r>i;i++)Se(n[i])}function Ce(e,t,n,i){if(y(i))throw Ai("offargs","jqLite#off() does not support the `+"`"+`selector`+"`"+` argument");var r=_e(e),a=r&&r.events,s=r&&r.handle;if(s)if(t)o(t.split(" "),function(t){if(y(n)){var i=a[t];if(N(i||[],n),i&&i.length>0)return}Di(e,t,s),delete a[t]});else for(t in a)"$destroy"!==t&&Di(e,t,s),delete a[t]}function Se(e,t){var i=e.ng339,r=i&&Ti[i];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Ce(e)),delete Ti[i],e.ng339=n}}function _e(e,t){var i=e.ng339,r=i&&Ti[i];return t&&!r&&(e.ng339=i=fe(),r=Ti[i]={events:{},data:{},handle:n}),r}function Te(e,t,n){if(ve(e)){var i=y(n),r=!i&&t&&!b(t),o=!t,a=_e(e,!r),s=a&&a.data;if(i)s[t]=n;else{if(o)return s;if(r)return s&&s[t];d(s,t)}}}function $e(e,t){return e.getAttribute?(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}function Ee(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",hi((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+hi(t)+" "," ")))})}function De(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=hi(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",hi(n))}}function Me(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var i=0;n>i;i++)e[e.length++]=t[i]}else e[e.length++]=t}}function Ie(e,t){return Pe(e,"$"+(t||"ngController")+"Controller")}function Pe(e,t,i){e.nodeType==Ci&&(e=e.documentElement);for(var r=pi(t)?t:[t];e;){for(var o=0,a=r.length;a>o;o++)if((i=ti.data(e,r[o]))!==n)return i;e=e.parentNode||e.nodeType===Si&&e.host}}function Ae(e){for(ke(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function je(e,t){t||ke(e);var n=e.parentNode;n&&n.removeChild(e)}function Ne(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):ti(n).on("load",t)}function Oe(e,t){var n=qi[t.toLowerCase()];return n&&Hi[j(e)]&&n}function Le(e,t){var n=e.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&Ui[t]}function Re(e,t){var n=function(n,i){n.isDefaultPrevented=function(){return n.defaultPrevented};var r=t[i||n.type],o=r?r.length:0;if(o){if(v(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0},o>1&&(r=L(r));for(var s=0;o>s;s++)n.isImmediatePropagationStopped()||r[s].call(e,n)}};return n.elem=e,n}function Fe(){this.$get=function(){return d(we,{hasClass:function(e,t){return e.attr&&(e=e[0]),$e(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),De(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Ee(e,t)}})}}function qe(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var i=typeof e;return n="function"==i||"object"==i&&null!==e?e.$$hashKey=i+":"+(t||u)():i+":"+e}function He(e,t){if(t){var n=0;this.nextUid=function(){return++n}}o(e,this.put,this)}function Ue(e){var t=e.toString().replace(Wi,""),n=t.match(Bi);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Be(e,t,n){var i,r,a,s;if("function"==typeof e){if(!(i=e.$inject)){if(i=[],e.length){if(t)throw w(n)&&n||(n=e.name||Ue(e)),Gi("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);r=e.toString().replace(Wi,""),a=r.match(Bi),o(a[1].split(zi),function(e){e.replace(Vi,function(e,t,n){i.push(n)})})}e.$inject=i}}else pi(e)?(s=e.length-1,oe(e[s],"fn"),i=e.slice(0,s)):oe(e,"fn",!0);return i}function ze(e,t){function i(e){return function(t,n){return b(t)?void o(t,l(e)):e(t,n)}}function r(e,t){if(ae(e,"service"),(C(t)||pi(t))&&(t=T.instantiate(t)),!t.$get)throw Gi("pget","Provider '{0}' must define $get factory method.",e);return _[e+x]=t}function a(e,t){return function(){var n=E.invoke(t,this);if(v(n))throw Gi("undef","Provider '{0}' must return a value from $get factory method.",e);return n}}function s(e,t,n){return r(e,{$get:n!==!1?a(e,t):t})}function u(e,t){return s(e,["$injector",function(e){return e.instantiate(t)}])}function c(e,t){return s(e,m(t),!1)}function d(e,t){ae(e,"constant"),_[e]=t,$[e]=t}function p(e,t){var n=T.get(e+x),i=n.$get;n.$get=function(){var e=E.invoke(i,n);return E.invoke(t,null,{$delegate:e})}}function h(e){var t,n=[];return o(e,function(e){function i(e){var t,n;for(t=0,n=e.length;n>t;t++){var i=e[t],r=T.get(i[0]);r[i[1]].apply(r,i[2])}}if(!S.get(e)){S.put(e,!0);try{w(e)?(t=ii(e),n=n.concat(h(t.requires)).concat(t._runBlocks),i(t._invokeQueue),i(t._configBlocks)):C(e)?n.push(T.invoke(e)):pi(e)?n.push(T.invoke(e)):oe(e,"module")}catch(r){throw pi(e)&&(e=e[e.length-1]),r.message&&r.stack&&-1==r.stack.indexOf(r.message)&&(r=r.message+"\n"+r.stack),Gi("modulerr","Failed to instantiate module {0} due to:\n{1}",e,r.stack||r.message||r)}}}),n}function g(e,n){function i(t,i){if(e.hasOwnProperty(t)){if(e[t]===y)throw Gi("cdep","Circular dependency found: {0}",t+" <- "+k.join(" <- "));return e[t]}try{return k.unshift(t),e[t]=y,e[t]=n(t,i)}catch(r){throw e[t]===y&&delete e[t],r}finally{k.shift()}}function r(e,n,r,o){"string"==typeof r&&(o=r,r=null);var a,s,l,u=[],c=ze.$$annotate(e,t,o);for(s=0,a=c.length;a>s;s++){if(l=c[s],"string"!=typeof l)throw Gi("itkn","Incorrect injection token! Expected service name as string, got {0}",l);u.push(r&&r.hasOwnProperty(l)?r[l]:i(l,o))}return pi(e)&&(e=e[a]),e.apply(n,u)}function o(e,t,n){var i=Object.create((pi(e)?e[e.length-1]:e).prototype||null),o=r(e,i,t,n);return b(o)||C(o)?o:i}return{invoke:r,instantiate:o,get:i,annotate:ze.$$annotate,has:function(t){return _.hasOwnProperty(t+x)||e.hasOwnProperty(t)}}}t=t===!0;var y={},x="Provider",k=[],S=new He([],!0),_={$provide:{provider:i(r),factory:i(s),service:i(u),value:i(c),constant:i(d),decorator:p}},T=_.$injector=g(_,function(e,t){throw ui.isString(t)&&k.push(t),Gi("unpr","Unknown provider: {0}",k.join(" <- "))}),$={},E=$.$injector=g($,function(e,t){var i=T.get(e+x,t);return E.invoke(i.$get,i,n,e)});return o(h(e),function(e){E.invoke(e||f)}),E}function Ve(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,i){function r(e){var t=null;return Array.prototype.some.call(e,function(e){return"a"===j(e)?(t=e,!0):void 0}),t}function o(){var e=s.yOffset;if(C(e))e=e();else if(P(e)){var n=e[0],i=t.getComputedStyle(n);e="fixed"!==i.position?0:n.getBoundingClientRect().bottom}else x(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var i=e.getBoundingClientRect().top;t.scrollBy(0,i-n)}}else t.scrollTo(0,0)}function s(){var e,t=n.hash();t?(e=l.getElementById(t))?a(e):(e=r(l.getElementsByName(t)))?a(e):"top"===t&&a(null):a(null)}var l=t.document;return e&&i.$watch(function(){return n.hash()},function(e,t){(e!==t||""!==e)&&Ne(function(){i.$evalAsync(s)})}),s}]}function We(){this.$get=["$$rAF","$timeout",function(e,t){return e.supported?function(t){return e(t)}:function(e){return t(e,0,!1)}}]}function Ge(e,t,i,r){function a(e){try{e.apply(null,q(arguments,1))}finally{if(S--,0===S)for(;_.length;)try{_.pop()()}catch(t){i.error(t)}}}function s(e){var t=e.indexOf("#");return-1===t?"":e.substr(t)}function l(e,t){!function n(){o($,function(e){e()}),T=t(n,e)}()}function u(){d(),p()}function c(){try{return b.state}catch(e){}}function d(){E=c(),E=v(E)?null:E,R(E,N)&&(E=N),N=E}function p(){(M!==g.url()||D!==E)&&(M=g.url(),D=E,o(A,function(e){e(g.url(),E)}))}function h(e){try{return decodeURIComponent(e)}catch(t){return e}}var g=this,m=t[0],y=e.location,b=e.history,x=e.setTimeout,k=e.clearTimeout,C={};g.isMock=!1;var S=0,_=[];g.$$completeOutstandingRequest=a,g.$$incOutstandingRequestCount=function(){S++},g.notifyWhenNoOutstandingRequests=function(e){o($,function(e){e()}),0===S?e():_.push(e)};var T,$=[];g.addPollFn=function(e){return v(T)&&l(100,x),$.push(e),e};var E,D,M=y.href,I=t.find("base"),P=null;d(),D=E,g.url=function(t,n,i){if(v(i)&&(i=null),y!==e.location&&(y=e.location),b!==e.history&&(b=e.history),t){var o=D===i;if(M===t&&(!r.history||o))return g;var a=M&&xt(M)===xt(t);return M=t,D=i,!r.history||a&&o?((!a||P)&&(P=t),n?y.replace(t):a?y.hash=s(t):y.href=t):(b[n?"replaceState":"pushState"](i,"",t),d(),D=E),g}return P||y.href.replace(/%27/g,"'")},g.state=function(){return E};var A=[],j=!1,N=null;g.onUrlChange=function(t){return j||(r.history&&ti(e).on("popstate",u),ti(e).on("hashchange",u),j=!0),A.push(t),t},g.$$checkUrlChange=p,g.baseHref=function(){var e=I.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var O={},L="",F=g.baseHref();g.cookies=function(e,t){var r,o,a,s,l;if(!e){if(m.cookie!==L)for(L=m.cookie,o=L.split("; "),O={},s=0;s<o.length;s++)a=o[s],l=a.indexOf("="),l>0&&(e=h(a.substring(0,l)),O[e]===n&&(O[e]=h(a.substring(l+1))));return O}t===n?m.cookie=encodeURIComponent(e)+"=;path="+F+";expires=Thu, 01 Jan 1970 00:00:00 GMT":w(t)&&(r=(m.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path="+F).length+1,r>4096&&i.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+r+" > 4096 bytes)!"))},g.defer=function(e,t){var n;return S++,n=x(function(){delete C[n],a(e)},t||0),C[n]=!0,n},g.defer.cancel=function(e){return C[e]?(delete C[e],k(e),a(f),!0):!1}}function Je(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,i){
|
|
3214
|
|
-return new Ge(e,i,t,n)}]}function Xe(){this.$get=function(){function e(e,n){function r(e){e!=p&&(h?h==e&&(h=e.n):h=e,o(e.n,e.p),o(e,p),p=e,p.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw i("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=d({},n,{id:e}),l={},u=n&&n.capacity||Number.MAX_VALUE,c={},p=null,h=null;return t[e]={put:function(e,t){if(u<Number.MAX_VALUE){var n=c[e]||(c[e]={key:e});r(n)}if(!v(t))return e in l||a++,l[e]=t,a>u&&this.remove(h.key),t},get:function(e){if(u<Number.MAX_VALUE){var t=c[e];if(!t)return;r(t)}return l[e]},remove:function(e){if(u<Number.MAX_VALUE){var t=c[e];if(!t)return;t==p&&(p=t.p),t==h&&(h=t.n),o(t.n,t.p),delete c[e]}delete l[e],a--},removeAll:function(){l={},a=0,c={},p=h=null},destroy:function(){l=null,s=null,c=null,delete t[e]},info:function(){return d({},s,{size:a})}}}var t={};return e.info=function(){var e={};return o(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function Ye(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function Ke(e,i){function r(e,t){var n=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,i={};return o(e,function(e,r){var o=e.match(n);if(!o)throw Yi("iscp","Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,r,e);i[r]={mode:o[1][0],collection:"*"===o[2],optional:"?"===o[3],attrName:o[4]||r}}),i}function a(e){var t=e.charAt(0);if(!t||t!==Xn(t))throw Yi("baddir","Directive name '{0}' is invalid. The first character must be a lowercase letter",e);return e}var s={},u="Directive",c=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,p=/(([\w\-]+)(?:\:([^;]+))?;?)/,v=A("ngSrc,ngSrcset,src,srcset"),x=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,k=/^(on[a-z]+|formaction)$/;this.directive=function _(t,n){return ae(t,"directive"),w(t)?(a(t),re(n,"directiveFactory"),s.hasOwnProperty(t)||(s[t]=[],e.factory(t+u,["$injector","$exceptionHandler",function(e,n){var i=[];return o(s[t],function(o,a){try{var s=e.invoke(o);C(s)?s={compile:m(s)}:!s.compile&&s.link&&(s.compile=m(s.link)),s.priority=s.priority||0,s.index=a,s.name=s.name||t,s.require=s.require||s.controller&&s.name,s.restrict=s.restrict||"EA",b(s.scope)&&(s.$$isolateBindings=r(s.scope,s.name)),i.push(s)}catch(l){n(l)}}),i}])),s[t].push(n)):o(t,l(_)),this},this.aHrefSanitizationWhitelist=function(e){return y(e)?(i.aHrefSanitizationWhitelist(e),this):i.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return y(e)?(i.imgSrcSanitizationWhitelist(e),this):i.imgSrcSanitizationWhitelist()};var S=!0;this.debugInfoEnabled=function(e){return y(e)?(S=e,this):S},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(e,i,r,a,l,m,y,_,$,E,D){function M(e,t){try{e.addClass(t)}catch(n){}}function I(e,t,n,i,r){e instanceof ti||(e=ti(e)),o(e,function(t,n){t.nodeType==xi&&t.nodeValue.match(/\S+/)&&(e[n]=ti(t).wrap("<span></span>").parent()[0])});var a=A(e,t,e,n,i,r);I.$$addScopeClass(e);var s=null;return function(t,n,i){re(t,"scope"),i=i||{};var r=i.parentBoundTranscludeFn,o=i.transcludeControllers,l=i.futureParentElement;r&&r.$$boundTransclude&&(r=r.$$boundTransclude),s||(s=P(l));var u;if(u="html"!==s?ti(Q(s,ti("<div>").append(e).html())):n?Fi.clone.call(e):e,o)for(var c in o)u.data("$"+c+"Controller",o[c].instance);return I.$$addScopeInfo(u,t),n&&n(u,t),a&&a(t,u,u,r),u}}function P(e){var t=e&&e[0];return t&&"foreignobject"!==j(t)&&t.toString().match(/SVG/)?"svg":"html"}function A(e,t,i,r,o,a){function s(e,i,r,o){var a,s,l,u,c,d,p,h,m;if(f){var v=i.length;for(m=new Array(v),c=0;c<g.length;c+=3)p=g[c],m[p]=i[p]}else m=i;for(c=0,d=g.length;d>c;)l=m[g[c++]],a=g[c++],s=g[c++],a?(a.scope?(u=e.$new(),I.$$addScopeInfo(ti(l),u)):u=e,h=a.transcludeOnThisElement?O(e,a.transclude,o,a.elementTranscludeOnThisElement):!a.templateOnThisElement&&o?o:!o&&t?O(e,t):null,a(s,u,l,r,h)):s&&s(e,l.childNodes,n,o)}for(var l,u,c,d,p,h,f,g=[],m=0;m<e.length;m++)l=new ae,u=L(e[m],[],l,0===m?r:n,o),c=u.length?U(u,e[m],l,t,i,null,[],[],a):null,c&&c.scope&&I.$$addScopeClass(l.$$element),p=c&&c.terminal||!(d=e[m].childNodes)||!d.length?null:A(d,c?(c.transcludeOnThisElement||!c.templateOnThisElement)&&c.transclude:t),(c||p)&&(g.push(m,c,p),h=!0,f=f||c),a=null;return h?s:null}function O(e,t,n,i){var r=function(i,r,o,a,s){return i||(i=e.$new(!1,s),i.$$transcluded=!0),t(i,r,{parentBoundTranscludeFn:n,transcludeControllers:o,futureParentElement:a})};return r}function L(e,t,n,i,r){var o,a,s=e.nodeType,l=n.$attr;switch(s){case bi:z(t,Qe(j(e)),"E",i,r);for(var u,d,h,f,g,m,v=e.attributes,y=0,x=v&&v.length;x>y;y++){var k=!1,C=!1;u=v[y],d=u.name,g=hi(u.value),f=Qe(d),(m=de.test(f))&&(d=d.replace(Ki,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var S=f.replace(/(Start|End)$/,"");W(S)&&f===S+"Start"&&(k=d,C=d.substr(0,d.length-5)+"end",d=d.substr(0,d.length-6)),h=Qe(d.toLowerCase()),l[h]=d,(m||!n.hasOwnProperty(h))&&(n[h]=g,Oe(e,h)&&(n[h]=!0)),ee(e,t,g,h,m),z(t,h,"A",i,r,k,C)}if(a=e.className,b(a)&&(a=a.animVal),w(a)&&""!==a)for(;o=p.exec(a);)h=Qe(o[2]),z(t,h,"C",i,r)&&(n[h]=hi(o[3])),a=a.substr(o.index+o[0].length);break;case xi:K(t,e.nodeValue);break;case ki:try{o=c.exec(e.nodeValue),o&&(h=Qe(o[1]),z(t,h,"M",i,r)&&(n[h]=hi(o[2])))}catch(_){}}return t.sort(X),t}function F(e,t,n){var i=[],r=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Yi("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==bi&&(e.hasAttribute(t)&&r++,e.hasAttribute(n)&&r--),i.push(e),e=e.nextSibling}while(r>0)}else i.push(e);return ti(i)}function H(e,t,n){return function(i,r,o,a,s){return r=F(r[0],t,n),e(i,r,o,a,s)}}function U(e,a,s,u,c,d,p,h,f){function g(e,t,n,i){e&&(n&&(e=H(e,n,i)),e.require=_.require,e.directiveName=$,(j===_||_.$$isolateScope)&&(e=ie(e,{isolateScope:!0})),p.push(e)),t&&(n&&(t=H(t,n,i)),t.require=_.require,t.directiveName=$,(j===_||_.$$isolateScope)&&(t=ie(t,{isolateScope:!0})),h.push(t))}function v(e,t,n,i){var r,a,s="data",l=!1,u=n;if(w(t)){if(a=t.match(x),t=t.substring(a[0].length),a[3]&&(a[1]?a[3]=null:a[1]=a[3]),"^"===a[1]?s="inheritedData":"^^"===a[1]&&(s="inheritedData",u=n.parent()),"?"===a[2]&&(l=!0),r=null,i&&"data"===s&&(r=i[t])&&(r=r.instance),r=r||u[s]("$"+t+"Controller"),!r&&!l)throw Yi("ctreq","Controller '{0}', required by directive '{1}', can't be found!",t,e);return r||null}return pi(t)&&(r=[],o(t,function(t){r.push(v(e,t,n,i))})),r}function y(e,t,r,u,c){function d(e,t,i){var r;return T(e)||(i=t,t=e,e=n),W&&(r=x),i||(i=W?C.parent():C),c(e,t,r,i,D)}var f,g,y,b,w,x,k,C,_;if(a===r?(_=s,C=s.$$element):(C=ti(r),_=new ae(C,s)),j&&(w=t.$new(!0)),c&&(k=d,k.$$boundTransclude=c),A&&(S={},x={},o(A,function(e){var n,i={$scope:e===j||e.$$isolateScope?w:t,$element:C,$attrs:_,$transclude:k};b=e.controller,"@"==b&&(b=_[e.name]),n=m(b,i,!0,e.controllerAs),x[e.name]=n,W||C.data("$"+e.name+"Controller",n.instance),S[e.name]=n})),j){I.$$addScopeInfo(C,w,!0,!(N&&(N===j||N===j.$$originalDirective))),I.$$addScopeClass(C,!0);var $=S&&S[j.name],E=w;$&&$.identifier&&j.bindToController===!0&&(E=$.instance),o(w.$$isolateBindings=j.$$isolateBindings,function(e,n){var r,o,a,s,u=e.attrName,c=e.optional,d=e.mode;switch(d){case"@":_.$observe(u,function(e){E[n]=e}),_.$$observers[u].$$scope=t,_[u]&&(E[n]=i(_[u])(t));break;case"=":if(c&&!_[u])return;o=l(_[u]),s=o.literal?R:function(e,t){return e===t||e!==e&&t!==t},a=o.assign||function(){throw r=E[n]=o(t),Yi("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",_[u],j.name)},r=E[n]=o(t);var p=function(e){return s(e,E[n])||(s(e,r)?a(t,e=E[n]):E[n]=e),r=e};p.$stateful=!0;var h;h=e.collection?t.$watchCollection(_[u],p):t.$watch(l(_[u],p),null,o.literal),w.$on("$destroy",h);break;case"&":o=l(_[u]),E[n]=function(e){return o(t,e)}}})}for(S&&(o(S,function(e){e()}),S=null),f=0,g=p.length;g>f;f++)y=p[f],oe(y,y.isolateScope?w:t,C,_,y.require&&v(y.directiveName,y.require,C,x),k);var D=t;for(j&&(j.template||null===j.templateUrl)&&(D=w),e&&e(D,r.childNodes,n,c),f=h.length-1;f>=0;f--)y=h[f],oe(y,y.isolateScope?w:t,C,_,y.require&&v(y.directiveName,y.require,C,x),k)}f=f||{};for(var k,S,_,$,E,D,M,P=-Number.MAX_VALUE,A=f.controllerDirectives,j=f.newIsolateScopeDirective,N=f.templateDirective,O=f.nonTlbTranscludeDirective,U=!1,z=!1,W=f.hasElementTranscludeDirective,X=s.$$element=ti(a),K=d,Z=u,ee=0,ne=e.length;ne>ee;ee++){_=e[ee];var re=_.$$start,se=_.$$end;if(re&&(X=F(a,re,se)),E=n,P>_.priority)break;if((M=_.scope)&&(_.templateUrl||(b(M)?(Y("new/isolated scope",j||k,_,X),j=_):Y("new/isolated scope",j,_,X)),k=k||_),$=_.name,!_.templateUrl&&_.controller&&(M=_.controller,A=A||{},Y("'"+$+"' controller",A[$],_,X),A[$]=_),(M=_.transclude)&&(U=!0,_.$$tlb||(Y("transclusion",O,_,X),O=_),"element"==M?(W=!0,P=_.priority,E=X,X=s.$$element=ti(t.createComment(" "+$+": "+s[$]+" ")),a=X[0],te(c,q(E),a),Z=I(E,u,P,K&&K.name,{nonTlbTranscludeDirective:O})):(E=ti(xe(a)).contents(),X.empty(),Z=I(E,u))),_.template)if(z=!0,Y("template",N,_,X),N=_,M=C(_.template)?_.template(X,s):_.template,M=ce(M),_.replace){if(K=_,E=me(M)?[]:et(Q(_.templateNamespace,hi(M))),a=E[0],1!=E.length||a.nodeType!==bi)throw Yi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",$,"");te(c,X,a);var le={$attr:{}},ue=L(a,[],le),de=e.splice(ee+1,e.length-(ee+1));j&&B(ue),e=e.concat(ue).concat(de),G(s,le),ne=e.length}else X.html(M);if(_.templateUrl)z=!0,Y("template",N,_,X),N=_,_.replace&&(K=_),y=J(e.splice(ee,e.length-ee),X,s,c,U&&Z,p,h,{controllerDirectives:A,newIsolateScopeDirective:j,templateDirective:N,nonTlbTranscludeDirective:O}),ne=e.length;else if(_.compile)try{D=_.compile(X,s,Z),C(D)?g(null,D,re,se):D&&g(D.pre,D.post,re,se)}catch(pe){r(pe,V(X))}_.terminal&&(y.terminal=!0,P=Math.max(P,_.priority))}return y.scope=k&&k.scope===!0,y.transcludeOnThisElement=U,y.elementTranscludeOnThisElement=W,y.templateOnThisElement=z,y.transclude=Z,f.hasElementTranscludeDirective=W,y}function B(e){for(var t=0,n=e.length;n>t;t++)e[t]=h(e[t],{$$isolateScope:!0})}function z(t,i,o,a,l,c,d){if(i===l)return null;var p=null;if(s.hasOwnProperty(i))for(var f,g=e.get(i+u),m=0,v=g.length;v>m;m++)try{f=g[m],(a===n||a>f.priority)&&-1!=f.restrict.indexOf(o)&&(c&&(f=h(f,{$$start:c,$$end:d})),t.push(f),p=f)}catch(y){r(y)}return p}function W(t){if(s.hasOwnProperty(t))for(var n,i=e.get(t+u),r=0,o=i.length;o>r;r++)if(n=i[r],n.multiElement)return!0;return!1}function G(e,t){var n=t.$attr,i=e.$attr,r=e.$$element;o(e,function(i,r){"$"!=r.charAt(0)&&(t[r]&&t[r]!==i&&(i+=("style"===r?";":" ")+t[r]),e.$set(r,i,!0,n[r]))}),o(t,function(t,o){"class"==o?(M(r,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):"style"==o?(r.attr("style",r.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==o.charAt(0)||e.hasOwnProperty(o)||(e[o]=t,i[o]=n[o])})}function J(e,t,n,i,r,s,l,u){var c,d,p=[],f=t[0],g=e.shift(),m=h(g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),v=C(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,y=g.templateNamespace;return t.empty(),a(v).then(function(a){var h,w,x,k;if(a=ce(a),g.replace){if(x=me(a)?[]:et(Q(y,hi(a))),h=x[0],1!=x.length||h.nodeType!==bi)throw Yi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,v);w={$attr:{}},te(i,t,h);var C=L(h,[],w);b(g.scope)&&B(C),e=C.concat(e),G(n,w)}else h=f,t.html(a);for(e.unshift(m),c=U(e,h,n,r,t,g,s,l,u),o(i,function(e,n){e==h&&(i[n]=t[0])}),d=A(t[0].childNodes,r);p.length;){var S=p.shift(),_=p.shift(),T=p.shift(),$=p.shift(),E=t[0];if(!S.$$destroyed){if(_!==f){var D=_.className;u.hasElementTranscludeDirective&&g.replace||(E=xe(h)),te(T,ti(_),E),M(ti(E),D)}k=c.transcludeOnThisElement?O(S,c.transclude,$):$,c(d,S,E,i,k)}}p=null}),function(e,t,n,i,r){var o=r;t.$$destroyed||(p?p.push(t,n,i,o):(c.transcludeOnThisElement&&(o=O(t,c.transclude,r)),c(d,t,n,i,o)))}}function X(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function Y(e,t,n,i){if(t)throw Yi("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}",t.name,n.name,e,V(i))}function K(e,t){var n=i(t,!0);n&&e.push({priority:0,compile:function(e){var t=e.parent(),i=!!t.length;return i&&I.$$addBindingClass(t),function(e,t){var r=t.parent();i||I.$$addBindingClass(r),I.$$addBindingInfo(r,n.expressions),e.$watch(n,function(e){t[0].nodeValue=e})}}})}function Q(e,n){switch(e=Xn(e||"html")){case"svg":case"math":var i=t.createElement("div");return i.innerHTML="<"+e+">"+n+"</"+e+">",i.childNodes[0].childNodes;default:return n}}function Z(e,t){if("srcdoc"==t)return $.HTML;var n=j(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?$.RESOURCE_URL:void 0}function ee(e,t,n,r,o){var a=Z(e,r);o=v[r]||o;var s=i(n,!0,a,o);if(s){if("multiple"===r&&"select"===j(e))throw Yi("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",V(e));t.push({priority:100,compile:function(){return{pre:function(e,t,l){var u=l.$$observers||(l.$$observers={});if(k.test(r))throw Yi("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=l[r];c!==n&&(s=c&&i(c,!0,a,o),n=c),s&&(l[r]=s(e),(u[r]||(u[r]=[])).$$inter=!0,(l.$$observers&&l.$$observers[r].$$scope||e).$watch(s,function(e,t){"class"===r&&e!=t?l.$updateClass(e,t):l.$set(r,e)}))}}}})}}function te(e,n,i){var r,o,a=n[0],s=n.length,l=a.parentNode;if(e)for(r=0,o=e.length;o>r;r++)if(e[r]==a){e[r++]=i;for(var u=r,c=u+s-1,d=e.length;d>u;u++,c++)d>c?e[u]=e[c]:delete e[u];e.length-=s-1,e.context===a&&(e.context=i);break}l&&l.replaceChild(i,a);var p=t.createDocumentFragment();p.appendChild(a),ti(i).data(ti(a).data()),ni?(di=!0,ni.cleanData([a])):delete ti.cache[a[ti.expando]];for(var h=1,f=n.length;f>h;h++){var g=n[h];ti(g).remove(),p.appendChild(g),delete n[h]}n[0]=i,n.length=1}function ie(e,t){return d(function(){return e.apply(null,arguments)},e,t)}function oe(e,t,n,i,o,a){try{e(t,n,i,o,a)}catch(s){r(s,V(n))}}var ae=function(e,t){if(t){var n,i,r,o=Object.keys(t);for(n=0,i=o.length;i>n;n++)r=o[n],this[r]=t[r]}else this.$attr={};this.$$element=e};ae.prototype={$normalize:Qe,$addClass:function(e){e&&e.length>0&&E.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&E.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=Ze(e,t);n&&n.length&&E.addClass(this.$$element,n);var i=Ze(t,e);i&&i.length&&E.removeClass(this.$$element,i)},$set:function(e,t,i,a){var s,l=this.$$element[0],u=Oe(l,e),c=Le(l,e),d=e;if(u?(this.$$element.prop(e,t),a=u):c&&(this[c]=t,d=c),this[e]=t,a?this.$attr[e]=a:(a=this.$attr[e],a||(this.$attr[e]=a=ne(e,"-"))),s=j(this.$$element),"a"===s&&"href"===e||"img"===s&&"src"===e)this[e]=t=D(t,"src"===e);else if("img"===s&&"srcset"===e){for(var p="",h=hi(t),f=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,g=/\s/.test(h)?f:/(,)/,m=h.split(g),v=Math.floor(m.length/2),y=0;v>y;y++){var b=2*y;p+=D(hi(m[b]),!0),p+=" "+hi(m[b+1])}var w=hi(m[2*y]).split(/\s/);p+=D(hi(w[0]),!0),2===w.length&&(p+=" "+hi(w[1])),this[e]=t=p}i!==!1&&(null===t||t===n?this.$$element.removeAttr(a):this.$$element.attr(a,t));var x=this.$$observers;x&&o(x[d],function(e){try{e(t)}catch(n){r(n)}})},$observe:function(e,t){var n=this,i=n.$$observers||(n.$$observers=ue()),r=i[e]||(i[e]=[]);return r.push(t),y.$evalAsync(function(){!r.$$inter&&n.hasOwnProperty(e)&&t(n[e])}),function(){N(r,t)}}};var se=i.startSymbol(),le=i.endSymbol(),ce="{{"==se||"}}"==le?g:function(e){return e.replace(/\{\{/g,se).replace(/}}/g,le)},de=/^ngAttr[A-Z]/;return I.$$addBindingInfo=S?function(e,t){var n=e.data("$binding")||[];pi(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:f,I.$$addBindingClass=S?function(e){M(e,"ng-binding")}:f,I.$$addScopeInfo=S?function(e,t,n,i){var r=n?i?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(r,t)}:f,I.$$addScopeClass=S?function(e,t){M(e,t?"ng-isolate-scope":"ng-scope")}:f,I}]}function Qe(e){return ge(e.replace(Ki,""))}function Ze(e,t){var n="",i=e.split(/\s+/),r=t.split(/\s+/);e:for(var o=0;o<i.length;o++){for(var a=i[o],s=0;s<r.length;s++)if(a==r[s])continue e;n+=(n.length>0?" ":"")+a}return n}function et(e){e=ti(e);var t=e.length;if(1>=t)return e;for(;t--;){var n=e[t];n.nodeType===ki&&oi.call(e,t,1)}return e}function tt(){var e={},t=!1,r=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(t,n){ae(t,"controller"),b(t)?d(e,t):e[t]=n},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(o,a){function s(e,t,n,r){if(!e||!b(e.$scope))throw i("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `+"`"+`locals`+"`"+`.",r,t);e.$scope[t]=n}return function(i,l,u,c){var p,h,f,g;if(u=u===!0,c&&w(c)&&(g=c),w(i)){if(h=i.match(r),!h)throw Qi("ctrlfmt","Badly formed controller string '{0}'. Must match `+"`"+`__name__ as __id__`+"`"+` or `+"`"+`__name__`+"`"+`.",i);f=h[1],g=g||h[3],i=e.hasOwnProperty(f)?e[f]:se(l.$scope,f,!0)||(t?se(a,f,!0):n),oe(i,f,!0)}if(u){var m=(pi(i)?i[i.length-1]:i).prototype;return p=Object.create(m||null),g&&s(l,g,p,f||i.name),d(function(){return o.invoke(i,p,l,f),p},{instance:p,identifier:g})}return p=o.instantiate(i,l,f),g&&s(l,g,p,f||i.name),p}}]}function nt(){this.$get=["$window",function(e){return ti(e.document)}]}function it(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function rt(e,t){if(w(e)){var n=e.replace(ir,"").trim();if(n){var i=t("Content-Type");(i&&0===i.indexOf(Zi)||ot(n))&&(e=z(n))}}return e}function ot(e){var t=e.match(tr);return t&&nr[t[0]].test(e)}function at(e){var t,n,i,r=ue();return e?(o(e.split("\n"),function(e){i=e.indexOf(":"),t=Xn(hi(e.substr(0,i))),n=hi(e.substr(i+1)),t&&(r[t]=r[t]?r[t]+", "+n:n)}),r):r}function st(e){var t=b(e)?e:n;return function(n){if(t||(t=at(e)),n){var i=t[Xn(n)];return void 0===i&&(i=null),i}return t}}function lt(e,t,n,i){return C(i)?i(e,t,n):(o(i,function(i){e=i(e,t,n)}),e)}function ut(e){return e>=200&&300>e}function ct(){var e=this.defaults={transformResponse:[rt],transformRequest:[function(e){return!b(e)||$(e)||D(e)||E(e)?e:B(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:L(er),put:L(er),patch:L(er)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},t=!1;this.useApplyAsync=function(e){return y(e)?(t=!!e,this):t};var r=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,l,u,c,p,h){function f(t){function r(e){var t=d({},e);return e.data?t.data=lt(e.data,e.headers,e.status,l.transformResponse):t.data=e.data,ut(e.status)?t:p.reject(t)}function a(e){var t,n={};return o(e,function(e,i){C(e)?(t=e(),null!=t&&(n[i]=t)):n[i]=e}),n}function s(t){var n,i,r,o=e.headers,s=d({},t.headers);o=d({},o.common,o[Xn(t.method)]);e:for(n in o){i=Xn(n);for(r in s)if(Xn(r)===i)continue e;s[n]=o[n]}return a(s)}if(!ui.isObject(t))throw i("$http")("badreq","Http request configuration must be an object. Received: {0}",t);var l=d({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse},t);l.headers=s(t),l.method=Kn(l.method);var u=function(t){var i=t.headers,a=lt(t.data,st(i),n,t.transformRequest);return v(a)&&o(i,function(e,t){"content-type"===Xn(t)&&delete i[t]}),v(t.withCredentials)&&!v(e.withCredentials)&&(t.withCredentials=e.withCredentials),x(t,a).then(r,r)},c=[u,n],h=p.when(l);for(o(T,function(e){(e.request||e.requestError)&&c.unshift(e.request,e.requestError),(e.response||e.responseError)&&c.push(e.response,e.responseError)});c.length;){var f=c.shift(),g=c.shift();h=h.then(f,g)}return h.success=function(e){return oe(e,"fn"),h.then(function(t){e(t.data,t.status,t.headers,l)}),h},h.error=function(e){return oe(e,"fn"),h.then(null,function(t){e(t.data,t.status,t.headers,l)}),h},h}function g(e){o(arguments,function(e){f[e]=function(t,n){return f(d(n||{},{method:e,url:t}))}})}function m(e){o(arguments,function(e){f[e]=function(t,n,i){return f(d(i||{},{method:e,url:t,data:n}))}})}function x(i,r){function o(e,n,i,r){function o(){s(n,e,i,r)}h&&(ut(e)?h.put(k,[e,n,at(i),r]):h.remove(k)),t?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function s(e,t,n,r){t=Math.max(t,0),(ut(t)?m.resolve:m.reject)({data:e,status:t,headers:st(n),config:i,statusText:r})}function u(e){s(e.data,e.status,L(e.headers()),e.statusText)}function d(){var e=f.pendingRequests.indexOf(i);-1!==e&&f.pendingRequests.splice(e,1)}var h,g,m=p.defer(),w=m.promise,x=i.headers,k=S(i.url,i.params);if(f.pendingRequests.push(i),w.then(d,d),!i.cache&&!e.cache||i.cache===!1||"GET"!==i.method&&"JSONP"!==i.method||(h=b(i.cache)?i.cache:b(e.cache)?e.cache:_),h&&(g=h.get(k),y(g)?I(g)?g.then(u,u):pi(g)?s(g[1],g[0],L(g[2]),g[3]):s(g,200,{},"OK"):h.put(k,w)),v(g)){var C=on(i.url)?l.cookies()[i.xsrfCookieName||e.xsrfCookieName]:n;C&&(x[i.xsrfHeaderName||e.xsrfHeaderName]=C),a(i.method,k,r,o,x,i.timeout,i.withCredentials,i.responseType)}return w}function S(e,t){if(!t)return e;var n=[];return s(t,function(e,t){null===e||v(e)||(pi(e)||(e=[e]),o(e,function(e){b(e)&&(e=k(e)?e.toISOString():B(e)),n.push(Y(t)+"="+Y(e))}))}),n.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+n.join("&")),e}var _=u("$http"),T=[];return o(r,function(e){T.unshift(w(e)?h.get(e):h.invoke(e))}),f.pendingRequests=[],g("get","delete","head","jsonp"),m("post","put","patch"),f.defaults=e,f}]}function dt(){return new e.XMLHttpRequest}function pt(){this.$get=["$browser","$window","$document",function(e,t,n){return ht(e,dt,e.defer,t.angular.callbacks,n[0])}]}function ht(e,t,i,r,a){function s(e,t,n){var i=a.createElement("script"),o=null;return i.type="text/javascript",i.src=e,i.async=!0,o=function(e){Di(i,"load",o),Di(i,"error",o),a.body.removeChild(i),i=null;var s=-1,l="unknown";e&&("load"!==e.type||r[t].called||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},Ei(i,"load",o),Ei(i,"error",o),a.body.appendChild(i),o}return function(a,l,u,c,d,p,h,g){function m(){w&&w(),x&&x.abort()}function v(t,r,o,a,s){S!==n&&i.cancel(S),w=x=null,t(r,o,a,s),e.$$completeOutstandingRequest(f)}if(e.$$incOutstandingRequestCount(),l=l||e.url(),"jsonp"==Xn(a)){var b="_"+(r.counter++).toString(36);r[b]=function(e){r[b].data=e,r[b].called=!0};var w=s(l.replace("JSON_CALLBACK","angular.callbacks."+b),b,function(e,t){v(c,e,r[b].data,"",t),r[b]=f})}else{var x=t();x.open(a,l,!0),o(d,function(e,t){y(e)&&x.setRequestHeader(t,e)}),x.onload=function(){var e=x.statusText||"",t="response"in x?x.response:x.responseText,n=1223===x.status?204:x.status;0===n&&(n=t?200:"file"==rn(l).protocol?404:0),v(c,n,t,x.getAllResponseHeaders(),e)};var k=function(){v(c,-1,null,null,"")};if(x.onerror=k,x.onabort=k,h&&(x.withCredentials=!0),g)try{x.responseType=g}catch(C){if("json"!==g)throw C}x.send(u||null)}if(p>0)var S=i(m,p);else I(p)&&p.then(m)}}function ft(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,i,r){function o(e){return"\\\\\\"+e}function a(o,a,p,h){function f(n){return n.replace(u,e).replace(c,t)}function g(e){try{return e=D(e),h&&!y(e)?e:M(e)}catch(t){var n=rr("interr","Can't interpolate: {0}\n{1}",o,t.toString());i(n)}}h=!!h;for(var m,b,w,x=0,k=[],S=[],_=o.length,T=[],$=[];_>x;){if(-1==(m=o.indexOf(e,x))||-1==(b=o.indexOf(t,m+s))){x!==_&&T.push(f(o.substring(x)));break}x!==m&&T.push(f(o.substring(x,m))),w=o.substring(m+s,b),k.push(w),S.push(n(w,g)),x=b+l,$.push(T.length),T.push("")}if(p&&T.length>1)throw rr("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",o);if(!a||k.length){var E=function(e){for(var t=0,n=k.length;n>t;t++){if(h&&v(e[t]))return;T[$[t]]=e[t]}return T.join("")},D=function(e){return p?r.getTrusted(p,e):r.valueOf(e)},M=function(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=B(e)}return e};return d(function(e){var t=0,n=k.length,r=new Array(n);try{for(;n>t;t++)r[t]=S[t](e);return E(r)}catch(a){var s=rr("interr","Can't interpolate: {0}\n{1}",o,a.toString());i(s)}},{exp:o,expressions:k,$$watchDelegate:function(e,t,n){var i;return e.$watchGroup(S,function(n,r){var o=E(n);C(t)&&t.call(this,o,n!==r?i:o,e),i=o},n)}})}}var s=e.length,l=t.length,u=new RegExp(e.replace(/./g,o),"g"),c=new RegExp(t.replace(/./g,o),"g");return a.startSymbol=function(){return e},a.endSymbol=function(){return t},a}]}function gt(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,i){function r(r,a,s,l){var u=t.setInterval,c=t.clearInterval,d=0,p=y(l)&&!l,h=(p?i:n).defer(),f=h.promise;return s=y(s)?s:0,f.then(null,null,r),f.$$intervalId=u(function(){h.notify(d++),s>0&&d>=s&&(h.resolve(d),c(f.$$intervalId),delete o[f.$$intervalId]),p||e.$apply()},a),o[f.$$intervalId]=h,f}var o={};return r.cancel=function(e){return e&&e.$$intervalId in o?(o[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete o[e.$$intervalId],!0):!1},r}]}function mt(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a",ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"]},pluralCat:function(e){return 1===e?"one":"other"}}}}function vt(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=X(t[n]);return t.join("/")}function yt(e,t){var n=rn(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=p(n.port)||ar[n.protocol]||null}function bt(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var i=rn(e);t.$$path=decodeURIComponent(n&&"/"===i.pathname.charAt(0)?i.pathname.substring(1):i.pathname),t.$$search=G(i.search),t.$$hash=decodeURIComponent(i.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function wt(e,t){return 0===t.indexOf(e)?t.substr(e.length):void 0}function xt(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function kt(e){return e.replace(/(#.+)|#$/,"$1")}function Ct(e){return e.substr(0,xt(e).lastIndexOf("/")+1)}function St(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function _t(e,t){this.$$html5=!0,t=t||"";var i=Ct(e);yt(e,this),this.$$parse=function(e){var t=wt(i,e);if(!w(t))throw sr("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,i);bt(t,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=J(this.$$search),t=this.$$hash?"#"+X(this.$$hash):"";this.$$url=vt(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=i+this.$$url.substr(1)},this.$$parseLinkUrl=function(r,o){if(o&&"#"===o[0])return this.hash(o.slice(1)),!0;var a,s,l;return(a=wt(e,r))!==n?(s=a,l=(a=wt(t,a))!==n?i+(wt("/",a)||a):e+s):(a=wt(i,r))!==n?l=i+a:i==r+"/"&&(l=i),l&&this.$$parse(l),!!l}}function Tt(e,t){var n=Ct(e);yt(e,this),this.$$parse=function(i){function r(e,t,n){var i,r=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),r.exec(t)?e:(i=r.exec(e),i?i[1]:e)}var o,a=wt(e,i)||wt(n,i);v(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",v(a)&&(e=i,this.replace())):(o=wt(t,a),v(o)&&(o=a)),bt(o,this),this.$$path=r(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var n=J(this.$$search),i=this.$$hash?"#"+X(this.$$hash):"";this.$$url=vt(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return xt(e)==xt(t)?(this.$$parse(t),!0):!1}}function $t(e,t){this.$$html5=!0,Tt.apply(this,arguments);var n=Ct(e);this.$$parseLinkUrl=function(i,r){if(r&&"#"===r[0])return this.hash(r.slice(1)),!0;var o,a;return e==xt(i)?o=i:(a=wt(n,i))?o=e+t+a:n===i+"/"&&(o=n),o&&this.$$parse(o),!!o},this.$$compose=function(){var n=J(this.$$search),i=this.$$hash?"#"+X(this.$$hash):"";this.$$url=vt(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=e+t+this.$$url}}function Et(e){return function(){return this[e]}}function Dt(e,t){return function(n){return v(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Mt(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return y(t)?(e=t,this):e},this.html5Mode=function(e){return M(e)?(t.enabled=e,this):b(e)?(M(e.enabled)&&(t.enabled=e.enabled),M(e.requireBase)&&(t.requireBase=e.requireBase),M(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,i,r,o,a){function s(e,t,n){var r=u.url(),o=u.$$state;try{i.url(e,t,n),u.$$state=i.state()}catch(a){throw u.url(r),u.$$state=o,a}}function l(e,t){n.$broadcast("$locationChangeSuccess",u.absUrl(),e,u.$$state,t)}var u,c,d,p=i.baseHref(),h=i.url();if(t.enabled){if(!p&&t.requireBase)throw sr("nobase","$location in HTML5 mode requires a <base> tag to be present!");d=St(h)+(p||"/"),c=r.history?_t:$t}else d=xt(h),c=Tt;u=new c(d,"#"+e),u.$$parseLinkUrl(h,h),u.$$state=i.state();var f=/^\s*(javascript|mailto):/i;o.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var r=ti(e.target);"a"!==j(r[0]);)if(r[0]===o[0]||!(r=r.parent())[0])return;var s=r.prop("href"),l=r.attr("href")||r.attr("xlink:href");b(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=rn(s.animVal).href),f.test(s)||!s||r.attr("target")||e.isDefaultPrevented()||u.$$parseLinkUrl(s,l)&&(e.preventDefault(),u.absUrl()!=i.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),kt(u.absUrl())!=kt(h)&&i.url(u.absUrl(),!0);var g=!0;return i.onUrlChange(function(e,t){n.$evalAsync(function(){var i,r=u.absUrl(),o=u.$$state;u.$$parse(e),u.$$state=t,i=n.$broadcast("$locationChangeStart",e,r,t,o).defaultPrevented,u.absUrl()===e&&(i?(u.$$parse(r),u.$$state=o,s(r,!1,o)):(g=!1,l(r,o)))}),n.$$phase||n.$digest()}),n.$watch(function(){var e=kt(i.url()),t=kt(u.absUrl()),o=i.state(),a=u.$$replace,c=e!==t||u.$$html5&&r.history&&o!==u.$$state;(g||c)&&(g=!1,n.$evalAsync(function(){var t=u.absUrl(),i=n.$broadcast("$locationChangeStart",t,e,u.$$state,o).defaultPrevented;u.absUrl()===t&&(i?(u.$$parse(e),u.$$state=o):(c&&s(t,a,o===u.$$state?null:u.$$state),l(e,o)))})),u.$$replace=!1}),u}]}function It(){var e=!0,t=this;this.debugEnabled=function(t){return y(t)?(e=t,this):e},this.$get=["$window",function(n){function i(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function r(e){var t=n.console||{},r=t[e]||t.log||f,a=!1;try{a=!!r.apply}catch(s){}return a?function(){var e=[];return o(arguments,function(t){e.push(i(t))}),r.apply(t,e)}:function(e,t){r(e,null==t?"":t)}}return{log:r("log"),info:r("info"),warn:r("warn"),error:r("error"),debug:function(){var n=r("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function Pt(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw ur("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function At(e,t){if(e){if(e.constructor===e)throw ur("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw ur("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw ur("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw ur("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t);
|
|
3215
|
|
-}return e}function jt(e,t){if(e){if(e.constructor===e)throw ur("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===cr||e===dr||e===pr)throw ur("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Nt(e){return e.constant}function Ot(e,t,n,i,r){At(e,r),At(t,r);for(var o,a=n.split("."),s=0;a.length>1;s++){o=Pt(a.shift(),r);var l=0===s&&t&&t[o]||e[o];l||(l={},e[o]=l),e=At(l,r)}return o=Pt(a.shift(),r),At(e[o],r),e[o]=i,i}function Lt(e){return"constructor"==e}function Rt(e,t,i,r,o,a,s){Pt(e,a),Pt(t,a),Pt(i,a),Pt(r,a),Pt(o,a);var l=function(e){return At(e,a)},u=s||Lt(e)?l:g,c=s||Lt(t)?l:g,d=s||Lt(i)?l:g,p=s||Lt(r)?l:g,h=s||Lt(o)?l:g;return function(a,s){var l=s&&s.hasOwnProperty(e)?s:a;return null==l?l:(l=u(l[e]),t?null==l?n:(l=c(l[t]),i?null==l?n:(l=d(l[i]),r?null==l?n:(l=p(l[r]),o?null==l?n:l=h(l[o]):l):l):l):l)}}function Ft(e,t){return function(n,i){return e(n,i,At,t)}}function qt(e,t,i){var r=t.expensiveChecks,a=r?br:yr,s=a[e];if(s)return s;var l=e.split("."),u=l.length;if(t.csp)s=6>u?Rt(l[0],l[1],l[2],l[3],l[4],i,r):function(e,t){var o,a=0;do o=Rt(l[a++],l[a++],l[a++],l[a++],l[a++],i,r)(e,t),t=n,e=o;while(u>a);return o};else{var c="";r&&(c+="s = eso(s, fe);\nl = eso(l, fe);\n");var d=r;o(l,function(e,t){Pt(e,i);var n=(t?"s":'((l&&l.hasOwnProperty("'+e+'"))?l:s)')+"."+e;(r||Lt(e))&&(n="eso("+n+", fe)",d=!0),c+="if(s == null) return undefined;\ns="+n+";\n"}),c+="return s;";var p=new Function("s","l","eso","fe",c);p.toString=m(c),d&&(p=Ft(p,i)),s=p}return s.sharedGetter=!0,s.assign=function(t,n,i){return Ot(t,i,e,n,e)},a[e]=s,s}function Ht(e){return C(e.valueOf)?e.valueOf():wr.call(e)}function Ut(){var e=ue(),t=ue();this.$get=["$filter","$sniffer",function(n,i){function r(e){var t=e;return e.sharedGetter&&(t=function(t,n){return e(t,n)},t.literal=e.literal,t.constant=e.constant,t.assign=e.assign),t}function a(e,t){for(var n=0,i=e.length;i>n;n++){var r=e[n];r.constant||(r.inputs?a(r.inputs,t):-1===t.indexOf(r)&&t.push(r))}return t}function s(e,t){return null==e||null==t?e===t:"object"==typeof e&&(e=Ht(e),"object"==typeof e)?!1:e===t||e!==e&&t!==t}function l(e,t,n,i){var r,o=i.$$inputs||(i.$$inputs=a(i.inputs,[]));if(1===o.length){var l=s;return o=o[0],e.$watch(function(e){var t=o(e);return s(t,l)||(r=i(e),l=t&&Ht(t)),r},t,n)}for(var u=[],c=0,d=o.length;d>c;c++)u[c]=s;return e.$watch(function(e){for(var t=!1,n=0,a=o.length;a>n;n++){var l=o[n](e);(t||(t=!s(l,u[n])))&&(u[n]=l&&Ht(l))}return t&&(r=i(e)),r},t,n)}function u(e,t,n,i){var r,o;return r=e.$watch(function(e){return i(e)},function(e,n,i){o=e,C(t)&&t.apply(this,arguments),y(e)&&i.$$postDigest(function(){y(o)&&r()})},n)}function c(e,t,n,i){function r(e){var t=!0;return o(e,function(e){y(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return i(e)},function(e,n,i){s=e,C(t)&&t.call(this,e,n,i),r(e)&&i.$$postDigest(function(){r(s)&&a()})},n)}function d(e,t,n,i){var r;return r=e.$watch(function(e){return i(e)},function(e,n,i){C(t)&&t.apply(this,arguments),r()},n)}function p(e,t){if(!t)return e;var n=e.$$watchDelegate,i=n!==c&&n!==u,r=i?function(n,i){var r=e(n,i);return t(r,n,i)}:function(n,i){var r=e(n,i),o=t(r,n,i);return y(r)?o:r};return e.$$watchDelegate&&e.$$watchDelegate!==l?r.$$watchDelegate=e.$$watchDelegate:t.$stateful||(r.$$watchDelegate=l,r.inputs=[e]),r}var h={csp:i.csp,expensiveChecks:!1},g={csp:i.csp,expensiveChecks:!0};return function(i,o,a){var s,m,v;switch(typeof i){case"string":v=i=i.trim();var y=a?t:e;if(s=y[v],!s){":"===i.charAt(0)&&":"===i.charAt(1)&&(m=!0,i=i.substring(2));var b=a?g:h,w=new mr(b),x=new vr(w,n,b);s=x.parse(i),s.constant?s.$$watchDelegate=d:m?(s=r(s),s.$$watchDelegate=s.literal?c:u):s.inputs&&(s.$$watchDelegate=l),y[v]=s}return p(s,o);case"function":return p(i,o);default:return p(f,o)}}}]}function Bt(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Vt(function(t){e.$evalAsync(t)},t)}]}function zt(){this.$get=["$browser","$exceptionHandler",function(e,t){return Vt(function(t){e.defer(t)},t)}]}function Vt(e,t){function r(e,t,n){function i(t){return function(n){r||(r=!0,t.call(e,n))}}var r=!1;return[i(t),i(n)]}function a(){this.$$state={status:0}}function s(e,t){return function(n){t.call(e,n)}}function l(e){var i,r,o;o=e.pending,e.processScheduled=!1,e.pending=n;for(var a=0,s=o.length;s>a;++a){r=o[a][0],i=o[a][e.status];try{C(i)?r.resolve(i(e.value)):1===e.status?r.resolve(e.value):r.reject(e.value)}catch(l){r.reject(l),t(l)}}}function u(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){l(t)}))}function c(){this.promise=new a,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function d(e){var t=new c,n=0,i=pi(e)?[]:{};return o(e,function(e,r){n++,v(e).then(function(e){i.hasOwnProperty(r)||(i[r]=e,--n||t.resolve(i))},function(e){i.hasOwnProperty(r)||t.reject(e)})}),0===n&&t.resolve(i),t.promise}var p=i("$q",TypeError),h=function(){return new c};a.prototype={then:function(e,t,n){var i=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([i,e,t,n]),this.$$state.status>0&&u(this.$$state),i.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return m(t,!0,e)},function(t){return m(t,!1,e)},t)}},c.prototype={resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(p("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var n,i;i=r(this,this.$$resolve,this.$$reject);try{(b(e)||C(e))&&(n=e&&e.then),C(n)?(this.promise.$$state.status=-1,n.call(e,i[0],i[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,u(this.promise.$$state))}catch(o){i[1](o),t(o)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,u(this.promise.$$state)},notify:function(n){var i=this.promise.$$state.pending;this.promise.$$state.status<=0&&i&&i.length&&e(function(){for(var e,r,o=0,a=i.length;a>o;o++){r=i[o][0],e=i[o][3];try{r.notify(C(e)?e(n):n)}catch(s){t(s)}}})}};var f=function(e){var t=new c;return t.reject(e),t.promise},g=function(e,t){var n=new c;return t?n.resolve(e):n.reject(e),n.promise},m=function(e,t,n){var i=null;try{C(n)&&(i=n())}catch(r){return g(r,!1)}return I(i)?i.then(function(){return g(e,t)},function(e){return g(e,!1)}):g(e,t)},v=function(e,t,n,i){var r=new c;return r.resolve(e),r.promise.then(t,n,i)},y=function w(e){function t(e){i.resolve(e)}function n(e){i.reject(e)}if(!C(e))throw p("norslvr","Expected resolverFn, got '{0}'",e);if(!(this instanceof w))return new w(e);var i=new c;return e(t,n),i.promise};return y.defer=h,y.reject=f,y.when=v,y.all=d,y}function Wt(){this.$get=["$window","$timeout",function(e,t){function n(){for(var e=0;e<c.length;e++){var t=c[e];t&&(c[e]=null,t())}u=c.length=0}function i(e){var t=c.length;return u++,c.push(e),0===t&&(l=s(n)),function(){t>=0&&(c[t]=null,t=null,0===--u&&l&&(l(),l=null,c.length=0))}}var r=e.requestAnimationFrame||e.webkitRequestAnimationFrame,o=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,a=!!r,s=a?function(e){var t=r(e);return function(){o(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};i.supported=a;var l,u=0,c=[];return i}]}function Gt(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$id=u(),this.$$ChildScope=null}return t.prototype=e,t}var t=10,n=i("$rootScope"),a=null,s=null;this.digestTtl=function(e){return arguments.length&&(t=e),t},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(i,l,c,d){function p(e){e.currentScope.$$destroyed=!0}function h(){this.$id=u(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings=null}function g(e){if(S.$$phase)throw n("inprog","{0} already in progress",S.$$phase);S.$$phase=e}function m(){S.$$phase=null}function y(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function w(){}function x(){for(;$.length;)try{$.shift()()}catch(e){l(e)}s=null}function k(){null===s&&(s=d.defer(function(){S.$apply(x)}))}h.prototype={constructor:h,$new:function(t,n){var i;return n=n||this,t?(i=new h,i.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(this)),i=new this.$$ChildScope),i.$parent=n,i.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=i,n.$$childTail=i):n.$$childHead=n.$$childTail=i,(t||n!=this)&&i.$on("$destroy",p),i},$watch:function(e,t,n){var i=c(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,n,i);var r=this,o=r.$$watchers,s={fn:t,last:w,get:i,exp:e,eq:!!n};return a=null,C(t)||(s.fn=f),o||(o=r.$$watchers=[]),o.unshift(s),function(){N(o,s),a=null}},$watchGroup:function(e,t){function n(){l=!1,u?(u=!1,t(r,r,s)):t(r,i,s)}var i=new Array(e.length),r=new Array(e.length),a=[],s=this,l=!1,u=!0;if(!e.length){var c=!0;return s.$evalAsync(function(){c&&t(r,r,s)}),function(){c=!1}}return 1===e.length?this.$watch(e[0],function(e,n,o){r[0]=e,i[0]=n,t(r,e===n?r:i,o)}):(o(e,function(e,t){var o=s.$watch(e,function(e,o){r[t]=e,i[t]=o,l||(l=!0,s.$evalAsync(n))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function n(e){o=e;var t,n,i,s,l;if(!v(o)){if(b(o))if(r(o)){a!==h&&(a=h,m=a.length=0,d++),t=o.length,m!==t&&(d++,a.length=m=t);for(var u=0;t>u;u++)l=a[u],s=o[u],i=l!==l&&s!==s,i||l===s||(d++,a[u]=s)}else{a!==f&&(a=f={},m=0,d++),t=0;for(n in o)o.hasOwnProperty(n)&&(t++,s=o[n],l=a[n],n in a?(i=l!==l&&s!==s,i||l===s||(d++,a[n]=s)):(m++,a[n]=s,d++));if(m>t){d++;for(n in a)o.hasOwnProperty(n)||(m--,delete a[n])}}else a!==o&&(a=o,d++);return d}}function i(){if(g?(g=!1,t(o,o,l)):t(o,s,l),u)if(b(o))if(r(o)){s=new Array(o.length);for(var e=0;e<o.length;e++)s[e]=o[e]}else{s={};for(var n in o)Yn.call(o,n)&&(s[n]=o[n])}else s=o}n.$stateful=!0;var o,a,s,l=this,u=t.length>1,d=0,p=c(e,n),h=[],f={},g=!0,m=0;return this.$watch(p,i)},$digest:function(){var e,i,r,o,u,c,p,h,f,v,y=t,b=this,k=[];g("$digest"),d.$$checkUrlChange(),this===S&&null!==s&&(d.defer.cancel(s),x()),a=null;do{for(c=!1,h=b;_.length;){try{v=_.shift(),v.scope.$eval(v.expression,v.locals)}catch($){l($)}a=null}e:do{if(o=h.$$watchers)for(u=o.length;u--;)try{if(e=o[u])if((i=e.get(h))===(r=e.last)||(e.eq?R(i,r):"number"==typeof i&&"number"==typeof r&&isNaN(i)&&isNaN(r))){if(e===a){c=!1;break e}}else c=!0,a=e,e.last=e.eq?O(i,null):i,e.fn(i,r===w?i:r,h),5>y&&(f=4-y,k[f]||(k[f]=[]),k[f].push({msg:C(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:i,oldVal:r}))}catch($){l($)}if(!(p=h.$$childHead||h!==b&&h.$$nextSibling))for(;h!==b&&!(p=h.$$nextSibling);)h=h.$parent}while(h=p);if((c||_.length)&&!y--)throw m(),n("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",t,k)}while(c||_.length);for(m();T.length;)try{T.shift()()}catch($){l($)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==S){for(var t in this.$$listenerCount)y(this,this.$$listenerCount[t],t);e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=f,this.$on=this.$watch=this.$watchGroup=function(){return f},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(e,t){return c(e)(this,t)},$evalAsync:function(e,t){S.$$phase||_.length||d.defer(function(){_.length&&S.$digest()}),_.push({scope:this,expression:e,locals:t})},$$postDigest:function(e){T.push(e)},$apply:function(e){try{return g("$apply"),this.$eval(e)}catch(t){l(t)}finally{m();try{S.$digest()}catch(t){throw l(t),t}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&$.push(t),k()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var i=this;do i.$$listenerCount[e]||(i.$$listenerCount[e]=0),i.$$listenerCount[e]++;while(i=i.$parent);var r=this;return function(){var i=n.indexOf(t);-1!==i&&(n[i]=null,y(r,1,e))}},$emit:function(e,t){var n,i,r,o=[],a=this,s=!1,u={name:e,targetScope:a,stopPropagation:function(){s=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},c=F([u],arguments,1);do{for(n=a.$$listeners[e]||o,u.currentScope=a,i=0,r=n.length;r>i;i++)if(n[i])try{n[i].apply(null,c)}catch(d){l(d)}else n.splice(i,1),i--,r--;if(s)return u.currentScope=null,u;a=a.$parent}while(a);return u.currentScope=null,u},$broadcast:function(e,t){var n=this,i=n,r=n,o={name:e,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[e])return o;for(var a,s,u,c=F([o],arguments,1);i=r;){for(o.currentScope=i,a=i.$$listeners[e]||[],s=0,u=a.length;u>s;s++)if(a[s])try{a[s].apply(null,c)}catch(d){l(d)}else a.splice(s,1),s--,u--;if(!(r=i.$$listenerCount[e]&&i.$$childHead||i!==n&&i.$$nextSibling))for(;i!==n&&!(r=i.$$nextSibling);)i=i.$parent}return o.currentScope=null,o}};var S=new h,_=S.$$asyncQueue=[],T=S.$$postDigestQueue=[],$=S.$$applyAsyncQueue=[];return S}]}function Jt(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return y(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return y(e)?(t=e,this):t},this.$get=function(){return function(n,i){var r,o=i?t:e;return r=rn(n).href,""===r||r.match(o)?n:"unsafe:"+r}}}function Xt(e){if("self"===e)return e;if(w(e)){if(e.indexOf("***")>-1)throw xr("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=fi(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(S(e))return new RegExp("^"+e.source+"$");throw xr("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Yt(e){var t=[];return y(e)&&o(e,function(e){t.push(Xt(e))}),t}function Kt(){this.SCE_CONTEXTS=kr;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Yt(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Yt(e)),t},this.$get=["$injector",function(i){function r(e,t){return"self"===e?on(t):!!e.exec(t.href)}function o(n){var i,o,a=rn(n.toString()),s=!1;for(i=0,o=e.length;o>i;i++)if(r(e[i],a)){s=!0;break}if(s)for(i=0,o=t.length;o>i;i++)if(r(t[i],a)){s=!1;break}return s}function a(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function s(e,t){var i=p.hasOwnProperty(e)?p[e]:null;if(!i)throw xr("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||t===n||""===t)return t;if("string"!=typeof t)throw xr("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new i(t)}function l(e){return e instanceof d?e.$$unwrapTrustedValue():e}function u(e,t){if(null===t||t===n||""===t)return t;var i=p.hasOwnProperty(e)?p[e]:null;if(i&&t instanceof i)return t.$$unwrapTrustedValue();if(e===kr.RESOURCE_URL){if(o(t))return t;throw xr("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===kr.HTML)return c(t);throw xr("unsafe","Attempting to use an unsafe value in a safe context.")}var c=function(e){throw xr("unsafe","Attempting to use an unsafe value in a safe context.")};i.has("$sanitize")&&(c=i.get("$sanitize"));var d=a(),p={};return p[kr.HTML]=a(d),p[kr.CSS]=a(d),p[kr.URL]=a(d),p[kr.JS]=a(d),p[kr.RESOURCE_URL]=a(p[kr.URL]),{trustAs:s,getTrusted:u,valueOf:l}}]}function Qt(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&8>ei)throw xr("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var i=L(kr);i.isEnabled=function(){return e},i.trustAs=n.trustAs,i.getTrusted=n.getTrusted,i.valueOf=n.valueOf,e||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=g),i.parseAs=function(e,n){var r=t(n);return r.literal&&r.constant?r:t(n,function(t){return i.getTrusted(e,t)})};var r=i.parseAs,a=i.getTrusted,s=i.trustAs;return o(kr,function(e,t){var n=Xn(t);i[ge("parse_as_"+n)]=function(t){return r(e,t)},i[ge("get_trusted_"+n)]=function(t){return a(e,t)},i[ge("trust_as_"+n)]=function(t){return s(e,t)}}),i}]}function Zt(){this.$get=["$window","$document",function(e,t){var n,i,r={},o=p((/android (\d+)/.exec(Xn((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,u=s.body&&s.body.style,c=!1,d=!1;if(u){for(var h in u)if(i=l.exec(h)){n=i[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),c=!!("transition"in u||n+"Transition"in u),d=!!("animation"in u||n+"Animation"in u),!o||c&&d||(c=w(s.body.style.webkitTransition),d=w(s.body.style.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||4>o||a),hasEvent:function(e){if("input"===e&&11>=ei)return!1;if(v(r[e])){var t=s.createElement("div");r[e]="on"+e in t}return r[e]},csp:gi(),vendorPrefix:n,transitions:c,animations:d,android:o}}]}function en(){this.$get=["$templateCache","$http","$q","$sce",function(e,t,n,i){function r(o,a){function s(e){if(!a)throw Yi("tpload","Failed to load template: {0}",o);return n.reject(e)}r.totalPendingRequests++,w(o)&&e.get(o)||(o=i.getTrustedResourceUrl(o));var l=t.defaults&&t.defaults.transformResponse;pi(l)?l=l.filter(function(e){return e!==rt}):l===rt&&(l=null);var u={cache:e,transformResponse:l};return t.get(o,u)["finally"](function(){r.totalPendingRequests--}).then(function(e){return e.data},s)}return r.totalPendingRequests=0,r}]}function tn(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var i={};return i.findBindings=function(e,t,n){var i=e.getElementsByClassName("ng-binding"),r=[];return o(i,function(e){var i=ui.element(e).data("$binding");i&&o(i,function(i){if(n){var o=new RegExp("(^|\\s)"+fi(t)+"(\\s|\\||$)");o.test(i)&&r.push(e)}else-1!=i.indexOf(t)&&r.push(e)})}),r},i.findModels=function(e,t,n){for(var i=["ng-","data-ng-","ng\\:"],r=0;r<i.length;++r){var o=n?"=":"*=",a="["+i[r]+"model"+o+'"'+t+'"]',s=e.querySelectorAll(a);if(s.length)return s}},i.getLocation=function(){return n.url()},i.setLocation=function(t){t!==n.url()&&(n.url(t),e.$digest())},i.whenStable=function(e){t.notifyWhenNoOutstandingRequests(e)},i}]}function nn(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,i,r){function o(o,s,l){var u,c=y(l)&&!l,d=(c?i:n).defer(),p=d.promise;return u=t.defer(function(){try{d.resolve(o())}catch(t){d.reject(t),r(t)}finally{delete a[p.$$timeoutId]}c||e.$apply()},s),p.$$timeoutId=u,a[u]=d,p}var a={};return o.cancel=function(e){return e&&e.$$timeoutId in a?(a[e.$$timeoutId].reject("canceled"),delete a[e.$$timeoutId],t.defer.cancel(e.$$timeoutId)):!1},o}]}function rn(e){var t=e;return ei&&(Cr.setAttribute("href",t),t=Cr.href),Cr.setAttribute("href",t),{href:Cr.href,protocol:Cr.protocol?Cr.protocol.replace(/:$/,""):"",host:Cr.host,search:Cr.search?Cr.search.replace(/^\?/,""):"",hash:Cr.hash?Cr.hash.replace(/^#/,""):"",hostname:Cr.hostname,port:Cr.port,pathname:"/"===Cr.pathname.charAt(0)?Cr.pathname:"/"+Cr.pathname}}function on(e){var t=w(e)?rn(e):e;return t.protocol===Sr.protocol&&t.host===Sr.host}function an(){this.$get=m(e)}function sn(e){function t(i,r){if(b(i)){var a={};return o(i,function(e,n){a[n]=t(n,e)}),a}return e.factory(i+n,r)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",dn),t("date",Sn),t("filter",ln),t("json",_n),t("limitTo",Tn),t("lowercase",Dr),t("number",pn),t("orderBy",$n),t("uppercase",Mr)}function ln(){return function(e,t,n){if(!pi(e))return e;var i,r,o=null!==t?typeof t:"null";switch(o){case"function":i=t;break;case"boolean":case"null":case"number":case"string":r=!0;case"object":i=un(t,n,r);break;default:return e}return e.filter(i)}}function un(e,t,n){var i,r=b(e)&&"$"in e;return t===!0?t=R:C(t)||(t=function(e,t){return v(e)?!1:null===e||null===t?e===t:b(e)||b(t)?!1:(e=Xn(""+e),t=Xn(""+t),-1!==e.indexOf(t))}),i=function(i){return r&&!b(i)?cn(i,e.$,t,!1):cn(i,e,t,n)}}function cn(e,t,n,i,r){var o=null!==e?typeof e:"null",a=null!==t?typeof t:"null";if("string"===a&&"!"===t.charAt(0))return!cn(e,t.substring(1),n,i);if(pi(e))return e.some(function(e){return cn(e,t,n,i)});switch(o){case"object":var s;if(i){for(s in e)if("$"!==s.charAt(0)&&cn(e[s],t,n,!0))return!0;return r?!1:cn(e,t,n,!1)}if("object"===a){for(s in t){var l=t[s];if(!C(l)&&!v(l)){var u="$"===s,c=u?e:e[s];if(!cn(c,l,n,u,u))return!1}}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function dn(e){var t=e.NUMBER_FORMATS;return function(e,n,i){return v(n)&&(n=t.CURRENCY_SYM),v(i)&&(i=t.PATTERNS[1].maxFrac),null==e?e:hn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,i).replace(/\u00A4/g,n)}}function pn(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:hn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function hn(e,t,n,i,r){if(!isFinite(e)||b(e))return"";var o=0>e;e=Math.abs(e);var a=e+"",s="",l=[],u=!1;if(-1!==a.indexOf("e")){var c=a.match(/([\d\.]+)e(-?)(\d+)/);c&&"-"==c[2]&&c[3]>r+1?e=0:(s=a,u=!0)}if(u)r>0&&1>e&&(s=e.toFixed(r),e=parseFloat(s));else{var d=(a.split(_r)[1]||"").length;v(r)&&(r=Math.min(Math.max(t.minFrac,d),t.maxFrac)),e=+(Math.round(+(e.toString()+"e"+r)).toString()+"e"+-r);var p=(""+e).split(_r),h=p[0];p=p[1]||"";var f,g=0,m=t.lgSize,y=t.gSize;if(h.length>=m+y)for(g=h.length-m,f=0;g>f;f++)(g-f)%y===0&&0!==f&&(s+=n),s+=h.charAt(f);for(f=g;f<h.length;f++)(h.length-f)%m===0&&0!==f&&(s+=n),s+=h.charAt(f);for(;p.length<r;)p+="0";r&&"0"!==r&&(s+=i+p.substr(0,r))}return 0===e&&(o=!1),l.push(o?t.negPre:t.posPre,s,o?t.negSuf:t.posSuf),l.join("")}function fn(e,t,n){var i="";for(0>e&&(i="-",e=-e),e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),i+e}function gn(e,t,n,i){return n=n||0,function(r){var o=r["get"+e]();return(n>0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),fn(o,t,i)}}function mn(e,t){return function(n,i){var r=n["get"+e](),o=Kn(t?"SHORT"+e:e);return i[o][r]}}function vn(e){var t=-1*e.getTimezoneOffset(),n=t>=0?"+":"";return n+=fn(Math[t>0?"floor":"ceil"](t/60),2)+fn(Math.abs(t%60),2)}function yn(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(4>=t?5:12)-t)}function bn(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function wn(e){return function(t){var n=yn(t.getFullYear()),i=bn(t),r=+i-+n,o=1+Math.round(r/6048e5);return fn(o,e)}}function xn(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function kn(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function Cn(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function Sn(e){function t(e){var t;if(t=e.match(n)){var i=new Date(0),r=0,o=0,a=t[8]?i.setUTCFullYear:i.setFullYear,s=t[8]?i.setUTCHours:i.setHours;t[9]&&(r=p(t[9]+t[10]),o=p(t[9]+t[11])),a.call(i,p(t[1]),p(t[2])-1,p(t[3]));var l=p(t[4]||0)-r,u=p(t[5]||0)-o,c=p(t[6]||0),d=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(i,l,u,c,d),i}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i,r){var a,s,l="",u=[];if(i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i,w(n)&&(n=Er.test(n)?p(n):t(n)),x(n)&&(n=new Date(n)),!k(n))return n;for(;i;)s=$r.exec(i),s?(u=F(u,s,1),i=u.pop()):(u.push(i),i=null);return r&&"UTC"===r&&(n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+n.getTimezoneOffset())),o(u,function(t){a=Tr[t],l+=a?a(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function _n(){return function(e,t){return v(t)&&(t=2),B(e,t)}}function Tn(){return function(e,t){return x(e)&&(e=e.toString()),pi(e)||w(e)?(t=Math.abs(Number(t))===1/0?Number(t):p(t),t?t>0?e.slice(0,t):e.slice(t):w(e)?"":[]):e}}function $n(e){return function(t,n,i){function o(e,t){for(var i=0;i<n.length;i++){var r=n[i](e,t);if(0!==r)return r}return 0}function a(e,t){return t?function(t,n){return e(n,t)}:e}function s(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function l(e){return null===e?"null":"function"==typeof e.valueOf&&(e=e.valueOf(),s(e))?e:"function"==typeof e.toString&&(e=e.toString(),s(e))?e:""}function u(e,t){var n=typeof e,i=typeof t;return n===i&&"object"===n&&(e=l(e),t=l(t)),n===i?("string"===n&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t?0:t>e?-1:1):i>n?-1:1}return r(t)?(n=pi(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(t){var n=!1,i=t||g;if(w(t)){if(("+"==t.charAt(0)||"-"==t.charAt(0))&&(n="-"==t.charAt(0),t=t.substring(1)),""===t)return a(u,n);if(i=e(t),i.constant){var r=i();return a(function(e,t){return u(e[r],t[r])},n)}}return a(function(e,t){return u(i(e),i(t))},n)}),ri.call(t).sort(a(o,i))):t}}function En(e){return C(e)&&(e={link:e}),e.restrict=e.restrict||"AC",m(e)}function Dn(e,t){e.$name=t}function Mn(e,t,i,r,a){var s=this,l=[],u=s.$$parentForm=e.parent().controller("form")||Ar;s.$error={},s.$$success={},s.$pending=n,s.$name=a(t.name||t.ngForm||"")(i),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,u.$addControl(s),s.$rollbackViewValue=function(){o(l,function(e){e.$rollbackViewValue()})},s.$commitViewValue=function(){o(l,function(e){e.$commitViewValue()})},s.$addControl=function(e){ae(e.$name,"input"),l.push(e),e.$name&&(s[e.$name]=e)},s.$$renameControl=function(e,t){var n=e.$name;s[n]===e&&delete s[n],s[t]=e,e.$name=t},s.$removeControl=function(e){e.$name&&s[e.$name]===e&&delete s[e.$name],o(s.$pending,function(t,n){s.$setValidity(n,null,e)}),o(s.$error,function(t,n){s.$setValidity(n,null,e)}),o(s.$$success,function(t,n){s.$setValidity(n,null,e)}),N(l,e)},Vn({ctrl:this,$element:e,set:function(e,t,n){var i=e[t];if(i){var r=i.indexOf(n);-1===r&&i.push(n)}else e[t]=[n]},unset:function(e,t,n){var i=e[t];i&&(N(i,n),0===i.length&&delete e[t])},parentForm:u,$animate:r}),s.$setDirty=function(){r.removeClass(e,mo),r.addClass(e,vo),s.$dirty=!0,s.$pristine=!1,u.$setDirty()},s.$setPristine=function(){r.setClass(e,mo,vo+" "+jr),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,o(l,function(e){e.$setPristine()})},s.$setUntouched=function(){o(l,function(e){e.$setUntouched()})},s.$setSubmitted=function(){r.addClass(e,jr),s.$submitted=!0,u.$setSubmitted()}}function In(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function Pn(e,t,n,i,r,o){An(e,t,n,i,r,o),In(i)}function An(e,t,n,i,r,o){var a=Xn(t[0].type);if(!r.android){var s=!1;t.on("compositionstart",function(e){s=!0}),t.on("compositionend",function(){s=!1,l()})}var l=function(e){if(u&&(o.defer.cancel(u),u=null),!s){var r=t.val(),l=e&&e.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(r=hi(r)),(i.$viewValue!==r||""===r&&i.$$hasNativeValidators)&&i.$setViewValue(r,l)}};if(r.hasEvent("input"))t.on("input",l);else{var u,c=function(e,t,n){u||(u=o.defer(function(){u=null,t&&t.value===n||l(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||t>15&&19>t||t>=37&&40>=t||c(e,this,this.value)}),r.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",l),i.$render=function(){t.val(i.$isEmpty(i.$viewValue)?"":i.$viewValue)}}function jn(e,t){if(k(e))return e;if(w(e)){zr.lastIndex=0;var n=zr.exec(e);if(n){var i=+n[1],r=+n[2],o=0,a=0,s=0,l=0,u=yn(i),c=7*(r-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(i,0,u.getDate()+c,o,a,s,l)}}return NaN}function Nn(e,t){return function(n,i){var r,a;if(k(n))return n;if(w(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),Rr.test(n))return new Date(n);if(e.lastIndex=0,r=e.exec(n))return r.shift(),a=i?{yyyy:i.getFullYear(),MM:i.getMonth()+1,dd:i.getDate(),HH:i.getHours(),mm:i.getMinutes(),ss:i.getSeconds(),sss:i.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(r,function(e,n){n<t.length&&(a[t[n]]=+e)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function On(e,t,i,r){return function(o,a,s,l,u,c,d){function p(e){return e&&!(e.getTime&&e.getTime()!==e.getTime())}function h(e){return y(e)?k(e)?e:i(e):n}Ln(o,a,s,l),An(o,a,s,l,u,c);var f,g=l&&l.$options&&l.$options.timezone;if(l.$$parserName=e,l.$parsers.push(function(e){if(l.$isEmpty(e))return null;if(t.test(e)){var r=i(e,f);return"UTC"===g&&r.setMinutes(r.getMinutes()-r.getTimezoneOffset()),r}return n}),l.$formatters.push(function(e){if(e&&!k(e))throw xo("datefmt","Expected `+"`"+`{0}`+"`"+` to be a date",e);if(p(e)){if(f=e,f&&"UTC"===g){var t=6e4*f.getTimezoneOffset();f=new Date(f.getTime()+t)}return d("date")(e,r,g)}return f=null,""}),y(s.min)||s.ngMin){var m;l.$validators.min=function(e){return!p(e)||v(m)||i(e)>=m},s.$observe("min",function(e){m=h(e),l.$validate()})}if(y(s.max)||s.ngMax){var b;l.$validators.max=function(e){return!p(e)||v(b)||i(e)<=b},s.$observe("max",function(e){b=h(e),l.$validate()})}}}function Ln(e,t,i,r){var o=t[0],a=r.$$hasNativeValidators=b(o.validity);a&&r.$parsers.push(function(e){var i=t.prop(Jn)||{};return i.badInput&&!i.typeMismatch?n:e})}function Rn(e,t,i,r,o,a){if(Ln(e,t,i,r),An(e,t,i,r,o,a),r.$$parserName="number",r.$parsers.push(function(e){return r.$isEmpty(e)?null:Hr.test(e)?parseFloat(e):n}),r.$formatters.push(function(e){if(!r.$isEmpty(e)){if(!x(e))throw xo("numfmt","Expected `+"`"+`{0}`+"`"+` to be a number",e);e=e.toString()}return e}),y(i.min)||i.ngMin){var s;r.$validators.min=function(e){return r.$isEmpty(e)||v(s)||e>=s},i.$observe("min",function(e){y(e)&&!x(e)&&(e=parseFloat(e,10)),s=x(e)&&!isNaN(e)?e:n,r.$validate()})}if(y(i.max)||i.ngMax){var l;r.$validators.max=function(e){return r.$isEmpty(e)||v(l)||l>=e},i.$observe("max",function(e){y(e)&&!x(e)&&(e=parseFloat(e,10)),l=x(e)&&!isNaN(e)?e:n,r.$validate()})}}function Fn(e,t,n,i,r,o){An(e,t,n,i,r,o),In(i),i.$$parserName="url",i.$validators.url=function(e,t){var n=e||t;return i.$isEmpty(n)||Fr.test(n)}}function qn(e,t,n,i,r,o){An(e,t,n,i,r,o),In(i),i.$$parserName="email",i.$validators.email=function(e,t){var n=e||t;return i.$isEmpty(n)||qr.test(n)}}function Hn(e,t,n,i){v(n.name)&&t.attr("name",u());var r=function(e){t[0].checked&&i.$setViewValue(n.value,e&&e.type)};t.on("click",r),i.$render=function(){var e=n.value;t[0].checked=e==i.$viewValue},n.$observe("value",i.$render)}function Un(e,t,n,i,r){var o;if(y(i)){if(o=e(i),!o.constant)throw xo("constexpr","Expected constant expression for `+"`"+`{0}`+"`"+`, but saw `+"`"+`{1}`+"`"+`.",n,i);return o(t)}return r}function Bn(e,t,n,i,r,o,a,s){var l=Un(s,e,"ngTrueValue",n.ngTrueValue,!0),u=Un(s,e,"ngFalseValue",n.ngFalseValue,!1),c=function(e){i.$setViewValue(t[0].checked,e&&e.type)};t.on("click",c),i.$render=function(){t[0].checked=i.$viewValue},i.$isEmpty=function(e){return e===!1},i.$formatters.push(function(e){return R(e,l)}),i.$parsers.push(function(e){return e?l:u})}function zn(e,t){return e="ngClass"+e,["$animate",function(n){function i(e,t){var n=[];e:for(var i=0;i<e.length;i++){for(var r=e[i],o=0;o<t.length;o++)if(r==t[o])continue e;n.push(r)}return n}function r(e){if(pi(e))return e;if(w(e))return e.split(" ");if(b(e)){var t=[];return o(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t}return e}return{restrict:"AC",link:function(a,s,l){function u(e){var t=d(e,1);
|
|
3216
|
|
-l.$addClass(t)}function c(e){var t=d(e,-1);l.$removeClass(t)}function d(e,t){var n=s.data("$classCounts")||{},i=[];return o(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&i.push(e))}),s.data("$classCounts",n),i.join(" ")}function p(e,t){var r=i(t,e),o=i(e,t);r=d(r,1),o=d(o,-1),r&&r.length&&n.addClass(s,r),o&&o.length&&n.removeClass(s,o)}function h(e){if(t===!0||a.$index%2===t){var n=r(e||[]);if(f){if(!R(e,f)){var i=r(f);p(i,n)}}else u(n)}f=L(e)}var f;a.$watch(l[e],h,!0),l.$observe("class",function(t){h(a.$eval(l[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,i){var o=1&n;if(o!==(1&i)){var s=r(a.$eval(l[e]));o===t?u(s):c(s)}})}}}]}function Vn(e){function t(e,t,l){t===n?i("$pending",e,l):r("$pending",e,l),M(t)?t?(d(s.$error,e,l),c(s.$$success,e,l)):(c(s.$error,e,l),d(s.$$success,e,l)):(d(s.$error,e,l),d(s.$$success,e,l)),s.$pending?(o(wo,!0),s.$valid=s.$invalid=n,a("",null)):(o(wo,!1),s.$valid=Wn(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var u;u=s.$pending&&s.$pending[e]?n:s.$error[e]?!1:s.$$success[e]?!0:null,a(e,u),p.$setValidity(e,u,s)}function i(e,t,n){s[e]||(s[e]={}),c(s[e],t,n)}function r(e,t,i){s[e]&&d(s[e],t,i),Wn(s[e])&&(s[e]=n)}function o(e,t){t&&!u[e]?(h.addClass(l,e),u[e]=!0):!t&&u[e]&&(h.removeClass(l,e),u[e]=!1)}function a(e,t){e=e?"-"+ne(e,"-"):"",o(fo+e,t===!0),o(go+e,t===!1)}var s=e.ctrl,l=e.$element,u={},c=e.set,d=e.unset,p=e.parentForm,h=e.$animate;u[go]=!(u[fo]=l.hasClass(fo)),s.$setValidity=t}function Wn(e){if(e)for(var t in e)return!1;return!0}var Gn=/^\/(.+)\/([a-z]*)$/,Jn="validity",Xn=function(e){return w(e)?e.toLowerCase():e},Yn=Object.prototype.hasOwnProperty,Kn=function(e){return w(e)?e.toUpperCase():e},Qn=function(e){return w(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Zn=function(e){return w(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(Xn=Qn,Kn=Zn);var ei,ti,ni,ii,ri=[].slice,oi=[].splice,ai=[].push,si=Object.prototype.toString,li=i("ng"),ui=e.angular||(e.angular={}),ci=0;ei=t.documentMode,f.$inject=[],g.$inject=[];var di,pi=Array.isArray,hi=function(e){return w(e)?e.trim():e},fi=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},gi=function(){if(y(gi.isActive_))return gi.isActive_;var e=!(!t.querySelector("[ng-csp]")&&!t.querySelector("[data-ng-csp]"));if(!e)try{new Function("")}catch(n){e=!0}return gi.isActive_=e},mi=["ng-","data-ng-","ng:","x-ng-"],vi=/[A-Z]/g,yi=!1,bi=1,wi=2,xi=3,ki=8,Ci=9,Si=11,_i={full:"1.3.18",major:1,minor:3,dot:18,codeName:"collective-penmanship"};we.expando="ng339";var Ti=we.cache={},$i=1,Ei=function(e,t,n){e.addEventListener(t,n,!1)},Di=function(e,t,n){e.removeEventListener(t,n,!1)};we._data=function(e){return this.cache[e[this.expando]]||{}};var Mi=/([\:\-\_]+(.))/g,Ii=/^moz([A-Z])/,Pi={mouseleave:"mouseout",mouseenter:"mouseover"},Ai=i("jqLite"),ji=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Ni=/<|&#?\w+;/,Oi=/<([\w:]+)/,Li=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ri={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ri.optgroup=Ri.option,Ri.tbody=Ri.tfoot=Ri.colgroup=Ri.caption=Ri.thead,Ri.th=Ri.td;var Fi=we.prototype={ready:function(n){function i(){r||(r=!0,n())}var r=!1;"complete"===t.readyState?setTimeout(i):(this.on("DOMContentLoaded",i),we(e).on("load",i))},toString:function(){var e=[];return o(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return ti(e>=0?this[e]:this[this.length+e])},length:0,push:ai,sort:[].sort,splice:[].splice},qi={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){qi[Xn(e)]=e});var Hi={};o("input,select,option,textarea,button,form,details".split(","),function(e){Hi[e]=!0});var Ui={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:Te,removeData:Se},function(e,t){we[t]=e}),o({data:Te,inheritedData:Pe,scope:function(e){return ti.data(e,"$scope")||Pe(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return ti.data(e,"$isolateScope")||ti.data(e,"$isolateScopeNoTemplate")},controller:Ie,injector:function(e){return Pe(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:$e,css:function(e,t,n){return t=ge(t),y(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,i){var r=e.nodeType;if(r!==xi&&r!==wi&&r!==ki){var o=Xn(t);if(qi[o]){if(!y(i))return e[t]||(e.attributes.getNamedItem(t)||f).specified?o:n;i?(e[t]=!0,e.setAttribute(t,o)):(e[t]=!1,e.removeAttribute(o))}else if(y(i))e.setAttribute(t,i);else if(e.getAttribute){var a=e.getAttribute(t,2);return null===a?n:a}}},prop:function(e,t,n){return y(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if(v(t)){var n=e.nodeType;return n===bi||n===xi?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(v(t)){if(e.multiple&&"select"===j(e)){var n=[];return o(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){return v(t)?e.innerHTML:(ke(e,!0),void(e.innerHTML=t))},empty:Ae},function(e,t){we.prototype[t]=function(t,i){var r,o,a=this.length;if(e!==Ae&&(2==e.length&&e!==$e&&e!==Ie?t:i)===n){if(b(t)){for(r=0;a>r;r++)if(e===Te)e(this[r],t);else for(o in t)e(this[r],o,t[o]);return this}for(var s=e.$dv,l=s===n?Math.min(a,1):a,u=0;l>u;u++){var c=e(this[u],t,i);s=s?s+c:c}return s}for(r=0;a>r;r++)e(this[r],t,i);return this}}),o({removeData:Se,on:function Jo(e,t,n,i){if(y(i))throw Ai("onargs","jqLite#on() does not support the `+"`"+`selector`+"`"+` or `+"`"+`eventData`+"`"+` parameters");if(ve(e)){var r=_e(e,!0),o=r.events,a=r.handle;a||(a=r.handle=Re(e,o));for(var s=t.indexOf(" ")>=0?t.split(" "):[t],l=s.length;l--;){t=s[l];var u=o[t];u||(o[t]=[],"mouseenter"===t||"mouseleave"===t?Jo(e,Pi[t],function(e){var n=this,i=e.relatedTarget;(!i||i!==n&&!n.contains(i))&&a(e,t)}):"$destroy"!==t&&Ei(e,t,a),u=o[t]),u.push(n)}}},off:Ce,one:function(e,t,n){e=ti(e),e.on(t,function i(){e.off(t,n),e.off(t,i)}),e.on(t,n)},replaceWith:function(e,t){var n,i=e.parentNode;ke(e),o(new we(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return o(e.childNodes,function(e){e.nodeType===bi&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===bi||n===Si){t=new we(t);for(var i=0,r=t.length;r>i;i++){var o=t[i];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===bi){var n=e.firstChild;o(new we(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=ti(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:je,detach:function(e){je(e,!0)},after:function(e,t){var n=e,i=e.parentNode;t=new we(t);for(var r=0,o=t.length;o>r;r++){var a=t[r];i.insertBefore(a,n.nextSibling),n=a}},addClass:De,removeClass:Ee,toggleClass:function(e,t,n){t&&o(t.split(" "),function(t){var i=n;v(i)&&(i=!$e(e,t)),(i?De:Ee)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Si?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:xe,triggerHandler:function(e,t,n){var i,r,a,s=t.type||t,l=_e(e),u=l&&l.events,c=u&&u[s];c&&(i={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:f,type:s,target:e},t.type&&(i=d(i,t)),r=L(c),a=n?[i].concat(n):[i],o(r,function(t){i.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){we.prototype[t]=function(t,n,i){for(var r,o=0,a=this.length;a>o;o++)v(r)?(r=e(this[o],t,n,i),y(r)&&(r=ti(r))):Me(r,e(this[o],t,n,i));return y(r)?r:this},we.prototype.bind=we.prototype.on,we.prototype.unbind=we.prototype.off}),He.prototype={put:function(e,t){this[qe(e,this.nextUid)]=t},get:function(e){return this[qe(e,this.nextUid)]},remove:function(e){var t=this[e=qe(e,this.nextUid)];return delete this[e],t}};var Bi=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,zi=/,/,Vi=/^\s*(_?)(\S+?)\1\s*$/,Wi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Gi=i("$injector");ze.$$annotate=Be;var Ji=i("$animate"),Xi=["$provide",function(e){this.$$selectors={},this.register=function(t,n){var i=t+"-animation";if(t&&"."!=t.charAt(0))throw Ji("notcsel","Expecting class selector starting with '.' got '{0}'.",t);this.$$selectors[t.substr(1)]=i,e.factory(i,n)},this.classNameFilter=function(e){return 1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(e,t,n){function i(t){var i,r=e.defer();return r.promise.$$cancelFn=function(){i&&i()},n.$$postDigest(function(){i=t(function(){r.resolve()})}),r.promise}function r(e,t){var n=[],i=[],r=ue();return o((e.attr("class")||"").split(/\s+/),function(e){r[e]=!0}),o(t,function(e,t){var o=r[t];e===!1&&o?i.push(t):e!==!0||o||n.push(t)}),n.length+i.length>0&&[n.length?n:null,i.length?i:null]}function a(e,t,n){for(var i=0,r=t.length;r>i;++i){var o=t[i];e[o]=n}}function s(){return u||(u=e.defer(),t(function(){u.resolve(),u=null})),u.promise}function l(e,t){if(ui.isObject(t)){var n=d(t.from||{},t.to||{});e.css(n)}}var u;return{animate:function(e,t,n){return l(e,{from:t,to:n}),s()},enter:function(e,t,n,i){return l(e,i),n?n.after(e):t.prepend(e),s()},leave:function(e,t){return l(e,t),e.remove(),s()},move:function(e,t,n,i){return this.enter(e,t,n,i)},addClass:function(e,t,n){return this.setClass(e,t,[],n)},$$addClassImmediately:function(e,t,n){return e=ti(e),t=w(t)?t:pi(t)?t.join(" "):"",o(e,function(e){De(e,t)}),l(e,n),s()},removeClass:function(e,t,n){return this.setClass(e,[],t,n)},$$removeClassImmediately:function(e,t,n){return e=ti(e),t=w(t)?t:pi(t)?t.join(" "):"",o(e,function(e){Ee(e,t)}),l(e,n),s()},setClass:function(e,t,n,o){var s=this,l="$$animateClasses",u=!1;e=ti(e);var c=e.data(l);c?o&&c.options&&(c.options=ui.extend(c.options||{},o)):(c={classes:{},options:o},u=!0);var d=c.classes;return t=pi(t)?t:t.split(" "),n=pi(n)?n:n.split(" "),a(d,t,!0),a(d,n,!1),u&&(c.promise=i(function(t){var n=e.data(l);if(e.removeData(l),n){var i=r(e,n.classes);i&&s.$$setClassImmediately(e,i[0],i[1],n.options)}t()}),e.data(l,c)),c.promise},$$setClassImmediately:function(e,t,n,i){return t&&this.$$addClassImmediately(e,t),n&&this.$$removeClassImmediately(e,n),l(e,i),s()},enabled:f,cancel:f}}]}],Yi=i("$compile");Ke.$inject=["$provide","$$sanitizeUriProvider"];var Ki=/^((?:x|data)[\:\-_])/i,Qi=i("$controller"),Zi="application/json",er={"Content-Type":Zi+";charset=utf-8"},tr=/^\[|^\{(?!\{)/,nr={"[":/]$/,"{":/}$/},ir=/^\)\]\}',?\n/,rr=i("$interpolate"),or=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,ar={http:80,https:443,ftp:21},sr=i("$location"),lr={$$html5:!1,$$replace:!1,absUrl:Et("$$absUrl"),url:function(e){if(v(e))return this.$$url;var t=or.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:Et("$$protocol"),host:Et("$$host"),port:Et("$$port"),path:Dt("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(w(e)||x(e))e=e.toString(),this.$$search=G(e);else{if(!b(e))throw sr("isrcharg","The first argument of the `+"`"+`$location#search()`+"`"+` call must be a string or an object.");e=O(e,{}),o(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:v(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Dt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};o([$t,Tt,_t],function(e){e.prototype=Object.create(lr),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==_t||!this.$$html5)throw sr("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=v(t)?null:t,this}});var ur=i("$parse"),cr=Function.prototype.call,dr=Function.prototype.apply,pr=Function.prototype.bind,hr=ue();o({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(e,t){e.constant=e.literal=e.sharedGetter=!0,hr[t]=e}),hr["this"]=function(e){return e},hr["this"].sharedGetter=!0;var fr=d(ue(),{"+":function(e,t,i,r){return i=i(e,t),r=r(e,t),y(i)?y(r)?i+r:i:y(r)?r:n},"-":function(e,t,n,i){return n=n(e,t),i=i(e,t),(y(n)?n:0)-(y(i)?i:0)},"*":function(e,t,n,i){return n(e,t)*i(e,t)},"/":function(e,t,n,i){return n(e,t)/i(e,t)},"%":function(e,t,n,i){return n(e,t)%i(e,t)},"===":function(e,t,n,i){return n(e,t)===i(e,t)},"!==":function(e,t,n,i){return n(e,t)!==i(e,t)},"==":function(e,t,n,i){return n(e,t)==i(e,t)},"!=":function(e,t,n,i){return n(e,t)!=i(e,t)},"<":function(e,t,n,i){return n(e,t)<i(e,t)},">":function(e,t,n,i){return n(e,t)>i(e,t)},"<=":function(e,t,n,i){return n(e,t)<=i(e,t)},">=":function(e,t,n,i){return n(e,t)>=i(e,t)},"&&":function(e,t,n,i){return n(e,t)&&i(e,t)},"||":function(e,t,n,i){return n(e,t)||i(e,t)},"!":function(e,t,n){return!n(e,t)},"=":!0,"|":!0}),gr={n:"\n",f:"\f",r:"\r",t:" ",v:"","'":"'",'"':'"'},mr=function(e){this.options=e};mr.prototype={constructor:mr,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;){var t=this.text.charAt(this.index);if('"'===t||"'"===t)this.readString(t);else if(this.isNumber(t)||"."===t&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(t))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var n=t+this.peek(),i=n+this.peek(2),r=fr[t],o=fr[n],a=fr[i];if(r||o||a){var s=a?i:o?n:t;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(e,t){return-1!==t.indexOf(e)},peek:function(e){var t=e||1;return this.index+t<this.text.length?this.text.charAt(this.index+t):!1},isNumber:function(e){return e>="0"&&"9">=e&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||" "===e||"\n"===e||""===e||" "===e},isIdent:function(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var i=y(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw ur("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,i,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=Xn(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var i=this.peek();if("e"==n&&this.isExpOperator(i))e+=n;else if(this.isExpOperator(n)&&i&&this.isNumber(i)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||i&&this.isNumber(i)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){for(var e=this.index;this.index<this.text.length;){var t=this.text.charAt(this.index);if(!this.isIdent(t)&&!this.isNumber(t))break;this.index++}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;for(var n="",i=e,r=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(i+=o,r){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{var s=gr[o];n+=s||o}r=!1}else if("\\"===o)r=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:i,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var vr=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n};vr.ZERO=d(function(){return 0},{sharedGetter:!0,constant:!0}),vr.prototype={constructor:vr,parse:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t.literal=!!t.literal,t.constant=!!t.constant,t},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.peek().identifier&&this.peek().text in hr?e=hr[this.consume().text]:this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t,n;t=this.expect("(","[",".");)"("===t.text?(e=this.functionCall(e,n),n=null):"["===t.text?(n=e,e=this.objectIndex(e)):"."===t.text?(n=e,e=this.fieldAccess(e)):this.throwError("IMPOSSIBLE");return e},throwError:function(e,t){throw ur("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},peekToken:function(){if(0===this.tokens.length)throw ur("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,i){return this.peekAhead(0,e,t,n,i)},peekAhead:function(e,t,n,i,r){if(this.tokens.length>e){var o=this.tokens[e],a=o.text;if(a===t||a===n||a===i||a===r||!t&&!n&&!i&&!r)return o}return!1},expect:function(e,t,n,i){var r=this.peek(e,t,n,i);return r?(this.tokens.shift(),r):!1},consume:function(e){if(0===this.tokens.length)throw ur("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},unaryFn:function(e,t){var n=fr[e];return d(function(e,i){return n(e,i,t)},{constant:t.constant,inputs:[t]})},binaryFn:function(e,t,n,i){var r=fr[t];return d(function(t,i){return r(t,i,e,n)},{constant:e.constant&&n.constant,inputs:!i&&[e,n]})},identifier:function(){for(var e=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)e+=this.consume().text+this.consume().text;return qt(e,this.options,this.text)},constant:function(){var e=this.consume().value;return d(function(){return e},{constant:!0,literal:!0})},statements:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.filterChain()),!this.expect(";"))return 1===e.length?e[0]:function(t,n){for(var i,r=0,o=e.length;o>r;r++)i=e[r](t,n);return i}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},filter:function(e){var t,i,r=this.$filter(this.consume().text);if(this.peek(":"))for(t=[],i=[];this.expect(":");)t.push(this.expression());var o=[e].concat(t||[]);return d(function(o,a){var s=e(o,a);if(i){i[0]=s;for(var l=t.length;l--;)i[l+1]=t[l](o,a);return r.apply(n,i)}return r(s)},{constant:!r.$stateful&&o.every(Nt),inputs:!r.$stateful&&o})},expression:function(){return this.assignment()},assignment:function(){var e,t,n=this.ternary();return(t=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,t.index)+"] can not be assigned to",t),e=this.ternary(),d(function(t,i){return n.assign(t,e(t,i),i)},{inputs:[n,e]})):n},ternary:function(){var e,t,n=this.logicalOR();if((t=this.expect("?"))&&(e=this.assignment(),this.consume(":"))){var i=this.assignment();return d(function(t,r){return n(t,r)?e(t,r):i(t,r)},{constant:n.constant&&e.constant&&i.constant})}return n},logicalOR:function(){for(var e,t=this.logicalAND();e=this.expect("||");)t=this.binaryFn(t,e.text,this.logicalAND(),!0);return t},logicalAND:function(){for(var e,t=this.equality();e=this.expect("&&");)t=this.binaryFn(t,e.text,this.equality(),!0);return t},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t=this.binaryFn(t,e.text,this.relational());return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t=this.binaryFn(t,e.text,this.additive());return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t=this.binaryFn(t,e.text,this.multiplicative());return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t=this.binaryFn(t,e.text,this.unary());return t},unary:function(){var e;return this.expect("+")?this.primary():(e=this.expect("-"))?this.binaryFn(vr.ZERO,e.text,this.unary()):(e=this.expect("!"))?this.unaryFn(e.text,this.unary()):this.primary()},fieldAccess:function(e){var t=this.identifier();return d(function(i,r,o){var a=o||e(i,r);return null==a?n:t(a)},{assign:function(n,i,r){var o=e(n,r);return o||e.assign(n,o={},r),t.assign(o,i)}})},objectIndex:function(e){var t=this.text,i=this.expression();return this.consume("]"),d(function(r,o){var a,s=e(r,o),l=i(r,o);return Pt(l,t),s?a=At(s[l],t):n},{assign:function(n,r,o){var a=Pt(i(n,o),t),s=At(e(n,o),t);return s||e.assign(n,s={},o),s[a]=r}})},functionCall:function(e,t){var i=[];if(")"!==this.peekToken().text)do i.push(this.expression());while(this.expect(","));this.consume(")");var r=this.text,o=i.length?[]:null;return function(a,s){var l=t?t(a,s):y(t)?n:a,u=e(a,s,l)||f;if(o)for(var c=i.length;c--;)o[c]=At(i[c](a,s),r);At(l,r),jt(u,r);var d=u.apply?u.apply(l,o):u(o[0],o[1],o[2],o[3],o[4]);return o&&(o.length=0),At(d,r)}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),d(function(t,n){for(var i=[],r=0,o=e.length;o>r;r++)i.push(e[r](t,n));return i},{literal:!0,constant:e.every(Nt),inputs:e})},object:function(){var e=[],t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.consume();n.constant?e.push(n.value):n.identifier?e.push(n.text):this.throwError("invalid key",n),this.consume(":"),t.push(this.expression())}while(this.expect(","));return this.consume("}"),d(function(n,i){for(var r={},o=0,a=t.length;a>o;o++)r[e[o]]=t[o](n,i);return r},{literal:!0,constant:t.every(Nt),inputs:t})}};var yr=ue(),br=ue(),wr=Object.prototype.valueOf,xr=i("$sce"),kr={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Yi=i("$compile"),Cr=t.createElement("a"),Sr=rn(e.location.href);sn.$inject=["$provide"],dn.$inject=["$locale"],pn.$inject=["$locale"];var _r=".",Tr={yyyy:gn("FullYear",4),yy:gn("FullYear",2,0,!0),y:gn("FullYear",1),MMMM:mn("Month"),MMM:mn("Month",!0),MM:gn("Month",2,1),M:gn("Month",1,1),dd:gn("Date",2),d:gn("Date",1),HH:gn("Hours",2),H:gn("Hours",1),hh:gn("Hours",2,-12),h:gn("Hours",1,-12),mm:gn("Minutes",2),m:gn("Minutes",1),ss:gn("Seconds",2),s:gn("Seconds",1),sss:gn("Milliseconds",3),EEEE:mn("Day"),EEE:mn("Day",!0),a:xn,Z:vn,ww:wn(2),w:wn(1),G:kn,GG:kn,GGG:kn,GGGG:Cn},$r=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Er=/^\-?\d+$/;Sn.$inject=["$locale"];var Dr=m(Xn),Mr=m(Kn);$n.$inject=["$parse"];var Ir=m({restrict:"E",compile:function(e,t){return t.href||t.xlinkHref||t.name?void 0:function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===si.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),Pr={};o(qi,function(e,t){if("multiple"!=e){var n=Qe("ng-"+t);Pr[n]=function(){return{restrict:"A",priority:100,link:function(e,i,r){e.$watch(r[n],function(e){r.$set(t,!!e)})}}}}}),o(Ui,function(e,t){Pr[t]=function(){return{priority:100,link:function(e,n,i){if("ngPattern"===t&&"/"==i.ngPattern.charAt(0)){var r=i.ngPattern.match(Gn);if(r)return void i.$set("ngPattern",new RegExp(r[1],r[2]))}e.$watch(i[t],function(e){i.$set(t,e)})}}}}),o(["src","srcset","href"],function(e){var t=Qe("ng-"+e);Pr[t]=function(){return{priority:99,link:function(n,i,r){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===si.call(i.prop("href"))&&(a="xlinkHref",r.$attr[a]="xlink:href",o=null),r.$observe(t,function(t){return t?(r.$set(a,t),void(ei&&o&&i.prop(o,r[a]))):void("href"===e&&r.$set(a,null))})}}}});var Ar={$addControl:f,$$renameControl:Dn,$removeControl:f,$setValidity:f,$setDirty:f,$setPristine:f,$setSubmitted:f},jr="ng-submitted";Mn.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Nr=function(e){return["$timeout",function(t){var i={name:"form",restrict:e?"EAC":"E",controller:Mn,compile:function(i,r){i.addClass(mo).addClass(fo);var o=r.name?"name":e&&r.ngForm?"ngForm":!1;return{pre:function(e,i,r,a){if(!("action"in r)){var s=function(t){e.$apply(function(){a.$commitViewValue(),a.$setSubmitted()}),t.preventDefault()};Ei(i[0],"submit",s),i.on("$destroy",function(){t(function(){Di(i[0],"submit",s)},0,!1)})}var l=a.$$parentForm;o&&(Ot(e,null,a.$name,a,a.$name),r.$observe(o,function(t){a.$name!==t&&(Ot(e,null,a.$name,n,a.$name),l.$$renameControl(a,t),Ot(e,null,a.$name,a,a.$name))})),i.on("$destroy",function(){l.$removeControl(a),o&&Ot(e,null,r[o],n,a.$name),d(a,Ar)})}}}};return i}]},Or=Nr(),Lr=Nr(!0),Rr=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Fr=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,qr=/^[a-z0-9!#$%&'*+\/=?^_`+"`"+`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Hr=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Ur=/^(\d{4})-(\d{2})-(\d{2})$/,Br=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,zr=/^(\d{4})-W(\d\d)$/,Vr=/^(\d{4})-(\d\d)$/,Wr=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Gr={text:Pn,date:On("date",Ur,Nn(Ur,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":On("datetimelocal",Br,Nn(Br,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:On("time",Wr,Nn(Wr,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:On("week",zr,jn,"yyyy-Www"),month:On("month",Vr,Nn(Vr,["yyyy","MM"]),"yyyy-MM"),number:Rn,url:Fn,email:qn,radio:Hn,checkbox:Bn,hidden:f,button:f,submit:f,reset:f,file:f},Jr=["$browser","$sniffer","$filter","$parse",function(e,t,n,i){return{restrict:"E",require:["?ngModel"],link:{pre:function(r,o,a,s){s[0]&&(Gr[Xn(a.type)]||Gr.text)(r,o,a,s[0],t,e,n,i)}}}}],Xr=/^(true|false|\d+)$/,Yr=function(){return{restrict:"A",priority:100,compile:function(e,t){return Xr.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},Kr=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,i,r){e.$$addBindingInfo(i,r.ngBind),i=i[0],t.$watch(r.ngBind,function(e){i.textContent=e===n?"":e})}}}}],Qr=["$interpolate","$compile",function(e,t){return{compile:function(i){return t.$$addBindingClass(i),function(i,r,o){var a=e(r.attr(o.$attr.ngBindTemplate));t.$$addBindingInfo(r,a.expressions),r=r[0],o.$observe("ngBindTemplate",function(e){r.textContent=e===n?"":e})}}}}],Zr=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(i,r){var o=t(r.ngBindHtml),a=t(r.ngBindHtml,function(e){return(e||"").toString()});return n.$$addBindingClass(i),function(t,i,r){n.$$addBindingInfo(i,r.ngBindHtml),t.$watch(a,function(){i.html(e.getTrustedHtml(o(t))||"")})}}}}],eo=m({restrict:"A",require:"ngModel",link:function(e,t,n,i){i.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),to=zn("",!0),no=zn("Odd",0),io=zn("Even",1),ro=En({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),oo=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ao={},so={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=Qe("ng-"+e);ao[t]=["$parse","$rootScope",function(n,i){return{restrict:"A",compile:function(r,o){var a=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var r=function(){a(t,{$event:n})};so[e]&&i.$$phase?t.$evalAsync(r):t.$apply(r)})}}}}]});var lo=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,i,r,o,a){var s,l,u;n.$watch(r.ngIf,function(n){n?l||a(function(n,o){l=o,n[n.length++]=t.createComment(" end ngIf: "+r.ngIf+" "),s={clone:n},e.enter(n,i.parent(),i)}):(u&&(u.remove(),u=null),l&&(l.$destroy(),l=null),s&&(u=le(s.clone),e.leave(u).then(function(){u=null}),s=null))})}}}],uo=["$templateRequest","$anchorScroll","$animate",function(e,t,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ui.noop,compile:function(i,r){var o=r.ngInclude||r.src,a=r.onload||"",s=r.autoscroll;return function(i,r,l,u,c){var d,p,h,f=0,g=function(){p&&(p.remove(),p=null),d&&(d.$destroy(),d=null),h&&(n.leave(h).then(function(){p=null}),p=h,h=null)};i.$watch(o,function(o){var l=function(){!y(s)||s&&!i.$eval(s)||t()},p=++f;o?(e(o,!0).then(function(e){if(p===f){var t=i.$new();u.template=e;var s=c(t,function(e){g(),n.enter(e,null,r).then(l)});d=t,h=s,d.$emit("$includeContentLoaded",o),i.$eval(a)}},function(){p===f&&(g(),i.$emit("$includeContentError",o))}),i.$emit("$includeContentRequested",o)):(g(),u.template=null)})}}}}],co=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,i,r,o){return/SVG/.test(i[0].toString())?(i.empty(),void e(ye(o.template,t).childNodes)(n,function(e){i.append(e)},{futureParentElement:i})):(i.html(o.template),void e(i.contents())(n))}}}],po=En({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),ho=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,i,r){var a=t.attr(i.$attr.ngList)||", ",s="false"!==i.ngTrim,l=s?hi(a):a,u=function(e){if(!v(e)){var t=[];return e&&o(e.split(l),function(e){e&&t.push(s?hi(e):e)}),t}};r.$parsers.push(u),r.$formatters.push(function(e){return pi(e)?e.join(a):n}),r.$isEmpty=function(e){return!e||!e.length}}}},fo="ng-valid",go="ng-invalid",mo="ng-pristine",vo="ng-dirty",yo="ng-untouched",bo="ng-touched",wo="ng-pending",xo=i("ngModel"),ko=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,i,r,a,s,l,u,c,d){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=d(i.name||"",!1)(e);var p,h=a(i.ngModel),g=h.assign,m=h,b=g,w=null,k=this;this.$$setOptions=function(e){if(k.$options=e,e&&e.getterSetter){var t=a(i.ngModel+"()"),n=a(i.ngModel+"($$$p)");m=function(e){var n=h(e);return C(n)&&(n=t(e)),n},b=function(e,t){C(h(e))?n(e,{$$$p:k.$modelValue}):g(e,k.$modelValue)}}else if(!h.assign)throw xo("nonassign","Expression '{0}' is non-assignable. Element: {1}",i.ngModel,V(r))},this.$render=f,this.$isEmpty=function(e){return v(e)||""===e||null===e||e!==e};var S=r.inheritedData("$formController")||Ar,_=0;Vn({ctrl:this,$element:r,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},parentForm:S,$animate:s}),this.$setPristine=function(){k.$dirty=!1,k.$pristine=!0,s.removeClass(r,vo),s.addClass(r,mo)},this.$setDirty=function(){k.$dirty=!0,k.$pristine=!1,s.removeClass(r,mo),s.addClass(r,vo),S.$setDirty()},this.$setUntouched=function(){k.$touched=!1,k.$untouched=!0,s.setClass(r,yo,bo)},this.$setTouched=function(){k.$touched=!0,k.$untouched=!1,s.setClass(r,bo,yo)},this.$rollbackViewValue=function(){l.cancel(w),k.$viewValue=k.$$lastCommittedViewValue,k.$render()},this.$validate=function(){if(!x(k.$modelValue)||!isNaN(k.$modelValue)){var e=k.$$lastCommittedViewValue,t=k.$$rawModelValue,i=k.$valid,r=k.$modelValue,o=k.$options&&k.$options.allowInvalid;k.$$runValidators(t,e,function(e){
|
|
3217
|
|
-o||i===e||(k.$modelValue=e?t:n,k.$modelValue!==r&&k.$$writeModelToScope())})}},this.$$runValidators=function(e,t,i){function r(){var e=k.$$parserName||"parse";return p!==n?(p||(o(k.$validators,function(e,t){l(t,null)}),o(k.$asyncValidators,function(e,t){l(t,null)})),l(e,p),p):(l(e,null),!0)}function a(){var n=!0;return o(k.$validators,function(i,r){var o=i(e,t);n=n&&o,l(r,o)}),n?!0:(o(k.$asyncValidators,function(e,t){l(t,null)}),!1)}function s(){var i=[],r=!0;o(k.$asyncValidators,function(o,a){var s=o(e,t);if(!I(s))throw xo("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);l(a,n),i.push(s.then(function(){l(a,!0)},function(e){r=!1,l(a,!1)}))}),i.length?c.all(i).then(function(){u(r)},f):u(!0)}function l(e,t){d===_&&k.$setValidity(e,t)}function u(e){d===_&&i(e)}_++;var d=_;return r()&&a()?void s():void u(!1)},this.$commitViewValue=function(){var e=k.$viewValue;l.cancel(w),(k.$$lastCommittedViewValue!==e||""===e&&k.$$hasNativeValidators)&&(k.$$lastCommittedViewValue=e,k.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){k.$modelValue!==a&&k.$$writeModelToScope()}var i=k.$$lastCommittedViewValue,r=i;if(p=v(r)?n:!0)for(var o=0;o<k.$parsers.length;o++)if(r=k.$parsers[o](r),v(r)){p=!1;break}x(k.$modelValue)&&isNaN(k.$modelValue)&&(k.$modelValue=m(e));var a=k.$modelValue,s=k.$options&&k.$options.allowInvalid;k.$$rawModelValue=r,s&&(k.$modelValue=r,t()),k.$$runValidators(r,k.$$lastCommittedViewValue,function(e){s||(k.$modelValue=e?r:n,t())})},this.$$writeModelToScope=function(){b(e,k.$modelValue),o(k.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}})},this.$setViewValue=function(e,t){k.$viewValue=e,(!k.$options||k.$options.updateOnDefault)&&k.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,i=0,r=k.$options;r&&y(r.debounce)&&(n=r.debounce,x(n)?i=n:x(n[t])?i=n[t]:x(n["default"])&&(i=n["default"])),l.cancel(w),i?w=l(function(){k.$commitViewValue()},i):u.$$phase?k.$commitViewValue():e.$apply(function(){k.$commitViewValue()})},e.$watch(function(){var t=m(e);if(t!==k.$modelValue&&(k.$modelValue===k.$modelValue||t===t)){k.$modelValue=k.$$rawModelValue=t,p=n;for(var i=k.$formatters,r=i.length,o=t;r--;)o=i[r](o);k.$viewValue!==o&&(k.$viewValue=k.$$lastCommittedViewValue=o,k.$render(),k.$$runValidators(t,o,f))}return t})}],Co=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:ko,priority:1,compile:function(t){return t.addClass(mo).addClass(yo).addClass(fo),{pre:function(e,t,n,i){var r=i[0],o=i[1]||Ar;r.$$setOptions(i[2]&&i[2].$options),o.$addControl(r),n.$observe("name",function(e){r.$name!==e&&o.$$renameControl(r,e)}),e.$on("$destroy",function(){o.$removeControl(r)})},post:function(t,n,i,r){var o=r[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(e){o.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(n){o.$touched||(e.$$phase?t.$evalAsync(o.$setTouched):t.$apply(o.$setTouched))})}}}}}],So=/(\s+|^)default(\s+|$)/,_o=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var i=this;this.$options=e.$eval(t.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=hi(this.$options.updateOn.replace(So,function(){return i.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},To=En({terminal:!0,priority:1e3}),$o=["$locale","$interpolate",function(e,t){var n=/{}/g,i=/^when(Minus)?(.+)$/;return{restrict:"EA",link:function(r,a,s){function l(e){a.text(e||"")}var u,c=s.count,d=s.$attr.when&&a.attr(s.$attr.when),p=s.offset||0,h=r.$eval(d)||{},f={},g=t.startSymbol(),m=t.endSymbol(),v=g+c+"-"+p+m,y=ui.noop;o(s,function(e,t){var n=i.exec(t);if(n){var r=(n[1]?"-":"")+Xn(n[2]);h[r]=a.attr(s.$attr[t])}}),o(h,function(e,i){f[i]=t(e.replace(n,v))}),r.$watch(c,function(t){var n=parseFloat(t),i=isNaN(n);i||n in h||(n=e.pluralCat(n-p)),n===u||i&&isNaN(u)||(y(),y=r.$watch(f[n],l),u=n)})}}}],Eo=["$parse","$animate",function(e,a){var s="$$NG_REMOVED",l=i("ngRepeat"),u=function(e,t,n,i,r,o,a){e[n]=i,r&&(e[r]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0===(1&t))},c=function(e){return e.clone[0]},d=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(i,p){var h=p.ngRepeat,f=t.createComment(" end ngRepeat: "+h+" "),g=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!g)throw l("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",h);var m=g[1],v=g[2],y=g[3],b=g[4];if(g=m.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!g)throw l("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",m);var w=g[3]||g[1],x=g[2];if(y&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(y)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(y)))throw l("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",y);var k,C,S,_,T={$id:qe};return b?k=e(b):(S=function(e,t){return qe(t)},_=function(e){return e}),function(e,t,i,p,g){k&&(C=function(t,n,i){return x&&(T[x]=t),T[w]=n,T.$index=i,k(e,T)});var m=ue();e.$watchCollection(v,function(i){var p,v,b,k,T,$,E,D,M,I,P,A,j=t[0],N=ue();if(y&&(e[y]=i),r(i))M=i,D=C||S;else{D=C||_,M=[];for(var O in i)i.hasOwnProperty(O)&&"$"!=O.charAt(0)&&M.push(O);M.sort()}for(k=M.length,P=new Array(k),p=0;k>p;p++)if(T=i===M?p:M[p],$=i[T],E=D(T,$,p),m[E])I=m[E],delete m[E],N[E]=I,P[p]=I;else{if(N[E])throw o(P,function(e){e&&e.scope&&(m[e.id]=e)}),l("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",h,E,$);P[p]={id:E,scope:n,clone:n},N[E]=!0}for(var L in m){if(I=m[L],A=le(I.clone),a.leave(A),A[0].parentNode)for(p=0,v=A.length;v>p;p++)A[p][s]=!0;I.scope.$destroy()}for(p=0;k>p;p++)if(T=i===M?p:M[p],$=i[T],I=P[p],I.scope){b=j;do b=b.nextSibling;while(b&&b[s]);c(I)!=b&&a.move(le(I.clone),null,ti(j)),j=d(I),u(I.scope,p,w,$,x,T,k)}else g(function(e,t){I.scope=t;var n=f.cloneNode(!1);e[e.length++]=n,a.enter(e,null,ti(j)),j=n,I.clone=e,N[I.id]=I,u(I.scope,p,w,$,x,T,k)});m=N})}}}}],Do="ng-hide",Mo="ng-hide-animate",Io=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngShow,function(t){e[t?"removeClass":"addClass"](n,Do,{tempClasses:Mo})})}}}],Po=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngHide,function(t){e[t?"addClass":"removeClass"](n,Do,{tempClasses:Mo})})}}}],Ao=En(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&o(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),jo=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,i,r,a){var s=r.ngSwitch||r.on,l=[],u=[],c=[],d=[],p=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var i,r;for(i=0,r=c.length;r>i;++i)e.cancel(c[i]);for(c.length=0,i=0,r=d.length;r>i;++i){var s=le(u[i].clone);d[i].$destroy();var h=c[i]=e.leave(s);h.then(p(c,i))}u.length=0,d.length=0,(l=a.cases["!"+n]||a.cases["?"])&&o(l,function(n){n.transclude(function(i,r){d.push(r);var o=n.element;i[i.length++]=t.createComment(" end ngSwitchWhen: ");var a={clone:i};u.push(a),e.enter(i,o.parent(),o)})})})}}}],No=En({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,r){i.cases["!"+n.ngSwitchWhen]=i.cases["!"+n.ngSwitchWhen]||[],i.cases["!"+n.ngSwitchWhen].push({transclude:r,element:t})}}),Oo=En({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,r){i.cases["?"]=i.cases["?"]||[],i.cases["?"].push({transclude:r,element:t})}}),Lo=En({restrict:"EAC",link:function(e,t,n,r,o){if(!o)throw i("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",V(t));o(function(e){t.empty(),t.append(e)})}}),Ro=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var i=n.id,r=t[0].text;e.put(i,r)}}}}],Fo=i("ngOptions"),qo=m({restrict:"A",terminal:!0}),Ho=["$compile","$parse",function(e,i){var r=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,s={$setViewValue:f};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var i,r,o=this,a={},l=s;o.databound=n.ngModel,o.init=function(e,t,n){l=e,i=t,r=n},o.addOption=function(t,n){ae(t,'"option value"'),a[t]=!0,l.$viewValue==t&&(e.val(t),r.parent()&&r.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},o.removeOption=function(e){this.hasOption(e)&&(delete a[e],l.$viewValue===e&&this.renderUnknownOption(e))},o.renderUnknownOption=function(t){var n="? "+qe(t)+" ?";r.val(n),e.prepend(r),e.val(n),r.prop("selected",!0)},o.hasOption=function(e){return a.hasOwnProperty(e)},t.$on("$destroy",function(){o.renderUnknownOption=f})}],link:function(s,l,u,c){function d(e,t,n,i){n.$render=function(){var e=n.$viewValue;i.hasOption(e)?(S.parent()&&S.remove(),t.val(e),""===e&&f.prop("selected",!0)):null==e&&f?t.val(""):i.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){S.parent()&&S.remove(),n.$setViewValue(t.val())})})}function p(e,t,n){var i;n.$render=function(){var e=new He(n.$viewValue);o(t.find("option"),function(t){t.selected=y(e.get(t.value))})},e.$watch(function(){R(i,n.$viewValue)||(i=L(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){var e=[];o(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function h(t,s,l){function u(e,n,i){return R[$]=i,M&&(R[M]=n),e(t,R)}function c(){t.$apply(function(){var e,n=A(t)||[];if(v)e=[],o(s.val(),function(t){t=N?O[t]:t,e.push(d(t,n[t]))});else{var i=N?O[s.val()]:s.val();e=d(i,n[i])}l.$setViewValue(e),S()})}function d(e,t){if("?"===e)return n;if(""===e)return null;var i=D?D:P;return u(i,e,t)}function p(){var e,n=A(t);if(n&&pi(n)){e=new Array(n.length);for(var i=0,r=n.length;r>i;i++)e[i]=u(T,i,n[i]);return e}if(n){e={};for(var o in n)n.hasOwnProperty(o)&&(e[o]=u(T,o,n[o]))}return e}function h(e){var t;if(v)if(N&&pi(e)){t=new He([]);for(var n=0;n<e.length;n++)t.put(u(N,null,e[n]),!0)}else t=new He(e);else N&&(e=u(N,null,e));return function(n,i){var r;return r=N?N:D?D:P,v?y(t.remove(u(r,n,i))):e===u(r,n,i)}}function f(){x||(t.$$postDigest(S),x=!0)}function m(e,t,n){e[t]=e[t]||0,e[t]+=n?1:-1}function S(){x=!1;var e,n,i,r,c,d,p,f,b,S,_,$,E,D,P,j,F,q={"":[]},H=[""],U=l.$viewValue,B=A(t)||[],z=M?a(B):B,V={},W=h(U),G=!1;for(O={},$=0;S=z.length,S>$;$++)p=$,M&&(p=z[$],"$"===p.charAt(0))||(f=B[p],e=u(I,p,f)||"",(n=q[e])||(n=q[e]=[],H.push(e)),E=W(p,f),G=G||E,j=u(T,p,f),j=y(j)?j:"",F=N?N(t,R):M?z[$]:$,N&&(O[F]=p),n.push({id:F,label:j,selected:E}));for(v||(w||null===U?q[""].unshift({id:"",label:"",selected:!G}):G||q[""].unshift({id:"?",label:"",selected:!0})),_=0,b=H.length;b>_;_++){for(e=H[_],n=q[e],L.length<=_?(r={element:C.clone().attr("label",e),label:n.label},c=[r],L.push(c),s.append(r.element)):(c=L[_],r=c[0],r.label!=e&&r.element.attr("label",r.label=e)),D=null,$=0,S=n.length;S>$;$++)i=n[$],(d=c[$+1])?(D=d.element,d.label!==i.label&&(m(V,d.label,!1),m(V,i.label,!0),D.text(d.label=i.label),D.prop("label",d.label)),d.id!==i.id&&D.val(d.id=i.id),D[0].selected!==i.selected&&(D.prop("selected",d.selected=i.selected),ei&&D.prop("selected",d.selected))):(""===i.id&&w?P=w:(P=k.clone()).val(i.id).prop("selected",i.selected).attr("selected",i.selected).prop("label",i.label).text(i.label),c.push(d={element:P,label:i.label,id:i.id,selected:i.selected}),m(V,i.label,!0),D?D.after(P):r.element.append(P),D=P);for($++;c.length>$;)i=c.pop(),m(V,i.label,!1),i.element.remove()}for(;L.length>_;){for(n=L.pop(),$=1;$<n.length;++$)m(V,n[$].label,!1);n[0].element.remove()}o(V,function(e,t){e>0?g.addOption(t):0>e&&g.removeOption(t)})}var _;if(!(_=b.match(r)))throw Fo("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",b,V(s));var T=i(_[2]||_[1]),$=_[4]||_[6],E=/ as /.test(_[0])&&_[1],D=E?i(E):null,M=_[5],I=i(_[3]||""),P=i(_[2]?_[1]:$),A=i(_[7]),j=_[8],N=j?i(_[8]):null,O={},L=[[{element:s,label:""}]],R={};w&&(e(w)(t),w.removeClass("ng-scope"),w.remove()),s.empty(),s.on("change",c),l.$render=S,t.$watchCollection(A,f),t.$watchCollection(p,f),v&&t.$watchCollection(function(){return l.$modelValue},f)}if(c[1]){for(var f,g=c[0],m=c[1],v=u.multiple,b=u.ngOptions,w=!1,x=!1,k=ti(t.createElement("option")),C=ti(t.createElement("optgroup")),S=k.clone(),_=0,T=l.children(),$=T.length;$>_;_++)if(""===T[_].value){f=w=T.eq(_);break}g.init(m,w,S),v&&(m.$isEmpty=function(e){return!e||0===e.length}),b?h(s,l,m):v?p(s,l,m):d(s,l,m,g)}}}}],Uo=["$interpolate",function(e){var t={addOption:f,removeOption:f};return{restrict:"E",priority:100,compile:function(n,i){if(v(i.value)){var r=e(n.text(),!0);r||i.$set("value",n.text())}return function(e,n,i){var o="$selectController",a=n.parent(),s=a.data(o)||a.parent().data(o);s&&s.databound||(s=t),r?e.$watch(r,function(e,t){i.$set("value",e),t!==e&&s.removeOption(t),s.addOption(e,n)}):s.addOption(i.value,n),n.on("$destroy",function(){s.removeOption(i.value)})}}}}],Bo=m({restrict:"E",terminal:!1}),zo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){i&&(n.required=!0,i.$validators.required=function(e,t){return!n.required||!i.$isEmpty(t)},n.$observe("required",function(){i.$validate()}))}}},Vo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,r,o){if(o){var a,s=r.ngPattern||r.pattern;r.$observe("pattern",function(e){if(w(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw i("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,V(t));a=e||n,o.$validate()}),o.$validators.pattern=function(e){return o.$isEmpty(e)||v(a)||a.test(e)}}}}},Wo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var r=-1;n.$observe("maxlength",function(e){var t=p(e);r=isNaN(t)?-1:t,i.$validate()}),i.$validators.maxlength=function(e,t){return 0>r||i.$isEmpty(t)||t.length<=r}}}}},Go=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var r=0;n.$observe("minlength",function(e){r=p(e)||0,i.$validate()}),i.$validators.minlength=function(e,t){return i.$isEmpty(t)||t.length>=r}}}}};return e.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(ie(),he(ui),void ti(t).ready(function(){Q(t,Z)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>'),function(e,t,n){"use strict";function i(){this.$get=["$$sanitizeUri",function(e){return function(t){var n=[];return a(t,u(n,function(t,n){return!/^unsafe/.test(e(t,n))})),n.join("")}}]}function r(e){var n=[],i=u(n,t.noop);return i.chars(e),n.join("")}function o(e){var t,n={},i=e.split(",");for(t=0;t<i.length;t++)n[i[t]]=!0;return n}function a(e,n){function i(e,i,o,a){if(i=t.lowercase(i),_[i])for(;b.last()&&T[b.last()];)r("",b.last());S[i]&&b.last()==i&&r("",i),a=x[i]||!!a,a||b.push(i);var l={};o.replace(h,function(e,t,n,i,r){var o=n||i||r||"";l[t]=s(o)}),n.start&&n.start(i,l,a)}function r(e,i){var r,o=0;if(i=t.lowercase(i))for(o=b.length-1;o>=0&&b[o]!=i;o--);if(o>=0){for(r=b.length-1;r>=o;r--)n.end&&n.end(b[r]);b.length=o}}"string"!=typeof e&&(e=null===e||"undefined"==typeof e?"":""+e);var o,a,l,u,b=[],w=e;for(b.last=function(){return b[b.length-1]};e;){if(u="",a=!0,b.last()&&E[b.last()]?(e=e.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+b.last()+"[^>]*>","i"),function(e,t){return t=t.replace(m,"$1").replace(y,"$1"),n.chars&&n.chars(s(t)),""}),r("",b.last())):(0===e.indexOf("<!--")?(o=e.indexOf("--",4),o>=0&&e.lastIndexOf("-->",o)===o&&(n.comment&&n.comment(e.substring(4,o)),e=e.substring(o+3),a=!1)):v.test(e)?(l=e.match(v),l&&(e=e.replace(l[0],""),a=!1)):g.test(e)?(l=e.match(p),l&&(e=e.substring(l[0].length),l[0].replace(p,r),a=!1)):f.test(e)&&(l=e.match(d),l?(l[4]&&(e=e.substring(l[0].length),l[0].replace(d,i)),a=!1):(u+="<",e=e.substring(1))),a&&(o=e.indexOf("<"),u+=0>o?e:e.substring(0,o),e=0>o?"":e.substring(o),n.chars&&n.chars(s(u)))),e==w)throw c("badparse","The sanitizer was unable to parse the following block of html: {0}",e);w=e}r()}function s(e){return e?(j.innerHTML=e.replace(/</g,"<"),j.textContent):""}function l(e){return e.replace(/&/g,"&").replace(b,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(w,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function u(e,n){var i=!1,r=t.bind(e,e.push);return{start:function(e,o,a){e=t.lowercase(e),!i&&E[e]&&(i=e),i||D[e]!==!0||(r("<"),r(e),t.forEach(o,function(i,o){var a=t.lowercase(o),s="img"===e&&"src"===a||"background"===a;A[a]!==!0||M[a]===!0&&!n(i,s)||(r(" "),r(o),r('="'),r(l(i)),r('"'))}),r(a?"/>":">"))},end:function(e){e=t.lowercase(e),i||D[e]!==!0||(r("</"),r(e),r(">")),e==i&&(i=!1)},chars:function(e){i||r(l(e))}}}var c=t.$$minErr("$sanitize"),d=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,p=/^<\/\s*([\w:-]+)[^>]*>/,h=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,f=/^</,g=/^<\//,m=/<!--(.*?)-->/g,v=/<!DOCTYPE([^>]*?)>/i,y=/<!\[CDATA\[(.*?)]]>/g,b=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,w=/([^\#-~| |!])/g,x=o("area,br,col,hr,img,wbr"),k=o("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),C=o("rp,rt"),S=t.extend({},C,k),_=t.extend({},k,o("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),T=t.extend({},C,o("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),$=o("animate,animateColor,animateMotion,animateTransform,circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,set,stop,svg,switch,text,title,tspan,use"),E=o("script,style"),D=t.extend({},x,_,T,S,$),M=o("background,cite,href,longdesc,src,usemap,xlink:href"),I=o("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width"),P=o("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,attributeName,attributeType,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan"),A=t.extend({},M,P,I),j=document.createElement("pre");t.module("ngSanitize",[]).provider("$sanitize",i),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"”’]/i,i=/^mailto:/i;return function(o,a){function s(e){e&&h.push(r(e))}function l(e,n){h.push("<a "),t.isDefined(a)&&h.push('target="',a,'" '),h.push('href="',e.replace(/"/g,"""),'">'),s(n),h.push("</a>")}if(!o)return o;for(var u,c,d,p=o,h=[];u=p.match(n);)c=u[0],u[2]||u[4]||(c=(u[3]?"http://":"mailto:")+c),d=u.index,s(p.substr(0,d)),l(c,u[0].replace(i,"")),p=p.substring(d+u[0].length);return s(p),e(h.join(""))}}])}(window,window.angular),function(e){"use strict";var t={};t.VERSION="0.9.14";var n,i={},r=function(e,t){return function(){return t.apply(e,arguments)}},o=function(){var e,t,n=arguments,i=n[0];for(t=1;t<n.length;t++)for(e in n[t])e in i||!n[t].hasOwnProperty(e)||(i[e]=n[t][e]);return i},a=function(e,t){return{value:e,name:t}};t.DEBUG=a(1,"DEBUG"),t.INFO=a(2,"INFO"),t.WARN=a(4,"WARN"),t.ERROR=a(8,"ERROR"),t.OFF=a(99,"OFF");var s=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};s.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},enabledFor:function(e){var t=this.context.filterLevel;return e.value>=t.value},debug:function(){this.invoke(t.DEBUG,arguments)},info:function(){this.invoke(t.INFO,arguments)},warn:function(){this.invoke(t.WARN,arguments)},error:function(){this.invoke(t.ERROR,arguments)},invoke:function(e,t){n&&this.enabledFor(e)&&n(t,o({level:e},this.context))}};var l=new s({filterLevel:t.OFF});!function(){var e=t;e.enabledFor=r(l,l.enabledFor),e.debug=r(l,l.debug),e.info=r(l,l.info),e.warn=r(l,l.warn),e.error=r(l,l.error),e.log=e.info}(),t.setHandler=function(e){n=e},t.setLevel=function(e){l.setLevel(e);for(var t in i)i.hasOwnProperty(t)&&i[t].setLevel(e)},t.get=function(e){return i[e]||(i[e]=new s(o({name:e},l.context)))},t.useDefaults=function(e){"undefined"!=typeof console&&(t.setLevel(e||t.DEBUG),t.setHandler(function(e,n){var i=console.log;n.name&&(e[0]="["+n.name+"] "+e[0]),n.level===t.WARN&&console.warn?i=console.warn:n.level===t.ERROR&&console.error?i=console.error:n.level===t.INFO&&console.info&&(i=console.info),Function.prototype.apply.call(i,console,e)}))},"function"==typeof define&&define.amd?define(t):"undefined"!=typeof module&&module.exports?module.exports=t:(t._prevLogger=e.Logger,t.noConflict=function(){return e.Logger=t._prevLogger,t},e.Logger=t)}(this),Logger.setLevel(Logger.INFO),Logger.storagePrefix="hawtio",Logger.oldGet=Logger.get,Logger.loggers={},Logger.get=function(e){var t=Logger.oldGet(e);return Logger.loggers[e]=t,t},window.LogBuffer=100,"localStorage"in window){"logLevel"in window.localStorage||(window.localStorage.logLevel=JSON.stringify(Logger.INFO));var logLevel=Logger.DEBUG;try{logLevel=JSON.parse(window.localStorage.logLevel)}catch(e){console.error("Failed to parse log level setting: ",e)}if(Logger.setLevel(logLevel),"showLog"in window.localStorage){var showLog=window.localStorage.showLog;if("true"===showLog){var container=document.getElementById("log-panel");container&&container.setAttribute("style","bottom: 50%;")}}if("logBuffer"in window.localStorage){var logBuffer=window.localStorage.logBuffer;window.LogBuffer=parseInt(logBuffer,10)}else window.localStorage.logBuffer=window.LogBuffer;if("childLoggers"in window.localStorage){var childLoggers=[];try{childLoggers=JSON.parse(localStorage.childLoggers)}catch(e){}childLoggers.forEach(function(e){Logger.get(e.logger).setLevel(Logger[e.level])})}}var consoleLogger=null;"console"in window&&(window.JSConsole=window.console,consoleLogger=function(e,t){var n=window.JSConsole,i=n.log;if(t.name&&(e[0]="["+t.name+"] "+e[0]),t.level===Logger.WARN&&"warn"in n?i=n.warn:t.level===Logger.ERROR&&"error"in n?i=n.error:t.level===Logger.INFO&&"info"in n&&(i=n.info),i&&i.apply)try{i.apply(n,e)}catch(r){n.log(e)}}),Logger.getType=function(e){return Object.prototype.toString.call(e).slice(8,-1)},Logger.isError=function(e){return e&&"Error"===Logger.getType(e)},Logger.isArray=function(e){return e&&"Array"===Logger.getType(e)},Logger.isObject=function(e){return e&&"Object"===Logger.getType(e)},Logger.isString=function(e){return e&&"String"===Logger.getType(e)},window.logInterceptors=[],Logger.formatStackTraceString=function(e){var t=e.split("\n");if(t.length>100){var n=20,i=t.length-2*n;t.splice(n,i,">>> snipped "+i+" frames <<<")}for(var r='<div class="log-stack-trace">\n',o=0;o<t.length;o++){var a=t[o];0!==a.trim().length&&(r=r+"<p>"+a+"</p>\n")}return r+="</div>\n"},Logger.setHandler(function(e,t){function n(){r&&i&&(r.appendChild(i),r.childNodes.length>parseInt(window.LogBuffer)&&r.removeChild(r.firstChild),g&&(r.scrollTop=r.scrollHeight)),consoleLogger&&consoleLogger(e,t);for(var n=window.logInterceptors,o=0;o<n.length;o++)n[o](t.level.name,a)}var i=void 0,r=void 0,o=document.getElementById("hawtio-log-panel");o&&(r=document.getElementById("hawtio-log-panel-statements"),i=document.createElement("li"));var a="",s=[];if("ERROR"===t.level.name&&1===e.length&&Logger.isString(e[0])){var l=e[0],u=l.split(/\n/);if(u.length>1){var c="Error: Jolokia-Error: ";if(0===u[0].search(c)){var d=u[0].slice(c.length);window.JSConsole.info("msg: ",d);try{var p=JSON.parse(d),h=new Error;h.message=p.error,h.stack=p.stacktrace.replace("\\t","  ").replace("\\n","\n"),e=[h]}catch(f){}}else{var h=new Error;h.message=u[0],h.stack=l,e=[h]}}}var g=!1;if(i){for(var m=0;m<e.length;m++){var l=e[m];if(Logger.isArray(l)||Logger.isObject(l)){var v="";try{v='<pre data-language="javascript">'+JSON.stringify(l,null,2)+"</pre>"}catch(h){v=l+" (failed to convert) "}a+=v}else Logger.isError(l)?("message"in l&&(a+=l.message),"stack"in l&&s.push(function(){var e=Logger.formatStackTraceString(l.stack),n=Logger;t.name&&(n=Logger.get(t.name)),n.info("Stack trace: ",e)})):a+=l}t.name&&(a='[<span class="green">'+t.name+"</span>] "+a),i.innerHTML=a,i.className=t.level.name,o&&(0===o.scrollHeight&&(g=!0),r.scrollTop>r.scrollHeight-o.scrollHeight-200&&(g=!0))}n(),s.forEach(function(e){e()})});var hawtioPluginLoader=function(e){function t(e,t){angular.isArray(t)||(t=[t]);var n=[];return t.forEach(function(t){e.forEach(function(e){t===e&&n.push(e)})}),n}var n=Logger.get("hawtio-loader");return e.log=n,e.urls=[],e.modules=[],e.tasks=[],e.registerPreBootstrapTask=function(t,i){var r=t,o="unnamed-task-"+(e.tasks.length+1);angular.isFunction(t)&&(n.debug("Adding legacy task"),r={name:o,task:t}),t.name||(t.name=o),t.depends&&!angular.isArray(t.depends)&&"*"!==t.depends&&(t.depends=[t.depends]),i?e.tasks.unshift(r):e.tasks.push(r)},e.addModule=function(t){n.debug("Adding module: "+t),e.modules.push(t)},e.addUrl=function(t){n.debug("Adding URL: "+t),e.urls.push(t)},e.getModules=function(){return e.modules},e.loaderCallback=null,e.setLoaderCallback=function(t){e.loaderCallback=t},e.loadPlugins=function(i){var r=e.loaderCallback,o={},a=e.urls.length,s=a,l=function(){var n=[],r=[];e.registerPreBootstrapTask({name:"Hawtio Bootstrap",depends:"*",task:function(){r.length>0&&(e.log.debug("Orphaned tasks: "),r.forEach(function(t){e.log.debug(" name: "+t.name+" depends: ",t.depends)})),e.log.debug("Executed tasks: ",n),i()}});var o=function(){var i=null,a=[];for(0===e.tasks.length&&(i=r.shift());!i&&r.length>0;){var s=r.shift();if("*"===s.depends)e.tasks.length>0?a.push(s):i=s;else{var l=t(n,s.depends);l.length===s.depends.length?i=s:a.push(s)}}if(a.length>0&&a.forEach(function(e){r.push(e)}),i||(i=e.tasks.shift()),i&&i.depends&&e.tasks.length>0)if(e.log.debug("Task '"+i.name+"' has dependencies: ",i.depends),"*"===i.depends){if(e.tasks.length>0)return e.log.debug("Task '"+i.name+"' wants to run after all other tasks, deferring"),r.push(i),void o()}else{var l=t(n,i.depends);if(l.length!=i.depends.length)return e.log.debug("Deferring task: '"+i.name+"'"),r.push(i),void o()}i?(e.log.debug("Executing task: '"+i.name+"'"),n.push(i.name),i.task(o)):e.log.debug("All tasks executed")};o()},u=function(){var e=0;$.each(o,function(t,n){e+=n.Scripts.length});var t=e,i=function(){$.ajaxSetup({async:!0}),e-=1,r&&r.scriptLoaderCallback(r,t,e+1),0===e&&l()};e>0?$.each(o,function(e,t){t.Scripts.forEach(function(e){var r=t.Context+"/"+e;n.debug("Fetching script: ",r),$.ajaxSetup({async:!1}),$.getScript(r).done(function(e){n.debug("Loaded script: ",r)}).fail(function(e,t,i){n.info('Failed loading script: "',i.message,'" (<a href="',r,":",i.lineNumber,'">',r,":",i.lineNumber,"</a>)")}).always(i)})}):($.ajaxSetup({async:!0}),l())};if(0===a)u();else{var c=function(){a-=1,r&&r.urlLoaderCallback(r,s,a+1),0===a&&u()},d=new RegExp(/^jolokia:/);$.each(e.urls,function(e,t){if(d.test(t)){var i=t.split(":");i=i.reverse(),i.pop(),t=i.pop();var r=i.reverse().join(":"),a=new Jolokia(t);try{var s=a.getAttribute(r,null);$.extend(o,s)}catch(l){}c()}else n.debug("Trying url: ",t),$.get(t,function(e){if(angular.isString(e))try{e=angular.fromJson(e)}catch(t){return}$.extend(o,e)}).always(function(){c()})})}},e.debug=function(){n.debug("urls and modules"),n.debug(e.urls),n.debug(e.modules)},e.setLoaderCallback({scriptLoaderCallback:function(e,t,i){n.debug("Total scripts: ",t," Remaining: ",i)},urlLoaderCallback:function(e,t,i){n.debug("Total URLs: ",t," Remaining: ",i)}}),e}(hawtioPluginLoader||{},window,void 0),HawtioCore;!function(e){e.injector=null,e.pluginName="hawtio-core";var t=Logger.get(e.pluginName),n=angular.module(e.pluginName,[]);n.config(["$locationProvider",function(e){e.html5Mode(!0)}]),n.run(["documentBase",function(e){t.debug("loaded")}]);var i={length:0,key:function(e){return void 0},getItem:function(e){return i[e]},setItem:function(e,t){i[e]=t},removeItem:function(e){var t=i[e];return delete i[e],t},clear:function(){}};e.dummyLocalStorage=i,n.factory("localStorage",function(){return window.localStorage||i}),n.factory("documentBase",["$document",function(e){var n=e.find("base"),i="/";return n&&n.length>0?i=n.attr("href"):t.warn("Document is missing a 'base' tag, defaulting to '/'"),t.debug("Document base: ",i),i}]),n.factory("viewRegistry",function(){return{}}),n.factory("helpRegistry",function(){return{addUserDoc:function(){},addDevDoc:function(){},addSubTopic:function(){},getOrCreateTopic:function(){return void 0},mapTopicName:function(){return void 0},mapSubTopicName:function(){return void 0},getTopics:function(){return void 0},disableAutodiscover:function(){},discoverHelpFiles:function(){}}}),n.factory("preferencesRegistry",function(){return{addTab:function(){},getTab:function(){return void 0},getTabs:function(){return void 0}}}),n.factory("pageTitle",function(){return{addTitleElement:function(){},getTitle:function(){return void 0},getTitleWithSeparator:function(){return void 0},getTitleExcluding:function(){return void 0},getTitleArrayExcluding:function(){return void 0}}}),n.factory("toastr",["$window",function(e){var t=e.toastr;return t||(t={},e.toastr=t),t}]),n.factory("HawtioDashboard",function(){return{hasDashboard:!1,inDashboard:!1,getAddLink:function(){return""}}}),n.factory("branding",function(){return{}}),n.factory("userDetails",function(){return{logout:function(){t.debug("Dummy userDetails.logout()")}}}),hawtioPluginLoader.addModule("ng"),hawtioPluginLoader.addModule("ngSanitize"),hawtioPluginLoader.addModule(e.pluginName),$(function(){if(jQuery.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];
|
|
3218
|
|
-return{browser:t[1]||"",version:t[2]||"0"}},!jQuery.browser){var n=jQuery.uaMatch(navigator.userAgent),i={};n.browser&&(i[n.browser]=!0,i.version=n.version),i.chrome?i.webkit=!0:i.webkit&&(i.safari=!0),jQuery.browser=i}hawtioPluginLoader.loadPlugins(function(){e.injector?t.debug("Application already bootstrapped"):(e.injector=angular.bootstrap(document,hawtioPluginLoader.getModules()),t.debug("Bootstrapped application"))})})}(HawtioCore||(HawtioCore={})),function(){function e(e,t){if(e!==t){var n=e===e,i=t===t;if(e>t||!n||"undefined"==typeof e&&i)return 1;if(t>e||!i||"undefined"==typeof t&&n)return-1}return 0}function t(e,t,n){if(t!==t)return p(e,n);for(var i=(n||0)-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function i(e){return"string"==typeof e?e:null==e?"":e+""}function r(e){return e.charCodeAt(0)}function o(e,t){for(var n=-1,i=e.length;++n<i&&t.indexOf(e.charAt(n))>-1;);return n}function a(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}function s(t,n){return e(t.criteria,n.criteria)||t.index-n.index}function l(t,n){for(var i=-1,r=t.criteria,o=n.criteria,a=r.length;++i<a;){var s=e(r[i],o[i]);if(s)return s}return t.index-n.index}function u(e){return Re[e]}function c(e){return Fe[e]}function d(e){return"\\"+Ue[e]}function p(e,t,n){for(var i=e.length,r=n?t||i:(t||0)-1;n?r--:++r<i;){var o=e[r];if(o!==o)return r}return-1}function h(e){return e&&"object"==typeof e||!1}function f(e){return 160>=e&&e>=9&&13>=e||32==e||160==e||5760==e||6158==e||e>=8192&&(8202>=e||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function g(e,t){for(var n=-1,i=e.length,r=-1,o=[];++n<i;)e[n]===t&&(e[n]=q,o[++r]=n);return o}function m(e,t){for(var n,i=-1,r=e.length,o=-1,a=[];++i<r;){var s=e[i],l=t?t(s,i,e):s;i&&n===l||(n=l,a[++o]=s)}return a}function v(e){for(var t=-1,n=e.length;++t<n&&f(e.charCodeAt(t)););return t}function y(e){for(var t=e.length;t--&&f(e.charCodeAt(t)););return t}function b(e){return qe[e]}function w(f){function G(e){if(h(e)&&!Ya(e)&&!(e instanceof Z)){if(e instanceof K)return e;if(ea.call(e,"__chain__")&&ea.call(e,"__wrapped__"))return Nn(e)}return new K(e)}function K(e,t,n){this.__wrapped__=e,this.__actions__=n||[],this.__chain__=!!t}function Z(e){this.__wrapped__=e,this.__actions__=null,this.__dir__=1,this.__dropCount__=0,this.__filtered__=!1,this.__iteratees__=null,this.__takeCount__=Ma,this.__views__=null}function Re(){var e=this.__actions__,t=this.__iteratees__,n=this.__views__,i=new Z(this.__wrapped__);return i.__actions__=e?Ke(e):null,i.__dir__=this.__dir__,i.__dropCount__=this.__dropCount__,i.__filtered__=this.__filtered__,i.__iteratees__=t?Ke(t):null,i.__takeCount__=this.__takeCount__,i.__views__=n?Ke(n):null,i}function Fe(){if(this.__filtered__){var e=new Z(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function qe(){var e=this.__wrapped__.value();if(!Ya(e))return Jt(e,this.__actions__);var t=this.__dir__,n=0>t,i=yn(0,e.length,this.__views__),r=i.start,o=i.end,a=o-r,s=this.__dropCount__,l=Sa(a,this.__takeCount__),u=n?o:r-1,c=this.__iteratees__,d=c?c.length:0,p=0,h=[];e:for(;a--&&l>p;){u+=t;for(var f=-1,g=e[u];++f<d;){var m=c[f],v=m.iteratee,y=v(g,u,e),b=m.type;if(b==L)g=y;else if(!y){if(b==O)continue e;break e}}s?s--:h[p++]=g}return h}function He(){this.__data__={}}function Ue(e){return this.has(e)&&delete this.__data__[e]}function ze(e){return"__proto__"==e?x:this.__data__[e]}function Ve(e){return"__proto__"!=e&&ea.call(this.__data__,e)}function We(e,t){return"__proto__"!=e&&(this.__data__[e]=t),this}function Ge(e){var t=e?e.length:0;for(this.data={hash:wa(null),set:new ha};t--;)this.push(e[t])}function Xe(e,t){var n=e.data,i="string"==typeof t||$r(t)?n.set.has(t):n.hash[t];return i?0:-1}function Ye(e){var t=this.data;"string"==typeof e||$r(e)?t.set.add(e):t.hash[e]=!0}function Ke(e,t){var n=-1,i=e.length;for(t||(t=Fo(i));++n<i;)t[n]=e[n];return t}function Qe(e,t){for(var n=-1,i=e.length;++n<i&&t(e[n],n,e)!==!1;);return e}function Ze(e,t){for(var n=e.length;n--&&t(e[n],n,e)!==!1;);return e}function et(e,t){for(var n=-1,i=e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function tt(e,t){for(var n=-1,i=e.length,r=-1,o=[];++n<i;){var a=e[n];t(a,n,e)&&(o[++r]=a)}return o}function nt(e,t){for(var n=-1,i=e.length,r=Fo(i);++n<i;)r[n]=t(e[n],n,e);return r}function it(e){for(var t=-1,n=e.length,i=Da;++t<n;){var r=e[t];r>i&&(i=r)}return i}function rt(e){for(var t=-1,n=e.length,i=Ma;++t<n;){var r=e[t];i>r&&(i=r)}return i}function ot(e,t,n,i){var r=-1,o=e.length;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function at(e,t,n,i){var r=e.length;for(i&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function st(e,t){for(var n=-1,i=e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function lt(e,t){return"undefined"==typeof e?t:e}function ut(e,t,n,i){return"undefined"!=typeof e&&ea.call(i,n)?e:t}function ct(e,t,n){var i=es(t);if(!n)return pt(t,e,i);for(var r=-1,o=i.length;++r<o;){var a=i[r],s=e[a],l=n(s,t[a],a,e,t);(l===l?l===s:s!==s)&&("undefined"!=typeof s||a in e)||(e[a]=l)}return e}function dt(e,t){for(var n=-1,i=e.length,r=_n(i),o=t.length,a=Fo(o);++n<o;){var s=t[n];r?(s=parseFloat(s),a[n]=Cn(s,i)?e[s]:x):a[n]=e[s]}return a}function pt(e,t,n){n||(n=t,t={});for(var i=-1,r=n.length;++i<r;){var o=n[i];t[o]=e[o]}return t}function ht(e,t){for(var n=-1,i=t.length;++n<i;){var r=t[n];e[r]=dn(e[r],C,e)}return e}function ft(e,t,n){var i=typeof e;return"function"==i?"undefined"!=typeof t&&kn(e)?Kt(e,t,n):e:null==e?Eo:"object"==i?Ot(e):"undefined"==typeof t?qt(e+""):Lt(e+"",t)}function gt(e,t,n,i,r,o,a){var s;if(n&&(s=r?n(e,i,r):n(e)),"undefined"!=typeof s)return s;if(!$r(e))return e;var l=Ya(e);if(l){if(s=bn(e),!t)return Ke(e,s)}else{var u=na.call(e),c=u==W;if(u!=X&&u!=H&&(!c||r))return Oe[u]?xn(e,u,t):r?e:{};if(s=wn(c?{}:e),!t)return pt(e,s,es(e))}o||(o=[]),a||(a=[]);for(var d=o.length;d--;)if(o[d]==e)return a[d];return o.push(e),a.push(s),(l?Qe:Et)(e,function(i,r){s[r]=gt(i,t,n,r,e,o,a)}),s}function mt(e,t,n,i){if("function"!=typeof e)throw new Jo(F);return fa(function(){e.apply(x,zt(n,i))},t)}function vt(e,n){var i=e?e.length:0,r=[];if(!i)return r;var o=-1,a=vn(),s=a==t,l=s&&n.length>=200&&qa(n),u=n.length;l&&(a=Xe,s=!1,n=l);e:for(;++o<i;){var c=e[o];if(s&&c===c){for(var d=u;d--;)if(n[d]===c)continue e;r.push(c)}else a(n,c)<0&&r.push(c)}return r}function yt(e,t){var n=e?e.length:0;if(!_n(n))return Et(e,t);for(var i=-1,r=jn(e);++i<n&&t(r[i],i,r)!==!1;);return e}function bt(e,t){var n=e?e.length:0;if(!_n(n))return Dt(e,t);for(var i=jn(e);n--&&t(i[n],n,i)!==!1;);return e}function wt(e,t){var n=!0;return yt(e,function(e,i,r){return n=!!t(e,i,r)}),n}function xt(e,t,n,i){var r=e.length;for(n=null==n?0:+n||0,0>n&&(n=-n>r?0:r+n),i="undefined"==typeof i||i>r?r:+i||0,0>i&&(i+=r),r=n>i?0:i>>>0,n>>>=0;r>n;)e[n++]=t;return e}function kt(e,t){var n=[];return yt(e,function(e,i,r){t(e,i,r)&&n.push(e)}),n}function Ct(e,t,n,i){var r;return n(e,function(e,n,o){return t(e,n,o)?(r=i?n:e,!1):void 0}),r}function St(e,t,n,i){for(var r=(i||0)-1,o=e.length,a=-1,s=[];++r<o;){var l=e[r];if(h(l)&&_n(l.length)&&(Ya(l)||br(l))){t&&(l=St(l,t,n));var u=-1,c=l.length;for(s.length+=c;++u<c;)s[++a]=l[u]}else n||(s[++a]=l)}return s}function _t(e,t,n){for(var i=-1,r=jn(e),o=n(e),a=o.length;++i<a;){var s=o[i];if(t(r[s],s,r)===!1)break}return e}function Tt(e,t,n){for(var i=jn(e),r=n(e),o=r.length;o--;){var a=r[o];if(t(i[a],a,i)===!1)break}return e}function $t(e,t){return _t(e,t,Yr)}function Et(e,t){return _t(e,t,es)}function Dt(e,t){return Tt(e,t,es)}function Mt(e,t){for(var n=-1,i=t.length,r=-1,o=[];++n<i;){var a=t[n];Tr(e[a])&&(o[++r]=a)}return o}function It(e,t,n){var i=-1,r="function"==typeof t,o=e?e.length:0,a=_n(o)?Fo(o):[];return yt(e,function(e){var o=r?t:null!=e&&e[t];a[++i]=o?o.apply(e,n):x}),a}function Pt(e,t,n,i,r,o){if(e===t)return 0!==e||1/e==1/t;var a=typeof e,s=typeof t;return"function"!=a&&"object"!=a&&"function"!=s&&"object"!=s||null==e||null==t?e!==e&&t!==t:At(e,t,Pt,n,i,r,o)}function At(e,t,n,i,r,o,a){var s=Ya(e),l=Ya(t),u=U,c=U;s||(u=na.call(e),u==H?u=X:u!=X&&(s=Nr(e))),l||(c=na.call(t),c==H?c=X:c!=X&&(l=Nr(t)));var d=u==X,p=c==X,h=u==c;if(h&&!s&&!d)return hn(e,t,u);var f=d&&ea.call(e,"__wrapped__"),g=p&&ea.call(t,"__wrapped__");if(f||g)return n(f?e.value():e,g?t.value():t,i,r,o,a);if(!h)return!1;o||(o=[]),a||(a=[]);for(var m=o.length;m--;)if(o[m]==e)return a[m]==t;o.push(e),a.push(t);var v=(s?pn:fn)(e,t,n,i,r,o,a);return o.pop(),a.pop(),v}function jt(e,t,n,i,r){var o=t.length;if(null==e)return!o;for(var a=-1,s=!r;++a<o;)if(s&&i[a]?n[a]!==e[t[a]]:!ea.call(e,t[a]))return!1;for(a=-1;++a<o;){var l=t[a];if(s&&i[a])var u=ea.call(e,l);else{var c=e[l],d=n[a];u=r?r(c,d,l):x,"undefined"==typeof u&&(u=Pt(d,c,r,!0))}if(!u)return!1}return!0}function Nt(e,t){var n=[];return yt(e,function(e,i,r){n.push(t(e,i,r))}),n}function Ot(e){var t=es(e),n=t.length;if(1==n){var i=t[0],r=e[i];if(Tn(r))return function(e){return null!=e&&e[i]===r&&ea.call(e,i)}}for(var o=Fo(n),a=Fo(n);n--;)r=e[t[n]],o[n]=r,a[n]=Tn(r);return function(e){return jt(e,t,o,a)}}function Lt(e,t){return Tn(t)?function(n){return null!=n&&n[e]===t}:function(n){return null!=n&&Pt(t,n[e],null,!0)}}function Rt(e,t,n,i,r){var o=_n(t.length)&&(Ya(t)||Nr(t));return(o?Qe:Et)(t,function(t,a,s){if(h(t))return i||(i=[]),r||(r=[]),Ft(e,s,a,Rt,n,i,r);var l=e[a],u=n?n(l,t,a,e,s):x,c="undefined"==typeof u;c&&(u=t),!o&&"undefined"==typeof u||!c&&(u===u?u===l:l!==l)||(e[a]=u)}),e}function Ft(e,t,n,i,r,o,a){for(var s=o.length,l=t[n];s--;)if(o[s]==l)return void(e[n]=a[s]);var u=e[n],c=r?r(u,l,n,e,t):x,d="undefined"==typeof c;d&&(c=l,_n(l.length)&&(Ya(l)||Nr(l))?c=Ya(u)?u:u?Ke(u):[]:Qa(l)||br(l)?c=br(u)?Rr(u):Qa(u)?u:{}:d=!1),o.push(l),a.push(c),d?e[n]=i(c,l,r,o,a):(c===c?c!==u:u===u)&&(e[n]=c)}function qt(e){return function(t){return null==t?x:t[e]}}function Ht(t,n){var i=n.length,r=dt(t,n);for(n.sort(e);i--;){var o=parseFloat(n[i]);if(o!=a&&Cn(o)){var a=o;ga.call(t,o,1)}}return r}function Ut(e,t){return e+ua(Ea()*(t-e+1))}function Bt(e,t,n,i,r){return r(e,function(e,r,o){n=i?(i=!1,e):t(n,e,r,o)}),n}function zt(e,t,n){var i=-1,r=e.length;t=null==t?0:+t||0,0>t&&(t=-t>r?0:r+t),n="undefined"==typeof n||n>r?r:+n||0,0>n&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var o=Fo(r);++i<r;)o[i]=e[i+t];return o}function Vt(e,t){var n;return yt(e,function(e,i,r){return n=t(e,i,r),!n}),!!n}function Wt(e,n){var i=-1,r=vn(),o=e.length,a=r==t,s=a&&o>=200,l=s&&qa(),u=[];l?(r=Xe,a=!1):(s=!1,l=n?[]:u);e:for(;++i<o;){var c=e[i],d=n?n(c,i,e):c;if(a&&c===c){for(var p=l.length;p--;)if(l[p]===d)continue e;n&&l.push(d),u.push(c)}else r(l,d)<0&&((n||s)&&l.push(d),u.push(c))}return u}function Gt(e,t){for(var n=-1,i=t.length,r=Fo(i);++n<i;)r[n]=e[t[n]];return r}function Jt(e,t){var n=e;n instanceof Z&&(n=n.value());for(var i=-1,r=t.length;++i<r;){var o=[n],a=t[i];da.apply(o,a.args),n=a.func.apply(a.thisArg,o)}return n}function Xt(e,t,n){var i=0,r=e?e.length:i;if("number"==typeof t&&t===t&&Aa>=r){for(;r>i;){var o=i+r>>>1,a=e[o];(n?t>=a:t>a)?i=o+1:r=o}return r}return Yt(e,t,Eo,n)}function Yt(e,t,n,i){t=n(t);for(var r=0,o=e?e.length:0,a=t!==t,s="undefined"==typeof t;o>r;){var l=ua((r+o)/2),u=n(e[l]),c=u===u;if(a)var d=c||i;else d=s?c&&(i||"undefined"!=typeof u):i?t>=u:t>u;d?r=l+1:o=l}return Sa(o,Pa)}function Kt(e,t,n){if("function"!=typeof e)return Eo;if("undefined"==typeof t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,i,r){return e.call(t,n,i,r)};case 4:return function(n,i,r,o){return e.call(t,n,i,r,o)};case 5:return function(n,i,r,o,a){return e.call(t,n,i,r,o,a)}}return function(){return e.apply(t,arguments)}}function Qt(e){return aa.call(e,0)}function Zt(e,t,n){for(var i=n.length,r=-1,o=Ca(e.length-i,0),a=-1,s=t.length,l=Fo(o+s);++a<s;)l[a]=t[a];for(;++r<i;)l[n[r]]=e[r];for(;o--;)l[a++]=e[r++];return l}function en(e,t,n){for(var i=-1,r=n.length,o=-1,a=Ca(e.length-r,0),s=-1,l=t.length,u=Fo(a+l);++o<a;)u[o]=e[o];for(var c=o;++s<l;)u[c+s]=t[s];for(;++i<r;)u[c+n[i]]=e[o++];return u}function tn(e,t){return function(n,i,r){var o=t?t():{};if(i=mn(i,r,3),Ya(n))for(var a=-1,s=n.length;++a<s;){var l=n[a];e(o,l,i(l,a,n),n)}else yt(n,function(t,n,r){e(o,t,i(t,n,r),r)});return o}}function nn(e){return function(){var t=arguments.length,n=arguments[0];if(2>t||null==n)return n;if(t>3&&Sn(arguments[1],arguments[2],arguments[3])&&(t=2),t>3&&"function"==typeof arguments[t-2])var i=Kt(arguments[--t-1],arguments[t--],5);else t>2&&"function"==typeof arguments[t-1]&&(i=arguments[--t]);for(var r=0;++r<t;){var o=arguments[r];o&&e(n,o,i)}return n}}function rn(e,t){function n(){return(this instanceof n?i:e).apply(t,arguments)}var i=an(e);return n}function on(e){return function(t){for(var n=-1,i=So(so(t)),r=i.length,o="";++n<r;)o=e(o,i[n],n);return o}}function an(e){return function(){var t=Ra(e.prototype),n=e.apply(t,arguments);return $r(n)?n:t}}function sn(e,t){return function(n,i,o){o&&Sn(n,i,o)&&(i=null);var a=mn(),s=null==i;if(a===ft&&s||(s=!1,i=a(i,o,3)),s){var l=Ya(n);if(l||!jr(n))return e(l?n:An(n));i=r}return gn(n,i,t)}}function ln(e,t,n,i,r,o,a,s,l,u){function c(){for(var w=arguments.length,x=w,k=Fo(w);x--;)k[x]=arguments[x];if(i&&(k=Zt(k,i,r)),o&&(k=en(k,o,a)),f||v){var _=c.placeholder,T=g(k,_);if(w-=T.length,u>w){var $=s?Ke(s):null,M=Ca(u-w,0),I=f?T:null,P=f?null:T,A=f?k:null,j=f?null:k;t|=f?E:D,t&=~(f?D:E),m||(t&=~(C|S));var N=ln(e,t,n,A,I,j,P,$,l,M);return N.placeholder=_,N}}var O=p?n:this;return h&&(e=O[b]),s&&(k=Mn(k,s)),d&&l<k.length&&(k.length=l),(this instanceof c?y||an(e):e).apply(O,k)}var d=t&I,p=t&C,h=t&S,f=t&T,m=t&_,v=t&$,y=!h&&an(e),b=e;return c}function un(e,t,n){var i=e.length;if(t=+t,i>=t||!xa(t))return"";var r=t-i;return n=null==n?" ":n+"",mo(n,sa(r/n.length)).slice(0,r)}function cn(e,t,n,i){function r(){for(var t=-1,s=arguments.length,l=-1,u=i.length,c=Fo(s+u);++l<u;)c[l]=i[l];for(;s--;)c[l++]=arguments[++t];return(this instanceof r?a:e).apply(o?n:this,c)}var o=t&C,a=an(e);return r}function dn(e,t,n,i,r,o,a,s){var l=t&S;if(!l&&"function"!=typeof e)throw new Jo(F);var u=i?i.length:0;if(u||(t&=~(E|D),i=r=null),u-=r?r.length:0,t&D){var c=i,d=r;i=r=null}var p=!l&&Ha(e),h=[e,t,n,i,r,c,d,o,a,s];if(p&&p!==!0&&($n(h,p),t=h[1],s=h[9]),h[9]=null==s?l?0:e.length:Ca(s-u,0)||0,t==C)var f=rn(h[0],h[2]);else f=t!=E&&t!=(C|E)||h[4].length?ln.apply(x,h):cn.apply(x,h);var g=p?Fa:Ua;return g(f,h)}function pn(e,t,n,i,r,o,a){var s=-1,l=e.length,u=t.length,c=!0;if(l!=u&&!(r&&u>l))return!1;for(;c&&++s<l;){var d=e[s],p=t[s];if(c=x,i&&(c=r?i(p,d,s):i(d,p,s)),"undefined"==typeof c)if(r)for(var h=u;h--&&(p=t[h],!(c=d&&d===p||n(d,p,i,r,o,a))););else c=d&&d===p||n(d,p,i,r,o,a)}return!!c}function hn(e,t,n){switch(n){case B:case z:return+e==+t;case V:return e.name==t.name&&e.message==t.message;case J:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case Y:case Q:return e==t+""}return!1}function fn(e,t,n,i,r,o,a){var s=es(e),l=s.length,u=es(t),c=u.length;if(l!=c&&!r)return!1;for(var d,p=-1;++p<l;){var h=s[p],f=ea.call(t,h);if(f){var g=e[h],m=t[h];f=x,i&&(f=r?i(m,g,h):i(g,m,h)),"undefined"==typeof f&&(f=g&&g===m||n(g,m,i,r,o,a))}if(!f)return!1;d||(d="constructor"==h)}if(!d){var v=e.constructor,y=t.constructor;if(v!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y))return!1}return!0}function gn(e,t,n){var i=n?Ma:Da,r=i,o=r;return yt(e,function(e,a,s){var l=t(e,a,s);((n?r>l:l>r)||l===i&&l===o)&&(r=l,o=e)}),o}function mn(e,t,n){var i=G.callback||To;return i=i===To?ft:i,n?i(e,t,n):i}function vn(e,n,i){var r=G.indexOf||Xn;return r=r===Xn?t:r,e?r(e,n,i):r}function yn(e,t,n){for(var i=-1,r=n?n.length:0;++i<r;){var o=n[i],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Sa(t,e+a);break;case"takeRight":e=Ca(e,t-a)}}return{start:e,end:t}}function bn(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ea.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function wn(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Vo),new t}function xn(e,t,n){var i=e.constructor;switch(t){case ee:return Qt(e);case B:case z:return new i(+e);case te:case ne:case ie:case re:case oe:case ae:case se:case le:case ue:var r=e.buffer;return new i(n?Qt(r):r,e.byteOffset,e.length);case J:case Q:return new i(e);case Y:var o=new i(e.source,xe.exec(e));o.lastIndex=e.lastIndex}return o}function kn(e){var t=G.support,n=!(t.funcNames?e.name:t.funcDecomp);if(!n){var i=Qo.call(e);t.funcNames||(n=!ke.test(i)),n||(n=De.test(i)||Mr(e),Fa(e,n))}return n}function Cn(e,t){return e=+e,t=null==t?Na:t,e>-1&&e%1==0&&t>e}function Sn(e,t,n){if(!$r(n))return!1;var i=typeof t;if("number"==i)var r=n.length,o=_n(r)&&Cn(t,r);else o="string"==i&&t in n;return o&&n[t]===e}function _n(e){return"number"==typeof e&&e>-1&&e%1==0&&Na>=e}function Tn(e){return e===e&&(0===e?1/e>0:!$r(e))}function $n(e,t){var n=e[1],i=t[1],r=n|i,o=I|M,a=C|S,s=o|a|_|$,l=n&I&&!(i&I),u=n&M&&!(i&M),c=(u?e:t)[7],d=(l?e:t)[8],p=!(n>=M&&i>a||n>a&&i>=M),h=r>=o&&s>=r&&(M>n||(u||l)&&c.length<=d);if(!p&&!h)return e;i&C&&(e[2]=t[2],r|=n&C?0:_);var f=t[3];if(f){var m=e[3];e[3]=m?Zt(m,f,t[4]):Ke(f),e[4]=m?g(e[3],q):Ke(t[4])}return f=t[5],f&&(m=e[5],e[5]=m?en(m,f,t[6]):Ke(f),e[6]=m?g(e[5],q):Ke(t[6])),f=t[7],f&&(e[7]=Ke(f)),i&I&&(e[8]=null==e[8]?t[8]:Sa(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r,e}function En(e,t){e=jn(e);for(var n=-1,i=t.length,r={};++n<i;){var o=t[n];o in e&&(r[o]=e[o])}return r}function Dn(e,t){var n={};return $t(e,function(e,i,r){t(e,i,r)&&(n[i]=e)}),n}function Mn(e,t){for(var n=e.length,i=Sa(t.length,n),r=Ke(e);i--;){var o=t[i];e[i]=Cn(o,n)?r[o]:x}return e}function In(e){var t;G.support;if(!h(e)||na.call(e)!=X||!ea.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return $t(e,function(e,t){n=t}),"undefined"==typeof n||ea.call(e,n)}function Pn(e){for(var t=Yr(e),n=t.length,i=n&&e.length,r=G.support,o=i&&_n(i)&&(Ya(e)||r.nonEnumArgs&&br(e)),a=-1,s=[];++a<n;){var l=t[a];(o&&Cn(l,i)||ea.call(e,l))&&s.push(l)}return s}function An(e){return null==e?[]:_n(e.length)?$r(e)?e:Vo(e):io(e)}function jn(e){return $r(e)?e:Vo(e)}function Nn(e){return e instanceof Z?e.clone():new K(e.__wrapped__,e.__chain__,Ke(e.__actions__))}function On(e,t,n){t=(n?Sn(e,t,n):null==t)?1:Ca(+t||1,1);for(var i=0,r=e?e.length:0,o=-1,a=Fo(sa(r/t));r>i;)a[++o]=zt(e,i,i+=t);return a}function Ln(e){for(var t=-1,n=e?e.length:0,i=-1,r=[];++t<n;){var o=e[t];o&&(r[++i]=o)}return r}function Rn(){for(var e=-1,t=arguments.length;++e<t;){var n=arguments[e];if(Ya(n)||br(n))break}return vt(n,St(arguments,!1,!0,++e))}function Fn(e,t,n){var i=e?e.length:0;return i?((n?Sn(e,t,n):null==t)&&(t=1),zt(e,0>t?0:t)):[]}function qn(e,t,n){var i=e?e.length:0;return i?((n?Sn(e,t,n):null==t)&&(t=1),t=i-(+t||0),zt(e,0,0>t?0:t)):[]}function Hn(e,t,n){var i=e?e.length:0;if(!i)return[];for(t=mn(t,n,3);i--&&t(e[i],i,e););return zt(e,0,i+1)}function Un(e,t,n){var i=e?e.length:0;if(!i)return[];var r=-1;for(t=mn(t,n,3);++r<i&&t(e[r],r,e););return zt(e,r)}function Bn(e,t,n,i){var r=e?e.length:0;return r?(n&&"number"!=typeof n&&Sn(e,t,n)&&(n=0,i=r),xt(e,t,n,i)):[]}function zn(e,t,n){var i=-1,r=e?e.length:0;for(t=mn(t,n,3);++i<r;)if(t(e[i],i,e))return i;return-1}function Vn(e,t,n){var i=e?e.length:0;for(t=mn(t,n,3);i--;)if(t(e[i],i,e))return i;return-1}function Wn(e){return e?e[0]:x}function Gn(e,t,n){var i=e?e.length:0;return n&&Sn(e,t,n)&&(t=!1),i?St(e,t):[]}function Jn(e){var t=e?e.length:0;return t?St(e,!0):[]}function Xn(e,n,i){var r=e?e.length:0;if(!r)return-1;if("number"==typeof i)i=0>i?Ca(r+i,0):i||0;else if(i){var o=Xt(e,n),a=e[o];return(n===n?n===a:a!==a)?o:-1}return t(e,n,i)}function Yn(e){return qn(e,1)}function Kn(){for(var e=[],n=-1,i=arguments.length,r=[],o=vn(),a=o==t;++n<i;){var s=arguments[n];(Ya(s)||br(s))&&(e.push(s),r.push(a&&s.length>=120&&qa(n&&s)))}i=e.length;var l=e[0],u=-1,c=l?l.length:0,d=[],p=r[0];e:for(;++u<c;)if(s=l[u],(p?Xe(p,s):o(d,s))<0){for(n=i;--n;){var h=r[n];if((h?Xe(h,s):o(e[n],s))<0)continue e}p&&p.push(s),d.push(s)}return d}function Qn(e){var t=e?e.length:0;return t?e[t-1]:x}function Zn(e,t,n){var i=e?e.length:0;if(!i)return-1;var r=i;if("number"==typeof n)r=(0>n?Ca(i+n,0):Sa(n||0,i-1))+1;else if(n){r=Xt(e,t,!0)-1;var o=e[r];return(t===t?t===o:o!==o)?r:-1}if(t!==t)return p(e,r,!0);for(;r--;)if(e[r]===t)return r;return-1}function ei(){var e=arguments[0];if(!e||!e.length)return e;for(var t=0,n=vn(),i=arguments.length;++t<i;)for(var r=0,o=arguments[t];(r=n(e,o,r))>-1;)ga.call(e,r,1);return e}function ti(e){return Ht(e||[],St(arguments,!1,!1,1))}function ni(e,t,n){var i=-1,r=e?e.length:0,o=[];for(t=mn(t,n,3);++i<r;){var a=e[i];t(a,i,e)&&(o.push(a),ga.call(e,i--,1),r--)}return o}function ii(e){return Fn(e,1)}function ri(e,t,n){var i=e?e.length:0;return i?(n&&"number"!=typeof n&&Sn(e,t,n)&&(t=0,n=i),zt(e,t,n)):[]}function oi(e,t,n,i){var r=mn(n);return r===ft&&null==n?Xt(e,t):Yt(e,t,r(n,i,1))}function ai(e,t,n,i){var r=mn(n);return r===ft&&null==n?Xt(e,t,!0):Yt(e,t,r(n,i,1),!0)}function si(e,t,n){var i=e?e.length:0;return i?((n?Sn(e,t,n):null==t)&&(t=1),zt(e,0,0>t?0:t)):[]}function li(e,t,n){var i=e?e.length:0;return i?((n?Sn(e,t,n):null==t)&&(t=1),t=i-(+t||0),zt(e,0>t?0:t)):[]}function ui(e,t,n){var i=e?e.length:0;if(!i)return[];for(t=mn(t,n,3);i--&&t(e[i],i,e););return zt(e,i+1)}function ci(e,t,n){var i=e?e.length:0;if(!i)return[];var r=-1;for(t=mn(t,n,3);++r<i&&t(e[r],r,e););return zt(e,0,r)}function di(){return Wt(St(arguments,!1,!0))}function pi(e,n,i,r){var o=e?e.length:0;if(!o)return[];"boolean"!=typeof n&&null!=n&&(r=i,i=Sn(e,n,r)?null:n,n=!1);var a=mn();return(a!==ft||null!=i)&&(i=a(i,r,3)),n&&vn()==t?m(e,i):Wt(e,i)}function hi(e){for(var t=-1,n=(e&&e.length&&it(nt(e,Zo)))>>>0,i=Fo(n);++t<n;)i[t]=nt(e,qt(t));return i}function fi(e){return vt(e,zt(arguments,1))}function gi(){for(var e=-1,t=arguments.length;++e<t;){var n=arguments[e];if(Ya(n)||br(n))var i=i?vt(i,n).concat(vt(n,i)):n}return i?Wt(i):[]}function mi(){for(var e=arguments.length,t=Fo(e);e--;)t[e]=arguments[e];return hi(t)}function vi(e,t){var n=-1,i=e?e.length:0,r={};for(!i||t||Ya(e[0])||(t=[]);++n<i;){var o=e[n];t?r[o]=t[n]:o&&(r[o[0]]=o[1])}return r}function yi(e){var t=G(e);return t.__chain__=!0,t}function bi(e,t,n){return t.call(n,e),e}function wi(e,t,n){return t.call(n,e)}function xi(){return yi(this)}function ki(){return new K(this.value(),this.__chain__)}function Ci(e){for(var t,n=this;n instanceof K;){var i=Nn(n);t?r.__wrapped__=i:t=i;var r=i;n=n.__wrapped__}return r.__wrapped__=e,t}function Si(){var e=this.__wrapped__;return e instanceof Z?(this.__actions__.length&&(e=new Z(this)),new K(e.reverse(),this.__chain__)):this.thru(function(e){return e.reverse()})}function _i(){return this.value()+""}function Ti(){return Jt(this.__wrapped__,this.__actions__)}function $i(e){var t=e?e.length:0;return _n(t)&&(e=An(e)),dt(e,St(arguments,!1,!1,1))}function Ei(e,t,n){var i=e?e.length:0;return _n(i)||(e=io(e),i=e.length),i?(n="number"==typeof n?0>n?Ca(i+n,0):n||0:0,"string"==typeof e||!Ya(e)&&jr(e)?i>n&&e.indexOf(t,n)>-1:vn(e,t,n)>-1):!1}function Di(e,t,n){var i=Ya(e)?et:wt;return("function"!=typeof t||"undefined"!=typeof n)&&(t=mn(t,n,3)),i(e,t)}function Mi(e,t,n){var i=Ya(e)?tt:kt;return t=mn(t,n,3),i(e,t)}function Ii(e,t,n){if(Ya(e)){var i=zn(e,t,n);return i>-1?e[i]:x}return t=mn(t,n,3),Ct(e,t,yt)}function Pi(e,t,n){return t=mn(t,n,3),Ct(e,t,bt)}function Ai(e,t){return Ii(e,Ot(t))}function ji(e,t,n){return"function"==typeof t&&"undefined"==typeof n&&Ya(e)?Qe(e,t):yt(e,Kt(t,n,3))}function Ni(e,t,n){return"function"==typeof t&&"undefined"==typeof n&&Ya(e)?Ze(e,t):bt(e,Kt(t,n,3))}function Oi(e,t){return It(e,t,zt(arguments,2))}function Li(e,t,n){var i=Ya(e)?nt:Nt;return t=mn(t,n,3),i(e,t)}function Ri(e,t){return Li(e,qt(t))}function Fi(e,t,n,i){var r=Ya(e)?ot:Bt;return r(e,mn(t,i,4),n,arguments.length<3,yt)}function qi(e,t,n,i){var r=Ya(e)?at:Bt;return r(e,mn(t,i,4),n,arguments.length<3,bt)}function Hi(e,t,n){var i=Ya(e)?tt:kt;return t=mn(t,n,3),i(e,function(e,n,i){return!t(e,n,i)})}function Ui(e,t,n){if(n?Sn(e,t,n):null==t){e=An(e);var i=e.length;return i>0?e[Ut(0,i-1)]:x}var r=Bi(e);return r.length=Sa(0>t?0:+t||0,r.length),r}function Bi(e){e=An(e);for(var t=-1,n=e.length,i=Fo(n);++t<n;){var r=Ut(0,t);t!=r&&(i[t]=i[r]),i[r]=e[t]}return i}function zi(e){var t=e?e.length:0;return _n(t)?t:es(e).length}function Vi(e,t,n){var i=Ya(e)?st:Vt;return("function"!=typeof t||"undefined"!=typeof n)&&(t=mn(t,n,3)),i(e,t)}function Wi(e,t,i){var r=-1,o=e?e.length:0,a=_n(o)?Fo(o):[];return i&&Sn(e,t,i)&&(t=null),t=mn(t,i,3),yt(e,function(e,n,i){a[++r]={criteria:t(e,n,i),index:r,value:e}}),n(a,s)}function Gi(e){var t=arguments;t.length>3&&Sn(t[1],t[2],t[3])&&(t=[e,t[1]]);var i=-1,r=e?e.length:0,o=St(t,!1,!1,1),a=_n(r)?Fo(r):[];return yt(e,function(e){for(var t=o.length,n=Fo(t);t--;)n[t]=null==e?x:e[o[t]];a[++i]={criteria:n,index:i,value:e}}),n(a,l)}function Ji(e,t){return Mi(e,Ot(t))}function Xi(e,t){if("function"!=typeof t){if("function"!=typeof e)throw new Jo(F);var n=e;e=t,t=n}return e=xa(e=+e)?e:0,function(){return--e<1?t.apply(this,arguments):void 0}}function Yi(e,t,n){return n&&Sn(e,t,n)&&(t=null),t=e&&null==t?e.length:Ca(+t||0,0),dn(e,I,null,null,null,null,t)}function Ki(e,t){var n;if("function"!=typeof t){if("function"!=typeof e)throw new Jo(F);var i=e;e=t,t=i}return function(){return--e>0?n=t.apply(this,arguments):t=null,n}}function Qi(e,t){var n=C;if(arguments.length>2){var i=zt(arguments,2),r=g(i,Qi.placeholder);n|=E}return dn(e,n,t,i,r)}function Zi(e){return ht(e,arguments.length>1?St(arguments,!1,!1,1):Gr(e))}function er(e,t){var n=C|S;if(arguments.length>2){var i=zt(arguments,2),r=g(i,er.placeholder);n|=E}return dn(t,n,e,i,r)}function tr(e,t,n){n&&Sn(e,t,n)&&(t=null);var i=dn(e,T,null,null,null,null,null,t);return i.placeholder=tr.placeholder,i}function nr(e,t,n){n&&Sn(e,t,n)&&(t=null);var i=dn(e,$,null,null,null,null,null,t);return i.placeholder=nr.placeholder,i}function ir(e,t,n){function i(){p&&la(p),l&&la(l),l=p=h=x}function r(){var n=t-(Xa()-c);if(0>=n||n>t){l&&la(l);var i=h;l=p=h=x,i&&(f=Xa(),u=e.apply(d,s),p||l||(s=d=null))}else p=fa(r,n)}function o(){p&&la(p),l=p=h=x,(m||g!==t)&&(f=Xa(),u=e.apply(d,s),p||l||(s=d=null))}function a(){if(s=arguments,c=Xa(),d=this,h=m&&(p||!v),g===!1)var n=v&&!p;else{l||v||(f=c);var i=g-(c-f),a=0>=i||i>g;a?(l&&(l=la(l)),f=c,u=e.apply(d,s)):l||(l=fa(o,i))}return a&&p?p=la(p):p||t===g||(p=fa(r,t)),n&&(a=!0,u=e.apply(d,s)),!a||p||l||(s=d=null),u}var s,l,u,c,d,p,h,f=0,g=!1,m=!0;if("function"!=typeof e)throw new Jo(F);if(t=0>t?0:t,n===!0){var v=!0;m=!1}else $r(n)&&(v=n.leading,g="maxWait"in n&&Ca(+n.maxWait||0,t),m="trailing"in n?n.trailing:m);return a.cancel=i,a}function rr(e){return mt(e,1,arguments,1)}function or(e,t){return mt(e,t,arguments,2)}function ar(){var e=arguments,t=e.length;if(!t)return function(){return arguments[0]};if(!et(e,Tr))throw new Jo(F);return function(){for(var n=0,i=e[n].apply(this,arguments);++n<t;)i=e[n].call(this,i);return i}}function sr(){var e=arguments,t=e.length-1;if(0>t)return function(){return arguments[0]};if(!et(e,Tr))throw new Jo(F);return function(){for(var n=t,i=e[n].apply(this,arguments);n--;)i=e[n].call(this,i);return i}}function lr(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new Jo(F);var n=function(){var i=n.cache,r=t?t.apply(this,arguments):arguments[0];if(i.has(r))return i.get(r);var o=e.apply(this,arguments);return i.set(r,o),o};return n.cache=new lr.Cache,n}function ur(e){if("function"!=typeof e)throw new Jo(F);return function(){return!e.apply(this,arguments)}}function cr(e){return Ki(e,2)}function dr(e){var t=zt(arguments,1),n=g(t,dr.placeholder);return dn(e,E,null,t,n)}function pr(e){var t=zt(arguments,1),n=g(t,pr.placeholder);return dn(e,D,null,t,n)}function hr(e){var t=St(arguments,!1,!1,1);return dn(e,M,null,null,null,t)}function fr(e){if("function"!=typeof e)throw new Jo(F);return function(t){return e.apply(this,t)}}function gr(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new Jo(F);return n===!1?i=!1:$r(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Le.leading=i,Le.maxWait=+t,Le.trailing=r,ir(e,t,Le)}function mr(e,t){return t=null==t?Eo:t,dn(t,E,null,[e],[])}function vr(e,t,n,i){return"boolean"!=typeof t&&null!=t&&(i=n,n=Sn(e,t,i)?null:t,t=!1),n="function"==typeof n&&Kt(n,i,1),gt(e,t,n)}function yr(e,t,n){return t="function"==typeof t&&Kt(t,n,1),gt(e,!0,t)}function br(e){var t=h(e)?e.length:x;return _n(t)&&na.call(e)==H||!1}function wr(e){return e===!0||e===!1||h(e)&&na.call(e)==B||!1}function xr(e){return h(e)&&na.call(e)==z||!1}function kr(e){return e&&1===e.nodeType&&h(e)&&na.call(e).indexOf("Element")>-1||!1}function Cr(e){if(null==e)return!0;var t=e.length;return _n(t)&&(Ya(e)||jr(e)||br(e)||h(e)&&Tr(e.splice))?!t:!es(e).length}function Sr(e,t,n,i){if(n="function"==typeof n&&Kt(n,i,3),!n&&Tn(e)&&Tn(t))return e===t;var r=n?n(e,t):x;return"undefined"==typeof r?Pt(e,t,n):!!r}function _r(e){return h(e)&&"string"==typeof e.message&&na.call(e)==V||!1}function Tr(e){return"function"==typeof e||!1}function $r(e){var t=typeof e;return"function"==t||e&&"object"==t||!1}function Er(e,t,n,i){var r=es(t),o=r.length;if(n="function"==typeof n&&Kt(n,i,3),!n&&1==o){var a=r[0],s=t[a];if(Tn(s))return null!=e&&s===e[a]&&ea.call(e,a)}for(var l=Fo(o),u=Fo(o);o--;)s=l[o]=t[r[o]],u[o]=Tn(s);return jt(e,r,l,u,n)}function Dr(e){return Pr(e)&&e!=+e}function Mr(e){return null==e?!1:na.call(e)==W?ra.test(Qo.call(e)):h(e)&&Se.test(e)||!1}function Ir(e){return null===e}function Pr(e){return"number"==typeof e||h(e)&&na.call(e)==J||!1}function Ar(e){return h(e)&&na.call(e)==Y||!1}function jr(e){return"string"==typeof e||h(e)&&na.call(e)==Q||!1}function Nr(e){return h(e)&&_n(e.length)&&Ne[na.call(e)]||!1}function Or(e){return"undefined"==typeof e}function Lr(e){var t=e?e.length:0;return _n(t)?t?Ke(e):[]:io(e)}function Rr(e){return pt(e,Yr(e))}function Fr(e,t,n){var i=Ra(e);return n&&Sn(e,t,n)&&(t=null),t?pt(t,i,es(t)):i}function qr(e){if(null==e)return e;var t=Ke(arguments);return t.push(lt),Za.apply(x,t)}function Hr(e,t,n){return t=mn(t,n,3),Ct(e,t,Et,!0)}function Ur(e,t,n){return t=mn(t,n,3),Ct(e,t,Dt,!0)}function Br(e,t,n){return("function"!=typeof t||"undefined"!=typeof n)&&(t=Kt(t,n,3)),_t(e,t,Yr)}function zr(e,t,n){return t=Kt(t,n,3),Tt(e,t,Yr)}function Vr(e,t,n){return("function"!=typeof t||"undefined"!=typeof n)&&(t=Kt(t,n,3)),Et(e,t)}function Wr(e,t,n){return t=Kt(t,n,3),Tt(e,t,es)}function Gr(e){return Mt(e,Yr(e))}function Jr(e,t){return e?ea.call(e,t):!1}function Xr(e,t,n){n&&Sn(e,t,n)&&(t=null);for(var i=-1,r=es(e),o=r.length,a={};++i<o;){var s=r[i],l=e[s];t?ea.call(a,l)?a[l].push(s):a[l]=[s]:a[l]=s}return a}function Yr(e){if(null==e)return[];$r(e)||(e=Vo(e));var t=e.length;t=t&&_n(t)&&(Ya(e)||La.nonEnumArgs&&br(e))&&t||0;for(var n=e.constructor,i=-1,r="function"==typeof n&&n.prototype===e,o=Fo(t),a=t>0;++i<t;)o[i]=i+"";for(var s in e)a&&Cn(s,t)||"constructor"==s&&(r||!ea.call(e,s))||o.push(s);return o}function Kr(e,t,n){var i={};return t=mn(t,n,3),Et(e,function(e,n,r){i[n]=t(e,n,r)}),i}function Qr(e,t,n){if(null==e)return{};if("function"!=typeof t){var i=nt(St(arguments,!1,!1,1),Go);return En(e,vt(Yr(e),i))}return t=Kt(t,n,3),Dn(e,function(e,n,i){return!t(e,n,i)})}function Zr(e){for(var t=-1,n=es(e),i=n.length,r=Fo(i);++t<i;){var o=n[t];r[t]=[o,e[o]]}return r}function eo(e,t,n){return null==e?{}:"function"==typeof t?Dn(e,Kt(t,n,3)):En(e,St(arguments,!1,!1,1))}function to(e,t,n){var i=null==e?x:e[t];return"undefined"==typeof i&&(i=n),Tr(i)?i.call(e):i}function no(e,t,n,i){var r=Ya(e)||Nr(e);if(t=mn(t,i,4),null==n)if(r||$r(e)){var o=e.constructor;n=r?Ya(e)?new o:[]:Ra(Tr(o)&&o.prototype)}else n={};return(r?Qe:Et)(e,function(e,i,r){return t(n,e,i,r)}),n}function io(e){return Gt(e,es(e))}function ro(e){return Gt(e,Yr(e))}function oo(e,t,n){n&&Sn(e,t,n)&&(t=n=null);var i=null==e,r=null==t;if(null==n&&(r&&"boolean"==typeof e?(n=e,e=1):"boolean"==typeof t&&(n=t,
|
|
3219
|
|
-r=!0)),i&&r&&(t=1,r=!1),e=+e||0,r?(t=e,e=0):t=+t||0,n||e%1||t%1){var o=Ea();return Sa(e+o*(t-e+parseFloat("1e-"+((o+"").length-1))),t)}return Ut(e,t)}function ao(e){return e=i(e),e&&e.charAt(0).toUpperCase()+e.slice(1)}function so(e){return e=i(e),e&&e.replace(_e,u)}function lo(e,t,n){e=i(e),t+="";var r=e.length;return n=("undefined"==typeof n?r:Sa(0>n?0:+n||0,r))-t.length,n>=0&&e.indexOf(t,n)==n}function uo(e){return e=i(e),e&&me.test(e)?e.replace(fe,c):e}function co(e){return e=i(e),e&&Ee.test(e)?e.replace($e,"\\$&"):e}function po(e,t,n){e=i(e),t=+t;var r=e.length;if(r>=t||!xa(t))return e;var o=(t-r)/2,a=ua(o),s=sa(o);return n=un("",s,n),n.slice(0,a)+e+n}function ho(e,t,n){return e=i(e),e&&un(e,t,n)+e}function fo(e,t,n){return e=i(e),e&&e+un(e,t,n)}function go(e,t,n){return n&&Sn(e,t,n)&&(t=0),$a(e,t)}function mo(e,t){var n="";if(e=i(e),t=+t,1>t||!e||!xa(t))return n;do t%2&&(n+=e),t=ua(t/2),e+=e;while(t);return n}function vo(e,t,n){return e=i(e),n=null==n?0:Sa(0>n?0:+n||0,e.length),e.lastIndexOf(t,n)==n}function yo(e,t,n){var r=G.templateSettings;n&&Sn(e,t,n)&&(t=n=null),e=i(e),t=ct(ct({},n||t),r,ut);var o,a,s=ct(ct({},t.imports),r.imports,ut),l=es(s),u=Gt(s,l),c=0,p=t.interpolate||Te,h="__p += '",f=Wo((t.escape||Te).source+"|"+p.source+"|"+(p===be?we:Te).source+"|"+(t.evaluate||Te).source+"|$","g"),g="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++je+"]")+"\n";e.replace(f,function(t,n,i,r,s,l){return i||(i=r),h+=e.slice(c,l).replace(Me,d),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),i&&(h+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=l+t.length,t}),h+="';\n";var m=t.variable;m||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(ce,""):h).replace(de,"$1").replace(pe,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=_o(function(){return Uo(l,g+"return "+h).apply(x,u)});if(v.source=h,_r(v))throw v;return v}function bo(e,t,n){var r=e;return(e=i(e))?(n?Sn(r,t,n):null==t)?e.slice(v(e),y(e)+1):(t+="",e.slice(o(e,t),a(e,t)+1)):e}function wo(e,t,n){var r=e;return e=i(e),e?(n?Sn(r,t,n):null==t)?e.slice(v(e)):e.slice(o(e,t+"")):e}function xo(e,t,n){var r=e;return e=i(e),e?(n?Sn(r,t,n):null==t)?e.slice(0,y(e)+1):e.slice(0,a(e,t+"")+1):e}function ko(e,t,n){n&&Sn(e,t,n)&&(t=null);var r=P,o=A;if(null!=t)if($r(t)){var a="separator"in t?t.separator:a;r="length"in t?+t.length||0:r,o="omission"in t?i(t.omission):o}else r=+t||0;if(e=i(e),r>=e.length)return e;var s=r-o.length;if(1>s)return o;var l=e.slice(0,s);if(null==a)return l+o;if(Ar(a)){if(e.slice(s).search(a)){var u,c,d=e.slice(0,s);for(a.global||(a=Wo(a.source,(xe.exec(a)||"")+"g")),a.lastIndex=0;u=a.exec(d);)c=u.index;l=l.slice(0,null==c?s:c)}}else if(e.indexOf(a,s)!=s){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+o}function Co(e){return e=i(e),e&&ge.test(e)?e.replace(he,b):e}function So(e,t,n){return n&&Sn(e,t,n)&&(t=null),e=i(e),e.match(t||Ie)||[]}function _o(e){try{return e.apply(x,zt(arguments,1))}catch(t){return _r(t)?t:new Ho(t)}}function To(e,t,n){return n&&Sn(e,t,n)&&(t=null),h(e)?Do(e):ft(e,t)}function $o(e){return function(){return e}}function Eo(e){return e}function Do(e){return Ot(gt(e,!0))}function Mo(e,t){return Lt(e+"",gt(t,!0))}function Io(e,t,n){if(null==n){var i=$r(t),r=i&&es(t),o=r&&r.length&&Mt(t,r);(o?o.length:i)||(o=!1,n=t,t=e,e=this)}o||(o=Mt(t,es(t)));var a=!0,s=-1,l=Tr(e),u=o.length;n===!1?a=!1:$r(n)&&"chain"in n&&(a=n.chain);for(;++s<u;){var c=o[s],d=t[c];e[c]=d,l&&(e.prototype[c]=function(t){return function(){var n=this.__chain__;if(a||n){var i=e(this.__wrapped__);return(i.__actions__=Ke(this.__actions__)).push({func:t,args:arguments,thisArg:e}),i.__chain__=n,i}var r=[this.value()];return da.apply(r,arguments),t.apply(e,r)}}(d))}return e}function Po(){return f._=ia,this}function Ao(){}function jo(e){return qt(e+"")}function No(e){return function(t){return null==e?x:e[t]}}function Oo(e,t,n){n&&Sn(e,t,n)&&(t=n=null),e=+e||0,n=null==n?1:+n||0,null==t?(t=e,e=0):t=+t||0;for(var i=-1,r=Ca(sa((t-e)/(n||1)),0),o=Fo(r);++i<r;)o[i]=e,e+=n;return o}function Lo(e,t,n){if(e=+e,1>e||!xa(e))return[];var i=-1,r=Fo(Sa(e,Ia));for(t=Kt(t,n,1);++i<e;)Ia>i?r[i]=t(i):t(i);return r}function Ro(e){var t=++ta;return i(e)+t}f=f?Je.defaults(Be.Object(),f,Je.pick(Be,Ae)):Be;var Fo=f.Array,qo=f.Date,Ho=f.Error,Uo=f.Function,Bo=f.Math,zo=f.Number,Vo=f.Object,Wo=f.RegExp,Go=f.String,Jo=f.TypeError,Xo=Fo.prototype,Yo=Vo.prototype,Ko=(Ko=f.window)&&Ko.document,Qo=Uo.prototype.toString,Zo=qt("length"),ea=Yo.hasOwnProperty,ta=0,na=Yo.toString,ia=f._,ra=Wo("^"+co(na).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oa=Mr(oa=f.ArrayBuffer)&&oa,aa=Mr(aa=oa&&new oa(0).slice)&&aa,sa=Bo.ceil,la=f.clearTimeout,ua=Bo.floor,ca=Mr(ca=Vo.getPrototypeOf)&&ca,da=Xo.push,pa=Yo.propertyIsEnumerable,ha=Mr(ha=f.Set)&&ha,fa=f.setTimeout,ga=Xo.splice,ma=Mr(ma=f.Uint8Array)&&ma,va=Mr(va=f.WeakMap)&&va,ya=function(){try{var e=Mr(e=f.Float64Array)&&e,t=new e(new oa(10),0,1)&&e}catch(n){}return t}(),ba=Mr(ba=Fo.isArray)&&ba,wa=Mr(wa=Vo.create)&&wa,xa=f.isFinite,ka=Mr(ka=Vo.keys)&&ka,Ca=Bo.max,Sa=Bo.min,_a=Mr(_a=qo.now)&&_a,Ta=Mr(Ta=zo.isFinite)&&Ta,$a=f.parseInt,Ea=Bo.random,Da=zo.NEGATIVE_INFINITY,Ma=zo.POSITIVE_INFINITY,Ia=Bo.pow(2,32)-1,Pa=Ia-1,Aa=Ia>>>1,ja=ya?ya.BYTES_PER_ELEMENT:0,Na=Bo.pow(2,53)-1,Oa=va&&new va,La=G.support={};!function(e){La.funcDecomp=!Mr(f.WinRTError)&&De.test(w),La.funcNames="string"==typeof Uo.name;try{La.dom=11===Ko.createDocumentFragment().nodeType}catch(t){La.dom=!1}try{La.nonEnumArgs=!pa.call(arguments,1)}catch(t){La.nonEnumArgs=!0}}(0,0),G.templateSettings={escape:ve,evaluate:ye,interpolate:be,variable:"",imports:{_:G}};var Ra=function(){function e(){}return function(t){if($r(t)){e.prototype=t;var n=new e;e.prototype=null}return n||f.Object()}}(),Fa=Oa?function(e,t){return Oa.set(e,t),e}:Eo;aa||(Qt=oa&&ma?function(e){var t=e.byteLength,n=ya?ua(t/ja):0,i=n*ja,r=new oa(t);if(n){var o=new ya(r,0,n);o.set(new ya(e,0,n))}return t!=i&&(o=new ma(r,i),o.set(new ma(e,i))),r}:$o(null));var qa=wa&&ha?function(e){return new Ge(e)}:$o(null),Ha=Oa?function(e){return Oa.get(e)}:Ao,Ua=function(){var e=0,t=0;return function(n,i){var r=Xa(),o=N-(r-t);if(t=r,o>0){if(++e>=j)return n}else e=0;return Fa(n,i)}}(),Ba=tn(function(e,t,n){ea.call(e,n)?++e[n]:e[n]=1}),za=tn(function(e,t,n){ea.call(e,n)?e[n].push(t):e[n]=[t]}),Va=tn(function(e,t,n){e[n]=t}),Wa=sn(it),Ga=sn(rt,!0),Ja=tn(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Xa=_a||function(){return(new qo).getTime()},Ya=ba||function(e){return h(e)&&_n(e.length)&&na.call(e)==U||!1};La.dom||(kr=function(e){return e&&1===e.nodeType&&h(e)&&!Qa(e)||!1});var Ka=Ta||function(e){return"number"==typeof e&&xa(e)};(Tr(/x/)||ma&&!Tr(ma))&&(Tr=function(e){return na.call(e)==W});var Qa=ca?function(e){if(!e||na.call(e)!=X)return!1;var t=e.valueOf,n=Mr(t)&&(n=ca(t))&&ca(n);return n?e==n||ca(e)==n:In(e)}:In,Za=nn(ct),es=ka?function(e){if(e)var t=e.constructor,n=e.length;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&n&&_n(n)?Pn(e):$r(e)?ka(e):[]}:Pn,ts=nn(Rt),ns=on(function(e,t,n){return t=t.toLowerCase(),e+(n?t.charAt(0).toUpperCase()+t.slice(1):t)}),is=on(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});8!=$a(Pe+"08")&&(go=function(e,t,n){return(n?Sn(e,t,n):null==t)?t=0:t&&(t=+t),e=bo(e),$a(e,t||(Ce.test(e)?16:10))});var rs=on(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),os=on(function(e,t,n){return e+(n?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))});return K.prototype=Ra(G.prototype),Z.prototype=Ra(K.prototype),Z.prototype.constructor=Z,He.prototype["delete"]=Ue,He.prototype.get=ze,He.prototype.has=Ve,He.prototype.set=We,Ge.prototype.push=Ye,lr.Cache=He,G.after=Xi,G.ary=Yi,G.assign=Za,G.at=$i,G.before=Ki,G.bind=Qi,G.bindAll=Zi,G.bindKey=er,G.callback=To,G.chain=yi,G.chunk=On,G.compact=Ln,G.constant=$o,G.countBy=Ba,G.create=Fr,G.curry=tr,G.curryRight=nr,G.debounce=ir,G.defaults=qr,G.defer=rr,G.delay=or,G.difference=Rn,G.drop=Fn,G.dropRight=qn,G.dropRightWhile=Hn,G.dropWhile=Un,G.fill=Bn,G.filter=Mi,G.flatten=Gn,G.flattenDeep=Jn,G.flow=ar,G.flowRight=sr,G.forEach=ji,G.forEachRight=Ni,G.forIn=Br,G.forInRight=zr,G.forOwn=Vr,G.forOwnRight=Wr,G.functions=Gr,G.groupBy=za,G.indexBy=Va,G.initial=Yn,G.intersection=Kn,G.invert=Xr,G.invoke=Oi,G.keys=es,G.keysIn=Yr,G.map=Li,G.mapValues=Kr,G.matches=Do,G.matchesProperty=Mo,G.memoize=lr,G.merge=ts,G.mixin=Io,G.negate=ur,G.omit=Qr,G.once=cr,G.pairs=Zr,G.partial=dr,G.partialRight=pr,G.partition=Ja,G.pick=eo,G.pluck=Ri,G.property=jo,G.propertyOf=No,G.pull=ei,G.pullAt=ti,G.range=Oo,G.rearg=hr,G.reject=Hi,G.remove=ni,G.rest=ii,G.shuffle=Bi,G.slice=ri,G.sortBy=Wi,G.sortByAll=Gi,G.spread=fr,G.take=si,G.takeRight=li,G.takeRightWhile=ui,G.takeWhile=ci,G.tap=bi,G.throttle=gr,G.thru=wi,G.times=Lo,G.toArray=Lr,G.toPlainObject=Rr,G.transform=no,G.union=di,G.uniq=pi,G.unzip=hi,G.values=io,G.valuesIn=ro,G.where=Ji,G.without=fi,G.wrap=mr,G.xor=gi,G.zip=mi,G.zipObject=vi,G.backflow=sr,G.collect=Li,G.compose=sr,G.each=ji,G.eachRight=Ni,G.extend=Za,G.iteratee=To,G.methods=Gr,G.object=vi,G.select=Mi,G.tail=ii,G.unique=pi,Io(G,G),G.attempt=_o,G.camelCase=ns,G.capitalize=ao,G.clone=vr,G.cloneDeep=yr,G.deburr=so,G.endsWith=lo,G.escape=uo,G.escapeRegExp=co,G.every=Di,G.find=Ii,G.findIndex=zn,G.findKey=Hr,G.findLast=Pi,G.findLastIndex=Vn,G.findLastKey=Ur,G.findWhere=Ai,G.first=Wn,G.has=Jr,G.identity=Eo,G.includes=Ei,G.indexOf=Xn,G.isArguments=br,G.isArray=Ya,G.isBoolean=wr,G.isDate=xr,G.isElement=kr,G.isEmpty=Cr,G.isEqual=Sr,G.isError=_r,G.isFinite=Ka,G.isFunction=Tr,G.isMatch=Er,G.isNaN=Dr,G.isNative=Mr,G.isNull=Ir,G.isNumber=Pr,G.isObject=$r,G.isPlainObject=Qa,G.isRegExp=Ar,G.isString=jr,G.isTypedArray=Nr,G.isUndefined=Or,G.kebabCase=is,G.last=Qn,G.lastIndexOf=Zn,G.max=Wa,G.min=Ga,G.noConflict=Po,G.noop=Ao,G.now=Xa,G.pad=po,G.padLeft=ho,G.padRight=fo,G.parseInt=go,G.random=oo,G.reduce=Fi,G.reduceRight=qi,G.repeat=mo,G.result=to,G.runInContext=w,G.size=zi,G.snakeCase=rs,G.some=Vi,G.sortedIndex=oi,G.sortedLastIndex=ai,G.startCase=os,G.startsWith=vo,G.template=yo,G.trim=bo,G.trimLeft=wo,G.trimRight=xo,G.trunc=ko,G.unescape=Co,G.uniqueId=Ro,G.words=So,G.all=Di,G.any=Vi,G.contains=Ei,G.detect=Ii,G.foldl=Fi,G.foldr=qi,G.head=Wn,G.include=Ei,G.inject=Fi,Io(G,function(){var e={};return Et(G,function(t,n){G.prototype[n]||(e[n]=t)}),e}(),!1),G.sample=Ui,G.prototype.sample=function(e){return this.__chain__||null!=e?this.thru(function(t){return Ui(t,e)}):Ui(this.value())},G.VERSION=k,Qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){G[e].placeholder=G}),Qe(["filter","map","takeWhile"],function(e,t){var n=t==O,i=t==R;Z.prototype[e]=function(e,r){var o=this.clone(),a=o.__filtered__,s=o.__iteratees__||(o.__iteratees__=[]);return o.__filtered__=a||n||i&&o.__dir__<0,s.push({iteratee:mn(e,r,3),type:t}),o}}),Qe(["drop","take"],function(e,t){var n="__"+e+"Count__",i=e+"While";Z.prototype[e]=function(i){i=null==i?1:Ca(ua(i)||0,0);var r=this.clone();if(r.__filtered__){var o=r[n];r[n]=t?Sa(o,i):o+i}else{var a=r.__views__||(r.__views__=[]);a.push({size:i,type:e+(r.__dir__<0?"Right":"")})}return r},Z.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()},Z.prototype[e+"RightWhile"]=function(e,t){return this.reverse()[i](e,t).reverse()}}),Qe(["first","last"],function(e,t){var n="take"+(t?"Right":"");Z.prototype[e]=function(){return this[n](1).value()[0]}}),Qe(["initial","rest"],function(e,t){var n="drop"+(t?"":"Right");Z.prototype[e]=function(){return this[n](1)}}),Qe(["pluck","where"],function(e,t){var n=t?"filter":"map",i=t?Ot:qt;Z.prototype[e]=function(e){return this[n](i(e))}}),Z.prototype.compact=function(){return this.filter(Eo)},Z.prototype.dropWhile=function(e,t){var n;return e=mn(e,t,3),this.filter(function(t,i,r){return n||(n=!e(t,i,r))})},Z.prototype.reject=function(e,t){return e=mn(e,t,3),this.filter(function(t,n,i){return!e(t,n,i)})},Z.prototype.slice=function(e,t){e=null==e?0:+e||0;var n=0>e?this.takeRight(-e):this.drop(e);return"undefined"!=typeof t&&(t=+t||0,n=0>t?n.dropRight(-t):n.take(t-e)),n},Z.prototype.toArray=function(){return this.drop(0)},Et(Z.prototype,function(e,t){var n=G[t],i=/^(?:first|last)$/.test(t);G.prototype[t]=function(){var t=this.__wrapped__,r=arguments,o=this.__chain__,a=!!this.__actions__.length,s=t instanceof Z,l=s&&!a;if(i&&!o)return l?e.call(t):n.call(G,this.value());var u=function(e){var t=[e];return da.apply(t,r),n.apply(G,t)};if(s||Ya(t)){var c=l?t:new Z(this),d=e.apply(c,r);if(!i&&(a||d.__actions__)){var p=d.__actions__||(d.__actions__=[]);p.push({func:wi,args:[u],thisArg:G})}return new K(d,o)}return this.thru(u)}}),Qe(["concat","join","pop","push","shift","sort","splice","unshift"],function(e){var t=Xo[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:join|pop|shift)$/.test(e);G.prototype[e]=function(){var e=arguments;return i&&!this.__chain__?t.apply(this.value(),e):this[n](function(n){return t.apply(n,e)})}}),Z.prototype.clone=Re,Z.prototype.reverse=Fe,Z.prototype.value=qe,G.prototype.chain=xi,G.prototype.commit=ki,G.prototype.plant=Ci,G.prototype.reverse=Si,G.prototype.toString=_i,G.prototype.run=G.prototype.toJSON=G.prototype.valueOf=G.prototype.value=Ti,G.prototype.collect=G.prototype.map,G.prototype.head=G.prototype.first,G.prototype.select=G.prototype.filter,G.prototype.tail=G.prototype.rest,G}var x,k="3.2.0",C=1,S=2,_=4,T=8,$=16,E=32,D=64,M=128,I=256,P=30,A="...",j=150,N=16,O=0,L=1,R=2,F="Expected a function",q="__lodash_placeholder__",H="[object Arguments]",U="[object Array]",B="[object Boolean]",z="[object Date]",V="[object Error]",W="[object Function]",G="[object Map]",J="[object Number]",X="[object Object]",Y="[object RegExp]",K="[object Set]",Q="[object String]",Z="[object WeakMap]",ee="[object ArrayBuffer]",te="[object Float32Array]",ne="[object Float64Array]",ie="[object Int8Array]",re="[object Int16Array]",oe="[object Int32Array]",ae="[object Uint8Array]",se="[object Uint8ClampedArray]",le="[object Uint16Array]",ue="[object Uint32Array]",ce=/\b__p \+= '';/g,de=/\b(__p \+=) '' \+/g,pe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,he=/&(?:amp|lt|gt|quot|#39|#96);/g,fe=/[&<>"'`+"`"+`]/g,ge=RegExp(he.source),me=RegExp(fe.source),ve=/<%-([\s\S]+?)%>/g,ye=/<%([\s\S]+?)%>/g,be=/<%=([\s\S]+?)%>/g,we=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,xe=/\w*$/,ke=/^\s*function[ \n\r\t]+\w/,Ce=/^0[xX]/,Se=/^\[object .+?Constructor\]$/,_e=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Te=/($^)/,$e=/[.*+?^${}()|[\]\/\\]/g,Ee=RegExp($e.source),De=/\bthis\b/,Me=/['\n\r\u2028\u2029\\]/g,Ie=function(){var e="[A-Z\\xc0-\\xd6\\xd8-\\xde]",t="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(e+"{2,}(?="+e+t+")|"+e+"?"+t+"|"+e+"+|[0-9]+","g")}(),Pe=" \f \ufeff\n\r\u2028\u2029 ",Ae=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window","WinRTError"],je=-1,Ne={};Ne[te]=Ne[ne]=Ne[ie]=Ne[re]=Ne[oe]=Ne[ae]=Ne[se]=Ne[le]=Ne[ue]=!0,Ne[H]=Ne[U]=Ne[ee]=Ne[B]=Ne[z]=Ne[V]=Ne[W]=Ne[G]=Ne[J]=Ne[X]=Ne[Y]=Ne[K]=Ne[Q]=Ne[Z]=!1;var Oe={};Oe[H]=Oe[U]=Oe[ee]=Oe[B]=Oe[z]=Oe[te]=Oe[ne]=Oe[ie]=Oe[re]=Oe[oe]=Oe[J]=Oe[X]=Oe[Y]=Oe[Q]=Oe[ae]=Oe[se]=Oe[le]=Oe[ue]=!0,Oe[V]=Oe[W]=Oe[G]=Oe[K]=Oe[Z]=!1;var Le={leading:!1,maxWait:0,trailing:!1},Re={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Fe={"&":"&","<":"<",">":">",'"':""","'":"'","`+"`"+`":"`"},qe={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`+"`"+`"},He={"function":!0,object:!0},Ue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=He[typeof window]&&window!==(this&&this.window)?window:this,ze=He[typeof exports]&&exports&&!exports.nodeType&&exports,Ve=He[typeof module]&&module&&!module.nodeType&&module,We=ze&&Ve&&"object"==typeof global&&global;!We||We.global!==We&&We.window!==We&&We.self!==We||(Be=We);var Ge=Ve&&Ve.exports===ze&&ze,Je=w();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Be._=Je,define(function(){return Je})):ze&&Ve?Ge?(Ve.exports=Je)._=Je:ze._=Je:Be._=Je}.call(this),function(e,t,n){"use strict";function i(){function e(e,n){return t.extend(Object.create(e),n)}function n(e,t){var n=t.caseInsensitiveMatch,i={originalPath:e,regexp:e},r=i.keys=[];return e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(e,t,n,i){var o="?"===i?i:null,a="*"===i?i:null;return r.push({name:n,optional:!!o}),t=t||"",""+(o?"":t)+"(?:"+(o?t:"")+(a&&"(.+?)"||"([^/]+)")+(o||"")+")"+(o||"")}).replace(/([\/$\*])/g,"\\$1"),i.regexp=new RegExp("^"+e+"$",n?"i":""),i}var i={};this.when=function(e,r){var o=t.copy(r);if(t.isUndefined(o.reloadOnSearch)&&(o.reloadOnSearch=!0),t.isUndefined(o.caseInsensitiveMatch)&&(o.caseInsensitiveMatch=this.caseInsensitiveMatch),i[e]=t.extend(o,e&&n(e,o)),e){var a="/"==e[e.length-1]?e.substr(0,e.length-1):e+"/";i[a]=t.extend({redirectTo:e},n(a,o))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(e){return"string"==typeof e&&(e={redirectTo:e}),this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(n,r,o,a,s,u,c){function d(e,t){var n=t.keys,i={};if(!t.regexp)return null;var r=t.regexp.exec(e);if(!r)return null;for(var o=1,a=r.length;a>o;++o){var s=n[o-1],l=r[o];s&&l&&(i[s.name]=l)}return i}function p(e){var i=b.current;m=f(),v=m&&i&&m.$$route===i.$$route&&t.equals(m.pathParams,i.pathParams)&&!m.reloadOnSearch&&!y,v||!i&&!m||n.$broadcast("$routeChangeStart",m,i).defaultPrevented&&e&&e.preventDefault()}function h(){var e=b.current,i=m;v?(e.params=i.params,t.copy(e.params,o),n.$broadcast("$routeUpdate",e)):(i||e)&&(y=!1,b.current=i,i&&i.redirectTo&&(t.isString(i.redirectTo)?r.path(g(i.redirectTo,i.params)).search(i.params).replace():r.url(i.redirectTo(i.pathParams,r.path(),r.search())).replace()),a.when(i).then(function(){if(i){var e,n,r=t.extend({},i.resolve);return t.forEach(r,function(e,n){r[n]=t.isString(e)?s.get(e):s.invoke(e,null,null,n)}),t.isDefined(e=i.template)?t.isFunction(e)&&(e=e(i.params)):t.isDefined(n=i.templateUrl)&&(t.isFunction(n)&&(n=n(i.params)),t.isDefined(n)&&(i.loadedTemplateUrl=c.valueOf(n),e=u(n))),t.isDefined(e)&&(r.$template=e),a.all(r)}}).then(function(r){i==b.current&&(i&&(i.locals=r,t.copy(i.params,o)),n.$broadcast("$routeChangeSuccess",i,e))},function(t){i==b.current&&n.$broadcast("$routeChangeError",i,e,t)}))}function f(){var n,o;return t.forEach(i,function(i,a){!o&&(n=d(r.path(),i))&&(o=e(i,{params:t.extend({},r.search(),n),pathParams:n}),o.$$route=i)}),o||i[null]&&e(i[null],{params:{},pathParams:{}})}function g(e,n){var i=[];return t.forEach((e||"").split(":"),function(e,t){if(0===t)i.push(e);else{var r=e.match(/(\w+)(?:[?*])?(.*)/),o=r[1];i.push(n[o]),i.push(r[2]||""),delete n[o]}}),i.join("")}var m,v,y=!1,b={routes:i,reload:function(){y=!0,n.$evalAsync(function(){p(),h()})},updateParams:function(e){if(!this.current||!this.current.$$route)throw l("norout","Tried updating route when with no current route");e=t.extend({},this.current.params,e),r.path(g(this.current.$$route.originalPath,e)),r.search(e)}};return n.$on("$locationChangeStart",p),n.$on("$locationChangeSuccess",h),b}]}function r(){this.$get=function(){return{}}}function o(e,n,i){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(r,o,a,s,l){function u(){h&&(i.cancel(h),h=null),d&&(d.$destroy(),d=null),p&&(h=i.leave(p),h.then(function(){h=null}),p=null)}function c(){var a=e.current&&e.current.locals,s=a&&a.$template;if(t.isDefined(s)){var c=r.$new(),h=e.current,m=l(c,function(e){i.enter(e,null,p||o).then(function(){!t.isDefined(f)||f&&!r.$eval(f)||n()}),u()});p=m,d=h.scope=c,d.$emit("$viewContentLoaded"),d.$eval(g)}else u()}var d,p,h,f=a.autoscroll,g=a.onload||"";r.$on("$routeChangeSuccess",c),c()}}}function a(e,t,n){return{restrict:"ECA",priority:-400,link:function(i,r){var o=n.current,a=o.locals;r.html(a.$template);var s=e(r.contents());if(o.controller){a.$scope=i;var l=t(o.controller,a);o.controllerAs&&(i[o.controllerAs]=l),r.data("$ngControllerController",l),r.children().data("$ngControllerController",l)}s(i)}}}var s=t.module("ngRoute",["ng"]).provider("$route",i),l=t.$$minErr("ngRoute");s.provider("$routeParams",r),s.directive("ngView",o),s.directive("ngView",a),o.$inject=["$route","$anchorScroll","$animate"],a.$inject=["$compile","$controller","$route"]}(window,window.angular),function(e,t){"use strict";"object"==typeof exports?module.exports=t(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"==typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)}(this,function(e,t,n,i){"use strict";function r(e,t){return this instanceof r?(void 0===e&&(e="undefined"!=typeof location?location.href+"":""),this.href(e),void 0!==t?this.absoluteTo(t):this):new r(e,t)}function o(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function a(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function s(e){return"Array"===a(e)}function l(e,t){var n,i,r={};if(s(t))for(n=0,i=t.length;i>n;n++)r[t[n]]=!0;else r[t]=!0;for(n=0,i=e.length;i>n;n++)void 0!==r[e[n]]&&(e.splice(n,1),i--,n--);return e}function u(e,t){var n,i;if(s(t)){for(n=0,i=t.length;i>n;n++)if(!u(e,t[n]))return!1;return!0}var r=a(t);for(n=0,i=e.length;i>n;n++)if("RegExp"===r){if("string"==typeof e[n]&&e[n].match(t))return!0}else if(e[n]===t)return!0;return!1}function c(e,t){if(!s(e)||!s(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var n=0,i=e.length;i>n;n++)if(e[n]!==t[n])return!1;return!0}function d(e){return escape(e)}function p(e){return encodeURIComponent(e).replace(/[!'()*]/g,d).replace(/\*/g,"%2A")}function h(e){return function(t,n){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!n),this)}}function f(e,t){return function(n,i){return void 0===n?this._parts[e]||"":(null!==n&&(n+="",n.charAt(0)===t&&(n=n.substring(1))),this._parts[e]=n,this.build(!i),this)}}var g=i&&i.URI;r.version="1.14.2";var m=r.prototype,v=Object.prototype.hasOwnProperty;r._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:r.duplicateQueryParameters,escapeQuerySpace:r.escapeQuerySpace}},r.duplicateQueryParameters=!1,r.escapeQuerySpace=!0,r.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,r.idn_expression=/[^a-z0-9\.-]/i,r.punycode_expression=/(xn--)/i,r.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,r.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,r.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`+"`"+`!()\[\]{};:'".,<>?«»“”‘’]))/gi,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`+"`"+`!()\[\]{};:'".,<>?«»“”„‘’]+$/},r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(e){if(!e||!e.nodeName)return void 0;var t=e.nodeName.toLowerCase();return"input"===t&&"image"!==e.type?void 0:r.domAttributes[t]},r.encode=p,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=p,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}}},r.encodeQuery=function(e,t){var n=r.encode(e+"");return void 0===t&&(t=r.escapeQuerySpace),t?n.replace(/%20/g,"+"):n},r.decodeQuery=function(e,t){e+="",void 0===t&&(t=r.escapeQuerySpace);try{return r.decode(t?e.replace(/\+/g,"%20"):e)}catch(n){return e}},r.recodePath=function(e){for(var t=(e+"").split("/"),n=0,i=t.length;i>n;n++)t[n]=r.encodePathSegment(r.decode(t[n]));return t.join("/")},r.decodePath=function(e){for(var t=(e+"").split("/"),n=0,i=t.length;i>n;n++)t[n]=r.decodePathSegment(t[n]);return t.join("/")};var y,b={encode:"encode",decode:"decode"},w=function(e,t){return function(n){try{return r[t](n+"").replace(r.characters[e][t].expression,function(n){return r.characters[e][t].map[n]})}catch(i){return n}}};for(y in b)r[y+"PathSegment"]=w("pathname",b[y]);r.encodeReserved=w("reserved","encode"),r.parse=function(e,t){var n;return t||(t={}),n=e.indexOf("#"),n>-1&&(t.fragment=e.substring(n+1)||null,e=e.substring(0,n)),n=e.indexOf("?"),n>-1&&(t.query=e.substring(n+1)||null,e=e.substring(0,n)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=r.parseAuthority(e,t)):(n=e.indexOf(":"),n>-1&&(t.protocol=e.substring(0,n)||null,t.protocol&&!t.protocol.match(r.protocol_expression)?t.protocol=void 0:"//"===e.substring(n+1,n+3)?(e=e.substring(n+3),e=r.parseAuthority(e,t)):(e=e.substring(n+1),t.urn=!0))),t.path=e,t},r.parseHost=function(e,t){var n,i,r=e.indexOf("/");if(-1===r&&(r=e.length),"["===e.charAt(0))n=e.indexOf("]"),t.hostname=e.substring(1,n)||null,t.port=e.substring(n+2,r)||null,"/"===t.port&&(t.port=null);else{var o=e.indexOf(":"),a=e.indexOf("/"),s=e.indexOf(":",o+1);-1!==s&&(-1===a||a>s)?(t.hostname=e.substring(0,r)||null,t.port=null):(i=e.substring(0,r).split(":"),t.hostname=i[0]||null,t.port=i[1]||null)}return t.hostname&&"/"!==e.substring(r).charAt(0)&&(r++,e="/"+e),e.substring(r)||"/"},r.parseAuthority=function(e,t){return e=r.parseUserinfo(e,t),r.parseHost(e,t)},r.parseUserinfo=function(e,t){var n,i=e.indexOf("/"),o=e.lastIndexOf("@",i>-1?i:e.length-1);return o>-1&&(-1===i||i>o)?(n=e.substring(0,o).split(":"),t.username=n[0]?r.decode(n[0]):null,n.shift(),t.password=n[0]?r.decode(n.join(":")):null,e=e.substring(o+1)):(t.username=null,t.password=null),e},r.parseQuery=function(e,t){if(!e)return{};if(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!e)return{};for(var n,i,o,a={},s=e.split("&"),l=s.length,u=0;l>u;u++)n=s[u].split("="),i=r.decodeQuery(n.shift(),t),o=n.length?r.decodeQuery(n.join("="),t):null,v.call(a,i)?("string"==typeof a[i]&&(a[i]=[a[i]]),a[i].push(o)):a[i]=o;return a},r.build=function(e){var t="";return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//"),t+=r.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&"string"==typeof e.hostname&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},r.buildHost=function(e){var t="";return e.hostname?(t+=r.ip6_expression.test(e.hostname)?"["+e.hostname+"]":e.hostname,e.port&&(t+=":"+e.port),t):""},r.buildAuthority=function(e){return r.buildUserinfo(e)+r.buildHost(e)},r.buildUserinfo=function(e){var t="";return e.username&&(t+=r.encode(e.username),e.password&&(t+=":"+r.encode(e.password)),t+="@"),t},r.buildQuery=function(e,t,n){var i,o,a,l,u="";for(o in e)if(v.call(e,o)&&o)if(s(e[o]))for(i={},a=0,l=e[o].length;l>a;a++)void 0!==e[o][a]&&void 0===i[e[o][a]+""]&&(u+="&"+r.buildQueryParameter(o,e[o][a],n),t!==!0&&(i[e[o][a]+""]=!0));else void 0!==e[o]&&(u+="&"+r.buildQueryParameter(o,e[o],n));return u.substring(1)},r.buildQueryParameter=function(e,t,n){return r.encodeQuery(e,n)+(null!==t?"="+r.encodeQuery(t,n):"")},r.addQuery=function(e,t,n){if("object"==typeof t)for(var i in t)v.call(t,i)&&r.addQuery(e,i,t[i]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===e[t])return void(e[t]=n);"string"==typeof e[t]&&(e[t]=[e[t]]),s(n)||(n=[n]),e[t]=(e[t]||[]).concat(n)}},r.removeQuery=function(e,t,n){var i,o,a;if(s(t))for(i=0,o=t.length;o>i;i++)e[t[i]]=void 0;else if("object"==typeof t)for(a in t)v.call(t,a)&&r.removeQuery(e,a,t[a]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the first parameter");void 0!==n?e[t]===n?e[t]=void 0:s(e[t])&&(e[t]=l(e[t],n)):e[t]=void 0}},r.hasQuery=function(e,t,n,i){if("object"==typeof t){for(var o in t)if(v.call(t,o)&&!r.hasQuery(e,o,t[o]))return!1;return!0}if("string"!=typeof t)throw new TypeError("URI.hasQuery() accepts an object, string as the name parameter");switch(a(n)){case"Undefined":return t in e;case"Boolean":var l=Boolean(s(e[t])?e[t].length:e[t]);return n===l;case"Function":return!!n(e[t],t,e);case"Array":if(!s(e[t]))return!1;var d=i?u:c;return d(e[t],n);case"RegExp":return s(e[t])?i?u(e[t],n):!1:Boolean(e[t]&&e[t].match(n));case"Number":n=String(n);case"String":return s(e[t])?i?u(e[t],n):!1:e[t]===n;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},r.commonPath=function(e,t){var n,i=Math.min(e.length,t.length);for(n=0;i>n;n++)if(e.charAt(n)!==t.charAt(n)){n--;break}return 1>n?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":(("/"!==e.charAt(n)||"/"!==t.charAt(n))&&(n=e.substring(0,n).lastIndexOf("/")),e.substring(0,n+1))},r.withinString=function(e,t,n){n||(n={});var i=n.start||r.findUri.start,o=n.end||r.findUri.end,a=n.trim||r.findUri.trim,s=/[a-z0-9-]=["']?$/i;for(i.lastIndex=0;;){var l=i.exec(e);if(!l)break;var u=l.index;if(n.ignoreHtml){var c=e.slice(Math.max(u-3,0),u);if(c&&s.test(c))continue}var d=u+e.slice(u).search(o),p=e.slice(u,d).replace(a,"");if(!n.ignore||!n.ignore.test(p)){d=u+p.length;var h=t(p,u,d,e);e=e.slice(0,u)+h+e.slice(d),i.lastIndex=u+h.length}}return i.lastIndex=0,e},r.ensureValidHostname=function(t){if(t.match(r.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');if(e.toASCII(t).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');
|
|
3220
|
|
-}},r.noConflict=function(e){if(e){var t={URI:this.noConflict()};return i.URITemplate&&"function"==typeof i.URITemplate.noConflict&&(t.URITemplate=i.URITemplate.noConflict()),i.IPv6&&"function"==typeof i.IPv6.noConflict&&(t.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&"function"==typeof i.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=i.SecondLevelDomains.noConflict()),t}return i.URI===this&&(i.URI=g),this},m.build=function(e){return e===!0?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},m.clone=function(){return new r(this)},m.valueOf=m.toString=function(){return this.build(!1)._string},m.protocol=h("protocol"),m.username=h("username"),m.password=h("password"),m.hostname=h("hostname"),m.port=h("port"),m.query=f("query","?"),m.fragment=f("fragment","#"),m.search=function(e,t){var n=this.query(e,t);return"string"==typeof n&&n.length?"?"+n:n},m.hash=function(e,t){var n=this.fragment(e,t);return"string"==typeof n&&n.length?"#"+n:n},m.pathname=function(e,t){if(void 0===e||e===!0){var n=this._parts.path||(this._parts.hostname?"/":"");return e?r.decodePath(n):n}return this._parts.path=e?r.recodePath(e):"/",this.build(!t),this},m.path=m.pathname,m.href=function(e,t){var n;if(void 0===e)return this.toString();this._string="",this._parts=r._parts();var i=e instanceof r,o="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName){var a=r.getDomAttribute(e);e=e[a]||"",o=!1}if(!i&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=r.parse(String(e),this._parts);else{if(!i&&!o)throw new TypeError("invalid input");var s=i?e._parts:e;for(n in s)v.call(this._parts,n)&&(this._parts[n]=s[n])}return this.build(!t),this},m.is=function(e){var t=!1,i=!1,o=!1,a=!1,s=!1,l=!1,u=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,i=r.ip4_expression.test(this._parts.hostname),o=r.ip6_expression.test(this._parts.hostname),t=i||o,a=!t,s=a&&n&&n.has(this._parts.hostname),l=a&&r.idn_expression.test(this._parts.hostname),u=a&&r.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return a;case"sld":return s;case"ip":return t;case"ip4":case"ipv4":case"inet4":return i;case"ip6":case"ipv6":case"inet6":return o;case"idn":return l;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return u}return null};var x=m.protocol,k=m.port,C=m.hostname;m.protocol=function(e,t){if(void 0!==e&&e&&(e=e.replace(/:(\/\/)?$/,""),!e.match(r.protocol_expression)))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return x.call(this,e,t)},m.scheme=m.protocol,m.port=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e&&(0===e&&(e=null),e&&(e+="",":"===e.charAt(0)&&(e=e.substring(1)),e.match(/[^0-9]/))))throw new TypeError('Port "'+e+'" contains characters other than [0-9]');return k.call(this,e,t)},m.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var n={};r.parseHost(e,n),e=n.hostname}return C.call(this,e,t)},m.host=function(e,t){return this._parts.urn?void 0===e?"":this:void 0===e?this._parts.hostname?r.buildHost(this._parts):"":(r.parseHost(e,this._parts),this.build(!t),this)},m.authority=function(e,t){return this._parts.urn?void 0===e?"":this:void 0===e?this._parts.hostname?r.buildAuthority(this._parts):"":(r.parseAuthority(e,this._parts),this.build(!t),this)},m.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.username)return"";var n=r.buildUserinfo(this._parts);return n.substring(0,n.length-1)}return"@"!==e[e.length-1]&&(e+="@"),r.parseUserinfo(e,this._parts),this.build(!t),this},m.resource=function(e,t){var n;return void 0===e?this.path()+this.search()+this.hash():(n=r.parse(e),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!t),this)},m.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var i=this._parts.hostname.length-this.domain().length,a=this._parts.hostname.substring(0,i),s=new RegExp("^"+o(a));return e&&"."!==e.charAt(e.length-1)&&(e+="."),e&&r.ensureValidHostname(e),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},m.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var i=this._parts.hostname.length-this.tld(t).length-1;return i=this._parts.hostname.lastIndexOf(".",i-1)+1,this._parts.hostname.substring(i)||""}if(!e)throw new TypeError("cannot set domain empty");if(r.ensureValidHostname(e),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var a=new RegExp(o(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(a,e)}return this.build(!t),this},m.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var i=this._parts.hostname.lastIndexOf("."),r=this._parts.hostname.substring(i+1);return t!==!0&&n&&n.list[r.toLowerCase()]?n.get(this._parts.hostname)||r:r}var a;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');a=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");a=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,e)}return this.build(!t),this},m.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||e===!0){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,i=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return e?r.decodePath(i):i}var a=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,a),l=new RegExp("^"+o(s));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=r.recodePath(e),this._parts.path=this._parts.path.replace(l,e),this.build(!t),this},m.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||e===!0){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),i=this._parts.path.substring(n+1);return e?r.decodePathSegment(i):i}var a=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(a=!0);var s=new RegExp(o(this.filename())+"$");return e=r.recodePath(e),this._parts.path=this._parts.path.replace(s,e),a?this.normalizePath(t):this.build(!t),this},m.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||e===!0){if(!this._parts.path||"/"===this._parts.path)return"";var n,i,a=this.filename(),s=a.lastIndexOf(".");return-1===s?"":(n=a.substring(s+1),i=/^[a-z0-9%]+$/i.test(n)?n:"",e?r.decodePathSegment(i):i)}"."===e.charAt(0)&&(e=e.substring(1));var l,u=this.suffix();if(u)l=e?new RegExp(o(u)+"$"):new RegExp(o("."+u)+"$");else{if(!e)return this;this._parts.path+="."+r.recodePath(e)}return l&&(e=r.recodePath(e),this._parts.path=this._parts.path.replace(l,e)),this.build(!t),this},m.segment=function(e,t,n){var i=this._parts.urn?":":"/",r=this.path(),o="/"===r.substring(0,1),a=r.split(i);if(void 0!==e&&"number"!=typeof e&&(n=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(o&&a.shift(),0>e&&(e=Math.max(a.length+e,0)),void 0===t)return void 0===e?a:a[e];if(null===e||void 0===a[e])if(s(t)){a=[];for(var l=0,u=t.length;u>l;l++)(t[l].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(t[l]))}else(t||"string"==typeof t)&&(""===a[a.length-1]?a[a.length-1]=t:a.push(t));else t?a[e]=t:a.splice(e,1);return o&&a.unshift(""),this.path(a.join(i),n)},m.segmentCoded=function(e,t,n){var i,o,a;if("number"!=typeof e&&(n=t,t=e,e=void 0),void 0===t){if(i=this.segment(e,t,n),s(i))for(o=0,a=i.length;a>o;o++)i[o]=r.decode(i[o]);else i=void 0!==i?r.decode(i):void 0;return i}if(s(t))for(o=0,a=t.length;a>o;o++)t[o]=r.decode(t[o]);else t="string"==typeof t||t instanceof String?r.encode(t):t;return this.segment(e,t,n)};var S=m.query;return m.query=function(e,t){if(e===!0)return r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var n=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace),i=e.call(this,n);return this._parts.query=r.buildQuery(i||n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=r.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):S.call(this,e,t)},m.setQuery=function(e,t,n){var i=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)i[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in e)v.call(e,o)&&(i[o]=e[o])}return this._parts.query=r.buildQuery(i,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},m.addQuery=function(e,t,n){var i=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.addQuery(i,e,void 0===t?null:t),this._parts.query=r.buildQuery(i,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},m.removeQuery=function(e,t,n){var i=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.removeQuery(i,e,t),this._parts.query=r.buildQuery(i,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},m.hasQuery=function(e,t,n){var i=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.hasQuery(i,e,t,n)},m.setSearch=m.setQuery,m.addSearch=m.addQuery,m.removeSearch=m.removeQuery,m.hasSearch=m.hasQuery,m.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},m.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},m.normalizeHostname=function(n){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!n)),this},m.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===r.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},m.normalizePath=function(e){if(this._parts.urn)return this;if(!this._parts.path||"/"===this._parts.path)return this;var t,n,i,o=this._parts.path,a="";for("/"!==o.charAt(0)&&(t=!0,o="/"+o),o=o.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(a=o.substring(1).match(/^(\.\.\/)+/)||"",a&&(a=a[0]));;){if(n=o.indexOf("/.."),-1===n)break;0!==n?(i=o.substring(0,n).lastIndexOf("/"),-1===i&&(i=n),o=o.substring(0,i)+o.substring(n+3)):o=o.substring(3)}return t&&this.is("relative")&&(o=a+o.substring(1)),o=r.recodePath(o),this._parts.path=o,this.build(!e),this},m.normalizePathname=m.normalizePath,m.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(r.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},m.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},m.normalizeSearch=m.normalizeQuery,m.normalizeHash=m.normalizeFragment,m.iso8859=function(){var e=r.encode,t=r.decode;return r.encode=escape,r.decode=decodeURIComponent,this.normalize(),r.encode=e,r.decode=t,this},m.unicode=function(){var e=r.encode,t=r.decode;return r.encode=p,r.decode=unescape,this.normalize(),r.encode=e,r.decode=t,this},m.readable=function(){var t=this.clone();t.username("").password("").normalize();var n="";if(t._parts.protocol&&(n+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(n+=e.toUnicode(t._parts.hostname),t._parts.port&&(n+=":"+t._parts.port)):n+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(n+="/"),n+=t.path(!0),t._parts.query){for(var i="",o=0,a=t._parts.query.split("&"),s=a.length;s>o;o++){var l=(a[o]||"").split("=");i+="&"+r.decodeQuery(l[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==l[1]&&(i+="="+r.decodeQuery(l[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}n+="?"+i.substring(1)}return n+=r.decodeQuery(t.hash(),!0)},m.absoluteTo=function(e){var t,n,i,o=this.clone(),a=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof r||(e=new r(e)),o._parts.protocol||(o._parts.protocol=e._parts.protocol),this._parts.hostname)return o;for(n=0;i=a[n];n++)o._parts[i]=e._parts[i];return o._parts.path?".."===o._parts.path.substring(-2)&&(o._parts.path+="/"):(o._parts.path=e._parts.path,o._parts.query||(o._parts.query=e._parts.query)),"/"!==o.path().charAt(0)&&(t=e.directory(),o._parts.path=(t?t+"/":"")+o._parts.path,o.normalizePath()),o.build(),o},m.relativeTo=function(e){var t,n,i,o,a,s=this.clone().normalize();if(s._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new r(e).normalize(),t=s._parts,n=e._parts,o=s.path(),a=e.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==a.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===n.protocol&&(t.protocol=null),t.username!==n.username||t.password!==n.password)return s.build();if(null!==t.protocol||null!==t.username||null!==t.password)return s.build();if(t.hostname!==n.hostname||t.port!==n.port)return s.build();if(t.hostname=null,t.port=null,o===a)return t.path="",s.build();if(i=r.commonPath(s.path(),e.path()),!i)return s.build();var l=n.path.substring(i.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=l+t.path.substring(i.length),s.build()},m.equals=function(e){var t,n,i,o=this.clone(),a=new r(e),l={},u={},d={};if(o.normalize(),a.normalize(),o.toString()===a.toString())return!0;if(t=o.query(),n=a.query(),o.query(""),a.query(""),o.toString()!==a.toString())return!1;if(t.length!==n.length)return!1;l=r.parseQuery(t,this._parts.escapeQuerySpace),u=r.parseQuery(n,this._parts.escapeQuerySpace);for(i in l)if(v.call(l,i)){if(s(l[i])){if(!c(l[i],u[i]))return!1}else if(l[i]!==u[i])return!1;d[i]=!0}for(i in u)if(v.call(u,i)&&!d[i])return!1;return!0},m.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},m.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},r}),function(e,t){"use strict";"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):e.IPv6=t(e)}(this,function(e){"use strict";function t(e){var t=e.toLowerCase(),n=t.split(":"),i=n.length,r=8;""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[i-1]&&""===n[i-2]&&n.pop(),i=n.length,-1!==n[i-1].indexOf(".")&&(r=7);var o;for(o=0;i>o&&""!==n[o];o++);if(r>o){for(n.splice(o,1,"0000");n.length<r;)n.splice(o,0,"0000");i=n.length}for(var a,s=0;r>s;s++){a=n[s].split("");for(var l=0;3>l&&("0"===a[0]&&a.length>1);l++)a.splice(0,1);n[s]=a.join("")}var u=-1,c=0,d=0,p=-1,h=!1;for(s=0;r>s;s++)h?"0"===n[s]?d+=1:(h=!1,d>c&&(u=p,c=d)):"0"===n[s]&&(h=!0,p=s,d=1);d>c&&(u=p,c=d),c>1&&n.splice(u,c,""),i=n.length;var f="";for(""===n[0]&&(f=":"),s=0;i>s&&(f+=n[s],s!==i-1);s++)f+=":";return""===n[i-1]&&(f+=":"),f}function n(){return e.IPv6===this&&(e.IPv6=i),this}var i=e&&e.IPv6;return{best:t,noConflict:n}}),function(e,t){"use strict";"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):e.SecondLevelDomains=t(e)}(this,function(e){"use strict";var t=e&&e.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ","do":" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ","in":" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch "},has:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1)return!1;var i=e.lastIndexOf(".",t-1);if(0>=i||i>=t-1)return!1;var r=n.list[e.slice(t+1)];return r?r.indexOf(" "+e.slice(i+1,t)+" ")>=0:!1},is:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1)return!1;var i=e.lastIndexOf(".",t-1);if(i>=0)return!1;var r=n.list[e.slice(t+1)];return r?r.indexOf(" "+e.slice(0,t)+" ")>=0:!1},get:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1)return null;var i=e.lastIndexOf(".",t-1);if(0>=i||i>=t-1)return null;var r=n.list[e.slice(t+1)];return r?r.indexOf(" "+e.slice(i+1,t)+" ")<0?null:e.slice(i+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n}),function(e){function t(e){throw RangeError(M[e])}function n(e,t){for(var n=e.length;n--;)e[n]=t(e[n]);return e}function i(e,t){return n(e.split(D),t).join(".")}function r(e){for(var t,n,i=[],r=0,o=e.length;o>r;)t=e.charCodeAt(r++),t>=55296&&56319>=t&&o>r?(n=e.charCodeAt(r++),56320==(64512&n)?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),r--)):i.push(t);return i}function o(e){return n(e,function(e){var t="";return e>65535&&(e-=65536,t+=A(e>>>10&1023|55296),e=56320|1023&e),t+=A(e)}).join("")}function a(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:b}function s(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function l(e,t,n){var i=0;for(e=n?P(e/C):e>>1,e+=P(e/t);e>I*x>>1;i+=b)e=P(e/I);return P(i+(I+1)*e/(e+k))}function u(e){var n,i,r,s,u,c,d,p,h,f,g=[],m=e.length,v=0,k=_,C=S;for(i=e.lastIndexOf(T),0>i&&(i=0),r=0;i>r;++r)e.charCodeAt(r)>=128&&t("not-basic"),g.push(e.charCodeAt(r));for(s=i>0?i+1:0;m>s;){for(u=v,c=1,d=b;s>=m&&t("invalid-input"),p=a(e.charCodeAt(s++)),(p>=b||p>P((y-v)/c))&&t("overflow"),v+=p*c,h=C>=d?w:d>=C+x?x:d-C,!(h>p);d+=b)f=b-h,c>P(y/f)&&t("overflow"),c*=f;n=g.length+1,C=l(v-u,n,0==u),P(v/n)>y-k&&t("overflow"),k+=P(v/n),v%=n,g.splice(v++,0,k)}return o(g)}function c(e){var n,i,o,a,u,c,d,p,h,f,g,m,v,k,C,$=[];for(e=r(e),m=e.length,n=_,i=0,u=S,c=0;m>c;++c)g=e[c],128>g&&$.push(A(g));for(o=a=$.length,a&&$.push(T);m>o;){for(d=y,c=0;m>c;++c)g=e[c],g>=n&&d>g&&(d=g);for(v=o+1,d-n>P((y-i)/v)&&t("overflow"),i+=(d-n)*v,n=d,c=0;m>c;++c)if(g=e[c],n>g&&++i>y&&t("overflow"),g==n){for(p=i,h=b;f=u>=h?w:h>=u+x?x:h-u,!(f>p);h+=b)C=p-f,k=b-f,$.push(A(s(f+C%k,0))),p=P(C/k);$.push(A(s(p,0))),u=l(i,v,o==a),i=0,++o}++i,++n}return $.join("")}function d(e){return i(e,function(e){return $.test(e)?u(e.slice(4).toLowerCase()):e})}function p(e){return i(e,function(e){return E.test(e)?"xn--"+c(e):e})}var h="object"==typeof exports&&exports,f="object"==typeof module&&module&&module.exports==h&&module,g="object"==typeof global&&global;(g.global===g||g.window===g)&&(e=g);var m,v,y=2147483647,b=36,w=1,x=26,k=38,C=700,S=72,_=128,T="-",$=/^xn--/,E=/[^ -~]/,D=/\x2E|\u3002|\uFF0E|\uFF61/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=b-w,P=Math.floor,A=String.fromCharCode;if(m={version:"1.2.3",ucs2:{decode:r,encode:o},decode:u,encode:c,toASCII:p,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return m});else if(h&&!h.nodeType)if(f)f.exports=m;else for(v in m)m.hasOwnProperty(v)&&(h[v]=m[v]);else e.punycode=m}(this),function(e,t){"use strict";"object"==typeof exports?module.exports=t(require("./URI")):"function"==typeof define&&define.amd?define(["./URI"],t):e.URITemplate=t(e.URI,e)}(this,function(e,t){"use strict";function n(e){return n._cache[e]?n._cache[e]:this instanceof n?(this.expression=e,n._cache[e]=this,this):new n(e)}function i(e){this.data=e,this.cache={}}var r=t&&t.URITemplate,o=Object.prototype.hasOwnProperty,a=n.prototype,s={"":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encode"},"+":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},"#":{prefix:"#",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},".":{prefix:".",separator:".",named:!1,empty_name_separator:!1,encode:"encode"},"/":{prefix:"/",separator:"/",named:!1,empty_name_separator:!1,encode:"encode"},";":{prefix:";",separator:";",named:!0,empty_name_separator:!1,encode:"encode"},"?":{prefix:"?",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"},"&":{prefix:"&",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"}};return n._cache={},n.EXPRESSION_PATTERN=/\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g,n.VARIABLE_PATTERN=/^([^*:]+)((\*)|:(\d+))?$/,n.VARIABLE_NAME_PATTERN=/[^a-zA-Z0-9%_]/,n.expand=function(e,t){var i,r,o,a=s[e.operator],l=a.named?"Named":"Unnamed",u=e.variables,c=[];for(o=0;r=u[o];o++)i=t.get(r.name),i.val.length?c.push(n["expand"+l](i,a,r.explode,r.explode&&a.separator||",",r.maxlength,r.name)):i.type&&c.push("");return c.length?a.prefix+c.join(a.separator):""},n.expandNamed=function(t,n,i,r,o,a){var s,l,u,c="",d=n.encode,p=n.empty_name_separator,h=!t[d].length,f=2===t.type?"":e[d](a);for(l=0,u=t.val.length;u>l;l++)o?(s=e[d](t.val[l][1].substring(0,o)),2===t.type&&(f=e[d](t.val[l][0].substring(0,o)))):h?(s=e[d](t.val[l][1]),2===t.type?(f=e[d](t.val[l][0]),t[d].push([f,s])):t[d].push([void 0,s])):(s=t[d][l][1],2===t.type&&(f=t[d][l][0])),c&&(c+=r),i?c+=f+(p||s?"=":"")+s:(l||(c+=e[d](a)+(p||s?"=":"")),2===t.type&&(c+=f+","),c+=s);return c},n.expandUnnamed=function(t,n,i,r,o){var a,s,l,u,c="",d=n.encode,p=n.empty_name_separator,h=!t[d].length;for(l=0,u=t.val.length;u>l;l++)o?s=e[d](t.val[l][1].substring(0,o)):h?(s=e[d](t.val[l][1]),t[d].push([2===t.type?e[d](t.val[l][0]):void 0,s])):s=t[d][l][1],c&&(c+=r),2===t.type&&(a=o?e[d](t.val[l][0].substring(0,o)):t[d][l][0],c+=a,c+=i?p||s?"=":"":","),c+=s;return c},n.noConflict=function(){return t.URITemplate===n&&(t.URITemplate=r),n},a.expand=function(e){var t="";this.parts&&this.parts.length||this.parse(),e instanceof i||(e=new i(e));for(var r=0,o=this.parts.length;o>r;r++)t+="string"==typeof this.parts[r]?this.parts[r]:n.expand(this.parts[r],e);return t},a.parse=function(){var e,t,i,r=this.expression,o=n.EXPRESSION_PATTERN,a=n.VARIABLE_PATTERN,l=n.VARIABLE_NAME_PATTERN,u=[],c=0;for(o.lastIndex=0;;){if(t=o.exec(r),null===t){u.push(r.substring(c));break}if(u.push(r.substring(c,t.index)),c=t.index+t[0].length,!s[t[1]])throw new Error('Unknown Operator "'+t[1]+'" in "'+t[0]+'"');if(!t[3])throw new Error('Unclosed Expression "'+t[0]+'"');e=t[2].split(",");for(var d=0,p=e.length;p>d;d++){if(i=e[d].match(a),null===i)throw new Error('Invalid Variable "'+e[d]+'" in "'+t[0]+'"');if(i[1].match(l))throw new Error('Invalid Variable Name "'+i[1]+'" in "'+t[0]+'"');e[d]={name:i[1],explode:!!i[3],maxlength:i[4]&&parseInt(i[4],10)}}if(!e.length)throw new Error('Expression Missing Variable(s) "'+t[0]+'"');u.push({expression:t[0],operator:t[1],variables:e})}return u.length||u.push(r),this.parts=u,this},i.prototype.get=function(e){var t,n,i,r=this.data,a={type:0,val:[],encode:[],encodeReserved:[]};if(void 0!==this.cache[e])return this.cache[e];if(this.cache[e]=a,i="[object Function]"===String(Object.prototype.toString.call(r))?r(e):"[object Function]"===String(Object.prototype.toString.call(r[e]))?r[e](e):r[e],void 0===i||null===i)return a;if("[object Array]"===String(Object.prototype.toString.call(i))){for(t=0,n=i.length;n>t;t++)void 0!==i[t]&&null!==i[t]&&a.val.push([void 0,String(i[t])]);a.val.length&&(a.type=3)}else if("[object Object]"===String(Object.prototype.toString.call(i))){for(t in i)o.call(i,t)&&void 0!==i[t]&&null!==i[t]&&a.val.push([t,String(i[t])]);a.val.length&&(a.type=2)}else a.type=1,a.val.push([void 0,String(i)]);return a},e.expand=function(t,i){var r=new n(t),o=r.expand(i);return new e(o)},n}),function(e,t){"use strict";"object"==typeof exports?module.exports=t(require("jquery","./URI")):"function"==typeof define&&define.amd?define(["jquery","./URI"],t):t(e.jQuery,e.URI)}(this,function(e,t){"use strict";function n(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function i(e){var n=e.nodeName.toLowerCase(),i=t.domAttributes[n];
|
|
3221
|
|
-return"input"===n&&"image"!==e.type?void 0:i}function r(t){return{get:function(n){return e(n).uri()[t]()},set:function(n,i){return e(n).uri()[t](i),i}}}function o(t,n){var r,o,l;return i(t)&&n?(r=n.match(c),r&&(r[5]||":"===r[2]||s[r[2]])?(l=e(t).uri(),r[5]?l.is(r[5]):":"===r[2]?(o=r[1].toLowerCase()+":",s[o]?s[o](l,r[4]):!1):(o=r[1].toLowerCase(),a[o]?s[r[2]](l[o](),r[4],o):!1)):!1):!1}var a={},s={"=":function(e,t){return e===t},"^=":function(e,t){return!!(e+"").match(new RegExp("^"+n(t),"i"))},"$=":function(e,t){return!!(e+"").match(new RegExp(n(t)+"$","i"))},"*=":function(e,t,i){return"directory"===i&&(e+="/"),!!(e+"").match(new RegExp(n(t),"i"))},"equals:":function(e,t){return e.equals(t)},"is:":function(e,t){return e.is(t)}};e.each("authority directory domain filename fragment hash host hostname href password path pathname port protocol query resource scheme search subdomain suffix tld username".split(" "),function(t,n){a[n]=!0,e.attrHooks["uri:"+n]=r(n)});var l={get:function(t){return e(t).uri()},set:function(t,n){return e(t).uri().href(n).toString()}};e.each(["src","href","action","uri","cite"],function(t,n){e.attrHooks[n]={set:l.set}}),e.attrHooks.uri.get=l.get,e.fn.uri=function(e){var n=this.first(),r=n.get(0),o=i(r);if(!o)throw new Error('Element "'+r.nodeName+'" does not have either property: href, src, action, cite');if(void 0!==e){var a=n.data("uri");if(a)return a.href(e);e instanceof t||(e=t(e||""))}else{if(e=n.data("uri"))return e;e=t(n.attr(o)||"")}return e._dom_element=r,e._dom_attribute=o,e.normalize(),n.data("uri",e),e},t.prototype.build=function(e){return this._dom_element?(this._string=t.build(this._parts),this._deferred_build=!1,this._dom_element.setAttribute(this._dom_attribute,this._string),this._dom_element[this._dom_attribute]=this._string):e===!0?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=t.build(this._parts),this._deferred_build=!1),this};var u,c=/^([a-zA-Z]+)\s*([\^\$*]?=|:)\s*(['"]?)(.+)\3|^\s*([a-zA-Z0-9]+)\s*$/;return u=e.expr.createPseudo?e.expr.createPseudo(function(e){return function(t){return o(t,e)}}):function(e,t,n){return o(e,n[3])},e.expr[":"].uri=u,e}),function(e,t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):e.IPv6=t(e)}(this,function(e){var t=e&&e.IPv6;return{best:function(e){e=e.toLowerCase().split(":");var t=e.length,n=8;""===e[0]&&""===e[1]&&""===e[2]?(e.shift(),e.shift()):""===e[0]&&""===e[1]?e.shift():""===e[t-1]&&""===e[t-2]&&e.pop(),t=e.length,-1!==e[t-1].indexOf(".")&&(n=7);var i;for(i=0;t>i&&""!==e[i];i++);if(n>i)for(e.splice(i,1,"0000");e.length<n;)e.splice(i,0,"0000");for(i=0;n>i;i++){for(var t=e[i].split(""),r=0;3>r&&("0"===t[0]&&1<t.length);r++)t.splice(0,1);e[i]=t.join("")}var t=-1,o=r=0,a=-1,s=!1;for(i=0;n>i;i++)s?"0"===e[i]?o+=1:(s=!1,o>r&&(t=a,r=o)):"0"===e[i]&&(s=!0,a=i,o=1);for(o>r&&(t=a,r=o),r>1&&e.splice(t,r,""),t=e.length,n="",""===e[0]&&(n=":"),i=0;t>i&&(n+=e[i],i!==t-1);i++)n+=":";return""===e[t-1]&&(n+=":"),n},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}}),function(e){function t(e){throw RangeError(y[e])}function n(e,t){for(var n=e.length;n--;)e[n]=t(e[n]);return e}function i(e,t){return n(e.split(v),t).join(".")}function r(e){for(var t,n,i=[],r=0,o=e.length;o>r;)t=e.charCodeAt(r++),t>=55296&&56319>=t&&o>r?(n=e.charCodeAt(r++),56320==(64512&n)?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),r--)):i.push(t);return i}function o(e){return n(e,function(e){var t="";return e>65535&&(e-=65536,t+=w(e>>>10&1023|55296),e=56320|1023&e),t+=w(e)}).join("")}function a(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function s(e,t,n){var i=0;for(e=n?b(e/700):e>>1,e+=b(e/t);e>455;i+=36)e=b(e/35);return b(i+36*e/(e+38))}function l(e){var n,i,r,a,l,u,c=[],d=e.length,p=0,h=128,f=72;for(i=e.lastIndexOf("-"),0>i&&(i=0),r=0;i>r;++r)128<=e.charCodeAt(r)&&t("not-basic"),c.push(e.charCodeAt(r));for(i=i>0?i+1:0;d>i;){for(r=p,n=1,a=36;i>=d&&t("invalid-input"),l=e.charCodeAt(i++),l=10>l-48?l-22:26>l-65?l-65:26>l-97?l-97:36,(l>=36||l>b((2147483647-p)/n))&&t("overflow"),p+=l*n,u=f>=a?1:a>=f+26?26:a-f,!(u>l);a+=36)l=36-u,n>b(2147483647/l)&&t("overflow"),n*=l;n=c.length+1,f=s(p-r,n,0==r),b(p/n)>2147483647-h&&t("overflow"),h+=b(p/n),p%=n,c.splice(p++,0,h)}return o(c)}function u(e){var n,i,o,l,u,c,d,p,h,f,g,m,v=[];for(e=r(e),f=e.length,n=128,i=0,u=72,c=0;f>c;++c)h=e[c],128>h&&v.push(w(h));for((o=l=v.length)&&v.push("-");f>o;){for(d=2147483647,c=0;f>c;++c)h=e[c],h>=n&&d>h&&(d=h);for(g=o+1,d-n>b((2147483647-i)/g)&&t("overflow"),i+=(d-n)*g,n=d,c=0;f>c;++c)if(h=e[c],n>h&&2147483647<++i&&t("overflow"),h==n){for(p=i,d=36;h=u>=d?1:d>=u+26?26:d-u,!(h>p);d+=36)m=p-h,p=36-h,v.push(w(a(h+m%p,0))),p=b(m/p);v.push(w(a(p,0))),u=s(i,g,o==l),i=0,++o}++i,++n}return v.join("")}var c="object"==typeof exports&&exports,d="object"==typeof module&&module&&module.exports==c&&module,p="object"==typeof global&&global;(p.global===p||p.window===p)&&(e=p);var h,f,g=/^xn--/,m=/[^ -~]/,v=/\x2E|\u3002|\uFF0E|\uFF61/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=Math.floor,w=String.fromCharCode;if(h={version:"1.2.3",ucs2:{decode:r,encode:o},decode:l,encode:u,toASCII:function(e){return i(e,function(e){return m.test(e)?"xn--"+u(e):e})},toUnicode:function(e){return i(e,function(e){return g.test(e)?l(e.slice(4).toLowerCase()):e})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return h});else if(c&&!c.nodeType)if(d)d.exports=h;else for(f in h)h.hasOwnProperty(f)&&(c[f]=h[f]);else e.punycode=h}(this),function(e,t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):e.SecondLevelDomains=t(e)}(this,function(e){var t=e&&e.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ","do":" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ","in":" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch "},has:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1)return!1;var i=e.lastIndexOf(".",t-1);if(0>=i||i>=t-1)return!1;var r=n.list[e.slice(t+1)];return r?0<=r.indexOf(" "+e.slice(i+1,t)+" "):!1},is:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1||0<=e.lastIndexOf(".",t-1))return!1;var i=n.list[e.slice(t+1)];return i?0<=i.indexOf(" "+e.slice(0,t)+" "):!1},get:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1)return null;var i=e.lastIndexOf(".",t-1);if(0>=i||i>=t-1)return null;var r=n.list[e.slice(t+1)];return!r||0>r.indexOf(" "+e.slice(i+1,t)+" ")?null:e.slice(i+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n}),function(e,t){"object"==typeof exports?module.exports=t(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"==typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)}(this,function(e,t,n,i){function r(e,t){return this instanceof r?(void 0===e&&(e="undefined"!=typeof location?location.href+"":""),this.href(e),void 0!==t?this.absoluteTo(t):this):new r(e,t)}function o(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function a(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function s(e){return"Array"===a(e)}function l(e,t){var n,i;if(s(t)){for(n=0,i=t.length;i>n;n++)if(!l(e,t[n]))return!1;return!0}var r=a(t);for(n=0,i=e.length;i>n;n++)if("RegExp"===r){if("string"==typeof e[n]&&e[n].match(t))return!0}else if(e[n]===t)return!0;return!1}function u(e,t){if(!s(e)||!s(t)||e.length!==t.length)return!1;e.sort(),t.sort();for(var n=0,i=e.length;i>n;n++)if(e[n]!==t[n])return!1;return!0}function c(e){return escape(e)}function d(e){return encodeURIComponent(e).replace(/[!'()*]/g,c).replace(/\*/g,"%2A")}function p(e){return function(t,n){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!n),this)}}function h(e,t){return function(n,i){return void 0===n?this._parts[e]||"":(null!==n&&(n+="",n.charAt(0)===t&&(n=n.substring(1))),this._parts[e]=n,this.build(!i),this)}}var f=i&&i.URI;r.version="1.14.2";var g=r.prototype,m=Object.prototype.hasOwnProperty;r._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:r.duplicateQueryParameters,escapeQuerySpace:r.escapeQuerySpace}},r.duplicateQueryParameters=!1,r.escapeQuerySpace=!0,r.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,r.idn_expression=/[^a-z0-9\.-]/i,r.punycode_expression=/(xn--)/i,r.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,r.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,r.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`+"`"+`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/gi,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`+"`"+`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/},r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();return"input"===t&&"image"!==e.type?void 0:r.domAttributes[t]}},r.encode=d,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=d,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}}},r.encodeQuery=function(e,t){var n=r.encode(e+"");return void 0===t&&(t=r.escapeQuerySpace),t?n.replace(/%20/g,"+"):n},r.decodeQuery=function(e,t){e+="",void 0===t&&(t=r.escapeQuerySpace);try{return r.decode(t?e.replace(/\+/g,"%20"):e)}catch(n){return e}},r.recodePath=function(e){e=(e+"").split("/");for(var t=0,n=e.length;n>t;t++)e[t]=r.encodePathSegment(r.decode(e[t]));return e.join("/")},r.decodePath=function(e){e=(e+"").split("/");for(var t=0,n=e.length;n>t;t++)e[t]=r.decodePathSegment(e[t]);return e.join("/")};var v,y={encode:"encode",decode:"decode"},b=function(e,t){return function(n){try{return r[t](n+"").replace(r.characters[e][t].expression,function(n){return r.characters[e][t].map[n]})}catch(i){return n}}};for(v in y)r[v+"PathSegment"]=b("pathname",y[v]);r.encodeReserved=b("reserved","encode"),r.parse=function(e,t){var n;return t||(t={}),n=e.indexOf("#"),n>-1&&(t.fragment=e.substring(n+1)||null,e=e.substring(0,n)),n=e.indexOf("?"),n>-1&&(t.query=e.substring(n+1)||null,e=e.substring(0,n)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=r.parseAuthority(e,t)):(n=e.indexOf(":"),n>-1&&(t.protocol=e.substring(0,n)||null,t.protocol&&!t.protocol.match(r.protocol_expression)?t.protocol=void 0:"//"===e.substring(n+1,n+3)?(e=e.substring(n+3),e=r.parseAuthority(e,t)):(e=e.substring(n+1),t.urn=!0))),t.path=e,t},r.parseHost=function(e,t){var n,i=e.indexOf("/");if(-1===i&&(i=e.length),"["===e.charAt(0))n=e.indexOf("]"),t.hostname=e.substring(1,n)||null,t.port=e.substring(n+2,i)||null,"/"===t.port&&(t.port=null);else{var r=e.indexOf(":");n=e.indexOf("/"),r=e.indexOf(":",r+1),-1!==r&&(-1===n||n>r)?(t.hostname=e.substring(0,i)||null,t.port=null):(n=e.substring(0,i).split(":"),t.hostname=n[0]||null,t.port=n[1]||null)}return t.hostname&&"/"!==e.substring(i).charAt(0)&&(i++,e="/"+e),e.substring(i)||"/"},r.parseAuthority=function(e,t){return e=r.parseUserinfo(e,t),r.parseHost(e,t)},r.parseUserinfo=function(e,t){var n=e.indexOf("/"),i=e.lastIndexOf("@",n>-1?n:e.length-1);return i>-1&&(-1===n||n>i)?(n=e.substring(0,i).split(":"),t.username=n[0]?r.decode(n[0]):null,n.shift(),t.password=n[0]?r.decode(n.join(":")):null,e=e.substring(i+1)):(t.username=null,t.password=null),e},r.parseQuery=function(e,t){if(!e)return{};if(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!e)return{};for(var n,i,o={},a=e.split("&"),s=a.length,l=0;s>l;l++)n=a[l].split("="),i=r.decodeQuery(n.shift(),t),n=n.length?r.decodeQuery(n.join("="),t):null,m.call(o,i)?("string"==typeof o[i]&&(o[i]=[o[i]]),o[i].push(n)):o[i]=n;return o},r.build=function(e){var t="";return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//"),t+=r.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&"string"==typeof e.hostname&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},r.buildHost=function(e){var t="";return e.hostname?(t=r.ip6_expression.test(e.hostname)?t+("["+e.hostname+"]"):t+e.hostname,e.port&&(t+=":"+e.port),t):""},r.buildAuthority=function(e){return r.buildUserinfo(e)+r.buildHost(e)},r.buildUserinfo=function(e){var t="";return e.username&&(t+=r.encode(e.username),e.password&&(t+=":"+r.encode(e.password)),t+="@"),t},r.buildQuery=function(e,t,n){var i,o,a,l,u="";for(o in e)if(m.call(e,o)&&o)if(s(e[o]))for(i={},a=0,l=e[o].length;l>a;a++)void 0!==e[o][a]&&void 0===i[e[o][a]+""]&&(u+="&"+r.buildQueryParameter(o,e[o][a],n),!0!==t&&(i[e[o][a]+""]=!0));else void 0!==e[o]&&(u+="&"+r.buildQueryParameter(o,e[o],n));return u.substring(1)},r.buildQueryParameter=function(e,t,n){return r.encodeQuery(e,n)+(null!==t?"="+r.encodeQuery(t,n):"")},r.addQuery=function(e,t,n){if("object"==typeof t)for(var i in t)m.call(t,i)&&r.addQuery(e,i,t[i]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");void 0===e[t]?e[t]=n:("string"==typeof e[t]&&(e[t]=[e[t]]),s(n)||(n=[n]),e[t]=(e[t]||[]).concat(n))}},r.removeQuery=function(e,t,n){var i;if(s(t))for(n=0,i=t.length;i>n;n++)e[t[n]]=void 0;else if("object"==typeof t)for(i in t)m.call(t,i)&&r.removeQuery(e,i,t[i]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the first parameter");if(void 0!==n){if(e[t]===n)e[t]=void 0;else if(s(e[t])){i=e[t];var o,a,l={};if(s(n))for(o=0,a=n.length;a>o;o++)l[n[o]]=!0;else l[n]=!0;for(o=0,a=i.length;a>o;o++)void 0!==l[i[o]]&&(i.splice(o,1),a--,o--);e[t]=i}}else e[t]=void 0}},r.hasQuery=function(e,t,n,i){if("object"==typeof t){for(var o in t)if(m.call(t,o)&&!r.hasQuery(e,o,t[o]))return!1;return!0}if("string"!=typeof t)throw new TypeError("URI.hasQuery() accepts an object, string as the name parameter");switch(a(n)){case"Undefined":return t in e;case"Boolean":return e=Boolean(s(e[t])?e[t].length:e[t]),n===e;case"Function":return!!n(e[t],t,e);case"Array":return s(e[t])?(i?l:u)(e[t],n):!1;case"RegExp":return s(e[t])?i?l(e[t],n):!1:Boolean(e[t]&&e[t].match(n));case"Number":n=String(n);case"String":return s(e[t])?i?l(e[t],n):!1:e[t]===n;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},r.commonPath=function(e,t){var n,i=Math.min(e.length,t.length);for(n=0;i>n;n++)if(e.charAt(n)!==t.charAt(n)){n--;break}return 1>n?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":(("/"!==e.charAt(n)||"/"!==t.charAt(n))&&(n=e.substring(0,n).lastIndexOf("/")),e.substring(0,n+1))},r.withinString=function(e,t,n){n||(n={});var i=n.start||r.findUri.start,o=n.end||r.findUri.end,a=n.trim||r.findUri.trim,s=/[a-z0-9-]=["']?$/i;for(i.lastIndex=0;;){var l=i.exec(e);if(!l)break;if(l=l.index,n.ignoreHtml){var u=e.slice(Math.max(l-3,0),l);if(u&&s.test(u))continue}var u=l+e.slice(l).search(o),c=e.slice(l,u).replace(a,"");n.ignore&&n.ignore.test(c)||(u=l+c.length,c=t(c,l,u,e),e=e.slice(0,l)+c+e.slice(u),i.lastIndex=l+c.length)}return i.lastIndex=0,e},r.ensureValidHostname=function(t){if(t.match(r.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');if(e.toASCII(t).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]')}},r.noConflict=function(e){return e?(e={URI:this.noConflict()},i.URITemplate&&"function"==typeof i.URITemplate.noConflict&&(e.URITemplate=i.URITemplate.noConflict()),i.IPv6&&"function"==typeof i.IPv6.noConflict&&(e.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&"function"==typeof i.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=i.SecondLevelDomains.noConflict()),e):(i.URI===this&&(i.URI=f),this)},g.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},g.clone=function(){return new r(this)},g.valueOf=g.toString=function(){return this.build(!1)._string},g.protocol=p("protocol"),g.username=p("username"),g.password=p("password"),g.hostname=p("hostname"),g.port=p("port"),g.query=h("query","?"),g.fragment=h("fragment","#"),g.search=function(e,t){var n=this.query(e,t);return"string"==typeof n&&n.length?"?"+n:n},g.hash=function(e,t){var n=this.fragment(e,t);return"string"==typeof n&&n.length?"#"+n:n},g.pathname=function(e,t){if(void 0===e||!0===e){var n=this._parts.path||(this._parts.hostname?"/":"");return e?r.decodePath(n):n}return this._parts.path=e?r.recodePath(e):"/",this.build(!t),this},g.path=g.pathname,g.href=function(e,t){var n;if(void 0===e)return this.toString();this._string="",this._parts=r._parts();var i=e instanceof r,o="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName&&(o=r.getDomAttribute(e),e=e[o]||"",o=!1),!i&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=r.parse(String(e),this._parts);else{if(!i&&!o)throw new TypeError("invalid input");for(n in i=i?e._parts:e)m.call(this._parts,n)&&(this._parts[n]=i[n])}return this.build(!t),this},g.is=function(e){var t=!1,i=!1,o=!1,a=!1,s=!1,l=!1,u=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,i=r.ip4_expression.test(this._parts.hostname),o=r.ip6_expression.test(this._parts.hostname),t=i||o,s=(a=!t)&&n&&n.has(this._parts.hostname),l=a&&r.idn_expression.test(this._parts.hostname),u=a&&r.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return a;case"sld":return s;case"ip":return t;case"ip4":case"ipv4":case"inet4":return i;case"ip6":case"ipv6":case"inet6":return o;case"idn":return l;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return u}return null};var w=g.protocol,x=g.port,k=g.hostname;g.protocol=function(e,t){if(void 0!==e&&e&&(e=e.replace(/:(\/\/)?$/,""),!e.match(r.protocol_expression)))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return w.call(this,e,t)},g.scheme=g.protocol,g.port=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e&&(0===e&&(e=null),e&&(e+="",":"===e.charAt(0)&&(e=e.substring(1)),e.match(/[^0-9]/))))throw new TypeError('Port "'+e+'" contains characters other than [0-9]');return x.call(this,e,t)},g.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var n={};r.parseHost(e,n),e=n.hostname}return k.call(this,e,t)},g.host=function(e,t){return this._parts.urn?void 0===e?"":this:void 0===e?this._parts.hostname?r.buildHost(this._parts):"":(r.parseHost(e,this._parts),this.build(!t),this)},g.authority=function(e,t){return this._parts.urn?void 0===e?"":this:void 0===e?this._parts.hostname?r.buildAuthority(this._parts):"":(r.parseAuthority(e,this._parts),this.build(!t),this)},g.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.username)return"";var n=r.buildUserinfo(this._parts);return n.substring(0,n.length-1)}return"@"!==e[e.length-1]&&(e+="@"),r.parseUserinfo(e,this._parts),this.build(!t),this},g.resource=function(e,t){var n;return void 0===e?this.path()+this.search()+this.hash():(n=r.parse(e),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!t),this)},g.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}return n=this._parts.hostname.length-this.domain().length,n=this._parts.hostname.substring(0,n),n=new RegExp("^"+o(n)),e&&"."!==e.charAt(e.length-1)&&(e+="."),e&&r.ensureValidHostname(e),this._parts.hostname=this._parts.hostname.replace(n,e),this.build(!t),this},g.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);return n&&2>n.length?this._parts.hostname:(n=this._parts.hostname.length-this.tld(t).length-1,n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||"")}if(!e)throw new TypeError("cannot set domain empty");return r.ensureValidHostname(e),!this._parts.hostname||this.is("IP")?this._parts.hostname=e:(n=new RegExp(o(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(n,e)),this.build(!t),this},g.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var i=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(i+1);return!0!==t&&n&&n.list[i.toLowerCase()]?n.get(this._parts.hostname)||i:i}if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');i=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},g.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return e?r.decodePath(n):n}return n=this._parts.path.length-this.filename().length,n=this._parts.path.substring(0,n),n=new RegExp("^"+o(n)),this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=r.recodePath(e),this._parts.path=this._parts.path.replace(n,e),this.build(!t),this},g.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(n+1);return e?r.decodePathSegment(n):n}n=!1,"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(n=!0);var i=new RegExp(o(this.filename())+"$");return e=r.recodePath(e),this._parts.path=this._parts.path.replace(i,e),n?this.normalizePath(t):this.build(!t),this},g.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var n=this.filename(),i=n.lastIndexOf(".");return-1===i?"":(n=n.substring(i+1),n=/^[a-z0-9%]+$/i.test(n)?n:"",e?r.decodePathSegment(n):n);
|
|
3222
|
|
-}if("."===e.charAt(0)&&(e=e.substring(1)),n=this.suffix())i=e?new RegExp(o(n)+"$"):new RegExp(o("."+n)+"$");else{if(!e)return this;this._parts.path+="."+r.recodePath(e)}return i&&(e=r.recodePath(e),this._parts.path=this._parts.path.replace(i,e)),this.build(!t),this},g.segment=function(e,t,n){var i=this._parts.urn?":":"/",r=this.path(),o="/"===r.substring(0,1),r=r.split(i);if(void 0!==e&&"number"!=typeof e&&(n=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw Error('Bad segment "'+e+'", must be 0-based integer');if(o&&r.shift(),0>e&&(e=Math.max(r.length+e,0)),void 0===t)return void 0===e?r:r[e];if(null===e||void 0===r[e])if(s(t)){r=[],e=0;for(var a=t.length;a>e;e++)(t[e].length||r.length&&r[r.length-1].length)&&(r.length&&!r[r.length-1].length&&r.pop(),r.push(t[e]))}else(t||"string"==typeof t)&&(""===r[r.length-1]?r[r.length-1]=t:r.push(t));else t?r[e]=t:r.splice(e,1);return o&&r.unshift(""),this.path(r.join(i),n)},g.segmentCoded=function(e,t,n){var i,o;if("number"!=typeof e&&(n=t,t=e,e=void 0),void 0===t){if(e=this.segment(e,t,n),s(e))for(i=0,o=e.length;o>i;i++)e[i]=r.decode(e[i]);else e=void 0!==e?r.decode(e):void 0;return e}if(s(t))for(i=0,o=t.length;o>i;i++)t[i]=r.decode(t[i]);else t="string"==typeof t||t instanceof String?r.encode(t):t;return this.segment(e,t,n)};var C=g.query;return g.query=function(e,t){if(!0===e)return r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var n=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace),i=e.call(this,n);return this._parts.query=r.buildQuery(i||n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=r.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):C.call(this,e,t)},g.setQuery=function(e,t,n){var i=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)i[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in e)m.call(e,o)&&(i[o]=e[o])}return this._parts.query=r.buildQuery(i,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},g.addQuery=function(e,t,n){var i=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.addQuery(i,e,void 0===t?null:t),this._parts.query=r.buildQuery(i,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},g.removeQuery=function(e,t,n){var i=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.removeQuery(i,e,t),this._parts.query=r.buildQuery(i,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},g.hasQuery=function(e,t,n){var i=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.hasQuery(i,e,t,n)},g.setSearch=g.setQuery,g.addSearch=g.addQuery,g.removeSearch=g.removeQuery,g.hasSearch=g.hasQuery,g.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},g.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},g.normalizeHostname=function(n){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!n)),this},g.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===r.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},g.normalizePath=function(e){if(this._parts.urn||!this._parts.path||"/"===this._parts.path)return this;var t,n,i,o=this._parts.path,a="";for("/"!==o.charAt(0)&&(t=!0,o="/"+o),o=o.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(a=o.substring(1).match(/^(\.\.\/)+/)||"")&&(a=a[0]);n=o.indexOf("/.."),-1!==n;)0!==n?(i=o.substring(0,n).lastIndexOf("/"),-1===i&&(i=n),o=o.substring(0,i)+o.substring(n+3)):o=o.substring(3);return t&&this.is("relative")&&(o=a+o.substring(1)),o=r.recodePath(o),this._parts.path=o,this.build(!e),this},g.normalizePathname=g.normalizePath,g.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(r.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},g.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},g.normalizeSearch=g.normalizeQuery,g.normalizeHash=g.normalizeFragment,g.iso8859=function(){var e=r.encode,t=r.decode;return r.encode=escape,r.decode=decodeURIComponent,this.normalize(),r.encode=e,r.decode=t,this},g.unicode=function(){var e=r.encode,t=r.decode;return r.encode=d,r.decode=unescape,this.normalize(),r.encode=e,r.decode=t,this},g.readable=function(){var t=this.clone();t.username("").password("").normalize();var n="";if(t._parts.protocol&&(n+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(n+=e.toUnicode(t._parts.hostname),t._parts.port&&(n+=":"+t._parts.port)):n+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(n+="/"),n+=t.path(!0),t._parts.query){for(var i="",o=0,a=t._parts.query.split("&"),s=a.length;s>o;o++){var l=(a[o]||"").split("="),i=i+("&"+r.decodeQuery(l[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"));void 0!==l[1]&&(i+="="+r.decodeQuery(l[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}n+="?"+i.substring(1)}return n+=r.decodeQuery(t.hash(),!0)},g.absoluteTo=function(e){var t,n,i=this.clone(),o=["protocol","username","password","hostname","port"];if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");if(e instanceof r||(e=new r(e)),i._parts.protocol||(i._parts.protocol=e._parts.protocol),this._parts.hostname)return i;for(t=0;n=o[t];t++)i._parts[n]=e._parts[n];return i._parts.path?".."===i._parts.path.substring(-2)&&(i._parts.path+="/"):(i._parts.path=e._parts.path,i._parts.query||(i._parts.query=e._parts.query)),"/"!==i.path().charAt(0)&&(e=e.directory(),i._parts.path=(e?e+"/":"")+i._parts.path,i.normalizePath()),i.build(),i},g.relativeTo=function(e){var t,n,i,o,a=this.clone().normalize();if(a._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");if(e=new r(e).normalize(),t=a._parts,n=e._parts,i=a.path(),o=e.path(),"/"!==i.charAt(0))throw Error("URI is already relative");if("/"!==o.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");return t.protocol===n.protocol&&(t.protocol=null),t.username!==n.username||t.password!==n.password||null!==t.protocol||null!==t.username||null!==t.password||t.hostname!==n.hostname||t.port!==n.port?a.build():(t.hostname=null,t.port=null,i===o?(t.path="",a.build()):(e=r.commonPath(a.path(),e.path()))?(n=n.path.substring(e.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../"),t.path=n+t.path.substring(e.length),a.build()):a.build())},g.equals=function(e){var t=this.clone();e=new r(e);var n,i={},o={},a={};if(t.normalize(),e.normalize(),t.toString()===e.toString())return!0;if(i=t.query(),o=e.query(),t.query(""),e.query(""),t.toString()!==e.toString()||i.length!==o.length)return!1;i=r.parseQuery(i,this._parts.escapeQuerySpace),o=r.parseQuery(o,this._parts.escapeQuerySpace);for(n in i)if(m.call(i,n)){if(s(i[n])){if(!u(i[n],o[n]))return!1}else if(i[n]!==o[n])return!1;a[n]=!0}for(n in o)if(m.call(o,n)&&!a[n])return!1;return!0},g.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},g.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},r}),function(e,t){"object"==typeof exports?module.exports=t(require("./URI")):"function"==typeof define&&define.amd?define(["./URI"],t):e.URITemplate=t(e.URI,e)}(this,function(e,t){function n(e){return n._cache[e]?n._cache[e]:this instanceof n?(this.expression=e,n._cache[e]=this,this):new n(e)}function i(e){this.data=e,this.cache={}}var r=t&&t.URITemplate,o=Object.prototype.hasOwnProperty,a=n.prototype,s={"":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encode"},"+":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},"#":{prefix:"#",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},".":{prefix:".",separator:".",named:!1,empty_name_separator:!1,encode:"encode"},"/":{prefix:"/",separator:"/",named:!1,empty_name_separator:!1,encode:"encode"},";":{prefix:";",separator:";",named:!0,empty_name_separator:!1,encode:"encode"},"?":{prefix:"?",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"},"&":{prefix:"&",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"}};return n._cache={},n.EXPRESSION_PATTERN=/\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g,n.VARIABLE_PATTERN=/^([^*:]+)((\*)|:(\d+))?$/,n.VARIABLE_NAME_PATTERN=/[^a-zA-Z0-9%_]/,n.expand=function(e,t){var i,r,o,a=s[e.operator],l=a.named?"Named":"Unnamed",u=e.variables,c=[];for(o=0;r=u[o];o++)i=t.get(r.name),i.val.length?c.push(n["expand"+l](i,a,r.explode,r.explode&&a.separator||",",r.maxlength,r.name)):i.type&&c.push("");return c.length?a.prefix+c.join(a.separator):""},n.expandNamed=function(t,n,i,r,o,a){var s="",l=n.encode;n=n.empty_name_separator;var u,c,d,p=!t[l].length,h=2===t.type?"":e[l](a);for(c=0,d=t.val.length;d>c;c++)o?(u=e[l](t.val[c][1].substring(0,o)),2===t.type&&(h=e[l](t.val[c][0].substring(0,o)))):p?(u=e[l](t.val[c][1]),2===t.type?(h=e[l](t.val[c][0]),t[l].push([h,u])):t[l].push([void 0,u])):(u=t[l][c][1],2===t.type&&(h=t[l][c][0])),s&&(s+=r),i?s+=h+(n||u?"=":"")+u:(c||(s+=e[l](a)+(n||u?"=":"")),2===t.type&&(s+=h+","),s+=u);return s},n.expandUnnamed=function(t,n,i,r,o){var a="",s=n.encode;n=n.empty_name_separator;var l,u,c,d,p=!t[s].length;for(c=0,d=t.val.length;d>c;c++)o?u=e[s](t.val[c][1].substring(0,o)):p?(u=e[s](t.val[c][1]),t[s].push([2===t.type?e[s](t.val[c][0]):void 0,u])):u=t[s][c][1],a&&(a+=r),2===t.type&&(l=o?e[s](t.val[c][0].substring(0,o)):t[s][c][0],a+=l,a=i?a+(n||u?"=":""):a+","),a+=u;return a},n.noConflict=function(){return t.URITemplate===n&&(t.URITemplate=r),n},a.expand=function(e){var t="";this.parts&&this.parts.length||this.parse(),e instanceof i||(e=new i(e));for(var r=0,o=this.parts.length;o>r;r++)t+="string"==typeof this.parts[r]?this.parts[r]:n.expand(this.parts[r],e);return t},a.parse=function(){var e,t,i,r=this.expression,o=n.EXPRESSION_PATTERN,a=n.VARIABLE_PATTERN,l=n.VARIABLE_NAME_PATTERN,u=[],c=0;for(o.lastIndex=0;;){if(t=o.exec(r),null===t){u.push(r.substring(c));break}if(u.push(r.substring(c,t.index)),c=t.index+t[0].length,!s[t[1]])throw Error('Unknown Operator "'+t[1]+'" in "'+t[0]+'"');if(!t[3])throw Error('Unclosed Expression "'+t[0]+'"');e=t[2].split(",");for(var d=0,p=e.length;p>d;d++){if(i=e[d].match(a),null===i)throw Error('Invalid Variable "'+e[d]+'" in "'+t[0]+'"');if(i[1].match(l))throw Error('Invalid Variable Name "'+i[1]+'" in "'+t[0]+'"');e[d]={name:i[1],explode:!!i[3],maxlength:i[4]&&parseInt(i[4],10)}}if(!e.length)throw Error('Expression Missing Variable(s) "'+t[0]+'"');u.push({expression:t[0],operator:t[1],variables:e})}return u.length||u.push(r),this.parts=u,this},i.prototype.get=function(e){var t,n=this.data,i={type:0,val:[],encode:[],encodeReserved:[]};if(void 0!==this.cache[e])return this.cache[e];if(this.cache[e]=i,n="[object Function]"===String(Object.prototype.toString.call(n))?n(e):"[object Function]"===String(Object.prototype.toString.call(n[e]))?n[e](e):n[e],void 0!==n&&null!==n)if("[object Array]"===String(Object.prototype.toString.call(n))){for(t=0,e=n.length;e>t;t++)void 0!==n[t]&&null!==n[t]&&i.val.push([void 0,String(n[t])]);i.val.length&&(i.type=3)}else if("[object Object]"===String(Object.prototype.toString.call(n))){for(t in n)o.call(n,t)&&void 0!==n[t]&&null!==n[t]&&i.val.push([t,String(n[t])]);i.val.length&&(i.type=2)}else i.type=1,i.val.push([void 0,String(n)]);return i},e.expand=function(t,i){var r=new n(t).expand(i);return new e(r)},n}),function(e,t){"object"==typeof exports?module.exports=t(require("jquery","./URI")):"function"==typeof define&&define.amd?define(["jquery","./URI"],t):t(e.jQuery,e.URI)}(this,function(e,t){function n(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function i(e){var n=e.nodeName.toLowerCase();return"input"===n&&"image"!==e.type?void 0:t.domAttributes[n]}function r(t){return{get:function(n){return e(n).uri()[t]()},set:function(n,i){return e(n).uri()[t](i),i}}}function o(t,n){var r,o,l;return i(t)&&n?(r=n.match(c),r&&(r[5]||":"===r[2]||s[r[2]])?(l=e(t).uri(),r[5]?l.is(r[5]):":"===r[2]?(o=r[1].toLowerCase()+":",s[o]?s[o](l,r[4]):!1):(o=r[1].toLowerCase(),a[o]?s[r[2]](l[o](),r[4],o):!1)):!1):!1}var a={},s={"=":function(e,t){return e===t},"^=":function(e,t){return!!(e+"").match(new RegExp("^"+n(t),"i"))},"$=":function(e,t){return!!(e+"").match(new RegExp(n(t)+"$","i"))},"*=":function(e,t,i){return"directory"===i&&(e+="/"),!!(e+"").match(new RegExp(n(t),"i"))},"equals:":function(e,t){return e.equals(t)},"is:":function(e,t){return e.is(t)}};e.each("authority directory domain filename fragment hash host hostname href password path pathname port protocol query resource scheme search subdomain suffix tld username".split(" "),function(t,n){a[n]=!0,e.attrHooks["uri:"+n]=r(n)});var l=function(t,n){return e(t).uri().href(n).toString()};e.each(["src","href","action","uri","cite"],function(t,n){e.attrHooks[n]={set:l}}),e.attrHooks.uri.get=function(t){return e(t).uri()},e.fn.uri=function(e){var n=this.first(),r=n.get(0),o=i(r);if(!o)throw Error('Element "'+r.nodeName+'" does not have either property: href, src, action, cite');if(void 0!==e){var a=n.data("uri");if(a)return a.href(e);e instanceof t||(e=t(e||""))}else{if(e=n.data("uri"))return e;e=t(n.attr(o)||"")}return e._dom_element=r,e._dom_attribute=o,e.normalize(),n.data("uri",e),e},t.prototype.build=function(e){return this._dom_element?(this._string=t.build(this._parts),this._deferred_build=!1,this._dom_element.setAttribute(this._dom_attribute,this._string),this._dom_element[this._dom_attribute]=this._string):!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=t.build(this._parts),this._deferred_build=!1),this};var u,c=/^([a-zA-Z]+)\s*([\^\$*]?=|:)\s*(['"]?)(.+)\3|^\s*([a-zA-Z0-9]+)\s*$/;return u=e.expr.createPseudo?e.expr.createPseudo(function(e){return function(t){return o(t,e)}}):function(e,t,n){return o(e,n[3])},e.expr[":"].uri=u,e}),function(e,t){"use strict";"object"==typeof exports?module.exports=t(require("./URI")):"function"==typeof define&&define.amd?define(["./URI"],t):t(e.URI)}(this,function(e){"use strict";var t=e.prototype,n=t.fragment;e.fragmentPrefix="?";var i=e._parts;return e._parts=function(){var t=i();return t.fragmentPrefix=e.fragmentPrefix,t},t.fragmentPrefix=function(e){return this._parts.fragmentPrefix=e,this},t.fragment=function(t,i){var r=this._parts.fragmentPrefix,o=this._parts.fragment||"";return t===!0?o.substring(0,r.length)!==r?{}:e.parseQuery(o.substring(r.length)):void 0!==t&&"string"!=typeof t?(this._parts.fragment=r+e.buildQuery(t),this.build(!i),this):n.call(this,t,i)},t.addFragment=function(t,n,i){var r=this._parts.fragmentPrefix,o=e.parseQuery((this._parts.fragment||"").substring(r.length));return e.addQuery(o,t,n),this._parts.fragment=r+e.buildQuery(o),"string"!=typeof t&&(i=n),this.build(!i),this},t.removeFragment=function(t,n,i){var r=this._parts.fragmentPrefix,o=e.parseQuery((this._parts.fragment||"").substring(r.length));return e.removeQuery(o,t,n),this._parts.fragment=r+e.buildQuery(o),"string"!=typeof t&&(i=n),this.build(!i),this},t.addHash=t.addFragment,t.removeHash=t.removeFragment,e}),function(e,t){"use strict";"object"==typeof exports?module.exports=t(require("./URI")):"function"==typeof define&&define.amd?define(["./URI"],t):t(e.URI)}(this,function(e){"use strict";var t=e.prototype,n=t.fragment,i=t.build;e.fragmentPrefix="!";var r=e._parts;return e._parts=function(){var t=r();return t.fragmentPrefix=e.fragmentPrefix,t},t.fragmentPrefix=function(e){return this._parts.fragmentPrefix=e,this},t.fragment=function(t,i){var r,o=this._parts.fragmentPrefix,a=this._parts.fragment||"";return t===!0?(r=a.substring(0,o.length)!==o?e(""):new e(a.substring(o.length)),this._fragmentURI=r,r._parentURI=this,r):void 0!==t&&"string"!=typeof t?(this._fragmentURI=t,t._parentURI=t,this._parts.fragment=o+t.toString(),this.build(!i),this):("string"==typeof t&&(this._fragmentURI=void 0),n.call(this,t,i))},t.build=function(e){var t=i.call(this,e);return e!==!1&&this._parentURI&&this._parentURI.fragment(this),t},e}),function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}window.CustomEvent||(e.prototype=window.Event.prototype,window.CustomEvent=e)}();var HawtioMainNav;!function(e){function t(e){var t=e.find("base");return t.attr("href")}function n(e,t){return e&&t&&(_.startsWith(e,t)||0===e.indexOf(t))?e.substring(t.length):e}function i(e){return new d(e)}function r(e){return"isValid"in e?_.isFunction(e.isValid)?e.isValid():!1:!0}function o(e,t){!("isSelected"in t)&&"href"in t&&(t.isSelected=function(){f.attr("href",t.href());var e=new URI(f[0].href),i=n(e.path(),"/");if(""===i)return u.debug("nav item: ",t.id," returning empty href, can't be selected"),!1;var r=new URI,o=n(r.path(),"/"),a=r.query(!0),s=a["main-tab"],l=a["sub-tab"];if(""!==i&&!s&&!l){if(t.isSubTab&&_.startsWith(o,i))return!0;if(t.tabs){var c=_.any(t.tabs,function(e){var t=e.isSelected();return t});if(c)return!0}}var c=!1;return c=t.isSubTab?l?l===t.id:_.startsWith(o,i):s?s===t.id:_.startsWith(o,i)})}function a(e,t,n,i,o){if(r(o)){var a=n.$new();o.hide=function(){return o.show&&!o.show()},a.item=o;var s=null;if(s=_.isFunction(o.template)?o.template():e.get("templates/main-nav/navItem.html"),o.attributes||o.linkAttributes){var l=$(s);o.attributes&&l.attr(o.attributes),o.linkAttributes&&l.find("a").attr(o.linkAttributes),s=l.prop("outerHTML")}i.append(t(s)(a))}}function s(e){var t=[];return e.forEach(function(e){l(e,t)}),t}function l(e,t){if(!("rank"in e)||0===t.length)return void t.push(e);var n=_.findIndex(t,function(t){return"rank"in t&&e.rank>t.rank?!0:void 0});"rank"in t[0]||(n=0),0>n?t.push(e):t.splice(n,0,e)}e.pluginName="hawtio-nav";var u=Logger.get(e.pluginName),c=function(){function e(){}return Object.defineProperty(e,"ADD",{get:function(){return"hawtio-main-nav-add"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"REMOVE",{get:function(){return"hawtio-main-nav-remove"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CHANGED",{get:function(){return"hawtio-main-nav-change"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"REDRAW",{get:function(){return"hawtio-main-nav-redraw"},enumerable:!0,configurable:!0}),e}();e.Actions=c;var d=function(){function t(e){this.items=[],this.root=e}return t.prototype.builder=function(){return new e.NavItemBuilderImpl},t.prototype.add=function(t){for(var n=this,i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];var o=_.union([t],i);this.items=_.union(this.items,o),o.forEach(function(t){n.root.dispatchEvent(new CustomEvent(e.Actions.ADD,{detail:{item:t}}))}),this.root.dispatchEvent(new CustomEvent(e.Actions.CHANGED,{detail:{items:this.items}})),this.root.dispatchEvent(new CustomEvent(e.Actions.REDRAW,{detail:{}}))},t.prototype.remove=function(t){var n=this,i=_.remove(this.items,t);return i.forEach(function(t){n.root.dispatchEvent(new CustomEvent(e.Actions.REMOVE,{detail:{item:t}}))}),this.root.dispatchEvent(new CustomEvent(e.Actions.CHANGED,{detail:{items:this.items}})),this.root.dispatchEvent(new CustomEvent(e.Actions.REDRAW,{detail:{}})),i},t.prototype.iterate=function(e){this.items.forEach(e)},t.prototype.selected=function(){var e=_.filter(this.items,function(e){return e.isValid?e.isValid():!0}),t=_.find(e,function(e){return e.isSelected?e.isSelected():!1});return t},t.prototype.on=function(t,n,i){var r=this;switch(t){case e.Actions.ADD:this.root.addEventListener(e.Actions.ADD,function(e){i(e.detail.item)}),this.items.length>0&&this.items.forEach(function(t){r.root.dispatchEvent(new CustomEvent(e.Actions.ADD,{detail:{item:t}}))});break;case e.Actions.REMOVE:this.root.addEventListener(e.Actions.REMOVE,function(e){i(e.detail.item)});break;case e.Actions.CHANGED:this.root.addEventListener(e.Actions.CHANGED,function(e){i(e.detail.items)}),this.items.length>0&&this.root.dispatchEvent(new CustomEvent(e.Actions.CHANGED,{detail:{items:r.items}}));break;case e.Actions.REDRAW:this.root.addEventListener(e.Actions.REDRAW,function(e){i(e)});var o=new CustomEvent(e.Actions.REDRAW,{detail:{text:""}});this.root.dispatchEvent(o)}},t}();e.createRegistry=i;var p=function(){function e(){this.self={id:""}}return e.join=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=[],i=e.length-1;e.forEach(function(e,t){e&&""!==e&&(0!==t&&"/"===e.charAt(0)&&(e=e.slice(1)),t!==i&&"/"===e.charAt(e.length)&&(e=e.slice(0,e.length-1)),e&&""!==e&&n.push(e))});var r=n.join("/");return r},e.prototype.id=function(e){return this.self.id=e,this},e.prototype.rank=function(e){return this.self.rank=e,this},e.prototype.title=function(e){return this.self.title=e,this},e.prototype.tooltip=function(e){return this.self.tooltip=e,this},e.prototype.page=function(e){return this.self.page=e,this},e.prototype.reload=function(e){return this.self.reload=e,this},e.prototype.attributes=function(e){return this.self.attributes=e,this},e.prototype.linkAttributes=function(e){return this.self.linkAttributes=e,this},e.prototype.context=function(e){return this.self.context=e,this},e.prototype.href=function(e){return this.self.href=e,this},e.prototype.click=function(e){return this.self.click=e,this},e.prototype.isSelected=function(e){return this.self.isSelected=e,this},e.prototype.isValid=function(e){return this.self.isValid=e,this},e.prototype.show=function(e){return this.self.show=e,this},e.prototype.template=function(e){return this.self.template=e,this},e.prototype.defaultPage=function(e){return this.self.defaultPage=e,this},e.prototype.tabs=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.self.tabs=_.union(this.self.tabs,[e],t),this},e.prototype.subPath=function(t,n,i,r,o,a){var s=this.self;this.self.tabs||(this.self.tabs=[]);var l={id:s.id+"-"+n,title:function(){return t},href:function(){return s.href?e.join(s.href(),n):n}};return _.isUndefined(i)||(l.page=function(){return i}),_.isUndefined(r)||(l.rank=r),_.isUndefined(o)||(l.reload=o),_.isUndefined(a)||(l.isValid=a),this.self.tabs.push(l),this},e.prototype.build=function(){var e=_.cloneDeep(this.self);return this.self={id:""},e},e}();e.NavItemBuilderImpl=p,e.createBuilder=function(){return new e.NavItemBuilderImpl};var h=angular.module(e.pluginName,["ngRoute"]);e._module=h,h.constant("layoutFull","templates/main-nav/layoutFull.html"),h.config(["$locationProvider","$routeProvider",function(e,t){e.html5Mode({enabled:!0,requireBase:!0}),t.otherwise({templateUrl:"templates/main-nav/welcome.html"})}]),h.controller("HawtioNav.WelcomeController",["$scope","$location","WelcomePageRegistry","HawtioNav","$timeout","$document",function(e,i,r,o,a,l){function c(e){if(e&&e.href){var r=n(e.href(),t(l)),o=new URI(r),s=_.merge(i.search(),o.query(!0));u.debug("Going to item id: ",e.id," href: ",o.path()," query: ",s),a(function(){i.path(o.path()).search(s)},10)}}function d(){var e=[];o.iterate(function(t){var n=t.isValid||function(){return!0},i=t.show||function(){return!0};n()&&i()&&e.push(t)});var t=s(e);c(t[0])}a(function(){function e(){0===r.pages.length&&(u.debug("No welcome pages, going to first available nav"),d());var e=_.sortBy(r.pages,function(e){return e.rank}),t=_.find(e,function(e){return"isValid"in e?e.isValid():!0});t?c(t):d()}function t(n){if(0===n.length)return void e();var i=n.pop(),r=n;if(u.debug("Trying candidate: ",i," remaining: ",r),!i)return void e();var o=i.defaultPage.isValid;if(o){var a=function(){c(i)},s=function(){t(r)};try{o(a,s)}catch(l){u.debug("Failed to eval item: ",i.id," error: ",l),s()}}else t(r)}var n=i.search();if(n.tab){var a,s=n.tab;if(o.iterate(function(e){a||e.id!==s||(a=e)}),a)return void c(a)}var l=[];o.iterate(function(e){if("defaultPage"in e){var t=e.defaultPage;if(!("rank"in t))return void l.push(e);var n=_.findIndex(l,function(t){return"rank"in t&&e.rank>t.rank?!0:void 0});0>n?l.push(e):l.splice(n,0,e)}}),t(l)},500)}]),h.controller("HawtioNav.ViewController",["$scope","$route","$location","layoutFull","viewRegistry",function(e,t,n,i,r){function o(e){var t=void 0;if(!e||0===_.keys(e).length)return void u.debug("No query, skipping query matching");var n=_.keys(r),i=_.filter(n,function(e){return"{"===e.charAt(0)});return i.forEach(function(n){if(!t)try{var i=angular.fromJson(n);_.isObject(i)&&_.merge(i,e,function(e,i){e&&(t=e===i?r[n]:void 0)})}catch(o){u.debug("Unable to parse json: ",n)}}),t}function a(e){var t=void 0;return _.forIn(r,function(n,i){if(!t)try{var r=new RegExp(i,"");r.exec(e)&&(t=n)}catch(o){u.debug("Invalid RegExp "+i+" for viewRegistry value: "+n)}}),t}function s(){var t=null,r=n.search();if(t=o(r),t&&u.debug("View partial matched on query"),!t){var s=n.path();s&&(t=a(s),t&&u.debug("View partial matched on path name"))}return t||(t=i,u.debug("Using default view partial")),e.viewPartial=t,u.debug("Using view partial: "+t),t}s(),e.$on("$routeChangeSuccess",function(e,t,n){s()})}]),h.run(["HawtioNav","$rootScope","$route","$document",function(n,i,r,o){function a(e){e.preBase||(e.preBase=e.href,e.href=function(){if(s){var t=e.preBase();if(t&&"/"===t.charAt(0))return t=t.substr(1),s+t}return e.preBase()})}n.on(e.Actions.CHANGED,"$apply",function(e){i.$$phase||i.$apply()});var s=t(o);n.on(e.Actions.ADD,"htmlBaseRewriter",function(e){e.href&&(a(e),_.forEach(e.tabs,a))}),n.on(e.Actions.ADD,"$apply",function(e){var t=e.click;e.click=function(e){if(!(e instanceof jQuery.Event))try{i.$apply()}catch(n){}t&&t(e)}}),r.reload(),u.debug("loaded")}]),hawtioPluginLoader.addModule(e.pluginName),hawtioPluginLoader.addModule("ngRoute");var f=$("<a>");e._module.directive("hawtioSubTabs",["HawtioNav","$templateCache","$compile","$location","$rootScope",function(e,t,n,i,r){return{restrict:"A",link:function(i,r,o){i.$watch(_.debounce(function(){var t=e.selected();i.selected!==t&&(i.selected=t,i.$broadcast("hawtio-nav-subtab-redraw"),i.$apply())},100,{trailing:!0})),i.$on("hawtio-nav-subtab-redraw",function(){u.debug("Redrawing sub-tabs"),r.empty();var e=i.selected;if(e&&e.tabs){if(o.showHeading){var l=angular.extend({},e,{template:function(){return t.get("templates/main-nav/subTabHeader.html")}});a(t,n,i,r,l)}var c=s(e.tabs);c.forEach(function(e){a(t,n,i,r,e)})}}),i.$broadcast("hawtio-nav-subtab-redraw")}}}]),e._module.directive("hawtioMainNav",["HawtioNav","$templateCache","$compile","$location","$rootScope",function(t,n,i,c,d){var p={nav:{},numKeys:0,numValid:0},h=function(e){r(e)&&(p.numValid=p.numValid+1)};return t.on(e.Actions.ADD,"subTabEnricher",function(e){e.tabs&&e.tabs.length>0&&e.tabs.forEach(function(t){t.isSubTab=!0,t.oldHref||(t.oldHref=t.href,t.href=function(){var n=new URI(t.oldHref());return""===n.path()?"":(n.search(function(i){_.merge(i,n.query(!0)),i["main-tab"]||(i["main-tab"]=e.id),i["sub-tab"]=t.id}),n.toString())})})}),t.on(e.Actions.ADD,"hrefEnricher",function(e){e.isSubTab=!1,e.href&&!e.oldHref&&(e.oldHref=e.href,e.href=function(){var t=e.oldHref();if(!t)return u.debug("Item: ",e.id," returning null for href()"),"";var n=new URI(t);return""===n.path()?"":(n.search(function(t){if(t["main-tab"]||(t["main-tab"]=e.id),_.merge(t,n.query(!0)),!t["sub-tab"]&&e.tabs&&e.tabs.length>0){var i=s(e.tabs);t["sub-tab"]=i[0].id}}),n.toString())})}),t.on(e.Actions.ADD,"isSelectedEnricher",function(e){o(c,e),e.tabs&&e.tabs.forEach(function(e){o(c,e)})}),t.on(e.Actions.ADD,"PrimaryController",function(e){p.nav[e.id]=e}),t.on(e.Actions.REMOVE,"PrimaryController",function(e){delete p.nav[e.id]}),t.on(e.Actions.CHANGED,"PrimaryController",function(e){p.numKeys=e.length,p.numValid=0,e.forEach(h)}),{restrict:"A",replace:!1,controller:["$scope","$element","$attrs",function(e,r,o){e.config=p,e.$on("hawtio-nav-redraw",function(){u.debug("Redrawing main nav"),r.empty();var o=[];t.iterate(function(e){"context"in e&&e.context&&l(e,o)}),o.forEach(function(t){a(n,i,e,r,t)});var s=[];t.iterate(function(e){e.context||l(e,s)}),s.forEach(function(t){a(n,i,e,r,t)})})}],link:function(e,n,i){e.$watch(_.debounce(function(){var n=p.numValid,i=p.numKeys;p.numValid=0,p.numKeys=0,t.iterate(h),(p.numValid!==n||p.numKeys!==i)&&(e.$broadcast("hawtio-nav-redraw"),e.$apply())},500,{trailing:!0})),e.$broadcast("hawtio-nav-redraw")}}}]),e._module.provider("HawtioNavBuilder",[function(){function t(e,t){u.debug("Setting route: ",t.href()," to template URL: ",t.page());var n={templateUrl:t.page()};_.isUndefined(t.reload)||(n.reloadOnSearch=t.reload),e.when(t.href(),n)}this.$get=function(){return{}},this.create=function(){return e.createBuilder()},this.join=p.join,this.configureRouting=function(e,n){if(_.isUndefined(n.page)){if(n.tabs){var i=_.first(n.tabs).href;i&&(u.debug("Setting route: ",n.href()," to redirect to ",i()),e.when(n.href(),{reloadOnSearch:n.reload,redirectTo:i()}))}}else t(e,n);n.tabs&&n.tabs.forEach(function(n){return t(e,n)})}}]),e._module.factory("HawtioPerspective",[function(){var e=Logger.get("hawtio-dummy-perspective");return{add:function(t,n){e.debug("add called for id: ",t)},remove:function(t){return void e.debug("remove called for id: ",t)},setCurrent:function(t){e.debug("setCurrent called for id: ",t)},getCurrent:function(t){return void e.debug("getCurrent called for id: ",t)},getLabels:function(){return[]}}}]),e._module.factory("WelcomePageRegistry",[function(){return{pages:[]}}]),e._module.factory("HawtioNav",["$window","$rootScope",function(t,n){var i=e.createRegistry(window);return i}])}(HawtioMainNav||(HawtioMainNav={})),angular.module("hawtio-nav").run(["$templateCache",function(e){e.put("templates/main-nav/layoutFull.html","<div ng-view></div>\n\n\n"),e.put("templates/main-nav/layoutTest.html","<div>\n <h1>Test Layout</h1>\n <div ng-view>\n\n\n </div>\n</div>\n\n\n"),e.put("templates/main-nav/navItem.html",'<li ng-class="{ active: item.isSelected() }" ng-hide="item.hide()">\n <a ng-href="{{item.href()}}" ng-click="item.click($event)" ng-bind-html="item.title()" title="{{item.tooltip()}}"></a>\n</li>\n'),e.put("templates/main-nav/subTabHeader.html",'<li class="header">\n <a href=""><strong>{{item.title()}}</strong></a>\n</li>\n'),e.put("templates/main-nav/welcome.html",'<div ng-controller="HawtioNav.WelcomeController"></div>\n')}]),function(){function e(e){return function(){return e}}function t(e){var t="Array"===e&&dt.isArray||function(t,n){return(n||yt.call(t))==="[object "+e+"]"};return Ct[e]=t}function n(e,t){function n(n){return g(n)?yt.call(n)==="[object "+t+"]":typeof n===e}return Ct[t]=n}function i(e){e.SugarMethods||(l(e,"SugarMethods",{}),r(e,!1,!0,{extend:function(t,n,i){r(e,!1!==i,n,t)},sugarRestore:function(){return a(this,e,arguments,function(e,t,n){l(e,t,n.method)})},sugarRevert:function(){return a(this,e,arguments,function(e,t,n){n.existed?l(e,t,n.original):delete e[t]})}}))}function r(e,t,n,r){var o=t?e.prototype:e;i(e),y(r,function(i,r){var a=o[i],u=f(o,i);Pt(n)&&a&&(r=s(a,r,n)),!1===n&&a||l(o,i,r),e.SugarMethods[i]={method:r,existed:u,original:a,instance:t}})}function o(e,t,n,i,o){var a={};i=Et(i)?i.split(","):i,i.forEach(function(e,t){o(a,e,t)}),r(e,t,n,a)}function a(e,t,n,i){var r=0===n.length,o=u(n),a=!1;return y(t.SugarMethods,function(t,n){(r||-1!==o.indexOf(t))&&(a=!0,
|
|
3223
|
|
-i(n.instance?e.prototype:e,t,n))}),a}function s(e,t,n){return function(i){return n.apply(this,arguments)?t.apply(this,arguments):e.apply(this,arguments)}}function l(e,t,n){wt?ct.defineProperty(e,t,{value:n,configurable:!0,enumerable:!1,writable:!0}):e[t]=n}function u(e,t,n){var i=[];n=n||0;var r;for(r=e.length;r>n;n++)i.push(e[n]),t&&t.call(e,e[n],n);return i}function c(e,t,n){var i=e[n||0];Dt(i)&&(e=i,n=0),u(e,t,n)}function d(e){if(!e||!e.call)throw new TypeError("Callback is not callable")}function p(e){return void 0!==e}function h(e){return void 0===e}function f(e,t){return!!e&&bt.call(e,t)}function g(e){return!!e&&("object"==typeof e||xt&&It(e))}function m(e){var t=typeof e;return null==e||"string"===t||"number"===t||"boolean"===t}function v(e,t){t=t||yt.call(e);try{if(e&&e.constructor&&!f(e,"constructor")&&!f(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}return!!e&&"[object Object]"===t&&"hasOwnProperty"in e}function y(e,t){for(var n in e)if(f(e,n)&&!1===t.call(e,n,e[n],e))break}function b(e,t){for(var n=0;e>n;n++)t(n)}function w(e,t){return y(t,function(n){e[n]=t[n]}),e}function x(e){if(m(e)&&(e=ct(e)),kt&&Et(e))for(var t,n=e,i=0;t=n.charAt(i);)n[i++]=t;return e}function k(e){w(this,x(e))}function C(e,t,n){var i=Nt(10,jt(t||0));return n=n||Rt,0>t&&(i=1/i),n(e*i)/i}function S(){return" \n\f\r \u2028\u2029 \ufeff"}function _(e,t){var n="";for(e=e.toString();t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n}function T(e,t){var n,i;return n=e.replace(At,function(e){return e=Gt[e],e===Vt&&(i=!0),e}),i?parseFloat(n):parseInt(n,t||10)}function $(e,t,n,i){return i=jt(e).toString(i||10),i=_("0",t-i.replace(/\.\d+/,"").length)+i,(n||0>e)&&(i=(0>e?"-":"+")+i),i}function E(e){if(e>=11&&13>=e)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function D(e,t){function n(e,n){(e||-1<t.indexOf(n))&&(i+=n)}var i="";return t=t||"",n(e.multiline,"m"),n(e.ignoreCase,"i"),n(e.global,"g"),n(e.u,"y"),i}function M(e){return Et(e)||(e=ft(e)),e.replace(/([\\/\'*+?|()\[\]{}.^$])/g,"\\$1")}function I(e,t){return e["get"+(e._utc?"UTC":"")+t]()}function P(e,t,n){return e["set"+(e._utc&&"ISOWeek"!=t?"UTC":"")+t](n)}function A(e,t){var n,i,r,o,a,s,l,u=typeof e;if("string"===u)return e;if(r=yt.call(e),n=v(e,r),i=Dt(e,r),null!=e&&n||i){if(t||(t=[]),1<t.length)for(s=t.length;s--;)if(t[s]===e)return"CYC";for(t.push(e),n=e.valueOf()+ft(e.constructor),o=i?e:ct.keys(e).sort(),s=0,l=o.length;l>s;s++)a=i?s:o[s],n+=a+A(e[a],t);t.pop()}else n=-(1/0)===1/e?"-0":ft(e&&e.valueOf?e.valueOf():e);return u+r+n}function j(e,t){return e===t?0!==e||1/e===1/t:N(e)&&N(t)?A(e)===A(t):!1}function N(e){var t=yt.call(e);return St.test(t)||v(e,t)}function O(e,t,n){var i,r=e.length,o=t.length,a=!1!==t[o-1];return o>(a?1:2)?(i=[],u(t,function(t){return Tt(t)?!1:void i.push(L(e,r,t,a,n))}),i):L(e,r,t[0],a,n)}function L(e,t,n,i,r){return i&&(n%=t,0>n&&(n=t+n)),r?e.charAt(n):e[n]}function R(e,t){o(t,!0,!1,e,function(e,t){e[t+("equal"===t?"s":"")]=function(){return ct[t].apply(null,[this].concat(u(arguments)))}})}function F(e,t,n,i){var r=e.length,o=-1==i,a=o?r-1:0;for(n=isNaN(n)?a:parseInt(n>>0),0>n&&(n=r+n),(!o&&0>n||o&&n>=r)&&(n=a);o&&n>=0||!o&&r>n;){if(e[n]===t)return n;n+=i}return-1}function q(e,t,n,i){var r=e.length,o=0,a=p(n);if(d(t),0==r&&!a)throw new TypeError("Reduce called on empty array with no initial value");for(a||(n=e[i?r-1:o],o++);r>o;)a=i?r-o-1:o,a in e&&(n=t(n,e[a],a,e)),o++;return n}function H(e){if(0===e.length)throw new TypeError("First argument must be defined")}function U(e){return e=pt(e),function(t){return e.test(t)}}function B(e){var t=e.getTime();return function(e){return!(!e||!e.getTime)&&e.getTime()===t}}function z(e){return function(t,n,i){return t===e||e.call(this,t,n,i)}}function V(e){return function(t,n,i){return t===e||e.call(i,n,t,i)}}function W(e,t){var n={};return function(i,r,o){var a;if(!g(i))return!1;for(a in e)if(n[a]=n[a]||J(e[a],t),!1===n[a].call(o,i[a],r,o))return!1;return!0}}function G(e){return function(t){return t===e||j(t,e)}}function J(e,t){if(!m(e)){if(It(e))return U(e);if(Mt(e))return B(e);if(Pt(e))return t?V(e):z(e);if(v(e))return W(e,t)}return G(e)}function X(e,t,n,i){return t?t.apply?t.apply(n,i||[]):Pt(e[t])?e[t].call(e):e[t]:e}function Y(e,t,n,i){var r=+e.length;for(0>n&&(n=e.length+n),n=isNaN(n)?0:n,!0===i&&(r+=n);r>n;){if(i=n%e.length,!(i in e)){K(e,t,n);break}if(!1===t.call(e,e[i],i,e))break;n++}}function K(e,t,n){var i,r=[];for(i in e)i in e&&i>>>0==i&&4294967295!=i&&i>=n&&r.push(parseInt(i));r.sort().each(function(n){return t.call(e,e[n],n,e)})}function Q(e,t,n,i,r,o){var a,s,l;return 0<e.length&&(l=J(t),Y(e,function(t,n){return l.call(o,t,n,e)?(a=t,s=n,!1):void 0},n,i)),r?s:a}function Z(e,t){var n,i=[],r={};return Y(e,function(o,a){n=t?X(o,t,e,[o,a,e]):o,re(r,n)||i.push(o)}),i}function ee(e,t,n){var i=[],r={};return t.each(function(e){re(r,e)}),e.each(function(e){var t=A(e),o=!N(e);if(ie(r,t,e,o)!==n){var a=0;if(o)for(t=r[t];a<t.length;)t[a]===e?t.splice(a,1):a+=1;else delete r[t];i.push(e)}}),i}function te(e,t,n){t=t||1/0,n=n||0;var i=[];return Y(e,function(e){Dt(e)&&t>n?i=i.concat(te(e,t,n+1)):i.push(e)}),i}function ne(e){var t=[];return u(e,function(e){t=t.concat(e)}),t}function ie(e,t,n,i){var r=t in e;return i&&(e[t]||(e[t]=[]),r=-1!==e[t].indexOf(n)),r}function re(e,t){var n=A(t),i=!N(t),r=ie(e,n,t,i);return i?e[n].push(t):e[n]=t,r}function oe(e,t,n,i){var r,o,a,s=[],l="max"===n,u="min"===n,c=dt.isArray(e);for(r in e)if(e.hasOwnProperty(r)){if(n=e[r],a=X(n,t,e,c?[n,parseInt(r),e]:[]),h(a))throw new TypeError("Cannot compare with undefined");a===o?s.push(n):(h(o)||l&&a>o||u&&o>a)&&(s=[n],o=a)}return c||(s=te(s,1)),i?s:s[0]}function ae(e,t){var n,i,r,o,a=0,s=0;n=dt[Kt],i=dt[Qt];var l=dt[Zt],u=dt[Yt],c=dt[en];e=se(e,n,i),t=se(t,n,i);do n=e.charAt(a),r=l[n]||n,n=t.charAt(a),o=l[n]||n,n=r?u.indexOf(r):null,i=o?u.indexOf(o):null,-1===n||-1===i?(n=e.charCodeAt(a)||null,i=t.charCodeAt(a)||null,c&&(n>=Ht&&Ut>=n||n>=Bt&&zt>=n)&&(i>=Ht&&Ut>=i||i>=Bt&&zt>=i)&&(n=T(e.slice(a)),i=T(t.slice(a)))):(r=r!==e.charAt(a),o=o!==t.charAt(a),r!==o&&0===s&&(s=r-o)),a+=1;while(null!=n&&null!=i&&n===i);return n===i?s:n-i}function se(e,t,n){return Et(e)||(e=ft(e)),n&&(e=e.toLowerCase()),t&&(e=e.replace(t,"")),e}function le(e,t){o(ct,!1,!0,e,function(e,n){e[n]=function(e,i,r){var o,a=ct.keys(x(e));return t||(o=J(i,!0)),r=dt.prototype[n].call(a,function(n){var r=e[n];return t?X(r,i,e,[n,r,e]):o(r,n,e)},r),Dt(r)&&(r=r.reduce(function(t,n){return t[n]=e[n],t},{})),r}}),R(e,k)}function ue(e){w(this,e),this.g=fn.concat()}function ce(e,t,n){var i,r,o=t[0],a=t[1],s=t[2];return t=e[n]||e.relative,Pt(t)?t.call(e,o,a,s,n):(r=e.units[8*(e.plural&&o>1?1:0)+a]||e.units[a],e.capitalizeUnit&&(r=ve(r)),i=e.modifiers.filter(function(e){return"sign"==e.name&&e.value==(s>0?1:-1)})[0],t.replace(/\{(.*?)\}/g,function(e,t){switch(t){case"num":return o;case"unit":return r;case"sign":return i.src}}))}function de(e,t){return t=t||e.code,"en"===t||"en-US"===t?!0:e.variant}function pe(e,t){return t.replace(pt(e.num,"g"),function(t){return he(e,t)||""})}function he(e,t){var n;return $t(t)?t:t&&-1!==(n=e.numbers.indexOf(t))?(n+1)%10:1}function fe(e,t){var n;if(Et(e)||(e=""),n=yn[e]||yn[e.slice(0,2)],!1===t&&!n)throw new TypeError("Invalid locale.");return n||sn}function ge(e,t){function n(e){var t=s[e];Et(t)?s[e]=t.split(","):t||(s[e]=[])}function i(e,t){e=e.split("+").map(function(e){return e.replace(/(.+):(.+)$/,function(e,t,n){return n.split("|").map(function(e){return t+e}).join("|")})}).join("|"),e.split("|").forEach(t)}function r(e,t,n){var r=[];s[e].forEach(function(e,o){t&&(e+="+"+e.slice(0,3)),i(e,function(e,t){r[t*n+o]=e.toLowerCase()})}),s[e]=r}function o(e,t,n){return e="\\d{"+e+","+t+"}",n&&(e+="|(?:"+ye(s.numbers)+")+"),e}function a(e,t){s[e]=s[e]||t}var s,l;return s=new ue(t),n("modifiers"),"months weekdays units numbers articles tokens timeMarker ampm timeSuffixes dateParse timeParse".split(" ").forEach(n),l=!s.monthSuffix,r("months",l,12),r("weekdays",l,7),r("units",!1,8),r("numbers",!1,10),a("code",e),a("date",o(1,2,s.digitDate)),a("year","'\\d{2}|"+o(4,4)),a("num",function(){var e=["-?\\d+"].concat(s.articles);return s.numbers&&(e=e.concat(s.numbers)),ye(e)}()),function(){var e=[];s.i={},s.modifiers.push({name:"day",src:"yesterday",value:-1}),s.modifiers.push({name:"day",src:"today",value:0}),s.modifiers.push({name:"day",src:"tomorrow",value:1}),s.modifiers.forEach(function(t){var n=t.name;i(t.src,function(i){var r=s[n];s.i[i]=t,e.push({name:n,src:i,value:t.value}),s[n]=r?r+"|"+i:i})}),s.day+="|"+ye(s.weekdays),s.modifiers=e}(),s.monthSuffix&&(s.month=o(1,2),s.months="1 2 3 4 5 6 7 8 9 10 11 12".split(" ").map(function(e){return e+s.monthSuffix})),s.full_month=o(1,2)+"|"+ye(s.months),0<s.timeSuffixes.length&&s.addFormat(Le(s),!1,dn),s.addFormat("{day}",!0),s.addFormat("{month}"+(s.monthSuffix||"")),s.addFormat("{year}"+(s.yearSuffix||"")),s.timeParse.forEach(function(e){s.addFormat(e,!0)}),s.dateParse.forEach(function(e){s.addFormat(e)}),yn[e]=s}function me(e,t,n,i){e.g.unshift({r:i,locale:e,q:pt("^"+t+"$","i"),to:n})}function ve(e){return e.slice(0,1).toUpperCase()+e.slice(1)}function ye(e){return e.filter(function(e){return!!e}).join("|")}function be(){var e=ht.SugarNewDate;return e?e():new ht}function we(e,t){var n;return g(e[0])?e:$t(e[0])&&!$t(e[1])?[e[0]]:Et(e[0])&&t?[xe(e[0]),e[1]]:(n={},un.forEach(function(t,i){n[t.name]=e[i]}),[n])}function xe(e){var t,n={};return(e=e.match(/^(\d+)?\s?(\w+?)s?$/i))&&(h(t)&&(t=parseInt(e[1])||1),n[e[2].toLowerCase()]=t),n}function ke(e,t,n){var i;for(h(n)&&(n=cn.length),t=t||0;n>t&&(i=cn[t],!1!==e(i.name,i,t));t++);}function Ce(e,t){var n,i,r={};return t.forEach(function(t,o){n=e[o+1],h(n)||""===n||("year"===t&&(r.t=n.replace(/'/,"")),i=parseFloat(n.replace(/'/,"").replace(/,/,".")),r[t]=isNaN(i)?n.toLowerCase():i)}),r}function Se(e){return e=e.trim().replace(/^just (?=now)|\.+$/i,""),_e(e)}function _e(e){return e.replace(ln,function(e,t,n){var i,r,o=0,a=1;return t?e:(n.split("").reverse().forEach(function(e){e=hn[e];var t=e>9;t?(i&&(o+=a),a*=e/(r||1),r=e):(!1===i&&(a*=10),o+=a*e),i=t}),i&&(o+=a),o)})}function Te(e,t,n,i){function r(e){h.push(e)}function o(){h.forEach(function(e){e.call()})}function a(){var e=u.getWeekday();u.setWeekday(7*(m.num-1)+(e>w?w+7:w))}function s(){var e=f.i[m.edge];ke(function(e){return p(m[e])?(v=e,!1):void 0},4),"year"===v?m.e="month":("month"===v||"week"===v)&&(m.e="day"),u[(0>e.value?"endOf":"beginningOf")+ve(v)](),-2===e.value&&u.reset()}function l(){var e;ke(function(t,n,i){if("day"===t&&(t="date"),p(m[t])){if(i>=b)return u.setTime(NaN),!1;e=e||{},e[t]=m[t],delete m[t]}}),e&&r(function(){u.set(e,!0)})}var u,c,d,h,f,m,v,b,w,x,k;return u=be(),h=[],u.utc(i),Mt(e)?u.utc(e.isUTC()).setTime(e.getTime()):$t(e)?u.setTime(e):g(e)?(u.set(e,!0),m=e):Et(e)&&(d=fe(t),e=Se(e),d&&y(d.o?[d.o].concat(d.g):d.g,function(n,i){var o=e.match(i.q);return o?(f=i.locale,m=Ce(o,i.to),f.o=i,m.utc&&u.utc(),m.timestamp?(m=m.timestamp,!1):(i.r&&!Et(m.month)&&(Et(m.date)||de(d,t))&&(k=m.month,m.month=m.date,m.date=k),m.year&&2===m.t.length&&(m.year=100*Rt(I(be(),"FullYear")/100)-100*Rt(m.year/100)+m.year),m.month&&(m.month=f.getMonth(m.month),m.shift&&!m.unit&&(m.unit=f.units[7])),m.weekday&&m.date?delete m.weekday:m.weekday&&(m.weekday=f.getWeekday(m.weekday),m.shift&&!m.unit&&(m.unit=f.units[5])),m.day&&(k=f.i[m.day])?(m.day=k.value,u.reset(),c=!0):m.day&&-1<(w=f.getWeekday(m.day))&&(delete m.day,m.num&&m.month?(r(a),m.day=1):m.weekday=w),m.date&&!$t(m.date)&&(m.date=pe(f,m.date)),m.ampm&&m.ampm===f.ampm[1]&&12>m.hour?m.hour+=12:m.ampm===f.ampm[0]&&12===m.hour&&(m.hour=0),("offset_hours"in m||"offset_minutes"in m)&&(u.utc(),m.offset_minutes=m.offset_minutes||0,m.offset_minutes+=60*m.offset_hours,"-"===m.offset_sign&&(m.offset_minutes*=-1),m.minute-=m.offset_minutes),m.unit&&(c=!0,x=he(f,m.num),b=f.units.indexOf(m.unit)%8,v=an.units[b],l(),m.shift&&(x*=(k=f.i[m.shift])?k.value:0),m.sign&&(k=f.i[m.sign])&&(x*=k.value),p(m.weekday)&&(u.set({weekday:m.weekday},!0),delete m.weekday),m[v]=(m[v]||0)+x),m.edge&&r(s),"-"===m.year_sign&&(m.year*=-1),ke(function(e,t,n){t=m[e];var i=t%1;i&&(m[cn[n-1].name]=Rt(i*("second"===e?1e3:60)),m[e]=Lt(t))},1,4),!1)):void 0}),m?c?u.advance(m):(u._utc&&u.reset(),Oe(u,m,!0,!1,n)):("now"!==e&&(u=new ht(e)),i&&u.addMinutes(-u.getTimezoneOffset())),o(),u.utc(!1)),{c:u,set:m}}function $e(e){var t,n=jt(e),i=n,r=0;return ke(function(e,o,a){t=Lt(C(n/o.b(),1)),t>=1&&(i=t,r=a)},1),[i,r,e]}function Ee(e){var t=$e(e.millisecondsFromNow());return(6===t[1]||5===t[1]&&4===t[0]&&e.daysFromNow()>=be().daysInMonth())&&(t[0]=jt(e.monthsFromNow()),t[1]=6),t}function De(e,t,n){function i(e,n){var i=I(e,"Month");return fe(n).months[i+12*t]}Me(e,i,n),Me(ve(e),i,n,1)}function Me(e,t,n,i){mn[e]=function(e,r){var o=t(e,r);return n&&(o=o.slice(0,n)),i&&(o=o.slice(0,i).toUpperCase()+o.slice(i)),o}}function Ie(e,t,n){mn[e]=t,mn[e+e]=function(e,n){return $(t(e,n),2)},n&&(mn[e+e+e]=function(e,n){return $(t(e,n),3)},mn[e+e+e+e]=function(e,n){return $(t(e,n),4)})}function Pe(e){var t=e.match(/(\{\w+\})|[^{}]+/g);gn[e]=t.map(function(e){return e.replace(/\{(\w+)\}/,function(t,n){return e=mn[n]||n,n}),e})}function Ae(e,t,n,i){var r;if(!e.isValid())return"Invalid Date";if(Date[t]?t=Date[t]:Pt(t)&&(r=Ee(e),t=t.apply(e,r.concat(fe(i)))),!t&&n)return r=r||Ee(e),0===r[1]&&(r[1]=1,r[0]=1),e=fe(i),ce(e,r,0<r[2]?"future":"past");t=t||"long",("short"===t||"long"===t||"full"===t)&&(t=fe(i)[t]),gn[t]||Pe(t);var o,a;for(r="",t=gn[t],o=0,n=t.length;n>o;o++)a=t[o],r+=Pt(a)?a(e,i):a;return r}function je(e,t,n,i,r){var o,a,s,l=0,u=0,c=0;return o=Te(t,n,null,r),i>0&&(u=c=i,a=!0),o.c.isValid()?(o.set&&o.set.e&&(vn.forEach(function(t){t.name===o.set.e&&(l=t.b(o.c,e-o.c)-1)}),t=ve(o.set.e),(o.set.edge||o.set.shift)&&o.c["beginningOf"+t](),"month"===o.set.e&&(s=o.c.clone()["endOf"+t]().getTime()),!a&&o.set.sign&&"millisecond"!=o.set.e&&(u=50,c=-50)),a=e.getTime(),t=o.c.getTime(),s=Ne(e,t,s||t+l),a>=t-u&&s+c>=a):!1}function Ne(e,t,n){return t=new ht(t),e=new ht(n).utc(e.isUTC()),23!==I(e,"Hours")&&(t=t.getTimezoneOffset(),e=e.getTimezoneOffset(),t!==e&&(n+=(e-t).minutes())),n}function Oe(e,t,n,i,r){function o(e){return p(t[e])?t[e]:t[e+"s"]}function a(e){return p(o(e))}var s;if($t(t)&&i)t={milliseconds:t};else if($t(t))return e.setTime(t),e;p(t.date)&&(t.day=t.date),ke(function(i,r,o){var l="day"===i;return a(i)||l&&a("weekday")?(t.e=i,s=+o,!1):void(!n||"week"===i||l&&a("week")||P(e,r.method,l?1:0))}),vn.forEach(function(n){var r=n.name;n=n.method;var s;s=o(r),h(s)||(i?("week"===r&&(s=(t.day||0)+7*s,n="Date"),s=s*i+I(e,n)):"month"===r&&a("day")&&P(e,"Date",15),P(e,n,s),i&&"month"===r&&(r=s,0>r&&(r=r%12+12),r%12!=I(e,"Month")&&P(e,"Date",0)))}),i||a("day")||!a("weekday")||e.setWeekday(o("weekday"));var l;e:{switch(r){case-1:l=e>be();break e;case 1:l=e<be();break e}l=void 0}return l&&ke(function(t,n){return(n.k||"week"===t&&a("weekday"))&&!(a(t)||"day"===t&&a("weekday"))?(e[n.j](r),!1):void 0},s+1),e}function Le(e,t){var n,i=pn,r={h:0,m:1,s:2};return e=e||an,i.replace(/{([a-z])}/g,function(i,o){var a=[],s="h"===o,l=s&&!t;return"t"===o?e.ampm.join("|"):(s&&a.push(":"),(n=e.timeSuffixes[r[o]])&&a.push(n+"\\s*"),0===a.length?"":"(?:"+a.join("|")+")"+(l?"":"?"))})}function Re(e,t,n){var i,r;return $t(e[1])?i=we(e)[0]:(i=e[0],r=e[1]),Te(i,r,t,n).c}function Fe(e,t){function n(){return Rt(this*t)}function i(){return Re(arguments)[e.j](this)}function r(){return Re(arguments)[e.j](-this)}var o=e.name,a={};a[o]=n,a[o+"s"]=n,a[o+"Before"]=r,a[o+"sBefore"]=r,a[o+"Ago"]=r,a[o+"sAgo"]=r,a[o+"After"]=i,a[o+"sAfter"]=i,a[o+"FromNow"]=i,a[o+"sFromNow"]=i,gt.extend(a)}function qe(e,t,n,i,r){1/0!==t&&(e.timers||(e.timers=[]),$t(t)||(t=1),e.n=!1,e.timers.push(setTimeout(function(){e.n||n.apply(i,r||[])},t)))}function He(e,t,n,i,r,o){var a=e.toFixed(20),s=a.search(/\./),a=a.search(/[1-9]/),s=s-a;return s>0&&(s-=1),r=qt(Ft(Lt(s/3),!1===r?n.length:r),-i),i=n.charAt(r+i-1),-9>s&&(r=-3,t=jt(s)-9,i=n.slice(0,1)),n=o?Nt(2,10*r):Nt(10,3*r),C(e/n,t||0).format()+i.trim()}function Ue(e,t,n,i){var r,o,a;(o=t.match(/^(.+?)(\[.*\])$/))?(a=o[1],t=o[2].replace(/^\[|\]$/g,"").split("]["),t.forEach(function(t){r=!t||t.match(/^\d+$/),!a&&Dt(e)&&(a=e.length),f(e,a)||(e[a]=r?[]:{}),e=e[a],a=t}),!a&&r&&(a=e.length.toString()),Ue(e,a,n,i)):e[t]=i&&"true"===n?!0:i&&"false"===n?!1:n}function Be(e,t){var n;return Dt(t)||g(t)&&t.toString===yt?(n=[],y(t,function(t,i){e&&(t=e+"["+t+"]"),n.push(Be(t,i))}),n.join("&")):e?ze(e)+"="+(Mt(t)?t.getTime():ze(t)):""}function ze(e){return e||!1===e||0===e?encodeURIComponent(e).replace(/%20/g,"+"):""}function Ve(e,t,n){var i,r=e instanceof k?new k:{};return y(e,function(e,o){i=!1,c(t,function(t){(It(t)?t.test(e):g(t)?t[e]===o:e===ft(t))&&(i=!0)},1),i===n&&(r[e]=o)}),r}function We(e,t){this.start=Ge(e),this.end=Ge(t)}function Ge(e){return Mt(e)?new ht(e.getTime()):null==e?e:Mt(e)?e.getTime():e.valueOf()}function Je(e){return e=null==e?e:Mt(e)?e.getTime():e.valueOf(),!!e||0===e}function Xe(e,t){var n,i,r,o;return $t(t)?new ht(e.getTime()+t):(n=t[0],i=t[1],r=I(e,i),o=new ht(e.getTime()),P(o,i,r+n),o)}function Ye(e,t){return ft.fromCharCode(e.charCodeAt(0)+t)}function Ke(e,t){return e+t}function Qe(e){if(e=+e,0>e||1/0===e)throw new RangeError("Invalid number");return e}function Ze(e,t){return _(p(t)?t:" ",e)}function et(e,t,n,i,r){var o;if(e.length<=t)return e.toString();switch(i=h(i)?"...":i,n){case"left":return e=r?tt(e,t,!0):e.slice(e.length-t),i+e;case"middle":return n=Ot(t/2),o=Lt(t/2),t=r?tt(e,n):e.slice(0,n),e=r?tt(e,o,!0):e.slice(e.length-o),t+i+e;default:return t=r?tt(e,t):e.slice(0,t),t+i}}function tt(e,t,n){if(n)return tt(e.reverse(),t).reverse();n=pt("(?=["+S()+"])");var i=0;return e.split(n).filter(function(e){return i+=e.length,t>=i}).join("")}function nt(e,t,n){return Et(t)&&(t=e.indexOf(t),-1===t&&(t=n?e.length:0)),t}function it(e){var t=$n;e=t.indexOf(e),e>-1&&t.splice(e,1)}function rt(e,t,n){Et(t)&&it(t),it(n),e.unshift({l:t,p:n})}function ot(e,t){return e==t||"all"==e||!e}function at(e){return $n.some(function(t){return new pt("\\b"+t+"$","i").test(e)})}function st(e,t){return e=Et(e)?e.toString():"",e.isBlank()||at(e)?e:lt(e,t?_n:Tn)}function lt(e,t){return y(t,function(t,n){return e.match(n.l)?(e=e.replace(n.l,n.p),!1):void 0}),e}function ut(e){return e.replace(/^\W*[a-z]/,function(e){return e.toUpperCase()})}var ct=Object,dt=Array,pt=RegExp,ht=Date,ft=String,gt=Number,mt=Math,vt="undefined"!=typeof global?global:this,yt=ct.prototype.toString,bt=ct.prototype.hasOwnProperty,wt=ct.defineProperty&&ct.defineProperties,xt="function"==typeof pt(),kt=!("0"in new ft("a")),Ct={},St=/^\[object Date|Array|String|Number|RegExp|Boolean|Arguments\]$/,_t="Boolean Number String Array Date RegExp Function".split(" "),Tt=n("boolean",_t[0]),$t=n("number",_t[1]),Et=n("string",_t[2]),Dt=t(_t[3]),Mt=t(_t[4]),It=t(_t[5]),Pt=t(_t[6]);k.prototype.constructor=ct;var At,jt=mt.abs,Nt=mt.pow,Ot=mt.ceil,Lt=mt.floor,Rt=mt.round,Ft=mt.min,qt=mt.max,Ht=48,Ut=57,Bt=65296,zt=65305,Vt=".",Wt="",Gt={};i(ct),y(_t,function(e,t){i(vt[t])});var Jt,Xt;for(Xt=0;9>=Xt;Xt++)Jt=ft.fromCharCode(Xt+Bt),Wt+=Jt,Gt[Jt]=ft.fromCharCode(Xt+Ht);Gt[","]="",Gt["."]=Vt,Gt[Vt]=Vt,At=pt("["+Wt+".,"+Vt+"]","g"),r(ct,!1,!1,{keys:function(e){var t=[];if(!g(e)&&!It(e)&&!Pt(e))throw new TypeError("Object required");return y(e,function(e){t.push(e)}),t}}),r(dt,!1,!1,{isArray:function(e){return Dt(e)}}),r(dt,!0,!1,{every:function(e,t){var n=this.length,i=0;for(H(arguments);n>i;){if(i in this&&!e.call(t,this[i],i,this))return!1;i++}return!0},some:function(e,t){var n=this.length,i=0;for(H(arguments);n>i;){if(i in this&&e.call(t,this[i],i,this))return!0;i++}return!1},map:function(e,t){t=arguments[1];var n=this.length,i=0,r=Array(n);for(H(arguments);n>i;)i in this&&(r[i]=e.call(t,this[i],i,this)),i++;return r},filter:function(e){var t=arguments[1],n=this.length,i=0,r=[];for(H(arguments);n>i;)i in this&&e.call(t,this[i],i,this)&&r.push(this[i]),i++;return r},indexOf:function(e,t){return Et(this)?this.indexOf(e,t):F(this,e,t,1)},lastIndexOf:function(e,t){return Et(this)?this.lastIndexOf(e,t):F(this,e,t,-1)},forEach:function(e,t){var n=this.length,i=0;for(d(e);n>i;)i in this&&e.call(t,this[i],i,this),i++},reduce:function(e,t){return q(this,e,t)},reduceRight:function(e,t){return q(this,e,t,!0)}}),r(Function,!0,!1,{bind:function(e){var t,n=this,i=u(arguments,null,1);if(!Pt(this))throw new TypeError("Function.prototype.bind called on a non-function");return t=function(){return n.apply(n.prototype&&this instanceof n?this:e,i.concat(u(arguments)))},t.prototype=this.prototype,t}}),r(ht,!1,!1,{now:function(){return(new ht).getTime()}}),function(){var e=S().match(/^\s+$/);try{ft.prototype.trim.call([1])}catch(t){e=!1}r(ft,!0,!e,{trim:function(){return this.toString().trimLeft().trimRight()},trimLeft:function(){return this.replace(pt("^["+S()+"]+"),"")},trimRight:function(){return this.replace(pt("["+S()+"]+$"),"")}})}(),function(){var e=new ht(ht.UTC(1999,11,31)),e=e.toISOString&&"1999-12-31T00:00:00.000Z"===e.toISOString();o(ht,!0,!e,"toISOString,toJSON",function(e,t){e[t]=function(){return $(this.getUTCFullYear(),4)+"-"+$(this.getUTCMonth()+1,2)+"-"+$(this.getUTCDate(),2)+"T"+$(this.getUTCHours(),2)+":"+$(this.getUTCMinutes(),2)+":"+$(this.getUTCSeconds(),2)+"."+$(this.getUTCMilliseconds(),3)+"Z"}})}();var Yt="AlphanumericSortOrder",Kt="AlphanumericSortIgnore",Qt="AlphanumericSortIgnoreCase",Zt="AlphanumericSortEquivalents",en="AlphanumericSortNatural";r(dt,!1,!0,{create:function(){var e=[];return u(arguments,function(t){(!m(t)&&"length"in t&&("[object Arguments]"===yt.call(t)||t.callee)||!m(t)&&"length"in t&&!Et(t)&&!v(t))&&(t=dt.prototype.slice.call(t,0)),e=e.concat(t)}),e}}),r(dt,!0,!1,{find:function(e,t){return d(e),Q(this,e,0,!1,!1,t)},findIndex:function(e,t){var n;return d(e),n=Q(this,e,0,!1,!0,t),h(n)?-1:n}}),r(dt,!0,!0,{findFrom:function(e,t,n){return Q(this,e,t,n)},findIndexFrom:function(e,t,n){return t=Q(this,e,t,n,!0),h(t)?-1:t},findAll:function(e,t,n){var i,r=[];return 0<this.length&&(i=J(e),Y(this,function(e,t,n){i(e,t,n)&&r.push(e)},t,n)),r},count:function(e){return h(e)?this.length:this.findAll(e).length},removeAt:function(e,t){return h(e)?this:(h(t)&&(t=e),this.splice(e,t-e+1),this)},include:function(e,t){return this.clone().add(e,t)},exclude:function(){return dt.prototype.remove.apply(this.clone(),arguments)},clone:function(){return w([],this)},unique:function(e){return Z(this,e)},flatten:function(e){return te(this,e)},union:function(){return Z(this.concat(ne(arguments)))},intersect:function(){return ee(this,ne(arguments),!1)},subtract:function(e){return ee(this,ne(arguments),!0)},at:function(){return O(this,arguments)},first:function(e){return h(e)?this[0]:(0>e&&(e=0),this.slice(0,e))},last:function(e){return h(e)?this[this.length-1]:this.slice(0>this.length-e?0:this.length-e)},from:function(e){return this.slice(e)},to:function(e){return h(e)&&(e=this.length),this.slice(0,e)},min:function(e,t){return oe(this,e,"min",t)},max:function(e,t){return oe(this,e,"max",t)},least:function(e,t){return oe(this.groupBy.apply(this,[e]),"length","min",t)},most:function(e,t){return oe(this.groupBy.apply(this,[e]),"length","max",t)},sum:function(e){return e=e?this.map(e):this,0<e.length?e.reduce(function(e,t){return e+t}):0},average:function(e){return e=e?this.map(e):this,0<e.length?e.sum()/e.length:0},inGroups:function(e,t){var n=1<arguments.length,i=this,r=[],o=Ot(this.length/e);return b(e,function(e){e*=o;var a=i.slice(e,e+o);n&&a.length<o&&b(o-a.length,function(){a=a.add(t)}),r.push(a)}),r},inGroupsOf:function(e,t){var n,i=[],r=this.length,o=this;return 0===r||0===e?o:(h(e)&&(e=1),h(t)&&(t=null),b(Ot(r/e),function(r){for(n=o.slice(e*r,e*r+e);n.length<e;)n.push(t);i.push(n)}),i)},isEmpty:function(){return 0==this.compact().length},sortBy:function(e,t){var n=this.clone();return n.sort(function(i,r){var o,a;return o=X(i,e,n,[i]),a=X(r,e,n,[r]),(Et(o)&&Et(a)?ae(o,a):a>o?-1:o>a?1:0)*(t?-1:1)}),n},randomize:function(){for(var e,t,n=this.concat(),i=n.length;i;)e=mt.random()*i|0,t=n[--i],n[i]=n[e],n[e]=t;return n},zip:function(){var e=u(arguments);return this.map(function(t,n){return[t].concat(e.map(function(e){return n in e?e[n]:null}))})},sample:function(e){var t=this.randomize();return 0<arguments.length?t.slice(0,e):t[0]},each:function(e,t,n){return Y(this,e,t,n),this},add:function(e,t){return(!$t(gt(t))||isNaN(t))&&(t=this.length),dt.prototype.splice.apply(this,[t,0].concat(e)),this},remove:function(){var e=this;return u(arguments,function(t){var n=0;for(t=J(t);n<e.length;)t(e[n],n,e)?e.splice(n,1):n++}),e},compact:function(e){var t=[];return Y(this,function(n){Dt(n)?t.push(n.compact()):e&&n?t.push(n):e||null==n||n.valueOf()!==n.valueOf()||t.push(n)}),t},groupBy:function(e,t){var n,i=this,r={};return Y(i,function(t,o){n=X(t,e,i,[t,o,i]),r[n]||(r[n]=[]),r[n].push(t)}),t&&y(r,t),r},none:function(){return!this.any.apply(this,arguments)}}),r(dt,!0,!0,{all:dt.prototype.every,any:dt.prototype.some,insert:dt.prototype.add}),r(ct,!1,!0,{map:function(e,t){var n,i,r={};for(n in e)f(e,n)&&(i=e[n],r[n]=X(i,t,e,[n,i,e]));return r},reduce:function(e){var t=ct.keys(x(e)).map(function(t){return e[t]});return t.reduce.apply(t,u(arguments,null,1))},each:function(e,t){return d(t),y(e,t),e},size:function(e){return ct.keys(x(e)).length}});var tn="any all none count find findAll isEmpty".split(" "),nn="sum average min max least most".split(" "),rn=["map","reduce","size"],on=tn.concat(nn).concat(rn);!function(){function e(){var e=arguments;return 0<e.length&&!Pt(e[0])}var t=dt.prototype.map;o(dt,!0,e,"every,all,some,filter,any,none,find,findIndex",function(e,t){var n=dt.prototype[t];e[t]=function(e){var t=J(e);return n.call(this,function(e,n){return t(e,n,this)})}}),r(dt,!0,e,{map:function(e){return t.call(this,function(t,n){return X(t,e,this,[t,n,this])})}})}(),function(){dt[Yt]="AÁÀÂÃĄBCĆČÇDĎÐEÉÈĚÊËĘFGĞHıIÍÌİÎÏJKLŁMNŃŇÑOÓÒÔPQRŘSŚŠŞTŤUÚÙŮÛÜVWXYÝZŹŻŽÞÆŒØÕÅÄÖ".split("").map(function(e){return e+e.toLowerCase()}).join("");var e={};Y("AÁÀÂÃÄ CÇ EÉÈÊË IÍÌİÎÏ OÓÒÔÕÖ Sß UÚÙÛÜ".split(" "),function(t){var n=t.charAt(0);Y(t.slice(1).split(""),function(t){e[t]=n,e[t.toLowerCase()]=n.toLowerCase()})}),dt[en]=!0,dt[Qt]=!0,dt[Zt]=e}(),le(tn),le(nn,!0),R(rn,k),dt.AlphanumericSort=ae;var an,sn,ln,un,cn,dn="ampm hour minute second ampm utc offset_sign offset_hours offset_minutes ampm".split(" "),pn="({t})?\\s*(\\d{1,2}(?:[,.]\\d+)?)(?:{h}([0-5]\\d(?:[,.]\\d+)?)?{m}(?::?([0-5]\\d(?:[,.]\\d+)?){s})?\\s*(?:({t})|(Z)|(?:([+-])(\\d{2,2})(?::?(\\d{2,2}))?)?)?|\\s*({t}))",hn={},fn=[],gn={},mn={yyyy:function(e){return I(e,"FullYear")},yy:function(e){return I(e,"FullYear")%100},ord:function(e){return e=I(e,"Date"),e+E(e)},tz:function(e){return e.getUTCOffset()},isotz:function(e){return e.getUTCOffset(!0)},Z:function(e){return e.getUTCOffset()},ZZ:function(e){return e.getUTCOffset().replace(/(\d{2})$/,":$1")}},vn=[{name:"year",method:"FullYear",k:!0,b:function(e){return 864e5*(365+(e?e.isLeapYear()?1:0:.25))}},{name:"month",error:.919,method:"Month",k:!0,b:function(e,t){var n,i=30.4375;return e&&(n=e.daysInMonth(),t<=n.days()&&(i=n)),864e5*i}},{name:"week",method:"ISOWeek",b:e(6048e5)},{name:"day",error:.958,method:"Date",k:!0,b:e(864e5)},{name:"hour",method:"Hours",b:e(36e5)},{name:"minute",method:"Minutes",b:e(6e4)},{name:"second",method:"Seconds",b:e(1e3)},{name:"millisecond",method:"Milliseconds",b:e(1)}],yn={};ue.prototype={getMonth:function(e){return $t(e)?e-1:this.months.indexOf(e)%12},getWeekday:function(e){return this.weekdays.indexOf(e)%7},addFormat:function(e,t,n,i,r){var o,a=n||[],s=this;e=e.replace(/\s+/g,"[,. ]*"),e=e.replace(/\{([^,]+?)\}/g,function(e,t){var i,r,o,l=t.match(/\?$/);o=t.match(/^(\d+)\??$/);var u=t.match(/(\d)(?:-(\d))?/),c=t.replace(/[^a-z]+$/,"");return o?i=s.tokens[o[1]]:s[c]?i=s[c]:s[c+"s"]&&(i=s[c+"s"],u&&(r=[],i.forEach(function(e,t){var n=t%(s.units?8:i.length);n>=u[1]&&n<=(u[2]||u[1])&&r.push(e)}),i=r),i=ye(i)),o?o="(?:"+i+")":(n||a.push(c),o="("+i+")"),l&&(o+="?"),o}),t?(t=Le(s,r),r=["t","[\\s\\u3000]"].concat(s.timeMarker),o=e.match(/\\d\{\d,\d\}\)+\??$/),me(s,"(?:"+t+")[,\\s\\u3000]+?"+e,dn.concat(a),i),me(s,e+"(?:[,\\s]*(?:"+r.join("|")+(o?"+":"*")+")"+t+")?",a.concat(dn),i)):me(s,e,a,i)}},r(ht,!1,!0,{create:function(){return Re(arguments)},past:function(){return Re(arguments,-1)},future:function(){return Re(arguments,1)},addLocale:function(e,t){return ge(e,t)},setLocale:function(e){var t=fe(e,!1);return sn=t,e&&e!=t.code&&(t.code=e),t},getLocale:function(e){return e?fe(e,!1):sn},addFormat:function(e,t,n){me(fe(n),e,t)}}),r(ht,!0,!0,{set:function(){var e=we(arguments);return Oe(this,e[0],e[1])},setWeekday:function(e){return h(e)?void 0:P(this,"Date",I(this,"Date")+e-I(this,"Day"))},setISOWeek:function(e){var t=I(this,"Day")||7;return h(e)?void 0:(this.set({month:0,date:4}),this.set({weekday:1}),e>1&&this.addWeeks(e-1),1!==t&&this.advance({days:t-1}),this.getTime())},getISOWeek:function(){var e;e=this.clone();var t=I(e,"Day")||7;return e.addDays(4-t).reset(),1+Lt(e.daysSince(e.clone().beginningOfYear())/7)},beginningOfISOWeek:function(){var e=this.getDay();return 0===e?e=-6:1!==e&&(e=1),this.setWeekday(e),this.reset()},endOfISOWeek:function(){return 0!==this.getDay()&&this.setWeekday(7),this.endOfDay()},getUTCOffset:function(e){var t=this._utc?0:this.getTimezoneOffset(),n=!0===e?":":"";return!t&&e?"Z":$(Lt(-t/60),2,!0)+n+$(jt(t%60),2)},utc:function(e){return l(this,"_utc",!0===e||0===arguments.length),this},isUTC:function(){return!!this._utc||0===this.getTimezoneOffset()},advance:function(){var e=we(arguments,!0);return Oe(this,e[0],e[1],1)},rewind:function(){var e=we(arguments,!0);return Oe(this,e[0],e[1],-1)},isValid:function(){return!isNaN(this.getTime())},isAfter:function(e,t){return this.getTime()>ht.create(e).getTime()-(t||0)},isBefore:function(e,t){return this.getTime()<ht.create(e).getTime()+(t||0)},isBetween:function(e,t,n){var i=this.getTime();e=ht.create(e).getTime();var r=ht.create(t).getTime();return t=Ft(e,r),e=qt(e,r),n=n||0,i>t-n&&e+n>i},isLeapYear:function(){var e=I(this,"FullYear");return 0===e%4&&0!==e%100||0===e%400},daysInMonth:function(){return 32-I(new ht(I(this,"FullYear"),I(this,"Month"),32),"Date")},format:function(e,t){return Ae(this,e,!1,t)},relative:function(e,t){return Et(e)&&(t=e,e=null),Ae(this,e,!0,t)},is:function(e,t,n){var i,r;if(this.isValid()){if(Et(e))switch(e=e.trim().toLowerCase(),r=this.clone().utc(n),!0){case"future"===e:return this.getTime()>be().getTime();case"past"===e:return this.getTime()<be().getTime();case"weekday"===e:return 0<I(r,"Day")&&6>I(r,"Day");case"weekend"===e:return 0===I(r,"Day")||6===I(r,"Day");case-1<(i=an.weekdays.indexOf(e)%7):return I(r,"Day")===i;case-1<(i=an.months.indexOf(e)%12):return I(r,"Month")===i}return je(this,e,null,t,n)}},reset:function(e){var t,n={};return e=e||"hours","date"===e&&(e="days"),t=vn.some(function(t){return e===t.name||e===t.name+"s"}),n[e]=e.match(/^days?/)?1:0,t?this.set(n,!0):this},clone:function(){var e=new ht(this.getTime());return e.utc(!!this._utc),e}}),r(ht,!0,!0,{iso:function(){return this.toISOString()},getWeekday:ht.prototype.getDay,getUTCWeekday:ht.prototype.getUTCDay}),r(gt,!0,!0,{duration:function(e){return e=fe(e),ce(e,$e(this),"duration")}}),an=sn=ht.addLocale("en",{plural:!0,timeMarker:"at",ampm:"am,pm",months:"January,February,March,April,May,June,July,August,September,October,November,December",weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",units:"millisecond:|s,second:|s,minute:|s,hour:|s,day:|s,week:|s,month:|s,year:|s",numbers:"one,two,three,four,five,six,seven,eight,nine,ten",articles:"a,an,the",tokens:"the,st|nd|rd|th,of","short":"{Month} {d}, {yyyy}","long":"{Month} {d}, {yyyy} {h}:{mm}{tt}",full:"{Weekday} {Month} {d}, {yyyy} {h}:{mm}:{ss}{tt}",past:"{num} {unit} {sign}",future:"{num} {unit} {sign}",duration:"{num} {unit}",modifiers:[{name:"sign",src:"ago|before",
|
|
3224
|
|
-value:-1},{name:"sign",src:"from now|after|from|in|later",value:1},{name:"edge",src:"last day",value:-2},{name:"edge",src:"end",value:-1},{name:"edge",src:"first day|beginning",value:1},{name:"shift",src:"last",value:-1},{name:"shift",src:"the|this",value:0},{name:"shift",src:"next",value:1}],dateParse:["{month} {year}","{shift} {unit=5-7}","{0?} {date}{1}","{0?} {edge} of {shift?} {unit=4-7?}{month?}{year?}"],timeParse:"{num} {unit} {sign};{sign} {num} {unit};{0} {num}{1} {day} of {month} {year?};{weekday?} {month} {date}{1?} {year?};{date} {month} {year};{date} {month};{shift} {weekday};{shift} week {weekday};{weekday} {2?} {shift} week;{num} {unit=4-5} {sign} {day};{0?} {date}{1} of {month};{0?}{month?} {date?}{1?} of {shift} {unit=6-7}".split(";")}),cn=vn.concat().reverse(),un=vn.concat(),un.splice(2,1),o(ht,!0,!0,vn,function(e,t,n){function i(e){e/=l;var n=e%1,i=t.error||.999;return n&&jt(n%1)>i&&(e=Rt(e)),0>e?Ot(e):Lt(e)}var r,o,a=t.name,s=ve(a),l=t.b();t.j="add"+s+"s",r=function(e,t){return i(this.getTime()-ht.create(e,t).getTime())},o=function(e,t){return i(ht.create(e,t).getTime()-this.getTime())},e[a+"sAgo"]=o,e[a+"sUntil"]=o,e[a+"sSince"]=r,e[a+"sFromNow"]=r,e[t.j]=function(e,t){var n={};return n[a]=e,this.advance(n,t)},Fe(t,l),3>n&&["Last","This","Next"].forEach(function(t){e["is"+t+s]=function(){return je(this,t+" "+a,"en")}}),4>n&&(e["beginningOf"+s]=function(){var e={};switch(a){case"year":e.year=I(this,"FullYear");break;case"month":e.month=I(this,"Month");break;case"day":e.day=I(this,"Date");break;case"week":e.weekday=0}return this.set(e,!0)},e["endOf"+s]=function(){var e={hours:23,minutes:59,seconds:59,milliseconds:999};switch(a){case"year":e.month=11,e.day=31;break;case"month":e.day=this.daysInMonth();break;case"week":e.weekday=6}return this.set(e,!0)})}),an.addFormat("([+-])?(\\d{4,4})[-.]?{full_month}[-.]?(\\d{1,2})?",!0,["year_sign","year","month","date"],!1,!0),an.addFormat("(\\d{1,2})[-.\\/]{full_month}(?:[-.\\/](\\d{2,4}))?",!0,["date","month","year"],!0),an.addFormat("{full_month}[-.](\\d{4,4})",!1,["month","year"]),an.addFormat("\\/Date\\((\\d+(?:[+-]\\d{4,4})?)\\)\\/",!1,["timestamp"]),an.addFormat(Le(an),!1,dn),fn=an.g.slice(0,7).reverse(),an.g=an.g.slice(7).concat(fn),Ie("f",function(e){return I(e,"Milliseconds")},!0),Ie("s",function(e){return I(e,"Seconds")}),Ie("m",function(e){return I(e,"Minutes")}),Ie("h",function(e){return I(e,"Hours")%12||12}),Ie("H",function(e){return I(e,"Hours")}),Ie("d",function(e){return I(e,"Date")}),Ie("M",function(e){return I(e,"Month")+1}),function(){function e(e,t){var n=I(e,"Hours");return fe(t).ampm[Lt(n/12)]||""}Me("t",e,1),Me("tt",e),Me("T",e,1,1),Me("TT",e,null,2)}(),function(){function e(e,t){var n=I(e,"Day");return fe(t).weekdays[n]}Me("dow",e,3),Me("Dow",e,3,1),Me("weekday",e),Me("Weekday",e,null,1)}(),De("mon",0,3),De("month",0),De("month2",1),De("month3",2),mn.ms=mn.f,mn.milliseconds=mn.f,mn.seconds=mn.s,mn.minutes=mn.m,mn.hours=mn.h,mn["24hr"]=mn.H,mn["12hr"]=mn.h,mn.date=mn.d,mn.day=mn.d,mn.year=mn.yyyy,o(ht,!0,!0,"short,long,full",function(e,t){e[t]=function(e){return Ae(this,t,!1,e)}}),"〇一二三四五六七八九十百千万".split("").forEach(function(e,t){t>9&&(t=Nt(10,t-9)),hn[e]=t}),w(hn,Gt),ln=pt("([期週周])?([〇一二三四五六七八九十百千万"+Wt+"]+)(?!昨)","g"),function(){var e=an.weekdays.slice(0,7),t=an.months.slice(0,12);o(ht,!0,!0,"today yesterday tomorrow weekday weekend future past".split(" ").concat(e).concat(t),function(e,t){e["is"+ve(t)]=function(e){return this.is(t,0,e)}})}(),ht.utc||(ht.utc={create:function(){return Re(arguments,0,!0)},past:function(){return Re(arguments,-1,!0)},future:function(){return Re(arguments,1,!0)}}),r(ht,!1,!0,{RFC1123:"{Dow}, {dd} {Mon} {yyyy} {HH}:{mm}:{ss} {tz}",RFC1036:"{Weekday}, {dd}-{Mon}-{yy} {HH}:{mm}:{ss} {tz}",ISO8601_DATE:"{yyyy}-{MM}-{dd}",ISO8601_DATETIME:"{yyyy}-{MM}-{dd}T{HH}:{mm}:{ss}.{fff}{isotz}"}),r(Function,!0,!0,{lazy:function(e,t,n){function i(){return u.length<n-(c&&t?1:0)&&u.push([this,arguments]),c||(c=!0,t?r():qe(i,o,r)),s}var r,o,a,s,l=this,u=[],c=!1;return e=e||1,n=n||1/0,o=Ot(e),a=Rt(o/e)||1,r=function(){var e,t=u.length;if(0!=t){for(e=qt(t-a,0);t>e;)s=Function.prototype.apply.apply(l,u.shift()),t--;qe(i,o,function(){c=!1,r()})}},i},throttle:function(e){return this.lazy(e,!0,1)},debounce:function(e){function t(){t.cancel(),qe(t,e,n,this,arguments)}var n=this;return t},delay:function(e){var t=u(arguments,null,1);return qe(this,e,this,this,t),this},every:function(e){function t(){n.apply(n,i),qe(n,e,t)}var n=this,i=arguments,i=1<i.length?u(i,null,1):[];return qe(n,e,t),n},cancel:function(){var e,t=this.timers;if(Dt(t))for(;e=t.shift();)clearTimeout(e);return this.n=!0,this},after:function(e){var t=this,n=0,i=[];if($t(e)){if(0===e)return t.call(),t}else e=1;return function(){var r;return i.push(u(arguments)),n++,n==e?(r=t.call(this,i),n=0,i=[],r):void 0}},once:function(){return this.throttle(1/0,!0)},fill:function(){var e=this,t=u(arguments);return function(){var n=u(arguments);return t.forEach(function(e,t){(null!=e||t>=n.length)&&n.splice(t,0,e)}),e.apply(this,n)}}}),r(gt,!1,!0,{random:function(e,t){var n,i;return 1==arguments.length&&(t=e,e=0),n=Ft(e||0,h(t)?1:t),i=qt(e||0,h(t)?1:t)+1,Lt(mt.random()*(i-n)+n)}}),r(gt,!0,!0,{log:function(e){return mt.log(this)/(e?mt.log(e):1)},abbr:function(e){return He(this,e,"kmbt",0,4)},metric:function(e,t){return He(this,e,"nμm kMGTPE",4,h(t)?1:t)},bytes:function(e,t){return He(this,e,"kMGTPE",0,h(t)?4:t,!0)+"B"},isInteger:function(){return 0==this%1},isOdd:function(){return!isNaN(this)&&!this.isMultipleOf(2)},isEven:function(){return this.isMultipleOf(2)},isMultipleOf:function(e){return 0===this%e},format:function(e,t,n){var i,r,o,a="";for(h(t)&&(t=","),h(n)&&(n="."),i=($t(e)?C(this,e||0).toFixed(qt(e,0)):this.toString()).replace(/^-/,"").split("."),r=i[0],o=i[1],i=r.length;i>0;i-=3)i<r.length&&(a=t+a),a=r.slice(qt(0,i-3),i)+a;return o&&(a+=n+_("0",(e||0)-o.length)+o),(0>this?"-":"")+a},hex:function(e){return this.pad(e||1,!1,16)},times:function(e){if(e)for(var t=0;this>t;t++)e.call(this,t);return this.toNumber()},chr:function(){return ft.fromCharCode(this)},pad:function(e,t,n){return $(this,e,t,n)},ordinalize:function(){var e=jt(this),e=parseInt(e.toString().slice(-2));return this+E(e)},toNumber:function(){return parseFloat(this,10)}}),function(){function e(e){return function(t){return t?C(this,t,e):e(this)}}r(gt,!0,!0,{ceil:e(Ot),round:e(Rt),floor:e(Lt)}),o(gt,!0,!0,"abs,pow,sin,asin,cos,acos,tan,atan,exp,pow,sqrt",function(e,t){e[t]=function(e,n){return mt[t](this,e,n)}})}();var bn=["isObject","isNaN"],wn="keys values select reject each merge clone equal watch tap has toQueryString".split(" ");r(ct,!1,!0,{watch:function(e,t,n){if(wt){var i=e[t];ct.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){return i},set:function(r){i=n.call(e,t,i,r)}})}}}),r(ct,!1,function(){return 1<arguments.length},{keys:function(e,t){var n=ct.keys(e);return n.forEach(function(n){t.call(e,n,e[n])}),n}}),r(ct,!1,!0,{isObject:function(e){return v(e)},isNaN:function(e){return $t(e)&&e.valueOf()!==e.valueOf()},equal:function(e,t){return j(e,t)},extended:function(e){return new k(e)},merge:function(e,t,n,i){var r,o,a,s,l,u,c;if(e&&"string"!=typeof t)for(r in t)if(f(t,r)&&e){if(s=t[r],l=e[r],u=p(l),o=g(s),a=g(l),c=u&&!1===i?l:s,u&&Pt(i)&&(c=i.call(t,r,l,s)),n&&(o||a))if(Mt(s))c=new ht(s.getTime());else{if(!It(s)){a||(e[r]=dt.isArray(s)?[]:{}),ct.merge(e[r],s,n,i);continue}c=new pt(s.source,D(s))}e[r]=c}return e},values:function(e,t){var n=[];return y(e,function(i,r){n.push(r),t&&t.call(e,r)}),n},clone:function(e,t){var n;if(!g(e))return e;if(n=yt.call(e),Mt(e,n)&&e.clone)return e.clone();if(Mt(e,n)||It(e,n))return new e.constructor(e);if(e instanceof k)n=new k;else if(Dt(e,n))n=[];else{if(!v(e,n))throw new TypeError("Clone must be a basic data type.");n={}}return ct.merge(n,e,t)},fromQueryString:function(e,t){var n=ct.extended();return e=e&&e.toString?e.toString():"",e.replace(/^.*?\?/,"").split("&").forEach(function(e){e=e.split("="),2===e.length&&Ue(n,e[0],decodeURIComponent(e[1]),t)}),n},toQueryString:function(e,t){return Be(t,e)},tap:function(e,t){var n=t;return Pt(t)||(n=function(){t&&e[t]()}),n.call(e,e),e},has:function(e,t){return f(e,t)},select:function(e){return Ve(e,arguments,!0)},reject:function(e){return Ve(e,arguments,!1)}}),o(ct,!1,!0,_t,function(e,t){var n="is"+t;bn.push(n),e[n]=Ct[t]}),r(ct,!1,function(){return 0===arguments.length},{extend:function(){var e=bn.concat(wn);"undefined"!=typeof on&&(e=e.concat(on)),R(e,ct)}}),R(wn,k),We.prototype.toString=function(){return this.isValid()?this.start+".."+this.end:"Invalid Range"},r(We,!0,!0,{isValid:function(){return Je(this.start)&&Je(this.end)&&typeof this.start==typeof this.end},span:function(){return this.isValid()?jt((Et(this.end)?this.end.charCodeAt(0):this.end)-(Et(this.start)?this.start.charCodeAt(0):this.start))+1:NaN},contains:function(e){return null==e?!1:e.start&&e.end?e.start>=this.start&&e.start<=this.end&&e.end>=this.start&&e.end<=this.end:e>=this.start&&e<=this.end},every:function(e,t){var n,i=this.start,r=this.end,o=i>r,a=i,s=0,l=[];for(Pt(e)&&(t=e,e=null),e=e||1,$t(i)?n=Ke:Et(i)?n=Ye:Mt(i)&&(n=e,$t(n)?e=n:(i=n.toLowerCase().match(/^(\d+)?\s?(\w+?)s?$/i),n=parseInt(i[1])||1,i=i[2].slice(0,1).toUpperCase()+i[2].slice(1),i.match(/hour|minute|second/i)?i+="s":"Year"===i?i="FullYear":"Day"===i&&(i="Date"),e=[n,i]),n=Xe),o&&e>0&&(e*=-1);o?a>=r:r>=a;)l.push(a),t&&t(a,s),a=n(a,e),s++;return l},union:function(e){return new We(this.start<e.start?this.start:e.start,this.end>e.end?this.end:e.end)},intersect:function(e){return e.start>this.end||e.end<this.start?new We(NaN,NaN):new We(this.start>e.start?this.start:e.start,this.end<e.end?this.end:e.end)},clone:function(){return new We(this.start,this.end)},clamp:function(e){var t=this.start,n=this.end,i=t>n?n:t,t=t>n?t:n;return Ge(i>e?i:e>t?t:e)}}),[gt,ft,ht].forEach(function(e){r(e,!1,!0,{range:function(t,n){return e.create&&(t=e.create(t),n=e.create(n)),new We(t,n)}})}),r(gt,!0,!0,{upto:function(e,t,n){return gt.range(this,e).every(n,t)},clamp:function(e,t){return new We(e,t).clamp(this)},cap:function(e){return this.clamp(void 0,e)}}),r(gt,!0,!0,{downto:gt.prototype.upto}),r(dt,!1,function(e){return e instanceof We},{create:function(e){return e.every()}}),r(pt,!1,!0,{escape:function(e){return M(e)}}),r(pt,!0,!0,{getFlags:function(){return D(this)},setFlags:function(e){return pt(this.source,e)},addFlag:function(e){return this.setFlags(D(this,e))},removeFlag:function(e){return this.setFlags(D(this).replace(e,""))}});var xn,kn;r(ft,!0,!1,{repeat:function(e){return e=Qe(e),_(this,e)}}),r(ft,!0,function(e){return It(e)||2<arguments.length},{startsWith:function(e){var t=arguments,n=t[1],t=t[2],i=this;return n&&(i=i.slice(n)),h(t)&&(t=!0),n=It(e)?e.source.replace("^",""):M(e),pt("^"+n,t?"":"i").test(i)},endsWith:function(e){var t=arguments,n=t[1],t=t[2],i=this;return p(n)&&(i=i.slice(0,n)),h(t)&&(t=!0),n=It(e)?e.source.replace("$",""):M(e),pt(n+"$",t?"":"i").test(i)}}),r(ft,!0,!0,{escapeRegExp:function(){return M(this)},escapeURL:function(e){return e?encodeURIComponent(this):encodeURI(this)},unescapeURL:function(e){return e?decodeURI(this):decodeURIComponent(this)},escapeHTML:function(){return this.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},unescapeHTML:function(){return this.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(///g,"/").replace(/&/g,"&")},encodeBase64:function(){return xn(unescape(encodeURIComponent(this)))},decodeBase64:function(){return decodeURIComponent(escape(kn(this)))},each:function(e,t){var n,i,r;if(Pt(e)?(t=e,e=/[\s\S]/g):e?Et(e)?e=pt(M(e),"gi"):It(e)&&(e=pt(e.source,D(e,"g"))):e=/[\s\S]/g,n=this.match(e)||[],t)for(i=0,r=n.length;r>i;i++)n[i]=t.call(this,n[i],i,n)||n[i];return n},shift:function(e){var t="";return e=e||0,this.codes(function(n){t+=ft.fromCharCode(n+e)}),t},codes:function(e){var t,n,i=[];for(t=0,n=this.length;n>t;t++){var r=this.charCodeAt(t);i.push(r),e&&e.call(this,r,t)}return i},chars:function(e){return this.each(e)},words:function(e){return this.trim().each(/\S+/g,e)},lines:function(e){return this.trim().each(/^.*$/gm,e)},paragraphs:function(e){var t=this.trim().split(/[\r\n]{2,}/);return t=t.map(function(t){if(e)var n=e.call(t);return n?n:t})},isBlank:function(){return 0===this.trim().length},has:function(e){return-1!==this.search(It(e)?e:M(e))},add:function(e,t){return t=h(t)?this.length:t,this.slice(0,t)+e+this.slice(t)},remove:function(e){return this.replace(e,"")},reverse:function(){return this.split("").reverse().join("")},compact:function(){return this.trim().replace(/([\r\n\s\u3000])+/g,function(e,t){return" "===t?t:" "})},at:function(){return O(this,arguments,!0)},from:function(e){return this.slice(nt(this,e,!0))},to:function(e){return h(e)&&(e=this.length),this.slice(0,nt(this,e))},dasherize:function(){return this.underscore().replace(/_/g,"-")},underscore:function(){return this.replace(/[-\s]+/g,"_").replace(ft.Inflector&&ft.Inflector.acronymRegExp,function(e,t){return(t>0?"_":"")+e.toLowerCase()}).replace(/([A-Z\d]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase()},camelize:function(e){return this.underscore().replace(/(^|_)([^_]+)/g,function(t,n,i,r){return t=(t=ft.Inflector)&&t.acronyms[i],t=Et(t)?t:void 0,r=!1!==e||r>0,t?r?t:t.toLowerCase():r?i.capitalize():i})},spacify:function(){return this.underscore().replace(/_/g," ")},stripTags:function(){var e=this;return c(0<arguments.length?arguments:[""],function(t){e=e.replace(pt("</?"+M(t)+"[^<>]*>","gi"),"")}),e},removeTags:function(){var e=this;return c(0<arguments.length?arguments:["\\S+"],function(t){t=pt("<("+t+")[^<>]*(?:\\/>|>.*?<\\/\\1>)","gi"),e=e.replace(t,"")}),e},truncate:function(e,t,n){return et(this,e,t,n)},truncateOnWord:function(e,t,n){return et(this,e,t,n,!0)},pad:function(e,t){var n,i;return e=Qe(e),n=qt(0,e-this.length)/2,i=Lt(n),n=Ot(n),Ze(i,t)+this+Ze(n,t)},padLeft:function(e,t){return e=Qe(e),Ze(qt(0,e-this.length),t)+this},padRight:function(e,t){return e=Qe(e),this+Ze(qt(0,e-this.length),t)},first:function(e){return h(e)&&(e=1),this.substr(0,e)},last:function(e){return h(e)&&(e=1),this.substr(0>this.length-e?0:this.length-e)},toNumber:function(e){return T(this,e)},capitalize:function(e){var t;return this.toLowerCase().replace(e?/[^']/g:/^\S/,function(e){var n,i=e.toUpperCase();return n=t?e:i,t=i!==e,n})},assign:function(){var e={};return c(arguments,function(t,n){g(t)?w(e,t):e[n+1]=t}),this.replace(/\{([^{]+?)\}/g,function(t,n){return f(e,n)?e[n]:t})}}),r(ft,!0,!0,{insert:ft.prototype.add}),function(e){if(vt.btoa)xn=vt.btoa,kn=vt.atob;else{var t=/[^A-Za-z0-9\+\/\=]/g;xn=function(t){var n,i,r,o,a,s,l="",u=0;do n=t.charCodeAt(u++),i=t.charCodeAt(u++),r=t.charCodeAt(u++),o=n>>2,n=(3&n)<<4|i>>4,a=(15&i)<<2|r>>6,s=63&r,isNaN(i)?a=s=64:isNaN(r)&&(s=64),l=l+e.charAt(o)+e.charAt(n)+e.charAt(a)+e.charAt(s);while(u<t.length);return l},kn=function(n){var i,r,o,a,s,l="",u=0;if(n.match(t))throw Error("String contains invalid base64 characters");n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");do i=e.indexOf(n.charAt(u++)),r=e.indexOf(n.charAt(u++)),a=e.indexOf(n.charAt(u++)),s=e.indexOf(n.charAt(u++)),i=i<<2|r>>4,r=(15&r)<<4|a>>2,o=(3&a)<<6|s,l+=ft.fromCharCode(i),64!=a&&(l+=ft.fromCharCode(r)),64!=s&&(l+=ft.fromCharCode(o));while(u<n.length);return l}}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");var Cn,Sn,_n=[],Tn=[],$n=[],En=[],Dn={};Sn={acronym:function(e){Dn[e.toLowerCase()]=e,e=ct.keys(Dn).map(function(e){return Dn[e]}),Sn.acronymRegExp=pt(e.join("|"),"g")},plural:function(e,t){rt(_n,e,t)},singular:function(e,t){rt(Tn,e,t)},irregular:function(e,t){var n=e.first(),i=e.from(1),r=t.first(),o=t.from(1),a=r.toUpperCase(),s=r.toLowerCase(),l=n.toUpperCase(),u=n.toLowerCase();it(e),it(t),l==a?(Sn.plural(new pt("({1}){2}$".assign(n,i),"i"),"$1"+o),Sn.plural(new pt("({1}){2}$".assign(r,o),"i"),"$1"+o),Sn.singular(new pt("({1}){2}$".assign(r,o),"i"),"$1"+i)):(Sn.plural(new pt("{1}{2}$".assign(l,i)),a+o),Sn.plural(new pt("{1}{2}$".assign(u,i)),s+o),Sn.plural(new pt("{1}{2}$".assign(a,o)),a+o),Sn.plural(new pt("{1}{2}$".assign(s,o)),s+o),Sn.singular(new pt("{1}{2}$".assign(a,o)),l+i),Sn.singular(new pt("{1}{2}$".assign(s,o)),u+i))},uncountable:function(e){var t=dt.isArray(e)?e:u(arguments);$n=$n.concat(t)},human:function(e,t){En.unshift({l:e,p:t})},clear:function(e){ot(e,"singulars")&&(Tn=[]),ot(e,"plurals")&&(_n=[]),ot(e,"uncountables")&&($n=[]),ot(e,"humans")&&(En=[]),ot(e,"acronyms")&&(Dn={})}},Cn="and or nor a an the so but to of at by from into on onto off out in over with for".split(" "),Sn.plural(/$/,"s"),Sn.plural(/s$/gi,"s"),Sn.plural(/(ax|test)is$/gi,"$1es"),Sn.plural(/(octop|vir|fung|foc|radi|alumn)(i|us)$/gi,"$1i"),Sn.plural(/(census|alias|status)$/gi,"$1es"),Sn.plural(/(bu)s$/gi,"$1ses"),Sn.plural(/(buffal|tomat)o$/gi,"$1oes"),Sn.plural(/([ti])um$/gi,"$1a"),Sn.plural(/([ti])a$/gi,"$1a"),Sn.plural(/sis$/gi,"ses"),Sn.plural(/f+e?$/gi,"ves"),Sn.plural(/(cuff|roof)$/gi,"$1s"),Sn.plural(/([ht]ive)$/gi,"$1s"),Sn.plural(/([^aeiouy]o)$/gi,"$1es"),Sn.plural(/([^aeiouy]|qu)y$/gi,"$1ies"),Sn.plural(/(x|ch|ss|sh)$/gi,"$1es"),Sn.plural(/(matr|vert|ind)(?:ix|ex)$/gi,"$1ices"),Sn.plural(/([ml])ouse$/gi,"$1ice"),Sn.plural(/([ml])ice$/gi,"$1ice"),Sn.plural(/^(ox)$/gi,"$1en"),Sn.plural(/^(oxen)$/gi,"$1"),Sn.plural(/(quiz)$/gi,"$1zes"),Sn.plural(/(phot|cant|hom|zer|pian|portic|pr|quart|kimon)o$/gi,"$1os"),Sn.plural(/(craft)$/gi,"$1"),Sn.plural(/([ft])[eo]{2}(th?)$/gi,"$1ee$2"),Sn.singular(/s$/gi,""),Sn.singular(/([pst][aiu]s)$/gi,"$1"),Sn.singular(/([aeiouy])ss$/gi,"$1ss"),Sn.singular(/(n)ews$/gi,"$1ews"),Sn.singular(/([ti])a$/gi,"$1um"),Sn.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/gi,"$1$2sis"),Sn.singular(/(^analy)ses$/gi,"$1sis"),Sn.singular(/(i)(f|ves)$/i,"$1fe"),Sn.singular(/([aeolr]f?)(f|ves)$/i,"$1f"),Sn.singular(/([ht]ive)s$/gi,"$1"),Sn.singular(/([^aeiouy]|qu)ies$/gi,"$1y"),Sn.singular(/(s)eries$/gi,"$1eries"),Sn.singular(/(m)ovies$/gi,"$1ovie"),Sn.singular(/(x|ch|ss|sh)es$/gi,"$1"),Sn.singular(/([ml])(ous|ic)e$/gi,"$1ouse"),Sn.singular(/(bus)(es)?$/gi,"$1"),Sn.singular(/(o)es$/gi,"$1"),Sn.singular(/(shoe)s?$/gi,"$1"),Sn.singular(/(cris|ax|test)[ie]s$/gi,"$1is"),Sn.singular(/(octop|vir|fung|foc|radi|alumn)(i|us)$/gi,"$1us"),Sn.singular(/(census|alias|status)(es)?$/gi,"$1"),Sn.singular(/^(ox)(en)?/gi,"$1"),Sn.singular(/(vert|ind)(ex|ices)$/gi,"$1ex"),Sn.singular(/(matr)(ix|ices)$/gi,"$1ix"),Sn.singular(/(quiz)(zes)?$/gi,"$1"),Sn.singular(/(database)s?$/gi,"$1"),Sn.singular(/ee(th?)$/gi,"oo$1"),Sn.irregular("person","people"),Sn.irregular("man","men"),Sn.irregular("child","children"),Sn.irregular("sex","sexes"),Sn.irregular("move","moves"),Sn.irregular("save","saves"),Sn.irregular("cow","kine"),Sn.irregular("goose","geese"),Sn.irregular("zombie","zombies"),Sn.uncountable("equipment information rice money species series fish sheep jeans".split(" ")),r(ft,!0,!0,{pluralize:function(){return st(this,!0)},singularize:function(){return st(this,!1)},humanize:function(){var e,t=lt(this,En),t=t.replace(/_id$/g,""),t=t.replace(/(_)?([a-z\d]*)/gi,function(t,n,i){return e=f(Dn,i)?Dn[i]:null,(n?" ":"")+(e||i.toLowerCase())});return ut(t)},titleize:function(){var e,t,n,i=/[.:;!]$/;return this.spacify().humanize().words(function(r,o,a){return e=i.test(r),n=0==o||o==a.length-1||e||t,t=e,n||-1===Cn.indexOf(r)?ut(r):r}).join(" ")},parameterize:function(e){var t=this;return void 0===e&&(e="-"),t.normalize&&(t=t.normalize()),t=t.replace(/[^a-z0-9\-_]+/gi,e),e&&(t=t.replace(new pt("^{sep}+|{sep}+$|({sep}){sep}+".assign({sep:M(e)}),"g"),"$1")),encodeURI(t.toLowerCase())}}),ft.Inflector=Sn,ft.Inflector.acronyms=Dn}(),function(e,t){return"function"==typeof define&&define.amd?void define("angular-file-upload",["angular"],function(e){return t(e)}):t(e)}("undefined"==typeof angular?null:angular,function(e){var t=e.module("angularFileUpload",[]);return t.value("fileUploaderOptions",{url:"/",alias:"file",headers:{},queue:[],progress:0,autoUpload:!1,removeAfterUpload:!1,method:"POST",filters:[],formData:[],queueLimit:Number.MAX_VALUE,withCredentials:!1}).factory("FileUploader",["fileUploaderOptions","$rootScope","$http","$window","$compile",function(t,n,i,r,o){function a(n){var i=e.copy(t);e.extend(this,i,n,{isUploading:!1,_nextIndex:0,_failFilterIndex:-1,_directives:{select:[],drop:[],over:[]}}),this.filters.unshift({name:"queueLimit",fn:this._queueLimitFilter}),this.filters.unshift({name:"folder",fn:this._folderFilter})}function s(e){var t=e;this.lastModifiedDate=null,this.size=null,this.type="like/"+t.slice(t.lastIndexOf(".")+1).toLowerCase(),this.name=t.slice(t.lastIndexOf("/")+t.lastIndexOf("\\")+2)}function l(t,n,i,r){n=t._getFileOrFileLikeObject(n),e.extend(this,{url:t.url,alias:t.alias,headers:e.copy(t.headers),formData:e.copy(t.formData),removeAfterUpload:t.removeAfterUpload,withCredentials:t.withCredentials,method:t.method},i,{uploader:t,file:e.copy(n),isReady:!1,isUploading:!1,isUploaded:!1,isSuccess:!1,isCancel:!1,isError:!1,progress:0,index:null,_file:n}),r&&(this._input=e.element(r),this._replaceNode(this._input))}function u(t){e.extend(this,t),this.uploader._directives[this.prop].push(this),this._saveLinks(),this.bind()}function c(e){c.super_.apply(this,arguments),this.uploader.isHTML5||this.element.removeAttr("multiple"),this.element.prop("value",null)}function d(e){d.super_.apply(this,arguments)}function p(e){p.super_.apply(this,arguments)}return a.prototype.isHTML5=!(!r.File||!r.FormData),a.prototype.addToQueue=function(t,n,i){var r=e.isElement(t)?[t]:t,o=this._getFilters(i),s=this.queue.length,l=[];e.forEach(r,function(e){var t=this._getFileOrFileLikeObject(e);if(this._isValidFile(t,o,n)){var i=this.isFile(t)?null:e,r=new a.FileItem(this,t,n,i);l.push(r),this.queue.push(r),this._onAfterAddingFile(r)}else{var s=this.filters[this._failFilterIndex];this._onWhenAddingFileFailed(t,s,n)}},this),this.queue.length!==s&&(this._onAfterAddingAll(l),this.progress=this._getTotalProgress()),this._render(),this.autoUpload&&this.uploadAll()},a.prototype.removeFromQueue=function(e){var t=this.getIndexOfItem(e),n=this.queue[t];n.isUploading&&n.cancel(),this.queue.splice(t,1),n._destroy(),this.progress=this._getTotalProgress()},a.prototype.clearQueue=function(){for(;this.queue.length;)this.queue[0].remove();this.progress=0},a.prototype.uploadItem=function(e){var t=this.getIndexOfItem(e),n=this.queue[t],i=this.isHTML5?"_xhrTransport":"_iframeTransport";n._prepareToUploading(),this.isUploading||(this.isUploading=!0,this[i](n))},a.prototype.cancelItem=function(e){var t=this.getIndexOfItem(e),n=this.queue[t],i=this.isHTML5?"_xhr":"_form";n&&n.isUploading&&n[i].abort()},a.prototype.uploadAll=function(){var t=this.getNotUploadedItems().filter(function(e){return!e.isUploading});t.length&&(e.forEach(t,function(e){e._prepareToUploading()}),t[0].upload())},a.prototype.cancelAll=function(){var t=this.getNotUploadedItems();e.forEach(t,function(e){e.cancel()})},a.prototype.isFile=function(e){var t=r.File;return t&&e instanceof t},a.prototype.isFileLikeObject=function(e){return e instanceof a.FileLikeObject},a.prototype.getIndexOfItem=function(t){return e.isNumber(t)?t:this.queue.indexOf(t)},a.prototype.getNotUploadedItems=function(){return this.queue.filter(function(e){return!e.isUploaded})},a.prototype.getReadyItems=function(){return this.queue.filter(function(e){return e.isReady&&!e.isUploading}).sort(function(e,t){return e.index-t.index})},a.prototype.destroy=function(){e.forEach(this._directives,function(t){e.forEach(this._directives[t],function(e){e.destroy()},this)},this)},a.prototype.onAfterAddingAll=function(e){},a.prototype.onAfterAddingFile=function(e){},a.prototype.onWhenAddingFileFailed=function(e,t,n){},a.prototype.onBeforeUploadItem=function(e){},a.prototype.onProgressItem=function(e,t){},a.prototype.onProgressAll=function(e){},a.prototype.onSuccessItem=function(e,t,n,i){},a.prototype.onErrorItem=function(e,t,n,i){},a.prototype.onCancelItem=function(e,t,n,i){},a.prototype.onCompleteItem=function(e,t,n,i){},a.prototype.onCompleteAll=function(){},a.prototype._getTotalProgress=function(e){if(this.removeAfterUpload)return e||0;var t=this.getNotUploadedItems().length,n=t?this.queue.length-t:this.queue.length,i=100/this.queue.length,r=(e||0)*i/100;return Math.round(n*i+r)},a.prototype._getFilters=function(t){if(e.isUndefined(t))return this.filters;if(e.isArray(t))return t;var n=t.split(/\s*,/);return this.filters.filter(function(e){return-1!==n.indexOf(e.name)},this)},a.prototype._render=function(){n.$$phase||n.$apply()},a.prototype._folderFilter=function(e){return!(!e.size&&!e.type)},a.prototype._queueLimitFilter=function(){return this.queue.length<this.queueLimit},a.prototype._isValidFile=function(e,t,n){return this._failFilterIndex=-1,t.length?t.every(function(t){return this._failFilterIndex++,t.fn.call(this,e,n)},this):!0},a.prototype._getFileOrFileLikeObject=function(e){return this.isFile(e)||this.isFileLikeObject(e)?e:new a.FileLikeObject(e.value)},a.prototype._isSuccessCode=function(e){return e>=200&&300>e||304===e},a.prototype._transformResponse=function(t){return e.forEach(i.defaults.transformResponse,function(e){t=e(t)}),t},a.prototype._parseHeaders=function(t){function n(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function i(e){return e.toLowerCase()}var r,o,a,s={};return t?(e.forEach(t.split("\n"),function(e){a=e.indexOf(":"),r=i(n(e.substr(0,a))),o=n(e.substr(a+1)),r&&(s[r]=s[r]?s[r]+", "+o:o)}),s):s},a.prototype._xhrTransport=function(t){var n=t._xhr=new XMLHttpRequest,i=new FormData,r=this;r._onBeforeUploadItem(t),e.forEach(t.formData,function(t){e.forEach(t,function(e,t){i.append(t,e)})}),i.append(t.alias,t._file),n.upload.onprogress=function(e){var n=Math.round(e.lengthComputable?100*e.loaded/e.total:0);r._onProgressItem(t,n)},n.onload=function(){var e=r._parseHeaders(n.getAllResponseHeaders()),i=r._transformResponse(n.response),o=r._isSuccessCode(n.status)?"Success":"Error",a="_on"+o+"Item";r[a](t,i,n.status,e),r._onCompleteItem(t,i,n.status,e)},n.onerror=function(){var e=r._parseHeaders(n.getAllResponseHeaders()),i=r._transformResponse(n.response);r._onErrorItem(t,i,n.status,e),r._onCompleteItem(t,i,n.status,e)},n.onabort=function(){var e=r._parseHeaders(n.getAllResponseHeaders()),i=r._transformResponse(n.response);r._onCancelItem(t,i,n.status,e),r._onCompleteItem(t,i,n.status,e)},n.open(t.method,t.url,!0),n.withCredentials=t.withCredentials,e.forEach(t.headers,function(e,t){n.setRequestHeader(t,e)}),n.send(i),this._render()},a.prototype._iframeTransport=function(t){var n=e.element('<form style="display: none;" />'),i=e.element('<iframe name="iframeTransport'+Date.now()+'">'),r=t._input,o=this;t._form&&t._form.replaceWith(r),t._form=n,o._onBeforeUploadItem(t),r.prop("name",t.alias),e.forEach(t.formData,function(t){e.forEach(t,function(t,i){n.append(e.element('<input type="hidden" name="'+i+'" value="'+t+'" />'))})}),n.prop({action:t.url,method:"POST",target:i.prop("name"),enctype:"multipart/form-data",encoding:"multipart/form-data"}),i.bind("load",function(){try{var e=i[0].contentDocument.body.innerHTML}catch(n){}var r={response:e,status:200,dummy:!0},a=o._transformResponse(r.response),s={};o._onSuccessItem(t,a,r.status,s),o._onCompleteItem(t,a,r.status,s)}),n.abort=function(){var e,a={status:0,dummy:!0},s={};i.unbind("load").prop("src","javascript:false;"),n.replaceWith(r),o._onCancelItem(t,e,a.status,s),o._onCompleteItem(t,e,a.status,s)},r.after(n),n.append(r).append(i),n[0].submit(),this._render()},a.prototype._onWhenAddingFileFailed=function(e,t,n){this.onWhenAddingFileFailed(e,t,n)},a.prototype._onAfterAddingFile=function(e){this.onAfterAddingFile(e)},a.prototype._onAfterAddingAll=function(e){this.onAfterAddingAll(e)},a.prototype._onBeforeUploadItem=function(e){e._onBeforeUpload(),this.onBeforeUploadItem(e)},a.prototype._onProgressItem=function(e,t){var n=this._getTotalProgress(t);this.progress=n,e._onProgress(t),this.onProgressItem(e,t),this.onProgressAll(n),this._render()},a.prototype._onSuccessItem=function(e,t,n,i){e._onSuccess(t,n,i),this.onSuccessItem(e,t,n,i)},a.prototype._onErrorItem=function(e,t,n,i){e._onError(t,n,i),this.onErrorItem(e,t,n,i)},a.prototype._onCancelItem=function(e,t,n,i){e._onCancel(t,n,i),this.onCancelItem(e,t,n,i)},a.prototype._onCompleteItem=function(t,n,i,r){t._onComplete(n,i,r),this.onCompleteItem(t,n,i,r);var o=this.getReadyItems()[0];return this.isUploading=!1,e.isDefined(o)?void o.upload():(this.onCompleteAll(),this.progress=this._getTotalProgress(),void this._render())},a.isFile=a.prototype.isFile,a.isFileLikeObject=a.prototype.isFileLikeObject,a.isHTML5=a.prototype.isHTML5,a.inherit=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.super_=t},a.FileLikeObject=s,a.FileItem=l,a.FileDirective=u,a.FileSelect=c,a.FileDrop=d,a.FileOver=p,l.prototype.upload=function(){this.uploader.uploadItem(this)},l.prototype.cancel=function(){this.uploader.cancelItem(this)},l.prototype.remove=function(){this.uploader.removeFromQueue(this)},l.prototype.onBeforeUpload=function(){},l.prototype.onProgress=function(e){},l.prototype.onSuccess=function(e,t,n){},l.prototype.onError=function(e,t,n){},l.prototype.onCancel=function(e,t,n){},l.prototype.onComplete=function(e,t,n){},l.prototype._onBeforeUpload=function(){this.isReady=!0,this.isUploading=!0,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.onBeforeUpload()},l.prototype._onProgress=function(e){this.progress=e,this.onProgress(e)},l.prototype._onSuccess=function(e,t,n){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!0,this.isCancel=!1,this.isError=!1,this.progress=100,this.index=null,this.onSuccess(e,t,n)},l.prototype._onError=function(e,t,n){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!1,this.isCancel=!1,this.isError=!0,this.progress=0,this.index=null,this.onError(e,t,n)},l.prototype._onCancel=function(e,t,n){this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!0,this.isError=!1,this.progress=0,this.index=null,this.onCancel(e,t,n)},l.prototype._onComplete=function(e,t,n){this.onComplete(e,t,n),this.removeAfterUpload&&this.remove()},l.prototype._destroy=function(){this._input&&this._input.remove(),this._form&&this._form.remove(),delete this._form,delete this._input},l.prototype._prepareToUploading=function(){this.index=this.index||++this.uploader._nextIndex,this.isReady=!0},l.prototype._replaceNode=function(e){var t=o(e.clone())(e.scope());t.prop("value",null),e.css("display","none"),e.after(t)},u.prototype.events={},u.prototype.bind=function(){for(var e in this.events){var t=this.events[e];this.element.bind(e,this[t])}},u.prototype.unbind=function(){for(var e in this.events)this.element.unbind(e,this.events[e])},u.prototype.destroy=function(){var e=this.uploader._directives[this.prop].indexOf(this);this.uploader._directives[this.prop].splice(e,1),this.unbind()},u.prototype._saveLinks=function(){for(var e in this.events){var t=this.events[e];this[t]=this[t].bind(this)}},a.inherit(c,u),c.prototype.events={$destroy:"destroy",change:"onChange"},c.prototype.prop="select",c.prototype.getOptions=function(){},c.prototype.getFilters=function(){},c.prototype.isEmptyAfterSelection=function(){return!!this.element.attr("multiple")},c.prototype.onChange=function(){var e=this.uploader.isHTML5?this.element[0].files:this.element[0],t=this.getOptions(),n=this.getFilters();this.uploader.isHTML5||this.destroy(),this.uploader.addToQueue(e,t,n),this.isEmptyAfterSelection()&&this.element.prop("value",null)},a.inherit(d,u),d.prototype.events={$destroy:"destroy",drop:"onDrop",dragover:"onDragOver",dragleave:"onDragLeave"},d.prototype.prop="drop",d.prototype.getOptions=function(){},d.prototype.getFilters=function(){},d.prototype.onDrop=function(t){
|
|
3225
|
|
-var n=this._getTransfer(t);if(n){var i=this.getOptions(),r=this.getFilters();this._preventAndStop(t),e.forEach(this.uploader._directives.over,this._removeOverClass,this),this.uploader.addToQueue(n.files,i,r)}},d.prototype.onDragOver=function(t){var n=this._getTransfer(t);this._haveFiles(n.types)&&(n.dropEffect="copy",this._preventAndStop(t),e.forEach(this.uploader._directives.over,this._addOverClass,this))},d.prototype.onDragLeave=function(t){t.target===this.element[0]&&(this._preventAndStop(t),e.forEach(this.uploader._directives.over,this._removeOverClass,this))},d.prototype._getTransfer=function(e){return e.dataTransfer?e.dataTransfer:e.originalEvent.dataTransfer},d.prototype._preventAndStop=function(e){e.preventDefault(),e.stopPropagation()},d.prototype._haveFiles=function(e){return e?e.indexOf?-1!==e.indexOf("Files"):e.contains?e.contains("Files"):!1:!1},d.prototype._addOverClass=function(e){e.addOverClass()},d.prototype._removeOverClass=function(e){e.removeOverClass()},a.inherit(p,u),p.prototype.events={$destroy:"destroy"},p.prototype.prop="over",p.prototype.overClass="nv-file-over",p.prototype.addOverClass=function(){this.element.addClass(this.getOverClass())},p.prototype.removeOverClass=function(){this.element.removeClass(this.getOverClass())},p.prototype.getOverClass=function(){return this.overClass},a}]).directive("nvFileSelect",["$parse","FileUploader",function(e,t){return{link:function(n,i,r){var o=n.$eval(r.uploader);if(!(o instanceof t))throw new TypeError('"Uploader" must be an instance of FileUploader');var a=new t.FileSelect({uploader:o,element:i});a.getOptions=e(r.options).bind(a,n),a.getFilters=function(){return r.filters}}}}]).directive("nvFileDrop",["$parse","FileUploader",function(e,t){return{link:function(n,i,r){var o=n.$eval(r.uploader);if(!(o instanceof t))throw new TypeError('"Uploader" must be an instance of FileUploader');if(o.isHTML5){var a=new t.FileDrop({uploader:o,element:i});a.getOptions=e(r.options).bind(a,n),a.getFilters=function(){return r.filters}}}}}]).directive("nvFileOver",["FileUploader",function(e){return{link:function(t,n,i){var r=t.$eval(i.uploader);if(!(r instanceof e))throw new TypeError('"Uploader" must be an instance of FileUploader');var o=new e.FileOver({uploader:r,element:n});o.getOverClass=function(){return i.overClass||this.overClass}}}}]),t});var StringHelpers;!function(e){function t(e){return angular.isString(e)?r.test(e):!1}function n(e){return angular.isString(e)?e.chars().map(function(e){return"*"}).join(""):null}function i(t){if(!t)return"{ null }";var n=[];return angular.forEach(t,function(t,r){var o=t;"password"===(""+r).toLowerCase()?o=e.obfusicate(t):angular.isObject(o)&&(o=i(o)),n.push(r+": "+o)}),"{ "+n.join(", ")+" }"}var r=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:/i;e.isDate=t,e.obfusicate=n,e.toString=i}(StringHelpers||(StringHelpers={}));var Core;!function(e){function t(e){var t={scheme:"http",host:null,port:null,path:null,useProxy:!0,jolokiaUrl:null,userName:null,password:null,view:null,name:null},n=e||{};return angular.extend(t,n)}function n(e){return t(e)}e.createConnectToServerOptions=t,e.createConnectOptions=n}(Core||(Core={}));var ArrayHelpers;!function(e){function t(e,t,n){void 0===n&&(n="id");var i=e.length;return e.remove(function(e){return!t.any(function(t){return t[n]===e[n]})}),e.length!==i}function n(e,n,i){void 0===i&&(i="id");var r=t(e,n,i);return n&&n.forEach(function(t){var n=e.find(function(e){return e[i]===t[i]});n?t!==n&&(angular.copy(t,n),r=!0):(r=!0,e.push(t))}),r}e.removeElements=t,e.sync=n}(ArrayHelpers||(ArrayHelpers={}));var UrlHelpers;!function(e){function t(e){return e&&e.startsWith("#")?e.last(e.length-1):e}function n(e){return e.has("?")?e.split("?")[0]:e}function i(e,i){var r=n(e);return i.endsWith("/")&&i.startsWith("/")?r.has(i):i.startsWith("/")?t(r).startsWith(i):r.endsWith(i)}function r(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=[],i=e.length-1;e.forEach(function(e,t){if(!Core.isBlank(e)){if("/"===e)return void n.push("");0!==t&&"/"===e.first(1)&&(e=e.slice(1)),t!==i&&"/"===e.last(1)&&(e=e.slice(0,e.length-1)),Core.isBlank(e)||n.push(e)}});var r=n.join("/");return r}function o(e){var t=new URI(e);return URI.parseQuery(t.query())}function a(e,t){if(e&&e.startsWith("proxy/"))return l.debug("Jolokia URL is proxied, applying proxy to: ",t),r("proxy",t);var n=window.location.origin;return t&&t.startsWith("http")&&!t.startsWith(n)?(l.debug("Url doesn't match page origin: ",n," applying proxy to: ",t),r("proxy",t)):(l.debug("No need to proxy: ",t),t)}function s(e){var t=e;return t=e.startsWith("proxy")?e.replace(/:/g,"\\:"):e.replace(/:([^\/])/,"\\:$1")}var l=Logger.get("UrlHelpers");e.noHash=t,e.extractPath=n,e.contextActive=i,e.join=r,e.parseQueryString=o,e.maybeProxy=a,e.escapeColons=s}(UrlHelpers||(UrlHelpers={}));var Core;!function(e){function t(){P=null}function n(e){return e&&e.startsWith&&e.startsWith("/")&&(P||(P=$("base").attr("href")||"",P.endsWith&&P.endsWith("/")&&(P=P.substring(0,P.length-1))),P)?P+e:e}function i(){return window.location}function r(){return A=[e.url("jolokia"),"/jolokia"]}function o(e,t){return e&&t&&(e.startsWith(t)||0===e.indexOf(t))?e.substring(t.length):e}function a(e,t){return e&&t&&e.endsWith(t)?e.substring(0,e.length-t.length):e}function s(){var e=$(window).height(),t=$("#main-nav").height(),n=e-t;$("#main").css("min-height",""+n+"px")}function l(){var e=!1;try{e=chrome&&chrome.app&&chrome.extension?!0:!1}catch(t){e=!1}return e}function u(e){if("createStyleSheet"in document)document.createStyleSheet(e);else{var t=$("<link>");$("head").append(t),t.attr({rel:"stylesheet",type:"text/css",href:e})}}function c(){var e=window.localStorage||function(){return j}();return e}function d(e){return angular.isArray(e)?e:[e]}function p(e,t){if(void 0===t&&(t=!1),!angular.isDefined(e)||!e)return t;if(e.constructor===Boolean)return e;if(angular.isString(e))switch(e.toLowerCase()){case"true":case"1":case"yes":return!0;default:return!1}if(angular.isNumber(e))return 0!==e;throw new Error("Can't convert value "+e+" to boolean")}function h(e){return angular.isNumber(e)?m(e):angular.toJson(e,!0)}function f(e){return""+e}function g(e,t){if(void 0===t&&(t="integer"),angular.isString(e))try{return parseInt(e)}catch(n){console.log("Failed to parse "+t+" with text '"+e+"'")}else if(angular.isNumber(e))return e;return null}function m(e){return""+e}function v(e,t){if(void 0===t&&(t="float"),angular.isString(e))try{return parseFloat(e)}catch(n){console.log("Failed to parse "+t+" with text '"+e+"'")}else if(angular.isNumber(e))return e;return null}function y(e,t){var n=angular.isArray(t)?t:(t||"").split("."),i=e;return angular.forEach(n,function(e){if(!i)return null;try{i=i[e]}catch(t){return null}}),i}function b(e,t,n){var i=angular.isArray(t)?t:(t||"").split("."),r=e,o=i.length-1;return angular.forEach(i,function(e,t){var i=r[e];(t>=o||!angular.isObject(i))&&(i=o>t?{}:n,r[e]=i),r=i}),r}function w(e){if(e.$$phase)return e.$$phase;if(HawtioCore.injector){var t=HawtioCore.injector.get("$rootScope");if(t)return t.$$phase}}function x(t){w(t)?setTimeout(function(){e.$apply(t)},50):t.$apply()}function k(t,n){void 0===n&&(n=50),setTimeout(function(){e.$apply(t)},n)}function C(e){var t=w(e);t||e.$apply()}function S(e){var t=w(e);t||e.$digest()}function _(e,t){var n=e;return angular.forEach(t,function(e){if(n){var t=$(n).children(e);t&&t.length||($("<"+e+"></"+e+">").appendTo(n),t=$(n).children(e)),n=t}}),n}function T(e){return angular.forEach(N,function(t,n){var i=new RegExp(t,"g");e=e.replace(i,n)}),e=e.replace(/>/g,">")}function E(e){if(angular.isString(e)){for(var t="",n=0;n<e.length;n++){var i=e.charAt(n),i=N[i]||i;t+=i}return t}return e}function D(e){return void 0===e||null===e?!0:angular.isString(e)?e.isBlank():!1}function M(e){if(e){for(;e.endsWith('"')||e.endsWith("'");)e=e.substring(0,e.length-1);for(;e.startsWith('"')||e.startsWith("'");)e=e.substring(1,e.length)}return e}function I(e){if(e){var t=e+"";try{t=t.underscore()}catch(n){}try{t=t.humanize()}catch(n){}return M(t)}return e}var P=null;e.connectionSettingsKey="jvmConnect",e._resetUrlPrefix=t,e.url=n,e.windowLocation=i,String.prototype.unescapeHTML=function(){var e=document.createElement("textarea");return e.innerHTML=this,e.value},Object.keys||(console.debug("Creating hawt.io version of Object.keys()"),Object.keys=function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);return n}),e._resetJolokiaUrls=r;var A=e._resetJolokiaUrls();e.trimLeading=o,e.trimTrailing=a,e.adjustHeight=s,e.isChromeApp=l,e.addCSS=u;var j={};e.getLocalStorage=c,e.asArray=d,e.parseBooleanValue=p,e.toString=h,e.booleanToString=f,e.parseIntValue=g,e.numberToString=m,e.parseFloatValue=v,e.pathGet=y,e.pathSet=b,e.$applyNowOrLater=x,e.$applyLater=k,e.$apply=C,e.$digest=S,e.getOrCreateElements=_;var N={"#":"#","'":"'","<":"<",">":">",'"':"""};e.unescapeHtml=T,e.escapeHtml=E,e.isBlank=D,e.trimQuotes=M,e.humanizeValue=I}(Core||(Core={}));var HawtioCompile;!function(e){var t="hawtio-compile",n=Logger.get(t);e._module=angular.module(t,[]),e._module.run(function(){n.debug("loaded")}),e._module.directive("compile",["$compile",function(e){return function(t,n,i){t.$watch(function(e){return e.$eval(i.compile)},function(i){n.html(i),e(n.contents())(t)})}}]),hawtioPluginLoader.addModule(t)}(HawtioCompile||(HawtioCompile={}));var ControllerHelpers;!function(e){function t(e){return function(t,n){return t===n&&t in e?e[t]:""}}function n(e){return function(t){return t in e?e[t]:""}}function i(e,t,n,i,r,o,a){function s(){return u(t.search()[i]||r)}n in e||(e[n]=r);var l=o||Core.doNothing,u=a||Core.doNothing,c=s();Core.pathSet(e,n,c),e.$watch(n,function(e,n){e!==n&&(void 0!==e&&null!==e?t.search(i,l(e)):t.search(i,""))})}function r(e,t,n,i){void 0===i&&(i=["nid"]);var r=angular.copy(n.search());t.$on("$routeUpdate",function(){var t=n.search(),o=[];angular.forEach(i,function(e){t[e]!==r[e]&&o.push(e)}),o.length&&e.reload()})}Logger.get("ControllerHelpers");e.createClassSelector=t,e.createValueClassSelector=n,e.bindModelToSearchParam=i,e.reloadWhenParametersChange=r}(ControllerHelpers||(ControllerHelpers={}));var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n},Core;!function(e){var t=Logger.get("hawtio-tasks"),n=function(){function e(){this.tasks={},this.tasksExecuted=!1,this._onComplete=null}return e.prototype.addTask=function(e,t){this.tasks[e]=t,this.tasksExecuted&&this.executeTask(e,t)},e.prototype.executeTask=function(e,n){if(angular.isFunction(n)){t.debug("Executing task : ",e);try{n()}catch(i){t.debug("Failed to execute task: ",e," error: ",i)}}},e.prototype.onComplete=function(e){this._onComplete=e},e.prototype.execute=function(){var e=this;this.tasksExecuted||(angular.forEach(this.tasks,function(t,n){e.executeTask(n,t)}),this.tasksExecuted=!0,angular.isFunction(this._onComplete)&&this._onComplete())},e.prototype.reset=function(){this.tasksExecuted=!1},e}();e.TasksImpl=n;var i=function(e){function n(){var t=this;e.call(this),this.tasks={},this.onComplete(function(){t.reset()})}return __extends(n,e),n.prototype.addTask=function(e,t){this.tasks[e]=t},n.prototype.execute=function(){for(var e=this,n=[],i=0;i<arguments.length;i++)n[i-0]=arguments[i];if(!this.tasksExecuted){var r=n,o=_.keys(this.tasks);o.forEach(function(n){var i=e.tasks[n];if(angular.isFunction(i)){t.debug("Executing task: ",n," with parameters: ",r);try{i.apply(i,r)}catch(o){t.debug("Failed to execute task: ",n," error: ",o)}}}),this.tasksExecuted=!0,angular.isFunction(this._onComplete)&&this._onComplete()}},n}(n);e.ParameterizedTasksImpl=i,e.postLoginTasks=new e.TasksImpl,e.preLogoutTasks=new e.TasksImpl,e.postLogoutTasks=new e.TasksImpl}(Core||(Core={}));var Core;!function(e){function t(e){var t=0;return e&&(t=1,e.toString().each(/\n/,function(){return t++})),t}function n(e){return"boolean"==typeof e?e:"number"==typeof e?e:e?e:""}function i(e,t){if("boolean"==typeof e)return""+e;if("number"==typeof e)return""+e;if("string"==typeof e)return""+e;if("javax.management.openmbean.CompositeData"===t||"[Ljavax.management.openmbean.CompositeData;"===t||"java.util.Map"===t){var n=angular.toJson(e,!0);return n}if("javax.management.ObjectName"===t)return""+(null==e?"":e.canonicalName);if("javax.management.openmbean.TabularData"===t){var i=[];for(var r in e){var o=e[r],a=""+r+"="+o;i.push(a)}return i=i.sortBy(function(e){return e.toString()}),i.join("\n")}return angular.isArray(e)?e.join("\n"):e?""+e:""}function r(e){if(e){if(angular.isArray(e))return e;if(angular.isString(e))return e.split(",")}return[]}function o(e,t){if(e){var n=e.folderNames;if(n)return t.any(function(e){for(var t=0;t<e.length;t++){var i=n[t],r=e[t];if(!i)return!1;var o=r.indexOf(i);if(0>o)return!1}return!0})}return!1}function a(e,t,n){n&&(e.$on("$destroy",function(){s(e,t)}),e.jolokiaHandle=n)}function s(e,t){var n=e.jolokiaHandle;n&&(t.unregister(n),e.jolokiaHandle=null)}function l(t,n){return void 0===n&&(n={}),n.mimeType="application/json",angular.isDefined(t)&&(n.success=t),n.method||(n.method="POST"),n.canonicalNaming=!1,n.canonicalProperties=!1,n.error||(n.error=function(t){e.defaultJolokiaErrorHandler(t,n)}),n}function u(){try{return"localStorage"in window&&null!==window.localStorage}catch(e){return!1}}function c(t){if(t){var n=t.toString().toLowerCase(),i=e.numberTypeNames[n];return i}return!1}function d(e){return e.replace(/\//g,"!/").replace(":","/").escapeURL()}function p(e){return e.replace(/\//g,"!/").replace(":","/")}function h(e){return e.replace(/\//g,"!/").escapeURL()}function f(e){return e.replace(/\./g,"-")}function g(e){return f(e).replace(/span/g,"sp-an")}function m(){var e=$("#log-panel"),t=$("body");localStorage.showLog="true",e.css({bottom:"50%"}),t.css({"overflow-y":"hidden"})}function v(e){if(e){var t=e[0];if("w"===t||"W"===t)return"warning";if("e"===t||"E"===t)return"error";if("i"===t||"I"===t)return"info";if("d"===t||"D"===t)return""}return""}function y(t){return e.isBlank(t)?t:t.startsWith("#")?t.substring(1):t}function b(e){var t={},n=e.split(":");if(n.length>1){t.domain=n.first(),n=n.exclude(n.first()),n=n.join(":"),t.attributes={};var i=n.split(",");i.forEach(function(e){var n=e.split("="),i=n.first().trim();n=n.exclude(n.first()),t.attributes[i]=n.join("=").trim()})}return t}function w(){e.log.debug("Executing post login tasks"),e.postLoginTasks.execute()}function x(t){e.log.debug("Executing pre logout tasks"),e.preLogoutTasks.onComplete(t),e.preLogoutTasks.execute()}function k(t,n,i,r,o,a){if(void 0===o&&(o=null),void 0===a&&(a=null),t){var s="auth/logout/";e.executePreLogoutTasks(function(){$.ajax(s,{type:"POST",success:function(){n.username=null,n.password=null,n.loginDetails=null,n.rememberMe=!1,delete i.userDetails;var t=angular.fromJson(i.jvmConnect);_.each(t,function(e){delete e.userName,delete e.password}),i.setItem("jvmConnect",angular.toJson(t)),i.removeItem("activemqUserName"),i.removeItem("activemqPassword"),o&&angular.isFunction(o)&&o(),e.$apply(r)},error:function(t,o,s){n.username=null,n.password=null,n.loginDetails=null,n.rememberMe=!1,delete i.userDetails;var l=angular.fromJson(i.jvmConnect);switch(_.each(l,function(e){delete e.userName,delete e.password}),i.setItem("jvmConnect",angular.toJson(l)),i.removeItem("activemqUserName"),i.removeItem("activemqPassword"),t.status){case 401:e.log.debug("Failed to log out, ",s);break;case 403:e.log.debug("Failed to log out, ",s);break;case 0:break;default:e.log.debug("Failed to log out, ",s)}a&&angular.isFunction(a)&&a(),e.$apply(r)}})})}}function C(t,n,i){void 0===i&&(i=null);var r=angular.copy(t.search());i&&angular.forEach(i,function(e){return delete r[e]});var o=e.hashToString(r);if(o){var a=n.indexOf("?")>=0?"&":"?";n+=a+o}return n}function S(e){var t=[];angular.forEach(e,function(e,n){t.push(n+"="+e)});var n=t.join("&");return encodeURI(n)}function T(e){var t={};if(e){var n=decodeURI(e),i=n.split("&");angular.forEach(i,function(e){var n=e.split("="),i=n[0],r=n[1]||i;t[i]=r})}return t}function E(t,n,i,r,o){var a={responseJson:"",success:function(e){var t=angular.toJson(e.value);a.responseJson!==t&&(a.responseJson=t,r(e))}};return angular.extend(a,o),e.register(t,n,i,l(void 0,a))}function D(e){return e in localStorage||(localStorage[e]=angular.toJson({})),angular.fromJson(localStorage[e])}function M(e){return StringHelpers.toString(e)}function I(t){if(!("type"in t))return null;var n=t.type;switch(n.toLowerCase()){case"exec":n+=":"+t.mbean+":"+t.operation;var i=M(t.arguments);e.isBlank(i)||(n+=":"+i);break;case"read":n+=":"+t.mbean+":"+t.attribute;break;default:return null}return n}function P(e){var t="";return t=angular.isArray(e)?e.map(function(e){return I(e)}).join(":"):I(e)}function A(){return null===we&&(we={},e.log.debug("Created response history",we)),we}function j(e){var t=null,n=null;return angular.forEach(e,function(e,i){e&&e.timestamp?(null===t||e.timestamp<t)&&(t=e.timestamp,n=i):(t=0,n=i)}),n}function N(t,n){var i=A(),r=P(t);if(null===r)return void e.log.debug("key for arguments is null, not caching: ",StringHelpers.toString(t));var o=_.keys(i);if(o.length>=e.MAX_RESPONSE_CACHE_SIZE){e.log.debug("Cache limit (",e.MAX_RESPONSE_CACHE_SIZE,") met or exceeded (",o.length,"), trimming oldest response");var a=j(i);null!==a?(e.log.debug("Deleting key: ",a),delete i[a]):(e.log.debug("Got null key, could be a cache problem, wiping cache"),o.forEach(function(t){e.log.debug("Deleting key: ",t),delete i[t]}))}i[r]=n}function O(t,n,i){var r=A(),o=P(n);if(null===o)return void t.request(n,i);if(o in r&&"success"in i){var a=r[o];setTimeout(function(){i.success(a)},10)}else e.log.debug("Unable to find existing response for key: ",o),t.request(n,i)}function L(e,t,n,i){angular.isDefined(t.$jhandle)&&angular.isArray(t.$jhandle)||(t.$jhandle=[]),angular.isDefined(t.$on)&&t.$on("$destroy",function(n){R(e,t)});var r=null;if("success"in i){var o=i.success,a=n;i.success=function(e){N(a,e),o(e)}}if(angular.isArray(n)){if(n.length>=1){var a=[i];angular.forEach(n,function(e){return a.push(e)});var s=e.register;r=s.apply(e,a),t.$jhandle.push(r),O(e,n,i)}}else r=e.register(i,n),t.$jhandle.push(r),O(e,n,i);return function(){null!==r&&(t.$jhandle.remove(r),e.unregister(r))}}function R(e,t){angular.isDefined(t.$jhandle)&&(t.$jhandle.forEach(function(t){e.unregister(t)}),delete t.$jhandle)}function F(t,n){void 0===n&&(n={});var i=t.stacktrace;if(i){var r=n.silent;if(r)e.log.debug("Operation ",o," failed due to: ",t.error);else{var o=e.pathGet(t,["request","operation"])||"unknown";i.indexOf("javax.management.InstanceNotFoundException")>=0||i.indexOf("javax.management.AttributeNotFoundException")>=0||i.indexOf("java.lang.IllegalArgumentException: No operation")>=0?e.log.debug("Operation ",o," failed due to: ",t.error):e.log.warn("Operation ",o," failed due to: ",t.error)}}}function q(t){var n=t.stacktrace;if(n){var i=e.pathGet(t,["request","operation"])||"unknown";e.log.info("Operation ",i," failed due to: ",t.error)}}function H(e){try{return(new XMLSerializer).serializeToString(e)}catch(t){try{return e.xml}catch(t){console.log("WARNING: XMLSerializer not supported")}}return!1}function U(e){return e&&3===e.nodeType}function B(e,t){void 0===t&&(t="");var n=t;if(e){var i=e.lastIndexOf(".");i>0&&(n=e.substring(i+1,e.length).toLowerCase())}return n}function z(){var e=new Date,t=1e3*e.getTime()+e.getUTCMilliseconds(),n=Math.floor(65536*(1+Math.random()));return t.toString(16)+n.toString(16)}function V(e){if(e){var t=e.match(xe);if(t&&t.length>4){var n=t[1],i=t[2],r=t[4];if(angular.isDefined(r))return[parseInt(n),parseInt(i),parseInt(r)];if(angular.isDefined(i))return[parseInt(n),parseInt(i)];if(angular.isDefined(n))return[parseInt(n)]}}return null}function W(e,t){return void 0===t&&(t=4),(e||"").split(".").map(function(e){var n=e.length;return n>=t?e:e.padLeft(" ",t-n)}).join(".")}function G(e,t){var n=(new Date).getTime(),i=t(),r=(new Date).getTime()-n;return console.log(e+" "+r),i}function J(e,t){if(e&&!t)return 1;if(!e&&t)return-1;if(e===t)return 0;for(var n=0;n<e.length;n++){var i=e[n];if(n>=t.length)return 1;var r=t[n];if(!angular.isDefined(i))return-1;if(!angular.isDefined(r))return 1;if(i>r)return 1;if(r>i)return-1}return 0}function X(e){if(angular.isArray(e)){var t=e.length;if(t){if(1===t)return X(e[0]);var n="<ul>";return angular.forEach(e,function(e){n+="<li>"+X(e)+"</li>"}),n+"</ul>"}return""}if(angular.isObject(e)){var n="<table>";return angular.forEach(e,function(e,t){n+="<tr><td>"+t+"</td><td>"+X(e)+"</td></tr>"}),n+"</table>"}if(angular.isString(e)){var i=["http://","https://","file://","mailto:"],r=e;return angular.forEach(i,function(t){r.startsWith(t)&&(r="<a href='"+e+"'>"+e+"</a>")}),r}return e}function Y(e){if(e=e.trim(),e.startsWith("[")&&e.endsWith("]")||e.startsWith("{")&&e.endsWith("}"))try{return JSON.parse(e)}catch(t){}return null}function K(e,t){var n=1===e?t:t.pluralize();return""+e+" "+n}function Q(e){var t={};if(e){var n=e.indexOf(":");if(n>0){var i=e.substring(n+1),r=i.split(",");angular.forEach(r,function(e){var n=e.split("="),i=n[0],r=n[1]||i;t[i]=r})}}return t}function Z(e){return e?e.replace(/(\/|\.)/g,"_"):e}function ee(e,t){angular.forEach(e,function(e){var n=e.children;angular.isArray(n)&&n.length>0?ee(n,t):t(e)})}function te(e){var t=e.split("#");if(0===t.length)return e;var n=t[1];if(t.length>1){var i=t.last(t.length-2);i.forEach(function(e){n=n+"#"+e})}return n}function ne(e){return ie(e.username,e.password)}function ie(e,t){var n=e+":"+t;return n=n.encodeBase64(),"Basic "+n}function re(t){if(e.isBlank(t))return null;var n=t.match(ke);if(null===n)return null;var i=n[1],r=n[3],o=n[4],a=null;a=e.isBlank(o)?t.split(r):t.split(o);var s=a[1];return s&&s.startsWith("/")&&(s=s.slice(1,s.length)),{scheme:i,host:r,port:o,path:s}}function oe(){var e=document;return Math.max(Math.max(e.body.scrollHeight,e.documentElement.scrollHeight),Math.max(e.body.offsetHeight,e.documentElement.offsetHeight),Math.max(e.body.clientHeight,e.documentElement.clientHeight))}function ae(t){if(e.isChromeApp())return t;var n=window.location.host;if(!t.startsWith("http://"+n+"/")&&!t.startsWith("https://"+n+"/")){var i=t.indexOf("://");i>0&&(t=t.substring(i+3)),t=t.replace(":","/"),t=e.trimLeading(t,"/"),t=e.trimTrailing(t,"/"),t=e.url("/proxy/"+t)}return t}function se(t,n,i){angular.isUndefined(n)&&(n=t.scheme());var r=t.host(),o=t.absUrl(),a=o.indexOf("url=");if(a>0){o=o.substr(a+4);var s=decodeURIComponent(o);if(s&&(a=s.indexOf("/proxy/"),a>0)){s=s.substr(a+7),a=s.indexOf("://"),a>0&&(s=s.substr(a+3));var l=s.split("/");if(l.length>=1&&(r=l[0]),angular.isUndefined(i)&&l.length>=2){var u=e.parseIntValue(l[1],"port number");u&&(i=u)}}}angular.isUndefined(i)&&(i=t.port());var c=n+"://"+r;return 80!=i&&(c+=":"+i),c}function le(e){var t=e.url();return t.indexOf("/hawtio/proxy/")>0}function ue(e){return e}function ce(e,t){var n=0,i=null;return function(){var r=Date.now();return r>n&&(n=r+t,i=e()),i}}function de(t,n){void 0===n&&(n="JSON");var i=null;try{i=angular.fromJson(t)}catch(r){e.log.info("Failed to parse "+n+" from: "+t+". "+r)}return i}function pe(t){var n="";return n=t===!0?'<i class="icon-check"></i>':t===!1?'<i class="icon-check-empty"></i>':e.humanizeValue(t)}function he(e,t){var n,i=(e||"").split("?");n=i&&i.length>0?i[1]:"";for(var r=n.split("&"),o=0;o<r.length;o++){var a=r[o].split("=");if(decodeURIComponent(a[0])==t)return decodeURIComponent(a[1])}return null}function fe(e){if(!angular.isNumber(e))return"XXX";var t=e/1e3,n=Math.floor(t/31536e3);if(n)return K(n,"year");var i=Math.floor((t%=31536e3)/86400);if(i)return K(i,"day");var r=Math.floor((t%=86400)/3600);if(r)return K(r,"hour");var o=Math.floor((t%=3600)/60);return o?K(o,"minute"):(t=Math.floor(t%60),t?K(t,"second"):e+" ms")}function ge(){var e=[];try{e=angular.fromJson(localStorage.regexs)}catch(t){delete localStorage.regexs}return e}function me(t){var n=e.getRegexs(),i=function(e){return e.name===t};n.any(i)&&(n=n.exclude(i),e.writeRegexs(n))}function ve(e){localStorage.regexs=angular.toJson(e)}function ye(e){if(e){var t="(.*://.*:)(.*)(@)";e=e.replace(new RegExp(t,"i"),"$1xxxxxx$3")}return e}function be(e,t){if(angular.isUndefined(e)||angular.isUndefined(t))return!0;if(null==e||null==t)return!0;if(e=e.toString().trim().toLowerCase(),t=t.toString().trim().toLowerCase(),0===e.length||0===t.length)return!0;var n=t.split(",");n=n.filter(function(e){return e.length>0}).map(function(e){return e.trim()});var i=n.some(function(t){var n=e.indexOf(t)>-1;return n});return i}e.log=Logger.get("Core"),e.lazyLoaders={},e.numberTypeNames={"byte":!0,"short":!0,"int":!0,"long":!0,"float":!0,"double":!0,"java.lang.byte":!0,"java.lang.short":!0,"java.lang.integer":!0,"java.lang.long":!0,"java.lang.float":!0,"java.lang.double":!0},e.lineCount=t,e.safeNull=n,e.safeNullAsString=i,e.toSearchArgumentArray=r,e.folderMatchesPatterns=o,e.scopeStoreJolokiaHandle=a,e.closeHandle=s,e.onSuccess=l,e.supportsLocalStorage=u,e.isNumberTypeName=c,e.encodeMBeanPath=d,e.escapeMBeanPath=p,e.encodeMBean=h,e.escapeDots=f,e.escapeTreeCssStyles=g,e.showLogPanel=m,e.logLevelClass=v,e.toPath=y,e.parseMBean=b,e.executePostLoginTasks=w,e.executePreLogoutTasks=x,e.logout=k,e.createHref=C,e.hashToString=S,e.stringToHash=T,e.registerForChanges=E;var we=null;e.getOrInitObjectFromLocalStorage=D,e.getResponseHistory=A,e.MAX_RESPONSE_CACHE_SIZE=20,e.register=L,e.unregister=R,e.defaultJolokiaErrorHandler=F,e.logJolokiaStackTrace=q,e.xmlNodeToString=H,e.isTextNode=U,e.fileExtension=B,e.getUUID=z;var xe=/[^\d]*(\d+)\.(\d+)(\.(\d+))?.*/;e.parseVersionNumbers=V,e.versionToSortableString=W,e.time=G,e.compareVersionNumberArrays=J,e.valueToHtml=X,e.tryParseJson=Y,e.maybePlural=K,e.objectNameProperties=Q,e.toSafeDomID=Z,e.forEachLeafFolder=ee,e.extractHashURL=te,e.authHeaderValue=ne,e.getBasicAuthHeader=ie;var ke=new RegExp("^(https?)://(([^:/?#]*)(?::([0-9]+))?)");e.parseUrl=re,e.getDocHeight=oe,e.useProxyIfExternal=ae,e.extractTargetUrl=se,e.isProxyUrl=le,e.doNothing=ue,e.bindModelToSearchParam=ControllerHelpers.bindModelToSearchParam,e.reloadWhenParametersChange=ControllerHelpers.reloadWhenParametersChange,e.throttled=ce,e.parseJsonText=de,e.humanizeValueHtml=pe,e.getQueryParameterValue=he,e.humanizeMilliseconds=fe,e.getRegexs=ge,e.removeRegex=me,e.writeRegexs=ve,e.maskPassword=ye,e.matchFilterIgnoreCase=be}(Core||(Core={}));var CoreFilters;!function(e){var t="hawtio-core-filters",n=angular.module(t,[]);n.filter("valueToHtml",function(){return Core.valueToHtml}),n.filter("humanize",function(){return Core.humanizeValue}),n.filter("humanizeMs",function(){return Core.humanizeMilliseconds}),n.filter("maskPassword",function(){return Core.maskPassword}),hawtioPluginLoader.addModule(t)}(CoreFilters||(CoreFilters={}));var EventServices;!function(e){var t="hawtio-event-tasks",n=Logger.get(t),i=angular.module(t,[]);i.factory("locationChangeStartTasks",function(){return new Core.ParameterizedTasksImpl}),i.factory("postLoginTasks",function(){return Core.postLoginTasks}),i.factory("preLogoutTasks",function(){return Core.preLogoutTasks}),i.factory("postLogoutTasks",function(){return Core.postLogoutTasks}),i.run(["$rootScope","locationChangeStartTasks","postLoginTasks","preLogoutTasks","postLogoutTasks",function(e,t,i,r,o){r.addTask("ResetPreLogoutTasks",function(){r.reset()}),r.addTask("ResetPostLoginTasks",function(){r.reset()}),i.addTask("ResetPostLogoutTasks",function(){o.reset()}),e.$on("$locationChangeStart",function(e,n,i){t.execute(e,n,i)}),n.debug("loaded")}]),hawtioPluginLoader.addModule(t)}(EventServices||(EventServices={}));var FileUpload;!function(e){function t(e,t,n,i){var r=t;r._xhrTransport=function(t){var o=new FileReader;o.onload=function(){if(2===o.readyState){var a=i(o.result);n.request(a,Core.onSuccess(function(n){t.json=o.result,r._onSuccessItem(t,n,n.status,{}),r._onCompleteItem(t,n,n.status,{}),Core.$apply(e)},{error:function(n){r._onErrorItem(t,n,n.status,{}),r._onCompleteItem(t,n,n.status,{}),Core.$apply(e)}}))}},o.readAsText(t._file)}}hawtioPluginLoader.addModule("angularFileUpload"),e.useJolokiaTransport=t}(FileUpload||(FileUpload={}));var FilterHelpers;!function(e){function t(e,t,i,r){void 0===i&&(i=-1),void 0===r&&(r=!0);var o=t.split(" "),a=o.filter(function(t){return n(e,t,i)});return r?a.length===o.length:a.length>0}function n(e,t,i,r){if(void 0===i&&(i=-1),void 0===r&&(r=0),i>0&&r>=i||r>50)return!1;var o=t.toLowerCase(),a=!1;return angular.isString(e)?a=e.toLowerCase().has(o):angular.isNumber(e)?a=(""+e).toLowerCase().has(o):angular.isArray(e)?a=e.some(function(e){return n(e,o,i,r+1)}):angular.isObject(e)&&(a=n(_.values(e),o,i,r)),a}e.log=Logger.get("FilterHelpers"),e.search=t,e.searchObject=n}(FilterHelpers||(FilterHelpers={}));var Core;!function(e){function t(e,t){return t&&0!==t.length?e+"("+t.map(function(e){return angular.isString(e)&&(e=angular.fromJson(e)),e.type}).join(",")+")":e+"()"}e.operationToString=t}(Core||(Core={}));var Log;!function(e){function t(t){if(!t)return"";if(!angular.isArray(t)&&angular.isString(t)&&(t=t.split("\n")),!angular.isArray(t))return"";var n='<ul class="unstyled">\n';return t.each(function(t){n+="<li>"+e.formatStackLine(t)+"</li>\n"}),n+="</ul>\n"}function n(e){var t=i.exec(e);if(t&&t.length>6){var n=t[1],r=t[4],e=t[5],o=t[6];if(n&&r&&o){var a=n,s=n.lastIndexOf(".");s>0&&(a=n.substring(0,s));var l="#/source/view/"+o+"/class/"+a+"/"+r;return angular.isDefined(e)&&(l+="?line="+e),"<div class='stack-line'> at <a href='"+l+"'>"+n+"</a>(<span class='fileName'>"+r+"</span>:<span class='lineNumber'>"+e+"</span>)[<span class='mavenCoords'>"+o+"</span>]</div>"}}var u=!0;return e&&(e=e.trim(),e.startsWith("at")&&(e=" "+e,u=!1)),u?'<pre class="stack-line bold">'+e+"</pre>":'<pre class="stack-line">'+e+"</pre>"}var i=/\s*at\s+([\w\.$_]+(\.([\w$_]+))*)\((.*)?:(\d+)\).*\[(.*)\]/;e.formatStackTrace=t,e.formatStackLine=n}(Log||(Log={}));var ObjectHelpers;!function(e){function t(e,t,n){if(!e||0===e.length)return{};var i={};return e.forEach(function(e){angular.isObject(e)&&(i[e[t]]=e,angular.isFunction(n)&&n(e))}),i}e.toMap=t}(ObjectHelpers||(ObjectHelpers={}));var PluginHelpers;!function(e){function t(e,t){return function(n,i){return e.controller(t+"."+n,i)}}function n(e){return function(t,n){return void 0===n&&(n=!0),{templateUrl:UrlHelpers.join(e,t),reloadOnSearch:n}}}e.createControllerFunction=t,e.createRoutingFunction=n}(PluginHelpers||(PluginHelpers={}));var PollHelpers;!function(e){function t(e,t,i,r,o){if(void 0===i&&(i=2e3),e.$hasPoller)return void n.debug("scope already has polling set up, ignoring subsequent polling request");e.$hasPoller=!0,r||(r=HawtioCore.injector.get("$timeout")),o||(o=HawtioCore.injector.get("jolokia"));var a=void 0,s=e.name||"anonymous scope",l=function(){t(function(){var t=e.$keepPolling;angular.isFunction(t)||(t=function(){return!o||o.isRunning()}),t()&&e.$hasPoller&&(a=r(l,i))})};return e.$on&&(e.$on("$destroy",function(){n.debug("scope",s," being destroyed, cancelling polling"),delete e.$hasPoller,r.cancel(a)}),e.$on("$routeChangeStart",function(){n.debug("route changing, cancelling polling for scope: ",s),delete e.$hasPoller,r.cancel(a)})),l}var n=Logger.get("PollHelpers");e.setupPolling=t}(PollHelpers||(PollHelpers={}));var Core;!function(e){function t(t,n){var i=null;return angular.isDefined(t)&&(i=e.parseJsonText(t,"localStorage for "+n)),i}function n(t,n,i){angular.forEach(i,function(i,r){t[r]=i.value;var o=i.converter,a=i.formatter;if(a||(a=function(e){return e}),o||(o=function(e){return e}),r in n){var s=o(n[r]);e.log.debug("from local storage, setting ",r," to ",s),t[r]=s}else{var s=i.value;e.log.debug("from default, setting ",r," to ",s),n[r]=s}var l=i.override;l||(l=function(t,o){if(t!==o){angular.isFunction(i.pre)&&i.pre(t);var s=a(t);e.log.debug("to local storage, setting ",r," to ",s),n[r]=s,angular.isFunction(i.post)&&i.post(t)}}),i.compareAsObject?t.$watch(r,l,!0):t.$watch(r,l)})}function i(e,t,n){
|
|
3226
|
|
-return!t||t(e,n)}e.parsePreferencesJson=t,e.initPreferenceScope=n,e.isValidFunction=i}(Core||(Core={}));var SelectionHelpers;!function(e){function t(e){e.forEach(function(e){e.selected=!1})}function n(e,t){e.forEach(function(e){t?t(e)&&(e.selected=!0):e.selected=!0})}function i(e){e.selected=!e.selected}function r(e,n){t(e),i(n)}function o(e,t,n){return t.forEach(function(t){t.selected=e.any(function(e){return e[n]===t[n]})}),t.filter(function(e){return e.selected})}function a(e,t,n){var o=n.ctrlKey;o?i(t):t.selected?i(t):r(e,t)}function s(e,t,n){return h(e.selected,t,n)}function l(e){e.length=0}function u(e,t,n){var i=n||t;e.any(i)?e.remove(i):e.add(t)}function c(e,t){return angular.isDefined(e)?e:t}function d(e){return c(e,!1)}function p(e){return c(e,!0)}function h(e,t,n){return e?p(t):d(n)}function f(e,t,n,i,r){if(!e)return d(i);var o=r||t;return h(e.any(o),n,i)}function g(e,t,n,i,r){if(0===e.length)return p(n);var o=r||t;return angular.isArray(t)?h(e.intersect(t).length===e.length,n,i):h(e.any(o),n,i)}function m(e,t,n){var i=[];n?e.forEach(function(e){var r=t.find(function(t){return e[n]===t[n]});r&&i.push(r)}):e.forEach(function(e){var n=t.find(function(t){return _.isEqual(e,t)});n&&i.push(n)}),l(e),e.add(i)}function v(e){e.selectNone=t,e.selectAll=n,e.toggleSelection=i,e.selectOne=r,e.select=a,e.clearGroup=l,e.toggleSelectionFromGroup=u,e.isInGroup=f,e.viewOnly=!1,e.filterByGroup=g}Logger.get("SelectionHelpers");e.selectNone=t,e.selectAll=n,e.toggleSelection=i,e.selectOne=r,e.sync=o,e.select=a,e.isSelected=s,e.clearGroup=l,e.toggleSelectionFromGroup=u,e.isInGroup=f,e.filterByGroup=g,e.syncGroupSelection=m,e.decorate=v}(SelectionHelpers||(SelectionHelpers={}));var StorageHelpers;!function(e){function t(e){var t=e.$scope.name+":"||"::",n=t+e.modelName,i=e.to||Core.doNothing,r=e.from||Core.doNothing,o=function(t){angular.isFunction(e.onChange)&&e.onChange(t);var r=i(t);return e.localStorage[n]=r,r},a=function(t){return(void 0===t||null===t)&&(t=e.localStorage[n]),r(t)},s=a(void 0);ControllerHelpers.bindModelToSearchParam(e.$scope,e.$location,e.modelName,e.paramName,s||e.initialValue,o,a)}e.bindModelToLocalStorage=t}(StorageHelpers||(StorageHelpers={}));var UI;!function(e){function t(e,n){return n in e?e:e.$parent?t(e.$parent,n):null}function n(e,t,n){if(e in t){var i=t[e];if(i&&!i.isBlank())return i}return n}function i(e,t,n,i,r){void 0===r&&(r=null),t.$observe(n,function(t){angular.isDefined(t)?e[n]=t:e[n]=i,angular.isDefined(r)&&r&&r(e[n])})}function r(){if(!angular.isDefined(e.scrollBarWidth)){var t=document.createElement("div");t.innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',t=t.firstChild,document.body.appendChild(t),e.scrollBarWidth=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return e.scrollBarWidth}e.scrollBarWidth=null,e.findParentWith=t,e.getIfSet=n,e.observe=i,e.getScrollbarWidth=r}(UI||(UI={}));var templateCache;!function(e){e.pluginName="hawtio-template-cache",e._module=angular.module(e.pluginName,[]),e._module.config(["$provide",function(e){e.decorator("$templateCache",["$delegate",function(e){var t=(Logger.get("$templateCache"),e.put);e.watches={},e.put=function(n,i){if(t(n,i),n in e.watches){_.forEach(e.watches[n],function(e){e(i)});delete e.watches[n]}};var n=e.get;return e.get=function(e){var t=n(e);return t},e}]),e.decorator("$templateRequest",["$rootScope","$timeout","$q","$templateCache","$delegate",function(e,t,n,i,r){return function(e,o){var a=(Logger.get("$templateRequest"),i.get(e)),s=n.defer();return angular.isDefined(a)?(t(function(){s.resolve(a)},1),s.promise):"watches"in i?(i.watches[e]||(i.watches[e]=[]),i.watches[e].push(function(e){s.resolve(e)}),s.promise):r(e,o)}}])}]),hawtioPluginLoader.addModule("ngRoute"),hawtioPluginLoader.addModule(e.pluginName)}(templateCache||(templateCache={})),function(e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else{if("function"==typeof define&&define.amd)return define([],e);this.CodeMirror=e()}}(function(){"use strict";function e(n,i){if(!(this instanceof e))return new e(n,i);this.options=i=i?Cr(i):{},Cr(Fo,i,!1),h(i);var r=i.value;"string"==typeof r&&(r=new ua(r,i.mode)),this.doc=r;var o=this.display=new t(n,r);o.wrapper.CodeMirror=this,u(this),s(this),i.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),i.autofocus&&!go&&Mt(this),v(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new mr,keySeq:null},io&&11>ro&&setTimeout(Sr(Dt,this,!0),20),At(this),Or(),rt(this),this.curOp.forceUpdate=!0,Li(this,r),i.autofocus&&!go||Pr()==o.input?setTimeout(Sr(rn,this),20):on(this);for(var a in qo)qo.hasOwnProperty(a)&&qo[a](this,i[a],Ho);k(this);for(var l=0;l<Vo.length;++l)Vo[l](this);at(this)}function t(e,t){var n=this,i=n.input=Er("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");oo?i.style.width="1000px":i.setAttribute("wrap","off"),fo&&(i.style.border="1px solid black"),i.setAttribute("autocorrect","off"),i.setAttribute("autocapitalize","off"),i.setAttribute("spellcheck","false"),n.inputDiv=Er("div",[i],null,"overflow: hidden; position: relative; width: 3px; height: 0px;"),n.scrollbarFiller=Er("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("not-content","true"),n.gutterFiller=Er("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("not-content","true"),n.lineDiv=Er("div",null,"CodeMirror-code"),n.selectionDiv=Er("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=Er("div",null,"CodeMirror-cursors"),n.measure=Er("div",null,"CodeMirror-measure"),n.lineMeasure=Er("div",null,"CodeMirror-measure"),n.lineSpace=Er("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none"),n.mover=Er("div",[Er("div",[n.lineSpace],"CodeMirror-lines")],null,"position: relative"),n.sizer=Er("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=Er("div",null,null,"position: absolute; height: "+ba+"px; width: 1px;"),n.gutters=Er("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=Er("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=Er("div",[n.inputDiv,n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),io&&8>ro&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),fo&&(i.style.width="0px"),oo||(n.scroller.draggable=!0),co&&(n.inputDiv.style.height="1px",n.inputDiv.style.position="absolute"),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.reportedViewFrom=n.reportedViewTo=t.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.prevInput="",n.alignWidgets=!1,n.pollingFast=!1,n.poll=new mr,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.inaccurateSelection=!1,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),i(t)}function i(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Se(e,100),e.state.modeGen++,e.curOp&&bt(e)}function r(e){e.options.lineWrapping?(ja(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Aa(e.display.wrapper,"CodeMirror-wrap"),p(e)),a(e),bt(e),Ve(e),setTimeout(function(){y(e)},100)}function o(e){var t=nt(e.display),n=e.options.lineWrapping,i=n&&Math.max(5,e.display.scroller.clientWidth/it(e.display)-3);return function(r){if(ui(e.doc,r))return 0;var o=0;if(r.widgets)for(var a=0;a<r.widgets.length;a++)r.widgets[a].height&&(o+=r.widgets[a].height);return n?o+(Math.ceil(r.text.length/i)||1)*t:o+t}}function a(e){var t=e.doc,n=o(e);t.iter(function(e){var t=n(e);t!=e.height&&Hi(e,t)})}function s(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ve(e)}function l(e){u(e),bt(e),setTimeout(function(){x(e)},20)}function u(e){var t=e.display.gutters,n=e.options.gutters;Dr(t);for(var i=0;i<n.length;++i){var r=n[i],o=t.appendChild(Er("div",null,"CodeMirror-gutter "+r));"CodeMirror-linenumbers"==r&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=i?"":"none",c(e)}function c(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function d(e){if(0==e.height)return 0;for(var t,n=e.text.length,i=e;t=ni(i);){var r=t.find(0,!0);i=r.from.line,n+=r.from.ch-r.to.ch}for(i=e;t=ii(i);){var r=t.find(0,!0);n-=i.text.length-r.from.ch,i=r.to.line,n+=i.text.length-r.to.ch}return n}function p(e){var t=e.display,n=e.doc;t.maxLine=Ri(n,n.first),t.maxLineLength=d(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=d(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function h(e){var t=wr(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function f(e){var t=e.display,n=t.gutters.offsetWidth,i=Math.round(e.doc.height+De(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Ie(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function g(e,t,n){this.cm=n;var i=this.vert=Er("div",[Er("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=Er("div",[Er("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(r),ga(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),ga(r,"scroll",function(){r.clientWidth&&t(r.scrollLeft,"horizontal")}),this.checkedOverlay=!1,io&&8>ro&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function m(){}function v(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Aa(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ga(e,"mousedown",function(){t.state.focused&&setTimeout(Sr(Mt,t),0)}),e.setAttribute("not-content","true")},function(e,n){"horizontal"==n?Wt(t,e):Vt(t,e)},t),t.display.scrollbars.addClass&&ja(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=f(e));var n=e.display.barWidth,i=e.display.barHeight;b(e,t);for(var r=0;4>r&&n!=e.display.barWidth||i!=e.display.barHeight;r++)n!=e.display.barWidth&&e.options.lineWrapping&&I(e),b(e,f(e)),n=e.display.barWidth,i=e.display.barHeight}function b(e,t){var n=e.display,i=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function w(e,t,n){var i=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;i=Math.floor(i-Ee(e));var r=n&&null!=n.bottom?n.bottom:i+e.wrapper.clientHeight,o=Bi(t,i),a=Bi(t,r);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;o>s?(o=s,a=Bi(t,zi(Ri(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=Bi(t,zi(Ri(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function x(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=S(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,o=i+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&n[a].gutter&&(n[a].gutter.style.left=o);var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=i+r+"px")}}function k(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=C(e.options,t.first+t.size-1),i=e.display;if(n.length!=i.lineNumChars){var r=i.measure.appendChild(Er("div",[Er("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=r.firstChild.offsetWidth,a=r.offsetWidth-o;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(o,i.lineGutter.offsetWidth-a),i.lineNumWidth=i.lineNumInnerWidth+a,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",c(e),!0}return!1}function C(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function S(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function _(e,t,n){var i=e.display;this.viewport=t,this.visible=w(i,e.doc,t),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=Pe(e),this.force=n,this.dims=A(e)}function T(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ie(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ie(e)+"px",t.scrollbarsClipped=!0)}function $(e,t){var n=e.display,i=e.doc;if(t.editorIsHidden)return xt(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==_t(e))return!1;k(e)&&(xt(e),t.dims=A(e));var r=i.first+i.size,o=Math.max(t.visible.from-e.options.viewportMargin,i.first),a=Math.min(r,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(i.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(r,n.viewTo)),ko&&(o=si(e.doc,o),a=li(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;St(e,o,a),n.viewOffset=zi(Ri(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=_t(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Pr();return l>4&&(n.lineDiv.style.display="none"),j(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&Pr()!=u&&u.offsetHeight&&u.focus(),Dr(n.cursorDiv),Dr(n.selectionDiv),n.gutters.style.height=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Se(e,400)),n.updateLineNumbers=null,!0}function E(e,t){for(var n=t.force,i=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Pe(e))n=!0;else if(n=!1,i&&null!=i.top&&(i={top:Math.min(e.doc.height+De(e.display)-Ae(e),i.top)}),t.visible=w(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!$(e,t))break;I(e);var o=f(e);we(e),M(e,o),y(e,o)}cr(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(cr(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function D(e,t){var n=new _(e,t);if($(e,n)){I(e),E(e,n);var i=f(e);we(e),M(e,i),y(e,i)}}function M(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+Ie(e),t.clientHeight)+"px"}function I(e){for(var t=e.display,n=t.lineDiv.offsetTop,i=0;i<t.view.length;i++){var r,o=t.view[i];if(!o.hidden){if(io&&8>ro){var a=o.node.offsetTop+o.node.offsetHeight;r=a-n,n=a}else{var s=o.node.getBoundingClientRect();r=s.bottom-s.top}var l=o.line.height-r;if(2>r&&(r=nt(t)),(l>.001||-.001>l)&&(Hi(o.line,r),P(o.line),o.rest))for(var u=0;u<o.rest.length;u++)P(o.rest[u])}}}function P(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.offsetHeight}function A(e){for(var t=e.display,n={},i={},r=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+r,i[e.options.gutters[a]]=o.clientWidth;return{fixedPos:S(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:t.wrapper.clientWidth}}function j(e,t,n){function i(t){var n=t.nextSibling;return oo&&mo&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var r=e.display,o=e.options.lineNumbers,a=r.lineDiv,s=a.firstChild,l=r.view,u=r.viewFrom,c=0;c<l.length;c++){var d=l[c];if(d.hidden);else if(d.node){for(;s!=d.node;)s=i(s);var p=o&&null!=t&&u>=t&&d.lineNumber;d.changes&&(wr(d.changes,"gutter")>-1&&(p=!1),N(e,d,u,n)),p&&(Dr(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(C(e.options,u)))),s=d.node.nextSibling}else{var h=B(e,d,u,n);a.insertBefore(h,s)}u+=d.size}for(;s;)s=i(s)}function N(e,t,n,i){for(var r=0;r<t.changes.length;r++){var o=t.changes[r];"text"==o?F(e,t):"gutter"==o?H(e,t,n,i):"class"==o?q(t):"widget"==o&&U(t,i)}t.changes=null}function O(e){return e.node==e.text&&(e.node=Er("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),io&&8>ro&&(e.node.style.zIndex=2)),e.node}function L(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=O(e);e.background=n.insertBefore(Er("div",null,t),n.firstChild)}}function R(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):_i(e,t)}function F(e,t){var n=t.text.className,i=R(e,t);t.text==t.node&&(t.node=i.pre),t.text.parentNode.replaceChild(i.pre,t.text),t.text=i.pre,i.bgClass!=t.bgClass||i.textClass!=t.textClass?(t.bgClass=i.bgClass,t.textClass=i.textClass,q(t)):n&&(t.text.className=n)}function q(e){L(e),e.line.wrapClass?O(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function H(e,t,n,i){t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null);var r=t.line.gutterMarkers;if(e.options.lineNumbers||r){var o=O(t),a=t.gutter=o.insertBefore(Er("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),t.text);if(t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||r&&r["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(Er("div",C(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),r)for(var s=0;s<e.options.gutters.length;++s){var l=e.options.gutters[s],u=r.hasOwnProperty(l)&&r[l];u&&a.appendChild(Er("div",[u],"CodeMirror-gutter-elt","left: "+i.gutterLeft[l]+"px; width: "+i.gutterWidth[l]+"px"))}}}function U(e,t){e.alignable&&(e.alignable=null);for(var n,i=e.node.firstChild;i;i=n){var n=i.nextSibling;"CodeMirror-linewidget"==i.className&&e.node.removeChild(i)}z(e,t)}function B(e,t,n,i){var r=R(e,t);return t.text=t.node=r.pre,r.bgClass&&(t.bgClass=r.bgClass),r.textClass&&(t.textClass=r.textClass),q(t),H(e,t,n,i),z(t,i),t.node}function z(e,t){if(V(e.line,e,t,!0),e.rest)for(var n=0;n<e.rest.length;n++)V(e.rest[n],e,t,!1)}function V(e,t,n,i){if(e.widgets)for(var r=O(t),o=0,a=e.widgets;o<a.length;++o){var s=a[o],l=Er("div",[s.node],"CodeMirror-linewidget");s.handleMouseEvents||l.setAttribute("cm-ignore-events","true"),W(s,l,t,n),i&&s.above?r.insertBefore(l,t.gutter||t.text):r.appendChild(l),cr(s,"redraw")}}function W(e,t,n,i){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var r=i.wrapperWidth;t.style.left=i.fixedPos+"px",e.coverGutter||(r-=i.gutterTotalWidth,t.style.paddingLeft=i.gutterTotalWidth+"px"),t.style.width=r+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-i.gutterTotalWidth+"px"))}function G(e){return Co(e.line,e.ch)}function J(e,t){return So(e,t)<0?t:e}function X(e,t){return So(e,t)<0?e:t}function Y(e,t){this.ranges=e,this.primIndex=t}function K(e,t){this.anchor=e,this.head=t}function Q(e,t){var n=e[t];e.sort(function(e,t){return So(e.from(),t.from())}),t=wr(e,n);for(var i=1;i<e.length;i++){var r=e[i],o=e[i-1];if(So(o.to(),r.from())>=0){var a=X(o.from(),r.from()),s=J(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;t>=i&&--t,e.splice(--i,2,new K(l?s:a,l?a:s))}}return new Y(e,t)}function Z(e,t){return new Y([new K(e,t||e)],0)}function ee(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function te(e,t){if(t.line<e.first)return Co(e.first,0);var n=e.first+e.size-1;return t.line>n?Co(n,Ri(e,n).text.length):ne(t,Ri(e,t.line).text.length)}function ne(e,t){var n=e.ch;return null==n||n>t?Co(e.line,t):0>n?Co(e.line,0):e}function ie(e,t){return t>=e.first&&t<e.first+e.size}function re(e,t){for(var n=[],i=0;i<t.length;i++)n[i]=te(e,t[i]);return n}function oe(e,t,n,i){if(e.cm&&e.cm.display.shift||e.extend){var r=t.anchor;if(i){var o=So(n,r)<0;o!=So(i,r)<0?(r=n,n=i):o!=So(n,i)<0&&(n=i)}return new K(r,n)}return new K(i||n,n)}function ae(e,t,n,i){pe(e,new Y([oe(e,e.sel.primary(),t,n)],0),i)}function se(e,t,n){for(var i=[],r=0;r<e.sel.ranges.length;r++)i[r]=oe(e,e.sel.ranges[r],t[r],null);var o=Q(i,e.sel.primIndex);pe(e,o,n)}function le(e,t,n,i){var r=e.sel.ranges.slice(0);r[t]=n,pe(e,Q(r,e.sel.primIndex),i)}function ue(e,t,n,i){pe(e,Z(t,n),i)}function ce(e,t){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new K(te(e,t[n].anchor),te(e,t[n].head))}};return va(e,"beforeSelectionChange",e,n),e.cm&&va(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Q(n.ranges,n.ranges.length-1):t}function de(e,t,n){var i=e.history.done,r=br(i);r&&r.ranges?(i[i.length-1]=t,he(e,t,n)):pe(e,t,n)}function pe(e,t,n){he(e,t,n),Qi(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function he(e,t,n){(fr(e,"beforeSelectionChange")||e.cm&&fr(e.cm,"beforeSelectionChange"))&&(t=ce(e,t));var i=n&&n.bias||(So(t.primary().head,e.sel.primary().head)<0?-1:1);fe(e,me(e,t,i,!0)),n&&n.scroll===!1||!e.cm||_n(e.cm)}function fe(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,hr(e.cm)),cr(e,"cursorActivity",e))}function ge(e){fe(e,me(e,e.sel,null,!1),xa)}function me(e,t,n,i){for(var r,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=ve(e,a.anchor,n,i),l=ve(e,a.head,n,i);(r||s!=a.anchor||l!=a.head)&&(r||(r=t.ranges.slice(0,o)),r[o]=new K(s,l))}return r?Q(r,t.primIndex):t}function ve(e,t,n,i){var r=!1,o=t,a=n||1;e.cantEdit=!1;e:for(;;){var s=Ri(e,o.line);if(s.markedSpans)for(var l=0;l<s.markedSpans.length;++l){var u=s.markedSpans[l],c=u.marker;if((null==u.from||(c.inclusiveLeft?u.from<=o.ch:u.from<o.ch))&&(null==u.to||(c.inclusiveRight?u.to>=o.ch:u.to>o.ch))){if(i&&(va(c,"beforeCursorEnter"),c.explicitlyCleared)){if(s.markedSpans){--l;continue}break}if(!c.atomic)continue;var d=c.find(0>a?-1:1);if(0==So(d,o)&&(d.ch+=a,d.ch<0?d=d.line>e.first?te(e,Co(d.line-1)):null:d.ch>s.text.length&&(d=d.line<e.first+e.size-1?Co(d.line+1,0):null),!d)){if(r)return i?(e.cantEdit=!0,Co(e.first,0)):ve(e,t,n,!0);r=!0,d=t,a=-a}o=d;continue e}}return o}}function ye(e){for(var t=e.display,n=e.doc,i={},r=i.cursors=document.createDocumentFragment(),o=i.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++){var s=n.sel.ranges[a],l=s.empty();(l||e.options.showCursorWhenSelecting)&&xe(e,s,r),l||ke(e,s,o)}if(e.options.moveInputWithCursor){var u=Ke(e,n.sel.primary().head,"div"),c=t.wrapper.getBoundingClientRect(),d=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,u.top+d.top-c.top)),i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,u.left+d.left-c.left))}return i}function be(e,t){Mr(e.display.cursorDiv,t.cursors),Mr(e.display.selectionDiv,t.selection),null!=t.teTop&&(e.display.inputDiv.style.top=t.teTop+"px",e.display.inputDiv.style.left=t.teLeft+"px")}function we(e){be(e,ye(e))}function xe(e,t,n){var i=Ke(e,t.head,"div",null,null,!e.options.singleCursorHeightPerLine),r=n.appendChild(Er("div"," ","CodeMirror-cursor"));if(r.style.left=i.left+"px",r.style.top=i.top+"px",r.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var o=n.appendChild(Er("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=i.other.left+"px",o.style.top=i.other.top+"px",o.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function ke(e,t,n){function i(e,t,n,i){0>t&&(t=0),t=Math.round(t),i=Math.round(i),s.appendChild(Er("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?c-e:n)+"px; height: "+(i-t)+"px"))}function r(t,n,r){function o(n,i){return Ye(e,Co(t,n),"div",d,i)}var s,l,d=Ri(a,t),p=d.text.length;return Hr(Vi(d),n||0,null==r?p:r,function(e,t,a){var d,h,f,g=o(e,"left");if(e==t)d=g,h=f=g.left;else{if(d=o(t-1,"right"),"rtl"==a){var m=g;g=d,d=m}h=g.left,f=d.right}null==n&&0==e&&(h=u),d.top-g.top>3&&(i(h,g.top,null,g.bottom),h=u,g.bottom<d.top&&i(h,g.bottom,null,d.top)),null==r&&t==p&&(f=c),(!s||g.top<s.top||g.top==s.top&&g.left<s.left)&&(s=g),(!l||d.bottom>l.bottom||d.bottom==l.bottom&&d.right>l.right)&&(l=d),u+1>h&&(h=u),i(h,d.top,f-h,d.bottom)}),{start:s,end:l}}var o=e.display,a=e.doc,s=document.createDocumentFragment(),l=Me(e.display),u=l.left,c=Math.max(o.sizerWidth,Pe(e)-o.sizer.offsetLeft)-l.right,d=t.from(),p=t.to();if(d.line==p.line)r(d.line,d.ch,p.ch);else{var h=Ri(a,d.line),f=Ri(a,p.line),g=oi(h)==oi(f),m=r(d.line,d.ch,g?h.text.length+1:null).end,v=r(p.line,g?0:null,p.ch).start;g&&(m.top<v.top-2?(i(m.right,m.top,null,m.bottom),i(u,v.top,v.left,v.bottom)):i(m.right,m.top,v.left-m.right,m.bottom)),m.bottom<v.top&&i(u,m.bottom,null,v.top)}n.appendChild(s)}function Ce(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Se(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,Sr(_e,e))}function _e(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,i=Go(t.mode,$e(e,t.frontier)),r=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=xi(e,o,i,!0);o.styles=s.styles;var l=o.styleClasses,u=s.classes;u?o.styleClasses=u:l&&(o.styleClasses=null);for(var c=!a||a.length!=o.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),d=0;!c&&d<a.length;++d)c=a[d]!=o.styles[d];c&&r.push(t.frontier),o.stateAfter=Go(t.mode,i)}else Ci(e,o.text,i),o.stateAfter=t.frontier%5==0?Go(t.mode,i):null;return++t.frontier,+new Date>n?(Se(e,e.options.workDelay),!0):void 0}),r.length&&ht(e,function(){for(var t=0;t<r.length;t++)wt(e,r[t],"text")})}}function Te(e,t,n){for(var i,r,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Ri(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var u=Sa(l.text,null,e.options.tabSize);(null==r||i>u)&&(r=s-1,i=u)}return r}function $e(e,t,n){var i=e.doc,r=e.display;if(!i.mode.startState)return!0;var o=Te(e,t,n),a=o>i.first&&Ri(i,o-1).stateAfter;return a=a?Go(i.mode,a):Jo(i.mode),i.iter(o,t,function(n){Ci(e,n.text,a);var s=o==t-1||o%5==0||o>=r.viewFrom&&o<r.viewTo;n.stateAfter=s?Go(i.mode,a):null,++o}),n&&(i.frontier=o),a}function Ee(e){return e.lineSpace.offsetTop}function De(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Me(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Mr(e.measure,Er("pre","x")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(e.cachedPaddingH=i),i}function Ie(e){return ba-e.display.nativeBarWidth}function Pe(e){return e.display.scroller.clientWidth-Ie(e)-e.display.barWidth}function Ae(e){return e.display.scroller.clientHeight-Ie(e)-e.display.barHeight}function je(e,t,n){var i=e.options.lineWrapping,r=i&&Pe(e);if(!t.measure.heights||i&&t.measure.width!=r){var o=t.measure.heights=[];if(i){t.measure.width=r;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],u=a[s+1];Math.abs(l.bottom-u.bottom)>2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ne(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var i=0;i<e.rest.length;i++)if(e.rest[i]==t)return{map:e.measure.maps[i],cache:e.measure.caches[i]};for(var i=0;i<e.rest.length;i++)if(Ui(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Oe(e,t){t=oi(t);var n=Ui(t),i=e.display.externalMeasured=new vt(e.doc,t,n);i.lineN=n;var r=i.built=_i(e,i);return i.text=r.pre,Mr(e.display.lineMeasure,r.pre),i}function Le(e,t,n,i){return qe(e,Fe(e,t),n,i)}function Re(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[kt(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Fe(e,t){var n=Ui(t),i=Re(e,n);i&&!i.text?i=null:i&&i.changes&&N(e,i,n,A(e)),i||(i=Oe(e,t));var r=Ne(i,t,n);return{line:t,view:i,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function qe(e,t,n,i,r){t.before&&(n=-1);var o,a=n+(i||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(je(e,t.view,t.rect),t.hasHeights=!0),o=He(e,t,n,i),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}function He(e,t,n,i){for(var r,o,a,s,l=t.map,u=0;u<l.length;u+=3){var c=l[u],d=l[u+1];if(c>n?(o=0,a=1,s="left"):d>n?(o=n-c,a=o+1):(u==l.length-3||n==d&&l[u+3]>n)&&(a=d-c,o=a-1,n>=d&&(s="right")),null!=o){if(r=l[u+2],c==d&&i==(r.insertLeft?"left":"right")&&(s=i),"left"==i&&0==o)for(;u&&l[u-2]==l[u-3]&&l[u-1].insertLeft;)r=l[(u-=3)+2],s="left";if("right"==i&&o==d-c)for(;u<l.length-3&&l[u+3]==l[u+4]&&!l[u+5].insertLeft;)r=l[(u+=3)+2],s="right";break}}var p;if(3==r.nodeType){for(var u=0;4>u;u++){for(;o&&$r(t.line.text.charAt(c+o));)--o;for(;d>c+a&&$r(t.line.text.charAt(c+a));)++a;if(io&&9>ro&&0==o&&a==d-c)p=r.parentNode.getBoundingClientRect();else if(io&&e.options.lineWrapping){var h=$a(r,o,a).getClientRects();p=h.length?h["right"==i?h.length-1:0]:Eo}else p=$a(r,o,a).getBoundingClientRect()||Eo;if(p.left||p.right||0==o)break;a=o,o-=1,s="right"}io&&11>ro&&(p=Ue(e.display.measure,p))}else{o>0&&(s=i="right");var h;p=e.options.lineWrapping&&(h=r.getClientRects()).length>1?h["right"==i?h.length-1:0]:r.getBoundingClientRect()}if(io&&9>ro&&!o&&(!p||!p.left&&!p.right)){var f=r.parentNode.getClientRects()[0];p=f?{left:f.left,right:f.left+it(e.display),top:f.top,bottom:f.bottom}:Eo}for(var g=p.top-t.rect.top,m=p.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights,u=0;u<y.length-1&&!(v<y[u]);u++);var b=u?y[u-1]:0,w=y[u],x={left:("right"==s?p.right:p.left)-t.rect.left,right:("left"==s?p.left:p.right)-t.rect.left,top:b,bottom:w};return p.left||p.right||(x.bogus=!0),e.options.singleCursorHeightPerLine||(x.rtop=g,x.rbottom=m),x}function Ue(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!qr(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;
|
|
3227
|
|
-return{left:t.left*n,right:t.right*n,top:t.top*i,bottom:t.bottom*i}}function Be(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function ze(e){e.display.externalMeasure=null,Dr(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Be(e.display.view[t])}function Ve(e){ze(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function We(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ge(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function Je(e,t,n,i){if(t.widgets)for(var r=0;r<t.widgets.length;++r)if(t.widgets[r].above){var o=pi(t.widgets[r]);n.top+=o,n.bottom+=o}if("line"==i)return n;i||(i="local");var a=zi(t);if("local"==i?a+=Ee(e.display):a-=e.display.viewOffset,"page"==i||"window"==i){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==i?0:Ge());var l=s.left+("window"==i?0:We());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function Xe(e,t,n){if("div"==n)return t;var i=t.left,r=t.top;if("page"==n)i-=We(),r-=Ge();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();i+=o.left,r+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:i-a.left,top:r-a.top}}function Ye(e,t,n,i,r){return i||(i=Ri(e.doc,t.line)),Je(e,i,Le(e,i,t.ch,r),n)}function Ke(e,t,n,i,r,o){function a(t,a){var s=qe(e,r,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,Je(e,i,s,n)}function s(e,t){var n=l[t],i=n.level%2;return e==Ur(n)&&t&&n.level<l[t-1].level?(n=l[--t],e=Br(n)-(n.level%2?0:1),i=!0):e==Br(n)&&t<l.length-1&&n.level<l[t+1].level&&(n=l[++t],e=Ur(n)-n.level%2,i=!1),i&&e==n.to&&e>n.from?a(e-1):a(e,i)}i=i||Ri(e.doc,t.line),r||(r=Fe(e,i));var l=Vi(i),u=t.ch;if(!l)return a(u);var c=Yr(l,u),d=s(u,c);return null!=Ua&&(d.other=s(u,Ua)),d}function Qe(e,t){var n=0,t=te(e.doc,t);e.options.lineWrapping||(n=it(e.display)*t.ch);var i=Ri(e.doc,t.line),r=zi(i)+Ee(e.display);return{left:n,right:n,top:r,bottom:r+i.height}}function Ze(e,t,n,i){var r=Co(e,t);return r.xRel=i,n&&(r.outside=!0),r}function et(e,t,n){var i=e.doc;if(n+=e.display.viewOffset,0>n)return Ze(i.first,0,!0,-1);var r=Bi(i,n),o=i.first+i.size-1;if(r>o)return Ze(i.first+i.size-1,Ri(i,o).text.length,!0,1);0>t&&(t=0);for(var a=Ri(i,r);;){var s=tt(e,a,r,t,n),l=ii(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;r=Ui(a=u.to.line)}}function tt(e,t,n,i,r){function o(i){var r=Ke(e,Co(n,i),"line",t,u);return s=!0,a>r.bottom?r.left-l:a<r.top?r.left+l:(s=!1,r.left)}var a=r-zi(t),s=!1,l=2*e.display.wrapper.clientWidth,u=Fe(e,t),c=Vi(t),d=t.text.length,p=zr(t),h=Vr(t),f=o(p),g=s,m=o(h),v=s;if(i>m)return Ze(n,h,v,1);for(;;){if(c?h==p||h==Qr(t,p,1):1>=h-p){for(var y=f>i||m-i>=i-f?p:h,b=i-(y==p?f:m);$r(t.text.charAt(y));)++y;var w=Ze(n,y,y==p?g:v,-1>b?-1:b>1?1:0);return w}var x=Math.ceil(d/2),k=p+x;if(c){k=p;for(var C=0;x>C;++C)k=Qr(t,k,1)}var S=o(k);S>i?(h=k,m=S,(v=s)&&(m+=1e3),d=x):(p=k,f=S,g=s,d-=x)}}function nt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==_o){_o=Er("pre");for(var t=0;49>t;++t)_o.appendChild(document.createTextNode("x")),_o.appendChild(Er("br"));_o.appendChild(document.createTextNode("x"))}Mr(e.measure,_o);var n=_o.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Dr(e.measure),n||1}function it(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Er("span","xxxxxxxxxx"),n=Er("pre",[t]);Mr(e.measure,n);var i=t.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(e.cachedCharWidth=r),r||10}function rt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++Mo},Do?Do.ops.push(e.curOp):e.curOp.ownsGroup=Do={ops:[e.curOp],delayedCallbacks:[]}}function ot(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n]();for(var i=0;i<e.ops.length;i++){var r=e.ops[i];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++](r.cm)}}while(n<t.length)}function at(e){var t=e.curOp,n=t.ownsGroup;if(n)try{ot(n)}finally{Do=null;for(var i=0;i<n.ops.length;i++)n.ops[i].cm.curOp=null;st(n)}}function st(e){for(var t=e.ops,n=0;n<t.length;n++)lt(t[n]);for(var n=0;n<t.length;n++)ut(t[n]);for(var n=0;n<t.length;n++)ct(t[n]);for(var n=0;n<t.length;n++)dt(t[n]);for(var n=0;n<t.length;n++)pt(t[n])}function lt(e){var t=e.cm,n=t.display;T(t),e.updateMaxLine&&p(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new _(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ut(e){e.updatedDisplay=e.mustUpdate&&$(e.cm,e.update)}function ct(e){var t=e.cm,n=t.display;e.updatedDisplay&&I(t),e.barMeasure=f(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Le(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Ie(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Pe(t))),(e.updatedDisplay||e.selectionChanged)&&(e.newSelectionNodes=ye(t))}function dt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Wt(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1),e.newSelectionNodes&&be(t,e.newSelectionNodes),e.updatedDisplay&&M(t,e.barMeasure),(e.updatedDisplay||e.startHeight!=t.doc.height)&&y(t,e.barMeasure),e.selectionChanged&&Ce(t),t.state.focused&&e.updateInput&&Dt(t,e.typing)}function pt(e){var t=e.cm,n=t.display,i=t.doc;if(e.updatedDisplay&&E(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null==e.scrollTop||n.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(i.scrollTop=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,e.scrollTop)),n.scrollbars.setScrollTop(i.scrollTop),n.scroller.scrollTop=i.scrollTop),null==e.scrollLeft||n.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(i.scrollLeft=Math.max(0,Math.min(n.scroller.scrollWidth-Pe(t),e.scrollLeft)),n.scrollbars.setScrollLeft(i.scrollLeft),n.scroller.scrollLeft=i.scrollLeft,x(t)),e.scrollToPos){var r=xn(t,te(i,e.scrollToPos.from),te(i,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&wn(t,r)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var s=0;s<o.length;++s)o[s].lines.length||va(o[s],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&va(a[s],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&va(t,"changes",t,e.changeObjs)}function ht(e,t){if(e.curOp)return t();rt(e);try{return t()}finally{at(e)}}function ft(e,t){return function(){if(e.curOp)return t.apply(e,arguments);rt(e);try{return t.apply(e,arguments)}finally{at(e)}}}function gt(e){return function(){if(this.curOp)return e.apply(this,arguments);rt(this);try{return e.apply(this,arguments)}finally{at(this)}}}function mt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);rt(t);try{return e.apply(this,arguments)}finally{at(t)}}}function vt(e,t,n){this.line=t,this.rest=ai(t),this.size=this.rest?Ui(br(this.rest))-n+1:1,this.node=this.text=null,this.hidden=ui(e,t)}function yt(e,t,n){for(var i,r=[],o=t;n>o;o=i){var a=new vt(e.doc,Ri(e.doc,o),o);i=o+a.size,r.push(a)}return r}function bt(e,t,n,i){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),i||(i=0);var r=e.display;if(i&&n<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>t)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)ko&&si(e.doc,t)<r.viewTo&&xt(e);else if(n<=r.viewFrom)ko&&li(e.doc,n+i)>r.viewFrom?xt(e):(r.viewFrom+=i,r.viewTo+=i);else if(t<=r.viewFrom&&n>=r.viewTo)xt(e);else if(t<=r.viewFrom){var o=Ct(e,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):xt(e)}else if(n>=r.viewTo){var o=Ct(e,t,t,-1);o?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):xt(e)}else{var a=Ct(e,t,t,-1),s=Ct(e,n,n+i,1);a&&s?(r.view=r.view.slice(0,a.index).concat(yt(e,a.lineN,s.lineN)).concat(r.view.slice(s.index)),r.viewTo+=i):xt(e)}var l=r.externalMeasured;l&&(n<l.lineN?l.lineN+=i:t<l.lineN+l.size&&(r.externalMeasured=null))}function wt(e,t,n){e.curOp.viewChanged=!0;var i=e.display,r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size&&(i.externalMeasured=null),!(t<i.viewFrom||t>=i.viewTo)){var o=i.view[kt(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==wr(a,n)&&a.push(n)}}}function xt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function kt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,i=0;i<n.length;i++)if(t-=n[i].size,0>t)return i}function Ct(e,t,n,i){var r,o=kt(e,t),a=e.display.view;if(!ko||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=0,l=e.display.viewFrom;o>s;s++)l+=a[s].size;if(l!=t){if(i>0){if(o==a.length-1)return null;r=l+a[o].size-t,o++}else r=l-t;t+=r,n+=r}for(;si(e.doc,n)!=n;){if(o==(0>i?0:a.length-1))return null;n+=i*a[o-(0>i?1:0)].size,o+=i}return{index:o,lineN:n}}function St(e,t,n){var i=e.display,r=i.view;0==r.length||t>=i.viewTo||n<=i.viewFrom?(i.view=yt(e,t,n),i.viewFrom=t):(i.viewFrom>t?i.view=yt(e,t,i.viewFrom).concat(i.view):i.viewFrom<t&&(i.view=i.view.slice(kt(e,t))),i.viewFrom=t,i.viewTo<n?i.view=i.view.concat(yt(e,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,kt(e,n)))),i.viewTo=n}function _t(e){for(var t=e.display.view,n=0,i=0;i<t.length;i++){var r=t[i];r.hidden||r.node&&!r.changes||++n}return n}function Tt(e){e.display.pollingFast||e.display.poll.set(e.options.pollInterval,function(){Et(e),e.state.focused&&Tt(e)})}function $t(e){function t(){var i=Et(e);i||n?(e.display.pollingFast=!1,Tt(e)):(n=!0,e.display.poll.set(60,t))}var n=!1;e.display.pollingFast=!0,e.display.poll.set(20,t)}function Et(e){var t=e.display.input,n=e.display.prevInput,i=e.doc;if(!e.state.focused||Ra(t)&&!n||Pt(e)||e.options.disableInput||e.state.keySeq)return!1;e.state.pasteIncoming&&e.state.fakedLastChar&&(t.value=t.value.substring(0,t.value.length-1),e.state.fakedLastChar=!1);var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(io&&ro>=9&&e.display.inputHasSelection===r||mo&&/[\uf700-\uf7ff]/.test(r))return Dt(e),!1;var o=!e.curOp;o&&rt(e),e.display.shift=!1,8203!=r.charCodeAt(0)||i.sel!=e.display.selForContextMenu||n||(n="");for(var a=0,s=Math.min(n.length,r.length);s>a&&n.charCodeAt(a)==r.charCodeAt(a);)++a;var l=r.slice(a),u=La(l),c=null;e.state.pasteIncoming&&i.sel.ranges.length>1&&(Io&&Io.join("\n")==l?c=i.sel.ranges.length%Io.length==0&&xr(Io,La):u.length==i.sel.ranges.length&&(c=xr(u,function(e){return[e]})));for(var d=i.sel.ranges.length-1;d>=0;d--){var p=i.sel.ranges[d],h=p.from(),f=p.to();a<n.length?h=Co(h.line,h.ch-(n.length-a)):e.state.overwrite&&p.empty()&&!e.state.pasteIncoming&&(f=Co(f.line,Math.min(Ri(i,f.line).text.length,f.ch+br(u).length)));var g=e.curOp.updateInput,m={from:h,to:f,text:c?c[d%c.length]:u,origin:e.state.pasteIncoming?"paste":e.state.cutIncoming?"cut":"+input"};if(hn(e.doc,m),cr(e,"inputRead",e,m),l&&!e.state.pasteIncoming&&e.options.electricChars&&e.options.smartIndent&&p.head.ch<100&&(!d||i.sel.ranges[d-1].head.line!=p.head.line)){var v=e.getModeAt(p.head),y=Ro(m);if(v.electricChars){for(var b=0;b<v.electricChars.length;b++)if(l.indexOf(v.electricChars.charAt(b))>-1){$n(e,y.line,"smart");break}}else v.electricInput&&v.electricInput.test(Ri(i,y.line).text.slice(0,y.ch))&&$n(e,y.line,"smart")}}return _n(e),e.curOp.updateInput=g,e.curOp.typing=!0,r.length>1e3||r.indexOf("\n")>-1?t.value=e.display.prevInput="":e.display.prevInput=r,o&&at(e),e.state.pasteIncoming=e.state.cutIncoming=!1,!0}function Dt(e,t){if(!e.display.contextMenuPending){var n,i,r=e.doc;if(e.somethingSelected()){e.display.prevInput="";var o=r.sel.primary();n=Fa&&(o.to().line-o.from().line>100||(i=e.getSelection()).length>1e3);var a=n?"-":i||e.getSelection();e.display.input.value=a,e.state.focused&&Ta(e.display.input),io&&ro>=9&&(e.display.inputHasSelection=a)}else t||(e.display.prevInput=e.display.input.value="",io&&ro>=9&&(e.display.inputHasSelection=null));e.display.inaccurateSelection=n}}function Mt(e){"nocursor"==e.options.readOnly||go&&Pr()==e.display.input||e.display.input.focus()}function It(e){e.state.focused||(Mt(e),rn(e))}function Pt(e){return e.options.readOnly||e.doc.cantEdit}function At(e){function t(t){pr(e,t)||fa(t)}function n(t){if(e.somethingSelected())Io=e.getSelections(),i.inaccurateSelection&&(i.prevInput="",i.inaccurateSelection=!1,i.input.value=Io.join("\n"),Ta(i.input));else{for(var n=[],r=[],o=0;o<e.doc.sel.ranges.length;o++){var a=e.doc.sel.ranges[o].head.line,s={anchor:Co(a,0),head:Co(a+1,0)};r.push(s),n.push(e.getRange(s.anchor,s.head))}"cut"==t.type?e.setSelections(r,null,xa):(i.prevInput="",i.input.value=n.join("\n"),Ta(i.input)),Io=n}"cut"==t.type&&(e.state.cutIncoming=!0)}var i=e.display;ga(i.scroller,"mousedown",ft(e,Lt)),io&&11>ro?ga(i.scroller,"dblclick",ft(e,function(t){if(!pr(e,t)){var n=Ot(e,t);if(n&&!Ut(e,t)&&!Nt(e.display,t)){pa(t);var i=e.findWordAt(n);ae(e.doc,i.anchor,i.head)}}})):ga(i.scroller,"dblclick",function(t){pr(e,t)||pa(t)}),ga(i.lineSpace,"selectstart",function(e){Nt(i,e)||pa(e)}),wo||ga(i.scroller,"contextmenu",function(t){an(e,t)}),ga(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Vt(e,i.scroller.scrollTop),Wt(e,i.scroller.scrollLeft,!0),va(e,"scroll",e))}),ga(i.scroller,"mousewheel",function(t){Gt(e,t)}),ga(i.scroller,"DOMMouseScroll",function(t){Gt(e,t)}),ga(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),ga(i.input,"keyup",function(t){tn.call(e,t)}),ga(i.input,"input",function(){io&&ro>=9&&e.display.inputHasSelection&&(e.display.inputHasSelection=null),Et(e)}),ga(i.input,"keydown",ft(e,Zt)),ga(i.input,"keypress",ft(e,nn)),ga(i.input,"focus",Sr(rn,e)),ga(i.input,"blur",Sr(on,e)),e.options.dragDrop&&(ga(i.scroller,"dragstart",function(t){zt(e,t)}),ga(i.scroller,"dragenter",t),ga(i.scroller,"dragover",t),ga(i.scroller,"drop",ft(e,Bt))),ga(i.scroller,"paste",function(t){Nt(i,t)||(e.state.pasteIncoming=!0,Mt(e),$t(e))}),ga(i.input,"paste",function(){if(oo&&!e.state.fakedLastChar&&!(new Date-e.state.lastMiddleDown<200)){var t=i.input.selectionStart,n=i.input.selectionEnd;i.input.value+="$",i.input.selectionEnd=n,i.input.selectionStart=t,e.state.fakedLastChar=!0}e.state.pasteIncoming=!0,$t(e)}),ga(i.input,"cut",n),ga(i.input,"copy",n),co&&ga(i.sizer,"mouseup",function(){Pr()==i.input&&i.input.blur(),Mt(e)})}function jt(e){var t=e.display;(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth)&&(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Nt(e,t){for(var n=lr(t);n!=e.wrapper;n=n.parentNode)if(!n||"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Ot(e,t,n,i){var r=e.display;if(!n&&"true"==lr(t).getAttribute("not-content"))return null;var o,a,s=r.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,u=et(e,o,a);if(i&&1==u.xRel&&(l=Ri(e.doc,u.line).text).length==u.ch){var c=Sa(l,l.length,e.options.tabSize)-l.length;u=Co(u.line,Math.max(0,Math.round((o-Me(e.display).left)/it(e.display))-c))}return u}function Lt(e){if(!pr(this,e)){var t=this,n=t.display;if(n.shift=e.shiftKey,Nt(n,e))return void(oo||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Ut(t,e)){var i=Ot(t,e);switch(window.focus(),ur(e)){case 1:i?Rt(t,e,i):lr(e)==n.scroller&&pa(e);break;case 2:oo&&(t.state.lastMiddleDown=+new Date),i&&ae(t.doc,i),setTimeout(Sr(Mt,t),20),pa(e);break;case 3:wo&&an(t,e)}}}}function Rt(e,t,n){setTimeout(Sr(It,e),0);var i,r=+new Date;$o&&$o.time>r-400&&0==So($o.pos,n)?i="triple":To&&To.time>r-400&&0==So(To.pos,n)?(i="double",$o={time:r,pos:n}):(i="single",To={time:r,pos:n});var o,a=e.doc.sel,s=mo?t.metaKey:t.ctrlKey;e.options.dragDrop&&Oa&&!Pt(e)&&"single"==i&&(o=a.contains(n))>-1&&!a.ranges[o].empty()?Ft(e,t,n,s):qt(e,t,n,i,s)}function Ft(e,t,n,i){var r=e.display,o=ft(e,function(a){oo&&(r.scroller.draggable=!1),e.state.draggingText=!1,ma(document,"mouseup",o),ma(r.scroller,"drop",o),Math.abs(t.clientX-a.clientX)+Math.abs(t.clientY-a.clientY)<10&&(pa(a),i||ae(e.doc,n),Mt(e),io&&9==ro&&setTimeout(function(){document.body.focus(),Mt(e)},20))});oo&&(r.scroller.draggable=!0),e.state.draggingText=o,r.scroller.dragDrop&&r.scroller.dragDrop(),ga(document,"mouseup",o),ga(r.scroller,"drop",o)}function qt(e,t,n,i,r){function o(t){if(0!=So(m,t))if(m=t,"rect"==i){for(var r=[],o=e.options.tabSize,a=Sa(Ri(u,n.line).text,n.ch,o),s=Sa(Ri(u,t.line).text,t.ch,o),l=Math.min(a,s),h=Math.max(a,s),f=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));g>=f;f++){var v=Ri(u,f).text,y=vr(v,l,o);l==h?r.push(new K(Co(f,y),Co(f,y))):v.length>y&&r.push(new K(Co(f,y),Co(f,vr(v,h,o))))}r.length||r.push(new K(n,n)),pe(u,Q(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,w=b.anchor,x=t;if("single"!=i){if("double"==i)var k=e.findWordAt(t);else var k=new K(Co(t.line,0),te(u,Co(t.line+1,0)));So(k.anchor,w)>0?(x=k.head,w=X(b.from(),k.anchor)):(x=k.anchor,w=J(b.to(),k.head))}var r=p.ranges.slice(0);r[d]=new K(te(u,w),x),pe(u,Q(r,d),ka)}}function a(t){var n=++y,r=Ot(e,t,!0,"rect"==i);if(r)if(0!=So(r,m)){It(e),o(r);var s=w(l,u);(r.line>=s.to||r.line<s.from)&&setTimeout(ft(e,function(){y==n&&a(t)}),150)}else{var c=t.clientY<v.top?-20:t.clientY>v.bottom?20:0;c&&setTimeout(ft(e,function(){y==n&&(l.scroller.scrollTop+=c,a(t))}),50)}}function s(t){y=1/0,pa(t),Mt(e),ma(document,"mousemove",b),ma(document,"mouseup",x),u.history.lastSelOrigin=null}var l=e.display,u=e.doc;pa(t);var c,d,p=u.sel,h=p.ranges;if(r&&!t.shiftKey?(d=u.sel.contains(n),c=d>-1?h[d]:new K(n,n)):c=u.sel.primary(),t.altKey)i="rect",r||(c=new K(n,n)),n=Ot(e,t,!0,!0),d=-1;else if("double"==i){var f=e.findWordAt(n);c=e.display.shift||u.extend?oe(u,c,f.anchor,f.head):f}else if("triple"==i){var g=new K(Co(n.line,0),te(u,Co(n.line+1,0)));c=e.display.shift||u.extend?oe(u,c,g.anchor,g.head):g}else c=oe(u,c,n);r?-1==d?(d=h.length,pe(u,Q(h.concat([c]),d),{scroll:!1,origin:"*mouse"})):h.length>1&&h[d].empty()&&"single"==i?(pe(u,Q(h.slice(0,d).concat(h.slice(d+1)),0)),p=u.sel):le(u,d,c,ka):(d=0,pe(u,new Y([c],0),ka),p=u.sel);var m=n,v=l.wrapper.getBoundingClientRect(),y=0,b=ft(e,function(e){ur(e)?a(e):s(e)}),x=ft(e,s);ga(document,"mousemove",b),ga(document,"mouseup",x)}function Ht(e,t,n,i,r){try{var o=t.clientX,a=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&pa(t);var s=e.display,l=s.lineDiv.getBoundingClientRect();if(a>l.bottom||!fr(e,n))return sr(t);a-=l.top-s.viewOffset;for(var u=0;u<e.options.gutters.length;++u){var c=s.gutters.childNodes[u];if(c&&c.getBoundingClientRect().right>=o){var d=Bi(e.doc,a),p=e.options.gutters[u];return r(e,n,e,d,p,t),sr(t)}}}function Ut(e,t){return Ht(e,t,"gutterClick",!0,cr)}function Bt(e){var t=this;if(!pr(t,e)&&!Nt(t.display,e)){pa(e),io&&(Po=+new Date);var n=Ot(t,e,!0),i=e.dataTransfer.files;if(n&&!Pt(t))if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,o=Array(r),a=0,s=function(e,i){var s=new FileReader;s.onload=ft(t,function(){if(o[i]=s.result,++a==r){n=te(t.doc,n);var e={from:n,to:n,text:La(o.join("\n")),origin:"paste"};hn(t.doc,e),de(t.doc,Z(n,Ro(e)))}}),s.readAsText(e)},l=0;r>l;++l)s(i[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(Sr(Mt,t),20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(mo?e.metaKey:e.ctrlKey))var u=t.listSelections();if(he(t.doc,Z(n,n)),u)for(var l=0;l<u.length;++l)bn(t.doc,"",u[l].anchor,u[l].head,"drag");t.replaceSelection(o,"around","paste"),Mt(t)}}catch(e){}}}}function zt(e,t){if(io&&(!e.state.draggingText||+new Date-Po<100))return void fa(t);if(!pr(e,t)&&!Nt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.setDragImage&&!uo)){var n=Er("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",lo&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),lo&&n.parentNode.removeChild(n)}}function Vt(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,eo||D(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),eo&&D(e),Se(e,100))}function Wt(e,t,n){(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,x(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Gt(e,t){var n=No(t),i=n.x,r=n.y,o=e.display,a=o.scroller;if(i&&a.scrollWidth>a.clientWidth||r&&a.scrollHeight>a.clientHeight){if(r&&mo&&oo)e:for(var s=t.target,l=o.view;s!=a;s=s.parentNode)for(var u=0;u<l.length;u++)if(l[u].node==s){e.display.currentWheelTarget=s;break e}if(i&&!eo&&!lo&&null!=jo)return r&&Vt(e,Math.max(0,Math.min(a.scrollTop+r*jo,a.scrollHeight-a.clientHeight))),Wt(e,Math.max(0,Math.min(a.scrollLeft+i*jo,a.scrollWidth-a.clientWidth))),pa(t),void(o.wheelStartX=null);if(r&&null!=jo){var c=r*jo,d=e.doc.scrollTop,p=d+o.wrapper.clientHeight;0>c?d=Math.max(0,d+c-50):p=Math.min(e.doc.height,p+c+50),D(e,{top:d,bottom:p})}20>Ao&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=i,o.wheelDY=r,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(jo=(jo*Ao+n)/(Ao+1),++Ao)}},200)):(o.wheelDX+=i,o.wheelDY+=r))}}function Jt(e,t,n){if("string"==typeof t&&(t=Xo[t],!t))return!1;e.display.pollingFast&&Et(e)&&(e.display.pollingFast=!1);var i=e.display.shift,r=!1;try{Pt(e)&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),r=t(e)!=wa}finally{e.display.shift=i,e.state.suppressEdits=!1}return r}function Xt(e,t,n){for(var i=0;i<e.state.keyMaps.length;i++){var r=Ko(t,e.state.keyMaps[i],n,e);if(r)return r}return e.options.extraKeys&&Ko(t,e.options.extraKeys,n,e)||Ko(t,e.options.keyMap,n,e)}function Yt(e,t,n,i){var r=e.state.keySeq;if(r){if(Qo(t))return"handled";Oo.set(50,function(){e.state.keySeq==r&&(e.state.keySeq=null,Dt(e))}),t=r+" "+t}var o=Xt(e,t,i);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&cr(e,"keyHandled",e,t,n),("handled"==o||"multi"==o)&&(pa(n),Ce(e)),r&&!o&&/\'$/.test(t)?(pa(n),!0):!!o}function Kt(e,t){var n=Zo(t,!0);return n?t.shiftKey&&!e.state.keySeq?Yt(e,"Shift-"+n,t,function(t){return Jt(e,t,!0)})||Yt(e,n,t,function(t){return("string"==typeof t?/^go[A-Z]/.test(t):t.motion)?Jt(e,t):void 0}):Yt(e,n,t,function(t){return Jt(e,t)}):!1}function Qt(e,t,n){return Yt(e,"'"+n+"'",t,function(t){return Jt(e,t,!0)})}function Zt(e){var t=this;if(It(t),!pr(t,e)){io&&11>ro&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var i=Kt(t,e);lo&&(Lo=i?n:null,!i&&88==n&&!Fa&&(mo?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||en(t)}}function en(e){function t(e){18!=e.keyCode&&e.altKey||(Aa(n,"CodeMirror-crosshair"),ma(document,"keyup",t),ma(document,"mouseover",t))}var n=e.display.lineDiv;ja(n,"CodeMirror-crosshair"),ga(document,"keyup",t),ga(document,"mouseover",t)}function tn(e){16==e.keyCode&&(this.doc.sel.shift=!1),pr(this,e)}function nn(e){var t=this;if(!(pr(t,e)||e.ctrlKey&&!e.altKey||mo&&e.metaKey)){var n=e.keyCode,i=e.charCode;if(lo&&n==Lo)return Lo=null,void pa(e);if(!(lo&&(!e.which||e.which<10)||co)||!Kt(t,e)){var r=String.fromCharCode(null==i?n:i);Qt(t,e,r)||(io&&ro>=9&&(t.display.inputHasSelection=null),$t(t))}}}function rn(e){"nocursor"!=e.options.readOnly&&(e.state.focused||(va(e,"focus",e),e.state.focused=!0,ja(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(Dt(e),oo&&setTimeout(Sr(Dt,e,!0),0))),Tt(e),Ce(e))}function on(e){e.state.focused&&(va(e,"blur",e),e.state.focused=!1,Aa(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function an(e,t){function n(){if(null!=r.input.selectionStart){var t=e.somethingSelected(),n=r.input.value=""+(t?r.input.value:"");r.prevInput=t?"":"",r.input.selectionStart=1,r.input.selectionEnd=n.length,r.selForContextMenu=e.doc.sel}}function i(){if(r.contextMenuPending=!1,r.inputDiv.style.position="relative",r.input.style.cssText=l,io&&9>ro&&r.scrollbars.setScrollTop(r.scroller.scrollTop=a),Tt(e),null!=r.input.selectionStart){(!io||io&&9>ro)&&n();var t=0,i=function(){r.selForContextMenu==e.doc.sel&&0==r.input.selectionStart?ft(e,Xo.selectAll)(e):t++<10?r.detectingSelectAll=setTimeout(i,500):Dt(e)};r.detectingSelectAll=setTimeout(i,200)}}if(!pr(e,t,"contextmenu")){var r=e.display;if(!Nt(r,t)&&!sn(e,t)){var o=Ot(e,t),a=r.scroller.scrollTop;if(o&&!lo){var s=e.options.resetSelectionOnContextMenu;s&&-1==e.doc.sel.contains(o)&&ft(e,pe)(e.doc,Z(o),xa);var l=r.input.style.cssText;if(r.inputDiv.style.position="absolute",r.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(t.clientY-5)+"px; left: "+(t.clientX-5)+"px; z-index: 1000; background: "+(io?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",oo)var u=window.scrollY;if(Mt(e),oo&&window.scrollTo(null,u),Dt(e),e.somethingSelected()||(r.input.value=r.prevInput=" "),r.contextMenuPending=!0,r.selForContextMenu=e.doc.sel,clearTimeout(r.detectingSelectAll),io&&ro>=9&&n(),wo){fa(t);var c=function(){ma(window,"mouseup",c),setTimeout(i,20)};ga(window,"mouseup",c)}else setTimeout(i,50)}}}}function sn(e,t){return fr(e,"gutterContextMenu")?Ht(e,t,"gutterContextMenu",!1,va):!1}function ln(e,t){if(So(e,t.from)<0)return e;if(So(e,t.to)<=0)return Ro(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=Ro(t).ch-t.to.ch),Co(n,i)}function un(e,t){for(var n=[],i=0;i<e.sel.ranges.length;i++){var r=e.sel.ranges[i];n.push(new K(ln(r.anchor,t),ln(r.head,t)))}return Q(n,e.sel.primIndex)}function cn(e,t,n){return e.line==t.line?Co(n.line,e.ch-t.ch+n.ch):Co(n.line+(e.line-t.line),e.ch)}function dn(e,t,n){for(var i=[],r=Co(e.first,0),o=r,a=0;a<t.length;a++){var s=t[a],l=cn(s.from,r,o),u=cn(Ro(s),r,o);if(r=s.to,o=u,"around"==n){var c=e.sel.ranges[a],d=So(c.head,c.anchor)<0;i[a]=new K(d?u:l,d?l:u)}else i[a]=new K(l,l)}return new Y(i,e.sel.primIndex)}function pn(e,t,n){var i={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return n&&(i.update=function(t,n,i,r){t&&(this.from=te(e,t)),n&&(this.to=te(e,n)),i&&(this.text=i),void 0!==r&&(this.origin=r)}),va(e,"beforeChange",e,i),e.cm&&va(e.cm,"beforeChange",e.cm,i),i.canceled?null:{from:i.from,to:i.to,text:i.text,origin:i.origin}}function hn(e,t,n){if(e.cm){if(!e.cm.curOp)return ft(e.cm,hn)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(fr(e,"beforeChange")||e.cm&&fr(e.cm,"beforeChange"))||(t=pn(e,t,!0))){var i=xo&&!n&&Xn(e,t.from,t.to);if(i)for(var r=i.length-1;r>=0;--r)fn(e,{from:i[r].from,to:i[r].to,text:r?[""]:t.text});else fn(e,t)}}function fn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=So(t.from,t.to)){var n=un(e,t);Yi(e,t,n,e.cm?e.cm.curOp.id:NaN),vn(e,t,n,Wn(e,t));var i=[];Oi(e,function(e,n){n||-1!=wr(i,e.history)||(ar(e.history,t),i.push(e.history)),vn(e,t,null,Wn(e,t))})}}function gn(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var i,r=e.history,o=e.sel,a="undo"==t?r.done:r.undone,s="undo"==t?r.undone:r.done,l=0;l<a.length&&(i=a[l],n?!i.ranges||i.equals(e.sel):i.ranges);l++);if(l!=a.length){for(r.lastOrigin=r.lastSelOrigin=null;i=a.pop(),i.ranges;){if(Zi(i,s),n&&!i.equals(e.sel))return void pe(e,i,{clearRedo:!1});o=i}var u=[];Zi(o,s),s.push({changes:u,generation:r.generation}),r.generation=i.generation||++r.maxGeneration;for(var c=fr(e,"beforeChange")||e.cm&&fr(e.cm,"beforeChange"),l=i.changes.length-1;l>=0;--l){var d=i.changes[l];if(d.origin=t,c&&!pn(e,d,!1))return void(a.length=0);u.push(Gi(e,d));var p=l?un(e,d):br(a);vn(e,d,p,Jn(e,d)),!l&&e.cm&&e.cm.scrollIntoView({from:d.from,to:Ro(d)});var h=[];Oi(e,function(e,t){t||-1!=wr(h,e.history)||(ar(e.history,d),h.push(e.history)),vn(e,d,null,Jn(e,d))})}}}}function mn(e,t){if(0!=t&&(e.first+=t,e.sel=new Y(xr(e.sel.ranges,function(e){return new K(Co(e.anchor.line+t,e.anchor.ch),Co(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){bt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,i=n.viewFrom;i<n.viewTo;i++)wt(e.cm,i,"gutter")}}function vn(e,t,n,i){if(e.cm&&!e.cm.curOp)return ft(e.cm,vn)(e,t,n,i);if(t.to.line<e.first)return void mn(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var r=t.text.length-1-(e.first-t.from.line);mn(e,r),t={from:Co(e.first,0),to:Co(t.to.line+r,t.to.ch),text:[br(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:Co(o,Ri(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Fi(e,t.from,t.to),n||(n=un(e,t)),e.cm?yn(e.cm,t,i):Ai(e,t,i),he(e,n,xa)}}function yn(e,t,n){var i=e.doc,r=e.display,a=t.from,s=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=Ui(oi(Ri(i,a.line))),i.iter(u,s.line+1,function(e){return e==r.maxLine?(l=!0,!0):void 0})),i.sel.contains(t.from,t.to)>-1&&hr(e),Ai(i,t,n,o(e)),e.options.lineWrapping||(i.iter(u,a.line+t.text.length,function(e){var t=d(e);t>r.maxLineLength&&(r.maxLine=e,r.maxLineLength=t,r.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),i.frontier=Math.min(i.frontier,a.line),Se(e,400);var c=t.text.length-(s.line-a.line)-1;a.line!=s.line||1!=t.text.length||Pi(e.doc,t)?bt(e,a.line,s.line+1,c):wt(e,a.line,"text");var p=fr(e,"changes"),h=fr(e,"change");if(h||p){var f={from:a,to:s,text:t.text,removed:t.removed,origin:t.origin};h&&cr(e,"change",e,f),p&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function bn(e,t,n,i,r){if(i||(i=n),So(i,n)<0){var o=i;i=n,n=o}"string"==typeof t&&(t=La(t)),hn(e,{from:n,to:i,text:t,origin:r})}function wn(e,t){if(!pr(e,"scrollCursorIntoView")){var n=e.display,i=n.sizer.getBoundingClientRect(),r=null;if(t.top+i.top<0?r=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!ho){var o=Er("div","",null,"position: absolute; top: "+(t.top-n.viewOffset-Ee(e.display))+"px; height: "+(t.bottom-t.top+Ie(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(r),e.display.lineSpace.removeChild(o)}}}function xn(e,t,n,i){null==i&&(i=0);for(var r=0;5>r;r++){var o=!1,a=Ke(e,t),s=n&&n!=t?Ke(e,n):a,l=Cn(e,Math.min(a.left,s.left),Math.min(a.top,s.top)-i,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+i),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(Vt(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(Wt(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return a}function kn(e,t,n,i,r){var o=Cn(e,t,n,i,r);null!=o.scrollTop&&Vt(e,o.scrollTop),null!=o.scrollLeft&&Wt(e,o.scrollLeft)}function Cn(e,t,n,i,r){var o=e.display,a=nt(e.display);0>n&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=Ae(e),u={};
|
|
3228
|
|
-r-n>l&&(r=n+l);var c=e.doc.height+De(o),d=a>n,p=r>c-a;if(s>n)u.scrollTop=d?0:n;else if(r>s+l){var h=Math.min(n,(p?c:r)-l);h!=s&&(u.scrollTop=h)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Pe(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=i-t>g;return m&&(i=t+g),10>t?u.scrollLeft=0:f>t?u.scrollLeft=Math.max(0,t-(m?0:10)):i>g+f-3&&(u.scrollLeft=i+(m?0:10)-g),u}function Sn(e,t,n){(null!=t||null!=n)&&Tn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function _n(e){Tn(e);var t=e.getCursor(),n=t,i=t;e.options.lineWrapping||(n=t.ch?Co(t.line,t.ch-1):t,i=Co(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:i,margin:e.options.cursorScrollMargin,isCursor:!0}}function Tn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Qe(e,t.from),i=Qe(e,t.to),r=Cn(e,Math.min(n.left,i.left),Math.min(n.top,i.top)-t.margin,Math.max(n.right,i.right),Math.max(n.bottom,i.bottom)+t.margin);e.scrollTo(r.scrollLeft,r.scrollTop)}}function $n(e,t,n,i){var r,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=$e(e,t):n="prev");var a=e.options.tabSize,s=Ri(o,t),l=Sa(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(i||/\S/.test(s.text)){if("smart"==n&&(u=o.mode.indent(r,s.text.slice(c.length),s.text),u==wa||u>150)){if(!i)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?Sa(Ri(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var d="",p=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/a);h;--h)p+=a,d+=" ";if(u>p&&(d+=yr(u-p)),d!=c)bn(o,d,Co(t,0),Co(t,c.length),"+input");else for(var h=0;h<o.sel.ranges.length;h++){var f=o.sel.ranges[h];if(f.head.line==t&&f.head.ch<c.length){var p=Co(t,c.length);le(o,h,new K(p,p));break}}s.stateAfter=null}function En(e,t,n,i){var r=t,o=t;return"number"==typeof t?o=Ri(e,ee(e,t)):r=Ui(t),null==r?null:(i(o,r)&&e.cm&&wt(e.cm,r,n),o)}function Dn(e,t){for(var n=e.doc.sel.ranges,i=[],r=0;r<n.length;r++){for(var o=t(n[r]);i.length&&So(o.from,br(i).to)<=0;){var a=i.pop();if(So(a.from,o.from)<0){o.from=a.from;break}}i.push(o)}ht(e,function(){for(var t=i.length-1;t>=0;t--)bn(e.doc,"",i[t].from,i[t].to,"+delete");_n(e)})}function Mn(e,t,n,i,r){function o(){var t=s+n;return t<e.first||t>=e.first+e.size?d=!1:(s=t,c=Ri(e,t))}function a(e){var t=(r?Qr:Zr)(c,l,n,!0);if(null==t){if(e||!o())return d=!1;l=r?(0>n?Vr:zr)(c):0>n?c.text.length:0}else l=t;return!0}var s=t.line,l=t.ch,u=n,c=Ri(e,s),d=!0;if("char"==i)a();else if("column"==i)a(!0);else if("word"==i||"group"==i)for(var p=null,h="group"==i,f=e.cm&&e.cm.getHelper(t,"wordChars"),g=!0;!(0>n)||a(!g);g=!1){var m=c.text.charAt(l)||"\n",v=_r(m,f)?"w":h&&"\n"==m?"n":!h||/\s/.test(m)?null:"p";if(!h||g||v||(v="s"),p&&p!=v){0>n&&(n=1,a());break}if(v&&(p=v),n>0&&!a(!g))break}var y=ve(e,Co(s,l),u,!0);return d||(y.hitSide=!0),y}function In(e,t,n,i){var r,o=e.doc,a=t.left;if("page"==i){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);r=t.top+n*(s-(0>n?1.5:.5)*nt(e.display))}else"line"==i&&(r=n>0?t.bottom+3:t.top-3);for(;;){var l=et(e,a,r);if(!l.outside)break;if(0>n?0>=r:r>=o.height){l.hitSide=!0;break}r+=5*n}return l}function Pn(t,n,i,r){e.defaults[t]=n,i&&(qo[t]=r?function(e,t,n){n!=Ho&&i(e,t,n)}:i)}function An(e){for(var t,n,i,r,o=e.split(/-(?!$)/),e=o[o.length-1],a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))r=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)$/i.test(s))throw new Error("Unrecognized modifier name: "+s);i=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),r&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function jn(e){return"string"==typeof e?Yo[e]:e}function Nn(e,t,n,i,r){if(i&&i.shared)return On(e,t,n,i,r);if(e.cm&&!e.cm.curOp)return ft(e.cm,Nn)(e,t,n,i,r);var o=new ta(e,r),a=So(t,n);if(i&&Cr(i,o,!1),a>0||0==a&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Er("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(ri(e,t.line,t,n,o)||t.line!=n.line&&ri(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");ko=!0}o.addToHistory&&Yi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&oi(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Hi(e,0),Bn(e,new qn(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){ui(e,t)&&Hi(t,0)}),o.clearOnEnter&&ga(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(xo=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++na,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)bt(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)wt(u,c,"text");o.atomic&&ge(u.doc),cr(u,"markerAdded",u,o)}return o}function On(e,t,n,i,r){i=Cr(i),i.shared=!1;var o=[Nn(e,t,n,i,r)],a=o[0],s=i.widgetNode;return Oi(e,function(e){s&&(i.widgetNode=s.cloneNode(!0)),o.push(Nn(e,te(e,t),te(e,n),i,r));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=br(o)}),new ia(o,a)}function Ln(e){return e.findMarks(Co(e.first,0),e.clipPos(Co(e.lastLine())),function(e){return e.parent})}function Rn(e,t){for(var n=0;n<t.length;n++){var i=t[n],r=i.find(),o=e.clipPos(r.from),a=e.clipPos(r.to);if(So(o,a)){var s=Nn(e,o,a,i.primary,i.primary.type);i.markers.push(s),s.parent=i}}}function Fn(e){for(var t=0;t<e.length;t++){var n=e[t],i=[n.primary.doc];Oi(n.primary.doc,function(e){i.push(e)});for(var r=0;r<n.markers.length;r++){var o=n.markers[r];-1==wr(i,o.doc)&&(o.parent=null,n.markers.splice(r--,1))}}}function qn(e,t,n){this.marker=e,this.from=t,this.to=n}function Hn(e,t){if(e)for(var n=0;n<e.length;++n){var i=e[n];if(i.marker==t)return i}}function Un(e,t){for(var n,i=0;i<e.length;++i)e[i]!=t&&(n||(n=[])).push(e[i]);return n}function Bn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function zn(e,t,n){if(e)for(var i,r=0;r<e.length;++r){var o=e[r],a=o.marker,s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(s||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(i||(i=[])).push(new qn(a,o.from,l?null:o.to))}}return i}function Vn(e,t,n){if(e)for(var i,r=0;r<e.length;++r){var o=e[r],a=o.marker,s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(i||(i=[])).push(new qn(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return i}function Wn(e,t){var n=ie(e,t.from.line)&&Ri(e,t.from.line).markedSpans,i=ie(e,t.to.line)&&Ri(e,t.to.line).markedSpans;if(!n&&!i)return null;var r=t.from.ch,o=t.to.ch,a=0==So(t.from,t.to),s=zn(n,r,a),l=Vn(i,o,a),u=1==t.text.length,c=br(t.text).length+(u?r:0);if(s)for(var d=0;d<s.length;++d){var p=s[d];if(null==p.to){var h=Hn(l,p.marker);h?u&&(p.to=null==h.to?null:h.to+c):p.to=r}}if(l)for(var d=0;d<l.length;++d){var p=l[d];if(null!=p.to&&(p.to+=c),null==p.from){var h=Hn(s,p.marker);h||(p.from=c,u&&(s||(s=[])).push(p))}else p.from+=c,u&&(s||(s=[])).push(p)}s&&(s=Gn(s)),l&&l!=s&&(l=Gn(l));var f=[s];if(!u){var g,m=t.text.length-2;if(m>0&&s)for(var d=0;d<s.length;++d)null==s[d].to&&(g||(g=[])).push(new qn(s[d].marker,null,null));for(var d=0;m>d;++d)f.push(g);f.push(l)}return f}function Gn(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Jn(e,t){var n=nr(e,t),i=Wn(e,t);if(!n)return i;if(!i)return n;for(var r=0;r<n.length;++r){var o=n[r],a=i[r];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue e;o.push(l)}else a&&(n[r]=a)}return n}function Xn(e,t,n){var i=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||i&&-1!=wr(i,n)||(i||(i=[])).push(n)}}),!i)return null;for(var r=[{from:t,to:n}],o=0;o<i.length;++o)for(var a=i[o],s=a.find(0),l=0;l<r.length;++l){var u=r[l];if(!(So(u.to,s.from)<0||So(u.from,s.to)>0)){var c=[l,1],d=So(u.from,s.from),p=So(u.to,s.to);(0>d||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&c.push({from:s.to,to:u.to}),r.splice.apply(r,c),l+=c.length-1}}return r}function Yn(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Kn(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Qn(e){return e.inclusiveLeft?-1:0}function Zn(e){return e.inclusiveRight?1:0}function ei(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var i=e.find(),r=t.find(),o=So(i.from,r.from)||Qn(e)-Qn(t);if(o)return-o;var a=So(i.to,r.to)||Zn(e)-Zn(t);return a?a:t.id-e.id}function ti(e,t){var n,i=ko&&e.markedSpans;if(i)for(var r,o=0;o<i.length;++o)r=i[o],r.marker.collapsed&&null==(t?r.from:r.to)&&(!n||ei(n,r.marker)<0)&&(n=r.marker);return n}function ni(e){return ti(e,!0)}function ii(e){return ti(e,!1)}function ri(e,t,n,i,r){var o=Ri(e,t),a=ko&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var u=l.marker.find(0),c=So(u.from,n)||Qn(l.marker)-Qn(r),d=So(u.to,i)||Zn(l.marker)-Zn(r);if(!(c>=0&&0>=d||0>=c&&d>=0)&&(0>=c&&(So(u.to,n)>0||l.marker.inclusiveRight&&r.inclusiveLeft)||c>=0&&(So(u.from,i)<0||l.marker.inclusiveLeft&&r.inclusiveRight)))return!0}}}function oi(e){for(var t;t=ni(e);)e=t.find(-1,!0).line;return e}function ai(e){for(var t,n;t=ii(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function si(e,t){var n=Ri(e,t),i=oi(n);return n==i?t:Ui(i)}function li(e,t){if(t>e.lastLine())return t;var n,i=Ri(e,t);if(!ui(e,i))return t;for(;n=ii(i);)i=n.find(1,!0).line;return Ui(i)+1}function ui(e,t){var n=ko&&t.markedSpans;if(n)for(var i,r=0;r<n.length;++r)if(i=n[r],i.marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&ci(e,t,i))return!0}}function ci(e,t,n){if(null==n.to){var i=n.marker.find(1,!0);return ci(e,i.line,Hn(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var r,o=0;o<t.markedSpans.length;++o)if(r=t.markedSpans[o],r.marker.collapsed&&!r.marker.widgetNode&&r.from==n.to&&(null==r.to||r.to!=n.from)&&(r.marker.inclusiveLeft||n.marker.inclusiveRight)&&ci(e,t,r))return!0}function di(e,t,n){zi(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Sn(e,null,n)}function pi(e){if(null!=e.height)return e.height;if(!Ir(document.body,e.node)){var t="position: relative;";e.coverGutter&&(t+="margin-left: -"+e.cm.getGutterElement().offsetWidth+"px;"),Mr(e.cm.display.measure,Er("div",[e.node],null,t))}return e.height=e.node.offsetHeight}function hi(e,t,n,i){var r=new ra(e,n,i);return r.noHScroll&&(e.display.alignWidgets=!0),En(e.doc,t,"widget",function(t){var n=t.widgets||(t.widgets=[]);if(null==r.insertAt?n.push(r):n.splice(Math.min(n.length-1,Math.max(0,r.insertAt)),0,r),r.line=t,!ui(e.doc,t)){var i=zi(t)<e.doc.scrollTop;Hi(t,t.height+pi(r)),i&&Sn(e,null,r.height),e.curOp.forceUpdate=!0}return!0}),r}function fi(e,t,n,i){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Yn(e),Kn(e,n);var r=i?i(e):1;r!=e.height&&Hi(e,r)}function gi(e){e.parent=null,Yn(e)}function mi(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var i=n[1]?"bgClass":"textClass";null==t[i]?t[i]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[i])||(t[i]+=" "+n[2])}return e}function vi(t,n){if(t.blankLine)return t.blankLine(n);if(t.innerMode){var i=e.innerMode(t,n);return i.mode.blankLine?i.mode.blankLine(i.state):void 0}}function yi(t,n,i,r){for(var o=0;10>o;o++){r&&(r[0]=e.innerMode(t,i).mode);var a=t.token(n,i);if(n.pos>n.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function bi(e,t,n,i){function r(e){return{start:d.start,end:d.pos,string:d.current(),type:o||null,state:e?Go(a.mode,c):c}}var o,a=e.doc,s=a.mode;t=te(a,t);var l,u=Ri(a,t.line),c=$e(e,t.line,n),d=new ea(u.text,e.options.tabSize);for(i&&(l=[]);(i||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=yi(s,d,c),i&&l.push(r(!0));return i?l:r()}function wi(e,t,n,i,r,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,u=0,c=null,d=new ea(t,e.options.tabSize),p=e.options.addModeClass&&[null];for(""==t&&mi(vi(n,i),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&Ci(e,t,i,d.pos),d.pos=t.length,l=null):l=mi(yi(n,d,i,p),o),p){var h=p[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||c!=l){for(;u<d.start;)u=Math.min(d.start,u+5e4),r(u,c);c=l}d.start=d.pos}for(;u<d.pos;){var f=Math.min(d.pos,u+5e4);r(f,c),u=f}}function xi(e,t,n,i){var r=[e.state.modeGen],o={};wi(e,t.text,e.doc.mode,n,function(e,t){r.push(e,t)},o,i);for(var a=0;a<e.state.overlays.length;++a){var s=e.state.overlays[a],l=1,u=0;wi(e,t.text,s.mode,!0,function(e,t){for(var n=l;e>u;){var i=r[l];i>e&&r.splice(l,1,e,r[l+1],i),l+=2,u=Math.min(e,i)}if(t)if(s.opaque)r.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;l>n;n+=2){var o=r[n+1];r[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:r,classes:o.bgClass||o.textClass?o:null}}function ki(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var i=xi(e,t,t.stateAfter=$e(e,Ui(t)));t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Ci(e,t,n,i){var r=e.doc.mode,o=new ea(t,e.options.tabSize);for(o.start=o.pos=i||0,""==t&&vi(r,n);!o.eol()&&o.pos<=e.options.maxHighlightLength;)yi(r,o,n),o.start=o.pos}function Si(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?sa:aa;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function _i(e,t){var n=Er("span",null,null,oo?"padding-right: .1px":null),i={pre:Er("pre",[n]),content:n,col:0,pos:0,cm:e};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var o,a=r?t.rest[r-1]:t.line;i.pos=0,i.addToken=$i,(io||oo)&&e.getOption("lineWrapping")&&(i.addToken=Ei(i.addToken)),Fr(e.display.measure)&&(o=Vi(a))&&(i.addToken=Di(i.addToken,o)),i.map=[];var s=t!=e.display.externalMeasured&&Ui(a);Ii(a,i,ki(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(i.bgClass=jr(a.styleClasses.bgClass,i.bgClass||"")),a.styleClasses.textClass&&(i.textClass=jr(a.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Rr(e.display.measure))),0==r?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return oo&&/\bcm-tab\b/.test(i.content.lastChild.className)&&(i.content.className="cm-tab-wrap-hack"),va(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=jr(i.pre.className,i.textClass||"")),i}function Ti(e){var t=Er("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t}function $i(e,t,n,i,r,o,a){if(t){var s=e.cm.options.specialChars,l=!1;if(s.test(t))for(var u=document.createDocumentFragment(),c=0;;){s.lastIndex=c;var d=s.exec(t),p=d?d.index-c:t.length-c;if(p){var h=document.createTextNode(t.slice(c,c+p));io&&9>ro?u.appendChild(Er("span",[h])):u.appendChild(h),e.map.push(e.pos,e.pos+p,h),e.col+=p,e.pos+=p}if(!d)break;if(c+=p+1," "==d[0]){var f=e.cm.options.tabSize,g=f-e.col%f,h=u.appendChild(Er("span",yr(g),"cm-tab"));e.col+=g}else{var h=e.cm.options.specialCharPlaceholder(d[0]);io&&9>ro?u.appendChild(Er("span",[h])):u.appendChild(h),e.col+=1}e.map.push(e.pos,e.pos+1,h),e.pos++}else{e.col+=t.length;var u=document.createTextNode(t);e.map.push(e.pos,e.pos+t.length,u),io&&9>ro&&(l=!0),e.pos+=t.length}if(n||i||r||l||a){var m=n||"";i&&(m+=i),r&&(m+=r);var v=Er("span",[u],m,a);return o&&(v.title=o),e.content.appendChild(v)}e.content.appendChild(u)}}function Ei(e){function t(e){for(var t=" ",n=0;n<e.length-2;++n)t+=n%2?" ":" ";return t+=" "}return function(n,i,r,o,a,s){e(n,i.replace(/ {3,}/g,t),r,o,a,s)}}function Di(e,t){return function(n,i,r,o,a,s){r=r?r+" cm-force-border":"cm-force-border";for(var l=n.pos,u=l+i.length;;){for(var c=0;c<t.length;c++){var d=t[c];if(d.to>l&&d.from<=l)break}if(d.to>=u)return e(n,i,r,o,a,s);e(n,i.slice(0,d.to-l),r,o,null,s),o=null,i=i.slice(d.to-l),l=d.to}}}function Mi(e,t,n,i){var r=!i&&n.widgetNode;r&&(e.map.push(e.pos,e.pos+t,r),e.content.appendChild(r)),e.pos+=t}function Ii(e,t,n){var i=e.markedSpans,r=e.text,o=0;if(i)for(var a,s,l,u,c,d,p,h=r.length,f=0,g=1,m="",v=0;;){if(v==f){l=u=c=d=s="",p=null,v=1/0;for(var y=[],b=0;b<i.length;++b){var w=i[b],x=w.marker;w.from<=f&&(null==w.to||w.to>f)?(null!=w.to&&v>w.to&&(v=w.to,u=""),x.className&&(l+=" "+x.className),x.css&&(s=x.css),x.startStyle&&w.from==f&&(c+=" "+x.startStyle),x.endStyle&&w.to==v&&(u+=" "+x.endStyle),x.title&&!d&&(d=x.title),x.collapsed&&(!p||ei(p.marker,x)<0)&&(p=w)):w.from>f&&v>w.from&&(v=w.from),"bookmark"==x.type&&w.from==f&&x.widgetNode&&y.push(x)}if(p&&(p.from||0)==f&&(Mi(t,(null==p.to?h+1:p.to)-f,p.marker,null==p.from),null==p.to))return;if(!p&&y.length)for(var b=0;b<y.length;++b)Mi(t,0,y[b])}if(f>=h)break;for(var k=Math.min(h,v);;){if(m){var C=f+m.length;if(!p){var S=C>k?m.slice(0,k-f):m;t.addToken(t,S,a?a+l:l,c,f+S.length==v?u:"",d,s)}if(C>=k){m=m.slice(k-f),f=k;break}f=C,c=""}m=r.slice(o,o=n[g++]),a=Si(n[g++],t.cm.options)}}else for(var g=1;g<n.length;g+=2)t.addToken(t,r.slice(o,o=n[g]),Si(n[g+1],t.cm.options))}function Pi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==br(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ai(e,t,n,i){function r(e){return n?n[e]:null}function o(e,n,r){fi(e,n,r,i),cr(e,"change",e,t)}var a=t.from,s=t.to,l=t.text,u=Ri(e,a.line),c=Ri(e,s.line),d=br(l),p=r(l.length-1),h=s.line-a.line;if(Pi(e,t)){for(var f=0,g=[];f<l.length-1;++f)g.push(new oa(l[f],r(f),i));o(c,c.text,p),h&&e.remove(a.line,h),g.length&&e.insert(a.line,g)}else if(u==c)if(1==l.length)o(u,u.text.slice(0,a.ch)+d+u.text.slice(s.ch),p);else{for(var g=[],f=1;f<l.length-1;++f)g.push(new oa(l[f],r(f),i));g.push(new oa(d+u.text.slice(s.ch),p,i)),o(u,u.text.slice(0,a.ch)+l[0],r(0)),e.insert(a.line+1,g)}else if(1==l.length)o(u,u.text.slice(0,a.ch)+l[0]+c.text.slice(s.ch),r(0)),e.remove(a.line+1,h);else{o(u,u.text.slice(0,a.ch)+l[0],r(0)),o(c,d+c.text.slice(s.ch),p);for(var f=1,g=[];f<l.length-1;++f)g.push(new oa(l[f],r(f),i));h>1&&e.remove(a.line+1,h-1),e.insert(a.line+1,g)}cr(e,"change",e,t)}function ji(e){this.lines=e,this.parent=null;for(var t=0,n=0;t<e.length;++t)e[t].parent=this,n+=e[t].height;this.height=n}function Ni(e){this.children=e;for(var t=0,n=0,i=0;i<e.length;++i){var r=e[i];t+=r.chunkSize(),n+=r.height,r.parent=this}this.size=t,this.height=n,this.parent=null}function Oi(e,t,n){function i(e,r,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var s=e.linked[a];if(s.doc!=r){var l=o&&s.sharedHist;(!n||l)&&(t(s.doc,l),i(s.doc,e,l))}}}i(e,null,!0)}function Li(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,a(e),n(e),e.options.lineWrapping||p(e),e.options.mode=t.modeOption,bt(e)}function Ri(e,t){if(t-=e.first,0>t||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(o>t){n=r;break}t-=o}return n.lines[t]}function Fi(e,t,n){var i=[],r=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;r==n.line&&(o=o.slice(0,n.ch)),r==t.line&&(o=o.slice(t.ch)),i.push(o),++r}),i}function qi(e,t,n){var i=[];return e.iter(t,n,function(e){i.push(e.text)}),i}function Hi(e,t){var n=t-e.height;if(n)for(var i=e;i;i=i.parent)i.height+=n}function Ui(e){if(null==e.parent)return null;for(var t=e.parent,n=wr(t.lines,e),i=t.parent;i;t=i,i=i.parent)for(var r=0;i.children[r]!=t;++r)n+=i.children[r].chunkSize();return n+t.first}function Bi(e,t){var n=e.first;e:do{for(var i=0;i<e.children.length;++i){var r=e.children[i],o=r.height;if(o>t){e=r;continue e}t-=o,n+=r.chunkSize()}return n}while(!e.lines);for(var i=0;i<e.lines.length;++i){var a=e.lines[i],s=a.height;if(s>t)break;t-=s}return n+i}function zi(e){e=oi(e);for(var t=0,n=e.parent,i=0;i<n.lines.length;++i){var r=n.lines[i];if(r==e)break;t+=r.height}for(var o=n.parent;o;n=o,o=n.parent)for(var i=0;i<o.children.length;++i){var a=o.children[i];if(a==n)break;t+=a.height}return t}function Vi(e){var t=e.order;return null==t&&(t=e.order=Ba(e.text)),t}function Wi(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Gi(e,t){var n={from:G(t.from),to:Ro(t),text:Fi(e,t.from,t.to)};return er(e,n,t.from.line,t.to.line+1),Oi(e,function(e){er(e,n,t.from.line,t.to.line+1)},!0),n}function Ji(e){for(;e.length;){var t=br(e);if(!t.ranges)break;e.pop()}}function Xi(e,t){return t?(Ji(e.done),br(e.done)):e.done.length&&!br(e.done).ranges?br(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),br(e.done)):void 0}function Yi(e,t,n,i){var r=e.history;r.undone.length=0;var o,a=+new Date;if((r.lastOp==i||r.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&r.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=Xi(r,r.lastOp==i))){var s=br(o.changes);0==So(t.from,t.to)&&0==So(t.from,s.to)?s.to=Ro(t):o.changes.push(Gi(e,t))}else{var l=br(r.done);for(l&&l.ranges||Zi(e.sel,r.done),o={changes:[Gi(e,t)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=t.origin,s||va(e,"historyAdded")}function Ki(e,t,n,i){var r=t.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Qi(e,t,n,i){var r=e.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||Ki(e,o,br(r.done),t))?r.done[r.done.length-1]=t:Zi(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&i.clearRedo!==!1&&Ji(r.undone)}function Zi(e,t){var n=br(t);n&&n.ranges&&n.equals(e)||t.push(e)}function er(e,t,n,i){var r=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,i),function(n){n.markedSpans&&((r||(r=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function tr(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function nr(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var i=0,r=[];i<t.text.length;++i)r.push(tr(n[i]));return r}function ir(e,t,n){for(var i=0,r=[];i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?Y.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var u,c=a[l];if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&wr(t,Number(u[1]))>-1&&(br(s)[d]=c[d],delete c[d])}}}return r}function rr(e,t,n,i){n<e.line?e.line+=i:t<e.line&&(e.line=t,e.ch=0)}function or(e,t,n,i){for(var r=0;r<e.length;++r){var o=e[r],a=!0;if(o.ranges){o.copied||(o=e[r]=o.deepCopy(),o.copied=!0);for(var s=0;s<o.ranges.length;s++)rr(o.ranges[s].anchor,t,n,i),rr(o.ranges[s].head,t,n,i)}else{for(var s=0;s<o.changes.length;++s){var l=o.changes[s];if(n<l.from.line)l.from=Co(l.from.line+i,l.from.ch),l.to=Co(l.to.line+i,l.to.ch);else if(t<=l.to.line){a=!1;break}}a||(e.splice(0,r+1),r=0)}}}function ar(e,t){var n=t.from.line,i=t.to.line,r=t.text.length-(i-n)-1;or(e.done,n,i,r),or(e.undone,n,i,r)}function sr(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function lr(e){return e.target||e.srcElement}function ur(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),mo&&e.ctrlKey&&1==t&&(t=3),t}function cr(e,t){function n(e){return function(){e.apply(null,o)}}var i=e._handlers&&e._handlers[t];if(i){var r,o=Array.prototype.slice.call(arguments,2);Do?r=Do.delayedCallbacks:ya?r=ya:(r=ya=[],setTimeout(dr,0));for(var a=0;a<i.length;++a)r.push(n(i[a]))}}function dr(){var e=ya;ya=null;for(var t=0;t<e.length;++t)e[t]()}function pr(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),va(e,n||t.type,e,t),sr(t)||t.codemirrorIgnore}function hr(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),i=0;i<t.length;++i)-1==wr(n,t[i])&&n.push(t[i])}function fr(e,t){var n=e._handlers&&e._handlers[t];return n&&n.length>0}function gr(e){e.prototype.on=function(e,t){ga(this,e,t)},e.prototype.off=function(e,t){ma(this,e,t)}}function mr(){this.id=null}function vr(e,t,n){for(var i=0,r=0;;){var o=e.indexOf(" ",i);-1==o&&(o=e.length);var a=o-i;if(o==e.length||r+a>=t)return i+Math.min(a,t-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=t)return i}}function yr(e){for(;_a.length<=e;)_a.push(br(_a)+" ");return _a[e]}function br(e){return e[e.length-1]}function wr(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function xr(e,t){for(var n=[],i=0;i<e.length;i++)n[i]=t(e[i],i);return n}function kr(e,t){var n;if(Object.create)n=Object.create(e);else{var i=function(){};i.prototype=e,n=new i}return t&&Cr(t,n),n}function Cr(e,t,n){t||(t={});for(var i in e)!e.hasOwnProperty(i)||n===!1&&t.hasOwnProperty(i)||(t[i]=e[i]);return t}function Sr(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function _r(e,t){return t?t.source.indexOf("\\w")>-1&&Da(e)?!0:t.test(e):Da(e)}function Tr(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function $r(e){return e.charCodeAt(0)>=768&&Ma.test(e)}function Er(e,t,n,i){var r=document.createElement(e);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof t)r.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)r.appendChild(t[o]);return r}function Dr(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Mr(e,t){return Dr(e).appendChild(t)}function Ir(e,t){if(e.contains)return e.contains(t);for(;t=t.parentNode;)if(t==e)return!0}function Pr(){return document.activeElement}function Ar(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function jr(e,t){for(var n=e.split(" "),i=0;i<n.length;i++)n[i]&&!Ar(n[i]).test(t)&&(t+=" "+n[i]);return t}function Nr(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&e(i)}}function Or(){Na||(Lr(),Na=!0)}function Lr(){var e;ga(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Nr(jt)},100))}),ga(window,"blur",function(){Nr(on)})}function Rr(e){if(null==Ia){var t=Er("span","");Mr(e,Er("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ia=t.offsetWidth<=1&&t.offsetHeight>2&&!(io&&8>ro))}return Ia?Er("span",""):Er("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function Fr(e){if(null!=Pa)return Pa;var t=Mr(e,document.createTextNode("AخA")),n=$a(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var i=$a(t,1,2).getBoundingClientRect();return Pa=i.right-n.right<3}function qr(e){if(null!=qa)return qa;var t=Mr(e,Er("span","x")),n=t.getBoundingClientRect(),i=$a(t,0,1).getBoundingClientRect();return qa=Math.abs(n.left-i.left)>1}function Hr(e,t,n,i){if(!e)return i(t,n,"ltr");for(var r=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(i(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),r=!0)}r||i(t,n,"ltr")}function Ur(e){return e.level%2?e.to:e.from}function Br(e){return e.level%2?e.from:e.to}function zr(e){var t=Vi(e);return t?Ur(t[0]):0}function Vr(e){var t=Vi(e);return t?Br(br(t)):e.text.length}function Wr(e,t){var n=Ri(e.doc,t),i=oi(n);i!=n&&(t=Ui(i));var r=Vi(i),o=r?r[0].level%2?Vr(i):zr(i):0;return Co(t,o)}function Gr(e,t){for(var n,i=Ri(e.doc,t);n=ii(i);)i=n.find(1,!0).line,t=null;var r=Vi(i),o=r?r[0].level%2?zr(i):Vr(i):i.text.length;return Co(null==t?Ui(i):t,o)}function Jr(e,t){var n=Wr(e,t.line),i=Ri(e.doc,n.line),r=Vi(i);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return Co(n.line,a?0:o)}return n}function Xr(e,t,n){var i=e[0].level;return t==i?!0:n==i?!1:n>t}function Yr(e,t){Ua=null;for(var n,i=0;i<e.length;++i){var r=e[i];if(r.from<t&&r.to>t)return i;if(r.from==t||r.to==t){if(null!=n)return Xr(e,r.level,e[n].level)?(r.from!=r.to&&(Ua=n),i):(r.from!=r.to&&(Ua=i),n);n=i}}return n}function Kr(e,t,n,i){if(!i)return t+n;do t+=n;while(t>0&&$r(e.text.charAt(t)));return t}function Qr(e,t,n,i){var r=Vi(e);if(!r)return Zr(e,t,n,i);for(var o=Yr(r,t),a=r[o],s=Kr(e,t,a.level%2?-n:n,i);;){if(s>a.from&&s<a.to)return s;if(s==a.from||s==a.to)return Yr(r,s)==o?s:(a=r[o+=n],n>0==a.level%2?a.to:a.from);if(a=r[o+=n],!a)return null;s=n>0==a.level%2?Kr(e,a.to,-1,i):Kr(e,a.from,1,i)}}function Zr(e,t,n,i){var r=t+n;if(i)for(;r>0&&$r(e.text.charAt(r));)r+=n;return 0>r||r>e.text.length?null:r}var eo=/gecko\/\d/i.test(navigator.userAgent),to=/MSIE \d/.test(navigator.userAgent),no=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),io=to||no,ro=io&&(to?document.documentMode||6:no[1]),oo=/WebKit\//.test(navigator.userAgent),ao=oo&&/Qt\/\d+\.\d+/.test(navigator.userAgent),so=/Chrome\//.test(navigator.userAgent),lo=/Opera\//.test(navigator.userAgent),uo=/Apple Computer/.test(navigator.vendor),co=/KHTML\//.test(navigator.userAgent),po=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),ho=/PhantomJS/.test(navigator.userAgent),fo=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),go=fo||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),mo=fo||/Mac/.test(navigator.platform),vo=/win/i.test(navigator.platform),yo=lo&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);yo&&(yo=Number(yo[1])),yo&&yo>=15&&(lo=!1,oo=!0);var bo=mo&&(ao||lo&&(null==yo||12.11>yo)),wo=eo||io&&ro>=9,xo=!1,ko=!1;g.prototype=Cr({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var r=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?i:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&e.clientHeight>0&&(0==i&&this.overlayHack(),this.checkedOverlay=!0),{right:n?i:0,bottom:t?i:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e)},overlayHack:function(){var e=mo&&!po?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=e;var t=this,n=function(e){lr(e)!=t.vert&&lr(e)!=t.horiz&&ft(t.cm,Lt)(e)};ga(this.vert,"mousedown",n),ga(this.horiz,"mousedown",n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},g.prototype),m.prototype=Cr({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},m.prototype),e.scrollbarModel={"native":g,"null":m};var Co=e.Pos=function(e,t){return this instanceof Co?(this.line=e,
|
|
3229
|
|
-void(this.ch=t)):new Co(e,t)},So=e.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch};Y.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],i=e.ranges[t];if(0!=So(n.anchor,i.anchor)||0!=So(n.head,i.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new K(G(this.ranges[t].anchor),G(this.ranges[t].head));return new Y(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=this.ranges[n];if(So(t,i.from())>=0&&So(e,i.to())<=0)return n}return-1}},K.prototype={from:function(){return X(this.anchor,this.head)},to:function(){return J(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var _o,To,$o,Eo={left:0,right:0,top:0,bottom:0},Do=null,Mo=0,Io=null,Po=0,Ao=0,jo=null;io?jo=-.53:eo?jo=15:so?jo=-.7:uo&&(jo=-1/3);var No=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=No(e);return t.x*=jo,t.y*=jo,t};var Oo=new mr,Lo=null,Ro=e.changeEnd=function(e){return e.text?Co(e.from.line+e.text.length-1,br(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),Mt(this),$t(this)},setOption:function(e,t){var n=this.options,i=n[e];(n[e]!=t||"mode"==e)&&(n[e]=t,qo.hasOwnProperty(e)&&ft(this,qo[e])(this,t,i))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](jn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:gt(function(t,n){var i=t.token?t:e.getMode(this.options,t);if(i.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:i,modeSpec:t,opaque:n&&n.opaque}),this.state.modeGen++,bt(this)}),removeOverlay:gt(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var i=t[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return t.splice(n,1),this.state.modeGen++,void bt(this)}}),indentLine:gt(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),ie(this.doc,e)&&$n(this,e,t,n)}),indentSelection:gt(function(e){for(var t=this.doc.sel.ranges,n=-1,i=0;i<t.length;i++){var r=t[i];if(r.empty())r.head.line>n&&($n(this,r.head.line,e,!0),n=r.head.line,i==this.doc.sel.primIndex&&_n(this));else{var o=r.from(),a=r.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;n>l;++l)$n(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[i].from().ch>0&&le(this.doc,i,new K(o,u[i].to()),xa)}}}),getTokenAt:function(e,t){return bi(this,e,t)},getLineTokens:function(e,t){return bi(this,Co(e),t,!0)},getTokenTypeAt:function(e){e=te(this.doc,e);var t,n=ki(this,Ri(this.doc,e.line)),i=0,r=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=i+r>>1;if((a?n[2*a-1]:0)>=o)r=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}i=a+1}}var s=t?t.indexOf("cm-overlay "):-1;return 0>s?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!Wo.hasOwnProperty(t))return Wo;var i=Wo[t],r=this.getModeAt(e);if("string"==typeof r[t])i[r[t]]&&n.push(i[r[t]]);else if(r[t])for(var o=0;o<r[t].length;o++){var a=i[r[t][o]];a&&n.push(a)}else r.helperType&&i[r.helperType]?n.push(i[r.helperType]):i[r.name]&&n.push(i[r.name]);for(var o=0;o<i._global.length;o++){var s=i._global[o];s.pred(r,this)&&-1==wr(n,s.val)&&n.push(s.val)}return n},getStateAfter:function(e,t){var n=this.doc;return e=ee(n,null==e?n.first+n.size-1:e),$e(this,e+1,t)},cursorCoords:function(e,t){var n,i=this.doc.sel.primary();return n=null==e?i.head:"object"==typeof e?te(this.doc,e):e?i.from():i.to(),Ke(this,n,t||"page")},charCoords:function(e,t){return Ye(this,te(this.doc,e),t||"page")},coordsChar:function(e,t){return e=Xe(this,e,t||"page"),et(this,e.left,e.top)},lineAtHeight:function(e,t){return e=Xe(this,{top:e,left:0},t||"page").top,Bi(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var n=!1,i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,n=!0);var r=Ri(this.doc,e);return Je(this,r,{top:0,left:0},t||"page").top+(n?this.doc.height-zi(r):0)},defaultTextHeight:function(){return nt(this.display)},defaultCharWidth:function(){return it(this.display)},setGutterMarker:gt(function(e,t,n){return En(this.doc,e,"gutter",function(e){var i=e.gutterMarkers||(e.gutterMarkers={});return i[t]=n,!n&&Tr(i)&&(e.gutterMarkers=null),!0})}),clearGutter:gt(function(e){var t=this,n=t.doc,i=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,wt(t,i,"gutter"),Tr(n.gutterMarkers)&&(n.gutterMarkers=null)),++i})}),addLineWidget:gt(function(e,t,n){return hi(this,e,t,n)}),removeLineWidget:function(e){e.clear()},lineInfo:function(e){if("number"==typeof e){if(!ie(this.doc,e))return null;var t=e;if(e=Ri(this.doc,e),!e)return null}else{var t=Ui(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,i,r){var o=this.display;e=Ke(this,te(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),o.sizer.appendChild(t),"over"==i)a=e.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==r?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==r?s=0:"middle"==r&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&kn(this,s,a,s+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:gt(Zt),triggerOnKeyPress:gt(nn),triggerOnKeyUp:tn,execCommand:function(e){return Xo.hasOwnProperty(e)?Xo[e](this):void 0},findPosH:function(e,t,n,i){var r=1;0>t&&(r=-1,t=-t);for(var o=0,a=te(this.doc,e);t>o&&(a=Mn(this.doc,a,r,n,i),!a.hitSide);++o);return a},moveH:gt(function(e,t){var n=this;n.extendSelectionsBy(function(i){return n.display.shift||n.doc.extend||i.empty()?Mn(n.doc,i.head,e,t,n.options.rtlMoveVisually):0>e?i.from():i.to()},Ca)}),deleteH:gt(function(e,t){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):Dn(this,function(n){var r=Mn(i,n.head,e,t,!1);return 0>e?{from:r,to:n.head}:{from:n.head,to:r}})}),findPosV:function(e,t,n,i){var r=1,o=i;0>t&&(r=-1,t=-t);for(var a=0,s=te(this.doc,e);t>a;++a){var l=Ke(this,s,"div");if(null==o?o=l.left:l.left=o,s=In(this,l,r,n),s.hitSide)break}return s},moveV:gt(function(e,t){var n=this,i=this.doc,r=[],o=!n.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy(function(a){if(o)return 0>e?a.from():a.to();var s=Ke(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),r.push(s.left);var l=In(n,s,e,t);return"page"==t&&a==i.sel.primary()&&Sn(n,null,Ye(n,l,"div").top-s.top),l},Ca),r.length)for(var a=0;a<i.sel.ranges.length;a++)i.sel.ranges[a].goalColumn=r[a]}),findWordAt:function(e){var t=this.doc,n=Ri(t,e.line).text,i=e.ch,r=e.ch;if(n){var o=this.getHelper(e,"wordChars");(e.xRel<0||r==n.length)&&i?--i:++r;for(var a=n.charAt(i),s=_r(a,o)?function(e){return _r(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!_r(e)};i>0&&s(n.charAt(i-1));)--i;for(;r<n.length&&s(n.charAt(r));)++r}return new K(Co(e.line,i),Co(e.line,r))},toggleOverwrite:function(e){(null==e||e!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?ja(this.display.cursorDiv,"CodeMirror-overwrite"):Aa(this.display.cursorDiv,"CodeMirror-overwrite"),va(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return Pr()==this.display.input},scrollTo:gt(function(e,t){(null!=e||null!=t)&&Tn(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Ie(this)-this.display.barHeight,width:e.scrollWidth-Ie(this)-this.display.barWidth,clientHeight:Ae(this),clientWidth:Pe(this)}},scrollIntoView:gt(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:Co(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)Tn(this),this.curOp.scrollToPos=e;else{var n=Cn(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(n.scrollLeft,n.scrollTop)}}),setSize:gt(function(e,t){function n(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}var i=this;null!=e&&(i.display.wrapper.style.width=n(e)),null!=t&&(i.display.wrapper.style.height=n(t)),i.options.lineWrapping&&ze(this);var r=i.display.viewFrom;i.doc.iter(r,i.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){wt(i,r,"widget");break}++r}),i.curOp.forceUpdate=!0,va(i,"refresh",this)}),operation:function(e){return ht(this,e)},refresh:gt(function(){var e=this.display.cachedTextHeight;bt(this),this.curOp.forceUpdate=!0,Ve(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),c(this),(null==e||Math.abs(e-nt(this.display))>.5)&&a(this),va(this,"refresh",this)}),swapDoc:gt(function(e){var t=this.doc;return t.cm=null,Li(this,e),Ve(this),Dt(this),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,cr(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},gr(e);var Fo=e.defaults={},qo=e.optionHandlers={},Ho=e.Init={toString:function(){return"CodeMirror.Init"}};Pn("value","",function(e,t){e.setValue(t)},!0),Pn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Pn("indentUnit",2,n,!0),Pn("indentWithTabs",!1),Pn("smartIndent",!0),Pn("tabSize",4,function(e){i(e),Ve(e),bt(e)},!0),Pn("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t){e.options.specialChars=new RegExp(t.source+(t.test(" ")?"":"| "),"g"),e.refresh()},!0),Pn("specialCharPlaceholder",Ti,function(e){e.refresh()},!0),Pn("electricChars",!0),Pn("rtlMoveVisually",!vo),Pn("wholeLineUpdateBefore",!0),Pn("theme","default",function(e){s(e),l(e)},!0),Pn("keyMap","default",function(t,n,i){var r=jn(n),o=i!=e.Init&&jn(i);o&&o.detach&&o.detach(t,r),r.attach&&r.attach(t,o||null)}),Pn("extraKeys",null),Pn("lineWrapping",!1,r,!0),Pn("gutters",[],function(e){h(e.options),l(e)},!0),Pn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?S(e.display)+"px":"0",e.refresh()},!0),Pn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Pn("scrollbarStyle","native",function(e){v(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Pn("lineNumbers",!1,function(e){h(e.options),l(e)},!0),Pn("firstLineNumber",1,l,!0),Pn("lineNumberFormatter",function(e){return e},l,!0),Pn("showCursorWhenSelecting",!1,we,!0),Pn("resetSelectionOnContextMenu",!0),Pn("readOnly",!1,function(e,t){"nocursor"==t?(on(e),e.display.input.blur(),e.display.disabled=!0):(e.display.disabled=!1,t||Dt(e))}),Pn("disableInput",!1,function(e,t){t||Dt(e)},!0),Pn("dragDrop",!0),Pn("cursorBlinkRate",530),Pn("cursorScrollMargin",0),Pn("cursorHeight",1,we,!0),Pn("singleCursorHeightPerLine",!0,we,!0),Pn("workTime",100),Pn("workDelay",100),Pn("flattenSpans",!0,i,!0),Pn("addModeClass",!1,i,!0),Pn("pollInterval",100),Pn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Pn("historyEventDelay",1250),Pn("viewportMargin",10,function(e){e.refresh()},!0),Pn("maxHighlightLength",1e4,i,!0),Pn("moveInputWithCursor",!0,function(e,t){t||(e.display.inputDiv.style.top=e.display.inputDiv.style.left=0)}),Pn("tabindex",null,function(e,t){e.display.input.tabIndex=t||""}),Pn("autofocus",null);var Uo=e.modes={},Bo=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),Uo[t]=n},e.defineMIME=function(e,t){Bo[e]=t},e.resolveMode=function(t){if("string"==typeof t&&Bo.hasOwnProperty(t))t=Bo[t];else if(t&&"string"==typeof t.name&&Bo.hasOwnProperty(t.name)){var n=Bo[t.name];"string"==typeof n&&(n={name:n}),t=kr(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),i=Uo[n.name];if(!i)return e.getMode(t,"text/plain");var r=i(t,n);if(zo.hasOwnProperty(n.name)){var o=zo[n.name];for(var a in o)o.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=o[a])}if(r.name=n.name,n.helperType&&(r.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)r[a]=n.modeProps[a];return r},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var zo=e.modeExtensions={};e.extendMode=function(e,t){var n=zo.hasOwnProperty(e)?zo[e]:zo[e]={};Cr(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){ua.prototype[e]=t},e.defineOption=Pn;var Vo=[];e.defineInitHook=function(e){Vo.push(e)};var Wo=e.helpers={};e.registerHelper=function(t,n,i){Wo.hasOwnProperty(t)||(Wo[t]=e[t]={_global:[]}),Wo[t][n]=i},e.registerGlobalHelper=function(t,n,i,r){e.registerHelper(t,n,r),Wo[t]._global.push({pred:i,val:r})};var Go=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var i in t){var r=t[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n},Jo=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var Xo=e.commands={selectAll:function(e){e.setSelection(Co(e.firstLine(),0),Co(e.lastLine()),xa)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),xa)},killLine:function(e){Dn(e,function(t){if(t.empty()){var n=Ri(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:Co(t.head.line+1,0)}:{from:t.head,to:Co(t.head.line,n)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){Dn(e,function(t){return{from:Co(t.from().line,0),to:te(e.doc,Co(t.to().line+1,0))}})},delLineLeft:function(e){Dn(e,function(e){return{from:Co(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){Dn(e,function(t){var n=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:n},"div");return{from:i,to:t.from()}})},delWrappedLineRight:function(e){Dn(e,function(t){var n=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:i}})},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(Co(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(Co(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy(function(t){return Wr(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){e.extendSelectionsBy(function(t){return Jr(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){e.extendSelectionsBy(function(t){return Gr(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},Ca)},goLineLeft:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},Ca)},goLineLeftSmart:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:n},"div");return i.ch<e.getLine(i.line).search(/\S/)?Jr(e,t.head):i},Ca)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),i=e.options.tabSize,r=0;r<n.length;r++){var o=n[r].from(),a=Sa(e.getLine(o.line),o.ch,i);t.push(new Array(i-a%i+1).join(" "))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){ht(e,function(){for(var t=e.listSelections(),n=[],i=0;i<t.length;i++){var r=t[i].head,o=Ri(e.doc,r.line).text;if(o)if(r.ch==o.length&&(r=new Co(r.line,r.ch-1)),r.ch>0)r=new Co(r.line,r.ch+1),e.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),Co(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var a=Ri(e.doc,r.line-1).text;a&&e.replaceRange(o.charAt(0)+"\n"+a.charAt(a.length-1),Co(r.line-1,a.length-1),Co(r.line,1),"+transpose")}n.push(new K(r,r))}e.setSelections(n)})},newlineAndIndent:function(e){ht(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var i=e.listSelections()[n];e.replaceRange("\n",i.anchor,i.head,"+input"),e.indentLine(i.from().line+1,null,!0),_n(e)}})},toggleOverwrite:function(e){e.toggleOverwrite()}},Yo=e.keyMap={};Yo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Yo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Yo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},Yo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Yo["default"]=mo?Yo.macDefault:Yo.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete e[n];continue}for(var r=xr(n.split(" "),An),o=0;o<r.length;o++){var a,s;o==r.length-1?(s=n,a=i):(s=r.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var u in t)e[u]=t[u];return e};var Ko=e.lookupKey=function(e,t,n,i){t=jn(t);var r=t.call?t.call(e,i):t[e];if(r===!1)return"nothing";if("..."===r)return"multi";if(null!=r&&n(r))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Ko(e,t.fallthrough,n,i);for(var o=0;o<t.fallthrough.length;o++){var a=Ko(e,t.fallthrough[o],n,i);if(a)return a}}},Qo=e.isModifierKey=function(e){var t="string"==typeof e?e:Ha[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},Zo=e.keyName=function(e,t){if(lo&&34==e.keyCode&&e["char"])return!1;var n=Ha[e.keyCode],i=n;return null==i||e.altGraphKey?!1:(e.altKey&&"Alt"!=n&&(i="Alt-"+i),(bo?e.metaKey:e.ctrlKey)&&"Ctrl"!=n&&(i="Ctrl-"+i),(bo?e.ctrlKey:e.metaKey)&&"Cmd"!=n&&(i="Cmd-"+i),!t&&e.shiftKey&&"Shift"!=n&&(i="Shift-"+i),i)};e.fromTextArea=function(t,n){function i(){t.value=u.getValue()}if(n||(n={}),n.value=t.value,!n.tabindex&&t.tabindex&&(n.tabindex=t.tabindex),!n.placeholder&&t.placeholder&&(n.placeholder=t.placeholder),null==n.autofocus){var r=Pr();n.autofocus=r==t||null!=t.getAttribute("autofocus")&&r==document.body}if(t.form&&(ga(t.form,"submit",i),!n.leaveSubmitMethodAlone)){var o=t.form,a=o.submit;try{var s=o.submit=function(){i(),o.submit=a,o.submit(),o.submit=s}}catch(l){}}t.style.display="none";var u=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},n);return u.save=i,u.getTextArea=function(){return t},u.toTextArea=function(){u.toTextArea=isNaN,i(),t.parentNode.removeChild(u.getWrapperElement()),t.style.display="",t.form&&(ma(t.form,"submit",i),"function"==typeof t.form.submit&&(t.form.submit=a))},u};var ea=e.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};ea.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var n=t==e;else var n=t&&(e.test?e.test(t):e(t));return n?(++this.pos,t):void 0},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Sa(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Sa(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Sa(this.string,null,this.tabSize)-(this.lineStart?Sa(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,n){if("string"!=typeof e){var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}var r=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return r(o)==r(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ta=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e};gr(ta),ta.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&rt(e),fr(this,"clear")){var n=this.find();n&&cr(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=Hn(a.markedSpans,this);e&&!this.collapsed?wt(e,Ui(a),"text"):e&&(null!=s.to&&(r=Ui(a)),null!=s.from&&(i=Ui(a))),a.markedSpans=Un(a.markedSpans,s),null==s.from&&this.collapsed&&!ui(this.doc,a)&&e&&Hi(a,nt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var o=0;o<this.lines.length;++o){var l=oi(this.lines[o]),u=d(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&&bt(e,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ge(e.doc)),e&&cr(e,"markerCleared",e,this),t&&at(e),this.parent&&this.parent.clear()}},ta.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,i,r=0;r<this.lines.length;++r){var o=this.lines[r],a=Hn(o.markedSpans,this);if(null!=a.from&&(n=Co(t?o:Ui(o),a.from),-1==e))return n;if(null!=a.to&&(i=Co(t?o:Ui(o),a.to),1==e))return i}return n&&{from:n,to:i}},ta.prototype.changed=function(){var e=this.find(-1,!0),t=this,n=this.doc.cm;e&&n&&ht(n,function(){var i=e.line,r=Ui(e.line),o=Re(n,r);if(o&&(Be(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!ui(t.doc,i)&&null!=t.height){var a=t.height;t.height=null;var s=pi(t)-a;s&&Hi(i,i.height+s)}})},ta.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=wr(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ta.prototype.detachLine=function(e){if(this.lines.splice(wr(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var na=0,ia=e.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};gr(ia),ia.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();cr(this,"clear")}},ia.prototype.find=function(e,t){return this.primary.find(e,t)};var ra=e.LineWidget=function(e,t,n){if(n)for(var i in n)n.hasOwnProperty(i)&&(this[i]=n[i]);this.cm=e,this.node=t};gr(ra),ra.prototype.clear=function(){var e=this.cm,t=this.line.widgets,n=this.line,i=Ui(n);if(null!=i&&t){for(var r=0;r<t.length;++r)t[r]==this&&t.splice(r--,1);t.length||(n.widgets=null);var o=pi(this);ht(e,function(){di(e,n,-o),wt(e,i,"widget"),Hi(n,Math.max(0,n.height-o))})}},ra.prototype.changed=function(){var e=this.height,t=this.cm,n=this.line;this.height=null;var i=pi(this)-e;i&&ht(t,function(){t.curOp.forceUpdate=!0,di(t,n,i),Hi(n,n.height+i)})};var oa=e.Line=function(e,t,n){this.text=e,Kn(this,t),this.height=n?n(this):1};gr(oa),oa.prototype.lineNo=function(){return Ui(this)};var aa={},sa={};ji.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,i=e+t;i>n;++n){var r=this.lines[n];this.height-=r.height,gi(r),cr(r,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=this},iterN:function(e,t,n){for(var i=e+t;i>e;++e)if(n(this.lines[e]))return!0}},Ni.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var i=this.children[n],r=i.chunkSize();if(r>e){var o=Math.min(t,r-e),a=i.height;if(i.removeInner(e,o),this.height-=a-i.height,r==o&&(this.children.splice(n--,1),i.parent=null),0==(t-=o))break;e=0}else e-=r}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ji))){var s=[];this.collapse(s),this.children=[new ji(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(o>=e){if(r.insertInner(e,t,n),r.lines&&r.lines.length>50){for(;r.lines.length>50;){var a=r.lines.splice(r.lines.length-25,25),s=new ji(a);r.height-=s.height,this.children.splice(i+1,0,s),s.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Ni(t);if(e.parent){e.size-=n.size,e.height-=n.height;var i=wr(e.parent.children,e);e.parent.children.splice(i+1,0,n)}else{var r=new Ni(e.children);r.parent=e,e.children=[r,n],e=r}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(o>e){var a=Math.min(t,o-e);if(r.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var la=0,ua=e.Doc=function(e,t,n){if(!(this instanceof ua))return new ua(e,t,n);null==n&&(n=0),Ni.call(this,[new ji([new oa("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=Co(n,0);this.sel=Z(i),this.history=new Wi(null),this.id=++la,this.modeOption=t,"string"==typeof e&&(e=La(e)),Ai(this,{from:i,to:i,text:e}),pe(this,Z(i),xa)};ua.prototype=kr(Ni.prototype,{constructor:ua,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,i=0;i<t.length;++i)n+=t[i].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=qi(this,this.first,this.first+this.size);return e===!1?t:t.join(e||"\n")},setValue:mt(function(e){var t=Co(this.first,0),n=this.first+this.size-1;hn(this,{from:t,to:Co(n,Ri(this,n).text.length),text:La(e),origin:"setValue"},!0),pe(this,Z(t))}),replaceRange:function(e,t,n,i){t=te(this,t),n=n?te(this,n):t,bn(this,e,t,n,i)},getRange:function(e,t,n){var i=Fi(this,te(this,e),te(this,t));return n===!1?i:i.join(n||"\n")},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){return ie(this,e)?Ri(this,e):void 0},getLineNumber:function(e){return Ui(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ri(this,e)),oi(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return te(this,e)},getCursor:function(e){var t,n=this.sel.primary();return t=null==e||"head"==e?n.head:"anchor"==e?n.anchor:"end"==e||"to"==e||e===!1?n.to():n.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){
|
|
3230
|
|
-return this.sel.somethingSelected()},setCursor:mt(function(e,t,n){ue(this,te(this,"number"==typeof e?Co(e,t||0):e),null,n)}),setSelection:mt(function(e,t,n){ue(this,te(this,e),te(this,t||e),n)}),extendSelection:mt(function(e,t,n){ae(this,te(this,e),t&&te(this,t),n)}),extendSelections:mt(function(e,t){se(this,re(this,e,t))}),extendSelectionsBy:mt(function(e,t){se(this,xr(this.sel.ranges,e),t)}),setSelections:mt(function(e,t,n){if(e.length){for(var i=0,r=[];i<e.length;i++)r[i]=new K(te(this,e[i].anchor),te(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),pe(this,Q(r,t),n)}}),addSelection:mt(function(e,t,n){var i=this.sel.ranges.slice(0);i.push(new K(te(this,e),te(this,t||e))),pe(this,Q(i,i.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,i=0;i<n.length;i++){var r=Fi(this,n[i].from(),n[i].to());t=t?t.concat(r):r}return e===!1?t:t.join(e||"\n")},getSelections:function(e){for(var t=[],n=this.sel.ranges,i=0;i<n.length;i++){var r=Fi(this,n[i].from(),n[i].to());e!==!1&&(r=r.join(e||"\n")),t[i]=r}return t},replaceSelection:function(e,t,n){for(var i=[],r=0;r<this.sel.ranges.length;r++)i[r]=e;this.replaceSelections(i,t,n||"+input")},replaceSelections:mt(function(e,t,n){for(var i=[],r=this.sel,o=0;o<r.ranges.length;o++){var a=r.ranges[o];i[o]={from:a.from(),to:a.to(),text:La(e[o]),origin:n}}for(var s=t&&"end"!=t&&dn(this,i,t),o=i.length-1;o>=0;o--)hn(this,i[o]);s?de(this,s):this.cm&&_n(this.cm)}),undo:mt(function(){gn(this,"undo")}),redo:mt(function(){gn(this,"redo")}),undoSelection:mt(function(){gn(this,"undo",!0)}),redoSelection:mt(function(){gn(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,i=0;i<e.done.length;i++)e.done[i].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new Wi(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:ir(this.history.done),undone:ir(this.history.undone)}},setHistory:function(e){var t=this.history=new Wi(this.history.maxGeneration);t.done=ir(e.done.slice(0),null,!0),t.undone=ir(e.undone.slice(0),null,!0)},addLineClass:mt(function(e,t,n){return En(this,e,"gutter"==t?"gutter":"class",function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[i]){if(Ar(n).test(e[i]))return!1;e[i]+=" "+n}else e[i]=n;return!0})}),removeLineClass:mt(function(e,t,n){return En(this,e,"gutter"==t?"gutter":"class",function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",r=e[i];if(!r)return!1;if(null==n)e[i]=null;else{var o=r.match(Ar(n));if(!o)return!1;var a=o.index+o[0].length;e[i]=r.slice(0,o.index)+(o.index&&a!=r.length?" ":"")+r.slice(a)||null}return!0})}),markText:function(e,t,n){return Nn(this,te(this,e),te(this,t),n,"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared};return e=te(this,e),Nn(this,e,e,n,"bookmark")},findMarksAt:function(e){e=te(this,e);var t=[],n=Ri(this,e.line).markedSpans;if(n)for(var i=0;i<n.length;++i){var r=n[i];(null==r.from||r.from<=e.ch)&&(null==r.to||r.to>=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,n){e=te(this,e),t=te(this,t);var i=[],r=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];r==e.line&&e.ch>l.to||null==l.from&&r!=e.line||r==t.line&&l.from>t.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r}),i},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var i=0;i<n.length;++i)null!=n[i].from&&e.push(n[i].marker)}),e},posFromIndex:function(e){var t,n=this.first;return this.iter(function(i){var r=i.text.length+1;return r>e?(t=e,!0):(e-=r,void++n)}),te(this,Co(n,t))},indexFromPos:function(e){e=te(this,e);var t=e.ch;return e.line<this.first||e.ch<0?0:(this.iter(this.first,e.line,function(e){t+=e.text.length+1}),t)},copy:function(e){var t=new ua(qi(this,this.first,this.first+this.size),this.modeOption,this.first);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var i=new ua(qi(this,t,n),e.mode||this.modeOption,t);return e.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:e.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Rn(i,Ln(this)),i},unlinkDoc:function(t){if(t instanceof e&&(t=t.doc),this.linked)for(var n=0;n<this.linked.length;++n){var i=this.linked[n];if(i.doc==t){this.linked.splice(n,1),t.unlinkDoc(this),Fn(Ln(this));break}}if(t.history==this.history){var r=[t.id];Oi(t,function(e){r.push(e.id)},!0),t.history=new Wi(null),t.history.done=ir(this.history.done,r),t.history.undone=ir(this.history.undone,r)}},iterLinkedDocs:function(e){Oi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),ua.prototype.eachLine=ua.prototype.iter;var ca="iter insert remove copy getEditor".split(" ");for(var da in ua.prototype)ua.prototype.hasOwnProperty(da)&&wr(ca,da)<0&&(e.prototype[da]=function(e){return function(){return e.apply(this.doc,arguments)}}(ua.prototype[da]));gr(ua);var pa=e.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},ha=e.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},fa=e.e_stop=function(e){pa(e),ha(e)},ga=e.on=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var i=e._handlers||(e._handlers={}),r=i[t]||(i[t]=[]);r.push(n)}},ma=e.off=function(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var i=e._handlers&&e._handlers[t];if(!i)return;for(var r=0;r<i.length;++r)if(i[r]==n){i.splice(r,1);break}}},va=e.signal=function(e,t){var n=e._handlers&&e._handlers[t];if(n)for(var i=Array.prototype.slice.call(arguments,2),r=0;r<n.length;++r)n[r].apply(null,i)},ya=null,ba=30,wa=e.Pass={toString:function(){return"CodeMirror.Pass"}},xa={scroll:!1},ka={origin:"*mouse"},Ca={origin:"+move"};mr.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Sa=e.countColumn=function(e,t,n,i,r){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.length));for(var o=i||0,a=r||0;;){var s=e.indexOf(" ",o);if(0>s||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}},_a=[""],Ta=function(e){e.select()};fo?Ta=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:io&&(Ta=function(e){try{e.select()}catch(t){}}),[].indexOf&&(wr=function(e,t){return e.indexOf(t)}),[].map&&(xr=function(e,t){return e.map(t)});var $a,Ea=/[\u00df\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Da=e.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Ea.test(e))},Ma=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;$a=document.createRange?function(e,t,n){var i=document.createRange();return i.setEnd(e,n),i.setStart(e,t),i}:function(e,t,n){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(r){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i},io&&11>ro&&(Pr=function(){try{return document.activeElement}catch(e){return document.body}});var Ia,Pa,Aa=e.rmClass=function(e,t){var n=e.className,i=Ar(t).exec(n);if(i){var r=n.slice(i.index+i[0].length);e.className=n.slice(0,i.index)+(r?i[1]+r:"")}},ja=e.addClass=function(e,t){var n=e.className;Ar(t).test(n)||(e.className+=(n?" ":"")+t)},Na=!1,Oa=function(){if(io&&9>ro)return!1;var e=Er("div");return"draggable"in e||"dragDrop"in e}(),La=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],i=e.length;i>=t;){var r=e.indexOf("\n",t);-1==r&&(r=e.length);var o=e.slice(t,"\r"==e.charAt(r-1)?r-1:r),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=r+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ra=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},Fa=function(){var e=Er("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),qa=null,Ha={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`+"`"+`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};e.keyNames=Ha,function(){for(var e=0;10>e;e++)Ha[e+48]=Ha[e+96]=String(e);for(var e=65;90>=e;e++)Ha[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)Ha[e+111]=Ha[e+63235]="F"+e}();var Ua,Ba=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?i.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,u="L";return function(n){if(!r.test(n))return!1;for(var i,c=n.length,d=[],p=0;c>p;++p)d.push(i=e(n.charCodeAt(p)));for(var p=0,h=u;c>p;++p){var i=d[p];"m"==i?d[p]=h:h=i}for(var p=0,f=u;c>p;++p){var i=d[p];"1"==i&&"r"==f?d[p]="n":a.test(i)&&(f=i,"r"==i&&(d[p]="R"))}for(var p=1,h=d[0];c-1>p;++p){var i=d[p];"+"==i&&"1"==h&&"1"==d[p+1]?d[p]="1":","!=i||h!=d[p+1]||"1"!=h&&"n"!=h||(d[p]=h),h=i}for(var p=0;c>p;++p){var i=d[p];if(","==i)d[p]="N";else if("%"==i){for(var g=p+1;c>g&&"%"==d[g];++g);for(var m=p&&"!"==d[p-1]||c>g&&"1"==d[g]?"1":"N",v=p;g>v;++v)d[v]=m;p=g-1}}for(var p=0,f=u;c>p;++p){var i=d[p];"L"==f&&"1"==i?d[p]="L":a.test(i)&&(f=i)}for(var p=0;c>p;++p)if(o.test(d[p])){for(var g=p+1;c>g&&o.test(d[g]);++g);for(var y="L"==(p?d[p-1]:u),b="L"==(c>g?d[g]:u),m=y||b?"L":"R",v=p;g>v;++v)d[v]=m;p=g-1}for(var w,x=[],p=0;c>p;)if(s.test(d[p])){var k=p;for(++p;c>p&&s.test(d[p]);++p);x.push(new t(0,k,p))}else{var C=p,S=x.length;for(++p;c>p&&"L"!=d[p];++p);for(var v=C;p>v;)if(l.test(d[v])){v>C&&x.splice(S,0,new t(1,C,v));var _=v;for(++v;p>v&&l.test(d[v]);++v);x.splice(S,0,new t(2,_,v)),C=v}else++v;p>C&&x.splice(S,0,new t(1,C,p))}return 1==x[0].level&&(w=n.match(/^\s+/))&&(x[0].from=w[0].length,x.unshift(new t(0,0,w[0].length))),1==br(x).level&&(w=n.match(/\s+$/))&&(br(x).to-=w[0].length,x.push(new t(0,c-w[0].length,c))),x[0].level!=br(x).level&&x.push(new t(x[0].level,c,c)),x}}();return e.version="4.11.0",e}),function a(e,t,n){function i(o,s){if(!t[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=t[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return i(n?n:t)},c,c.exports,a,e,t,n)}return t[o].exports}for(var r="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t,n){(function(t){t.graphlib=e("./index")}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./index":2}],2:[function(e,t,n){var i=e("./lib");t.exports={Graph:i.Graph,json:e("./lib/json"),alg:e("./lib/alg"),version:i.version}},{"./lib":18,"./lib/alg":9,"./lib/json":19}],3:[function(e,t,n){function i(e){function t(o){r.has(i,o)||(i[o]=!0,n.push(o),r.each(e.successors(o),t),r.each(e.predecessors(o),t))}var n,i={},o=[];return r.each(e.nodes(),function(e){n=[],t(e),n.length&&o.push(n)}),o}var r=e("../lodash");t.exports=i},{"../lodash":20}],4:[function(e,t,n){function i(e,t,n){o.isArray(t)||(t=[t]);var i=[],a={};return o.each(t,function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);r(e,t,"post"===n,a,i)}),i}function r(e,t,n,i,a){o.has(i,t)||(i[t]=!0,n||a.push(t),o.each(e.neighbors(t),function(t){r(e,t,n,i,a)}),n&&a.push(t))}var o=e("../lodash");t.exports=i},{"../lodash":20}],5:[function(e,t,n){function i(e,t,n){return o.transform(e.nodes(),function(i,o){i[o]=r(e,o,t,n)},{})}var r=e("./dijkstra"),o=e("../lodash");t.exports=i},{"../lodash":20,"./dijkstra":6}],6:[function(e,t,n){function i(e,t,n,i){return r(e,String(t),n||s,i||function(t){return e.outEdges(t)})}function r(e,t,n,i){var r,o,s={},l=new a,u=function(e){var t=e.v!==r?e.v:e.w,i=s[t],a=n(e),u=o.distance+a;if(0>a)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+a);u<i.distance&&(i.distance=u,i.predecessor=r,l.decrease(t,u))};for(e.nodes().forEach(function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},l.add(e,n)});l.size()>0&&(r=l.removeMin(),o=s[r],o.distance!==Number.POSITIVE_INFINITY);)i(r).forEach(u);return s}var o=e("../lodash"),a=e("../data/priority-queue");t.exports=i;var s=o.constant(1)},{"../data/priority-queue":16,"../lodash":20}],7:[function(e,t,n){function i(e){return r.filter(o(e),function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}var r=e("../lodash"),o=e("./tarjan");t.exports=i},{"../lodash":20,"./tarjan":14}],8:[function(e,t,n){function i(e,t,n){return r(e,t||a,n||function(t){return e.outEdges(t)})}function r(e,t,n){var i={},r=e.nodes();return r.forEach(function(e){i[e]={},i[e][e]={distance:0},r.forEach(function(t){e!==t&&(i[e][t]={distance:Number.POSITIVE_INFINITY})}),n(e).forEach(function(n){var r=n.v===e?n.w:n.v,o=t(n);i[e][r]={distance:o,predecessor:e}})}),r.forEach(function(e){var t=i[e];r.forEach(function(n){var o=i[n];r.forEach(function(n){var i=o[e],r=t[n],a=o[n],s=i.distance+r.distance;s<a.distance&&(a.distance=s,a.predecessor=r.predecessor)})})}),i}var o=e("../lodash");t.exports=i;var a=o.constant(1)},{"../lodash":20}],9:[function(e,t,n){t.exports={components:e("./components"),dijkstra:e("./dijkstra"),dijkstraAll:e("./dijkstra-all"),findCycles:e("./find-cycles"),floydWarshall:e("./floyd-warshall"),isAcyclic:e("./is-acyclic"),postorder:e("./postorder"),preorder:e("./preorder"),prim:e("./prim"),tarjan:e("./tarjan"),topsort:e("./topsort")}},{"./components":3,"./dijkstra":6,"./dijkstra-all":5,"./find-cycles":7,"./floyd-warshall":8,"./is-acyclic":10,"./postorder":11,"./preorder":12,"./prim":13,"./tarjan":14,"./topsort":15}],10:[function(e,t,n){function i(e){try{r(e)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}var r=e("./topsort");t.exports=i},{"./topsort":15}],11:[function(e,t,n){function i(e,t){return r(e,t,"post")}var r=e("./dfs");t.exports=i},{"./dfs":4}],12:[function(e,t,n){function i(e,t){return r(e,t,"pre")}var r=e("./dfs");t.exports=i},{"./dfs":4}],13:[function(e,t,n){function i(e,t){function n(e){var n=e.v===i?e.w:e.v,r=u.priority(n);if(void 0!==r){var o=t(e);r>o&&(l[n]=i,u.decrease(n,o))}}var i,s=new o,l={},u=new a;if(0===e.nodeCount())return s;r.each(e.nodes(),function(e){u.add(e,Number.POSITIVE_INFINITY),s.setNode(e)}),u.decrease(e.nodes()[0],0);for(var c=!1;u.size()>0;){if(i=u.removeMin(),r.has(l,i))s.setEdge(i,l[i]);else{if(c)throw new Error("Input graph is not connected: "+e);c=!0}e.nodeEdges(i).forEach(n)}return s}var r=e("../lodash"),o=e("../graph"),a=e("../data/priority-queue");t.exports=i},{"../data/priority-queue":16,"../graph":17,"../lodash":20}],14:[function(e,t,n){function i(e){function t(s){var l=o[s]={onStack:!0,lowlink:n,index:n++};if(i.push(s),e.successors(s).forEach(function(e){r.has(o,e)?o[e].onStack&&(l.lowlink=Math.min(l.lowlink,o[e].index)):(t(e),l.lowlink=Math.min(l.lowlink,o[e].lowlink))}),l.lowlink===l.index){var u,c=[];do u=i.pop(),o[u].onStack=!1,c.push(u);while(s!==u);a.push(c)}}var n=0,i=[],o={},a=[];return e.nodes().forEach(function(e){r.has(o,e)||t(e)}),a}var r=e("../lodash");t.exports=i},{"../lodash":20}],15:[function(e,t,n){function i(e){function t(s){if(o.has(i,s))throw new r;o.has(n,s)||(i[s]=!0,n[s]=!0,o.each(e.predecessors(s),t),delete i[s],a.push(s))}var n={},i={},a=[];if(o.each(e.sinks(),t),o.size(n)!==e.nodeCount())throw new r;return a}function r(){}var o=e("../lodash");t.exports=i,i.CycleException=r},{"../lodash":20}],16:[function(e,t,n){function i(){this._arr=[],this._keyIndices={}}var r=e("../lodash");t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map(function(e){return e.key})},i.prototype.has=function(e){return r.has(this._keyIndices,e)},i.prototype.priority=function(e){var t=this._keyIndices[e];return void 0!==t?this._arr[t].priority:void 0},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var i=this._arr,o=i.length;return n[e]=o,i.push({key:e,priority:t}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},i.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},i.prototype._heapify=function(e){var t=this._arr,n=2*e,i=n+1,r=e;n<t.length&&(r=t[n].priority<t[r].priority?n:r,i<t.length&&(r=t[i].priority<t[r].priority?i:r),r!==e&&(this._swap(e,r),this._heapify(r)))},i.prototype._decrease=function(e){for(var t,n=this._arr,i=n[e].priority;0!==e&&(t=e>>1,!(n[t].priority<i));)this._swap(e,t),e=t},i.prototype._swap=function(e,t){var n=this._arr,i=this._keyIndices,r=n[e],o=n[t];n[e]=o,n[t]=r,i[o.key]=e,i[r.key]=t}},{"../lodash":20}],17:[function(e,t,n){"use strict";function i(e){this._isDirected=u.has(e,"directed")?e.directed:!0,this._isMultigraph=u.has(e,"multigraph")?e.multigraph:!1,this._isCompound=u.has(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=u.constant(void 0),this._defaultEdgeLabelFn=u.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[d]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function r(e,t){e[t]?e[t]++:e[t]=1}function o(e,t){--e[t]||delete e[t]}function a(e,t,n,i){var r=""+t,o=""+n;if(!e&&r>o){var a=r;r=o,o=a}return r+p+o+p+(u.isUndefined(i)?c:i)}function s(e,t,n,i){var r=""+t,o=""+n;if(!e&&r>o){var a=r;r=o,o=a}var s={v:r,w:o};return i&&(s.name=i),s}function l(e,t){return a(e,t.v,t.w,t.name)}var u=e("./lodash");t.exports=i;var c="\x00",d="\x00",p="";i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(e){return this._label=e,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(e){return u.isFunction(e)||(e=u.constant(e)),this._defaultNodeLabelFn=e,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return u.keys(this._nodes)},i.prototype.sources=function(){return u.filter(this.nodes(),function(e){return u.isEmpty(this._in[e])},this)},i.prototype.sinks=function(){return u.filter(this.nodes(),function(e){return u.isEmpty(this._out[e])},this)},i.prototype.setNodes=function(e,t){var n=arguments;return u.each(e,function(e){n.length>1?this.setNode(e,t):this.setNode(e)},this),this},i.prototype.setNode=function(e,t){return u.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=d,this._children[e]={},this._children[d][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},i.prototype.node=function(e){return this._nodes[e]},i.prototype.hasNode=function(e){return u.has(this._nodes,e)},i.prototype.removeNode=function(e){var t=this;if(u.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],u.each(this.children(e),function(e){this.setParent(e)},this),delete this._children[e]),u.each(u.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],u.each(u.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},i.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(u.isUndefined(t))t=d;else{t+="";for(var n=t;!u.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},i.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},i.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==d)return t}},i.prototype.children=function(e){if(u.isUndefined(e)&&(e=d),this._isCompound){var t=this._children[e];if(t)return u.keys(t)}else{if(e===d)return this.nodes();if(this.hasNode(e))return[]}},i.prototype.predecessors=function(e){var t=this._preds[e];return t?u.keys(t):void 0},i.prototype.successors=function(e){var t=this._sucs[e];return t?u.keys(t):void 0},i.prototype.neighbors=function(e){var t=this.predecessors(e);return t?u.union(t,this.successors(e)):void 0},i.prototype.filterNodes=function(e){function t(e){var o=i.parent(e);return void 0===o||n.hasNode(o)?(r[e]=o,o):o in r?r[o]:t(o)}var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph()),u.each(this._nodes,function(t,i){e(i)&&n.setNode(i,t)},this),u.each(this._edgeObjs,function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,this.edge(e))},this);var i=this,r={};return this._isCompound&&u.each(n.nodes(),function(e){n.setParent(e,t(e))}),n},i.prototype.setDefaultEdgeLabel=function(e){return u.isFunction(e)||(e=u.constant(e)),this._defaultEdgeLabelFn=e,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return u.values(this._edgeObjs)},i.prototype.setPath=function(e,t){var n=this,i=arguments;return u.reduce(e,function(e,r){return i.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r}),this},i.prototype.setEdge=function(){var e,t,n,i,o=!1,l=arguments[0];"object"==typeof l&&null!==l&&"v"in l?(e=l.v,t=l.w,n=l.name,2===arguments.length&&(i=arguments[1],o=!0)):(e=l,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),e=""+e,t=""+t,u.isUndefined(n)||(n=""+n);var c=a(this._isDirected,e,t,n);if(u.has(this._edgeLabels,c))return o&&(this._edgeLabels[c]=i),this;if(!u.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[c]=o?i:this._defaultEdgeLabelFn(e,t,n);var d=s(this._isDirected,e,t,n);return e=d.v,t=d.w,Object.freeze(d),this._edgeObjs[c]=d,r(this._preds[t],e),r(this._sucs[e],t),this._in[t][c]=d,this._out[e][c]=d,this._edgeCount++,this},i.prototype.edge=function(e,t,n){var i=1===arguments.length?l(this._isDirected,arguments[0]):a(this._isDirected,e,t,n);return this._edgeLabels[i]},i.prototype.hasEdge=function(e,t,n){var i=1===arguments.length?l(this._isDirected,arguments[0]):a(this._isDirected,e,t,n);return u.has(this._edgeLabels,i)},i.prototype.removeEdge=function(e,t,n){var i=1===arguments.length?l(this._isDirected,arguments[0]):a(this._isDirected,e,t,n),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],o(this._preds[t],e),o(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this},i.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var i=u.values(n);return t?u.filter(i,function(e){return e.v===t}):i}},i.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var i=u.values(n);return t?u.filter(i,function(e){return e.w===t}):i}},i.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);return n?n.concat(this.outEdges(e,t)):void 0}},{"./lodash":20}],18:[function(e,t,n){t.exports={Graph:e("./graph"),version:e("./version")}},{"./graph":17,"./version":21}],19:[function(e,t,n){function i(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:r(e),edges:o(e)};return s.isUndefined(e.graph())||(t.value=s.clone(e.graph())),t}function r(e){return s.map(e.nodes(),function(t){var n=e.node(t),i=e.parent(t),r={v:t};return s.isUndefined(n)||(r.value=n),s.isUndefined(i)||(r.parent=i),r})}function o(e){return s.map(e.edges(),function(t){var n=e.edge(t),i={v:t.v,w:t.w};return s.isUndefined(t.name)||(i.name=t.name),s.isUndefined(n)||(i.value=n),i})}function a(e){var t=new l(e.options).setGraph(e.value);return s.each(e.nodes,function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),s.each(e.edges,function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}var s=e("./lodash"),l=e("./graph");t.exports={write:i,read:a}},{"./graph":17,"./lodash":20}],20:[function(e,t,n){var i;if("function"==typeof e)try{i=e("lodash")}catch(r){}i||(i=window._),t.exports=i},{lodash:void 0}],21:[function(e,t,n){t.exports="1.0.7"},{}]},{},[1]),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.dagre=e()}}(function(){return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return r(n?n:e)},c,c.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){t.exports={graphlib:e("./lib/graphlib"),layout:e("./lib/layout"),debug:e("./lib/debug"),util:{time:e("./lib/util").time,notime:e("./lib/util").notime},version:e("./lib/version")}},{"./lib/debug":6,"./lib/graphlib":7,"./lib/layout":9,"./lib/util":29,"./lib/version":30}],2:[function(e,t,n){"use strict";function i(e){function t(e){return function(t){return e.edge(t).weight}}var n="greedy"===e.graph().acyclicer?s(e,t(e)):r(e);a.each(n,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,a.uniqueId("rev"))})}function r(e){function t(o){a.has(r,o)||(r[o]=!0,i[o]=!0,a.each(e.outEdges(o),function(e){a.has(i,e.w)?n.push(e):t(e.w)}),delete i[o])}var n=[],i={},r={};return a.each(e.nodes(),t),n}function o(e){a.each(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var i=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,i)}})}var a=e("./lodash"),s=e("./greedy-fas");t.exports={run:i,undo:o}},{"./greedy-fas":8,"./lodash":10}],3:[function(e,t,n){function i(e){function t(n){var i=e.children(n),a=e.node(n);if(i.length&&o.each(i,t),o.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,l=a.maxRank+1;l>s;++s)r(e,"borderLeft","_bl",n,a,s),r(e,"borderRight","_br",n,a,s)}}o.each(e.children(),t)}function r(e,t,n,i,r,o){var s={width:0,height:0,rank:o,borderType:t},l=r[t][o-1],u=a.addDummyNode(e,"border",s,n);r[t][o]=u,e.setParent(u,i),l&&e.setEdge(l,u,{weight:1})}var o=e("./lodash"),a=e("./util");t.exports=i},{"./lodash":10,"./util":29}],4:[function(e,t,n){"use strict";function i(e){var t=e.graph().rankdir.toLowerCase();("lr"===t||"rl"===t)&&o(e)}function r(e){var t=e.graph().rankdir.toLowerCase();("bt"===t||"rl"===t)&&s(e),("lr"===t||"rl"===t)&&(u(e),o(e))}function o(e){d.each(e.nodes(),function(t){a(e.node(t))}),d.each(e.edges(),function(t){a(e.edge(t))})}function a(e){var t=e.width;e.width=e.height,e.height=t}function s(e){d.each(e.nodes(),function(t){l(e.node(t))}),d.each(e.edges(),function(t){var n=e.edge(t);d.each(n.points,l),d.has(n,"y")&&l(n)})}function l(e){e.y=-e.y}function u(e){d.each(e.nodes(),function(t){c(e.node(t))}),d.each(e.edges(),function(t){var n=e.edge(t);d.each(n.points,c),d.has(n,"x")&&c(n)})}function c(e){var t=e.x;e.x=e.y,e.y=t}var d=e("./lodash");t.exports={adjust:i,undo:r}},{"./lodash":10}],5:[function(e,t,n){function i(){var e={};e._next=e._prev=e,this._sentinel=e}function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function o(e,t){return"_next"!==e&&"_prev"!==e?t:void 0}t.exports=i,i.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;return t!==e?(r(t),t):void 0},i.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},i.prototype.toString=function(){
|
|
3231
|
|
-for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,o)),n=n._prev;return"["+e.join(", ")+"]"}},{}],6:[function(e,t,n){function i(e){var t=o.buildLayerMatrix(e),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.each(e.nodes(),function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)}),r.each(e.edges(),function(e){n.setEdge(e.v,e.w,{},e.name)}),r.each(t,function(e,t){var i="layer"+t;n.setNode(i,{rank:"same"}),r.reduce(e,function(e,t){return n.setEdge(e,t,{style:"invis"}),t})}),n}var r=e("./lodash"),o=e("./util"),a=e("./graphlib").Graph;t.exports={debugOrdering:i}},{"./graphlib":7,"./lodash":10,"./util":29}],7:[function(e,t,n){var i;if("function"==typeof e)try{i=e("graphlib")}catch(r){}i||(i=window.graphlib),t.exports=i},{graphlib:void 0}],8:[function(e,t,n){function i(e,t){if(e.nodeCount()<=1)return[];var n=a(e,t||d),i=r(n.graph,n.buckets,n.zeroIdx);return l.flatten(l.map(i,function(t){return e.outEdges(t.v,t.w)}),!0)}function r(e,t,n){for(var i,r=[],a=t[t.length-1],s=t[0];e.nodeCount();){for(;i=s.dequeue();)o(e,t,n,i);for(;i=a.dequeue();)o(e,t,n,i);if(e.nodeCount())for(var l=t.length-2;l>0;--l)if(i=t[l].dequeue()){r=r.concat(o(e,t,n,i,!0));break}}return r}function o(e,t,n,i,r){var o=r?[]:void 0;return l.each(e.inEdges(i.v),function(i){var a=e.edge(i),l=e.node(i.v);r&&o.push({v:i.v,w:i.w}),l.out-=a,s(t,n,l)}),l.each(e.outEdges(i.v),function(i){var r=e.edge(i),o=i.w,a=e.node(o);a["in"]-=r,s(t,n,a)}),e.removeNode(i.v),o}function a(e,t){var n=new u,i=0,r=0;l.each(e.nodes(),function(e){n.setNode(e,{v:e,"in":0,out:0})}),l.each(e.edges(),function(e){var o=n.edge(e.v,e.w)||0,a=t(e),s=o+a;n.setEdge(e.v,e.w,s),r=Math.max(r,n.node(e.v).out+=a),i=Math.max(i,n.node(e.w)["in"]+=a)});var o=l.range(r+i+3).map(function(){return new c}),a=i+1;return l.each(n.nodes(),function(e){s(o,a,n.node(e))}),{graph:n,buckets:o,zeroIdx:a}}function s(e,t,n){n.out?n["in"]?e[n.out-n["in"]+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}var l=e("./lodash"),u=e("./graphlib").Graph,c=e("./data/list");t.exports=i;var d=l.constant(1)},{"./data/list":5,"./graphlib":7,"./lodash":10}],9:[function(e,t,n){"use strict";function i(e,t){var n=t&&t.debugTiming?A.time:A.notime;n("layout",function(){var t=n(" buildLayoutGraph",function(){return a(e)});n(" runLayout",function(){r(t,n)}),n(" updateInputGraph",function(){o(e,t)})})}function r(e,t){t(" makeSpaceForEdgeLabels",function(){s(e)}),t(" removeSelfEdges",function(){m(e)}),t(" acyclic",function(){k.run(e)}),t(" nestingGraph.run",function(){E.run(e)}),t(" rank",function(){S(A.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){l(e)}),t(" removeEmptyRanks",function(){$(e)}),t(" nestingGraph.cleanup",function(){E.cleanup(e)}),t(" normalizeRanks",function(){_(e)}),t(" assignRankMinMax",function(){u(e)}),t(" removeEdgeLabelProxies",function(){c(e)}),t(" normalize.run",function(){C.run(e)}),t(" parentDummyChains",function(){T(e)}),t(" addBorderSegments",function(){D(e)}),t(" order",function(){I(e)}),t(" insertSelfEdges",function(){v(e)}),t(" adjustCoordinateSystem",function(){M.adjust(e)}),t(" position",function(){P(e)}),t(" positionSelfEdges",function(){y(e)}),t(" removeBorderNodes",function(){g(e)}),t(" normalize.undo",function(){C.undo(e)}),t(" fixupEdgeLabelCoords",function(){h(e)}),t(" undoCoordinateSystem",function(){M.undo(e)}),t(" translateGraph",function(){d(e)}),t(" assignNodeIntersects",function(){p(e)}),t(" reversePoints",function(){f(e)}),t(" acyclic.undo",function(){k.undo(e)})}function o(e,t){x.each(e.nodes(),function(n){var i=e.node(n),r=t.node(n);i&&(i.x=r.x,i.y=r.y,t.children(n).length&&(i.width=r.width,i.height=r.height))}),x.each(e.edges(),function(n){var i=e.edge(n),r=t.edge(n);i.points=r.points,x.has(r,"x")&&(i.x=r.x,i.y=r.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function a(e){var t=new j({multigraph:!0,compound:!0}),n=w(e.graph());return t.setGraph(x.merge({},O,b(n,N),x.pick(n,L))),x.each(e.nodes(),function(n){var i=w(e.node(n));t.setNode(n,x.defaults(b(i,R),F)),t.setParent(n,e.parent(n))}),x.each(e.edges(),function(n){var i=w(e.edge(n));t.setEdge(n,x.merge({},H,b(i,q),x.pick(i,U)))}),t}function s(e){var t=e.graph();t.ranksep/=2,x.each(e.edges(),function(n){var i=e.edge(n);i.minlen*=2,"c"!==i.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function l(e){x.each(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var i=e.node(t.v),r=e.node(t.w),o={rank:(r.rank-i.rank)/2+i.rank,e:t};A.addDummyNode(e,"edge-proxy",o,"_ep")}})}function u(e){var t=0;x.each(e.nodes(),function(n){var i=e.node(n);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=x.max(t,i.maxRank))}),e.graph().maxRank=t}function c(e){x.each(e.nodes(),function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function d(e){function t(e){var t=e.x,a=e.y,s=e.width,l=e.height;n=Math.min(n,t-s/2),i=Math.max(i,t+s/2),r=Math.min(r,a-l/2),o=Math.max(o,a+l/2)}var n=Number.POSITIVE_INFINITY,i=0,r=Number.POSITIVE_INFINITY,o=0,a=e.graph(),s=a.marginx||0,l=a.marginy||0;x.each(e.nodes(),function(n){t(e.node(n))}),x.each(e.edges(),function(n){var i=e.edge(n);x.has(i,"x")&&t(i)}),n-=s,r-=l,x.each(e.nodes(),function(t){var i=e.node(t);i.x-=n,i.y-=r}),x.each(e.edges(),function(t){var i=e.edge(t);x.each(i.points,function(e){e.x-=n,e.y-=r}),x.has(i,"x")&&(i.x-=n),x.has(i,"y")&&(i.y-=r)}),a.width=i-n+s,a.height=o-r+l}function p(e){x.each(e.edges(),function(t){var n,i,r=e.edge(t),o=e.node(t.v),a=e.node(t.w);r.points?(n=r.points[0],i=r.points[r.points.length-1]):(r.points=[],n=a,i=o),r.points.unshift(A.intersectRect(o,n)),r.points.push(A.intersectRect(a,i))})}function h(e){x.each(e.edges(),function(t){var n=e.edge(t);if(x.has(n,"x"))switch(("l"===n.labelpos||"r"===n.labelpos)&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}function f(e){x.each(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function g(e){x.each(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),i=e.node(n.borderTop),r=e.node(n.borderBottom),o=e.node(x.last(n.borderLeft)),a=e.node(x.last(n.borderRight));n.width=Math.abs(a.x-o.x),n.height=Math.abs(r.y-i.y),n.x=o.x+n.width/2,n.y=i.y+n.height/2}}),x.each(e.nodes(),function(t){"border"===e.node(t).dummy&&e.removeNode(t)})}function m(e){x.each(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function v(e){var t=A.buildLayerMatrix(e);x.each(t,function(t){var n=0;x.each(t,function(t,i){var r=e.node(t);r.order=i+n,x.each(r.selfEdges,function(t){A.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:r.rank,order:i+ ++n,e:t.e,label:t.label},"_se")}),delete r.selfEdges})})}function y(e){x.each(e.nodes(),function(t){var n=e.node(t);if("selfedge"===n.dummy){var i=e.node(n.e.v),r=i.x+i.width/2,o=i.y,a=n.x-r,s=i.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:r+2*a/3,y:o-s},{x:r+5*a/6,y:o-s},{x:r+a,y:o},{x:r+5*a/6,y:o+s},{x:r+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}})}function b(e,t){return x.mapValues(x.pick(e,t),Number)}function w(e){var t={};return x.each(e,function(e,n){t[n.toLowerCase()]=e}),t}var x=e("./lodash"),k=e("./acyclic"),C=e("./normalize"),S=e("./rank"),_=e("./util").normalizeRanks,T=e("./parent-dummy-chains"),$=e("./util").removeEmptyRanks,E=e("./nesting-graph"),D=e("./add-border-segments"),M=e("./coordinate-system"),I=e("./order"),P=e("./position"),A=e("./util"),j=e("./graphlib").Graph;t.exports=i;var N=["nodesep","edgesep","ranksep","marginx","marginy"],O={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},L=["acyclicer","ranker","rankdir","align"],R=["width","height"],F={width:0,height:0},q=["minlen","weight","width","height","labeloffset"],H={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},U=["labelpos"]},{"./acyclic":2,"./add-border-segments":3,"./coordinate-system":4,"./graphlib":7,"./lodash":10,"./nesting-graph":11,"./normalize":12,"./order":17,"./parent-dummy-chains":22,"./position":24,"./rank":26,"./util":29}],10:[function(e,t,n){var i;if("function"==typeof e)try{i=e("lodash")}catch(r){}i||(i=window._),t.exports=i},{lodash:void 0}],11:[function(e,t,n){function i(e){var t=u.addDummyNode(e,"root",{},"_root"),n=o(e),i=l.max(n)-1,s=2*i+1;e.graph().nestingRoot=t,l.each(e.edges(),function(t){e.edge(t).minlen*=s});var c=a(e)+1;l.each(e.children(),function(o){r(e,t,s,c,i,n,o)}),e.graph().nodeRankFactor=s}function r(e,t,n,i,o,a,s){var c=e.children(s);if(!c.length)return void(s!==t&&e.setEdge(t,s,{weight:0,minlen:n}));var d=u.addBorderNode(e,"_bt"),p=u.addBorderNode(e,"_bb"),h=e.node(s);e.setParent(d,s),h.borderTop=d,e.setParent(p,s),h.borderBottom=p,l.each(c,function(l){r(e,t,n,i,o,a,l);var u=e.node(l),c=u.borderTop?u.borderTop:l,h=u.borderBottom?u.borderBottom:l,f=u.borderTop?i:2*i,g=c!==h?1:o-a[s]+1;e.setEdge(d,c,{weight:f,minlen:g,nestingEdge:!0}),e.setEdge(h,p,{weight:f,minlen:g,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,d,{weight:0,minlen:o+a[s]})}function o(e){function t(i,r){var o=e.children(i);o&&o.length&&l.each(o,function(e){t(e,r+1)}),n[i]=r}var n={};return l.each(e.children(),function(e){t(e,1)}),n}function a(e){return l.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function s(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,l.each(e.edges(),function(t){var n=e.edge(t);n.nestingEdge&&e.removeEdge(t)})}var l=e("./lodash"),u=e("./util");t.exports={run:i,cleanup:s}},{"./lodash":10,"./util":29}],12:[function(e,t,n){"use strict";function i(e){e.graph().dummyChains=[],a.each(e.edges(),function(t){r(e,t)})}function r(e,t){var n=t.v,i=e.node(n).rank,r=t.w,o=e.node(r).rank,a=t.name,l=e.edge(t),u=l.labelRank;if(o!==i+1){e.removeEdge(t);var c,d,p;for(p=0,++i;o>i;++p,++i)l.points=[],d={width:0,height:0,edgeLabel:l,edgeObj:t,rank:i},c=s.addDummyNode(e,"edge",d,"_d"),i===u&&(d.width=l.width,d.height=l.height,d.dummy="edge-label",d.labelpos=l.labelpos),e.setEdge(n,c,{weight:l.weight},a),0===p&&e.graph().dummyChains.push(c),n=c;e.setEdge(n,r,{weight:l.weight},a)}}function o(e){a.each(e.graph().dummyChains,function(t){var n,i=e.node(t),r=i.edgeLabel;for(e.setEdge(i.edgeObj,r);i.dummy;)n=e.successors(t)[0],e.removeNode(t),r.points.push({x:i.x,y:i.y}),"edge-label"===i.dummy&&(r.x=i.x,r.y=i.y,r.width=i.width,r.height=i.height),t=n,i=e.node(t)})}var a=e("./lodash"),s=e("./util");t.exports={run:i,undo:o}},{"./lodash":10,"./util":29}],13:[function(e,t,n){function i(e,t,n){var i,o={};r.each(n,function(n){for(var r,a,s=e.parent(n);s;){if(r=e.parent(s),r?(a=o[r],o[r]=s):(a=i,i=s),a&&a!==s)return void t.setEdge(a,s);s=r}})}var r=e("../lodash");t.exports=i},{"../lodash":10}],14:[function(e,t,n){function i(e,t){return r.map(t,function(t){var n=e.inEdges(t);if(n.length){var i=r.reduce(n,function(t,n){var i=e.edge(n),r=e.node(n.v);return{sum:t.sum+i.weight*r.order,weight:t.weight+i.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}return{v:t}})}var r=e("../lodash");t.exports=i},{"../lodash":10}],15:[function(e,t,n){function i(e,t,n){var i=r(e),s=new a({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(t){return e.node(t)});return o.each(e.nodes(),function(r){var a=e.node(r),l=e.parent(r);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(s.setNode(r),s.setParent(r,l||i),o.each(e[n](r),function(t){var n=t.v===r?t.w:t.v,i=s.edge(n,r),a=o.isUndefined(i)?0:i.weight;s.setEdge(n,r,{weight:e.edge(t).weight+a})}),o.has(a,"minRank")&&s.setNode(r,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),s}function r(e){for(var t;e.hasNode(t=o.uniqueId("_root")););return t}var o=e("../lodash"),a=e("../graphlib").Graph;t.exports=i},{"../graphlib":7,"../lodash":10}],16:[function(e,t,n){"use strict";function i(e,t){for(var n=0,i=1;i<t.length;++i)n+=r(e,t[i-1],t[i]);return n}function r(e,t,n){for(var i=o.zipObject(n,o.map(n,function(e,t){return t})),r=o.flatten(o.map(t,function(t){return o.chain(e.outEdges(t)).map(function(t){return{pos:i[t.w],weight:e.edge(t).weight}}).sortBy("pos").value()}),!0),a=1;a<n.length;)a<<=1;var s=2*a-1;a-=1;var l=o.map(new Array(s),function(){return 0}),u=0;return o.each(r.forEach(function(e){var t=e.pos+a;l[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=l[t+1]),t=t-1>>1,l[t]+=e.weight;u+=e.weight*n})),u}var o=e("../lodash");t.exports=i},{"../lodash":10}],17:[function(e,t,n){"use strict";function i(e){var t=f.maxRank(e),n=r(e,s.range(1,t+1),"inEdges"),i=r(e,s.range(t-1,-1,-1),"outEdges"),c=l(e);a(e,c);for(var d,p=Number.POSITIVE_INFINITY,h=0,g=0;4>g;++h,++g){o(h%2?n:i,h%4>=2),c=f.buildLayerMatrix(e);var m=u(e,c);p>m&&(g=0,d=s.cloneDeep(c),p=m)}a(e,d)}function r(e,t,n){return s.map(t,function(t){return d(e,t,n)})}function o(e,t){var n=new h;s.each(e,function(e){var i=e.graph().root,r=c(e,i,n,t);s.each(r.vs,function(t,n){e.node(t).order=n}),p(e,n,r.vs)})}function a(e,t){s.each(t,function(t){s.each(t,function(t,n){e.node(t).order=n})})}var s=e("../lodash"),l=e("./init-order"),u=e("./cross-count"),c=e("./sort-subgraph"),d=e("./build-layer-graph"),p=e("./add-subgraph-constraints"),h=e("../graphlib").Graph,f=e("../util");t.exports=i},{"../graphlib":7,"../lodash":10,"../util":29,"./add-subgraph-constraints":13,"./build-layer-graph":15,"./cross-count":16,"./init-order":18,"./sort-subgraph":20}],18:[function(e,t,n){"use strict";function i(e){function t(i){if(!r.has(n,i)){n[i]=!0;var o=e.node(i);a[o.rank].push(i),r.each(e.successors(i),t)}}var n={},i=r.filter(e.nodes(),function(t){return!e.children(t).length}),o=r.max(r.map(i,function(t){return e.node(t).rank})),a=r.map(r.range(o+1),function(){return[]}),s=r.sortBy(i,function(t){return e.node(t).rank});return r.each(s,t),a}var r=e("../lodash");t.exports=i},{"../lodash":10}],19:[function(e,t,n){"use strict";function i(e,t){var n={};a.each(e,function(e,t){var i=n[e.v]={indegree:0,"in":[],out:[],vs:[e.v],i:t};a.isUndefined(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)}),a.each(t.edges(),function(e){var t=n[e.v],i=n[e.w];a.isUndefined(t)||a.isUndefined(i)||(i.indegree++,t.out.push(n[e.w]))});var i=a.filter(n,function(e){return!e.indegree});return r(i)}function r(e){function t(e){return function(t){t.merged||(a.isUndefined(t.barycenter)||a.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&o(e,t)}}function n(t){return function(n){n["in"].push(t),0===--n.indegree&&e.push(n)}}for(var i=[];e.length;){var r=e.pop();i.push(r),a.each(r["in"].reverse(),t(r)),a.each(r.out,n(r))}return a.chain(i).filter(function(e){return!e.merged}).map(function(e){return a.pick(e,["vs","i","barycenter","weight"])}).value()}function o(e,t){var n=0,i=0;e.weight&&(n+=e.barycenter*e.weight,i+=e.weight),t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/i,e.weight=i,e.i=Math.min(t.i,e.i),t.merged=!0}var a=e("../lodash");t.exports=i},{"../lodash":10}],20:[function(e,t,n){function i(e,t,n,c){var d=e.children(t),p=e.node(t),h=p?p.borderLeft:void 0,f=p?p.borderRight:void 0,g={};h&&(d=a.filter(d,function(e){return e!==h&&e!==f}));var m=s(e,d);a.each(m,function(t){if(e.children(t.v).length){var r=i(e,t.v,n,c);g[t.v]=r,a.has(r,"barycenter")&&o(t,r)}});var v=l(m,n);r(v,g);var y=u(v,c);if(h&&(y.vs=a.flatten([h,y.vs,f],!0),e.predecessors(h).length)){var b=e.node(e.predecessors(h)[0]),w=e.node(e.predecessors(f)[0]);a.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+b.order+w.order)/(y.weight+2),y.weight+=2}return y}function r(e,t){a.each(e,function(e){e.vs=a.flatten(e.vs.map(function(e){return t[e]?t[e].vs:e}),!0)})}function o(e,t){a.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var a=e("../lodash"),s=e("./barycenter"),l=e("./resolve-conflicts"),u=e("./sort");t.exports=i},{"../lodash":10,"./barycenter":14,"./resolve-conflicts":19,"./sort":21}],21:[function(e,t,n){function i(e,t){var n=s.partition(e,function(e){return a.has(e,"barycenter")}),i=n.lhs,l=a.sortBy(n.rhs,function(e){return-e.i}),u=[],c=0,d=0,p=0;i.sort(o(!!t)),p=r(u,l,p),a.each(i,function(e){p+=e.vs.length,u.push(e.vs),c+=e.barycenter*e.weight,d+=e.weight,p=r(u,l,p)});var h={vs:a.flatten(u,!0)};return d&&(h.barycenter=c/d,h.weight=d),h}function r(e,t,n){for(var i;t.length&&(i=a.last(t)).i<=n;)t.pop(),e.push(i.vs),n++;return n}function o(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}var a=e("../lodash"),s=e("../util");t.exports=i},{"../lodash":10,"../util":29}],22:[function(e,t,n){function i(e){var t=o(e);a.each(e.graph().dummyChains,function(n){for(var i=e.node(n),o=i.edgeObj,a=r(e,t,o.v,o.w),s=a.path,l=a.lca,u=0,c=s[u],d=!0;n!==o.w;){if(i=e.node(n),d){for(;(c=s[u])!==l&&e.node(c).maxRank<i.rank;)u++;c===l&&(d=!1)}if(!d){for(;u<s.length-1&&e.node(c=s[u+1]).minRank<=i.rank;)u++;c=s[u]}e.setParent(n,c),n=e.successors(n)[0]}})}function r(e,t,n,i){var r,o,a=[],s=[],l=Math.min(t[n].low,t[i].low),u=Math.max(t[n].lim,t[i].lim);r=n;do r=e.parent(r),a.push(r);while(r&&(t[r].low>l||u>t[r].lim));for(o=r,r=i;(r=e.parent(r))!==o;)s.push(r);return{path:a.concat(s.reverse()),lca:o}}function o(e){function t(r){var o=i;a.each(e.children(r),t),n[r]={low:o,lim:i++}}var n={},i=0;return a.each(e.children(),t),n}var a=e("./lodash");t.exports=i},{"./lodash":10}],23:[function(e,t,n){"use strict";function i(e,t){function n(t,n){var r=0,s=0,l=t.length,u=v.last(n);return v.each(n,function(t,c){var d=o(e,t),p=d?e.node(d).order:l;(d||t===u)&&(v.each(n.slice(s,c+1),function(t){v.each(e.predecessors(t),function(n){var o=e.node(n),s=o.order;!(r>s||s>p)||o.dummy&&e.node(t).dummy||a(i,n,t)})}),s=c+1,r=p)}),n}var i={};return v.reduce(t,n),i}function r(e,t){function n(t,n,i,o,s){var l;v.each(v.range(n,i),function(n){l=t[n],e.node(l).dummy&&v.each(e.predecessors(l),function(t){var n=e.node(t);n.dummy&&(n.order<o||n.order>s)&&a(r,t,l)})})}function i(t,i){var r,o=-1,a=0;return v.each(i,function(s,l){if("border"===e.node(s).dummy){var u=e.predecessors(s);u.length&&(r=e.node(u[0]).order,n(i,a,l,o,r),a=l,o=r)}n(i,a,i.length,r,t.length)}),i}var r={};return v.reduce(t,i),r}function o(e,t){return e.node(t).dummy?v.find(e.predecessors(t),function(t){return e.node(t).dummy}):void 0}function a(e,t,n){if(t>n){var i=t;t=n,n=i}var r=e[t];r||(e[t]=r={}),r[n]=!0}function s(e,t,n){if(t>n){var i=t;t=n,n=i}return v.has(e[t],n)}function l(e,t,n,i){var r={},o={},a={};return v.each(t,function(e){v.each(e,function(e,t){r[e]=e,o[e]=e,a[e]=t})}),v.each(t,function(e){var t=-1;v.each(e,function(e){var l=i(e);if(l.length){l=v.sortBy(l,function(e){return a[e]});for(var u=(l.length-1)/2,c=Math.floor(u),d=Math.ceil(u);d>=c;++c){var p=l[c];o[e]===e&&t<a[p]&&!s(n,e,p)&&(o[p]=e,o[e]=r[e]=r[p],t=a[p])}}})}),{root:r,align:o}}function u(e,t,n,i,r){function o(e){v.has(u,e)||(u[e]=!0,s[e]=v.reduce(l.inEdges(e),function(e,t){return o(t.v),Math.max(e,s[t.v]+l.edge(t))},0))}function a(t){if(2!==u[t]){u[t]++;var n=e.node(t),i=v.reduce(l.outEdges(t),function(e,t){return a(t.w),Math.min(e,s[t.w]-l.edge(t))},Number.POSITIVE_INFINITY);i!==Number.POSITIVE_INFINITY&&n.borderType!==d&&(s[t]=Math.max(s[t],i))}}var s={},l=c(e,t,n,r),u={};v.each(l.nodes(),o);var d=r?"borderLeft":"borderRight";return v.each(l.nodes(),a),v.each(i,function(e){s[e]=s[n[e]]}),s}function c(e,t,n,i){var r=new y,o=e.graph(),a=g(o.nodesep,o.edgesep,i);return v.each(t,function(t){var i;v.each(t,function(t){var o=n[t];if(r.setNode(o),i){var s=n[i],l=r.edge(s,o);r.setEdge(s,o,Math.max(a(e,t,i),l||0))}i=t})}),r}function d(e,t){return v.min(t,function(t){var n=v.min(t,function(t,n){return t-m(e,n)/2}),i=v.max(t,function(t,n){return t+m(e,n)/2});return i-n})}function p(e,t){var n=v.min(t),i=v.max(t);v.each(["u","d"],function(r){v.each(["l","r"],function(o){var a,s=r+o,l=e[s];l!==t&&(a="l"===o?n-v.min(l):i-v.max(l),a&&(e[s]=v.mapValues(l,function(e){return e+a})))})})}function h(e,t){return v.mapValues(e.ul,function(n,i){if(t)return e[t.toLowerCase()][i];var r=v.sortBy(v.pluck(e,i));return(r[1]+r[2])/2})}function f(e){var t,n=b.buildLayerMatrix(e),o=v.merge(i(e,n),r(e,n)),a={};v.each(["u","d"],function(i){t="u"===i?n:v.values(n).reverse(),v.each(["l","r"],function(n){"r"===n&&(t=v.map(t,function(e){return v.values(e).reverse()}));var r=v.bind("u"===i?e.predecessors:e.successors,e),s=l(e,t,o,r),c=u(e,t,s.root,s.align,"r"===n);"r"===n&&(c=v.mapValues(c,function(e){return-e})),a[i+n]=c})});var s=d(e,a);return p(a,s),h(a,e.graph().align)}function g(e,t,n){return function(i,r,o){var a,s=i.node(r),l=i.node(o),u=0;if(u+=s.width/2,v.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=-s.width/2;break;case"r":a=s.width/2}if(a&&(u+=n?a:-a),a=0,u+=(s.dummy?t:e)/2,u+=(l.dummy?t:e)/2,u+=l.width/2,v.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":a=l.width/2;break;case"r":a=-l.width/2}return a&&(u+=n?a:-a),a=0,u}}function m(e,t){return e.node(t).width}var v=e("../lodash"),y=e("../graphlib").Graph,b=e("../util");t.exports={positionX:f,findType1Conflicts:i,findType2Conflicts:r,addConflict:a,hasConflict:s,verticalAlignment:l,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:d,balance:h}},{"../graphlib":7,"../lodash":10,"../util":29}],24:[function(e,t,n){"use strict";function i(e){e=a.asNonCompoundGraph(e),r(e),o.each(s(e),function(t,n){e.node(n).x=t})}function r(e){var t=a.buildLayerMatrix(e),n=e.graph().ranksep,i=0;o.each(t,function(t){var r=o.max(o.map(t,function(t){return e.node(t).height}));o.each(t,function(t){e.node(t).y=i+r/2}),i+=r+n})}var o=e("../lodash"),a=e("../util"),s=e("./bk").positionX;t.exports=i},{"../lodash":10,"../util":29,"./bk":23}],25:[function(e,t,n){"use strict";function i(e){var t=new l({directed:!1}),n=e.nodes()[0],i=e.nodeCount();t.setNode(n,{});for(var s,c;r(t,e)<i;)s=o(t,e),c=t.hasNode(s.v)?u(e,s):-u(e,s),a(t,e,c);return t}function r(e,t){function n(i){s.each(t.nodeEdges(i),function(r){var o=r.v,a=i===o?r.w:o;e.hasNode(a)||u(t,r)||(e.setNode(a,{}),e.setEdge(i,a,{}),n(a))})}return s.each(e.nodes(),n),e.nodeCount()}function o(e,t){return s.min(t.edges(),function(n){return e.hasNode(n.v)!==e.hasNode(n.w)?u(t,n):void 0})}function a(e,t,n){s.each(e.nodes(),function(e){t.node(e).rank+=n})}var s=e("../lodash"),l=e("../graphlib").Graph,u=e("./util").slack;t.exports=i},{"../graphlib":7,"../lodash":10,"./util":28}],26:[function(e,t,n){"use strict";function i(e){switch(e.graph().ranker){case"network-simplex":o(e);break;case"tight-tree":r(e);break;case"longest-path":c(e);break;default:o(e)}}function r(e){s(e),l(e)}function o(e){u(e)}var a=e("./util"),s=a.longestPath,l=e("./feasible-tree"),u=e("./network-simplex");t.exports=i;var c=s},{"./feasible-tree":25,"./network-simplex":27,"./util":28}],27:[function(e,t,n){"use strict";function i(e){e=x(e),y(e);var t=m(e);s(t),r(t,e);for(var n,i;n=u(t);)i=c(t,e,n),d(t,e,n,i)}function r(e,t){var n=w(e,e.nodes());n=n.slice(0,n.length-1),g.each(n,function(n){o(e,t,n)})}function o(e,t,n){var i=e.node(n),r=i.parent;e.edge(n,r).cutvalue=a(e,t,n)}function a(e,t,n){var i=e.node(n),r=i.parent,o=!0,a=t.edge(n,r),s=0;return a||(o=!1,a=t.edge(r,n)),s=a.weight,g.each(t.nodeEdges(n),function(i){var a=i.v===n,l=a?i.w:i.v;if(l!==r){var u=a===o,c=t.edge(i).weight;if(s+=u?c:-c,h(e,n,l)){var d=e.edge(n,l).cutvalue;s+=u?-d:d}}}),s}function s(e,t){arguments.length<2&&(t=e.nodes()[0]),l(e,{},1,t)}function l(e,t,n,i,r){var o=n,a=e.node(i);return t[i]=!0,g.each(e.neighbors(i),function(r){g.has(t,r)||(n=l(e,t,n,r,i))}),a.low=o,a.lim=n++,r?a.parent=r:delete a.parent,n}function u(e){return g.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function c(e,t,n){var i=n.v,r=n.w;t.hasEdge(i,r)||(i=n.w,r=n.v);var o=e.node(i),a=e.node(r),s=o,l=!1;o.lim>a.lim&&(s=a,l=!0);var u=g.filter(t.edges(),function(t){return l===f(e,e.node(t.v),s)&&l!==f(e,e.node(t.w),s)});return g.min(u,function(e){return v(t,e)})}function d(e,t,n,i){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(i.v,i.w,{}),s(e),r(e,t),p(e,t)}function p(e,t){var n=g.find(e.nodes(),function(e){return!t.node(e).parent}),i=b(e,n);i=i.slice(1),g.each(i,function(n){var i=e.node(n).parent,r=t.edge(n,i),o=!1;r||(r=t.edge(i,n),o=!0),t.node(n).rank=t.node(i).rank+(o?r.minlen:-r.minlen)})}function h(e,t,n){return e.hasEdge(t,n)}function f(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var g=e("../lodash"),m=e("./feasible-tree"),v=e("./util").slack,y=e("./util").longestPath,b=e("../graphlib").alg.preorder,w=e("../graphlib").alg.postorder,x=e("../util").simplify;t.exports=i,i.initLowLimValues=s,i.initCutValues=r,i.calcCutValue=a,i.leaveEdge=u,i.enterEdge=c,i.exchangeEdges=d},{"../graphlib":7,"../lodash":10,"../util":29,"./feasible-tree":25,"./util":28}],28:[function(e,t,n){"use strict";function i(e){function t(i){var r=e.node(i);if(o.has(n,i))return r.rank;n[i]=!0;var a=o.min(o.map(e.outEdges(i),function(n){return t(n.w)-e.edge(n).minlen}));return a===Number.POSITIVE_INFINITY&&(a=0),r.rank=a}var n={};o.each(e.sources(),t)}function r(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var o=e("../lodash");t.exports={longestPath:i,slack:r}},{"../lodash":10}],29:[function(e,t,n){"use strict";function i(e,t,n,i){var r;do r=v.uniqueId(i);while(e.hasNode(r));return n.dummy=t,e.setNode(r,n),r}function r(e){var t=(new y).setGraph(e.graph());return v.each(e.nodes(),function(n){t.setNode(n,e.node(n))}),v.each(e.edges(),function(n){var i=t.edge(n.v,n.w)||{weight:0,minlen:1},r=e.edge(n);t.setEdge(n.v,n.w,{weight:i.weight+r.weight,minlen:Math.max(i.minlen,r.minlen)})}),t}function o(e){var t=new y({multigraph:e.isMultigraph()}).setGraph(e.graph());return v.each(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),v.each(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function a(e){var t=v.map(e.nodes(),function(t){var n={};return v.each(e.outEdges(t),function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return v.zipObject(e.nodes(),t)}function s(e){var t=v.map(e.nodes(),function(t){var n={};return v.each(e.inEdges(t),function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return v.zipObject(e.nodes(),t)}function l(e,t){var n=e.x,i=e.y,r=t.x-n,o=t.y-i,a=e.width/2,s=e.height/2;if(!r&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(o)*a>Math.abs(r)*s?(0>o&&(s=-s),l=s*r/o,u=s):(0>r&&(a=-a),l=a,u=a*o/r),{x:n+l,y:i+u}}function u(e){var t=v.map(v.range(h(e)+1),function(){return[]});return v.each(e.nodes(),function(n){var i=e.node(n),r=i.rank;v.isUndefined(r)||(t[r][i.order]=n)}),t}function c(e){var t=v.min(v.map(e.nodes(),function(t){return e.node(t).rank}));v.each(e.nodes(),function(n){var i=e.node(n);v.has(i,"rank")&&(i.rank-=t)})}function d(e){var t=v.min(v.map(e.nodes(),function(t){return e.node(t).rank})),n=[];v.each(e.nodes(),function(i){var r=e.node(i).rank-t;n[r]||(n[r]=[]),n[r].push(i)});var i=0,r=e.graph().nodeRankFactor;v.each(n,function(t,n){v.isUndefined(t)&&n%r!==0?--i:i&&v.each(t,function(t){e.node(t).rank+=i})})}function p(e,t,n,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),i(e,"border",o,t)}function h(e){return v.max(v.map(e.nodes(),function(t){var n=e.node(t).rank;return v.isUndefined(n)?void 0:n}))}function f(e,t){var n={lhs:[],rhs:[]};return v.each(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function g(e,t){var n=v.now();try{return t()}finally{console.log(e+" time: "+(v.now()-n)+"ms")}}function m(e,t){return t()}var v=e("./lodash"),y=e("./graphlib").Graph;t.exports={addDummyNode:i,simplify:r,asNonCompoundGraph:o,successorWeights:a,predecessorWeights:s,intersectRect:l,buildLayerMatrix:u,normalizeRanks:c,removeEmptyRanks:d,addBorderNode:p,maxRank:h,partition:f,time:g,notime:m}},{"./graphlib":7,"./lodash":10}],30:[function(e,t,n){t.exports="0.7.4"},{}]},{},[1])(1)}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.dagre=e()}}(function(){return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return r(n?n:e)},c,c.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){t.exports={graphlib:e("./lib/graphlib"),layout:e("./lib/layout"),debug:e("./lib/debug"),util:{time:e("./lib/util").time,notime:e("./lib/util").notime},version:e("./lib/version")}},{"./lib/debug":6,"./lib/graphlib":7,"./lib/layout":9,"./lib/util":29,"./lib/version":30}],2:[function(e,t,n){"use strict";function i(e){function t(e){return function(t){return e.edge(t).weight}}var n="greedy"===e.graph().acyclicer?s(e,t(e)):r(e);a.each(n,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,a.uniqueId("rev"))})}function r(e){function t(o){a.has(r,o)||(r[o]=!0,i[o]=!0,a.each(e.outEdges(o),function(e){a.has(i,e.w)?n.push(e):t(e.w)}),delete i[o])}var n=[],i={},r={};return a.each(e.nodes(),t),n}function o(e){a.each(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var i=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,i)}})}var a=e("./lodash"),s=e("./greedy-fas");t.exports={run:i,undo:o}},{"./greedy-fas":8,"./lodash":10}],3:[function(e,t,n){function i(e){function t(n){var i=e.children(n),a=e.node(n);if(i.length&&o.each(i,t),o.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,l=a.maxRank+1;l>s;++s)r(e,"borderLeft","_bl",n,a,s),r(e,"borderRight","_br",n,a,s)}}o.each(e.children(),t)}function r(e,t,n,i,r,o){var s={width:0,height:0,rank:o,borderType:t},l=r[t][o-1],u=a.addDummyNode(e,"border",s,n);r[t][o]=u,e.setParent(u,i),l&&e.setEdge(l,u,{weight:1})}var o=e("./lodash"),a=e("./util");t.exports=i},{"./lodash":10,"./util":29}],4:[function(e,t,n){"use strict";function i(e){var t=e.graph().rankdir.toLowerCase();("lr"===t||"rl"===t)&&o(e)}function r(e){var t=e.graph().rankdir.toLowerCase();("bt"===t||"rl"===t)&&s(e),("lr"===t||"rl"===t)&&(u(e),o(e))}function o(e){d.each(e.nodes(),function(t){a(e.node(t))}),d.each(e.edges(),function(t){a(e.edge(t))})}function a(e){var t=e.width;e.width=e.height,e.height=t}function s(e){d.each(e.nodes(),function(t){l(e.node(t))}),d.each(e.edges(),function(t){var n=e.edge(t);d.each(n.points,l),d.has(n,"y")&&l(n)})}function l(e){e.y=-e.y}function u(e){d.each(e.nodes(),function(t){c(e.node(t))}),d.each(e.edges(),function(t){var n=e.edge(t);d.each(n.points,c),d.has(n,"x")&&c(n)})}function c(e){var t=e.x;e.x=e.y,e.y=t}var d=e("./lodash");t.exports={adjust:i,undo:r}},{"./lodash":10}],5:[function(e,t,n){function i(){var e={};e._next=e._prev=e,this._sentinel=e}function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function o(e,t){return"_next"!==e&&"_prev"!==e?t:void 0}t.exports=i,i.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;return t!==e?(r(t),t):void 0},i.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},i.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,o)),n=n._prev;return"["+e.join(", ")+"]"}},{}],6:[function(e,t,n){function i(e){var t=o.buildLayerMatrix(e),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.each(e.nodes(),function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)}),r.each(e.edges(),function(e){n.setEdge(e.v,e.w,{},e.name)}),r.each(t,function(e,t){
|
|
3232
|
|
-var i="layer"+t;n.setNode(i,{rank:"same"}),r.reduce(e,function(e,t){return n.setEdge(e,t,{style:"invis"}),t})}),n}var r=e("./lodash"),o=e("./util"),a=e("./graphlib").Graph;t.exports={debugOrdering:i}},{"./graphlib":7,"./lodash":10,"./util":29}],7:[function(e,t,n){var i;if("function"==typeof e)try{i=e("graphlib")}catch(r){}i||(i=window.graphlib),t.exports=i},{graphlib:void 0}],8:[function(e,t,n){function i(e,t){if(e.nodeCount()<=1)return[];var n=a(e,t||d),i=r(n.graph,n.buckets,n.zeroIdx);return l.flatten(l.map(i,function(t){return e.outEdges(t.v,t.w)}),!0)}function r(e,t,n){for(var i,r=[],a=t[t.length-1],s=t[0];e.nodeCount();){for(;i=s.dequeue();)o(e,t,n,i);for(;i=a.dequeue();)o(e,t,n,i);if(e.nodeCount())for(var l=t.length-2;l>0;--l)if(i=t[l].dequeue()){r=r.concat(o(e,t,n,i,!0));break}}return r}function o(e,t,n,i,r){var o=r?[]:void 0;return l.each(e.inEdges(i.v),function(i){var a=e.edge(i),l=e.node(i.v);r&&o.push({v:i.v,w:i.w}),l.out-=a,s(t,n,l)}),l.each(e.outEdges(i.v),function(i){var r=e.edge(i),o=i.w,a=e.node(o);a["in"]-=r,s(t,n,a)}),e.removeNode(i.v),o}function a(e,t){var n=new u,i=0,r=0;l.each(e.nodes(),function(e){n.setNode(e,{v:e,"in":0,out:0})}),l.each(e.edges(),function(e){var o=n.edge(e.v,e.w)||0,a=t(e),s=o+a;n.setEdge(e.v,e.w,s),r=Math.max(r,n.node(e.v).out+=a),i=Math.max(i,n.node(e.w)["in"]+=a)});var o=l.range(r+i+3).map(function(){return new c}),a=i+1;return l.each(n.nodes(),function(e){s(o,a,n.node(e))}),{graph:n,buckets:o,zeroIdx:a}}function s(e,t,n){n.out?n["in"]?e[n.out-n["in"]+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}var l=e("./lodash"),u=e("./graphlib").Graph,c=e("./data/list");t.exports=i;var d=l.constant(1)},{"./data/list":5,"./graphlib":7,"./lodash":10}],9:[function(e,t,n){"use strict";function i(e,t){var n=t&&t.debugTiming?A.time:A.notime;n("layout",function(){var t=n(" buildLayoutGraph",function(){return a(e)});n(" runLayout",function(){r(t,n)}),n(" updateInputGraph",function(){o(e,t)})})}function r(e,t){t(" makeSpaceForEdgeLabels",function(){s(e)}),t(" removeSelfEdges",function(){m(e)}),t(" acyclic",function(){k.run(e)}),t(" nestingGraph.run",function(){E.run(e)}),t(" rank",function(){S(A.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){l(e)}),t(" removeEmptyRanks",function(){$(e)}),t(" nestingGraph.cleanup",function(){E.cleanup(e)}),t(" normalizeRanks",function(){_(e)}),t(" assignRankMinMax",function(){u(e)}),t(" removeEdgeLabelProxies",function(){c(e)}),t(" normalize.run",function(){C.run(e)}),t(" parentDummyChains",function(){T(e)}),t(" addBorderSegments",function(){D(e)}),t(" order",function(){I(e)}),t(" insertSelfEdges",function(){v(e)}),t(" adjustCoordinateSystem",function(){M.adjust(e)}),t(" position",function(){P(e)}),t(" positionSelfEdges",function(){y(e)}),t(" removeBorderNodes",function(){g(e)}),t(" normalize.undo",function(){C.undo(e)}),t(" fixupEdgeLabelCoords",function(){h(e)}),t(" undoCoordinateSystem",function(){M.undo(e)}),t(" translateGraph",function(){d(e)}),t(" assignNodeIntersects",function(){p(e)}),t(" reversePoints",function(){f(e)}),t(" acyclic.undo",function(){k.undo(e)})}function o(e,t){x.each(e.nodes(),function(n){var i=e.node(n),r=t.node(n);i&&(i.x=r.x,i.y=r.y,t.children(n).length&&(i.width=r.width,i.height=r.height))}),x.each(e.edges(),function(n){var i=e.edge(n),r=t.edge(n);i.points=r.points,x.has(r,"x")&&(i.x=r.x,i.y=r.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function a(e){var t=new j({multigraph:!0,compound:!0}),n=w(e.graph());return t.setGraph(x.merge({},O,b(n,N),x.pick(n,L))),x.each(e.nodes(),function(n){var i=w(e.node(n));t.setNode(n,x.defaults(b(i,R),F)),t.setParent(n,e.parent(n))}),x.each(e.edges(),function(n){var i=w(e.edge(n));t.setEdge(n,x.merge({},H,b(i,q),x.pick(i,U)))}),t}function s(e){var t=e.graph();t.ranksep/=2,x.each(e.edges(),function(n){var i=e.edge(n);i.minlen*=2,"c"!==i.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function l(e){x.each(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var i=e.node(t.v),r=e.node(t.w),o={rank:(r.rank-i.rank)/2+i.rank,e:t};A.addDummyNode(e,"edge-proxy",o,"_ep")}})}function u(e){var t=0;x.each(e.nodes(),function(n){var i=e.node(n);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=x.max(t,i.maxRank))}),e.graph().maxRank=t}function c(e){x.each(e.nodes(),function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function d(e){function t(e){var t=e.x,a=e.y,s=e.width,l=e.height;n=Math.min(n,t-s/2),i=Math.max(i,t+s/2),r=Math.min(r,a-l/2),o=Math.max(o,a+l/2)}var n=Number.POSITIVE_INFINITY,i=0,r=Number.POSITIVE_INFINITY,o=0,a=e.graph(),s=a.marginx||0,l=a.marginy||0;x.each(e.nodes(),function(n){t(e.node(n))}),x.each(e.edges(),function(n){var i=e.edge(n);x.has(i,"x")&&t(i)}),n-=s,r-=l,x.each(e.nodes(),function(t){var i=e.node(t);i.x-=n,i.y-=r}),x.each(e.edges(),function(t){var i=e.edge(t);x.each(i.points,function(e){e.x-=n,e.y-=r}),x.has(i,"x")&&(i.x-=n),x.has(i,"y")&&(i.y-=r)}),a.width=i-n+s,a.height=o-r+l}function p(e){x.each(e.edges(),function(t){var n,i,r=e.edge(t),o=e.node(t.v),a=e.node(t.w);r.points?(n=r.points[0],i=r.points[r.points.length-1]):(r.points=[],n=a,i=o),r.points.unshift(A.intersectRect(o,n)),r.points.push(A.intersectRect(a,i))})}function h(e){x.each(e.edges(),function(t){var n=e.edge(t);if(x.has(n,"x"))switch(("l"===n.labelpos||"r"===n.labelpos)&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}function f(e){x.each(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function g(e){x.each(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),i=e.node(n.borderTop),r=e.node(n.borderBottom),o=e.node(x.last(n.borderLeft)),a=e.node(x.last(n.borderRight));n.width=Math.abs(a.x-o.x),n.height=Math.abs(r.y-i.y),n.x=o.x+n.width/2,n.y=i.y+n.height/2}}),x.each(e.nodes(),function(t){"border"===e.node(t).dummy&&e.removeNode(t)})}function m(e){x.each(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function v(e){var t=A.buildLayerMatrix(e);x.each(t,function(t){var n=0;x.each(t,function(t,i){var r=e.node(t);r.order=i+n,x.each(r.selfEdges,function(t){A.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:r.rank,order:i+ ++n,e:t.e,label:t.label},"_se")}),delete r.selfEdges})})}function y(e){x.each(e.nodes(),function(t){var n=e.node(t);if("selfedge"===n.dummy){var i=e.node(n.e.v),r=i.x+i.width/2,o=i.y,a=n.x-r,s=i.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:r+2*a/3,y:o-s},{x:r+5*a/6,y:o-s},{x:r+a,y:o},{x:r+5*a/6,y:o+s},{x:r+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}})}function b(e,t){return x.mapValues(x.pick(e,t),Number)}function w(e){var t={};return x.each(e,function(e,n){t[n.toLowerCase()]=e}),t}var x=e("./lodash"),k=e("./acyclic"),C=e("./normalize"),S=e("./rank"),_=e("./util").normalizeRanks,T=e("./parent-dummy-chains"),$=e("./util").removeEmptyRanks,E=e("./nesting-graph"),D=e("./add-border-segments"),M=e("./coordinate-system"),I=e("./order"),P=e("./position"),A=e("./util"),j=e("./graphlib").Graph;t.exports=i;var N=["nodesep","edgesep","ranksep","marginx","marginy"],O={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},L=["acyclicer","ranker","rankdir","align"],R=["width","height"],F={width:0,height:0},q=["minlen","weight","width","height","labeloffset"],H={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},U=["labelpos"]},{"./acyclic":2,"./add-border-segments":3,"./coordinate-system":4,"./graphlib":7,"./lodash":10,"./nesting-graph":11,"./normalize":12,"./order":17,"./parent-dummy-chains":22,"./position":24,"./rank":26,"./util":29}],10:[function(e,t,n){var i;if("function"==typeof e)try{i=e("lodash")}catch(r){}i||(i=window._),t.exports=i},{lodash:void 0}],11:[function(e,t,n){function i(e){var t=u.addDummyNode(e,"root",{},"_root"),n=o(e),i=l.max(n)-1,s=2*i+1;e.graph().nestingRoot=t,l.each(e.edges(),function(t){e.edge(t).minlen*=s});var c=a(e)+1;l.each(e.children(),function(o){r(e,t,s,c,i,n,o)}),e.graph().nodeRankFactor=s}function r(e,t,n,i,o,a,s){var c=e.children(s);if(!c.length)return void(s!==t&&e.setEdge(t,s,{weight:0,minlen:n}));var d=u.addBorderNode(e,"_bt"),p=u.addBorderNode(e,"_bb"),h=e.node(s);e.setParent(d,s),h.borderTop=d,e.setParent(p,s),h.borderBottom=p,l.each(c,function(l){r(e,t,n,i,o,a,l);var u=e.node(l),c=u.borderTop?u.borderTop:l,h=u.borderBottom?u.borderBottom:l,f=u.borderTop?i:2*i,g=c!==h?1:o-a[s]+1;e.setEdge(d,c,{weight:f,minlen:g,nestingEdge:!0}),e.setEdge(h,p,{weight:f,minlen:g,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,d,{weight:0,minlen:o+a[s]})}function o(e){function t(i,r){var o=e.children(i);o&&o.length&&l.each(o,function(e){t(e,r+1)}),n[i]=r}var n={};return l.each(e.children(),function(e){t(e,1)}),n}function a(e){return l.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function s(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,l.each(e.edges(),function(t){var n=e.edge(t);n.nestingEdge&&e.removeEdge(t)})}var l=e("./lodash"),u=e("./util");t.exports={run:i,cleanup:s}},{"./lodash":10,"./util":29}],12:[function(e,t,n){"use strict";function i(e){e.graph().dummyChains=[],a.each(e.edges(),function(t){r(e,t)})}function r(e,t){var n=t.v,i=e.node(n).rank,r=t.w,o=e.node(r).rank,a=t.name,l=e.edge(t),u=l.labelRank;if(o!==i+1){e.removeEdge(t);var c,d,p;for(p=0,++i;o>i;++p,++i)l.points=[],d={width:0,height:0,edgeLabel:l,edgeObj:t,rank:i},c=s.addDummyNode(e,"edge",d,"_d"),i===u&&(d.width=l.width,d.height=l.height,d.dummy="edge-label",d.labelpos=l.labelpos),e.setEdge(n,c,{weight:l.weight},a),0===p&&e.graph().dummyChains.push(c),n=c;e.setEdge(n,r,{weight:l.weight},a)}}function o(e){a.each(e.graph().dummyChains,function(t){var n,i=e.node(t),r=i.edgeLabel;for(e.setEdge(i.edgeObj,r);i.dummy;)n=e.successors(t)[0],e.removeNode(t),r.points.push({x:i.x,y:i.y}),"edge-label"===i.dummy&&(r.x=i.x,r.y=i.y,r.width=i.width,r.height=i.height),t=n,i=e.node(t)})}var a=e("./lodash"),s=e("./util");t.exports={run:i,undo:o}},{"./lodash":10,"./util":29}],13:[function(e,t,n){function i(e,t,n){var i,o={};r.each(n,function(n){for(var r,a,s=e.parent(n);s;){if(r=e.parent(s),r?(a=o[r],o[r]=s):(a=i,i=s),a&&a!==s)return void t.setEdge(a,s);s=r}})}var r=e("../lodash");t.exports=i},{"../lodash":10}],14:[function(e,t,n){function i(e,t){return r.map(t,function(t){var n=e.inEdges(t);if(n.length){var i=r.reduce(n,function(t,n){var i=e.edge(n),r=e.node(n.v);return{sum:t.sum+i.weight*r.order,weight:t.weight+i.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}return{v:t}})}var r=e("../lodash");t.exports=i},{"../lodash":10}],15:[function(e,t,n){function i(e,t,n){var i=r(e),s=new a({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(t){return e.node(t)});return o.each(e.nodes(),function(r){var a=e.node(r),l=e.parent(r);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(s.setNode(r),s.setParent(r,l||i),o.each(e[n](r),function(t){var n=t.v===r?t.w:t.v,i=s.edge(n,r),a=o.isUndefined(i)?0:i.weight;s.setEdge(n,r,{weight:e.edge(t).weight+a})}),o.has(a,"minRank")&&s.setNode(r,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),s}function r(e){for(var t;e.hasNode(t=o.uniqueId("_root")););return t}var o=e("../lodash"),a=e("../graphlib").Graph;t.exports=i},{"../graphlib":7,"../lodash":10}],16:[function(e,t,n){"use strict";function i(e,t){for(var n=0,i=1;i<t.length;++i)n+=r(e,t[i-1],t[i]);return n}function r(e,t,n){for(var i=o.zipObject(n,o.map(n,function(e,t){return t})),r=o.flatten(o.map(t,function(t){return o.chain(e.outEdges(t)).map(function(t){return{pos:i[t.w],weight:e.edge(t).weight}}).sortBy("pos").value()}),!0),a=1;a<n.length;)a<<=1;var s=2*a-1;a-=1;var l=o.map(new Array(s),function(){return 0}),u=0;return o.each(r.forEach(function(e){var t=e.pos+a;l[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=l[t+1]),t=t-1>>1,l[t]+=e.weight;u+=e.weight*n})),u}var o=e("../lodash");t.exports=i},{"../lodash":10}],17:[function(e,t,n){"use strict";function i(e){var t=f.maxRank(e),n=r(e,s.range(1,t+1),"inEdges"),i=r(e,s.range(t-1,-1,-1),"outEdges"),c=l(e);a(e,c);for(var d,p=Number.POSITIVE_INFINITY,h=0,g=0;4>g;++h,++g){o(h%2?n:i,h%4>=2),c=f.buildLayerMatrix(e);var m=u(e,c);p>m&&(g=0,d=s.cloneDeep(c),p=m)}a(e,d)}function r(e,t,n){return s.map(t,function(t){return d(e,t,n)})}function o(e,t){var n=new h;s.each(e,function(e){var i=e.graph().root,r=c(e,i,n,t);s.each(r.vs,function(t,n){e.node(t).order=n}),p(e,n,r.vs)})}function a(e,t){s.each(t,function(t){s.each(t,function(t,n){e.node(t).order=n})})}var s=e("../lodash"),l=e("./init-order"),u=e("./cross-count"),c=e("./sort-subgraph"),d=e("./build-layer-graph"),p=e("./add-subgraph-constraints"),h=e("../graphlib").Graph,f=e("../util");t.exports=i},{"../graphlib":7,"../lodash":10,"../util":29,"./add-subgraph-constraints":13,"./build-layer-graph":15,"./cross-count":16,"./init-order":18,"./sort-subgraph":20}],18:[function(e,t,n){"use strict";function i(e){function t(i){if(!r.has(n,i)){n[i]=!0;var o=e.node(i);a[o.rank].push(i),r.each(e.successors(i),t)}}var n={},i=r.filter(e.nodes(),function(t){return!e.children(t).length}),o=r.max(r.map(i,function(t){return e.node(t).rank})),a=r.map(r.range(o+1),function(){return[]}),s=r.sortBy(i,function(t){return e.node(t).rank});return r.each(s,t),a}var r=e("../lodash");t.exports=i},{"../lodash":10}],19:[function(e,t,n){"use strict";function i(e,t){var n={};a.each(e,function(e,t){var i=n[e.v]={indegree:0,"in":[],out:[],vs:[e.v],i:t};a.isUndefined(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)}),a.each(t.edges(),function(e){var t=n[e.v],i=n[e.w];a.isUndefined(t)||a.isUndefined(i)||(i.indegree++,t.out.push(n[e.w]))});var i=a.filter(n,function(e){return!e.indegree});return r(i)}function r(e){function t(e){return function(t){t.merged||(a.isUndefined(t.barycenter)||a.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&o(e,t)}}function n(t){return function(n){n["in"].push(t),0===--n.indegree&&e.push(n)}}for(var i=[];e.length;){var r=e.pop();i.push(r),a.each(r["in"].reverse(),t(r)),a.each(r.out,n(r))}return a.chain(i).filter(function(e){return!e.merged}).map(function(e){return a.pick(e,["vs","i","barycenter","weight"])}).value()}function o(e,t){var n=0,i=0;e.weight&&(n+=e.barycenter*e.weight,i+=e.weight),t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/i,e.weight=i,e.i=Math.min(t.i,e.i),t.merged=!0}var a=e("../lodash");t.exports=i},{"../lodash":10}],20:[function(e,t,n){function i(e,t,n,c){var d=e.children(t),p=e.node(t),h=p?p.borderLeft:void 0,f=p?p.borderRight:void 0,g={};h&&(d=a.filter(d,function(e){return e!==h&&e!==f}));var m=s(e,d);a.each(m,function(t){if(e.children(t.v).length){var r=i(e,t.v,n,c);g[t.v]=r,a.has(r,"barycenter")&&o(t,r)}});var v=l(m,n);r(v,g);var y=u(v,c);if(h&&(y.vs=a.flatten([h,y.vs,f],!0),e.predecessors(h).length)){var b=e.node(e.predecessors(h)[0]),w=e.node(e.predecessors(f)[0]);a.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+b.order+w.order)/(y.weight+2),y.weight+=2}return y}function r(e,t){a.each(e,function(e){e.vs=a.flatten(e.vs.map(function(e){return t[e]?t[e].vs:e}),!0)})}function o(e,t){a.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var a=e("../lodash"),s=e("./barycenter"),l=e("./resolve-conflicts"),u=e("./sort");t.exports=i},{"../lodash":10,"./barycenter":14,"./resolve-conflicts":19,"./sort":21}],21:[function(e,t,n){function i(e,t){var n=s.partition(e,function(e){return a.has(e,"barycenter")}),i=n.lhs,l=a.sortBy(n.rhs,function(e){return-e.i}),u=[],c=0,d=0,p=0;i.sort(o(!!t)),p=r(u,l,p),a.each(i,function(e){p+=e.vs.length,u.push(e.vs),c+=e.barycenter*e.weight,d+=e.weight,p=r(u,l,p)});var h={vs:a.flatten(u,!0)};return d&&(h.barycenter=c/d,h.weight=d),h}function r(e,t,n){for(var i;t.length&&(i=a.last(t)).i<=n;)t.pop(),e.push(i.vs),n++;return n}function o(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}var a=e("../lodash"),s=e("../util");t.exports=i},{"../lodash":10,"../util":29}],22:[function(e,t,n){function i(e){var t=o(e);a.each(e.graph().dummyChains,function(n){for(var i=e.node(n),o=i.edgeObj,a=r(e,t,o.v,o.w),s=a.path,l=a.lca,u=0,c=s[u],d=!0;n!==o.w;){if(i=e.node(n),d){for(;(c=s[u])!==l&&e.node(c).maxRank<i.rank;)u++;c===l&&(d=!1)}if(!d){for(;u<s.length-1&&e.node(c=s[u+1]).minRank<=i.rank;)u++;c=s[u]}e.setParent(n,c),n=e.successors(n)[0]}})}function r(e,t,n,i){var r,o,a=[],s=[],l=Math.min(t[n].low,t[i].low),u=Math.max(t[n].lim,t[i].lim);r=n;do r=e.parent(r),a.push(r);while(r&&(t[r].low>l||u>t[r].lim));for(o=r,r=i;(r=e.parent(r))!==o;)s.push(r);return{path:a.concat(s.reverse()),lca:o}}function o(e){function t(r){var o=i;a.each(e.children(r),t),n[r]={low:o,lim:i++}}var n={},i=0;return a.each(e.children(),t),n}var a=e("./lodash");t.exports=i},{"./lodash":10}],23:[function(e,t,n){"use strict";function i(e,t){function n(t,n){var r=0,s=0,l=t.length,u=v.last(n);return v.each(n,function(t,c){var d=o(e,t),p=d?e.node(d).order:l;(d||t===u)&&(v.each(n.slice(s,c+1),function(t){v.each(e.predecessors(t),function(n){var o=e.node(n),s=o.order;!(r>s||s>p)||o.dummy&&e.node(t).dummy||a(i,n,t)})}),s=c+1,r=p)}),n}var i={};return v.reduce(t,n),i}function r(e,t){function n(t,n,i,o,s){var l;v.each(v.range(n,i),function(n){l=t[n],e.node(l).dummy&&v.each(e.predecessors(l),function(t){var n=e.node(t);n.dummy&&(n.order<o||n.order>s)&&a(r,t,l)})})}function i(t,i){var r,o=-1,a=0;return v.each(i,function(s,l){if("border"===e.node(s).dummy){var u=e.predecessors(s);u.length&&(r=e.node(u[0]).order,n(i,a,l,o,r),a=l,o=r)}n(i,a,i.length,r,t.length)}),i}var r={};return v.reduce(t,i),r}function o(e,t){return e.node(t).dummy?v.find(e.predecessors(t),function(t){return e.node(t).dummy}):void 0}function a(e,t,n){if(t>n){var i=t;t=n,n=i}var r=e[t];r||(e[t]=r={}),r[n]=!0}function s(e,t,n){if(t>n){var i=t;t=n,n=i}return v.has(e[t],n)}function l(e,t,n,i){var r={},o={},a={};return v.each(t,function(e){v.each(e,function(e,t){r[e]=e,o[e]=e,a[e]=t})}),v.each(t,function(e){var t=-1;v.each(e,function(e){var l=i(e);if(l.length){l=v.sortBy(l,function(e){return a[e]});for(var u=(l.length-1)/2,c=Math.floor(u),d=Math.ceil(u);d>=c;++c){var p=l[c];o[e]===e&&t<a[p]&&!s(n,e,p)&&(o[p]=e,o[e]=r[e]=r[p],t=a[p])}}})}),{root:r,align:o}}function u(e,t,n,i,r){function o(e){v.has(u,e)||(u[e]=!0,s[e]=v.reduce(l.inEdges(e),function(e,t){return o(t.v),Math.max(e,s[t.v]+l.edge(t))},0))}function a(t){if(2!==u[t]){u[t]++;var n=e.node(t),i=v.reduce(l.outEdges(t),function(e,t){return a(t.w),Math.min(e,s[t.w]-l.edge(t))},Number.POSITIVE_INFINITY);i!==Number.POSITIVE_INFINITY&&n.borderType!==d&&(s[t]=Math.max(s[t],i))}}var s={},l=c(e,t,n,r),u={};v.each(l.nodes(),o);var d=r?"borderLeft":"borderRight";return v.each(l.nodes(),a),v.each(i,function(e){s[e]=s[n[e]]}),s}function c(e,t,n,i){var r=new y,o=e.graph(),a=g(o.nodesep,o.edgesep,i);return v.each(t,function(t){var i;v.each(t,function(t){var o=n[t];if(r.setNode(o),i){var s=n[i],l=r.edge(s,o);r.setEdge(s,o,Math.max(a(e,t,i),l||0))}i=t})}),r}function d(e,t){return v.min(t,function(t){var n=v.min(t,function(t,n){return t-m(e,n)/2}),i=v.max(t,function(t,n){return t+m(e,n)/2});return i-n})}function p(e,t){var n=v.min(t),i=v.max(t);v.each(["u","d"],function(r){v.each(["l","r"],function(o){var a,s=r+o,l=e[s];l!==t&&(a="l"===o?n-v.min(l):i-v.max(l),a&&(e[s]=v.mapValues(l,function(e){return e+a})))})})}function h(e,t){return v.mapValues(e.ul,function(n,i){if(t)return e[t.toLowerCase()][i];var r=v.sortBy(v.pluck(e,i));return(r[1]+r[2])/2})}function f(e){var t,n=b.buildLayerMatrix(e),o=v.merge(i(e,n),r(e,n)),a={};v.each(["u","d"],function(i){t="u"===i?n:v.values(n).reverse(),v.each(["l","r"],function(n){"r"===n&&(t=v.map(t,function(e){return v.values(e).reverse()}));var r=v.bind("u"===i?e.predecessors:e.successors,e),s=l(e,t,o,r),c=u(e,t,s.root,s.align,"r"===n);"r"===n&&(c=v.mapValues(c,function(e){return-e})),a[i+n]=c})});var s=d(e,a);return p(a,s),h(a,e.graph().align)}function g(e,t,n){return function(i,r,o){var a,s=i.node(r),l=i.node(o),u=0;if(u+=s.width/2,v.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=-s.width/2;break;case"r":a=s.width/2}if(a&&(u+=n?a:-a),a=0,u+=(s.dummy?t:e)/2,u+=(l.dummy?t:e)/2,u+=l.width/2,v.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":a=l.width/2;break;case"r":a=-l.width/2}return a&&(u+=n?a:-a),a=0,u}}function m(e,t){return e.node(t).width}var v=e("../lodash"),y=e("../graphlib").Graph,b=e("../util");t.exports={positionX:f,findType1Conflicts:i,findType2Conflicts:r,addConflict:a,hasConflict:s,verticalAlignment:l,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:d,balance:h}},{"../graphlib":7,"../lodash":10,"../util":29}],24:[function(e,t,n){"use strict";function i(e){e=a.asNonCompoundGraph(e),r(e),o.each(s(e),function(t,n){e.node(n).x=t})}function r(e){var t=a.buildLayerMatrix(e),n=e.graph().ranksep,i=0;o.each(t,function(t){var r=o.max(o.map(t,function(t){return e.node(t).height}));o.each(t,function(t){e.node(t).y=i+r/2}),i+=r+n})}var o=e("../lodash"),a=e("../util"),s=e("./bk").positionX;t.exports=i},{"../lodash":10,"../util":29,"./bk":23}],25:[function(e,t,n){"use strict";function i(e){var t=new l({directed:!1}),n=e.nodes()[0],i=e.nodeCount();t.setNode(n,{});for(var s,c;r(t,e)<i;)s=o(t,e),c=t.hasNode(s.v)?u(e,s):-u(e,s),a(t,e,c);return t}function r(e,t){function n(i){s.each(t.nodeEdges(i),function(r){var o=r.v,a=i===o?r.w:o;e.hasNode(a)||u(t,r)||(e.setNode(a,{}),e.setEdge(i,a,{}),n(a))})}return s.each(e.nodes(),n),e.nodeCount()}function o(e,t){return s.min(t.edges(),function(n){return e.hasNode(n.v)!==e.hasNode(n.w)?u(t,n):void 0})}function a(e,t,n){s.each(e.nodes(),function(e){t.node(e).rank+=n})}var s=e("../lodash"),l=e("../graphlib").Graph,u=e("./util").slack;t.exports=i},{"../graphlib":7,"../lodash":10,"./util":28}],26:[function(e,t,n){"use strict";function i(e){switch(e.graph().ranker){case"network-simplex":o(e);break;case"tight-tree":r(e);break;case"longest-path":c(e);break;default:o(e)}}function r(e){s(e),l(e)}function o(e){u(e)}var a=e("./util"),s=a.longestPath,l=e("./feasible-tree"),u=e("./network-simplex");t.exports=i;var c=s},{"./feasible-tree":25,"./network-simplex":27,"./util":28}],27:[function(e,t,n){"use strict";function i(e){e=x(e),y(e);var t=m(e);s(t),r(t,e);for(var n,i;n=u(t);)i=c(t,e,n),d(t,e,n,i)}function r(e,t){var n=w(e,e.nodes());n=n.slice(0,n.length-1),g.each(n,function(n){o(e,t,n)})}function o(e,t,n){var i=e.node(n),r=i.parent;e.edge(n,r).cutvalue=a(e,t,n)}function a(e,t,n){var i=e.node(n),r=i.parent,o=!0,a=t.edge(n,r),s=0;return a||(o=!1,a=t.edge(r,n)),s=a.weight,g.each(t.nodeEdges(n),function(i){var a=i.v===n,l=a?i.w:i.v;if(l!==r){var u=a===o,c=t.edge(i).weight;if(s+=u?c:-c,h(e,n,l)){var d=e.edge(n,l).cutvalue;s+=u?-d:d}}}),s}function s(e,t){arguments.length<2&&(t=e.nodes()[0]),l(e,{},1,t)}function l(e,t,n,i,r){var o=n,a=e.node(i);return t[i]=!0,g.each(e.neighbors(i),function(r){g.has(t,r)||(n=l(e,t,n,r,i))}),a.low=o,a.lim=n++,r?a.parent=r:delete a.parent,n}function u(e){return g.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function c(e,t,n){var i=n.v,r=n.w;t.hasEdge(i,r)||(i=n.w,r=n.v);var o=e.node(i),a=e.node(r),s=o,l=!1;o.lim>a.lim&&(s=a,l=!0);var u=g.filter(t.edges(),function(t){return l===f(e,e.node(t.v),s)&&l!==f(e,e.node(t.w),s)});return g.min(u,function(e){return v(t,e)})}function d(e,t,n,i){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(i.v,i.w,{}),s(e),r(e,t),p(e,t)}function p(e,t){var n=g.find(e.nodes(),function(e){return!t.node(e).parent}),i=b(e,n);i=i.slice(1),g.each(i,function(n){var i=e.node(n).parent,r=t.edge(n,i),o=!1;r||(r=t.edge(i,n),o=!0),t.node(n).rank=t.node(i).rank+(o?r.minlen:-r.minlen)})}function h(e,t,n){return e.hasEdge(t,n)}function f(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var g=e("../lodash"),m=e("./feasible-tree"),v=e("./util").slack,y=e("./util").longestPath,b=e("../graphlib").alg.preorder,w=e("../graphlib").alg.postorder,x=e("../util").simplify;t.exports=i,i.initLowLimValues=s,i.initCutValues=r,i.calcCutValue=a,i.leaveEdge=u,i.enterEdge=c,i.exchangeEdges=d},{"../graphlib":7,"../lodash":10,"../util":29,"./feasible-tree":25,"./util":28}],28:[function(e,t,n){"use strict";function i(e){function t(i){var r=e.node(i);if(o.has(n,i))return r.rank;n[i]=!0;var a=o.min(o.map(e.outEdges(i),function(n){return t(n.w)-e.edge(n).minlen}));return a===Number.POSITIVE_INFINITY&&(a=0),r.rank=a}var n={};o.each(e.sources(),t)}function r(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var o=e("../lodash");t.exports={longestPath:i,slack:r}},{"../lodash":10}],29:[function(e,t,n){"use strict";function i(e,t,n,i){var r;do r=v.uniqueId(i);while(e.hasNode(r));return n.dummy=t,e.setNode(r,n),r}function r(e){var t=(new y).setGraph(e.graph());return v.each(e.nodes(),function(n){t.setNode(n,e.node(n))}),v.each(e.edges(),function(n){var i=t.edge(n.v,n.w)||{weight:0,minlen:1},r=e.edge(n);t.setEdge(n.v,n.w,{weight:i.weight+r.weight,minlen:Math.max(i.minlen,r.minlen)})}),t}function o(e){var t=new y({multigraph:e.isMultigraph()}).setGraph(e.graph());return v.each(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),v.each(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function a(e){var t=v.map(e.nodes(),function(t){var n={};return v.each(e.outEdges(t),function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return v.zipObject(e.nodes(),t)}function s(e){var t=v.map(e.nodes(),function(t){var n={};return v.each(e.inEdges(t),function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return v.zipObject(e.nodes(),t)}function l(e,t){var n=e.x,i=e.y,r=t.x-n,o=t.y-i,a=e.width/2,s=e.height/2;if(!r&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(o)*a>Math.abs(r)*s?(0>o&&(s=-s),l=s*r/o,u=s):(0>r&&(a=-a),l=a,u=a*o/r),{x:n+l,y:i+u}}function u(e){var t=v.map(v.range(h(e)+1),function(){return[]});return v.each(e.nodes(),function(n){var i=e.node(n),r=i.rank;v.isUndefined(r)||(t[r][i.order]=n)}),t}function c(e){var t=v.min(v.map(e.nodes(),function(t){return e.node(t).rank}));v.each(e.nodes(),function(n){var i=e.node(n);v.has(i,"rank")&&(i.rank-=t)})}function d(e){var t=v.min(v.map(e.nodes(),function(t){return e.node(t).rank})),n=[];v.each(e.nodes(),function(i){var r=e.node(i).rank-t;n[r]||(n[r]=[]),n[r].push(i)});var i=0,r=e.graph().nodeRankFactor;v.each(n,function(t,n){v.isUndefined(t)&&n%r!==0?--i:i&&v.each(t,function(t){e.node(t).rank+=i})})}function p(e,t,n,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),i(e,"border",o,t)}function h(e){return v.max(v.map(e.nodes(),function(t){var n=e.node(t).rank;return v.isUndefined(n)?void 0:n}))}function f(e,t){var n={lhs:[],rhs:[]};return v.each(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function g(e,t){var n=v.now();try{return t()}finally{console.log(e+" time: "+(v.now()-n)+"ms")}}function m(e,t){return t()}var v=e("./lodash"),y=e("./graphlib").Graph;t.exports={addDummyNode:i,simplify:r,asNonCompoundGraph:o,successorWeights:a,predecessorWeights:s,intersectRect:l,buildLayerMatrix:u,normalizeRanks:c,removeEmptyRanks:d,addBorderNode:p,maxRank:h,partition:f,time:g,notime:m}},{"./graphlib":7,"./lodash":10}],30:[function(e,t,n){t.exports="0.7.4"},{}]},{},[1])(1)}),function(e,t){"use strict";var n,i,r,o=e,a=o.document,s=o.navigator,l=o.setTimeout,u=o.clearTimeout,c=o.setInterval,d=o.clearInterval,p=o.getComputedStyle,h=o.encodeURIComponent,f=o.ActiveXObject,g=o.Error,m=o.Number.parseInt||o.parseInt,v=o.Number.parseFloat||o.parseFloat,y=o.Number.isNaN||o.isNaN,b=o.Date.now,w=o.Object.keys,x=o.Object.defineProperty,k=o.Object.prototype.hasOwnProperty,C=o.Array.prototype.slice,S=function(){var e=function(e){return e};if("function"==typeof o.wrap&&"function"==typeof o.unwrap)try{var t=a.createElement("div"),n=o.unwrap(t);1===t.nodeType&&n&&1===n.nodeType&&(e=o.unwrap)}catch(i){}return e}(),_=function(e){return C.call(e,0)},T=function(){var e,n,i,r,o,a,s=_(arguments),l=s[0]||{};for(e=1,n=s.length;n>e;e++)if(null!=(i=s[e]))for(r in i)k.call(i,r)&&(o=l[r],a=i[r],l!==a&&a!==t&&(l[r]=a));return l},$=function(e){var t,n,i,r;if("object"!=typeof e||null==e||"number"==typeof e.nodeType)t=e;else if("number"==typeof e.length)for(t=[],n=0,i=e.length;i>n;n++)k.call(e,n)&&(t[n]=$(e[n]));else{t={};for(r in e)k.call(e,r)&&(t[r]=$(e[r]))}return t},E=function(e,t){for(var n={},i=0,r=t.length;r>i;i++)t[i]in e&&(n[t[i]]=e[t[i]]);return n},D=function(e,t){var n={};for(var i in e)-1===t.indexOf(i)&&(n[i]=e[i]);return n},M=function(e){if(e)for(var t in e)k.call(e,t)&&delete e[t];return e},I=function(e,t){if(e&&1===e.nodeType&&e.ownerDocument&&t&&(1===t.nodeType&&t.ownerDocument&&t.ownerDocument===e.ownerDocument||9===t.nodeType&&!t.ownerDocument&&t===e.ownerDocument))do{if(e===t)return!0;e=e.parentNode}while(e);return!1},P=function(e){var t;return"string"==typeof e&&e&&(t=e.split("#")[0].split("?")[0],t=e.slice(0,e.lastIndexOf("/")+1)),t},A=function(e){var t,n;return"string"==typeof e&&e&&(n=e.match(/^(?:|[^:@]*@|.+\)@(?=http[s]?|file)|.+?\s+(?: at |@)(?:[^:\(]+ )*[\(]?)((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/),n&&n[1]?t=n[1]:(n=e.match(/\)@((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/),n&&n[1]&&(t=n[1]))),t},j=function(){var e,t;try{throw new g}catch(n){t=n}return t&&(e=t.sourceURL||t.fileName||A(t.stack)),e},N=function(){var e,n,i;if(a.currentScript&&(e=a.currentScript.src))return e;if(n=a.getElementsByTagName("script"),1===n.length)return n[0].src||t;if("readyState"in n[0])for(i=n.length;i--;)if("interactive"===n[i].readyState&&(e=n[i].src))return e;return"loading"===a.readyState&&(e=n[n.length-1].src)?e:(e=j())?e:t},O=function(){var e,n,i,r=a.getElementsByTagName("script");for(e=r.length;e--;){if(!(i=r[e].src)){n=null;break}if(i=P(i),null==n)n=i;else if(n!==i){n=null;break}}return n||t},L=function(){var e=P(N())||O()||"";return e+"ZeroClipboard.swf"},R=function(){return null==e.opener&&(!!e.top&&e!=e.top||!!e.parent&&e!=e.parent)}(),F={bridge:null,version:"0.0.0",pluginType:"unknown",disabled:null,outdated:null,sandboxed:null,unavailable:null,degraded:null,deactivated:null,overdue:null,ready:null},q="11.0.0",H={},U={},B=null,z=0,V=0,W={ready:"Flash communication is established",error:{"flash-disabled":"Flash is disabled or not installed. May also be attempting to run Flash in a sandboxed iframe, which is impossible.","flash-outdated":"Flash is too outdated to support ZeroClipboard","flash-sandboxed":"Attempting to run Flash in a sandboxed iframe, which is impossible","flash-unavailable":"Flash is unable to communicate bidirectionally with JavaScript","flash-degraded":"Flash is unable to preserve data fidelity when communicating with JavaScript","flash-deactivated":"Flash is too outdated for your browser and/or is configured as click-to-activate.\nThis may also mean that the ZeroClipboard SWF object could not be loaded, so please check your `+"`"+`swfPath`+"`"+` configuration and/or network connectivity.\nMay also be attempting to run Flash in a sandboxed iframe, which is impossible.","flash-overdue":"Flash communication was established but NOT within the acceptable time limit","version-mismatch":"ZeroClipboard JS version number does not match ZeroClipboard SWF version number","clipboard-error":"At least one error was thrown while ZeroClipboard was attempting to inject your data into the clipboard","config-mismatch":"ZeroClipboard configuration does not match Flash's reality","swf-not-found":"The ZeroClipboard SWF object could not be loaded, so please check your `+"`"+`swfPath`+"`"+` configuration and/or network connectivity"}},G=["flash-unavailable","flash-degraded","flash-overdue","version-mismatch","config-mismatch","clipboard-error"],J=["flash-disabled","flash-outdated","flash-sandboxed","flash-unavailable","flash-degraded","flash-deactivated","flash-overdue"],X=new RegExp("^flash-("+J.map(function(e){
|
|
3233
|
|
-return e.replace(/^flash-/,"")}).join("|")+")$"),Y=new RegExp("^flash-("+J.slice(1).map(function(e){return e.replace(/^flash-/,"")}).join("|")+")$"),K={swfPath:L(),trustedDomains:e.location.host?[e.location.host]:[],cacheBust:!0,forceEnhancedClipboard:!1,flashLoadTimeout:3e4,autoActivate:!0,bubbleEvents:!0,containerId:"global-zeroclipboard-html-bridge",containerClass:"global-zeroclipboard-container",swfObjectId:"global-zeroclipboard-flash-bridge",hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active",forceHandCursor:!1,title:null,zIndex:999999999},Q=function(e){if("object"==typeof e&&null!==e)for(var t in e)if(k.call(e,t))if(/^(?:forceHandCursor|title|zIndex|bubbleEvents)$/.test(t))K[t]=e[t];else if(null==F.bridge)if("containerId"===t||"swfObjectId"===t){if(!he(e[t]))throw new Error("The specified `+"`"+`"+t+"`+"`"+` value is not valid as an HTML4 Element ID");K[t]=e[t]}else K[t]=e[t];{if("string"!=typeof e||!e)return $(K);if(k.call(K,e))return K[e]}},Z=function(){return Ve(),{browser:E(s,["userAgent","platform","appName"]),flash:D(F,["bridge"]),zeroclipboard:{version:Ge.version,config:Ge.config()}}},ee=function(){return!!(F.disabled||F.outdated||F.sandboxed||F.unavailable||F.degraded||F.deactivated)},te=function(e,i){var r,o,a,s={};if("string"==typeof e&&e)a=e.toLowerCase().split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof i)for(r in e)k.call(e,r)&&"string"==typeof r&&r&&"function"==typeof e[r]&&Ge.on(r,e[r]);if(a&&a.length){for(r=0,o=a.length;o>r;r++)e=a[r].replace(/^on/,""),s[e]=!0,H[e]||(H[e]=[]),H[e].push(i);if(s.ready&&F.ready&&Ge.emit({type:"ready"}),s.error){for(r=0,o=J.length;o>r;r++)if(F[J[r].replace(/^flash-/,"")]===!0){Ge.emit({type:"error",name:J[r]});break}n!==t&&Ge.version!==n&&Ge.emit({type:"error",name:"version-mismatch",jsVersion:Ge.version,swfVersion:n})}}return Ge},ne=function(e,t){var n,i,r,o,a;if(0===arguments.length)o=w(H);else if("string"==typeof e&&e)o=e.split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)k.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&Ge.off(n,e[n]);if(o&&o.length)for(n=0,i=o.length;i>n;n++)if(e=o[n].toLowerCase().replace(/^on/,""),a=H[e],a&&a.length)if(t)for(r=a.indexOf(t);-1!==r;)a.splice(r,1),r=a.indexOf(t,r);else a.length=0;return Ge},ie=function(e){var t;return t="string"==typeof e&&e?$(H[e])||null:$(H)},re=function(e){var t,n,i;return e=fe(e),e&&!xe(e)?"ready"===e.type&&F.overdue===!0?Ge.emit({type:"error",name:"flash-overdue"}):(t=T({},e),be.call(this,t),"copy"===e.type&&(i=De(U),n=i.data,B=i.formatMap),n):void 0},oe=function(){var e=F.sandboxed;if(Ve(),"boolean"!=typeof F.ready&&(F.ready=!1),F.sandboxed!==e&&F.sandboxed===!0)F.ready=!1,Ge.emit({type:"error",name:"flash-sandboxed"});else if(!Ge.isFlashUnusable()&&null===F.bridge){var t=K.flashLoadTimeout;"number"==typeof t&&t>=0&&(z=l(function(){"boolean"!=typeof F.deactivated&&(F.deactivated=!0),F.deactivated===!0&&Ge.emit({type:"error",name:"flash-deactivated"})},t)),F.overdue=!1,$e()}},ae=function(){Ge.clearData(),Ge.blur(),Ge.emit("destroy"),Ee(),Ge.off()},se=function(e,t){var n;if("object"==typeof e&&e&&"undefined"==typeof t)n=e,Ge.clearData();else{if("string"!=typeof e||!e)return;n={},n[e]=t}for(var i in n)"string"==typeof i&&i&&k.call(n,i)&&"string"==typeof n[i]&&n[i]&&(U[i]=n[i])},le=function(e){"undefined"==typeof e?(M(U),B=null):"string"==typeof e&&k.call(U,e)&&delete U[e]},ue=function(e){return"undefined"==typeof e?$(U):"string"==typeof e&&k.call(U,e)?U[e]:void 0},ce=function(e){if(e&&1===e.nodeType){i&&(Le(i,K.activeClass),i!==e&&Le(i,K.hoverClass)),i=e,Oe(e,K.hoverClass);var t=e.getAttribute("title")||K.title;if("string"==typeof t&&t){var n=Te(F.bridge);n&&n.setAttribute("title",t)}var r=K.forceHandCursor===!0||"pointer"===Re(e,"cursor");Be(r),Ue()}},de=function(){var e=Te(F.bridge);e&&(e.removeAttribute("title"),e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.height="1px"),i&&(Le(i,K.hoverClass),Le(i,K.activeClass),i=null)},pe=function(){return i||null},he=function(e){return"string"==typeof e&&e&&/^[A-Za-z][A-Za-z0-9_:\-\.]*$/.test(e)},fe=function(e){var t;if("string"==typeof e&&e?(t=e,e={}):"object"==typeof e&&e&&"string"==typeof e.type&&e.type&&(t=e.type),t){t=t.toLowerCase(),!e.target&&(/^(copy|aftercopy|_click)$/.test(t)||"error"===t&&"clipboard-error"===e.name)&&(e.target=r),T(e,{type:t,target:e.target||i||null,relatedTarget:e.relatedTarget||null,currentTarget:F&&F.bridge||null,timeStamp:e.timeStamp||b()||null});var n=W[e.type];return"error"===e.type&&e.name&&n&&(n=n[e.name]),n&&(e.message=n),"ready"===e.type&&T(e,{target:null,version:F.version}),"error"===e.type&&(X.test(e.name)&&T(e,{target:null,minimumVersion:q}),Y.test(e.name)&&T(e,{version:F.version})),"copy"===e.type&&(e.clipboardData={setData:Ge.setData,clearData:Ge.clearData}),"aftercopy"===e.type&&(e=Me(e,B)),e.target&&!e.relatedTarget&&(e.relatedTarget=ge(e.target)),me(e)}},ge=function(e){var t=e&&e.getAttribute&&e.getAttribute("data-clipboard-target");return t?a.getElementById(t):null},me=function(e){if(e&&/^_(?:click|mouse(?:over|out|down|up|move))$/.test(e.type)){var n=e.target,i="_mouseover"===e.type&&e.relatedTarget?e.relatedTarget:t,r="_mouseout"===e.type&&e.relatedTarget?e.relatedTarget:t,s=Fe(n),l=o.screenLeft||o.screenX||0,u=o.screenTop||o.screenY||0,c=a.body.scrollLeft+a.documentElement.scrollLeft,d=a.body.scrollTop+a.documentElement.scrollTop,p=s.left+("number"==typeof e._stageX?e._stageX:0),h=s.top+("number"==typeof e._stageY?e._stageY:0),f=p-c,g=h-d,m=l+f,v=u+g,y="number"==typeof e.movementX?e.movementX:0,b="number"==typeof e.movementY?e.movementY:0;delete e._stageX,delete e._stageY,T(e,{srcElement:n,fromElement:i,toElement:r,screenX:m,screenY:v,pageX:p,pageY:h,clientX:f,clientY:g,x:f,y:g,movementX:y,movementY:b,offsetX:0,offsetY:0,layerX:0,layerY:0})}return e},ve=function(e){var t=e&&"string"==typeof e.type&&e.type||"";return!/^(?:(?:before)?copy|destroy)$/.test(t)},ye=function(e,t,n,i){i?l(function(){e.apply(t,n)},0):e.apply(t,n)},be=function(e){if("object"==typeof e&&e&&e.type){var t=ve(e),n=H["*"]||[],i=H[e.type]||[],r=n.concat(i);if(r&&r.length){var a,s,l,u,c,d=this;for(a=0,s=r.length;s>a;a++)l=r[a],u=d,"string"==typeof l&&"function"==typeof o[l]&&(l=o[l]),"object"==typeof l&&l&&"function"==typeof l.handleEvent&&(u=l,l=l.handleEvent),"function"==typeof l&&(c=T({},e),ye(l,u,[c],t))}return this}},we=function(e){var t=null;return(R===!1||e&&"error"===e.type&&e.name&&-1!==G.indexOf(e.name))&&(t=!1),t},xe=function(e){var t=e.target||i||null,o="swf"===e._source;switch(delete e._source,e.type){case"error":var a="flash-sandboxed"===e.name||we(e);"boolean"==typeof a&&(F.sandboxed=a),-1!==J.indexOf(e.name)?T(F,{disabled:"flash-disabled"===e.name,outdated:"flash-outdated"===e.name,unavailable:"flash-unavailable"===e.name,degraded:"flash-degraded"===e.name,deactivated:"flash-deactivated"===e.name,overdue:"flash-overdue"===e.name,ready:!1}):"version-mismatch"===e.name&&(n=e.swfVersion,T(F,{disabled:!1,outdated:!1,unavailable:!1,degraded:!1,deactivated:!1,overdue:!1,ready:!1})),He();break;case"ready":n=e.swfVersion;var s=F.deactivated===!0;T(F,{disabled:!1,outdated:!1,sandboxed:!1,unavailable:!1,degraded:!1,deactivated:!1,overdue:s,ready:!s}),He();break;case"beforecopy":r=t;break;case"copy":var l,u,c=e.relatedTarget;!U["text/html"]&&!U["text/plain"]&&c&&(u=c.value||c.outerHTML||c.innerHTML)&&(l=c.value||c.textContent||c.innerText)?(e.clipboardData.clearData(),e.clipboardData.setData("text/plain",l),u!==l&&e.clipboardData.setData("text/html",u)):!U["text/plain"]&&e.target&&(l=e.target.getAttribute("data-clipboard-text"))&&(e.clipboardData.clearData(),e.clipboardData.setData("text/plain",l));break;case"aftercopy":ke(e),Ge.clearData(),t&&t!==Ne()&&t.focus&&t.focus();break;case"_mouseover":Ge.focus(t),K.bubbleEvents===!0&&o&&(t&&t!==e.relatedTarget&&!I(e.relatedTarget,t)&&Ce(T({},e,{type:"mouseenter",bubbles:!1,cancelable:!1})),Ce(T({},e,{type:"mouseover"})));break;case"_mouseout":Ge.blur(),K.bubbleEvents===!0&&o&&(t&&t!==e.relatedTarget&&!I(e.relatedTarget,t)&&Ce(T({},e,{type:"mouseleave",bubbles:!1,cancelable:!1})),Ce(T({},e,{type:"mouseout"})));break;case"_mousedown":Oe(t,K.activeClass),K.bubbleEvents===!0&&o&&Ce(T({},e,{type:e.type.slice(1)}));break;case"_mouseup":Le(t,K.activeClass),K.bubbleEvents===!0&&o&&Ce(T({},e,{type:e.type.slice(1)}));break;case"_click":r=null,K.bubbleEvents===!0&&o&&Ce(T({},e,{type:e.type.slice(1)}));break;case"_mousemove":K.bubbleEvents===!0&&o&&Ce(T({},e,{type:e.type.slice(1)}))}return/^_(?:click|mouse(?:over|out|down|up|move))$/.test(e.type)?!0:void 0},ke=function(e){if(e.errors&&e.errors.length>0){var t=$(e);T(t,{type:"error",name:"clipboard-error"}),delete t.success,l(function(){Ge.emit(t)},0)}},Ce=function(e){if(e&&"string"==typeof e.type&&e){var t,n=e.target||null,i=n&&n.ownerDocument||a,r={view:i.defaultView||o,canBubble:!0,cancelable:!0,detail:"click"===e.type?1:0,button:"number"==typeof e.which?e.which-1:"number"==typeof e.button?e.button:i.createEvent?0:1},s=T(r,e);n&&i.createEvent&&n.dispatchEvent&&(s=[s.type,s.canBubble,s.cancelable,s.view,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget],t=i.createEvent("MouseEvents"),t.initMouseEvent&&(t.initMouseEvent.apply(t,s),t._source="js",n.dispatchEvent(t)))}},Se=function(){var e=K.flashLoadTimeout;if("number"==typeof e&&e>=0){var t=Math.min(1e3,e/10),n=K.swfObjectId+"_fallbackContent";V=c(function(){var e=a.getElementById(n);qe(e)&&(He(),F.deactivated=null,Ge.emit({type:"error",name:"swf-not-found"}))},t)}},_e=function(){var e=a.createElement("div");return e.id=K.containerId,e.className=K.containerClass,e.style.position="absolute",e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.height="1px",e.style.zIndex=""+ze(K.zIndex),e},Te=function(e){for(var t=e&&e.parentNode;t&&"OBJECT"===t.nodeName&&t.parentNode;)t=t.parentNode;return t||null},$e=function(){var e,t=F.bridge,n=Te(t);if(!t){var i=je(o.location.host,K),r="never"===i?"none":"all",s=Pe(T({jsVersion:Ge.version},K)),l=K.swfPath+Ie(K.swfPath,K);n=_e();var u=a.createElement("div");n.appendChild(u),a.body.appendChild(n);var c=a.createElement("div"),d="activex"===F.pluginType;c.innerHTML='<object id="'+K.swfObjectId+'" name="'+K.swfObjectId+'" width="100%" height="100%" '+(d?'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"':'type="application/x-shockwave-flash" data="'+l+'"')+">"+(d?'<param name="movie" value="'+l+'"/>':"")+'<param name="allowScriptAccess" value="'+i+'"/><param name="allowNetworking" value="'+r+'"/><param name="menu" value="false"/><param name="wmode" value="transparent"/><param name="flashvars" value="'+s+'"/><div id="'+K.swfObjectId+'_fallbackContent"> </div></object>',t=c.firstChild,c=null,S(t).ZeroClipboard=Ge,n.replaceChild(t,u),Se()}return t||(t=a[K.swfObjectId],t&&(e=t.length)&&(t=t[e-1]),!t&&n&&(t=n.firstChild)),F.bridge=t||null,t},Ee=function(){var e=F.bridge;if(e){var i=Te(e);i&&("activex"===F.pluginType&&"readyState"in e?(e.style.display="none",function r(){if(4===e.readyState){for(var t in e)"function"==typeof e[t]&&(e[t]=null);e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i)}else l(r,10)}()):(e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i))),He(),F.ready=null,F.bridge=null,F.deactivated=null,n=t}},De=function(e){var t={},n={};if("object"==typeof e&&e){for(var i in e)if(i&&k.call(e,i)&&"string"==typeof e[i]&&e[i])switch(i.toLowerCase()){case"text/plain":case"text":case"air:text":case"flash:text":t.text=e[i],n.text=i;break;case"text/html":case"html":case"air:html":case"flash:html":t.html=e[i],n.html=i;break;case"application/rtf":case"text/rtf":case"rtf":case"richtext":case"air:rtf":case"flash:rtf":t.rtf=e[i],n.rtf=i}return{data:t,formatMap:n}}},Me=function(e,t){if("object"!=typeof e||!e||"object"!=typeof t||!t)return e;var n={};for(var i in e)if(k.call(e,i))if("errors"===i){n[i]=e[i]?e[i].slice():[];for(var r=0,o=n[i].length;o>r;r++)n[i][r].format=t[n[i][r].format]}else if("success"!==i&&"data"!==i)n[i]=e[i];else{n[i]={};var a=e[i];for(var s in a)s&&k.call(a,s)&&k.call(t,s)&&(n[i][t[s]]=a[s])}return n},Ie=function(e,t){var n=null==t||t&&t.cacheBust===!0;return n?(-1===e.indexOf("?")?"?":"&")+"noCache="+b():""},Pe=function(e){var t,n,i,r,a="",s=[];if(e.trustedDomains&&("string"==typeof e.trustedDomains?r=[e.trustedDomains]:"object"==typeof e.trustedDomains&&"length"in e.trustedDomains&&(r=e.trustedDomains)),r&&r.length)for(t=0,n=r.length;n>t;t++)if(k.call(r,t)&&r[t]&&"string"==typeof r[t]){if(i=Ae(r[t]),!i)continue;if("*"===i){s.length=0,s.push(i);break}s.push.apply(s,[i,"//"+i,o.location.protocol+"//"+i])}return s.length&&(a+="trustedOrigins="+h(s.join(","))),e.forceEnhancedClipboard===!0&&(a+=(a?"&":"")+"forceEnhancedClipboard=true"),"string"==typeof e.swfObjectId&&e.swfObjectId&&(a+=(a?"&":"")+"swfObjectId="+h(e.swfObjectId)),"string"==typeof e.jsVersion&&e.jsVersion&&(a+=(a?"&":"")+"jsVersion="+h(e.jsVersion)),a},Ae=function(e){if(null==e||""===e)return null;if(e=e.replace(/^\s+|\s+$/g,""),""===e)return null;var t=e.indexOf("//");e=-1===t?e:e.slice(t+2);var n=e.indexOf("/");return e=-1===n?e:-1===t||0===n?null:e.slice(0,n),e&&".swf"===e.slice(-4).toLowerCase()?null:e||null},je=function(){var e=function(e){var t,n,i,r=[];if("string"==typeof e&&(e=[e]),"object"!=typeof e||!e||"number"!=typeof e.length)return r;for(t=0,n=e.length;n>t;t++)if(k.call(e,t)&&(i=Ae(e[t]))){if("*"===i){r.length=0,r.push("*");break}-1===r.indexOf(i)&&r.push(i)}return r};return function(t,n){var i=Ae(n.swfPath);null===i&&(i=t);var r=e(n.trustedDomains),o=r.length;if(o>0){if(1===o&&"*"===r[0])return"always";if(-1!==r.indexOf(t))return 1===o&&t===i?"sameDomain":"always"}return"never"}}(),Ne=function(){try{return a.activeElement}catch(e){return null}},Oe=function(e,t){var n,i,r,o=[];if("string"==typeof t&&t&&(o=t.split(/\s+/)),e&&1===e.nodeType&&o.length>0)if(e.classList)for(n=0,i=o.length;i>n;n++)e.classList.add(o[n]);else if(e.hasOwnProperty("className")){for(r=" "+e.className+" ",n=0,i=o.length;i>n;n++)-1===r.indexOf(" "+o[n]+" ")&&(r+=o[n]+" ");e.className=r.replace(/^\s+|\s+$/g,"")}return e},Le=function(e,t){var n,i,r,o=[];if("string"==typeof t&&t&&(o=t.split(/\s+/)),e&&1===e.nodeType&&o.length>0)if(e.classList&&e.classList.length>0)for(n=0,i=o.length;i>n;n++)e.classList.remove(o[n]);else if(e.className){for(r=(" "+e.className+" ").replace(/[\r\n\t]/g," "),n=0,i=o.length;i>n;n++)r=r.replace(" "+o[n]+" "," ");e.className=r.replace(/^\s+|\s+$/g,"")}return e},Re=function(e,t){var n=p(e,null).getPropertyValue(t);return"cursor"!==t||n&&"auto"!==n||"A"!==e.nodeName?n:"pointer"},Fe=function(e){var t={left:0,top:0,width:0,height:0};if(e.getBoundingClientRect){var n=e.getBoundingClientRect(),i=o.pageXOffset,r=o.pageYOffset,s=a.documentElement.clientLeft||0,l=a.documentElement.clientTop||0,u=0,c=0;if("relative"===Re(a.body,"position")){var d=a.body.getBoundingClientRect(),p=a.documentElement.getBoundingClientRect();u=d.left-p.left||0,c=d.top-p.top||0}t.left=n.left+i-s-u,t.top=n.top+r-l-c,t.width="width"in n?n.width:n.right-n.left,t.height="height"in n?n.height:n.bottom-n.top}return t},qe=function(e){if(!e)return!1;var t=p(e,null),n=v(t.height)>0,i=v(t.width)>0,r=v(t.top)>=0,o=v(t.left)>=0,a=n&&i&&r&&o,s=a?null:Fe(e),l="none"!==t.display&&"collapse"!==t.visibility&&(a||!!s&&(n||s.height>0)&&(i||s.width>0)&&(r||s.top>=0)&&(o||s.left>=0));return l},He=function(){u(z),z=0,d(V),V=0},Ue=function(){var e;if(i&&(e=Te(F.bridge))){var t=Fe(i);T(e.style,{width:t.width+"px",height:t.height+"px",top:t.top+"px",left:t.left+"px",zIndex:""+ze(K.zIndex)})}},Be=function(e){F.ready===!0&&(F.bridge&&"function"==typeof F.bridge.setHandCursor?F.bridge.setHandCursor(e):F.ready=!1)},ze=function(e){if(/^(?:auto|inherit)$/.test(e))return e;var t;return"number"!=typeof e||y(e)?"string"==typeof e&&(t=ze(m(e,10))):t=e,"number"==typeof t?t:"auto"},Ve=function(t){var n,i,r,o=F.sandboxed,a=null;if(t=t===!0,R===!1)a=!1;else{try{i=e.frameElement||null}catch(s){r={name:s.name,message:s.message}}if(i&&1===i.nodeType&&"IFRAME"===i.nodeName)try{a=i.hasAttribute("sandbox")}catch(s){a=null}else{try{n=document.domain||null}catch(s){n=null}(null===n||r&&"SecurityError"===r.name&&/(^|[\s\(\[@])sandbox(es|ed|ing|[\s\.,!\)\]@]|$)/.test(r.message.toLowerCase()))&&(a=!0)}}return F.sandboxed=a,o===a||t||We(f),a},We=function(e){function t(e){var t=e.match(/[\d]+/g);return t.length=3,t.join(".")}function n(e){return!!e&&(e=e.toLowerCase())&&(/^(pepflashplayer\.dll|libpepflashplayer\.so|pepperflashplayer\.plugin)$/.test(e)||"chrome.plugin"===e.slice(-13))}function i(e){e&&(l=!0,e.version&&(d=t(e.version)),!d&&e.description&&(d=t(e.description)),e.filename&&(c=n(e.filename)))}var r,o,a,l=!1,u=!1,c=!1,d="";if(s.plugins&&s.plugins.length)r=s.plugins["Shockwave Flash"],i(r),s.plugins["Shockwave Flash 2.0"]&&(l=!0,d="2.0.0.11");else if(s.mimeTypes&&s.mimeTypes.length)a=s.mimeTypes["application/x-shockwave-flash"],r=a&&a.enabledPlugin,i(r);else if("undefined"!=typeof e){u=!0;try{o=new e("ShockwaveFlash.ShockwaveFlash.7"),l=!0,d=t(o.GetVariable("$version"))}catch(p){try{o=new e("ShockwaveFlash.ShockwaveFlash.6"),l=!0,d="6.0.21"}catch(h){try{o=new e("ShockwaveFlash.ShockwaveFlash"),l=!0,d=t(o.GetVariable("$version"))}catch(f){u=!1}}}}F.disabled=l!==!0,F.outdated=d&&v(d)<v(q),F.version=d||"0.0.0",F.pluginType=c?"pepper":u?"activex":l?"netscape":"unknown"};We(f),Ve(!0);var Ge=function(){return this instanceof Ge?void("function"==typeof Ge._createClient&&Ge._createClient.apply(this,_(arguments))):new Ge};x(Ge,"version",{value:"2.2.0",writable:!1,configurable:!0,enumerable:!0}),Ge.config=function(){return Q.apply(this,_(arguments))},Ge.state=function(){return Z.apply(this,_(arguments))},Ge.isFlashUnusable=function(){return ee.apply(this,_(arguments))},Ge.on=function(){return te.apply(this,_(arguments))},Ge.off=function(){return ne.apply(this,_(arguments))},Ge.handlers=function(){return ie.apply(this,_(arguments))},Ge.emit=function(){return re.apply(this,_(arguments))},Ge.create=function(){return oe.apply(this,_(arguments))},Ge.destroy=function(){return ae.apply(this,_(arguments))},Ge.setData=function(){return se.apply(this,_(arguments))},Ge.clearData=function(){return le.apply(this,_(arguments))},Ge.getData=function(){return ue.apply(this,_(arguments))},Ge.focus=Ge.activate=function(){return ce.apply(this,_(arguments))},Ge.blur=Ge.deactivate=function(){return de.apply(this,_(arguments))},Ge.activeElement=function(){return pe.apply(this,_(arguments))};var Je=0,Xe={},Ye=0,Ke={},Qe={};T(K,{autoActivate:!0});var Ze=function(e){var t=this;t.id=""+Je++,Xe[t.id]={instance:t,elements:[],handlers:{}},e&&t.clip(e),Ge.on("*",function(e){return t.emit(e)}),Ge.on("destroy",function(){t.destroy()}),Ge.create()},et=function(e,i){var r,o,a,s={},l=Xe[this.id],u=l&&l.handlers;if(!l)throw new Error("Attempted to add new listener(s) to a destroyed ZeroClipboard client instance");if("string"==typeof e&&e)a=e.toLowerCase().split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof i)for(r in e)k.call(e,r)&&"string"==typeof r&&r&&"function"==typeof e[r]&&this.on(r,e[r]);if(a&&a.length){for(r=0,o=a.length;o>r;r++)e=a[r].replace(/^on/,""),s[e]=!0,u[e]||(u[e]=[]),u[e].push(i);if(s.ready&&F.ready&&this.emit({type:"ready",client:this}),s.error){for(r=0,o=J.length;o>r;r++)if(F[J[r].replace(/^flash-/,"")]){this.emit({type:"error",name:J[r],client:this});break}n!==t&&Ge.version!==n&&this.emit({type:"error",name:"version-mismatch",jsVersion:Ge.version,swfVersion:n})}}return this},tt=function(e,t){var n,i,r,o,a,s=Xe[this.id],l=s&&s.handlers;if(!l)return this;if(0===arguments.length)o=w(l);else if("string"==typeof e&&e)o=e.split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)k.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&this.off(n,e[n]);if(o&&o.length)for(n=0,i=o.length;i>n;n++)if(e=o[n].toLowerCase().replace(/^on/,""),a=l[e],a&&a.length)if(t)for(r=a.indexOf(t);-1!==r;)a.splice(r,1),r=a.indexOf(t,r);else a.length=0;return this},nt=function(e){var t=null,n=Xe[this.id]&&Xe[this.id].handlers;return n&&(t="string"==typeof e&&e?n[e]?n[e].slice(0):[]:$(n)),t},it=function(e){if(lt.call(this,e)){"object"==typeof e&&e&&"string"==typeof e.type&&e.type&&(e=T({},e));var t=T({},fe(e),{client:this});ut.call(this,t)}return this},rt=function(e){if(!Xe[this.id])throw new Error("Attempted to clip element(s) to a destroyed ZeroClipboard client instance");e=ct(e);for(var t=0;t<e.length;t++)if(k.call(e,t)&&e[t]&&1===e[t].nodeType){e[t].zcClippingId?-1===Ke[e[t].zcClippingId].indexOf(this.id)&&Ke[e[t].zcClippingId].push(this.id):(e[t].zcClippingId="zcClippingId_"+Ye++,Ke[e[t].zcClippingId]=[this.id],K.autoActivate===!0&&dt(e[t]));var n=Xe[this.id]&&Xe[this.id].elements;-1===n.indexOf(e[t])&&n.push(e[t])}return this},ot=function(e){var t=Xe[this.id];if(!t)return this;var n,i=t.elements;e="undefined"==typeof e?i.slice(0):ct(e);for(var r=e.length;r--;)if(k.call(e,r)&&e[r]&&1===e[r].nodeType){for(n=0;-1!==(n=i.indexOf(e[r],n));)i.splice(n,1);var o=Ke[e[r].zcClippingId];if(o){for(n=0;-1!==(n=o.indexOf(this.id,n));)o.splice(n,1);0===o.length&&(K.autoActivate===!0&&pt(e[r]),delete e[r].zcClippingId)}}return this},at=function(){var e=Xe[this.id];return e&&e.elements?e.elements.slice(0):[]},st=function(){Xe[this.id]&&(this.unclip(),this.off(),delete Xe[this.id])},lt=function(e){if(!e||!e.type)return!1;if(e.client&&e.client!==this)return!1;var t=Xe[this.id],n=t&&t.elements,i=!!n&&n.length>0,r=!e.target||i&&-1!==n.indexOf(e.target),o=e.relatedTarget&&i&&-1!==n.indexOf(e.relatedTarget),a=e.client&&e.client===this;return t&&(r||o||a)?!0:!1},ut=function(e){var t=Xe[this.id];if("object"==typeof e&&e&&e.type&&t){var n=ve(e),i=t&&t.handlers["*"]||[],r=t&&t.handlers[e.type]||[],a=i.concat(r);if(a&&a.length){var s,l,u,c,d,p=this;for(s=0,l=a.length;l>s;s++)u=a[s],c=p,"string"==typeof u&&"function"==typeof o[u]&&(u=o[u]),"object"==typeof u&&u&&"function"==typeof u.handleEvent&&(c=u,u=u.handleEvent),"function"==typeof u&&(d=T({},e),ye(u,c,[d],n))}}},ct=function(e){return"string"==typeof e&&(e=[]),"number"!=typeof e.length?[e]:e},dt=function(e){if(e&&1===e.nodeType){var t=function(e){(e||(e=o.event))&&("js"!==e._source&&(e.stopImmediatePropagation(),e.preventDefault()),delete e._source)},n=function(n){(n||(n=o.event))&&(t(n),Ge.focus(e))};e.addEventListener("mouseover",n,!1),e.addEventListener("mouseout",t,!1),e.addEventListener("mouseenter",t,!1),e.addEventListener("mouseleave",t,!1),e.addEventListener("mousemove",t,!1),Qe[e.zcClippingId]={mouseover:n,mouseout:t,mouseenter:t,mouseleave:t,mousemove:t}}},pt=function(e){if(e&&1===e.nodeType){var t=Qe[e.zcClippingId];if("object"==typeof t&&t){for(var n,i,r=["move","leave","enter","out","over"],o=0,a=r.length;a>o;o++)n="mouse"+r[o],i=t[n],"function"==typeof i&&e.removeEventListener(n,i,!1);delete Qe[e.zcClippingId]}}};Ge._createClient=function(){Ze.apply(this,_(arguments))},Ge.prototype.on=function(){return et.apply(this,_(arguments))},Ge.prototype.off=function(){return tt.apply(this,_(arguments))},Ge.prototype.handlers=function(){return nt.apply(this,_(arguments))},Ge.prototype.emit=function(){return it.apply(this,_(arguments))},Ge.prototype.clip=function(){return rt.apply(this,_(arguments))},Ge.prototype.unclip=function(){return ot.apply(this,_(arguments))},Ge.prototype.elements=function(){return at.apply(this,_(arguments))},Ge.prototype.destroy=function(){return st.apply(this,_(arguments))},Ge.prototype.setText=function(e){if(!Xe[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ge.setData("text/plain",e),this},Ge.prototype.setHtml=function(e){if(!Xe[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ge.setData("text/html",e),this},Ge.prototype.setRichText=function(e){if(!Xe[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ge.setData("application/rtf",e),this},Ge.prototype.setData=function(){if(!Xe[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ge.setData.apply(this,_(arguments)),this},Ge.prototype.clearData=function(){if(!Xe[this.id])throw new Error("Attempted to clear pending clipboard data from a destroyed ZeroClipboard client instance");return Ge.clearData.apply(this,_(arguments)),this},Ge.prototype.getData=function(){if(!Xe[this.id])throw new Error("Attempted to get pending clipboard data from a destroyed ZeroClipboard client instance");return Ge.getData.apply(this,_(arguments))},"function"==typeof define&&define.amd?define(function(){return Ge}):"object"==typeof module&&module&&"object"==typeof module.exports&&module.exports?module.exports=Ge:e.ZeroClipboard=Ge}(function(){return this||window}()),function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return f({type:x.error,iconClass:g().iconClasses.error,message:e,optionsOverride:n,title:t})}function n(t,n){return t||(t=g()),v=e("#"+t.containerId),v.length?v:(n&&(v=d(t)),v)}function i(e,t,n){return f({type:x.info,iconClass:g().iconClasses.info,message:e,optionsOverride:n,title:t})}function r(e){y=e}function o(e,t,n){return f({type:x.success,iconClass:g().iconClasses.success,message:e,optionsOverride:n,title:t})}function a(e,t,n){return f({type:x.warning,iconClass:g().iconClasses.warning,message:e,optionsOverride:n,title:t})}function s(e,t){var i=g();v||n(i),c(e,i,t)||u(i)}function l(t){var i=g();return v||n(i),t&&0===e(":focus",t).length?void m(t):void(v.children().length&&v.remove())}function u(t){for(var n=v.children(),i=n.length-1;i>=0;i--)c(e(n[i]),t)}function c(t,n,i){var r=i&&i.force?i.force:!1;return t&&(r||0===e(":focus",t).length)?(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){m(t)}}),!0):!1}function d(t){return v=e("<div/>").attr("id",t.containerId).addClass(t.positionClass).attr("aria-live","polite").attr("role","alert"),v.appendTo(e(t.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">×</button>',newestOnTop:!0,preventDuplicates:!1,progressBar:!1}}function h(e){y&&y(e)}function f(t){function i(e){return null==e&&(e=""),new String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function r(){s(),u(),c(),d(),p(),l()}function o(){$.hover(k,x),!S.onclick&&S.tapToDismiss&&$.click(y),S.closeButton&&I&&I.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&e.cancelBubble!==!0&&(e.cancelBubble=!0),y(!0)}),S.onclick&&$.click(function(e){S.onclick(e),y()})}function a(){$.hide(),$[S.showMethod]({duration:S.showDuration,easing:S.showEasing,complete:S.onShown}),S.timeOut>0&&(T=setTimeout(y,S.timeOut),P.maxHideTime=parseFloat(S.timeOut),P.hideEta=(new Date).getTime()+P.maxHideTime,S.progressBar&&(P.intervalId=setInterval(C,10)))}function s(){t.iconClass&&$.addClass(S.toastClass).addClass(_)}function l(){S.newestOnTop?v.prepend($):v.append($)}function u(){t.title&&(E.append(S.escapeHtml?i(t.title):t.title).addClass(S.titleClass),$.append(E))}function c(){t.message&&(D.append(S.escapeHtml?i(t.message):t.message).addClass(S.messageClass),$.append(D))}function d(){S.closeButton&&(I.addClass("toast-close-button").attr("role","button"),$.prepend(I))}function p(){S.progressBar&&(M.addClass("toast-progress"),$.prepend(M))}function f(e,t){if(e.preventDuplicates){if(t.message===b)return!0;b=t.message}return!1}function y(t){var n=t&&S.closeMethod!==!1?S.closeMethod:S.hideMethod,i=t&&S.closeDuration!==!1?S.closeDuration:S.hideDuration,r=t&&S.closeEasing!==!1?S.closeEasing:S.hideEasing;return!e(":focus",$).length||t?(clearTimeout(P.intervalId),$[n]({duration:i,easing:r,complete:function(){m($),S.onHidden&&"hidden"!==A.state&&S.onHidden(),A.state="hidden",A.endTime=new Date,h(A)}})):void 0}function x(){(S.timeOut>0||S.extendedTimeOut>0)&&(T=setTimeout(y,S.extendedTimeOut),P.maxHideTime=parseFloat(S.extendedTimeOut),P.hideEta=(new Date).getTime()+P.maxHideTime)}function k(){clearTimeout(T),P.hideEta=0,$.stop(!0,!0)[S.showMethod]({duration:S.showDuration,easing:S.showEasing})}function C(){var e=(P.hideEta-(new Date).getTime())/P.maxHideTime*100;M.width(e+"%")}var S=g(),_=t.iconClass||S.iconClass;if("undefined"!=typeof t.optionsOverride&&(S=e.extend(S,t.optionsOverride),_=t.optionsOverride.iconClass||_),!f(S,t)){w++,v=n(S,!0);var T=null,$=e("<div/>"),E=e("<div/>"),D=e("<div/>"),M=e("<div/>"),I=e(S.closeHtml),P={intervalId:null,hideEta:null,maxHideTime:null},A={toastId:w,state:"visible",startTime:new Date,options:S,map:t};return r(),a(),o(),h(A),S.debug&&console&&console.log(A),$}}function g(){return e.extend({},p(),k.options)}function m(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),b=void 0))}var v,y,b,w=0,x={error:"error",info:"info",success:"success",warning:"warning"},k={clear:s,remove:l,error:t,getContainer:n,info:i,options:{},subscribe:r,success:o,version:"2.1.2",warning:a};return k}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)}),function(e,t){function n(t,n){var r=t.nodeName.toLowerCase();if("area"===r){var o,a=t.parentNode,s=a.name;return t.href&&s&&"map"===a.nodeName.toLowerCase()?(o=e("img[usemap=#"+s+"]")[0],!!o&&i(o)):!1}return(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"==r?t.href||n:n)&&i(t)}function i(t){return!e(t).parents().andSelf().filter(function(){return"hidden"===e.curCSS(this,"visibility")||e.expr.filters.hidden(this)}).length}e.ui=e.ui||{},e.ui.version||(e.extend(e.ui,{version:"1.8.24",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),e.fn.extend({propAttr:e.fn.prop||e.fn.attr,_focus:e.fn.focus,focus:function(t,n){return"number"==typeof t?this.each(function(){var i=this;setTimeout(function(){e(i).focus(),n&&n.call(i)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return t=e.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.curCSS(this,"position",1))&&/(auto|scroll)/.test(e.curCSS(this,"overflow",1)+e.curCSS(this,"overflow-y",1)+e.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.curCSS(this,"overflow",1)+e.curCSS(this,"overflow-y",1)+e.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length)for(var i,r,o=e(this[0]);o.length&&o[0]!==document;){if(i=o.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(r=parseInt(o.css("zIndex"),10),!isNaN(r)&&0!==r))return r;o=o.parent()}return 0},disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},
|
|
3234
|
|
-enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(n,i){function r(t,n,i,r){return e.each(o,function(){n-=parseFloat(e.curCSS(t,"padding"+this,!0))||0,i&&(n-=parseFloat(e.curCSS(t,"border"+this+"Width",!0))||0),r&&(n-=parseFloat(e.curCSS(t,"margin"+this,!0))||0)}),n}var o="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),s={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(n){return n===t?s["inner"+i].call(this):this.each(function(){e(this).css(a,r(this,n)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?s["outer"+i].call(this,t):this.each(function(){e(this).css(a,r(this,t,!0,n)+"px")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])},focusable:function(t){return n(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var i=e.attr(t,"tabindex"),r=isNaN(i);return(r||i>=0)&&n(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement("div"));n.offsetHeight,e.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=100===n.offsetHeight,e.support.selectstart="onselectstart"in n,t.removeChild(n).style.display="none"}),e.curCSS||(e.curCSS=e.css),e.extend(e.ui,{plugin:{add:function(t,n,i){var r=e.ui[t].prototype;for(var o in i)r.plugins[o]=r.plugins[o]||[],r.plugins[o].push([n,i[o]])},call:function(e,t,n){var i=e.plugins[t];if(i&&e.element[0].parentNode)for(var r=0;r<i.length;r++)e.options[i[r][0]]&&i[r][1].apply(e.element,n)}},contains:function(e,t){return document.compareDocumentPosition?16&e.compareDocumentPosition(t):e!==t&&e.contains(t)},hasScroll:function(t,n){if("hidden"===e(t).css("overflow"))return!1;var i=n&&"left"===n?"scrollLeft":"scrollTop",r=!1;return t[i]>0?!0:(t[i]=1,r=t[i]>0,t[i]=0,r)},isOverAxis:function(e,t,n){return e>t&&t+n>e},isOver:function(t,n,i,r,o,a){return e.ui.isOverAxis(t,i,o)&&e.ui.isOverAxis(n,r,a)}}))}(jQuery),function(e,t){if(e.cleanData){var n=e.cleanData;e.cleanData=function(t){for(var i,r=0;null!=(i=t[r]);r++)try{e(i).triggerHandler("remove")}catch(o){}n(t)}}else{var i=e.fn.remove;e.fn.remove=function(t,n){return this.each(function(){return n||(!t||e.filter(t,[this]).length)&&e("*",this).add([this]).each(function(){try{e(this).triggerHandler("remove")}catch(t){}}),i.call(e(this),t,n)})}}e.widget=function(t,n,i){var r,o=t.split(".")[0];t=t.split(".")[1],r=o+"-"+t,i||(i=n,n=e.Widget),e.expr[":"][r]=function(n){return!!e.data(n,t)},e[o]=e[o]||{},e[o][t]=function(e,t){arguments.length&&this._createWidget(e,t)};var a=new n;a.options=e.extend(!0,{},a.options),e[o][t].prototype=e.extend(!0,a,{namespace:o,widgetName:t,widgetEventPrefix:e[o][t].prototype.widgetEventPrefix||t,widgetBaseClass:r},i),e.widget.bridge(t,e[o][t])},e.widget.bridge=function(n,i){e.fn[n]=function(r){var o="string"==typeof r,a=Array.prototype.slice.call(arguments,1),s=this;return r=!o&&a.length?e.extend.apply(null,[!0,r].concat(a)):r,o&&"_"===r.charAt(0)?s:(o?this.each(function(){var i=e.data(this,n),o=i&&e.isFunction(i[r])?i[r].apply(i,a):i;return o!==i&&o!==t?(s=o,!1):void 0}):this.each(function(){var t=e.data(this,n);t?t.option(r||{})._init():e.data(this,n,new i(r,this))}),s)}},e.Widget=function(e,t){arguments.length&&this._createWidget(e,t)},e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(t,n){e.data(n,this.widgetName,this),this.element=e(n),this.options=e.extend(!0,{},this.options,this._getCreateOptions(),t);var i=this;this.element.bind("remove."+this.widgetName,function(){i.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return e.metadata&&e.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(n,i){var r=n;if(0===arguments.length)return e.extend({},this.options);if("string"==typeof n){if(i===t)return this.options[n];r={},r[n]=i}return this._setOptions(r),this},_setOptions:function(t){var n=this;return e.each(t,function(e,t){n._setOption(e,t)}),this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&this.widget()[t?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",t),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(t,n,i){var r,o,a=this.options[t];if(i=i||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(r in o)r in n||(n[r]=o[r]);return this.element.trigger(n,i),!(e.isFunction(a)&&a.call(this.element[0],n,i)===!1||n.isDefaultPrevented())}}}(jQuery),function(e,t){var n=!1;e(document).mouseup(function(e){n=!1}),e.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){return!0===e.data(n.target,t.widgetName+".preventClickEvent")?(e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!n){this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,r=1==t.which,o="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return r&&!o&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(t){return!e.browser.msie||document.documentMode>=9||t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target==this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})}(jQuery),function(e,t){e.ui=e.ui||{};var n=/left|center|right/,i=/top|center|bottom/,r="center",o={},a=e.fn.position,s=e.fn.offset;e.fn.position=function(t){if(!t||!t.of)return a.apply(this,arguments);t=e.extend({},t);var s,l,u,c=e(t.of),d=c[0],p=(t.collision||"flip").split(" "),h=t.offset?t.offset.split(" "):[0,0];return 9===d.nodeType?(s=c.width(),l=c.height(),u={top:0,left:0}):d.setTimeout?(s=c.width(),l=c.height(),u={top:c.scrollTop(),left:c.scrollLeft()}):d.preventDefault?(t.at="left top",s=l=0,u={top:t.of.pageY,left:t.of.pageX}):(s=c.outerWidth(),l=c.outerHeight(),u=c.offset()),e.each(["my","at"],function(){var e=(t[this]||"").split(" ");1===e.length&&(e=n.test(e[0])?e.concat([r]):i.test(e[0])?[r].concat(e):[r,r]),e[0]=n.test(e[0])?e[0]:r,e[1]=i.test(e[1])?e[1]:r,t[this]=e}),1===p.length&&(p[1]=p[0]),h[0]=parseInt(h[0],10)||0,1===h.length&&(h[1]=h[0]),h[1]=parseInt(h[1],10)||0,"right"===t.at[0]?u.left+=s:t.at[0]===r&&(u.left+=s/2),"bottom"===t.at[1]?u.top+=l:t.at[1]===r&&(u.top+=l/2),u.left+=h[0],u.top+=h[1],this.each(function(){var n,i=e(this),a=i.outerWidth(),c=i.outerHeight(),d=parseInt(e.curCSS(this,"marginLeft",!0))||0,f=parseInt(e.curCSS(this,"marginTop",!0))||0,g=a+d+(parseInt(e.curCSS(this,"marginRight",!0))||0),m=c+f+(parseInt(e.curCSS(this,"marginBottom",!0))||0),v=e.extend({},u);"right"===t.my[0]?v.left-=a:t.my[0]===r&&(v.left-=a/2),"bottom"===t.my[1]?v.top-=c:t.my[1]===r&&(v.top-=c/2),o.fractions||(v.left=Math.round(v.left),v.top=Math.round(v.top)),n={left:v.left-d,top:v.top-f},e.each(["left","top"],function(i,r){e.ui.position[p[i]]&&e.ui.position[p[i]][r](v,{targetWidth:s,targetHeight:l,elemWidth:a,elemHeight:c,collisionPosition:n,collisionWidth:g,collisionHeight:m,offset:h,my:t.my,at:t.at})}),e.fn.bgiframe&&i.bgiframe(),i.offset(e.extend(v,{using:t.using}))})},e.ui.position={fit:{left:function(t,n){var i=e(window),r=n.collisionPosition.left+n.collisionWidth-i.width()-i.scrollLeft();t.left=r>0?t.left-r:Math.max(t.left-n.collisionPosition.left,t.left)},top:function(t,n){var i=e(window),r=n.collisionPosition.top+n.collisionHeight-i.height()-i.scrollTop();t.top=r>0?t.top-r:Math.max(t.top-n.collisionPosition.top,t.top)}},flip:{left:function(t,n){if(n.at[0]!==r){var i=e(window),o=n.collisionPosition.left+n.collisionWidth-i.width()-i.scrollLeft(),a="left"===n.my[0]?-n.elemWidth:"right"===n.my[0]?n.elemWidth:0,s="left"===n.at[0]?n.targetWidth:-n.targetWidth,l=-2*n.offset[0];t.left+=n.collisionPosition.left<0?a+s+l:o>0?a+s+l:0}},top:function(t,n){if(n.at[1]!==r){var i=e(window),o=n.collisionPosition.top+n.collisionHeight-i.height()-i.scrollTop(),a="top"===n.my[1]?-n.elemHeight:"bottom"===n.my[1]?n.elemHeight:0,s="top"===n.at[1]?n.targetHeight:-n.targetHeight,l=-2*n.offset[1];t.top+=n.collisionPosition.top<0?a+s+l:o>0?a+s+l:0}}}},e.offset.setOffset||(e.offset.setOffset=function(t,n){/static/.test(e.curCSS(t,"position"))&&(t.style.position="relative");var i=e(t),r=i.offset(),o=parseInt(e.curCSS(t,"top",!0),10)||0,a=parseInt(e.curCSS(t,"left",!0),10)||0,s={top:n.top-r.top+o,left:n.left-r.left+a};"using"in n?n.using.call(t,s):i.css(s)},e.fn.offset=function(t){var n=this[0];return n&&n.ownerDocument?t?e.isFunction(t)?this.each(function(n){e(this).offset(t.call(this,n,e(this).offset()))}):this.each(function(){e.offset.setOffset(this,t)}):s.call(this):null}),e.curCSS||(e.curCSS=e.css),function(){var t,n,i,r,a,s=document.getElementsByTagName("body")[0],l=document.createElement("div");t=document.createElement(s?"div":"body"),i={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},s&&e.extend(i,{position:"absolute",left:"-1000px",top:"-1000px"});for(var u in i)t.style[u]=i[u];t.appendChild(l),n=s||document.documentElement,n.insertBefore(t,n.firstChild),l.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",r=e(l).offset(function(e,t){return t}).offset(),t.innerHTML="",n.removeChild(t),a=r.top+r.left+(s?2e3:0),o.fractions=a>21&&22>a}()}(jQuery),function(e,t){e.widget("ui.draggable",e.ui.mouse,{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},_create:function(){"original"!=this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){return this.element.data("draggable")?(this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this):void 0},_mouseCapture:function(t){var n=this.options;return this.helper||n.disabled||e(t.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(t),this.handle?(n.iframeFix&&e(n.iframeFix===!0?"iframe":n.iframeFix).each(function(){e('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),n.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,n){if(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!n){var i=this._uiHash();if(this._trigger("drag",t,i)===!1)return this._mouseUp({}),!1;this.position=i.position}return 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"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=!1;e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1);for(var i=this.element[0],r=!1;i&&(i=i.parentNode);)i==document&&(r=!0);if(!r&&"original"===this.options.helper)return!1;if("invalid"==this.options.revert&&!n||"valid"==this.options.revert&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)){var o=this;e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){o._trigger("stop",t)!==!1&&o._clear()})}else this._trigger("stop",t)!==!1&&this._clear();return!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var n=this.options.handle&&e(this.options.handle,this.element).length?!1:!0;return e(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(n=!0)}),n},_createHelper:function(t){var n=this.options,i=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t])):"clone"==n.helper?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo("parent"==n.appendTo?this.element[0].parentNode:n.appendTo),i[0]==this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&e.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&e.browser.msie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_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 t=this.options;if("parent"==t.containment&&(t.containment=this.helper[0].parentNode),("document"==t.containment||"window"==t.containment)&&(this.containment=["document"==t.containment?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"==t.containment?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"==t.containment?0:e(window).scrollLeft())+e("document"==t.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"==t.containment?0:e(window).scrollTop())+(e("document"==t.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(t.containment)||t.containment.constructor==Array)t.containment.constructor==Array&&(this.containment=t.containment);else{var n=e(t.containment),i=n[0];if(!i)return;var r=(n.offset(),"hidden"!=e(i).css("overflow"));this.containment=[(parseInt(e(i).css("borderLeftWidth"),10)||0)+(parseInt(e(i).css("paddingLeft"),10)||0),(parseInt(e(i).css("borderTopWidth"),10)||0)+(parseInt(e(i).css("paddingTop"),10)||0),(r?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e(i).css("borderLeftWidth"),10)||0)-(parseInt(e(i).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(r?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e(i).css("borderTopWidth"),10)||0)-(parseInt(e(i).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n}},_convertPositionTo:function(t,n){n||(n=this.position);var i="absolute"==t?1:-1,r=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),o=/(html|body)/i.test(r[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-(e.browser.safari&&e.browser.version<526&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*i),left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-(e.browser.safari&&e.browser.version<526&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*i)}},_generatePosition:function(t){var n=this.options,i="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(i[0].tagName),o=t.pageX,a=t.pageY;if(this.originalPosition){var s;if(this.containment){if(this.relative_container){var l=this.relative_container.offset();s=[this.containment[0]+l.left,this.containment[1]+l.top,this.containment[2]+l.left,this.containment[3]+l.top]}else s=this.containment;t.pageX-this.offset.click.left<s[0]&&(o=s[0]+this.offset.click.left),t.pageY-this.offset.click.top<s[1]&&(a=s[1]+this.offset.click.top),t.pageX-this.offset.click.left>s[2]&&(o=s[2]+this.offset.click.left),t.pageY-this.offset.click.top>s[3]&&(a=s[3]+this.offset.click.top)}if(n.grid){var u=n.grid[1]?this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY;a=s&&(u-this.offset.click.top<s[1]||u-this.offset.click.top>s[3])?u-this.offset.click.top<s[1]?u+n.grid[1]:u-n.grid[1]:u;var c=n.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0]:this.originalPageX;o=s&&(c-this.offset.click.left<s[0]||c-this.offset.click.left>s[2])?c-this.offset.click.left<s[0]?c+n.grid[0]:c-n.grid[0]:c}}return{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(e.browser.safari&&e.browser.version<526&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollTop():r?0:i.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(e.browser.safari&&e.browser.version<526&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollLeft():r?0:i.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]==this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,n,i){return i=i||this._uiHash(),e.ui.plugin.call(this,t,[n,i]),"drag"==t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,n,i)},plugins:{},_uiHash:function(e){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.extend(e.ui.draggable,{version:"1.8.24"}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n){var i=e(this).data("draggable"),r=i.options,o=e.extend({},n,{item:i.element});i.sortables=[],e(r.connectToSortable).each(function(){var n=e.data(this,"sortable");n&&!n.options.disabled&&(i.sortables.push({instance:n,shouldRevert:n.options.revert}),n.refreshPositions(),n._trigger("activate",t,o))})},stop:function(t,n){var i=e(this).data("draggable"),r=e.extend({},n,{item:i.element});e.each(i.sortables,function(){this.instance.isOver?(this.instance.isOver=0,i.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"==i.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,r))})},drag:function(t,n){var i=e(this).data("draggable"),r=this;e.each(i.sortables,function(o){this.instance.positionAbs=i.positionAbs,this.instance.helperProportions=i.helperProportions,this.instance.offset.click=i.offset.click,this.instance._intersectsWith(this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(r).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return n.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=i.offset.click.top,this.instance.offset.click.left=i.offset.click.left,this.instance.offset.parent.left-=i.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=i.offset.parent.top-this.instance.offset.parent.top,i._trigger("toSortable",t),i.dropped=this.instance.element,i.currentItem=i.element,this.instance.fromOutside=i),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),i._trigger("fromSortable",t),i.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n){var i=e("body"),r=e(this).data("draggable").options;i.css("cursor")&&(r._cursor=i.css("cursor")),i.css("cursor",r.cursor)},stop:function(t,n){var i=e(this).data("draggable").options;i._cursor&&e("body").css("cursor",i._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n){var i=e(n.helper),r=e(this).data("draggable").options;i.css("opacity")&&(r._opacity=i.css("opacity")),i.css("opacity",r.opacity)},stop:function(t,n){var i=e(this).data("draggable").options;i._opacity&&e(n.helper).css("opacity",i._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(t,n){var i=e(this).data("draggable");i.scrollParent[0]!=document&&"HTML"!=i.scrollParent[0].tagName&&(i.overflowOffset=i.scrollParent.offset())},drag:function(t,n){var i=e(this).data("draggable"),r=i.options,o=!1;i.scrollParent[0]!=document&&"HTML"!=i.scrollParent[0].tagName?(r.axis&&"x"==r.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY<r.scrollSensitivity?i.scrollParent[0].scrollTop=o=i.scrollParent[0].scrollTop+r.scrollSpeed:t.pageY-i.overflowOffset.top<r.scrollSensitivity&&(i.scrollParent[0].scrollTop=o=i.scrollParent[0].scrollTop-r.scrollSpeed)),r.axis&&"y"==r.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-t.pageX<r.scrollSensitivity?i.scrollParent[0].scrollLeft=o=i.scrollParent[0].scrollLeft+r.scrollSpeed:t.pageX-i.overflowOffset.left<r.scrollSensitivity&&(i.scrollParent[0].scrollLeft=o=i.scrollParent[0].scrollLeft-r.scrollSpeed))):(r.axis&&"x"==r.axis||(t.pageY-e(document).scrollTop()<r.scrollSensitivity?o=e(document).scrollTop(e(document).scrollTop()-r.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<r.scrollSensitivity&&(o=e(document).scrollTop(e(document).scrollTop()+r.scrollSpeed))),r.axis&&"y"==r.axis||(t.pageX-e(document).scrollLeft()<r.scrollSensitivity?o=e(document).scrollLeft(e(document).scrollLeft()-r.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<r.scrollSensitivity&&(o=e(document).scrollLeft(e(document).scrollLeft()+r.scrollSpeed)))),o!==!1&&e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,n){var i=e(this).data("draggable"),r=i.options;i.snapElements=[],e(r.snap.constructor!=String?r.snap.items||":data(draggable)":r.snap).each(function(){var t=e(this),n=t.offset();this!=i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:n.top,left:n.left})})},drag:function(t,n){for(var i=e(this).data("draggable"),r=i.options,o=r.snapTolerance,a=n.offset.left,s=a+i.helperProportions.width,l=n.offset.top,u=l+i.helperProportions.height,c=i.snapElements.length-1;c>=0;c--){var d=i.snapElements[c].left,p=d+i.snapElements[c].width,h=i.snapElements[c].top,f=h+i.snapElements[c].height;if(a>d-o&&p+o>a&&l>h-o&&f+o>l||a>d-o&&p+o>a&&u>h-o&&f+o>u||s>d-o&&p+o>s&&l>h-o&&f+o>l||s>d-o&&p+o>s&&u>h-o&&f+o>u){if("inner"!=r.snapMode){var g=Math.abs(h-u)<=o,m=Math.abs(f-l)<=o,v=Math.abs(d-s)<=o,y=Math.abs(p-a)<=o;g&&(n.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top-i.margins.top),m&&(n.position.top=i._convertPositionTo("relative",{top:f,left:0}).top-i.margins.top),v&&(n.position.left=i._convertPositionTo("relative",{top:0,left:d-i.helperProportions.width}).left-i.margins.left),y&&(n.position.left=i._convertPositionTo("relative",{top:0,left:p}).left-i.margins.left)}var b=g||m||v||y;if("outer"!=r.snapMode){var g=Math.abs(h-l)<=o,m=Math.abs(f-u)<=o,v=Math.abs(d-a)<=o,y=Math.abs(p-s)<=o;g&&(n.position.top=i._convertPositionTo("relative",{top:h,left:0}).top-i.margins.top),m&&(n.position.top=i._convertPositionTo("relative",{top:f-i.helperProportions.height,left:0}).top-i.margins.top),v&&(n.position.left=i._convertPositionTo("relative",{top:0,left:d}).left-i.margins.left),y&&(n.position.left=i._convertPositionTo("relative",{top:0,left:p-i.helperProportions.width}).left-i.margins.left)}!i.snapElements[c].snapping&&(g||m||v||y||b)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[c].item})),i.snapElements[c].snapping=g||m||v||y||b}else i.snapElements[c].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[c].item})),i.snapElements[c].snapping=!1}}}),e.ui.plugin.add("draggable","stack",{start:function(t,n){var i=e(this).data("draggable").options,r=e.makeArray(e(i.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});if(r.length){var o=parseInt(r[0].style.zIndex)||0;e(r).each(function(e){this.style.zIndex=o+e}),this[0].style.zIndex=o+r.length}}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n){var i=e(n.helper),r=e(this).data("draggable").options;i.css("zIndex")&&(r._zIndex=i.css("zIndex")),i.css("zIndex",r.zIndex)},stop:function(t,n){var i=e(this).data("draggable").options;i._zIndex&&e(n.helper).css("zIndex",i._zIndex)}})}(jQuery),function(e,t){e.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var t=this.options,n=t.accept;this.isover=0,this.isout=1,this.accept=e.isFunction(n)?n:function(e){return e.is(n)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var t=e.ui.ddmanager.droppables[this.options.scope],n=0;n<t.length;n++)t[n]==this&&t.splice(n,1);return this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable"),this},_setOption:function(t,n){"accept"==t&&(this.accept=e.isFunction(n)?n:function(e){return e.is(n)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!=this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!=this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(n)))},_drop:function(t,n){var i=n||e.ui.ddmanager.current;
|
|
3235
|
|
-if(!i||(i.currentItem||i.element)[0]==this.element[0])return!1;var r=!1;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope==i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&e.ui.intersect(i,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(r=!0,!1):void 0}),r?!1:this.accept.call(this.element[0],i.currentItem||i.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(i)),this.element):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.extend(e.ui.droppable,{version:"1.8.24"}),e.ui.intersect=function(t,n,i){if(!n.offset)return!1;var r=(t.positionAbs||t.position.absolute).left,o=r+t.helperProportions.width,a=(t.positionAbs||t.position.absolute).top,s=a+t.helperProportions.height,l=n.offset.left,u=l+n.proportions.width,c=n.offset.top,d=c+n.proportions.height;switch(i){case"fit":return r>=l&&u>=o&&a>=c&&d>=s;case"intersect":return l<r+t.helperProportions.width/2&&o-t.helperProportions.width/2<u&&c<a+t.helperProportions.height/2&&s-t.helperProportions.height/2<d;case"pointer":var p=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,h=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,f=e.ui.isOver(h,p,c,l,n.proportions.height,n.proportions.width);return f;case"touch":return(a>=c&&d>=a||s>=c&&d>=s||c>a&&s>d)&&(r>=l&&u>=r||o>=l&&u>=o||l>r&&o>u);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,n){var i=e.ui.ddmanager.droppables[t.options.scope]||[],r=n?n.type:null,o=(t.currentItem||t.element).find(":data(droppable)").andSelf();e:for(var a=0;a<i.length;a++)if(!(i[a].options.disabled||t&&!i[a].accept.call(i[a].element[0],t.currentItem||t.element))){for(var s=0;s<o.length;s++)if(o[s]==i[a].element[0]){i[a].proportions.height=0;continue e}i[a].visible="none"!=i[a].element.css("display"),i[a].visible&&("mousedown"==r&&i[a]._activate.call(i[a],n),i[a].offset=i[a].element.offset(),i[a].proportions={width:i[a].element[0].offsetWidth,height:i[a].element[0].offsetHeight})}},drop:function(t,n){var i=!1;return e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(i=this._drop.call(this,n)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,n)))}),i},dragStart:function(t,n){t.element.parents(":not(body,html)").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)})},drag:function(t,n){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,n),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var i=e.ui.intersect(t,this,this.options.tolerance),r=i||1!=this.isover?i&&0==this.isover?"isover":null:"isout";if(r){var o;if(this.options.greedy){var a=this.options.scope,s=this.element.parents(":data(droppable)").filter(function(){return e.data(this,"droppable").options.scope===a});s.length&&(o=e.data(s[0],"droppable"),o.greedyChild="isover"==r?1:0)}o&&"isover"==r&&(o.isover=0,o.isout=1,o._out.call(o,n)),this[r]=1,this["isout"==r?"isover":"isout"]=0,this["isover"==r?"_over":"_out"].call(this,n),o&&"isout"==r&&(o.isout=0,o.isover=1,o._over.call(o,n))}}})},dragStop:function(t,n){t.element.parents(":not(body,html)").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}}}(jQuery),function(e,t){e.widget("ui.resizable",e.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var t=this,n=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e('<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("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom: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({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=n.handles||(e(".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.constructor==String){"all"==this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw");var i=this.handles.split(",");this.handles={};for(var r=0;r<i.length;r++){var o=e.trim(i[r]),a="ui-resizable-"+o,s=e('<div class="ui-resizable-handle '+a+'"></div>');s.css({zIndex:n.zIndex}),"se"==o&&s.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[o]=".ui-resizable-"+o,this.element.append(s)}}this._renderAxis=function(t){t=t||this.element;for(var n in this.handles){if(this.handles[n].constructor==String&&(this.handles[n]=e(this.handles[n],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var i=e(this.handles[n],this.element),r=0;r=/sw|ne|nw|se|n|s/.test(n)?i.outerHeight():i.outerWidth();var o=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");t.css(o,r),this._proportionallyResize()}e(this.handles[n]).length}},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!t.resizing){if(this.className)var e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);t.axis=e&&e[1]?e[1]:"se"}}),n.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").hover(function(){n.disabled||(e(this).removeClass("ui-resizable-autohide"),t._handles.show())},function(){n.disabled||t.resizing||(e(this).addClass("ui-resizable-autohide"),t._handles.hide())})),this._mouseInit()},destroy:function(){this._mouseDestroy();var t=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){t(this.element);var n=this.element;n.after(this.originalElement.css({position:n.css("position"),width:n.outerWidth(),height:n.outerHeight(),top:n.css("top"),left:n.css("left")})).remove()}return this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(t){var n=!1;for(var i in this.handles)e(this.handles[i])[0]==t.target&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var i=this.options,r=this.element.position(),o=this.element;this.resizing=!0,this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()},(o.is(".ui-draggable")||/absolute/.test(o.css("position")))&&o.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy();var a=n(this.helper.css("left")),s=n(this.helper.css("top"));i.containment&&(a+=e(i.containment).scrollLeft()||0,s+=e(i.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:a,top:s},this.size=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.originalPosition={left:a,top:s},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof i.aspectRatio?i.aspectRatio:this.originalSize.width/this.originalSize.height||1;var l=e(".ui-resizable-"+this.axis).css("cursor");return e("body").css("cursor","auto"==l?this.axis+"-resize":l),o.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var n=this.helper,i=(this.options,this.originalMousePosition),r=this.axis,o=t.pageX-i.left||0,a=t.pageY-i.top||0,s=this._change[r];if(!s)return!1;var l=s.apply(this,[t,o,a]);e.browser.msie&&e.browser.version<7,this.sizeDiff;return this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(l=this._updateRatio(l,t)),l=this._respectSize(l,t),this._propagate("resize",t),n.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(l),this._trigger("resize",t,this.ui()),!1},_mouseStop:function(t){this.resizing=!1;var n=this.options,i=this;if(this._helper){var r=this._proportionallyResizeElements,o=r.length&&/textarea/i.test(r[0].nodeName),a=o&&e.ui.hasScroll(r[0],"left")?0:i.sizeDiff.height,s=o?0:i.sizeDiff.width,l={width:i.helper.width()-s,height:i.helper.height()-a},u=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;n.animate||this.element.css(e.extend(l,{top:c,left:u})),i.helper.height(i.size.height),i.helper.width(i.size.width),this._helper&&!n.animate&&this._proportionallyResize()}return e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,n,r,o,a,s=this.options;a={minWidth:i(s.minWidth)?s.minWidth:0,maxWidth:i(s.maxWidth)?s.maxWidth:1/0,minHeight:i(s.minHeight)?s.minHeight:0,maxHeight:i(s.maxHeight)?s.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,r=a.minWidth/this.aspectRatio,n=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),r>a.minHeight&&(a.minHeight=r),n<a.maxWidth&&(a.maxWidth=n),o<a.maxHeight&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:function(e){this.options;this.offset=this.helper.offset(),i(e.left)&&(this.position.left=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e,t){var n=(this.options,this.position),r=this.size,o=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"==o&&(e.left=n.left+(r.width-e.width),e.top=null),"nw"==o&&(e.top=n.top+(r.height-e.height),e.left=n.left+(r.width-e.width)),e},_respectSize:function(e,t){var n=(this.helper,this._vBoundaries),r=(this._aspectRatio||t.shiftKey,this.axis),o=i(e.width)&&n.maxWidth&&n.maxWidth<e.width,a=i(e.height)&&n.maxHeight&&n.maxHeight<e.height,s=i(e.width)&&n.minWidth&&n.minWidth>e.width,l=i(e.height)&&n.minHeight&&n.minHeight>e.height;s&&(e.width=n.minWidth),l&&(e.height=n.minHeight),o&&(e.width=n.maxWidth),a&&(e.height=n.maxHeight);var u=this.originalPosition.left+this.originalSize.width,c=this.position.top+this.size.height,d=/sw|nw|w/.test(r),p=/nw|ne|n/.test(r);s&&d&&(e.left=u-n.minWidth),o&&d&&(e.left=u-n.maxWidth),l&&p&&(e.top=c-n.minHeight),a&&p&&(e.top=c-n.maxHeight);var h=!e.width&&!e.height;return h&&!e.left&&e.top?e.top=null:h&&!e.top&&e.left&&(e.left=null),e},_proportionallyResize:function(){this.options;if(this._proportionallyResizeElements.length)for(var t=this.helper||this.element,n=0;n<this._proportionallyResizeElements.length;n++){var i=this._proportionallyResizeElements[n];if(!this.borderDif){var r=[i.css("borderTopWidth"),i.css("borderRightWidth"),i.css("borderBottomWidth"),i.css("borderLeftWidth")],o=[i.css("paddingTop"),i.css("paddingRight"),i.css("paddingBottom"),i.css("paddingLeft")];this.borderDif=e.map(r,function(e,t){var n=parseInt(e,10)||0,i=parseInt(o[t],10)||0;return n+i})}e.browser.msie&&(e(t).is(":hidden")||e(t).parents(":hidden").length)||i.css({height:t.height()-this.borderDif[0]-this.borderDif[2]||0,width:t.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var t=this.element,n=this.options;if(this.elementOffset=t.offset(),this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var i=e.browser.msie&&e.browser.version<7,r=i?1:0,o=i?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+o,height:this.element.outerHeight()+o,position:"absolute",left:this.elementOffset.left-r+"px",top:this.elementOffset.top-r+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(e,t,n){return{width:this.originalSize.width+t}},w:function(e,t,n){var i=(this.options,this.originalSize),r=this.originalPosition;return{left:r.left+t,width:i.width-t}},n:function(e,t,n){var i=(this.options,this.originalSize),r=this.originalPosition;return{top:r.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},sw:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,i]))},ne:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},nw:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,i]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),"resize"!=t&&this._trigger(t,n,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}}}),e.extend(e.ui.resizable,{version:"1.8.24"}),e.ui.plugin.add("resizable","alsoResize",{start:function(t,n){var i=e(this).data("resizable"),r=i.options,o=function(t){e(t).each(function(){var t=e(this);t.data("resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof r.alsoResize||r.alsoResize.parentNode?o(r.alsoResize):r.alsoResize.length?(r.alsoResize=r.alsoResize[0],o(r.alsoResize)):e.each(r.alsoResize,function(e){o(e)})},resize:function(t,n){var i=e(this).data("resizable"),r=i.options,o=i.originalSize,a=i.originalPosition,s={height:i.size.height-o.height||0,width:i.size.width-o.width||0,top:i.position.top-a.top||0,left:i.position.left-a.left||0},l=function(t,i){e(t).each(function(){var t=e(this),r=e(this).data("resizable-alsoresize"),o={},a=i&&i.length?i:t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(a,function(e,t){var n=(r[t]||0)+(s[t]||0);n&&n>=0&&(o[t]=n||null)}),t.css(o)})};"object"!=typeof r.alsoResize||r.alsoResize.nodeType?l(r.alsoResize):e.each(r.alsoResize,function(e,t){l(e,t)})},stop:function(t,n){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","animate",{stop:function(t,n){var i=e(this).data("resizable"),r=i.options,o=i._proportionallyResizeElements,a=o.length&&/textarea/i.test(o[0].nodeName),s=a&&e.ui.hasScroll(o[0],"left")?0:i.sizeDiff.height,l=a?0:i.sizeDiff.width,u={width:i.size.width-l,height:i.size.height-s},c=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,d=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(u,d&&c?{top:d,left:c}:{}),{duration:r.animateDuration,easing:r.animateEasing,step:function(){var n={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};o&&o.length&&e(o[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(t,i){var r=e(this).data("resizable"),o=r.options,a=r.element,s=o.containment,l=s instanceof e?s.get(0):/parent/.test(s)?a.parent().get(0):s;if(l)if(r.containerElement=e(l),/document/.test(s)||s==document)r.containerOffset={left:0,top:0},r.containerPosition={left:0,top:0},r.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight};else{var u=e(l),c=[];e(["Top","Right","Left","Bottom"]).each(function(e,t){c[e]=n(u.css("padding"+t))}),r.containerOffset=u.offset(),r.containerPosition=u.position(),r.containerSize={height:u.innerHeight()-c[3],width:u.innerWidth()-c[1]};var d=r.containerOffset,p=r.containerSize.height,h=r.containerSize.width,f=e.ui.hasScroll(l,"left")?l.scrollWidth:h,g=e.ui.hasScroll(l)?l.scrollHeight:p;r.parentData={element:l,left:d.left,top:d.top,width:f,height:g}}},resize:function(t,n){var i=e(this).data("resizable"),r=i.options,o=(i.containerSize,i.containerOffset),a=(i.size,i.position),s=i._aspectRatio||t.shiftKey,l={top:0,left:0},u=i.containerElement;u[0]!=document&&/static/.test(u.css("position"))&&(l=o),a.left<(i._helper?o.left:0)&&(i.size.width=i.size.width+(i._helper?i.position.left-o.left:i.position.left-l.left),s&&(i.size.height=i.size.width/i.aspectRatio),i.position.left=r.helper?o.left:0),a.top<(i._helper?o.top:0)&&(i.size.height=i.size.height+(i._helper?i.position.top-o.top:i.position.top),s&&(i.size.width=i.size.height*i.aspectRatio),i.position.top=i._helper?o.top:0),i.offset.left=i.parentData.left+i.position.left,i.offset.top=i.parentData.top+i.position.top;var c=Math.abs((i._helper?i.offset.left-l.left:i.offset.left-l.left)+i.sizeDiff.width),d=Math.abs((i._helper?i.offset.top-l.top:i.offset.top-o.top)+i.sizeDiff.height),p=i.containerElement.get(0)==i.element.parent().get(0),h=/relative|absolute/.test(i.containerElement.css("position"));p&&h&&(c-=i.parentData.left),c+i.size.width>=i.parentData.width&&(i.size.width=i.parentData.width-c,s&&(i.size.height=i.size.width/i.aspectRatio)),d+i.size.height>=i.parentData.height&&(i.size.height=i.parentData.height-d,s&&(i.size.width=i.size.height*i.aspectRatio))},stop:function(t,n){var i=e(this).data("resizable"),r=i.options,o=(i.position,i.containerOffset),a=i.containerPosition,s=i.containerElement,l=e(i.helper),u=l.offset(),c=l.outerWidth()-i.sizeDiff.width,d=l.outerHeight()-i.sizeDiff.height;i._helper&&!r.animate&&/relative/.test(s.css("position"))&&e(this).css({left:u.left-a.left-o.left,width:c,height:d}),i._helper&&!r.animate&&/static/.test(s.css("position"))&&e(this).css({left:u.left-a.left-o.left,width:c,height:d})}}),e.ui.plugin.add("resizable","ghost",{start:function(t,n){var i=e(this).data("resizable"),r=i.options,o=i.size;i.ghost=i.originalElement.clone(),i.ghost.css({opacity:.25,display:"block",position:"relative",height:o.height,width:o.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof r.ghost?r.ghost:""),i.ghost.appendTo(i.helper)},resize:function(t,n){var i=e(this).data("resizable");i.options;i.ghost&&i.ghost.css({position:"relative",height:i.size.height,width:i.size.width})},stop:function(t,n){var i=e(this).data("resizable");i.options;i.ghost&&i.helper&&i.helper.get(0).removeChild(i.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(t,n){var i=e(this).data("resizable"),r=i.options,o=i.size,a=i.originalSize,s=i.originalPosition,l=i.axis;r._aspectRatio||t.shiftKey;r.grid="number"==typeof r.grid?[r.grid,r.grid]:r.grid;var u=Math.round((o.width-a.width)/(r.grid[0]||1))*(r.grid[0]||1),c=Math.round((o.height-a.height)/(r.grid[1]||1))*(r.grid[1]||1);/^(se|s|e)$/.test(l)?(i.size.width=a.width+u,i.size.height=a.height+c):/^(ne)$/.test(l)?(i.size.width=a.width+u,i.size.height=a.height+c,i.position.top=s.top-c):/^(sw)$/.test(l)?(i.size.width=a.width+u,i.size.height=a.height+c,i.position.left=s.left-u):(i.size.width=a.width+u,i.size.height=a.height+c,i.position.top=s.top-c,i.position.left=s.left-u)}});var n=function(e){return parseInt(e,10)||0},i=function(e){return!isNaN(parseInt(e,10))}}(jQuery),function(e,t){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var t=this;this.element.addClass("ui-selectable"),this.dragged=!1;var n;this.refresh=function(){n=e(t.options.filter,t.element[0]),n.addClass("ui-selectee"),n.each(function(){var t=e(this),n=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:n.left,top:n.top,right:n.left+t.outerWidth(),bottom:n.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=n.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},destroy:function(){return this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),this._mouseDestroy(),this},_mouseStart:function(t){var n=this;if(this.opos=[t.pageX,t.pageY],!this.options.disabled){var i=this.options;this.selectees=e(i.filter,this.element[0]),this._trigger("start",t),e(i.appendTo).append(this.helper),this.helper.css({left:t.clientX,top:t.clientY,width:0,height:0}),i.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var i=e.data(this,"selectable-item");i.startselected=!0,t.metaKey||t.ctrlKey||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",t,{unselecting:i.element}))}),e(t.target).parents().andSelf().each(function(){var i=e.data(this,"selectable-item");if(i){var r=!t.metaKey&&!t.ctrlKey||!i.$element.hasClass("ui-selected");return i.$element.removeClass(r?"ui-unselecting":"ui-selected").addClass(r?"ui-selecting":"ui-unselecting"),i.unselecting=!r,i.selecting=r,i.selected=r,r?n._trigger("selecting",t,{selecting:i.element}):n._trigger("unselecting",t,{unselecting:i.element}),!1}})}},_mouseDrag:function(t){var n=this;if(this.dragged=!0,!this.options.disabled){var i=this.options,r=this.opos[0],o=this.opos[1],a=t.pageX,s=t.pageY;if(r>a){var l=a;a=r,r=l}if(o>s){var l=s;s=o,o=l}return this.helper.css({left:r,top:o,width:a-r,height:s-o}),this.selectees.each(function(){var l=e.data(this,"selectable-item");if(l&&l.element!=n.element[0]){var u=!1;"touch"==i.tolerance?u=!(l.left>a||l.right<r||l.top>s||l.bottom<o):"fit"==i.tolerance&&(u=l.left>r&&l.right<a&&l.top>o&&l.bottom<s),u?(l.selected&&(l.$element.removeClass("ui-selected"),l.selected=!1),l.unselecting&&(l.$element.removeClass("ui-unselecting"),l.unselecting=!1),l.selecting||(l.$element.addClass("ui-selecting"),l.selecting=!0,n._trigger("selecting",t,{selecting:l.element}))):(l.selecting&&((t.metaKey||t.ctrlKey)&&l.startselected?(l.$element.removeClass("ui-selecting"),l.selecting=!1,l.$element.addClass("ui-selected"),l.selected=!0):(l.$element.removeClass("ui-selecting"),l.selecting=!1,l.startselected&&(l.$element.addClass("ui-unselecting"),l.unselecting=!0),n._trigger("unselecting",t,{unselecting:l.element}))),l.selected&&(t.metaKey||t.ctrlKey||l.startselected||(l.$element.removeClass("ui-selected"),l.selected=!1,l.$element.addClass("ui-unselecting"),l.unselecting=!0,n._trigger("unselecting",t,{unselecting:l.element}))))}}),!1}},_mouseStop:function(t){var n=this;this.dragged=!1;this.options;return e(".ui-unselecting",this.element[0]).each(function(){var i=e.data(this,"selectable-item");i.$element.removeClass("ui-unselecting"),i.unselecting=!1,i.startselected=!1,n._trigger("unselected",t,{unselected:i.element})}),e(".ui-selecting",this.element[0]).each(function(){var i=e.data(this,"selectable-item");i.$element.removeClass("ui-selecting").addClass("ui-selected"),i.selecting=!1,i.selected=!0,i.startselected=!0,n._trigger("selected",t,{selected:i.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.extend(e.ui.selectable,{version:"1.8.24"})}(jQuery),function(e,t){e.widget("ui.sortable",e.ui.mouse,{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},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===e.axis||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){e.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){"disabled"===t?(this.options[t]=n,this.widget()[n?"addClass":"removeClass"]("ui-sortable-disabled")):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var i=this;if(this.reverting)return!1;if(this.options.disabled||"static"==this.options.type)return!1;this._refreshItems(t);var r=null,o=this;e(t.target).parents().each(function(){return e.data(this,i.widgetName+"-item")==o?(r=e(this),!1):void 0});if(e.data(t.target,i.widgetName+"-item")==o&&(r=e(t.target)),!r)return!1;if(this.options.handle&&!n){var a=!1;if(e(this.options.handle,r).find("*").andSelf().each(function(){this==t.target&&(a=!0)}),!a)return!1}return this.currentItem=r,this._removeCurrentsFromItems(),!0},_mouseStart:function(t,n,i){var r=this.options,o=this;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),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},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.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(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&(e("body").css("cursor")&&(this._storedCursor=e("body").css("cursor")),e("body").css("cursor",r.cursor)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(var a=this.containers.length-1;a>=0;a--)this.containers[a]._trigger("activate",t,o._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){if(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll){var n=this.options,i=!1;this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-this.overflowOffset.top<n.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-n.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-this.overflowOffset.left<n.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-n.scrollSpeed)):(t.pageY-e(document).scrollTop()<n.scrollSensitivity?i=e(document).scrollTop(e(document).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<n.scrollSensitivity&&(i=e(document).scrollTop(e(document).scrollTop()+n.scrollSpeed)),t.pageX-e(document).scrollLeft()<n.scrollSensitivity?i=e(document).scrollLeft(e(document).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<n.scrollSensitivity&&(i=e(document).scrollLeft(e(document).scrollLeft()+n.scrollSpeed))),i!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)}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");for(var r=this.items.length-1;r>=0;r--){var o=this.items[r],a=o.item[0],s=this._intersectsWithPointer(o);if(s&&o.instance===this.currentContainer&&a!=this.currentItem[0]&&this.placeholder[1==s?"next":"prev"]()[0]!=a&&!e.ui.contains(this.placeholder[0],a)&&("semi-dynamic"==this.options.type?!e.ui.contains(this.element[0],a):!0)){if(this.direction=1==s?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(o))break;this._rearrange(t,o),this._trigger("change",t,this._uiHash());break}}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var i=this,r=i.placeholder.offset();i.reverting=!0,e(this.helper).animate({left:r.left-this.offset.parent.left-i.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:r.top-this.offset.parent.top-i.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){i._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){var t=this;if(this.dragging){this._mouseUp({target:null}),"original"==this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("deactivate",null,t._uiHash(this)),this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",null,t._uiHash(this)),this.containers[n].containerCache.over=0);
|
|
3236
|
|
-}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(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);n&&i.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n.each(function(){i.push(e(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,i=this.positionAbs.top,r=i+this.helperProportions.height,o=e.left,a=o+e.width,s=e.top,l=s+e.height,u=this.offset.click.top,c=this.offset.click.left,d=i+u>s&&l>i+u&&t+c>o&&a>t+c;return"pointer"==this.options.tolerance||this.options.forcePointerForContainers||"pointer"!=this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?d:o<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<a&&s<i+this.helperProportions.height/2&&r-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var n="x"===this.options.axis||e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),i="y"===this.options.axis||e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),r=n&&i,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return r?this.floating?a&&"right"==a||"down"==o?2:1:o&&("down"==o?2:1):!1},_intersectsWithSides:function(t){var n=e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),r=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"==o&&i||"left"==o&&!i:r&&("down"==r&&n||"up"==r&&!n)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!=e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!=e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor==String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n=[],i=[],r=this._connectWith();if(r&&t)for(var o=r.length-1;o>=0;o--)for(var a=e(r[o]),s=a.length-1;s>=0;s--){var l=e.data(a[s],this.widgetName);l&&l!=this&&!l.options.disabled&&i.push([e.isFunction(l.options.items)?l.options.items.call(l.element):e(l.options.items,l.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),l])}i.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var o=i.length-1;o>=0;o--)i[o][0].each(function(){n.push(this)});return e(n)},_removeCurrentsFromItems:function(){for(var e=this.currentItem.find(":data("+this.widgetName+"-item)"),t=0;t<this.items.length;t++)for(var n=0;n<e.length;n++)e[n]==this.items[t].item[0]&&this.items.splice(t,1)},_refreshItems:function(t){this.items=[],this.containers=[this];var n=this.items,i=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],r=this._connectWith();if(r&&this.ready)for(var o=r.length-1;o>=0;o--)for(var a=e(r[o]),s=a.length-1;s>=0;s--){var l=e.data(a[s],this.widgetName);l&&l!=this&&!l.options.disabled&&(i.push([e.isFunction(l.options.items)?l.options.items.call(l.element[0],t,{item:this.currentItem}):e(l.options.items,l.element),l]),this.containers.push(l))}for(var o=i.length-1;o>=0;o--)for(var u=i[o][1],c=i[o][0],s=0,d=c.length;d>s;s++){var p=e(c[s]);p.data(this.widgetName+"-item",u),n.push({item:p,instance:u,width:0,height:0,left:0,top:0})}},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var n=this.items.length-1;n>=0;n--){var i=this.items[n];if(i.instance==this.currentContainer||!this.currentContainer||i.item[0]==this.currentItem[0]){var r=this.options.toleranceElement?e(this.options.toleranceElement,i.item):i.item;t||(i.width=r.outerWidth(),i.height=r.outerHeight());var o=r.offset();i.left=o.left,i.top=o.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var n=this.containers.length-1;n>=0;n--){var o=this.containers[n].element.offset();this.containers[n].containerCache.left=o.left,this.containers[n].containerCache.top=o.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight()}return this},_createPlaceholder:function(t){var n=t||this,i=n.options;if(!i.placeholder||i.placeholder.constructor==String){var r=i.placeholder;i.placeholder={element:function(){var t=e(document.createElement(n.currentItem[0].nodeName)).addClass(r||n.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return r||(t.style.visibility="hidden"),t},update:function(e,t){(!r||i.forcePlaceholderSize)&&(t.height()||t.height(n.currentItem.innerHeight()-parseInt(n.currentItem.css("paddingTop")||0,10)-parseInt(n.currentItem.css("paddingBottom")||0,10)),t.width()||t.width(n.currentItem.innerWidth()-parseInt(n.currentItem.css("paddingLeft")||0,10)-parseInt(n.currentItem.css("paddingRight")||0,10)))}}}n.placeholder=e(i.placeholder.element.call(n.element,n.currentItem)),n.currentItem.after(n.placeholder),i.placeholder.update(n,n.placeholder)},_contactContainers:function(t){for(var n=null,i=null,r=this.containers.length-1;r>=0;r--)if(!e.ui.contains(this.currentItem[0],this.containers[r].element[0]))if(this._intersectsWith(this.containers[r].containerCache)){if(n&&e.ui.contains(this.containers[r].element[0],n.element[0]))continue;n=this.containers[r],i=r}else this.containers[r].containerCache.over&&(this.containers[r]._trigger("out",t,this._uiHash(this)),this.containers[r].containerCache.over=0);if(n)if(1===this.containers.length)this.containers[i]._trigger("over",t,this._uiHash(this)),this.containers[i].containerCache.over=1;else if(this.currentContainer!=this.containers[i]){for(var o=1e4,a=null,s=this.positionAbs[this.containers[i].floating?"left":"top"],l=this.items.length-1;l>=0;l--)if(e.ui.contains(this.containers[i].element[0],this.items[l].item[0])){var u=this.containers[i].floating?this.items[l].item.offset().left:this.items[l].item.offset().top;Math.abs(u-s)<o&&(o=Math.abs(u-s),a=this.items[l],this.direction=u-s>0?"down":"up")}if(!a&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[i],a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[i].element,!0),this._trigger("change",t,this._uiHash()),this.containers[i]._trigger("change",t,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[i]._trigger("over",t,this._uiHash(this)),this.containers[i].containerCache.over=1}},_createHelper:function(t){var n=this.options,i=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"==n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||e("parent"!=n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[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")}),(""==i[0].style.width||n.forceHelperSize)&&i.width(this.currentItem.width()),(""==i[0].style.height||n.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&e.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&e.browser.msie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.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 t=this.options;if("parent"==t.containment&&(t.containment=this.helper[0].parentNode),("document"==t.containment||"window"==t.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"==t.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"==t.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),!/^(document|window|parent)$/.test(t.containment)){var n=e(t.containment)[0],i=e(t.containment).offset(),r="hidden"!=e(n).css("overflow");this.containment=[i.left+(parseInt(e(n).css("borderLeftWidth"),10)||0)+(parseInt(e(n).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(n).css("borderTopWidth"),10)||0)+(parseInt(e(n).css("paddingTop"),10)||0)-this.margins.top,i.left+(r?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(e(n).css("borderLeftWidth"),10)||0)-(parseInt(e(n).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(r?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(e(n).css("borderTopWidth"),10)||0)-(parseInt(e(n).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(t,n){n||(n=this.position);var i="absolute"==t?1:-1,r=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),o=/(html|body)/i.test(r[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-(e.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*i),left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-(e.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*i)}},_generatePosition:function(t){var n=this.options,i="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(i[0].tagName);"relative"!=this.cssPosition||this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset());var o=t.pageX,a=t.pageY;if(this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid)){var s=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1];a=this.containment&&(s-this.offset.click.top<this.containment[1]||s-this.offset.click.top>this.containment[3])?s-this.offset.click.top<this.containment[1]?s+n.grid[1]:s-n.grid[1]:s;var l=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0];o=this.containment&&(l-this.offset.click.left<this.containment[0]||l-this.offset.click.left>this.containment[2])?l-this.offset.click.left<this.containment[0]?l+n.grid[0]:l-n.grid[0]:l}return{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(e.browser.safari&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollTop():r?0:i.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(e.browser.safari&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollLeft():r?0:i.scrollLeft())}},_rearrange:function(e,t,n,i){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"==this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this,o=this.counter;window.setTimeout(function(){o==r.counter&&r.refreshPositions(!i)},0)},_clear:function(t,n){this.reverting=!1;var i=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]==this.currentItem[0]){for(var r in this._storedCSS)("auto"==this._storedCSS[r]||"static"==this._storedCSS[r])&&(this._storedCSS[r]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!n&&i.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev==this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent==this.currentItem.parent()[0]||n||i.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(n||(i.push(function(e){this._trigger("remove",e,this._uiHash())}),i.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),i.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer))));for(var r=this.containers.length-1;r>=0;r--)n||i.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[r])),this.containers[r].containerCache.over&&(i.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[r])),this.containers[r].containerCache.over=0);if(this._storedCursor&&e("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"==this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!n){this._trigger("beforeStop",t,this._uiHash());for(var r=0;r<i.length;r++)i[r].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(n||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null,!n){for(var r=0;r<i.length;r++)i[r].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}}),e.extend(e.ui.sortable,{version:"1.8.24"})}(jQuery),function(e,t){e.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var t=this,n=t.options;if(t.running=0,t.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"),t.headers=t.element.find(n.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){n.disabled||e(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){n.disabled||e(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){n.disabled||e(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){n.disabled||e(this).removeClass("ui-state-focus")}),t.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"),n.navigation){var i=t.element.find("a").filter(n.navigationFilter).eq(0);if(i.length){var r=i.closest(".ui-accordion-header");r.length?t.active=r:t.active=i.closest(".ui-accordion-content").prev()}}t.active=t._findActive(t.active||n.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"),t.active.next().addClass("ui-accordion-content-active"),t._createIcons(),t.resize(),t.element.attr("role","tablist"),t.headers.attr("role","tab").bind("keydown.accordion",function(e){return t._keydown(e)}).next().attr("role","tabpanel"),t.headers.not(t.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide(),t.active.length?t.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):t.headers.eq(0).attr("tabIndex",0),e.browser.safari||t.headers.find("a").attr("tabIndex",-1),n.event&&t.headers.bind(n.event.split(" ").join(".accordion ")+".accordion",function(e){t._clickHandler.call(t,e,this),e.preventDefault()})},_createIcons:function(){var t=this.options;t.icons&&(e("<span></span>").addClass("ui-icon "+t.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(t.icons.header).toggleClass(t.icons.headerSelected),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-icon").remove(),this.element.removeClass("ui-accordion-icons")},destroy:function(){var t=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"),this.headers.find("a").removeAttr("tabIndex"),this._destroyIcons();var n=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");return(t.autoHeight||t.fillHeight)&&n.css("height",""),e.Widget.prototype.destroy.call(this)},_setOption:function(t,n){e.Widget.prototype._setOption.apply(this,arguments),"active"==t&&this.activate(n),"icons"==t&&(this._destroyIcons(),n&&this._createIcons()),"disabled"==t&&this.headers.add(this.headers.next())[n?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(t){if(!(this.options.disabled||t.altKey||t.ctrlKey)){var n=e.ui.keyCode,i=this.headers.length,r=this.headers.index(t.target),o=!1;switch(t.keyCode){case n.RIGHT:case n.DOWN:o=this.headers[(r+1)%i];break;case n.LEFT:case n.UP:o=this.headers[(r-1+i)%i];break;case n.SPACE:case n.ENTER:this._clickHandler({target:t.target},t.target),t.preventDefault()}return o?(e(t.target).attr("tabIndex",-1),e(o).attr("tabIndex",0),o.focus(),!1):!0}},resize:function(){var t,n=this.options;if(n.fillSpace){if(e.browser.msie){var i=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}t=this.element.parent().height(),e.browser.msie&&this.element.parent().css("overflow",i),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")}else n.autoHeight&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).height("").height())}).height(t));return this},activate:function(e){this.options.active=e;var t=this._findActive(e)[0];return this._clickHandler({target:t},t),this},_findActive:function(t){return t?"number"==typeof t?this.headers.filter(":eq("+t+")"):this.headers.not(this.headers.not(t)):t===!1?e([]):this.headers.filter(":eq(0)")},_clickHandler:function(t,n){var i=this.options;if(!i.disabled){if(!t.target){if(!i.collapsible)return;this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(i.icons.headerSelected).addClass(i.icons.header),this.active.next().addClass("ui-accordion-content-active");var r=this.active.next(),o={options:i,newHeader:e([]),oldHeader:i.active,newContent:e([]),oldContent:r},a=this.active=e([]);return void this._toggle(a,r,o)}var s=e(t.currentTarget||n),l=s[0]===this.active[0];if(i.active=i.collapsible&&l?!1:this.headers.index(s),!(this.running||!i.collapsible&&l)){var u=this.active,a=s.next(),r=this.active.next(),o={options:i,newHeader:l&&i.collapsible?e([]):s,oldHeader:this.active,newContent:l&&i.collapsible?e([]):a,oldContent:r},c=this.headers.index(this.active[0])>this.headers.index(s[0]);this.active=l?e([]):s,this._toggle(a,r,o,l,c),u.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(i.icons.headerSelected).addClass(i.icons.header),l||(s.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(i.icons.header).addClass(i.icons.headerSelected),s.next().addClass("ui-accordion-content-active"))}}},_toggle:function(t,n,i,r,o){var a=this,s=a.options;a.toShow=t,a.toHide=n,a.data=i;var l=function(){return a?a._completed.apply(a,arguments):void 0};if(a._trigger("changestart",null,a.data),a.running=0===n.size()?t.size():n.size(),s.animated){var u={};u=s.collapsible&&r?{toShow:e([]),toHide:n,complete:l,down:o,autoHeight:s.autoHeight||s.fillSpace}:{toShow:t,toHide:n,complete:l,down:o,autoHeight:s.autoHeight||s.fillSpace},s.proxied||(s.proxied=s.animated),s.proxiedDuration||(s.proxiedDuration=s.duration),s.animated=e.isFunction(s.proxied)?s.proxied(u):s.proxied,s.duration=e.isFunction(s.proxiedDuration)?s.proxiedDuration(u):s.proxiedDuration;var c=e.ui.accordion.animations,d=s.duration,p=s.animated;!p||c[p]||e.easing[p]||(p="slide"),c[p]||(c[p]=function(e){this.slide(e,{easing:p,duration:d||700})}),c[p](u)}else s.collapsible&&r?t.toggle():(n.hide(),t.show()),l(!0);n.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur(),t.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(e){this.running=e?0:--this.running,this.running||(this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""}),this.toHide.removeClass("ui-accordion-content-active"),this.toHide.length&&(this.toHide.parent()[0].className=this.toHide.parent()[0].className),this._trigger("change",null,this.data))}}),e.extend(e.ui.accordion,{version:"1.8.24",animations:{slide:function(t,n){if(t=e.extend({easing:"swing",duration:300},t,n),!t.toHide.size())return void t.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},t);if(!t.toShow.size())return void t.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},t);var i,r=t.toShow.css("overflow"),o=0,a={},s={},l=["height","paddingTop","paddingBottom"],u=t.toShow;i=u[0].style.width,u.width(u.parent().width()-parseFloat(u.css("paddingLeft"))-parseFloat(u.css("paddingRight"))-(parseFloat(u.css("borderLeftWidth"))||0)-(parseFloat(u.css("borderRightWidth"))||0)),e.each(l,function(n,i){s[i]="hide";var r=(""+e.css(t.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);a[i]={value:r[1],unit:r[2]||"px"}}),t.toShow.css({height:0,overflow:"hidden"}).show(),t.toHide.filter(":hidden").each(t.complete).end().filter(":visible").animate(s,{step:function(e,n){"height"==n.prop&&(o=n.end-n.start===0?0:(n.now-n.start)/(n.end-n.start)),t.toShow[0].style[n.prop]=o*a[n.prop].value+a[n.prop].unit},duration:t.duration,easing:t.easing,complete:function(){t.autoHeight||t.toShow.css("height",""),t.toShow.css({width:i,overflow:r}),t.complete()}})},bounceslide:function(e){this.slide(e,{easing:e.down?"easeOutBounce":"swing",duration:e.down?1e3:200})}}})}(jQuery),function(e,t){var n=0;e.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var t,n=this,i=this.element[0].ownerDocument;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(i){if(!n.options.disabled&&!n.element.propAttr("readOnly")){t=!1;var r=e.ui.keyCode;switch(i.keyCode){case r.PAGE_UP:n._move("previousPage",i);break;case r.PAGE_DOWN:n._move("nextPage",i);break;case r.UP:n._keyEvent("previous",i);break;case r.DOWN:n._keyEvent("next",i);break;case r.ENTER:case r.NUMPAD_ENTER:n.menu.active&&(t=!0,i.preventDefault());case r.TAB:if(!n.menu.active)return;n.menu.select(i);break;case r.ESCAPE:n.element.val(n.term),n.close(i);break;default:clearTimeout(n.searching),n.searching=setTimeout(function(){n.term!=n.element.val()&&(n.selectedItem=null,n.search(null,i))},n.options.delay)}}}).bind("keypress.autocomplete",function(e){t&&(t=!1,e.preventDefault())}).bind("focus.autocomplete",function(){n.options.disabled||(n.selectedItem=null,n.previous=n.element.val())}).bind("blur.autocomplete",function(e){n.options.disabled||(clearTimeout(n.searching),n.closing=setTimeout(function(){n.close(e),n._change(e)},150))}),this._initSource(),this.menu=e("<ul></ul>").addClass("ui-autocomplete").appendTo(e(this.options.appendTo||"body",i)[0]).mousedown(function(t){var i=n.menu.element[0];e(t.target).closest(".ui-menu-item").length||setTimeout(function(){e(document).one("mousedown",function(t){t.target===n.element[0]||t.target===i||e.ui.contains(i,t.target)||n.close()})},1),setTimeout(function(){clearTimeout(n.closing)},13)}).menu({focus:function(e,t){var i=t.item.data("item.autocomplete");!1!==n._trigger("focus",e,{item:i})&&/^key/.test(e.originalEvent.type)&&n.element.val(i.value)},selected:function(e,t){var r=t.item.data("item.autocomplete"),o=n.previous;n.element[0]!==i.activeElement&&(n.element.focus(),n.previous=o,setTimeout(function(){n.previous=o,n.selectedItem=r},1)),!1!==n._trigger("select",e,{item:r})&&n.element.val(r.value),n.term=n.element.val(),n.close(e),n.selectedItem=r},blur:function(e,t){n.menu.element.is(":visible")&&n.element.val()!==n.term&&n.element.val(n.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),e.fn.bgiframe&&this.menu.element.bgiframe(),n.beforeunloadHandler=function(){n.element.removeAttr("autocomplete")},e(window).bind("beforeunload",n.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),e(window).unbind("beforeunload",this.beforeunloadHandler),e.Widget.prototype.destroy.call(this)},_setOption:function(t,n){e.Widget.prototype._setOption.apply(this,arguments),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(e(n||"body",this.element[0].ownerDocument)[0]),"disabled"===t&&n&&this.xhr&&this.xhr.abort()},_initSource:function(){var t,n,i=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(n,i){i(e.ui.autocomplete.filter(t,n.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(t,r){i.xhr&&i.xhr.abort(),i.xhr=e.ajax({url:n,data:t,dataType:"json",success:function(e,t){r(e)},error:function(){r([])}})}):this.source=this.options.source},search:function(e,t){return e=null!=e?e:this.element.val(),this.term=this.element.val(),e.length<this.options.minLength?this.close(t):(clearTimeout(this.closing),this._trigger("search",t)!==!1?this._search(e):void 0)},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:e},this._response())},_response:function(){var e=this,t=++n;return function(i){t===n&&e.__response(i),e.pending--,e.pending||e.element.removeClass("ui-autocomplete-loading")}},__response:function(e){!this.options.disabled&&e&&e.length?(e=this._normalize(e),this._suggest(e),this._trigger("open")):this.close()},close:function(e){clearTimeout(this.closing),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",e))},_change:function(e){this.previous!==this.element.val()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var n=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(n,t),this.menu.deactivate(),this.menu.refresh(),n.show(),this._resizeMenu(),n.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(new e.Event("mouseover"))},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,n){var i=this;e.each(n,function(e,n){i._renderItem(t,n)})},_renderItem:function(t,n){return e("<li></li>").data("item.autocomplete",n).append(e("<a></a>").text(n.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.first()&&/^previous/.test(e)||this.menu.last()&&/^next/.test(e)?(this.element.val(this.term),void this.menu.deactivate()):void this.menu[e](t):void this.search(null,t)},widget:function(){return this.menu.element},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(t,n){var i=new RegExp(e.ui.autocomplete.escapeRegex(n),"i");return e.grep(t,function(e){return i.test(e.label||e.value||e)})}})}(jQuery),function(e){e.widget("ui.menu",{_create:function(){var t=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(n){e(n.target).closest(".ui-menu-item a").length&&(n.preventDefault(),t.select(n))}),this.refresh()},refresh:function(){var t=this,n=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");n.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(n){t.activate(n,e(this).parent())}).mouseleave(function(){
|
|
3237
|
|
-t.deactivate()})},activate:function(e,t){if(this.deactivate(),this.hasScroll()){var n=t.offset().top-this.element.offset().top,i=this.element.scrollTop(),r=this.element.height();0>n?this.element.scrollTop(i+n):n>=r&&this.element.scrollTop(i+n-r+t.height())}this.active=t.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",e,{item:t})},deactivate:function(){this.active&&(this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null)},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,t,n){if(!this.active)return void this.activate(n,this.element.children(t));var i=this.active[e+"All"](".ui-menu-item").eq(0);i.length?this.activate(n,i):this.activate(n,this.element.children(t))},nextPage:function(t){if(this.hasScroll()){if(!this.active||this.last())return void this.activate(t,this.element.children(".ui-menu-item:first"));var n=this.active.offset().top,i=this.element.height(),r=this.element.children(".ui-menu-item").filter(function(){var t=e(this).offset().top-n-i+e(this).height();return 10>t&&t>-10});r.length||(r=this.element.children(".ui-menu-item:last")),this.activate(t,r)}else this.activate(t,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(t){if(this.hasScroll()){if(!this.active||this.first())return void this.activate(t,this.element.children(".ui-menu-item:last"));var n=this.active.offset().top,i=this.element.height(),r=this.element.children(".ui-menu-item").filter(function(){var t=e(this).offset().top-n+i-e(this).height();return 10>t&&t>-10});r.length||(r=this.element.children(".ui-menu-item:first")),this.activate(t,r)}else this.activate(t,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[e.fn.prop?"prop":"attr"]("scrollHeight")},select:function(e){this._trigger("selected",e,{item:this.active})}})}(jQuery),function(e,t){var n,i,r,o,a="ui-button ui-widget ui-state-default ui-corner-all",s="ui-state-hover ui-state-active ",l="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",u=function(){var t=e(this).find(":ui-button");setTimeout(function(){t.button("refresh")},1)},c=function(t){var n=t.name,i=t.form,r=e([]);return n&&(r=i?e(i).find("[name='"+n+"']"):e("[name='"+n+"']",t.ownerDocument).filter(function(){return!this.form})),r};e.widget("ui.button",{options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",u),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.propAttr("disabled"):this.element.propAttr("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,s=this.options,l="checkbox"===this.type||"radio"===this.type,d="ui-state-hover"+(l?"":" ui-state-active"),p="ui-state-focus";null===s.label&&(s.label=this.buttonElement.html()),this.buttonElement.addClass(a).attr("role","button").bind("mouseenter.button",function(){s.disabled||(e(this).addClass("ui-state-hover"),this===n&&e(this).addClass("ui-state-active"))}).bind("mouseleave.button",function(){s.disabled||e(this).removeClass(d)}).bind("click.button",function(e){s.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this.element.bind("focus.button",function(){t.buttonElement.addClass(p)}).bind("blur.button",function(){t.buttonElement.removeClass(p)}),l&&(this.element.bind("change.button",function(){o||t.refresh()}),this.buttonElement.bind("mousedown.button",function(e){s.disabled||(o=!1,i=e.pageX,r=e.pageY)}).bind("mouseup.button",function(e){s.disabled||(i!==e.pageX||r!==e.pageY)&&(o=!0)})),"checkbox"===this.type?this.buttonElement.bind("click.button",function(){return s.disabled||o?!1:(e(this).toggleClass("ui-state-active"),void t.buttonElement.attr("aria-pressed",t.element[0].checked))}):"radio"===this.type?this.buttonElement.bind("click.button",function(){if(s.disabled||o)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var n=t.element[0];c(n).not(n).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown.button",function(){return s.disabled?!1:(e(this).addClass("ui-state-active"),n=this,void e(document).one("mouseup",function(){n=null}))}).bind("mouseup.button",function(){return s.disabled?!1:void e(this).removeClass("ui-state-active")}).bind("keydown.button",function(t){return s.disabled?!1:void((t.keyCode==e.ui.keyCode.SPACE||t.keyCode==e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"))}).bind("keyup.button",function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",s.disabled),this._resetButton()},_determineButtonType:function(){if(this.element.is(":checkbox")?this.type="checkbox":this.element.is(":radio")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type){var e=this.element.parents().filter(":last"),t="label[for='"+this.element.attr("id")+"']";this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible");var n=this.element.is(":checked");n&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.attr("aria-pressed",n)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(a+" "+s+" "+l).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title"),e.Widget.prototype.destroy.call(this)},_setOption:function(t,n){return e.Widget.prototype._setOption.apply(this,arguments),"disabled"===t?void(n?this.element.propAttr("disabled",!0):this.element.propAttr("disabled",!1)):void this._resetButton()},refresh:function(){var t=this.element.is(":disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?c(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var t=this.buttonElement.removeClass(l),n=e("<span></span>",this.element[0].ownerDocument).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),i=this.options.icons,r=i.primary&&i.secondary,o=[];i.primary||i.secondary?(this.options.text&&o.push("ui-button-text-icon"+(r?"s":i.primary?"-primary":"-secondary")),i.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+i.primary+"'></span>"),i.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+i.secondary+"'></span>"),this.options.text||(o.push(r?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",n))):o.push("ui-button-text-only"),t.addClass(o.join(" "))}}),e.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,n){"disabled"===t&&this.buttons.button("option",t,n),e.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"),e.Widget.prototype.destroy.call(this)}})}(jQuery),function(e,t){var n="ui-dialog ui-widget ui-widget-content ui-corner-all ",i={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},r={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(t){var n=e(this).css(t).offset().top;0>n&&e(this).css("top",t.top-n)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),"string"!=typeof this.originalTitle&&(this.originalTitle=""),this.options.title=this.options.title||this.originalTitle;var t=this,i=t.options,r=i.title||" ",o=e.ui.dialog.getTitleId(t.element),a=(t.uiDialog=e("<div></div>")).appendTo(document.body).hide().addClass(n+i.dialogClass).css({zIndex:i.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){i.closeOnEscape&&!n.isDefaultPrevented()&&n.keyCode&&n.keyCode===e.ui.keyCode.ESCAPE&&(t.close(n),n.preventDefault())}).attr({role:"dialog","aria-labelledby":o}).mousedown(function(e){t.moveToTop(!1,e)}),s=(t.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(a),(t.uiDialogTitlebar=e("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(a)),l=e('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){l.addClass("ui-state-hover")},function(){l.removeClass("ui-state-hover")}).focus(function(){l.addClass("ui-state-focus")}).blur(function(){l.removeClass("ui-state-focus")}).click(function(e){return t.close(e),!1}).appendTo(s);(t.uiDialogTitlebarCloseText=e("<span></span>")).addClass("ui-icon ui-icon-closethick").text(i.closeText).appendTo(l),e("<span></span>").addClass("ui-dialog-title").attr("id",o).html(r).prependTo(s);e.isFunction(i.beforeclose)&&!e.isFunction(i.beforeClose)&&(i.beforeClose=i.beforeclose),s.find("*").add(s).disableSelection(),i.draggable&&e.fn.draggable&&t._makeDraggable(),i.resizable&&e.fn.resizable&&t._makeResizable(),t._createButtons(i.buttons),t._isOpen=!1,e.fn.bgiframe&&a.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var e=this;return e.overlay&&e.overlay.destroy(),e.uiDialog.hide(),e.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),e.uiDialog.remove(),e.originalTitle&&e.element.attr("title",e.originalTitle),e},widget:function(){return this.uiDialog},close:function(t){var n,i,r=this;if(!1!==r._trigger("beforeClose",t))return r.overlay&&r.overlay.destroy(),r.uiDialog.unbind("keypress.ui-dialog"),r._isOpen=!1,r.options.hide?r.uiDialog.hide(r.options.hide,function(){r._trigger("close",t)}):(r.uiDialog.hide(),r._trigger("close",t)),e.ui.dialog.overlay.resize(),r.options.modal&&(n=0,e(".ui-dialog").each(function(){this!==r.uiDialog[0]&&(i=e(this).css("z-index"),isNaN(i)||(n=Math.max(n,i)))}),e.ui.dialog.maxZ=n),r},isOpen:function(){return this._isOpen},moveToTop:function(t,n){var i,r=this,o=r.options;return o.modal&&!t||!o.stack&&!o.modal?r._trigger("focus",n):(o.zIndex>e.ui.dialog.maxZ&&(e.ui.dialog.maxZ=o.zIndex),r.overlay&&(e.ui.dialog.maxZ+=1,r.overlay.$el.css("z-index",e.ui.dialog.overlay.maxZ=e.ui.dialog.maxZ)),i={scrollTop:r.element.scrollTop(),scrollLeft:r.element.scrollLeft()},e.ui.dialog.maxZ+=1,r.uiDialog.css("z-index",e.ui.dialog.maxZ),r.element.attr(i),r._trigger("focus",n),r)},open:function(){if(!this._isOpen){var t=this,n=t.options,i=t.uiDialog;return t.overlay=n.modal?new e.ui.dialog.overlay(t):null,t._size(),t._position(n.position),i.show(n.show),t.moveToTop(!0),n.modal&&i.bind("keydown.ui-dialog",function(t){if(t.keyCode===e.ui.keyCode.TAB){var n=e(":tabbable",this),i=n.filter(":first"),r=n.filter(":last");return t.target!==r[0]||t.shiftKey?t.target===i[0]&&t.shiftKey?(r.focus(1),!1):void 0:(i.focus(1),!1)}}),e(t.element.find(":tabbable").get().concat(i.find(".ui-dialog-buttonpane :tabbable").get().concat(i.get()))).eq(0).focus(),t._isOpen=!0,t._trigger("open"),t}},_createButtons:function(t){var n=this,i=!1,r=e("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),o=e("<div></div>").addClass("ui-dialog-buttonset").appendTo(r);n.uiDialog.find(".ui-dialog-buttonpane").remove(),"object"==typeof t&&null!==t&&e.each(t,function(){return!(i=!0)}),i&&(e.each(t,function(t,i){i=e.isFunction(i)?{click:i,text:t}:i;var r=e('<button type="button"></button>').click(function(){i.click.apply(n.element[0],arguments)}).appendTo(o);e.each(i,function(e,t){"click"!==e&&(e in r?r[e](t):r.attr(e,t))}),e.fn.button&&r.button()}),r.appendTo(n.uiDialog))},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var n,i=this,r=i.options,o=e(document);i.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(o,a){n="auto"===r.height?"auto":e(this).height(),e(this).height(e(this).height()).addClass("ui-dialog-dragging"),i._trigger("dragStart",o,t(a))},drag:function(e,n){i._trigger("drag",e,t(n))},stop:function(a,s){r.position=[s.position.left-o.scrollLeft(),s.position.top-o.scrollTop()],e(this).removeClass("ui-dialog-dragging").height(n),i._trigger("dragStop",a,t(s)),e.ui.dialog.overlay.resize()}})},_makeResizable:function(n){function i(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}n=n===t?this.options.resizable:n;var r=this,o=r.options,a=r.uiDialog.css("position"),s="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";r.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:r.element,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth,minHeight:r._minHeight(),handles:s,start:function(t,n){e(this).addClass("ui-dialog-resizing"),r._trigger("resizeStart",t,i(n))},resize:function(e,t){r._trigger("resize",e,i(t))},stop:function(t,n){e(this).removeClass("ui-dialog-resizing"),o.height=e(this).height(),o.width=e(this).width(),r._trigger("resizeStop",t,i(n)),e.ui.dialog.overlay.resize()}}).css("position",a).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(t){var n,i=[],r=[0,0];t?(("string"==typeof t||"object"==typeof t&&"0"in t)&&(i=t.split?t.split(" "):[t[0],t[1]],1===i.length&&(i[1]=i[0]),e.each(["left","top"],function(e,t){+i[e]===i[e]&&(r[e]=i[e],i[e]=t)}),t={my:i.join(" "),at:i.join(" "),offset:r.join(" ")}),t=e.extend({},e.ui.dialog.prototype.options.position,t)):t=e.ui.dialog.prototype.options.position,n=this.uiDialog.is(":visible"),n||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(e.extend({of:window},t)),n||this.uiDialog.hide()},_setOptions:function(t){var n=this,o={},a=!1;e.each(t,function(e,t){n._setOption(e,t),e in i&&(a=!0),e in r&&(o[e]=t)}),a&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(t,i){var r=this,o=r.uiDialog;switch(t){case"beforeclose":t="beforeClose";break;case"buttons":r._createButtons(i);break;case"closeText":r.uiDialogTitlebarCloseText.text(""+i);break;case"dialogClass":o.removeClass(r.options.dialogClass).addClass(n+i);break;case"disabled":i?o.addClass("ui-dialog-disabled"):o.removeClass("ui-dialog-disabled");break;case"draggable":var a=o.is(":data(draggable)");a&&!i&&o.draggable("destroy"),!a&&i&&r._makeDraggable();break;case"position":r._position(i);break;case"resizable":var s=o.is(":data(resizable)");s&&!i&&o.resizable("destroy"),s&&"string"==typeof i&&o.resizable("option","handles",i),s||i===!1||r._makeResizable(i);break;case"title":e(".ui-dialog-title",r.uiDialogTitlebar).html(""+(i||" "))}e.Widget.prototype._setOption.apply(r,arguments)},_size:function(){var t,n,i=this.options,r=this.uiDialog.is(":visible");if(this.element.show().css({width:"auto",minHeight:0,height:0}),i.minWidth>i.width&&(i.width=i.minWidth),t=this.uiDialog.css({height:"auto",width:i.width}).height(),n=Math.max(0,i.minHeight-t),"auto"===i.height)if(e.support.minHeight)this.element.css({minHeight:n,height:"auto"});else{this.uiDialog.show();var o=this.element.css("height","auto").height();r||this.uiDialog.hide(),this.element.height(Math.max(o,n))}else this.element.height(Math.max(i.height-t,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),e.extend(e.ui.dialog,{version:"1.8.24",uuid:0,maxZ:0,getTitleId:function(e){var t=e.attr("id");return t||(this.uuid+=1,t=this.uuid),"ui-dialog-title-"+t},overlay:function(t){this.$el=e.ui.dialog.overlay.create(t)}}),e.extend(e.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(t){0===this.instances.length&&(setTimeout(function(){e.ui.dialog.overlay.instances.length&&e(document).bind(e.ui.dialog.overlay.events,function(t){return e(t.target).zIndex()<e.ui.dialog.overlay.maxZ?!1:void 0})},1),e(document).bind("keydown.dialog-overlay",function(n){t.options.closeOnEscape&&!n.isDefaultPrevented()&&n.keyCode&&n.keyCode===e.ui.keyCode.ESCAPE&&(t.close(n),n.preventDefault())}),e(window).bind("resize.dialog-overlay",e.ui.dialog.overlay.resize));var n=(this.oldInstances.pop()||e("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});return e.fn.bgiframe&&n.bgiframe(),this.instances.push(n),n},destroy:function(t){var n=e.inArray(t,this.instances);-1!=n&&this.oldInstances.push(this.instances.splice(n,1)[0]),0===this.instances.length&&e([document,window]).unbind(".dialog-overlay"),t.remove();var i=0;e.each(this.instances,function(){i=Math.max(i,this.css("z-index"))}),this.maxZ=i},height:function(){var t,n;return e.browser.msie&&e.browser.version<7?(t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),n=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),n>t?e(window).height()+"px":t+"px"):e(document).height()+"px"},width:function(){var t,n;return e.browser.msie?(t=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),n=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),n>t?e(window).width()+"px":t+"px"):e(document).width()+"px"},resize:function(){var t=e([]);e.each(e.ui.dialog.overlay.instances,function(){t=t.add(this)}),t.css({width:0,height:0}).css({width:e.ui.dialog.overlay.width(),height:e.ui.dialog.overlay.height()})}}),e.extend(e.ui.dialog.overlay.prototype,{destroy:function(){e.ui.dialog.overlay.destroy(this.$el)}})}(jQuery),function(e,t){var n=5;e.widget("ui.slider",e.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var t=this,i=this.options,r=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",a=i.values&&i.values.length||1,s=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"+(i.disabled?" ui-slider-disabled ui-disabled":"")),this.range=e([]),i.range&&(i.range===!0&&(i.values||(i.values=[this._valueMin(),this._valueMin()]),i.values.length&&2!==i.values.length&&(i.values=[i.values[0],i.values[0]])),this.range=e("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===i.range||"max"===i.range?" ui-slider-range-"+i.range:"")));for(var l=r.length;a>l;l+=1)s.push(o);this.handles=r.add(e(s.join("")).appendTo(t.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).hover(function(){i.disabled||e(this).addClass("ui-state-hover")},function(){e(this).removeClass("ui-state-hover")}).focus(function(){i.disabled?e(this).blur():(e(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),e(this).addClass("ui-state-focus"))}).blur(function(){e(this).removeClass("ui-state-focus")}),this.handles.each(function(t){e(this).data("index.ui-slider-handle",t)}),this.handles.keydown(function(i){var r,o,a,s,l=e(this).data("index.ui-slider-handle");if(!t.options.disabled){switch(i.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i.preventDefault(),!t._keySliding&&(t._keySliding=!0,e(this).addClass("ui-state-active"),r=t._start(i,l),r===!1))return}switch(s=t.options.step,o=a=t.options.values&&t.options.values.length?t.values(l):t.value(),i.keyCode){case e.ui.keyCode.HOME:a=t._valueMin();break;case e.ui.keyCode.END:a=t._valueMax();break;case e.ui.keyCode.PAGE_UP:a=t._trimAlignValue(o+(t._valueMax()-t._valueMin())/n);break;case e.ui.keyCode.PAGE_DOWN:a=t._trimAlignValue(o-(t._valueMax()-t._valueMin())/n);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(o===t._valueMax())return;a=t._trimAlignValue(o+s);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(o===t._valueMin())return;a=t._trimAlignValue(o-s)}t._slide(i,l,a)}}).keyup(function(n){var i=e(this).data("index.ui-slider-handle");t._keySliding&&(t._keySliding=!1,t._stop(n,i),t._change(n,i),e(this).removeClass("ui-state-active"))}),this._refreshValue(),this._animateOff=!1},destroy:function(){return this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"),this._mouseDestroy(),this},_mouseCapture:function(t){var n,i,r,o,a,s,l,u,c,d=this.options;return d.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(n),r=this._valueMax()-this._valueMin()+1,a=this,this.handles.each(function(t){var n=Math.abs(i-a.values(t));r>n&&(r=n,o=e(this),s=t)}),d.range===!0&&this.values(1)===d.min&&(s+=1,o=e(this.handles[s])),l=this._start(t,s),l===!1?!1:(this._mouseSliding=!0,a._handleIndex=s,o.addClass("ui-state-active").focus(),u=o.offset(),c=!e(t.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=c?{left:0,top:0}:{left:t.pageX-u.left-o.width()/2,top:t.pageY-u.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(t,s,i),this._animateOff=!0,!0))},_mouseStart:function(e){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,i,r,o;return"horizontal"===this.orientation?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),i=n/t,i>1&&(i=1),0>i&&(i=0),"vertical"===this.orientation&&(i=1-i),r=this._valueMax()-this._valueMin(),o=this._valueMin()+i*r,this._trimAlignValue(o)},_start:function(e,t){var n={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("start",e,n)},_slide:function(e,t,n){var i,r,o;this.options.values&&this.options.values.length?(i=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&n>i||1===t&&i>n)&&(n=i),n!==this.values(t)&&(r=this.values(),r[t]=n,o=this._trigger("slide",e,{handle:this.handles[t],value:n,values:r}),i=this.values(t?0:1),o!==!1&&this.values(t,n,!0))):n!==this.value()&&(o=this._trigger("slide",e,{handle:this.handles[t],value:n}),o!==!1&&this.value(n))},_stop:function(e,t){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("stop",e,n)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("change",e,n)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,n){var i,r,o;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(i=this.options.values,r=arguments[0],o=0;o<i.length;o+=1)i[o]=this._trimAlignValue(r[o]),this._change(null,o);this._refreshValue()},_setOption:function(t,n){var i,r=0;switch(e.isArray(this.options.values)&&(r=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments),t){case"disabled":n?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=0;r>i;i+=1)this._change(null,i);this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,n,i;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);for(n=this.options.values.slice(),i=0;i<n.length;i+=1)n[i]=this._trimAlignValue(n[i]);return n},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,i=e-n;return 2*Math.abs(n)>=t&&(i+=n>0?t:-t),parseFloat(i.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,n,i,r,o,a=this.options.range,s=this.options,l=this,u=this._animateOff?!1:s.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(i,r){t=(l.values(i)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=t+"%",e(this).stop(1,1)[u?"animate":"css"](c,s.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===i&&l.range.stop(1,1)[u?"animate":"css"]({left:t+"%"},s.animate),1===i&&l.range[u?"animate":"css"]({width:t-n+"%"},{queue:!1,duration:s.animate})):(0===i&&l.range.stop(1,1)[u?"animate":"css"]({bottom:t+"%"},s.animate),1===i&&l.range[u?"animate":"css"]({height:t-n+"%"},{queue:!1,duration:s.animate}))),n=t}):(i=this.value(),r=this._valueMin(),o=this._valueMax(),t=o!==r?(i-r)/(o-r)*100:0,c["horizontal"===l.orientation?"left":"bottom"]=t+"%",this.handle.stop(1,1)[u?"animate":"css"](c,s.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:t+"%"},s.animate),"max"===a&&"horizontal"===this.orientation&&this.range[u?"animate":"css"]({width:100-t+"%"},{queue:!1,duration:s.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:t+"%"},s.animate),"max"===a&&"vertical"===this.orientation&&this.range[u?"animate":"css"]({height:100-t+"%"},{queue:!1,duration:s.animate}))}}),e.extend(e.ui.slider,{version:"1.8.24"})}(jQuery),function(e,t){function n(){return++r}function i(){return++o}var r=0,o=0;e.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading…</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(!0)},_setOption:function(e,t){if("selected"==e){if(this.options.collapsible&&t==this.options.selected)return;this.select(t)}else this.options[e]=t,this._tabify()},_tabId:function(e){return e.title&&e.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+n()},_sanitizeSelector:function(e){return e.replace(/:/g,"\\:")},_cookie:function(){var t=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+i());return e.cookie.apply(null,[t].concat(e.makeArray(arguments)))},_ui:function(e,t){return{tab:e,panel:t,index:this.anchors.index(e)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var t=e(this);t.html(t.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){function i(t,n){t.css("display",""),!e.support.opacity&&n.opacity&&t[0].style.removeAttribute("filter")}var r=this,o=this.options,a=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=e(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return e("a",this)[0]}),this.panels=e([]),this.anchors.each(function(t,n){var i,s=e(n).attr("href"),l=s.split("#")[0];if(l&&(l===location.toString().split("#")[0]||(i=e("base")[0])&&l===i.href)&&(s=n.hash,n.href=s),a.test(s))r.panels=r.panels.add(r.element.find(r._sanitizeSelector(s)));else if(s&&"#"!==s){e.data(n,"href.tabs",s),e.data(n,"load.tabs",s.replace(/#.*$/,""));var u=r._tabId(n);n.href="#"+u;var c=r.element.find("#"+u);c.length||(c=e(o.panelTemplate).attr("id",u).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(r.panels[t-1]||r.list),c.data("destroy.tabs",!0)),r.panels=r.panels.add(c)}else o.disabled.push(t)}),n?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),
|
|
3238
|
|
-this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),o.selected===t?(location.hash&&this.anchors.each(function(e,t){return t.hash==location.hash?(o.selected=e,!1):void 0}),"number"!=typeof o.selected&&o.cookie&&(o.selected=parseInt(r._cookie(),10)),"number"!=typeof o.selected&&this.lis.filter(".ui-tabs-selected").length&&(o.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),o.selected=o.selected||(this.lis.length?0:-1)):null===o.selected&&(o.selected=-1),o.selected=o.selected>=0&&this.anchors[o.selected]||o.selected<0?o.selected:0,o.disabled=e.unique(o.disabled.concat(e.map(this.lis.filter(".ui-state-disabled"),function(e,t){return r.lis.index(e)}))).sort(),-1!=e.inArray(o.selected,o.disabled)&&o.disabled.splice(e.inArray(o.selected,o.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),o.selected>=0&&this.anchors.length&&(r.element.find(r._sanitizeSelector(r.anchors[o.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(o.selected).addClass("ui-tabs-selected ui-state-active"),r.element.queue("tabs",function(){r._trigger("show",null,r._ui(r.anchors[o.selected],r.element.find(r._sanitizeSelector(r.anchors[o.selected].hash))[0]))}),this.load(o.selected)),e(window).bind("unload",function(){r.lis.add(r.anchors).unbind(".tabs"),r.lis=r.anchors=r.panels=null})):o.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[o.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),o.cookie&&this._cookie(o.selected,o.cookie);for(var s,l=0;s=this.lis[l];l++)e(s)[-1==e.inArray(l,o.disabled)||e(s).hasClass("ui-tabs-selected")?"removeClass":"addClass"]("ui-state-disabled");if(o.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs"),"mouseover"!==o.event){var u=function(e,t){t.is(":not(.ui-state-disabled)")&&t.addClass("ui-state-"+e)},c=function(e,t){t.removeClass("ui-state-"+e)};this.lis.bind("mouseover.tabs",function(){u("hover",e(this))}),this.lis.bind("mouseout.tabs",function(){c("hover",e(this))}),this.anchors.bind("focus.tabs",function(){u("focus",e(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){c("focus",e(this).closest("li"))})}var d,p;o.fx&&(e.isArray(o.fx)?(d=o.fx[0],p=o.fx[1]):d=p=o.fx);var h=p?function(t,n){e(t).closest("li").addClass("ui-tabs-selected ui-state-active"),n.hide().removeClass("ui-tabs-hide").animate(p,p.duration||"normal",function(){i(n,p),r._trigger("show",null,r._ui(t,n[0]))})}:function(t,n){e(t).closest("li").addClass("ui-tabs-selected ui-state-active"),n.removeClass("ui-tabs-hide"),r._trigger("show",null,r._ui(t,n[0]))},f=d?function(e,t){t.animate(d,d.duration||"normal",function(){r.lis.removeClass("ui-tabs-selected ui-state-active"),t.addClass("ui-tabs-hide"),i(t,d),r.element.dequeue("tabs")})}:function(e,t,n){r.lis.removeClass("ui-tabs-selected ui-state-active"),t.addClass("ui-tabs-hide"),r.element.dequeue("tabs")};this.anchors.bind(o.event+".tabs",function(){var t=this,n=e(t).closest("li"),i=r.panels.filter(":not(.ui-tabs-hide)"),a=r.element.find(r._sanitizeSelector(t.hash));if(n.hasClass("ui-tabs-selected")&&!o.collapsible||n.hasClass("ui-state-disabled")||n.hasClass("ui-state-processing")||r.panels.filter(":animated").length||r._trigger("select",null,r._ui(this,a[0]))===!1)return this.blur(),!1;if(o.selected=r.anchors.index(this),r.abort(),o.collapsible){if(n.hasClass("ui-tabs-selected"))return o.selected=-1,o.cookie&&r._cookie(o.selected,o.cookie),r.element.queue("tabs",function(){f(t,i)}).dequeue("tabs"),this.blur(),!1;if(!i.length)return o.cookie&&r._cookie(o.selected,o.cookie),r.element.queue("tabs",function(){h(t,a)}),r.load(r.anchors.index(this)),this.blur(),!1}if(o.cookie&&r._cookie(o.selected,o.cookie),!a.length)throw"jQuery UI Tabs: Mismatching fragment identifier.";i.length&&r.element.queue("tabs",function(){f(t,i)}),r.element.queue("tabs",function(){h(t,a)}),r.load(r.anchors.index(this)),e.browser.msie&&this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},destroy:function(){var t=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var t=e.data(this,"href.tabs");t&&(this.href=t);var n=e(this).unbind(".tabs");e.each(["href","load","cache"],function(e,t){n.removeData(t+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){e.data(this,"destroy.tabs")?e(this).remove():e(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),t.cookie&&this._cookie(null,t.cookie),this},add:function(n,i,r){r===t&&(r=this.anchors.length);var o=this,a=this.options,s=e(a.tabTemplate.replace(/#\{href\}/g,n).replace(/#\{label\}/g,i)),l=n.indexOf("#")?this._tabId(e("a",s)[0]):n.replace("#","");s.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var u=o.element.find("#"+l);return u.length||(u=e(a.panelTemplate).attr("id",l).data("destroy.tabs",!0)),u.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),r>=this.lis.length?(s.appendTo(this.list),u.appendTo(this.list[0].parentNode)):(s.insertBefore(this.lis[r]),u.insertBefore(this.panels[r])),a.disabled=e.map(a.disabled,function(e,t){return e>=r?++e:e}),this._tabify(),1==this.anchors.length&&(a.selected=0,s.addClass("ui-tabs-selected ui-state-active"),u.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){o._trigger("show",null,o._ui(o.anchors[0],o.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[r],this.panels[r])),this},remove:function(t){t=this._getIndex(t);var n=this.options,i=this.lis.eq(t).remove(),r=this.panels.eq(t).remove();return i.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(t+(t+1<this.anchors.length?1:-1)),n.disabled=e.map(e.grep(n.disabled,function(e,n){return e!=t}),function(e,n){return e>=t?--e:e}),this._tabify(),this._trigger("remove",null,this._ui(i.find("a")[0],r[0])),this},enable:function(t){t=this._getIndex(t);var n=this.options;if(-1!=e.inArray(t,n.disabled))return this.lis.eq(t).removeClass("ui-state-disabled"),n.disabled=e.grep(n.disabled,function(e,n){return e!=t}),this._trigger("enable",null,this._ui(this.anchors[t],this.panels[t])),this},disable:function(e){e=this._getIndex(e);var t=this.options;return e!=t.selected&&(this.lis.eq(e).addClass("ui-state-disabled"),t.disabled.push(e),t.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[e],this.panels[e]))),this},select:function(e){if(e=this._getIndex(e),-1==e){if(!this.options.collapsible||-1==this.options.selected)return this;e=this.options.selected}return this.anchors.eq(e).trigger(this.options.event+".tabs"),this},load:function(t){t=this._getIndex(t);var n=this,i=this.options,r=this.anchors.eq(t)[0],o=e.data(r,"load.tabs");if(this.abort(),!o||0!==this.element.queue("tabs").length&&e.data(r,"cache.tabs"))return void this.element.dequeue("tabs");if(this.lis.eq(t).addClass("ui-state-processing"),i.spinner){var a=e("span",r);a.data("label.tabs",a.html()).html(i.spinner)}return this.xhr=e.ajax(e.extend({},i.ajaxOptions,{url:o,success:function(o,a){n.element.find(n._sanitizeSelector(r.hash)).html(o),n._cleanup(),i.cache&&e.data(r,"cache.tabs",!0),n._trigger("load",null,n._ui(n.anchors[t],n.panels[t]));try{i.ajaxOptions.success(o,a)}catch(s){}},error:function(e,o,a){n._cleanup(),n._trigger("load",null,n._ui(n.anchors[t],n.panels[t]));try{i.ajaxOptions.error(e,o,t,r)}catch(a){}}})),n.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&&(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(e,t){return this.anchors.eq(e).removeData("cache.tabs").data("load.tabs",t),this},length:function(){return this.anchors.length}}),e.extend(e.ui.tabs,{version:"1.8.24"}),e.extend(e.ui.tabs.prototype,{rotation:null,rotate:function(e,t){var n=this,i=this.options,r=n._rotate||(n._rotate=function(t){clearTimeout(n.rotation),n.rotation=setTimeout(function(){var e=i.selected;n.select(++e<n.anchors.length?e:0)},e),t&&t.stopPropagation()}),o=n._unrotate||(n._unrotate=t?function(e){r()}:function(e){e.clientX&&n.rotate(null)});return e?(this.element.bind("tabsshow",r),this.anchors.bind(i.event+".tabs",o),r()):(clearTimeout(n.rotation),this.element.unbind("tabsshow",r),this.anchors.unbind(i.event+".tabs",o),delete this._rotate,delete this._unrotate),this}})}(jQuery),function($,undefined){function Datepicker(){this.debug=!1,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},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.bind("mouseout",function(e){var n=$(e.target).closest(t);n.length&&n.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(n){var i=$(n.target).closest(t);!$.datepicker._isDisabledDatepicker(instActive.inline?e.parent()[0]:instActive.input[0])&&i.length&&(i.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),i.addClass("ui-state-hover"),i.hasClass("ui-datepicker-prev")&&i.addClass("ui-datepicker-prev-hover"),i.hasClass("ui-datepicker-next")&&i.addClass("ui-datepicker-next-hover"))})}function extendRemove(e,t){$.extend(e,t);for(var n in t)(null==t[n]||t[n]==undefined)&&(e[n]=t[n]);return e}function isArray(e){return e&&($.browser.safari&&"object"==typeof e&&e.length||e.constructor&&e.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.24"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline="div"==nodeName||"span"==nodeName;target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),"input"==nodeName?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(e,t){var n=e[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(e,t){var n=$(e);t.append=$([]),t.trigger=$([]),n.hasClass(this.markerClassName)||(this._attachments(n,t),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,n,i){t.settings[n]=i}).bind("getData.datepicker",function(e,n){return this._get(t,n)}),this._autoSize(t),$.data(e,PROP_NAME,t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var n=this._get(t,"appendText"),i=this._get(t,"isRTL");t.append&&t.append.remove(),n&&(t.append=$('<span class="'+this._appendClass+'">'+n+"</span>"),e[i?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove();var r=this._get(t,"showOn");if(("focus"==r||"both"==r)&&e.focus(this._showDatepicker),"button"==r||"both"==r){var o=this._get(t,"buttonText"),a=this._get(t,"buttonImage");t.trigger=$(this._get(t,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:a,alt:o,title:o}):$('<button type="button"></button>').addClass(this._triggerClass).html(""==a?o:$("<img/>").attr({src:a,alt:o,title:o}))),e[i?"before":"after"](t.trigger),t.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==e[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=e[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(e[0])):$.datepicker._showDatepicker(e[0]),!1})}},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t=new Date(2009,11,20),n=this._get(e,"dateFormat");if(n.match(/[DM]/)){var i=function(e){for(var t=0,n=0,i=0;i<e.length;i++)e[i].length>t&&(t=e[i].length,n=i);return n};t.setMonth(i(this._get(e,n.match(/MM/)?"monthNames":"monthNamesShort"))),t.setDate(i(this._get(e,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-t.getDay())}e.input.attr("size",this._formatDate(e,t).length)}},_inlineDatepicker:function(e,t){var n=$(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(t.dpDiv).bind("setData.datepicker",function(e,n,i){t.settings[n]=i}).bind("getData.datepicker",function(e,n){return this._get(t,n)}),$.data(e,PROP_NAME,t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,n,i,r){var o=this._dialogInst;if(!o){this.uuid+=1;var a="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+a+'" style="position: absolute; top: -100px; width: 0px;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),o=this._dialogInst=this._newInst(this._dialogInput,!1),o.settings={},$.data(this._dialogInput[0],PROP_NAME,o)}if(extendRemove(o.settings,i||{}),t=t&&t.constructor==Date?this._formatDate(o,t):t,this._dialogInput.val(t),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,!this._pos){var s=document.documentElement.clientWidth,l=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[s/2-100+u,l/2-150+c]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),o.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,o),this},_destroyDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var i=e.nodeName.toLowerCase();$.removeData(e,PROP_NAME),"input"==i?(n.append.remove(),n.trigger.remove(),t.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"==i||"span"==i)&&t.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var i=e.nodeName.toLowerCase();if("input"==i)e.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if("div"==i||"span"==i){var r=t.children("."+this._inlineClass);r.children().removeClass("ui-state-disabled"),r.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t})}},_disableDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var i=e.nodeName.toLowerCase();if("input"==i)e.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if("div"==i||"span"==i){var r=t.children("."+this._inlineClass);r.children().addClass("ui-state-disabled"),r.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t}),this._disabledInputs[this._disabledInputs.length]=e}},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]==e)return!0;return!1},_getInst:function(e){try{return $.data(e,PROP_NAME)}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,n){var i=this._getInst(e);if(2==arguments.length&&"string"==typeof t)return"defaults"==t?$.extend({},$.datepicker._defaults):i?"all"==t?$.extend({},i.settings):this._get(i,t):null;var r=t||{};if("string"==typeof t&&(r={},r[t]=n),i){this._curInst==i&&this._hideDatepicker();var o=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(i,"min"),s=this._getMinMaxDate(i,"max");extendRemove(i.settings,r),null!==a&&r.dateFormat!==undefined&&r.minDate===undefined&&(i.settings.minDate=this._formatDate(i,a)),null!==s&&r.dateFormat!==undefined&&r.maxDate===undefined&&(i.settings.maxDate=this._formatDate(i,s)),this._attachments($(e),i),this._autoSize(i),this._setDate(i,o),this._updateAlternate(i),this._updateDatepicker(i)}},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var n=this._getInst(e);n&&(this._setDate(n,t),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(e,t){var n=this._getInst(e);return n&&!n.inline&&this._setDateFromField(n,t),n?this._getDate(n):null},_doKeyDown:function(e){var t=$.datepicker._getInst(e.target),n=!0,i=t.dpDiv.is(".ui-datepicker-rtl");if(t._keyEvent=!0,$.datepicker._datepickerShowing)switch(e.keyCode){case 9:$.datepicker._hideDatepicker(),n=!1;break;case 13:var r=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",t.dpDiv);r[0]&&$.datepicker._selectDay(e.target,t.selectedMonth,t.selectedYear,r[0]);var o=$.datepicker._get(t,"onSelect");if(o){var a=$.datepicker._formatDate(t);o.apply(t.input?t.input[0]:null,[a,t])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&$.datepicker._clearDate(e.target),n=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&$.datepicker._gotoToday(e.target),n=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,i?1:-1,"D"),n=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,-7,"D"),n=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,i?-1:1,"D"),n=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,7,"D"),n=e.ctrlKey||e.metaKey;break;default:n=!1}else 36==e.keyCode&&e.ctrlKey?$.datepicker._showDatepicker(this):n=!1;n&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t=$.datepicker._getInst(e.target);if($.datepicker._get(t,"constrainInput")){var n=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),i=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||e.metaKey||" ">i||!n||n.indexOf(i)>-1}},_doKeyUp:function(e){var t=$.datepicker._getInst(e.target);if(t.input.val()!=t.lastVal)try{var n=$.datepicker.parseDate($.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,$.datepicker._getFormatConfig(t));n&&($.datepicker._setDateFromField(t),$.datepicker._updateAlternate(t),$.datepicker._updateDatepicker(t))}catch(i){$.datepicker.log(i)}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!=e.nodeName.toLowerCase()&&(e=$("input",e.parentNode)[0]),!$.datepicker._isDisabledDatepicker(e)&&$.datepicker._lastInput!=e){var t=$.datepicker._getInst(e);$.datepicker._curInst&&$.datepicker._curInst!=t&&($.datepicker._curInst.dpDiv.stop(!0,!0),t&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var n=$.datepicker._get(t,"beforeShow"),i=n?n.apply(e,[e,t]):{};if(i!==!1){extendRemove(t.settings,i),t.lastVal=null,$.datepicker._lastInput=e,$.datepicker._setDateFromField(t),$.datepicker._inDialog&&(e.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(e),$.datepicker._pos[1]+=e.offsetHeight);var r=!1;$(e).parents().each(function(){return r|="fixed"==$(this).css("position"),!r}),r&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var o={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};if($.datepicker._pos=null,t.dpDiv.empty(),t.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(t),o=$.datepicker._checkOffset(t,o,r),t.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),!t.inline){var a=$.datepicker._get(t,"showAnim"),s=$.datepicker._get(t,"duration"),l=function(){var e=t.dpDiv.find("iframe.ui-datepicker-cover");if(e.length){var n=$.datepicker._getBorders(t.dpDiv);e.css({left:-n[0],top:-n[1],width:t.dpDiv.outerWidth(),height:t.dpDiv.outerHeight()})}};t.dpDiv.zIndex($(e).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[a]?t.dpDiv.show(a,$.datepicker._get(t,"showOptions"),s,l):t.dpDiv[a||"show"](a?s:null,l),a&&s||l(),t.input.is(":visible")&&!t.input.is(":disabled")&&t.input.focus(),$.datepicker._curInst=t}}}},_updateDatepicker:function(e){var t=this;t.maxRows=4;var n=$.datepicker._getBorders(e.dpDiv);instActive=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i=e.dpDiv.find("iframe.ui-datepicker-cover");i.length&&i.css({left:-n[0],top:-n[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()}),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var r=this._getNumberOfMonths(e),o=r[1],a=17;if(e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&e.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",a*o+"em"),e.dpDiv[(1!=r[0]||1!=r[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e==$.datepicker._curInst&&$.datepicker._datepickerShowing&&e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!=document.activeElement&&e.input.focus(),e.yearshtml){var s=e.yearshtml;setTimeout(function(){s===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),s=e.yearshtml=null},0)}},_getBorders:function(e){var t=function(e){return{thin:1,medium:2,thick:3}[e]||e};return[parseFloat(t(e.css("border-left-width"))),parseFloat(t(e.css("border-top-width")))]},_checkOffset:function(e,t,n){var i=e.dpDiv.outerWidth(),r=e.dpDiv.outerHeight(),o=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,s=document.documentElement.clientWidth+(n?0:$(document).scrollLeft()),l=document.documentElement.clientHeight+(n?0:$(document).scrollTop());return t.left-=this._get(e,"isRTL")?i-o:0,t.left-=n&&t.left==e.input.offset().left?$(document).scrollLeft():0,t.top-=n&&t.top==e.input.offset().top+a?$(document).scrollTop():0,t.left-=Math.min(t.left,t.left+i>s&&s>i?Math.abs(t.left+i-s):0),t.top-=Math.min(t.top,t.top+r>l&&l>r?Math.abs(r+a):0),t},_findPos:function(e){for(var t=this._getInst(e),n=this._get(t,"isRTL");e&&("hidden"==e.type||1!=e.nodeType||$.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];var i=$(e).offset();return[i.left,i.top]},_hideDatepicker:function(e){var t=this._curInst;if(t&&(!e||t==$.data(e,PROP_NAME))&&this._datepickerShowing){var n=this._get(t,"showAnim"),i=this._get(t,"duration"),r=function(){$.datepicker._tidyDialog(t)};$.effects&&$.effects[n]?t.dpDiv.hide(n,$.datepicker._get(t,"showOptions"),i,r):t.dpDiv["slideDown"==n?"slideUp":"fadeIn"==n?"fadeOut":"hide"](n?i:null,r),n||r(),this._datepickerShowing=!1;var o=this._get(t,"onClose");o&&o.apply(t.input?t.input[0]:null,[t.input?t.input.val():"",t]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if($.datepicker._curInst){var t=$(e.target),n=$.datepicker._getInst(t[0]);(t[0].id!=$.datepicker._mainDivId&&0==t.parents("#"+$.datepicker._mainDivId).length&&!t.hasClass($.datepicker.markerClassName)&&!t.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||t.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=n)&&$.datepicker._hideDatepicker()}},_adjustDate:function(e,t,n){var i=$(e),r=this._getInst(i[0]);this._isDisabledDatepicker(i[0])||(this._adjustInstDate(r,t+("M"==n?this._get(r,"showCurrentAtPos"):0),n),this._updateDatepicker(r))},_gotoToday:function(e){var t=$(e),n=this._getInst(t[0]);if(this._get(n,"gotoCurrent")&&n.currentDay)n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear;else{var i=new Date;n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()}this._notifyChange(n),this._adjustDate(t)},_selectMonthYear:function(e,t,n){var i=$(e),r=this._getInst(i[0]);r["selected"+("M"==n?"Month":"Year")]=r["draw"+("M"==n?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(r),this._adjustDate(i)},_selectDay:function(e,t,n,i){var r=$(e);if(!$(i).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(r[0])){var o=this._getInst(r[0]);o.selectedDay=o.currentDay=$("a",i).html(),o.selectedMonth=o.currentMonth=t,o.selectedYear=o.currentYear=n,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear))}},_clearDate:function(e){var t=$(e);this._getInst(t[0]);this._selectDate(t,"")},_selectDate:function(e,t){var n=$(e),i=this._getInst(n[0]);t=null!=t?t:this._formatDate(i),i.input&&i.input.val(t),this._updateAlternate(i);var r=this._get(i,"onSelect");r?r.apply(i.input?i.input[0]:null,[t,i]):i.input&&i.input.trigger("change"),i.inline?this._updateDatepicker(i):(this._hideDatepicker(),this._lastInput=i.input[0],"object"!=typeof i.input[0]&&i.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var t=this._get(e,"altField");if(t){var n=this._get(e,"altFormat")||this._get(e,"dateFormat"),i=this._getDate(e),r=this.formatDate(n,i,this._getFormatConfig(e));$(t).each(function(){$(this).val(r)})}},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1},parseDate:function(e,t,n){if(null==e||null==t)throw"Invalid arguments";if(t="object"==typeof t?t.toString():t+"",""==t)return null;var i=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff;i="string"!=typeof i?i:(new Date).getFullYear()%100+parseInt(i,10);for(var r=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,o=(n?n.dayNames:null)||this._defaults.dayNames,a=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,s=(n?n.monthNames:null)||this._defaults.monthNames,l=-1,u=-1,c=-1,d=-1,p=!1,h=function(t){var n=y+1<e.length&&e.charAt(y+1)==t;return n&&y++,n},f=function(e){var n=h(e),i="@"==e?14:"!"==e?20:"y"==e&&n?4:"o"==e?3:2,r=new RegExp("^\\d{1,"+i+"}"),o=t.substring(v).match(r);if(!o)throw"Missing number at position "+v;return v+=o[0].length,parseInt(o[0],10)},g=function(e,n,i){var r=$.map(h(e)?i:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)}),o=-1;if($.each(r,function(e,n){var i=n[1];return t.substr(v,i.length).toLowerCase()==i.toLowerCase()?(o=n[0],v+=i.length,!1):void 0}),-1!=o)return o+1;throw"Unknown name at position "+v},m=function(){if(t.charAt(v)!=e.charAt(y))throw"Unexpected literal at position "+v;v++},v=0,y=0;y<e.length;y++)if(p)"'"!=e.charAt(y)||h("'")?m():p=!1;else switch(e.charAt(y)){case"d":c=f("d");break;case"D":g("D",r,o);break;case"o":d=f("o");break;case"m":u=f("m");break;case"M":u=g("M",a,s);break;case"y":l=f("y");break;case"@":var b=new Date(f("@"));l=b.getFullYear(),u=b.getMonth()+1,c=b.getDate();break;case"!":var b=new Date((f("!")-this._ticksTo1970)/1e4);l=b.getFullYear(),u=b.getMonth()+1,c=b.getDate();break;case"'":h("'")?m():p=!0;break;default:m()}if(v<t.length)throw"Extra/unparsed characters found in date: "+t.substring(v);if(-1==l?l=(new Date).getFullYear():100>l&&(l+=(new Date).getFullYear()-(new Date).getFullYear()%100+(i>=l?0:-100)),d>-1)for(u=1,c=d;;){var w=this._getDaysInMonth(l,u-1);if(w>=c)break;u++,c-=w}var b=this._daylightSavingAdjust(new Date(l,u-1,c));if(b.getFullYear()!=l||b.getMonth()+1!=u||b.getDate()!=c)throw"Invalid date";return b},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:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,n){if(!t)return"";var i=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,r=(n?n.dayNames:null)||this._defaults.dayNames,o=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,a=(n?n.monthNames:null)||this._defaults.monthNames,s=function(t){
|
|
3239
|
|
-var n=p+1<e.length&&e.charAt(p+1)==t;return n&&p++,n},l=function(e,t,n){var i=""+t;if(s(e))for(;i.length<n;)i="0"+i;return i},u=function(e,t,n,i){return s(e)?i[t]:n[t]},c="",d=!1;if(t)for(var p=0;p<e.length;p++)if(d)"'"!=e.charAt(p)||s("'")?c+=e.charAt(p):d=!1;else switch(e.charAt(p)){case"d":c+=l("d",t.getDate(),2);break;case"D":c+=u("D",t.getDay(),i,r);break;case"o":c+=l("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":c+=l("m",t.getMonth()+1,2);break;case"M":c+=u("M",t.getMonth(),o,a);break;case"y":c+=s("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":c+=t.getTime();break;case"!":c+=1e4*t.getTime()+this._ticksTo1970;break;case"'":s("'")?c+="'":d=!0;break;default:c+=e.charAt(p)}return c},_possibleChars:function(e){for(var t="",n=!1,i=function(t){var n=r+1<e.length&&e.charAt(r+1)==t;return n&&r++,n},r=0;r<e.length;r++)if(n)"'"!=e.charAt(r)||i("'")?t+=e.charAt(r):n=!1;else switch(e.charAt(r)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":i("'")?t+="'":n=!0;break;default:t+=e.charAt(r)}return t},_get:function(e,t){return e.settings[t]!==undefined?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!=e.lastVal){var n,i,r=this._get(e,"dateFormat"),o=e.lastVal=e.input?e.input.val():null;n=i=this._getDefaultDate(e);var a=this._getFormatConfig(e);try{n=this.parseDate(r,o,a)||i}catch(s){this.log(s),o=t?"":o}e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),e.currentDay=o?n.getDate():0,e.currentMonth=o?n.getMonth():0,e.currentYear=o?n.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(e,t,n){var i=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},r=function(t){try{return $.datepicker.parseDate($.datepicker._get(e,"dateFormat"),t,$.datepicker._getFormatConfig(e))}catch(n){}for(var i=(t.toLowerCase().match(/^c/)?$.datepicker._getDate(e):null)||new Date,r=i.getFullYear(),o=i.getMonth(),a=i.getDate(),s=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=s.exec(t);l;){switch(l[2]||"d"){case"d":case"D":a+=parseInt(l[1],10);break;case"w":case"W":a+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),a=Math.min(a,$.datepicker._getDaysInMonth(r,o));break;case"y":case"Y":r+=parseInt(l[1],10),a=Math.min(a,$.datepicker._getDaysInMonth(r,o))}l=s.exec(t)}return new Date(r,o,a)},o=null==t||""===t?n:"string"==typeof t?r(t):"number"==typeof t?isNaN(t)?n:i(t):new Date(t.getTime());return o=o&&"Invalid Date"==o.toString()?n:o,o&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,n){var i=!t,r=e.selectedMonth,o=e.selectedYear,a=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=a.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=a.getMonth(),e.drawYear=e.selectedYear=e.currentYear=a.getFullYear(),r==e.selectedMonth&&o==e.selectedYear||n||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(i?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""==e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(n,-t,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(n,+t,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(n)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(n,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t=new Date;t=this._daylightSavingAdjust(new Date(t.getFullYear(),t.getMonth(),t.getDate()));var n=this._get(e,"isRTL"),i=this._get(e,"showButtonPanel"),r=this._get(e,"hideIfNoPrevNext"),o=this._get(e,"navigationAsDateFormat"),a=this._getNumberOfMonths(e),s=this._get(e,"showCurrentAtPos"),l=this._get(e,"stepMonths"),u=1!=a[0]||1!=a[1],c=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),d=this._getMinMaxDate(e,"min"),p=this._getMinMaxDate(e,"max"),h=e.drawMonth-s,f=e.drawYear;if(0>h&&(h+=12,f--),p){var g=this._daylightSavingAdjust(new Date(p.getFullYear(),p.getMonth()-a[0]*a[1]+1,p.getDate()));for(g=d&&d>g?d:g;this._daylightSavingAdjust(new Date(f,h,1))>g;)h--,0>h&&(h=11,f--)}e.drawMonth=h,e.drawYear=f;var m=this._get(e,"prevText");m=o?this.formatDate(m,this._daylightSavingAdjust(new Date(f,h-l,1)),this._getFormatConfig(e)):m;var v=this._canAdjustMonth(e,-1,f,h)?'<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>":r?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>",y=this._get(e,"nextText");y=o?this.formatDate(y,this._daylightSavingAdjust(new Date(f,h+l,1)),this._getFormatConfig(e)):y;var b=this._canAdjustMonth(e,1,f,h)?'<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>":r?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>",w=this._get(e,"currentText"),x=this._get(e,"gotoCurrent")&&e.currentDay?c:t;w=o?this.formatDate(w,x,this._getFormatConfig(e)):w;var k=e.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(e,"closeText")+"</button>",C=i?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(n?k:"")+(this._isInRange(e,x)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">'+w+"</button>":"")+(n?"":k)+"</div>":"",S=parseInt(this._get(e,"firstDay"),10);S=isNaN(S)?0:S;for(var _=this._get(e,"showWeek"),T=this._get(e,"dayNames"),E=(this._get(e,"dayNamesShort"),this._get(e,"dayNamesMin")),D=this._get(e,"monthNames"),M=this._get(e,"monthNamesShort"),I=this._get(e,"beforeShowDay"),P=this._get(e,"showOtherMonths"),A=this._get(e,"selectOtherMonths"),j=(this._get(e,"calculateWeek")||this.iso8601Week,this._getDefaultDate(e)),N="",O=0;O<a[0];O++){var L="";this.maxRows=4;for(var R=0;R<a[1];R++){var F=this._daylightSavingAdjust(new Date(f,h,e.selectedDay)),q=" ui-corner-all",H="";if(u){if(H+='<div class="ui-datepicker-group',a[1]>1)switch(R){case 0:H+=" ui-datepicker-group-first",q=" ui-corner-"+(n?"right":"left");break;case a[1]-1:H+=" ui-datepicker-group-last",q=" ui-corner-"+(n?"left":"right");break;default:H+=" ui-datepicker-group-middle",q=""}H+='">'}H+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+q+'">'+(/all|left/.test(q)&&0==O?n?b:v:"")+(/all|right/.test(q)&&0==O?n?v:b:"")+this._generateMonthYearHeader(e,h,f,d,p,O>0||R>0,D,M)+'</div><table class="ui-datepicker-calendar"><thead><tr>';for(var U=_?'<th class="ui-datepicker-week-col">'+this._get(e,"weekHeader")+"</th>":"",B=0;7>B;B++){var z=(B+S)%7;U+="<th"+((B+S+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+T[z]+'">'+E[z]+"</span></th>"}H+=U+"</tr></thead><tbody>";var V=this._getDaysInMonth(f,h);f==e.selectedYear&&h==e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,V));var W=(this._getFirstDayOfMonth(f,h)-S+7)%7,G=Math.ceil((W+V)/7),J=u&&this.maxRows>G?this.maxRows:G;this.maxRows=J;for(var X=this._daylightSavingAdjust(new Date(f,h,1-W)),Y=0;J>Y;Y++){H+="<tr>";for(var K=_?'<td class="ui-datepicker-week-col">'+this._get(e,"calculateWeek")(X)+"</td>":"",B=0;7>B;B++){var Q=I?I.apply(e.input?e.input[0]:null,[X]):[!0,""],Z=X.getMonth()!=h,ee=Z&&!A||!Q[0]||d&&d>X||p&&X>p;K+='<td class="'+((B+S+6)%7>=5?" ui-datepicker-week-end":"")+(Z?" ui-datepicker-other-month":"")+(X.getTime()==F.getTime()&&h==e.selectedMonth&&e._keyEvent||j.getTime()==X.getTime()&&j.getTime()==F.getTime()?" "+this._dayOverClass:"")+(ee?" "+this._unselectableClass+" ui-state-disabled":"")+(Z&&!P?"":" "+Q[1]+(X.getTime()==c.getTime()?" "+this._currentClass:"")+(X.getTime()==t.getTime()?" ui-datepicker-today":""))+'"'+(Z&&!P||!Q[2]?"":' title="'+Q[2]+'"')+(ee?"":' data-handler="selectDay" data-event="click" data-month="'+X.getMonth()+'" data-year="'+X.getFullYear()+'"')+">"+(Z&&!P?" ":ee?'<span class="ui-state-default">'+X.getDate()+"</span>":'<a class="ui-state-default'+(X.getTime()==t.getTime()?" ui-state-highlight":"")+(X.getTime()==c.getTime()?" ui-state-active":"")+(Z?" ui-priority-secondary":"")+'" href="#">'+X.getDate()+"</a>")+"</td>",X.setDate(X.getDate()+1),X=this._daylightSavingAdjust(X)}H+=K+"</tr>"}h++,h>11&&(h=0,f++),H+="</tbody></table>"+(u?"</div>"+(a[0]>0&&R==a[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),L+=H}N+=L}return N+=C+($.browser.msie&&parseInt($.browser.version,10)<7&&!e.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),e._keyEvent=!1,N},_generateMonthYearHeader:function(e,t,n,i,r,o,a,s){var l=this._get(e,"changeMonth"),u=this._get(e,"changeYear"),c=this._get(e,"showMonthAfterYear"),d='<div class="ui-datepicker-title">',p="";if(o||!l)p+='<span class="ui-datepicker-month">'+a[t]+"</span>";else{var h=i&&i.getFullYear()==n,f=r&&r.getFullYear()==n;p+='<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';for(var g=0;12>g;g++)(!h||g>=i.getMonth())&&(!f||g<=r.getMonth())&&(p+='<option value="'+g+'"'+(g==t?' selected="selected"':"")+">"+s[g]+"</option>");p+="</select>"}if(c||(d+=p+(!o&&l&&u?"":" ")),!e.yearshtml)if(e.yearshtml="",o||!u)d+='<span class="ui-datepicker-year">'+n+"</span>";else{var m=this._get(e,"yearRange").split(":"),v=(new Date).getFullYear(),y=function(e){var t=e.match(/c[+-].*/)?n+parseInt(e.substring(1),10):e.match(/[+-].*/)?v+parseInt(e,10):parseInt(e,10);return isNaN(t)?v:t},b=y(m[0]),w=Math.max(b,y(m[1]||""));for(b=i?Math.max(b,i.getFullYear()):b,w=r?Math.min(w,r.getFullYear()):w,e.yearshtml+='<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';w>=b;b++)e.yearshtml+='<option value="'+b+'"'+(b==n?' selected="selected"':"")+">"+b+"</option>";e.yearshtml+="</select>",d+=e.yearshtml,e.yearshtml=null}return d+=this._get(e,"yearSuffix"),c&&(d+=(!o&&l&&u?"":" ")+p),d+="</div>"},_adjustInstDate:function(e,t,n){var i=e.drawYear+("Y"==n?t:0),r=e.drawMonth+("M"==n?t:0),o=Math.min(e.selectedDay,this._getDaysInMonth(i,r))+("D"==n?t:0),a=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,r,o)));e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),("M"==n||"Y"==n)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),i=this._getMinMaxDate(e,"max"),r=n&&n>t?n:t;return r=i&&r>i?i:r},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,n,i){var r=this._getNumberOfMonths(e),o=this._daylightSavingAdjust(new Date(n,i+(0>t?t:r[0]*r[1]),1));return 0>t&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(e,o)},_isInRange:function(e,t){var n=this._getMinMaxDate(e,"min"),i=this._getMinMaxDate(e,"max");return(!n||t.getTime()>=n.getTime())&&(!i||t.getTime()<=i.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var r=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),r,this._getFormatConfig(e))}}),$.fn.datepicker=function(e){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var t=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]?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this].concat(t)):$.datepicker._attachDatepicker(this,e)}):$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.24",window["DP_jQuery_"+dpuuid]=$}(jQuery),function(e,t){e.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),e.Widget.prototype.destroy.apply(this,arguments)},value:function(e){return e===t?this._value():(this._setOption("value",e),this)},_setOption:function(t,n){"value"===t&&(this.options.value=n,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),e.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var e=this.options.value;return"number"!=typeof e&&(e=0),Math.min(this.options.max,Math.max(this.min,e))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var e=this.value(),t=this._percentage();this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),this.valueDiv.toggle(e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(t.toFixed(0)+"%"),this.element.attr("aria-valuenow",e)}}),e.extend(e.ui.progressbar,{version:"1.8.24"})}(jQuery),jQuery.effects||function(e,t){function n(t){var n;return t&&t.constructor==Array&&3==t.length?t:(n=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(t))?[parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10)]:(n=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(t))?[2.55*parseFloat(n[1]),2.55*parseFloat(n[2]),2.55*parseFloat(n[3])]:(n=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(t))?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:(n=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(t))?[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]:(n=/rgba\(0, 0, 0, 0\)/.exec(t))?u.transparent:u[e.trim(t).toLowerCase()]}function i(t,i){var r;do{if(r=(e.curCSS||e.css)(t,i),""!=r&&"transparent"!=r||e.nodeName(t,"body"))break;i="backgroundColor"}while(t=t.parentNode);return n(r)}function r(){var e,t,n=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,i={};if(n&&n.length&&n[0]&&n[n[0]])for(var r=n.length;r--;)e=n[r],"string"==typeof n[e]&&(t=e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()}),i[t]=n[e]);else for(e in n)"string"==typeof n[e]&&(i[e]=n[e]);return i}function o(t){var n,i;for(n in t)i=t[n],(null==i||e.isFunction(i)||n in d||/scrollbar/.test(n)||!/color/i.test(n)&&isNaN(parseFloat(i)))&&delete t[n];return t}function a(e,t){var n,i={_:0};for(n in t)e[n]!=t[n]&&(i[n]=t[n]);return i}function s(t,n,i,r){return"object"==typeof t&&(r=n,i=null,n=t,t=n.effect),e.isFunction(n)&&(r=n,i=null,n={}),("number"==typeof n||e.fx.speeds[n])&&(r=i,i=n,n={}),e.isFunction(i)&&(r=i,i=null),n=n||{},i=i||n.duration,i=e.fx.off?0:"number"==typeof i?i:i in e.fx.speeds?e.fx.speeds[i]:e.fx.speeds._default,r=r||n.complete,[t,n,i,r]}function l(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects[t]?!1:!0}e.effects={},e.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(t,r){e.fx.step[r]=function(e){e.colorInit||(e.start=i(e.elem,r),e.end=n(e.end),e.colorInit=!0),e.elem.style[r]="rgb("+Math.max(Math.min(parseInt(e.pos*(e.end[0]-e.start[0])+e.start[0],10),255),0)+","+Math.max(Math.min(parseInt(e.pos*(e.end[1]-e.start[1])+e.start[1],10),255),0)+","+Math.max(Math.min(parseInt(e.pos*(e.end[2]-e.start[2])+e.start[2],10),255),0)+")"}});var u={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],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],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},c=["add","remove","toggle"],d={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.effects.animateClass=function(t,n,i,s){return e.isFunction(i)&&(s=i,i=null),this.queue(function(){var l,u=e(this),d=u.attr("style")||" ",p=o(r.call(this)),h=u.attr("class")||"";e.each(c,function(e,n){t[n]&&u[n+"Class"](t[n])}),l=o(r.call(this)),u.attr("class",h),u.animate(a(p,l),{queue:!1,duration:n,easing:i,complete:function(){e.each(c,function(e,n){t[n]&&u[n+"Class"](t[n])}),"object"==typeof u.attr("style")?(u.attr("style").cssText="",u.attr("style").cssText=d):u.attr("style",d),s&&s.apply(this,arguments),e.dequeue(this)}})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,n,i,r){return n?e.effects.animateClass.apply(this,[{add:t},n,i,r]):this._addClass(t)},_removeClass:e.fn.removeClass,removeClass:function(t,n,i,r){return n?e.effects.animateClass.apply(this,[{remove:t},n,i,r]):this._removeClass(t)},_toggleClass:e.fn.toggleClass,toggleClass:function(n,i,r,o,a){return"boolean"==typeof i||i===t?r?e.effects.animateClass.apply(this,[i?{add:n}:{remove:n},r,o,a]):this._toggleClass(n,i):e.effects.animateClass.apply(this,[{toggle:n},i,r,o])},switchClass:function(t,n,i,r,o){return e.effects.animateClass.apply(this,[{add:n,remove:t},i,r,o])}}),e.extend(e.effects,{version:"1.8.24",save:function(e,t){for(var n=0;n<t.length;n++)null!==t[n]&&e.data("ec.storage."+t[n],e[0].style[t[n]])},restore:function(e,t){for(var n=0;n<t.length;n++)null!==t[n]&&e.css(t[n],e.data("ec.storage."+t[n]))},setMode:function(e,t){return"toggle"==t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var n,i;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=e[1]/t.width}return{x:i,y:n}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var n={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},i=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r=document.activeElement;try{r.id}catch(o){r=document.body}return t.wrap(i),(t[0]===r||e.contains(t[0],r))&&e(r).focus(),i=t.parent(),"static"==t.css("position")?(i.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,i){n[i]=t.css(i),isNaN(parseInt(n[i],10))&&(n[i]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(n).show()},removeWrapper:function(t){var n,i=document.activeElement;return t.parent().is(".ui-effects-wrapper")?(n=t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus(),n):t},setTransition:function(t,n,i,r){return r=r||{},e.each(n,function(e,n){var o=t.cssUnit(n);o[0]>0&&(r[n]=o[0]*i+o[1])}),r}}),e.fn.extend({effect:function(t,n,i,r){var o=s.apply(this,arguments),a={options:o[1],duration:o[2],callback:o[3]},l=a.options.mode,u=e.effects[t];return e.fx.off||!u?l?this[l](a.duration,a.callback):this.each(function(){a.callback&&a.callback.call(this)}):u.call(this,a)},_show:e.fn.show,show:function(e){if(l(e))return this._show.apply(this,arguments);var t=s.apply(this,arguments);return t[1].mode="show",this.effect.apply(this,t)},_hide:e.fn.hide,hide:function(e){if(l(e))return this._hide.apply(this,arguments);var t=s.apply(this,arguments);return t[1].mode="hide",this.effect.apply(this,t)},__toggle:e.fn.toggle,toggle:function(t){if(l(t)||"boolean"==typeof t||e.isFunction(t))return this.__toggle.apply(this,arguments);var n=s.apply(this,arguments);return n[1].mode="toggle",this.effect.apply(this,n)},cssUnit:function(t){var n=this.css(t),i=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(i=[parseFloat(n),t])}),i}});var p={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){p[t]=function(t){return Math.pow(t,e+2)}}),e.extend(p,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(p,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?n(2*e)/2:n(-2*e+2)/-2+1}})}(jQuery),function(e,t){e.effects.blind=function(t){return this.queue(function(){var n=e(this),i=["position","top","bottom","left","right"],r=e.effects.setMode(n,t.options.mode||"hide"),o=t.options.direction||"vertical";e.effects.save(n,i),n.show();var a=e.effects.createWrapper(n).css({overflow:"hidden"}),s="vertical"==o?"height":"width",l="vertical"==o?a.height():a.width();"show"==r&&a.css(s,0);var u={};u[s]="show"==r?l:0,a.animate(u,t.duration,t.options.easing,function(){"hide"==r&&n.hide(),e.effects.restore(n,i),e.effects.removeWrapper(n),t.callback&&t.callback.apply(n[0],arguments),n.dequeue()})})}}(jQuery),function(e,t){e.effects.bounce=function(t){return this.queue(function(){var n=e(this),i=["position","top","bottom","left","right"],r=e.effects.setMode(n,t.options.mode||"effect"),o=t.options.direction||"up",a=t.options.distance||20,s=t.options.times||5,l=t.duration||250;/show|hide/.test(r)&&i.push("opacity"),e.effects.save(n,i),n.show(),e.effects.createWrapper(n);var u="up"==o||"down"==o?"top":"left",c="up"==o||"left"==o?"pos":"neg",a=t.options.distance||("top"==u?n.outerHeight(!0)/3:n.outerWidth(!0)/3);if("show"==r&&n.css("opacity",0).css(u,"pos"==c?-a:a),"hide"==r&&(a/=2*s),"hide"!=r&&s--,"show"==r){var d={opacity:1};d[u]=("pos"==c?"+=":"-=")+a,n.animate(d,l/2,t.options.easing),a/=2,s--}for(var p=0;s>p;p++){var h={},f={};h[u]=("pos"==c?"-=":"+=")+a,f[u]=("pos"==c?"+=":"-=")+a,n.animate(h,l/2,t.options.easing).animate(f,l/2,t.options.easing),a="hide"==r?2*a:a/2}if("hide"==r){var d={opacity:0};d[u]=("pos"==c?"-=":"+=")+a,n.animate(d,l/2,t.options.easing,function(){n.hide(),e.effects.restore(n,i),e.effects.removeWrapper(n),t.callback&&t.callback.apply(this,arguments)})}else{var h={},f={};h[u]=("pos"==c?"-=":"+=")+a,f[u]=("pos"==c?"+=":"-=")+a,n.animate(h,l/2,t.options.easing).animate(f,l/2,t.options.easing,function(){e.effects.restore(n,i),e.effects.removeWrapper(n),t.callback&&t.callback.apply(this,arguments)})}n.queue("fx",function(){n.dequeue()}),n.dequeue()})}}(jQuery),function(e,t){e.effects.clip=function(t){return this.queue(function(){var n=e(this),i=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(n,t.options.mode||"hide"),o=t.options.direction||"vertical";e.effects.save(n,i),n.show();var a=e.effects.createWrapper(n).css({overflow:"hidden"}),s="IMG"==n[0].tagName?a:n,l={size:"vertical"==o?"height":"width",position:"vertical"==o?"top":"left"},u="vertical"==o?s.height():s.width();"show"==r&&(s.css(l.size,0),s.css(l.position,u/2));var c={};c[l.size]="show"==r?u:0,c[l.position]="show"==r?0:u/2,s.animate(c,{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){"hide"==r&&n.hide(),e.effects.restore(n,i),e.effects.removeWrapper(n),t.callback&&t.callback.apply(n[0],arguments),n.dequeue()}})})}}(jQuery),function(e,t){e.effects.drop=function(t){return this.queue(function(){var n=e(this),i=["position","top","bottom","left","right","opacity"],r=e.effects.setMode(n,t.options.mode||"hide"),o=t.options.direction||"left";e.effects.save(n,i),n.show(),e.effects.createWrapper(n);var a="up"==o||"down"==o?"top":"left",s="up"==o||"left"==o?"pos":"neg",l=t.options.distance||("top"==a?n.outerHeight(!0)/2:n.outerWidth(!0)/2);"show"==r&&n.css("opacity",0).css(a,"pos"==s?-l:l);var u={opacity:"show"==r?1:0};u[a]=("show"==r?"pos"==s?"+=":"-=":"pos"==s?"-=":"+=")+l,n.animate(u,{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){"hide"==r&&n.hide(),e.effects.restore(n,i),e.effects.removeWrapper(n),t.callback&&t.callback.apply(this,arguments),n.dequeue()}})})}}(jQuery),function(e,t){e.effects.explode=function(t){return this.queue(function(){var n=t.options.pieces?Math.round(Math.sqrt(t.options.pieces)):3,i=t.options.pieces?Math.round(Math.sqrt(t.options.pieces)):3;t.options.mode="toggle"==t.options.mode?e(this).is(":visible")?"hide":"show":t.options.mode;var r=e(this).show().css("visibility","hidden"),o=r.offset();o.top-=parseInt(r.css("marginTop"),10)||0,o.left-=parseInt(r.css("marginLeft"),10)||0;for(var a=r.outerWidth(!0),s=r.outerHeight(!0),l=0;n>l;l++)for(var u=0;i>u;u++)r.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-u*(a/i),top:-l*(s/n)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:a/i,height:s/n,left:o.left+u*(a/i)+("show"==t.options.mode?(u-Math.floor(i/2))*(a/i):0),top:o.top+l*(s/n)+("show"==t.options.mode?(l-Math.floor(n/2))*(s/n):0),opacity:"show"==t.options.mode?0:1}).animate({left:o.left+u*(a/i)+("show"==t.options.mode?0:(u-Math.floor(i/2))*(a/i)),top:o.top+l*(s/n)+("show"==t.options.mode?0:(l-Math.floor(n/2))*(s/n)),opacity:"show"==t.options.mode?1:0},t.duration||500);setTimeout(function(){"show"==t.options.mode?r.css({visibility:"visible"}):r.css({visibility:"visible"}).hide(),t.callback&&t.callback.apply(r[0]),r.dequeue(),e("div.ui-effects-explode").remove()},t.duration||500)})}}(jQuery),function(e,t){e.effects.fade=function(t){return this.queue(function(){var n=e(this),i=e.effects.setMode(n,t.options.mode||"hide");n.animate({opacity:i},{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){t.callback&&t.callback.apply(this,arguments),n.dequeue()}})})}}(jQuery),function(e,t){e.effects.fold=function(t){return this.queue(function(){var n=e(this),i=["position","top","bottom","left","right"],r=e.effects.setMode(n,t.options.mode||"hide"),o=t.options.size||15,a=!!t.options.horizFirst,s=t.duration?t.duration/2:e.fx.speeds._default/2;e.effects.save(n,i),n.show();var l=e.effects.createWrapper(n).css({overflow:"hidden"}),u="show"==r!=a,c=u?["width","height"]:["height","width"],d=u?[l.width(),l.height()]:[l.height(),l.width()],p=/([0-9]+)%/.exec(o);p&&(o=parseInt(p[1],10)/100*d["hide"==r?0:1]),"show"==r&&l.css(a?{height:0,width:o}:{height:o,width:0});var h={},f={};h[c[0]]="show"==r?d[0]:o,f[c[1]]="show"==r?d[1]:0,l.animate(h,s,t.options.easing).animate(f,s,t.options.easing,function(){"hide"==r&&n.hide(),e.effects.restore(n,i),e.effects.removeWrapper(n),t.callback&&t.callback.apply(n[0],arguments),n.dequeue()})})}}(jQuery),function(e,t){e.effects.highlight=function(t){return this.queue(function(){var n=e(this),i=["backgroundImage","backgroundColor","opacity"],r=e.effects.setMode(n,t.options.mode||"show"),o={backgroundColor:n.css("backgroundColor")};"hide"==r&&(o.opacity=0),e.effects.save(n,i),n.show().css({backgroundImage:"none",backgroundColor:t.options.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){"hide"==r&&n.hide(),e.effects.restore(n,i),"show"==r&&!e.support.opacity&&this.style.removeAttribute("filter"),t.callback&&t.callback.apply(this,arguments),n.dequeue()}})})}}(jQuery),function(e,t){e.effects.pulsate=function(t){return this.queue(function(){var n=e(this),i=e.effects.setMode(n,t.options.mode||"show"),r=2*(t.options.times||5)-1,o=t.duration?t.duration/2:e.fx.speeds._default/2,a=n.is(":visible"),s=0;a||(n.css("opacity",0).show(),s=1),("hide"==i&&a||"show"==i&&!a)&&r--;for(var l=0;r>l;l++)n.animate({opacity:s},o,t.options.easing),s=(s+1)%2;n.animate({opacity:s},o,t.options.easing,function(){0==s&&n.hide(),t.callback&&t.callback.apply(this,arguments)}),n.queue("fx",function(){n.dequeue()}).dequeue()})}}(jQuery),function(e,t){e.effects.puff=function(t){return this.queue(function(){var n=e(this),i=e.effects.setMode(n,t.options.mode||"hide"),r=parseInt(t.options.percent,10)||150,o=r/100,a={height:n.height(),width:n.width()};e.extend(t.options,{fade:!0,mode:i,percent:"hide"==i?r:100,from:"hide"==i?a:{height:a.height*o,width:a.width*o}}),n.effect("scale",t.options,t.duration,t.callback),n.dequeue()})},e.effects.scale=function(t){return this.queue(function(){var n=e(this),i=e.extend(!0,{},t.options),r=e.effects.setMode(n,t.options.mode||"effect"),o=parseInt(t.options.percent,10)||(0==parseInt(t.options.percent,10)?0:"hide"==r?0:100),a=t.options.direction||"both",s=t.options.origin;"effect"!=r&&(i.origin=s||["middle","center"],i.restore=!0);var l={height:n.height(),width:n.width()};n.from=t.options.from||("show"==r?{height:0,width:0}:l);var u={y:"horizontal"!=a?o/100:1,x:"vertical"!=a?o/100:1};n.to={height:l.height*u.y,width:l.width*u.x},t.options.fade&&("show"==r&&(n.from.opacity=0,n.to.opacity=1),"hide"==r&&(n.from.opacity=1,n.to.opacity=0)),i.from=n.from,i.to=n.to,i.mode=r,n.effect("size",i,t.duration,t.callback),
|
|
3240
|
|
-n.dequeue()})},e.effects.size=function(t){return this.queue(function(){var n=e(this),i=["position","top","bottom","left","right","width","height","overflow","opacity"],r=["position","top","bottom","left","right","overflow","opacity"],o=["width","height","overflow"],a=["fontSize"],s=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],u=e.effects.setMode(n,t.options.mode||"effect"),c=t.options.restore||!1,d=t.options.scale||"both",p=t.options.origin,h={height:n.height(),width:n.width()};if(n.from=t.options.from||h,n.to=t.options.to||h,p){var f=e.effects.getBaseline(p,h);n.from.top=(h.height-n.from.height)*f.y,n.from.left=(h.width-n.from.width)*f.x,n.to.top=(h.height-n.to.height)*f.y,n.to.left=(h.width-n.to.width)*f.x}var g={from:{y:n.from.height/h.height,x:n.from.width/h.width},to:{y:n.to.height/h.height,x:n.to.width/h.width}};("box"==d||"both"==d)&&(g.from.y!=g.to.y&&(i=i.concat(s),n.from=e.effects.setTransition(n,s,g.from.y,n.from),n.to=e.effects.setTransition(n,s,g.to.y,n.to)),g.from.x!=g.to.x&&(i=i.concat(l),n.from=e.effects.setTransition(n,l,g.from.x,n.from),n.to=e.effects.setTransition(n,l,g.to.x,n.to))),("content"==d||"both"==d)&&g.from.y!=g.to.y&&(i=i.concat(a),n.from=e.effects.setTransition(n,a,g.from.y,n.from),n.to=e.effects.setTransition(n,a,g.to.y,n.to)),e.effects.save(n,c?i:r),n.show(),e.effects.createWrapper(n),n.css("overflow","hidden").css(n.from),("content"==d||"both"==d)&&(s=s.concat(["marginTop","marginBottom"]).concat(a),l=l.concat(["marginLeft","marginRight"]),o=i.concat(s).concat(l),n.find("*[width]").each(function(){var n=e(this);c&&e.effects.save(n,o);var i={height:n.height(),width:n.width()};n.from={height:i.height*g.from.y,width:i.width*g.from.x},n.to={height:i.height*g.to.y,width:i.width*g.to.x},g.from.y!=g.to.y&&(n.from=e.effects.setTransition(n,s,g.from.y,n.from),n.to=e.effects.setTransition(n,s,g.to.y,n.to)),g.from.x!=g.to.x&&(n.from=e.effects.setTransition(n,l,g.from.x,n.from),n.to=e.effects.setTransition(n,l,g.to.x,n.to)),n.css(n.from),n.animate(n.to,t.duration,t.options.easing,function(){c&&e.effects.restore(n,o)})})),n.animate(n.to,{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){0===n.to.opacity&&n.css("opacity",n.from.opacity),"hide"==u&&n.hide(),e.effects.restore(n,c?i:r),e.effects.removeWrapper(n),t.callback&&t.callback.apply(this,arguments),n.dequeue()}})})}}(jQuery),function(e,t){e.effects.shake=function(t){return this.queue(function(){var n=e(this),i=["position","top","bottom","left","right"],r=(e.effects.setMode(n,t.options.mode||"effect"),t.options.direction||"left"),o=t.options.distance||20,a=t.options.times||3,s=t.duration||t.options.duration||140;e.effects.save(n,i),n.show(),e.effects.createWrapper(n);var l="up"==r||"down"==r?"top":"left",u="up"==r||"left"==r?"pos":"neg",c={},d={},p={};c[l]=("pos"==u?"-=":"+=")+o,d[l]=("pos"==u?"+=":"-=")+2*o,p[l]=("pos"==u?"-=":"+=")+2*o,n.animate(c,s,t.options.easing);for(var h=1;a>h;h++)n.animate(d,s,t.options.easing).animate(p,s,t.options.easing);n.animate(d,s,t.options.easing).animate(c,s/2,t.options.easing,function(){e.effects.restore(n,i),e.effects.removeWrapper(n),t.callback&&t.callback.apply(this,arguments)}),n.queue("fx",function(){n.dequeue()}),n.dequeue()})}}(jQuery),function(e,t){e.effects.slide=function(t){return this.queue(function(){var n=e(this),i=["position","top","bottom","left","right"],r=e.effects.setMode(n,t.options.mode||"show"),o=t.options.direction||"left";e.effects.save(n,i),n.show(),e.effects.createWrapper(n).css({overflow:"hidden"});var a="up"==o||"down"==o?"top":"left",s="up"==o||"left"==o?"pos":"neg",l=t.options.distance||("top"==a?n.outerHeight(!0):n.outerWidth(!0));"show"==r&&n.css(a,"pos"==s?isNaN(l)?"-"+l:-l:l);var u={};u[a]=("show"==r?"pos"==s?"+=":"-=":"pos"==s?"-=":"+=")+l,n.animate(u,{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){"hide"==r&&n.hide(),e.effects.restore(n,i),e.effects.removeWrapper(n),t.callback&&t.callback.apply(this,arguments),n.dequeue()}})})}}(jQuery),function(e,t){e.effects.transfer=function(t){return this.queue(function(){var n=e(this),i=e(t.options.to),r=i.offset(),o={top:r.top,left:r.left,height:i.innerHeight(),width:i.innerWidth()},a=n.offset(),s=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(t.options.className).css({top:a.top,left:a.left,height:n.innerHeight(),width:n.innerWidth(),position:"absolute"}).animate(o,t.duration,t.options.easing,function(){s.remove(),t.callback&&t.callback.apply(n[0],arguments),n.dequeue()})})}}(jQuery),angular.module("ui.bootstrap",["ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(e,t,n){function i(e){for(var t in e)if(void 0!==o.style[t])return e[t]}var r=function(i,o,a){a=a||{};var s=e.defer(),l=r[a.animation?"animationEndEventName":"transitionEndEventName"],u=function(e){n.$apply(function(){i.unbind(l,u),s.resolve(i)})};return l&&i.bind(l,u),t(function(){angular.isString(o)?i.addClass(o):angular.isFunction(o)?o(i):angular.isObject(o)&&i.css(o),l||s.resolve(i)}),s.promise.cancel=function(){l&&i.unbind(l,u),s.reject("Transition cancelled")},s.promise},o=document.createElement("trans"),a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},s={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return r.transitionEndEventName=i(a),r.animationEndEventName=i(s),r}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(e){return{link:function(t,n,i){function r(t){function i(){u===r&&(u=void 0)}var r=e(n,t);return u&&u.cancel(),u=r,r.then(i,i),r}function o(){c?(c=!1,a()):(n.removeClass("collapse").addClass("collapsing"),r({height:n[0].scrollHeight+"px"}).then(a))}function a(){n.removeClass("collapsing"),n.addClass("collapse in"),n.css({height:"auto"})}function s(){if(c)c=!1,l(),n.css({height:0});else{n.css({height:n[0].scrollHeight+"px"});n[0].offsetWidth;n.removeClass("collapse in").addClass("collapsing"),r({height:0}).then(l)}}function l(){n.removeClass("collapsing"),n.addClass("collapse")}var u,c=!0;t.$watch(i.collapse,function(e){e?s():o()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(e,t,n){this.groups=[],this.closeOthers=function(i){var r=angular.isDefined(t.closeOthers)?e.$eval(t.closeOthers):n.closeOthers;r&&angular.forEach(this.groups,function(e){e!==i&&(e.isOpen=!1)})},this.addGroup=function(e){var t=this;this.groups.push(e),e.$on("$destroy",function(n){t.removeGroup(e)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(t,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(e){this.heading=e}},link:function(e,t,n,i){i.addGroup(e),e.$watch("isOpen",function(t){t&&i.closeOthers(e)}),e.toggleOpen=function(){e.isDisabled||(e.isOpen=!e.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(e,t,n,i,r){i.setHeading(r(e,function(){}))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(e,t,n,i){e.$watch(function(){return i[n.accordionTransclude]},function(e){e&&(t.html(""),t.append(e))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(e,t){e.closeable="close"in t,this.close=e.close}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}).directive("dismissOnTimeout",["$timeout",function(e){return{require:"alert",link:function(t,n,i,r){e(function(){r.close()},parseInt(i.dismissOnTimeout,10))}}}]),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.bindHtmlUnsafe),e.$watch(n.bindHtmlUnsafe,function(e){t.html(e||"")})}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(e){this.activeClass=e.activeClass||"active",this.toggleEvent=e.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(e,t,n,i){var r=i[0],o=i[1];o.$render=function(){t.toggleClass(r.activeClass,angular.equals(o.$modelValue,e.$eval(n.btnRadio)))},t.bind(r.toggleEvent,function(){var i=t.hasClass(r.activeClass);(!i||angular.isDefined(n.uncheckable))&&e.$apply(function(){o.$setViewValue(i?null:e.$eval(n.btnRadio)),o.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(e,t,n,i){function r(){return a(n.btnCheckboxTrue,!0)}function o(){return a(n.btnCheckboxFalse,!1)}function a(t,n){var i=e.$eval(t);return angular.isDefined(i)?i:n}var s=i[0],l=i[1];l.$render=function(){t.toggleClass(s.activeClass,angular.equals(l.$modelValue,r()))},t.bind(s.toggleEvent,function(){e.$apply(function(){l.$setViewValue(t.hasClass(s.activeClass)?o():r()),l.$render()})})}}}),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$interval","$transition",function(e,t,n,i){function r(){o();var t=+e.interval;!isNaN(t)&&t>0&&(s=n(a,t))}function o(){s&&(n.cancel(s),s=null)}function a(){var t=+e.interval;l&&!isNaN(t)&&t>0?e.next():e.pause()}var s,l,u=this,c=u.slides=e.slides=[],d=-1;u.currentSlide=null;var p=!1;u.select=e.select=function(n,o){function a(){if(!p){if(u.currentSlide&&angular.isString(o)&&!e.noTransition&&n.$element){n.$element.addClass(o);n.$element[0].offsetWidth;angular.forEach(c,function(e){angular.extend(e,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(n,{direction:o,active:!0,entering:!0}),angular.extend(u.currentSlide||{},{direction:o,leaving:!0}),e.$currentTransition=i(n.$element,{}),function(t,n){e.$currentTransition.then(function(){s(t,n)},function(){s(t,n)})}(n,u.currentSlide)}else s(n,u.currentSlide);u.currentSlide=n,d=l,r()}}function s(t,n){angular.extend(t,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(n||{},{direction:"",active:!1,leaving:!1,entering:!1}),e.$currentTransition=null}var l=c.indexOf(n);void 0===o&&(o=l>d?"next":"prev"),n&&n!==u.currentSlide&&(e.$currentTransition?(e.$currentTransition.cancel(),t(a)):a())},e.$on("$destroy",function(){p=!0}),u.indexOfSlide=function(e){return c.indexOf(e)},e.next=function(){var t=(d+1)%c.length;return e.$currentTransition?void 0:u.select(c[t],"next")},e.prev=function(){var t=0>d-1?c.length-1:d-1;return e.$currentTransition?void 0:u.select(c[t],"prev")},e.isActive=function(e){return u.currentSlide===e},e.$watch("interval",r),e.$on("$destroy",o),e.play=function(){l||(l=!0,r())},e.pause=function(){e.noPause||(l=!1,o())},u.addSlide=function(t,n){t.$element=n,c.push(t),1===c.length||t.active?(u.select(c[c.length-1]),1==c.length&&e.play()):t.active=!1},u.removeSlide=function(e){var t=c.indexOf(e);c.splice(t,1),c.length>0&&e.active?t>=c.length?u.select(c[t-1]):u.select(c[t]):d>t&&d--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?"},link:function(e,t,n,i){i.addSlide(e,t),e.$on("$destroy",function(){i.removeSlide(e)}),e.$watch("active",function(t){t&&i.select(e)})}}}),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(e,t){function n(e){var n=[],i=e.split("");return angular.forEach(r,function(t,r){var o=e.indexOf(r);if(o>-1){e=e.split(""),i[o]="("+t.regex+")",e[o]="$";for(var a=o+1,s=o+r.length;s>a;a++)i[a]="",e[a]="$";e=e.join(""),n.push({index:o,apply:t.apply})}}),{regex:new RegExp("^"+i.join("")+"$"),map:t(n,"index")}}function i(e,t,n){return 1===t&&n>28?29===n&&(e%4===0&&e%100!==0||e%400===0):3===t||5===t||8===t||10===t?31>n:!0}this.parsers={};var r={yyyy:{regex:"\\d{4}",apply:function(e){this.year=+e}},yy:{regex:"\\d{2}",apply:function(e){this.year=+e+2e3}},y:{regex:"\\d{1,4}",apply:function(e){this.year=+e}},MMMM:{regex:e.DATETIME_FORMATS.MONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.MONTH.indexOf(t)}},MMM:{regex:e.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.SHORTMONTH.indexOf(t)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(e){this.month=e-1}},M:{regex:"[1-9]|1[0-2]",apply:function(e){this.month=e-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},EEEE:{regex:e.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:e.DATETIME_FORMATS.SHORTDAY.join("|")}};this.parse=function(t,r){if(!angular.isString(t)||!r)return t;r=e.DATETIME_FORMATS[r]||r,this.parsers[r]||(this.parsers[r]=n(r));var o=this.parsers[r],a=o.regex,s=o.map,l=t.match(a);if(l&&l.length){for(var u,c={year:1900,month:0,date:1,hours:0},d=1,p=l.length;p>d;d++){var h=s[d-1];h.apply&&h.apply.call(c,l[d])}return i(c.year,c.month,c.date)&&(u=new Date(c.year,c.month,c.date,c.hours)),u}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function i(e){return"static"===(n(e,"position")||"static")}var r=function(t){for(var n=e[0],r=t.offsetParent||n;r&&r!==n&&i(r);)r=r.offsetParent;return r||n};return{position:function(t){var n=this.offset(t),i={top:0,left:0},o=r(t[0]);o!=e[0]&&(i=this.offset(angular.element(o)),i.top+=o.clientTop-o.scrollTop,i.left+=o.clientLeft-o.scrollLeft);var a=t[0].getBoundingClientRect();return{width:a.width||t.prop("offsetWidth"),height:a.height||t.prop("offsetHeight"),top:n.top-i.top,left:n.left-i.left}},offset:function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}},positionElements:function(e,t,n,i){var r,o,a,s,l=n.split("-"),u=l[0],c=l[1]||"center";r=i?this.offset(e):this.position(e),o=t.prop("offsetWidth"),a=t.prop("offsetHeight");var d={center:function(){return r.left+r.width/2-o/2},left:function(){return r.left},right:function(){return r.left+r.width}},p={center:function(){return r.top+r.height/2-a/2},top:function(){return r.top},bottom:function(){return r.top+r.height}};switch(u){case"right":s={top:p[c](),left:d[u]()};break;case"left":s={top:p[c](),left:r.left-o};break;case"bottom":s={top:p[u](),left:d[c]()};break;default:s={top:r.top-a,left:d[c]()}}return s}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$timeout","$log","dateFilter","datepickerConfig",function(e,t,n,i,r,o,a,s){var l=this,u={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange"],function(n,r){l[n]=angular.isDefined(t[n])?8>r?i(t[n])(e.$parent):e.$parent.$eval(t[n]):s[n]}),angular.forEach(["minDate","maxDate"],function(i){t[i]?e.$parent.$watch(n(t[i]),function(e){l[i]=e?new Date(e):null,l.refreshView()}):l[i]=s[i]?new Date(s[i]):null}),e.datepickerMode=e.datepickerMode||s.datepickerMode,e.uniqueId="datepicker-"+e.$id+"-"+Math.floor(1e4*Math.random()),this.activeDate=angular.isDefined(t.initDate)?e.$parent.$eval(t.initDate):new Date,e.isActive=function(t){return 0===l.compare(t.date,l.activeDate)?(e.activeDateId=t.uid,!0):!1},this.init=function(e){u=e,u.$render=function(){l.render()}},this.render=function(){if(u.$modelValue){var e=new Date(u.$modelValue),t=!isNaN(e);t?this.activeDate=e:o.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.'),u.$setValidity("date",t)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var e=u.$modelValue?new Date(u.$modelValue):null;u.$setValidity("date-disabled",!e||this.element&&!this.isDisabled(e))}},this.createDateObject=function(e,t){var n=u.$modelValue?new Date(u.$modelValue):null;return{date:e,label:a(e,t),selected:n&&0===this.compare(e,n),disabled:this.isDisabled(e),current:0===this.compare(e,new Date)}},this.isDisabled=function(n){return this.minDate&&this.compare(n,this.minDate)<0||this.maxDate&&this.compare(n,this.maxDate)>0||t.dateDisabled&&e.dateDisabled({date:n,mode:e.datepickerMode})},this.split=function(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n},e.select=function(t){if(e.datepickerMode===l.minMode){var n=u.$modelValue?new Date(u.$modelValue):new Date(0,0,0,0,0,0,0);n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),u.$setViewValue(n),u.$render()}else l.activeDate=t,e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)-1]},e.move=function(e){var t=l.activeDate.getFullYear()+e*(l.step.years||0),n=l.activeDate.getMonth()+e*(l.step.months||0);l.activeDate.setFullYear(t,n,1),l.refreshView()},e.toggleMode=function(t){t=t||1,e.datepickerMode===l.maxMode&&1===t||e.datepickerMode===l.minMode&&-1===t||(e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)+t])},e.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var c=function(){r(function(){l.element[0].focus()},0,!1)};e.$on("datepicker.focus",c),e.keydown=function(t){var n=e.keys[t.which];if(n&&!t.shiftKey&&!t.altKey)if(t.preventDefault(),t.stopPropagation(),"enter"===n||"space"===n){if(l.isDisabled(l.activeDate))return;e.select(l.activeDate),c()}else!t.ctrlKey||"up"!==n&&"down"!==n?(l.handleKeyDown(n,t),l.refreshView()):(e.toggleMode("up"===n?1:-1),c())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(e,t,n,i){var r=i[0],o=i[1];o&&r.init(o)}}}).directive("daypicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(t,n,i,r){function o(e,t){return 1!==t||e%4!==0||e%100===0&&e%400!==0?l[t]:29}function a(e,t){var n=new Array(t),i=new Date(e),r=0;for(i.setHours(12);t>r;)n[r++]=new Date(i),i.setDate(i.getDate()+1);return n}function s(e){var t=new Date(e);t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1}t.showWeeks=r.showWeeks,r.step={months:1},r.element=n;var l=[31,28,31,30,31,30,31,31,30,31,30,31];r._refreshView=function(){var n=r.activeDate.getFullYear(),i=r.activeDate.getMonth(),o=new Date(n,i,1),l=r.startingDay-o.getDay(),u=l>0?7-l:-l,c=new Date(o);u>0&&c.setDate(-u+1);for(var d=a(c,42),p=0;42>p;p++)d[p]=angular.extend(r.createDateObject(d[p],r.formatDay),{secondary:d[p].getMonth()!==i,uid:t.uniqueId+"-"+p});t.labels=new Array(7);for(var h=0;7>h;h++)t.labels[h]={abbr:e(d[h].date,r.formatDayHeader),full:e(d[h].date,"EEEE")};if(t.title=e(r.activeDate,r.formatDayTitle),t.rows=r.split(d,7),t.showWeeks){t.weekNumbers=[];for(var f=s(t.rows[0][0].date),g=t.rows.length;t.weekNumbers.push(f++)<g;);}},r.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())},r.handleKeyDown=function(e,t){var n=r.activeDate.getDate();if("left"===e)n-=1;else if("up"===e)n-=7;else if("right"===e)n+=1;else if("down"===e)n+=7;else if("pageup"===e||"pagedown"===e){var i=r.activeDate.getMonth()+("pageup"===e?-1:1);r.activeDate.setMonth(i,1),n=Math.min(o(r.activeDate.getFullYear(),r.activeDate.getMonth()),n)}else"home"===e?n=1:"end"===e&&(n=o(r.activeDate.getFullYear(),r.activeDate.getMonth()));r.activeDate.setDate(n)},r.refreshView()}}}]).directive("monthpicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/month.html",require:"^datepicker",link:function(t,n,i,r){r.step={years:1},r.element=n,r._refreshView=function(){for(var n=new Array(12),i=r.activeDate.getFullYear(),o=0;12>o;o++)n[o]=angular.extend(r.createDateObject(new Date(i,o,1),r.formatMonth),{uid:t.uniqueId+"-"+o});t.title=e(r.activeDate,r.formatMonthTitle),t.rows=r.split(n,3)},r.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth())-new Date(t.getFullYear(),t.getMonth())},r.handleKeyDown=function(e,t){var n=r.activeDate.getMonth();if("left"===e)n-=1;else if("up"===e)n-=3;else if("right"===e)n+=1;else if("down"===e)n+=3;else if("pageup"===e||"pagedown"===e){var i=r.activeDate.getFullYear()+("pageup"===e?-1:1);r.activeDate.setFullYear(i)}else"home"===e?n=0:"end"===e&&(n=11);r.activeDate.setMonth(n)},r.refreshView()}}}]).directive("yearpicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(e,t,n,i){function r(e){return parseInt((e-1)/o,10)*o+1}var o=i.yearRange;i.step={years:o},i.element=t,i._refreshView=function(){for(var t=new Array(o),n=0,a=r(i.activeDate.getFullYear());o>n;n++)t[n]=angular.extend(i.createDateObject(new Date(a+n,0,1),i.formatYear),{uid:e.uniqueId+"-"+n});e.title=[t[0].label,t[o-1].label].join(" - "),e.rows=i.split(t,5)},i.compare=function(e,t){return e.getFullYear()-t.getFullYear()},i.handleKeyDown=function(e,t){var n=i.activeDate.getFullYear();"left"===e?n-=1:"up"===e?n-=5:"right"===e?n+=1:"down"===e?n+=5:"pageup"===e||"pagedown"===e?n+=("pageup"===e?-1:1)*i.step.years:"home"===e?n=r(i.activeDate.getFullYear()):"end"===e&&(n=r(i.activeDate.getFullYear())+o-1),i.activeDate.setFullYear(n)},i.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(e,t,n,i,r,o,a){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(s,l,u,c){function d(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function p(e){if(e){if(angular.isDate(e)&&!isNaN(e))return c.$setValidity("date",!0),e;if(angular.isString(e)){var t=o.parse(e,h)||new Date(e);return isNaN(t)?void c.$setValidity("date",!1):(c.$setValidity("date",!0),t)}return void c.$setValidity("date",!1)}return c.$setValidity("date",!0),null}var h,f=angular.isDefined(u.closeOnDateSelection)?s.$parent.$eval(u.closeOnDateSelection):a.closeOnDateSelection,g=angular.isDefined(u.datepickerAppendToBody)?s.$parent.$eval(u.datepickerAppendToBody):a.appendToBody;s.showButtonBar=angular.isDefined(u.showButtonBar)?s.$parent.$eval(u.showButtonBar):a.showButtonBar,s.getText=function(e){return s[e+"Text"]||a[e+"Text"]},u.$observe("datepickerPopup",function(e){h=e||a.datepickerPopup,c.$render()});var m=angular.element("<div datepicker-popup-wrap><div datepicker></div></div>");m.attr({"ng-model":"date","ng-change":"dateSelection()"});var v=angular.element(m.children()[0]);u.datepickerOptions&&angular.forEach(s.$parent.$eval(u.datepickerOptions),function(e,t){v.attr(d(t),e)}),s.watchData={},angular.forEach(["minDate","maxDate","datepickerMode"],function(e){if(u[e]){var n=t(u[e]);if(s.$parent.$watch(n,function(t){s.watchData[e]=t}),v.attr(d(e),"watchData."+e),"datepickerMode"===e){var i=n.assign;s.$watch("watchData."+e,function(e,t){e!==t&&i(s.$parent,e)})}}}),u.dateDisabled&&v.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),c.$parsers.unshift(p),s.dateSelection=function(e){angular.isDefined(e)&&(s.date=e),c.$setViewValue(s.date),c.$render(),f&&(s.isOpen=!1,l[0].focus())},l.bind("input change keyup",function(){s.$apply(function(){s.date=c.$modelValue})}),c.$render=function(){var e=c.$viewValue?r(c.$viewValue,h):"";l.val(e),s.date=p(c.$modelValue)};var y=function(e){s.isOpen&&e.target!==l[0]&&s.$apply(function(){s.isOpen=!1})},b=function(e,t){s.keydown(e)};l.bind("keydown",b),s.keydown=function(e){27===e.which?(e.preventDefault(),e.stopPropagation(),s.close()):40!==e.which||s.isOpen||(s.isOpen=!0)},s.$watch("isOpen",function(e){e?(s.$broadcast("datepicker.focus"),s.position=g?i.offset(l):i.position(l),s.position.top=s.position.top+l.prop("offsetHeight"),n.bind("click",y)):n.unbind("click",y)}),s.select=function(e){if("today"===e){var t=new Date;angular.isDate(c.$modelValue)?(e=new Date(c.$modelValue),e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate())):e=new Date(t.setHours(0,0,0,0))}s.dateSelection(e)},s.close=function(){s.isOpen=!1,l[0].focus()};var w=e(m)(s);m.remove(),g?n.find("body").append(w):l.after(w),s.$on("$destroy",function(){w.remove(),l.unbind("keydown",b),n.unbind("click",y)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(e,t,n){t.bind("click",function(e){e.preventDefault(),e.stopPropagation()})}}}),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(e){var t=null;this.open=function(r){t||(e.bind("click",n),e.bind("keydown",i)),t&&t!==r&&(t.isOpen=!1),t=r},this.close=function(r){t===r&&(t=null,e.unbind("click",n),e.unbind("keydown",i))};var n=function(e){if(t){var n=t.getToggleElement();e&&n&&n[0].contains(e.target)||t.$apply(function(){t.isOpen=!1})}},i=function(e){27===e.which&&(t.focusToggleElement(),n())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(e,t,n,i,r,o){var a,s=this,l=e.$new(),u=i.openClass,c=angular.noop,d=t.onToggle?n(t.onToggle):angular.noop;this.init=function(i){s.$element=i,t.isOpen&&(a=n(t.isOpen),c=a.assign,e.$watch(a,function(e){l.isOpen=!!e}))},this.toggle=function(e){return l.isOpen=arguments.length?!!e:!l.isOpen},this.isOpen=function(){return l.isOpen},l.getToggleElement=function(){return s.toggleElement},l.focusToggleElement=function(){s.toggleElement&&s.toggleElement[0].focus()},l.$watch("isOpen",function(t,n){o[t?"addClass":"removeClass"](s.$element,u),t?(l.focusToggleElement(),r.open(l)):r.close(l),c(e,t),angular.isDefined(t)&&t!==n&&d(e,{open:!!t})}),e.$on("$locationChangeSuccess",function(){l.isOpen=!1}),e.$on("$destroy",function(){l.$destroy()})}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(e,t,n,i){i.init(t)}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(e,t,n,i){if(i){i.toggleElement=t;var r=function(r){r.preventDefault(),t.hasClass("disabled")||n.disabled||e.$apply(function(){i.toggle()})};t.bind("click",r),t.attr({"aria-haspopup":!0,"aria-expanded":!1}),e.$watch(i.isOpen,function(e){t.attr("aria-expanded",!!e)}),e.$on("$destroy",function(){t.unbind("click",r)})}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var e=[];return{add:function(t,n){e.push({key:t,value:n})},get:function(t){for(var n=0;n<e.length;n++)if(t==e[n].key)return e[n]},keys:function(){for(var t=[],n=0;n<e.length;n++)t.push(e[n].key);return t},top:function(){return e[e.length-1]},remove:function(t){for(var n=-1,i=0;i<e.length;i++)if(t==e[i].key){n=i;break}return e.splice(n,1)[0]},removeTop:function(){return e.splice(e.length-1,1)[0]},length:function(){return e.length}}}}}).directive("modalBackdrop",["$timeout",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",link:function(t,n,i){t.backdropClass=i.backdropClass||"",t.animate=!1,e(function(){t.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout",function(e,t){return{restrict:"EA",scope:{index:"@",animate:"="},replace:!0,transclude:!0,templateUrl:function(e,t){return t.templateUrl||"template/modal/window.html"},link:function(n,i,r){i.addClass(r.windowClass||""),n.size=r.size,t(function(){n.animate=!0,i[0].querySelectorAll("[autofocus]").length||i[0].focus()}),n.close=function(t){var n=e.getTop();n&&n.value.backdrop&&"static"!=n.value.backdrop&&t.target===t.currentTarget&&(t.preventDefault(),t.stopPropagation(),e.dismiss(n.key,"backdrop click"))}}}}]).directive("modalTransclude",function(){return{link:function(e,t,n,i,r){r(e.$parent,function(e){t.empty(),t.append(e)})}}}).factory("$modalStack",["$transition","$timeout","$document","$compile","$rootScope","$$stackedMap",function(e,t,n,i,r,o){function a(){for(var e=-1,t=h.keys(),n=0;n<t.length;n++)h.get(t[n]).value.backdrop&&(e=n);return e}function s(e){var t=n.find("body").eq(0),i=h.get(e).value;h.remove(e),u(i.modalDomEl,i.modalScope,300,function(){i.modalScope.$destroy(),t.toggleClass(p,h.length()>0),l()})}function l(){if(c&&-1==a()){var e=d;u(c,d,150,function(){e.$destroy(),e=null}),c=void 0,d=void 0}}function u(n,i,r,o){function a(){a.done||(a.done=!0,n.remove(),o&&o())}i.animate=!1;var s=e.transitionEndEventName;if(s){var l=t(a,r);n.bind(s,function(){t.cancel(l),a(),i.$apply()})}else t(a)}var c,d,p="modal-open",h=o.createNew(),f={};return r.$watch(a,function(e){d&&(d.index=e)}),n.bind("keydown",function(e){var t;27===e.which&&(t=h.top(),t&&t.value.keyboard&&(e.preventDefault(),r.$apply(function(){f.dismiss(t.key,"escape key press")})))}),f.open=function(e,t){h.add(e,{deferred:t.deferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard});var o=n.find("body").eq(0),s=a();if(s>=0&&!c){d=r.$new(!0),d.index=s;var l=angular.element("<div modal-backdrop></div>");l.attr("backdrop-class",t.backdropClass),c=i(l)(d),o.append(c)}var u=angular.element("<div modal-window></div>");u.attr({"template-url":t.windowTemplateUrl,"window-class":t.windowClass,size:t.size,index:h.length()-1,animate:"animate"}).html(t.content);var f=i(u)(t.scope);h.top().value.modalDomEl=f,o.append(f),o.addClass(p)},f.close=function(e,t){var n=h.get(e);n&&(n.value.deferred.resolve(t),s(e))},f.dismiss=function(e,t){var n=h.get(e);n&&(n.value.deferred.reject(t),s(e))},f.dismissAll=function(e){for(var t=this.getTop();t;)this.dismiss(t.key,e),
|
|
3241
|
|
-t=this.getTop()},f.getTop=function(){return h.top()},f}]).provider("$modal",function(){var e={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(t,n,i,r,o,a,s){function l(e){return e.template?i.when(e.template):r.get(angular.isFunction(e.templateUrl)?e.templateUrl():e.templateUrl,{cache:o}).then(function(e){return e.data})}function u(e){var n=[];return angular.forEach(e,function(e){(angular.isFunction(e)||angular.isArray(e))&&n.push(i.when(t.invoke(e)))}),n}var c={};return c.open=function(t){var r=i.defer(),o=i.defer(),c={result:r.promise,opened:o.promise,close:function(e){s.close(c,e)},dismiss:function(e){s.dismiss(c,e)}};if(t=angular.extend({},e.options,t),t.resolve=t.resolve||{},!t.template&&!t.templateUrl)throw new Error("One of template or templateUrl options is required.");var d=i.all([l(t)].concat(u(t.resolve)));return d.then(function(e){var i=(t.scope||n).$new();i.$close=c.close,i.$dismiss=c.dismiss;var o,l={},u=1;t.controller&&(l.$scope=i,l.$modalInstance=c,angular.forEach(t.resolve,function(t,n){l[n]=e[u++]}),o=a(t.controller,l),t.controllerAs&&(i[t.controllerAs]=o)),s.open(c,{scope:i,deferred:r,content:e[0],backdrop:t.backdrop,keyboard:t.keyboard,backdropClass:t.backdropClass,windowClass:t.windowClass,windowTemplateUrl:t.windowTemplateUrl,size:t.size})},function(e){r.reject(e)}),d.then(function(){o.resolve(!0)},function(){o.reject(!1)}),c},c}]};return e}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(e,t,n){var i=this,r={$setViewValue:angular.noop},o=t.numPages?n(t.numPages).assign:angular.noop;this.init=function(o,a){r=o,this.config=a,r.$render=function(){i.render()},t.itemsPerPage?e.$parent.$watch(n(t.itemsPerPage),function(t){i.itemsPerPage=parseInt(t,10),e.totalPages=i.calculateTotalPages()}):this.itemsPerPage=a.itemsPerPage},this.calculateTotalPages=function(){var t=this.itemsPerPage<1?1:Math.ceil(e.totalItems/this.itemsPerPage);return Math.max(t||0,1)},this.render=function(){e.page=parseInt(r.$viewValue,10)||1},e.selectPage=function(t){e.page!==t&&t>0&&t<=e.totalPages&&(r.$setViewValue(t),r.$render())},e.getText=function(t){return e[t+"Text"]||i.config[t+"Text"]},e.noPrevious=function(){return 1===e.page},e.noNext=function(){return e.page===e.totalPages},e.$watch("totalItems",function(){e.totalPages=i.calculateTotalPages()}),e.$watch("totalPages",function(t){o(e.$parent,t),e.page>t?e.selectPage(t):r.$render()})}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(e,t){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@"},require:["pagination","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(n,i,r,o){function a(e,t,n){return{number:e,text:t,active:n}}function s(e,t){var n=[],i=1,r=t,o=angular.isDefined(c)&&t>c;o&&(d?(i=Math.max(e-Math.floor(c/2),1),r=i+c-1,r>t&&(r=t,i=r-c+1)):(i=(Math.ceil(e/c)-1)*c+1,r=Math.min(i+c-1,t)));for(var s=i;r>=s;s++){var l=a(s,s,s===e);n.push(l)}if(o&&!d){if(i>1){var u=a(i-1,"...",!1);n.unshift(u)}if(t>r){var p=a(r+1,"...",!1);n.push(p)}}return n}var l=o[0],u=o[1];if(u){var c=angular.isDefined(r.maxSize)?n.$parent.$eval(r.maxSize):t.maxSize,d=angular.isDefined(r.rotate)?n.$parent.$eval(r.rotate):t.rotate;n.boundaryLinks=angular.isDefined(r.boundaryLinks)?n.$parent.$eval(r.boundaryLinks):t.boundaryLinks,n.directionLinks=angular.isDefined(r.directionLinks)?n.$parent.$eval(r.directionLinks):t.directionLinks,l.init(u,t),r.maxSize&&n.$parent.$watch(e(r.maxSize),function(e){c=parseInt(e,10),l.render()});var p=l.render;l.render=function(){p(),n.page>0&&n.page<=n.totalPages&&(n.pages=s(n.page,n.totalPages))}}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(e){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@"},require:["pager","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(t,n,i,r){var o=r[0],a=r[1];a&&(t.align=angular.isDefined(i.align)?t.$parent.$eval(i.align):e.align,o.init(a,e))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function e(e){var t=/[A-Z]/g,n="-";return e.replace(t,function(e,t){return(t?n:"")+e.toLowerCase()})}var t={placement:"top",animation:!0,popupDelay:0},n={mouseenter:"mouseleave",click:"click",focus:"blur"},i={};this.options=function(e){angular.extend(i,e)},this.setTriggers=function(e){angular.extend(n,e)},this.$get=["$window","$compile","$timeout","$document","$position","$interpolate",function(r,o,a,s,l,u){return function(r,c,d){function p(e){var t=e||h.trigger||d,i=n[t]||t;return{show:t,hide:i}}var h=angular.extend({},t,i),f=e(r),g=u.startSymbol(),m=u.endSymbol(),v="<div "+f+'-popup title="'+g+"title"+m+'" content="'+g+"content"+m+'" placement="'+g+"placement"+m+'" animation="animation" is-open="isOpen"></div>';return{restrict:"EA",compile:function(e,t){var n=o(v);return function(e,t,i){function o(){D.isOpen?d():u()}function u(){(!E||e.$eval(i[c+"Enable"]))&&(y(),D.popupDelay?_||(_=a(f,D.popupDelay,!1),_.then(function(e){e()})):f()())}function d(){e.$apply(function(){g()})}function f(){return _=null,S&&(a.cancel(S),S=null),D.content?(m(),k.css({top:0,left:0,display:"block"}),T?s.find("body").append(k):t.after(k),M(),D.isOpen=!0,D.$digest(),M):angular.noop}function g(){D.isOpen=!1,a.cancel(_),_=null,D.animation?S||(S=a(v,500)):v()}function m(){k&&v(),C=D.$new(),k=n(C,angular.noop)}function v(){S=null,k&&(k.remove(),k=null),C&&(C.$destroy(),C=null)}function y(){b(),w()}function b(){var e=i[c+"Placement"];D.placement=angular.isDefined(e)?e:h.placement}function w(){var e=i[c+"PopupDelay"],t=parseInt(e,10);D.popupDelay=isNaN(t)?h.popupDelay:t}function x(){var e=i[c+"Trigger"];I(),$=p(e),$.show===$.hide?t.bind($.show,o):(t.bind($.show,u),t.bind($.hide,d))}var k,C,S,_,T=angular.isDefined(h.appendToBody)?h.appendToBody:!1,$=p(void 0),E=angular.isDefined(i[c+"Enable"]),D=e.$new(!0),M=function(){var e=l.positionElements(t,k,D.placement,T);e.top+="px",e.left+="px",k.css(e)};D.isOpen=!1,i.$observe(r,function(e){D.content=e,!e&&D.isOpen&&g()}),i.$observe(c+"Title",function(e){D.title=e});var I=function(){t.unbind($.show,u),t.unbind($.hide,d)};x();var P=e.$eval(i[c+"Animation"]);D.animation=angular.isDefined(P)?!!P:h.animation;var A=e.$eval(i[c+"AppendToBody"]);T=angular.isDefined(A)?A:T,T&&e.$on("$locationChangeSuccess",function(){D.isOpen&&g()}),e.$on("$destroy",function(){a.cancel(S),a.cancel(_),I(),v(),D=null})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(e){return e("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(e){return e("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(e){return e("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig",function(e,t,n){var i=this,r=angular.isDefined(t.animate)?e.$parent.$eval(t.animate):n.animate;this.bars=[],e.max=angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max,this.addBar=function(t,n){r||n.css({transition:"none"}),this.bars.push(t),t.$watch("value",function(n){t.percent=+(100*n/e.max).toFixed(2)}),t.$on("$destroy",function(){n=null,i.removeBar(t)})},this.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1)}}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{},templateUrl:"template/progressbar/progress.html"}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(e,t,n,i){i.addBar(e,t)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(e,t,n,i){i.addBar(e,angular.element(t.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","ratingConfig",function(e,t,n){var i={$setViewValue:angular.noop};this.init=function(r){i=r,i.$render=this.render,this.stateOn=angular.isDefined(t.stateOn)?e.$parent.$eval(t.stateOn):n.stateOn,this.stateOff=angular.isDefined(t.stateOff)?e.$parent.$eval(t.stateOff):n.stateOff;var o=angular.isDefined(t.ratingStates)?e.$parent.$eval(t.ratingStates):new Array(angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max);e.range=this.buildTemplateObjects(o)},this.buildTemplateObjects=function(e){for(var t=0,n=e.length;n>t;t++)e[t]=angular.extend({index:t},{stateOn:this.stateOn,stateOff:this.stateOff},e[t]);return e},e.rate=function(t){!e.readonly&&t>=0&&t<=e.range.length&&(i.$setViewValue(t),i.$render())},e.enter=function(t){e.readonly||(e.value=t),e.onHover({value:t})},e.reset=function(){e.value=i.$viewValue,e.onLeave()},e.onKeydown=function(t){/(37|38|39|40)/.test(t.which)&&(t.preventDefault(),t.stopPropagation(),e.rate(e.value+(38===t.which||39===t.which?1:-1)))},this.render=function(){e.value=i.$viewValue}}]).directive("rating",function(){return{restrict:"EA",require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(e,t,n,i){var r=i[0],o=i[1];o&&r.init(o)}}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(e){var t=this,n=t.tabs=e.tabs=[];t.select=function(e){angular.forEach(n,function(t){t.active&&t!==e&&(t.active=!1,t.onDeselect())}),e.active=!0,e.onSelect()},t.addTab=function(e){n.push(e),1===n.length?e.active=!0:e.active&&t.select(e)},t.removeTab=function(e){var r=n.indexOf(e);if(e.active&&n.length>1&&!i){var o=r==n.length-1?r-1:r+1;t.select(n[o])}n.splice(r,1)};var i;e.$on("$destroy",function(){i=!0})}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(e,t,n){e.vertical=angular.isDefined(n.vertical)?e.$parent.$eval(n.vertical):!1,e.justified=angular.isDefined(n.justified)?e.$parent.$eval(n.justified):!1}}}).directive("tab",["$parse",function(e){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(t,n,i){return function(t,n,r,o){t.$watch("active",function(e){e&&o.select(t)}),t.disabled=!1,r.disabled&&t.$parent.$watch(e(r.disabled),function(e){t.disabled=!!e}),t.select=function(){t.disabled||(t.active=!0)},o.addTab(t),t.$on("$destroy",function(){o.removeTab(t)}),t.$transcludeFn=i}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(e,t,n,i){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}]).directive("tabContentTransclude",function(){function e(e){return e.tagName&&(e.hasAttribute("tab-heading")||e.hasAttribute("data-tab-heading")||"tab-heading"===e.tagName.toLowerCase()||"data-tab-heading"===e.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(t,n,i){var r=t.$eval(i.tabContentTransclude);r.$transcludeFn(r.$parent,function(t){angular.forEach(t,function(t){e(t)?r.headingElement=t:n.append(t)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(e,t,n,i,r,o){function a(){var t=parseInt(e.hours,10),n=e.showMeridian?t>0&&13>t:t>=0&&24>t;return n?(e.showMeridian&&(12===t&&(t=0),e.meridian===g[1]&&(t+=12)),t):void 0}function s(){var t=parseInt(e.minutes,10);return t>=0&&60>t?t:void 0}function l(e){return angular.isDefined(e)&&e.toString().length<2?"0"+e:e}function u(e){c(),f.$setViewValue(new Date(h)),d(e)}function c(){f.$setValidity("time",!0),e.invalidHours=!1,e.invalidMinutes=!1}function d(t){var n=h.getHours(),i=h.getMinutes();e.showMeridian&&(n=0===n||12===n?12:n%12),e.hours="h"===t?n:l(n),e.minutes="m"===t?i:l(i),e.meridian=h.getHours()<12?g[0]:g[1]}function p(e){var t=new Date(h.getTime()+6e4*e);h.setHours(t.getHours(),t.getMinutes()),u()}var h=new Date,f={$setViewValue:angular.noop},g=angular.isDefined(t.meridians)?e.$parent.$eval(t.meridians):o.meridians||r.DATETIME_FORMATS.AMPMS;this.init=function(n,i){f=n,f.$render=this.render;var r=i.eq(0),a=i.eq(1),s=angular.isDefined(t.mousewheel)?e.$parent.$eval(t.mousewheel):o.mousewheel;s&&this.setupMousewheelEvents(r,a),e.readonlyInput=angular.isDefined(t.readonlyInput)?e.$parent.$eval(t.readonlyInput):o.readonlyInput,this.setupInputEvents(r,a)};var m=o.hourStep;t.hourStep&&e.$parent.$watch(n(t.hourStep),function(e){m=parseInt(e,10)});var v=o.minuteStep;t.minuteStep&&e.$parent.$watch(n(t.minuteStep),function(e){v=parseInt(e,10)}),e.showMeridian=o.showMeridian,t.showMeridian&&e.$parent.$watch(n(t.showMeridian),function(t){if(e.showMeridian=!!t,f.$error.time){var n=a(),i=s();angular.isDefined(n)&&angular.isDefined(i)&&(h.setHours(n),u())}else d()}),this.setupMousewheelEvents=function(t,n){var i=function(e){e.originalEvent&&(e=e.originalEvent);var t=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||t>0};t.bind("mousewheel wheel",function(t){e.$apply(i(t)?e.incrementHours():e.decrementHours()),t.preventDefault()}),n.bind("mousewheel wheel",function(t){e.$apply(i(t)?e.incrementMinutes():e.decrementMinutes()),t.preventDefault()})},this.setupInputEvents=function(t,n){if(e.readonlyInput)return e.updateHours=angular.noop,void(e.updateMinutes=angular.noop);var i=function(t,n){f.$setViewValue(null),f.$setValidity("time",!1),angular.isDefined(t)&&(e.invalidHours=t),angular.isDefined(n)&&(e.invalidMinutes=n)};e.updateHours=function(){var e=a();angular.isDefined(e)?(h.setHours(e),u("h")):i(!0)},t.bind("blur",function(t){!e.invalidHours&&e.hours<10&&e.$apply(function(){e.hours=l(e.hours)})}),e.updateMinutes=function(){var e=s();angular.isDefined(e)?(h.setMinutes(e),u("m")):i(void 0,!0)},n.bind("blur",function(t){!e.invalidMinutes&&e.minutes<10&&e.$apply(function(){e.minutes=l(e.minutes)})})},this.render=function(){var e=f.$modelValue?new Date(f.$modelValue):null;isNaN(e)?(f.$setValidity("time",!1),i.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(e&&(h=e),c(),d())},e.incrementHours=function(){p(60*m)},e.decrementHours=function(){p(60*-m)},e.incrementMinutes=function(){p(v)},e.decrementMinutes=function(){p(-v)},e.toggleMeridian=function(){p(720*(h.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(e,t,n,i){var r=i[0],o=i[1];o&&r.init(o,t.find("input"))}}}),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(e){var t=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(n){var i=n.match(t);if(!i)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+n+'".');return{itemName:i[3],source:e(i[4]),viewMapper:e(i[2]||i[1]),modelMapper:e(i[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(e,t,n,i,r,o,a){var s=[9,13,27,38,40];return{require:"ngModel",link:function(l,u,c,d){var p,h=l.$eval(c.typeaheadMinLength)||1,f=l.$eval(c.typeaheadWaitMs)||0,g=l.$eval(c.typeaheadEditable)!==!1,m=t(c.typeaheadLoading).assign||angular.noop,v=t(c.typeaheadOnSelect),y=c.typeaheadInputFormatter?t(c.typeaheadInputFormatter):void 0,b=c.typeaheadAppendToBody?l.$eval(c.typeaheadAppendToBody):!1,w=l.$eval(c.typeaheadFocusFirst)!==!1,x=t(c.ngModel).assign,k=a.parse(c.typeahead),C=l.$new();l.$on("$destroy",function(){C.$destroy()});var S="typeahead-"+C.$id+"-"+Math.floor(1e4*Math.random());u.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":S});var _=angular.element("<div typeahead-popup></div>");_.attr({id:S,matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(c.typeaheadTemplateUrl)&&_.attr("template-url",c.typeaheadTemplateUrl);var T=function(){C.matches=[],C.activeIdx=-1,u.attr("aria-expanded",!1)},$=function(e){return S+"-option-"+e};C.$watch("activeIdx",function(e){0>e?u.removeAttr("aria-activedescendant"):u.attr("aria-activedescendant",$(e))});var E=function(e){var t={$viewValue:e};m(l,!0),n.when(k.source(l,t)).then(function(n){var i=e===d.$viewValue;if(i&&p)if(n.length>0){C.activeIdx=w?0:-1,C.matches.length=0;for(var r=0;r<n.length;r++)t[k.itemName]=n[r],C.matches.push({id:$(r),label:k.viewMapper(C,t),model:n[r]});C.query=e,C.position=b?o.offset(u):o.position(u),C.position.top=C.position.top+u.prop("offsetHeight"),u.attr("aria-expanded",!0)}else T();i&&m(l,!1)},function(){T(),m(l,!1)})};T(),C.query=void 0;var D,M=function(e){D=i(function(){E(e)},f)},I=function(){D&&i.cancel(D)};d.$parsers.unshift(function(e){return p=!0,e&&e.length>=h?f>0?(I(),M(e)):E(e):(m(l,!1),I(),T()),g?e:e?void d.$setValidity("editable",!1):(d.$setValidity("editable",!0),e)}),d.$formatters.push(function(e){var t,n,i={};return y?(i.$model=e,y(l,i)):(i[k.itemName]=e,t=k.viewMapper(l,i),i[k.itemName]=void 0,n=k.viewMapper(l,i),t!==n?t:e)}),C.select=function(e){var t,n,r={};r[k.itemName]=n=C.matches[e].model,t=k.modelMapper(l,r),x(l,t),d.$setValidity("editable",!0),v(l,{$item:n,$model:t,$label:k.viewMapper(l,r)}),T(),i(function(){u[0].focus()},0,!1)},u.bind("keydown",function(e){0!==C.matches.length&&-1!==s.indexOf(e.which)&&(-1!=C.activeIdx||13!==e.which&&9!==e.which)&&(e.preventDefault(),40===e.which?(C.activeIdx=(C.activeIdx+1)%C.matches.length,C.$digest()):38===e.which?(C.activeIdx=(C.activeIdx>0?C.activeIdx:C.matches.length)-1,C.$digest()):13===e.which||9===e.which?C.$apply(function(){C.select(C.activeIdx)}):27===e.which&&(e.stopPropagation(),T(),C.$digest()))}),u.bind("blur",function(e){p=!1});var P=function(e){u[0]!==e.target&&(T(),C.$digest())};r.bind("click",P),l.$on("$destroy",function(){r.unbind("click",P),b&&A.remove()});var A=e(_)(C);b?r.find("body").append(A):u.after(A)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(e,t,n){e.templateUrl=n.templateUrl,e.isOpen=function(){return e.matches.length>0},e.isActive=function(t){return e.active==t},e.selectActive=function(t){e.active=t},e.selectMatch=function(t){e.select({activeIdx:t})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(e,t,n,i){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(r,o,a){var s=i(a.templateUrl)(r.$parent)||"template/typeahead/typeahead-match.html";e.get(s,{cache:t}).success(function(e){o.replaceWith(n(e.trim())(r))})}}}]).filter("typeaheadHighlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n){return n?(""+t).replace(new RegExp(e(n),"gi"),"<strong>$&</strong>"):t}}),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(e,t,n){function i(e){for(var t in e)if(void 0!==o.style[t])return e[t]}var r=function(i,o,a){a=a||{};var s=e.defer(),l=r[a.animation?"animationEndEventName":"transitionEndEventName"],u=function(e){n.$apply(function(){i.unbind(l,u),s.resolve(i)})};return l&&i.bind(l,u),t(function(){angular.isString(o)?i.addClass(o):angular.isFunction(o)?o(i):angular.isObject(o)&&i.css(o),l||s.resolve(i)}),s.promise.cancel=function(){l&&i.unbind(l,u),s.reject("Transition cancelled")},s.promise},o=document.createElement("trans"),a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},s={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return r.transitionEndEventName=i(a),r.animationEndEventName=i(s),r}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(e){return{link:function(t,n,i){function r(t){function i(){u===r&&(u=void 0)}var r=e(n,t);return u&&u.cancel(),u=r,r.then(i,i),r}function o(){c?(c=!1,a()):(n.removeClass("collapse").addClass("collapsing"),r({height:n[0].scrollHeight+"px"}).then(a))}function a(){n.removeClass("collapsing"),n.addClass("collapse in"),n.css({height:"auto"})}function s(){if(c)c=!1,l(),n.css({height:0});else{n.css({height:n[0].scrollHeight+"px"});n[0].offsetWidth;n.removeClass("collapse in").addClass("collapsing"),r({height:0}).then(l)}}function l(){n.removeClass("collapsing"),n.addClass("collapse")}var u,c=!0;t.$watch(i.collapse,function(e){e?s():o()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(e,t,n){this.groups=[],this.closeOthers=function(i){var r=angular.isDefined(t.closeOthers)?e.$eval(t.closeOthers):n.closeOthers;r&&angular.forEach(this.groups,function(e){e!==i&&(e.isOpen=!1)})},this.addGroup=function(e){var t=this;this.groups.push(e),e.$on("$destroy",function(n){t.removeGroup(e)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(t,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(e){this.heading=e}},link:function(e,t,n,i){i.addGroup(e),e.$watch("isOpen",function(t){t&&i.closeOthers(e)}),e.toggleOpen=function(){e.isDisabled||(e.isOpen=!e.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(e,t,n,i,r){i.setHeading(r(e,function(){}))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(e,t,n,i){e.$watch(function(){return i[n.accordionTransclude]},function(e){e&&(t.html(""),t.append(e))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(e,t){e.closeable="close"in t,this.close=e.close}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}).directive("dismissOnTimeout",["$timeout",function(e){return{require:"alert",link:function(t,n,i,r){e(function(){r.close()},parseInt(i.dismissOnTimeout,10))}}}]),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.bindHtmlUnsafe),e.$watch(n.bindHtmlUnsafe,function(e){t.html(e||"")})}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(e){this.activeClass=e.activeClass||"active",this.toggleEvent=e.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(e,t,n,i){var r=i[0],o=i[1];o.$render=function(){t.toggleClass(r.activeClass,angular.equals(o.$modelValue,e.$eval(n.btnRadio)))},t.bind(r.toggleEvent,function(){var i=t.hasClass(r.activeClass);(!i||angular.isDefined(n.uncheckable))&&e.$apply(function(){o.$setViewValue(i?null:e.$eval(n.btnRadio)),o.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(e,t,n,i){function r(){return a(n.btnCheckboxTrue,!0)}function o(){return a(n.btnCheckboxFalse,!1)}function a(t,n){var i=e.$eval(t);return angular.isDefined(i)?i:n}var s=i[0],l=i[1];l.$render=function(){t.toggleClass(s.activeClass,angular.equals(l.$modelValue,r()))},t.bind(s.toggleEvent,function(){e.$apply(function(){l.$setViewValue(t.hasClass(s.activeClass)?o():r()),l.$render()})})}}}),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$interval","$transition",function(e,t,n,i){function r(){o();var t=+e.interval;!isNaN(t)&&t>0&&(s=n(a,t))}function o(){s&&(n.cancel(s),s=null)}function a(){var t=+e.interval;l&&!isNaN(t)&&t>0?e.next():e.pause()}var s,l,u=this,c=u.slides=e.slides=[],d=-1;u.currentSlide=null;var p=!1;u.select=e.select=function(n,o){function a(){if(!p){if(u.currentSlide&&angular.isString(o)&&!e.noTransition&&n.$element){n.$element.addClass(o);n.$element[0].offsetWidth;angular.forEach(c,function(e){angular.extend(e,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(n,{direction:o,active:!0,entering:!0}),angular.extend(u.currentSlide||{},{direction:o,leaving:!0}),e.$currentTransition=i(n.$element,{}),function(t,n){e.$currentTransition.then(function(){s(t,n)},function(){s(t,n)})}(n,u.currentSlide)}else s(n,u.currentSlide);u.currentSlide=n,d=l,r()}}function s(t,n){angular.extend(t,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(n||{},{direction:"",active:!1,leaving:!1,entering:!1}),e.$currentTransition=null}var l=c.indexOf(n);void 0===o&&(o=l>d?"next":"prev"),n&&n!==u.currentSlide&&(e.$currentTransition?(e.$currentTransition.cancel(),t(a)):a())},e.$on("$destroy",function(){p=!0}),u.indexOfSlide=function(e){return c.indexOf(e)},e.next=function(){var t=(d+1)%c.length;return e.$currentTransition?void 0:u.select(c[t],"next")},e.prev=function(){var t=0>d-1?c.length-1:d-1;return e.$currentTransition?void 0:u.select(c[t],"prev")},e.isActive=function(e){return u.currentSlide===e},e.$watch("interval",r),e.$on("$destroy",o),e.play=function(){l||(l=!0,r())},e.pause=function(){e.noPause||(l=!1,o())},u.addSlide=function(t,n){t.$element=n,c.push(t),1===c.length||t.active?(u.select(c[c.length-1]),1==c.length&&e.play()):t.active=!1},u.removeSlide=function(e){var t=c.indexOf(e);c.splice(t,1),c.length>0&&e.active?t>=c.length?u.select(c[t-1]):u.select(c[t]):d>t&&d--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?"},link:function(e,t,n,i){i.addSlide(e,t),e.$on("$destroy",function(){i.removeSlide(e)}),e.$watch("active",function(t){t&&i.select(e)})}}}),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(e,t){function n(e){var n=[],i=e.split("");return angular.forEach(r,function(t,r){var o=e.indexOf(r);if(o>-1){e=e.split(""),i[o]="("+t.regex+")",e[o]="$";for(var a=o+1,s=o+r.length;s>a;a++)i[a]="",e[a]="$";e=e.join(""),n.push({index:o,apply:t.apply})}}),{regex:new RegExp("^"+i.join("")+"$"),map:t(n,"index")}}function i(e,t,n){return 1===t&&n>28?29===n&&(e%4===0&&e%100!==0||e%400===0):3===t||5===t||8===t||10===t?31>n:!0}this.parsers={};var r={yyyy:{regex:"\\d{4}",apply:function(e){this.year=+e}},yy:{regex:"\\d{2}",apply:function(e){this.year=+e+2e3}},y:{regex:"\\d{1,4}",apply:function(e){this.year=+e}},MMMM:{regex:e.DATETIME_FORMATS.MONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.MONTH.indexOf(t)}},MMM:{regex:e.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.SHORTMONTH.indexOf(t)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(e){this.month=e-1}},M:{regex:"[1-9]|1[0-2]",apply:function(e){this.month=e-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},EEEE:{regex:e.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:e.DATETIME_FORMATS.SHORTDAY.join("|")}};this.parse=function(t,r){if(!angular.isString(t)||!r)return t;r=e.DATETIME_FORMATS[r]||r,this.parsers[r]||(this.parsers[r]=n(r));var o=this.parsers[r],a=o.regex,s=o.map,l=t.match(a);if(l&&l.length){for(var u,c={year:1900,month:0,date:1,hours:0},d=1,p=l.length;p>d;d++){var h=s[d-1];h.apply&&h.apply.call(c,l[d])}return i(c.year,c.month,c.date)&&(u=new Date(c.year,c.month,c.date,c.hours)),u}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function i(e){return"static"===(n(e,"position")||"static")}var r=function(t){for(var n=e[0],r=t.offsetParent||n;r&&r!==n&&i(r);)r=r.offsetParent;return r||n};return{position:function(t){var n=this.offset(t),i={top:0,left:0},o=r(t[0]);o!=e[0]&&(i=this.offset(angular.element(o)),i.top+=o.clientTop-o.scrollTop,
|
|
3242
|
|
-i.left+=o.clientLeft-o.scrollLeft);var a=t[0].getBoundingClientRect();return{width:a.width||t.prop("offsetWidth"),height:a.height||t.prop("offsetHeight"),top:n.top-i.top,left:n.left-i.left}},offset:function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}},positionElements:function(e,t,n,i){var r,o,a,s,l=n.split("-"),u=l[0],c=l[1]||"center";r=i?this.offset(e):this.position(e),o=t.prop("offsetWidth"),a=t.prop("offsetHeight");var d={center:function(){return r.left+r.width/2-o/2},left:function(){return r.left},right:function(){return r.left+r.width}},p={center:function(){return r.top+r.height/2-a/2},top:function(){return r.top},bottom:function(){return r.top+r.height}};switch(u){case"right":s={top:p[c](),left:d[u]()};break;case"left":s={top:p[c](),left:r.left-o};break;case"bottom":s={top:p[u](),left:d[c]()};break;default:s={top:r.top-a,left:d[c]()}}return s}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$timeout","$log","dateFilter","datepickerConfig",function(e,t,n,i,r,o,a,s){var l=this,u={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange"],function(n,r){l[n]=angular.isDefined(t[n])?8>r?i(t[n])(e.$parent):e.$parent.$eval(t[n]):s[n]}),angular.forEach(["minDate","maxDate"],function(i){t[i]?e.$parent.$watch(n(t[i]),function(e){l[i]=e?new Date(e):null,l.refreshView()}):l[i]=s[i]?new Date(s[i]):null}),e.datepickerMode=e.datepickerMode||s.datepickerMode,e.uniqueId="datepicker-"+e.$id+"-"+Math.floor(1e4*Math.random()),this.activeDate=angular.isDefined(t.initDate)?e.$parent.$eval(t.initDate):new Date,e.isActive=function(t){return 0===l.compare(t.date,l.activeDate)?(e.activeDateId=t.uid,!0):!1},this.init=function(e){u=e,u.$render=function(){l.render()}},this.render=function(){if(u.$modelValue){var e=new Date(u.$modelValue),t=!isNaN(e);t?this.activeDate=e:o.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.'),u.$setValidity("date",t)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var e=u.$modelValue?new Date(u.$modelValue):null;u.$setValidity("date-disabled",!e||this.element&&!this.isDisabled(e))}},this.createDateObject=function(e,t){var n=u.$modelValue?new Date(u.$modelValue):null;return{date:e,label:a(e,t),selected:n&&0===this.compare(e,n),disabled:this.isDisabled(e),current:0===this.compare(e,new Date)}},this.isDisabled=function(n){return this.minDate&&this.compare(n,this.minDate)<0||this.maxDate&&this.compare(n,this.maxDate)>0||t.dateDisabled&&e.dateDisabled({date:n,mode:e.datepickerMode})},this.split=function(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n},e.select=function(t){if(e.datepickerMode===l.minMode){var n=u.$modelValue?new Date(u.$modelValue):new Date(0,0,0,0,0,0,0);n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),u.$setViewValue(n),u.$render()}else l.activeDate=t,e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)-1]},e.move=function(e){var t=l.activeDate.getFullYear()+e*(l.step.years||0),n=l.activeDate.getMonth()+e*(l.step.months||0);l.activeDate.setFullYear(t,n,1),l.refreshView()},e.toggleMode=function(t){t=t||1,e.datepickerMode===l.maxMode&&1===t||e.datepickerMode===l.minMode&&-1===t||(e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)+t])},e.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var c=function(){r(function(){l.element[0].focus()},0,!1)};e.$on("datepicker.focus",c),e.keydown=function(t){var n=e.keys[t.which];if(n&&!t.shiftKey&&!t.altKey)if(t.preventDefault(),t.stopPropagation(),"enter"===n||"space"===n){if(l.isDisabled(l.activeDate))return;e.select(l.activeDate),c()}else!t.ctrlKey||"up"!==n&&"down"!==n?(l.handleKeyDown(n,t),l.refreshView()):(e.toggleMode("up"===n?1:-1),c())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(e,t,n,i){var r=i[0],o=i[1];o&&r.init(o)}}}).directive("daypicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(t,n,i,r){function o(e,t){return 1!==t||e%4!==0||e%100===0&&e%400!==0?l[t]:29}function a(e,t){var n=new Array(t),i=new Date(e),r=0;for(i.setHours(12);t>r;)n[r++]=new Date(i),i.setDate(i.getDate()+1);return n}function s(e){var t=new Date(e);t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1}t.showWeeks=r.showWeeks,r.step={months:1},r.element=n;var l=[31,28,31,30,31,30,31,31,30,31,30,31];r._refreshView=function(){var n=r.activeDate.getFullYear(),i=r.activeDate.getMonth(),o=new Date(n,i,1),l=r.startingDay-o.getDay(),u=l>0?7-l:-l,c=new Date(o);u>0&&c.setDate(-u+1);for(var d=a(c,42),p=0;42>p;p++)d[p]=angular.extend(r.createDateObject(d[p],r.formatDay),{secondary:d[p].getMonth()!==i,uid:t.uniqueId+"-"+p});t.labels=new Array(7);for(var h=0;7>h;h++)t.labels[h]={abbr:e(d[h].date,r.formatDayHeader),full:e(d[h].date,"EEEE")};if(t.title=e(r.activeDate,r.formatDayTitle),t.rows=r.split(d,7),t.showWeeks){t.weekNumbers=[];for(var f=s(t.rows[0][0].date),g=t.rows.length;t.weekNumbers.push(f++)<g;);}},r.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())},r.handleKeyDown=function(e,t){var n=r.activeDate.getDate();if("left"===e)n-=1;else if("up"===e)n-=7;else if("right"===e)n+=1;else if("down"===e)n+=7;else if("pageup"===e||"pagedown"===e){var i=r.activeDate.getMonth()+("pageup"===e?-1:1);r.activeDate.setMonth(i,1),n=Math.min(o(r.activeDate.getFullYear(),r.activeDate.getMonth()),n)}else"home"===e?n=1:"end"===e&&(n=o(r.activeDate.getFullYear(),r.activeDate.getMonth()));r.activeDate.setDate(n)},r.refreshView()}}}]).directive("monthpicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/month.html",require:"^datepicker",link:function(t,n,i,r){r.step={years:1},r.element=n,r._refreshView=function(){for(var n=new Array(12),i=r.activeDate.getFullYear(),o=0;12>o;o++)n[o]=angular.extend(r.createDateObject(new Date(i,o,1),r.formatMonth),{uid:t.uniqueId+"-"+o});t.title=e(r.activeDate,r.formatMonthTitle),t.rows=r.split(n,3)},r.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth())-new Date(t.getFullYear(),t.getMonth())},r.handleKeyDown=function(e,t){var n=r.activeDate.getMonth();if("left"===e)n-=1;else if("up"===e)n-=3;else if("right"===e)n+=1;else if("down"===e)n+=3;else if("pageup"===e||"pagedown"===e){var i=r.activeDate.getFullYear()+("pageup"===e?-1:1);r.activeDate.setFullYear(i)}else"home"===e?n=0:"end"===e&&(n=11);r.activeDate.setMonth(n)},r.refreshView()}}}]).directive("yearpicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(e,t,n,i){function r(e){return parseInt((e-1)/o,10)*o+1}var o=i.yearRange;i.step={years:o},i.element=t,i._refreshView=function(){for(var t=new Array(o),n=0,a=r(i.activeDate.getFullYear());o>n;n++)t[n]=angular.extend(i.createDateObject(new Date(a+n,0,1),i.formatYear),{uid:e.uniqueId+"-"+n});e.title=[t[0].label,t[o-1].label].join(" - "),e.rows=i.split(t,5)},i.compare=function(e,t){return e.getFullYear()-t.getFullYear()},i.handleKeyDown=function(e,t){var n=i.activeDate.getFullYear();"left"===e?n-=1:"up"===e?n-=5:"right"===e?n+=1:"down"===e?n+=5:"pageup"===e||"pagedown"===e?n+=("pageup"===e?-1:1)*i.step.years:"home"===e?n=r(i.activeDate.getFullYear()):"end"===e&&(n=r(i.activeDate.getFullYear())+o-1),i.activeDate.setFullYear(n)},i.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(e,t,n,i,r,o,a){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(s,l,u,c){function d(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function p(e){if(e){if(angular.isDate(e)&&!isNaN(e))return c.$setValidity("date",!0),e;if(angular.isString(e)){var t=o.parse(e,h)||new Date(e);return isNaN(t)?void c.$setValidity("date",!1):(c.$setValidity("date",!0),t)}return void c.$setValidity("date",!1)}return c.$setValidity("date",!0),null}var h,f=angular.isDefined(u.closeOnDateSelection)?s.$parent.$eval(u.closeOnDateSelection):a.closeOnDateSelection,g=angular.isDefined(u.datepickerAppendToBody)?s.$parent.$eval(u.datepickerAppendToBody):a.appendToBody;s.showButtonBar=angular.isDefined(u.showButtonBar)?s.$parent.$eval(u.showButtonBar):a.showButtonBar,s.getText=function(e){return s[e+"Text"]||a[e+"Text"]},u.$observe("datepickerPopup",function(e){h=e||a.datepickerPopup,c.$render()});var m=angular.element("<div datepicker-popup-wrap><div datepicker></div></div>");m.attr({"ng-model":"date","ng-change":"dateSelection()"});var v=angular.element(m.children()[0]);u.datepickerOptions&&angular.forEach(s.$parent.$eval(u.datepickerOptions),function(e,t){v.attr(d(t),e)}),s.watchData={},angular.forEach(["minDate","maxDate","datepickerMode"],function(e){if(u[e]){var n=t(u[e]);if(s.$parent.$watch(n,function(t){s.watchData[e]=t}),v.attr(d(e),"watchData."+e),"datepickerMode"===e){var i=n.assign;s.$watch("watchData."+e,function(e,t){e!==t&&i(s.$parent,e)})}}}),u.dateDisabled&&v.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),c.$parsers.unshift(p),s.dateSelection=function(e){angular.isDefined(e)&&(s.date=e),c.$setViewValue(s.date),c.$render(),f&&(s.isOpen=!1,l[0].focus())},l.bind("input change keyup",function(){s.$apply(function(){s.date=c.$modelValue})}),c.$render=function(){var e=c.$viewValue?r(c.$viewValue,h):"";l.val(e),s.date=p(c.$modelValue)};var y=function(e){s.isOpen&&e.target!==l[0]&&s.$apply(function(){s.isOpen=!1})},b=function(e,t){s.keydown(e)};l.bind("keydown",b),s.keydown=function(e){27===e.which?(e.preventDefault(),e.stopPropagation(),s.close()):40!==e.which||s.isOpen||(s.isOpen=!0)},s.$watch("isOpen",function(e){e?(s.$broadcast("datepicker.focus"),s.position=g?i.offset(l):i.position(l),s.position.top=s.position.top+l.prop("offsetHeight"),n.bind("click",y)):n.unbind("click",y)}),s.select=function(e){if("today"===e){var t=new Date;angular.isDate(c.$modelValue)?(e=new Date(c.$modelValue),e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate())):e=new Date(t.setHours(0,0,0,0))}s.dateSelection(e)},s.close=function(){s.isOpen=!1,l[0].focus()};var w=e(m)(s);m.remove(),g?n.find("body").append(w):l.after(w),s.$on("$destroy",function(){w.remove(),l.unbind("keydown",b),n.unbind("click",y)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(e,t,n){t.bind("click",function(e){e.preventDefault(),e.stopPropagation()})}}}),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(e){var t=null;this.open=function(r){t||(e.bind("click",n),e.bind("keydown",i)),t&&t!==r&&(t.isOpen=!1),t=r},this.close=function(r){t===r&&(t=null,e.unbind("click",n),e.unbind("keydown",i))};var n=function(e){if(t){var n=t.getToggleElement();e&&n&&n[0].contains(e.target)||t.$apply(function(){t.isOpen=!1})}},i=function(e){27===e.which&&(t.focusToggleElement(),n())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(e,t,n,i,r,o){var a,s=this,l=e.$new(),u=i.openClass,c=angular.noop,d=t.onToggle?n(t.onToggle):angular.noop;this.init=function(i){s.$element=i,t.isOpen&&(a=n(t.isOpen),c=a.assign,e.$watch(a,function(e){l.isOpen=!!e}))},this.toggle=function(e){return l.isOpen=arguments.length?!!e:!l.isOpen},this.isOpen=function(){return l.isOpen},l.getToggleElement=function(){return s.toggleElement},l.focusToggleElement=function(){s.toggleElement&&s.toggleElement[0].focus()},l.$watch("isOpen",function(t,n){o[t?"addClass":"removeClass"](s.$element,u),t?(l.focusToggleElement(),r.open(l)):r.close(l),c(e,t),angular.isDefined(t)&&t!==n&&d(e,{open:!!t})}),e.$on("$locationChangeSuccess",function(){l.isOpen=!1}),e.$on("$destroy",function(){l.$destroy()})}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(e,t,n,i){i.init(t)}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(e,t,n,i){if(i){i.toggleElement=t;var r=function(r){r.preventDefault(),t.hasClass("disabled")||n.disabled||e.$apply(function(){i.toggle()})};t.bind("click",r),t.attr({"aria-haspopup":!0,"aria-expanded":!1}),e.$watch(i.isOpen,function(e){t.attr("aria-expanded",!!e)}),e.$on("$destroy",function(){t.unbind("click",r)})}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var e=[];return{add:function(t,n){e.push({key:t,value:n})},get:function(t){for(var n=0;n<e.length;n++)if(t==e[n].key)return e[n]},keys:function(){for(var t=[],n=0;n<e.length;n++)t.push(e[n].key);return t},top:function(){return e[e.length-1]},remove:function(t){for(var n=-1,i=0;i<e.length;i++)if(t==e[i].key){n=i;break}return e.splice(n,1)[0]},removeTop:function(){return e.splice(e.length-1,1)[0]},length:function(){return e.length}}}}}).directive("modalBackdrop",["$timeout",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",link:function(t,n,i){t.backdropClass=i.backdropClass||"",t.animate=!1,e(function(){t.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout",function(e,t){return{restrict:"EA",scope:{index:"@",animate:"="},replace:!0,transclude:!0,templateUrl:function(e,t){return t.templateUrl||"template/modal/window.html"},link:function(n,i,r){i.addClass(r.windowClass||""),n.size=r.size,t(function(){n.animate=!0,i[0].querySelectorAll("[autofocus]").length||i[0].focus()}),n.close=function(t){var n=e.getTop();n&&n.value.backdrop&&"static"!=n.value.backdrop&&t.target===t.currentTarget&&(t.preventDefault(),t.stopPropagation(),e.dismiss(n.key,"backdrop click"))}}}}]).directive("modalTransclude",function(){return{link:function(e,t,n,i,r){r(e.$parent,function(e){t.empty(),t.append(e)})}}}).factory("$modalStack",["$transition","$timeout","$document","$compile","$rootScope","$$stackedMap",function(e,t,n,i,r,o){function a(){for(var e=-1,t=h.keys(),n=0;n<t.length;n++)h.get(t[n]).value.backdrop&&(e=n);return e}function s(e){var t=n.find("body").eq(0),i=h.get(e).value;h.remove(e),u(i.modalDomEl,i.modalScope,300,function(){i.modalScope.$destroy(),t.toggleClass(p,h.length()>0),l()})}function l(){if(c&&-1==a()){var e=d;u(c,d,150,function(){e.$destroy(),e=null}),c=void 0,d=void 0}}function u(n,i,r,o){function a(){a.done||(a.done=!0,n.remove(),o&&o())}i.animate=!1;var s=e.transitionEndEventName;if(s){var l=t(a,r);n.bind(s,function(){t.cancel(l),a(),i.$apply()})}else t(a)}var c,d,p="modal-open",h=o.createNew(),f={};return r.$watch(a,function(e){d&&(d.index=e)}),n.bind("keydown",function(e){var t;27===e.which&&(t=h.top(),t&&t.value.keyboard&&(e.preventDefault(),r.$apply(function(){f.dismiss(t.key,"escape key press")})))}),f.open=function(e,t){h.add(e,{deferred:t.deferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard});var o=n.find("body").eq(0),s=a();if(s>=0&&!c){d=r.$new(!0),d.index=s;var l=angular.element("<div modal-backdrop></div>");l.attr("backdrop-class",t.backdropClass),c=i(l)(d),o.append(c)}var u=angular.element("<div modal-window></div>");u.attr({"template-url":t.windowTemplateUrl,"window-class":t.windowClass,size:t.size,index:h.length()-1,animate:"animate"}).html(t.content);var f=i(u)(t.scope);h.top().value.modalDomEl=f,o.append(f),o.addClass(p)},f.close=function(e,t){var n=h.get(e);n&&(n.value.deferred.resolve(t),s(e))},f.dismiss=function(e,t){var n=h.get(e);n&&(n.value.deferred.reject(t),s(e))},f.dismissAll=function(e){for(var t=this.getTop();t;)this.dismiss(t.key,e),t=this.getTop()},f.getTop=function(){return h.top()},f}]).provider("$modal",function(){var e={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(t,n,i,r,o,a,s){function l(e){return e.template?i.when(e.template):r.get(angular.isFunction(e.templateUrl)?e.templateUrl():e.templateUrl,{cache:o}).then(function(e){return e.data})}function u(e){var n=[];return angular.forEach(e,function(e){(angular.isFunction(e)||angular.isArray(e))&&n.push(i.when(t.invoke(e)))}),n}var c={};return c.open=function(t){var r=i.defer(),o=i.defer(),c={result:r.promise,opened:o.promise,close:function(e){s.close(c,e)},dismiss:function(e){s.dismiss(c,e)}};if(t=angular.extend({},e.options,t),t.resolve=t.resolve||{},!t.template&&!t.templateUrl)throw new Error("One of template or templateUrl options is required.");var d=i.all([l(t)].concat(u(t.resolve)));return d.then(function(e){var i=(t.scope||n).$new();i.$close=c.close,i.$dismiss=c.dismiss;var o,l={},u=1;t.controller&&(l.$scope=i,l.$modalInstance=c,angular.forEach(t.resolve,function(t,n){l[n]=e[u++]}),o=a(t.controller,l),t.controllerAs&&(i[t.controllerAs]=o)),s.open(c,{scope:i,deferred:r,content:e[0],backdrop:t.backdrop,keyboard:t.keyboard,backdropClass:t.backdropClass,windowClass:t.windowClass,windowTemplateUrl:t.windowTemplateUrl,size:t.size})},function(e){r.reject(e)}),d.then(function(){o.resolve(!0)},function(){o.reject(!1)}),c},c}]};return e}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(e,t,n){var i=this,r={$setViewValue:angular.noop},o=t.numPages?n(t.numPages).assign:angular.noop;this.init=function(o,a){r=o,this.config=a,r.$render=function(){i.render()},t.itemsPerPage?e.$parent.$watch(n(t.itemsPerPage),function(t){i.itemsPerPage=parseInt(t,10),e.totalPages=i.calculateTotalPages()}):this.itemsPerPage=a.itemsPerPage},this.calculateTotalPages=function(){var t=this.itemsPerPage<1?1:Math.ceil(e.totalItems/this.itemsPerPage);return Math.max(t||0,1)},this.render=function(){e.page=parseInt(r.$viewValue,10)||1},e.selectPage=function(t){e.page!==t&&t>0&&t<=e.totalPages&&(r.$setViewValue(t),r.$render())},e.getText=function(t){return e[t+"Text"]||i.config[t+"Text"]},e.noPrevious=function(){return 1===e.page},e.noNext=function(){return e.page===e.totalPages},e.$watch("totalItems",function(){e.totalPages=i.calculateTotalPages()}),e.$watch("totalPages",function(t){o(e.$parent,t),e.page>t?e.selectPage(t):r.$render()})}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(e,t){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@"},require:["pagination","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(n,i,r,o){function a(e,t,n){return{number:e,text:t,active:n}}function s(e,t){var n=[],i=1,r=t,o=angular.isDefined(c)&&t>c;o&&(d?(i=Math.max(e-Math.floor(c/2),1),r=i+c-1,r>t&&(r=t,i=r-c+1)):(i=(Math.ceil(e/c)-1)*c+1,r=Math.min(i+c-1,t)));for(var s=i;r>=s;s++){var l=a(s,s,s===e);n.push(l)}if(o&&!d){if(i>1){var u=a(i-1,"...",!1);n.unshift(u)}if(t>r){var p=a(r+1,"...",!1);n.push(p)}}return n}var l=o[0],u=o[1];if(u){var c=angular.isDefined(r.maxSize)?n.$parent.$eval(r.maxSize):t.maxSize,d=angular.isDefined(r.rotate)?n.$parent.$eval(r.rotate):t.rotate;n.boundaryLinks=angular.isDefined(r.boundaryLinks)?n.$parent.$eval(r.boundaryLinks):t.boundaryLinks,n.directionLinks=angular.isDefined(r.directionLinks)?n.$parent.$eval(r.directionLinks):t.directionLinks,l.init(u,t),r.maxSize&&n.$parent.$watch(e(r.maxSize),function(e){c=parseInt(e,10),l.render()});var p=l.render;l.render=function(){p(),n.page>0&&n.page<=n.totalPages&&(n.pages=s(n.page,n.totalPages))}}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(e){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@"},require:["pager","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(t,n,i,r){var o=r[0],a=r[1];a&&(t.align=angular.isDefined(i.align)?t.$parent.$eval(i.align):e.align,o.init(a,e))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function e(e){var t=/[A-Z]/g,n="-";return e.replace(t,function(e,t){return(t?n:"")+e.toLowerCase()})}var t={placement:"top",animation:!0,popupDelay:0},n={mouseenter:"mouseleave",click:"click",focus:"blur"},i={};this.options=function(e){angular.extend(i,e)},this.setTriggers=function(e){angular.extend(n,e)},this.$get=["$window","$compile","$timeout","$document","$position","$interpolate",function(r,o,a,s,l,u){return function(r,c,d){function p(e){var t=e||h.trigger||d,i=n[t]||t;return{show:t,hide:i}}var h=angular.extend({},t,i),f=e(r),g=u.startSymbol(),m=u.endSymbol(),v="<div "+f+'-popup title="'+g+"title"+m+'" content="'+g+"content"+m+'" placement="'+g+"placement"+m+'" animation="animation" is-open="isOpen"></div>';return{restrict:"EA",compile:function(e,t){var n=o(v);return function(e,t,i){function o(){D.isOpen?d():u()}function u(){(!E||e.$eval(i[c+"Enable"]))&&(y(),D.popupDelay?_||(_=a(f,D.popupDelay,!1),_.then(function(e){e()})):f()())}function d(){e.$apply(function(){g()})}function f(){return _=null,S&&(a.cancel(S),S=null),D.content?(m(),k.css({top:0,left:0,display:"block"}),T?s.find("body").append(k):t.after(k),M(),D.isOpen=!0,D.$digest(),M):angular.noop}function g(){D.isOpen=!1,a.cancel(_),_=null,D.animation?S||(S=a(v,500)):v()}function m(){k&&v(),C=D.$new(),k=n(C,angular.noop)}function v(){S=null,k&&(k.remove(),k=null),C&&(C.$destroy(),C=null)}function y(){b(),w()}function b(){var e=i[c+"Placement"];D.placement=angular.isDefined(e)?e:h.placement}function w(){var e=i[c+"PopupDelay"],t=parseInt(e,10);D.popupDelay=isNaN(t)?h.popupDelay:t}function x(){var e=i[c+"Trigger"];I(),$=p(e),$.show===$.hide?t.bind($.show,o):(t.bind($.show,u),t.bind($.hide,d))}var k,C,S,_,T=angular.isDefined(h.appendToBody)?h.appendToBody:!1,$=p(void 0),E=angular.isDefined(i[c+"Enable"]),D=e.$new(!0),M=function(){var e=l.positionElements(t,k,D.placement,T);e.top+="px",e.left+="px",k.css(e)};D.isOpen=!1,i.$observe(r,function(e){D.content=e,!e&&D.isOpen&&g()}),i.$observe(c+"Title",function(e){D.title=e});var I=function(){t.unbind($.show,u),t.unbind($.hide,d)};x();var P=e.$eval(i[c+"Animation"]);D.animation=angular.isDefined(P)?!!P:h.animation;var A=e.$eval(i[c+"AppendToBody"]);T=angular.isDefined(A)?A:T,T&&e.$on("$locationChangeSuccess",function(){D.isOpen&&g()}),e.$on("$destroy",function(){a.cancel(S),a.cancel(_),I(),v(),D=null})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(e){return e("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(e){return e("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(e){return e("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig",function(e,t,n){var i=this,r=angular.isDefined(t.animate)?e.$parent.$eval(t.animate):n.animate;this.bars=[],e.max=angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max,this.addBar=function(t,n){r||n.css({transition:"none"}),this.bars.push(t),t.$watch("value",function(n){t.percent=+(100*n/e.max).toFixed(2)}),t.$on("$destroy",function(){n=null,i.removeBar(t)})},this.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1)}}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{},templateUrl:"template/progressbar/progress.html"}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(e,t,n,i){i.addBar(e,t)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(e,t,n,i){i.addBar(e,angular.element(t.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","ratingConfig",function(e,t,n){var i={$setViewValue:angular.noop};this.init=function(r){i=r,i.$render=this.render,this.stateOn=angular.isDefined(t.stateOn)?e.$parent.$eval(t.stateOn):n.stateOn,this.stateOff=angular.isDefined(t.stateOff)?e.$parent.$eval(t.stateOff):n.stateOff;var o=angular.isDefined(t.ratingStates)?e.$parent.$eval(t.ratingStates):new Array(angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max);e.range=this.buildTemplateObjects(o)},this.buildTemplateObjects=function(e){for(var t=0,n=e.length;n>t;t++)e[t]=angular.extend({index:t},{stateOn:this.stateOn,stateOff:this.stateOff},e[t]);return e},e.rate=function(t){!e.readonly&&t>=0&&t<=e.range.length&&(i.$setViewValue(t),i.$render())},e.enter=function(t){e.readonly||(e.value=t),e.onHover({value:t})},e.reset=function(){e.value=i.$viewValue,e.onLeave()},e.onKeydown=function(t){/(37|38|39|40)/.test(t.which)&&(t.preventDefault(),t.stopPropagation(),e.rate(e.value+(38===t.which||39===t.which?1:-1)))},this.render=function(){e.value=i.$viewValue}}]).directive("rating",function(){return{restrict:"EA",require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(e,t,n,i){var r=i[0],o=i[1];o&&r.init(o)}}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(e){var t=this,n=t.tabs=e.tabs=[];t.select=function(e){angular.forEach(n,function(t){t.active&&t!==e&&(t.active=!1,t.onDeselect())}),e.active=!0,e.onSelect()},t.addTab=function(e){n.push(e),1===n.length?e.active=!0:e.active&&t.select(e)},t.removeTab=function(e){var r=n.indexOf(e);if(e.active&&n.length>1&&!i){var o=r==n.length-1?r-1:r+1;t.select(n[o])}n.splice(r,1)};var i;e.$on("$destroy",function(){i=!0})}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(e,t,n){e.vertical=angular.isDefined(n.vertical)?e.$parent.$eval(n.vertical):!1,e.justified=angular.isDefined(n.justified)?e.$parent.$eval(n.justified):!1}}}).directive("tab",["$parse",function(e){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(t,n,i){return function(t,n,r,o){t.$watch("active",function(e){e&&o.select(t)}),t.disabled=!1,r.disabled&&t.$parent.$watch(e(r.disabled),function(e){t.disabled=!!e}),t.select=function(){t.disabled||(t.active=!0)},o.addTab(t),t.$on("$destroy",function(){o.removeTab(t)}),t.$transcludeFn=i}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(e,t,n,i){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}]).directive("tabContentTransclude",function(){function e(e){return e.tagName&&(e.hasAttribute("tab-heading")||e.hasAttribute("data-tab-heading")||"tab-heading"===e.tagName.toLowerCase()||"data-tab-heading"===e.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(t,n,i){var r=t.$eval(i.tabContentTransclude);r.$transcludeFn(r.$parent,function(t){angular.forEach(t,function(t){e(t)?r.headingElement=t:n.append(t)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(e,t,n,i,r,o){function a(){var t=parseInt(e.hours,10),n=e.showMeridian?t>0&&13>t:t>=0&&24>t;return n?(e.showMeridian&&(12===t&&(t=0),e.meridian===g[1]&&(t+=12)),t):void 0}function s(){var t=parseInt(e.minutes,10);return t>=0&&60>t?t:void 0}function l(e){return angular.isDefined(e)&&e.toString().length<2?"0"+e:e}function u(e){c(),f.$setViewValue(new Date(h)),d(e)}function c(){f.$setValidity("time",!0),e.invalidHours=!1,e.invalidMinutes=!1}function d(t){var n=h.getHours(),i=h.getMinutes();e.showMeridian&&(n=0===n||12===n?12:n%12),e.hours="h"===t?n:l(n),e.minutes="m"===t?i:l(i),e.meridian=h.getHours()<12?g[0]:g[1]}function p(e){var t=new Date(h.getTime()+6e4*e);h.setHours(t.getHours(),t.getMinutes()),u()}var h=new Date,f={$setViewValue:angular.noop},g=angular.isDefined(t.meridians)?e.$parent.$eval(t.meridians):o.meridians||r.DATETIME_FORMATS.AMPMS;this.init=function(n,i){f=n,f.$render=this.render;var r=i.eq(0),a=i.eq(1),s=angular.isDefined(t.mousewheel)?e.$parent.$eval(t.mousewheel):o.mousewheel;s&&this.setupMousewheelEvents(r,a),e.readonlyInput=angular.isDefined(t.readonlyInput)?e.$parent.$eval(t.readonlyInput):o.readonlyInput,this.setupInputEvents(r,a)};var m=o.hourStep;t.hourStep&&e.$parent.$watch(n(t.hourStep),function(e){m=parseInt(e,10)});var v=o.minuteStep;t.minuteStep&&e.$parent.$watch(n(t.minuteStep),function(e){v=parseInt(e,10)}),e.showMeridian=o.showMeridian,t.showMeridian&&e.$parent.$watch(n(t.showMeridian),function(t){if(e.showMeridian=!!t,f.$error.time){var n=a(),i=s();angular.isDefined(n)&&angular.isDefined(i)&&(h.setHours(n),u())}else d()}),this.setupMousewheelEvents=function(t,n){var i=function(e){e.originalEvent&&(e=e.originalEvent);var t=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||t>0};t.bind("mousewheel wheel",function(t){e.$apply(i(t)?e.incrementHours():e.decrementHours()),t.preventDefault()}),n.bind("mousewheel wheel",function(t){e.$apply(i(t)?e.incrementMinutes():e.decrementMinutes()),t.preventDefault()})},this.setupInputEvents=function(t,n){if(e.readonlyInput)return e.updateHours=angular.noop,void(e.updateMinutes=angular.noop);var i=function(t,n){f.$setViewValue(null),f.$setValidity("time",!1),angular.isDefined(t)&&(e.invalidHours=t),angular.isDefined(n)&&(e.invalidMinutes=n)};
|
|
3243
|
|
-e.updateHours=function(){var e=a();angular.isDefined(e)?(h.setHours(e),u("h")):i(!0)},t.bind("blur",function(t){!e.invalidHours&&e.hours<10&&e.$apply(function(){e.hours=l(e.hours)})}),e.updateMinutes=function(){var e=s();angular.isDefined(e)?(h.setMinutes(e),u("m")):i(void 0,!0)},n.bind("blur",function(t){!e.invalidMinutes&&e.minutes<10&&e.$apply(function(){e.minutes=l(e.minutes)})})},this.render=function(){var e=f.$modelValue?new Date(f.$modelValue):null;isNaN(e)?(f.$setValidity("time",!1),i.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(e&&(h=e),c(),d())},e.incrementHours=function(){p(60*m)},e.decrementHours=function(){p(60*-m)},e.incrementMinutes=function(){p(v)},e.decrementMinutes=function(){p(-v)},e.toggleMeridian=function(){p(720*(h.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(e,t,n,i){var r=i[0],o=i[1];o&&r.init(o,t.find("input"))}}}),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(e){var t=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(n){var i=n.match(t);if(!i)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+n+'".');return{itemName:i[3],source:e(i[4]),viewMapper:e(i[2]||i[1]),modelMapper:e(i[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(e,t,n,i,r,o,a){var s=[9,13,27,38,40];return{require:"ngModel",link:function(l,u,c,d){var p,h=l.$eval(c.typeaheadMinLength)||1,f=l.$eval(c.typeaheadWaitMs)||0,g=l.$eval(c.typeaheadEditable)!==!1,m=t(c.typeaheadLoading).assign||angular.noop,v=t(c.typeaheadOnSelect),y=c.typeaheadInputFormatter?t(c.typeaheadInputFormatter):void 0,b=c.typeaheadAppendToBody?l.$eval(c.typeaheadAppendToBody):!1,w=l.$eval(c.typeaheadFocusFirst)!==!1,x=t(c.ngModel).assign,k=a.parse(c.typeahead),C=l.$new();l.$on("$destroy",function(){C.$destroy()});var S="typeahead-"+C.$id+"-"+Math.floor(1e4*Math.random());u.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":S});var _=angular.element("<div typeahead-popup></div>");_.attr({id:S,matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(c.typeaheadTemplateUrl)&&_.attr("template-url",c.typeaheadTemplateUrl);var T=function(){C.matches=[],C.activeIdx=-1,u.attr("aria-expanded",!1)},$=function(e){return S+"-option-"+e};C.$watch("activeIdx",function(e){0>e?u.removeAttr("aria-activedescendant"):u.attr("aria-activedescendant",$(e))});var E=function(e){var t={$viewValue:e};m(l,!0),n.when(k.source(l,t)).then(function(n){var i=e===d.$viewValue;if(i&&p)if(n.length>0){C.activeIdx=w?0:-1,C.matches.length=0;for(var r=0;r<n.length;r++)t[k.itemName]=n[r],C.matches.push({id:$(r),label:k.viewMapper(C,t),model:n[r]});C.query=e,C.position=b?o.offset(u):o.position(u),C.position.top=C.position.top+u.prop("offsetHeight"),u.attr("aria-expanded",!0)}else T();i&&m(l,!1)},function(){T(),m(l,!1)})};T(),C.query=void 0;var D,M=function(e){D=i(function(){E(e)},f)},I=function(){D&&i.cancel(D)};d.$parsers.unshift(function(e){return p=!0,e&&e.length>=h?f>0?(I(),M(e)):E(e):(m(l,!1),I(),T()),g?e:e?void d.$setValidity("editable",!1):(d.$setValidity("editable",!0),e)}),d.$formatters.push(function(e){var t,n,i={};return y?(i.$model=e,y(l,i)):(i[k.itemName]=e,t=k.viewMapper(l,i),i[k.itemName]=void 0,n=k.viewMapper(l,i),t!==n?t:e)}),C.select=function(e){var t,n,r={};r[k.itemName]=n=C.matches[e].model,t=k.modelMapper(l,r),x(l,t),d.$setValidity("editable",!0),v(l,{$item:n,$model:t,$label:k.viewMapper(l,r)}),T(),i(function(){u[0].focus()},0,!1)},u.bind("keydown",function(e){0!==C.matches.length&&-1!==s.indexOf(e.which)&&(-1!=C.activeIdx||13!==e.which&&9!==e.which)&&(e.preventDefault(),40===e.which?(C.activeIdx=(C.activeIdx+1)%C.matches.length,C.$digest()):38===e.which?(C.activeIdx=(C.activeIdx>0?C.activeIdx:C.matches.length)-1,C.$digest()):13===e.which||9===e.which?C.$apply(function(){C.select(C.activeIdx)}):27===e.which&&(e.stopPropagation(),T(),C.$digest()))}),u.bind("blur",function(e){p=!1});var P=function(e){u[0]!==e.target&&(T(),C.$digest())};r.bind("click",P),l.$on("$destroy",function(){r.unbind("click",P),b&&A.remove()});var A=e(_)(C);b?r.find("body").append(A):u.after(A)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(e,t,n){e.templateUrl=n.templateUrl,e.isOpen=function(){return e.matches.length>0},e.isActive=function(t){return e.active==t},e.selectActive=function(t){e.active=t},e.selectMatch=function(t){e.select({activeIdx:t})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(e,t,n,i){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(r,o,a){var s=i(a.templateUrl)(r.$parent)||"template/typeahead/typeahead-match.html";e.get(s,{cache:t}).success(function(e){o.replaceWith(n(e.trim())(r))})}}}]).filter("typeaheadHighlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n){return n?(""+t).replace(new RegExp(e(n),"gi"),"<strong>$&</strong>"):t}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion-group.html",'<div class="panel panel-default">\n <div class="panel-heading">\n <h4 class="panel-title">\n <a href class="accordion-toggle" ng-click="toggleOpen()" accordion-transclude="heading"><span ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n </div>\n <div class="panel-collapse" collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n </div>\n</div>\n')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion.html",'<div class="panel-group" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(e){e.put("template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissable\' : null]" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close()">\n <span aria-hidden="true">×</span>\n <span class="sr-only">Close</span>\n </button>\n <div ng-transclude></div>\n</div>\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(e){e.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n <ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides track by $index" ng-class="{active: isActive(slide)}" ng-click="select(slide)"></li>\n </ol>\n <div class="carousel-inner" ng-transclude></div>\n <a class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-left"></span></a>\n <a class="right carousel-control" ng-click="next()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-right"></span></a>\n</div>\n')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(e){e.put("template/carousel/slide.html","<div ng-class=\"{\n 'active': leaving || (active && !entering),\n 'prev': (next || active) && direction=='prev',\n 'next': (next || active) && direction=='next',\n 'right': direction=='prev',\n 'left': direction=='next'\n }\" class=\"item text-center\" ng-transclude></div>\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/datepicker.html",'<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <daypicker ng-switch-when="day" tabindex="0"></daypicker>\n <monthpicker ng-switch-when="month" tabindex="0"></monthpicker>\n <yearpicker ng-switch-when="year" tabindex="0"></yearpicker>\n</div>')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/day.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{5 + showWeeks}}"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-show="showWeeks" class="text-center"></th>\n <th ng-repeat="label in labels track by $index" class="text-center"><small aria-label="{{label.full}}">{{label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-show="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default btn-sm" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/month.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/popup.html",'<ul class="dropdown-menu" ng-style="{display: (isOpen && \'block\') || \'none\', top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" style="padding:10px 9px 2px">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info" ng-click="select(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger" ng-click="select(null)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right" ng-click="close()">{{ getText(\'close\') }}</button>\n </li>\n</ul>\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/year.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="3"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(e){e.put("template/modal/backdrop.html",'<div class="modal-backdrop fade {{ backdropClass }}"\n ng-class="{in: animate}"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(e){e.put("template/modal/window.html",'<div tabindex="-1" role="dialog" class="modal fade" ng-class="{in: animate}" ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}" ng-click="close($event)">\n <div class="modal-dialog" ng-class="{\'modal-sm\': size == \'sm\', \'modal-lg\': size == \'lg\'}"><div class="modal-content" modal-transclude></div></div>\n</div>')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious(), previous: align}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext(), next: align}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n</ul>')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="boundaryLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(1)">{{getText(\'first\')}}</a></li>\n <li ng-if="directionLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active}"><a href ng-click="selectPage(page.number)">{{page.text}}</a></li>\n <li ng-if="directionLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n <li ng-if="boundaryLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(totalPages)">{{getText(\'last\')}}</a></li>\n</ul>')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-html-unsafe-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" bind-html-unsafe="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(e){e.put("template/popover/popover.html",'<div class="popover {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-show="title"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/progress.html",'<div class="progress" ng-transclude></div>')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>\n</div>')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(e){e.put("template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">\n <i ng-repeat="r in range track by $index" ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')">\n <span class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n </i>\n</span>')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n <a href ng-click="select()" tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane" \n ng-repeat="tab in tabs" \n ng-class="{active: tab.active}"\n tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(e){e.put("template/timepicker/timepicker.html",'<table>\n <tbody>\n <tr class="text-center">\n <td><a ng-click="incrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td> </td>\n <td><a ng-click="incrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidHours}">\n <input type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-mousewheel="incrementHours()" ng-readonly="readonlyInput" maxlength="2">\n </td>\n <td>:</td>\n <td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidMinutes}">\n <input type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2">\n </td>\n <td ng-show="showMeridian"><button type="button" class="btn btn-default text-center" ng-click="toggleMeridian()">{{meridian}}</button></td>\n </tr>\n <tr class="text-center">\n <td><a ng-click="decrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td> </td>\n <td><a ng-click="decrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-match.html",'<a tabindex="-1" bind-html-unsafe="match.label | typeaheadHighlight:query"></a>')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen()" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{match.id}}">\n <div typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),angular.module("hawtio-compat.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(e,t,n){function i(e){for(var t in e)if(void 0!==o.style[t])return e[t]}var r=function(i,o,a){a=a||{};var s=e.defer(),l=r[a.animation?"animationEndEventName":"transitionEndEventName"],u=function(e){n.$apply(function(){i.unbind(l,u),s.resolve(i)})};return l&&i.bind(l,u),t(function(){angular.isString(o)?i.addClass(o):angular.isFunction(o)?o(i):angular.isObject(o)&&i.css(o),l||s.resolve(i)}),s.promise.cancel=function(){l&&i.unbind(l,u),s.reject("Transition cancelled")},s.promise},o=document.createElement("trans"),a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},s={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return r.transitionEndEventName=i(a),r.animationEndEventName=i(s),r}]);var dialogModule=angular.module("hawtio-compat.dialog",["hawtio-compat.transition"]);dialogModule.controller("MessageBoxController",["$scope","dialog","model",function(e,t,n){e.title=n.title,e.message=n.message,e.buttons=n.buttons,e.close=function(e){t.close(e)}}]),dialogModule.provider("$dialog",function(){var e={backdrop:!0,dialogClass:"modal",backdropClass:"modal-backdrop",transitionClass:"fade",triggerClass:"in",resolve:{},backdropFade:!1,dialogFade:!1,keyboard:!0,backdropClick:!0},t={},n={value:0};this.options=function(e){t=e},this.$get=["$http","$document","$compile","$rootScope","$controller","$templateCache","$q","$transition","$injector",function(i,r,o,a,s,l,u,c,d){function p(e){var t=angular.element("<div>");return t.addClass(e),t}function h(n){var i=this,r=this.options=angular.extend({},e,t,n);this._open=!1,this.backdropEl=p(r.backdropClass),r.backdropFade&&(this.backdropEl.addClass(r.transitionClass),this.backdropEl.removeClass(r.triggerClass)),this.modalEl=p(r.dialogClass),r.dialogFade&&(this.modalEl.addClass(r.transitionClass),this.modalEl.removeClass(r.triggerClass)),this.handledEscapeKey=function(e){27===e.which&&(i.close(),e.preventDefault(),i.$scope.$apply())},this.handleBackDropClick=function(e){i.close(),e.preventDefault(),i.$scope.$apply()},this.handleLocationChange=function(){i.close()}}var f=r.find("body");return h.prototype.isOpen=function(){return this._open},h.prototype.open=function(e,t){var n=this,i=this.options;if(e&&(i.templateUrl=e),t&&(i.controller=t),!i.template&&!i.templateUrl)throw new Error("Dialog.open expected template or templateUrl, neither found. Use options or open method to specify them.");return this._loadResolves().then(function(e){var t=e.$scope=n.$scope=e.$scope?e.$scope:a.$new();if(n.modalEl.html(e.$template),n.options.controller){var i=s(n.options.controller,e);n.modalEl.children().data("ngControllerController",i)}o(n.modalEl)(t),n._addElementsToDom(),setTimeout(function(){n.options.dialogFade&&n.modalEl.addClass(n.options.triggerClass),n.options.backdropFade&&n.backdropEl.addClass(n.options.triggerClass)}),n._bindEvents()}),this.deferred=u.defer(),this.deferred.promise},h.prototype.close=function(e){function t(e){e.removeClass(i.options.triggerClass)}function n(){i._open&&i._onCloseComplete(e)}var i=this,r=this._getFadingElements();if(r.length>0)for(var o=r.length-1;o>=0;o--)c(r[o],t).then(n);else this._onCloseComplete(e)},h.prototype._getFadingElements=function(){var e=[];return this.options.dialogFade&&e.push(this.modalEl),this.options.backdropFade&&e.push(this.backdropEl),e},h.prototype._bindEvents=function(){this.options.keyboard&&f.bind("keydown",this.handledEscapeKey),this.options.backdrop&&this.options.backdropClick&&this.backdropEl.bind("click",this.handleBackDropClick)},h.prototype._unbindEvents=function(){this.options.keyboard&&f.unbind("keydown",this.handledEscapeKey),this.options.backdrop&&this.options.backdropClick&&this.backdropEl.unbind("click",this.handleBackDropClick)},h.prototype._onCloseComplete=function(e){this._removeElementsFromDom(),this._unbindEvents(),this.deferred.resolve(e)},h.prototype._addElementsToDom=function(){f.append(this.modalEl),this.options.backdrop&&(0===n.value&&f.append(this.backdropEl),n.value++),this._open=!0},h.prototype._removeElementsFromDom=function(){this.modalEl.remove(),this.options.backdrop&&(n.value--,0===n.value&&this.backdropEl.remove()),this._open=!1},h.prototype._loadResolves=function(){var e,t=[],n=[],r=this;return this.options.template?e=u.when(this.options.template):this.options.templateUrl&&(e=i.get(this.options.templateUrl,{cache:l}).then(function(e){return e.data})),angular.forEach(this.options.resolve||[],function(e,i){n.push(i),t.push(angular.isString(e)?d.get(e):d.invoke(e))}),n.push("$template"),t.push(e),u.all(t).then(function(e){var t={};return angular.forEach(e,function(e,i){t[n[i]]=e}),t.dialog=r,t})},{dialog:function(e){return new h(e)},messageBox:function(e,t,n){return new h({templateUrl:"plugins/ui-bootstrap/html/message.html",controller:"MessageBoxController",resolve:{model:function(){return{title:e,message:t,buttons:n}}}})}}}]}),angular.module("hawtio-compat.modal",["hawtio-compat.dialog"]).directive("modal",["$parse","$dialog",function(e,t){return{restrict:"EA",terminal:!0,link:function(n,i,r){var o,a=angular.extend({},n.$eval(r.uiOptions||r.bsOptions||r.options)),s=r.modal||r.show;a=angular.extend(a,{template:i.html(),resolve:{$scope:function(){return n}}});var l=t.dialog(a);i.remove(),o=r.close?function(){e(r.close)(n)}:function(){angular.isFunction(e(s).assign)&&e(s).assign(n,!1)},n.$watch(s,function(e,t){e?l.open().then(function(){o()}):l.isOpen()&&l.close()})}}}]),function(){"undefined"==typeof Math.sgn&&(Math.sgn=function(e){return 0==e?0:e>0?1:-1});var e={subtract:function(e,t){return{x:e.x-t.x,y:e.y-t.y}},dotProduct:function(e,t){return e.x*t.x+e.y*t.y},square:function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},scale:function(e,t){return{x:e.x*t,y:e.y*t}}},t=64,n=Math.pow(2,-t-1),i=function(t,n){for(var i=[],r=o(t,n),s=n.length-1,l=2*s-1,u=a(r,l,i,0),d=e.subtract(t,n[0]),p=e.square(d),h=0,f=0;u>f;f++){d=e.subtract(t,c(n,s,i[f],null,null));var g=e.square(d);p>g&&(p=g,h=i[f])}return d=e.subtract(t,n[s]),g=e.square(d),p>g&&(p=g,h=1),{location:h,distance:p}},r=function(e,t){var n=i(e,t);return{point:c(t,t.length-1,n.location,null,null),location:n.location}},o=function(t,n){for(var i=n.length-1,r=2*i-1,o=[],a=[],s=[],l=[],u=[[1,.6,.3,.1],[.4,.6,.6,.4],[.1,.3,.6,1]],c=0;i>=c;c++)o[c]=e.subtract(n[c],t);for(var c=0;i-1>=c;c++)a[c]=e.subtract(n[c+1],n[c]),a[c]=e.scale(a[c],3);for(var d=0;i-1>=d;d++)for(var p=0;i>=p;p++)s[d]||(s[d]=[]),s[d][p]=e.dotProduct(a[d],o[p]);for(c=0;r>=c;c++)l[c]||(l[c]=[]),l[c].y=0,l[c].x=parseFloat(c)/r;for(var h=i,f=i-1,g=0;h+f>=g;g++){var m=Math.max(0,g-f),v=Math.min(g,h);for(c=m;v>=c;c++)j=g-c,l[c+j].y+=s[j][c]*u[j][c]}return l},a=function(e,n,i,r){var o,d,p=[],h=[],f=[],g=[];switch(s(e,n)){case 0:return 0;case 1:if(r>=t)return i[0]=(e[0].x+e[n].x)/2,1;if(l(e,n))return i[0]=u(e,n),1}c(e,n,.5,p,h),o=a(p,n,f,r+1),d=a(h,n,g,r+1);for(var m=0;o>m;m++)i[m]=f[m];for(var m=0;d>m;m++)i[m+o]=g[m];return o+d},s=function(e,t){var n,i,r=0;n=i=Math.sgn(e[0].y);for(var o=1;t>=o;o++)n=Math.sgn(e[o].y),n!=i&&r++,i=n;return r},l=function(e,t){var i,r,o,a,s,l,u,c,d,p,h,f,g,m,v,y;l=e[0].y-e[t].y,u=e[t].x-e[0].x,c=e[0].x*e[t].y-e[t].x*e[0].y;for(var b=max_distance_below=0,w=1;t>w;w++){var x=l*e[w].x+u*e[w].y+c;x>b?b=x:x<max_distance_below&&(max_distance_below=x)}return h=0,f=1,g=0,m=l,v=u,y=c-b,d=h*v-m*f,p=1/d,r=(f*y-v*g)*p,m=l,v=u,y=c-max_distance_below,d=h*v-m*f,p=1/d,o=(f*y-v*g)*p,a=Math.min(r,o),s=Math.max(r,o),i=s-a,n>i?1:0},u=function(e,t){var n=1,i=0,r=e[t].x-e[0].x,o=e[t].y-e[0].y,a=e[0].x-0,s=e[0].y-0,l=r*i-o*n,u=1/l,c=(r*s-o*a)*u;return 0+n*c},c=function(e,t,n,i,r){for(var o=[[]],a=0;t>=a;a++)o[0][a]=e[a];for(var s=1;t>=s;s++)for(var a=0;t-s>=a;a++)o[s]||(o[s]=[]),o[s][a]||(o[s][a]={}),o[s][a].x=(1-n)*o[s-1][a].x+n*o[s-1][a+1].x,o[s][a].y=(1-n)*o[s-1][a].y+n*o[s-1][a+1].y;if(null!=i)for(a=0;t>=a;a++)i[a]=o[a][0];if(null!=r)for(a=0;t>=a;a++)r[a]=o[t-a][a];return o[t][0]},d={},p=function(e){var t=d[e];if(!t){t=[];var n=function(){return function(t){return Math.pow(t,e)}},i=function(){return function(t){return Math.pow(1-t,e)}},r=function(e){return function(t){return e}},o=function(){return function(e){return e}},a=function(){return function(e){return 1-e}},s=function(e){return function(t){for(var n=1,i=0;i<e.length;i++)n*=e[i](t);return n}};t.push(new n);for(var l=1;e>l;l++){for(var u=[new r(e)],c=0;e-l>c;c++)u.push(new o);for(var c=0;l>c;c++)u.push(new a);t.push(new s(u))}t.push(new i),d[e]=t}return t},h=function(e,t){for(var n=p(e.length-1),i=0,r=0,o=0;o<e.length;o++)i+=e[o].x*n[o](t),r+=e[o].y*n[o](t);return{x:i,y:r}},f=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},g=function(e){return e[0].x==e[1].x&&e[0].y==e[1].y},m=function(e,t,n){if(g(e))return{point:e[0],location:t};for(var i=h(e,t),r=0,o=t,a=n>0?1:-1,s=null;r<Math.abs(n);)o+=.005*a,s=h(e,o),r+=f(s,i),i=s;return{point:s,location:o}},v=function(e){if(g(e))return 0;for(var t=h(e,0),n=0,i=0,r=1,o=null;1>i;)i+=.005*r,o=h(e,i),n+=f(o,t),t=o;return n},y=function(e,t,n){return m(e,t,n).point},b=function(e,t,n){return m(e,t,n).location},w=function(e,t){var n=h(e,t),i=h(e.slice(0,e.length-1),t),r=i.y-n.y,o=i.x-n.x;return 0==r?1/0:Math.atan(r/o)},x=function(e,t,n){var i=m(e,t,n);return i.location>1&&(i.location=1),i.location<0&&(i.location=0),w(e,i.location)},k=function(e,t,n,i){i=null==i?0:i;var r=m(e,t,i),o=w(e,r.location),a=Math.atan(-1/o),s=n/2*Math.sin(a),l=n/2*Math.cos(a);return[{x:r.point.x+l,y:r.point.y+s},{x:r.point.x-l,y:r.point.y-s}]};this.jsBezier={distanceFromCurve:i,gradientAtPoint:w,gradientAtPointAlongCurveFrom:x,nearestPointOnCurve:r,pointOnCurve:h,pointAlongCurveFrom:y,perpendicularToCurveAt:k,locationAlongCurveFrom:b,getLength:v}}.call(this),function(){"use strict";var e=this.Biltong={},t=function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=function(e,n,i){return e=t(e)?e:[e.x,e.y],n=t(n)?n:[n.x,n.y],i(e,n)},i=e.gradient=function(e,t){return n(e,t,function(e,t){return t[0]==e[0]?t[1]>e[1]?1/0:-(1/0):t[1]==e[1]?t[0]>e[0]?0:-0:(t[1]-e[1])/(t[0]-e[0])})},r=(e.normal=function(e,t){return-1/i(e,t)},e.lineLength=function(e,t){return n(e,t,function(e,t){
|
|
3244
|
|
-return Math.sqrt(Math.pow(t[1]-e[1],2)+Math.pow(t[0]-e[0],2))})},e.quadrant=function(e,t){return n(e,t,function(e,t){return t[0]>e[0]?t[1]>e[1]?2:1:t[0]==e[0]?t[1]>e[1]?2:1:t[1]>e[1]?3:4})}),o=(e.theta=function(e,t){return n(e,t,function(e,t){var n=i(e,t),o=Math.atan(n),a=r(e,t);return(4==a||3==a)&&(o+=Math.PI),0>o&&(o+=2*Math.PI),o})},e.intersects=function(e,t){var n=e.x,i=e.x+e.w,r=e.y,o=e.y+e.h,a=t.x,s=t.x+t.w,l=t.y,u=t.y+t.h;return a>=n&&i>=a&&l>=r&&o>=l||s>=n&&i>=s&&l>=r&&o>=l||a>=n&&i>=a&&u>=r&&o>=u||s>=n&&i>=a&&u>=r&&o>=u||n>=a&&s>=n&&r>=l&&u>=r||i>=a&&s>=i&&r>=l&&u>=r||n>=a&&s>=n&&o>=l&&u>=o||i>=a&&s>=n&&o>=l&&u>=o},e.encloses=function(e,t,n){var i=e.x,r=e.x+e.w,o=e.y,a=e.y+e.h,s=t.x,l=t.x+t.w,u=t.y,c=t.y+t.h,d=function(e,t,i,r){return n?t>=e&&i>=r:t>e&&i>r};return d(i,s,r,l)&&d(o,u,a,c)},[null,[1,-1],[1,1],[-1,1],[-1,-1]]),a=[null,[-1,-1],[-1,1],[1,1],[1,-1]];e.pointOnLine=function(e,t,n){var s=i(e,t),l=r(e,t),u=n>0?o[l]:a[l],c=Math.atan(s),d=Math.abs(n*Math.sin(c))*u[1],p=Math.abs(n*Math.cos(c))*u[0];return{x:e.x+p,y:e.y+d}},e.perpendicularLineTo=function(e,t,n){var r=i(e,t),o=Math.atan(-1/r),a=n/2*Math.sin(o),s=n/2*Math.cos(o);return[{x:t.x+s,y:t.y+a},{x:t.x-s,y:t.y-a}]}}.call(this),function(){"use strict";var e={android:navigator.userAgent.toLowerCase().indexOf("android")>-1},t=function(e,t,n){n=n||e.parentNode;for(var i=n.querySelectorAll(t),r=0;r<i.length;r++)if(i[r]===e)return!0;return!1},n=function(e){return"string"==typeof e?document.getElementById(e):e},i=function(e){return e.srcElement||e.target},r=function(e,t){for(var n=0,i=e.length;i>n&&e[n]!=t;n++);n<e.length&&e.splice(n,1)},o=1,a=function(e,t,n){var i=o++;return e.__ta=e.__ta||{},e.__ta[t]=e.__ta[t]||{},e.__ta[t][i]=n,n.__tauid=i,i},s=function(e,t,n){if(e.__ta&&e.__ta[t]&&delete e.__ta[t][n.__tauid],n.__taExtra){for(var i=0;i<n.__taExtra.length;i++)D(e,n.__taExtra[i][0],n.__taExtra[i][1]);n.__taExtra.length=0}n.__taUnstore&&n.__taUnstore()},l=function(e,n,r,o){if(null==e)return r;var a=e.split(","),s=function(e){s.__tauid=r.__tauid;for(var o=i(e),l=0;l<a.length;l++)t(o,a[l],n)&&r.apply(o,arguments)};return u(r,o,s),s},u=function(e,t,n){e.__taExtra=e.__taExtra||[],e.__taExtra.push([t,n])},c=function(e,t,n,i){if(m&&y[t]){var r=l(i,e,n,y[t]);E(e,y[t],r,n)}E(e,t,l(i,e,n,t),n)},d=function(e,t,n,o){if(null==e.__taSmartClicks){var a=function(t){e.__tad=k(t)},s=function(t){e.__tau=k(t)},l=function(t){if(e.__tad&&e.__tau&&e.__tad[0]===e.__tau[0]&&e.__tad[1]===e.__tau[1])for(var n=0;n<e.__taSmartClicks.length;n++)e.__taSmartClicks[n].apply(i(t),[t])};c(e,"mousedown",a,o),c(e,"mouseup",s,o),c(e,"click",l,o),e.__taSmartClicks=[]}e.__taSmartClicks.push(n),n.__taUnstore=function(){r(e.__taSmartClicks,n)}},p={tap:{touches:1,taps:1},dbltap:{touches:1,taps:2},contextmenu:{touches:2,taps:1}},h=function(e,n){return function(o,a,s,l){if("contextmenu"==a&&v)c(o,a,s,l);else{if(null==o.__taTapHandler){var u=o.__taTapHandler={tap:[],dbltap:[],contextmenu:[],down:!1,taps:0,downSelectors:[]},d=function(i){for(var r=i.srcElement||i.target,a=0;a<u.downSelectors.length;a++)if(null==u.downSelectors[a]||t(r,u.downSelectors[a],o)){u.down=!0,setTimeout(f,e),setTimeout(g,n);break}},h=function(e){if(u.down){var n=e.srcElement||e.target;u.taps++;var r=$(e);for(var a in p){var s=p[a];if(s.touches===r&&(1===s.taps||s.taps===u.taps))for(var l=0;l<u[a].length;l++)(null==u[a][l][1]||t(n,u[a][l][1],o))&&u[a][l][0].apply(i(e),[e])}}},f=function(){u.down=!1},g=function(){u.taps=0};c(o,"mousedown",d),c(o,"mouseup",h)}o.__taTapHandler.downSelectors.push(l),o.__taTapHandler[a].push([s,l]),s.__taUnstore=function(){r(o.__taTapHandler[a],s)}}}},f=function(e,t,n,i){for(var r in n.__tamee[e])n.__tamee[e][r].apply(i,[t])},g=function(){var e=[];return function(n,r,o,s){if(!n.__tamee){n.__tamee={over:!1,mouseenter:[],mouseexit:[]};var u=function(r){var o=i(r);(null==s&&o==n&&!n.__tamee.over||t(o,s,n)&&(null==o.__tamee||!o.__tamee.over))&&(f("mouseenter",r,n,o),o.__tamee=o.__tamee||{},o.__tamee.over=!0,e.push(o))},c=function(r){for(var o=i(r),a=0;a<e.length;a++)o!=e[a]||t(r.relatedTarget||r.toElement,"*",o)||(o.__tamee.over=!1,e.splice(a,1),f("mouseexit",r,n,o))};E(n,"mouseover",l(s,n,u,"mouseover"),u),E(n,"mouseout",l(s,n,c,"mouseout"),c)}o.__taUnstore=function(){delete n.__tamee[r][o.__tauid]},a(n,r,o),n.__tamee[r][o.__tauid]=o}},m="ontouchstart"in document.documentElement,v="onmousedown"in document.documentElement,y={mousedown:"touchstart",mouseup:"touchend",mousemove:"touchmove"},b=function(){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent,n=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=n.exec(t)&&(e=parseFloat(RegExp.$1))}return e}(),w=b>-1&&9>b,x=function(e,t){if(null==e)return[0,0];var n=T(e),i=_(n,0);return[i[t+"X"],i[t+"Y"]]},k=function(e){return null==e?[0,0]:w?[e.clientX+document.documentElement.scrollLeft,e.clientY+document.documentElement.scrollTop]:x(e,"page")},C=function(e){return x(e,"screen")},S=function(e){return x(e,"client")},_=function(e,t){return e.item?e.item(t):e[t]},T=function(e){return e.touches&&e.touches.length>0?e.touches:e.changedTouches&&e.changedTouches.length>0?e.changedTouches:e.targetTouches&&e.targetTouches.length>0?e.targetTouches:[e]},$=function(e){return T(e).length},E=function(e,t,n,i){if(a(e,t,n),i.__tauid=n.__tauid,e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent){var r=t+n.__tauid;e["e"+r]=n,e[r]=function(){e["e"+r]&&e["e"+r](window.event)},e.attachEvent("on"+t,e[r])}},D=function(e,t,i){null!=i&&M(e,function(){var r=n(this);if(s(r,t,i),null!=i.__tauid)if(r.removeEventListener)r.removeEventListener(t,i,!1),m&&y[t]&&r.removeEventListener(y[t],i,!1);else if(this.detachEvent){var o=t+i.__tauid;r[o]&&r.detachEvent("on"+t,r[o]),r[o]=null,r["e"+o]=null}i.__taTouchProxy&&D(e,i.__taTouchProxy[1],i.__taTouchProxy[0])})},M=function(e,t){if(null!=e){e="undefined"!=typeof Window&&"unknown"!=typeof e.top&&e==e.top?[e]:"string"!=typeof e&&null==e.tagName&&null!=e.length?e:"string"==typeof e?document.querySelectorAll(e):[e];for(var n=0;n<e.length;n++)t.apply(e[n])}};this.Mottle=function(t){t=t||{};var i=t.clickThreshold||150,r=t.dblClickThreshold||350,o=new g,a=new h(i,r),s=t.smartClicks,l=function(e,t,i,r){null!=i&&M(e,function(){var e=n(this);s&&"click"===t?d(e,t,i,r):"tap"===t||"dbltap"===t||"contextmenu"===t?a(e,t,i,r):"mouseenter"===t||"mouseexit"==t?o(e,t,i,r):c(e,t,i,r)})};this.remove=function(e){return M(e,function(){var e=n(this);if(e.__ta)for(var t in e.__ta)for(var i in e.__ta[t])D(e,t,e.__ta[t][i]);e.parentNode&&e.parentNode.removeChild(e)}),this},this.on=function(e,t,n,i){var r=arguments[0],o=4==arguments.length?arguments[2]:null,a=arguments[1],s=arguments[arguments.length-1];return l(r,a,s,o),this},this.off=function(e,t,n){return D(e,t,n),this},this.trigger=function(t,i,r,o){var a=v&&("undefined"==typeof MouseEvent||null==r||r.constructor===MouseEvent),s=m&&!v&&y[i]?y[i]:i,l=!(m&&!v&&y[i]),u=k(r),c=C(r),d=S(r);return M(t,function(){var t,p=n(this);r=r||{screenX:c[0],screenY:c[1],clientX:d[0],clientY:d[1]};var h=function(e){o&&(e.payload=o)},f={TouchEvent:function(e){var t=document.createTouch(window,p,0,u[0],u[1],c[0],c[1],d[0],d[1],0,0,0,0),n=document.createTouchList(t),i=document.createTouchList(t),r=document.createTouchList(t);e.initTouchEvent(s,!0,!0,window,null,c[0],c[1],d[0],d[1],!1,!1,!1,!1,n,i,r,1,0)},MouseEvents:function(t){if(t.initMouseEvent(s,!0,!0,window,0,c[0],c[1],d[0],d[1],!1,!1,!1,!1,1,p),e.android){var n=document.createTouch(window,p,0,u[0],u[1],c[0],c[1],d[0],d[1],0,0,0,0);t.touches=t.targetTouches=t.changedTouches=document.createTouchList(n)}}};if(document.createEvent){var g=!l&&!a&&m&&y[i]&&!e.android,v=g?"TouchEvent":"MouseEvents";t=document.createEvent(v),f[v](t),h(t),p.dispatchEvent(t)}else document.createEventObject&&(t=document.createEventObject(),t.eventType=t.eventName=s,t.screenX=c[0],t.screenY=c[1],t.clientX=d[0],t.clientY=d[1],h(t),p.fireEvent("on"+s,t))}),this}},Mottle.consume=function(e,t){e.stopPropagation?e.stopPropagation():e.returnValue=!1,!t&&e.preventDefault&&e.preventDefault()},Mottle.pageLocation=k,Mottle.setForceTouchEvents=function(e){m=e},Mottle.setForceMouseEvents=function(e){v=e}}.call(this),function(){var e=function(e){return"[object Array]"===Object.prototype.toString.call(e)},t=function(e){return"[object Number]"===Object.prototype.toString.call(e)},n=function(e){return"string"==typeof e},i=function(e){return"boolean"==typeof e},r=function(e){return null==e},o=function(e){return null==e?!1:"[object Object]"===Object.prototype.toString.call(e)},a=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s=function(e){return"[object Function]"===Object.prototype.toString.call(e)},l=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},u=this,c=u.jsPlumbUtil={isArray:e,isString:n,isBoolean:i,isNull:r,isObject:o,isDate:a,isFunction:s,isEmpty:l,isNumber:t,clone:function(t){if(n(t))return""+t;if(i(t))return!!t;if(a(t))return new Date(t.getTime());if(s(t))return t;if(e(t)){for(var r=[],l=0;l<t.length;l++)r.push(this.clone(t[l]));return r}if(o(t)){var u={};for(var c in t)u[c]=this.clone(t[c]);return u}return t},merge:function(t,r,a){var s,l,u={};for(a=a||[],l=0;l<a.length;l++)u[a[l]]=!0;var c=this.clone(t);for(l in r)if(null==c[l])c[l]=r[l];else if(n(r[l])||i(r[l]))u[l]?(s=[],s.push.apply(s,e(c[l])?c[l]:[c[l]]),s.push.apply(s,e(r[l])?r[l]:[r[l]]),c[l]=s):c[l]=r[l];else if(e(r[l]))s=[],e(c[l])&&s.push.apply(s,c[l]),s.push.apply(s,r[l]),c[l]=s;else if(o(r[l])){o(c[l])||(c[l]={});for(var d in r[l])c[l][d]=r[l][d]}return c},replace:function(e,t,n){if(null!=e){var i=e,r=i;return t.replace(/([^\.])+/g,function(e,t,i,o){var a=e.match(/([^\[0-9]+){1}(\[)([0-9+])/),s=i+e.length>=o.length,l=function(){return r[a[1]]||function(){return r[a[1]]=[],r[a[1]]}()};if(s)a?l()[a[3]]=n:r[e]=n;else if(a){var u=l();r=u[a[3]]||function(){return u[a[3]]={},u[a[3]]}()}else r=r[e]||function(){return r[e]={},r[e]}()}),e}},functionChain:function(e,t,n){for(var i=0;i<n.length;i++){var r=n[i][0][n[i][1]].apply(n[i][0],n[i][2]);if(r===t)return r}return e},populate:function(t,i){var r=function(e){var t=e.match(/(\${.*?})/g);if(null!=t)for(var n=0;n<t.length;n++){var r=i[t[n].substring(2,t[n].length-1)]||"";null!=r&&(e=e.replace(t[n],r))}return e},a=function(t){if(null!=t){if(n(t))return r(t);if(e(t)){for(var i=[],s=0;s<t.length;s++)i.push(a(t[s]));return i}if(o(t)){var l={};for(var u in t)l[u]=a(t[u]);return l}return t}};return a(t)},convertStyle:function(e,t){if("transparent"===e)return e;var n=e,i=function(e){return 1==e.length?"0"+e:e},r=function(e){return i(Number(e).toString(16))},o=/(rgb[a]?\()(.*)(\))/;if(e.match(o)){var a=e.match(o)[2].split(",");n="#"+r(a[0])+r(a[1])+r(a[2]),t||4!=a.length||(n+=r(a[3]))}return n},findWithFunction:function(e,t){if(e)for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1},indexOf:function(e,t){return e.indexOf?e.indexOf(t):c.findWithFunction(e,function(e){return e==t})},removeWithFunction:function(e,t){var n=c.findWithFunction(e,t);return n>-1&&e.splice(n,1),-1!=n},remove:function(e,t){var n=c.indexOf(e,t);return n>-1&&e.splice(n,1),-1!=n},addWithFunction:function(e,t,n){-1==c.findWithFunction(e,n)&&e.push(t)},addToList:function(e,t,n,i){var r=e[t];return null==r&&(r=[],e[t]=r),r[i?"unshift":"push"](n),r},extend:function(t,n,i){var r;for(n=e(n)?n:[n],r=0;r<n.length;r++)for(var o in n[r].prototype)n[r].prototype.hasOwnProperty(o)&&(t.prototype[o]=n[r].prototype[o]);var a=function(e,t){return function(){for(r=0;r<n.length;r++)n[r].prototype[e]&&n[r].prototype[e].apply(this,arguments);return t.apply(this,arguments)}},s=function(e){for(var n in e)t.prototype[n]=a(n,e[n])};if(arguments.length>2)for(r=2;r<arguments.length;r++)s(arguments[r]);return t},uuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,n="x"==e?t:3&t|8;return n.toString(16)})},logEnabled:!0,log:function(){if(c.logEnabled&&"undefined"!=typeof console)try{var e=arguments[arguments.length-1];console.log(e)}catch(t){}},wrap:function(e,t,n){return e=e||function(){},t=t||function(){},function(){var i=null;try{i=t.apply(this,arguments)}catch(r){c.log("jsPlumb function failed : "+r)}if(null==n||i!==n)try{i=e.apply(this,arguments)}catch(r){c.log("wrapped function failed : "+r)}return i}}};c.EventGenerator=function(){var e={},t=!1,n={ready:!0};this.bind=function(t,n,i){return c.addToList(e,t,n,i),this},this.fire=function(i,r,o){if(!t&&e[i]){var a=e[i].length,s=0,l=!1,u=null;if(!this.shouldFireEvent||this.shouldFireEvent(i,r,o))for(;!l&&a>s&&u!==!1;){if(n[i])e[i][s].apply(this,[r,o]);else try{u=e[i][s].apply(this,[r,o])}catch(d){c.log("jsPlumb: fire failed for event "+i+" : "+d)}s++,(null==e||null==e[i])&&(l=!0)}}return this},this.unbind=function(t){return t?delete e[t]:e={},this},this.getListener=function(t){return e[t]},this.setSuspendEvents=function(e){t=e},this.isSuspendEvents=function(){return t},this.cleanupListeners=function(){for(var t in e)e[t]=null}},c.EventGenerator.prototype={cleanup:function(){this.cleanupListeners()}},Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),n=this,i=function(){},r=function(){return n.apply(this instanceof i&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return i.prototype=this.prototype,r.prototype=new i,r})}.call(this),function(){"use strict";var e=this,t=e.jsPlumbUtil;t.ieVersion=/MSIE\s([\d.]+)/.test(navigator.userAgent)?new Number(RegExp.$1):-1,t.oldIE=t.ieVersion>-1&&t.ieVersion<9,t.matchesSelector=function(e,t,n){n=n||e.parentNode;for(var i=n.querySelectorAll(t),r=0;r<i.length;r++)if(i[r]===e)return!0;return!1},t.consume=function(e,t){e.stopPropagation?e.stopPropagation():e.returnValue=!1,!t&&e.preventDefault&&e.preventDefault()},t.sizeElement=function(e,t,n,i,r){e&&(e.style.height=r+"px",e.height=r,e.style.width=i+"px",e.width=i,e.style.left=t+"px",e.style.top=n+"px")}}.call(this),function(){"use strict";var e,t=this,n=[],i=t.jsPlumbUtil,r=function(){return""+(new Date).getTime()},o=function(e){if(e._jsPlumb.paintStyle&&e._jsPlumb.hoverPaintStyle){var t={};m.extend(t,e._jsPlumb.paintStyle),m.extend(t,e._jsPlumb.hoverPaintStyle),delete e._jsPlumb.hoverPaintStyle,t.gradient&&e._jsPlumb.paintStyle.fillStyle&&delete t.gradient,e._jsPlumb.hoverPaintStyle=t}},a=["tap","dbltap","click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu"],s=function(e,t,n,i){var r=e.getAttachedElements();if(r)for(var o=0,a=r.length;a>o;o++)i&&i==r[o]||r[o].setHover(t,!0,n)},l=function(e){return null==e?null:e.split(" ")},u=function(e,t,n){for(var i in t)e[i]=n},c=function(e,t,n){if(e.getDefaultType){var r=e.getTypeDescriptor(),o={},a=e.getDefaultType(),s=i.merge({},a);u(o,a,"__default");for(var l=0,c=e._jsPlumb.types.length;c>l;l++){var d=e._jsPlumb.types[l];if("__default"!==d){var p=e._jsPlumb.instance.getType(d,r);null!=p&&(s=i.merge(s,p,["cssClass"]),u(o,p,d))}}t&&(s=i.populate(s,t)),e.applyType(s,n,o),n||e.repaint()}},d=window.jsPlumbUIComponent=function(e){jsPlumbUtil.EventGenerator.apply(this,arguments);var t=this,n=arguments,r=t.idPrefix,o=r+(new Date).getTime();this._jsPlumb={instance:e._jsPlumb,parameters:e.parameters||{},paintStyle:null,hoverPaintStyle:null,paintStyleInUse:null,hover:!1,beforeDetach:e.beforeDetach,beforeDrop:e.beforeDrop,overlayPlacements:[],hoverClass:e.hoverClass||e._jsPlumb.Defaults.HoverClass,types:[],typeCache:{}},this.cacheTypeItem=function(e,t,n){this._jsPlumb.typeCache[n]=this._jsPlumb.typeCache[n]||{},this._jsPlumb.typeCache[n][e]=t},this.getCachedTypeItem=function(e,t){return this._jsPlumb.typeCache[t]?this._jsPlumb.typeCache[t][e]:null},this.getId=function(){return o};var a=e.overlays||[],s={};if(this.defaultOverlayKeys){for(var l=0;l<this.defaultOverlayKeys.length;l++)Array.prototype.push.apply(a,this._jsPlumb.instance.Defaults[this.defaultOverlayKeys[l]]||[]);for(l=0;l<a.length;l++){var u=m.convertToFullOverlaySpec(a[l]);s[u[1].id]=u}}var c={overlays:s,parameters:e.parameters||{},scope:e.scope||this._jsPlumb.instance.getDefaultScope()};if(this.getDefaultType=function(){return c},this.appendToDefaultType=function(e){for(var t in e)c[t]=e[t]},e.events)for(l in e.events)t.bind(l,e.events[l]);this.clone=function(){var e={};return this.constructor.apply(e,n),e}.bind(this),this.isDetachAllowed=function(e){var t=!0;if(this._jsPlumb.beforeDetach)try{t=this._jsPlumb.beforeDetach(e)}catch(n){i.log("jsPlumb: beforeDetach callback failed",n)}return t},this.isDropAllowed=function(e,t,n,r,o,a,s){var l=this._jsPlumb.instance.checkCondition("beforeDrop",{sourceId:e,targetId:t,scope:n,connection:r,dropEndpoint:o,source:a,target:s});if(this._jsPlumb.beforeDrop)try{l=this._jsPlumb.beforeDrop({sourceId:e,targetId:t,scope:n,connection:r,dropEndpoint:o,source:a,target:s})}catch(u){i.log("jsPlumb: beforeDrop callback failed",u)}return l};var d=[];this.setListenerComponent=function(e){for(var t=0;t<d.length;t++)d[t][3]=e}},p=function(e,t){var n=e._jsPlumb.types[t],i=e._jsPlumb.instance.getType(n,e.getTypeDescriptor());null!=i&&i.cssClass&&e.canvas&&e._jsPlumb.instance.removeClass(e.canvas,i.cssClass)};jsPlumbUtil.extend(d,jsPlumbUtil.EventGenerator,{getParameter:function(e){return this._jsPlumb.parameters[e]},setParameter:function(e,t){this._jsPlumb.parameters[e]=t},getParameters:function(){return this._jsPlumb.parameters},setParameters:function(e){this._jsPlumb.parameters=e},hasClass:function(e){return m.hasClass(this.canvas,e)},addClass:function(e){m.addClass(this.canvas,e)},removeClass:function(e){m.removeClass(this.canvas,e)},updateClasses:function(e,t){m.updateClasses(this.canvas,e,t)},setType:function(e,t,n){this.clearTypes(),this._jsPlumb.types=l(e)||[],c(this,t,n)},getType:function(){return this._jsPlumb.types},reapplyTypes:function(e,t){c(this,e,t)},hasType:function(e){return-1!=jsPlumbUtil.indexOf(this._jsPlumb.types,e)},addType:function(e,t,n){var i=l(e),r=!1;if(null!=i){for(var o=0,a=i.length;a>o;o++)this.hasType(i[o])||(this._jsPlumb.types.push(i[o]),r=!0);r&&c(this,t,n)}},removeType:function(e,t){var n=l(e),r=!1,o=function(e){var t=i.indexOf(this._jsPlumb.types,e);return-1!=t?(p(this,t),this._jsPlumb.types.splice(t,1),!0):!1}.bind(this);if(null!=n){for(var a=0,s=n.length;s>a;a++)r=o(n[a])||r;r&&c(this,null,t)}},clearTypes:function(e){for(var t=this._jsPlumb.types.length,n=0;t>n;n++)p(this,0),this._jsPlumb.types.splice(0,1);c(this,{},e)},toggleType:function(e,t,n){var i=l(e);if(null!=i){for(var r=0,o=i.length;o>r;r++){var a=jsPlumbUtil.indexOf(this._jsPlumb.types,i[r]);-1!=a?(p(this,a),this._jsPlumb.types.splice(a,1)):this._jsPlumb.types.push(i[r])}c(this,t,n)}},applyType:function(e,t){if(this.setPaintStyle(e.paintStyle,t),this.setHoverPaintStyle(e.hoverPaintStyle,t),e.parameters)for(var n in e.parameters)this.setParameter(n,e.parameters[n]);this._jsPlumb.paintStyleInUse=this.getPaintStyle()},setPaintStyle:function(e,t){this._jsPlumb.paintStyle=e,this._jsPlumb.paintStyleInUse=this._jsPlumb.paintStyle,o(this),t||this.repaint()},getPaintStyle:function(){return this._jsPlumb.paintStyle},setHoverPaintStyle:function(e,t){this._jsPlumb.hoverPaintStyle=e,o(this),t||this.repaint()},getHoverPaintStyle:function(){return this._jsPlumb.hoverPaintStyle},destroy:function(e){(e||null==this.typeId)&&(this.cleanupListeners(),this.clone=null,this._jsPlumb=null)},isHover:function(){return this._jsPlumb.hover},setHover:function(e,t,n){if(this._jsPlumb&&!this._jsPlumb.instance.currentlyDragging&&!this._jsPlumb.instance.isHoverSuspended()){if(this._jsPlumb.hover=e,null!=this.canvas){if(null!=this._jsPlumb.instance.hoverClass){var i=e?"addClass":"removeClass";this._jsPlumb.instance[i](this.canvas,this._jsPlumb.instance.hoverClass)}null!=this._jsPlumb.hoverClass&&this._jsPlumb.instance[i](this.canvas,this._jsPlumb.hoverClass)}null!=this._jsPlumb.hoverPaintStyle&&(this._jsPlumb.paintStyleInUse=e?this._jsPlumb.hoverPaintStyle:this._jsPlumb.paintStyle,this._jsPlumb.instance.isSuspendDrawing()||(n=n||r(),this.repaint({timestamp:n,recalc:!1}))),this.getAttachedElements&&!t&&s(this,e,r(),this)}}});var h=0,f=function(){var e=h+1;return h++,e},g=window.jsPlumbInstance=function(t){this.Defaults={Anchor:"Bottom",Anchors:[null,null],ConnectionsDetachable:!0,ConnectionOverlays:[],Connector:"Bezier",Container:null,DoNotThrowErrors:!1,DragOptions:{},DropOptions:{},Endpoint:"Dot",EndpointOverlays:[],Endpoints:[null,null],EndpointStyle:{fillStyle:"#456"},EndpointStyles:[null,null],EndpointHoverStyle:null,EndpointHoverStyles:[null,null],HoverPaintStyle:null,LabelStyle:{color:"black"},LogEnabled:!1,Overlays:[],MaxConnections:1,PaintStyle:{lineWidth:4,strokeStyle:"#456"},ReattachConnections:!1,RenderMode:"svg",Scope:"jsPlumb_DefaultScope"},t&&m.extend(this.Defaults,t),this.logEnabled=this.Defaults.LogEnabled,this._connectionTypes={},this._endpointTypes={},jsPlumbUtil.EventGenerator.apply(this);var o=this,s=f(),l=o.bind,u={},c=1,p=function(e){if(null==e)return null;if(3==e.nodeType||8==e.nodeType)return{el:e,text:!0};var t=o.getDOMElement(e);return{el:t,id:jsPlumbUtil.isString(e)&&null==t?e:K(t)}};this.getInstanceIndex=function(){return s},this.setZoom=function(e,t){return jsPlumbUtil.oldIE||(c=e,o.fire("zoom",c),t&&o.repaintEverything()),!jsPlumbUtil.oldIE},this.getZoom=function(){return c};for(var h in this.Defaults)u[h]=this.Defaults[h];var g,v=[];this.unbindContainer=function(){if(null!=g&&v.length>0)for(var e=0;e<v.length;e++)o.off(g,v[e][0],v[e][1])},this.setContainer=function(e){this.unbindContainer(),e=this.getDOMElement(e),this.select().each(function(t){t.moveParent(e)}),this.selectEndpoints().each(function(t){t.moveParent(e)}),g=e,v.length=0;for(var t=function(e,t){var n=t.srcElement||t.target,i=(n&&n.parentNode?n.parentNode._jsPlumb:null)||(n?n._jsPlumb:null)||(n&&n.parentNode&&n.parentNode.parentNode?n.parentNode.parentNode._jsPlumb:null);i&&(i.fire(e,i,t),o.fire(e,i.component||i,t))},n=function(e,t,n){v.push([e,n]),o.on(g,e,t,n)},i=function(e){n(e,"._jsPlumb_connector > *",function(n){t(e,n)}),n(e,"._jsPlumb_endpoint, ._jsPlumb_endpoint > *, ._jsPlumb_endpoint svg *",function(n){t(e,n)}),n(e,"._jsPlumb_overlay, ._jsPlumb_overlay *",function(n){t(e,n)})},r=0;r<a.length;r++)i(a[r])},this.getContainer=function(){return g},this.bind=function(e,t){"ready"===e&&b?t():l.apply(o,[e,t])},o.importDefaults=function(e){for(var t in e)o.Defaults[t]=e[t];return e.Container&&o.setContainer(e.Container),o},o.restoreDefaults=function(){return o.Defaults=m.extend({},u),o};var y=null,b=!1,w=[],x={},k={},C={},S={},_={},T={},$=!1,E=[],D=!1,M=null,I=this.Defaults.Scope,P=null,A=1,j=function(){return""+A++},N=function(e,t){g?g.appendChild(e):t?this.getDOMElement(t).appendChild(e):this.appendToRoot(e)}.bind(this),O=function(e,t,n,i){if(!m.headless&&!D){var a=K(e),s=o.getDragManager().getElementsForDraggable(a);null==n&&(n=r());var l=ve({elId:a,offset:t,recalc:!1,timestamp:n});if(s)for(var u in s)ve({elId:s[u].id,offset:{left:l.o.left+s[u].offset.left,top:l.o.top+s[u].offset.top},recalc:!1,timestamp:n});if(o.anchorManager.redraw(a,t,n,null,i),s)for(var c in s)o.anchorManager.redraw(s[c].id,t,n,s[c].offset,i,!0)}},L=function(e,t){var n,r,a,s=null;if(i.isArray(e)){s=[];for(var l=0,u=e.length;u>l;l++)a=o.getDOMElement(e[l]),r=o.getAttribute(a,"id"),s.push(t.apply(o,[a,r]))}else n=o.getDOMElement(e),r=o.getId(n),s=t.apply(o,[n,r]);return s},R=function(e){return k[e]},F=function(e,t,n,r){if(!m.headless){var a=null==t?!1:t;if(a&&m.isDragSupported(e,o)&&!m.isAlreadyDraggable(e,o)){var s=n||o.Defaults.DragOptions;s=m.extend({},s);var l=m.dragEvents.drag,u=m.dragEvents.stop,c=m.dragEvents.start,d=o.getDOMElement(e),p=o.getDragManager().getDragAncestor(d),h={left:0,top:0},f=h,g=!1;me(r,e),s[c]=i.wrap(s[c],function(){return f=null!=p?o.getOffset(p):h,o.setHoverSuspended(!0),o.select({source:e}).addClass(o.elementDraggingClass+" "+o.sourceElementDraggingClass,!0),o.select({target:e}).addClass(o.elementDraggingClass+" "+o.targetElementDraggingClass,!0),o.setConnectionBeingDragged(!0),s.canDrag?n.canDrag():void 0},!1),s[l]=i.wrap(s[l],function(){var t=o.getUIPosition(arguments,o.getZoom());t.left+=f.left,t.top+=f.top,O(e,t,null,!0),g&&o.addClass(e,"jsPlumb_dragged"),g=!0}),s[u]=i.wrap(s[u],function(){var t=[];t=1==arguments.length&&arguments[0].selection&&arguments[0].selection.length>0?arguments[0].selection:[[e,o.getUIPosition(arguments,o.getZoom(),!0)]];for(var n=function(e){O(e[0],e[1]),o.removeClass(e[0],"jsPlumb_dragged"),o.select({source:e[0]}).removeClass(o.elementDraggingClass+" "+o.sourceElementDraggingClass,!0),o.select({target:e[0]}).removeClass(o.elementDraggingClass+" "+o.targetElementDraggingClass,!0),o.getDragManager().dragEnded(e[0])},i=0;i<t.length;i++)n(t[i]);g=!1,o.setHoverSuspended(!1),o.setConnectionBeingDragged(!1)});var v=K(e);T[v]=!0;var y=T[v];s.disabled=null==y?!1:!y,o.initDraggable(e,s),o.getDragManager().register(e)}}},q=function(e,t){for(var n=e.scope.split(/\s/),i=t.scope.split(/\s/),r=0;r<n.length;r++)for(var o=0;o<i.length;o++)if(i[o]==n[r])return!0;return!1},H=function(e,t){var n=m.extend({},e);if(t&&m.extend(n,t),n.source&&(n.source.endpoint?n.sourceEndpoint=n.source:n.source=o.getDOMElement(n.source)),n.target&&(n.target.endpoint?n.targetEndpoint=n.target:n.target=o.getDOMElement(n.target)),e.uuids&&(n.sourceEndpoint=R(e.uuids[0]),n.targetEndpoint=R(e.uuids[1])),n.sourceEndpoint&&n.sourceEndpoint.isFull())return void i.log(o,"could not add connection; source endpoint is full");if(n.targetEndpoint&&n.targetEndpoint.isFull())return void i.log(o,"could not add connection; target endpoint is full");if(!n.type&&n.sourceEndpoint&&(n.type=n.sourceEndpoint.connectionType),n.sourceEndpoint&&n.sourceEndpoint.connectorOverlays){n.overlays=n.overlays||[];for(var r=0,a=n.sourceEndpoint.connectorOverlays.length;a>r;r++)n.overlays.push(n.sourceEndpoint.connectorOverlays[r])}!n["pointer-events"]&&n.sourceEndpoint&&n.sourceEndpoint.connectorPointerEvents&&(n["pointer-events"]=n.sourceEndpoint.connectorPointerEvents);var s=function(e,t){var n=m.extend({},e);for(var i in t)t[i]&&(n[i]=t[i]);return n},l=function(e,t,i){return o.addEndpoint(e,s(t,{anchor:n.anchors?n.anchors[i]:n.anchor,endpoint:n.endpoints?n.endpoints[i]:n.endpoint,paintStyle:n.endpointStyles?n.endpointStyles[i]:n.endpointStyle,hoverPaintStyle:n.endpointHoverStyles?n.endpointHoverStyles[i]:n.endpointHoverStyle}))},u=function(e,t,i){if(n[e]&&!n[e].endpoint&&!n[e+"Endpoint"]&&!n.newConnection){var r=K(n[e]),o=i[r];if(o){if(!o.enabled)return!1;var a=null!=o.endpoint&&o.endpoint._jsPlumb?o.endpoint:l(n[e],o.def,t);if(a.isFull())return!1;n[e+"Endpoint"]=a,a._doNotDeleteOnDetach=!1,a._deleteOnDetach=!0,o.uniqueEndpoint&&(o.endpoint?a.finalEndpoint=o.endpoint:(o.endpoint=a,a._deleteOnDetach=!1,a._doNotDeleteOnDetach=!0))}}};return u("source",0,this.sourceEndpointDefinitions)!==!1&&u("target",1,this.targetEndpointDefinitions)!==!1?(n.sourceEndpoint&&n.targetEndpoint&&(q(n.sourceEndpoint,n.targetEndpoint)||(n=null)),n):void 0}.bind(o),U=function(e){var t=o.Defaults.ConnectionType||o.getDefaultConnectionType();e._jsPlumb=o,e.newConnection=U,e.newEndpoint=z,e.endpointsByUUID=k,e.endpointsByElement=x,e.finaliseConnection=B,e.id="con_"+j();var n=new t(e);return n.isDetachable()&&(n.endpoints[0].initDraggable(),n.endpoints[1].initDraggable()),n},B=o.finaliseConnection=function(e,t,n,i){if(t=t||{},e.suspendedEndpoint||w.push(e),e.endpoints[0].isTemporarySource=!1,(null==e.suspendedEndpoint||i)&&o.anchorManager.newConnection(e),O(e.source),!t.doNotFireConnectionEvent&&t.fireEvent!==!1){var r={connection:e,source:e.source,target:e.target,sourceId:e.sourceId,targetId:e.targetId,sourceEndpoint:e.endpoints[0],targetEndpoint:e.endpoints[1]};o.fire("connection",r,n)}},z=function(e,t){var n=o.Defaults.EndpointType||m.Endpoint,i=m.extend({},e);i._jsPlumb=o,i.newConnection=U,i.newEndpoint=z,i.endpointsByUUID=k,i.endpointsByElement=x,i.fireDetachEvent=ee,i.elementId=t||K(i.source);var r=new n(i);return r.id="ep_"+j(),me(i.elementId,i.source),m.headless||o.getDragManager().endpointAdded(i.source,t),r},V=function(e,t,n){var i=x[e];if(i&&i.length)for(var r=0,o=i.length;o>r;r++){for(var a=0,s=i[r].connections.length;s>a;a++){var l=t(i[r].connections[a]);if(l)return}n&&n(i[r])}},W=function(e,t){return L(e,function(e,n){T[n]=t,this.isDragSupported(e)&&this.setElementDraggable(e,t)})},G=function(e,t,n){t="block"===t;var i=null;n&&(i=t?function(e){e.setVisible(!0,!0,!0)}:function(e){e.setVisible(!1,!0,!0)});var r=p(e);V(r.id,function(e){if(t&&n){var i=e.sourceId===r.id?1:0;e.endpoints[i].isVisible()&&e.setVisible(!0)}else e.setVisible(t)},i)},J=function(e){return L(e,function(e,t){var n=null==T[t]?!1:T[t];return n=!n,T[t]=n,this.setDraggable(e,n),n}.bind(this))},X=function(e,t){var n=null;t&&(n=function(e){var t=e.isVisible();e.setVisible(!t)}),V(e,function(e){var t=e.isVisible();e.setVisible(!t)},n)},Y=function(e){var t=S[e];return t?{o:t,s:E[e]}:ve({elId:e})},K=function(e,t,n){if(jsPlumbUtil.isString(e))return e;if(null==e)return null;var i=o.getAttribute(e,"id");return i&&"undefined"!==i||(2==arguments.length&&void 0!==arguments[1]?i=t:(1==arguments.length||3==arguments.length&&!arguments[2])&&(i="jsPlumb_"+s+"_"+j()),n||o.setAttribute(e,"id",i)),i};this.setConnectionBeingDragged=function(e){$=e},this.isConnectionBeingDragged=function(){return $},this.connectorClass="_jsPlumb_connector",this.connectedClass="_jsPlumb_connected",this.hoverClass="_jsPlumb_hover",this.endpointClass="_jsPlumb_endpoint",this.endpointConnectedClass="_jsPlumb_endpoint_connected",this.endpointFullClass="_jsPlumb_endpoint_full",this.endpointDropAllowedClass="_jsPlumb_endpoint_drop_allowed",this.endpointDropForbiddenClass="_jsPlumb_endpoint_drop_forbidden",this.overlayClass="_jsPlumb_overlay",this.draggingClass="_jsPlumb_dragging",this.elementDraggingClass="_jsPlumb_element_dragging",this.sourceElementDraggingClass="_jsPlumb_source_element_dragging",this.targetElementDraggingClass="_jsPlumb_target_element_dragging",this.endpointAnchorClassPrefix="_jsPlumb_endpoint_anchor",this.hoverSourceClass="_jsPlumb_source_hover",this.hoverTargetClass="_jsPlumb_target_hover",this.dragSelectClass="_jsPlumb_drag_select",this.Anchors={},this.Connectors={svg:{},vml:{}},this.Endpoints={svg:{},vml:{}},this.Overlays={svg:{},vml:{}},this.ConnectorRenderers={},this.SVG="svg",this.VML="vml",this.addEndpoint=function(e,t,n){n=n||{};var r=m.extend({},n);m.extend(r,t),r.endpoint=r.endpoint||o.Defaults.Endpoint,r.paintStyle=r.paintStyle||o.Defaults.EndpointStyle;for(var a=[],s=i.isArray(e)||null!=e.length&&!i.isString(e)?e:[e],l=0,u=s.length;u>l;l++){r.source=o.getDOMElement(s[l]),fe(r.source);var c=K(r.source),d=z(r,c),p=me(c,r.source).info.o;i.addToList(x,c,d),D||d.paint({anchorLoc:d.anchor.compute({xy:[p.left,p.top],wh:E[c],element:d,timestamp:M}),timestamp:M}),a.push(d),d._doNotDeleteOnDetach=!0}return 1==a.length?a[0]:a},this.addEndpoints=function(e,t,n){for(var r=[],a=0,s=t.length;s>a;a++){var l=o.addEndpoint(e,t[a],n);i.isArray(l)?Array.prototype.push.apply(r,l):r.push(l)}return r},this.animate=function(e,t,n){if(!this.animationSupported)return!1;n=n||{};var r=o.getDOMElement(e),a=K(r),s=m.animEvents.step,l=m.animEvents.complete;n[s]=i.wrap(n[s],function(){o.revalidate(a)}),n[l]=i.wrap(n[l],function(){o.revalidate(a)}),o.doAnimate(r,t,n)},this.checkCondition=function(e,t){var n=o.getListener(e),r=!0;if(n&&n.length>0)try{for(var a=0,s=n.length;s>a;a++)r=r&&n[a](t)}catch(l){i.log(o,"cannot check condition ["+e+"]"+l)}return r},this.connect=function(e,t){var n,i=H(e,t);if(i){if(null==i.source&&null==i.sourceEndpoint)return void jsPlumbUtil.log("Cannot establish connection - source does not exist");if(null==i.target&&null==i.targetEndpoint)return void jsPlumbUtil.log("Cannot establish connection - target does not exist");fe(i.source),n=U(i),B(n,i)}return n};var Q=[{el:"source",
|
|
3245
|
|
-elId:"sourceId",epDefs:"sourceEndpointDefinitions"},{el:"target",elId:"targetId",epDefs:"targetEndpointDefinitions"}],Z=function(e,t,n,i){var r,o,a,s=Q[n],l=e[s.elId],u=(e[s.el],e.endpoints[n]),c={index:n,originalSourceId:0===n?l:e.sourceId,newSourceId:e.sourceId,originalTargetId:1==n?l:e.targetId,newTargetId:e.targetId,connection:e};if(t.constructor==m.Endpoint)r=t,r.addConnection(e);else if(o=K(t),a=this[s.epDefs][o],o===e[s.elId])r=null;else if(a){if(!a.enabled)return;r=null!=a.endpoint&&a.endpoint._jsPlumb?a.endpoint:this.addEndpoint(t,a.def),a.uniqueEndpoint&&(a.endpoint=r),r._doNotDeleteOnDetach=!1,r._deleteOnDetach=!0,r.addConnection(e)}else r=e.makeEndpoint(0===n,t,o),r._doNotDeleteOnDetach=!1,r._deleteOnDetach=!0;return null!=r&&(u.detachFromConnection(e),e.endpoints[n]=r,e[s.el]=r.element,e[s.elId]=r.elementId,c[0===n?"newSourceId":"newTargetId"]=r.elementId,te(c),i||e.repaint()),c}.bind(this);this.setSource=function(e,t,n){var i=Z(e,t,0,n);this.anchorManager.sourceChanged(i.originalSourceId,i.newSourceId,e)},this.setTarget=function(e,t,n){var i=Z(e,t,1,n);this.anchorManager.updateOtherEndpoint(i.originalSourceId,i.originalTargetId,i.newTargetId,e)},this.deleteEndpoint=function(e,t){var n="string"==typeof e?k[e]:e;return n&&o.deleteObject({endpoint:n,dontUpdateHover:t}),o},this.deleteEveryEndpoint=function(){var e=o.setSuspendDrawing(!0);for(var t in x){var n=x[t];if(n&&n.length)for(var i=0,r=n.length;r>i;i++)o.deleteEndpoint(n[i],!0)}return x={},C={},k={},o.anchorManager.reset(),o.getDragManager().reset(),e||o.setSuspendDrawing(!1),o};var ee=function(e,t,n){var i=o.Defaults.ConnectionType||o.getDefaultConnectionType(),r=e.constructor==i,a=r?{connection:e,source:e.source,target:e.target,sourceId:e.sourceId,targetId:e.targetId,sourceEndpoint:e.endpoints[0],targetEndpoint:e.endpoints[1]}:e;t&&o.fire("connectionDetached",a,n),o.anchorManager.connectionDetached(a)},te=o.fireMoveEvent=function(e,t){o.fire("connectionMoved",e,t)};this.unregisterEndpoint=function(e){e._jsPlumb.uuid&&(k[e._jsPlumb.uuid]=null),o.anchorManager.deleteEndpoint(e);for(var t in x){var n=x[t];if(n){for(var i=[],r=0,a=n.length;a>r;r++)n[r]!=e&&i.push(n[r]);x[t]=i}x[t].length<1&&delete x[t]}},this.detach=function(){if(0!==arguments.length){var e=o.Defaults.ConnectionType||o.getDefaultConnectionType(),t=arguments[0].constructor==e,n=2==arguments.length&&t?arguments[1]||{}:arguments[0],i=n.fireEvent!==!1,r=n.forceDetach,a=t?arguments[0]:n.connection;if(a)(r||jsPlumbUtil.functionChain(!0,!1,[[a.endpoints[0],"isDetachAllowed",[a]],[a.endpoints[1],"isDetachAllowed",[a]],[a,"isDetachAllowed",[a]],[o,"checkCondition",["beforeDetach",a]]]))&&a.endpoints[0].detach(a,!1,!0,i);else{var s=m.extend({},n);if(s.uuids)R(s.uuids[0]).detachFrom(R(s.uuids[1]),i);else if(s.sourceEndpoint&&s.targetEndpoint)s.sourceEndpoint.detachFrom(s.targetEndpoint);else{var l=K(o.getDOMElement(s.source)),u=K(o.getDOMElement(s.target));V(l,function(e){(e.sourceId==l&&e.targetId==u||e.targetId==l&&e.sourceId==u)&&o.checkCondition("beforeDetach",e)&&e.endpoints[0].detach(e,!1,!0,i)})}}}},this.detachAllConnections=function(e,t){t=t||{},e=o.getDOMElement(e);var n=K(e),i=x[n];if(i&&i.length)for(var r=0,a=i.length;a>r;r++)i[r].detachAll(t.fireEvent!==!1,t.forceDetach);return o},this.detachEveryConnection=function(e){return e=e||{},o.batch(function(){for(var t in x){var n=x[t];if(n&&n.length)for(var i=0,r=n.length;r>i;i++)n[i].detachAll(e.fireEvent!==!1,e.forceDetach)}w.length=0}),o},this.deleteObject=function(e){var t={endpoints:{},connections:{},endpointCount:0,connectionCount:0},n=e.fireEvent!==!1,i=e.deleteAttachedObjects!==!1,r=function(n){if(null!=n&&null==t.connections[n.id]&&(e.dontUpdateHover||null==n._jsPlumb||n.setHover(!1),t.connections[n.id]=n,t.connectionCount++,i))for(var r=0;r<n.endpoints.length;r++)n.endpoints[r]._deleteOnDetach&&a(n.endpoints[r])},a=function(n){if(null!=n&&null==t.endpoints[n.id]&&(e.dontUpdateHover||null==n._jsPlumb||n.setHover(!1),t.endpoints[n.id]=n,t.endpointCount++,i))for(var o=0;o<n.connections.length;o++){var a=n.connections[o];r(a)}};e.connection?r(e.connection):a(e.endpoint);for(var s in t.connections){var l=t.connections[s];l._jsPlumb&&(jsPlumbUtil.removeWithFunction(w,function(e){return l.id==e.id}),ee(l,n,e.originalEvent),l.endpoints[0].detachFromConnection(l),l.endpoints[1].detachFromConnection(l),l.cleanup(!0),l.destroy(!0))}for(var u in t.endpoints){var c=t.endpoints[u];c._jsPlumb&&(o.unregisterEndpoint(c),c.cleanup(!0),c.destroy(!0))}return t},this.draggable=function(e,t){var n,i,r;if("object"==typeof e&&e.length)for(n=0,i=e.length;i>n;n++)r=p(e[n]),r.el&&F(r.el,!0,t,r.id);else r=p(e),r.el&&F(r.el,!0,t,r.id);return o};var ne=function(e,t,n,i){for(var r=0,o=e.length;o>r;r++)e[r][t].apply(e[r],n);return i(e)},ie=function(e,t,n){for(var i=[],r=0,o=e.length;o>r;r++)i.push([e[r][t].apply(e[r],n),e[r]]);return i},re=function(e,t,n){return function(){return ne(e,t,arguments,n)}},oe=function(e,t){return function(){return ie(e,t,arguments)}},ae=function(e,t){var n=[];if(e)if("string"==typeof e){if("*"===e)return e;n.push(e)}else if(t)n=e;else if(e.length)for(var i=0,r=e.length;r>i;i++)n.push(p(e[i]).id);else n.push(p(e).id);return n},se=function(e,t,n){return"*"===e?!0:e.length>0?-1!=jsPlumbUtil.indexOf(e,t):!n};this.getConnections=function(e,t){e?e.constructor==String&&(e={scope:e}):e={};for(var n=e.scope||o.getDefaultScope(),i=ae(n,!0),r=ae(e.source),a=ae(e.target),s=!t&&i.length>1?{}:[],l=function(e,n){if(!t&&i.length>1){var r=s[e];null==r&&(r=s[e]=[]),r.push(n)}else s.push(n)},u=0,c=w.length;c>u;u++){var d=w[u];se(i,d.scope)&&se(r,d.sourceId)&&se(a,d.targetId)&&l(d.scope,d)}return s};var le=function(e,t){return function(n){for(var i=0,r=e.length;r>i;i++)n(e[i]);return t(e)}},ue=function(e){return function(t){return e[t]}},ce=function(e,t){var n,i,r={length:e.length,each:le(e,t),get:ue(e)},o=["setHover","removeAllOverlays","setLabel","addClass","addOverlay","removeOverlay","removeOverlays","showOverlay","hideOverlay","showOverlays","hideOverlays","setPaintStyle","setHoverPaintStyle","setSuspendEvents","setParameter","setParameters","setVisible","repaint","addType","toggleType","removeType","removeClass","setType","bind","unbind"],a=["getLabel","getOverlay","isHover","getParameter","getParameters","getPaintStyle","getHoverPaintStyle","isVisible","hasType","getType","isSuspendEvents"];for(n=0,i=o.length;i>n;n++)r[o[n]]=re(e,o[n],t);for(n=0,i=a.length;i>n;n++)r[a[n]]=oe(e,a[n]);return r},de=function(e){var t=ce(e,de);return m.extend(t,{setDetachable:re(e,"setDetachable",de),setReattach:re(e,"setReattach",de),setConnector:re(e,"setConnector",de),detach:function(){for(var t=0,n=e.length;n>t;t++)o.detach(e[t])},isDetachable:oe(e,"isDetachable"),isReattach:oe(e,"isReattach")})},pe=function(e){var t=ce(e,pe);return m.extend(t,{setEnabled:re(e,"setEnabled",pe),setAnchor:re(e,"setAnchor",pe),isEnabled:oe(e,"isEnabled"),detachAll:function(){for(var t=0,n=e.length;n>t;t++)e[t].detachAll()},remove:function(){for(var t=0,n=e.length;n>t;t++)o.deleteObject({endpoint:e[t]})}})};this.select=function(e){return e=e||{},e.scope=e.scope||"*",de(e.connections||o.getConnections(e,!0))},this.selectEndpoints=function(e){e=e||{},e.scope=e.scope||"*";var t=!e.element&&!e.source&&!e.target,n=t?"*":ae(e.element),i=t?"*":ae(e.source),r=t?"*":ae(e.target),o=ae(e.scope,!0),a=[];for(var s in x){var l=se(n,s,!0),u=se(i,s,!0),c="*"!=i,d=se(r,s,!0),p="*"!=r;if(l||u||d)e:for(var h=0,f=x[s].length;f>h;h++){var g=x[s][h];if(se(o,g.scope,!0)){var m=c&&i.length>0&&!g.isSource,v=p&&r.length>0&&!g.isTarget;if(m||v)continue e;a.push(g)}}}return pe(a)},this.getAllConnections=function(){return w},this.getDefaultScope=function(){return I},this.getEndpoint=R,this.getEndpoints=function(e){return x[p(e).id]},this.getDefaultEndpointType=function(){return m.Endpoint},this.getDefaultConnectionType=function(){return m.Connection},this.getId=K,this.appendElement=N;var he=!1;this.isHoverSuspended=function(){return he},this.setHoverSuspended=function(e){he=e},this.hide=function(e,t){return G(e,"none",t),o},this.idstamp=j,this.connectorsInitialized=!1,this.registerConnectorType=function(e,t){n.push([e,t])};var fe=function(e){if(!g&&e){var t=o.getDOMElement(e);t.offsetParent&&o.setContainer(t.offsetParent)}},ge=function(){o.Defaults.Container&&o.setContainer(o.Defaults.Container)},me=o.manage=function(e,t){return C[e]||(C[e]={el:t,endpoints:[],connections:[]},C[e].info=ve({elId:e,timestamp:M})),C[e]},ve=this.updateOffset=function(e){var t,n=e.timestamp,i=e.recalc,r=e.offset,a=e.elId;return D&&!n&&(n=M),!i&&n&&n===_[a]?{o:e.offset||S[a],s:E[a]}:(i||!r&&null==S[a]?(t=C[a]?C[a].el:null,null!=t&&(E[a]=o.getSize(t),S[a]=o.getOffset(t),_[a]=n)):(S[a]=r||S[a],null==E[a]&&(t=C[a].el,null!=t&&(E[a]=o.getSize(t))),_[a]=n),S[a]&&!S[a].right&&(S[a].right=S[a].left+E[a][0],S[a].bottom=S[a].top+E[a][1],S[a].width=E[a][0],S[a].height=E[a][1],S[a].centerx=S[a].left+S[a].width/2,S[a].centery=S[a].top+S[a].height/2),{o:S[a],s:E[a]})};this.init=function(){e=m.getRenderModes();var t=function(e,t,n){m.Connectors[e][t]=function(){n.apply(this,arguments),m.ConnectorRenderers[e].apply(this,arguments)},jsPlumbUtil.extend(m.Connectors[e][t],[n,m.ConnectorRenderers[e]])};if(!m.connectorsInitialized){for(var i=0;i<n.length;i++)for(var r=0;r<e.length;r++)t(e[r],n[i][1],n[i][0]);m.connectorsInitialized=!0}b||(ge(),o.anchorManager=new m.AnchorManager({jsPlumbInstance:o}),o.setRenderMode(o.Defaults.RenderMode),b=!0,o.fire("ready",o))}.bind(this),this.log=y,this.jsPlumbUIComponent=d,this.makeAnchor=function(){var e,t=function(e,t){if(m.Anchors[e])return new m.Anchors[e](t);if(!o.Defaults.DoNotThrowErrors)throw{msg:"jsPlumb: unknown anchor type '"+e+"'"}};if(0===arguments.length)return null;var n=arguments[0],r=arguments[1],a=(arguments[2],null);if(n.compute&&n.getOrientation)return n;if("string"==typeof n)a=t(arguments[0],{elementId:r,jsPlumbInstance:o});else if(i.isArray(n))if(i.isArray(n[0])||i.isString(n[0]))2==n.length&&i.isObject(n[1])?i.isString(n[0])?(e=m.extend({elementId:r,jsPlumbInstance:o},n[1]),a=t(n[0],e)):(e=m.extend({elementId:r,jsPlumbInstance:o,anchors:n[0]},n[1]),a=new m.DynamicAnchor(e)):a=new m.DynamicAnchor({anchors:n,selector:null,elementId:r,jsPlumbInstance:o});else{var s={x:n[0],y:n[1],orientation:n.length>=4?[n[2],n[3]]:[0,0],offsets:n.length>=6?[n[4],n[5]]:[0,0],elementId:r,jsPlumbInstance:o,cssClass:7==n.length?n[6]:null};a=new m.Anchor(s),a.clone=function(){return new m.Anchor(s)}}return a.id||(a.id="anchor_"+j()),a},this.makeAnchors=function(e,t,n){for(var r=[],a=0,s=e.length;s>a;a++)"string"==typeof e[a]?r.push(m.Anchors[e[a]]({elementId:t,jsPlumbInstance:n})):i.isArray(e[a])&&r.push(o.makeAnchor(e[a],t,n));return r},this.makeDynamicAnchor=function(e,t){return new m.DynamicAnchor({anchors:e,selector:t,elementId:null,jsPlumbInstance:o})},this.targetEndpointDefinitions={};var ye=function(e,t,n){e.paintStyle=e.paintStyle||n.Defaults.EndpointStyles[t]||n.Defaults.EndpointStyle,e.hoverPaintStyle=e.hoverPaintStyle||n.Defaults.EndpointHoverStyles[t]||n.Defaults.EndpointHoverStyle,e.anchor=e.anchor||n.Defaults.Anchors[t]||n.Defaults.Anchor,e.endpoint=e.endpoint||n.Defaults.Endpoints[t]||n.Defaults.Endpoint};this.sourceEndpointDefinitions={};var be=function(e,t,n,i,r){for(var o=e.target||e.srcElement,a=!1,s=i.getSelector(t,n),l=0;l<s.length;l++)if(s[l]==o){a=!0;break}return r?!a:a},we=function(e,t,n,r,a,s){var l=new d(t),u=t._jsPlumb.EndpointDropHandler({jsPlumb:o,enabled:function(){return e.el[s].enabled},isFull:function(n){var i=o.select({target:e.id}).length,r=e.el[s],a=r.maxConnections>0&&i>=r.maxConnections;return a&&t.onMaxConnections&&t.onMaxConnections({element:e.el,connection:jpc},n),a},element:e.el,elementId:e.id,isSource:r,isTarget:a,addClass:function(t){o.addClass(e.el,t)},removeClass:function(t){o.removeClass(e.el,t)},onDrop:function(e){var t=e.endpoints[0];t.anchor.locked=!1},isDropAllowed:function(){return l.isDropAllowed.apply(l,arguments)},getEndpoint:function(n){var i=e.el[s],r=i.endpoint;if((null==r||null==r._jsPlumb)&&(r=o.addEndpoint(e.el,t),r._mtNew=!0),t.uniqueEndpoint&&(i.endpoint=r),r._doNotDeleteOnDetach=!1,r._deleteOnDetach=!0,n.isDetachable()&&r.initDraggable(),null!=r.anchor.positionFinder){var a=o.getUIPosition(arguments,o.getZoom()),l=o.getOffset(e.el),u=o.getSize(e.el),c=r.anchor.positionFinder(a,l,u,r.anchor.constructorParams);r.anchor.x=c[0],r.anchor.y=c[1]}return r},maybeCleanup:function(e){e._mtNew&&0===e.connections.length?o.deleteObject({endpoint:e}):delete e._mtNew}}),c=m.dragEvents.drop;return n.scope=n.scope||t.scope||o.Defaults.Scope,n[c]=i.wrap(n[c],u,!0),a&&(n[m.dragEvents.over]=function(){return!0}),t.allowLoopback===!1&&(n.canDrop=function(t){var n=t.getDragElement()._jsPlumbRelatedElement;return n!=e.el}),o.initDroppable(e.el,n,"internal"),u};this.makeTarget=function(e,t,n){var i=m.extend({_jsPlumb:this},n);m.extend(i,t),ye(i,1,this);for(var r=(!(i.deleteEndpointsOnDetach===!1),i.maxConnections||-1),o=function(e){var t=p(e),n=t.id,o=m.extend({},i.dropOptions||{});fe(n);var a={def:i,uniqueEndpoint:i.uniqueEndpoint,maxConnections:r,enabled:!0};t.el._jsPlumbTarget=a,this.targetEndpointDefinitions[n]=a,we(t,i,o,i.isSource===!0,!0,"_jsPlumbTarget")}.bind(this),a=e.length&&e.constructor!=String?e:[e],s=0,l=a.length;l>s;s++)o(a[s]);return this},this.unmakeTarget=function(e,t){var n=p(e);return m.destroyDroppable(n.el),t||delete this.targetEndpointDefinitions[n.id],this},this.makeSource=function(e,t,n){var r=m.extend({_jsPlumb:this},n);m.extend(r,t),ye(r,0,this);for(var a=r.maxConnections||1,s=r.onMaxConnections,l=function(e){var t=e.id,n=this.getDOMElement(e.el);fe(t);var l={def:r,uniqueEndpoint:r.uniqueEndpoint,maxConnections:a,enabled:!0};this.sourceEndpointDefinitions[t]=l,e.el._jsPlumbSource=l;var u=m.dragEvents.stop,d=m.dragEvents.drag,p=m.extend({},r.dragOptions||{}),h=p.drag,f=p.stop,g=null,v=!1;p.scope=p.scope||r.scope,p[d]=i.wrap(p[d],function(){h&&h.apply(this,arguments),v=!1}),p[u]=i.wrap(p[u],function(){if(f&&f.apply(this,arguments),this.currentlyDragging=!1,null!=g._jsPlumb){var e=r.anchor||this.Defaults.Anchor,n=g.anchor,i=g.connections[0],a=this.makeAnchor(e,t,this),s=g.element;if(null!=a.positionFinder){var l=o.getOffset(s),u=this.getSize(s),c={left:l.left+n.x*u[0],top:l.top+n.y*u[1]},d=a.positionFinder(c,l,u,a.constructorParams);a.x=d[0],a.y=d[1]}g.setAnchor(a,!0),g.repaint(),this.repaint(g.elementId),null!=i&&this.repaint(i.targetId)}}.bind(this));var y=function(i){var l=this.getOriginalEvent(i);if(3!==i.which&&2!==i.button){var u=this.sourceEndpointDefinitions[t];if(u.enabled){if(t=this.getId(this.getDOMElement(e.el)),r.filter){var d=jsPlumbUtil.isString(r.filter)?be(l,e.el,r.filter,this,r.filterExclude):r.filter(l,e.el);if(d===!1)return}var h=this.select({source:t}).length;if(u.maxConnections>=0&&u.uniqueEndpoint&&h>=u.maxConnections)return s&&s({element:e.el,maxConnections:a},i),!1;var f=m.getPositionOnElement(l,n,c),y={};m.extend(y,r),y.isTemporarySource=!0,y.anchor=[f[0],f[1],0,0],y.dragOptions=p,g=this.addEndpoint(t,y),v=!0,g._doNotDeleteOnDetach=!1,g._deleteOnDetach=!0,u.uniqueEndpoint&&(u.endpoint?g.finalEndpoint=u.endpoint:(u.endpoint=g,g._deleteOnDetach=!1,g._doNotDeleteOnDetach=!0));var b=function(){o.off(g.canvas,"mouseup",b),o.off(e.el,"mouseup",b),v&&(v=!1,o.deleteEndpoint(g))};o.on(g.canvas,"mouseup",b),o.on(e.el,"mouseup",b),o.trigger(g.canvas,"mousedown",i),jsPlumbUtil.consume(i)}}}.bind(this);this.on(e.el,"mousedown",y),l.trigger=y,r.filter&&(jsPlumbUtil.isString(r.filter)||jsPlumbUtil.isFunction(r.filter))&&o.setDragFilter(e.el,r.filter);var b=m.extend({},r.dropOptions||{});we(e,r,b,!0,r.isTarget===!0,"_jsPlumbSource")}.bind(this),u=e.length&&e.constructor!=String?e:[e],d=0,h=u.length;h>d;d++)l(p(u[d]));return this},this.unmakeSource=function(e,t){var n=p(e),i=this.sourceEndpointDefinitions[n.id].trigger;return i&&o.off(n.el,"mousedown",i),t||delete this.sourceEndpointDefinitions[n.id],this},this.unmakeEverySource=function(){for(var e in this.sourceEndpointDefinitions)o.unmakeSource(e,!0);return this.sourceEndpointDefinitions={},this};var xe=function(e,t){t=jsPlumbUtil.isArray(t)?t:[t];for(var n=K(e),i=0;i<t.length;i++){var r=this[t[i]][n];if(r)return r.def.scope||this.Defaults.Scope}}.bind(this),ke=function(e,t,n){n=jsPlumbUtil.isArray(n)?n:[n];for(var i=K(e),r=0;r<n.length;r++){var o=this[n[r]][i];o&&(o.def.scope=t,null!=this.scopeChange&&this.scopeChange(e,i,x[i],t,n[r]))}}.bind(this);this.getScope=function(e,t){return xe(e,["sourceEndpointDefinitions","targetEndpointDefinitions"])},this.getSourceScope=function(e){return xe(e,"sourceEndpointDefinitions")},this.getTargetScope=function(e){return xe(e,"targetEndpointDefinitions")},this.setScope=function(e,t){ke(e,t,["sourceEndpointDefinitions","targetEndpointDefinitions"])},this.setSourceScope=function(e,t){ke(e,t,"sourceEndpointDefinitions")},this.setTargetScope=function(e,t){ke(e,t,"targetEndpointDefinitions")},this.unmakeEveryTarget=function(){for(var e in this.targetEndpointDefinitions)o.unmakeTarget(e,!0);return this.targetEndpointDefinitions={},this};var Ce=function(e,t,n,r){var o="source"==e?this.sourceEndpointDefinitions:this.targetEndpointDefinitions;if(i.isString(t))o[t].enabled=r?!o[t].enabled:n;else if(t.length)for(var a=0,s=t.length;s>a;a++){var l=p(t[a]);o[l.id]&&(o[l.id].enabled=r?!o[l.id].enabled:n)}else{var u=p(t).id;o[u].enabled=r?!o[u].enabled:n}return this}.bind(this),Se=function(e,t){return i.isString(e)||!e.length?t.apply(this,[e]):e.length?t.apply(this,[e[0]]):void 0}.bind(this);this.toggleSourceEnabled=function(e){return Ce("source",e,null,!0),this.isSourceEnabled(e)},this.setSourceEnabled=function(e,t){return Ce("source",e,t)},this.isSource=function(e){return Se(e,function(e){return null!=this.sourceEndpointDefinitions[p(e).id]}.bind(this))},this.isSourceEnabled=function(e){return Se(e,function(e){var t=this.sourceEndpointDefinitions[p(e).id];return t&&t.enabled===!0}.bind(this))},this.toggleTargetEnabled=function(e){return Ce("target",e,null,!0),this.isTargetEnabled(e)},this.isTarget=function(e){return Se(e,function(e){return null!=this.targetEndpointDefinitions[p(e).id]}.bind(this))},this.isTargetEnabled=function(e){return Se(e,function(e){var t=this.targetEndpointDefinitions[p(e).id];return t&&t.enabled===!0}.bind(this))},this.setTargetEnabled=function(e,t){return Ce("target",e,t)},this.ready=function(e){o.bind("ready",e)},this.repaint=function(e,t,n){if("object"==typeof e&&e.length)for(var i=0,r=e.length;r>i;i++)O(e[i],t,n);else O(e,t,n);return o},this.revalidate=function(e,t,n){var i=n?e:o.getId(e);return o.updateOffset({elId:i,recalc:!0,timestamp:t}),o.repaint(e)},this.repaintEverything=function(){var e,t=r();for(e in x)o.updateOffset({elId:e,recalc:!0,timestamp:t});for(e in x)O(e,null,t);return this},this.removeAllEndpoints=function(e,t,n){n=n||[];var i=function(e){var r,a,s=p(e),l=x[s.id];if(l)for(n.push(s),r=0,a=l.length;a>r;r++)o.deleteEndpoint(l[r]);if(delete x[s.id],t&&s.el&&3!=s.el.nodeType&&8!=s.el.nodeType)for(r=0,a=s.el.childNodes.length;a>r;r++)i(s.el.childNodes[r])};return i(e),this};var _e=function(e,t){o.removeAllEndpoints(e.id,!0,t);for(var n=function(e){o.getDragManager().elementRemoved(e.id),o.anchorManager.clearFor(e.id),o.anchorManager.removeFloatingConnection(e.id),delete o.floatingConnections[e.id],delete C[e.id],delete S[e.id],e.el&&(o.removeElement(e.el),e.el._jsPlumb=null)},i=1;i<t.length;i++)n(t[i]);n(e)};this.remove=function(e,t){var n=p(e),i=[];return n.text?n.el.parentNode.removeChild(n.el):n.id&&o.batch(function(){_e(n,i)},t===!1),o},this.empty=function(e,t){var n=[],i=function(e,t){var r=p(e);if(r.text)r.el.parentNode.removeChild(r.el);else if(r.el){for(;r.el.childNodes.length>0;)i(r.el.childNodes[0]);t||_e(r,n)}};return o.batch(function(){i(e,!0)},t===!1),o},this.reset=function(){o.setSuspendEvents(!0),o.deleteEveryEndpoint(),o.unbind(),this.targetEndpointDefinitions={},this.sourceEndpointDefinitions={},w.length=0,o.setSuspendEvents(!1)};var Te=function(e){e.canvas&&e.canvas.parentNode&&e.canvas.parentNode.removeChild(e.canvas),e.cleanup(),e.destroy()},$e=function(e){Te(e)};this.clear=function(){o.select().each($e),o.selectEndpoints().each($e),x={},k={}},this.setDefaultScope=function(e){return I=e,o},this.setDraggable=W,this.setId=function(e,t,n){var i;jsPlumbUtil.isString(e)?i=e:(e=this.getDOMElement(e),i=this.getId(e));var r=this.getConnections({source:i,scope:"*"},!0),o=this.getConnections({target:i,scope:"*"},!0);t=""+t,n?e=this.getDOMElement(t):(e=this.getDOMElement(i),this.setAttribute(e,"id",t)),x[t]=x[i]||[];for(var a=0,s=x[t].length;s>a;a++)x[t][a].setElementId(t),x[t][a].setReferenceElement(e);delete x[i],this.anchorManager.changeId(i,t),this.getDragManager().changeId(i,t),C[t]=C[i],delete C[i];var l=function(n,i,r){for(var o=0,a=n.length;a>o;o++)n[o].endpoints[i].setElementId(t),n[o].endpoints[i].setReferenceElement(e),n[o][r+"Id"]=t,n[o][r]=e};l(r,0,"source"),l(o,1,"target"),this.repaint(t)},this.setDebugLog=function(e){y=e},this.setSuspendDrawing=function(e,t){var n=D;return D=e,M=e?(new Date).getTime():null,t&&this.repaintEverything(),n},this.isSuspendDrawing=function(){return D},this.getSuspendedAt=function(){return M},this.batch=function(e,t){var n=this.isSuspendDrawing();n||this.setSuspendDrawing(!0);try{e()}catch(r){i.log("Function run while suspended failed",r)}n||this.setSuspendDrawing(!1,!t)},this.doWhileSuspended=this.batch,this.getCachedData=Y,this.timestamp=r,this.setRenderMode=function(e){if(e!==m.SVG&&e!==m.VML)throw new TypeError("Render mode ["+e+"] not supported");return P=this.trySetRenderMode(e)},this.getRenderMode=function(){return P},this.show=function(e,t){return G(e,"block",t),o},this.toggleVisible=X,this.toggleDraggable=J,this.addListener=this.bind};jsPlumbUtil.extend(g,jsPlumbUtil.EventGenerator,{setAttribute:function(e,t,n){this.setAttribute(e,t,n)},getAttribute:function(e,t){return this.getAttribute(m.getDOMElement(e),t)},convertToFullOverlaySpec:function(e){return jsPlumbUtil.isString(e)&&(e=[e,{}]),1===e.length&&e.push({}),e[1].id=e[1].id||jsPlumbUtil.uuid(),e},registerConnectionType:function(e,t){if(this._connectionTypes[e]=m.extend({},t),t.overlays){for(var n={},i=0;i<t.overlays.length;i++){var r=this.convertToFullOverlaySpec(t.overlays[i]);n[r[1].id]=r}this._connectionTypes[e].overlays=n}},registerConnectionTypes:function(e){for(var t in e)this.registerConnectionType(t,e[t])},registerEndpointType:function(e,t){this._endpointTypes[e]=m.extend({},t)},registerEndpointTypes:function(e){for(var t in e)this._endpointTypes[t]=m.extend({},e[t])},getType:function(e,t){return"connection"===t?this._connectionTypes[e]:this._endpointTypes[e]},setIdChanged:function(e,t){this.setId(e,t,!0)},setParent:function(e,t){var n=this.getDOMElement(e),i=this.getId(n),r=this.getDOMElement(t),o=this.getId(r);n.parentNode.removeChild(n),r.appendChild(n),this.getDragManager().setParent(n,i,r,o)},extend:function(e,t,n){var i;if(n)for(i=0;i<n.length;i++)e[n[i]]=t[n[i]];else for(i in t)e[i]=t[i];return e},floatingConnections:{},getFloatingAnchorIndex:function(e){return e.endpoints[0].isFloating()?0:1}});var m=new g;"undefined"!=typeof window&&(window.jsPlumb=m),m.getInstance=function(e){var t=new g(e);return t.init(),t},"function"==typeof define&&(define("jsplumb",[],function(){return m}),define("jsplumbinstance",[],function(){return m.getInstance()})),"undefined"!=typeof exports&&(exports.jsPlumb=m)}.call(this),function(){var e=this,t=(e.jsPlumbUtil,!!window.SVGAngle||document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")),n=function(){if(void 0===n.vml){var e=document.body.appendChild(document.createElement("div"));e.innerHTML='<v:shape id="vml_flag1" adj="1" />';var t=e.firstChild;null!=t&&null!=t.style?(t.style.behavior="url(#default#VML)",n.vml=t?"object"==typeof t.adj:!0):n.vml=!1,e.parentNode.removeChild(e)}return n.vml},i=function(){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent,n=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=n.exec(t)&&(e=parseFloat(RegExp.$1))}return e}(),r=i>-1&&9>i,o=function(e,t){if(null==e)return[0,0];var n=c(e),i=u(n,0);return[i[t+"X"],i[t+"Y"]]},a=function(e){return null==e?[0,0]:r?[e.clientX+document.documentElement.scrollLeft,e.clientY+document.documentElement.scrollTop]:o(e,"page")},s=function(e){return o(e,"screen")},l=function(e){return o(e,"client")},u=function(e,t){return e.item?e.item(t):e[t]},c=function(e){return e.touches&&e.touches.length>0?e.touches:e.changedTouches&&e.changedTouches.length>0?e.changedTouches:e.targetTouches&&e.targetTouches.length>0?e.targetTouches:[e]},d=function(e){var t={},n=[],i={},r={},o={};this.register=function(a){var s=e.getId(a),l=e.getOffset(a);t[s]||(t[s]=a,n.push(a),i[s]={});var u=function(t){if(t)for(var n=0;n<t.childNodes.length;n++)if(3!=t.childNodes[n].nodeType&&8!=t.childNodes[n].nodeType){var a=jsPlumb.getDOMElement(t.childNodes[n]),c=e.getId(t.childNodes[n],null,!0);if(c&&r[c]&&r[c]>0){var d=e.getOffset(a);i[s][c]={id:c,offset:{left:d.left-l.left,top:d.top-l.top}},o[c]=s}u(t.childNodes[n])}};u(a)},this.updateOffsets=function(t){if(null!=t){var n=jsPlumb.getDOMElement(t),r=e.getId(n),a=i[r],s=e.getOffset(n);if(a)for(var l in a)if(a.hasOwnProperty(l)){var u=jsPlumb.getDOMElement(l),c=e.getOffset(u);i[r][l]={id:l,offset:{left:c.left-s.left,top:c.top-s.top}},o[l]=r}}},this.endpointAdded=function(n,a){a=a||e.getId(n);var s=document.body,l=n.parentNode;for(r[a]=r[a]?r[a]+1:1;null!=l&&l!=s;){var u=e.getId(l,null,!0);if(u&&t[u]){var c=e.getOffset(l);if(null==i[u][a]){var d=e.getOffset(n);i[u][a]={id:a,offset:{left:d.left-c.left,top:d.top-c.top}},o[a]=u}break}l=l.parentNode}},this.endpointDeleted=function(e){if(r[e.elementId]&&(r[e.elementId]--,r[e.elementId]<=0))for(var t in i)i.hasOwnProperty(t)&&i[t]&&(delete i[t][e.elementId],delete o[e.elementId])},this.changeId=function(e,t){i[t]=i[e],i[e]={},o[t]=o[e],o[e]=null},this.getElementsForDraggable=function(e){return i[e]},this.elementRemoved=function(e){var t=o[e];t&&(delete i[t][e],delete o[e])},this.reset=function(){t={},n=[],i={},r={}},this.dragEnded=function(t){var n=e.getId(t),i=o[n];i&&this.updateOffsets(i)},this.setParent=function(t,n,r,a){var s=o[n];if(s){i[a]||(i[a]={}),i[a][n]=i[s][n],delete i[s][n];var l=e.getOffset(r),u=e.getOffset(t);i[a][n].offset={left:u.left-l.left,top:u.top-l.top},o[n]=a}},this.getDragAncestor=function(t){var n=jsPlumb.getDOMElement(t),i=e.getId(n),r=o[i];return r?jsPlumb.getDOMElement(r):null}},p=function(e){return null==e?null:e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},h=function(e,t){t=p(t),"undefined"!=typeof e.className.baseVal?e.className.baseVal=t:e.className=t},f=function(e){return"undefined"==typeof e.className.baseVal?e.className:e.className.baseVal},g=function(e,t,n){t=null==t?[]:jsPlumbUtil.isArray(t)?t:t.split(/\s+/),n=null==n?[]:jsPlumbUtil.isArray(n)?n:n.split(/\s+/);var i=f(e),r=i.split(/\s+/),o=function(e,t){for(var n=0;n<t.length;n++)if(e)-1==jsPlumbUtil.indexOf(r,t[n])&&r.push(t[n]);else{var i=jsPlumbUtil.indexOf(r,t[n]);-1!=i&&r.splice(i,1)}};o(!0,t),o(!1,n),h(e,r.join(" "))},m=function(e,t){if(null!=e)if("string"==typeof e)t(jsPlumb.getDOMElement(e));else if(null!=e.length)for(var n=0;n<e.length;n++)t(jsPlumb.getDOMElement(e[n]));else t(e)};jsPlumb.extend(jsPlumbInstance.prototype,{headless:!1,pageLocation:a,screenLocation:s,clientLocation:l,getDragManager:function(){return null==this.dragManager&&(this.dragManager=new d(this)),this.dragManager},recalculateOffsets:function(){this.getDragManager().updateOffsets()},createElement:function(e,t,n,i){return this.createElementNS(null,e,t,n,i)},createElementNS:function(e,t,n,i,r){var o,a=null==e?document.createElement(t):document.createElementNS(e,t);n=n||{};for(o in n)a.style[o]=n[o];i&&(a.className=i),r=r||{};for(o in r)a.setAttribute(o,""+r[o]);return a},getAttribute:function(e,t){return null!=e.getAttribute?e.getAttribute(t):null},setAttribute:function(e,t,n){null!=e.setAttribute&&e.setAttribute(t,n)},setAttributes:function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttribute(n,t[n])},appendToRoot:function(e){document.body.appendChild(e)},getRenderModes:function(){return["svg","vml"]},isRenderModeAvailable:function(e){return{svg:t,vml:n()}[e]},trySetRenderMode:function(e){var t;if(e){e=e.toLowerCase();var n=this.isRenderModeAvailable("svg"),i=this.isRenderModeAvailable("vml");"svg"===e&&n?t="svg":i&&(t="vml")}return t},addClass:function(e,t){m(e,function(e){g(e,t)})},hasClass:function(e,t){return e=jsPlumb.getDOMElement(e),e.classList?e.classList.contains(t):-1!=f(e).indexOf(t)},removeClass:function(e,t){m(e,function(e){g(e,null,t)})},updateClasses:function(e,t,n){m(e,function(e){g(e,t,n)})},setClass:function(e,t){m(e,function(e){h(e,t)})},setPosition:function(e,t){e.style.left=t.left+"px",e.style.top=t.top+"px"},getPosition:function(e){var t=function(t){var n=e.style[t];return n?n.substring(0,n.length-2):0};return{left:t("left"),top:t("top")}},getStyle:function(e,t){return"undefined"!=typeof window.getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.currentStyle[t]},getSelector:function(e,t){var n=null;return n=1==arguments.length?null!=e.nodeType?e:document.querySelectorAll(e):e.querySelectorAll(t)},getOffset:function(e,t){e=jsPlumb.getDOMElement(e);for(var n=this.getContainer(),i={left:e.offsetLeft,top:e.offsetTop},r=t||null!=n&&e.offsetParent!=n?e.offsetParent:null,o=function(t){if(null!=t&&(t.scrollTop>0||t.scrollLeft>0)){var n=this.getStyle(e,"position");"fixed"!==n&&(i.left-=t.scrollLeft,i.top-=t.scrollTop)}}.bind(this);null!=r;)i.left+=r.offsetLeft,i.top+=r.offsetTop,t||o(r),r=t?r.offsetParent:r.offsetParent==n?null:r.offsetParent;if(null!=n&&!t&&(n.scrollTop>0||n.scrollLeft>0)){var a=null!=e.offsetParent?this.getStyle(e.offsetParent,"position"):"static",s=this.getStyle(e,"position");"absolute"!==s&&"fixed"!==s&&"absolute"!==a&&"fixed"!=a&&(i.left-=n.scrollLeft,i.top-=n.scrollTop)}return i},getPositionOnElement:function(e,t,n){var i="undefined"!=typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0,width:0,height:0},r=document.body,o=document.documentElement,a=window.pageYOffset||o.scrollTop||r.scrollTop,s=window.pageXOffset||o.scrollLeft||r.scrollLeft,l=o.clientTop||r.clientTop||0,u=o.clientLeft||r.clientLeft||0,c=0,d=0,p=i.top+a-l+c*n,h=i.left+s-u+d*n,f=jsPlumb.pageLocation(e),g=i.width||t.offsetWidth*n,m=i.height||t.offsetHeight*n,v=(f[0]-h)/g,y=(f[1]-p)/m;return[v,y]},getAbsolutePosition:function(e){var t=function(t){var n=e.style[t];return n?parseFloat(n.substring(0,n.length-2)):void 0};return[t("left"),t("top")]},setAbsolutePosition:function(e,t,n,i){n?this.animate(e,{left:"+="+(t[0]-n[0]),top:"+="+(t[1]-n[1])},i):(e.style.left=t[0]+"px",e.style.top=t[1]+"px")},getSize:function(e){return[e.offsetWidth,e.offsetHeight]},getWidth:function(e){return e.offsetWidth},getHeight:function(e){return e.offsetHeight}})}.call(this),function(){"use strict";var e=this,t=e.jsPlumb,n=e.jsPlumbUtil,i="__label",r=function(e,n){var r={cssClass:n.cssClass,labelStyle:e.labelStyle,id:i,component:e,_jsPlumb:e._jsPlumb.instance},o=jsPlumb.extend(r,n);return new(t.Overlays[e._jsPlumb.instance.getRenderMode()].Label)(o)},o=function(e,i){var r=null;if(n.isArray(i)){var o=i[0],a=t.extend({component:e,_jsPlumb:e._jsPlumb.instance},i[1]);3==i.length&&t.extend(a,i[2]),r=new(t.Overlays[e._jsPlumb.instance.getRenderMode()][o])(a)}else r=i.constructor==String?new(t.Overlays[e._jsPlumb.instance.getRenderMode()][i])({component:e,_jsPlumb:e._jsPlumb.instance}):i;return r.id=r.id||n.uuid(),e.cacheTypeItem("overlay",r,r.id),e._jsPlumb.overlays[r.id]=r,r};t.OverlayCapableJsPlumbUIComponent=function(e){jsPlumbUIComponent.apply(this,arguments),this._jsPlumb.overlays={},this._jsPlumb.overlayPositions={},e.label&&(this.getDefaultType().overlays[i]=["Label",{label:e.label,location:e.labelLocation||this.defaultLabelLocation||.5,labelStyle:e.labelStyle||this._jsPlumb.instance.Defaults.LabelStyle,
|
|
3246
|
|
-id:i}]),this.setListenerComponent=function(e){if(this._jsPlumb)for(var t in this._jsPlumb.overlays)this._jsPlumb.overlays[t].setListenerComponent(e)}},t.OverlayCapableJsPlumbUIComponent.applyType=function(e,t){if(t.overlays){var n,i={};for(n in t.overlays){var r=e._jsPlumb.overlays[t.overlays[n][1].id];if(r)r.updateFrom(t.overlays[n][1]),i[t.overlays[n][1].id]=!0;else{var o=e.getCachedTypeItem("overlay",t.overlays[n][1].id);null!=o?(o.reattach(e._jsPlumb.instance),o.updateFrom(t.overlays[n][1]),e._jsPlumb.overlays[o.id]=o):o=e.addOverlay(t.overlays[n],!0),i[o.id]=!0}}for(n in e._jsPlumb.overlays)null==i[e._jsPlumb.overlays[n].id]&&e.removeOverlay(e._jsPlumb.overlays[n].id)}},n.extend(t.OverlayCapableJsPlumbUIComponent,jsPlumbUIComponent,{setHover:function(e,t){if(this._jsPlumb&&!this._jsPlumb.instance.isConnectionBeingDragged())for(var n in this._jsPlumb.overlays)this._jsPlumb.overlays[n][e?"addClass":"removeClass"](this._jsPlumb.instance.hoverClass)},addOverlay:function(e,t){var n=o(this,e);return t||this.repaint(),n},getOverlay:function(e){return this._jsPlumb.overlays[e]},getOverlays:function(){return this._jsPlumb.overlays},hideOverlay:function(e){var t=this.getOverlay(e);t&&t.hide()},hideOverlays:function(){for(var e in this._jsPlumb.overlays)this._jsPlumb.overlays[e].hide()},showOverlay:function(e){var t=this.getOverlay(e);t&&t.show()},showOverlays:function(){for(var e in this._jsPlumb.overlays.length)this._jsPlumb.overlays[e].show()},removeAllOverlays:function(e){for(var t in this._jsPlumb.overlays)this._jsPlumb.overlays[t].cleanup&&this._jsPlumb.overlays[t].cleanup();this._jsPlumb.overlays={},this._jsPlumb.overlayPositions=null,e||this.repaint()},removeOverlay:function(e){var t=this._jsPlumb.overlays[e];t&&(t.cleanup&&t.cleanup(),delete this._jsPlumb.overlays[e],this._jsPlumb.overlayPositions&&delete this._jsPlumb.overlayPositions[e])},removeOverlays:function(){for(var e=0,t=arguments.length;t>e;e++)this.removeOverlay(arguments[e])},moveParent:function(e){this.bgCanvas&&(this.bgCanvas.parentNode.removeChild(this.bgCanvas),e.appendChild(this.bgCanvas)),this.canvas.parentNode.removeChild(this.canvas),e.appendChild(this.canvas);for(var t in this._jsPlumb.overlays)if(this._jsPlumb.overlays[t].isAppendedAtTopLevel){var n=this._jsPlumb.overlays[t].getElement();n.parentNode.removeChild(n),e.appendChild(n)}},getLabel:function(){var e=this.getOverlay(i);return null!=e?e.getLabel():null},getLabelOverlay:function(){return this.getOverlay(i)},setLabel:function(e){var t=this.getOverlay(i);if(t)e.constructor==String||e.constructor==Function?t.setLabel(e):(e.label&&t.setLabel(e.label),e.location&&t.setLocation(e.location));else{var n=e.constructor==String||e.constructor==Function?{label:e}:e;t=r(this,n),this._jsPlumb.overlays[i]=t}this._jsPlumb.instance.isSuspendDrawing()||this.repaint()},cleanup:function(e){for(var t in this._jsPlumb.overlays)this._jsPlumb.overlays[t].cleanup(e),this._jsPlumb.overlays[t].destroy(e);e&&(this._jsPlumb.overlays={},this._jsPlumb.overlayPositions=null)},setVisible:function(e){this[e?"showOverlays":"hideOverlays"]()},setAbsoluteOverlayPosition:function(e,t){this._jsPlumb.overlayPositions[e.id]=t},getAbsoluteOverlayPosition:function(e){return this._jsPlumb.overlayPositions?this._jsPlumb.overlayPositions[e.id]:null}})}.call(this),function(){"use strict";var e=this,t=e.jsPlumb,n=e.jsPlumbUtil,i=function(e,n){var i=!1;return{drag:function(){if(i)return i=!1,!0;var r=t.getUIPosition(arguments,n.getZoom());e.element&&(jsPlumb.setPosition(e.element,r),n.repaint(e.element,r))},stopDrag:function(){i=!0}}},r=function(e,t){var n=jsPlumb.createElement("div",{position:"absolute"});t.appendElement(n);var i=t.getId(n);t.manage(i,n),e.id=i,e.element=n},o=function(e,n,i,r,o,a,s,l){var u=new t.FloatingAnchor({reference:n,referenceCanvas:r,jsPlumbInstance:a});return s({paintStyle:e,endpoint:i,anchor:u,source:o,scope:l})},a=["connectorStyle","connectorHoverStyle","connectorOverlays","connector","connectionType","connectorClass","connectorHoverClass"],s=function(e,t){var n=0;if(null!=t)for(var i=0;i<e.connections.length;i++)if(e.connections[i].sourceId==t||e.connections[i].targetId==t){n=i;break}return e.connections[n]},l=function(e,t){return n.findWithFunction(t.connections,function(t){return t.id==e.id})};t.Endpoint=function(e){var u=e._jsPlumb,c=e.newConnection,d=e.newEndpoint;this.idPrefix="_jsplumb_e_",this.defaultLabelLocation=[.5,.5],this.defaultOverlayKeys=["Overlays","EndpointOverlays"],t.OverlayCapableJsPlumbUIComponent.apply(this,arguments),this.appendToDefaultType({connectionType:e.connectionType,maxConnections:null==e.maxConnections?this._jsPlumb.instance.Defaults.MaxConnections:e.maxConnections,paintStyle:e.endpointStyle||e.paintStyle||e.style||this._jsPlumb.instance.Defaults.EndpointStyle||t.Defaults.EndpointStyle,hoverPaintStyle:e.endpointHoverStyle||e.hoverPaintStyle||this._jsPlumb.instance.Defaults.EndpointHoverStyle||t.Defaults.EndpointHoverStyle,connectorStyle:e.connectorStyle,connectorHoverStyle:e.connectorHoverStyle,connectorClass:e.connectorClass,connectorHoverClass:e.connectorHoverClass,connectorOverlays:e.connectorOverlays,connector:e.connector,connectorTooltip:e.connectorTooltip}),this._jsPlumb.enabled=!(e.enabled===!1),this._jsPlumb.visible=!0,this.element=t.getDOMElement(e.source),this._jsPlumb.uuid=e.uuid,this._jsPlumb.floatingEndpoint=null;var p=null;this._jsPlumb.uuid&&(e.endpointsByUUID[this._jsPlumb.uuid]=this),this.elementId=e.elementId,this._jsPlumb.connectionCost=e.connectionCost,this._jsPlumb.connectionsDirected=e.connectionsDirected,this._jsPlumb.currentAnchorClass="",this._jsPlumb.events={};var h=function(){var e=u.endpointAnchorClassPrefix+"_"+this._jsPlumb.currentAnchorClass;this._jsPlumb.currentAnchorClass=this.anchor.getCssClass();var t=u.endpointAnchorClassPrefix+(this._jsPlumb.currentAnchorClass?"_"+this._jsPlumb.currentAnchorClass:"");this.removeClass(e),this.addClass(t),jsPlumb.updateClasses(this.element,t,e)}.bind(this);this.prepareAnchor=function(e){var t=this._jsPlumb.instance.makeAnchor(e,this.elementId,u);return t.bind("anchorChanged",function(e){this.fire("anchorChanged",{endpoint:this,anchor:e}),h()}.bind(this)),t},this.setPreparedAnchor=function(e,t){return this._jsPlumb.instance.continuousAnchorFactory.clear(this.elementId),this.anchor=e,h(),t||this._jsPlumb.instance.repaint(this.elementId),this},this.setAnchor=function(e,t){var n=this.prepareAnchor(e);return this.setPreparedAnchor(n,t),this};var f=function(e){if(this.connections.length>0)for(var t=0;t<this.connections.length;t++)this.connections[t].setHover(e,!1);else this.setHover(e)}.bind(this);this.bind("mouseover",function(){f(!0)}),this.bind("mouseout",function(){f(!1)}),e._transient||this._jsPlumb.instance.anchorManager.add(this,this.elementId),this.prepareEndpoint=function(i,r){var o,a=function(e,n){var i=u.getRenderMode();if(t.Endpoints[i][e])return new t.Endpoints[i][e](n);if(!u.Defaults.DoNotThrowErrors)throw{msg:"jsPlumb: unknown endpoint type '"+e+"'"}},s={_jsPlumb:this._jsPlumb.instance,cssClass:e.cssClass,container:e.container,tooltip:e.tooltip,connectorTooltip:e.connectorTooltip,endpoint:this};return n.isString(i)?o=a(i,s):n.isArray(i)?(s=n.merge(i[1],s),o=a(i[0],s)):o=i.clone(),o.clone=function(){return n.isString(i)?a(i,s):n.isArray(i)?(s=n.merge(i[1],s),a(i[0],s)):void 0}.bind(this),o.typeId=r,o},this.setEndpoint=function(e,t){var n=this.prepareEndpoint(e);this.setPreparedEndpoint(n,!0)},this.setPreparedEndpoint=function(e,t){null!=this.endpoint&&(this.endpoint.cleanup(),this.endpoint.destroy()),this.endpoint=e,this.type=this.endpoint.type,this.canvas=this.endpoint.canvas},t.extend(this,e,a),this.isSource=e.isSource||!1,this.isTemporarySource=e.isTemporarySource||!1,this.isTarget=e.isTarget||!1,this.connections=e.connections||[],this.connectorPointerEvents=e["connector-pointer-events"],this.scope=e.scope||u.getDefaultScope(),this.timestamp=null,this.reattachConnections=e.reattach||u.Defaults.ReattachConnections,this.connectionsDetachable=u.Defaults.ConnectionsDetachable,(e.connectionsDetachable===!1||e.detachable===!1)&&(this.connectionsDetachable=!1),this.dragAllowedWhenFull=e.dragAllowedWhenFull!==!1,e.onMaxConnections&&this.bind("maxConnections",e.onMaxConnections),this.addConnection=function(e){this.connections.push(e),this[(this.connections.length>0?"add":"remove")+"Class"](u.endpointConnectedClass),this[(this.isFull()?"add":"remove")+"Class"](u.endpointFullClass)},this.detachFromConnection=function(e,t,n){t=null==t?l(e,this):t,t>=0&&(this.connections.splice(t,1),this[(this.connections.length>0?"add":"remove")+"Class"](u.endpointConnectedClass),this[(this.isFull()?"add":"remove")+"Class"](u.endpointFullClass)),!n&&this._deleteOnDetach&&0===this.connections.length&&u.deleteObject({endpoint:this,fireEvent:!1,deleteAttachedObjects:!1})},this.detach=function(e,t,n,i,r,o,a){var s=null==a?l(e,this):a,c=!1;return i=i!==!1,s>=0&&(n||e._forceDetach||e.isDetachable()&&e.isDetachAllowed(e)&&this.isDetachAllowed(e)&&u.checkCondition("beforeDetach",e))&&(u.deleteObject({connection:e,fireEvent:!t&&i,originalEvent:r,deleteAttachedObjects:!1}),c=!0),c},this.detachAll=function(e,t){for(var n=[];this.connections.length>0;){var i=this.detach(this.connections[0],!1,t===!0,e!==!1,null,this,0);i||(n.push(this.connections[0]),this.connections.splice(0,1))}return this.connections=n,this},this.detachFrom=function(e,t,n){for(var i=[],r=0;r<this.connections.length;r++)(this.connections[r].endpoints[1]==e||this.connections[r].endpoints[0]==e)&&i.push(this.connections[r]);for(var o=0;o<i.length;o++)this.detach(i[o],!1,!0,t,n);return this},this.getElement=function(){return this.element},this.setElement=function(t){var i=this._jsPlumb.instance.getId(t),r=this.elementId;return n.removeWithFunction(e.endpointsByElement[this.elementId],function(e){return e.id==this.id}.bind(this)),this.element=jsPlumb.getDOMElement(t),this.elementId=u.getId(this.element),u.anchorManager.rehomeEndpoint(this,r,this.element),u.dragManager.endpointAdded(this.element),n.addToList(e.endpointsByElement,i,this),this},this.makeInPlaceCopy=function(){var t=this.anchor.getCurrentLocation({element:this}),n=this.anchor.getOrientation(this),i=this.anchor.getCssClass(),r={bind:function(){},compute:function(){return[t[0],t[1]]},getCurrentLocation:function(){return[t[0],t[1]]},getOrientation:function(){return n},getCssClass:function(){return i}};return d({dropOptions:e.dropOptions,anchor:r,source:this.element,paintStyle:this.getPaintStyle(),endpoint:e.hideOnDrag?"Blank":this.endpoint,_transient:!0,scope:this.scope,reference:this})},this.connectorSelector=function(){var e=this.connections[0];return e?e:this.connections.length<this._jsPlumb.maxConnections||-1==this._jsPlumb.maxConnections?null:e},this.setStyle=this.setPaintStyle,this.paint=function(e){e=e||{};var t=e.timestamp,n=!(e.recalc===!1);if(!t||this.timestamp!==t){var i=u.updateOffset({elId:this.elementId,timestamp:t}),r=e.offset?e.offset.o:i.o;if(null!=r){var o=e.anchorPoint,a=e.connectorPaintStyle;if(null==o){var l=e.dimensions||i.s,c={xy:[r.left,r.top],wh:l,element:this,timestamp:t};if(n&&this.anchor.isDynamic&&this.connections.length>0){var d=s(this,e.elementWithPrecedence),p=d.endpoints[0]==this?1:0,h=0===p?d.sourceId:d.targetId,f=u.getCachedData(h),g=f.o,m=f.s;c.txy=[g.left,g.top],c.twh=m,c.tElement=d.endpoints[p]}o=this.anchor.compute(c)}this.endpoint.compute(o,this.anchor.getOrientation(this),this._jsPlumb.paintStyleInUse,a||this.paintStyleInUse),this.endpoint.paint(this._jsPlumb.paintStyleInUse,this.anchor),this.timestamp=t;for(var v in this._jsPlumb.overlays)if(this._jsPlumb.overlays.hasOwnProperty(v)){var y=this._jsPlumb.overlays[v];y.isVisible()&&(this._jsPlumb.overlayPlacements[v]=y.draw(this.endpoint,this._jsPlumb.paintStyleInUse),y.paint(this._jsPlumb.overlayPlacements[v]))}}}},this.getTypeDescriptor=function(){return"endpoint"},this.isVisible=function(){return this._jsPlumb.visible},this.repaint=this.paint;var g=!1;this.initDraggable=function(){if(!g&&t.isDragSupported(this.element)){var a={id:null,element:null},s=null,l=!1,h=null,f=i(a,u),m=e.dragOptions||{},v={},y=t.dragEvents.start,b=t.dragEvents.stop,w=t.dragEvents.drag,x=function(){s=this.connectorSelector();var t=!0;this.isEnabled()||(t=!1),null!=s||this.isSource||this.isTemporarySource||(t=!1),!this.isSource||!this.isFull()||null!=s&&this.dragAllowedWhenFull||(t=!1),null==s||s.isDetachable()||(t=!1);var i=u.checkCondition("beforeDrag",{endpoint:this,source:this.element,sourceId:this.elementId});if(i===!1&&(t=!1),t===!1)return u.stopDrag&&u.stopDrag(this.canvas),f.stopDrag(),!1;for(var g=0;g<this.connections.length;g++)this.connections[g].setHover(!1);this.addClass("endpointDrag"),u.setConnectionBeingDragged(!0),s&&!this.isFull()&&this.isSource&&(s=null),u.updateOffset({elId:this.elementId}),p=this.makeInPlaceCopy(),p.addClass(u.draggingClass),p.referenceEndpoint=this,p.paint(),r(a,u);var m=this._jsPlumb.instance.getOffset(p.canvas),v=this.canvas;if(jsPlumb.setPosition(a.element,m),this.parentAnchor&&(this.anchor=u.makeAnchor(this.parentAnchor,this.elementId,u)),u.setAttributes(this.canvas,{dragId:a.id,elId:this.elementId}),this._jsPlumb.floatingEndpoint=o(this.getPaintStyle(),this.anchor,this.endpoint,this.canvas,a.element,u,d,this.scope),this.canvas.style.visibility="hidden",null==s)this.anchor.locked=!0,this.setHover(!1,!1),s=c({sourceEndpoint:this,targetEndpoint:this._jsPlumb.floatingEndpoint,source:this.endpointWillMoveTo||this.element,target:a.element,anchors:[this.anchor,this._jsPlumb.floatingEndpoint.anchor],paintStyle:e.connectorStyle,hoverPaintStyle:e.connectorHoverStyle,connector:e.connector,overlays:e.connectorOverlays,type:this.connectionType,cssClass:this.connectorClass,hoverClass:this.connectorHoverClass,data:i}),s.addClass(u.draggingClass),this._jsPlumb.floatingEndpoint.addClass(u.draggingClass),u.fire("connectionDrag",s);else{l=!0,s.setHover(!1);var y=s.endpoints[0].id==this.id?0:1;this.detachFromConnection(s,null,!0);var b=u.getDragScope(v);u.setAttribute(this.canvas,"originalScope",b);var w=u.getDropScope(v);u.setDragScope(v,w),u.fire("connectionDrag",s),0===y?(h=[s.source,s.sourceId,v,b],s.source=a.element,s.sourceId=a.id):(h=[s.target,s.targetId,v,b],s.target=a.element,s.targetId=a.id),s.endpoints[0===y?1:0].anchor.locked=!0,s.suspendedEndpoint=s.endpoints[y],s.suspendedElement=s.endpoints[y].getElement(),s.suspendedElementId=s.endpoints[y].elementId,s.suspendedElementType=0===y?"source":"target",s.suspendedEndpoint.setHover(!1),this._jsPlumb.floatingEndpoint.referenceEndpoint=s.suspendedEndpoint,s.endpoints[y]=this._jsPlumb.floatingEndpoint,s.addClass(u.draggingClass),this._jsPlumb.floatingEndpoint.addClass(u.draggingClass)}u.floatingConnections[a.id]=s,u.anchorManager.addFloatingConnection(a.id,s),n.addToList(e.endpointsByElement,a.id,this._jsPlumb.floatingEndpoint),u.currentlyDragging=!0}.bind(this),k=function(){if(u.setConnectionBeingDragged(!1),s&&null!=s.endpoints){var e=u.getDropEvent(arguments),t=u.getFloatingAnchorIndex(s);if(s.endpoints[0===t?1:0].anchor.locked=!1,s.removeClass(u.draggingClass),this._jsPlumb&&(s.deleteConnectionNow||s.endpoints[t]==this._jsPlumb.floatingEndpoint)&&l&&s.suspendedEndpoint){0===t?(s.source=h[0],s.sourceId=h[1]):(s.target=h[0],s.targetId=h[1]);var n=this._jsPlumb.floatingEndpoint;u.setDragScope(h[2],h[3]),s.endpoints[t]=s.suspendedEndpoint,s.isReattach()||s._forceReattach||s._forceDetach||!s.endpoints[0===t?1:0].detach(s,!1,!1,!0,e)?(s.setHover(!1),s._forceDetach=null,s._forceReattach=null,this._jsPlumb.floatingEndpoint.detachFromConnection(s),s.suspendedEndpoint.addConnection(s),u.repaint(h[1])):u.deleteObject({endpoint:n})}u.remove(a.element,!1),u.deleteObject({endpoint:p}),this.deleteAfterDragStop?u.deleteObject({endpoint:this}):this._jsPlumb&&(this._jsPlumb.floatingEndpoint=null,this.canvas.style.visibility="visible",this.anchor.locked=!1,this.paint({recalc:!1})),u.fire("connectionDragStop",s,e),u.currentlyDragging=!1,s=null}}.bind(this);m=t.extend(v,m),m.scope=this.scope||m.scope,m[y]=n.wrap(m[y],x,!1),m[w]=n.wrap(m[w],f.drag),m[b]=n.wrap(m[b],k),m.multipleDrop=!1,m.canDrag=function(){return this.isSource||this.isTemporarySource||this.connections.length>0}.bind(this),u.initDraggable(this.canvas,m,"internal"),this.canvas._jsPlumbRelatedElement=this.element,g=!0}};var m=e.endpoint||this._jsPlumb.instance.Defaults.Endpoint||t.Defaults.Endpoint;this.setEndpoint(m,!0);var v=e.anchor?e.anchor:e.anchors?e.anchors:u.Defaults.Anchor||"Top";this.setAnchor(v,!0);var y=["default",e.type||""].join(" ");this.addType(y,e.data,!0),this.canvas=this.endpoint.canvas,this.canvas._jsPlumb=this,(this.isSource||this.isTarget||this.isTemporarySource)&&this.initDraggable();var b=function(i,r,o,a,s){if((this.isTarget||r)&&t.isDropSupported(this.element)){var l=e.dropOptions||u.Defaults.DropOptions||t.Defaults.DropOptions;l=t.extend({},l),l.scope=l.scope||this.scope;var c=t.dragEvents.drop,d=t.dragEvents.over,p=t.dragEvents.out,h=this,f=u.EndpointDropHandler({getEndpoint:function(){return h},jsPlumb:u,enabled:function(){return null!=a?a.isEnabled():!0},isFull:function(){return a.isFull()},element:this.element,elementId:this.elementId,isSource:this.isSource,isTarget:this.isTarget,addClass:function(e){h.addClass(e)},removeClass:function(e){h.removeClass(e)},isDropAllowed:function(){return h.isDropAllowed.apply(h,arguments)},reference:s});l[c]=n.wrap(l[c],f,!0),l[d]=n.wrap(l[d],function(){var e=t.getDragObject(arguments),n=u.getAttribute(t.getDOMElement(e),"dragId"),i=u.floatingConnections[n];if(null!=i){var r=u.getFloatingAnchorIndex(i),o=this.isTarget&&0!==r||i.suspendedEndpoint&&this.referenceEndpoint&&this.referenceEndpoint.id==i.suspendedEndpoint.id;if(o){var a=u.checkCondition("checkDropAllowed",{sourceEndpoint:i.endpoints[r],targetEndpoint:this,connection:i});this[(a?"add":"remove")+"Class"](u.endpointDropAllowedClass),this[(a?"remove":"add")+"Class"](u.endpointDropForbiddenClass),i.endpoints[r].anchor.over(this.anchor,this)}}}.bind(this)),l[p]=n.wrap(l[p],function(){var e=t.getDragObject(arguments),n=null==e?null:u.getAttribute(t.getDOMElement(e),"dragId"),i=n?u.floatingConnections[n]:null;if(null!=i){var r=u.getFloatingAnchorIndex(i),o=this.isTarget&&0!==r||i.suspendedEndpoint&&this.referenceEndpoint&&this.referenceEndpoint.id==i.suspendedEndpoint.id;o&&(this.removeClass(u.endpointDropAllowedClass),this.removeClass(u.endpointDropForbiddenClass),i.endpoints[r].anchor.out())}}.bind(this)),u.initDroppable(i,l,"internal",o)}}.bind(this);return this.anchor.isFloating||b(this.canvas,!0,!(e._transient||this.anchor.isFloating),this,e.reference),this},n.extend(t.Endpoint,t.OverlayCapableJsPlumbUIComponent,{setVisible:function(e,t,n){if(this._jsPlumb.visible=e,this.canvas&&(this.canvas.style.display=e?"block":"none"),this[e?"showOverlays":"hideOverlays"](),!t)for(var i=0;i<this.connections.length;i++)if(this.connections[i].setVisible(e),!n){var r=this===this.connections[i].endpoints[0]?1:0;1==this.connections[i].endpoints[r].connections.length&&this.connections[i].endpoints[r].setVisible(e,!0,!0)}},getAttachedElements:function(){return this.connections},applyType:function(e,n){this.setPaintStyle(e.endpointStyle||e.paintStyle,n),this.setHoverPaintStyle(e.endpointHoverStyle||e.hoverPaintStyle,n),null!=e.maxConnections&&(this._jsPlumb.maxConnections=e.maxConnections),e.scope&&(this.scope=e.scope),t.extend(this,e,a),null!=e.cssClass&&this.canvas&&this._jsPlumb.instance.addClass(this.canvas,e.cssClass),t.OverlayCapableJsPlumbUIComponent.applyType(this,e)},isEnabled:function(){return this._jsPlumb.enabled},setEnabled:function(e){this._jsPlumb.enabled=e},cleanup:function(){var e=this._jsPlumb.instance.endpointAnchorClassPrefix+(this._jsPlumb.currentAnchorClass?"_"+this._jsPlumb.currentAnchorClass:"");jsPlumb.removeClass(this.element,e),this.anchor=null,this.endpoint.cleanup(),this.endpoint.destroy(),this.endpoint=null,this._jsPlumb.instance.destroyDraggable(this.canvas,"internal"),this._jsPlumb.instance.destroyDroppable(this.canvas,"internal")},setHover:function(e){this.endpoint&&this._jsPlumb&&!this._jsPlumb.instance.isConnectionBeingDragged()&&this.endpoint.setHover(e)},isFull:function(){return 0===this._jsPlumb.maxConnections?!0:!(this.isFloating()||this._jsPlumb.maxConnections<0||this.connections.length<this._jsPlumb.maxConnections)},isFloating:function(){return null!=this.anchor&&this.anchor.isFloating},isConnectedTo:function(e){var t=!1;if(e)for(var n=0;n<this.connections.length;n++)if(this.connections[n].endpoints[1]==e||this.connections[n].endpoints[0]==e){t=!0;break}return t},getConnectionCost:function(){return this._jsPlumb.connectionCost},setConnectionCost:function(e){this._jsPlumb.connectionCost=e},areConnectionsDirected:function(){return this._jsPlumb.connectionsDirected},setConnectionsDirected:function(e){this._jsPlumb.connectionsDirected=e},setElementId:function(e){this.elementId=e,this.anchor.elementId=e},setReferenceElement:function(e){this.element=t.getDOMElement(e)},setDragAllowedWhenFull:function(e){this.dragAllowedWhenFull=e},equals:function(e){return this.anchor.equals(e.anchor)},getUuid:function(){return this._jsPlumb.uuid},computeAnchor:function(e){return this.anchor.compute(e)}}),e.jsPlumbInstance.prototype.EndpointDropHandler=function(e){return function(t){var n=e.jsPlumb;e.removeClass(n.endpointDropAllowedClass),e.removeClass(n.endpointDropForbiddenClass);var i=n.getDropEvent(arguments),r=n.getDOMElement(n.getDragObject(arguments)),o=n.getAttribute(r,"dragId"),a=(n.getAttribute(r,"elId"),n.getAttribute(r,"originalScope")),s=n.floatingConnections[o];if(null!=s&&(!s.suspendedEndpoint||null!=s.suspendedEndpoint._jsPlumb)){var l=s.suspendedEndpoint&&e.reference&&s.suspendedEndpoint.id===e.reference.id;if(l)return s._forceReattach=!0,s.setHover(!1),void(e.maybeCleanup&&e.maybeCleanup(c));var u=n.getFloatingAnchorIndex(s);if((0!==u||e.isSource)&&(1!==u||e.isTarget)){var c=e.getEndpoint(s);if(e.onDrop&&e.onDrop(s),a&&n.setDragScope(r,a),e.isFull(t)&&c.fire("maxConnections",{endpoint:this,connection:s,maxConnections:c._jsPlumb.maxConnections},i),!e.isFull()&&(0!==u||e.isSource)&&(1!=u||e.isTarget)&&e.enabled()){var d=!0;s.suspendedEndpoint&&s.suspendedEndpoint._jsPlumb&&s.suspendedEndpoint.id!=c.id&&(s.isDetachAllowed(s)&&s.endpoints[u].isDetachAllowed(s)&&s.suspendedEndpoint.isDetachAllowed(s)&&n.checkCondition("beforeDetach",s)||(d=!1)),0===u?(s.source=e.element,s.sourceId=e.elementId):(s.target=e.element,s.targetId=e.elementId);var p=function(){s.endpoints[u].detachFromConnection(s),s.suspendedEndpoint&&s.suspendedEndpoint.detachFromConnection(s),s.endpoints[u]=c,c.addConnection(s);var e=c.getParameters();for(var t in e)s.setParameter(t,e[t]);if(s.suspendedEndpoint){var r=s.suspendedEndpoint.elementId;n.fireMoveEvent({index:u,originalSourceId:0===u?r:s.sourceId,newSourceId:0===u?c.elementId:s.sourceId,originalTargetId:1==u?r:s.targetId,newTargetId:1==u?c.elementId:s.targetId,originalSourceEndpoint:0===u?s.suspendedEndpoint:s.endpoints[0],newSourceEndpoint:0===u?c:s.endpoints[0],originalTargetEndpoint:1==u?s.suspendedEndpoint:s.endpoints[1],newTargetEndpoint:1==u?c:s.endpoints[1],connection:s},i)}else e.draggable&&n.initDraggable(this.element,dragOptions,"internal",n);if(1==u?n.anchorManager.updateOtherEndpoint(s.sourceId,s.suspendedElementId,s.targetId,s):n.anchorManager.sourceChanged(s.suspendedEndpoint.elementId,s.sourceId,s),s.endpoints[0].finalEndpoint){var o=s.endpoints[0];o.detachFromConnection(s),s.endpoints[0]=s.endpoints[0].finalEndpoint,s.endpoints[0].addConnection(s)}n.finaliseConnection(s,null,i),s.setHover(!1)}.bind(this),h=function(){s.suspendedEndpoint&&(s.endpoints[u]=s.suspendedEndpoint,s.setHover(!1),s._forceDetach=!0,0===u?(s.source=s.suspendedEndpoint.element,s.sourceId=s.suspendedEndpoint.elementId):(s.target=s.suspendedEndpoint.element,s.targetId=s.suspendedEndpoint.elementId),s.suspendedEndpoint.addConnection(s),n.repaint(s.sourceId),s._forceDetach=!1)};if(d=d&&e.isDropAllowed(s.sourceId,s.targetId,s.scope,s,c))return p(),!0;h()}e.maybeCleanup&&e.maybeCleanup(c),n.currentlyDragging=!1}}}}}.call(this),function(){"use strict";var e=this,t=e.jsPlumb,n=e.jsPlumbUtil,i=function(e,n,i,r,o){if(!e.Defaults.DoNotThrowErrors&&null==jsPlumb.Connectors[n][i])throw{msg:"jsPlumb: unknown connector type '"+i+"'"};return new t.Connectors[n][i](r,o)},r=function(e,t,n){return e?n.makeAnchor(e,t,n):null},o=function(e,t,i,r){null!=t&&(t._jsPlumbConnections=t._jsPlumbConnections||{},r?delete t._jsPlumbConnections[e.id]:t._jsPlumbConnections[e.id]=!0,n.isEmpty(t._jsPlumbConnections)?i.removeClass(t,i.connectedClass):i.addClass(t,i.connectedClass))};t.Connection=function(e){var i=e.newEndpoint;this.id=e.id,this.connector=null,this.idPrefix="_jsplumb_c_",this.defaultLabelLocation=.5,this.defaultOverlayKeys=["Overlays","ConnectionOverlays"],this.previousConnection=e.previousConnection,this.source=t.getDOMElement(e.source),this.target=t.getDOMElement(e.target),e.sourceEndpoint&&(this.source=e.sourceEndpoint.getElement()),e.targetEndpoint&&(this.target=e.targetEndpoint.getElement()),t.OverlayCapableJsPlumbUIComponent.apply(this,arguments),this.sourceId=this._jsPlumb.instance.getId(this.source),this.targetId=this._jsPlumb.instance.getId(this.target),this.scope=e.scope,this.endpoints=[],this.endpointStyles=[];var r=this._jsPlumb.instance;r.manage(this.sourceId,this.source),r.manage(this.targetId,this.target),this._jsPlumb.visible=!0,this._jsPlumb.editable=e.editable===!0,this._jsPlumb.params={cssClass:e.cssClass,container:e.container,"pointer-events":e["pointer-events"],editorParams:e.editorParams,overlays:e.overlays},this._jsPlumb.lastPaintedAt=null,this.bind("mouseover",function(){this.setHover(!0)}.bind(this)),this.bind("mouseout",function(){this.setHover(!1)}.bind(this)),this.makeEndpoint=function(t,n,o,a){return o=o||this._jsPlumb.instance.getId(n),this.prepareEndpoint(r,i,this,a,t?0:1,e,n,o)};var o=this.makeEndpoint(!0,this.source,this.sourceId,e.sourceEndpoint),a=this.makeEndpoint(!1,this.target,this.targetId,e.targetEndpoint);o&&n.addToList(e.endpointsByElement,this.sourceId,o),a&&n.addToList(e.endpointsByElement,this.targetId,a),this.scope||(this.scope=this.endpoints[0].scope),null!=e.deleteEndpointsOnDetach?(this.endpoints[0]._deleteOnDetach=e.deleteEndpointsOnDetach,this.endpoints[1]._deleteOnDetach=e.deleteEndpointsOnDetach):(this.endpoints[0]._doNotDeleteOnDetach||(this.endpoints[0]._deleteOnDetach=!0),this.endpoints[1]._doNotDeleteOnDetach||(this.endpoints[1]._deleteOnDetach=!0));var s=r.Defaults.ConnectionsDetachable;e.detachable===!1&&(s=!1),this.endpoints[0].connectionsDetachable===!1&&(s=!1),this.endpoints[1].connectionsDetachable===!1&&(s=!1);var l=e.reattach||this.endpoints[0].reattachConnections||this.endpoints[1].reattachConnections||r.Defaults.ReattachConnections;this.appendToDefaultType({detachable:s,rettach:l,paintStyle:this.endpoints[0].connectorStyle||this.endpoints[1].connectorStyle||e.paintStyle||r.Defaults.PaintStyle||jsPlumb.Defaults.PaintStyle,hoverPaintStyle:this.endpoints[0].connectorHoverStyle||this.endpoints[1].connectorHoverStyle||e.hoverPaintStyle||r.Defaults.HoverPaintStyle||jsPlumb.Defaults.HoverPaintStyle});var u=r.getSuspendedAt();if(!r.isSuspendDrawing()){var c=r.getCachedData(this.sourceId),d=c.o,p=c.s,h=r.getCachedData(this.targetId),f=h.o,g=h.s,m=u||r.timestamp(),v=this.endpoints[0].anchor.compute({xy:[d.left,d.top],wh:p,element:this.endpoints[0],elementId:this.endpoints[0].elementId,txy:[f.left,f.top],twh:g,tElement:this.endpoints[1],timestamp:m});this.endpoints[0].paint({anchorLoc:v,timestamp:m}),v=this.endpoints[1].anchor.compute({xy:[f.left,f.top],wh:g,element:this.endpoints[1],elementId:this.endpoints[1].elementId,txy:[d.left,d.top],twh:p,tElement:this.endpoints[0],timestamp:m}),this.endpoints[1].paint({anchorLoc:v,timestamp:m})}this.getTypeDescriptor=function(){return"connection"},this.getAttachedElements=function(){return this.endpoints},this.isDetachable=function(){return this._jsPlumb.detachable===!0},this.setDetachable=function(e){this._jsPlumb.detachable=e===!0},this.isReattach=function(){return this._jsPlumb.reattach===!0||this.endpoints[0].reattachConnections===!0||this.endpoints[1].reattachConnections===!0},this.setReattach=function(e){this._jsPlumb.reattach=e===!0},this._jsPlumb.cost=e.cost||this.endpoints[0].getConnectionCost(),this._jsPlumb.directed=e.directed,null==e.directed&&(this._jsPlumb.directed=this.endpoints[0].areConnectionsDirected());var y=jsPlumb.extend({},this.endpoints[1].getParameters());t.extend(y,this.endpoints[0].getParameters()),t.extend(y,this.getParameters()),this.setParameters(y),this.setConnector(this.endpoints[0].connector||this.endpoints[1].connector||e.connector||r.Defaults.Connector||t.Defaults.Connector,!0),this.getData=function(){return e.data};var b=["default",e.type,this.endpoints[0].connectionType,this.endpoints[1].connectionType].join(" ");/[^\s]/.test(b)&&this.addType(b,e.data,!0),this.updateConnectedClass()},n.extend(t.Connection,t.OverlayCapableJsPlumbUIComponent,{applyType:function(e,n,i){null!=e.detachable&&this.setDetachable(e.detachable),null!=e.reattach&&this.setReattach(e.reattach),e.scope&&(this.scope=e.scope),null!=e.cssClass&&this.canvas&&this._jsPlumb.instance.addClass(this.canvas,e.cssClass);var r=null;e.anchor?(r=this.getCachedTypeItem("anchors",i.anchor),null==r&&(r=[this._jsPlumb.instance.makeAnchor(e.anchor),this._jsPlumb.instance.makeAnchor(e.anchor)],this.cacheTypeItem("anchors",r,i.anchor))):e.anchors&&(r=this.getCachedTypeItem("anchors",i.anchors),null==r&&(r=[this._jsPlumb.instance.makeAnchor(e.anchors[0]),this._jsPlumb.instance.makeAnchor(e.anchors[1])],this.cacheTypeItem("anchors",r,i.anchors))),null!=r&&(this.endpoints[0].anchor=r[0],this.endpoints[1].anchor=r[1]),t.OverlayCapableJsPlumbUIComponent.applyType(this,e)},addClass:function(e,t){t&&(this.endpoints[0].addClass(e),this.endpoints[1].addClass(e),this.suspendedEndpoint&&this.suspendedEndpoint.addClass(e)),this.connector&&this.connector.addClass(e)},removeClass:function(e,t){t&&(this.endpoints[0].removeClass(e),this.endpoints[1].removeClass(e),this.suspendedEndpoint&&this.suspendedEndpoint.removeClass(e)),this.connector&&this.connector.removeClass(e)},isVisible:function(){return this._jsPlumb.visible},setVisible:function(e){this._jsPlumb.visible=e,this.connector&&this.connector.setVisible(e),this.repaint()},cleanup:function(){this.updateConnectedClass(!0),this.endpoints=null,this.source=null,this.target=null,null!=this.connector&&(this.connector.cleanup(!0),this.connector.destroy(!0)),this.connector=null},updateConnectedClass:function(e){o(this,this.source,this._jsPlumb.instance,e),o(this,this.target,this._jsPlumb.instance,e)},setHover:function(t){this.connector&&this._jsPlumb&&!this._jsPlumb.instance.isConnectionBeingDragged()&&(this.connector.setHover(t),e.jsPlumb[t?"addClass":"removeClass"](this.source,this._jsPlumb.instance.hoverSourceClass),e.jsPlumb[t?"addClass":"removeClass"](this.target,this._jsPlumb.instance.hoverTargetClass))},getUuids:function(){return[this.endpoints[0].getUuid(),this.endpoints[1].getUuid()]},getCost:function(){return this._jsPlumb.cost},setCost:function(e){this._jsPlumb.cost=e},isDirected:function(){return this._jsPlumb.directed===!0},getConnector:function(){return this.connector},prepareConnector:function(e,t){var r,o={_jsPlumb:this._jsPlumb.instance,cssClass:this._jsPlumb.params.cssClass,container:this._jsPlumb.params.container,"pointer-events":this._jsPlumb.params["pointer-events"]},a=this._jsPlumb.instance.getRenderMode();return n.isString(e)?r=i(this._jsPlumb.instance,a,e,o,this):n.isArray(e)&&(r=1==e.length?i(this._jsPlumb.instance,a,e[0],o,this):i(this._jsPlumb.instance,a,e[0],n.merge(e[1],o),this)),null!=t&&(r.typeId=t),r},setPreparedConnector:function(e,t,n,i){var r;if(null!=this.connector&&(r=this.connector,this.connector.cleanup(),this.connector.destroy()),this.connector=e,i&&this.cacheTypeItem("connector",e,i),this.canvas=this.connector.canvas,
|
|
3247
|
|
-this.bgCanvas=this.connector.bgCanvas,this.canvas&&(this.canvas._jsPlumb=this),this.bgCanvas&&(this.bgCanvas._jsPlumb=this),null!=r)for(var o=this.getOverlays(),a=0;a<o.length;a++)o[a].transfer&&o[a].transfer(this.connector);n||this.setListenerComponent(this.connector),t||this.repaint()},setConnector:function(e,t,n,i){var r=this.prepareConnector(e,i);this.setPreparedConnector(r,t,n,i)},paint:function(e){if(!this._jsPlumb.instance.isSuspendDrawing()&&this._jsPlumb.visible){e=e||{};var t=e.timestamp,n=!1,i=n?this.sourceId:this.targetId,r=n?this.targetId:this.sourceId,o=n?0:1,a=n?1:0;if(null==t||t!=this._jsPlumb.lastPaintedAt){var s=this._jsPlumb.instance.updateOffset({elId:r}).o,l=this._jsPlumb.instance.updateOffset({elId:i}).o,u=this.endpoints[a],c=this.endpoints[o],d=u.anchor.getCurrentLocation({xy:[s.left,s.top],wh:[s.width,s.height],element:u,timestamp:t}),p=c.anchor.getCurrentLocation({xy:[l.left,l.top],wh:[l.width,l.height],element:c,timestamp:t});this.connector.resetBounds(),this.connector.compute({sourcePos:d,targetPos:p,sourceEndpoint:this.endpoints[a],targetEndpoint:this.endpoints[o],lineWidth:this._jsPlumb.paintStyleInUse.lineWidth,sourceInfo:s,targetInfo:l});var h={minX:1/0,minY:1/0,maxX:-(1/0),maxY:-(1/0)};for(var f in this._jsPlumb.overlays)if(this._jsPlumb.overlays.hasOwnProperty(f)){var g=this._jsPlumb.overlays[f];g.isVisible()&&(this._jsPlumb.overlayPlacements[f]=g.draw(this.connector,this._jsPlumb.paintStyleInUse,this.getAbsoluteOverlayPosition(g)),h.minX=Math.min(h.minX,this._jsPlumb.overlayPlacements[f].minX),h.maxX=Math.max(h.maxX,this._jsPlumb.overlayPlacements[f].maxX),h.minY=Math.min(h.minY,this._jsPlumb.overlayPlacements[f].minY),h.maxY=Math.max(h.maxY,this._jsPlumb.overlayPlacements[f].maxY))}var m=parseFloat(this._jsPlumb.paintStyleInUse.lineWidth||1)/2,v=parseFloat(this._jsPlumb.paintStyleInUse.lineWidth||0),y={xmin:Math.min(this.connector.bounds.minX-(m+v),h.minX),ymin:Math.min(this.connector.bounds.minY-(m+v),h.minY),xmax:Math.max(this.connector.bounds.maxX+(m+v),h.maxX),ymax:Math.max(this.connector.bounds.maxY+(m+v),h.maxY)};this.connector.paint(this._jsPlumb.paintStyleInUse,null,y);for(var b in this._jsPlumb.overlays)if(this._jsPlumb.overlays.hasOwnProperty(b)){var w=this._jsPlumb.overlays[b];w.isVisible()&&w.paint(this._jsPlumb.overlayPlacements[b],y)}}this._jsPlumb.lastPaintedAt=t}},repaint:function(e){e=e||{},this.paint({elId:this.sourceId,recalc:!(e.recalc===!1),timestamp:e.timestamp})},prepareEndpoint:function(e,n,i,o,a,s,l,u){var c;if(o)i.endpoints[a]=o,o.addConnection(i);else{s.endpoints||(s.endpoints=[null,null]);var d=s.endpoints[a]||s.endpoint||e.Defaults.Endpoints[a]||jsPlumb.Defaults.Endpoints[a]||e.Defaults.Endpoint||jsPlumb.Defaults.Endpoint;s.endpointStyles||(s.endpointStyles=[null,null]),s.endpointHoverStyles||(s.endpointHoverStyles=[null,null]);var p=s.endpointStyles[a]||s.endpointStyle||e.Defaults.EndpointStyles[a]||jsPlumb.Defaults.EndpointStyles[a]||e.Defaults.EndpointStyle||jsPlumb.Defaults.EndpointStyle;null==p.fillStyle&&null!=s.paintStyle&&(p.fillStyle=s.paintStyle.strokeStyle),null==p.outlineColor&&null!=s.paintStyle&&(p.outlineColor=s.paintStyle.outlineColor),null==p.outlineWidth&&null!=s.paintStyle&&(p.outlineWidth=s.paintStyle.outlineWidth);var h=s.endpointHoverStyles[a]||s.endpointHoverStyle||e.Defaults.EndpointHoverStyles[a]||jsPlumb.Defaults.EndpointHoverStyles[a]||e.Defaults.EndpointHoverStyle||jsPlumb.Defaults.EndpointHoverStyle;null!=s.hoverPaintStyle&&(null==h&&(h={}),null==h.fillStyle&&(h.fillStyle=s.hoverPaintStyle.strokeStyle));var f=s.anchors?s.anchors[a]:s.anchor?s.anchor:r(e.Defaults.Anchors[a],u,e)||r(t.Defaults.Anchors[a],u,e)||r(e.Defaults.Anchor,u,e)||r(t.Defaults.Anchor,u,e),g=s.uuids?s.uuids[a]:null;c=n({paintStyle:p,hoverPaintStyle:h,endpoint:d,connections:[i],uuid:g,anchor:f,source:l,scope:s.scope,reattach:s.reattach||e.Defaults.ReattachConnections,detachable:s.detachable||e.Defaults.ConnectionsDetachable}),i.endpoints[a]=c,s.drawEndpoints===!1&&c.setVisible(!1,!0,!0)}return c}})}.call(this),function(){"use strict";var e=this,t=e.jsPlumbUtil,n=e.jsPlumb;n.AnchorManager=function(e){var i={},r={},o={},a={},s={HORIZONTAL:"horizontal",VERTICAL:"vertical",DIAGONAL:"diagonal",IDENTITY:"identity"},l=["left","top","right","bottom"],u={},c=this,d={},p=e.jsPlumbInstance,h={},f=function(e,t,n,i,r,o){if(e===t)return{orientation:s.IDENTITY,a:["top","top"]};var a=Math.atan2(i.centery-n.centery,i.centerx-n.centerx),u=Math.atan2(n.centery-i.centery,n.centerx-i.centerx),c=[],d={};!function(e,t){for(var n=0;n<e.length;n++)d[e[n]]={left:[t[n].left,t[n].centery],right:[t[n].right,t[n].centery],top:[t[n].centerx,t[n].top],bottom:[t[n].centerx,t[n].bottom]}}(["source","target"],[n,i]);for(var p=0;p<l.length;p++)for(var h=0;h<l.length;h++)p!=h&&c.push({source:l[p],target:l[h],dist:Biltong.lineLength(d.source[l[p]],d.target[l[h]])});c.sort(function(e,t){return e.dist<t.dist?-1:e.dist>t.dist?1:0});for(var f=c[0].source,g=c[0].target,m=0;m<c.length&&(f=!r.isContinuous||r.isEdgeSupported(c[m].source)?c[m].source:null,g=!o.isContinuous||o.isEdgeSupported(c[m].target)?c[m].target:null,null==f||null==g);m++);return{a:[f,g],theta:a,theta2:u}},g=function(e,t,n,i,r,o,a){for(var s=[],l=t[r?0:1]/(i.length+1),u=0;u<i.length;u++){var c=(u+1)*l,d=o*t[r?1:0];a&&(c=t[r?0:1]-c);var p=r?c:d,h=n[0]+p,f=p/t[0],g=r?d:c,m=n[1]+g,v=g/t[1];s.push([h,m,f,v,i[u][1],i[u][2]])}return s},m=function(e){return function(t,n){var i=!0;return i=e?t[0][0]<n[0][0]:t[0][0]>n[0][0],i===!1?-1:1}},v=function(e,t){var n=e[0][0]<0?-Math.PI-e[0][0]:Math.PI-e[0][0],i=t[0][0]<0?-Math.PI-t[0][0]:Math.PI-t[0][0];return n>i?1:e[0][1]>t[0][1]?1:-1},y={top:function(e,t){return e[0]>t[0]?1:-1},right:m(!0),bottom:m(!0),left:v},b=function(e,t){return e.sort(t)},w=function(e,t){var n=p.getCachedData(e),i=n.s,o=n.o,s=function(t,n,i,o,s,l,u){if(o.length>0)for(var c=b(o,y[t]),d="right"===t||"top"===t,p=g(t,n,i,c,s,l,d),h=function(e,t){r[e.id]=[t[0],t[1],t[2],t[3]],a[e.id]=u},f=0;f<p.length;f++){var m=p[f][4],v=m.endpoints[0].elementId===e,w=m.endpoints[1].elementId===e;v?h(m.endpoints[0],p[f]):w&&h(m.endpoints[1],p[f])}};s("bottom",i,[o.left,o.top],t.bottom,!0,1,[0,1]),s("top",i,[o.left,o.top],t.top,!0,0,[0,-1]),s("left",i,[o.left,o.top],t.left,!1,0,[-1,0]),s("right",i,[o.left,o.top],t.right,!1,1,[1,0])};this.reset=function(){i={},u={},d={}},this.addFloatingConnection=function(e,t){h[e]=t},this.removeFloatingConnection=function(e){delete h[e]},this.newConnection=function(e){var i=e.sourceId,r=e.targetId,o=e.endpoints,a=!0,s=function(s,l,c,d,p){i==r&&c.isContinuous&&(e._jsPlumb.instance.removeElement(o[1].canvas),a=!1),t.addToList(u,d,[p,l,c.constructor==n.DynamicAnchor])};s(0,o[0],o[0].anchor,r,e),a&&s(1,o[1],o[1].anchor,i,e)};var x=function(e){!function(e,n){if(e){var i=function(e){return e[4]==n};t.removeWithFunction(e.top,i),t.removeWithFunction(e.left,i),t.removeWithFunction(e.bottom,i),t.removeWithFunction(e.right,i)}}(d[e.elementId],e.id)};this.connectionDetached=function(e){var i=e.connection||e,r=e.sourceId,o=e.targetId,a=i.endpoints,s=function(e,i,r,o,a){null!=r&&r.constructor==n.FloatingAnchor||t.removeWithFunction(u[o],function(e){return e[0].id==a.id})};s(1,a[1],a[1].anchor,r,i),s(0,a[0],a[0].anchor,o,i),x(i.endpoints[0]),x(i.endpoints[1]),c.redraw(i.sourceId),c.redraw(i.targetId)},this.add=function(e,n){t.addToList(i,n,e)},this.changeId=function(e,t){u[t]=u[e],i[t]=i[e],delete u[e],delete i[e]},this.getConnectionsFor=function(e){return u[e]||[]},this.getEndpointsFor=function(e){return i[e]||[]},this.deleteEndpoint=function(e){t.removeWithFunction(i[e.elementId],function(t){return t.id==e.id}),x(e)},this.clearFor=function(e){delete i[e],i[e]=[]};var k=function(n,i,r,o,a,s,l,u,c,d,p,h){var f,g,m=-1,v=-1,y=o.endpoints[l],b=y.id,w=[1,0][l],x=[[i,r],o,a,s,b],k=n[c],C=y._continuousAnchorEdge?n[y._continuousAnchorEdge]:null;if(C){var S=t.findWithFunction(C,function(e){return e[4]==b});if(-1!=S)for(C.splice(S,1),f=0;f<C.length;f++)g=C[f][1],t.addWithFunction(p,g,function(e){return e.id==g.id}),t.addWithFunction(h,C[f][1].endpoints[l],function(e){return e.id==g.endpoints[l].id}),t.addWithFunction(h,C[f][1].endpoints[w],function(e){return e.id==g.endpoints[w].id})}for(f=0;f<k.length;f++)g=k[f][1],1==e.idx&&k[f][3]===s&&-1==v&&(v=f),t.addWithFunction(p,g,function(e){return e.id==g.id}),t.addWithFunction(h,k[f][1].endpoints[l],function(e){return e.id==g.endpoints[l].id}),t.addWithFunction(h,k[f][1].endpoints[w],function(e){return e.id==g.endpoints[w].id});if(-1!=m)k[m]=x;else{var _=u?-1!=v?v:0:k.length;k.splice(_,0,x)}y._continuousAnchorEdge=c};this.updateOtherEndpoint=function(e,i,r,o){var a=t.findWithFunction(u[e],function(e){return e[0].id===o.id}),s=t.findWithFunction(u[i],function(e){return e[0].id===o.id});-1!=a&&(u[e][a][0]=o,u[e][a][1]=o.endpoints[1],u[e][a][2]=o.endpoints[1].anchor.constructor==n.DynamicAnchor),s>-1&&(u[i].splice(s,1),t.addToList(u,r,[o,o.endpoints[0],o.endpoints[0].anchor.constructor==n.DynamicAnchor])),o.updateConnectedClass()},this.sourceChanged=function(e,i,r){if(e!==i){t.removeWithFunction(u[e],function(e){return e[0].id===r.id});var o=t.findWithFunction(u[r.targetId],function(e){return e[0].id===r.id});o>-1&&(u[r.targetId][o][0]=r,u[r.targetId][o][1]=r.endpoints[0],u[r.targetId][o][2]=r.endpoints[0].anchor.constructor==n.DynamicAnchor),t.addToList(u,i,[r,r.endpoints[1],r.endpoints[1].anchor.constructor==n.DynamicAnchor]),r.updateConnectedClass()}},this.rehomeEndpoint=function(e,n,r){var o=i[n]||[],a=p.getId(r);if(a!==n){var s=t.indexOf(o,e);if(s>-1){var l=o.splice(s,1)[0];c.add(l,a)}}for(var u=0;u<e.connections.length;u++)e.connections[u].sourceId==n?(e.connections[u].sourceId=e.elementId,e.connections[u].source=e.element,c.sourceChanged(n,e.elementId,e.connections[u])):e.connections[u].targetId==n&&(e.connections[u].targetId=e.elementId,e.connections[u].target=e.element,c.updateOtherEndpoint(e.connections[u].sourceId,n,e.elementId,e.connections[u]))},this.redraw=function(e,r,o,a,s,l){if(!p.isSuspendDrawing()){var c=i[e]||[],g=u[e]||[],m=[],v=[],y=[];o=o||p.timestamp(),a=a||{left:0,top:0},r&&(r={left:r.left+a.left,top:r.top+a.top});for(var b=p.updateOffset({elId:e,offset:r,recalc:!1,timestamp:o}),x={},C=0;C<g.length;C++){var S=g[C][0],_=S.sourceId,T=S.targetId,$=S.endpoints[0].anchor.isContinuous,E=S.endpoints[1].anchor.isContinuous;if($||E){var D=_+"_"+T,M=x[D],I=S.sourceId==e?1:0;$&&!d[_]&&(d[_]={top:[],right:[],bottom:[],left:[]}),E&&!d[T]&&(d[T]={top:[],right:[],bottom:[],left:[]}),e!=T&&p.updateOffset({elId:T,timestamp:o}),e!=_&&p.updateOffset({elId:_,timestamp:o});var P=p.getCachedData(T),A=p.getCachedData(_);T==_&&($||E)?k(d[_],-Math.PI/2,0,S,!1,T,0,!1,"top",_,m,v):(M||(M=f(_,T,A.o,P.o,S.endpoints[0].anchor,S.endpoints[1].anchor),x[D]=M),$&&k(d[_],M.theta,0,S,!1,T,0,!1,M.a[0],_,m,v),E&&k(d[T],M.theta2,-1,S,!0,_,1,!0,M.a[1],T,m,v)),$&&t.addWithFunction(y,_,function(e){return e===_}),E&&t.addWithFunction(y,T,function(e){return e===T}),t.addWithFunction(m,S,function(e){return e.id==S.id}),($&&0===I||E&&1===I)&&t.addWithFunction(v,S.endpoints[I],function(e){return e.id==S.endpoints[I].id})}}for(C=0;C<c.length;C++)0===c[C].connections.length&&c[C].anchor.isContinuous&&(d[e]||(d[e]={top:[],right:[],bottom:[],left:[]}),k(d[e],-Math.PI/2,0,{endpoints:[c[C],c[C]],paint:function(){}},!1,e,0,!1,c[C].anchor.getDefaultFace(),e,m,v),t.addWithFunction(y,e,function(t){return t===e}));for(C=0;C<y.length;C++)w(y[C],d[y[C]]);for(C=0;C<c.length;C++)c[C].paint({timestamp:o,offset:b,dimensions:b.s,recalc:l!==!0});for(C=0;C<v.length;C++){var j=p.getCachedData(v[C].elementId);v[C].paint({timestamp:o,offset:j,dimensions:j.s})}for(C=0;C<g.length;C++){var N=g[C][1];if(N.anchor.constructor==n.DynamicAnchor){N.paint({elementWithPrecedence:e,timestamp:o}),t.addWithFunction(m,g[C][0],function(e){return e.id==g[C][0].id});for(var O=0;O<N.connections.length;O++)N.connections[O]!==g[C][0]&&t.addWithFunction(m,N.connections[O],function(e){return e.id==N.connections[O].id})}else N.anchor.constructor==n.Anchor&&t.addWithFunction(m,g[C][0],function(e){return e.id==g[C][0].id})}var L=h[e];for(L&&L.paint({timestamp:o,recalc:!1,elId:e}),C=0;C<m.length;C++)m[C].paint({elId:e,timestamp:o,recalc:!1,clearEdits:s})}};var C=function(e){t.EventGenerator.apply(this),this.type="Continuous",this.isDynamic=!0,this.isContinuous=!0;for(var n=e.faces||["top","right","bottom","left"],i=!(e.clockwise===!1),s={},l={top:"bottom",right:"left",left:"right",bottom:"top"},u={top:"right",right:"bottom",left:"top",bottom:"left"},c={top:"left",right:"top",left:"bottom",bottom:"right"},d=i?u:c,p=i?c:u,h=e.cssClass||"",f=0;f<n.length;f++)s[n[f]]=!0;this.getDefaultFace=function(){return 0===n.length?"top":n[0]},this.verifyEdge=function(e){return s[e]?e:s[l[e]]?l[e]:s[d[e]]?d[e]:s[p[e]]?p[e]:e},this.isEdgeSupported=function(e){return s[e]===!0},this.compute=function(e){return o[e.element.id]||r[e.element.id]||[0,0]},this.getCurrentLocation=function(e){return o[e.element.id]||r[e.element.id]||[0,0]},this.getOrientation=function(e){return a[e.id]||[0,0]},this.clearUserDefinedLocation=function(){delete o[e.elementId]},this.setUserDefinedLocation=function(t){o[e.elementId]=t},this.getCssClass=function(){return h}};p.continuousAnchorFactory={get:function(e){return new C(e)},clear:function(e){delete o[e],delete r[e]}}},n.Anchor=function(e){this.x=e.x||0,this.y=e.y||0,this.elementId=e.elementId,this.cssClass=e.cssClass||"",this.userDefinedLocation=null,this.orientation=e.orientation||[0,0],this.lastReturnValue=null,this.offsets=e.offsets||[0,0],this.timestamp=null,t.EventGenerator.apply(this),this.compute=function(e){var t=e.xy,n=e.wh,i=e.timestamp;return e.clearUserDefinedLocation&&(this.userDefinedLocation=null),i&&i===self.timestamp?this.lastReturnValue:(null!=this.userDefinedLocation?this.lastReturnValue=this.userDefinedLocation:this.lastReturnValue=[t[0]+this.x*n[0]+this.offsets[0],t[1]+this.y*n[1]+this.offsets[1]],this.timestamp=i,this.lastReturnValue)},this.getCurrentLocation=function(e){return null==this.lastReturnValue||null!=e.timestamp&&this.timestamp!=e.timestamp?this.compute(e):this.lastReturnValue}},t.extend(n.Anchor,t.EventGenerator,{equals:function(e){if(!e)return!1;var t=e.getOrientation(),n=this.getOrientation();return this.x==e.x&&this.y==e.y&&this.offsets[0]==e.offsets[0]&&this.offsets[1]==e.offsets[1]&&n[0]==t[0]&&n[1]==t[1]},getUserDefinedLocation:function(){return this.userDefinedLocation},setUserDefinedLocation:function(e){this.userDefinedLocation=e},clearUserDefinedLocation:function(){this.userDefinedLocation=null},getOrientation:function(){return this.orientation},getCssClass:function(){return this.cssClass}}),n.FloatingAnchor=function(e){n.Anchor.apply(this,arguments);var t=e.reference,i=e.referenceCanvas,r=n.getSize(i),o=0,a=0,s=null,l=null;this.orientation=null,this.x=0,this.y=0,this.isFloating=!0,this.compute=function(e){var t=e.xy,n=[t[0]+r[0]/2,t[1]+r[1]/2];return l=n,n},this.getOrientation=function(e){if(s)return s;var n=t.getOrientation(e);return[Math.abs(n[0])*o*-1,Math.abs(n[1])*a*-1]},this.over=function(e,t){s=e.getOrientation(t)},this.out=function(){s=null},this.getCurrentLocation=function(e){return null==l?this.compute(e):l}},t.extend(n.FloatingAnchor,n.Anchor);var i=function(e,t,i){return e.constructor==n.Anchor?e:t.makeAnchor(e,i,t)};n.DynamicAnchor=function(e){n.Anchor.apply(this,arguments),this.isDynamic=!0,this.anchors=[],this.elementId=e.elementId,this.jsPlumbInstance=e.jsPlumbInstance;for(var t=0;t<e.anchors.length;t++)this.anchors[t]=i(e.anchors[t],this.jsPlumbInstance,this.elementId);this.getAnchors=function(){return this.anchors},this.locked=!1;var r=this.anchors.length>0?this.anchors[0]:null,o=r,a=this,s=function(e,t,n,i,r){var o=i[0]+e.x*r[0],a=i[1]+e.y*r[1],s=i[0]+r[0]/2,l=i[1]+r[1]/2;return Math.sqrt(Math.pow(t-o,2)+Math.pow(n-a,2))+Math.sqrt(Math.pow(s-o,2)+Math.pow(l-a,2))},l=e.selector||function(e,t,n,i,r){for(var o=n[0]+i[0]/2,a=n[1]+i[1]/2,l=-1,u=1/0,c=0;c<r.length;c++){var d=s(r[c],o,a,e,t);u>d&&(l=c+0,u=d)}return r[l]};this.compute=function(e){var t=e.xy,n=e.wh,i=e.txy,s=e.twh;this.timestamp=e.timestamp;var u=a.getUserDefinedLocation();return null!=u?u:this.locked||null==i||null==s?r.compute(e):(e.timestamp=null,r=l(t,n,i,s,this.anchors),this.x=r.x,this.y=r.y,r!=o&&this.fire("anchorChanged",r),o=r,r.compute(e))},this.getCurrentLocation=function(e){return this.getUserDefinedLocation()||(null!=r?r.getCurrentLocation(e):null)},this.getOrientation=function(e){return null!=r?r.getOrientation(e):[0,0]},this.over=function(e,t){null!=r&&r.over(e,t)},this.out=function(){null!=r&&r.out()},this.getCssClass=function(){return r&&r.getCssClass()||""}},t.extend(n.DynamicAnchor,n.Anchor);var r=function(e,t,i,r,o,a){n.Anchors[o]=function(n){var s=n.jsPlumbInstance.makeAnchor([e,t,i,r,0,0],n.elementId,n.jsPlumbInstance);return s.type=o,a&&a(s,n),s}};r(.5,0,0,-1,"TopCenter"),r(.5,1,0,1,"BottomCenter"),r(0,.5,-1,0,"LeftMiddle"),r(1,.5,1,0,"RightMiddle"),r(.5,0,0,-1,"Top"),r(.5,1,0,1,"Bottom"),r(0,.5,-1,0,"Left"),r(1,.5,1,0,"Right"),r(.5,.5,0,0,"Center"),r(1,0,0,-1,"TopRight"),r(1,1,0,1,"BottomRight"),r(0,0,0,-1,"TopLeft"),r(0,1,0,1,"BottomLeft"),n.Defaults.DynamicAnchors=function(e){return e.jsPlumbInstance.makeAnchors(["TopCenter","RightMiddle","BottomCenter","LeftMiddle"],e.elementId,e.jsPlumbInstance)},n.Anchors.AutoDefault=function(e){var t=e.jsPlumbInstance.makeDynamicAnchor(n.Defaults.DynamicAnchors(e));return t.type="AutoDefault",t};var o=function(e,t){n.Anchors[e]=function(n){var i=n.jsPlumbInstance.makeAnchor(["Continuous",{faces:t}],n.elementId,n.jsPlumbInstance);return i.type=e,i}};n.Anchors.Continuous=function(e){return e.jsPlumbInstance.continuousAnchorFactory.get(e)},o("ContinuousLeft",["left"]),o("ContinuousTop",["top"]),o("ContinuousBottom",["bottom"]),o("ContinuousRight",["right"]),r(0,0,0,0,"Assign",function(e,t){var n=t.position||"Fixed";e.positionFinder=n.constructor==String?t.jsPlumbInstance.AnchorPositionFinders[n]:n,e.constructorParams=t}),jsPlumbInstance.prototype.AnchorPositionFinders={Fixed:function(e,t,n){return[(e.left-t.left)/n[0],(e.top-t.top)/n[1]]},Grid:function(e,t,n,i){var r=e.left-t.left,o=e.top-t.top,a=n[0]/i.grid[0],s=n[1]/i.grid[1],l=Math.floor(r/a),u=Math.floor(o/s);return[(l*a+a/2)/n[0],(u*s+s/2)/n[1]]}},n.Anchors.Perimeter=function(e){e=e||{};var t=e.anchorCount||60,n=e.shape;if(!n)throw new Error("no shape supplied to Perimeter Anchor type");var i=function(){for(var e=.5,n=2*Math.PI/t,i=0,r=[],o=0;t>o;o++){var a=e+e*Math.sin(i),s=e+e*Math.cos(i);r.push([a,s,0,0]),i+=n}return r},r=function(e){for(var n=t/e.length,i=[],r=function(e,r,o,a,s){n=t*s;for(var l=(o-e)/n,u=(a-r)/n,c=0;n>c;c++)i.push([e+l*c,r+u*c,0,0])},o=0;o<e.length;o++)r.apply(null,e[o]);return i},o=function(e){for(var t=[],n=0;n<e.length;n++)t.push([e[n][0],e[n][1],e[n][2],e[n][3],1/e.length]);return r(t)},a=function(){return o([[0,0,1,0],[1,0,1,1],[1,1,0,1],[0,1,0,0]])},s={Circle:i,Ellipse:i,Diamond:function(){return o([[.5,0,1,.5],[1,.5,.5,1],[.5,1,0,.5],[0,.5,.5,0]])},Rectangle:a,Square:a,Triangle:function(){return o([[.5,0,1,1],[1,1,0,1],[0,1,.5,0]])},Path:function(e){for(var t=e.points,n=[],i=0,o=0;o<t.length-1;o++){var a=Math.sqrt(Math.pow(t[o][2]-t[o][0])+Math.pow(t[o][3]-t[o][1]));i+=a,n.push([t[o][0],t[o][1],t[o+1][0],t[o+1][1],a])}for(var s=0;s<n.length;s++)n[s][4]=n[s][4]/i;return r(n)}},l=function(e,t){for(var n=[],i=t/180*Math.PI,r=0;r<e.length;r++){var o=e[r][0]-.5,a=e[r][1]-.5;n.push([.5+(o*Math.cos(i)-a*Math.sin(i)),.5+(o*Math.sin(i)+a*Math.cos(i)),e[r][2],e[r][3]])}return n};if(!s[n])throw new Error("Shape ["+n+"] is unknown by Perimeter Anchor type");var u=s[n](e);e.rotation&&(u=l(u,e.rotation));var c=e.jsPlumbInstance.makeDynamicAnchor(u);return c.type="Perimeter",c}}.call(this),function(){"use strict";var e=this,t=e.jsPlumb,n=e.jsPlumbUtil,i=e.Biltong;t.Segments={AbstractSegment:function(e){this.params=e,this.findClosestPointOnPath=function(e,t){return{d:1/0,x:null,y:null,l:null}},this.getBounds=function(){return{minX:Math.min(e.x1,e.x2),minY:Math.min(e.y1,e.y2),maxX:Math.max(e.x1,e.x2),maxY:Math.max(e.y1,e.y2)}}},Straight:function(e){var n,r,o,a,s,l,u,c=(t.Segments.AbstractSegment.apply(this,arguments),function(){n=Math.sqrt(Math.pow(s-a,2)+Math.pow(u-l,2)),r=i.gradient({x:a,y:l},{x:s,y:u}),o=-1/r});this.type="Straight",this.getLength=function(){return n},this.getGradient=function(){return r},this.getCoordinates=function(){return{x1:a,y1:l,x2:s,y2:u}},this.setCoordinates=function(e){a=e.x1,l=e.y1,s=e.x2,u=e.y2,c()},this.setCoordinates({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}),this.getBounds=function(){return{minX:Math.min(a,s),minY:Math.min(l,u),maxX:Math.max(a,s),maxY:Math.max(l,u)}},this.pointOnPath=function(e,t){if(0!==e||t){if(1!=e||t){var r=t?e>0?e:n+e:e*n;return i.pointOnLine({x:a,y:l},{x:s,y:u},r)}return{x:s,y:u}}return{x:a,y:l}},this.gradientAtPoint=function(e){return r},this.pointAlongPathFrom=function(e,t,n){var r=this.pointOnPath(e,n),o=0>=t?{x:a,y:l}:{x:s,y:u};return 0>=t&&Math.abs(t)>1&&(t*=-1),i.pointOnLine(r,o,t)};var d=function(e,t,n){return n>=Math.min(e,t)&&n<=Math.max(e,t)},p=function(e,t,n){return Math.abs(n-e)<Math.abs(n-t)?e:t};this.findClosestPointOnPath=function(e,t){var c={d:1/0,x:null,y:null,l:null,x1:a,x2:s,y1:l,y2:u};if(0===r)c.y=l,c.x=d(a,s,e)?e:p(a,s,e);else if(r==1/0||r==-(1/0))c.x=a,c.y=d(l,u,t)?t:p(l,u,t);else{var h=l-r*a,f=t-o*e,g=(f-h)/(r-o),m=r*g+h;c.x=d(a,s,g)?g:p(a,s,g),c.y=d(l,u,m)?m:p(l,u,m)}var v=i.lineLength([c.x,c.y],[a,l]);return c.d=i.lineLength([e,t],[c.x,c.y]),c.l=v/n,c}},Arc:function(e){var n=(t.Segments.AbstractSegment.apply(this,arguments),function(t,n){return i.theta([e.cx,e.cy],[t,n])}),r=function(e,t){if(e.anticlockwise){var n=e.startAngle<e.endAngle?e.startAngle+o:e.startAngle,i=Math.abs(n-e.endAngle);return n-i*t}var r=e.endAngle<e.startAngle?e.endAngle+o:e.endAngle,a=Math.abs(r-e.startAngle);return e.startAngle+a*t},o=2*Math.PI;this.radius=e.r,this.anticlockwise=e.ac,this.type="Arc",e.startAngle&&e.endAngle?(this.startAngle=e.startAngle,this.endAngle=e.endAngle,this.x1=e.cx+this.radius*Math.cos(e.startAngle),this.y1=e.cy+this.radius*Math.sin(e.startAngle),this.x2=e.cx+this.radius*Math.cos(e.endAngle),this.y2=e.cy+this.radius*Math.sin(e.endAngle)):(this.startAngle=n(e.x1,e.y1),this.endAngle=n(e.x2,e.y2),this.x1=e.x1,this.y1=e.y1,this.x2=e.x2,this.y2=e.y2),this.endAngle<0&&(this.endAngle+=o),this.startAngle<0&&(this.startAngle+=o),this.segment=i.quadrant([this.x1,this.y1],[this.x2,this.y2]);var a=this.endAngle<this.startAngle?this.endAngle+o:this.endAngle;this.sweep=Math.abs(a-this.startAngle),this.anticlockwise&&(this.sweep=o-this.sweep);var s=2*Math.PI*this.radius,l=this.sweep/o,u=s*l;this.getLength=function(){return u},this.getBounds=function(){return{minX:e.cx-e.r,maxX:e.cx+e.r,minY:e.cy-e.r,maxY:e.cy+e.r}};var c=1e-10,d=function(e){var t=Math.floor(e),n=Math.ceil(e);return c>e-t?t:c>n-e?n:e};this.pointOnPath=function(t,n){if(0===t)return{x:this.x1,y:this.y1,theta:this.startAngle};if(1==t)return{x:this.x2,y:this.y2,theta:this.endAngle};n&&(t/=u);var i=r(this,t),o=e.cx+e.r*Math.cos(i),a=e.cy+e.r*Math.sin(i);return{x:d(o),y:d(a),theta:i}},this.gradientAtPoint=function(t,n){var r=this.pointOnPath(t,n),o=i.normal([e.cx,e.cy],[r.x,r.y]);return this.anticlockwise||o!=1/0&&o!=-(1/0)||(o*=-1),o},this.pointAlongPathFrom=function(t,n,i){var r=this.pointOnPath(t,i),o=n/s*2*Math.PI,a=this.anticlockwise?-1:1,l=r.theta+a*o,u=e.cx+this.radius*Math.cos(l),c=e.cy+this.radius*Math.sin(l);return{x:u,y:c}}},Bezier:function(n){this.curve=[{x:n.x1,y:n.y1},{x:n.cp1x,y:n.cp1y},{x:n.cp2x,y:n.cp2y},{x:n.x2,y:n.y2}];t.Segments.AbstractSegment.apply(this,arguments);this.bounds={minX:Math.min(n.x1,n.x2,n.cp1x,n.cp2x),minY:Math.min(n.y1,n.y2,n.cp1y,n.cp2y),maxX:Math.max(n.x1,n.x2,n.cp1x,n.cp2x),maxY:Math.max(n.y1,n.y2,n.cp1y,n.cp2y)},this.type="Bezier";var i=function(t,n,i){return i&&(n=e.jsBezier.locationAlongCurveFrom(t,n>0?0:1,n)),n};this.pointOnPath=function(t,n){return t=i(this.curve,t,n),e.jsBezier.pointOnCurve(this.curve,t)},this.gradientAtPoint=function(t,n){return t=i(this.curve,t,n),e.jsBezier.gradientAtPoint(this.curve,t)},this.pointAlongPathFrom=function(t,n,r){return t=i(this.curve,t,r),e.jsBezier.pointAlongCurveFrom(this.curve,t,n)},this.getLength=function(){return e.jsBezier.getLength(this.curve)},this.getBounds=function(){return this.bounds}}};var r=function(){this.resetBounds=function(){this.bounds={minX:1/0,minY:1/0,maxX:-(1/0),maxY:-(1/0)}},this.resetBounds()};t.Connectors.AbstractConnector=function(e){r.apply(this,arguments);var o=[],a=0,s=[],l=[],u=e.stub||0,c=n.isArray(u)?u[0]:u,d=n.isArray(u)?u[1]:u,p=e.gap||0,h=n.isArray(p)?p[0]:p,f=n.isArray(p)?p[1]:p,g=null,m=!1,v=null;this.getPath=function(){},this.setPath=function(e){},this.findSegmentForPoint=function(e,t){for(var n={d:1/0,s:null,x:null,y:null,l:null},i=0;i<o.length;i++){var r=o[i].findClosestPointOnPath(e,t);r.d<n.d&&(n.d=r.d,n.l=r.l,n.x=r.x,n.y=r.y,n.s=o[i],n.x1=r.x1,n.x2=r.x2,n.y1=r.y1,n.y2=r.y2,n.index=i)}return n};var y=function(){for(var e=0,t=0;t<o.length;t++){var n=o[t].getLength();l[t]=n/a,s[t]=[e,e+=n/a]}},b=function(e,t){t&&(e=e>0?e/a:(a+e)/a);for(var n=s.length-1,i=1,r=0;r<s.length;r++)if(s[r][1]>=e){n=r,i=1==e?1:0===e?0:(e-s[r][0])/l[r];break}return{segment:o[n],proportion:i,index:n}},w=function(e,n,i){if(i.x1!=i.x2||i.y1!=i.y2){var r=new t.Segments[n](i);o.push(r),a+=r.getLength(),e.updateBounds(r)}},x=function(){a=o.length=s.length=l.length=0};this.setSegments=function(e){g=[],a=0;for(var t=0;t<e.length;t++)g.push(e[t]),a+=e[t].getLength()};var k=function(e){this.lineWidth=e.lineWidth;var t=i.quadrant(e.sourcePos,e.targetPos),n=e.targetPos[0]<e.sourcePos[0],r=e.targetPos[1]<e.sourcePos[1],o=e.lineWidth||1,a=e.sourceEndpoint.anchor.getOrientation(e.sourceEndpoint),s=e.targetEndpoint.anchor.getOrientation(e.targetEndpoint),l=n?e.targetPos[0]:e.sourcePos[0],u=r?e.targetPos[1]:e.sourcePos[1],p=Math.abs(e.targetPos[0]-e.sourcePos[0]),g=Math.abs(e.targetPos[1]-e.sourcePos[1]);if(0===a[0]&&0===a[1]||0===s[0]&&0===s[1]){var m=p>g?0:1,v=[1,0][m];a=[],s=[],a[m]=e.sourcePos[m]>e.targetPos[m]?-1:1,s[m]=e.sourcePos[m]>e.targetPos[m]?1:-1,a[v]=0,s[v]=0}var y=n?p+h*a[0]:h*a[0],b=r?g+h*a[1]:h*a[1],w=n?f*s[0]:p+f*s[0],x=r?f*s[1]:g+f*s[1],k=a[0]*s[0]+a[1]*s[1],C={sx:y,sy:b,tx:w,ty:x,lw:o,xSpan:Math.abs(w-y),ySpan:Math.abs(x-b),mx:(y+w)/2,my:(b+x)/2,so:a,to:s,x:l,y:u,w:p,h:g,segment:t,startStubX:y+a[0]*c,startStubY:b+a[1]*c,endStubX:w+s[0]*d,endStubY:x+s[1]*d,isXGreaterThanStubTimes2:Math.abs(y-w)>c+d,isYGreaterThanStubTimes2:Math.abs(b-x)>c+d,opposite:-1==k,perpendicular:0===k,orthogonal:1==k,sourceAxis:0===a[0]?"y":"x",points:[l,u,p,g,y,b,w,x]};return C.anchorOrientation=C.opposite?"opposite":C.orthogonal?"orthogonal":"perpendicular",C};this.getSegments=function(){return o},this.updateBounds=function(e){var t=e.getBounds();this.bounds.minX=Math.min(this.bounds.minX,t.minX),this.bounds.maxX=Math.max(this.bounds.maxX,t.maxX),this.bounds.minY=Math.min(this.bounds.minY,t.minY),this.bounds.maxY=Math.max(this.bounds.maxY,t.maxY)};return this.pointOnPath=function(e,t){var n=b(e,t);return n.segment&&n.segment.pointOnPath(n.proportion,!1)||[0,0]},this.gradientAtPoint=function(e,t){var n=b(e,t);return n.segment&&n.segment.gradientAtPoint(n.proportion,!1)||0},this.pointAlongPathFrom=function(e,t,n){var i=b(e,n);return i.segment&&i.segment.pointAlongPathFrom(i.proportion,t,!1)||[0,0]},this.compute=function(e){m||(v=k.call(this,e)),x(),this._compute(v,e),this.x=v.points[0],this.y=v.points[1],this.w=v.points[2],this.h=v.points[3],this.segment=v.segment,y()},{addSegment:w,prepareCompute:k,sourceStub:c,targetStub:d,maxStub:Math.max(c,d),sourceGap:h,targetGap:f,maxGap:Math.max(h,f)}},n.extend(t.Connectors.AbstractConnector,r);var o=t.Connectors.Straight=function(){this.type="Straight";var e=t.Connectors.AbstractConnector.apply(this,arguments);this._compute=function(t,n){e.addSegment(this,"Straight",{x1:t.sx,y1:t.sy,x2:t.startStubX,y2:t.startStubY}),e.addSegment(this,"Straight",{x1:t.startStubX,y1:t.startStubY,x2:t.endStubX,y2:t.endStubY}),e.addSegment(this,"Straight",{x1:t.endStubX,y1:t.endStubY,x2:t.tx,y2:t.ty})}};n.extend(t.Connectors.Straight,t.Connectors.AbstractConnector),t.registerConnectorType(o,"Straight"),t.Endpoints.AbstractEndpoint=function(e){r.apply(this,arguments);var t=this.compute=function(e,t,n,i){var r=this._compute.apply(this,arguments);return this.x=r[0],this.y=r[1],this.w=r[2],this.h=r[3],this.bounds.minX=this.x,this.bounds.minY=this.y,this.bounds.maxX=this.x+this.w,this.bounds.maxY=this.y+this.h,r};return{compute:t,cssClass:e.cssClass}},n.extend(t.Endpoints.AbstractEndpoint,r),t.Endpoints.Dot=function(e){this.type="Dot";t.Endpoints.AbstractEndpoint.apply(this,arguments);e=e||{},this.radius=e.radius||10,this.defaultOffset=.5*this.radius,this.defaultInnerRadius=this.radius/3,this._compute=function(e,t,n,i){this.radius=n.radius||this.radius;var r=e[0]-this.radius,o=e[1]-this.radius,a=2*this.radius,s=2*this.radius;if(n.strokeStyle){var l=n.lineWidth||1;r-=l,o-=l,a+=2*l,s+=2*l}return[r,o,a,s,this.radius]}},n.extend(t.Endpoints.Dot,t.Endpoints.AbstractEndpoint),t.Endpoints.Rectangle=function(e){this.type="Rectangle";t.Endpoints.AbstractEndpoint.apply(this,arguments);e=e||{},this.width=e.width||20,this.height=e.height||20,this._compute=function(e,t,n,i){var r=n.width||this.width,o=n.height||this.height,a=e[0]-r/2,s=e[1]-o/2;return[a,s,r,o]}},n.extend(t.Endpoints.Rectangle,t.Endpoints.AbstractEndpoint);var a=function(e){t.jsPlumbUIComponent.apply(this,arguments),this._jsPlumb.displayElements=[]};n.extend(a,t.jsPlumbUIComponent,{getDisplayElements:function(){return this._jsPlumb.displayElements},appendDisplayElement:function(e){this._jsPlumb.displayElements.push(e)}}),t.Endpoints.Image=function(i){this.type="Image",a.apply(this,arguments),t.Endpoints.AbstractEndpoint.apply(this,arguments);var r=i.onload,o=i.src||i.url,s=i.cssClass?" "+i.cssClass:"";this._jsPlumb.img=new Image,this._jsPlumb.ready=!1,this._jsPlumb.initialized=!1,this._jsPlumb.deleted=!1,this._jsPlumb.widthToUse=i.width,this._jsPlumb.heightToUse=i.height,this._jsPlumb.endpoint=i.endpoint,this._jsPlumb.img.onload=function(){null!=this._jsPlumb&&(this._jsPlumb.ready=!0,this._jsPlumb.widthToUse=this._jsPlumb.widthToUse||this._jsPlumb.img.width,this._jsPlumb.heightToUse=this._jsPlumb.heightToUse||this._jsPlumb.img.height,r&&r(this))}.bind(this),this._jsPlumb.endpoint.setImage=function(e,t){var n=e.constructor==String?e:e.src;r=t,this._jsPlumb.img.src=n,null!=this.canvas&&this.canvas.setAttribute("src",this._jsPlumb.img.src)}.bind(this),this._jsPlumb.endpoint.setImage(o,r),this._compute=function(e,t,n,i){return this.anchorPoint=e,this._jsPlumb.ready?[e[0]-this._jsPlumb.widthToUse/2,e[1]-this._jsPlumb.heightToUse/2,this._jsPlumb.widthToUse,this._jsPlumb.heightToUse]:[0,0,0,0]},this.canvas=jsPlumb.createElement("img",{position:"absolute",margin:0,padding:0,outline:0},this._jsPlumb.instance.endpointClass+s),this._jsPlumb.widthToUse&&this.canvas.setAttribute("width",this._jsPlumb.widthToUse),this._jsPlumb.heightToUse&&this.canvas.setAttribute("height",this._jsPlumb.heightToUse),this._jsPlumb.instance.appendElement(this.canvas),this.actuallyPaint=function(e,t,i){if(!this._jsPlumb.deleted){this._jsPlumb.initialized||(this.canvas.setAttribute("src",this._jsPlumb.img.src),this.appendDisplayElement(this.canvas),this._jsPlumb.initialized=!0);var r=this.anchorPoint[0]-this._jsPlumb.widthToUse/2,o=this.anchorPoint[1]-this._jsPlumb.heightToUse/2;n.sizeElement(this.canvas,r,o,this._jsPlumb.widthToUse,this._jsPlumb.heightToUse)}},this.paint=function(t,n){null!=this._jsPlumb&&(this._jsPlumb.ready?this.actuallyPaint(t,n):e.setTimeout(function(){this.paint(t,n)}.bind(this),200))}},n.extend(t.Endpoints.Image,[a,t.Endpoints.AbstractEndpoint],{cleanup:function(e){e&&(this._jsPlumb.deleted=!0,this.canvas&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null)}}),t.Endpoints.Blank=function(e){t.Endpoints.AbstractEndpoint.apply(this,arguments);
|
|
3248
|
|
-this.type="Blank",a.apply(this,arguments),this._compute=function(e,t,n,i){return[e[0],e[1],10,0]};var i=e.cssClass?" "+e.cssClass:"";this.canvas=jsPlumb.createElement("div",{display:"block",width:"1px",height:"1px",background:"transparent",position:"absolute"},this._jsPlumb.instance.endpointClass+i),this._jsPlumb.instance.appendElement(this.canvas),this.paint=function(e,t){n.sizeElement(this.canvas,this.x,this.y,this.w,this.h)}},n.extend(t.Endpoints.Blank,[t.Endpoints.AbstractEndpoint,a],{cleanup:function(){this.canvas&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)}}),t.Endpoints.Triangle=function(e){this.type="Triangle",t.Endpoints.AbstractEndpoint.apply(this,arguments),e=e||{},e.width=e.width||55,e.height=e.height||55,this.width=e.width,this.height=e.height,this._compute=function(e,t,n,i){var r=n.width||self.width,o=n.height||self.height,a=e[0]-r/2,s=e[1]-o/2;return[a,s,r,o]}};var s=t.Overlays.AbstractOverlay=function(e){this.visible=!0,this.isAppendedAtTopLevel=!0,this.component=e.component,this.loc=null==e.location?.5:e.location,this.endpointLoc=null==e.endpointLocation?[.5,.5]:e.endpointLocation};s.prototype={cleanup:function(e){e&&(this.component=null,this.canvas=null,this.endpointLoc=null)},reattach:function(e){},setVisible:function(e){this.visible=e,this.component.repaint()},isVisible:function(){return this.visible},hide:function(){this.setVisible(!1)},show:function(){this.setVisible(!0)},incrementLocation:function(e){this.loc+=e,this.component.repaint()},setLocation:function(e){this.loc=e,this.component.repaint()},getLocation:function(){return this.loc},updateFrom:function(){}},t.Overlays.Arrow=function(e){this.type="Arrow",s.apply(this,arguments),this.isAppendedAtTopLevel=!1,e=e||{},this.length=e.length||20,this.width=e.width||20,this.id=e.id;var t=(e.direction||1)<0?-1:1,r=e.paintStyle||{lineWidth:1},o=e.foldback||.623;this.computeMaxSize=function(){return 1.5*self.width},this.draw=function(e,a){var s,l,u,c,d;if(e.pointAlongPathFrom){if(n.isString(this.loc)||this.loc>1||this.loc<0){var p=parseInt(this.loc,10),h=this.loc<0?1:0;s=e.pointAlongPathFrom(h,p,!1),l=e.pointAlongPathFrom(h,p-t*this.length/2,!1),u=i.pointOnLine(s,l,this.length)}else if(1==this.loc){if(s=e.pointOnPath(this.loc),l=e.pointAlongPathFrom(this.loc,-this.length),u=i.pointOnLine(s,l,this.length),-1==t){var f=u;u=s,s=f}}else if(0===this.loc){if(u=e.pointOnPath(this.loc),l=e.pointAlongPathFrom(this.loc,this.length),s=i.pointOnLine(u,l,this.length),-1==t){var g=u;u=s,s=g}}else s=e.pointAlongPathFrom(this.loc,t*this.length/2),l=e.pointOnPath(this.loc),u=i.pointOnLine(s,l,this.length);c=i.perpendicularLineTo(s,u,this.width),d=i.pointOnLine(s,u,o*this.length);var m={hxy:s,tail:c,cxy:d},v=r.strokeStyle||a.strokeStyle,y=r.fillStyle||a.strokeStyle,b=r.lineWidth||a.lineWidth;return{component:e,d:m,lineWidth:b,strokeStyle:v,fillStyle:y,minX:Math.min(s.x,c[0].x,c[1].x),maxX:Math.max(s.x,c[0].x,c[1].x),minY:Math.min(s.y,c[0].y,c[1].y),maxY:Math.max(s.y,c[0].y,c[1].y)}}return{component:e,minX:0,maxX:0,minY:0,maxY:0}}},n.extend(t.Overlays.Arrow,s,{updateFrom:function(e){this.length=e.length||this.length,this.width=e.width||this.width,this.direction=null!=e.direction?e.direction:this.direction,this.foldback=e.foldback||this.foldback}}),t.Overlays.PlainArrow=function(e){e=e||{};var n=t.extend(e,{foldback:1});t.Overlays.Arrow.call(this,n),this.type="PlainArrow"},n.extend(t.Overlays.PlainArrow,t.Overlays.Arrow),t.Overlays.Diamond=function(e){e=e||{};var n=e.length||40,i=jsPlumb.extend(e,{length:n/2,foldback:2});t.Overlays.Arrow.call(this,i),this.type="Diamond"},n.extend(t.Overlays.Diamond,t.Overlays.Arrow);var l=function(e,t){return(null==e._jsPlumb.cachedDimensions||t)&&(e._jsPlumb.cachedDimensions=e.getDimensions()),e._jsPlumb.cachedDimensions},u=function(e){t.jsPlumbUIComponent.apply(this,arguments),s.apply(this,arguments);var i=this.fire;this.fire=function(){i.apply(this,arguments),this.component&&this.component.fire.apply(this.component,arguments)},this.detached=!1,this.id=e.id,this._jsPlumb.div=null,this._jsPlumb.initialised=!1,this._jsPlumb.component=e.component,this._jsPlumb.cachedDimensions=null,this._jsPlumb.create=e.create,this._jsPlumb.initiallyInvisible=e.visible===!1,this.getElement=function(){if(null==this._jsPlumb.div){var t=this._jsPlumb.div=jsPlumb.getDOMElement(this._jsPlumb.create(this._jsPlumb.component));t.style.position="absolute",t.className=this._jsPlumb.instance.overlayClass+" "+(this.cssClass?this.cssClass:e.cssClass?e.cssClass:""),this._jsPlumb.instance.appendElement(t),this._jsPlumb.instance.getId(t),this.canvas=t;var n="translate(-50%, -50%)";t.style.webkitTransform=n,t.style.mozTransform=n,t.style.msTransform=n,t.style.oTransform=n,t.style.transform=n,t._jsPlumb=this,e.visible===!1&&(t.style.display="none")}return this._jsPlumb.div},this.draw=function(e,t,i){var r=l(this);if(null!=r&&2==r.length){var o={x:0,y:0};if(i)o={x:i[0],y:i[1]};else if(e.pointOnPath){var a=this.loc,s=!1;(n.isString(this.loc)||this.loc<0||this.loc>1)&&(a=parseInt(this.loc,10),s=!0),o=e.pointOnPath(a,s)}else{var u=this.loc.constructor==Array?this.loc:this.endpointLoc;o={x:u[0]*e.w,y:u[1]*e.h}}var c=o.x-r[0]/2,d=o.y-r[1]/2;return{component:e,d:{minx:c,miny:d,td:r,cxy:o},minX:c,maxX:c+r[0],minY:d,maxY:d+r[1]}}return{minX:0,maxX:0,minY:0,maxY:0}}};n.extend(u,[t.jsPlumbUIComponent,s],{getDimensions:function(){return n.oldIE?t.getSize(this.getElement()):[1,1]},setVisible:function(e){this._jsPlumb.div&&(this._jsPlumb.div.style.display=e?"block":"none",e&&this._jsPlumb.initiallyInvisible&&(l(this,!0),this.component.repaint(),this._jsPlumb.initiallyInvisible=!1))},clearCachedDimensions:function(){this._jsPlumb.cachedDimensions=null},cleanup:function(e){e?null!=this._jsPlumb.div&&(this._jsPlumb.div._jsPlumb=null,this._jsPlumb.instance.removeElement(this._jsPlumb.div)):(this._jsPlumb&&this._jsPlumb.div&&this._jsPlumb.div.parentNode&&this._jsPlumb.div.parentNode.removeChild(this._jsPlumb.div),this.detached=!0)},reattach:function(e){null!=this._jsPlumb.div&&e.getContainer().appendChild(this._jsPlumb.div),this.detached=!1},computeMaxSize:function(){var e=l(this);return Math.max(e[0],e[1])},paint:function(e,t){this._jsPlumb.initialised||(this.getElement(),e.component.appendDisplayElement(this._jsPlumb.div),this._jsPlumb.initialised=!0,this.detached&&this._jsPlumb.div.parentNode.removeChild(this._jsPlumb.div)),this._jsPlumb.div.style.left=e.component.x+e.d.minx+"px",this._jsPlumb.div.style.top=e.component.y+e.d.miny+"px"}}),t.Overlays.Custom=function(e){this.type="Custom",u.apply(this,arguments)},n.extend(t.Overlays.Custom,u),t.Overlays.GuideLines=function(){var e=this;e.length=50,e.lineWidth=5,this.type="GuideLines",s.apply(this,arguments),t.jsPlumbUIComponent.apply(this,arguments),this.draw=function(t,n){var r=t.pointAlongPathFrom(e.loc,e.length/2),o=t.pointOnPath(e.loc),a=i.pointOnLine(r,o,e.length),s=i.perpendicularLineTo(r,a,40),l=i.perpendicularLineTo(a,r,20);return{connector:t,head:r,tail:a,headLine:l,tailLine:s,minX:Math.min(r.x,a.x,l[0].x,l[1].x),minY:Math.min(r.y,a.y,l[0].y,l[1].y),maxX:Math.max(r.x,a.x,l[0].x,l[1].x),maxY:Math.max(r.y,a.y,l[0].y,l[1].y)}}},t.Overlays.Label=function(e){this.labelStyle=e.labelStyle;this.cssClass=null!=this.labelStyle?this.labelStyle.cssClass:null;var n=t.extend({create:function(){return jsPlumb.createElement("div")}},e);if(t.Overlays.Custom.call(this,n),this.type="Label",this.label=e.label||"",this.labelText=null,this.labelStyle){var i=this.getElement();if(this.labelStyle.font=this.labelStyle.font||"12px sans-serif",i.style.font=this.labelStyle.font,i.style.color=this.labelStyle.color||"black",this.labelStyle.fillStyle&&(i.style.background=this.labelStyle.fillStyle),this.labelStyle.borderWidth>0){var r=this.labelStyle.borderStyle?this.labelStyle.borderStyle:"black";i.style.border=this.labelStyle.borderWidth+"px solid "+r}this.labelStyle.padding&&(i.style.padding=this.labelStyle.padding)}},n.extend(t.Overlays.Label,t.Overlays.Custom,{cleanup:function(e){e&&(this.div=null,this.label=null,this.labelText=null,this.cssClass=null,this.labelStyle=null)},getLabel:function(){return this.label},setLabel:function(e){this.label=e,this.labelText=null,this.clearCachedDimensions(),this.update(),this.component.repaint()},getDimensions:function(){return this.update(),u.prototype.getDimensions.apply(this,arguments)},update:function(){if("function"==typeof this.label){var e=this.label(this);this.getElement().innerHTML=e.replace(/\r\n/g,"<br/>")}else null==this.labelText&&(this.labelText=this.label,this.getElement().innerHTML=this.labelText.replace(/\r\n/g,"<br/>"))},updateFrom:function(e){e.label&&this.setLabel(e.label)}})}.call(this),function(){"use strict";var e=this,t=e.jsPlumb,n=function(t){var n=t._mottle;return n||(n=t._mottle=new e.Mottle),n};t.extend(e.jsPlumbInstance.prototype,{getEventManager:function(){return n(this)},on:function(e,t,n){this.getEventManager().on.apply(this,arguments)},off:function(e,t,n){this.getEventManager().off.apply(this,arguments)}})}.call(this),function(){"use strict";var e=this,t=e.jsPlumb,n=e.jsPlumbUtil,i=function(e){this.type="Flowchart",e=e||{},e.stub=null==e.stub?30:e.stub;var n,i,r=t.Connectors.AbstractConnector.apply(this,arguments),o=null==e.midpoint?.5:e.midpoint,a=e.alwaysRespectStubs===!0,s=null,l=null,u=null,c=null!=e.cornerRadius?e.cornerRadius:0,d=function(e){return 0>e?-1:0===e?0:1},p=function(e,t,n,i){if(l!=t||u!=n){var r=null==l?i.sx:l,o=null==u?i.sy:u,a=r==t?"v":"h",s=d(t-r),c=d(n-o);l=t,u=n,e.push([r,o,t,n,a,s,c])}},h=function(e){return Math.sqrt(Math.pow(e[0]-e[2],2)+Math.pow(e[1]-e[3],2))},f=function(e){var t=[];return t.push.apply(t,e),t},g=function(e,t,n){for(var i,o=null,a=0;a<t.length-1;a++){if(o=o||f(t[a]),i=f(t[a+1]),c>0&&o[4]!=i[4]){var s=Math.min(c,h(o),h(i));o[2]-=o[5]*s,o[3]-=o[6]*s,i[0]+=i[5]*s,i[1]+=i[6]*s;var l=o[6]==i[5]&&1==i[5]||o[6]==i[5]&&0===i[5]&&o[5]!=i[6]||o[6]==i[5]&&-1==i[5],u=i[1]>o[3]?1:-1,d=i[0]>o[2]?1:-1,p=u==d,g=p&&l||!p&&!l?i[0]:o[2],m=p&&l||!p&&!l?o[3]:i[1];r.addSegment(e,"Straight",{x1:o[0],y1:o[1],x2:o[2],y2:o[3]}),r.addSegment(e,"Arc",{r:s,x1:o[2],y1:o[3],x2:i[0],y2:i[1],cx:g,cy:m,ac:l})}else{var v=o[2]==o[0]?0:o[2]>o[0]?n.lw/2:-(n.lw/2),y=o[3]==o[1]?0:o[3]>o[1]?n.lw/2:-(n.lw/2);r.addSegment(e,"Straight",{x1:o[0]-v,y1:o[1]-y,x2:o[2]+v,y2:o[3]+y})}o=i}null!=i&&r.addSegment(e,"Straight",{x1:i[0],y1:i[1],x2:i[2],y2:i[3]})};this.setSegments=function(e){s=e},this.isEditable=function(){return!0},this.getOriginalSegments=function(){return s||n},this._compute=function(e,t){if(t.clearEdits&&(s=null),null!=s)return void g(this,s,e);n=[],l=null,u=null,i=null;var c=e.startStubX+(e.endStubX-e.startStubX)*o,d=e.startStubY+(e.endStubY-e.startStubY)*o,h={x:[0,1],y:[1,0]},f=function(){return[e.startStubX,e.startStubY,e.endStubX,e.endStubY]},m={perpendicular:f,orthogonal:f,opposite:function(t){var n=e,i="x"==t?0:1,r={x:function(){return 1==n.so[i]&&(n.startStubX>n.endStubX&&n.tx>n.startStubX||n.sx>n.endStubX&&n.tx>n.sx)||-1==n.so[i]&&(n.startStubX<n.endStubX&&n.tx<n.startStubX||n.sx<n.endStubX&&n.tx<n.sx)},y:function(){return 1==n.so[i]&&(n.startStubY>n.endStubY&&n.ty>n.startStubY||n.sy>n.endStubY&&n.ty>n.sy)||-1==n.so[i]&&(n.startStubY<n.endStubY&&n.ty<n.startStubY||n.sy<n.endStubY&&n.ty<n.sy)}};return!a&&r[t]()?{x:[(e.sx+e.tx)/2,e.startStubY,(e.sx+e.tx)/2,e.endStubY],y:[e.startStubX,(e.sy+e.ty)/2,e.endStubX,(e.sy+e.ty)/2]}[t]:[e.startStubX,e.startStubY,e.endStubX,e.endStubY]}},v={perpendicular:function(t){var n=e,i={x:[[[1,2,3,4],null,[2,1,4,3]],null,[[4,3,2,1],null,[3,4,1,2]]],y:[[[3,2,1,4],null,[2,3,4,1]],null,[[4,1,2,3],null,[1,4,3,2]]]},r={x:[[n.startStubX,n.endStubX],null,[n.endStubX,n.startStubX]],y:[[n.startStubY,n.endStubY],null,[n.endStubY,n.startStubY]]},o={x:[[c,n.startStubY],[c,n.endStubY]],y:[[n.startStubX,d],[n.endStubX,d]]},a={x:[[n.endStubX,n.startStubY]],y:[[n.startStubX,n.endStubY]]},s={x:[[n.startStubX,n.endStubY],[n.endStubX,n.endStubY]],y:[[n.endStubX,n.startStubY],[n.endStubX,n.endStubY]]},l={x:[[n.startStubX,d],[n.endStubX,d],[n.endStubX,n.endStubY]],y:[[c,n.startStubY],[c,n.endStubY],[n.endStubX,n.endStubY]]},u={x:[n.startStubY,n.endStubY],y:[n.startStubX,n.endStubX]},p=h[t][0],f=h[t][1],g=n.so[p]+1,m=n.to[f]+1,v=-1==n.to[f]&&u[t][1]<u[t][0]||1==n.to[f]&&u[t][1]>u[t][0],y=r[t][g][0],b=r[t][g][1],w=i[t][g][m];return n.segment==w[3]||n.segment==w[2]&&v?o[t]:n.segment==w[2]&&y>b?a[t]:n.segment==w[2]&&b>=y||n.segment==w[1]&&!v?l[t]:n.segment==w[0]||n.segment==w[1]&&v?s[t]:void 0},orthogonal:function(t,n,i,r,o){var a=e,s={x:-1==a.so[0]?Math.min(n,r):Math.max(n,r),y:-1==a.so[1]?Math.min(n,r):Math.max(n,r)}[t];return{x:[[s,i],[s,o],[r,o]],y:[[i,s],[o,s],[o,r]]}[t]},opposite:function(n,i,o,a){var s=e,l={x:"y",y:"x"}[n],u={x:"height",y:"width"}[n],p=s["is"+n.toUpperCase()+"GreaterThanStubTimes2"];if(t.sourceEndpoint.elementId==t.targetEndpoint.elementId){var h=o+(1-t.sourceEndpoint.anchor[l])*t.sourceInfo[u]+r.maxStub;return{x:[[i,h],[a,h]],y:[[h,i],[h,a]]}[n]}return!p||1==s.so[b]&&i>a||-1==s.so[b]&&a>i?{x:[[i,d],[a,d]],y:[[c,i],[c,a]]}[n]:1==s.so[b]&&a>i||-1==s.so[b]&&i>a?{x:[[c,s.sy],[c,s.ty]],y:[[s.sx,d],[s.tx,d]]}[n]:void 0}},y=m[e.anchorOrientation](e.sourceAxis),b="x"==e.sourceAxis?0:1,w="x"==e.sourceAxis?1:0,x=y[b],k=y[w],C=y[b+2],S=y[w+2];p(n,y[0],y[1],e);var _=v[e.anchorOrientation](e.sourceAxis,x,k,C,S);if(_)for(var T=0;T<_.length;T++)p(n,_[T][0],_[T][1],e);p(n,y[2],y[3],e),p(n,e.tx,e.ty,e),g(this,n,e)},this.getPath=function(){for(var e=null,t=null,i=[],r=s||n,o=0;o<r.length;o++){var a=r[o],l=a[4],u="v"==l?3:2;null!=e&&t===l?e[u]=a[u]:(a[0]!=a[2]||a[1]!=a[3])&&(i.push({start:[a[0],a[1]],end:[a[2],a[3]]}),e=a,t=a[4])}return i},this.setPath=function(e){s=[];for(var t=0;t<e.length;t++){var n=e[t].start[0],i=e[t].start[1],r=e[t].end[0],o=e[t].end[1],a=n==r?"v":"h",l=d(r-n),u=d(o-i);s.push([n,i,r,o,a,l,u])}}};n.extend(i,t.Connectors.AbstractConnector),t.registerConnectorType(i,"Flowchart")}.call(this),function(){"use strict";var e=this,t=e.jsPlumb,n=e.jsPlumbUtil,i=function(e,t,n,i){return n>=e&&t>=i?1:n>=e&&i>=t?2:e>=n&&i>=t?3:4},r=function(e,t,n,i,r,o,a,s,l){return l>=s?[e,t]:1===n?i[3]<=0&&r[3]>=1?[e+(i[2]<.5?-1*o:o),t]:i[2]>=1&&r[2]<=0?[e,t+(i[3]<.5?-1*a:a)]:[e+-1*o,t+-1*a]:2===n?i[3]>=1&&r[3]<=0?[e+(i[2]<.5?-1*o:o),t]:i[2]>=1&&r[2]<=0?[e,t+(i[3]<.5?-1*a:a)]:[e+o,t+-1*a]:3===n?i[3]>=1&&r[3]<=0?[e+(i[2]<.5?-1*o:o),t]:i[2]<=0&&r[2]>=1?[e,t+(i[3]<.5?-1*a:a)]:[e+-1*o,t+-1*a]:4===n?i[3]<=0&&r[3]>=1?[e+(i[2]<.5?-1*o:o),t]:i[2]<=0&&r[2]>=1?[e,t+(i[3]<.5?-1*a:a)]:[e+o,t+-1*a]:void 0},o=function(e){e=e||{},this.type="StateMachine";var n=t.Connectors.AbstractConnector.apply(this,arguments),o=e.curviness||10,a=e.margin||5,s=e.proximityLimit||80,l=e.orientation&&"clockwise"===e.orientation,u=e.loopbackRadius||25,c=e.showLoopback!==!1;this._compute=function(e,t){var d=Math.abs(t.sourcePos[0]-t.targetPos[0]),p=Math.abs(t.sourcePos[1]-t.targetPos[1]);if(c&&t.sourceEndpoint.elementId===t.targetEndpoint.elementId){var h=t.sourcePos[0],f=t.sourcePos[1]-a,g=h,m=f-u,v=2*u,y=2*u,b=g-u,w=m-u;e.points[0]=b,e.points[1]=w,e.points[2]=v,e.points[3]=y,n.addSegment(this,"Arc",{loopback:!0,x1:h-b+4,y1:f-w,startAngle:0,endAngle:2*Math.PI,r:u,ac:!l,x2:h-b-4,y2:f-w,cx:g-b,cy:m-w})}else{var x=t.sourcePos[0]<t.targetPos[0]?0:d,k=t.sourcePos[1]<t.targetPos[1]?0:p,C=t.sourcePos[0]<t.targetPos[0]?d:0,S=t.sourcePos[1]<t.targetPos[1]?p:0;0===t.sourcePos[2]&&(x-=a),1===t.sourcePos[2]&&(x+=a),0===t.sourcePos[3]&&(k-=a),1===t.sourcePos[3]&&(k+=a),0===t.targetPos[2]&&(C-=a),1===t.targetPos[2]&&(C+=a),0===t.targetPos[3]&&(S-=a),1===t.targetPos[3]&&(S+=a);var _=(x+C)/2,T=(k+S)/2,$=i(x,k,C,S),E=Math.sqrt(Math.pow(C-x,2)+Math.pow(S-k,2)),D=r(_,T,$,t.sourcePos,t.targetPos,o,o,E,s);n.addSegment(this,"Bezier",{x1:C,y1:S,x2:x,y2:k,cp1x:D[0],cp1y:D[1],cp2x:D[0],cp2y:D[1]})}}};n.extend(o,t.Connectors.AbstractConnector),t.registerConnectorType(o,"StateMachine")}.call(this),function(){"use strict";var e=this,t=e.jsPlumb,n=e.jsPlumbUtil,i=function(e){e=e||{};var n=t.Connectors.AbstractConnector.apply(this,arguments),i=e.curviness||150,r=10;this.type="Bezier",this.getCurviness=function(){return i},this._findControlPoint=function(e,t,n,o,a){var s=o.anchor.getOrientation(o),l=a.anchor.getOrientation(a),u=s[0]!=l[0]||s[1]==l[1],c=[];return u?(0===l[0]?c.push(n[0]<t[0]?e[0]+r:e[0]-r):c.push(e[0]+i*l[0]),0===l[1]?c.push(n[1]<t[1]?e[1]+r:e[1]-r):c.push(e[1]+i*s[1])):(0===s[0]?c.push(t[0]<n[0]?e[0]+r:e[0]-r):c.push(e[0]-i*s[0]),0===s[1]?c.push(t[1]<n[1]?e[1]+r:e[1]-r):c.push(e[1]+i*l[1])),c},this._compute=function(e,t){var i=t.sourcePos,r=t.targetPos,o=Math.abs(i[0]-r[0]),a=Math.abs(i[1]-r[1]),s=i[0]<r[0]?o:0,l=i[1]<r[1]?a:0,u=i[0]<r[0]?0:o,c=i[1]<r[1]?0:a,d=this._findControlPoint([s,l],i,r,t.sourceEndpoint,t.targetEndpoint,e.so,e.to),p=this._findControlPoint([u,c],r,i,t.targetEndpoint,t.sourceEndpoint,e.so,e.to);n.addSegment(this,"Bezier",{x1:s,y1:l,x2:u,y2:c,cp1x:d[0],cp1y:d[1],cp2x:p[0],cp2y:p[1]})}};n.extend(i,t.Connectors.AbstractConnector),t.registerConnectorType(i,"Bezier")}.call(this),function(){"use strict";var e=this,t=e.jsPlumb,n=e.jsPlumbUtil,i={joinstyle:"stroke-linejoin","stroke-linejoin":"stroke-linejoin","stroke-dashoffset":"stroke-dashoffset","stroke-linecap":"stroke-linecap"},r="stroke-dasharray",o="dashstyle",a="linearGradient",s="radialGradient",l="defs",u="fill",c="stop",d="stroke",p="stroke-width",h="style",f="none",g="jsplumb_gradient_",m="lineWidth",v={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml"},y=function(e,t){for(var n in t)e.setAttribute(n,""+t[n])},b=function(e,t){return t=t||{},t.version="1.1",t.xmlns=v.xhtml,jsPlumb.createElementNS(v.svg,e,null,null,t)},w=function(e){return"position:absolute;left:"+e[0]+"px;top:"+e[1]+"px"},x=function(e){for(var t=e.querySelectorAll(" defs linearGradient radialGradient"),n=0;n<t.length;n++)t[n].parentNode.removeChild(t[n])},k=function(e,t,i,r,o){var p=g+o._jsPlumb.instance.idstamp();x(e);var h;h=i.gradient.offset?b(s,{id:p}):b(a,{id:p,gradientUnits:"userSpaceOnUse"});var f=b(l);e.appendChild(f),f.appendChild(h);for(var m=0;m<i.gradient.stops.length;m++){var v=1==o.segment||2==o.segment?m:i.gradient.stops.length-1-m,y=n.convertStyle(i.gradient.stops[v][1],!0),w=b(c,{offset:Math.floor(100*i.gradient.stops[m][0])+"%","stop-color":y});h.appendChild(w)}var k=i.strokeStyle?d:u;t.setAttribute(k,"url(#"+p+")")},C=function(e,t,a,s,l){if(t.setAttribute(u,a.fillStyle?n.convertStyle(a.fillStyle,!0):f),t.setAttribute(d,a.strokeStyle?n.convertStyle(a.strokeStyle,!0):f),a.gradient?k(e,t,a,s,l):(x(e),t.setAttribute(h,"")),a.lineWidth&&t.setAttribute(p,a.lineWidth),a[o]&&a[m]&&!a[r]){var c=-1==a[o].indexOf(",")?" ":",",g=a[o].split(c),v="";g.forEach(function(e){v+=Math.floor(e*a.lineWidth)+c}),t.setAttribute(r,v)}else a[r]&&t.setAttribute(r,a[r]);for(var y in i)a[y]&&t.setAttribute(i[y],a[y])},S=function(e,t,n){e.childNodes.length>n?e.insertBefore(t,e.childNodes[n]):e.appendChild(t)};n.svg={node:b,attr:y,pos:w};var _=function(e){var i=e.pointerEventsSpec||"all",r={};t.jsPlumbUIComponent.apply(this,e.originalArgs),this.canvas=null,this.path=null,this.svg=null,this.bgCanvas=null;var o=e.cssClass+" "+(e.originalArgs[0].cssClass||""),a={style:"",width:0,height:0,"pointer-events":i,position:"absolute"};this.svg=b("svg",a),e.useDivWrapper?(this.canvas=jsPlumb.createElement("div",{position:"absolute"}),n.sizeElement(this.canvas,0,0,1,1),this.canvas.className=o):(y(this.svg,{"class":o}),this.canvas=this.svg),e._jsPlumb.appendElement(this.canvas,e.originalArgs[0].parent),e.useDivWrapper&&this.canvas.appendChild(this.svg);var s=[this.canvas];return this.getDisplayElements=function(){return s},this.appendDisplayElement=function(e){s.push(e)},this.paint=function(t,i,o){if(null!=t){var a,s=[this.x,this.y],l=[this.w,this.h];null!=o&&(o.xmin<0&&(s[0]+=o.xmin),o.ymin<0&&(s[1]+=o.ymin),l[0]=o.xmax+(o.xmin<0?-o.xmin:0),l[1]=o.ymax+(o.ymin<0?-o.ymin:0)),e.useDivWrapper?(n.sizeElement(this.canvas,s[0],s[1],l[0],l[1]),s[0]=0,s[1]=0,a=w([0,0])):a=w([s[0],s[1]]),r.paint.apply(this,arguments),y(this.svg,{style:a,width:l[0]||0,height:l[1]||0})}},{renderer:r}};n.extend(_,t.jsPlumbUIComponent,{cleanup:function(e){e||null==this.typeId?(this.canvas&&(this.canvas._jsPlumb=null),this.svg&&(this.svg._jsPlumb=null),this.bgCanvas&&(this.bgCanvas._jsPlumb=null),this.canvas&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.bgCanvas&&this.bgCanvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.svg=null,this.canvas=null,this.path=null,this.group=null):(this.canvas&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.bgCanvas&&this.bgCanvas.parentNode&&this.bgCanvas.parentNode.removeChild(this.bgCanvas))},reattach:function(e){var t=e.getContainer();this.canvas&&null==this.canvas.parentNode&&t.appendChild(this.canvas),this.bgCanvas&&null==this.bgCanvas.parentNode&&t.appendChild(this.bgCanvas)},setVisible:function(e){this.canvas&&(this.canvas.style.display=e?"block":"none")}}),t.ConnectorRenderers.svg=function(e){var i=this,r=_.apply(this,[{cssClass:e._jsPlumb.connectorClass,originalArgs:arguments,pointerEventsSpec:"none",_jsPlumb:e._jsPlumb}]);r.renderer.paint=function(r,o,a){var s=i.getSegments(),l="",u=[0,0];if(a.xmin<0&&(u[0]=-a.xmin),a.ymin<0&&(u[1]=-a.ymin),s.length>0){for(var c=0;c<s.length;c++)l+=t.Segments.svg.SegmentRenderer.getPath(s[c]),l+=" ";var d={d:l,transform:"translate("+u[0]+","+u[1]+")","pointer-events":e["pointer-events"]||"visibleStroke"},p=null,h=[i.x,i.y,i.w,i.h];if(r.outlineColor){var f=r.outlineWidth||1,g=r.lineWidth+2*f;p=t.extend({},r),delete p.gradient,p.strokeStyle=n.convertStyle(r.outlineColor),p.lineWidth=g,null==i.bgPath?(i.bgPath=b("path",d),S(i.svg,i.bgPath,0)):y(i.bgPath,d),C(i.svg,i.bgPath,p,h,i)}null==i.path?(i.path=b("path",d),S(i.svg,i.path,r.outlineColor?1:0)):y(i.path,d),C(i.svg,i.path,r,h,i)}}},n.extend(t.ConnectorRenderers.svg,_),t.Segments.svg={SegmentRenderer:{getPath:function(e){return{Straight:function(){var t=e.getCoordinates();return"M "+t.x1+" "+t.y1+" L "+t.x2+" "+t.y2},Bezier:function(){var t=e.params;return"M "+t.x1+" "+t.y1+" C "+t.cp1x+" "+t.cp1y+" "+t.cp2x+" "+t.cp2y+" "+t.x2+" "+t.y2},Arc:function(){var t=e.params,n=e.sweep>Math.PI?1:0,i=e.anticlockwise?0:1;return"M"+e.x1+" "+e.y1+" A "+e.radius+" "+t.r+" 0 "+n+","+i+" "+e.x2+" "+e.y2}}[e.type]()}}};var T=t.SvgEndpoint=function(e){var i=_.apply(this,[{cssClass:e._jsPlumb.endpointClass,originalArgs:arguments,pointerEventsSpec:"all",useDivWrapper:!0,_jsPlumb:e._jsPlumb}]);i.renderer.paint=function(e){var i=t.extend({},e);i.outlineColor&&(i.strokeWidth=i.outlineWidth,i.strokeStyle=n.convertStyle(i.outlineColor,!0)),null==this.node?(this.node=this.makeNode(i),this.svg.appendChild(this.node)):null!=this.updateNode&&this.updateNode(this.node),C(this.svg,this.node,i,[this.x,this.y,this.w,this.h],this),w(this.node,[this.x,this.y])}.bind(this)};n.extend(T,_),t.Endpoints.svg.Dot=function(){t.Endpoints.Dot.apply(this,arguments),T.apply(this,arguments),this.makeNode=function(e){return b("circle",{cx:this.w/2,cy:this.h/2,r:this.radius})},this.updateNode=function(e){y(e,{cx:this.w/2,cy:this.h/2,r:this.radius})}},n.extend(t.Endpoints.svg.Dot,[t.Endpoints.Dot,T]),t.Endpoints.svg.Rectangle=function(){t.Endpoints.Rectangle.apply(this,arguments),T.apply(this,arguments),this.makeNode=function(e){return b("rect",{width:this.w,height:this.h})},this.updateNode=function(e){y(e,{width:this.w,height:this.h})}},n.extend(t.Endpoints.svg.Rectangle,[t.Endpoints.Rectangle,T]),t.Endpoints.svg.Image=t.Endpoints.Image,t.Endpoints.svg.Blank=t.Endpoints.Blank,t.Overlays.svg.Label=t.Overlays.Label,t.Overlays.svg.Custom=t.Overlays.Custom;var $=function(e,n){e.apply(this,n),t.jsPlumbUIComponent.apply(this,n),this.isAppendedAtTopLevel=!1;this.path=null,this.paint=function(e,t){if(e.component.svg&&t){null==this.path&&(this.path=b("path",{"pointer-events":"all"}),e.component.svg.appendChild(this.path),this.canvas=e.component.svg);var r=n&&1==n.length?n[0].cssClass||"":"",o=[0,0];t.xmin<0&&(o[0]=-t.xmin),t.ymin<0&&(o[1]=-t.ymin),y(this.path,{d:i(e.d),"class":r,stroke:e.strokeStyle?e.strokeStyle:null,fill:e.fillStyle?e.fillStyle:null,transform:"translate("+o[0]+","+o[1]+")"})}};var i=function(e){return isNaN(e.cxy.x)||isNaN(e.cxy.y)?"":"M"+e.hxy.x+","+e.hxy.y+" L"+e.tail[0].x+","+e.tail[0].y+" L"+e.cxy.x+","+e.cxy.y+" L"+e.tail[1].x+","+e.tail[1].y+" L"+e.hxy.x+","+e.hxy.y};this.transfer=function(e){e.canvas&&this.path&&this.path.parentNode&&(this.path.parentNode.removeChild(this.path),e.canvas.appendChild(this.path))}};n.extend($,[t.jsPlumbUIComponent,t.Overlays.AbstractOverlay],{cleanup:function(e){null!=this.path&&(e?this._jsPlumb.instance.removeElement(this.path):this.path.parentNode&&this.path.parentNode.removeChild(this.path))},reattach:function(e){this.path&&this.canvas&&null==this.path.parentNode&&this.canvas.appendChild(this.path)},setVisible:function(e){null!=this.path&&(this.path.style.display=e?"block":"none")}}),t.Overlays.svg.Arrow=function(){$.apply(this,[t.Overlays.Arrow,arguments])},n.extend(t.Overlays.svg.Arrow,[t.Overlays.Arrow,$]),t.Overlays.svg.PlainArrow=function(){$.apply(this,[t.Overlays.PlainArrow,arguments])},n.extend(t.Overlays.svg.PlainArrow,[t.Overlays.PlainArrow,$]),t.Overlays.svg.Diamond=function(){$.apply(this,[t.Overlays.Diamond,arguments])},n.extend(t.Overlays.svg.Diamond,[t.Overlays.Diamond,$]),t.Overlays.svg.GuideLines=function(){var e,n,i=null,r=this;t.Overlays.GuideLines.apply(this,arguments),this.paint=function(t,a){null==i&&(i=b("path"),t.connector.svg.appendChild(i),r.attachListeners(i,t.connector),r.attachListeners(i,r),e=b("path"),t.connector.svg.appendChild(e),r.attachListeners(e,t.connector),r.attachListeners(e,r),n=b("path"),t.connector.svg.appendChild(n),r.attachListeners(n,t.connector),r.attachListeners(n,r));var s=[0,0];a.xmin<0&&(s[0]=-a.xmin),a.ymin<0&&(s[1]=-a.ymin),y(i,{d:o(t.head,t.tail),stroke:"red",fill:null,transform:"translate("+s[0]+","+s[1]+")"}),y(e,{d:o(t.tailLine[0],t.tailLine[1]),stroke:"blue",fill:null,transform:"translate("+s[0]+","+s[1]+")"}),y(n,{d:o(t.headLine[0],t.headLine[1]),stroke:"green",fill:null,transform:"translate("+s[0]+","+s[1]+")"})};var o=function(e,t){return"M "+e.x+","+e.y+" L"+t.x+","+t.y}},n.extend(t.Overlays.svg.GuideLines,t.Overlays.GuideLines)}.call(this),function(){"use strict";var e=this,t=e.jsPlumb,n=e.jsPlumbUtil,i={"stroke-linejoin":"joinstyle",joinstyle:"joinstyle",endcap:"endcap",miterlimit:"miterlimit"},r=null;if(document.createStyleSheet&&document.namespaces){var o=[".jsplumb_vml","jsplumb\\:textbox","jsplumb\\:oval","jsplumb\\:rect","jsplumb\\:stroke","jsplumb\\:shape","jsplumb\\:group"],a="behavior:url(#default#VML);position:absolute;";r=document.createStyleSheet();for(var s=0;s<o.length;s++)r.addRule(o[s],a);document.namespaces.add("jsplumb","urn:schemas-microsoft-com:vml")}t.vml={};var l=1e3,u=function(e,t){for(var n in t)e[n]=t[n]},c=function(e,t,n,i,r,o){n=n||{};var a=document.createElement("jsplumb:"+e);return o?r.appendElement(a,i):i.appendChild(a),a.className=(n["class"]?n["class"]+" ":"")+"jsplumb_vml",d(a,t),u(a,n),a},d=function(e,t,n){e.style.left=t[0]+"px",e.style.top=t[1]+"px",e.style.width=t[2]+"px",e.style.height=t[3]+"px",e.style.position="absolute",n&&(e.style.zIndex=n)},p=t.vml.convertValue=function(e){return Math.floor(e*l)},h=function(e,t,n,i){"transparent"===t?i.setOpacity(n,"0.0"):i.setOpacity(n,"1.0")},f=function(e,t,i,r){var o={};if(t.strokeStyle){o.stroked="true";var a=n.convertStyle(t.strokeStyle,!0);o.strokecolor=a,h(o,a,"stroke",i),o.strokeweight=t.lineWidth+"px"}else o.stroked="false";if(t.fillStyle){o.filled="true";var s=n.convertStyle(t.fillStyle,!0);o.fillcolor=s,h(o,s,"fill",i)}else o.filled="false";if(t.dashstyle)null==i.strokeNode?i.strokeNode=c("stroke",[0,0,0,0],{dashstyle:t.dashstyle},e,r):i.strokeNode.dashstyle=t.dashstyle;else if(t["stroke-dasharray"]&&t.lineWidth){for(var l=-1==t["stroke-dasharray"].indexOf(",")?" ":",",d=t["stroke-dasharray"].split(l),p="",f=0;f<d.length;f++)p+=Math.floor(d[f]/t.lineWidth)+l;null==i.strokeNode?i.strokeNode=c("stroke",[0,0,0,0],{dashstyle:p},e,r):i.strokeNode.dashstyle=p}u(e,o)},g=function(){var e=this;t.jsPlumbUIComponent.apply(this,arguments),this.opacityNodes={stroke:null,fill:null},this.initOpacityNodes=function(t){e.opacityNodes.stroke=c("stroke",[0,0,1,1],{opacity:"0.0"},t,e._jsPlumb.instance),e.opacityNodes.fill=c("fill",[0,0,1,1],{opacity:"0.0"},t,e._jsPlumb.instance)},this.setOpacity=function(t,n){var i=e.opacityNodes[t];i&&(i.opacity=""+n)};var n=[];this.getDisplayElements=function(){return n},this.appendDisplayElement=function(t,i){i||e.canvas.parentNode.appendChild(t),n.push(t)}};n.extend(g,t.jsPlumbUIComponent,{cleanup:function(){this.bgCanvas&&this.bgCanvas.parentNode.removeChild(this.bgCanvas),this.canvas&&this.canvas.parentNode.removeChild(this.canvas)}});var m=t.ConnectorRenderers.vml=function(e,r){this.strokeNode=null,this.canvas=null,g.apply(this,arguments);var o=this._jsPlumb.instance.connectorClass+(e.cssClass?" "+e.cssClass:"");this.paint=function(a){if(null!==a){this.w=Math.max(this.w,1),this.h=Math.max(this.h,1);for(var s=this.getSegments(),p={path:""},h=[this.x,this.y,this.w,this.h],g=0;g<s.length;g++)p.path+=t.Segments.vml.SegmentRenderer.getPath(s[g]),p.path+=" ";if(a.outlineColor){var m=a.outlineWidth||1,v=a.lineWidth+2*m,y={strokeStyle:n.convertStyle(a.outlineColor),lineWidth:v};for(var b in i)y[b]=a[b];null==this.bgCanvas?(p["class"]=o,p.coordsize=h[2]*l+","+h[3]*l,this.bgCanvas=c("shape",h,p,e.parent,this._jsPlumb.instance,!0),d(this.bgCanvas,h),this.appendDisplayElement(this.bgCanvas,!0),this.initOpacityNodes(this.bgCanvas,["stroke"]),this.bgCanvas._jsPlumb=r):(p.coordsize=h[2]*l+","+h[3]*l,d(this.bgCanvas,h),u(this.bgCanvas,p)),f(this.bgCanvas,y,this)}null==this.canvas?(p["class"]=o,p.coordsize=h[2]*l+","+h[3]*l,this.canvas=c("shape",h,p,e.parent,this._jsPlumb.instance,!0),this.appendDisplayElement(this.canvas,!0),this.initOpacityNodes(this.canvas,["stroke"]),this.canvas._jsPlumb=r):(p.coordsize=h[2]*l+","+h[3]*l,d(this.canvas,h),u(this.canvas,p)),f(this.canvas,a,this,this._jsPlumb.instance)}}};n.extend(m,g,{setVisible:function(e){this.canvas&&(this.canvas.style.display=e?"block":"none"),this.bgCanvas&&(this.bgCanvas.style.display=e?"block":"none")}});var v=t.VmlEndpoint=function(e){g.apply(this,arguments),this._jsPlumb.vml=null,this.canvas=document.createElement("div"),this.canvas.style.position="absolute",this._jsPlumb.clazz=this._jsPlumb.instance.endpointClass+(e.cssClass?" "+e.cssClass:""),e._jsPlumb.appendElement(this.canvas,e.parent),this.paint=function(e,t){var i={},r=this._jsPlumb.vml;n.sizeElement(this.canvas,this.x,this.y,this.w,this.h),null==this._jsPlumb.vml?(i["class"]=this._jsPlumb.clazz,r=this._jsPlumb.vml=this.getVml([0,0,this.w,this.h],i,t,this.canvas,this._jsPlumb.instance),this.appendDisplayElement(r,!0),this.appendDisplayElement(this.canvas,!0),this.initOpacityNodes(r,["fill"])):(d(r,[0,0,this.w,this.h]),u(r,i)),f(r,e,this)}};n.extend(v,g),t.Segments.vml={SegmentRenderer:{getPath:function(e){return{Straight:function(e){var t=e.params;return"m"+p(t.x1)+","+p(t.y1)+" l"+p(t.x2)+","+p(t.y2)+" e"},Bezier:function(e){var t=e.params;return"m"+p(t.x1)+","+p(t.y1)+" c"+p(t.cp1x)+","+p(t.cp1y)+","+p(t.cp2x)+","+p(t.cp2y)+","+p(t.x2)+","+p(t.y2)+" e"},Arc:function(e){var t=e.params,n=Math.min(t.x1,t.x2),i=(Math.max(t.x1,t.x2),Math.min(t.y1,t.y2)),r=(Math.max(t.y1,t.y2),e.anticlockwise?1:0),o=e.anticlockwise?"at ":"wa ",a=function(){if(t.loopback)return"0,0,"+p(2*t.r)+","+p(2*t.r);var o=[null,[function(){return[n,i]},function(){return[n-t.r,i-t.r]}],[function(){return[n-t.r,i]},function(){return[n,i-t.r]}],[function(){return[n-t.r,i-t.r]},function(){return[n,i]}],[function(){return[n,i-t.r]},function(){return[n-t.r,i]}]][e.segment][r]();return p(o[0])+","+p(o[1])+","+p(o[0]+2*t.r)+","+p(o[1]+2*t.r)};return o+" "+a()+","+p(t.x1)+","+p(t.y1)+","+p(t.x2)+","+p(t.y2)+" e"}}[e.type](e);
|
|
3249
|
|
-}}},t.Endpoints.vml.Dot=function(){t.Endpoints.Dot.apply(this,arguments),v.apply(this,arguments),this.getVml=function(e,t,n,i,r){return c("oval",e,t,i,r)}},n.extend(t.Endpoints.vml.Dot,v),t.Endpoints.vml.Rectangle=function(){t.Endpoints.Rectangle.apply(this,arguments),v.apply(this,arguments),this.getVml=function(e,t,n,i,r){return c("rect",e,t,i,r)}},n.extend(t.Endpoints.vml.Rectangle,v),t.Endpoints.vml.Image=t.Endpoints.Image,t.Endpoints.vml.Blank=t.Endpoints.Blank,t.Overlays.vml.Label=t.Overlays.Label,t.Overlays.vml.Custom=t.Overlays.Custom;var y=function(e,t){e.apply(this,t),g.apply(this,t);var i=this;this.canvas=null,this.isAppendedAtTopLevel=!0;var r=function(e){return"m "+p(e.hxy.x)+","+p(e.hxy.y)+" l "+p(e.tail[0].x)+","+p(e.tail[0].y)+" "+p(e.cxy.x)+","+p(e.cxy.y)+" "+p(e.tail[1].x)+","+p(e.tail[1].y)+" x e"};this.paint=function(e,o){if(e.component.canvas&&o){var a={},s=e.d,p=e.component;e.strokeStyle&&(a.stroked="true",a.strokecolor=n.convertStyle(e.strokeStyle,!0)),e.lineWidth&&(a.strokeweight=e.lineWidth+"px"),e.fillStyle&&(a.filled="true",a.fillcolor=e.fillStyle);var h=Math.min(s.hxy.x,s.tail[0].x,s.tail[1].x,s.cxy.x),f=Math.min(s.hxy.y,s.tail[0].y,s.tail[1].y,s.cxy.y),g=Math.max(s.hxy.x,s.tail[0].x,s.tail[1].x,s.cxy.x),m=Math.max(s.hxy.y,s.tail[0].y,s.tail[1].y,s.cxy.y),v=Math.abs(g-h),y=Math.abs(m-f),b=[h,f,v,y];if(a.path=r(s),a.coordsize=p.w*l+","+p.h*l,b[0]=p.x,b[1]=p.y,b[2]=p.w,b[3]=p.h,null==i.canvas){var w=p._jsPlumb.overlayClass||"",x=t&&1==t.length?t[0].cssClass||"":"";a["class"]=x+" "+w,i.canvas=c("shape",b,a,p.canvas.parentNode,p._jsPlumb.instance,!0),p.appendDisplayElement(i.canvas,!0)}else d(i.canvas,b),u(i.canvas,a)}},this.cleanup=function(){null!=this.canvas&&this._jsPlumb.instance.removeElement(this.canvas)}};n.extend(y,[g,t.Overlays.AbstractOverlay],{setVisible:function(e){this.canvas.style.display=e?"block":"none"}}),t.Overlays.vml.Arrow=function(){y.apply(this,[t.Overlays.Arrow,arguments])},n.extend(t.Overlays.vml.Arrow,[t.Overlays.Arrow,y]),t.Overlays.vml.PlainArrow=function(){y.apply(this,[t.Overlays.PlainArrow,arguments])},n.extend(t.Overlays.vml.PlainArrow,[t.Overlays.PlainArrow,y]),t.Overlays.vml.Diamond=function(){y.apply(this,[t.Overlays.Diamond,arguments])},n.extend(t.Overlays.vml.Diamond,[t.Overlays.Diamond,y])}.call(this),function(e,t){"use strict";var n=t.jsPlumb,i=t.jsPlumbUtil,r=function(t){return e("string"==typeof t?"#"+t:t)};e.extend(t.jsPlumbInstance.prototype,{animationSupported:!0,getDOMElement:function(e){return null==e?null:"string"==typeof e?document.getElementById(e):e.context||null!=e.length?e[0]:e},removeElement:function(e){r(e).remove()},doAnimate:function(t,n,i){e(t).animate(n,i)},destroyDraggable:function(t){e(t).data("draggable")&&e(t).draggable("destroy")},destroyDroppable:function(t){e(t).data("droppable")&&e(t).droppable("destroy")},initDraggable:function(t,r,o){r=r||{},t=e(t),r.start=i.wrap(r.start,function(){e("body").addClass(this.dragSelectClass)},!1),r.stop=i.wrap(r.stop,function(){e("body").removeClass(this.dragSelectClass)}),r.doNotRemoveHelper||(r.helper=null),"internal"==o&&(r.scope=r.scope||n.Defaults.Scope),t.draggable(r)},initDroppable:function(t,i){i.scope=i.scope||n.Defaults.Scope,e(t).droppable(i)},isAlreadyDraggable:function(t){return e(t).hasClass("ui-draggable")},isDragSupported:function(t,n){return e(t).draggable},isDropSupported:function(t,n){return e(t).droppable},getDragObject:function(e){return e[1].helper||e[1].draggable},getDragScope:function(t){return e(t).draggable("option","scope")},getDropEvent:function(e){return e[0]},getDropScope:function(t){return e(t).droppable("option","scope")},getUIPosition:function(e,t,n){var i;if(t=t||1,1==e.length)i={left:e[0].pageX,top:e[0].pageY};else{var r=e[1],o=r.position;i=o||r.absolutePosition,n||(r.position.left/=t,r.position.top/=t)}return{left:i.left,top:i.top}},setDragFilter:function(t,i){n.isAlreadyDraggable(t)&&e(t).draggable("option","cancel",i)},setElementDraggable:function(t,n){e(t).draggable("option","disabled",!n)},setDragScope:function(t,n){e(t).draggable("option","scope",n)},dragEvents:{start:"start",stop:"stop",drag:"drag",step:"step",over:"over",out:"out",drop:"drop",complete:"complete"},animEvents:{step:"step",complete:"complete"},getOriginalEvent:function(e){return e.originalEvent||e},trigger:function(t,n,i){t=this.getDOMElement(t);var r=jQuery._data(e(t)[0],"handle");r(i)}}),e(document).ready(n.init)}(jQuery,this),function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||u.defaults,this.rules=c.normal,this.options.gfm&&(this.options.tables?this.rules=c.tables:this.rules=c.gfm)}function t(e,t){if(this.options=t||u.defaults,this.links=e,this.rules=d.normal,this.renderer=this.options.renderer||new n,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `+"`"+`links`+"`"+` property.");this.options.gfm?this.options.breaks?this.rules=d.breaks:this.rules=d.gfm:this.options.pedantic&&(this.rules=d.pedantic)}function n(e){this.options=e||{}}function i(e){this.tokens=[],this.token=null,this.options=e||u.defaults,this.options.renderer=this.options.renderer||new n,this.renderer=this.options.renderer,this.renderer.options=this.options}function r(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function o(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function a(e,t){return e=e.source,t=t||"",function n(i,r){return i?(r=r.source||r,r=r.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(i,r),n):new RegExp(e,t)}}function s(){}function l(e){for(var t,n,i=1;i<arguments.length;i++){t=arguments[i];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function u(t,n,o){if(o||"function"==typeof n){o||(o=n,n=null),n=l({},u.defaults,n||{});var a,s,c=n.highlight,d=0;try{a=e.lex(t,n)}catch(p){return o(p)}s=a.length;var h=function(){var e,t;try{e=i.parse(a,n)}catch(r){t=r}return n.highlight=c,t?o(t):o(null,e)};if(!c||c.length<3)return h();if(delete n.highlight,!s)return h();for(;d<a.length;d++)!function(e){return"code"!==e.type?--s||h():c(e.text,e.lang,function(t,n){return null==n||n===e.text?--s||h():(e.text=n,e.escaped=!0,void(--s||h()))})}(a[d])}else try{return n&&(n=l({},u.defaults,n)),i.parse(e.lex(t,n),n)}catch(p){if(p.message+="\nPlease report this to https://github.com/chjj/marked.",(n||u.defaults).silent)return"<p>An error occured:</p><pre>"+r(p.message+"",!0)+"</pre>";throw p}}var c={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:s,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:s,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:s,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};c.bullet=/(?:[*+-]|\d+\.)/,c.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,c.item=a(c.item,"gm")(/bull/g,c.bullet)(),c.list=a(c.list)(/bull/g,c.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+c.def.source+")")(),c.blockquote=a(c.blockquote)("def",c.def)(),c._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",c.html=a(c.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,c._tag)(),c.paragraph=a(c.paragraph)("hr",c.hr)("heading",c.heading)("lheading",c.lheading)("blockquote",c.blockquote)("tag","<"+c._tag)("def",c.def)(),c.normal=l({},c),c.gfm=l({},c.normal,{fences:/^ *(`+"`"+`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/}),c.gfm.paragraph=a(c.paragraph)("(?!","(?!"+c.gfm.fences.source.replace("\\1","\\2")+"|"+c.list.source.replace("\\1","\\3")+"|")(),c.tables=l({},c.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=c,e.lex=function(t,n){var i=new e(n);return i.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,n){for(var i,r,o,a,s,l,u,d,p,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},d=0;d<l.align.length;d++)/^ *-+: *$/.test(l.align[d])?l.align[d]="right":/^ *:-+: *$/.test(l.align[d])?l.align[d]="center":/^ *:-+ *$/.test(l.align[d])?l.align[d]="left":l.align[d]=null;for(d=0;d<l.cells.length;d++)l.cells[d]=l.cells[d].split(/ *\| */);this.tokens.push(l)}else if(o=this.rules.lheading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:"="===o[2]?1:2,text:o[1]});else if(o=this.rules.hr.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"hr"});else if(o=this.rules.blockquote.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"blockquote_start"}),o=o[0].replace(/^ *> ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),o=o[0].match(this.rules.item),i=!1,p=o.length,d=0;p>d;d++)l=o[d],u=l.length,l=l.replace(/^ *([*+-]|\d+\.) +/,""),~l.indexOf("\n ")&&(u-=l.length,l=this.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+u+"}","gm"),"")),this.options.smartLists&&d!==p-1&&(s=c.bullet.exec(o[d+1])[0],a===s||a.length>1&&s.length>1||(e=o.slice(d+1).join("\n")+e,d=p-1)),r=i||/\n\n(?!\s*$)/.test(l),d!==p-1&&(i="\n"===l.charAt(l.length-1),r||(r=i)),this.tokens.push({type:r?"loose_item_start":"list_item_start"}),this.token(l,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:"pre"===o[1]||"script"===o[1]||"style"===o[1],text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},d=0;d<l.align.length;d++)/^ *-+: *$/.test(l.align[d])?l.align[d]="right":/^ *:-+: *$/.test(l.align[d])?l.align[d]="center":/^ *:-+ *$/.test(l.align[d])?l.align[d]="left":l.align[d]=null;for(d=0;d<l.cells.length;d++)l.cells[d]=l.cells[d].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(l)}else if(t&&(o=this.rules.paragraph.exec(e)))e=e.substring(o[0].length),this.tokens.push({type:"paragraph",text:"\n"===o[1].charAt(o[1].length-1)?o[1].slice(0,-1):o[1]});else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"text",text:o[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var d={escape:/^\\([\\`+"`"+`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:s,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+"`"+`+)\s*([\s\S]*?[^`+"`"+`])\s*\1(?!`+"`"+`)/,br:/^ {2,}\n(?!\s*$)/,del:s,text:/^[\s\S]+?(?=[\\<!\[_*`+"`"+`]| {2,}\n|$)/};d._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,d._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,d.link=a(d.link)("inside",d._inside)("href",d._href)(),d.reflink=a(d.reflink)("inside",d._inside)(),d.normal=l({},d),d.pedantic=l({},d.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),d.gfm=l({},d.normal,{escape:a(d.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:a(d.text)("]|","~]|")("|","|https?://|")()}),d.breaks=l({},d.gfm,{br:a(d.br)("{2,}","*")(),text:a(d.gfm.text)("{2,}","*")()}),t.rules=d,t.output=function(e,n,i){var r=new t(n,i);return r.output(e)},t.prototype.output=function(e){for(var t,n,i,o,a="";e;)if(o=this.rules.escape.exec(e))e=e.substring(o[0].length),a+=o[1];else if(o=this.rules.autolink.exec(e))e=e.substring(o[0].length),"@"===o[2]?(n=":"===o[1].charAt(6)?this.mangle(o[1].substring(7)):this.mangle(o[1]),i=this.mangle("mailto:")+n):(n=r(o[1]),i=n),a+=this.renderer.link(i,null,n);else if(this.inLink||!(o=this.rules.url.exec(e))){if(o=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(o[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(o[0])&&(this.inLink=!1),e=e.substring(o[0].length),a+=this.options.sanitize?r(o[0]):o[0];else if(o=this.rules.link.exec(e))e=e.substring(o[0].length),this.inLink=!0,a+=this.outputLink(o,{href:o[2],title:o[3]}),this.inLink=!1;else if((o=this.rules.reflink.exec(e))||(o=this.rules.nolink.exec(e))){if(e=e.substring(o[0].length),t=(o[2]||o[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){a+=o[0].charAt(0),e=o[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(o,t),this.inLink=!1}else if(o=this.rules.strong.exec(e))e=e.substring(o[0].length),a+=this.renderer.strong(this.output(o[2]||o[1]));else if(o=this.rules.em.exec(e))e=e.substring(o[0].length),a+=this.renderer.em(this.output(o[2]||o[1]));else if(o=this.rules.code.exec(e))e=e.substring(o[0].length),a+=this.renderer.codespan(r(o[2],!0));else if(o=this.rules.br.exec(e))e=e.substring(o[0].length),a+=this.renderer.br();else if(o=this.rules.del.exec(e))e=e.substring(o[0].length),a+=this.renderer.del(this.output(o[1]));else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),a+=r(this.smartypants(o[0]));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(o[0].length),n=r(o[1]),i=n,a+=this.renderer.link(i,null,n);return a},t.prototype.outputLink=function(e,t){var n=r(t.href),i=t.title?r(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,r(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/--/g,"—").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},t.prototype.mangle=function(e){for(var t,n="",i=e.length,r=0;i>r;r++)t=e.charCodeAt(r),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.prototype.code=function(e,t,n){if(this.options.highlight){var i=this.options.highlight(e,t);null!=i&&i!==e&&(n=!0,e=i)}return t?'<pre><code class="'+this.options.langPrefix+r(t,!0)+'">'+(n?e:r(e,!0))+"\n</code></pre>\n":"<pre><code>"+(n?e:r(e,!0))+"\n</code></pre>"},n.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},n.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"</"+n+">\n"},n.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},n.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},n.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},n.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td",i=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return i+e+"</"+n+">\n"},n.prototype.strong=function(e){return"<strong>"+e+"</strong>"},n.prototype.em=function(e){return"<em>"+e+"</em>"},n.prototype.codespan=function(e){return"<code>"+e+"</code>"},n.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},n.prototype.del=function(e){return"<del>"+e+"</del>"},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(o(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(r){return""}if(0===i.indexOf("javascript:"))return""}var a='<a href="'+e+'"';return t&&(a+=' title="'+t+'"'),a+=">"+n+"</a>"},n.prototype.image=function(e,t,n){var i='<img src="'+e+'" alt="'+n+'"';return t&&(i+=' title="'+t+'"'),i+=this.options.xhtml?"/>":">"},i.parse=function(e,t,n){var r=new i(t,n);return r.parse(e)},i.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},i.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,r,o="",a="";for(n="",e=0;e<this.token.header.length;e++)i={header:!0,align:this.token.align[e]},n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(o+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",r=0;r<t.length;r++)n+=this.renderer.tablecell(this.inline.output(t[r]),{header:!1,align:this.token.align[r]});a+=this.renderer.tablerow(n)}return this.renderer.table(o,a);case"blockquote_start":for(var a="";"blockquote_end"!==this.next().type;)a+=this.tok();return this.renderer.blockquote(a);case"list_start":for(var a="",s=this.token.ordered;"list_end"!==this.next().type;)a+=this.tok();return this.renderer.list(a,s);case"list_item_start":for(var a="";"list_item_end"!==this.next().type;)a+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(a);case"loose_item_start":for(var a="";"list_item_end"!==this.next().type;)a+=this.tok();return this.renderer.listitem(a);case"html":var l=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(l);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},s.exec=s,u.options=u.setOptions=function(e){return l(u.defaults,e),u},u.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new n,xhtml:!1},u.Parser=i,u.parser=i.parse,u.Renderer=n,u.Lexer=e,u.lexer=e.lex,u.InlineLexer=t,u.inlineLexer=t.output,u.parse=u,"object"==typeof exports?module.exports=u:"function"==typeof define&&define.amd?define(function(){return u}):this.marked=u}.call(function(){return this||("undefined"!=typeof window?window:global)}()),!function(){function e(e,t){return t>e?-1:e>t?1:e>=t?0:NaN}function t(e){return null===e?NaN:+e}function n(e){return!isNaN(e)}function i(e){return{left:function(t,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=t.length);r>i;){var o=i+r>>>1;e(t[o],n)<0?i=o+1:r=o}return i},right:function(t,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=t.length);r>i;){var o=i+r>>>1;e(t[o],n)>0?r=o:i=o+1}return i}}}function r(e){return e.length}function o(e){for(var t=1;e*t%1;)t*=10;return t}function a(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function s(){this._=Object.create(null)}function l(e){return(e+="")===va||e[0]===ya?ya+e:e}function u(e){return(e+="")[0]===ya?e.slice(1):e}function c(e){return l(e)in this._}function d(e){return(e=l(e))in this._&&delete this._[e]}function p(){var e=[];for(var t in this._)e.push(u(t));return e}function h(){var e=0;for(var t in this._)++e;return e}function f(){for(var e in this._)return!1;return!0}function g(){this._=Object.create(null)}function m(e,t,n){return function(){var i=n.apply(t,arguments);return i===t?e:i}}function v(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,i=ba.length;i>n;++n){var r=ba[n]+t;if(r in e)return r}}function y(){}function b(){}function w(e){function t(){for(var t,i=n,r=-1,o=i.length;++r<o;)(t=i[r].on)&&t.apply(this,arguments);return e}var n=[],i=new s;return t.on=function(t,r){var o,a=i.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,n=n.slice(0,o=n.indexOf(a)).concat(n.slice(o+1)),i.remove(t)),r&&n.push(i.set(t,{on:r})),e)},t}function x(){na.event.preventDefault()}function k(){for(var e,t=na.event;e=t.sourceEvent;)t=e;return t}function C(e){for(var t=new b,n=0,i=arguments.length;++n<i;)t[arguments[n]]=w(t);return t.of=function(n,i){return function(r){try{var o=r.sourceEvent=na.event;r.target=e,na.event=r,t[r.type].apply(n,i)}finally{na.event=o}}},t}function S(e){return xa(e,Ta),e}function _(e){return"function"==typeof e?e:function(){return ka(e,this)}}function T(e){return"function"==typeof e?e:function(){return Ca(e,this)}}function $(e,t){function n(){this.removeAttribute(e)}function i(){this.removeAttributeNS(e.space,e.local)}function r(){this.setAttribute(e,t)}function o(){this.setAttributeNS(e.space,e.local,t)}function a(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}function s(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}return e=na.ns.qualify(e),null==t?e.local?i:n:"function"==typeof t?e.local?s:a:e.local?o:r}function E(e){return e.trim().replace(/\s+/g," ")}function D(e){return new RegExp("(?:^|\\s+)"+na.requote(e)+"(?:\\s+|$)","g")}function M(e){return(e+"").trim().split(/^|\s+/)}function I(e,t){function n(){for(var n=-1;++n<r;)e[n](this,t)}function i(){for(var n=-1,i=t.apply(this,arguments);++n<r;)e[n](this,i)}e=M(e).map(P);var r=e.length;return"function"==typeof t?i:n}function P(e){var t=D(e);return function(n,i){if(r=n.classList)return i?r.add(e):r.remove(e);var r=n.getAttribute("class")||"";i?(t.lastIndex=0,t.test(r)||n.setAttribute("class",E(r+" "+e))):n.setAttribute("class",E(r.replace(t," ")))}}function A(e,t,n){function i(){this.style.removeProperty(e)}function r(){this.style.setProperty(e,t,n)}function o(){var i=t.apply(this,arguments);null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}return null==t?i:"function"==typeof t?o:r}function j(e,t){function n(){delete this[e]}function i(){this[e]=t}function r(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}return null==t?n:"function"==typeof t?r:i}function N(e){return"function"==typeof e?e:(e=na.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,e)}}function O(){var e=this.parentNode;e&&e.removeChild(this)}function L(e){return{__data__:e}}function R(e){return function(){return _a(this,e)}}function F(t){return arguments.length||(t=e),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function q(e,t){for(var n=0,i=e.length;i>n;n++)for(var r,o=e[n],a=0,s=o.length;s>a;a++)(r=o[a])&&t(r,a,n);return e}function H(e){return xa(e,Ea),e}function U(e){var t,n;return function(i,r,o){var a,s=e[o].update,l=s.length;for(o!=n&&(n=o,t=0),r>=t&&(t=r+1);!(a=s[t])&&++t<l;);return a}}function B(e,t,n){function i(){var t=this[a];t&&(this.removeEventListener(e,t,t.$),delete this[a])}function r(){var r=l(t,ra(arguments));i.call(this),this.addEventListener(e,this[a]=r,r.$=n),r._=t}function o(){var t,n=new RegExp("^__on([^.]+)"+na.requote(e)+"$");for(var i in this)if(t=i.match(n)){var r=this[i];this.removeEventListener(t[1],r,r.$),delete this[i]}}var a="__on"+e,s=e.indexOf("."),l=z;s>0&&(e=e.slice(0,s));var u=Ma.get(e);return u&&(e=u,l=V),s?t?r:i:t?y:o}function z(e,t){return function(n){var i=na.event;na.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{na.event=i}}}function V(e,t){var n=z(e,t);return function(e){var t=this,i=e.relatedTarget;i&&(i===t||8&i.compareDocumentPosition(t))||n.call(t,e)}}function W(){var e=".dragsuppress-"+ ++Pa,t="click"+e,n=na.select(sa).on("touchmove"+e,x).on("dragstart"+e,x).on("selectstart"+e,x);if(Ia){var i=aa.style,r=i[Ia];i[Ia]="none"}return function(o){if(n.on(e,null),Ia&&(i[Ia]=r),o){var a=function(){n.on(t,null)};n.on(t,function(){x(),a()},!0),setTimeout(a,0)}}}function G(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();if(0>Aa&&(sa.scrollX||sa.scrollY)){n=na.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var r=n[0][0].getScreenCTM();Aa=!(r.f||r.e),n.remove()}return Aa?(i.x=t.pageX,i.y=t.pageY):(i.x=t.clientX,i.y=t.clientY),i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}function J(){return na.event.changedTouches[0].identifier}function X(){return na.event.target}function Y(){return sa}function K(e){return e>0?1:0>e?-1:0}function Q(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function Z(e){return e>1?0:-1>e?Oa:Math.acos(e)}function ee(e){return e>1?Fa:-1>e?-Fa:Math.asin(e)}function te(e){return((e=Math.exp(e))-1/e)/2}function ne(e){return((e=Math.exp(e))+1/e)/2}function ie(e){return((e=Math.exp(2*e))-1)/(e+1)}function re(e){return(e=Math.sin(e/2))*e}function oe(){}function ae(e,t,n){return this instanceof ae?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof ae?new ae(e.h,e.s,e.l):we(""+e,xe,ae):new ae(e,t,n)}function se(e,t,n){function i(e){return e>360?e-=360:0>e&&(e+=360),60>e?o+(a-o)*e/60:180>e?a:240>e?o+(a-o)*(240-e)/60:o}function r(e){return Math.round(255*i(e))}var o,a;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:0>t?0:t>1?1:t,n=0>n?0:n>1?1:n,a=.5>=n?n*(1+t):n+t-n*t,o=2*n-a,new me(r(e+120),r(e),r(e-120))}function le(e,t,n){return this instanceof le?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof le?new le(e.h,e.c,e.l):e instanceof ce?pe(e.l,e.a,e.b):pe((e=ke((e=na.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new le(e,t,n)}function ue(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new ce(n,Math.cos(e*=qa)*t,Math.sin(e)*t)}function ce(e,t,n){return this instanceof ce?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof ce?new ce(e.l,e.a,e.b):e instanceof le?ue(e.h,e.c,e.l):ke((e=me(e)).r,e.g,e.b):new ce(e,t,n)}function de(e,t,n){var i=(e+16)/116,r=i+t/500,o=i-n/200;return r=he(r)*Ka,i=he(i)*Qa,o=he(o)*Za,new me(ge(3.2404542*r-1.5371385*i-.4985314*o),ge(-.969266*r+1.8760108*i+.041556*o),ge(.0556434*r-.2040259*i+1.0572252*o))}function pe(e,t,n){return e>0?new le(Math.atan2(n,t)*Ha,Math.sqrt(t*t+n*n),e):new le(NaN,NaN,e)}function he(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function fe(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function ge(e){return Math.round(255*(.00304>=e?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function me(e,t,n){return this instanceof me?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof me?new me(e.r,e.g,e.b):we(""+e,me,se):new me(e,t,n)}function ve(e){return new me(e>>16,e>>8&255,255&e)}function ye(e){return ve(e)+""}function be(e){return 16>e?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function we(e,t,n){var i,r,o,a=0,s=0,l=0;if(i=/([a-z]+)\((.*)\)/i.exec(e))switch(r=i[2].split(","),i[1]){case"hsl":return n(parseFloat(r[0]),parseFloat(r[1])/100,parseFloat(r[2])/100);case"rgb":return t(Se(r[0]),Se(r[1]),Se(r[2]))}return(o=ns.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a=a>>4|a,s=240&o,s=s>>4|s,l=15&o,l=l<<4|l):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(a,s,l))}function xe(e,t,n){var i,r,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,l=(a+o)/2;return s?(r=.5>l?s/(a+o):s/(2-a-o),i=e==a?(t-n)/s+(n>t?6:0):t==a?(n-e)/s+2:(e-t)/s+4,i*=60):(i=NaN,r=l>0&&1>l?0:i),new ae(i,r,l)}function ke(e,t,n){e=Ce(e),t=Ce(t),n=Ce(n);var i=fe((.4124564*e+.3575761*t+.1804375*n)/Ka),r=fe((.2126729*e+.7151522*t+.072175*n)/Qa),o=fe((.0193339*e+.119192*t+.9503041*n)/Za);return ce(116*r-16,500*(i-r),200*(r-o))}function Ce(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Se(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function _e(e){return"function"==typeof e?e:function(){return e}}function Te(e){return e}function $e(e){return function(t,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=null),Ee(t,n,e,i)}}function Ee(e,t,n,i){function r(){var e,t=l.status;if(!t&&Me(l)||t>=200&&300>t||304===t){try{e=n.call(o,l)}catch(i){return void a.error.call(o,i)}a.load.call(o,e)}else a.error.call(o,l)}var o={},a=na.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!sa.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(e)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=r:l.onreadystatechange=function(){l.readyState>3&&r()},l.onprogress=function(e){var t=na.event;na.event=e;try{a.progress.call(o,l)}finally{na.event=t}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",o):t},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return n=e,o},["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(ra(arguments)))}}),o.send=function(n,i,r){if(2===arguments.length&&"function"==typeof i&&(r=i,i=null),l.open(n,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=u&&(l.responseType=u),null!=r&&o.on("error",r).on("load",function(e){r(null,e)}),a.beforesend.call(o,l),l.send(null==i?null:i),o},o.abort=function(){return l.abort(),o},na.rebind(o,a,"on"),null==i?o:o.get(De(i))}function De(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function Me(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function Ie(){var e=Pe(),t=Ae()-e;t>24?(isFinite(t)&&(clearTimeout(as),as=setTimeout(Ie,t)),os=0):(os=1,ls(Ie))}function Pe(){var e=Date.now();for(ss=is;ss;)e>=ss.t&&(ss.f=ss.c(e-ss.t)),ss=ss.n;return e}function Ae(){for(var e,t=is,n=1/0;t;)t.f?t=e?e.n=t.n:is=t.n:(t.t<n&&(n=t.t),t=(e=t).n);return rs=e,n}function je(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function Ne(e,t){var n=Math.pow(10,3*ma(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function Oe(e){var t=e.decimal,n=e.thousands,i=e.grouping,r=e.currency,o=i&&n?function(e,t){for(var r=e.length,o=[],a=0,s=i[0],l=0;r>0&&s>0&&(l+s+1>t&&(s=Math.max(1,t-l)),o.push(e.substring(r-=s,r+s)),
|
|
3250
|
|
-!((l+=s+1)>t));)s=i[a=(a+1)%i.length];return o.reverse().join(n)}:Te;return function(e){var n=cs.exec(e),i=n[1]||" ",a=n[2]||">",s=n[3]||"-",l=n[4]||"",u=n[5],c=+n[6],d=n[7],p=n[8],h=n[9],f=1,g="",m="",v=!1,y=!0;switch(p&&(p=+p.substring(1)),(u||"0"===i&&"="===a)&&(u=i="0",a="="),h){case"n":d=!0,h="g";break;case"%":f=100,m="%",h="f";break;case"p":f=100,m="%",h="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+h.toLowerCase());case"c":y=!1;case"d":v=!0,p=0;break;case"s":f=-1,h="r"}"$"===l&&(g=r[0],m=r[1]),"r"!=h||p||(h="g"),null!=p&&("g"==h?p=Math.max(1,Math.min(21,p)):("e"==h||"f"==h)&&(p=Math.max(0,Math.min(20,p)))),h=ds.get(h)||Le;var b=u&&d;return function(e){var n=m;if(v&&e%1)return"";var r=0>e||0===e&&0>1/e?(e=-e,"-"):"-"===s?"":s;if(0>f){var l=na.formatPrefix(e,p);e=l.scale(e),n=l.symbol+m}else e*=f;e=h(e,p);var w,x,k=e.lastIndexOf(".");if(0>k){var C=y?e.lastIndexOf("e"):-1;0>C?(w=e,x=""):(w=e.substring(0,C),x=e.substring(C))}else w=e.substring(0,k),x=t+e.substring(k+1);!u&&d&&(w=o(w,1/0));var S=g.length+w.length+x.length+(b?0:r.length),_=c>S?new Array(S=c-S+1).join(i):"";return b&&(w=o(_+w,_.length?c-x.length:1/0)),r+=g,e=w+x,("<"===a?r+e+_:">"===a?_+r+e:"^"===a?_.substring(0,S>>=1)+r+e+_.substring(S):r+(b?e:_+e))+n}}}function Le(e){return e+""}function Re(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Fe(e,t,n){function i(t){var n=e(t),i=o(n,1);return i-t>t-n?n:i}function r(n){return t(n=e(new hs(n-1)),1),n}function o(e,n){return t(e=new hs(+e),n),e}function a(e,i,o){var a=r(e),s=[];if(o>1)for(;i>a;)n(a)%o||s.push(new Date(+a)),t(a,1);else for(;i>a;)s.push(new Date(+a)),t(a,1);return s}function s(e,t,n){try{hs=Re;var i=new Re;return i._=e,a(i,t,n)}finally{hs=Date}}e.floor=e,e.round=i,e.ceil=r,e.offset=o,e.range=a;var l=e.utc=qe(e);return l.floor=l,l.round=qe(i),l.ceil=qe(r),l.offset=qe(o),l.range=s,e}function qe(e){return function(t,n){try{hs=Re;var i=new Re;return i._=t,e(i,n)._}finally{hs=Date}}}function He(e){function t(e){function t(t){for(var n,r,o,a=[],s=-1,l=0;++s<i;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(r=gs[n=e.charAt(++s)])&&(n=e.charAt(++s)),(o=E[n])&&(n=o(t,null==r?"e"===n?" ":"0":r)),a.push(n),l=s+1);return a.push(e.slice(l,s)),a.join("")}var i=e.length;return t.parse=function(t){var i={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},r=n(i,e,t,0);if(r!=t.length)return null;"p"in i&&(i.H=i.H%12+12*i.p);var o=null!=i.Z&&hs!==Re,a=new(o?Re:hs);return"j"in i?a.setFullYear(i.y,0,i.j):"w"in i&&("W"in i||"U"in i)?(a.setFullYear(i.y,0,1),a.setFullYear(i.y,0,"W"in i?(i.w+6)%7+7*i.W-(a.getDay()+5)%7:i.w+7*i.U-(a.getDay()+6)%7)):a.setFullYear(i.y,i.m,i.d),a.setHours(i.H+(i.Z/100|0),i.M+i.Z%100,i.S,i.L),o?a._:a},t.toString=function(){return e},t}function n(e,t,n,i){for(var r,o,a,s=0,l=t.length,u=n.length;l>s;){if(i>=u)return-1;if(r=t.charCodeAt(s++),37===r){if(a=t.charAt(s++),o=D[a in gs?t.charAt(s++):a],!o||(i=o(e,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}function i(e,t,n){k.lastIndex=0;var i=k.exec(t.slice(n));return i?(e.w=C.get(i[0].toLowerCase()),n+i[0].length):-1}function r(e,t,n){w.lastIndex=0;var i=w.exec(t.slice(n));return i?(e.w=x.get(i[0].toLowerCase()),n+i[0].length):-1}function o(e,t,n){T.lastIndex=0;var i=T.exec(t.slice(n));return i?(e.m=$.get(i[0].toLowerCase()),n+i[0].length):-1}function a(e,t,n){S.lastIndex=0;var i=S.exec(t.slice(n));return i?(e.m=_.get(i[0].toLowerCase()),n+i[0].length):-1}function s(e,t,i){return n(e,E.c.toString(),t,i)}function l(e,t,i){return n(e,E.x.toString(),t,i)}function u(e,t,i){return n(e,E.X.toString(),t,i)}function c(e,t,n){var i=b.get(t.slice(n,n+=2).toLowerCase());return null==i?-1:(e.p=i,n)}var d=e.dateTime,p=e.date,h=e.time,f=e.periods,g=e.days,m=e.shortDays,v=e.months,y=e.shortMonths;t.utc=function(e){function n(e){try{hs=Re;var t=new hs;return t._=e,i(t)}finally{hs=Date}}var i=t(e);return n.parse=function(e){try{hs=Re;var t=i.parse(e);return t&&t._}finally{hs=Date}},n.toString=i.toString,n},t.multi=t.utc.multi=st;var b=na.map(),w=Be(g),x=ze(g),k=Be(m),C=ze(m),S=Be(v),_=ze(v),T=Be(y),$=ze(y);f.forEach(function(e,t){b.set(e.toLowerCase(),t)});var E={a:function(e){return m[e.getDay()]},A:function(e){return g[e.getDay()]},b:function(e){return y[e.getMonth()]},B:function(e){return v[e.getMonth()]},c:t(d),d:function(e,t){return Ue(e.getDate(),t,2)},e:function(e,t){return Ue(e.getDate(),t,2)},H:function(e,t){return Ue(e.getHours(),t,2)},I:function(e,t){return Ue(e.getHours()%12||12,t,2)},j:function(e,t){return Ue(1+ps.dayOfYear(e),t,3)},L:function(e,t){return Ue(e.getMilliseconds(),t,3)},m:function(e,t){return Ue(e.getMonth()+1,t,2)},M:function(e,t){return Ue(e.getMinutes(),t,2)},p:function(e){return f[+(e.getHours()>=12)]},S:function(e,t){return Ue(e.getSeconds(),t,2)},U:function(e,t){return Ue(ps.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Ue(ps.mondayOfYear(e),t,2)},x:t(p),X:t(h),y:function(e,t){return Ue(e.getFullYear()%100,t,2)},Y:function(e,t){return Ue(e.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},D={a:i,A:r,b:o,B:a,c:s,d:Ze,e:Ze,H:tt,I:tt,j:et,L:rt,m:Qe,M:nt,p:c,S:it,U:We,w:Ve,W:Ge,x:l,X:u,y:Xe,Y:Je,Z:Ye,"%":at};return t}function Ue(e,t,n){var i=0>e?"-":"",r=(i?-e:e)+"",o=r.length;return i+(n>o?new Array(n-o+1).join(t)+r:r)}function Be(e){return new RegExp("^(?:"+e.map(na.requote).join("|")+")","i")}function ze(e){for(var t=new s,n=-1,i=e.length;++n<i;)t.set(e[n].toLowerCase(),n);return t}function Ve(e,t,n){ms.lastIndex=0;var i=ms.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function We(e,t,n){ms.lastIndex=0;var i=ms.exec(t.slice(n));return i?(e.U=+i[0],n+i[0].length):-1}function Ge(e,t,n){ms.lastIndex=0;var i=ms.exec(t.slice(n));return i?(e.W=+i[0],n+i[0].length):-1}function Je(e,t,n){ms.lastIndex=0;var i=ms.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function Xe(e,t,n){ms.lastIndex=0;var i=ms.exec(t.slice(n,n+2));return i?(e.y=Ke(+i[0]),n+i[0].length):-1}function Ye(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function Ke(e){return e+(e>68?1900:2e3)}function Qe(e,t,n){ms.lastIndex=0;var i=ms.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function Ze(e,t,n){ms.lastIndex=0;var i=ms.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function et(e,t,n){ms.lastIndex=0;var i=ms.exec(t.slice(n,n+3));return i?(e.j=+i[0],n+i[0].length):-1}function tt(e,t,n){ms.lastIndex=0;var i=ms.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function nt(e,t,n){ms.lastIndex=0;var i=ms.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function it(e,t,n){ms.lastIndex=0;var i=ms.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function rt(e,t,n){ms.lastIndex=0;var i=ms.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function ot(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",i=ma(t)/60|0,r=ma(t)%60;return n+Ue(i,"0",2)+Ue(r,"0",2)}function at(e,t,n){vs.lastIndex=0;var i=vs.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function st(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,i=e[n];!i[1](t);)i=e[++n];return i[0](t)}}function lt(){}function ut(e,t,n){var i=n.s=e+t,r=i-e,o=i-r;n.t=e-o+(t-r)}function ct(e,t){e&&xs.hasOwnProperty(e.type)&&xs[e.type](e,t)}function dt(e,t,n){var i,r=-1,o=e.length-n;for(t.lineStart();++r<o;)i=e[r],t.point(i[0],i[1],i[2]);t.lineEnd()}function pt(e,t){var n=-1,i=e.length;for(t.polygonStart();++n<i;)dt(e[n],t,1);t.polygonEnd()}function ht(){function e(e,t){e*=qa,t=t*qa/2+Oa/4;var n=e-i,a=n>=0?1:-1,s=a*n,l=Math.cos(t),u=Math.sin(t),c=o*u,d=r*l+c*Math.cos(s),p=c*a*Math.sin(s);Cs.add(Math.atan2(p,d)),i=e,r=l,o=u}var t,n,i,r,o;Ss.point=function(a,s){Ss.point=e,i=(t=a)*qa,r=Math.cos(s=(n=s)*qa/2+Oa/4),o=Math.sin(s)},Ss.lineEnd=function(){e(t,n)}}function ft(e){var t=e[0],n=e[1],i=Math.cos(n);return[i*Math.cos(t),i*Math.sin(t),Math.sin(n)]}function gt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function mt(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function vt(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function yt(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function bt(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function wt(e){return[Math.atan2(e[1],e[0]),ee(e[2])]}function xt(e,t){return ma(e[0]-t[0])<ja&&ma(e[1]-t[1])<ja}function kt(e,t){e*=qa;var n=Math.cos(t*=qa);Ct(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function Ct(e,t,n){++_s,$s+=(e-$s)/_s,Es+=(t-Es)/_s,Ds+=(n-Ds)/_s}function St(){function e(e,r){e*=qa;var o=Math.cos(r*=qa),a=o*Math.cos(e),s=o*Math.sin(e),l=Math.sin(r),u=Math.atan2(Math.sqrt((u=n*l-i*s)*u+(u=i*a-t*l)*u+(u=t*s-n*a)*u),t*a+n*s+i*l);Ts+=u,Ms+=u*(t+(t=a)),Is+=u*(n+(n=s)),Ps+=u*(i+(i=l)),Ct(t,n,i)}var t,n,i;Os.point=function(r,o){r*=qa;var a=Math.cos(o*=qa);t=a*Math.cos(r),n=a*Math.sin(r),i=Math.sin(o),Os.point=e,Ct(t,n,i)}}function _t(){Os.point=kt}function Tt(){function e(e,t){e*=qa;var n=Math.cos(t*=qa),a=n*Math.cos(e),s=n*Math.sin(e),l=Math.sin(t),u=r*l-o*s,c=o*a-i*l,d=i*s-r*a,p=Math.sqrt(u*u+c*c+d*d),h=i*a+r*s+o*l,f=p&&-Z(h)/p,g=Math.atan2(p,h);As+=f*u,js+=f*c,Ns+=f*d,Ts+=g,Ms+=g*(i+(i=a)),Is+=g*(r+(r=s)),Ps+=g*(o+(o=l)),Ct(i,r,o)}var t,n,i,r,o;Os.point=function(a,s){t=a,n=s,Os.point=e,a*=qa;var l=Math.cos(s*=qa);i=l*Math.cos(a),r=l*Math.sin(a),o=Math.sin(s),Ct(i,r,o)},Os.lineEnd=function(){e(t,n),Os.lineEnd=_t,Os.point=kt}}function $t(e,t){function n(n,i){return n=e(n,i),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,i){return n=t.invert(n,i),n&&e.invert(n[0],n[1])}),n}function Et(){return!0}function Dt(e,t,n,i,r){var o=[],a=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],i=e[t];if(xt(n,i)){r.lineStart();for(var s=0;t>s;++s)r.point((n=e[s])[0],n[1]);return void r.lineEnd()}var l=new It(n,e,null,!0),u=new It(n,null,l,!1);l.o=u,o.push(l),a.push(u),l=new It(i,e,null,!1),u=new It(i,null,l,!0),l.o=u,o.push(l),a.push(u)}}),a.sort(t),Mt(o),Mt(a),o.length){for(var s=0,l=n,u=a.length;u>s;++s)a[s].e=l=!l;for(var c,d,p=o[0];;){for(var h=p,f=!0;h.v;)if((h=h.n)===p)return;c=h.z,r.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(var s=0,u=c.length;u>s;++s)r.point((d=c[s])[0],d[1]);else i(h.x,h.n.x,1,r);h=h.n}else{if(f){c=h.p.z;for(var s=c.length-1;s>=0;--s)r.point((d=c[s])[0],d[1])}else i(h.x,h.p.x,-1,r);h=h.p}h=h.o,c=h.z,f=!f}while(!h.v);r.lineEnd()}}}function Mt(e){if(t=e.length){for(var t,n,i=0,r=e[0];++i<t;)r.n=n=e[i],n.p=r,r=n;r.n=n=e[0],n.p=r}}function It(e,t,n,i){this.x=e,this.z=t,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function Pt(e,t,n,i){return function(r,o){function a(t,n){var i=r(t,n);e(t=i[0],n=i[1])&&o.point(t,n)}function s(e,t){var n=r(e,t);m.point(n[0],n[1])}function l(){y.point=s,m.lineStart()}function u(){y.point=a,m.lineEnd()}function c(e,t){g.push([e,t]);var n=r(e,t);w.point(n[0],n[1])}function d(){w.lineStart(),g=[]}function p(){c(g[0][0],g[0][1]),w.lineEnd();var e,t=w.clean(),n=b.buffer(),i=n.length;if(g.pop(),f.push(g),g=null,i)if(1&t){e=n[0];var r,i=e.length-1,a=-1;if(i>0){for(x||(o.polygonStart(),x=!0),o.lineStart();++a<i;)o.point((r=e[a])[0],r[1]);o.lineEnd()}}else i>1&&2&t&&n.push(n.pop().concat(n.shift())),h.push(n.filter(At))}var h,f,g,m=t(o),v=r.invert(i[0],i[1]),y={point:a,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=d,y.lineEnd=p,h=[],f=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=u,h=na.merge(h);var e=Ft(v,f);h.length?(x||(o.polygonStart(),x=!0),Dt(h,Nt,e,n,o)):e&&(x||(o.polygonStart(),x=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),x&&(o.polygonEnd(),x=!1),h=f=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},b=jt(),w=t(b),x=!1;return y}}function At(e){return e.length>1}function jt(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:y,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Nt(e,t){return((e=e.x)[0]<0?e[1]-Fa-ja:Fa-e[1])-((t=t.x)[0]<0?t[1]-Fa-ja:Fa-t[1])}function Ot(e){var t,n=NaN,i=NaN,r=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?Oa:-Oa,l=ma(o-n);ma(l-Oa)<ja?(e.point(n,i=(i+a)/2>0?Fa:-Fa),e.point(r,i),e.lineEnd(),e.lineStart(),e.point(s,i),e.point(o,i),t=0):r!==s&&l>=Oa&&(ma(n-r)<ja&&(n-=r*ja),ma(o-s)<ja&&(o-=s*ja),i=Lt(n,i,o,a),e.point(r,i),e.lineEnd(),e.lineStart(),e.point(s,i),t=0),e.point(n=o,i=a),r=s},lineEnd:function(){e.lineEnd(),n=i=NaN},clean:function(){return 2-t}}}function Lt(e,t,n,i){var r,o,a=Math.sin(e-n);return ma(a)>ja?Math.atan((Math.sin(t)*(o=Math.cos(i))*Math.sin(n)-Math.sin(i)*(r=Math.cos(t))*Math.sin(e))/(r*o*a)):(t+i)/2}function Rt(e,t,n,i){var r;if(null==e)r=n*Fa,i.point(-Oa,r),i.point(0,r),i.point(Oa,r),i.point(Oa,0),i.point(Oa,-r),i.point(0,-r),i.point(-Oa,-r),i.point(-Oa,0),i.point(-Oa,r);else if(ma(e[0]-t[0])>ja){var o=e[0]<t[0]?Oa:-Oa;r=n*o/2,i.point(-o,r),i.point(0,r),i.point(o,r)}else i.point(t[0],t[1])}function Ft(e,t){var n=e[0],i=e[1],r=[Math.sin(n),-Math.cos(n),0],o=0,a=0;Cs.reset();for(var s=0,l=t.length;l>s;++s){var u=t[s],c=u.length;if(c)for(var d=u[0],p=d[0],h=d[1]/2+Oa/4,f=Math.sin(h),g=Math.cos(h),m=1;;){m===c&&(m=0),e=u[m];var v=e[0],y=e[1]/2+Oa/4,b=Math.sin(y),w=Math.cos(y),x=v-p,k=x>=0?1:-1,C=k*x,S=C>Oa,_=f*b;if(Cs.add(Math.atan2(_*k*Math.sin(C),g*w+_*Math.cos(C))),o+=S?x+k*La:x,S^p>=n^v>=n){var T=mt(ft(d),ft(e));bt(T);var $=mt(r,T);bt($);var E=(S^x>=0?-1:1)*ee($[2]);(i>E||i===E&&(T[0]||T[1]))&&(a+=S^x>=0?1:-1)}if(!m++)break;p=v,f=b,g=w,d=e}}return(-ja>o||ja>o&&0>Cs)^1&a}function qt(e){function t(e,t){return Math.cos(e)*Math.cos(t)>o}function n(e){var n,o,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(d,p){var h,f=[d,p],g=t(d,p),m=a?g?0:r(d,p):g?r(d+(0>d?Oa:-Oa),p):0;if(!n&&(u=l=g)&&e.lineStart(),g!==l&&(h=i(n,f),(xt(n,h)||xt(f,h))&&(f[0]+=ja,f[1]+=ja,g=t(f[0],f[1]))),g!==l)c=0,g?(e.lineStart(),h=i(f,n),e.point(h[0],h[1])):(h=i(n,f),e.point(h[0],h[1]),e.lineEnd()),n=h;else if(s&&n&&a^g){var v;m&o||!(v=i(f,n,!0))||(c=0,a?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!g||n&&xt(n,f)||e.point(f[0],f[1]),n=f,l=g,o=m},lineEnd:function(){l&&e.lineEnd(),n=null},clean:function(){return c|(u&&l)<<1}}}function i(e,t,n){var i=ft(e),r=ft(t),a=[1,0,0],s=mt(i,r),l=gt(s,s),u=s[0],c=l-u*u;if(!c)return!n&&e;var d=o*l/c,p=-o*u/c,h=mt(a,s),f=yt(a,d),g=yt(s,p);vt(f,g);var m=h,v=gt(f,m),y=gt(m,m),b=v*v-y*(gt(f,f)-1);if(!(0>b)){var w=Math.sqrt(b),x=yt(m,(-v-w)/y);if(vt(x,f),x=wt(x),!n)return x;var k,C=e[0],S=t[0],_=e[1],T=t[1];C>S&&(k=C,C=S,S=k);var $=S-C,E=ma($-Oa)<ja,D=E||ja>$;if(!E&&_>T&&(k=_,_=T,T=k),D?E?_+T>0^x[1]<(ma(x[0]-C)<ja?_:T):_<=x[1]&&x[1]<=T:$>Oa^(C<=x[0]&&x[0]<=S)){var M=yt(m,(-v+w)/y);return vt(M,f),[x,wt(M)]}}}function r(t,n){var i=a?e:Oa-e,r=0;return-i>t?r|=1:t>i&&(r|=2),-i>n?r|=4:n>i&&(r|=8),r}var o=Math.cos(e),a=o>0,s=ma(o)>ja,l=fn(e,6*qa);return Pt(t,n,l,a?[0,-e]:[-Oa,e-Oa])}function Ht(e,t,n,i){return function(r){var o,a=r.a,s=r.b,l=a.x,u=a.y,c=s.x,d=s.y,p=0,h=1,f=c-l,g=d-u;if(o=e-l,f||!(o>0)){if(o/=f,0>f){if(p>o)return;h>o&&(h=o)}else if(f>0){if(o>h)return;o>p&&(p=o)}if(o=n-l,f||!(0>o)){if(o/=f,0>f){if(o>h)return;o>p&&(p=o)}else if(f>0){if(p>o)return;h>o&&(h=o)}if(o=t-u,g||!(o>0)){if(o/=g,0>g){if(p>o)return;h>o&&(h=o)}else if(g>0){if(o>h)return;o>p&&(p=o)}if(o=i-u,g||!(0>o)){if(o/=g,0>g){if(o>h)return;o>p&&(p=o)}else if(g>0){if(p>o)return;h>o&&(h=o)}return p>0&&(r.a={x:l+p*f,y:u+p*g}),1>h&&(r.b={x:l+h*f,y:u+h*g}),r}}}}}}function Ut(e,t,n,i){function r(i,r){return ma(i[0]-e)<ja?r>0?0:3:ma(i[0]-n)<ja?r>0?2:1:ma(i[1]-t)<ja?r>0?1:0:r>0?3:2}function o(e,t){return a(e.x,t.x)}function a(e,t){var n=r(e,1),i=r(t,1);return n!==i?n-i:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(s){function l(e){for(var t=0,n=m.length,i=e[1],r=0;n>r;++r)for(var o,a=1,s=m[r],l=s.length,u=s[0];l>a;++a)o=s[a],u[1]<=i?o[1]>i&&Q(u,o,e)>0&&++t:o[1]<=i&&Q(u,o,e)<0&&--t,u=o;return 0!==t}function u(o,s,l,u){var c=0,d=0;if(null==o||(c=r(o,l))!==(d=r(s,l))||a(o,s)<0^l>0){do u.point(0===c||3===c?e:n,c>1?i:t);while((c=(c+l+4)%4)!==d)}else u.point(s[0],s[1])}function c(r,o){return r>=e&&n>=r&&o>=t&&i>=o}function d(e,t){c(e,t)&&s.point(e,t)}function p(){D.point=f,m&&m.push(v=[]),S=!0,C=!1,x=k=NaN}function h(){g&&(f(y,b),w&&C&&$.rejoin(),g.push($.buffer())),D.point=d,C&&s.lineEnd()}function f(e,t){e=Math.max(-Rs,Math.min(Rs,e)),t=Math.max(-Rs,Math.min(Rs,t));var n=c(e,t);if(m&&v.push([e,t]),S)y=e,b=t,w=n,S=!1,n&&(s.lineStart(),s.point(e,t));else if(n&&C)s.point(e,t);else{var i={a:{x:x,y:k},b:{x:e,y:t}};E(i)?(C||(s.lineStart(),s.point(i.a.x,i.a.y)),s.point(i.b.x,i.b.y),n||s.lineEnd(),_=!1):n&&(s.lineStart(),s.point(e,t),_=!1)}x=e,k=t,C=n}var g,m,v,y,b,w,x,k,C,S,_,T=s,$=jt(),E=Ht(e,t,n,i),D={point:d,lineStart:p,lineEnd:h,polygonStart:function(){s=$,g=[],m=[],_=!0},polygonEnd:function(){s=T,g=na.merge(g);var t=l([e,i]),n=_&&t,r=g.length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),r&&Dt(g,o,t,u,s),s.polygonEnd()),g=m=v=null}};return D}}function Bt(e){var t=0,n=Oa/3,i=an(e),r=i(t,n);return r.parallels=function(e){return arguments.length?i(t=e[0]*Oa/180,n=e[1]*Oa/180):[t/Oa*180,n/Oa*180]},r}function zt(e,t){function n(e,t){var n=Math.sqrt(o-2*r*Math.sin(t))/r;return[n*Math.sin(e*=r),a-n*Math.cos(e)]}var i=Math.sin(e),r=(i+Math.sin(t))/2,o=1+i*(2*r-i),a=Math.sqrt(o)/r;return n.invert=function(e,t){var n=a-t;return[Math.atan2(e,n)/r,ee((o-(e*e+n*n)*r*r)/(2*r))]},n}function Vt(){function e(e,t){qs+=r*e-i*t,i=e,r=t}var t,n,i,r;Vs.point=function(o,a){Vs.point=e,t=i=o,n=r=a},Vs.lineEnd=function(){e(t,n)}}function Wt(e,t){Hs>e&&(Hs=e),e>Bs&&(Bs=e),Us>t&&(Us=t),t>zs&&(zs=t)}function Gt(){function e(e,t){a.push("M",e,",",t,o)}function t(e,t){a.push("M",e,",",t),s.point=n}function n(e,t){a.push("L",e,",",t)}function i(){s.point=e}function r(){a.push("Z")}var o=Jt(4.5),a=[],s={point:e,lineStart:function(){s.point=t},lineEnd:i,polygonStart:function(){s.lineEnd=r},polygonEnd:function(){s.lineEnd=i,s.point=e},pointRadius:function(e){return o=Jt(e),s},result:function(){if(a.length){var e=a.join("");return a=[],e}}};return s}function Jt(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Xt(e,t){$s+=e,Es+=t,++Ds}function Yt(){function e(e,i){var r=e-t,o=i-n,a=Math.sqrt(r*r+o*o);Ms+=a*(t+e)/2,Is+=a*(n+i)/2,Ps+=a,Xt(t=e,n=i)}var t,n;Gs.point=function(i,r){Gs.point=e,Xt(t=i,n=r)}}function Kt(){Gs.point=Xt}function Qt(){function e(e,t){var n=e-i,o=t-r,a=Math.sqrt(n*n+o*o);Ms+=a*(i+e)/2,Is+=a*(r+t)/2,Ps+=a,a=r*e-i*t,As+=a*(i+e),js+=a*(r+t),Ns+=3*a,Xt(i=e,r=t)}var t,n,i,r;Gs.point=function(o,a){Gs.point=e,Xt(t=i=o,n=r=a)},Gs.lineEnd=function(){e(t,n)}}function Zt(e){function t(t,n){e.moveTo(t+a,n),e.arc(t,n,a,0,La)}function n(t,n){e.moveTo(t,n),s.point=i}function i(t,n){e.lineTo(t,n)}function r(){s.point=t}function o(){e.closePath()}var a=4.5,s={point:t,lineStart:function(){s.point=n},lineEnd:r,polygonStart:function(){s.lineEnd=o},polygonEnd:function(){s.lineEnd=r,s.point=t},pointRadius:function(e){return a=e,s},result:y};return s}function en(e){function t(e){return(s?i:n)(e)}function n(t){return rn(t,function(n,i){n=e(n,i),t.point(n[0],n[1])})}function i(t){function n(n,i){n=e(n,i),t.point(n[0],n[1])}function i(){b=NaN,S.point=o,t.lineStart()}function o(n,i){var o=ft([n,i]),a=e(n,i);r(b,w,y,x,k,C,b=a[0],w=a[1],y=n,x=o[0],k=o[1],C=o[2],s,t),t.point(b,w)}function a(){S.point=n,t.lineEnd()}function l(){i(),S.point=u,S.lineEnd=c}function u(e,t){o(d=e,p=t),h=b,f=w,g=x,m=k,v=C,S.point=o}function c(){r(b,w,y,x,k,C,h,f,d,g,m,v,s,t),S.lineEnd=a,a()}var d,p,h,f,g,m,v,y,b,w,x,k,C,S={point:n,lineStart:i,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=i}};return S}function r(t,n,i,s,l,u,c,d,p,h,f,g,m,v){var y=c-t,b=d-n,w=y*y+b*b;if(w>4*o&&m--){var x=s+h,k=l+f,C=u+g,S=Math.sqrt(x*x+k*k+C*C),_=Math.asin(C/=S),T=ma(ma(C)-1)<ja||ma(i-p)<ja?(i+p)/2:Math.atan2(k,x),$=e(T,_),E=$[0],D=$[1],M=E-t,I=D-n,P=b*M-y*I;(P*P/w>o||ma((y*M+b*I)/w-.5)>.3||a>s*h+l*f+u*g)&&(r(t,n,i,s,l,u,E,D,T,x/=S,k/=S,C,m,v),v.point(E,D),r(E,D,T,x,k,C,c,d,p,h,f,g,m,v))}}var o=.5,a=Math.cos(30*qa),s=16;return t.precision=function(e){return arguments.length?(s=(o=e*e)>0&&16,t):Math.sqrt(o)},t}function tn(e){var t=en(function(t,n){return e([t*Ha,n*Ha])});return function(e){return sn(t(e))}}function nn(e){this.stream=e}function rn(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function on(e){return an(function(){return e})()}function an(e){function t(e){return e=s(e[0]*qa,e[1]*qa),[e[0]*p+l,u-e[1]*p]}function n(e){return e=s.invert((e[0]-l)/p,(u-e[1])/p),e&&[e[0]*Ha,e[1]*Ha]}function i(){s=$t(a=cn(v,y,b),o);var e=o(g,m);return l=h-e[0]*p,u=f+e[1]*p,r()}function r(){return c&&(c.valid=!1,c=null),t}var o,a,s,l,u,c,d=en(function(e,t){return e=o(e,t),[e[0]*p+l,u-e[1]*p]}),p=150,h=480,f=250,g=0,m=0,v=0,y=0,b=0,w=Ls,x=Te,k=null,C=null;return t.stream=function(e){return c&&(c.valid=!1),c=sn(w(a,d(x(e)))),c.valid=!0,c},t.clipAngle=function(e){return arguments.length?(w=null==e?(k=e,Ls):qt((k=+e)*qa),r()):k},t.clipExtent=function(e){return arguments.length?(C=e,x=e?Ut(e[0][0],e[0][1],e[1][0],e[1][1]):Te,r()):C},t.scale=function(e){return arguments.length?(p=+e,i()):p},t.translate=function(e){return arguments.length?(h=+e[0],f=+e[1],i()):[h,f]},t.center=function(e){return arguments.length?(g=e[0]%360*qa,m=e[1]%360*qa,i()):[g*Ha,m*Ha]},t.rotate=function(e){return arguments.length?(v=e[0]%360*qa,y=e[1]%360*qa,b=e.length>2?e[2]%360*qa:0,i()):[v*Ha,y*Ha,b*Ha]},na.rebind(t,d,"precision"),function(){return o=e.apply(this,arguments),t.invert=o.invert&&n,i()}}function sn(e){return rn(e,function(t,n){e.point(t*qa,n*qa)})}function ln(e,t){return[e,t]}function un(e,t){return[e>Oa?e-La:-Oa>e?e+La:e,t]}function cn(e,t,n){return e?t||n?$t(pn(e),hn(t,n)):pn(e):t||n?hn(t,n):un}function dn(e){return function(t,n){return t+=e,[t>Oa?t-La:-Oa>t?t+La:t,n]}}function pn(e){var t=dn(e);return t.invert=dn(-e),t}function hn(e,t){function n(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*i+s*r;return[Math.atan2(l*o-c*a,s*i-u*r),ee(c*o+l*a)]}var i=Math.cos(e),r=Math.sin(e),o=Math.cos(t),a=Math.sin(t);return n.invert=function(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*o-l*a;return[Math.atan2(l*o+u*a,s*i+c*r),ee(c*i-s*r)]},n}function fn(e,t){var n=Math.cos(e),i=Math.sin(e);return function(r,o,a,s){var l=a*t;null!=r?(r=gn(n,r),o=gn(n,o),(a>0?o>r:r>o)&&(r+=a*La)):(r=e+a*La,o=e-.5*l);for(var u,c=r;a>0?c>o:o>c;c-=l)s.point((u=wt([n,-i*Math.cos(c),-i*Math.sin(c)]))[0],u[1])}}function gn(e,t){var n=ft(t);n[0]-=e,bt(n);var i=Z(-n[1]);return((-n[2]<0?-i:i)+2*Math.PI-ja)%(2*Math.PI)}function mn(e,t,n){var i=na.range(e,t-ja,n).concat(t);return function(e){return i.map(function(t){return[e,t]})}}function vn(e,t,n){var i=na.range(e,t-ja,n).concat(t);return function(e){return i.map(function(t){return[t,e]})}}function yn(e){return e.source}function bn(e){return e.target}function wn(e,t,n,i){var r=Math.cos(t),o=Math.sin(t),a=Math.cos(i),s=Math.sin(i),l=r*Math.cos(e),u=r*Math.sin(e),c=a*Math.cos(n),d=a*Math.sin(n),p=2*Math.asin(Math.sqrt(re(i-t)+r*a*re(n-e))),h=1/Math.sin(p),f=p?function(e){var t=Math.sin(e*=p)*h,n=Math.sin(p-e)*h,i=n*l+t*c,r=n*u+t*d,a=n*o+t*s;return[Math.atan2(r,i)*Ha,Math.atan2(a,Math.sqrt(i*i+r*r))*Ha]}:function(){return[e*Ha,t*Ha]};return f.distance=p,f}function xn(){function e(e,r){var o=Math.sin(r*=qa),a=Math.cos(r),s=ma((e*=qa)-t),l=Math.cos(s);Js+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=i*o-n*a*l)*s),n*o+i*a*l),t=e,n=o,i=a}var t,n,i;Xs.point=function(r,o){t=r*qa,n=Math.sin(o*=qa),i=Math.cos(o),Xs.point=e},Xs.lineEnd=function(){Xs.point=Xs.lineEnd=y}}function kn(e,t){function n(t,n){var i=Math.cos(t),r=Math.cos(n),o=e(i*r);return[o*r*Math.sin(t),o*Math.sin(n)]}return n.invert=function(e,n){var i=Math.sqrt(e*e+n*n),r=t(i),o=Math.sin(r),a=Math.cos(r);return[Math.atan2(e*o,i*a),Math.asin(i&&n*o/i)]},n}function Cn(e,t){function n(e,t){a>0?-Fa+ja>t&&(t=-Fa+ja):t>Fa-ja&&(t=Fa-ja);var n=a/Math.pow(r(t),o);return[n*Math.sin(o*e),a-n*Math.cos(o*e)]}var i=Math.cos(e),r=function(e){return Math.tan(Oa/4+e/2)},o=e===t?Math.sin(e):Math.log(i/Math.cos(t))/Math.log(r(t)/r(e)),a=i*Math.pow(r(e),o)/o;return o?(n.invert=function(e,t){var n=a-t,i=K(o)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/o,2*Math.atan(Math.pow(a/i,1/o))-Fa]},n):_n}function Sn(e,t){function n(e,t){var n=o-t;return[n*Math.sin(r*e),o-n*Math.cos(r*e)]}var i=Math.cos(e),r=e===t?Math.sin(e):(i-Math.cos(t))/(t-e),o=i/r+e;return ma(r)<ja?ln:(n.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/r,o-K(r)*Math.sqrt(e*e+n*n)]},n)}function _n(e,t){return[e,Math.log(Math.tan(Oa/4+t/2))]}function Tn(e){var t,n=on(e),i=n.scale,r=n.translate,o=n.clipExtent;return n.scale=function(){var e=i.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.translate=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.clipExtent=function(e){var a=o.apply(n,arguments);if(a===n){if(t=null==e){var s=Oa*i(),l=r();o([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else t&&(a=null);return a},n.clipExtent(null)}function $n(e,t){return[Math.log(Math.tan(Oa/4+t/2)),-e]}function En(e){return e[0]}function Dn(e){return e[1]}function Mn(e){for(var t=e.length,n=[0,1],i=2,r=2;t>r;r++){for(;i>1&&Q(e[n[i-2]],e[n[i-1]],e[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function In(e,t){return e[0]-t[0]||e[1]-t[1]}function Pn(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function An(e,t,n,i){var r=e[0],o=n[0],a=t[0]-r,s=i[0]-o,l=e[1],u=n[1],c=t[1]-l,d=i[1]-u,p=(s*(l-u)-d*(r-o))/(d*a-s*c);return[r+p*a,l+p*c]}function jn(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function Nn(){ni(this),this.edge=this.site=this.circle=null}function On(e){var t=sl.pop()||new Nn;return t.site=e,t}function Ln(e){Gn(e),rl.remove(e),sl.push(e),ni(e)}function Rn(e){var t=e.circle,n=t.x,i=t.cy,r={x:n,y:i},o=e.P,a=e.N,s=[e];Ln(e);for(var l=o;l.circle&&ma(n-l.circle.x)<ja&&ma(i-l.circle.cy)<ja;)o=l.P,s.unshift(l),Ln(l),l=o;s.unshift(l),Gn(l);for(var u=a;u.circle&&ma(n-u.circle.x)<ja&&ma(i-u.circle.cy)<ja;)a=u.N,s.push(u),Ln(u),u=a;s.push(u),Gn(u);var c,d=s.length;for(c=1;d>c;++c)u=s[c],l=s[c-1],Zn(u.edge,l.site,u.site,r);l=s[0],u=s[d-1],u.edge=Kn(l.site,u.site,null,r),Wn(l),Wn(u)}function Fn(e){for(var t,n,i,r,o=e.x,a=e.y,s=rl._;s;)if(i=qn(s,a)-o,i>ja)s=s.L;else{if(r=o-Hn(s,a),!(r>ja)){i>-ja?(t=s.P,n=s):r>-ja?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=On(e);if(rl.insert(t,l),t||n){if(t===n)return Gn(t),n=On(t.site),rl.insert(l,n),l.edge=n.edge=Kn(t.site,l.site),Wn(t),void Wn(n);if(!n)return void(l.edge=Kn(t.site,l.site));Gn(t),Gn(n);var u=t.site,c=u.x,d=u.y,p=e.x-c,h=e.y-d,f=n.site,g=f.x-c,m=f.y-d,v=2*(p*m-h*g),y=p*p+h*h,b=g*g+m*m,w={x:(m*y-h*b)/v+c,y:(p*b-g*y)/v+d};Zn(n.edge,u,f,w),l.edge=Kn(u,e,null,w),n.edge=Kn(e,f,null,w),Wn(t),Wn(n)}}function qn(e,t){var n=e.site,i=n.x,r=n.y,o=r-t;if(!o)return i;var a=e.P;if(!a)return-(1/0);n=a.site;var s=n.x,l=n.y,u=l-t;if(!u)return s;var c=s-i,d=1/o-1/u,p=c/u;return d?(-p+Math.sqrt(p*p-2*d*(c*c/(-2*u)-l+u/2+r-o/2)))/d+i:(i+s)/2}function Hn(e,t){var n=e.N;if(n)return qn(n,t);var i=e.site;return i.y===t?i.x:1/0}function Un(e){this.site=e,this.edges=[]}function Bn(e){for(var t,n,i,r,o,a,s,l,u,c,d=e[0][0],p=e[1][0],h=e[0][1],f=e[1][1],g=il,m=g.length;m--;)if(o=g[m],o&&o.prepare())for(s=o.edges,l=s.length,a=0;l>a;)c=s[a].end(),i=c.x,r=c.y,u=s[++a%l].start(),t=u.x,n=u.y,(ma(i-t)>ja||ma(r-n)>ja)&&(s.splice(a,0,new ei(Qn(o.site,c,ma(i-d)<ja&&f-r>ja?{x:d,y:ma(t-d)<ja?n:f}:ma(r-f)<ja&&p-i>ja?{x:ma(n-f)<ja?t:p,y:f}:ma(i-p)<ja&&r-h>ja?{x:p,y:ma(t-p)<ja?n:h}:ma(r-h)<ja&&i-d>ja?{x:ma(n-h)<ja?t:d,y:h}:null),o.site,null)),++l)}function zn(e,t){return t.angle-e.angle}function Vn(){ni(this),this.x=this.y=this.arc=this.site=this.cy=null}function Wn(e){var t=e.P,n=e.N;if(t&&n){var i=t.site,r=e.site,o=n.site;if(i!==o){var a=r.x,s=r.y,l=i.x-a,u=i.y-s,c=o.x-a,d=o.y-s,p=2*(l*d-u*c);if(!(p>=-Na)){var h=l*l+u*u,f=c*c+d*d,g=(d*h-u*f)/p,m=(l*f-c*h)/p,d=m+s,v=ll.pop()||new Vn;v.arc=e,v.site=r,v.x=g+a,v.y=d+Math.sqrt(g*g+m*m),v.cy=d,e.circle=v;for(var y=null,b=al._;b;)if(v.y<b.y||v.y===b.y&&v.x<=b.x){if(!b.L){y=b.P;break}b=b.L}else{if(!b.R){y=b;break}b=b.R}al.insert(y,v),y||(ol=v)}}}}function Gn(e){var t=e.circle;t&&(t.P||(ol=t.N),al.remove(t),ll.push(t),ni(t),e.circle=null)}function Jn(e){for(var t,n=nl,i=Ht(e[0][0],e[0][1],e[1][0],e[1][1]),r=n.length;r--;)t=n[r],(!Xn(t,e)||!i(t)||ma(t.a.x-t.b.x)<ja&&ma(t.a.y-t.b.y)<ja)&&(t.a=t.b=null,n.splice(r,1))}function Xn(e,t){var n=e.b;if(n)return!0;var i,r,o=e.a,a=t[0][0],s=t[1][0],l=t[0][1],u=t[1][1],c=e.l,d=e.r,p=c.x,h=c.y,f=d.x,g=d.y,m=(p+f)/2,v=(h+g)/2;if(g===h){if(a>m||m>=s)return;if(p>f){if(o){if(o.y>=u)return}else o={x:m,y:l};n={x:m,y:u}}else{if(o){if(o.y<l)return}else o={x:m,y:u};n={x:m,y:l}}}else if(i=(p-f)/(g-h),r=v-i*m,-1>i||i>1)if(p>f){if(o){if(o.y>=u)return}else o={x:(l-r)/i,y:l};n={x:(u-r)/i,y:u}}else{if(o){if(o.y<l)return}else o={x:(u-r)/i,y:u};n={x:(l-r)/i,y:l}}else if(g>h){if(o){if(o.x>=s)return}else o={x:a,y:i*a+r};n={x:s,y:i*s+r}}else{if(o){if(o.x<a)return}else o={x:s,y:i*s+r};n={x:a,y:i*a+r}}return e.a=o,e.b=n,!0}function Yn(e,t){this.l=e,this.r=t,this.a=this.b=null}function Kn(e,t,n,i){var r=new Yn(e,t);return nl.push(r),n&&Zn(r,e,t,n),i&&Zn(r,t,e,i),il[e.i].edges.push(new ei(r,e,t)),il[t.i].edges.push(new ei(r,t,e)),r}function Qn(e,t,n){var i=new Yn(e,null);return i.a=t,i.b=n,nl.push(i),i}function Zn(e,t,n,i){e.a||e.b?e.l===n?e.b=i:e.a=i:(e.a=i,e.l=t,e.r=n)}function ei(e,t,n){var i=e.a,r=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(r.x-i.x,i.y-r.y):Math.atan2(i.x-r.x,r.y-i.y)}function ti(){this._=null}function ni(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function ii(e,t){var n=t,i=t.R,r=n.U;r?r.L===n?r.L=i:r.R=i:e._=i,i.U=r,n.U=i,n.R=i.L,n.R&&(n.R.U=n),i.L=n}function ri(e,t){var n=t,i=t.L,r=n.U;r?r.L===n?r.L=i:r.R=i:e._=i,i.U=r,n.U=i,n.L=i.R,n.L&&(n.L.U=n),i.R=n}function oi(e){for(;e.L;)e=e.L;return e}function ai(e,t){var n,i,r,o=e.sort(si).pop();for(nl=[],il=new Array(e.length),rl=new ti,al=new ti;;)if(r=ol,o&&(!r||o.y<r.y||o.y===r.y&&o.x<r.x))(o.x!==n||o.y!==i)&&(il[o.i]=new Un(o),Fn(o),n=o.x,i=o.y),o=e.pop();else{if(!r)break;Rn(r.arc)}t&&(Jn(t),Bn(t));var a={cells:il,edges:nl};return rl=al=nl=il=null,a}function si(e,t){return t.y-e.y||t.x-e.x}function li(e,t,n){return(e.x-n.x)*(t.y-e.y)-(e.x-t.x)*(n.y-e.y)}function ui(e){return e.x}function ci(e){return e.y}function di(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function pi(e,t,n,i,r,o){if(!e(t,n,i,r,o)){var a=.5*(n+r),s=.5*(i+o),l=t.nodes;l[0]&&pi(e,l[0],n,i,a,s),l[1]&&pi(e,l[1],a,i,r,s),l[2]&&pi(e,l[2],n,s,a,o),l[3]&&pi(e,l[3],a,s,r,o)}}function hi(e,t,n,i,r,o,a){var s,l=1/0;return function u(e,c,d,p,h){if(!(c>o||d>a||i>p||r>h)){if(f=e.point){var f,g=t-f[0],m=n-f[1],v=g*g+m*m;if(l>v){var y=Math.sqrt(l=v);i=t-y,r=n-y,o=t+y,a=n+y,s=f}}for(var b=e.nodes,w=.5*(c+p),x=.5*(d+h),k=t>=w,C=n>=x,S=C<<1|k,_=S+4;_>S;++S)if(e=b[3&S])switch(3&S){case 0:u(e,c,d,w,x);break;case 1:u(e,w,d,p,x);break;case 2:u(e,c,x,w,h);break;case 3:u(e,w,x,p,h)}}}(e,i,r,o,a),s}function fi(e,t){e=na.rgb(e),t=na.rgb(t);var n=e.r,i=e.g,r=e.b,o=t.r-n,a=t.g-i,s=t.b-r;return function(e){return"#"+be(Math.round(n+o*e))+be(Math.round(i+a*e))+be(Math.round(r+s*e))}}function gi(e,t){var n,i={},r={};for(n in e)n in t?i[n]=yi(e[n],t[n]):r[n]=e[n];for(n in t)n in e||(r[n]=t[n]);return function(e){for(n in i)r[n]=i[n](e);return r}}function mi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function vi(e,t){var n,i,r,o=cl.lastIndex=dl.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=cl.exec(e))&&(i=dl.exec(t));)(r=i.index)>o&&(r=t.slice(o,r),s[a]?s[a]+=r:s[++a]=r),
|
|
3251
|
|
-(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:mi(n,i)})),o=dl.lastIndex;return o<t.length&&(r=t.slice(o),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?(t=l[0].x,function(e){return t(e)+""}):function(){return t}:(t=l.length,function(e){for(var n,i=0;t>i;++i)s[(n=l[i]).i]=n.x(e);return s.join("")})}function yi(e,t){for(var n,i=na.interpolators.length;--i>=0&&!(n=na.interpolators[i](e,t)););return n}function bi(e,t){var n,i=[],r=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;s>n;++n)i.push(yi(e[n],t[n]));for(;o>n;++n)r[n]=e[n];for(;a>n;++n)r[n]=t[n];return function(e){for(n=0;s>n;++n)r[n]=i[n](e);return r}}function wi(e){return function(t){return 0>=t?0:t>=1?1:e(t)}}function xi(e){return function(t){return 1-e(1-t)}}function ki(e){return function(t){return.5*(.5>t?e(2*t):2-e(2-2*t))}}function Ci(e){return e*e}function Si(e){return e*e*e}function _i(e){if(0>=e)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(.5>e?n:3*(e-t)+n-.75)}function Ti(e){return function(t){return Math.pow(t,e)}}function $i(e){return 1-Math.cos(e*Fa)}function Ei(e){return Math.pow(2,10*(e-1))}function Di(e){return 1-Math.sqrt(1-e*e)}function Mi(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/La*Math.asin(1/e):(e=1,n=t/4),function(i){return 1+e*Math.pow(2,-10*i)*Math.sin((i-n)*La/t)}}function Ii(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function Pi(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Ai(e,t){e=na.hcl(e),t=na.hcl(t);var n=e.h,i=e.c,r=e.l,o=t.h-n,a=t.c-i,s=t.l-r;return isNaN(a)&&(a=0,i=isNaN(i)?t.c:i),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:-180>o&&(o+=360),function(e){return ue(n+o*e,i+a*e,r+s*e)+""}}function ji(e,t){e=na.hsl(e),t=na.hsl(t);var n=e.h,i=e.s,r=e.l,o=t.h-n,a=t.s-i,s=t.l-r;return isNaN(a)&&(a=0,i=isNaN(i)?t.s:i),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:-180>o&&(o+=360),function(e){return se(n+o*e,i+a*e,r+s*e)+""}}function Ni(e,t){e=na.lab(e),t=na.lab(t);var n=e.l,i=e.a,r=e.b,o=t.l-n,a=t.a-i,s=t.b-r;return function(e){return de(n+o*e,i+a*e,r+s*e)+""}}function Oi(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Li(e){var t=[e.a,e.b],n=[e.c,e.d],i=Fi(t),r=Ri(t,n),o=Fi(qi(n,t,-r))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,i*=-1,r*=-1),this.rotate=(i?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*Ha,this.translate=[e.e,e.f],this.scale=[i,o],this.skew=o?Math.atan2(r,o)*Ha:0}function Ri(e,t){return e[0]*t[0]+e[1]*t[1]}function Fi(e){var t=Math.sqrt(Ri(e,e));return t&&(e[0]/=t,e[1]/=t),t}function qi(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function Hi(e,t){var n,i=[],r=[],o=na.transform(e),a=na.transform(t),s=o.translate,l=a.translate,u=o.rotate,c=a.rotate,d=o.skew,p=a.skew,h=o.scale,f=a.scale;return s[0]!=l[0]||s[1]!=l[1]?(i.push("translate(",null,",",null,")"),r.push({i:1,x:mi(s[0],l[0])},{i:3,x:mi(s[1],l[1])})):l[0]||l[1]?i.push("translate("+l+")"):i.push(""),u!=c?(u-c>180?c+=360:c-u>180&&(u+=360),r.push({i:i.push(i.pop()+"rotate(",null,")")-2,x:mi(u,c)})):c&&i.push(i.pop()+"rotate("+c+")"),d!=p?r.push({i:i.push(i.pop()+"skewX(",null,")")-2,x:mi(d,p)}):p&&i.push(i.pop()+"skewX("+p+")"),h[0]!=f[0]||h[1]!=f[1]?(n=i.push(i.pop()+"scale(",null,",",null,")"),r.push({i:n-4,x:mi(h[0],f[0])},{i:n-2,x:mi(h[1],f[1])})):(1!=f[0]||1!=f[1])&&i.push(i.pop()+"scale("+f+")"),n=r.length,function(e){for(var t,o=-1;++o<n;)i[(t=r[o]).i]=t.x(e);return i.join("")}}function Ui(e,t){return t=(t-=e=+e)||1/t,function(n){return(n-e)/t}}function Bi(e,t){return t=(t-=e=+e)||1/t,function(n){return Math.max(0,Math.min(1,(n-e)/t))}}function zi(e){for(var t=e.source,n=e.target,i=Wi(t,n),r=[t];t!==i;)t=t.parent,r.push(t);for(var o=r.length;n!==i;)r.splice(o,0,n),n=n.parent;return r}function Vi(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function Wi(e,t){if(e===t)return e;for(var n=Vi(e),i=Vi(t),r=n.pop(),o=i.pop(),a=null;r===o;)a=r,r=n.pop(),o=i.pop();return a}function Gi(e){e.fixed|=2}function Ji(e){e.fixed&=-7}function Xi(e){e.fixed|=4,e.px=e.x,e.py=e.y}function Yi(e){e.fixed&=-5}function Ki(e,t,n){var i=0,r=0;if(e.charge=0,!e.leaf)for(var o,a=e.nodes,s=a.length,l=-1;++l<s;)o=a[l],null!=o&&(Ki(o,t,n),e.charge+=o.charge,i+=o.charge*o.cx,r+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var u=t*n[e.point.index];e.charge+=e.pointCharge=u,i+=u*e.point.x,r+=u*e.point.y}e.cx=i/e.charge,e.cy=r/e.charge}function Qi(e,t){return na.rebind(e,t,"sort","children","value"),e.nodes=e,e.links=rr,e}function Zi(e,t){for(var n=[e];null!=(e=n.pop());)if(t(e),(r=e.children)&&(i=r.length))for(var i,r;--i>=0;)n.push(r[i])}function er(e,t){for(var n=[e],i=[];null!=(e=n.pop());)if(i.push(e),(o=e.children)&&(r=o.length))for(var r,o,a=-1;++a<r;)n.push(o[a]);for(;null!=(e=i.pop());)t(e)}function tr(e){return e.children}function nr(e){return e.value}function ir(e,t){return t.value-e.value}function rr(e){return na.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function or(e){return e.x}function ar(e){return e.y}function sr(e,t,n){e.y0=t,e.y=n}function lr(e){return na.range(e.length)}function ur(e){for(var t=-1,n=e[0].length,i=[];++t<n;)i[t]=0;return i}function cr(e){for(var t,n=1,i=0,r=e[0][1],o=e.length;o>n;++n)(t=e[n][1])>r&&(i=n,r=t);return i}function dr(e){return e.reduce(pr,0)}function pr(e,t){return e+t[1]}function hr(e,t){return fr(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function fr(e,t){for(var n=-1,i=+e[0],r=(e[1]-i)/t,o=[];++n<=t;)o[n]=r*n+i;return o}function gr(e){return[na.min(e),na.max(e)]}function mr(e,t){return e.value-t.value}function vr(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function yr(e,t){e._pack_next=t,t._pack_prev=e}function br(e,t){var n=t.x-e.x,i=t.y-e.y,r=e.r+t.r;return.999*r*r>n*n+i*i}function wr(e){function t(e){c=Math.min(e.x-e.r,c),d=Math.max(e.x+e.r,d),p=Math.min(e.y-e.r,p),h=Math.max(e.y+e.r,h)}if((n=e.children)&&(u=n.length)){var n,i,r,o,a,s,l,u,c=1/0,d=-(1/0),p=1/0,h=-(1/0);if(n.forEach(xr),i=n[0],i.x=-i.r,i.y=0,t(i),u>1&&(r=n[1],r.x=r.r,r.y=0,t(r),u>2))for(o=n[2],Sr(i,r,o),t(o),vr(i,o),i._pack_prev=o,vr(o,r),r=i._pack_next,a=3;u>a;a++){Sr(i,r,o=n[a]);var f=0,g=1,m=1;for(s=r._pack_next;s!==r;s=s._pack_next,g++)if(br(s,o)){f=1;break}if(1==f)for(l=i._pack_prev;l!==s._pack_prev&&!br(l,o);l=l._pack_prev,m++);f?(m>g||g==m&&r.r<i.r?yr(i,r=s):yr(i=l,r),a--):(vr(i,o),r=o,t(o))}var v=(c+d)/2,y=(p+h)/2,b=0;for(a=0;u>a;a++)o=n[a],o.x-=v,o.y-=y,b=Math.max(b,o.r+Math.sqrt(o.x*o.x+o.y*o.y));e.r=b,n.forEach(kr)}}function xr(e){e._pack_next=e._pack_prev=e}function kr(e){delete e._pack_next,delete e._pack_prev}function Cr(e,t,n,i){var r=e.children;if(e.x=t+=i*e.x,e.y=n+=i*e.y,e.r*=i,r)for(var o=-1,a=r.length;++o<a;)Cr(r[o],t,n,i)}function Sr(e,t,n){var i=e.r+n.r,r=t.x-e.x,o=t.y-e.y;if(i&&(r||o)){var a=t.r+n.r,s=r*r+o*o;a*=a,i*=i;var l=.5+(i-a)/(2*s),u=Math.sqrt(Math.max(0,2*a*(i+s)-(i-=s)*i-a*a))/(2*s);n.x=e.x+l*r+u*o,n.y=e.y+l*o-u*r}else n.x=e.x+i,n.y=e.y}function _r(e,t){return e.parent==t.parent?1:2}function Tr(e){var t=e.children;return t.length?t[0]:e.t}function $r(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function Er(e,t,n){var i=n/(t.i-e.i);t.c-=i,t.s+=n,e.c+=i,t.z+=n,t.m+=n}function Dr(e){for(var t,n=0,i=0,r=e.children,o=r.length;--o>=0;)t=r[o],t.z+=n,t.m+=n,n+=t.s+(i+=t.c)}function Mr(e,t,n){return e.a.parent===t.parent?e.a:n}function Ir(e){return 1+na.max(e,function(e){return e.y})}function Pr(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Ar(e){var t=e.children;return t&&t.length?Ar(t[0]):e}function jr(e){var t,n=e.children;return n&&(t=n.length)?jr(n[t-1]):e}function Nr(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Or(e,t){var n=e.x+t[3],i=e.y+t[0],r=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];return 0>r&&(n+=r/2,r=0),0>o&&(i+=o/2,o=0),{x:n,y:i,dx:r,dy:o}}function Lr(e){var t=e[0],n=e[e.length-1];return n>t?[t,n]:[n,t]}function Rr(e){return e.rangeExtent?e.rangeExtent():Lr(e.range())}function Fr(e,t,n,i){var r=n(e[0],e[1]),o=i(t[0],t[1]);return function(e){return o(r(e))}}function qr(e,t){var n,i=0,r=e.length-1,o=e[i],a=e[r];return o>a&&(n=i,i=r,r=n,n=o,o=a,a=n),e[i]=t.floor(o),e[r]=t.ceil(a),e}function Hr(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:kl}function Ur(e,t,n,i){var r=[],o=[],a=0,s=Math.min(e.length,t.length)-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<=s;)r.push(n(e[a-1],e[a])),o.push(i(t[a-1],t[a]));return function(t){var n=na.bisect(e,t,1,s)-1;return o[n](r[n](t))}}function Br(e,t,n,i){function r(){var r=Math.min(e.length,t.length)>2?Ur:Fr,l=i?Bi:Ui;return a=r(e,t,l,n),s=r(t,e,l,yi),o}function o(e){return a(e)}var a,s;return o.invert=function(e){return s(e)},o.domain=function(t){return arguments.length?(e=t.map(Number),r()):e},o.range=function(e){return arguments.length?(t=e,r()):t},o.rangeRound=function(e){return o.range(e).interpolate(Oi)},o.clamp=function(e){return arguments.length?(i=e,r()):i},o.interpolate=function(e){return arguments.length?(n=e,r()):n},o.ticks=function(t){return Gr(e,t)},o.tickFormat=function(t,n){return Jr(e,t,n)},o.nice=function(t){return Vr(e,t),r()},o.copy=function(){return Br(e,t,n,i)},r()}function zr(e,t){return na.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Vr(e,t){return qr(e,Hr(Wr(e,t)[2]))}function Wr(e,t){null==t&&(t=10);var n=Lr(e),i=n[1]-n[0],r=Math.pow(10,Math.floor(Math.log(i/t)/Math.LN10)),o=t/i*r;return.15>=o?r*=10:.35>=o?r*=5:.75>=o&&(r*=2),n[0]=Math.ceil(n[0]/r)*r,n[1]=Math.floor(n[1]/r)*r+.5*r,n[2]=r,n}function Gr(e,t){return na.range.apply(na,Wr(e,t))}function Jr(e,t,n){var i=Wr(e,t);if(n){var r=cs.exec(n);if(r.shift(),"s"===r[8]){var o=na.formatPrefix(Math.max(ma(i[0]),ma(i[1])));return r[7]||(r[7]="."+Xr(o.scale(i[2]))),r[8]="f",n=na.format(r.join("")),function(e){return n(o.scale(e))+o.symbol}}r[7]||(r[7]="."+Yr(r[8],i)),n=r.join("")}else n=",."+Xr(i[2])+"f";return na.format(n)}function Xr(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function Yr(e,t){var n=Xr(t[2]);return e in Cl?Math.abs(n-Xr(Math.max(ma(t[0]),ma(t[1]))))+ +("e"!==e):n-2*("%"===e)}function Kr(e,t,n,i){function r(e){return(n?Math.log(0>e?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function a(t){return e(r(t))}return a.invert=function(t){return o(e.invert(t))},a.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((i=t.map(Number)).map(r)),a):i},a.base=function(n){return arguments.length?(t=+n,e.domain(i.map(r)),a):t},a.nice=function(){var t=qr(i.map(r),n?Math:_l);return e.domain(t),i=t.map(o),a},a.ticks=function(){var e=Lr(i),a=[],s=e[0],l=e[1],u=Math.floor(r(s)),c=Math.ceil(r(l)),d=t%1?2:t;if(isFinite(c-u)){if(n){for(;c>u;u++)for(var p=1;d>p;p++)a.push(o(u)*p);a.push(o(u))}else for(a.push(o(u));u++<c;)for(var p=d-1;p>0;p--)a.push(o(u)*p);for(u=0;a[u]<s;u++);for(c=a.length;a[c-1]>l;c--);a=a.slice(u,c)}return a},a.tickFormat=function(e,t){if(!arguments.length)return Sl;arguments.length<2?t=Sl:"function"!=typeof t&&(t=na.format(t));var i,s=Math.max(.1,e/a.ticks().length),l=n?(i=1e-12,Math.ceil):(i=-1e-12,Math.floor);return function(e){return e/o(l(r(e)+i))<=s?t(e):""}},a.copy=function(){return Kr(e.copy(),t,n,i)},zr(a,e)}function Qr(e,t,n){function i(t){return e(r(t))}var r=Zr(t),o=Zr(1/t);return i.invert=function(t){return o(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(r)),i):n},i.ticks=function(e){return Gr(n,e)},i.tickFormat=function(e,t){return Jr(n,e,t)},i.nice=function(e){return i.domain(Vr(n,e))},i.exponent=function(a){return arguments.length?(r=Zr(t=a),o=Zr(1/t),e.domain(n.map(r)),i):t},i.copy=function(){return Qr(e.copy(),t,n)},zr(i,e)}function Zr(e){return function(t){return 0>t?-Math.pow(-t,e):Math.pow(t,e)}}function eo(e,t){function n(n){return o[((r.get(n)||("range"===t.t?r.set(n,e.push(n)):NaN))-1)%o.length]}function i(t,n){return na.range(e.length).map(function(e){return t+n*e})}var r,o,a;return n.domain=function(i){if(!arguments.length)return e;e=[],r=new s;for(var o,a=-1,l=i.length;++a<l;)r.has(o=i[a])||r.set(o,e.push(o));return n[t.t].apply(n,t.a)},n.range=function(e){return arguments.length?(o=e,a=0,t={t:"range",a:arguments},n):o},n.rangePoints=function(r,s){arguments.length<2&&(s=0);var l=r[0],u=r[1],c=e.length<2?(l=(l+u)/2,0):(u-l)/(e.length-1+s);return o=i(l+c*s/2,c),a=0,t={t:"rangePoints",a:arguments},n},n.rangeRoundPoints=function(r,s){arguments.length<2&&(s=0);var l=r[0],u=r[1],c=e.length<2?(l=u=Math.round((l+u)/2),0):(u-l)/(e.length-1+s)|0;return o=i(l+Math.round(c*s/2+(u-l-(e.length-1+s)*c)/2),c),a=0,t={t:"rangeRoundPoints",a:arguments},n},n.rangeBands=function(r,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var u=r[1]<r[0],c=r[u-0],d=r[1-u],p=(d-c)/(e.length-s+2*l);return o=i(c+p*l,p),u&&o.reverse(),a=p*(1-s),t={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(r,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var u=r[1]<r[0],c=r[u-0],d=r[1-u],p=Math.floor((d-c)/(e.length-s+2*l));return o=i(c+Math.round((d-c-(e.length-s)*p)/2),p),u&&o.reverse(),a=Math.round(p*(1-s)),t={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return a},n.rangeExtent=function(){return Lr(t.a[0])},n.copy=function(){return eo(e,t)},n.domain(e)}function to(i,r){function o(){var e=0,t=r.length;for(s=[];++e<t;)s[e-1]=na.quantile(i,e/t);return a}function a(e){return isNaN(e=+e)?void 0:r[na.bisect(s,e)]}var s;return a.domain=function(r){return arguments.length?(i=r.map(t).filter(n).sort(e),o()):i},a.range=function(e){return arguments.length?(r=e,o()):r},a.quantiles=function(){return s},a.invertExtent=function(e){return e=r.indexOf(e),0>e?[NaN,NaN]:[e>0?s[e-1]:i[0],e<s.length?s[e]:i[i.length-1]]},a.copy=function(){return to(i,r)},o()}function no(e,t,n){function i(t){return n[Math.max(0,Math.min(a,Math.floor(o*(t-e))))]}function r(){return o=n.length/(t-e),a=n.length-1,i}var o,a;return i.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],r()):[e,t]},i.range=function(e){return arguments.length?(n=e,r()):n},i.invertExtent=function(t){return t=n.indexOf(t),t=0>t?NaN:t/o+e,[t,t+1/o]},i.copy=function(){return no(e,t,n)},r()}function io(e,t){function n(n){return n>=n?t[na.bisect(e,n)]:void 0}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.invertExtent=function(n){return n=t.indexOf(n),[e[n-1],e[n]]},n.copy=function(){return io(e,t)},n}function ro(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return Gr(e,t)},t.tickFormat=function(t,n){return Jr(e,t,n)},t.copy=function(){return ro(e)},t}function oo(){return 0}function ao(e){return e.innerRadius}function so(e){return e.outerRadius}function lo(e){return e.startAngle}function uo(e){return e.endAngle}function co(e){return e&&e.padAngle}function po(e,t,n,i){return(e-n)*t-(t-i)*e>0?0:1}function ho(e,t,n,i,r){var o=e[0]-t[0],a=e[1]-t[1],s=(r?i:-i)/Math.sqrt(o*o+a*a),l=s*a,u=-s*o,c=e[0]+l,d=e[1]+u,p=t[0]+l,h=t[1]+u,f=(c+p)/2,g=(d+h)/2,m=p-c,v=h-d,y=m*m+v*v,b=n-i,w=c*h-p*d,x=(0>v?-1:1)*Math.sqrt(b*b*y-w*w),k=(w*v-m*x)/y,C=(-w*m-v*x)/y,S=(w*v+m*x)/y,_=(-w*m+v*x)/y,T=k-f,$=C-g,E=S-f,D=_-g;return T*T+$*$>E*E+D*D&&(k=S,C=_),[[k-l,C-u],[k*n/b,C*n/b]]}function fo(e){function t(t){function a(){u.push("M",o(e(c),s))}for(var l,u=[],c=[],d=-1,p=t.length,h=_e(n),f=_e(i);++d<p;)r.call(this,l=t[d],d)?c.push([+h.call(this,l,d),+f.call(this,l,d)]):c.length&&(a(),c=[]);return c.length&&a(),u.length?u.join(""):null}var n=En,i=Dn,r=Et,o=go,a=o.key,s=.7;return t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(i=e,t):i},t.defined=function(e){return arguments.length?(r=e,t):r},t.interpolate=function(e){return arguments.length?(a="function"==typeof e?o=e:(o=Il.get(e)||go).key,t):a},t.tension=function(e){return arguments.length?(s=e,t):s},t}function go(e){return e.join("L")}function mo(e){return go(e)+"Z"}function vo(e){for(var t=0,n=e.length,i=e[0],r=[i[0],",",i[1]];++t<n;)r.push("H",(i[0]+(i=e[t])[0])/2,"V",i[1]);return n>1&&r.push("H",i[0]),r.join("")}function yo(e){for(var t=0,n=e.length,i=e[0],r=[i[0],",",i[1]];++t<n;)r.push("V",(i=e[t])[1],"H",i[0]);return r.join("")}function bo(e){for(var t=0,n=e.length,i=e[0],r=[i[0],",",i[1]];++t<n;)r.push("H",(i=e[t])[0],"V",i[1]);return r.join("")}function wo(e,t){return e.length<4?go(e):e[1]+Co(e.slice(1,-1),So(e,t))}function xo(e,t){return e.length<3?go(e):e[0]+Co((e.push(e[0]),e),So([e[e.length-2]].concat(e,[e[1]]),t))}function ko(e,t){return e.length<3?go(e):e[0]+Co(e,So(e,t))}function Co(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return go(e);var n=e.length!=t.length,i="",r=e[0],o=e[1],a=t[0],s=a,l=1;if(n&&(i+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],r=e[1],l=2),t.length>1){s=t[1],o=e[l],l++,i+="C"+(r[0]+a[0])+","+(r[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var u=2;u<t.length;u++,l++)o=e[l],s=t[u],i+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=e[l];i+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return i}function So(e,t){for(var n,i=[],r=(1-t)/2,o=e[0],a=e[1],s=1,l=e.length;++s<l;)n=o,o=a,a=e[s],i.push([r*(a[0]-n[0]),r*(a[1]-n[1])]);return i}function _o(e){if(e.length<3)return go(e);var t=1,n=e.length,i=e[0],r=i[0],o=i[1],a=[r,r,r,(i=e[1])[0]],s=[o,o,o,i[1]],l=[r,",",o,"L",Do(jl,a),",",Do(jl,s)];for(e.push(e[n-1]);++t<=n;)i=e[t],a.shift(),a.push(i[0]),s.shift(),s.push(i[1]),Mo(l,a,s);return e.pop(),l.push("L",i),l.join("")}function To(e){if(e.length<4)return go(e);for(var t,n=[],i=-1,r=e.length,o=[0],a=[0];++i<3;)t=e[i],o.push(t[0]),a.push(t[1]);for(n.push(Do(jl,o)+","+Do(jl,a)),--i;++i<r;)t=e[i],o.shift(),o.push(t[0]),a.shift(),a.push(t[1]),Mo(n,o,a);return n.join("")}function $o(e){for(var t,n,i=-1,r=e.length,o=r+4,a=[],s=[];++i<4;)n=e[i%r],a.push(n[0]),s.push(n[1]);for(t=[Do(jl,a),",",Do(jl,s)],--i;++i<o;)n=e[i%r],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),Mo(t,a,s);return t.join("")}function Eo(e,t){var n=e.length-1;if(n)for(var i,r,o=e[0][0],a=e[0][1],s=e[n][0]-o,l=e[n][1]-a,u=-1;++u<=n;)i=e[u],r=u/n,i[0]=t*i[0]+(1-t)*(o+r*s),i[1]=t*i[1]+(1-t)*(a+r*l);return _o(e)}function Do(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Mo(e,t,n){e.push("C",Do(Pl,t),",",Do(Pl,n),",",Do(Al,t),",",Do(Al,n),",",Do(jl,t),",",Do(jl,n))}function Io(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Po(e){for(var t=0,n=e.length-1,i=[],r=e[0],o=e[1],a=i[0]=Io(r,o);++t<n;)i[t]=(a+(a=Io(r=o,o=e[t+1])))/2;return i[t]=a,i}function Ao(e){for(var t,n,i,r,o=[],a=Po(e),s=-1,l=e.length-1;++s<l;)t=Io(e[s],e[s+1]),ma(t)<ja?a[s]=a[s+1]=0:(n=a[s]/t,i=a[s+1]/t,r=n*n+i*i,r>9&&(r=3*t/Math.sqrt(r),a[s]=r*n,a[s+1]=r*i));for(s=-1;++s<=l;)r=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([r||0,a[s]*r||0]);return o}function jo(e){return e.length<3?go(e):e[0]+Co(e,Ao(e))}function No(e){for(var t,n,i,r=-1,o=e.length;++r<o;)t=e[r],n=t[0],i=t[1]-Fa,t[0]=n*Math.cos(i),t[1]=n*Math.sin(i);return e}function Oo(e){function t(t){function l(){g.push("M",s(e(v),d),c,u(e(m.reverse()),d),"Z")}for(var p,h,f,g=[],m=[],v=[],y=-1,b=t.length,w=_e(n),x=_e(r),k=n===i?function(){return h}:_e(i),C=r===o?function(){return f}:_e(o);++y<b;)a.call(this,p=t[y],y)?(m.push([h=+w.call(this,p,y),f=+x.call(this,p,y)]),v.push([+k.call(this,p,y),+C.call(this,p,y)])):m.length&&(l(),m=[],v=[]);return m.length&&l(),g.length?g.join(""):null}var n=En,i=En,r=0,o=Dn,a=Et,s=go,l=s.key,u=s,c="L",d=.7;return t.x=function(e){return arguments.length?(n=i=e,t):i},t.x0=function(e){return arguments.length?(n=e,t):n},t.x1=function(e){return arguments.length?(i=e,t):i},t.y=function(e){return arguments.length?(r=o=e,t):o},t.y0=function(e){return arguments.length?(r=e,t):r},t.y1=function(e){return arguments.length?(o=e,t):o},t.defined=function(e){return arguments.length?(a=e,t):a},t.interpolate=function(e){return arguments.length?(l="function"==typeof e?s=e:(s=Il.get(e)||go).key,u=s.reverse||s,c=s.closed?"M":"L",t):l},t.tension=function(e){return arguments.length?(d=e,t):d},t}function Lo(e){return e.radius}function Ro(e){return[e.x,e.y]}function Fo(e){return function(){var t=e.apply(this,arguments),n=t[0],i=t[1]-Fa;return[n*Math.cos(i),n*Math.sin(i)]}}function qo(){return 64}function Ho(){return"circle"}function Uo(e){var t=Math.sqrt(e/Oa);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bo(e){return function(){var t,n;(t=this[e])&&(n=t[t.active])&&(--t.count?delete t[t.active]:delete this[e],t.active+=.5,n.event&&n.event.interrupt.call(this,this.__data__,n.index))}}function zo(e,t,n){return xa(e,Hl),e.namespace=t,e.id=n,e}function Vo(e,t,n,i){var r=e.id,o=e.namespace;return q(e,"function"==typeof n?function(e,a,s){e[o][r].tween.set(t,i(n.call(e,e.__data__,a,s)))}:(n=i(n),function(e){e[o][r].tween.set(t,n)}))}function Wo(e){return null==e&&(e=""),function(){this.textContent=e}}function Go(e){return null==e?"__transition__":"__transition_"+e+"__"}function Jo(e,t,n,i,r){var o=e[n]||(e[n]={active:0,count:0}),a=o[i];if(!a){var l=r.time;a=o[i]={tween:new s,time:l,delay:r.delay,duration:r.duration,ease:r.ease,index:t},r=null,++o.count,na.timer(function(r){function s(n){if(o.active>i)return c();var r=o[o.active];r&&(--o.count,delete o[o.active],r.event&&r.event.interrupt.call(e,e.__data__,r.index)),o.active=i,a.event&&a.event.start.call(e,e.__data__,t),a.tween.forEach(function(n,i){(i=i.call(e,e.__data__,t))&&g.push(i)}),p=a.ease,d=a.duration,na.timer(function(){return f.c=u(n||1)?Et:u,1},0,l)}function u(n){if(o.active!==i)return 1;for(var r=n/d,s=p(r),l=g.length;l>0;)g[--l].call(e,s);return r>=1?(a.event&&a.event.end.call(e,e.__data__,t),c()):void 0}function c(){return--o.count?delete o[i]:delete e[n],1}var d,p,h=a.delay,f=ss,g=[];return f.t=h+l,r>=h?s(r-h):void(f.c=s)},0,l)}}function Xo(e,t,n){e.attr("transform",function(e){var i=t(e);return"translate("+(isFinite(i)?i:n(e))+",0)"})}function Yo(e,t,n){e.attr("transform",function(e){var i=t(e);return"translate(0,"+(isFinite(i)?i:n(e))+")"})}function Ko(e){return e.toISOString()}function Qo(e,t,n){function i(t){return e(t)}function r(e,n){var i=e[1]-e[0],r=i/n,o=na.bisect(Yl,r);return o==Yl.length?[t.year,Wr(e.map(function(e){return e/31536e6}),n)[2]]:o?t[r/Yl[o-1]<Yl[o]/r?o-1:o]:[Zl,Wr(e,n)[2]]}return i.invert=function(t){return Zo(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain().map(Zo)},i.nice=function(e,t){function n(n){return!isNaN(n)&&!e.range(n,Zo(+n+1),t).length}var o=i.domain(),a=Lr(o),s=null==e?r(a,10):"number"==typeof e&&r(a,e);return s&&(e=s[0],t=s[1]),i.domain(qr(o,t>1?{floor:function(t){for(;n(t=e.floor(t));)t=Zo(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=Zo(+t+1);return t}}:e))},i.ticks=function(e,t){var n=Lr(i.domain()),o=null==e?r(n,10):"number"==typeof e?r(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],Zo(+n[1]+1),1>t?1:t)},i.tickFormat=function(){return n},i.copy=function(){return Qo(e.copy(),t,n)},zr(i,e)}function Zo(e){return new Date(e)}function ea(e){return JSON.parse(e.responseText)}function ta(e){var t=oa.createRange();return t.selectNode(oa.body),t.createContextualFragment(e.responseText)}var na={version:"3.5.3"};Date.now||(Date.now=function(){return+new Date});var ia=[].slice,ra=function(e){return ia.call(e)},oa=document,aa=oa.documentElement,sa=window;try{ra(aa.childNodes)[0].nodeType}catch(la){ra=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}try{oa.createElement("div").style.setProperty("opacity",0,"")}catch(ua){var ca=sa.Element.prototype,da=ca.setAttribute,pa=ca.setAttributeNS,ha=sa.CSSStyleDeclaration.prototype,fa=ha.setProperty;ca.setAttribute=function(e,t){da.call(this,e,t+"")},ca.setAttributeNS=function(e,t,n){pa.call(this,e,t,n+"")},ha.setProperty=function(e,t,n){fa.call(this,e,t+"",n)}}na.ascending=e,na.descending=function(e,t){return e>t?-1:t>e?1:t>=e?0:NaN},na.min=function(e,t){var n,i,r=-1,o=e.length;if(1===arguments.length){for(;++r<o;)if(null!=(i=e[r])&&i>=i){n=i;break}for(;++r<o;)null!=(i=e[r])&&n>i&&(n=i)}else{for(;++r<o;)if(null!=(i=t.call(e,e[r],r))&&i>=i){n=i;break}for(;++r<o;)null!=(i=t.call(e,e[r],r))&&n>i&&(n=i)}return n},na.max=function(e,t){var n,i,r=-1,o=e.length;if(1===arguments.length){for(;++r<o;)if(null!=(i=e[r])&&i>=i){n=i;break}for(;++r<o;)null!=(i=e[r])&&i>n&&(n=i)}else{for(;++r<o;)if(null!=(i=t.call(e,e[r],r))&&i>=i){n=i;break}for(;++r<o;)null!=(i=t.call(e,e[r],r))&&i>n&&(n=i)}return n},na.extent=function(e,t){var n,i,r,o=-1,a=e.length;if(1===arguments.length){for(;++o<a;)if(null!=(i=e[o])&&i>=i){n=r=i;break}for(;++o<a;)null!=(i=e[o])&&(n>i&&(n=i),i>r&&(r=i))}else{for(;++o<a;)if(null!=(i=t.call(e,e[o],o))&&i>=i){n=r=i;break}for(;++o<a;)null!=(i=t.call(e,e[o],o))&&(n>i&&(n=i),i>r&&(r=i))}return[n,r]},na.sum=function(e,t){var i,r=0,o=e.length,a=-1;if(1===arguments.length)for(;++a<o;)n(i=+e[a])&&(r+=i);else for(;++a<o;)n(i=+t.call(e,e[a],a))&&(r+=i);return r},na.mean=function(e,i){var r,o=0,a=e.length,s=-1,l=a;if(1===arguments.length)for(;++s<a;)n(r=t(e[s]))?o+=r:--l;else for(;++s<a;)n(r=t(i.call(e,e[s],s)))?o+=r:--l;return l?o/l:void 0},na.quantile=function(e,t){var n=(e.length-1)*t+1,i=Math.floor(n),r=+e[i-1],o=n-i;return o?r+o*(e[i]-r):r},na.median=function(i,r){var o,a=[],s=i.length,l=-1;if(1===arguments.length)for(;++l<s;)n(o=t(i[l]))&&a.push(o);else for(;++l<s;)n(o=t(r.call(i,i[l],l)))&&a.push(o);return a.length?na.quantile(a.sort(e),.5):void 0},na.variance=function(e,i){var r,o,a=e.length,s=0,l=0,u=-1,c=0;if(1===arguments.length)for(;++u<a;)n(r=t(e[u]))&&(o=r-s,s+=o/++c,l+=o*(r-s));else for(;++u<a;)n(r=t(i.call(e,e[u],u)))&&(o=r-s,s+=o/++c,l+=o*(r-s));return c>1?l/(c-1):void 0},na.deviation=function(){var e=na.variance.apply(this,arguments);return e?Math.sqrt(e):e};var ga=i(e);na.bisectLeft=ga.left,na.bisect=na.bisectRight=ga.right,na.bisector=function(t){return i(1===t.length?function(n,i){return e(t(n),i)}:t)},na.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,2>o&&(t=0));for(var i,r,o=n-t;o;)r=Math.random()*o--|0,i=e[o+t],e[o+t]=e[r+t],e[r+t]=i;return e},na.permute=function(e,t){for(var n=t.length,i=new Array(n);n--;)i[n]=e[t[n]];return i},na.pairs=function(e){for(var t,n=0,i=e.length-1,r=e[0],o=new Array(0>i?0:i);i>n;)o[n]=[t=r,r=e[++n]];return o},na.zip=function(){if(!(i=arguments.length))return[];for(var e=-1,t=na.min(arguments,r),n=new Array(t);++e<t;)for(var i,o=-1,a=n[e]=new Array(i);++o<i;)a[o]=arguments[o][e];return n},na.transpose=function(e){return na.zip.apply(na,e)},na.keys=function(e){var t=[];for(var n in e)t.push(n);return t},na.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},na.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},na.merge=function(e){for(var t,n,i,r=e.length,o=-1,a=0;++o<r;)a+=e[o].length;for(n=new Array(a);--r>=0;)for(i=e[r],t=i.length;--t>=0;)n[--a]=i[t];return n};var ma=Math.abs;na.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n===1/0)throw new Error("infinite range");var i,r=[],a=o(ma(n)),s=-1;if(e*=a,t*=a,n*=a,0>n)for(;(i=e+n*++s)>t;)r.push(i/a);else for(;(i=e+n*++s)<t;)r.push(i/a);return r},na.map=function(e,t){var n=new s;if(e instanceof s)e.forEach(function(e,t){n.set(e,t)});else if(Array.isArray(e)){var i,r=-1,o=e.length;if(1===arguments.length)for(;++r<o;)n.set(r,e[r]);else for(;++r<o;)n.set(t.call(e,i=e[r],r),i)}else for(var a in e)n.set(a,e[a]);return n};var va="__proto__",ya="\x00";a(s,{has:c,get:function(e){return this._[l(e)]},set:function(e,t){return this._[l(e)]=t},remove:d,keys:p,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:u(t),value:this._[t]});return e},size:h,empty:f,forEach:function(e){for(var t in this._)e.call(this,u(t),this._[t])}}),na.nest=function(){function e(t,a,l){if(l>=o.length)return i?i.call(r,a):n?a.sort(n):a;for(var u,c,d,p,h=-1,f=a.length,g=o[l++],m=new s;++h<f;)(p=m.get(u=g(c=a[h])))?p.push(c):m.set(u,[c]);return t?(c=t(),d=function(n,i){c.set(n,e(t,i,l))}):(c={},d=function(n,i){c[n]=e(t,i,l)}),m.forEach(d),c}function t(e,n){if(n>=o.length)return e;var i=[],r=a[n++];return e.forEach(function(e,r){i.push({key:e,values:t(r,n)})}),r?i.sort(function(e,t){return r(e.key,t.key)}):i}var n,i,r={},o=[],a=[];return r.map=function(t,n){return e(n,t,0)},r.entries=function(n){return t(e(na.map,n,0),0)},r.key=function(e){return o.push(e),r},r.sortKeys=function(e){return a[o.length-1]=e,r},r.sortValues=function(e){return n=e,r},r.rollup=function(e){return i=e,r},r},na.set=function(e){var t=new g;if(e)for(var n=0,i=e.length;i>n;++n)t.add(e[n]);return t},a(g,{has:c,add:function(e){return this._[l(e+="")]=!0,e},remove:d,values:p,size:h,empty:f,forEach:function(e){for(var t in this._)e.call(this,u(t))}}),na.behavior={},na.rebind=function(e,t){for(var n,i=1,r=arguments.length;++i<r;)e[n=arguments[i]]=m(e,t,t[n]);return e};var ba=["webkit","ms","moz","Moz","o","O"];na.dispatch=function(){for(var e=new b,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=w(e);return e},b.prototype.on=function(e,t){var n=e.indexOf("."),i="";if(n>=0&&(i=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(i):this[e].on(i,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(i,null);return this}},na.event=null,na.requote=function(e){return e.replace(wa,"\\$&")};var wa=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,xa={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},ka=function(e,t){return t.querySelector(e)},Ca=function(e,t){return t.querySelectorAll(e)},Sa=aa.matches||aa[v(aa,"matchesSelector")],_a=function(e,t){return Sa.call(e,t)};"function"==typeof Sizzle&&(ka=function(e,t){return Sizzle(e,t)[0]||null},Ca=Sizzle,_a=Sizzle.matchesSelector),na.selection=function(){return Da};var Ta=na.selection.prototype=[];Ta.select=function(e){var t,n,i,r,o=[];e=_(e);for(var a=-1,s=this.length;++a<s;){o.push(t=[]),t.parentNode=(i=this[a]).parentNode;for(var l=-1,u=i.length;++l<u;)(r=i[l])?(t.push(n=e.call(r,r.__data__,l,a)),n&&"__data__"in r&&(n.__data__=r.__data__)):t.push(null)}return S(o)},Ta.selectAll=function(e){var t,n,i=[];e=T(e);for(var r=-1,o=this.length;++r<o;)for(var a=this[r],s=-1,l=a.length;++s<l;)(n=a[s])&&(i.push(t=ra(e.call(n,n.__data__,s,r))),t.parentNode=n);return S(i)};var $a={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};na.ns={prefix:$a,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&(n=e.slice(0,t),e=e.slice(t+1)),$a.hasOwnProperty(n)?{space:$a[n],local:e}:e}},Ta.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return e=na.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each($(t,e[t]));return this}return this.each($(e,t))},Ta.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),i=(e=M(e)).length,r=-1;if(t=n.classList){for(;++r<i;)if(!t.contains(e[r]))return!1}else for(t=n.getAttribute("class");++r<i;)if(!D(e[r]).test(t))return!1;return!0}for(t in e)this.each(I(t,e[t]));return this}return this.each(I(e,t))},Ta.style=function(e,t,n){var i=arguments.length;if(3>i){if("string"!=typeof e){2>i&&(t="");for(n in e)this.each(A(n,e[n],t));return this}if(2>i)return sa.getComputedStyle(this.node(),null).getPropertyValue(e);n=""}return this.each(A(e,t,n))},Ta.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(j(t,e[t]));return this}return this.each(j(e,t))},Ta.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);
|
|
3252
|
|
-this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},Ta.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},Ta.append=function(e){return e=N(e),this.select(function(){return this.appendChild(e.apply(this,arguments))})},Ta.insert=function(e,t){return e=N(e),t=_(t),this.select(function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)})},Ta.remove=function(){return this.each(O)},Ta.data=function(e,t){function n(e,n){var i,r,o,a=e.length,d=n.length,p=Math.min(a,d),h=new Array(d),f=new Array(d),g=new Array(a);if(t){var m,v=new s,y=new Array(a);for(i=-1;++i<a;)v.has(m=t.call(r=e[i],r.__data__,i))?g[i]=r:v.set(m,r),y[i]=m;for(i=-1;++i<d;)(r=v.get(m=t.call(n,o=n[i],i)))?r!==!0&&(h[i]=r,r.__data__=o):f[i]=L(o),v.set(m,!0);for(i=-1;++i<a;)v.get(y[i])!==!0&&(g[i]=e[i])}else{for(i=-1;++i<p;)r=e[i],o=n[i],r?(r.__data__=o,h[i]=r):f[i]=L(o);for(;d>i;++i)f[i]=L(n[i]);for(;a>i;++i)g[i]=e[i]}f.update=h,f.parentNode=h.parentNode=g.parentNode=e.parentNode,l.push(f),u.push(h),c.push(g)}var i,r,o=-1,a=this.length;if(!arguments.length){for(e=new Array(a=(i=this[0]).length);++o<a;)(r=i[o])&&(e[o]=r.__data__);return e}var l=H([]),u=S([]),c=S([]);if("function"==typeof e)for(;++o<a;)n(i=this[o],e.call(i,i.parentNode.__data__,o));else for(;++o<a;)n(i=this[o],e);return u.enter=function(){return l},u.exit=function(){return c},u},Ta.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},Ta.filter=function(e){var t,n,i,r=[];"function"!=typeof e&&(e=R(e));for(var o=0,a=this.length;a>o;o++){r.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=0,l=n.length;l>s;s++)(i=n[s])&&e.call(i,i.__data__,s,o)&&t.push(i)}return S(r)},Ta.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,i=this[e],r=i.length-1,o=i[r];--r>=0;)(n=i[r])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},Ta.sort=function(e){e=F.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},Ta.each=function(e){return q(this,function(t,n,i){e.call(t,t.__data__,n,i)})},Ta.call=function(e){var t=ra(arguments);return e.apply(t[0]=this,t),this},Ta.empty=function(){return!this.node()},Ta.node=function(){for(var e=0,t=this.length;t>e;e++)for(var n=this[e],i=0,r=n.length;r>i;i++){var o=n[i];if(o)return o}return null},Ta.size=function(){var e=0;return q(this,function(){++e}),e};var Ea=[];na.selection.enter=H,na.selection.enter.prototype=Ea,Ea.append=Ta.append,Ea.empty=Ta.empty,Ea.node=Ta.node,Ea.call=Ta.call,Ea.size=Ta.size,Ea.select=function(e){for(var t,n,i,r,o,a=[],s=-1,l=this.length;++s<l;){i=(r=this[s]).update,a.push(t=[]),t.parentNode=r.parentNode;for(var u=-1,c=r.length;++u<c;)(o=r[u])?(t.push(i[u]=n=e.call(r.parentNode,o.__data__,u,s)),n.__data__=o.__data__):t.push(null)}return S(a)},Ea.insert=function(e,t){return arguments.length<2&&(t=U(this)),Ta.insert.call(this,e,t)},na.select=function(e){var t=["string"==typeof e?ka(e,oa):e];return t.parentNode=aa,S([t])},na.selectAll=function(e){var t=ra("string"==typeof e?Ca(e,oa):e);return t.parentNode=aa,S([t])};var Da=na.select(aa);Ta.on=function(e,t,n){var i=arguments.length;if(3>i){if("string"!=typeof e){2>i&&(t=!1);for(n in e)this.each(B(n,e[n],t));return this}if(2>i)return(i=this.node()["__on"+e])&&i._;n=!1}return this.each(B(e,t,n))};var Ma=na.map({mouseenter:"mouseover",mouseleave:"mouseout"});Ma.forEach(function(e){"on"+e in oa&&Ma.remove(e)});var Ia="onselectstart"in oa?null:v(aa.style,"userSelect"),Pa=0;na.mouse=function(e){return G(e,k())};var Aa=/WebKit/.test(sa.navigator.userAgent)?-1:0;na.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=k().changedTouches),t)for(var i,r=0,o=t.length;o>r;++r)if((i=t[r]).identifier===n)return G(e,i)},na.behavior.drag=function(){function e(){this.on("mousedown.drag",r).on("touchstart.drag",o)}function t(e,t,r,o,a){return function(){function s(){var e,n,i=t(p,g);i&&(e=i[0]-b[0],n=i[1]-b[1],f|=e|n,b=i,h({type:"drag",x:i[0]+u[0],y:i[1]+u[1],dx:e,dy:n}))}function l(){t(p,g)&&(v.on(o+m,null).on(a+m,null),y(f&&na.event.target===d),h({type:"dragend"}))}var u,c=this,d=na.event.target,p=c.parentNode,h=n.of(c,arguments),f=0,g=e(),m=".drag"+(null==g?"":"-"+g),v=na.select(r()).on(o+m,s).on(a+m,l),y=W(),b=t(p,g);i?(u=i.apply(c,arguments),u=[u.x-b[0],u.y-b[1]]):u=[0,0],h({type:"dragstart"})}}var n=C(e,"drag","dragstart","dragend"),i=null,r=t(y,na.mouse,Y,"mousemove","mouseup"),o=t(J,na.touch,X,"touchmove","touchend");return e.origin=function(t){return arguments.length?(i=t,e):i},na.rebind(e,n,"on")},na.touches=function(e,t){return arguments.length<2&&(t=k().touches),t?ra(t).map(function(t){var n=G(e,t);return n.identifier=t.identifier,n}):[]};var ja=1e-6,Na=ja*ja,Oa=Math.PI,La=2*Oa,Ra=La-ja,Fa=Oa/2,qa=Oa/180,Ha=180/Oa,Ua=Math.SQRT2,Ba=2,za=4;na.interpolateZoom=function(e,t){function n(e){var t=e*y;if(v){var n=ne(g),a=o/(Ba*p)*(n*ie(Ua*t+g)-te(g));return[i+a*u,r+a*c,o*n/ne(Ua*t+g)]}return[i+e*u,r+e*c,o*Math.exp(Ua*t)]}var i=e[0],r=e[1],o=e[2],a=t[0],s=t[1],l=t[2],u=a-i,c=s-r,d=u*u+c*c,p=Math.sqrt(d),h=(l*l-o*o+za*d)/(2*o*Ba*p),f=(l*l-o*o-za*d)/(2*l*Ba*p),g=Math.log(Math.sqrt(h*h+1)-h),m=Math.log(Math.sqrt(f*f+1)-f),v=m-g,y=(v||Math.log(l/o))/Ua;return n.duration=1e3*y,n},na.behavior.zoom=function(){function e(e){e.on(M,c).on(Ga+".zoom",p).on("dblclick.zoom",h).on(A,d)}function t(e){return[(e[0]-_.x)/_.k,(e[1]-_.y)/_.k]}function n(e){return[e[0]*_.k+_.x,e[1]*_.k+_.y]}function i(e){_.k=Math.max($[0],Math.min($[1],e))}function r(e,t){t=n(t),_.x+=e[0]-t[0],_.y+=e[1]-t[1]}function o(t,n,o,a){t.__chart__={x:_.x,y:_.y,k:_.k},i(Math.pow(2,a)),r(g=n,o),t=na.select(t),E>0&&(t=t.transition().duration(E)),t.call(e.event)}function a(){w&&w.domain(b.range().map(function(e){return(e-_.x)/_.k}).map(b.invert)),S&&S.domain(k.range().map(function(e){return(e-_.y)/_.k}).map(k.invert))}function s(e){D++||e({type:"zoomstart"})}function l(e){a(),e({type:"zoom",scale:_.k,translate:[_.x,_.y]})}function u(e){--D||e({type:"zoomend"}),g=null}function c(){function e(){c=1,r(na.mouse(i),p),l(a)}function n(){d.on(I,null).on(P,null),h(c&&na.event.target===o),u(a)}var i=this,o=na.event.target,a=j.of(i,arguments),c=0,d=na.select(sa).on(I,e).on(P,n),p=t(na.mouse(i)),h=W();ql.call(i),s(a)}function d(){function e(){var e=na.touches(f);return h=_.k,e.forEach(function(e){e.identifier in m&&(m[e.identifier]=t(e))}),e}function n(){var t=na.event.target;na.select(t).on(w,a).on(k,p),C.push(t);for(var n=na.event.changedTouches,i=0,r=n.length;r>i;++i)m[n[i].identifier]=null;var s=e(),l=Date.now();if(1===s.length){if(500>l-y){var u=s[0];o(f,u,m[u.identifier],Math.floor(Math.log(_.k)/Math.LN2)+1),x()}y=l}else if(s.length>1){var u=s[0],c=s[1],d=u[0]-c[0],h=u[1]-c[1];v=d*d+h*h}}function a(){var e,t,n,o,a=na.touches(f);ql.call(f);for(var s=0,u=a.length;u>s;++s,o=null)if(n=a[s],o=m[n.identifier]){if(t)break;e=n,t=o}if(o){var c=(c=n[0]-e[0])*c+(c=n[1]-e[1])*c,d=v&&Math.sqrt(c/v);e=[(e[0]+n[0])/2,(e[1]+n[1])/2],t=[(t[0]+o[0])/2,(t[1]+o[1])/2],i(d*h)}y=null,r(e,t),l(g)}function p(){if(na.event.touches.length){for(var t=na.event.changedTouches,n=0,i=t.length;i>n;++n)delete m[t[n].identifier];for(var r in m)return void e()}na.selectAll(C).on(b,null),S.on(M,c).on(A,d),T(),u(g)}var h,f=this,g=j.of(f,arguments),m={},v=0,b=".zoom-"+na.event.changedTouches[0].identifier,w="touchmove"+b,k="touchend"+b,C=[],S=na.select(f),T=W();n(),s(g),S.on(M,null).on(A,n)}function p(){var e=j.of(this,arguments);v?clearTimeout(v):(f=t(g=m||na.mouse(this)),ql.call(this),s(e)),v=setTimeout(function(){v=null,u(e)},50),x(),i(Math.pow(2,.002*Va())*_.k),r(g,f),l(e)}function h(){var e=na.mouse(this),n=Math.log(_.k)/Math.LN2;o(this,e,t(e),na.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}var f,g,m,v,y,b,w,k,S,_={x:0,y:0,k:1},T=[960,500],$=Wa,E=250,D=0,M="mousedown.zoom",I="mousemove.zoom",P="mouseup.zoom",A="touchstart.zoom",j=C(e,"zoomstart","zoom","zoomend");return e.event=function(e){e.each(function(){var e=j.of(this,arguments),t=_;Rl?na.select(this).transition().each("start.zoom",function(){_=this.__chart__||{x:0,y:0,k:1},s(e)}).tween("zoom:zoom",function(){var n=T[0],i=T[1],r=g?g[0]:n/2,o=g?g[1]:i/2,a=na.interpolateZoom([(r-_.x)/_.k,(o-_.y)/_.k,n/_.k],[(r-t.x)/t.k,(o-t.y)/t.k,n/t.k]);return function(t){var i=a(t),s=n/i[2];this.__chart__=_={x:r-i[0]*s,y:o-i[1]*s,k:s},l(e)}}).each("interrupt.zoom",function(){u(e)}).each("end.zoom",function(){u(e)}):(this.__chart__=_,s(e),l(e),u(e))})},e.translate=function(t){return arguments.length?(_={x:+t[0],y:+t[1],k:_.k},a(),e):[_.x,_.y]},e.scale=function(t){return arguments.length?(_={x:_.x,y:_.y,k:+t},a(),e):_.k},e.scaleExtent=function(t){return arguments.length?($=null==t?Wa:[+t[0],+t[1]],e):$},e.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],e):m},e.size=function(t){return arguments.length?(T=t&&[+t[0],+t[1]],e):T},e.duration=function(t){return arguments.length?(E=+t,e):E},e.x=function(t){return arguments.length?(w=t,b=t.copy(),_={x:0,y:0,k:1},e):w},e.y=function(t){return arguments.length?(S=t,k=t.copy(),_={x:0,y:0,k:1},e):S},na.rebind(e,j,"on")};var Va,Wa=[0,1/0],Ga="onwheel"in oa?(Va=function(){return-na.event.deltaY*(na.event.deltaMode?120:1)},"wheel"):"onmousewheel"in oa?(Va=function(){return na.event.wheelDelta},"mousewheel"):(Va=function(){return-na.event.detail},"MozMousePixelScroll");na.color=oe,oe.prototype.toString=function(){return this.rgb()+""},na.hsl=ae;var Ja=ae.prototype=new oe;Ja.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new ae(this.h,this.s,this.l/e)},Ja.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new ae(this.h,this.s,e*this.l)},Ja.rgb=function(){return se(this.h,this.s,this.l)},na.hcl=le;var Xa=le.prototype=new oe;Xa.brighter=function(e){return new le(this.h,this.c,Math.min(100,this.l+Ya*(arguments.length?e:1)))},Xa.darker=function(e){return new le(this.h,this.c,Math.max(0,this.l-Ya*(arguments.length?e:1)))},Xa.rgb=function(){return ue(this.h,this.c,this.l).rgb()},na.lab=ce;var Ya=18,Ka=.95047,Qa=1,Za=1.08883,es=ce.prototype=new oe;es.brighter=function(e){return new ce(Math.min(100,this.l+Ya*(arguments.length?e:1)),this.a,this.b)},es.darker=function(e){return new ce(Math.max(0,this.l-Ya*(arguments.length?e:1)),this.a,this.b)},es.rgb=function(){return de(this.l,this.a,this.b)},na.rgb=me;var ts=me.prototype=new oe;ts.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,i=this.b,r=30;return t||n||i?(t&&r>t&&(t=r),n&&r>n&&(n=r),i&&r>i&&(i=r),new me(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,i/e))):new me(r,r,r)},ts.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new me(e*this.r,e*this.g,e*this.b)},ts.hsl=function(){return xe(this.r,this.g,this.b)},ts.toString=function(){return"#"+be(this.r)+be(this.g)+be(this.b)};var ns=na.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ns.forEach(function(e,t){ns.set(e,ve(t))}),na.functor=_e,na.xhr=$e(Te),na.dsv=function(e,t){function n(e,n,o){arguments.length<3&&(o=n,n=null);var a=Ee(e,t,null==n?i:r(n),o);return a.row=function(e){return arguments.length?a.response(null==(n=e)?i:r(e)):n},a}function i(e){return n.parse(e.responseText)}function r(e){return function(t){return n.parse(t.responseText,e)}}function o(t){return t.map(a).join(e)}function a(e){return s.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var s=new RegExp('["'+e+"\n]"),l=e.charCodeAt(0);return n.parse=function(e,t){var i;return n.parseRows(e,function(e,n){if(i)return i(e,n-1);var r=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");i=t?function(e,n){return t(r(e),n)}:r})},n.parseRows=function(e,t){function n(){if(c>=u)return a;if(r)return r=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++<u;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}c=n+2;var i=e.charCodeAt(n+1);return 13===i?(r=!0,10===e.charCodeAt(n+2)&&++c):10===i&&(r=!0),e.slice(t+1,n).replace(/""/g,'"')}for(;u>c;){var i=e.charCodeAt(c++),s=1;if(10===i)r=!0;else if(13===i)r=!0,10===e.charCodeAt(c)&&(++c,++s);else if(i!==l)continue;return e.slice(t,c-s)}return e.slice(t)}for(var i,r,o={},a={},s=[],u=e.length,c=0,d=0;(i=n())!==a;){for(var p=[];i!==o&&i!==a;)p.push(i),i=n();t&&null==(p=t(p,d++))||s.push(p)}return s},n.format=function(t){if(Array.isArray(t[0]))return n.formatRows(t);var i=new g,r=[];return t.forEach(function(e){for(var t in e)i.has(t)||r.push(i.add(t))}),[r.map(a).join(e)].concat(t.map(function(t){return r.map(function(e){return a(t[e])}).join(e)})).join("\n")},n.formatRows=function(e){return e.map(o).join("\n")},n},na.csv=na.dsv(",","text/csv"),na.tsv=na.dsv(" ","text/tab-separated-values");var is,rs,os,as,ss,ls=sa[v(sa,"requestAnimationFrame")]||function(e){setTimeout(e,17)};na.timer=function(e,t,n){var i=arguments.length;2>i&&(t=0),3>i&&(n=Date.now());var r=n+t,o={c:e,t:r,f:!1,n:null};rs?rs.n=o:is=o,rs=o,os||(as=clearTimeout(as),os=1,ls(Ie))},na.timer.flush=function(){Pe(),Ae()},na.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var us=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Ne);na.formatPrefix=function(e,t){var n=0;return e&&(0>e&&(e*=-1),t&&(e=na.round(e,je(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),us[8+n/3]};var cs=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ds=na.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=na.round(e,je(e,t))).toFixed(Math.max(0,Math.min(20,je(e*(1+1e-15),t))))}}),ps=na.time={},hs=Date;Re.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){fs.setUTCDate.apply(this._,arguments)},setDay:function(){fs.setUTCDay.apply(this._,arguments)},setFullYear:function(){fs.setUTCFullYear.apply(this._,arguments)},setHours:function(){fs.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){fs.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){fs.setUTCMinutes.apply(this._,arguments)},setMonth:function(){fs.setUTCMonth.apply(this._,arguments)},setSeconds:function(){fs.setUTCSeconds.apply(this._,arguments)},setTime:function(){fs.setTime.apply(this._,arguments)}};var fs=Date.prototype;ps.year=Fe(function(e){return e=ps.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),ps.years=ps.year.range,ps.years.utc=ps.year.utc.range,ps.day=Fe(function(e){var t=new hs(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),ps.days=ps.day.range,ps.days.utc=ps.day.utc.range,ps.dayOfYear=function(e){var t=ps.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=ps[e]=Fe(function(e){return(e=ps.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=ps.year(e).getDay();return Math.floor((ps.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});ps[e+"s"]=n.range,ps[e+"s"].utc=n.utc.range,ps[e+"OfYear"]=function(e){var n=ps.year(e).getDay();return Math.floor((ps.dayOfYear(e)+(n+t)%7)/7)}}),ps.week=ps.sunday,ps.weeks=ps.sunday.range,ps.weeks.utc=ps.sunday.utc.range,ps.weekOfYear=ps.sundayOfYear;var gs={"-":"",_:" ",0:"0"},ms=/^\s*\d+/,vs=/^%/;na.locale=function(e){return{numberFormat:Oe(e),timeFormat:He(e)}};var ys=na.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});na.format=ys.numberFormat,na.geo={},lt.prototype={s:0,t:0,add:function(e){ut(e,this.t,bs),ut(bs.s,this.s,this),this.s?this.t+=bs.t:this.s=bs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bs=new lt;na.geo.stream=function(e,t){e&&ws.hasOwnProperty(e.type)?ws[e.type](e,t):ct(e,t)};var ws={Feature:function(e,t){ct(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i<r;)ct(n[i].geometry,t)}},xs={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)e=n[i],t.point(e[0],e[1],e[2])},LineString:function(e,t){dt(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)dt(n[i],t,0)},Polygon:function(e,t){pt(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)pt(n[i],t)},GeometryCollection:function(e,t){for(var n=e.geometries,i=-1,r=n.length;++i<r;)ct(n[i],t)}};na.geo.area=function(e){return ks=0,na.geo.stream(e,Ss),ks};var ks,Cs=new lt,Ss={sphere:function(){ks+=4*Oa},point:y,lineStart:y,lineEnd:y,polygonStart:function(){Cs.reset(),Ss.lineStart=ht},polygonEnd:function(){var e=2*Cs;ks+=0>e?4*Oa+e:e,Ss.lineStart=Ss.lineEnd=Ss.point=y}};na.geo.bounds=function(){function e(e,t){b.push(w=[c=e,p=e]),d>t&&(d=t),t>h&&(h=t)}function t(t,n){var i=ft([t*qa,n*qa]);if(v){var r=mt(v,i),o=[r[1],-r[0],0],a=mt(o,r);bt(a),a=wt(a);var l=t-f,u=l>0?1:-1,g=a[0]*Ha*u,m=ma(l)>180;if(m^(g>u*f&&u*t>g)){var y=a[1]*Ha;y>h&&(h=y)}else if(g=(g+360)%360-180,m^(g>u*f&&u*t>g)){var y=-a[1]*Ha;d>y&&(d=y)}else d>n&&(d=n),n>h&&(h=n);m?f>t?s(c,t)>s(c,p)&&(p=t):s(t,p)>s(c,p)&&(c=t):p>=c?(c>t&&(c=t),t>p&&(p=t)):t>f?s(c,t)>s(c,p)&&(p=t):s(t,p)>s(c,p)&&(c=t)}else e(t,n);v=i,f=t}function n(){x.point=t}function i(){w[0]=c,w[1]=p,x.point=e,v=null}function r(e,n){if(v){var i=e-f;y+=ma(i)>180?i+(i>0?360:-360):i}else g=e,m=n;Ss.point(e,n),t(e,n)}function o(){Ss.lineStart()}function a(){r(g,m),Ss.lineEnd(),ma(y)>ja&&(c=-(p=180)),w[0]=c,w[1]=p,v=null}function s(e,t){return(t-=e)<0?t+360:t}function l(e,t){return e[0]-t[0]}function u(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var c,d,p,h,f,g,m,v,y,b,w,x={point:e,lineStart:n,lineEnd:i,polygonStart:function(){x.point=r,x.lineStart=o,x.lineEnd=a,y=0,Ss.polygonStart()},polygonEnd:function(){Ss.polygonEnd(),x.point=e,x.lineStart=n,x.lineEnd=i,0>Cs?(c=-(p=180),d=-(h=90)):y>ja?h=90:-ja>y&&(d=-90),w[0]=c,w[1]=p}};return function(e){h=p=-(c=d=1/0),b=[],na.geo.stream(e,x);var t=b.length;if(t){b.sort(l);for(var n,i=1,r=b[0],o=[r];t>i;++i)n=b[i],u(n[0],r)||u(n[1],r)?(s(r[0],n[1])>s(r[0],r[1])&&(r[1]=n[1]),s(n[0],r[1])>s(r[0],r[1])&&(r[0]=n[0])):o.push(r=n);for(var a,n,f=-(1/0),t=o.length-1,i=0,r=o[t];t>=i;r=n,++i)n=o[i],(a=s(r[1],n[0]))>f&&(f=a,c=n[0],p=r[1])}return b=w=null,c===1/0||d===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,d],[p,h]]}}(),na.geo.centroid=function(e){_s=Ts=$s=Es=Ds=Ms=Is=Ps=As=js=Ns=0,na.geo.stream(e,Os);var t=As,n=js,i=Ns,r=t*t+n*n+i*i;return Na>r&&(t=Ms,n=Is,i=Ps,ja>Ts&&(t=$s,n=Es,i=Ds),r=t*t+n*n+i*i,Na>r)?[NaN,NaN]:[Math.atan2(n,t)*Ha,ee(i/Math.sqrt(r))*Ha]};var _s,Ts,$s,Es,Ds,Ms,Is,Ps,As,js,Ns,Os={sphere:y,point:kt,lineStart:St,lineEnd:_t,polygonStart:function(){Os.lineStart=Tt},polygonEnd:function(){Os.lineStart=St}},Ls=Pt(Et,Ot,Rt,[-Oa,-Oa/2]),Rs=1e9;na.geo.clipExtent=function(){var e,t,n,i,r,o,a={stream:function(e){return r&&(r.valid=!1),r=o(e),r.valid=!0,r},extent:function(s){return arguments.length?(o=Ut(e=+s[0][0],t=+s[0][1],n=+s[1][0],i=+s[1][1]),r&&(r.valid=!1,r=null),a):[[e,t],[n,i]]}};return a.extent([[0,0],[960,500]])},(na.geo.conicEqualArea=function(){return Bt(zt)}).raw=zt,na.geo.albers=function(){return na.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},na.geo.albersUsa=function(){function e(e){var o=e[0],a=e[1];return t=null,n(o,a),t||(i(o,a),t)||r(o,a),t}var t,n,i,r,o=na.geo.albers(),a=na.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=na.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(e,n){t=[e,n]}};return e.invert=function(e){var t=o.scale(),n=o.translate(),i=(e[0]-n[0])/t,r=(e[1]-n[1])/t;return(r>=.12&&.234>r&&i>=-.425&&-.214>i?a:r>=.166&&.234>r&&i>=-.214&&-.115>i?s:o).invert(e)},e.stream=function(e){var t=o.stream(e),n=a.stream(e),i=s.stream(e);return{point:function(e,r){t.point(e,r),n.point(e,r),i.point(e,r)},sphere:function(){t.sphere(),n.sphere(),i.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),i.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),i.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),i.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),i.polygonEnd()}}},e.precision=function(t){return arguments.length?(o.precision(t),a.precision(t),s.precision(t),e):o.precision()},e.scale=function(t){return arguments.length?(o.scale(t),a.scale(.35*t),s.scale(t),e.translate(o.translate())):o.scale()},e.translate=function(t){if(!arguments.length)return o.translate();var u=o.scale(),c=+t[0],d=+t[1];return n=o.translate(t).clipExtent([[c-.455*u,d-.238*u],[c+.455*u,d+.238*u]]).stream(l).point,i=a.translate([c-.307*u,d+.201*u]).clipExtent([[c-.425*u+ja,d+.12*u+ja],[c-.214*u-ja,d+.234*u-ja]]).stream(l).point,r=s.translate([c-.205*u,d+.212*u]).clipExtent([[c-.214*u+ja,d+.166*u+ja],[c-.115*u-ja,d+.234*u-ja]]).stream(l).point,e},e.scale(1070)};var Fs,qs,Hs,Us,Bs,zs,Vs={point:y,lineStart:y,lineEnd:y,polygonStart:function(){qs=0,Vs.lineStart=Vt},polygonEnd:function(){Vs.lineStart=Vs.lineEnd=Vs.point=y,Fs+=ma(qs/2)}},Ws={point:Wt,lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y},Gs={point:Xt,lineStart:Yt,lineEnd:Kt,polygonStart:function(){Gs.lineStart=Qt},polygonEnd:function(){Gs.point=Xt,Gs.lineStart=Yt,Gs.lineEnd=Kt}};na.geo.path=function(){function e(e){return e&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),a&&a.valid||(a=r(o)),na.geo.stream(e,a)),o.result()}function t(){return a=null,e}var n,i,r,o,a,s=4.5;return e.area=function(e){return Fs=0,na.geo.stream(e,r(Vs)),Fs},e.centroid=function(e){return $s=Es=Ds=Ms=Is=Ps=As=js=Ns=0,na.geo.stream(e,r(Gs)),Ns?[As/Ns,js/Ns]:Ps?[Ms/Ps,Is/Ps]:Ds?[$s/Ds,Es/Ds]:[NaN,NaN]},e.bounds=function(e){return Bs=zs=-(Hs=Us=1/0),na.geo.stream(e,r(Ws)),[[Hs,Us],[Bs,zs]]},e.projection=function(e){return arguments.length?(r=(n=e)?e.stream||tn(e):Te,t()):n},e.context=function(e){return arguments.length?(o=null==(i=e)?new Gt:new Zt(e),"function"!=typeof s&&o.pointRadius(s),t()):i},e.pointRadius=function(t){return arguments.length?(s="function"==typeof t?t:(o.pointRadius(+t),+t),e):s},e.projection(na.geo.albersUsa()).context(null)},na.geo.transform=function(e){return{stream:function(t){var n=new nn(t);for(var i in e)n[i]=e[i];return n}}},nn.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},na.geo.projection=on,na.geo.projectionMutator=an,(na.geo.equirectangular=function(){return on(ln)}).raw=ln.invert=ln,na.geo.rotation=function(e){function t(t){return t=e(t[0]*qa,t[1]*qa),t[0]*=Ha,t[1]*=Ha,t}return e=cn(e[0]%360*qa,e[1]*qa,e.length>2?e[2]*qa:0),t.invert=function(t){return t=e.invert(t[0]*qa,t[1]*qa),t[0]*=Ha,t[1]*=Ha,t},t},un.invert=ln,na.geo.circle=function(){function e(){var e="function"==typeof i?i.apply(this,arguments):i,t=cn(-e[0]*qa,-e[1]*qa,0).invert,r=[];return n(null,null,1,{point:function(e,n){r.push(e=t(e,n)),e[0]*=Ha,e[1]*=Ha}}),{type:"Polygon",coordinates:[r]}}var t,n,i=[0,0],r=6;return e.origin=function(t){return arguments.length?(i=t,e):i},e.angle=function(i){return arguments.length?(n=fn((t=+i)*qa,r*qa),e):t},e.precision=function(i){return arguments.length?(n=fn(t*qa,(r=+i)*qa),e):r},e.angle(90)},na.geo.distance=function(e,t){var n,i=(t[0]-e[0])*qa,r=e[1]*qa,o=t[1]*qa,a=Math.sin(i),s=Math.cos(i),l=Math.sin(r),u=Math.cos(r),c=Math.sin(o),d=Math.cos(o);return Math.atan2(Math.sqrt((n=d*a)*n+(n=u*c-l*d*s)*n),l*c+u*d*s)},na.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return na.range(Math.ceil(o/m)*m,r,m).map(p).concat(na.range(Math.ceil(u/v)*v,l,v).map(h)).concat(na.range(Math.ceil(i/f)*f,n,f).filter(function(e){return ma(e%m)>ja}).map(c)).concat(na.range(Math.ceil(s/g)*g,a,g).filter(function(e){return ma(e%v)>ja}).map(d))}var n,i,r,o,a,s,l,u,c,d,p,h,f=10,g=f,m=90,v=360,y=2.5;return e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})},e.outline=function(){return{type:"Polygon",coordinates:[p(o).concat(h(l).slice(1),p(r).reverse().slice(1),h(u).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()},e.majorExtent=function(t){return arguments.length?(o=+t[0][0],r=+t[1][0],u=+t[0][1],l=+t[1][1],o>r&&(t=o,o=r,r=t),u>l&&(t=u,u=l,l=t),e.precision(y)):[[o,u],[r,l]]},e.minorExtent=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],i>n&&(t=i,i=n,n=t),s>a&&(t=s,s=a,a=t),e.precision(y)):[[i,s],[n,a]]},e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()},e.majorStep=function(t){return arguments.length?(m=+t[0],v=+t[1],e):[m,v]},e.minorStep=function(t){return arguments.length?(f=+t[0],g=+t[1],e):[f,g]},e.precision=function(t){return arguments.length?(y=+t,c=mn(s,a,90),d=vn(i,n,y),p=mn(u,l,90),h=vn(o,r,y),e):y},e.majorExtent([[-180,-90+ja],[180,90-ja]]).minorExtent([[-180,-80-ja],[180,80+ja]])},na.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||i.apply(this,arguments),n||r.apply(this,arguments)]}}var t,n,i=yn,r=bn;return e.distance=function(){return na.geo.distance(t||i.apply(this,arguments),n||r.apply(this,arguments))},e.source=function(n){return arguments.length?(i=n,t="function"==typeof n?null:n,e):i},e.target=function(t){return arguments.length?(r=t,n="function"==typeof t?null:t,e):r},e.precision=function(){return arguments.length?e:0},e},na.geo.interpolate=function(e,t){return wn(e[0]*qa,e[1]*qa,t[0]*qa,t[1]*qa)},na.geo.length=function(e){return Js=0,na.geo.stream(e,Xs),Js};var Js,Xs={sphere:y,point:y,lineStart:xn,lineEnd:y,polygonStart:y,polygonEnd:y},Ys=kn(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(na.geo.azimuthalEqualArea=function(){return on(Ys)}).raw=Ys;var Ks=kn(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},Te);(na.geo.azimuthalEquidistant=function(){return on(Ks)}).raw=Ks,(na.geo.conicConformal=function(){return Bt(Cn)}).raw=Cn,(na.geo.conicEquidistant=function(){return Bt(Sn)}).raw=Sn;var Qs=kn(function(e){return 1/e},Math.atan);(na.geo.gnomonic=function(){return on(Qs)}).raw=Qs,_n.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Fa]},(na.geo.mercator=function(){return Tn(_n)}).raw=_n;var Zs=kn(function(){return 1},Math.asin);(na.geo.orthographic=function(){return on(Zs)}).raw=Zs;var el=kn(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(na.geo.stereographic=function(){return on(el)}).raw=el,$n.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Fa]},(na.geo.transverseMercator=function(){var e=Tn($n),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},n([0,0,90])}).raw=$n,na.geom={},na.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,r=_e(n),o=_e(i),a=e.length,s=[],l=[];for(t=0;a>t;t++)s.push([+r.call(this,e[t],t),+o.call(this,e[t],t),t]);for(s.sort(In),t=0;a>t;t++)l.push([s[t][0],-s[t][1]]);var u=Mn(s),c=Mn(l),d=c[0]===u[0],p=c[c.length-1]===u[u.length-1],h=[];for(t=u.length-1;t>=0;--t)h.push(e[s[u[t]][2]]);for(t=+d;t<c.length-p;++t)h.push(e[s[c[t]][2]]);return h}var n=En,i=Dn;return arguments.length?t(e):(t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(i=e,t):i},t)},na.geom.polygon=function(e){return xa(e,tl),e};var tl=na.geom.polygon.prototype=[];tl.area=function(){for(var e,t=-1,n=this.length,i=this[n-1],r=0;++t<n;)e=i,i=this[t],r+=e[1]*i[0]-e[0]*i[1];return.5*r},tl.centroid=function(e){var t,n,i=-1,r=this.length,o=0,a=0,s=this[r-1];for(arguments.length||(e=-1/(6*this.area()));++i<r;)t=s,
|
|
3253
|
|
-s=this[i],n=t[0]*s[1]-s[0]*t[1],o+=(t[0]+s[0])*n,a+=(t[1]+s[1])*n;return[o*e,a*e]},tl.clip=function(e){for(var t,n,i,r,o,a,s=jn(e),l=-1,u=this.length-jn(this),c=this[u-1];++l<u;){for(t=e.slice(),e.length=0,r=this[l],o=t[(i=t.length-s)-1],n=-1;++n<i;)a=t[n],Pn(a,c,r)?(Pn(o,c,r)||e.push(An(o,a,c,r)),e.push(a)):Pn(o,c,r)&&e.push(An(o,a,c,r)),o=a;s&&e.push(e[0]),c=r}return e};var nl,il,rl,ol,al,sl=[],ll=[];Un.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)e=t[n].edge,e.b&&e.a||t.splice(n,1);return t.sort(zn),t.length},ei.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},ti.prototype={insert:function(e,t){var n,i,r;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=oi(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)i=n.U,n===i.L?(r=i.R,r&&r.C?(n.C=r.C=!1,i.C=!0,e=i):(e===n.R&&(ii(this,n),e=n,n=e.U),n.C=!1,i.C=!0,ri(this,i))):(r=i.L,r&&r.C?(n.C=r.C=!1,i.C=!0,e=i):(e===n.L&&(ri(this,n),e=n,n=e.U),n.C=!1,i.C=!0,ii(this,i))),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,i,r=e.U,o=e.L,a=e.R;if(n=o?a?oi(a):o:a,r?r.L===e?r.L=n:r.R=n:this._=n,o&&a?(i=n.C,n.C=e.C,n.L=o,o.U=n,n!==a?(r=n.U,n.U=e.U,e=n.R,r.L=e,n.R=a,a.U=n):(n.U=r,r=n,e=n.R)):(i=e.C,e=n),e&&(e.U=r),!i){if(e&&e.C)return void(e.C=!1);do{if(e===this._)break;if(e===r.L){if(t=r.R,t.C&&(t.C=!1,r.C=!0,ii(this,r),t=r.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ri(this,t),t=r.R),t.C=r.C,r.C=t.R.C=!1,ii(this,r),e=this._;break}}else if(t=r.L,t.C&&(t.C=!1,r.C=!0,ri(this,r),t=r.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ii(this,t),t=r.L),t.C=r.C,r.C=t.L.C=!1,ri(this,r),e=this._;break}t.C=!0,e=r,r=r.U}while(!e.C);e&&(e.C=!1)}}},na.geom.voronoi=function(e){function t(e){var t=new Array(e.length),i=s[0][0],r=s[0][1],o=s[1][0],a=s[1][1];return ai(n(e),s).cells.forEach(function(n,s){var l=n.edges,u=n.site,c=t[s]=l.length?l.map(function(e){var t=e.start();return[t.x,t.y]}):u.x>=i&&u.x<=o&&u.y>=r&&u.y<=a?[[i,a],[o,a],[o,r],[i,r]]:[];c.point=e[s]}),t}function n(e){return e.map(function(e,t){return{x:Math.round(o(e,t)/ja)*ja,y:Math.round(a(e,t)/ja)*ja,i:t}})}var i=En,r=Dn,o=i,a=r,s=ul;return e?t(e):(t.links=function(e){return ai(n(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},t.triangles=function(e){var t=[];return ai(n(e)).cells.forEach(function(n,i){for(var r,o,a=n.site,s=n.edges.sort(zn),l=-1,u=s.length,c=s[u-1].edge,d=c.l===a?c.r:c.l;++l<u;)r=c,o=d,c=s[l].edge,d=c.l===a?c.r:c.l,i<o.i&&i<d.i&&li(a,o,d)<0&&t.push([e[i],e[o.i],e[d.i]])}),t},t.x=function(e){return arguments.length?(o=_e(i=e),t):i},t.y=function(e){return arguments.length?(a=_e(r=e),t):r},t.clipExtent=function(e){return arguments.length?(s=null==e?ul:e,t):s===ul?null:s},t.size=function(e){return arguments.length?t.clipExtent(e&&[[0,0],e]):s===ul?null:s&&s[1]},t)};var ul=[[-1e6,-1e6],[1e6,1e6]];na.geom.delaunay=function(e){return na.geom.voronoi().triangles(e)},na.geom.quadtree=function(e,t,n,i,r){function o(e){function o(e,t,n,i,r,o,a,s){if(!isNaN(n)&&!isNaN(i))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(ma(l-n)+ma(c-i)<.01)u(e,t,n,i,r,o,a,s);else{var d=e.point;e.x=e.y=e.point=null,u(e,d,l,c,r,o,a,s),u(e,t,n,i,r,o,a,s)}else e.x=n,e.y=i,e.point=t}else u(e,t,n,i,r,o,a,s)}function u(e,t,n,i,r,a,s,l){var u=.5*(r+s),c=.5*(a+l),d=n>=u,p=i>=c,h=p<<1|d;e.leaf=!1,e=e.nodes[h]||(e.nodes[h]=di()),d?r=u:s=u,p?a=c:l=c,o(e,t,n,i,r,a,s,l)}var c,d,p,h,f,g,m,v,y,b=_e(s),w=_e(l);if(null!=t)g=t,m=n,v=i,y=r;else if(v=y=-(g=m=1/0),d=[],p=[],f=e.length,a)for(h=0;f>h;++h)c=e[h],c.x<g&&(g=c.x),c.y<m&&(m=c.y),c.x>v&&(v=c.x),c.y>y&&(y=c.y),d.push(c.x),p.push(c.y);else for(h=0;f>h;++h){var x=+b(c=e[h],h),k=+w(c,h);g>x&&(g=x),m>k&&(m=k),x>v&&(v=x),k>y&&(y=k),d.push(x),p.push(k)}var C=v-g,S=y-m;C>S?y=m+C:v=g+S;var _=di();if(_.add=function(e){o(_,e,+b(e,++h),+w(e,h),g,m,v,y)},_.visit=function(e){pi(e,_,g,m,v,y)},_.find=function(e){return hi(_,e[0],e[1],g,m,v,y)},h=-1,null==t){for(;++h<f;)o(_,e[h],d[h],p[h],g,m,v,y);--h}else e.forEach(_.add);return d=p=e=c=null,_}var a,s=En,l=Dn;return(a=arguments.length)?(s=ui,l=ci,3===a&&(r=n,i=t,n=t=0),o(e)):(o.x=function(e){return arguments.length?(s=e,o):s},o.y=function(e){return arguments.length?(l=e,o):l},o.extent=function(e){return arguments.length?(null==e?t=n=i=r=null:(t=+e[0][0],n=+e[0][1],i=+e[1][0],r=+e[1][1]),o):null==t?null:[[t,n],[i,r]]},o.size=function(e){return arguments.length?(null==e?t=n=i=r=null:(t=n=0,i=+e[0],r=+e[1]),o):null==t?null:[i-t,r-n]},o)},na.interpolateRgb=fi,na.interpolateObject=gi,na.interpolateNumber=mi,na.interpolateString=vi;var cl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dl=new RegExp(cl.source,"g");na.interpolate=yi,na.interpolators=[function(e,t){var n=typeof t;return("string"===n?ns.has(t)||/^(#|rgb\(|hsl\()/.test(t)?fi:vi:t instanceof oe?fi:Array.isArray(t)?bi:"object"===n&&isNaN(t)?gi:mi)(e,t)}],na.interpolateArray=bi;var pl=function(){return Te},hl=na.map({linear:pl,poly:Ti,quad:function(){return Ci},cubic:function(){return Si},sin:function(){return $i},exp:function(){return Ei},circle:function(){return Di},elastic:Mi,back:Ii,bounce:function(){return Pi}}),fl=na.map({"in":Te,out:xi,"in-out":ki,"out-in":function(e){return ki(xi(e))}});na.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.slice(0,t):e,i=t>=0?e.slice(t+1):"in";return n=hl.get(n)||pl,i=fl.get(i)||Te,wi(i(n.apply(null,ia.call(arguments,1))))},na.interpolateHcl=Ai,na.interpolateHsl=ji,na.interpolateLab=Ni,na.interpolateRound=Oi,na.transform=function(e){var t=oa.createElementNS(na.ns.prefix.svg,"g");return(na.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Li(n?n.matrix:gl)})(e)},Li.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var gl={a:1,b:0,c:0,d:1,e:0,f:0};na.interpolateTransform=Hi,na.layout={},na.layout.bundle=function(){return function(e){for(var t=[],n=-1,i=e.length;++n<i;)t.push(zi(e[n]));return t}},na.layout.chord=function(){function e(){var e,u,d,p,h,f={},g=[],m=na.range(o),v=[];for(n=[],i=[],e=0,p=-1;++p<o;){for(u=0,h=-1;++h<o;)u+=r[p][h];g.push(u),v.push(na.range(o)),e+=u}for(a&&m.sort(function(e,t){return a(g[e],g[t])}),s&&v.forEach(function(e,t){e.sort(function(e,n){return s(r[t][e],r[t][n])})}),e=(La-c*o)/e,u=0,p=-1;++p<o;){for(d=u,h=-1;++h<o;){var y=m[p],b=v[y][h],w=r[y][b],x=u,k=u+=w*e;f[y+"-"+b]={index:y,subindex:b,startAngle:x,endAngle:k,value:w}}i[y]={index:y,startAngle:d,endAngle:u,value:(u-d)/e},u+=c}for(p=-1;++p<o;)for(h=p-1;++h<o;){var C=f[p+"-"+h],S=f[h+"-"+p];(C.value||S.value)&&n.push(C.value<S.value?{source:S,target:C}:{source:C,target:S})}l&&t()}function t(){n.sort(function(e,t){return l((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var n,i,r,o,a,s,l,u={},c=0;return u.matrix=function(e){return arguments.length?(o=(r=e)&&r.length,n=i=null,u):r},u.padding=function(e){return arguments.length?(c=e,n=i=null,u):c},u.sortGroups=function(e){return arguments.length?(a=e,n=i=null,u):a},u.sortSubgroups=function(e){return arguments.length?(s=e,n=null,u):s},u.sortChords=function(e){return arguments.length?(l=e,n&&t(),u):l},u.chords=function(){return n||e(),n},u.groups=function(){return i||e(),i},u},na.layout.force=function(){function e(e){return function(t,n,i,r){if(t.point!==e){var o=t.cx-e.x,a=t.cy-e.y,s=r-n,l=o*o+a*a;if(l>s*s/m){if(f>l){var u=t.charge/l;e.px-=o*u,e.py-=a*u}return!0}if(t.point&&l&&f>l){var u=t.pointCharge/l;e.px-=o*u,e.py-=a*u}}return!t.charge}}function t(e){e.px=na.event.x,e.py=na.event.y,s.resume()}var n,i,r,o,a,s={},l=na.dispatch("start","tick","end"),u=[1,1],c=.9,d=ml,p=vl,h=-30,f=yl,g=.1,m=.64,v=[],y=[];return s.tick=function(){if((i*=.99)<.005)return l.end({type:"end",alpha:i=0}),!0;var t,n,s,d,p,f,m,b,w,x=v.length,k=y.length;for(n=0;k>n;++n)s=y[n],d=s.source,p=s.target,b=p.x-d.x,w=p.y-d.y,(f=b*b+w*w)&&(f=i*o[n]*((f=Math.sqrt(f))-r[n])/f,b*=f,w*=f,p.x-=b*(m=d.weight/(p.weight+d.weight)),p.y-=w*m,d.x+=b*(m=1-m),d.y+=w*m);if((m=i*g)&&(b=u[0]/2,w=u[1]/2,n=-1,m))for(;++n<x;)s=v[n],s.x+=(b-s.x)*m,s.y+=(w-s.y)*m;if(h)for(Ki(t=na.geom.quadtree(v),i,a),n=-1;++n<x;)(s=v[n]).fixed||t.visit(e(s));for(n=-1;++n<x;)s=v[n],s.fixed?(s.x=s.px,s.y=s.py):(s.x-=(s.px-(s.px=s.x))*c,s.y-=(s.py-(s.py=s.y))*c);l.tick({type:"tick",alpha:i})},s.nodes=function(e){return arguments.length?(v=e,s):v},s.links=function(e){return arguments.length?(y=e,s):y},s.size=function(e){return arguments.length?(u=e,s):u},s.linkDistance=function(e){return arguments.length?(d="function"==typeof e?e:+e,s):d},s.distance=s.linkDistance,s.linkStrength=function(e){return arguments.length?(p="function"==typeof e?e:+e,s):p},s.friction=function(e){return arguments.length?(c=+e,s):c},s.charge=function(e){return arguments.length?(h="function"==typeof e?e:+e,s):h},s.chargeDistance=function(e){return arguments.length?(f=e*e,s):Math.sqrt(f)},s.gravity=function(e){return arguments.length?(g=+e,s):g},s.theta=function(e){return arguments.length?(m=e*e,s):Math.sqrt(m)},s.alpha=function(e){return arguments.length?(e=+e,i?i=e>0?e:0:e>0&&(l.start({type:"start",alpha:i=e}),na.timer(s.tick)),s):i},s.start=function(){function e(e,i){if(!n){for(n=new Array(l),s=0;l>s;++s)n[s]=[];for(s=0;u>s;++s){var r=y[s];n[r.source.index].push(r.target),n[r.target.index].push(r.source)}}for(var o,a=n[t],s=-1,u=a.length;++s<u;)if(!isNaN(o=a[s][e]))return o;return Math.random()*i}var t,n,i,l=v.length,c=y.length,f=u[0],g=u[1];for(t=0;l>t;++t)(i=v[t]).index=t,i.weight=0;for(t=0;c>t;++t)i=y[t],"number"==typeof i.source&&(i.source=v[i.source]),"number"==typeof i.target&&(i.target=v[i.target]),++i.source.weight,++i.target.weight;for(t=0;l>t;++t)i=v[t],isNaN(i.x)&&(i.x=e("x",f)),isNaN(i.y)&&(i.y=e("y",g)),isNaN(i.px)&&(i.px=i.x),isNaN(i.py)&&(i.py=i.y);if(r=[],"function"==typeof d)for(t=0;c>t;++t)r[t]=+d.call(this,y[t],t);else for(t=0;c>t;++t)r[t]=d;if(o=[],"function"==typeof p)for(t=0;c>t;++t)o[t]=+p.call(this,y[t],t);else for(t=0;c>t;++t)o[t]=p;if(a=[],"function"==typeof h)for(t=0;l>t;++t)a[t]=+h.call(this,v[t],t);else for(t=0;l>t;++t)a[t]=h;return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){return n||(n=na.behavior.drag().origin(Te).on("dragstart.force",Gi).on("drag.force",t).on("dragend.force",Ji)),arguments.length?void this.on("mouseover.force",Xi).on("mouseout.force",Yi).call(n):n},na.rebind(s,l,"on")};var ml=20,vl=1,yl=1/0;na.layout.hierarchy=function(){function e(r){var o,a=[r],s=[];for(r.depth=0;null!=(o=a.pop());)if(s.push(o),(u=n.call(e,o,o.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)a.push(c=u[l]),c.parent=o,c.depth=o.depth+1;i&&(o.value=0),o.children=u}else i&&(o.value=+i.call(e,o,o.depth)||0),delete o.children;return er(r,function(e){var n,r;t&&(n=e.children)&&n.sort(t),i&&(r=e.parent)&&(r.value+=e.value)}),s}var t=ir,n=tr,i=nr;return e.sort=function(n){return arguments.length?(t=n,e):t},e.children=function(t){return arguments.length?(n=t,e):n},e.value=function(t){return arguments.length?(i=t,e):i},e.revalue=function(t){return i&&(Zi(t,function(e){e.children&&(e.value=0)}),er(t,function(t){var n;t.children||(t.value=+i.call(e,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)})),t},e},na.layout.partition=function(){function e(t,n,i,r){var o=t.children;if(t.x=n,t.y=t.depth*r,t.dx=i,t.dy=r,o&&(a=o.length)){var a,s,l,u=-1;for(i=t.value?i/t.value:0;++u<a;)e(s=o[u],n,l=s.value*i,r),n+=l}}function t(e){var n=e.children,i=0;if(n&&(r=n.length))for(var r,o=-1;++o<r;)i=Math.max(i,t(n[o]));return 1+i}function n(n,o){var a=i.call(this,n,o);return e(a[0],0,r[0],r[1]/t(a[0])),a}var i=na.layout.hierarchy(),r=[1,1];return n.size=function(e){return arguments.length?(r=e,n):r},Qi(n,i)},na.layout.pie=function(){function e(a){var s,l=a.length,u=a.map(function(n,i){return+t.call(e,n,i)}),c=+("function"==typeof i?i.apply(this,arguments):i),d=("function"==typeof r?r.apply(this,arguments):r)-c,p=Math.min(Math.abs(d)/l,+("function"==typeof o?o.apply(this,arguments):o)),h=p*(0>d?-1:1),f=(d-l*h)/na.sum(u),g=na.range(l),m=[];return null!=n&&g.sort(n===bl?function(e,t){return u[t]-u[e]}:function(e,t){return n(a[e],a[t])}),g.forEach(function(e){m[e]={data:a[e],value:s=u[e],startAngle:c,endAngle:c+=s*f+h,padAngle:p}}),m}var t=Number,n=bl,i=0,r=La,o=0;return e.value=function(n){return arguments.length?(t=n,e):t},e.sort=function(t){return arguments.length?(n=t,e):n},e.startAngle=function(t){return arguments.length?(i=t,e):i},e.endAngle=function(t){return arguments.length?(r=t,e):r},e.padAngle=function(t){return arguments.length?(o=t,e):o},e};var bl={};na.layout.stack=function(){function e(s,l){if(!(p=s.length))return s;var u=s.map(function(n,i){return t.call(e,n,i)}),c=u.map(function(t){return t.map(function(t,n){return[o.call(e,t,n),a.call(e,t,n)]})}),d=n.call(e,c,l);u=na.permute(u,d),c=na.permute(c,d);var p,h,f,g,m=i.call(e,c,l),v=u[0].length;for(f=0;v>f;++f)for(r.call(e,u[0][f],g=m[f],c[0][f][1]),h=1;p>h;++h)r.call(e,u[h][f],g+=c[h-1][f][1],c[h][f][1]);return s}var t=Te,n=lr,i=ur,r=sr,o=or,a=ar;return e.values=function(n){return arguments.length?(t=n,e):t},e.order=function(t){return arguments.length?(n="function"==typeof t?t:wl.get(t)||lr,e):n},e.offset=function(t){return arguments.length?(i="function"==typeof t?t:xl.get(t)||ur,e):i},e.x=function(t){return arguments.length?(o=t,e):o},e.y=function(t){return arguments.length?(a=t,e):a},e.out=function(t){return arguments.length?(r=t,e):r},e};var wl=na.map({"inside-out":function(e){var t,n,i=e.length,r=e.map(cr),o=e.map(dr),a=na.range(i).sort(function(e,t){return r[e]-r[t]}),s=0,l=0,u=[],c=[];for(t=0;i>t;++t)n=a[t],l>s?(s+=o[n],u.push(n)):(l+=o[n],c.push(n));return c.reverse().concat(u)},reverse:function(e){return na.range(e.length).reverse()},"default":lr}),xl=na.map({silhouette:function(e){var t,n,i,r=e.length,o=e[0].length,a=[],s=0,l=[];for(n=0;o>n;++n){for(t=0,i=0;r>t;t++)i+=e[t][n][1];i>s&&(s=i),a.push(i)}for(n=0;o>n;++n)l[n]=(s-a[n])/2;return l},wiggle:function(e){var t,n,i,r,o,a,s,l,u,c=e.length,d=e[0],p=d.length,h=[];for(h[0]=l=u=0,n=1;p>n;++n){for(t=0,r=0;c>t;++t)r+=e[t][n][1];for(t=0,o=0,s=d[n][0]-d[n-1][0];c>t;++t){for(i=0,a=(e[t][n][1]-e[t][n-1][1])/(2*s);t>i;++i)a+=(e[i][n][1]-e[i][n-1][1])/s;o+=a*e[t][n][1]}h[n]=l-=r?o/r*s:0,u>l&&(u=l)}for(n=0;p>n;++n)h[n]-=u;return h},expand:function(e){var t,n,i,r=e.length,o=e[0].length,a=1/r,s=[];for(n=0;o>n;++n){for(t=0,i=0;r>t;t++)i+=e[t][n][1];if(i)for(t=0;r>t;t++)e[t][n][1]/=i;else for(t=0;r>t;t++)e[t][n][1]=a}for(n=0;o>n;++n)s[n]=0;return s},zero:ur});na.layout.histogram=function(){function e(e,o){for(var a,s,l=[],u=e.map(n,this),c=i.call(this,u,o),d=r.call(this,c,u,o),o=-1,p=u.length,h=d.length-1,f=t?1:1/p;++o<h;)a=l[o]=[],a.dx=d[o+1]-(a.x=d[o]),a.y=0;if(h>0)for(o=-1;++o<p;)s=u[o],s>=c[0]&&s<=c[1]&&(a=l[na.bisect(d,s,1,h)-1],a.y+=f,a.push(e[o]));return l}var t=!0,n=Number,i=gr,r=hr;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(i=_e(t),e):i},e.bins=function(t){return arguments.length?(r="number"==typeof t?function(e){return fr(e,t)}:_e(t),e):r},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},na.layout.pack=function(){function e(e,o){var a=n.call(this,e,o),s=a[0],l=r[0],u=r[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,er(s,function(e){e.r=+c(e.value)}),er(s,wr),i){var d=i*(t?1:Math.max(2*s.r/l,2*s.r/u))/2;er(s,function(e){e.r+=d}),er(s,wr),er(s,function(e){e.r-=d})}return Cr(s,l/2,u/2,t?1:1/Math.max(2*s.r/l,2*s.r/u)),a}var t,n=na.layout.hierarchy().sort(mr),i=0,r=[1,1];return e.size=function(t){return arguments.length?(r=t,e):r},e.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,e):t},e.padding=function(t){return arguments.length?(i=+t,e):i},Qi(e,n)},na.layout.tree=function(){function e(e,r){var c=a.call(this,e,r),d=c[0],p=t(d);if(er(p,n),p.parent.m=-p.z,Zi(p,i),u)Zi(d,o);else{var h=d,f=d,g=d;Zi(d,function(e){e.x<h.x&&(h=e),e.x>f.x&&(f=e),e.depth>g.depth&&(g=e)});var m=s(h,f)/2-h.x,v=l[0]/(f.x+s(f,h)/2+m),y=l[1]/(g.depth||1);Zi(d,function(e){e.x=(e.x+m)*v,e.y=e.depth*y})}return c}function t(e){for(var t,n={A:null,children:[e]},i=[n];null!=(t=i.pop());)for(var r,o=t.children,a=0,s=o.length;s>a;++a)i.push((o[a]=r={_:o[a],parent:t,children:(r=o[a].children)&&r.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=r);return n.children[0]}function n(e){var t=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(t.length){Dr(e);var o=(t[0].z+t[t.length-1].z)/2;i?(e.z=i.z+s(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+s(e._,i._));e.parent.A=r(e,i,e.parent.A||n[0])}function i(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function r(e,t,n){if(t){for(var i,r=e,o=e,a=t,l=r.parent.children[0],u=r.m,c=o.m,d=a.m,p=l.m;a=$r(a),r=Tr(r),a&&r;)l=Tr(l),o=$r(o),o.a=e,i=a.z+d-r.z-u+s(a._,r._),i>0&&(Er(Mr(a,e,n),e,i),u+=i,c+=i),d+=a.m,u+=r.m,p+=l.m,c+=o.m;a&&!$r(o)&&(o.t=a,o.m+=d-c),r&&!Tr(l)&&(l.t=r,l.m+=u-p,n=e)}return n}function o(e){e.x*=l[0],e.y=e.depth*l[1]}var a=na.layout.hierarchy().sort(null).value(null),s=_r,l=[1,1],u=null;return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=null==(l=t)?o:null,e):u?null:l},e.nodeSize=function(t){return arguments.length?(u=null==(l=t)?null:o,e):u?l:null},Qi(e,a)},na.layout.cluster=function(){function e(e,o){var a,s=t.call(this,e,o),l=s[0],u=0;er(l,function(e){var t=e.children;t&&t.length?(e.x=Pr(t),e.y=Ir(t)):(e.x=a?u+=n(e,a):0,e.y=0,a=e)});var c=Ar(l),d=jr(l),p=c.x-n(c,d)/2,h=d.x+n(d,c)/2;return er(l,r?function(e){e.x=(e.x-l.x)*i[0],e.y=(l.y-e.y)*i[1]}:function(e){e.x=(e.x-p)/(h-p)*i[0],e.y=(1-(l.y?e.y/l.y:1))*i[1]}),s}var t=na.layout.hierarchy().sort(null).value(null),n=_r,i=[1,1],r=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(r=null==(i=t),e):r?null:i},e.nodeSize=function(t){return arguments.length?(r=null!=(i=t),e):r?i:null},Qi(e,t)},na.layout.treemap=function(){function e(e,t){for(var n,i,r=-1,o=e.length;++r<o;)i=(n=e[r]).value*(0>t?0:t),n.area=isNaN(i)||0>=i?0:i}function t(n){var o=n.children;if(o&&o.length){var a,s,l,u=d(n),c=[],p=o.slice(),f=1/0,g="slice"===h?u.dx:"dice"===h?u.dy:"slice-dice"===h?1&n.depth?u.dy:u.dx:Math.min(u.dx,u.dy);for(e(p,u.dx*u.dy/n.value),c.area=0;(l=p.length)>0;)c.push(a=p[l-1]),c.area+=a.area,"squarify"!==h||(s=i(c,g))<=f?(p.pop(),f=s):(c.area-=c.pop().area,r(c,g,u,!1),g=Math.min(u.dx,u.dy),c.length=c.area=0,f=1/0);c.length&&(r(c,g,u,!0),c.length=c.area=0),o.forEach(t)}}function n(t){var i=t.children;if(i&&i.length){var o,a=d(t),s=i.slice(),l=[];for(e(s,a.dx*a.dy/t.value),l.area=0;o=s.pop();)l.push(o),l.area+=o.area,null!=o.z&&(r(l,o.z?a.dx:a.dy,a,!s.length),l.length=l.area=0);i.forEach(n)}}function i(e,t){for(var n,i=e.area,r=0,o=1/0,a=-1,s=e.length;++a<s;)(n=e[a].area)&&(o>n&&(o=n),n>r&&(r=n));return i*=i,t*=t,i?Math.max(t*r*f/i,i/(t*o*f)):1/0}function r(e,t,n,i){var r,o=-1,a=e.length,s=n.x,u=n.y,c=t?l(e.area/t):0;if(t==n.dx){for((i||c>n.dy)&&(c=n.dy);++o<a;)r=e[o],r.x=s,r.y=u,r.dy=c,s+=r.dx=Math.min(n.x+n.dx-s,c?l(r.area/c):0);r.z=!0,r.dx+=n.x+n.dx-s,n.y+=c,n.dy-=c}else{for((i||c>n.dx)&&(c=n.dx);++o<a;)r=e[o],r.x=s,r.y=u,r.dx=c,u+=r.dy=Math.min(n.y+n.dy-u,c?l(r.area/c):0);r.z=!1,r.dy+=n.y+n.dy-u,n.x+=c,n.dx-=c}}function o(i){var r=a||s(i),o=r[0];return o.x=0,o.y=0,o.dx=u[0],o.dy=u[1],a&&s.revalue(o),e([o],o.dx*o.dy/o.value),(a?n:t)(o),p&&(a=r),r}var a,s=na.layout.hierarchy(),l=Math.round,u=[1,1],c=null,d=Nr,p=!1,h="squarify",f=.5*(1+Math.sqrt(5));return o.size=function(e){return arguments.length?(u=e,o):u},o.padding=function(e){function t(t){var n=e.call(o,t,t.depth);return null==n?Nr(t):Or(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return Or(t,e)}if(!arguments.length)return c;var i;return d=null==(c=e)?Nr:"function"==(i=typeof e)?t:"number"===i?(e=[e,e,e,e],n):n,o},o.round=function(e){return arguments.length?(l=e?Math.round:Number,o):l!=Number},o.sticky=function(e){return arguments.length?(p=e,a=null,o):p},o.ratio=function(e){return arguments.length?(f=e,o):f},o.mode=function(e){return arguments.length?(h=e+"",o):h},Qi(o,s)},na.random={normal:function(e,t){var n=arguments.length;return 2>n&&(t=1),1>n&&(e=0),function(){var n,i,r;do n=2*Math.random()-1,i=2*Math.random()-1,r=n*n+i*i;while(!r||r>1);return e+t*n*Math.sqrt(-2*Math.log(r)/r)}},logNormal:function(){var e=na.random.normal.apply(na,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=na.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;e>n;n++)t+=Math.random();return t}}},na.scale={};var kl={floor:Te,ceil:Te};na.scale.linear=function(){return Br([0,1],[0,1],yi,!1)};var Cl={s:1,g:1,p:1,r:1,e:1};na.scale.log=function(){return Kr(na.scale.linear().domain([0,1]),10,!0,[1,10])};var Sl=na.format(".0e"),_l={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};na.scale.pow=function(){return Qr(na.scale.linear(),1,[0,1])},na.scale.sqrt=function(){return na.scale.pow().exponent(.5)},na.scale.ordinal=function(){return eo([],{t:"range",a:[[]]})},na.scale.category10=function(){return na.scale.ordinal().range(Tl)},na.scale.category20=function(){return na.scale.ordinal().range($l)},na.scale.category20b=function(){return na.scale.ordinal().range(El)},na.scale.category20c=function(){return na.scale.ordinal().range(Dl)};var Tl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(ye),$l=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(ye),El=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(ye),Dl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(ye);na.scale.quantile=function(){return to([],[])},na.scale.quantize=function(){return no(0,1,[0,1])},na.scale.threshold=function(){return io([.5],[0,1])},na.scale.identity=function(){return ro([0,1])},na.svg={},na.svg.arc=function(){function e(){var e=Math.max(0,+n.apply(this,arguments)),u=Math.max(0,+i.apply(this,arguments)),c=a.apply(this,arguments)-Fa,d=s.apply(this,arguments)-Fa,p=Math.abs(d-c),h=c>d?0:1;if(e>u&&(f=u,u=e,e=f),p>=Ra)return t(u,h)+(e?t(e,1-h):"")+"Z";var f,g,m,v,y,b,w,x,k,C,S,_,T=0,$=0,E=[];if((v=(+l.apply(this,arguments)||0)/2)&&(m=o===Ml?Math.sqrt(e*e+u*u):+o.apply(this,arguments),h||($*=-1),u&&($=ee(m/u*Math.sin(v))),e&&(T=ee(m/e*Math.sin(v)))),u){y=u*Math.cos(c+$),b=u*Math.sin(c+$),w=u*Math.cos(d-$),x=u*Math.sin(d-$);var D=Math.abs(d-c-2*$)<=Oa?0:1;if($&&po(y,b,w,x)===h^D){var M=(c+d)/2;y=u*Math.cos(M),b=u*Math.sin(M),w=x=null}}else y=b=0;if(e){k=e*Math.cos(d-T),C=e*Math.sin(d-T),S=e*Math.cos(c+T),_=e*Math.sin(c+T);var I=Math.abs(c-d+2*T)<=Oa?0:1;if(T&&po(k,C,S,_)===1-h^I){var P=(c+d)/2;k=e*Math.cos(P),C=e*Math.sin(P),S=_=null}}else k=C=0;if((f=Math.min(Math.abs(u-e)/2,+r.apply(this,arguments)))>.001){g=u>e^h?0:1;var A=null==S?[k,C]:null==w?[y,b]:An([y,b],[S,_],[w,x],[k,C]),j=y-A[0],N=b-A[1],O=w-A[0],L=x-A[1],R=1/Math.sin(Math.acos((j*O+N*L)/(Math.sqrt(j*j+N*N)*Math.sqrt(O*O+L*L)))/2),F=Math.sqrt(A[0]*A[0]+A[1]*A[1]);if(null!=w){var q=Math.min(f,(u-F)/(R+1)),H=ho(null==S?[k,C]:[S,_],[y,b],u,q,h),U=ho([w,x],[k,C],u,q,h);f===q?E.push("M",H[0],"A",q,",",q," 0 0,",g," ",H[1],"A",u,",",u," 0 ",1-h^po(H[1][0],H[1][1],U[1][0],U[1][1]),",",h," ",U[1],"A",q,",",q," 0 0,",g," ",U[0]):E.push("M",H[0],"A",q,",",q," 0 1,",g," ",U[0])}else E.push("M",y,",",b);if(null!=S){var B=Math.min(f,(e-F)/(R-1)),z=ho([y,b],[S,_],e,-B,h),V=ho([k,C],null==w?[y,b]:[w,x],e,-B,h);f===B?E.push("L",V[0],"A",B,",",B," 0 0,",g," ",V[1],"A",e,",",e," 0 ",h^po(V[1][0],V[1][1],z[1][0],z[1][1]),",",1-h," ",z[1],"A",B,",",B," 0 0,",g," ",z[0]):E.push("L",V[0],"A",B,",",B," 0 0,",g," ",z[0])}else E.push("L",k,",",C)}else E.push("M",y,",",b),null!=w&&E.push("A",u,",",u," 0 ",D,",",h," ",w,",",x),E.push("L",k,",",C),null!=S&&E.push("A",e,",",e," 0 ",I,",",1-h," ",S,",",_);return E.push("Z"),E.join("")}function t(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}var n=ao,i=so,r=oo,o=Ml,a=lo,s=uo,l=co;return e.innerRadius=function(t){return arguments.length?(n=_e(t),e):n},e.outerRadius=function(t){return arguments.length?(i=_e(t),e):i},e.cornerRadius=function(t){return arguments.length?(r=_e(t),e):r},e.padRadius=function(t){return arguments.length?(o=t==Ml?Ml:_e(t),e):o},e.startAngle=function(t){return arguments.length?(a=_e(t),e):a},e.endAngle=function(t){return arguments.length?(s=_e(t),e):s},e.padAngle=function(t){return arguments.length?(l=_e(t),e):l},e.centroid=function(){var e=(+n.apply(this,arguments)+ +i.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +s.apply(this,arguments))/2-Fa;return[Math.cos(t)*e,Math.sin(t)*e]},e};var Ml="auto";na.svg.line=function(){return fo(Te)};var Il=na.map({linear:go,"linear-closed":mo,step:vo,"step-before":yo,"step-after":bo,basis:_o,"basis-open":To,"basis-closed":$o,bundle:Eo,cardinal:ko,"cardinal-open":wo,"cardinal-closed":xo,monotone:jo});Il.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var Pl=[0,2/3,1/3,0],Al=[0,1/3,2/3,0],jl=[0,1/6,2/3,1/6];na.svg.line.radial=function(){var e=fo(No);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},yo.reverse=bo,bo.reverse=yo,na.svg.area=function(){return Oo(Te)},na.svg.area.radial=function(){var e=Oo(No);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},na.svg.chord=function(){function e(e,s){var l=t(this,o,e,s),u=t(this,a,e,s);return"M"+l.p0+i(l.r,l.p1,l.a1-l.a0)+(n(l,u)?r(l.r,l.p1,l.r,l.p0):r(l.r,l.p1,u.r,u.p0)+i(u.r,u.p1,u.a1-u.a0)+r(u.r,u.p1,l.r,l.p0))+"Z"}function t(e,t,n,i){var r=t.call(e,n,i),o=s.call(e,r,i),a=l.call(e,r,i)-Fa,c=u.call(e,r,i)-Fa;return{r:o,a0:a,a1:c,p0:[o*Math.cos(a),o*Math.sin(a)],p1:[o*Math.cos(c),o*Math.sin(c)]}}function n(e,t){return e.a0==t.a0&&e.a1==t.a1}function i(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Oa)+",1 "+t}function r(e,t,n,i){return"Q 0,0 "+i}var o=yn,a=bn,s=Lo,l=lo,u=uo;return e.radius=function(t){return arguments.length?(s=_e(t),e):s},e.source=function(t){return arguments.length?(o=_e(t),e):o},e.target=function(t){return arguments.length?(a=_e(t),e):a},e.startAngle=function(t){return arguments.length?(l=_e(t),e):l},e.endAngle=function(t){return arguments.length?(u=_e(t),e):u},e},na.svg.diagonal=function(){function e(e,r){var o=t.call(this,e,r),a=n.call(this,e,r),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return l=l.map(i),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=yn,n=bn,i=Ro;return e.source=function(n){return arguments.length?(t=_e(n),e):t},e.target=function(t){return arguments.length?(n=_e(t),e):n},e.projection=function(t){return arguments.length?(i=t,e):i},e},na.svg.diagonal.radial=function(){var e=na.svg.diagonal(),t=Ro,n=e.projection;return e.projection=function(e){return arguments.length?n(Fo(t=e)):t},e},na.svg.symbol=function(){function e(e,i){return(Nl.get(t.call(this,e,i))||Uo)(n.call(this,e,i))}var t=Ho,n=qo;return e.type=function(n){return arguments.length?(t=_e(n),e):t},e.size=function(t){return arguments.length?(n=_e(t),e):n},e};var Nl=na.map({circle:Uo,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Ll)),n=t*Ll;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Ol),n=t*Ol/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ol),n=t*Ol/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});na.svg.symbolTypes=Nl.keys();var Ol=Math.sqrt(3),Ll=Math.tan(30*qa);Ta.transition=function(e){for(var t,n,i=Rl||++Ul,r=Go(e),o=[],a=Fl||{time:Date.now(),ease:_i,delay:0,duration:250},s=-1,l=this.length;++s<l;){o.push(t=[]);for(var u=this[s],c=-1,d=u.length;++c<d;)(n=u[c])&&Jo(n,c,r,i,a),t.push(n)}return zo(o,r,i)},Ta.interrupt=function(e){return this.each(null==e?ql:Bo(Go(e)))};var Rl,Fl,ql=Bo(Go()),Hl=[],Ul=0;Hl.call=Ta.call,Hl.empty=Ta.empty,Hl.node=Ta.node,Hl.size=Ta.size,na.transition=function(e,t){return e&&e.transition?Rl?e.transition(t):e:Da.transition(e)},na.transition.prototype=Hl,Hl.select=function(e){var t,n,i,r=this.id,o=this.namespace,a=[];e=_(e);for(var s=-1,l=this.length;++s<l;){a.push(t=[]);for(var u=this[s],c=-1,d=u.length;++c<d;)(i=u[c])&&(n=e.call(i,i.__data__,c,s))?("__data__"in i&&(n.__data__=i.__data__),Jo(n,c,o,r,i[o][r]),t.push(n)):t.push(null)}return zo(a,o,r)},Hl.selectAll=function(e){var t,n,i,r,o,a=this.id,s=this.namespace,l=[];e=T(e);for(var u=-1,c=this.length;++u<c;)for(var d=this[u],p=-1,h=d.length;++p<h;)if(i=d[p]){o=i[s][a],n=e.call(i,i.__data__,p,u),l.push(t=[]);for(var f=-1,g=n.length;++f<g;)(r=n[f])&&Jo(r,f,s,a,o),t.push(r)}return zo(l,s,a)},Hl.filter=function(e){var t,n,i,r=[];"function"!=typeof e&&(e=R(e));for(var o=0,a=this.length;a>o;o++){r.push(t=[]);for(var n=this[o],s=0,l=n.length;l>s;s++)(i=n[s])&&e.call(i,i.__data__,s,o)&&t.push(i)}return zo(r,this.namespace,this.id)},Hl.tween=function(e,t){var n=this.id,i=this.namespace;return arguments.length<2?this.node()[i][n].tween.get(e):q(this,null==t?function(t){t[i][n].tween.remove(e)}:function(r){r[i][n].tween.set(e,t)})},Hl.attr=function(e,t){function n(){this.removeAttribute(s)}function i(){this.removeAttributeNS(s.space,s.local)}function r(e){return null==e?n:(e+="",function(){var t,n=this.getAttribute(s);return n!==e&&(t=a(n,e),function(e){this.setAttribute(s,t(e))})})}function o(e){return null==e?i:(e+="",function(){var t,n=this.getAttributeNS(s.space,s.local);return n!==e&&(t=a(n,e),function(e){this.setAttributeNS(s.space,s.local,t(e))})})}if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var a="transform"==e?Hi:yi,s=na.ns.qualify(e);return Vo(this,"attr."+e,t,s.local?o:r)},Hl.attrTween=function(e,t){function n(e,n){var i=t.call(this,e,n,this.getAttribute(r));return i&&function(e){this.setAttribute(r,i(e))}}function i(e,n){var i=t.call(this,e,n,this.getAttributeNS(r.space,r.local));return i&&function(e){this.setAttributeNS(r.space,r.local,i(e))}}var r=na.ns.qualify(e);return this.tween("attr."+e,r.local?i:n)},Hl.style=function(e,t,n){function i(){this.style.removeProperty(e)}function r(t){return null==t?i:(t+="",function(){var i,r=sa.getComputedStyle(this,null).getPropertyValue(e);return r!==t&&(i=yi(r,t),function(t){this.style.setProperty(e,i(t),n)})})}var o=arguments.length;if(3>o){if("string"!=typeof e){2>o&&(t="");for(n in e)this.style(n,e[n],t);return this}n=""}return Vo(this,"style."+e,t,r)},Hl.styleTween=function(e,t,n){function i(i,r){var o=t.call(this,i,r,sa.getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),n)}}return arguments.length<3&&(n=""),this.tween("style."+e,i)},Hl.text=function(e){return Vo(this,"text",e,Wo)},Hl.remove=function(){var e=this.namespace;return this.each("end.transition",function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Hl.ease=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].ease:("function"!=typeof e&&(e=na.ease.apply(na,arguments)),q(this,function(i){i[n][t].ease=e}))},Hl.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:q(this,"function"==typeof e?function(i,r,o){
|
|
3254
|
|
-i[n][t].delay=+e.call(i,i.__data__,r,o)}:(e=+e,function(i){i[n][t].delay=e}))},Hl.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:q(this,"function"==typeof e?function(i,r,o){i[n][t].duration=Math.max(1,e.call(i,i.__data__,r,o))}:(e=Math.max(1,e),function(i){i[n][t].duration=e}))},Hl.each=function(e,t){var n=this.id,i=this.namespace;if(arguments.length<2){var r=Fl,o=Rl;try{Rl=n,q(this,function(t,r,o){Fl=t[i][n],e.call(t,t.__data__,r,o)})}finally{Fl=r,Rl=o}}else q(this,function(r){var o=r[i][n];(o.event||(o.event=na.dispatch("start","end","interrupt"))).on(e,t)});return this},Hl.transition=function(){for(var e,t,n,i,r=this.id,o=++Ul,a=this.namespace,s=[],l=0,u=this.length;u>l;l++){s.push(e=[]);for(var t=this[l],c=0,d=t.length;d>c;c++)(n=t[c])&&(i=n[a][r],Jo(n,c,a,o,{time:i.time,ease:i.ease,delay:i.delay+i.duration,duration:i.duration})),e.push(n)}return zo(s,a,o)},na.svg.axis=function(){function e(e){e.each(function(){var e,u=na.select(this),c=this.__chart__||n,d=this.__chart__=n.copy(),p=null==l?d.ticks?d.ticks.apply(d,s):d.domain():l,h=null==t?d.tickFormat?d.tickFormat.apply(d,s):Te:t,f=u.selectAll(".tick").data(p,d),g=f.enter().insert("g",".domain").attr("class","tick").style("opacity",ja),m=na.transition(f.exit()).style("opacity",ja).remove(),v=na.transition(f.order()).style("opacity",1),y=Math.max(r,0)+a,b=Rr(d),w=u.selectAll(".domain").data([0]),x=(w.enter().append("path").attr("class","domain"),na.transition(w));g.append("line"),g.append("text");var k,C,S,_,T=g.select("line"),$=v.select("line"),E=f.select("text").text(h),D=g.select("text"),M=v.select("text"),I="top"===i||"left"===i?-1:1;if("bottom"===i||"top"===i?(e=Xo,k="x",S="y",C="x2",_="y2",E.attr("dy",0>I?"0em":".71em").style("text-anchor","middle"),x.attr("d","M"+b[0]+","+I*o+"V0H"+b[1]+"V"+I*o)):(e=Yo,k="y",S="x",C="y2",_="x2",E.attr("dy",".32em").style("text-anchor",0>I?"end":"start"),x.attr("d","M"+I*o+","+b[0]+"H0V"+b[1]+"H"+I*o)),T.attr(_,I*r),D.attr(S,I*y),$.attr(C,0).attr(_,I*r),M.attr(k,0).attr(S,I*y),d.rangeBand){var P=d,A=P.rangeBand()/2;c=d=function(e){return P(e)+A}}else c.rangeBand?c=d:m.call(e,d,c);g.call(e,c,d),v.call(e,d,d)})}var t,n=na.scale.linear(),i=Bl,r=6,o=6,a=3,s=[10],l=null;return e.scale=function(t){return arguments.length?(n=t,e):n},e.orient=function(t){return arguments.length?(i=t in zl?t+"":Bl,e):i},e.ticks=function(){return arguments.length?(s=arguments,e):s},e.tickValues=function(t){return arguments.length?(l=t,e):l},e.tickFormat=function(n){return arguments.length?(t=n,e):t},e.tickSize=function(t){var n=arguments.length;return n?(r=+t,o=+arguments[n-1],e):r},e.innerTickSize=function(t){return arguments.length?(r=+t,e):r},e.outerTickSize=function(t){return arguments.length?(o=+t,e):o},e.tickPadding=function(t){return arguments.length?(a=+t,e):a},e.tickSubdivide=function(){return arguments.length&&e},e};var Bl="bottom",zl={top:1,right:1,bottom:1,left:1};na.svg.brush=function(){function e(o){o.each(function(){var o=na.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",r).on("touchstart.brush",r),a=o.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),o.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var s=o.selectAll(".resize").data(f,Te);s.exit().remove(),s.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Vl[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),s.style("display",e.empty()?"none":null);var c,d=na.transition(o),p=na.transition(a);l&&(c=Rr(l),p.attr("x",c[0]).attr("width",c[1]-c[0]),n(d)),u&&(c=Rr(u),p.attr("y",c[0]).attr("height",c[1]-c[0]),i(d)),t(d)})}function t(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+c[+/e$/.test(e)]+","+d[+/^s/.test(e)]+")"})}function n(e){e.select(".extent").attr("x",c[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",c[1]-c[0])}function i(e){e.select(".extent").attr("y",d[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",d[1]-d[0])}function r(){function r(){32==na.event.keyCode&&(E||(y=null,M[0]-=c[1],M[1]-=d[1],E=2),x())}function f(){32==na.event.keyCode&&2==E&&(M[0]+=c[1],M[1]+=d[1],E=0,x())}function g(){var e=na.mouse(w),r=!1;b&&(e[0]+=b[0],e[1]+=b[1]),E||(na.event.altKey?(y||(y=[(c[0]+c[1])/2,(d[0]+d[1])/2]),M[0]=c[+(e[0]<y[0])],M[1]=d[+(e[1]<y[1])]):y=null),T&&m(e,l,0)&&(n(S),r=!0),$&&m(e,u,1)&&(i(S),r=!0),r&&(t(S),C({type:"brush",mode:E?"move":"resize"}))}function m(e,t,n){var i,r,s=Rr(t),l=s[0],u=s[1],f=M[n],g=n?d:c,m=g[1]-g[0];return E&&(l-=f,u-=m+f),i=(n?h:p)?Math.max(l,Math.min(u,e[n])):e[n],E?r=(i+=f)+m:(y&&(f=Math.max(l,Math.min(u,2*y[n]-i))),i>f?(r=i,i=f):r=f),g[0]!=i||g[1]!=r?(n?a=null:o=null,g[0]=i,g[1]=r,!0):void 0}function v(){g(),S.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null),na.select("body").style("cursor",null),I.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),D(),C({type:"brushend"})}var y,b,w=this,k=na.select(na.event.target),C=s.of(w,arguments),S=na.select(w),_=k.datum(),T=!/^(n|s)$/.test(_)&&l,$=!/^(e|w)$/.test(_)&&u,E=k.classed("extent"),D=W(),M=na.mouse(w),I=na.select(sa).on("keydown.brush",r).on("keyup.brush",f);if(na.event.changedTouches?I.on("touchmove.brush",g).on("touchend.brush",v):I.on("mousemove.brush",g).on("mouseup.brush",v),S.interrupt().selectAll("*").interrupt(),E)M[0]=c[0]-M[0],M[1]=d[0]-M[1];else if(_){var P=+/w$/.test(_),A=+/^n/.test(_);b=[c[1-P]-M[0],d[1-A]-M[1]],M[0]=c[P],M[1]=d[A]}else na.event.altKey&&(y=M.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),na.select("body").style("cursor",k.style("cursor")),C({type:"brushstart"}),g()}var o,a,s=C(e,"brushstart","brush","brushend"),l=null,u=null,c=[0,0],d=[0,0],p=!0,h=!0,f=Wl[0];return e.event=function(e){e.each(function(){var e=s.of(this,arguments),t={x:c,y:d,i:o,j:a},n=this.__chart__||t;this.__chart__=t,Rl?na.select(this).transition().each("start.brush",function(){o=n.i,a=n.j,c=n.x,d=n.y,e({type:"brushstart"})}).tween("brush:brush",function(){var n=bi(c,t.x),i=bi(d,t.y);return o=a=null,function(r){c=t.x=n(r),d=t.y=i(r),e({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i,a=t.j,e({type:"brush",mode:"resize"}),e({type:"brushend"})}):(e({type:"brushstart"}),e({type:"brush",mode:"resize"}),e({type:"brushend"}))})},e.x=function(t){return arguments.length?(l=t,f=Wl[!l<<1|!u],e):l},e.y=function(t){return arguments.length?(u=t,f=Wl[!l<<1|!u],e):u},e.clamp=function(t){return arguments.length?(l&&u?(p=!!t[0],h=!!t[1]):l?p=!!t:u&&(h=!!t),e):l&&u?[p,h]:l?p:u?h:null},e.extent=function(t){var n,i,r,s,p;return arguments.length?(l&&(n=t[0],i=t[1],u&&(n=n[0],i=i[0]),o=[n,i],l.invert&&(n=l(n),i=l(i)),n>i&&(p=n,n=i,i=p),(n!=c[0]||i!=c[1])&&(c=[n,i])),u&&(r=t[0],s=t[1],l&&(r=r[1],s=s[1]),a=[r,s],u.invert&&(r=u(r),s=u(s)),r>s&&(p=r,r=s,s=p),(r!=d[0]||s!=d[1])&&(d=[r,s])),e):(l&&(o?(n=o[0],i=o[1]):(n=c[0],i=c[1],l.invert&&(n=l.invert(n),i=l.invert(i)),n>i&&(p=n,n=i,i=p))),u&&(a?(r=a[0],s=a[1]):(r=d[0],s=d[1],u.invert&&(r=u.invert(r),s=u.invert(s)),r>s&&(p=r,r=s,s=p))),l&&u?[[n,r],[i,s]]:l?[n,i]:u&&[r,s])},e.clear=function(){return e.empty()||(c=[0,0],d=[0,0],o=a=null),e},e.empty=function(){return!!l&&c[0]==c[1]||!!u&&d[0]==d[1]},na.rebind(e,s,"on")};var Vl={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Wl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Gl=ps.format=ys.timeFormat,Jl=Gl.utc,Xl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Gl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ko:Xl,Ko.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Ko.toString=Xl.toString,ps.second=Fe(function(e){return new hs(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))},function(e){return e.getSeconds()}),ps.seconds=ps.second.range,ps.seconds.utc=ps.second.utc.range,ps.minute=Fe(function(e){return new hs(6e4*Math.floor(e/6e4))},function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))},function(e){return e.getMinutes()}),ps.minutes=ps.minute.range,ps.minutes.utc=ps.minute.utc.range,ps.hour=Fe(function(e){var t=e.getTimezoneOffset()/60;return new hs(36e5*(Math.floor(e/36e5-t)+t))},function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))},function(e){return e.getHours()}),ps.hours=ps.hour.range,ps.hours.utc=ps.hour.utc.range,ps.month=Fe(function(e){return e=ps.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),ps.months=ps.month.range,ps.months.utc=ps.month.utc.range;var Yl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Kl=[[ps.second,1],[ps.second,5],[ps.second,15],[ps.second,30],[ps.minute,1],[ps.minute,5],[ps.minute,15],[ps.minute,30],[ps.hour,1],[ps.hour,3],[ps.hour,6],[ps.hour,12],[ps.day,1],[ps.day,2],[ps.week,1],[ps.month,1],[ps.month,3],[ps.year,1]],Ql=Gl.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",Et]]),Zl={range:function(e,t,n){return na.range(Math.ceil(e/n)*n,+t,n).map(Zo)},floor:Te,ceil:Te};Kl.year=ps.year,ps.scale=function(){return Qo(na.scale.linear(),Kl,Ql)};var eu=Kl.map(function(e){return[e[0].utc,e[1]]}),tu=Jl.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",Et]]);eu.year=ps.year.utc,ps.scale.utc=function(){return Qo(na.scale.linear(),eu,tu)},na.text=$e(function(e){return e.responseText}),na.json=function(e,t){return Ee(e,"application/json",ea,t)},na.html=function(e,t){return Ee(e,"text/html",ta,t)},na.xml=$e(function(e){return e.responseXML}),"function"==typeof define&&define.amd?define(na):"object"==typeof module&&module.exports&&(module.exports=na),this.d3=na}(),function(e,t,n){"use strict";var i={};i.tabbable=function(){return{restrict:"C",compile:function(e){var n=t.element('<ul class="nav nav-tabs"></ul>'),i=t.element('<div class="tab-content"></div>');i.append(e.contents()),e.append(n).append(i)},controller:["$scope","$element",function(e,n){var i,r=n.contents().eq(0),o=n.controller("ngModel")||{},a=[];o.$render=function(){var e=this.$viewValue;if((i?i.value!=e:e)&&(i&&(i.paneElement.removeClass("active"),i.tabElement.removeClass("active"),i=null),e)){for(var t=0,n=a.length;n>t;t++)if(e==a[t].value){i=a[t];break}i&&(i.paneElement.addClass("active"),i.tabElement.addClass("active"))}},this.addPane=function(n,s){function l(){d.title=s.title,d.value=s.value||s.title,o.$setViewValue||o.$viewValue&&d!=i||(o.$viewValue=d.value),o.$render()}var u=t.element("<li><a href></a></li>"),c=u.find("a"),d={paneElement:n,paneAttrs:s,tabElement:u};return a.push(d),s.$observe("value",l)(),s.$observe("title",function(){l(),c.text(d.title)})(),r.append(u),u.bind("click",function(t){t.preventDefault(),t.stopPropagation(),o.$setViewValue?e.$apply(function(){o.$setViewValue(d.value),o.$render()}):(o.$viewValue=d.value,o.$render())}),function(){d.tabElement.remove();for(var e=0,t=a.length;t>e;e++)d==a[e]&&a.splice(e,1)}}}]}},i.tabPane=function(){return{require:"?^tabbable",restrict:"C",link:function(e,t,n,i){i&&t.bind("$remove",i.addPane(t,n))}}};var r="hawtio-tabbable";t.module(r,[]).directive(i),hawtioPluginLoader.addModule(r)}(window,window.angular);var DataTable;!function(e){e.pluginName="datatable",e.log=Logger.get("DataTable"),e._module=angular.module(e.pluginName,[]),hawtioPluginLoader.addModule(e.pluginName)}(DataTable||(DataTable={}));var DataTable;!function(e){function t(e,t,n){var i=n,r=!1;return angular.forEach(t,function(t){var n=e[t];!r&&angular.isDefined(n)&&(i=n,r=!0)}),i}e._module.directive("hawtioSimpleTable",["$compile",function(n){return{restrict:"A",scope:{config:"=hawtioSimpleTable"},link:function(i,r,o){function a(){var e=u.selectedItems;if(e||(e=[],u.selectedItems=e),angular.isString(e)){var t=e;e=Core.pathGet(p,t),e||(e=[],p[t]=e)}return e}function s(){var e=i.config.multiSelect;return angular.isUndefined(e)&&(e=!0),e}var l=function(e,t){return e.id||e._id||e.name||t},u=i.config,c=u.data||"data",d=u.primaryKeyFn||l;i.rows=[];var p=i.$parent||i,h=function(){var t=Core.pathGet(p,c);if(t&&!angular.isArray(t)&&(t=[t],Core.pathSet(p,c,t)),!("sortInfo"in u)&&"columnDefs"in u){var n,r=u.columnDefs.first().defaultSort;n=angular.isUndefined(r)||r===!0?u.columnDefs.first().field:u.columnDefs.slice(1).first().field,u.sortInfo={sortBy:n,ascending:!0}}var o=u.columnDefs.find(function(e){return e.field===u.sortInfo.sortBy?e:void 0});angular.isDefined(o)&&(o=o.customSortField);var a=i.config.sortInfo||{sortBy:"",ascending:!0},s=-1,l=(t||[]).sortBy(o||a.sortBy,!a.ascending).map(function(e){return s++,{entity:e,index:s,getProperty:function(t){return e[t]}}}),h=[];l.forEach(function(t,n){var i=d(t.entity,t.index),r=u.selectedItems.some(function(e){var t=d(e,e.index);return angular.equals(i,t)});r&&(t.entity.index=t.index,h.push(t.entity),e.log.debug("Data changed so keep selecting row at index "+t.index))}),u.selectedItems=h,Core.pathSet(p,["hawtioSimpleTable",c,"rows"],l),i.rows=l};p.$watchCollection(c,h),p.$on("hawtio.datatable."+c,h),i.toggleAllSelections=function(){var e=i.config.allRowsSelected,t=e,n=a();n.splice(0,n.length),angular.forEach(i.rows,function(i){i.selected=t,e&&n.push(i.entity)})},i.toggleRowSelection=function(e){if(e){var t=a();s()||(t.splice(0,t.length),angular.forEach(i.rows,function(t){t!==e&&(t.selected=!1)}));var n=e.entity;if(n){var r=t.indexOf(n);e.selected?0>r&&t.push(n):(i.config.allRowsSelected=!1,r>=0&&t.splice(r,1))}}},i.sortBy=function(e){i.config.sortInfo.sortBy===e?i.config.sortInfo.ascending=!i.config.sortInfo.ascending:(i.config.sortInfo.sortBy=e,i.config.sortInfo.ascending=!0),p.$broadcast("hawtio.datatable."+c)},i.getClass=function(e){return"sortInfo"in i.config&&i.config.sortInfo.sortBy===e?i.config.sortInfo.ascending?"asc":"desc":""},i.showRow=function(e){var t=Core.pathGet(i,["config","filterOptions","filterText"]);if(Core.isBlank(t))return!0;var n=null;try{n=e.entity.title}catch(r){}n||(n=e.entity);var o=FilterHelpers.search(n,t);return o},i.isSelected=function(e){return u.selectedItems.some(e.entity)},i.onRowSelected=function(t){var n=u.selectedItems.indexOf(t.entity);n>=0?(e.log.debug("De-selecting row at index "+t.index),u.selectedItems.splice(n,1)):(u.multiSelect||(u.selectedItems.length=0),e.log.debug("Selecting row at index "+t.index),t.entity.index=t.index,u.selectedItems.push(t.entity))},i.$watchCollection("rows",function(){var e=r;e.empty();var o,a=t(u,["showSelectionCheckbox","displaySelectionCheckbox"],!0),l=t(u,["enableRowClickSelection"],!1);o=l?"ng-mousedown='onRowSelected(row)' ":"";var c="<thead><tr>",d="<tbody><tr ng-repeat='row in rows track by $index' ng-show='showRow(row)' "+o+"ng-class=\"{'selected': isSelected(row)}\" >",p=0;if(a){var h=s()?"<input type='checkbox' ng-show='rows.length' ng-model='config.allRowsSelected' ng-change='toggleAllSelections()'>":"";c+="\n<th class='simple-table-checkbox'>"+h+"</th>",d+="\n<td class='simple-table-checkbox'><input type='checkbox' ng-model='row.selected' ng-change='toggleRowSelection(row)'></td>"}angular.forEach(u.columnDefs,function(e){var t=e.field,n=e.cellTemplate||'<div class="ngCellText" title="{{row.entity.'+t+'}}">{{row.entity.'+t+"}}</div>";c+="\n<th class='clickable no-fade table-header' ng-click=\"sortBy('"+t+"')\" ng-class=\"getClass('"+t+"')\">{{config.columnDefs["+p+"].displayName}}<span class='indicator'></span></th>",d+="\n<td>"+n+"</td>",p+=1});var f=c+"\n</tr></thead>\n"+d+"\n</tr></tbody>",g=n(f)(i);e.html(g)})}}}])}(DataTable||(DataTable={}));var CodeEditor;!function(e){function t(e){var t="text";if(e){t="javascript";var n=e.toString().trimLeft().trimRight();n&&"<"===n.first()&&">"===n.last()&&(t="xml")}return t}function n(e){if(e){var t=e.lineCount(),n={line:0,ch:0},i={line:t-1,ch:e.getLine(t-1).length};e.autoFormatRange(n,i),e.setSelection(n,n)}}function i(t){void 0===t&&(t={}),t.extraKeys=t.extraKeys||{},function(e){e=e||{name:"text"},"object"!=typeof e&&(e={name:e});var t=e.name;"javascript"===t&&angular.extend(e,{json:!0})}(t.mode),function(e){var t=CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder),n=CodeMirror.newFoldFunction(CodeMirror.tagRangeFinder),i=function(e,i){var r=e.getOption("mode"),o=r.name;r&&o&&("javascript"===o?t(e,i):("xml"===o||o.startsWith("html"))&&n(e,i))};e.onGutterClick=i,e.extraKeys=angular.extend(e.extraKeys,{"Ctrl-Q":function(e){i(e,e.getCursor().line)}})}(t);var n=t.readOnly;return n||(t.matchBrackets=!0),angular.extend(t,e.GlobalCodeMirrorOptions),t}e.GlobalCodeMirrorOptions={theme:"default",tabSize:4,lineNumbers:!0,indentWithTabs:!0,lineWrapping:!0,autoCloseTags:!0},e.detectTextFormat=t,e.autoFormatEditor=n,e.createEditorSettings=i}(CodeEditor||(CodeEditor={}));var HawtioEditor;!function(e){e.pluginName="hawtio-editor",e.templatePath="plugins/editor/html",e.log=Logger.get(e.pluginName)}(HawtioEditor||(HawtioEditor={}));var HawtioEditor;!function(e){e._module=angular.module(e.pluginName,[]),e._module.run(function(){e.log.debug("loaded")}),hawtioPluginLoader.addModule(e.pluginName)}(HawtioEditor||(HawtioEditor={}));var HawtioEditor;!function(e){function t(t){return{restrict:"A",replace:!0,templateUrl:UrlHelpers.join(e.templatePath,"editor.html"),scope:{text:"=hawtioEditor",mode:"=",outputEditor:"@",name:"@"},controller:["$scope","$element","$attrs",function(e,t,n){e.codeMirror=null,e.doc=null,e.options=[],UI.observe(e,n,"name","editor"),e.applyOptions=function(){e.codeMirror&&(e.options.each(function(t){e.codeMirror.setOption(t.key,t.value)}),e.options=[])},e.$watch(_.debounce(function(){e.codeMirror&&e.codeMirror.refresh()},100,{trailing:!0})),e.$watch("codeMirror",function(){e.codeMirror&&(e.doc=e.codeMirror.getDoc(),e.codeMirror.on("change",function(t){e.text=e.doc.getValue(),e.dirty=!e.doc.isClean(),Core.$apply(e)}))}),e.$watch("text",function(t,n){if(e.codeMirror&&e.doc&&!e.codeMirror.hasFocus()){var i=e.text||"";(angular.isArray(i)||angular.isObject(i))&&(i=JSON.stringify(i,null," "),e.mode="javascript",e.codeMirror.setOption("mode","javascript")),e.doc.setValue(i)}})}],link:function(e,n,i){"dirty"in i&&(e.dirtyTarget=i.dirty,e.$watch("$parent['"+e.dirtyTarget+"']",function(t,n){t!==n&&(e.dirty=t)}));var r=_.cloneDeep(i);if(delete r.$$element,delete r.$attr,delete r["class"],delete r.hawtioEditor,delete r.mode,delete r.dirty,delete r.outputEditor,"onChange"in i){var o=i.onChange;delete r.onChange,e.options.push({onChange:function(n){var i=t(o);i&&i(e.$parent,{codeMirror:n})}})}angular.forEach(r,function(t,n){e.options.push({key:n,value:t})}),e.$watch("mode",function(){e.mode&&(e.codeMirror?e.codeMirror.setOption("mode",e.mode):e.options.push({key:"mode",value:e.mode}))}),e.$watch("dirty",function(t,n){e.dirty&&!e.doc.isClean()&&e.doc.markClean(),t!==n&&"dirtyTarget"in e&&(e.$parent[e.dirtyTarget]=e.dirty)}),e.$watch("text",function(){if(!e.codeMirror){var t={value:e.text};t=CodeEditor.createEditorSettings(t),e.codeMirror=CodeMirror.fromTextArea(n.find("textarea").get(0),t);var i=e.outputEditor;if(i){var r=e.$parent||e;Core.pathSet(r,i,e.codeMirror)}e.applyOptions()}})}}}e._module.directive("hawtioEditor",["$parse",function(t){return e.Editor(t)}]),e.Editor=t}(HawtioEditor||(HawtioEditor={}));var ForceGraph;!function(e){var t="forceGraph";e._module=angular.module(t,[]),e._module.directive("hawtioForceGraph",function(){return new e.ForceGraphDirective}),hawtioPluginLoader.addModule(t)}(ForceGraph||(ForceGraph={}));var ForceGraph;!function(e){var t=(Logger.get("ForceGraph"),function(){function e(){this.restrict="A",this.replace=!0,this.transclude=!1,this.scope={graph:"=graph",nodesize:"@",selectedModel:"@",linkDistance:"@",markerKind:"@",charge:"@"},this.link=function(e,t,n){e.trans=[0,0],e.scale=1,e.$watch("graph",function(e,t){i()}),e.redraw=function(){e.trans=d3.event.translate,e.scale=d3.event.scale,e.viewport.attr("transform","translate("+e.trans+") scale("+e.scale+")")},e.tick=function(){e.graphEdges.attr("d",function(e){var t=e.target.x-e.source.x,n=e.target.y-e.source.y,i=Math.sqrt(t*t+n*n);return"M"+e.source.x+","+e.source.y+"A"+i+","+i+" 0 0,1 "+e.target.x+","+e.target.y}),e.graphNodes.attr("transform",function(e){return"translate("+e.x+","+e.y+")"}),e.graphLabels.attr("transform",function(e){return"translate("+e.x+","+e.y+")"}),(Object.hasOwnProperty.call(window,"ActiveXObject")||!window.ActiveXObject)&&e.svg.selectAll(".link").each(function(){this.parentNode.insertBefore(this,this)})},e.mover=function(t){null!=t.popup&&$("#pop-up").fadeOut(100,function(){null!=t.popup.title?$("#pop-up-title").html(t.popup.title):$("#pop-up-title").html(""),null!=t.popup.content?$("#pop-up-content").html(t.popup.content):$("#pop-up-content").html("");var n=t.x*e.scale+e.trans[0]+20,i=t.y*e.scale+e.trans[1]+20;$("#pop-up").css({left:n,top:i}),$("#pop-up").fadeIn(100)})},e.mout=function(e){$("#pop-up").fadeOut(50)};var i=function(){function n(e){return e.image&&e.image.url}var i=$(t),r=$(t).parent().height(),o=$(t).parent().width();i.children("svg").remove(),e.svg=d3.select(i[0]).append("svg").attr("width",o).attr("height",r);var a=null;if(e.graph&&(a=e.graph.linktypes),a&&(e.svg.append("svg:defs").selectAll("marker").data(a).enter().append("svg:marker").attr("id",String).attr("viewBox","0 -5 10 10").attr("refX",15).attr("refY",-1.5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("svg:path").attr("d","M0,-5L10,0L0,5"),e.svg.append("svg:g").append("svg:rect").attr("class","graphbox.frame").attr("width",o).attr("height",r),e.viewport=e.svg.append("svg:g").call(d3.behavior.zoom().on("zoom",e.redraw)).append("svg:g"),e.viewport.append("svg:rect").attr("width",1e6).attr("height",1e6).attr("class","graphbox").attr("transform","translate(-50000, -500000)"),e.graph)){var s=e.$parent||e,l=e.selectedModel||"selectedNode";e.force=d3.layout.force().nodes(e.graph.nodes).links(e.graph.links).size([o,r]).on("tick",e.tick),angular.isDefined(e.linkDistance)&&e.force.linkDistance(e.linkDistance),angular.isDefined(e.charge)&&e.force.charge(e.charge);var u=e.markerKind||"marker-end";e.graphEdges=e.viewport.append("svg:g").selectAll("path").data(e.force.links()).enter().append("svg:path").attr("class",function(e){return"link "+e.type}).attr(u,function(e){return"url(#"+e.type+")"}),e.graphNodes=e.viewport.append("svg:g").selectAll("circle").data(e.force.nodes()).enter().append("a").attr("xlink:href",function(e){return e.navUrl}).on("mouseover.onLink",function(e,t){var n=d3.select(d3.event.target);n.classed("selected",!0),s[l]=e,Core.pathSet(s,l,e),Core.$apply(s)}).on("mouseout.onLink",function(e,t){var n=d3.select(d3.event.target);n.classed("selected",!1)}),e.graphNodes.filter(function(e){return null!=e.image}).append("image").attr("xlink:href",function(e){return e.image.url}).attr("x",function(e){return-(e.image.width/2)}).attr("y",function(e){return-(e.image.height/2)}).attr("width",function(e){return e.image.width}).attr("height",function(e){return e.image.height}),e.graphNodes.filter(function(e){return!n(e)}).append("circle").attr("class",function(e){return e.type}).attr("r",function(t){return t.size||e.nodesize}),e.graphLabels=e.viewport.append("svg:g").selectAll("g").data(e.force.nodes()).enter().append("svg:g"),e.graphLabels.append("svg:text").attr("x",8).attr("y",".31em").attr("class","shadow").text(function(e){return e.name}),e.graphLabels.append("svg:text").attr("x",8).attr("y",".31em").text(function(e){return e.name}),e.force.start(),e.graphNodes.call(e.force.drag).on("mouseover",e.mover).on("mouseout",e.mout)}}}}return e}());e.ForceGraphDirective=t}(ForceGraph||(ForceGraph={}));var ForceGraph;!function(e){var t=function(){function e(){this.nodes={},this.links=[],this.linkTypes={}}return e.prototype.addNode=function(e){this.nodes[e.id]||(this.nodes[e.id]=e)},e.prototype.getNode=function(e){return this.nodes[e]},e.prototype.hasLinks=function(e){var t=this,n=!1;return this.links.forEach(function(i){(i.source.id==e||i.target.id==e)&&(n=n||null!=t.nodes[i.source.id]&&null!=t.nodes[i.target.id])}),n},e.prototype.addLink=function(e,t,n){null!=this.nodes[e]&&null!=this.nodes[t]&&(this.links.push({source:this.nodes[e],target:this.nodes[t],type:n}),this.linkTypes[n]||(this.linkTypes[n]={used:!0}))},e.prototype.nodeIndex=function(e,t){var n=-1,i=0;for(i=0;i<t.length;i++){var r=t[i];if(r.id==e){n=i;break}}return n},e.prototype.filterNodes=function(e){var t={},n=[];d3.values(this.nodes).forEach(function(n){e(n)&&(t[n.id]=n)}),this.links.forEach(function(e){t[e.source.id]&&t[e.target.id]&&n.push(e)}),this.nodes=t,this.links=n},e.prototype.buildGraph=function(){var e=this,t=[],n=d3.keys(this.linkTypes),i=[];return d3.values(this.nodes).forEach(function(e){(null==e.includeInGraph||e.includeInGraph)&&(e.includeInGraph=!0,t.push(e))}),this.links.forEach(function(n){null!=e.nodes[n.source.id]&&null!=e.nodes[n.target.id]&&e.nodes[n.source.id].includeInGraph&&e.nodes[n.target.id].includeInGraph&&i.push({source:e.nodeIndex(n.source.id,t),target:e.nodeIndex(n.target.id,t),type:n.type})}),{nodes:t,links:i,linktypes:n}},e}();e.GraphBuilder=t}(ForceGraph||(ForceGraph={}));var Toastr;!function(e){var t="hawtio-toastr";angular.module(t,[]);hawtioPluginLoader.addModule(t)}(Toastr||(Toastr={}));var Core;!function(e){function t(e,t,n){void 0===n&&(n=null),null===n&&(n={}),("error"===e||"warning"===e)&&(angular.isDefined(n.onclick)||(n.onclick=window.showLogPanel)),toastr[e](t,"",n)}function n(){toastr.clear()}e.notification=t,e.clearNotifications=n}(Core||(Core={}));var UI;!function(e){e.log=Logger.get("UI"),e.scrollBarWidth=null,e.pluginName="hawtio-ui",e.templatePath="plugins/ui/html/"}(UI||(UI={}));var UI;!function(e){e._module=angular.module(e.pluginName,[]),e._module.factory("UI",function(){return e}),e._module.factory("marked",function(){return marked.setOptions({gfm:!0,tables:!0,breaks:!1,pedantic:!0,sanitize:!1,smartLists:!0,langPrefix:"language-"}),marked}),e._module.directive("compile",["$compile",function(e){return function(t,n,i){t.$watch(function(e){return e.$eval(i.compile)},function(i){n.html(i),e(n.contents())(t)})}}]),e._module.run([function(){e.log.debug("loaded")}]),hawtioPluginLoader.addModule(e.pluginName)}(UI||(UI={}));var UI;!function(e){e._module.directive("hawtioAutoColumns",function(){return new e.AutoColumns});var t=function(){function t(){this.restrict="A",this.link=function(t,n,i){var r=e.getIfSet("hawtioAutoColumns",i,"div"),o=e.getIfSet("minMargin",i,"3").toNumber(),a=Core.throttled(function(){var e=n.innerWidth(),t=0,i=n.children(r);if(0!==i.length&&(i.each(function(e){var n=$(this);n.is(":visible")&&n.outerWidth()>t&&(t=n.outerWidth())}),0!==t)){t+=2*o;var a=Math.floor(e/t);i.length<a&&(a=i.length);var s=(e-a*t)/a/2;i.each(function(e){$(this).css({"margin-left":s,"margin-right":s})})}},500);setTimeout(a,300),t.$watch(a),$(window).resize(a)}}return t}();e.AutoColumns=t}(UI||(UI={}));var UI;!function(e){e._module.directive("hawtioAutoDropdown",function(){return e.AutoDropDown}),e.AutoDropDown={restrict:"A",link:function(t,n,i){function r(t){var i=n.get(0);if(!(t&&t.relatedNode!==i&&t.type&&t&&"resize"!==t.type)){var r=$(n.find(".overflow")),o=$(r.find("ul.dropdown-menu")),a=0,s=0;try{a=r.outerWidth()-r.innerWidth(),s=r.position().left-n.position().left-50}catch(l){e.log.debug("caught "+l)}if(n.children("li:not(.overflow):not(.pull-right):not(:hidden)").each(function(){var e=$(this);s-=e.outerWidth(!0),0>s&&(e.detach(),e.prependTo(o))}),o.children().length>0&&r.css({visibility:"visible"}),s>130){var u=!1;o.children("li:not(.overflow):not(.pull-right)").filter(function(){return"none"!==$(this).css("display")}).each(function(){if(!u){var e=$(this);s>e.outerWidth()?(s-=e.outerWidth(),e.detach(),e.insertBefore(r)):u=!0}})}0===o.children().length&&r.css({visibility:"hidden"})}}$(window).resize(r),n.get(0).addEventListener("DOMNodeInserted",r),t.$watch(setTimeout(r,500))}}}(UI||(UI={}));var UI;!function(e){function t(){return{restrict:"E",replace:!0,templateUrl:e.templatePath+"breadcrumbs.html",require:"hawtioDropDown",scope:{config:"="},controller:["$scope","$element","$attrs",function(e,t,n){function i(t,n){t.level=n,n>0&&(t.breadcrumbAction=t.action,t.action=e.action),t.items&&t.items.forEach(function(e){i(e,n+1)})}function r(t,n,i){if(0!==n.length){var o=n.removeAt(0)[0];if(t&&t.items){var a=!1;t.items.forEach(function(t){a||t.title!==o||(a=!0,e.levels[i]=t,r(t,n,i+1))})}}}e.action="itemClicked(config, $event)",e.levels={},e.itemClicked=function(t,n){if(t.level&&angular.isNumber(t.level)){e.levels[t.level]=t;var i=_.keys(e.levels).sortBy(""),r=i.from(t.level+1);if(r.forEach(function(t){t in e.levels&&(e.levels[t]={},delete e.levels[t])}),angular.forEach(e.levels,function(t,n){t.items&&t.items.length>0&&t.items.forEach(function(t){t.action=e.action})}),t.items)t.open=!0,t.items.forEach(function(t){t.action=e.action}),delete t.action;else{var i=_.keys(e.levels).keys().sortBy(""),o=[];i.forEach(function(t){o.push(e.levels[t].title)});var a="/"+o.join("/");e.config.path=a}t.level>1&&(n.preventDefault(),n.stopPropagation())}},e.$watch("config.path",function(t,n){if(!Core.isBlank(t)){var i=t.split("/").exclude(function(e){return Core.isBlank(e)}),o=!0;if(i.forEach(function(t,n){o&&(!e.levels[n]||Core.isBlank(e.levels[n].title)||e.levels[n].title!==t)&&(o=!1)}),o)return;e.levels=[],e.levels[0]=e.config,r(e.config,i.from(0),1)}}),e.$watch("config",function(t,n){i(e.config,0),e.levels[0]=e.config})}]}}e.hawtioBreadcrumbs=t,e._module.directive("hawtioBreadcrumbs",e.hawtioBreadcrumbs)}(UI||(UI={}));var UI;!function(e){e.colors=["#5484ED","#A4BDFC","#46D6DB","#7AE7BF","#51B749","#FBD75B","#FFB878","#FF887C","#DC2127","#DBADFF","#E1E1E1"]}(UI||(UI={}));var UI;!function(e){e._module.directive("hawtioColorPicker",function(){return new e.ColorPicker}),e.selected="selected",e.unselected="unselected";var t=function(){function t(){this.restrict="A",this.replace=!0,this.scope={property:"=hawtioColorPicker"},this.templateUrl=e.templatePath+"colorPicker.html",this.compile=function(t,n,i){return{post:function(t,n,i,r){t.colorList=[],angular.forEach(e.colors,function(n){var i=e.unselected;t.property===n&&(i=e.selected),t.colorList.push({color:n,select:i})})}}},this.controller=["$scope","$element","$timeout",function(t,n,i){t.popout=!1,t.$watch("popout",function(){n.find(".color-picker-popout").toggleClass("popout-open",t.popout)}),t.selectColor=function(n){for(var i=0;i<t.colorList.length;i++)t.colorList[i].select=e.unselected,t.colorList[i]===n&&(t.property=n.color,t.colorList[i].select=e.selected)}}]}return t}();e.ColorPicker=t}(UI||(UI={}));var UI;!function(e){e._module.directive("hawtioConfirmDialog",function(){return new e.ConfirmDialog});var t=function(){function t(){this.restrict="A",this.replace=!0,this.transclude=!0,this.templateUrl=e.templatePath+"confirmDialog.html",this.scope={show:"=hawtioConfirmDialog",title:"@",okButtonText:"@",showOkButton:"@",cancelButtonText:"@",onCancel:"&?",onOk:"&?",onClose:"&?"},this.controller=["$scope","$element","$attrs","$transclude","$compile",function(e,t,n,i,r){function o(){setTimeout(function(){
|
|
3255
|
|
-var e=$("div.modal-backdrop");e&&e.length&&(Logger.get("ConfirmDialog").debug("Removing the backdrop div! "+e),e.remove())},200)}e.clone=null,i(function(t){e.clone=$(t).filter(".dialog-body")}),e.$watch("show",function(){e.show&&setTimeout(function(){e.body=$(".modal-body"),e.body.html(r(e.clone.html())(e.$parent)),Core.$apply(e)},50)}),n.$observe("okButtonText",function(t){angular.isDefined(t)||(e.okButtonText="OK")}),n.$observe("cancelButtonText",function(t){angular.isDefined(t)||(e.cancelButtonText="Cancel")}),n.$observe("title",function(t){angular.isDefined(t)||(e.title="Are you sure?")}),e.cancel=function(){e.show=!1,e.$parent.$eval(e.onCancel),o()},e.submit=function(){e.show=!1,e.$parent.$eval(e.onOk),o()},e.close=function(){e.$parent.$eval(e.onClose),o()}}]}return t}();e.ConfirmDialog=t}(UI||(UI={}));var UI;!function(e){e._module.controller("UI.DeveloperPageController",["$scope","$http",function(t,n){t.getContents=function(t,i){var r=UrlHelpers.join(e.templatePath,"test",t);n({method:"GET",url:r}).success(function(e,t,n,r){i(e)}).error(function(e,n,r,o){i("Failed to fetch "+t+": "+e)})}}])}(UI||(UI={}));var UI;!function(e){function t(t){var n=HawtioCore.injector.get("$dialog");return n.dialog({resolve:{options:function(){return t}},templateUrl:UrlHelpers.join(e.templatePath,"multiItemConfirmActionDialog.html"),controller:["$scope","dialog","options",function(e,t,n){e.options=n,e.close=function(e){t.close(),n.onClose(e)},e.getName=function(e){return Core.pathGet(e,n.index.split("."))}}]})}var n=function(){function e(){this.show=!1,this.options={backdropFade:!0,dialogFade:!0}}return e.prototype.open=function(){this.show=!0},e.prototype.close=function(){this.show=!1,this.removeBackdropFadeDiv(),setTimeout(this.removeBackdropFadeDiv,100)},e.prototype.removeBackdropFadeDiv=function(){$("div.modal-backdrop").remove()},e}();e.Dialog=n,e.multiItemConfirmActionDialog=t}(UI||(UI={}));var UI;!function(e){e.hawtioDrag=e._module.directive("hawtioDrag",[function(){return{replace:!1,transclude:!0,restrict:"A",template:"<span ng-transclude></span>",scope:{data:"=hawtioDrag"},link:function(e,t,n){t.attr({draggable:"true"});var i=t[0];i.draggable=!0,i.addEventListener("dragstart",function(n){return n.dataTransfer.effectAllowed="move",n.dataTransfer.setData("data",e.data),t.addClass("drag-started"),!1},!1),i.addEventListener("dragend",function(e){t.removeClass("drag-started")},!1)}}}]),e.hawtioDrop=e._module.directive("hawtioDrop",[function(){return{replace:!1,transclude:!0,restrict:"A",template:"<span ng-transclude></span>",scope:{onDrop:"&?hawtioDrop",ngModel:"=",property:"@",prefix:"@"},link:function(e,t,n){var i=function(e){return e.preventDefault&&e.preventDefault(),t.addClass("drag-over"),!1},r=t[0];r.addEventListener("dragenter",i,!1),r.addEventListener("dragover",i,!1),r.addEventListener("dragleave",function(e){return t.removeClass("drag-over"),!1},!1),r.addEventListener("drop",function(n){n.stopPropagation&&n.stopPropagation(),t.removeClass("drag-over");var i=n.dataTransfer.getData("data");e.onDrop&&e.$eval(e.onDrop,{data:i,model:e.ngModel,property:e.property});var r="hawtio-drop";return Core.isBlank(e.prefix)||(r=e.prefix+"-"+r),e.$emit(r,{data:i,model:e.ngModel,property:e.property}),Core.$apply(e),!1},!1)}}}])}(UI||(UI={}));var UI;!function(e){function t(t){return{restrict:"A",replace:!0,templateUrl:e.templatePath+"dropDown.html",scope:{config:"=hawtioDropDown"},controller:["$scope","$element","$attrs",function(e,t,n){e.config||(e.config={}),"open"in e.config||(e.config.open=!1),e.action=function(t,n){if("items"in t&&!("action"in t))t.open=!t.open,n.preventDefault(),n.stopPropagation();else if("action"in t){var i=t.action;angular.isFunction(i)?i():angular.isString(i)&&e.$parent.$eval(i,{config:t,$event:n})}},e.$watch("config.items",function(t,n){t!==n&&(e.menuStyle=e.menuStyle+" ")},!0),e.submenu=function(e){return e&&e.submenu?"sub-menu":""},e.icon=function(e){return e&&!Core.isBlank(e.icon)?e.icon:"fa fa-spacer"},e.open=function(e){return e&&!e.open?"":"open"}}],link:function(e,n,i){e.menuStyle=t.get("withsubmenus.html"),"processSubmenus"in i&&(Core.parseBooleanValue(i.processSubmenus)||(e.menuStyle=t.get("withoutsubmenus.html")))}}}e.hawtioDropDown=t,e._module.directive("hawtioDropDown",["$templateCache",e.hawtioDropDown])}(UI||(UI={}));var UI;!function(e){e._module.directive("editableProperty",["$parse",function(t){return new e.EditableProperty(t)}]);var t=function(){function t(t){this.$parse=t,this.restrict="E",this.scope=!0,this.templateUrl=e.templatePath+"editableProperty.html",this.require="ngModel",this.link=null,this.link=function(e,n,i,r){function o(){return":input[type="+e.inputType+"]"}e.inputType=i.type||"text",e.min=i.min,e.max=i.max,e.getText=function(){return e.text?"password"===e.inputType?StringHelpers.obfusicate(e.text):e.text:""},e.editing=!1,$(n.find(".fa fa-pencil")[0]).hide(),e.getPropertyName=function(){var n=t(i.property)(e);return n||0===n||(n=i.property),n},r.$render=function(){r.$viewValue&&(e.text=r.$viewValue[e.getPropertyName()])},e.getInputStyle=function(){if(!e.text)return{};var t=(e.text+"").length/1.2;return 5>t&&(t=5),{width:t+"em"}},e.showEdit=function(){$(n.find(".fa fa-pencil")[0]).show()},e.hideEdit=function(){$(n.find(".fa fa-pencil")[0]).hide()},e.$watch("editing",function(e,t){e!==t&&e&&$(n.find(o())).focus().select()}),e.doEdit=function(){e.editing=!0},e.stopEdit=function(){$(n.find(o())[0]).val(r.$viewValue[e.getPropertyName()]),e.editing=!1},e.saveEdit=function(){var t=$(n.find(o())[0]).val(),a=r.$viewValue;a[e.getPropertyName()]=t,r.$setViewValue(a),r.$render(),e.editing=!1,e.$parent.$eval(i.onSave)}}}return t}();e.EditableProperty=t}(UI||(UI={}));var UI;!function(e){function t(e){return e.hasClass("opened")||!e.hasClass("closed")}function n(e){return e?!0:!1}e._module.directive("expandable",function(){return new e.Expandable});var i=function(){function e(){var e=this;this.log=Logger.get("Expandable"),this.restrict="C",this.replace=!1,this.link=null,this.link=function(i,r,o){var a=e,s=r,l=null,u=null;angular.isDefined(o.model)&&(l=o.model,u=i[l],angular.isDefined(i[l].expanded)?u.expanded?a.forceOpen(u,s,i):a.forceClose(u,s,i):u.expanded=s.hasClass("opened"),l&&i.$watch(l+".expanded",function(e,t){n(e)!==n(t)&&(e?a.open(u,s,i):a.close(u,s,i))}));var c=s.find(".title"),d=s.find(".cancel");d.bind("click",function(){return u=i[l],a.forceClose(u,s,i),!1}),c.bind("click",function(){return u=i[l],t(s)?a.close(u,s,i):a.open(u,s,i),!1})}}return e.prototype.open=function(e,t,n){t.find(".expandable-body").slideDown(400,function(){t.hasClass("opened")||t.addClass("opened"),t.removeClass("closed"),e&&(e.expanded=!0),Core.$apply(n)})},e.prototype.close=function(e,t,n){t.find(".expandable-body").slideUp(400,function(){t.removeClass("opened"),t.hasClass("closed")||t.addClass("closed"),e&&(e.expanded=!1),Core.$apply(n)})},e.prototype.forceClose=function(e,t,n){t.find(".expandable-body").slideUp(0,function(){t.hasClass("closed")||t.addClass("closed"),t.removeClass("opened"),e&&(e.expanded=!1),Core.$apply(n)})},e.prototype.forceOpen=function(e,t,n){t.find(".expandable-body").slideDown(0,function(){t.hasClass("opened")||t.addClass("opened"),t.removeClass("closed"),e&&(e.expanded=!0),Core.$apply(n)})},e}();e.Expandable=i}(UI||(UI={}));var UI;!function(e){e._module.directive("hawtioFileDrop",[function(){return{restrict:"A",replace:!1,link:function(t,n,i){var r=i.hawtioFileDrop,o=i.downloadUrl,a=i.mimeType||"application/octet-stream";if(!Core.isBlank(r)&&!Core.isBlank(o)){if(!o.startsWith("http")){var s=new URI;o=s.path(o).toString()}var l=a+":"+r+":"+o;n.attr({draggable:!0}),n[0].addEventListener("dragstart",function(t){t.dataTransfer?(e.log.debug("Drag started, event: ",t,"File details: ",l),t.dataTransfer.setData("DownloadURL",l)):e.log.debug("Drag event object doesn't contain data transfer: ",t)})}}}}])}(UI||(UI={}));var UI;!function(e){e.hawtioFilter=e._module.directive("hawtioFilter",[function(){return{restrict:"E",replace:!0,transclude:!0,templateUrl:e.templatePath+"filter.html",scope:{placeholder:"@",cssClass:"@",saveAs:"@?",ngModel:"="},controller:["$scope","localStorage","$location","$element",function(e,t,n,i){if(e.getClass=function(){var t=[];return Core.isBlank(e.cssClass)||t.push(e.cssClass),Core.isBlank(e.ngModel)||t.push("has-text"),t.join(" ")},!Core.isBlank(e.saveAs)){if(e.saveAs in t){var r=t[e.saveAs];Core.isBlank(r)?e.ngModel="":e.ngModel=r}else e.ngModel="";var o=function(){t[e.saveAs]=e.ngModel};e.$watch("ngModel",o)}}]}}])}(UI||(UI={}));var UI;!function(e){e._module.directive("gridster",function(){return new e.GridsterDirective});var t=function(){function e(){this.restrict="A",this.replace=!0,this.controller=["$scope","$element","$attrs",function(e,t,n){}],this.link=function(e,t,n){var i=[6,6],r=[150,150],o=10,a=6;angular.isDefined(n.extraRows)&&(o=n.extraRows.toNumber()),angular.isDefined(n.extraCols)&&(a=n.extraCols.toNumber());var s=$('<ul style="margin: 0"></ul>'),l='<style type="text/css">',l=l+"</style>";t.append($(l)),t.append(s),e.gridster=s.gridster({widget_margins:i,grid_size:r,extra_rows:o,extra_cols:a}).data("gridster")}}return e}();e.GridsterDirective=t}(UI||(UI={}));var UI;!function(e){function t(){return function(e,t){function n(e,n,i){n[r]=!0,n[o]=!1,a=n[t],i>0&&(e[i-1][o]=!0)}function i(e){e[r]=!1,e[o]=!1}if(0===e.length)return e;if(Core.isBlank(t))return e;var r="newGroup",o="endGroup",a=void 0;return e.forEach(function(r,o){var s=r[t]!==a;if(angular.isArray(r[t]))if(void 0===a)s=!0;else{var l=r[t];l.length!==a.length?s=!0:(s=!1,l.forEach(function(e){s||a.any(function(t){return t===e})||(s=!0)}))}s?n(e,r,o):i(r)}),e}}e.groupBy=t,e._module.filter("hawtioGroupBy",e.groupBy)}(UI||(UI={}));var UI;!function(e){function t(){return e.log.debug("Creating icon directive"),{restrict:"E",replace:!0,templateUrl:e.templatePath+"icon.html",scope:{icon:"=config"},link:function(e,t,n){e.icon&&("type"in e.icon||Core.isBlank(e.icon.src)||(e.icon.src.startsWith("fa fa-")?e.icon.type="icon":e.icon.type="img"))}}}e.IconTestController=e._module.controller("UI.IconTestController",["$scope","$templateCache",function(e,t){e.exampleHtml=t.get("example-html"),e.exampleConfigJson=t.get("example-config-json"),e.$watch("exampleConfigJson",function(t,n){e.icons=angular.fromJson(e.exampleConfigJson)})}]),e.hawtioIcon=t,e._module.directive("hawtioIcon",e.hawtioIcon)}(UI||(UI={}));var UI;!function(e){e._module.directive("hawtioJsplumb",["$timeout","$window",function(t,n){return{restrict:"A",link:function(i,r,o){function a(e){var t=$(e),n=t.attr("id"),i=t.attr("anchors");if(!Core.isBlank(i)&&(i.has("{{")||i.has("}}")))return null;i=Core.isBlank(i)?["Continuous"]:i.split(",").map(function(e){return e.trim()});var r={id:n,label:"node "+n,el:t,width:t.outerWidth(),height:t.outerHeight(),edges:[],connections:[],endpoints:[],anchors:i};return r}function s(e,t){var n={isSource:!0,isTarget:!0,anchor:t.anchors,connector:w,maxConnections:-1};angular.isFunction(i.customizeEndpointOptions)&&i.customizeEndpointOptions(e,t,n);var o=e.addEndpoint(t.el,n);t.endpoints.push(o),c&&e.draggable(t.el,{containment:r})}function l(){var e=r.find(".jsplumb-node");x.length>0,angular.forEach(e,function(e){if(!C[e.id]){var t=a(e);t&&(x.push(t),C[t.id]=t)}}),angular.forEach(x,function(e){var t=e.el.attr("connect-to");t&&(t=t.split(","),angular.forEach(t,function(t){var n=C[t.trim()];if(n){var i={source:e,target:n};k.push(i),e.edges.push(i),n.edges.push(i)}}))})}function u(){if(!i.jsPlumb){i.jsPlumb=jsPlumb.getInstance({Container:r});var e={Anchor:"AutoDefault",Connector:"Flowchart",ConnectorStyle:w,DragOptions:{cursor:"pointer",zIndex:2e3},Endpoint:v,PaintStyle:{strokeStyle:"#42a62c",lineWidth:4},HoverPaintStyle:{strokeStyle:"#42a62c",lineWidth:4},ConnectionOverlays:[b,y]};c||(e.ConnectionsDetachable=!1),angular.isFunction(i.customizeDefaultOptions)&&i.customizeDefaultOptions(e),i.jsPlumb.importDefaults(e)}l(),i.jsPlumbNodes=x,i.jsPlumbNodesById=C,i.jsPlumbTransitions=k,d&&(i.layout=dagre.layout().nodeSep(h).edgeSep(f).rankSep(g).rankDir(p).nodes(x).edges(k).run()),angular.forEach(i.jsPlumbNodes,function(e){if(d){var t=e.el.width(),n=e.el.height(),r=e.dagre.y-n/2,o=e.dagre.x-t/2;e.el.css({top:r,left:o})}s(i.jsPlumb,e)}),angular.forEach(i.jsPlumbTransitions,function(e){var t={connector:w,maxConnections:-1},n={source:e.source.el,target:e.target.el};angular.isFunction(i.customizeConnectionOptions)&&i.customizeConnectionOptions(i.jsPlumb,e,n,t);var r=i.jsPlumb.connect(n,t);e.source.connections.push(r),e.target.connections.push(r)}),i.jsPlumb.recalculateOffsets(r),i.jsPlumb.isSuspendDrawing()||i.jsPlumb.repaintEverything(),angular.isDefined(i.jsPlumbCallback)&&angular.isFunction(i.jsPlumbCallback)&&i.jsPlumbCallback(i.jsPlumb,i.jsPlumbNodes,i.jsPlumbNodesById,i.jsPlumbTransitions)}n.addEventListener("resize",function(){i.jsPlumb&&(i.jsPlumb.recalculateOffsets(r),i.jsPlumb.repaintEverything())});var c=!0;angular.isDefined(o.draggable)&&(c=Core.parseBooleanValue(o.draggable));var d=!0;angular.isDefined(o.layout)&&(d=Core.parseBooleanValue(o.layout));var p="TB";if(angular.isDefined(o.direction))switch(o.direction){case"down":p="LR";break;default:p="TB"}var h=50,f=10,g=50;angular.isDefined(o.nodeSep)&&(h=Core.parseIntValue(o.nodeSep)),angular.isDefined(o.edgeSep)&&(f=Core.parseIntValue(o.edgeSep)),angular.isDefined(o.rankSep)&&(g=Core.parseIntValue(o.rankSep));var m=100;angular.isDefined(o.timeout)&&(m=Core.parseIntValue(o.timeout,"timeout"));var v=["Dot",{radius:10,cssClass:"jsplumb-circle",hoverClass:"jsplumb-circle-hover"}],y=["Label"],b=["Arrow",{location:1,id:"arrow",length:8,width:8,foldback:.8}],w=["Flowchart",{cornerRadius:4,gap:8}];angular.isDefined(i.connectorStyle)&&(w=i.connectorStyle);var x=[],k=[],C={};i.$on("jsplumbDoWhileSuspended",function(t,n){if(i.jsPlumb){var r=i.jsPlumb;r.doWhileSuspended(function(){e.log.debug("Suspended jsplumb"),i.jsPlumb.reset(),n(),x=[],C={},k=[],u()})}}),t(u,m)}}}])}(UI||(UI={}));var UI;!function(e){function t(t,n){return{restrict:"",replace:!0,templateUrl:e.templatePath+"list.html",scope:{config:"=hawtioList"},link:function(i,r,o){i.rows=[],i.name="hawtioListScope",i.config.selectedItems||(i.config.selectedItems=[]),i.$watch("rows",function(e,t){if(e!==t){i.config.selectedItems.length=0;var n=i.rows.findAll(function(e){return e.selected});n.forEach(function(e){i.config.selectedItems.push(e.entity)})}},!0),i.cellTemplate=t.get("cellTemplate.html"),i.rowTemplate=t.get("rowTemplate.html");var a=i.config.columnDefs,s="name",l="Name";if(a&&a.length>0){var u=a.first();s=u.field||s,l=u.displayName||l,u.cellTemplate&&(i.cellTemplate=u.cellTemplate)}var c=o.hawtioList,d=i.config.data;if(!Core.isBlank(c)&&!Core.isBlank(d)){i.listRoot=function(){return r.find(".list-root")},i.getContents=function(e){var t=i.$new();t.row=e;var r=n(i.rowTemplate)(t),o=i.parentScope.$new();o.row=e,o.col={field:s};var a=n(i.cellTemplate)(o);return $(r).find(".list-row-contents").append(a),r},i.setRows=function(e){i.rows=[];var t=i.listRoot();t.empty(),e&&e.forEach(function(e){var n={entity:e,getProperty:function(t){return angular.isDefined(t)?e[t]:null}};t.append(i.getContents(n)),i.rows.push(n)})};var p=e.findParentWith(i,c);p&&(i.parentScope=p,p.$watch(d,i.setRows,!0))}}}}e.hawtioList=t,e._module.directive("hawtioList",["$templateCache","$compile",e.hawtioList])}(UI||(UI={}));var UI;!function(e){e._module.directive("hawtioObject",["$templateCache","$interpolate","$compile",function(t,n,i){return{restrict:"A",replace:!0,templateUrl:e.templatePath+"object.html",scope:{entity:"=?hawtioObject",config:"=?",path:"=?",row:"=?"},link:function(e,r,o){function a(e,t,i,r){var o=n(e);return o(i?{key:i.titleize(),data:r,path:t}:{data:r,path:t})}function s(e,t){var n=void 0,i=Core.pathGet(t,["properties"]);return!n&&i&&angular.forEach(i,function(t,i){var r=new RegExp(i);r.test(e)&&(n=!n||n.override||t.override?_.clone(t,!0):_.merge(n,t))}),n}function l(e,t,n){var i=n,t=s(e,t);return t&&t.template&&(i=t.template),i}function u(t,n,r,o,l){var l=s(n,l);if(!l||!l.hidden){var u=null;u=l&&l.template?l.template:a(t,n,r,o);var c=e.$new();return c.row=e.row,c.entityConfig=l,c.data=o,c.path=n,i(u)(c)}}function c(e,n,i){var r=l(e,i,t.get("primitiveValueTemplate.html"));return u(r,e,void 0,n,i)}function d(e,n,i){var r=l(e,i,t.get("dateValueTemplate.html"));return u(r,e,void 0,n,i)}function p(e,t,n){var i=!1,r=void 0;return angular.forEach(t,function(o,a){angular.isNumber(a)&&"length"in t&&(i=!0),i||a.startsWith("$")||(r||(r=angular.element("<span></span>")),angular.isArray(o)?r.append(b(e+"/"+a,a,o,n)):angular.isObject(o)?0===_.size(o)?r.append(m(e+"/"+a,a,"empty",n)):r.append(y(e+"/"+a,a,o,n)):StringHelpers.isDate(o)?r.append(v(e+"/"+a,a,Date.create(o),n)):r.append(m(e+"/"+a,a,o,n)))}),r?r.children():r}function h(e,t,n){var i=void 0;if(!t)return i;var r=!1;return t.forEach(function(t){!r&&angular.isObject(t)?(i||(i=[]),i=_.keys(t).filter(function(e){return!angular.isFunction(t[e])}).filter(function(t){var i=s(e+"/"+t,n);return i&&i.hidden?!1:!0}).union(i)):(i=void 0,r=!0)}),i&&(i=i.exclude(function(e){return(""+e).startsWith("$")})),i}function f(e,n,i,r,o,s){var l=angular.element(a(e,n,i,r)),u=l.find("thead"),c=l.find("tbody"),d=t.get("headerTemplate.html"),p=t.get("cellTemplate.html"),h=t.get("rowTemplate.html"),f=angular.element(a(h,n,void 0,void 0));return o.forEach(function(e){f.append(a(d,n+"/"+e,e,void 0))}),u.append(f),r.forEach(function(e,t){var i=angular.element(a(h,n+"/"+t,void 0,void 0));o.forEach(function(r){var o=angular.element(a(p,n+"/"+t+"/"+r,void 0,void 0));o.append(w(n+"/"+t+"/"+r,e[r],s)),i.append(o)}),c.append(i)}),l}function g(e,n,i){var r=h(e,n,i);if(r){var o=l(e,i,t.get("arrayValueTableTemplate.html"));return f(o,e,void 0,n,r,i)}var o=l(e,i,t.get("arrayValueListTemplate.html"));return u(o,e,void 0,n,i)}function m(e,n,i,r){var o=l(e,r,t.get("primitiveAttributeTemplate.html"));return u(o,e,n,i,r)}function v(e,n,i,r){var o=l(e,r,t.get("dateAttributeTemplate.html"));return u(o,e,n,i,r)}function y(e,n,i,r){var o=l(e,r,t.get("objectAttributeTemplate.html"));return u(o,e,n,i,r)}function b(e,n,i,r){var o=h(e,i,r);if(o){var a=l(e,r,t.get("arrayAttributeTableTemplate.html"));return f(a,e,n,i,o,r)}var a=l(e,r,t.get("arrayAttributeListTemplate.html"));return u(a,e,n,i,r)}function w(e,t,n){return angular.isArray(t)?g(e,t,n):angular.isObject(t)?p(e,t,n):StringHelpers.isDate(t)?d(e,Date.create(t),n):c(e,t,n)}e.$watch("entity",function(t){return t?(e.path||(e.path=""),angular.isDefined(e.row)||(e.row={entity:t}),void r.html(w(e.path,t,e.config))):void r.empty()},!0)}}}])}(UI||(UI={}));var UI;!function(e){function t(){return{restrict:"E",replace:!0,transclude:!0,templateUrl:e.templatePath+"pane.html",scope:{position:"@",width:"@",header:"@"},controller:["$scope","$element","$attrs","$transclude","$document","$timeout","$compile","$templateCache","$window",function(e,t,n,i,r,o,a,s,l){e.moving=!1,i(function(n){if(t.find(".pane-content").append(n),!Core.isBlank(e.header)){var i=s.get(e.header),r=t.find(".pane-header-wrapper");r.html(a(i)(e)),o(function(){t.find(".pane-viewport").css("top",r.height())},500)}}),e.setViewportTop=function(){var e=t.find(".pane-header-wrapper");o(function(){t.find(".pane-viewport").css("top",e.height())},10)},e.setWidth=function(n){6>n||(t.width(n),t.parent().css(e.padding,t.width()+"px"),e.setViewportTop())},e.open=function(){e.setWidth(e.width)},e.close=function(){e.width=t.width(),e.setWidth(6)},e.$on("pane.close",e.close),e.$on("pane.open",e.open),e.toggle=function(){e.moving||(t.width()>6?e.close():e.open())},e.startMoving=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation(),r.on("mouseup.hawtio-pane",function(t){o(function(){e.moving=!1},250),t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation(),r.off(".hawtio-pane"),Core.$apply(e)}),r.on("mousemove.hawtio-pane",function(t){e.moving=!0,t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation(),"left"===e.position?e.setWidth(t.pageX+2):e.setWidth(l.innerWidth-t.pageX+2),Core.$apply(e)})}}],link:function(e,t,n){var i=t.parent(),r="left";e.position&&(r=e.position),t.addClass(r);var o=t.width(),a="padding-"+r;e.padding=a;var s=i.css(a);i.css(a,o+"px"),e.$on("$destroy",function(){i.css(a,s)})}}}e.hawtioPane=t,e._module.directive("hawtioPane",e.hawtioPane)}(UI||(UI={}));var UI;!function(e){e._module.directive("hawtioMessagePanel",function(){return new e.MessagePanel});var t=function(){function e(){this.restrict="A",this.link=function(e,t,n){var i="100%";if("hawtioMessagePanel"in n){var r=n.hawtioMessagePanel;r&&!r.isBlank()&&(i=r)}var o="1s";if("speed"in n){var a=n.speed;o&&!o.isBlank()&&(o=a)}t.css({position:"absolute",bottom:0,height:0,"min-height":0,transition:"all "+o+" ease-in-out"}),t.parent().mouseover(function(){t.css({height:i,"min-height":"auto"})}),t.parent().mouseout(function(){t.css({height:0,"min-height":0})})}}return e}();e.MessagePanel=t,e._module.directive("hawtioInfoPanel",function(){return new e.InfoPanel});var n=function(){function e(){this.restrict="A",this.link=function(e,t,n){var i={left:{side:"right",out:"width"},right:{side:"left",out:"width"},up:{side:"bottom",out:"height"},down:{side:"top",out:"height"}},r="right";if("hawtioInfoPanel"in n){var o=n.hawtioInfoPanel;o&&!o.isBlank()&&_.keys(i).any(o)&&(r=o)}var a="1s";if("speed"in n){var s=n.speed;a&&!a.isBlank()&&(a=s)}var l="open";if("toggle"in n){var u=n.toggle;l&&!l.isBlank()&&(l=u)}var c={position:"absolute",transition:"all "+a+" ease-in-out"},d={};d[i[r].out]="100%";var p={};p[i[r].out]=0,c[i[r].side]=0,c[i[r].out]=0,t.css(c),e.$watch(l,function(e,n){Core.parseBooleanValue(e)?t.css(d):t.css(p)}),t.click(function(){e[l]=!1,Core.$apply(e)})}}return e}();e.InfoPanel=n}(UI||(UI={}));var UI;!function(e){e._module.directive("hawtioRow",function(){return new e.DivRow});var t=function(){function e(){this.restrict="A",this.link=function(e,t,n){t.get(0).addEventListener("DOMNodeInserted",function(){var e=t.children(),n=0;angular.forEach(e,function(e){var t=angular.element(e);switch(t.css("display")){case"none":break;default:n=n+t.outerWidth(!0)+5}}),t.width(n)})}}return e}();e.DivRow=t}(UI||(UI={}));var UI;!function(e){e._module.directive("hawtioSlideout",function(){return new e.SlideOut});var t=function(){function t(){this.restrict="A",this.replace=!0,this.transclude=!0,this.templateUrl=e.templatePath+"slideout.html",this.scope={show:"=hawtioSlideout",direction:"@",top:"@",height:"@",title:"@",close:"@"},this.controller=["$scope","$element","$attrs","$transclude","$compile",function(t,n,i,r,o){t.clone=null,r(function(e){t.clone=$(e).filter(".dialog-body")}),e.observe(t,i,"direction","right"),e.observe(t,i,"top","10%",function(e){n.css("top",e)}),e.observe(t,i,"height","80%",function(e){n.css("height",e)}),e.observe(t,i,"title",""),e.observe(t,i,"close","true"),t.$watch("show",function(){t.show&&(t.body=n.find(".slideout-body"),t.body.html(o(t.clone.html())(t.$parent)))}),t.hidePanel=function(n){e.log.debug("Event: ",n),t.show=!1}}],this.link=function(e,t,n){e.$watch("show",function(){e.show?(t.addClass("out"),t.focus()):t.removeClass("out")})}}return t}();e.SlideOut=t}(UI||(UI={}));var UI;!function(e){e._module.directive("hawtioPager",function(){return new e.TablePager});var t=function(){function t(){var t=this;this.restrict="A",this.scope=!0,this.templateUrl=e.templatePath+"tablePager.html",this.$scope=null,this.element=null,this.attrs=null,this.tableName=null,this.setRowIndexName=null,this.rowIndexName=null,this.link=function(e,n,i){return t.doLink(e,n,i)}}return t.prototype.doLink=function(e,t,n){var i=this;this.$scope=e,this.element=t,this.attrs=n,this.tableName=n.hawtioPager||n.array||"data",this.setRowIndexName=n.onIndexChange||"onIndexChange",this.rowIndexName=n.rowIndex||"rowIndex",e.first=function(){i.goToIndex(0)},e.last=function(){i.goToIndex(e.tableLength()-1)},e.previous=function(){i.goToIndex(e.rowIndex()-1)},e.next=function(){i.goToIndex(e.rowIndex()+1)},e.isEmptyOrFirst=function(){var t=e.rowIndex(),n=e.tableLength();return 0>=n||0>=t},e.isEmptyOrLast=function(){var t=e.rowIndex(),n=e.tableLength();return 1>n||t+1>=n},e.rowIndex=function(){return Core.pathGet(e.$parent,i.rowIndexName.split("."))},e.tableLength=function(){var e=i.tableData();return e?e.length:0}},t.prototype.tableData=function(){return Core.pathGet(this.$scope.$parent,this.tableName.split("."))||[]},t.prototype.goToIndex=function(e){var t=this.setRowIndexName,n=this.$scope[t];angular.isFunction(n)?n(e):(console.log("No function defined in scope for "+t+" but was "+n),this.$scope[this.rowIndexName]=e)},t}();e.TablePager=t}(UI||(UI={}));var UI;!function(e){e.selectedTags=e._module.filter("selectedTags",["$rootScope",function(e){return function(t,n,i){if(0===i.length)return t;var r=[];return _.forEach(t,function(t){var o=e.$eval(n,t);_.intersection(o,i).length===i.length&&r.push(t)}),r}}]),e.hawtioTagFilter=e._module.directive("hawtioTagFilter",["localStorage","$location",function(t,n){return{restrict:"E",replace:!0,templateUrl:e.templatePath+"tagFilter.html",scope:{selected:"=",tags:"=?",collection:"=",collectionProperty:"@",saveAs:"@"},link:function(e,t,n){function i(){e.collection&&e.collectionProperty?(e.selected.length?r():(e.visibleTags=e.tags,e.filteredCollection=e.collection),e.visibleTags=e.visibleTags.map(function(t){return{id:t,count:e.filteredCollection.map(function(t){return t[e.collectionProperty]}).reduce(function(e,n){return n.any(t)?e+1:e},0)}})):e.visibleTags=e.tags}function r(){e.filteredCollection=e.collection.filter(function(t){return SelectionHelpers.filterByGroup(e.selected,t[e.collectionProperty])}),e.visibleTags=[],e.filteredCollection.forEach(function(t){e.visibleTags=e.visibleTags.union(t[e.collectionProperty])})}SelectionHelpers.decorate(e),e.$watchCollection("collection",function(t){var n=_.union(_.map(t,function(t){return e.$eval(e.collectionProperty,t)})),i=[];_.forEach(n,function(e){i=_.union(i,e)}),e.tags=i}),e.$watchCollection("tags",function(t,n){t!==n&&(SelectionHelpers.syncGroupSelection(e.selected,e.tags),i())}),e.$watchCollection("selected",function(t){e.selected=_.uniq(t),i()})}}}])}(UI||(UI={}));var UI;!function(e){e.hawtioTagList=e._module.directive("hawtioTagList",["$interpolate","$compile","$templateCache",function(t,n,i){return{restrict:"E",replace:!0,templateUrl:UrlHelpers.join(e.templatePath,"tagList.html"),scope:{tags:"=",remove:"=?",selected:"=?"},link:function(e,r,o){var a=i.get("tagBase.html"),s=i.get("tagRemove.html");e.addSelected=function(t){e.selected&&e.selected.push(t)},e.isSelected=function(t){return e.selected?_.any(e.selected,function(e){return t===e})?"badge-success":"":"badge-success"},e.removeTag=function(t){e.tags.remove(t)},e.$watchCollection("tags",function(i){var o=angular.element("<div></div>");i.forEach(function(n){var i=t(a),r=angular.element(i({tag:n}));e.remove&&r.append(t(s)({tag:n})),e.selected&&r.attr("ng-click","addSelected('"+n+"')"),o.append(r)}),r.html(n(o.children())(e))})}}}])}(UI||(UI={}));var UI;!function(e){function t(t,n,i){return{restrict:"A",link:function(r,o,a){var s=e.getIfSet("title",a,void 0),l=e.getIfSet("trigger",a,"hover"),u=!0,c=e.getIfSet("content",a,"popoverTemplate"),d=e.getIfSet("placement",a,"auto"),p=e.getIfSet("delay",a,"100"),h=e.getIfSet("container",a,"body"),f=e.getIfSet("selector",a,"false");"false"===h&&(h=!1),"false"===f&&(f=!1);var g=t.get(c);g&&(o.on("$destroy",function(){o.popover("destroy")}),o.popover({title:s,trigger:l,html:u,content:function(){var e=n(g)(r);return Core.$digest(r),e},delay:p,container:h,selector:f,placement:function(e,t){if("auto"!==d)return d;var n=o,r=n.offset(),a=i.innerWidth(),s=r.left+n.outerWidth()/2,l=a/2;return l>s?"right":"left"}}))}}}e.TemplatePopover=t,e._module.directive("hawtioTemplatePopover",["$templateCache","$compile","$document",e.TemplatePopover])}(UI||(UI={}));var UI;!function(e){function t(e,t,n,i){var r=Logger.get("UI");return{restrict:"A",scope:{getContents:"&"},controller:["$scope","$element","$attrs",function(t,n,i){t.remaining=-1,t.render=!1,t.chapters=[],t.addChapter=function(e){console.log("Adding: ",e),t.chapters.push(e),angular.isDefined(e.text)||t.fetchItemContent(e)},t.getTarget=function(e){return e?e.replace(".","_"):""},t.getFilename=function(e,t){var n=e.split("/").last();return t&&!n.endsWith(t)&&(n=n+"."+t),n},t.$watch("remaining",function(e,n){if(e!==n){var i=!1;(0===e||i)&&(t.render=!0)}}),t.fetchItemContent=function(n){var i=t;t.$eval(function(r){r.getContents({filename:n.filename,cb:function(r){r&&(n.filename.endsWith(".md")?n.text=e(r):n.text=r,t.remaining--,Core.$apply(i))}})})}}],link:function(e,n,o){function a(){var e=$(window).scrollTop();n.find("li a").removeClass("active"),$(".panel-body").each(function(){var t=$(this).offset();if(t&&t.top>=e){var n=$(this).attr("id");if(n){var i=g.find("a[chapter-id='"+n+"']");return i.addClass("active"),!1}}})}function s(){var e=g.find("a");return y&&(e=e.filter(y)),e}function l(){g.get(0).id||(g.get(0).id="toc"),e.tocId="#"+g.get(0).id,e.remaining=s().length,s().each(function(t,n){r.debug("Found: ",n);var i=e.getFilename(n.href,n.getAttribute("file-extension")),o={filename:i,title:n.textContent,link:n};e.addChapter(o)}),setTimeout(function(){a()},100)}function u(e){if(r.debug("selected chapter changed: "+e),e){var t="#"+e,n=0,i=$(t);if(i.length){var o=i.offset();o&&(n=o.top-c),$("body,html").animate({scrollTop:n},v)}}}var c=0,d=$(".logbar"),p=$("#toc-content");if(d.length)c=d.height()+d.offset().top;else if(p.length){var h=p.offset();h&&(c=h.top)}c||(c=90);var f=null,g=n;p&&p.length||(p=n);var m=e.$parent||e,v=1e3,y=o.linkFilter,b=o.html;b?m.$watch(b,function(){var e=m[b];if(e&&e!==f){f=e;var t=i(e)(m);n.children().remove(),n.append(t),l()}}):l(),$(window).scroll(a),e.$watch("render",function(n,o){if(n!==o&&n&&!p.next(".hawtio-toc").length){var a=$('<div class="hawtio-toc"></div>');a.appendTo(p);var l=t.search().chapter;e.chapters.forEach(function(t,n){r.debug("index:",n);var o=$("<div></div>"),s=null,c=e.getTarget(t.filename),d=t.link;d&&d.setAttribute("chapter-id",c),n>0&&(s=$('<div class="panel-title"><a class="toc-back" href="">Back to Top</a></div>'));var p=$('<div class="panel-body" id="'+c+'">'+t.text+"</div>");s?o.append(s).append(i(p)(e)):o.append(i(p)(e)),o.hide().appendTo(a).fadeIn(1e3),c===l&&u(c)});var d=p.offset().top-c;a.find("a.toc-back").each(function(e,t){$(t).click(function(e){e.preventDefault(),$("body,html").animate({scrollTop:d},2e3)})}),s().each(function(n,i){var o=i.href,a=e.getFilename(o,i.getAttribute("file-extension"));$(i).click(function(n){r.debug("Clicked: ",n),n.preventDefault();var i=e.getTarget(a);return t.search("chapter",i),Core.$apply(m),u(i),!0})})}}),m.$on("$locationChangeSuccess",function(e,n,i){setTimeout(function(){var e=t.search().chapter;u(e)},50)})}}}e.HawtioTocDisplay=t,e._module.directive("hawtioTocDisplay",["marked","$location","$anchorScroll","$compile",e.HawtioTocDisplay])}(UI||(UI={}));var UI;!function(e){e._module.directive("hawtioViewport",function(){return new e.ViewportHeight});var t=function(){function e(){this.restrict="A",this.link=function(e,t,n){var i=0,r=function(){var e=angular.element(n.hawtioViewport),r=angular.element(n.containingDiv),o=e.position().top+e.height(),a=r.height()-o;if(angular.isDefined(n.heightAdjust))var s=n.heightAdjust.toNumber();a+=s,t.css({height:a,"min-height":a}),i!==a&&(i=a,t.trigger("resize"))};r(),e.$watch(r),$().resize(function(){return r(),Core.$apply(e),!1})}}return e}();e.ViewportHeight=t,e._module.directive("hawtioHorizontalViewport",function(){return new e.HorizontalViewport});var n=function(){function t(){this.restrict="A",this.link=function(t,n,i){var r=angular.isDefined(i.adjustParent)&&Core.parseBooleanValue(i.adjustParent);n.get(0).addEventListener("DOMNodeInserted",function(){var t=n.children();n.height(t.outerHeight(!0)),r&&n.parent().height(n.outerHeight(!0)+e.getScrollbarWidth())})}}return t}();e.HorizontalViewport=n;
|
|
3256
|
|
-}(UI||(UI={}));var UI;!function(e){function t(e){return{restrict:"A",link:function(t,n,i){var r=new ZeroClipboard(n.get(0),{moviePath:"img/ZeroClipboard.swf"});if(r.on("complete",function(e,n){n.text&&angular.isString(n.text)&&Core.notification("info","Copied text to clipboard: "+n.text.truncate(20)),Core.$apply(t)}),"useCallback"in i){var o=e(i.useCallback);o&&o(t,{clip:r})}}}}e._module.directive("zeroClipboard",["$parse",function(t){return e.ZeroClipboardDirective(t)}]),e.ZeroClipboardDirective=t}(UI||(UI={}));var UIBootstrap;!function(e){var t="hawtio-ui-bootstrap";angular.module(t,["ui.bootstrap"]),hawtioPluginLoader.addModule(t),hawtioPluginLoader.addModule("hawtio-compat.transition"),hawtioPluginLoader.addModule("hawtio-compat.dialog"),hawtioPluginLoader.addModule("hawtio-compat.modal")}(UIBootstrap||(UIBootstrap={})),angular.module("hawtio-ui-templates",[]).run(["$templateCache",function(e){e.put("plugins/editor/html/editor.html",'<div class="editor-autoresize">\n <textarea name="{{name}}" ng-model="text"></textarea>\n</div>\n'),e.put("plugins/ui-bootstrap/html/message.html",'<div class="modal-header">\n <h3>{{ title }}</h3>\n</div>\n<div class="modal-body">\n <p>{{ message }}</p>\n</div>\n<div class="modal-footer">\n <button ng-repeat="btn in buttons" ng-click="close(btn.result)" class="btn" ng-class="btn.cssClass">{{ btn.label }}</button>\n</div>\n'),e.put("plugins/ui/html/breadcrumbs.html",'<span class="hawtio-breadcrumb">\n <li ng-repeat="(level, config) in levels track by level" ng-show="config">\n <div hawtio-drop-down="config" process-submenus="false"></div>\n </li>\n</span>\n'),e.put("plugins/ui/html/colorPicker.html",'<div class="color-picker">\n <div class="wrapper">\n <div class="selected-color" style="background-color: {{property}};" ng-click="popout = !popout"></div>\n </div>\n <div class="color-picker-popout">\n <table>\n <tr>\n <td ng-repeat="color in colorList">\n <div class="{{color.select}}" style="background-color: {{color.color}};"\n ng-click="selectColor(color)">\n </div>\n <td>\n <td>\n <i class="fa fa-remove clickable" ng-click="popout = !popout"></i>\n </td>\n </tr>\n </table>\n </div>\n</div>\n'),e.put("plugins/ui/html/confirmDialog.html",'<div modal="show">\n <form class="form-horizontal no-bottom-margin">\n <div class="modal-header"><h4>{{title}}</h4></div>\n <div class="modal-body">\n </div>\n <div class="modal-footer">\n <input class="btn btn-danger" ng-show="{{showOkButton != \'false\'}}" type="submit" value="{{okButtonText}}" ng-click="submit()">\n <button class="btn btn-primary" ng-click="cancel()">{{cancelButtonText}}</button>\n </div>\n </form>\n</div>\n'),e.put("plugins/ui/html/developerPage.html",'<div ng-controller="UI.DeveloperPageController">\n\n <div class="tocify" wiki-href-adjuster>\n <div hawtio-toc-display\n get-contents="getContents(filename, cb)">\n <ul>\n <li>\n <a href="plugins/ui/html/test/icon.html" chapter-id="icons">icons</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/auto-columns.html" chapter-id="auto-columns">auto-columns</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/auto-dropdown.html" chapter-id="auto-dropdown">auto-dropdown</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/breadcrumbs.html" chapter-id="breadcrumbs">breadcrumbs</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/color-picker.html" chapter-id="color-picker">color-picker</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/confirm-dialog.html" chapter-id="confirm-dialog">confirm-dialog</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/drop-down.html" chapter-id="drop-down">drop-down</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/editable-property.html" chapter-id="editableProperty">editable-property</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/editor.html" chapter-id="editor">editor</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/expandable.html" chapter-id="expandable">expandable</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/file-upload.html" chapter-id="file-upload">file-upload</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/jsplumb.html" chapter-id="jsplumb">jsplumb</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/pager.html" chapter-id="pager">pager</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/slideout.html" chapter-id="slideout">slideout</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/template-popover.html" chapter-id="template-popover">template-popover</a>\n </li>\n <li>\n <a href="plugins/ui/html/test/zero-clipboard.html" chapter-id="zero-clipboard">zero-clipboard</a>\n </li>\n </ul>\n </div>\n </div>\n <div class="toc-content" id="toc-content"></div>\n</div>\n'),e.put("plugins/ui/html/dropDown.html",'<span>\n\n <script type="text/ng-template" id="withsubmenus.html">\n <span class="hawtio-dropdown dropdown" ng-class="open(config)" ng-click="action(config, $event)">\n <p ng-show="config.heading" ng-bind="config.heading"></p>\n <span ng-show="config.title">\n <i ng-class="icon(config)"></i> <span ng-bind="config.title"></span>\n <span ng-show="config.items" ng-hide="config.submenu" class="caret"></span>\n <span ng-show="config.items && config.submenu" class="submenu-caret"></span>\n </span>\n\n <ul ng-hide="config.action" ng-show="config.items" class="dropdown-menu" ng-class="submenu(config)">\n <li ng-repeat="item in config.items track by $index" ng-init="config=item; config[\'submenu\']=true" ng-include="\'withsubmenus.html\'" hawtio-show object-name="{{item.objectName}}" method-name="{{item.methodName}}" argument-types="{{item.argumentTypes}}" mode="remove">\n </li>\n </ul>\n </span>\n </script>\n\n <script type="text/ng-template" id="withoutsubmenus.html">\n <span class="hawtio-dropdown dropdown" ng-class="open(config)" ng-click="action(config, $event)">\n <p ng-show="config.heading" ng-bind="config.heading"></p>\n <span ng-show="config.title">\n <i ng-class="icon(config)"></i> <span ng-bind="config.title"></span>\n <span ng-show="config.items && config.items.length > 0" class="caret"></span>\n </span>\n\n <ul ng-hide="config.action" ng-show="config.items" class="dropdown-menu" ng-class="submenu(config)">\n <li ng-repeat="item in config.items track by $index" hawtio-show object-name="{{item.objectName}}" method-name="{{item.methodName}}" argument-types="{{item.argumentTypes}}" mode="remove">\n <span class="menu-item" ng-click="action(item, $event)">\n <i ng-class="icon(item)"></i> <span ng-bind="item.title"></span>\n <span ng-show="item.items" class="submenu-caret"></span>\n </span>\n </li>\n </ul>\n\n </span>\n </script>\n\n <span compile="menuStyle"></span>\n\n</span>\n'),e.put("plugins/ui/html/editableProperty.html",'<div ng-mouseenter="showEdit()" ng-mouseleave="hideEdit()" class="ep" ng-dblclick="doEdit()">\n {{getText()}} <i class="ep-edit fa fa-pencil" title="Edit this item" ng-click="doEdit()" no-click></i>\n</div>\n<div class="ep editing" ng-show="editing" no-click>\n <form class="form-inline no-bottom-margin" ng-submit="saveEdit()">\n <fieldset>\n <span ng-switch="inputType">\n <span ng-switch-when="number">\n <input type="number" size="{{text.length}}" ng-style="getInputStyle()" value="{{text}}" max="{{max}}" min="{{min}}">\n </span>\n <span ng-switch-when="password">\n <input type="password" size="{{text.length}}" ng-style="getInputStyle()" value="{{text}}">\n </span>\n <span ng-switch-default>\n <input type="text" size="{{text.length}}" ng-style="getInputStyle()" value="{{text}}">\n </span>\n </span>\n <i class="green clickable fa fa-ok icon1point5x" title="Save changes" ng-click="saveEdit()"></i>\n <i class="red clickable fa fa-remove icon1point5x" title="Discard changes" ng-click="stopEdit()"></i>\n </fieldset>\n </form>\n</div>\n'),e.put("plugins/ui/html/editor.html",'<div class="editor-autoresize">\n <textarea name="{{name}}" ng-model="text"></textarea>\n</div>\n'),e.put("plugins/ui/html/editorPreferences.html",'<div ng-controller="CodeEditor.PreferencesController">\n <form class="form-horizontal">\n <div class="control-group">\n <label class="control-label" for="theme" title="The default theme to be used by the code editor">Theme</label>\n\n <div class="controls">\n <select id="theme" ng-model="preferences.theme">\n <option value="default">Default</option>\n <option value="ambiance">Ambiance</option>\n <option value="blackboard">Blackboard</option>\n <option value="cobalt">Cobalt</option>\n <option value="eclipse">Eclipse</option>\n <option value="monokai">Monokai</option>\n <option value="neat">Neat</option>\n <option value="twilight">Twilight</option>\n <option value="vibrant-ink">Vibrant ink</option>\n </select>\n </div>\n </div>\n </form>\n\n <form name="editorTabForm" class="form-horizontal">\n <div class="control-group">\n <label class="control-label" for="tabSIze">Tab size</label>\n\n <div class="controls">\n <input type="number" id="tabSize" name="tabSize" ng-model="preferences.tabSize" ng-required="ng-required" min="1" max="10"/>\n <span class="help-block"\n ng-hide="editorTabForm.tabSize.$valid">Please specify correct size (1-10).</span>\n </div>\n </div>\n </form>\n\n <div compile="codeMirrorEx"></div>\n\n<!-- please do not change the tabs into spaces in the following script! -->\n<script type="text/ng-template" id="exampleText">\nvar foo = "World!";\n\nvar myObject = {\n message: "Hello",\n getMessage: function() {\n return message + " ";\n }\n};\n\nwindow.alert(myObject.getMessage() + foo);\n</script>\n\n<script type="text/ng-template" id="codeMirrorExTemplate">\n <div hawtio-editor="exampleText" mode="javascript"></div>\n</script>\n</div>\n\n</div>\n'),e.put("plugins/ui/html/filter.html",'<div class="inline-block section-filter">\n <input type="text"\n class="search-query"\n ng-class="getClass()"\n ng-model="ngModel"\n placeholder="{{placeholder}}">\n <i class="fa fa-remove clickable"\n title="Clear Filter"\n ng-click="ngModel = \'\'"></i>\n</div>\n'),e.put("plugins/ui/html/icon.html",'<span>\n <span ng-show="icon && icon.type && icon.src" title="{{icon.title}}" ng-switch="icon.type">\n <i ng-switch-when="icon" class="{{icon.src}} {{icon.class}}"></i>\n <img ng-switch-when="img" ng-src="{{icon.src}}" class="{{icon.class}}">\n </span>\n <span ng-hide="icon && icon.type && icon.src">\n \n </span>\n</span>\n\n'),e.put("plugins/ui/html/layoutUI.html","<div ng-view></div>\n"),e.put("plugins/ui/html/list.html",'<div>\n\n <!-- begin cell template -->\n <script type="text/ng-template" id="cellTemplate.html">\n <div class="ngCellText">\n {{row.entity}}\n </div>\n </script>\n <!-- end cell template -->\n\n <!-- begin row template -->\n <script type="text/ng-template" id="rowTemplate.html">\n <div class="list-row">\n <div ng-show="config.showSelectionCheckbox"\n class="list-row-select">\n <input type="checkbox" ng-model="row.selected">\n </div>\n <div class="list-row-contents"></div>\n </div>\n </script>\n <!-- end row template -->\n\n <!-- must have a little margin in the top -->\n <div class="list-root" style="margin-top: 15px"></div>\n\n</div>\n'),e.put("plugins/ui/html/multiItemConfirmActionDialog.html",'<div>\n <form class="no-bottom-margin">\n <div class="modal-header">\n <span>{{options.title || \'Are you sure?\'}}</span>\n </div>\n <div class="modal-body">\n <p ng-show=\'options.action\'\n ng-class=\'options.actionClass\'\n ng-bind=\'options.action\'></p>\n <ul>\n <li ng-repeat="item in options.collection" ng-bind="getName(item)"></li>\n </ul>\n <p ng-show="options.custom" \n ng-class="options.customClass" \n ng-bind="options.custom"></p>\n </div>\n <div class="modal-footer">\n <button class="btn" \n ng-class="options.okClass" \n ng-click="close(true)">{{options.okText || \'Ok\'}}</button>\n <button class="btn" \n ng-class="options.cancelClass"\n ng-click="close(false)">{{options.cancelText || \'Cancel\'}}</button>\n </div>\n </form>\n</div>\n'),e.put("plugins/ui/html/object.html",'<div>\n <script type="text/ng-template" id="primitiveValueTemplate.html">\n <span ng-show="data" object-path="{{path}}">{{data}}</span>\n </script>\n <script type="text/ng-template" id="arrayValueListTemplate.html">\n <ul class="zebra-list" ng-show="data" object-path="{{path}}">\n <li ng-repeat="item in data">\n <div hawtio-object="item" config="config" path="path" row="row"></div>\n </li>\n </ul>\n </script>\n <script type="text/ng-template" id="arrayValueTableTemplate.html">\n <table class="table table-striped" object-path="{{path}}">\n <thead>\n </thead>\n <tbody>\n </tbody>\n </table>\n </script>\n <script type="text/ng-template" id="dateAttributeTemplate.html">\n <dl class="" ng-show="data" object-path="{{path}}">\n <dt>{{key}}</dt>\n <dd ng-show="data && data.getTime() > 0">{{data | date:"EEEE, MMMM dd, yyyy \'at\' hh : mm : ss a Z"}}</dd>\n <dd ng-show="data && data.getTime() <= 0"></dd>\n\n </dl>\n </script>\n <script type="text/ng-template" id="dateValueTemplate.html">\n <span ng-show="data">\n <span ng-show="data && data.getTime() > 0" object-path="{{path}}">{{data | date:"EEEE, MMMM dd, yyyy \'at\' hh : mm : ss a Z"}}</span>\n <span ng-show="data && data.getTime() <= 0" object-path="{{path}}"></span>\n </span>\n </script>\n <script type="text/ng-template" id="primitiveAttributeTemplate.html">\n <dl class="" ng-show="data" object-path="{{path}}">\n <dt>{{key}}</dt>\n <dd>{{data}}</dd>\n </dl>\n </script>\n <script type="text/ng-template" id="objectAttributeTemplate.html">\n <dl class="" ng-show="data" object-path="{{path}}">\n <dt>{{key}}</dt>\n <dd>\n <div hawtio-object="data" config="config" path="path" row="row"></div>\n </dd>\n </dl>\n </script>\n <script type="text/ng-template" id="arrayAttributeListTemplate.html">\n <dl class="" ng-show="data" object-path="{{path}}">\n <dt>{{key}}</dt>\n <dd>\n <ul class="zebra-list">\n <li ng-repeat="item in data" ng-init="path = path + \'/\' + $index">\n <div hawtio-object="item" config="config" path="path" row="row"></div>\n </li>\n </ul>\n </dd>\n </dl>\n </script>\n <script type="text/ng-template" id="arrayAttributeTableTemplate.html">\n <dl class="" ng-show="data" object-path="{{path}}">\n <dt>{{key}}</dt>\n <dd>\n <table class="table table-striped">\n <thead>\n </thead>\n <tbody>\n </tbody>\n </table>\n </dd>\n </dl>\n </script>\n <script type="text/ng-template" id="headerTemplate.html">\n <th object-path="{{path}}">{{key}}</th>\n </script>\n <script type="text/ng-template" id="rowTemplate.html">\n <tr object-path="{{path}}"></tr>\n </script>\n <script type="text/ng-template" id="cellTemplate.html">\n <td object-path="{{path}}"></td>\n </script>\n</div>\n'),e.put("plugins/ui/html/pane.html",'<div class="pane">\n <div class="pane-wrapper">\n <div class="pane-header-wrapper">\n </div>\n <div class="pane-viewport">\n <div class="pane-content">\n </div>\n </div>\n <div class="pane-bar"\n ng-mousedown="startMoving($event)"\n ng-click="toggle()"></div>\n </div>\n</div>\n'),e.put("plugins/ui/html/slideout.html",'<div class="slideout {{direction || \'right\'}}">\n <div class=slideout-title>\n <div ng-show="{{close || \'true\'}}" class="mouse-pointer pull-right" ng-click="hidePanel($event)" title="Close panel">\n <i class="fa fa-remove"></i>\n </div>\n <span>{{title}}</span>\n </div>\n <div class="slideout-content">\n <div class="slideout-body"></div>\n </div>\n</div>\n'),e.put("plugins/ui/html/tablePager.html",'<div class="hawtio-pager clearfix">\n <label>{{rowIndex() + 1}} / {{tableLength()}}</label>\n <div class=btn-group>\n <button class="btn" ng-disabled="isEmptyOrFirst()" ng-click="first()"><i class="fa fa-fast-backward"></i></button>\n <button class="btn" ng-disabled="isEmptyOrFirst()" ng-click="previous()"><i class="fa fa-step-backward"></i></button>\n <button class="btn" ng-disabled="isEmptyOrLast()" ng-click="next()"><i class="fa fa-step-forward"></i></button>\n <button class="btn" ng-disabled="isEmptyOrLast()" ng-click="last()"><i class="fa fa-fast-forward"></i></button>\n </div>\n</div>\n'),e.put("plugins/ui/html/tagFilter.html",'<div>\n <ul class="list-unstyled label-list">\n <li ng-repeat="tag in visibleTags | orderBy:\'tag.id || tag\'"\n class="mouse-pointer"\n ng-click="toggleSelectionFromGroup(selected, tag.id || tag)">\n <span class="badge"\n ng-class="isInGroup(selected, tag.id || tag, \'badge-success\', \'\')"\n >{{tag.id || tag}}</span>\n <span class="pull-right"\n ng-show="tag.count">{{tag.count}} </span>\n </li>\n </ul>\n <div class="mouse-pointer"\n ng-show="selected.length"\n ng-click="clearGroup(selected)">\n <i class="fa fa-remove" ></i> Clear Tags\n </div>\n</div>\n'),e.put("plugins/ui/html/tagList.html",'<span>\n<script type="text/ng-template" id="tagBase.html">\n <span class="badge mouse-pointer" ng-class="isSelected(\'{{tag}}\')">{{tag}}</span>\n</script>\n<script type="text/ng-template" id="tagRemove.html">\n <i class="fa fa-remove" ng-click="removeTag({{tag}})"></i>\n</script>\n</span>\n'),e.put("plugins/ui/html/toc.html",'<div>\n <div ng-repeat="item in myToc">\n <div id="{{item[\'href\']}}Target" ng-bind-html="item.text">\n </div>\n </div>\n</div>\n')}]),hawtioPluginLoader.addModule("hawtio-ui-templates");var HawtioForms;!function(e){function t(e){var t=e||{properties:{}};return _.defaults(t,{style:2,mode:1}),t}!function(e){e[e.VIEW=0]="VIEW",e[e.EDIT=1]="EDIT"}(e.FormMode||(e.FormMode={}));e.FormMode;!function(e){e[e.STANDARD=0]="STANDARD",e[e.INLINE=1]="INLINE",e[e.HORIZONTAL=2]="HORIZONTAL",e[e.UNWRAPPED=3]="UNWRAPPED"}(e.FormStyle||(e.FormStyle={}));e.FormStyle;e.createFormConfiguration=t}(HawtioForms||(HawtioForms={}));var HawtioForms;!function(e){function t(e,t,n){t in e.postInterpolateActions||(e.postInterpolateActions[t]=[]),e.postInterpolateActions[t].push(n)}function n(e,t,n){t in e.preCompileActions||(e.preCompileActions[t]=[]),e.preCompileActions[t].push(n)}function i(e,t){switch(t.style){case 0:return e.$templateCache.get(y.FORM_STANDARD);case 1:return e.$templateCache.get(y.FORM_INLINE);case 3:return e.$templateCache.get(y.FORM_UNWRAPPED);default:return e.$templateCache.get(y.FORM_HORIZONTAL)}}function r(e,t,n,i){var r=void 0;switch(t.style){case 2:r=e.$templateCache.get(y.STANDARD_HORIZONTAL_INPUT);break;default:r=e.$templateCache.get(y.STANDARD_INPUT)}return o(e,t,n,r,i)}function o(e,t,n,i,r){var o=angular.element(i);"tooltip"in n&&o.attr({title:n.tooltip}),"control-group-attributes"in n&&o.attr(n["control-group-attributes"]),"label-attributes"in n&&o.find("label").attr(n["label-attributes"]);var a=o.find("input");return r&&a.attr({type:r}),"input-attributes"in n&&a.attr(n["input-attributes"]),o.prop("outerHTML")}function a(e,t){switch(t.style){case 2:return e.$templateCache.get(y.STATIC_HORIZONTAL_TEXT);default:return e.$templateCache.get(y.STATIC_TEXT)}}function s(e,t,n){}function l(e,n,i,r){var a=void 0;switch(n.style){case 2:a=e.$templateCache.get(y.SELECT_HORIZONTAL);break;default:a=e.$templateCache.get(y.SELECT)}return t(e,i,function(t){var n=t.find("select"),i=_.isArray(r["enum"]);if(i)if(_.isObject(_.first(r["enum"]))){var o=e.$templateCache.get(y.OPTION_CONFIG_OBJECT),a=e.$interpolate(o);_.forEach(r["enum"],function(e){var t=angular.element(a(e));t.attr(e.attributes),n.append(t)})}else{var o=e.$templateCache.get(y.OPTION_ARRAY),a=e.$interpolate(o);_.forEach(r["enum"],function(e){n.append(a({value:e}))})}else{var o=e.$templateCache.get(y.OPTION_OBJECT),a=e.$interpolate(o);_.forIn(r["enum"],function(e,t){n.append(a({key:t,value:e}))})}}),o(e,n,r,a)}function u(e,t,n){switch(t.style){case 2:return e.$templateCache.get(y.CHECKBOX_HORIZONTAL);default:return e.$templateCache.get(y.CHECKBOX)}}function c(e,n,i,r){var o="config.properties."+i;return"javaType"in r&&(o=r.javaType),t(e,i,function(t){t.find(".inline-object").attr({"hawtio-form-2":o,entity:"entity."+i,"no-wrap":"true",mode:n.mode,style:n.style,label:r.label||e.maybeHumanize(i)})}),e.$templateCache.get(y.OBJECT)}function d(e,n,i,r){return t(e,i,function(e){e.find(".inline-map").attr({"hawtio-forms-2-map":"config.properties."+i,entity:"entity."+i,mode:n.mode})}),e.$templateCache.get(y.MAP)}function p(e,n,i,r){return t(e,i,function(e){e.find(".inline-array").attr({"hawtio-forms-2-array":"config.properties."+i,entity:"entity."+i,mode:n.mode})}),e.$templateCache.get(y.ARRAY)}function h(e,t,n,i){var s=e.mappings.getMapping(i.type);if("enum"in i&&(s="select"),"properties"in i&&(s="object"),i.hidden&&(s="hidden"),"object"===i.type&&i.javaType&&_.startsWith(i.javaType,"java.util.Map")&&(s="map"),s)switch(s){case"array":return p(e,t,n,i);case"number":return r(e,t,i,"number");case"password":return r(e,t,i,"password");case"text":return r(e,t,i,"text");case"static":return a(e,t);case"object":return c(e,t,n,i);case"map":return d(e,t,n,i);case"hidden":return i.hidden=!0,o(e,t,i,e.$templateCache.get(y.HIDDEN));case"select":return l(e,t,n,i);case"checkbox":return u(e,t,i)}var h=i.javaType||i.type,f=e.schemas.getSchema(h);return f?c(e,t,n,_.extend(i,f)):void 0}function f(e,t,n,i){return"formTemplate"in i?i.formTemplate:h(e,t,n,i)}function g(e,t,n,i,r,o){var a=e.$interpolate(r),s=a({maybeHumanize:e.maybeHumanize,control:i,name:n,model:o});if(e.postInterpolateActions[n]){var l=angular.element(s);e.postInterpolateActions[n].forEach(function(e){e(l)}),s=l.prop("outerHTML")}return s}function m(e){return function(t){var n=e.config;return!n||n&&!n.disableHumanizeLabel?Core.humanizeValue(t):t}}function v(t,n,i){void 0===i&&(i=!0);var r=n;if(!r&&i){var o=t.attrs[t.directiveName];o&&(r=t.schemas.cloneSchema(o),r||(r={}))}return r&&("label"in t.attrs&&(r.label=t.attrs.label),"mode"in t.attrs&&(r.mode=Number(t.attrs.mode)),"style"in t.attrs&&(r.style=Number(t.attrs.style)),"noWrap"in t.attrs&&t.attrs.noWrap&&(r.style=3)),e.createFormConfiguration(r)}e.pluginName="hawtio-forms2",e.templatePath="plugins/forms2/html",e.log=Logger.get(e.pluginName);var y=function(){function t(){}return Object.defineProperty(t,"FORM_STANDARD",{get:function(){return UrlHelpers.join(e.templatePath,"form-standard.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"FORM_INLINE",{get:function(){return UrlHelpers.join(e.templatePath,"form-inline.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"FORM_UNWRAPPED",{get:function(){return UrlHelpers.join(e.templatePath,"form-unwrapped.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"FORM_HORIZONTAL",{get:function(){return UrlHelpers.join(e.templatePath,"form-horizontal.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"STANDARD_HORIZONTAL_INPUT",{get:function(){return UrlHelpers.join(e.templatePath,"standard-horizontal-input.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"STANDARD_INPUT",{get:function(){return UrlHelpers.join(e.templatePath,"standard-input.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"STATIC_HORIZONTAL_TEXT",{get:function(){return UrlHelpers.join(e.templatePath,"static-horizontal-text.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"STATIC_TEXT",{get:function(){return UrlHelpers.join(e.templatePath,"static-text.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SELECT_HORIZONTAL",{get:function(){return UrlHelpers.join(e.templatePath,"select-horizontal.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SELECT",{get:function(){return UrlHelpers.join(e.templatePath,"select.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OPTION_ARRAY",{get:function(){return UrlHelpers.join(e.templatePath,"optionArray.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OPTION_OBJECT",{get:function(){return UrlHelpers.join(e.templatePath,"optionObject.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OPTION_CONFIG_OBJECT",{get:function(){return UrlHelpers.join(e.templatePath,"optionConfigObject.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"CHECKBOX_HORIZONTAL",{get:function(){return UrlHelpers.join(e.templatePath,"checkbox-horizontal.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"CHECKBOX",{get:function(){return UrlHelpers.join(e.templatePath,"checkbox.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OBJECT",{get:function(){return UrlHelpers.join(e.templatePath,"object.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"ARRAY",{get:function(){return UrlHelpers.join(e.templatePath,"array.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MAP",{get:function(){return UrlHelpers.join(e.templatePath,"map.html")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"HIDDEN",{get:function(){return UrlHelpers.join(e.templatePath,"hidden.html")},enumerable:!0,configurable:!0}),t}();e.Constants=y,e.addPostInterpolateAction=t,e.addPreCompileAction=n,e.getFormMain=i,e.getStandardTemplate=r,e.applyElementConfig=o,e.getStaticTextTemplate=a,e.setSelectOptions=s,e.getSelectTemplate=l,e.getCheckboxTemplate=u,e.getObjectTemplate=c,e.getMapTemplate=d,e.getArrayTemplate=p,e.lookupTemplate=h,e.getTemplate=f,e.interpolateTemplate=g,e.createMaybeHumanize=m,e.initConfig=v}(HawtioForms||(HawtioForms={}));var HawtioForms;!function(e){e._module=angular.module(e.pluginName,[]),e._module.run(function(){e.log.debug("loaded")}),hawtioPluginLoader.addModule(e.pluginName)}(HawtioForms||(HawtioForms={}));var HawtioForms;!function(e){e._module.directive("hawtioCombobox",[function(){return{restrict:"A",link:function(e,t,n){e.$watch(_.debounce(function(){t.prop("disabled")||t.children().length>5&&t.combobox()},100,{trailing:!0}))}}}])}(HawtioForms||(HawtioForms={}));var HawtioForms;!function(e){function t(e,t){var n=t.find("tbody");return n.empty(),n}function n(t,n,r,o){_.forEach(r,function(r,a){var s=i(t);n.properties.$items?s.append("<td>"+r+"</td>"):_.forIn(n.properties,function(n,i){var o={style:3,mode:0,properties:{}};o.properties[i]=n;var l=e.getTemplate(t,o,i,n);if(l){var u=angular.element(l);u.attr({"class":""}),u.find("label").text(""),["input","select"].forEach(function(e){u.find(e).attr({"ng-disabled":"true",style:"width: auto"}).removeClass("form-control").addClass("table-control")}),n["enum"]&&e.addPostInterpolateAction(t,i,function(t){var r=t.find("select"),o="config.columnSchema.properties['"+i+"'].enum";e.setSelectOptions(_.isArray(n["enum"]),o,r)}),("properties"in n||"javaType"in n)&&e.addPostInterpolateAction(t,i,function(e){e.find("h4").remove(),e.find(".inline-object").attr({entity:"entity["+a+"]."+i,label:!1})}),l=e.interpolateTemplate(t,o,i,n,u.prop("outerHTML"),"entity["+a+"]."+i);var c=angular.element("<td></td>");c.append(l),s.append(c)}else s.append("<td>"+r[i]+"</td>")});var l=angular.element(t.$templateCache.get("deleteRow.html"));l.find(".deleteRow").attr({"ng-click":"deleteRow("+a+")"}),l.find(".editRow").attr({"ng-click":"editRow("+a+")"}),s.append(l),o.append(s)})}function i(e){return angular.element(e.$templateCache.get("rowTemplate.html"))}function r(e,t){var n=t.find("thead");return n.empty(),n.append(e.$templateCache.get("rowTemplate.html")).find("tr")}function o(e,t,n){var i=r(e,t);return _.forIn(n.properties,function(t,n){var r=e.$interpolate(t.headerTemplate||e.$templateCache.get("header.html"));i.append(r({control:t,name:e.maybeHumanize(n)}))}),i.append(e.$templateCache.get("newItemHeader.html")),i}var a="hawtioForms2Array";e._module.directive(a,["$compile","$templateCache","$interpolate","SchemaRegistry","ControlMappingRegistry","$modal",function(i,r,s,l,u,c){return{restrict:"A",replace:!0,templateUrl:UrlHelpers.join(e.templatePath,"forms2Array.html"),scope:{config:"="+a,entity:"=?"},link:function(d,p,h){d.$watch("config",function(f){function g(e){var t=_.clone(e,!0);return t.style=0,"$items"in t.properties&&(t.properties.$items["label-attributes"]={style:"display: none"}),t}var m={postInterpolateActions:{},maybeHumanize:void 0,config:void 0,element:p,attrs:h,mappings:u,schemas:l,$templateCache:r,$interpolate:s,$compile:i,directiveName:a},v=e.initConfig(m,_.cloneDeep(f),!1);if(m.config=v,m.maybeHumanize=e.createMaybeHumanize(m),d.entity||(d.entity=[]),v&&v.items){var y=v.items.type||v.items.javaType,b=d.entity,w={properties:{}};if(u.hasMapping(y)){var x={};_.merge(x,v,{type:u.getMapping(y)}),"items"in x&&delete x.items,x.label||(x.label="Entries"),w.properties.$items=x}else w=l.getSchema(y);var k=angular.element(r.get("table.html")),C=(o(m,k,w),d.$new());v.columnSchema=w,C.config=v,C.entity=b,C.deleteRow=function(t){var n=c.open({templateUrl:UrlHelpers.join(e.templatePath,"arrayItemModal.html"),controller:["$scope","$modalInstance",function(e,i){e.schema=g(w),e.schema.mode=0,e.header="Delete Entry?",e.description="<p>Are you sure you want to delete the following entry?</p><p><strong>This operation cannot be undone!</strong></p>",w.properties.$items?e.newEntity={$items:b[t]}:e.newEntity=_.clone(b[t]),e.ok=function(){n.close(),b.splice(t,1)},e.cancel=function(){n.dismiss()}}]})},C.editRow=function(t){var n=c.open({templateUrl:UrlHelpers.join(e.templatePath,"arrayItemModal.html"),controller:["$scope","$modalInstance",function(e,i){e.schema=g(w),e.header="Edit Entry",w.properties.$items?e.newEntity={$items:b[t]}:e.newEntity=_.clone(b[t]),e.ok=function(){n.close(),"$items"in e.newEntity?b[t]=e.newEntity.$items:b[t]=e.newEntity},e.cancel=function(){n.dismiss()}}]})},C.createNewRow=function(){var t=c.open({templateUrl:UrlHelpers.join(e.templatePath,"arrayItemModal.html"),controller:["$scope","$modalInstance",function(e,n){e.schema=g(w),e.newEntity=void 0,e.header="Add New Entry",e.ok=function(){t.close(),"$items"in e.newEntity?b.push(e.newEntity.$items):b.push(e.newEntity)},e.cancel=function(){t.dismiss()}}]})},C.watch=C.$watchCollection("entity",function(e,r){d.entity=e;var o=t(m,k),a=angular.element("<div></div>");n(m,w,e,a),o.append(i(a.children())(C))}),p.append(i(k)(C))}},!0)}}}])}(HawtioForms||(HawtioForms={}));var HawtioForms;!function(e){var t="hawtioForm2";e._module.directive(t,["$compile","$templateCache","$interpolate","SchemaRegistry","ControlMappingRegistry",function(n,i,r,o,a){return{restrict:"A",replace:!0,templateUrl:UrlHelpers.join(e.templatePath,"forms2Directive.html"),scope:{config:"="+t,entity:"=?"},link:function(s,l,u){s.$watch("config",function(){l.empty();var c={postInterpolateActions:{},preCompileActions:{},maybeHumanize:void 0,config:void 0,scope:void 0,element:l,attrs:u,mappings:a,schemas:o,$templateCache:i,$interpolate:r,$compile:n,directiveName:t
|
|
3257
|
|
-},d=e.initConfig(c,_.cloneDeep(s.config));c.config=d,c.maybeHumanize=e.createMaybeHumanize(c),s.entity||(s.entity={});var p=s.entity;if("properties"in d){var h=c.scope=s.$new();h.config=d,h.maybeHumanize=c.maybeHumanize;var f={},g={},m=angular.element(e.getFormMain(c,d));m.find("form").attr({name:d.id||"form"});var v=m.find("fieldset");0===v.length&&(v=m);var y=!1;if("wizard"in d&&d.wizard.pages){var b=d.wizard,w=i.get("wizardParent.html");v.append(w),h.pageIds=[],v=v.find(".wizardParent"),h.onFinish=function(){e.log.warn("No onFinish() function supplied to form wizard")},h.buttons={next:"Next",back:"Back",finish:"Finish"},_.forIn(b,function(e,t){h[t]=e}),_.forIn(b.pages,function(t,r){"title"in t||(t.title=r),t.el=angular.element(i.get("wizardPage.html")),t.el.attr({"ng-switch-when":r}),t.el.find("h3").text(r),"template"in t&&t.el.append(n(t.template)(s)),t.parent=t.el.find(".wizardPageBody"),t.parent.attr({"ng-form":_.camelCase(r)}),e.addPreCompileAction(c,_.camelCase(r),function(){var e=angular.element(i.get("wizardButtons.html")),n={"ng-disabled":_.camelCase(r)+".$invalid"};e.find(".next").attr(n),e.find(".finish").attr(n),t.parent.append(e)}),f[r]=t,h.pageIds.push(r)}),h.currentPageIndex=0,h.gotoPage=function(e,t){if(!(0>e||e>h.pageIds.length)){if(h.onChange){var n=h.onChange(t,e,h.pageIds);if(n)return void(h.currentPageIndex=n)}h.currentPageIndex=e}},h.isValid=function(){return e.log.debug("scope: ",s),!0},h.getCurrentPageId=function(){return h.pageIds[h.currentPageIndex]},h.atFront=function(){return 0===h.currentPageIndex},h.atBack=function(){return h.currentPageIndex===h.pageIds.length-1},h.next=function(){h.gotoPage(h.currentPageIndex+1,h.currentPageIndex)},h.back=function(){h.gotoPage(h.currentPageIndex-1,h.currentPageIndex)}}else if("tabs"in d){v.append(i.get("tabElement.html")),v=v.find(".tabbable");var x=d.tabs;_.forIn(x,function(e,t){var n=angular.element(i.get("tabPage.html"));n.attr({title:t});var r={controls:e,el:n,parent:n};f[t]=r})}else"controls"in d?(f.$main={controls:d.controls,el:m,parent:v},y=!0):(f.$main={controls:["*"],el:m,parent:v},y=!0);_.forIn(d.properties,function(t,n){var i=Core.pathGet(t,["typeaheadData"]);i&&!Core.pathGet(t,["input-attributes","typeahead"])&&Core.pathSet(t,["input-attributes","typeahead"],"item for item in config.properties."+n+".typeaheadData");var r=Core.pathGet(t,["input-attributes","value"]);r&&(p[n]=r);var o=Core.pathGet(t,["default"]);o&&(p[n]=o);var a=e.getTemplate(c,d,n,t);a&&(a=e.interpolateTemplate(c,d,n,t,a,"entity."+n),g[n]=a)});var k=_.keys(f),C=void 0;k.forEach(function(t){var n=f[t];n.controls&&n.controls.forEach(function(i){"*"===i?y?_.forIn(g,function(e,t){_.any(n.controls,function(e){return e===t})||(n.parent.append(e),delete g[t])}):C=t:i in g?(n.parent.append(g[i]),delete g[i]):e.log.debug("Control with name ",i," not found")})}),_.keys(g).length>0&&(C||(C=_.last(k)),_.forIn(g,function(e,t){f[C].parent.append(e),delete g[t]})),_.forIn(f,function(e,t){"$main"!==t&&v.append(e.el)}),_.forIn(c.preCompileActions,function(e,t){_.forEach(e,function(e){e()})}),l.append(n(m)(h))}},!0)}}}])}(HawtioForms||(HawtioForms={}));var HawtioForms;!function(e){var t="hawtioForms2Map";e._module.directive(t,["$compile","$templateCache","$interpolate","SchemaRegistry","ControlMappingRegistry","$modal",function(n,i,r,o,a,s){function l(e,t){var n=t.find("tbody");return n.empty(),n}function u(e,t,n){var i={properties:{},control:n};return"items"in n?i.properties[e]={noLabel:!0,type:t,items:{type:n.items.type}}:a.hasMapping(t)?i.properties[e]={noLabel:!0,type:a.getMapping(t)}:i=o.getSchema(t),i.control=n,i}function c(e,t,n,i,o){var s=e.s;s.keys={},s.values={},_.forIn(t,function(t,n){s.keys[n]={key:n},i.control.items||a.hasMapping(i.control.type)?s.values[n]={value:t}:s.values[n]=t;var l=e.$templateCache.get("mapRowTemplate.html"),u=r(l);l=u({key:n}),o.append(l)})}return{restrict:"A",replace:!0,templateUrl:UrlHelpers.join(e.templatePath,"forms2Map.html"),scope:{config:"="+t,entity:"=?"},link:function(d,p,h){d.$watch("config",function(f){function g(t){var n=_.cloneDeep(t);return n.style=0,_.forIn(n.properties,function(e,t){"noLabel"in e&&delete e.noLabel}),e.log.debug("Schema: ",t),n}var m={postInterpolateActions:{},maybeHumanize:void 0,config:void 0,s:void 0,element:p,attrs:h,mappings:a,schemas:o,$templateCache:i,$interpolate:r,$compile:n,directiveName:t},v=e.initConfig(m,_.cloneDeep(f),!1);if(m.config=v,m.maybeHumanize=e.createMaybeHumanize(m),d.entity||(d.entity={}),!v||!v.items)return void e.log.debug("Invalid map config, no 'items' configured");if(!v.items.key)return void e.log.debug("Invalid map config, no 'key' attribute configured in 'items'");if(!v.items.value)return void e.log.debug("Invalid map config, no 'value' attribute configured in 'items'");var y=d.entity,b=d.$new();m.s=b;var w=u("key",v.items.key.type,v.items.key),x=u("value",v.items.value.type,v.items.value),k=angular.element(i.get("table.html"));k.find("tbody");b.config=v,b.entity=y,b.keySchema=_.cloneDeep(w),b.valueSchema=_.cloneDeep(x),b.keySchema.mode=b.valueSchema.mode=0,b.keySchema.style=b.valueSchema.style=3,b.keySchema.hideLegend=b.valueSchema.hideLegend=!0,b.editRow=function(t){e.log.debug("Edit row: ",t)},b.deleteRow=function(t){e.log.debug("Delete row: ",t)},b.createRow=function(){e.log.debug("create row");var t=s.open({templateUrl:"mapItemModal.html",controller:["$scope","$modalInstance",function(n,i){n.header="Create Entry",n.description="<p>Add a new entry to the map by filling in the details for the key and value</p>",n.keySchema=g(w),n.valueSchema=g(x),n.ok=function(){t.close();var i=n.newKeyEntity.key,r=n.newValueEntity;(x.control.items||a.hasMapping(x.control.type))&&(r=n.newValueEntity.value),e.log.debug("New key: ",i),e.log.debug("New value: ",r),y[i]=r},n.cancel=function(){t.dismiss()}}]})},b.$watch("entity",function(e,t){d.entity=e;var i=l(m,k),r=angular.element("<div></div>");c(m,e,w,x,r),i.append(n(r.children())(b))},!0),p.append(n(k)(b))})}}}])}(HawtioForms||(HawtioForms={}));var HawtioForms;!function(e){e._module.factory("SchemaRegistry",["ControlMappingRegistry",function(e){function t(e,t){i[e]=t,_.forIn(r,function(n,i){n(e,t)})}function n(t){return e.getMapping(t)===t?{type:"object",javaType:t}:{type:t}}var i={},r={},o={addListener:function(e,t){e&&t&&(_.forIn(i,function(e,n){t(n,e)}),r[e]=t)},removeListener:function(e){e in r&&delete r[e]},addSchema:function(e,i){var r=_.cloneDeep(i);_.forIn(r.properties,function(e,t){if(_.startsWith(e.javaType,"java.util.Map")){var i=e.javaType.replace("java.util.Map<","").replace(">",""),r=i.split(",");if(2!==r.length)return;e.type="map",e.items={key:n(r[0]),value:n(r[1])}}}),t(e,r),i.javaType&&t(i.javaType,r),i.definitions&&_.forIn(i.definitions,function(e,t){o.addSchema(t,e)})},getSchema:function(e){return i[e]},cloneSchema:function(e){return _.clone(i[e],!0)},removeSchema:function(e){var t=void 0;return e in i&&(t=i[e],delete i[e]),t},iterate:function(e){_.forIn(i,e)}};return o}])}(HawtioForms||(HawtioForms={}));var HawtioForms;!function(e){e._module.factory("ControlMappingRegistry",[function(){var e={},t={hasMapping:function(t){return t?t.toLowerCase()in e:!1},addMapping:function(t,n){e[t.toLowerCase()]=n},getMapping:function(t){if(!t)return void 0;var n=e[t.toLowerCase()];return n?n:t},removeMapping:function(t){var n=void 0;return t.toLowerCase()in e&&(n=e[t.toLowerCase()],delete e[t.toLowerCase()]),n},iterate:function(t){_.forIn(e,t)}};return _.forEach(["int","number","integer","long","short","java.lang.integer","java.lang.long","float","double","java.lang.float","java.lang.double"],function(e){return t.addMapping(e,"number")}),_.forEach(["boolean","bool","java.lang.boolean"],function(e){return t.addMapping(e,"checkbox")}),t.addMapping("password","password"),t.addMapping("hidden","hidden"),t.addMapping("static","static"),t.addMapping("enum","select"),t.addMapping("choice","radio-group"),t.addMapping("multiple","multiple-select"),_.forEach(["string","text","java.lang.string"],function(e){return t.addMapping(e,"text")}),t}])}(HawtioForms||(HawtioForms={}));var Forms;!function(e){function t(e,t){e&&t&&angular.forEach(t.properties,function(t,n){var i=t["default"];i&&!e[n]&&(console.log("===== defaulting value "+i+" into entity["+n+"]"),e[n]=i)})}function n(e,t){if(e&&t){var n=o(e,t);if(n){var i=n.type;i&&(e=i)}}return e}function i(e,t,n){for(var i=o(e,t);i;){var r=Core.pathGet(i,["extends","type"]);if(!r)return!1;if(n===r)return!0;i=o(r,t)}return!1}function r(e){return e?e.replace(/-/g,"_"):e}function o(e,t){if(t){var n=t.definitions;if(n){var i=n[e];if(i){var r=i.fullSchema;if(r)return r;var a=Core.pathGet(i,["extends","type"]);if(a)return r=angular.copy(i),r.properties=r.properties||{},angular.isArray(a)||(a=[a]),angular.forEach(a,function(e){if(angular.isString(e)){var n=o(e,t),i=Core.pathGet(n,["properties"]);i&&angular.forEach(i,function(e,t){r.properties[t]=e})}}),i.fullSchema=r,r}return i}}return null}function a(e,t){var n=null;if(e&&t){if(n=e.items){var i=n.type;if(i){var r=o(i,t);if(r)return r}}var a=e.additionalProperties;if(a&&"#"===a.$ref)return t}return n}function s(e){var t=Core.pathGet(e,"type");return t&&"object"===t}function l(e,t){if(e){var i=n(e.type,t);if(i&&("object"===i||"array"===i))return!0}return!1}function u(e,t,n){return angular.isDefined(t)&&(e=angular.extend(e,t)),angular.extend(e,n)}function c(e,t,n){var i=angular.element('<div class="'+e.controlgroupclass+'"></div>');if(angular.isDefined(t.description)&&i.attr("title",t.description),e.properties&&e.properties[n]){var r=e.properties[n];r&&"control-attributes"in r&&angular.forEach(r["control-attributes"],function(e,t){i.attr(t,e)})}return i}function d(e,t,n,i){return void 0===i&&(i=!1),i?angular.element('<label class="strong '+e.labelclass+'">'+n+": </label>"):angular.element('<label class="'+e.labelclass+'">'+n+": </label>")}function p(e){return angular.element('<div class="'+e.controlclass+'"></div>')}function h(e,t,n,i){void 0===i&&(i=null);var r=Core.pathGet(e.data,["properties",n,"help"]);Core.isBlank(r)&&(r=Core.pathGet(e.data,["properties",n,"description"])),Core.isBlank(r)&&angular.isDefined(i)&&(r=Core.pathGet(i,["help"]),Core.isBlank(r)&&(r=Core.pathGet(i,["description"])));var o=e.showhelp||"true";return Core.isBlank(r)?angular.element('<span class="help-block"></span>'):angular.element('<span class="help-block" ng-show="'+o+'">'+r+"</span>")}e.log=Logger.get("Forms"),e.defaultValues=t,e.resolveTypeNameAlias=n,e.isJsonType=i,e.safeIdentifier=r,e.lookupDefinition=o,e.findArrayItemsSchema=a,e.isObjectType=s,e.isArrayOrNestedObject=l,e.configure=u,e.getControlGroup=c,e.getLabel=d,e.getControlDiv=p,e.getHelpSpan=h}(Forms||(Forms={}));var Forms;!function(e){function t(t,i,r,o,a,s,l,u,c){function d(e,t){var n=i[t];n&&angular.forEach(n,function(t,n){angular.isString(t)&&e.attr(n,t)})}function p(){d(h,"input-attributes"),angular.forEach(i,function(e,t){if(angular.isString(e)&&t.indexOf("$")<0&&"type"!==t){var n=Core.escapeHtml(e);h.attr(t,n)}})}void 0===u&&(u=!0),void 0===c&&(c=!1);var h=null,f=null,g={valueConverter:null},m=e.safeIdentifier(a),v=i.required||!1,y=n(t,i,r,o,g,m);if(y){h=angular.element(y),p(),a=m;var b=o.model||Core.pathGet(i,["input-attributes","ng-model"]);b||(b=o.getEntity()+"."+a),h.attr("ng-model",b),h.attr("name",a);var w=i.title||i.tooltip||i.label;w&&h.attr("title",w);var x=i.tooltip||i.description;x&&h.attr("tooltip",x);var k=c||i.disableHumanizeLabel,C=a;if(s||i.ignorePrefixInLabel){var S=a.lastIndexOf(".");S>0&&(C=a.substring(S+1))}if("hidden"!==h.attr("type")&&u){f=this.getControlGroup(o,o,a);var _=i.title||i.label||(k?C:Core.humanizeValue(C)),T=e.getLabel(o,o,_,v);x?T.attr("title",x):w&&T.attr("title",w),f.append(T),d(T,"label-attributes");var $=e.getControlDiv(o);$.append(h),$.append(e.getHelpSpan(o,o,a,i)),f.append($);var E=o.showempty;if(angular.isDefined(E)){var D="true";"true"===E||"false"===E?D=E:angular.isString(a)&&(D=E+"('"+a+"')"),f.attr("ng-show",D)}d($,"control-attributes"),d(f,"control-group-attributes");var M=o.scope;if(M&&b){var I=function(e){M.$emit("hawtio.form.modelChange",b,e)},P=I,A=g.valueConverter;A&&(P=function(){A(M,b);var e=Core.pathGet(M,b);I(e)}),M.$watch(b,P)}}}else{h=angular.element("<div></div>"),h.attr(e.normalize(t,i,r),""),p(),h.attr("entity",o.getEntity()),h.attr("mode",o.getMode());var j=o.schemaName;j&&h.attr("schema",j),l&&h.attr("data",l),(s||i.ignorePrefixInLabel)&&h.attr("ignore-prefix-in-label",!0),(c||i.disableHumanizeLabel)&&h.attr("disable-humanize-label",!0),h.attr("name",a)}var N=i.label;N&&h.attr("title",N);try{o.isReadOnly()&&(h.attr("readonly","true"),("select"===h[0].localName||"input"===h[0].localName&&"checkbox"===h.attr("type"))&&h.attr("disabled","true"))}catch(O){}return v&&("select"===h[0].localName||"input"===h[0].localName&&"checkbox"===h.attr("type")?h.removeAttr("required"):h.attr("required","true")),f?f:h}function n(t,n,i,r,o,a){function s(e,t){var i=Core.pathGet(e,t);if(!i){var r=n["default"]||n.defaultValue;r&&(i=r,Core.pathSet(e,t,i))}return i}var l=e.resolveTypeNameAlias(t,i);if(!l)return'<input type="text"/>';var u=Core.pathGet(n,["formTemplate"]);if(u)return null;var c=Core.pathGet(n,["input-element"]);if(c)return"<"+c+"></"+c+">";var d=Core.pathGet(n,["enum"]);if(d){var p=!0,h=null,f="";if(d){var g=r.scope,m=r.data;if(m&&g){var v=g[r.schemaName],y=angular.isString(m)?g[m]:m,b=a.split("."),n=null;angular.forEach(b,function(t){n=Core.pathGet(y,["properties",t]);var i=Core.pathGet(n,["type"]),r=e.lookupDefinition(i,v);r&&(y=r)});var w=Core.pathGet(n,["enum"]);angular.isUndefined(w)&&(w=d),h="$values_"+a.replace(/\./g,"_"),g[h]=w}}h&&(f+=' ng-options="value for value in '+h+'"');var x=p?"":'<option value=""></option>';return"<select"+f+">"+x+"</select>"}if(angular.isArray(l))return null;if(!angular.isString(l))return null;var k=null,C=n["default"]||n.defaultValue;switch(C&&(k=function(e,t){var n=Core.pathGet(e,t);n||Core.pathSet(e,t,C)},o.valueConverter=k),l.toLowerCase()){case"int":case"integer":case"long":case"short":case"java.lang.integer":case"java.lang.long":case"float":case"double":case"java.lang.float":case"java.lang.double":return o.valueConverter=function(e,t){var n=s(e,t);if(n&&angular.isString(n)){var i=Number(n);Core.pathSet(e,t,i)}},'<input type="number" class="form-input"/>';case"array":case"java.lang.array":case"java.lang.iterable":case"java.util.list":case"java.util.collection":case"java.util.iterator":case"java.util.set":case"object[]":return null;case"boolean":case"bool":case"java.lang.boolean":return o.valueConverter=function(e,t){var n=s(e,t);n&&"true"===n&&Core.pathSet(e,t,!0)},'<input type="checkbox" class="form-input"/>';case"password":return'<input type="password" class="form-input"/>';case"hidden":return'<input type="hidden" class="form-input"/>';case"map":return null;default:return'<input type="text" class="form-input"/>'}}function i(e){switch(e.toLowerCase()){case"int":case"integer":case"long":case"short":case"java.lang.integer":case"java.lang.long":case"float":case"double":case"java.lang.float":case"java.lang.double":return"number";case"array":case"java.lang.array":case"java.lang.iterable":case"java.util.list":case"java.util.collection":case"java.util.iterator":case"java.util.set":case"object[]":return"text";case"boolean":case"bool":case"java.lang.boolean":return"checkbox";case"password":return"password";case"hidden":return"hidden";default:return"text"}}function r(t,n,i){if(t=e.resolveTypeNameAlias(t,i),!t)return"hawtio-form-text";var r=Core.pathGet(n,["formTemplate"]);if(r)return"hawtio-form-custom";var o=Core.pathGet(n,["enum"]);if(o)return"hawtio-form-select";if(angular.isArray(t))return null;if(!angular.isString(t)){try{console.log("Unsupported JSON schema type value "+JSON.stringify(t))}catch(a){console.log("Unsupported JSON schema type value "+t)}return null}switch(t.toLowerCase()){case"int":case"integer":case"long":case"short":case"java.lang.integer":case"java.lang.long":case"float":case"double":case"java.lang.float":case"java.lang.double":return"hawtio-form-number";case"array":case"java.lang.array":case"java.lang.iterable":case"java.util.list":case"java.util.collection":case"java.util.iterator":case"java.util.set":case"object[]":var s=n.items;if(!s)return"hawtio-form-string-array";var l=s.type;return l&&"string"===l?"hawtio-form-string-array":(e.log.debug("Returning hawtio-form-array for : ",n),"hawtio-form-array");case"boolean":case"bool":case"java.lang.boolean":return"hawtio-form-checkbox";case"password":return"hawtio-form-password";case"hidden":return"hawtio-form-hidden";case"map":return"hawtio-form-map";default:return"hawtio-form-text"}}e.createWidget=t,e.createStandardWidgetMarkup=n,e.mapType=i,e.normalize=r}(Forms||(Forms={}));var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n},Forms;!function(e){var t=function(){function e(){this.name="input",this.type="",this.description="",this._default="",this.scope=null,this.mode="edit",this.schemaName="schema",this.controlgroupclass="control-group",this.controlclass="controls",this.labelclass="control-label",this.showtypes="false",this.formtemplate=null,this.entity="entity",this.model=void 0}return e.prototype.getEntity=function(){return this.entity||"entity"},e.prototype.getMode=function(){return this.mode||"edit"},e.prototype.isReadOnly=function(){return"view"===this.getMode()},e}();e.InputBaseConfig=t;var n=function(){function n(e){var t=this;this.$compile=e,this.restrict="A",this.scope=!0,this.replace=!1,this.transclude=!1,this.attributeName="",this.link=function(e,n,i){return t.doLink(e,n,i)}}return n.prototype.doLink=function(n,i,r){function o(e){n.$emit("hawtio.form.modelChange",u,e)}var a=new t;a=e.configure(a,null,r),a.scope=n,a.schemaName=r.schema||"schema";var s=e.safeIdentifier(a.name),l=this.getControlGroup(a,a,s),u=a.model;angular.isDefined(u)||(u=a.getEntity()+"."+s);var c=s;if("true"===r.ignorePrefixInLabel){var d=s.lastIndexOf(".");d>0&&(c=s.substring(d+1))}var p="true"===r.disableHumanizeLabel,h=r.title||(p?c:Core.humanizeValue(c));l.append(e.getLabel(a,a,h));var f=e.getControlDiv(a);f.append(this.getInput(a,a,s,u)),f.append(e.getHelpSpan(a,a,s)),l.append(f),$(i).append(this.$compile(l)(n)),n&&u&&n.$watch(u,o)},n.prototype.getControlGroup=function(t,n,i){return e.getControlGroup(t,n,i)},n.prototype.getInput=function(e,t,n,i){var r=$('<span class="form-data"></span>');return i&&(r.attr("ng-model",i),r.append("{{"+i+"}}")),r},n}();e.InputBase=n;var i=function(e){function t(t){e.call(this,t),this.$compile=t,this.type="text"}return __extends(t,e),t.prototype.getInput=function(t,n,i,r){if(t.isReadOnly())return e.prototype.getInput.call(this,t,n,i,r);var o=$('<input type="'+this.type+'">');o.attr("name",i),r&&o.attr("ng-model",r),t.isReadOnly()&&o.attr("readonly","true");var a=t.$attr.required;return a&&"false"!==a&&o.attr("required","true"),o},t}(n);e.TextInput=i;var r=function(e){function t(t){e.call(this,t),this.$compile=t,this.type="hidden"}return __extends(t,e),t.prototype.getControlGroup=function(t,n,i){var r=e.prototype.getControlGroup.call(this,t,n,i);return r.css({display:"none"}),r},t.prototype.getInput=function(t,n,i,r){var o=e.prototype.getInput.call(this,t,n,i,r);return o.attr("readonly","true"),o},t}(i);e.HiddenText=r;var o=function(e){function t(t){e.call(this,t),this.$compile=t,this.type="password"}return __extends(t,e),t}(i);e.PasswordInput=o;var a=function(e){function t(t){e.call(this,t),this.$compile=t}return __extends(t,e),t.prototype.getInput=function(e,t,n,i){var r=t.formtemplate;r=Core.unescapeHtml(r);var o=$(r);return o.attr("name")||o.attr("name",n),i&&o.attr("ng-model",i),e.isReadOnly()&&o.attr("readonly","true"),o},t}(n);e.CustomInput=a;var s=function(t){function n(e){t.call(this,e),this.$compile=e}return __extends(n,t),n.prototype.getInput=function(n,i,r,o){if(n.isReadOnly())return t.prototype.getInput.call(this,n,i,r,o);var a=!0,s=a?"":'<option value=""></option>',l=$("<select>"+s+"</select>");l.attr("name",r);var u=n.scope,c=n.data;if(c&&u){var d=u[n.schemaName],p=u[c],h=r.split("."),f=null;angular.forEach(h,function(t){f=Core.pathGet(p,["properties",t]);var n=Core.pathGet(f,["type"]),i=e.lookupDefinition(n,d);i&&(p=i)});var g=Core.pathGet(f,["enum"]);u.$selectValues=g,l.attr("ng-options","value for value in $selectValues")}return o&&l.attr("ng-model",o),n.isReadOnly()&&l.attr("readonly","true"),l},n}(n);e.SelectInput=s;var l=function(e){function t(t){e.call(this,t),this.$compile=t}return __extends(t,e),t.prototype.getInput=function(t,n,i,r){function o(){var e=Core.pathGet(s,r);if(e&&angular.isString(e)){var t=Number(e);Core.pathSet(s,r,t)}}if(t.isReadOnly())return e.prototype.getInput.call(this,t,n,i,r);var a=$('<input type="number">');a.attr("name",i),angular.isDefined(n.def)&&a.attr("value",n.def),angular.isDefined(n.minimum)&&a.attr("min",n.minimum),angular.isDefined(n.maximum)&&a.attr("max",n.maximum),r&&a.attr("ng-model",r),t.isReadOnly()&&a.attr("readonly","true");var s=t.scope;return s&&(s.$watch(r,o),o()),a},t}(n);e.NumberInput=l;var u=function(t){function n(e){t.call(this,e),this.$compile=e}return __extends(n,t),n.prototype.getInput=function(t,n,i,r){function o(){var e=Core.pathGet(l,r);l[w]=e?Object.keys(e):[],l.$emit("hawtio.form.modelChange",r,e)}var a="_"+i,s="{{"+a+"}}";if(t.isReadOnly())return angular.element('<ul><li ng-repeat="'+a+" in "+r+'">'+s+"</li></ul>");var l=t.scope,u=(n.$attr||{}).schema||"schema",c=l[t.schemaName]||l[u]||{},d=c.properties||{},p=d[i]||{},h=p.items||{},f=h.type,g=!0,m=h.disableHumanizeLabel,v=null,y=Core.pathGet(l,r);y||Core.pathSet(l,r,[]);var b="_form_stringArray"+a+"_",w=b+"keys",x=b+"add",k=b+"remove";o(),l[x]=function(){var e=Core.pathGet(l,r)||[];e.push(""),Core.pathSet(l,r,e),o()},l[k]=function(e){var t=Core.pathGet(l,r)||[];e<t.length&&t.splice(e,1),Core.pathSet(l,r,t),o()};var C=r+"["+a+"]",S={model:C},_=!1,T=e.createWidget(f,h,c,S,C,g,v,_,m);T||(T=angular.element(s));var $=angular.element('<div class="controls" style="white-space: nowrap" ng-repeat="'+a+" in "+w+'"></div>');return $.append(T),$.append(angular.element('<a ng-click="'+k+"("+a+')" title="Remove this value"><i class="red icon-remove"></i></a>')),$.after(angular.element('<a ng-click="'+x+'()" title="Add a new value"><i class="icon-plus"></i></a>')),$},n}(n);e.StringArrayInput=u;var c=function(n){function i(e){n.call(this,e),this.$compile=e}return __extends(i,n),i.prototype.doLink=function(n,i,r){function o(e,t,n){if(n){var i=n.description;return i||angular.forEach(n,function(e,t){e&&!i&&(i=e)}),i}return null}var a=new t;a=e.configure(a,null,r);var s=a.name,l=r.data||"",u=r.entity||a.entity,c=r.schema||a.schemaName,d=["properties",s,"inputTable"],p=null;if(Core.pathGet(n,d),!p){var h=d.join("."),f="true"===r.disableHumanizeLabel,g=f?s:Core.humanizeValue(s);p={formConfig:a,title:g,data:a.entity+"."+s,displayFooter:!1,showFilter:!1,columnDefs:[{field:"_id",displayName:g,render:o}]},Core.pathSet(n,d,p)}var m=$('<div hawtio-input-table="'+h+'" data="'+l+'" property="'+s+'" entity="'+u+'" schema="'+c+'"></div>');a.isReadOnly()&&m.attr("readonly","true"),$(i).append(this.$compile(m)(n))},i}(n);e.ArrayInput=c;var d=function(e){function t(t){e.call(this,t),this.$compile=t}return __extends(t,e),t.prototype.getInput=function(e,t,n,i){function r(){var e=Core.pathGet(a,i);e&&"true"===e&&Core.pathSet(a,i,!0)}var o=$('<input class="hawtio-checkbox" type="checkbox">');o.attr("name",n),e.isReadOnly()&&o.attr("disabled","true"),i&&o.attr("ng-model",i),e.isReadOnly()&&o.attr("readonly","true");var a=e.scope;return a&&(a.$watch(i,r),r()),o},t}(n);e.BooleanInput=d}(Forms||(Forms={}));var Forms;!function(e){e.pluginName="hawtio-forms",e.templateUrl="plugins/forms/html/",e.log=Logger.get(e.pluginName)}(Forms||(Forms={}));var Forms;!function(e){var t=function(){function e(){this.name="form",this.method="post",this.entity="entity",this.schemaName="schema",this.mode="edit",this.data={},this.json=void 0,this.scope=null,this.scopeName=null,this.properties=[],this.action="",this.formclass="hawtio-form form-horizontal no-bottom-margin",this.controlgroupclass="form-group",this.controlclass="col-sm-10",this.labelclass="col-sm-2 control-label",this.showtypes="false",this.showhelp="true",this.showempty="true",this.onsubmit="onSubmit"}return e.prototype.getMode=function(){return this.mode||"edit"},e.prototype.getEntity=function(){return this.entity||"entity"},e.prototype.isReadOnly=function(){return"view"===this.getMode()},e}();e.SimpleFormConfig=t;var n=function(){function n(e){var t=this;this.$compile=e,this.restrict="A",this.scope=!0,this.replace=!0,this.transclude=!0,this.attributeName="simpleForm",this.link=function(e,n,i){return t.doLink(e,n,i)}}return n.prototype.isReadOnly=function(){return!1},n.prototype.doLink=function(n,i,r){function o(e){e&&a(e)}function a(t){d=e.configure(d,t,r),d.schemaName=p,d.scopeName=b,d.scope=n;var o=d.getEntity();angular.isDefined(d.json)?d.data=$.parseJSON(d.json):d.data=t;var a=x.createForm(d);if(v=a.find("fieldset"),y=d.data,m={elements:{},locations:{},use:!1},y&&angular.isDefined(y.tabs)&&(m.use=!0,m.div=$('<div class="tabbable hawtio-form-tabs"></div>'),angular.forEach(y.tabs,function(e,t){m.elements[t]=$('<div class="tab-pane" title="'+t+'"></div>'),m.div.append(m.elements[t]),e.forEach(function(e){m.locations[e]=t})}),m.locations["*"]||(m.locations["*"]=_.keys(y.tabs)[0])),m.use||v.append('<div class="spacer"></div>'),y)if(m.use){var s={};angular.forEach(y.properties,function(e,t){var n=l(t),i=s[n];i||(i=[],s[n]=i),i.push({id:t,property:e})}),angular.forEach(y.tabs,function(e,t){e.forEach(function(e){var t=s[e];t&&angular.forEach(t,function(e){var t=e.id,n=e.property;t&&n&&u(t,n)})})})}else angular.forEach(y.properties,function(e,t){u(t,e)});if(m.use){var h=m.div,k=Object.keys(m.elements).length;2>k?angular.forEach(h.children().children(),function(e){v.append(e)}):v.append(h)}var C=function(e,t){return angular.isDefined(e[t])&&angular.isFunction(e[t])?e:angular.isDefined(e.$parent)&&null!==e.$parent?C(e.$parent,t):null},S=d.onsubmit.replace("(","").replace(")",""),T=c(C(n,S),S);null===T&&(T=function(t,n){e.log.info("No submit handler defined for form:",n.get(0).name)}),angular.isDefined(T)&&a.submit(function(){if(e.log.debug("child scope: ",g),e.log.debug("form name: ",d),g[d.name].$invalid)return!1;var t=n[o];return T(t,a),!1}),v.append('<input type="submit" style="position: absolute; left: -9999px; width: 1px; height: 1px;">');var E=a.find("*[autofocus]");if((!E||!E.length)&&w){console.log("No autofocus element, so lets add one!");var D=w.find("input").first()||w.find("select").first();D&&D.attr("autofocus","true")}f&&$(f).remove(),g&&g.$destroy(),g=n.$new(!1),f=x.$compile(a)(g);var M="forms",I=n[M];I||(I={},n[M]=I);var P=d.name;if(P){var A=g[P];A&&(I[P]=A);var j=P+="$scope";I[j]=g}$(i).append(f)}function s(e){var t=m.locations[e];return t||angular.forEach(m.locations,function(n,i){!t&&"*"!==i&&e.match(i)&&(t=n)}),t||(t=m.locations["*"]),t}function l(e){var t=null;return angular.forEach(y.tabs,function(n,i){n.forEach(function(n){!t&&"*"!==n&&e.match(n)&&(t=n)})}),t||(t="*"),t}function u(t,n,i){void 0===i&&(i=n.ignorePrefixInLabel);var r=n.type;"java.lang.String"===r&&(r="string");var o=e.lookupDefinition(r,y);o||(o=e.lookupDefinition(r,h));var a=y?y.disableHumanizeLabel:!1;if(!n.hidden){if("expression"===n.kind){o=e.lookupDefinition("expression",h);var l=t+".language",c=t+".expression",p=jQuery.extend(!0,{},o.properties.expression);p.description=n.description,p.title=n.title,p.required=n.required;var f=e.createWidget(r,o.properties.language,y,d,l,i,b,!0,a),g=e.createWidget(r,p,y,d,c,i,b,!0,a),x=f.find("select"),k=g.find("input");return x&&k&&(x.attr("style","width: 120px; margin-right: 10px"),k.attr("style","width: 470px"),k.before(x)),void v.append(g)}var C=null;if(!o&&"object"===r&&n.properties?C=n.properties:o&&e.isObjectType(o)&&(C=o.properties),C)angular.forEach(C,function(e,i){var r=t+"."+i;u(r,e,n.ignorePrefixInLabel)});else{var S=!0,f=e.createWidget(r,n,y,d,t,i,b,S,a);if(m.use){var _=s(t);m.elements[_].append(f)}else v.append(f);w||(w=f)}}}function c(e,t){return null!==e?e[t]:null}var d=new t,p=r.schema,h=p?n[p]:null,f=null,g=null,m=null,v=null,y=null,b=r[this.attributeName]||r.data,w=null,x=this;n.$watch(b,o)},n.prototype.createForm=function(e){var t=$('<form class="'+e.formclass+'" novalidate><fieldset></fieldset></form>');return t.attr("name",e.name),t.attr("action",e.action),t.attr("method",e.method),t.find("fieldset").append(this.getLegend(e)),t},n.prototype.getLegend=function(e){var t=Core.pathGet(e,"data.description");return t?"<legend>"+t+"</legend>":""},n}();e.SimpleForm=n}(Forms||(Forms={}));var Forms;!function(e){var t=function(){function e(){this.name="form",this.method="post",this.entity="entity",this.tableConfig="tableConfig",this.mode="edit",this.data={},this.json=void 0,this.properties=[],this.action="",this.tableclass="table table-striped inputTable",this.controlgroupclass="control-group",this.controlclass="controls pull-right",this.labelclass="control-label",this.showtypes="true",this.removeicon="icon-remove",this.editicon="icon-edit",this.addicon="icon-plus",this.removetext="Remove",this.edittext="Edit",this.addtext="Add",this.onadd="onadd",this.onedit="onedit",this.onremove="onRemove",this.primaryKeyProperty=void 0}return e.prototype.getTableConfig=function(){return this.tableConfig||"tableConfig"},e}();e.InputTableConfig=t;var n=function(){function n(e){var t=this;this.$compile=e,this.restrict="A",this.scope=!0,this.replace=!0,this.transclude=!0,this.attributeName="hawtioInputTable",this.link=function(e,n,i){return t.doLink(e,n,i)}}return n.prototype.doLink=function(n,i,r){function o(e){var t=Core.pathGet(n,f);t||(t=[]),!angular.isArray(t)&&t&&(t=[t]),t=e(t),Core.pathSet(n,f,t),n.$emit("hawtio.datatable."+f,t),Core.$apply(n)}function a(e){return angular.forEach(n.config.selectedItems,function(t){var n=t._id;if(angular.isArray(e))e=e.remove(function(e){return _.isEqual(e,t)}),delete t._id,e=e.remove(function(e){return _.isEqual(e,t)});else if(delete t._id,n)delete e[n];else{var i=!1;angular.forEach(e,function(n,r){!i&&_.isEqual(n,t)&&(console.log("Found row to delete! "+r),delete e[r],i=!0)}),i||console.log("Could not find "+JSON.stringify(t)+" in "+JSON.stringify(e))}}),e}function s(e,t){return null!==e?e[t]:null}var l=this,u=new t,c=r[this.attributeName],d=Core.pathGet(n,c);u=e.configure(u,d,r);var p=r.entity||u.data||"entity",h=r.property||"arrayData",f=p+"."+h,g=u.primaryKeyProperty,m=u.title||p;angular.isDefined(u.json)?u.data=$.parseJSON(u.json):u.data=n[u.data];var v=$("<div></div>"),d=Core.pathGet(n,c);d?(d.selectedItems=[],n.config=d):console.log("No table configuration for table "+m);var y=this.createTable(u,c),b=this.getControlGroup(u,{},""),w=this.getControlDiv(u);w.addClass("btn-group"),b.append(w);var x=null,k=null,C=null,S=null,T=null,E=r.readonly;if(!E){var D=null,M=r.data,I=M?Core.pathGet(n,M):null,P=r.schema||M,A=P?Core.pathGet(n,P):null;h&&I&&(D=Core.pathGet(I,["properties",h])),x=this.getAddButton(u),n.addDialogOptions={backdropFade:!0,dialogFade:!0},n.showAddDialog=!1,n.openAddDialog=function(){n.addEntity={},n.addFormConfig=e.findArrayItemsSchema(D,A);var t="addFormConfig";if(!S){var i="Add "+m;S=$('<div modal="showAddDialog" close="closeAddDialog()" options="addDialogOptions">\n<div class="modal-header"><h4>'+i+'</h4></div>\n<div class="modal-body"><div simple-form="addFormConfig" entity="addEntity" data="'+t+'" schema="'+P+'"></div></div>\n<div class="modal-footer"><button class="btn btn-primary add" type="button" ng-click="addAndCloseDialog()">Add</button><button class="btn btn-warning cancel" type="button" ng-click="closeAddDialog()">Cancel</button></div></div>'),v.append(S),l.$compile(S)(n)}n.showAddDialog=!0,Core.$apply(n)},n.closeAddDialog=function(){n.showAddDialog=!1,n.addEntity={}},n.addAndCloseDialog=function(){var t=n.addEntity;
|
|
3258
|
|
-e.log.info("About to add the new entity "+JSON.stringify(t)),t&&o(function(e){return g&&e.remove(function(e){return e[g]===t[g]}),e.push(t),e}),n.closeAddDialog()},k=this.getEditButton(u),n.editDialogOptions={backdropFade:!0,dialogFade:!0},n.showEditDialog=!1,n.openEditDialog=function(){var t=n.config.selectedItems,i={};if(t&&t.length&&angular.copy(t[0],i),n.editEntity=i,n.editFormConfig=e.findArrayItemsSchema(D,A),!T){var r="Edit "+m;T=$('<div modal="showEditDialog" close="closeEditDialog()" options="editDialogOptions">\n<div class="modal-header"><h4>'+r+'</h4></div>\n<div class="modal-body"><div simple-form="editFormConfig" entity="editEntity"></div></div>\n<div class="modal-footer"><button class="btn btn-primary save" type="button" ng-click="editAndCloseDialog()">Save</button><button class="btn btn-warning cancel" type="button" ng-click="closeEditDialog()">Cancel</button></div></div>'),v.append(T),l.$compile(T)(n)}n.showEditDialog=!0,Core.$apply(n)},n.closeEditDialog=function(){n.showEditDialog=!1,n.editEntity={}},n.editAndCloseDialog=function(){var e=n.editEntity;console.log("About to edit the new entity "+JSON.stringify(e)),e&&o(function(t){return t=a(t),t.push(e),t}),n.closeEditDialog()},C=this.getRemoveButton(u)}var j=function(e,t){return angular.isDefined(e[t])&&angular.isFunction(e[t])?e:angular.isDefined(e.$parent)&&null!==e.$parent?j(e.$parent,t):null},N=u.onremove.replace("(","").replace(")",""),O=u.onedit.replace("(","").replace(")",""),L=u.onadd.replace("(","").replace(")",""),R=s(j(n,N),N),F=s(j(n,O),O),q=s(j(n,L),L);null===R&&(R=function(){o(function(e){return a(e)})}),null===F&&(F=function(){n.openEditDialog()}),null===q&&(q=function(e){n.openAddDialog()}),x&&(x.click(function(e){return q(),!1}),w.append(x)),k&&(k.click(function(e){return F(),!1}),w.append(k)),C&&(C.click(function(e){return R(),!1}),w.append(C)),$(v).append(b),$(v).append(y),$(i).append(v),this.$compile(v)(n)},n.prototype.getAddButton=function(e){return $('<button type="button" class="btn add"><i class="'+e.addicon+'"></i> '+e.addtext+"</button>")},n.prototype.getEditButton=function(e){return $('<button type="button" class="btn edit" ng-disabled="!config.selectedItems.length"><i class="'+e.editicon+'"></i> '+e.edittext+"</button>")},n.prototype.getRemoveButton=function(e){return $('<button type="remove" class="btn remove" ng-disabled="!config.selectedItems.length"><i class="'+e.removeicon+'"></i> '+e.removetext+"</button>")},n.prototype.createTable=function(e,t){var n="hawtio-simple-table",i=$('<table class="'+e.tableclass+'" '+n+'="'+t+'"></table>');return i},n.prototype.getLegend=function(e){var t=Core.pathGet(e,"data.description");return t?"<legend>"+e.data.description+"</legend>":""},n.prototype.getControlGroup=function(e,t,n){var i=$('<div class="'+e.controlgroupclass+'"></div>');return angular.isDefined(t.description)&&i.attr("title",t.description),i},n.prototype.getControlDiv=function(e){return $('<div class="'+e.controlclass+'"></div>')},n.prototype.getHelpSpan=function(e,t,n){var i=$('<span class="help-block"></span>');return angular.isDefined(t.type)&&"false"!==e.showtypes&&i.append("Type: "+t.type),i},n}();e.InputTable=n}(Forms||(Forms={}));var Forms;!function(e){var t=function(){function e(){var e=this;this.restrict="A",this.scope=!0,this.link=function(t,n,i){return e.doLink(t,n,i)}}return e.prototype.doLink=function(e,t,n){var i=$(t),r="form[name="+n.hawtioSubmit+"]";i.click(function(){return $(r).submit(),!1})},e}();e.SubmitForm=t}(Forms||(Forms={}));var Forms;!function(e){var t=function(){function e(){var e=this;this.restrict="A",this.scope=!0,this.link=function(t,n,i){return e.doLink(t,n,i)}}return e.prototype.doLink=function(e,t,n){var i=$(t),r="form[name="+n.hawtioReset+"]";i.click(function(){for(var e=$(r),t=0;t<e.length;t++)e[t].reset();return!1})},e}();e.ResetForm=t}(Forms||(Forms={}));var Forms;!function(e){e._module=angular.module(e.pluginName,[]),e._module.directive("simpleForm",["$compile",function(t){return new e.SimpleForm(t)}]),e._module.directive("hawtioForm",["$compile",function(t){return new e.SimpleForm(t)}]),e._module.directive("hawtioInputTable",["$compile",function(t){return new e.InputTable(t)}]),e._module.directive("hawtioFormText",["$compile",function(t){return new e.TextInput(t)}]),e._module.directive("hawtioFormPassword",["$compile",function(t){return new e.PasswordInput(t)}]),e._module.directive("hawtioFormHidden",["$compile",function(t){return new e.HiddenText(t)}]),e._module.directive("hawtioFormNumber",["$compile",function(t){return new e.NumberInput(t)}]),e._module.directive("hawtioFormSelect",["$compile",function(t){return new e.SelectInput(t)}]),e._module.directive("hawtioFormArray",["$compile",function(t){return new e.ArrayInput(t)}]),e._module.directive("hawtioFormStringArray",["$compile",function(t){return new e.StringArrayInput(t)}]),e._module.directive("hawtioFormCheckbox",["$compile",function(t){return new e.BooleanInput(t)}]),e._module.directive("hawtioFormCustom",["$compile",function(t){return new e.CustomInput(t)}]),e._module.directive("hawtioSubmit",function(){return new e.SubmitForm}),e._module.directive("hawtioReset",function(){return new e.ResetForm}),e._module.run(function(){e.log.debug("loaded")}),hawtioPluginLoader.addModule(e.pluginName)}(Forms||(Forms={}));var Forms;!function(e){function t(){return{type:void 0}}function n(){return{}}function i(){return{properties:{}}}function r(){return{rowSchema:{},rows:[]}}e.createFormElement=t,e.createFormTabs=n,e.createFormConfiguration=i,e.createFormGridConfiguration=r}(Forms||(Forms={}));var Forms;!function(e){e._module.directive("hawtioFormGrid",["$templateCache","$interpolate","$compile",function(t,n,i){return{restrict:"A",replace:!0,scope:{configuration:"=hawtioFormGrid"},templateUrl:e.templateUrl+"formGrid.html",link:function(r,o,a){function s(){return[]}function l(){var e=s();if(angular.isDefined(r.configuration.rowSchema.columnOrder)){var t=r.configuration.rowSchema.columnOrder;t.forEach(function(t){var n=Core.pathGet(r.configuration.rowSchema.properties,[t]);Core.pathSet(n,["key"],t),e.push(n)})}return angular.forEach(r.configuration.rowSchema.properties,function(t,n){e.some(function(e){return e.key===n})||(t.key=n,e.push(t))}),e}function u(){var e=o.find("thead");return e.empty(),e.append(t.get("rowTemplate.html")).find("tr")}function c(e){var i=u();e.forEach(function(e){var o=e.label||e.key;r.configuration.rowSchema.disableHumanizeLabel||(o=o.titleize());var a=e.headerTemplate||t.get("headerCellTemplate.html"),s=n(a);i.append(s({label:o}))}),i.append(t.get("emptyHeaderCellTemplate.html"))}function d(){var e=o.find("tbody");return e.empty(),e}function p(){return angular.element(t.get("rowTemplate.html"))}function h(i,o){var a=r.configuration.rows;a.forEach(function(r,a){var s=p();i.forEach(function(i){var r=e.mapType(i.type);if("number"===r&&"input-attributes"in i){var o=i.template||t.get("cellNumberTemplate.html"),l=n(o),u={row:"configuration.rows["+a+"]",type:r,key:i.key,min:Core.pathGet(i,["input-attributes","min"]),max:Core.pathGet(i,["input-attributes","max"])};s.append(l(u))}else{var o=i.template||t.get("cellTemplate.html"),l=n(o);s.append(l({row:"configuration.rows["+a+"]",type:r,key:i.key}))}});var l=n(t.get("deleteRowTemplate.html"));s.append(l({index:a})),o.append(s)})}r.removeThing=function(e){r.configuration.rows.removeAt(e)},r.addThing=function(){r.configuration.rows.push(r.configuration.onAdd())},r.getHeading=function(){return Core.isBlank(r.configuration.rowName)?"items".titleize():r.configuration.rowName.pluralize().titleize()},r.$watch("configuration.noDataTemplate",function(e,n){var a=r.configuration.noDataTemplate||t.get("heroUnitTemplate.html");o.find(".nodata").html(i(a)(r))}),r.$watch("configuration.rowSchema",function(e,t){if(e!==t){var n=l();c(n)}},!0),r.$watchCollection("configuration.rows",function(e,t){if(e!==t){var n=d(),o=l(),a=angular.element("<div></div>");h(o,a),n.append(i(a.children())(r))}})}}}])}(Forms||(Forms={}));var Forms;!function(e){e._module.directive("hawtioFormMap",[function(){return{restrict:"A",replace:!0,templateUrl:UrlHelpers.join(e.templateUrl,"formMapDirective.html"),scope:{description:"@",entity:"=",mode:"=",data:"=",name:"@"},link:function(t,n,i){t.deleteKey=function(n){try{delete t.entity[t.name][""+n]}catch(i){e.log.debug("failed to delete key: ",n," from entity: ",t.entity)}},t.addItem=function(e){t.entity||(t.entity={}),Core.pathSet(t.entity,[t.name,e.key],e.value),t.showForm=!1},t.$watch("showForm",function(e){e&&(t.newItem={key:void 0,value:void 0})})}}}])}(Forms||(Forms={})),angular.module("hawtio-forms-templates",[]).run(["$templateCache",function(e){e.put("plugins/forms/html/formGrid.html",'<div>\n\n <script type="text/ng-template" id="heroUnitTemplate.html">\n <div class="hero-unit">\n <h5>No Items Added</h5>\n <p><a href="" ng-click="addThing()">Add an item</a> to the table</p>\n </div>\n </script>\n\n <script type="text/ng-template" id="headerCellTemplate.html">\n <th>{{label}}</th>\n </script>\n\n <script type="text/ng-template" id="emptyHeaderCellTemplate.html">\n <th></th>\n </script>\n\n <script type="text/ng-template" id="deleteRowTemplate.html">\n <td ng-click="removeThing({{index}})" class="align-center">\n <i class="icon-remove red mouse-pointer"></i>\n </td>\n </script>\n\n <script type="text/ng-template" id="cellTemplate.html">\n <td>\n <editable-property ng-model="{{row}}"\n type="{{type}}"\n property="{{key}}"></editable-property>\n </td>\n </script>\n\n <script type="text/ng-template" id="cellNumberTemplate.html">\n <td>\n <editable-property ng-model="{{row}}"\n type="{{type}}"\n property="{{key}}" min="{{min}}" max="{{max}}"></editable-property>\n </td>\n </script>\n\n <script type="text/ng-template" id="rowTemplate.html">\n <tr></tr>\n </script>\n\n <div ng-show="configuration.rows.length == 0" class="row-fluid">\n <div class="span12 nodata">\n </div>\n </div>\n <div ng-hide="configuration.rows.length == 0" class="row-fluid">\n <div class="span12">\n <h3 ng-show="configuration.heading">{{getHeading()}}</h3>\n <table class="table table-striped">\n <thead>\n </thead>\n <tbody>\n </tbody>\n </table>\n </div>\n <div ng-click="addThing()" class="centered mouse-pointer">\n <i class="icon-plus green"></i><span ng-show="configuration.rowName"> Add {{configuration.rowName.titleize()}}</span>\n </div>\n </div>\n</div>\n'),e.put("plugins/forms/html/formMapDirective.html",'<div class="control-group">\n <label class="control-label" for="keyValueList">{{data[name].label || name | humanize}}:</label>\n <div class="controls">\n <ul id="keyValueList" class="zebra-list">\n <li ng-repeat="(key, value) in entity[name]">\n <strong>Key:</strong> {{key}} <strong>Value:</strong> {{value}}\n <i class="pull-right icon-remove red mouse-pointer" ng-click="deleteKey(key)"></i>\n </li>\n <li>\n <button class="btn btn-success" ng-click="showForm = true" ng-hide="showForm"><i class="icon-plus"></i></button>\n <div class="well" ng-show="showForm">\n <form class="form-horizontal">\n <fieldset>\n <div class="control-group">\n <label class="control-label" for="newItemKey">Key:</label>\n <div class="controls">\n <input id="newItemKey" type="text" ng-model="newItem.key">\n </div>\n </div>\n <div class="control-group">\n <label class="control-label" for="newItemKey">Value:</label>\n <div id="valueInput" class="controls">\n <input id="newItemValue" type="text" ng-model="newItem.value">\n </div>\n </div>\n <p>\n <input type="submit" class="btn btn-success pull-right" ng-disabled="!newItem.key && !newItem.value" ng-click="addItem(newItem)" value="Add">\n <span class="pull-right"> </span>\n <button class="btn pull-right" ng-click="showForm = false">Cancel</button>\n </p>\n </fieldset>\n </form>\n </div>\n </li>\n </ul>\n </div>\n</div>\n'),e.put("plugins/forms2/html/array.html",'<div class="row">\n <div class="clearfix col-md-12">\n <div ng-hide="{{control.noLabel}}" class="row"><h4>{{control.label || maybeHumanize(name)}}</h4></div>\n <div class="row">\n <div class="inline-array"></div>\n </div>\n </div>\n</div>\n'),e.put("plugins/forms2/html/arrayItemModal.html",'<div class="modal-header">\n <h3 class="modal-title">{{header}}</h3>\n</div>\n<div class="modal-body">\n <div ng-show="description" ng-bind-html="description"></div>\n <div hawtio-form-2="schema" entity="newEntity"></div>\n</div>\n<div class="modal-footer">\n <button class="btn btn-primary" ng-click="ok()">OK</button>\n <button class="btn btn-warning" ng-click="cancel()">Cancel</button>\n</div>\n'),e.put("plugins/forms2/html/checkbox-horizontal.html",'<div class="form-group">\n <div class="col-sm-offset-2 col-sm-10">\n <div class="checkbox">\n <label>\n <input ng-disabled="config.mode == 0" type="checkbox" ng-model="{{model}}"> {{control.label || maybeHumanize(name)}}\n </label>\n <p class="help-block">{{control.description}}</p>\n </div>\n </div>\n</div>\n'),e.put("plugins/forms2/html/checkbox.html",'<div class="form-group">\n <div class="checkbox">\n <label>\n <input ng-disabled="config.mode == 0" type="checkbox" ng-model="{{model}}"> {{control.label || maybeHumanize(name)}}\n </label>\n <p class="help-block">{{control.description}}</p>\n </div>\n</div>\n'),e.put("plugins/forms2/html/form-horizontal.html",'<form ng-disabled="config.mode == 0" class="hawtio-form-2 form-horizontal">\n <fieldset>\n <legend ng-show="config.label || config.description" ng-hide="config.hideLegend">{{config.label || config.description}}</legend>\n </fieldset>\n</form>\n'),e.put("plugins/forms2/html/form-inline.html",'<form class="hawtio-form-2 hawtio-form-2-inline">\n <fieldset>\n <legend ng-show="config.label || config.description" ng-hide="config.hideLegend">{{config.label || config.description}}</legend>\n </fieldset>\n</form>\n'),e.put("plugins/forms2/html/form-standard.html",'<form class="hawtio-form-2 hawtio-form-2-standard">\n <fieldset>\n <legend ng-show="config.label || config.description" ng-hide="config.hideLegend">{{config.label || config.description}}</legend>\n </fieldset>\n</form>\n'),e.put("plugins/forms2/html/form-unwrapped.html",'<div class="hawtio-form-2 hawtio-form-2-unwrapped">\n <h4 ng-show="config.label || config.description" ng-hide="config.hideLegend || config.label == \'false\'">{{config.label || config.description}}</h4>\n\n</div>\n'),e.put("plugins/forms2/html/form2Map.html","<div>\n\n</div>\n"),e.put("plugins/forms2/html/forms2Array.html",'<div>\n <script type="text/ng-template" id="header.html">\n <th>{{control.label || name}}</th>\n </script>\n <script type="text/ng-template" id="emptyHeader.html">\n <th></th>\n </script>\n <script type="text/ng-template" id="newItemHeader.html">\n <th class="align-right">\n <button ng-hide="config.mode == 0" class="button button-success" ng-click="createNewRow()">\n <i class="fa fa-plus green" ></i>\n </button>\n </th>\n </script>\n <script type="text/ng-template" id="rowTemplate.html">\n <tr></tr>\n </script>\n <script type="text/ng-template" id="deleteRow.html">\n <td class="align-right">\n <button ng-hide="config.mode == 0" class=\'editRow\'><i class="fa fa-pencil yellow"></i></button>\n <button ng-hide="config.mode == 0" class=\'deleteRow\'><i class="fa fa-minus red"></i></button>\n </td>\n </script>\n <script type="text/ng-template" id="table.html">\n <table class="table table-striped">\n <thead>\n </thead>\n <tbody>\n </tbody>\n </table>\n </script>\n</div> \n'),e.put("plugins/forms2/html/forms2Directive.html",'<div>\n <script type="text/ng-template" id="wizardParent.html">\n <div>\n <div class="wizardParent" ng-switch="getCurrentPageId()">\n </div>\n </div>\n </script>\n\n <script type="text/ng-template" id="wizardButtons.html">\n <div class="wizardButtons align-right">\n <span>{{currentPageIndex + 1}} / {{pageIds.length}}</span>\n <button class="btn" ng-click="back()" ng-hide="atFront()">{{buttons.back}}</button>\n <button class="btn btn-primary next" ng-click="next()" ng-hide="atBack()">{{buttons.next}}</button>\n <button class="btn btn-primary finish" ng-click="onFinish()" ng-show="atBack()">{{buttons.finish}}</button>\n </div>\n </script>\n\n <script type="text/ng-template" id="wizardPage.html">\n <div class="wizardPage">\n <h3></h3>\n <div class="wizardPageBody">\n </div>\n </div>\n </script>\n\n <script type="text/ng-template" id="tabElement.html">\n <div class="tabbable hawtio-form-tabs"></div>\n </script>\n\n <script type="text/ng-template" id="tabPage.html">\n <div class="tab-pane"></div>\n </script>\n</div>\n'),e.put("plugins/forms2/html/forms2Map.html",'<div>\n <script type="text/ng-template" id="mapItemModal.html">\n <div class="modal-header">\n <h3 class="modal-title">{{header}}</h3>\n </div>\n <div class="modal-body">\n <div class="row">\n <div ng-show="description" ng-bind-html="description"></div>\n </div>\n <div class="row">\n <div class="col-md-6">\n <div hawtio-form-2="keySchema" entity="newKeyEntity"></div>\n </div>\n <div class="col-md-6">\n <div hawtio-form-2="valueSchema" entity="newValueEntity"></div>\n </div>\n </div>\n </div>\n <div class="modal-footer">\n <button class="btn btn-primary" ng-click="ok()">OK</button>\n <button class="btn btn-warning" ng-click="cancel()">Cancel</button>\n </div>\n </script>\n <script type="text/ng-template" id="table.html">\n <table class="table table-striped">\n <thead>\n <tr>\n <th>\n Key\n </th>\n <th>\n Value\n </th>\n <th class="align-right">\n <button ng-hide="config.mode == 0" class="button button-success" ng-click="createRow()">\n <i class="fa fa-plus green" ></i>\n </button>\n </th>\n </tr>\n </thead>\n <tbody>\n </tbody>\n </table>\n </script>\n <script type="text/ng-template" id="mapRowTemplate.html">\n <tr>\n <td>\n <div class="inline form-map-key" hawtio-form-2="keySchema" entity="keys[\'{{key}}\']"></div>\n </td>\n <td>\n <div class="inline form-map-value" hawtio-form-2="valueSchema" entity="values[\'{{key}}\']"></div>\n </td>\n <td class="align-right">\n <button ng-hide="config.mode == 0" class="form-map-edit button button-warning" ng-click="editRow(\'{{key}}\')">\n <i class="fa fa-pencil yellow"></i>\n </button>\n <button ng-hide="config.mode == 0" class="form-map-remove button button-danger" ng-click="deleteRow(\'{{key}}\')">\n <i class="fa fa-remove red"></i>\n </button>\n </td>\n </tr>\n </script>\n\n</div>\n'),e.put("plugins/forms2/html/hidden.html",'<div class="form-group" ng-hide="true">\n <input type="hidden" ng-model="{{model}}">\n</div>\n'),e.put("plugins/forms2/html/map.html",'<div class="row">\n <div class="clearfix col-md-12">\n <div class="row"><h4>{{control.label || maybeHumanize(name)}}</h4></div>\n <div class="row">\n <div class="inline-map"></div>\n </div>\n </div>\n</div>\n'),e.put("plugins/forms2/html/object.html",'<div class="row">\n <div class="clearfix col-md-12">\n <div class="inline-object"></div>\n </div>\n</div>\n'),e.put("plugins/forms2/html/optionArray.html","<option>{{value}}</option>\n"),e.put("plugins/forms2/html/optionConfigObject.html",'<option value="{{value}}">{{label}}</option>\n'),e.put("plugins/forms2/html/optionObject.html",'<option value="{{value}}">{{key}}</option>\n'),e.put("plugins/forms2/html/radio-group-member.html",'<label>\n <input type="radio" name="" value="">\n</label>\n'),e.put("plugins/forms2/html/radio-top-level.html",'<div class="radio">\n</div>\n'),e.put("plugins/forms2/html/select-horizontal.html",'<div class="form-group">\n <label class="col-sm-2 control-label">{{control.label || maybeHumanize(name)}}</label>\n <div class="col-sm-10">\n <select ng-disabled="config.mode == 0" hawtio-combobox class="form-control" ng-model="{{model}}"></select>\n <p class="help-block">{{control.description}}</p>\n </div>\n</div>\n'),e.put("plugins/forms2/html/select.html",'<div class="form-group">\n <label class="control-label">{{control.label || maybeHumanize(name)}}</label>\n <select ng-disabled="config.mode == 0" hawtio-combobox class="form-control" ng-model="{{model}}"></select>\n <p class="help-block">{{control.description}}</p>\n</div>\n'),e.put("plugins/forms2/html/standard-horizontal-input.html",'<div class="form-group">\n <label ng-hide="{{control.noLabel}}" class="col-sm-2 control-label">{{control.label || maybeHumanize(name)}}</label>\n <div class="col-sm-10">\n <input ng-disabled="config.mode == 0" type="" class="form-control" placeholder="{{control.placeholder}}" ng-model="{{model}}">\n <p class="help-block">{{control.description}}</p>\n </div>\n</div>\n'),e.put("plugins/forms2/html/standard-input.html",'<div class="form-group">\n <label ng-hide="{{control.noLabel}}" class="control-label">{{control.label || maybeHumanize(name)}}</label>\n <input ng-disabled="config.mode == 0" type="" class="form-control" placeholder="{{control.placeholder}}" ng-model="{{model}}">\n <p class="help-block">{{control.description}}</p>\n</div>\n'),e.put("plugins/forms2/html/static-horizontal-text.html",'<div class="form-group">\n <label class="col-sm-2 control-label">{{control.label}}</label>\n <div class="col-sm-10">\n <p ng-hide="{{model}}" class="form-control-static">{{control.description}}</p>\n <p ng-show="{{model}}" class="form-control-static" ng-bind="{{model}}"></p>\n </div>\n</div>\n'),e.put("plugins/forms2/html/static-text.html",'<div class="form-group">\n <label class="control-label">{{control.label}}</label>\n <p ng-hide="{{model}}" class="form-control-static">{{control.description}}</p>\n <p ng-show="{{model}}" class="form-control-static" ng-bind="{{model}}"></p>\n</div>\n')}]),hawtioPluginLoader.addModule("hawtio-forms-templates"),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.combobox.defaults,n),this.$source=e(t),this.$container=this.setup(),this.$element=this.$container.find("input[type=text]"),this.$target=this.$container.find("input[type=hidden]"),this.$button=this.$container.find(".dropdown-toggle"),this.$menu=e(this.options.menu).appendTo("body"),this.template=this.options.template||this.template,this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.shown=!1,this.selected=!1,this.refresh(),this.transferAttributes(),this.listen()};t.prototype={constructor:t,setup:function(){var t=e(this.template());return this.$source.before(t),this.$source.hide(),t},disable:function(){this.$element.prop("disabled",!0),this.$button.attr("disabled",!0),this.disabled=!0,this.$container.addClass("combobox-disabled")},enable:function(){this.$element.prop("disabled",!1),this.$button.attr("disabled",!1),this.disabled=!1,this.$container.removeClass("combobox-disabled")},parse:function(){var t=this,n={},i=[],r=!1,o="";return this.$source.find("option").each(function(){var a=e(this);return""===a.val()?void(t.options.placeholder=a.text()):(n[a.text()]=a.val(),i.push(a.text()),void(a.prop("selected")&&(r=a.text(),o=a.val())))}),this.map=n,r&&(this.$element.val(r),this.$target.val(o),this.$container.addClass("combobox-selected"),this.selected=!0),i},transferAttributes:function(){this.options.placeholder=this.$source.attr("data-placeholder")||this.options.placeholder,this.$element.attr("placeholder",this.options.placeholder),this.$target.prop("name",this.$source.prop("name")),this.$target.val(this.$source.val()),this.$source.removeAttr("name"),this.$element.attr("required",this.$source.attr("required")),this.$element.attr("rel",this.$source.attr("rel")),this.$element.attr("title",this.$source.attr("title")),this.$element.attr("class",this.$source.attr("class")),this.$element.attr("tabindex",this.$source.attr("tabindex")),this.$source.removeAttr("tabindex"),void 0!==this.$source.attr("disabled")&&this.disable()},select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).trigger("change"),this.$target.val(this.map[e]).trigger("change"),this.$source.val(this.map[e]).trigger("change"),this.$container.addClass("combobox-selected"),this.selected=!0,this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),e(".dropdown-menu").on("mousedown",e.proxy(this.scrollSafety,this)),this.shown=!0,this},hide:function(){return this.$menu.hide(),e(".dropdown-menu").off("mousedown",e.proxy(this.scrollSafety,this)),this.$element.on("blur",e.proxy(this.blur,this)),this.shown=!1,this},lookup:function(e){return this.query=this.$element.val(),this.process(this.source)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},template:function(){return"2"==this.options.bsVersion?'<div class="combobox-container"><input type="hidden" /> <div class="input-append"> <input type="text" autocomplete="off" /> <span class="add-on dropdown-toggle" data-dropdown="dropdown"> <span class="caret"/> <i class="icon-remove"/> </span> </div> </div>':'<div class="combobox-container"> <input type="hidden" /> <div class="input-group"> <input type="text" autocomplete="off" /> <span class="input-group-addon dropdown-toggle" data-dropdown="dropdown"> <span class="caret" /> <span class="glyphicon glyphicon-remove" /> </span> </div> </div>'},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){for(var t,n=[],i=[],r=[];t=e.shift();)t.toLowerCase().indexOf(this.query.toLowerCase())?~t.indexOf(this.query)?i.push(t):r.push(t):n.push(t);return n.concat(i,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,i){return t=e(n.options.item).attr("data-value",i),t.find("a").html(n.highlighter(i)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),i=n.next();i.length||(i=e(this.$menu.find("li")[0])),i.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},toggle:function(){this.disabled||(this.$container.hasClass("combobox-selected")?(this.clearTarget(),this.triggerChange(),this.clearElement()):this.shown?this.hide():(this.clearElement(),this.lookup()))},scrollSafety:function(e){"UL"==e.target.tagName&&this.$element.off("blur")},clearElement:function(){this.$element.val("").focus()},clearTarget:function(){this.$source.val(""),this.$target.val(""),this.$container.removeClass("combobox-selected"),this.selected=!1},triggerChange:function(){this.$source.trigger("change")},refresh:function(){this.source=this.parse(),this.options.items=this.source.length},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this)),this.$button.on("click",e.proxy(this.toggle,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t="function"==typeof this.$element[e]),t},move:function(e){if(this.shown){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()}},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){this.suppressKeyPressRepeat||this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 39:case 38:case 37:case 36:case 35:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.clearTarget(),this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){var t=this;this.focused=!1;var n=this.$element.val();this.selected||""===n||(this.$element.val(""),this.$source.val("").trigger("change"),this.$target.val("").trigger("change")),!this.mousedover&&this.shown&&setTimeout(function(){t.hide()},200)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1}},e.fn.combobox=function(n){return this.each(function(){var i=e(this),r=i.data("combobox"),o="object"==typeof n&&n;r||i.data("combobox",r=new t(this,o)),"string"==typeof n&&r[n]()})},e.fn.combobox.defaults={bsVersion:"3",menu:'<ul class="typeahead typeahead-long dropdown-menu"></ul>',item:'<li><a href="#"></a></li>'},e.fn.combobox.Constructor=t}(window.jQuery),angular.module("dangle",[]),angular.module("dangle").directive("fsArea",[function(){"use strict";return{restrict:"E",scope:{onClick:"=",width:"=",height:"=",bind:"=",label:"@",field:"@",duration:"@",delay:"@",plot:"@",pointRadius:"@"},link:function(e,t,n){var i={top:20,right:20,bottom:30,left:80},r=e.width||1280,o=e.height||300,a=(n.interpolate||"false",n.label||"Frequency"),s=n["class"]||"";r=r-i.left-i.right,o=o-i.top-i.bottom;var l=d3.time.scale().range([0,r]),u=d3.scale.linear().range([o,0]),c=d3.svg.axis().scale(l).orient("bottom"),d=d3.svg.axis().scale(u).orient("left"),p=d3.svg.line().x(function(e){return l(e.time)}).y(function(e){return u(e.count)}),h=d3.svg.area().x(function(e){return l(e.time)}).y0(o).y1(function(e){return u(e.count)});"true"==n.interpolate&&(p.interpolate("cardinal"),h.interpolate("cardinal"));var f=d3.select(t[0]).append("svg").attr("preserveAspectRatio","xMinYMin").attr("viewBox","0 0 "+(r+i.left+i.right)+" "+(o+i.top+i.bottom)).append("g").attr("transform","translate("+i.left+","+i.top+")");f.append("path").datum([]).attr("class","area fill "+s).attr("d",h),f.append("g").attr("class","area x axis "+s).attr("transform","translate(0,"+o+")").call(c),f.append("g").attr("class","area y axis "+s).call(d).append("text").attr("transform","rotate(-90)").attr("y",6).attr("dy",".71em").style("text-anchor","end").text(a),f.append("path").datum([]).attr("class","area line "+s).attr("d",p),e.$watch("bind",function(t){var i=e.duration||0,r=(e.delay||0,e.plot||"true"),o=e.pointRadius||8,a=e.field||n.bind.split(".").pop().toLowerCase();if(t){t=t.entries||[],l.domain(d3.extent(t,function(e){return e.time})),u.domain([0,d3.max(t,function(e){
|
|
3259
|
|
-return e.count})]);var g=f.transition().duration(i);if(g.select(".area").attr("d",h(t)),g.select(".line").attr("d",p(t)),"true"==r){var m=f.selectAll("circle").data(t.filter(function(e){return e.count}),function(e){return Math.random()});m.enter().append("circle").attr("class","area line points "+s).attr("cursor","pointer").attr("cx",p.x()).attr("cy",p.y()).style("opacity",0).transition().duration(i).style("opacity",1).attr("cx",p.x()).attr("cy",p.y()).attr("r",o),m.on("mousedown",function(t){e.$apply(function(){(e.onClick||angular.noop)(a,t.time)})}),m.exit().remove()}g.select(".x").call(c),g.select(".y").call(d)}})}}}]),angular.module("dangle").directive("fsBar",[function(){"user strict";return{restrict:"E",scope:{onClick:"=",width:"=",height:"=",bind:"=",duration:"@"},link:function(e,t,n){var i={top:10,right:10,bottom:10,left:10},r=e.width||300,o=e.height||1020;r=r-i.left-i.right,o=o-i.top-i.bottom;var a=n["class"]||"",s=n.align||"left",l="right"===s?"xMaxYMin":"xMinYMin",u=d3.scale.linear().range([0,r]),c=d3.scale.ordinal().rangeBands([0,o],.1),d=d3.select(t[0]).append("svg").attr("preserveAspectRatio",l+" meet").attr("viewBox","0 0 "+(r+i.left+i.right)+" "+(o+i.top+i.bottom)).append("g").attr("transform","translate("+i.left+","+i.top+")");e.$watch("bind",function(t){var i=e.duration||0,o=(e.delay||0,e.field||n.bind.split(".").pop().toLowerCase());if(t){t=t.terms||[],u.domain([0,2*d3.max(t,function(e){return e.count})]),c.domain(t.map(function(e){return e.term}));var l=d.selectAll("rect").data(t,function(e){return Math.random()});l.enter().append("rect").attr("class","bar rect "+a).attr("cursor","pointer").attr("y",function(e){return c(e.term)}).attr("height",c.rangeBand()).attr("x",function(e){return"right"===s?r:0}).transition().duration(i).attr("width",function(e){return u(e.count)}).attr("x",function(e){return"right"===s?r-u(e.count):0}),l.on("mousedown",function(t){e.$apply(function(){(e.onClick||angular.noop)(o,t.term)})}),l.exit().remove();var p=d.selectAll("text").data(t,function(e){return Math.random()});p.enter().append("text").attr("class","bar text "+a).attr("cursor","pointer").attr("y",function(e){return c(e.term)+c.rangeBand()/2}).attr("x",function(e){return"right"===s?r-u(e.count)-3:u(e.count)+3}).attr("dy",".35em").attr("text-anchor",function(e){return"right"===s?"end":"start"}).text(function(e){return"right"===s?"("+e.count+") "+e.term:e.term+" ("+e.count+")"}),p.on("mousedown",function(t){e.$apply(function(){(e.onClick||angular.noop)(o,t.term)})}),p.exit().remove()}})}}}]),angular.module("dangle").directive("fsColumn",[function(){"use strict";return{restrict:"E",scope:{fontSize:"=",onClick:"=",width:"=",height:"=",bind:"="},link:function(e,t,n){var i={top:20,right:20,bottom:30,left:40},r=e.width||960,o=e.height||500,a=n.color||"steelblue",s=n.fontColor||"#000",l=e.fontSize||14,u=n.label||"Frequency";void 0==n.field&&(n.field=n.bind.split(".").pop().toLowerCase()),r=r-i.left-i.right,o=o-i.top-i.bottom;var c=d3.scale.ordinal().rangeRoundBands([0,r],.1),d=d3.scale.linear().range([o,0]),p=d3.svg.axis().scale(c).orient("bottom"),h=d3.svg.axis().scale(d).orient("left"),f=d3.select(t[0]).append("svg").attr("preserveAspectRatio","xMinYMin meet").attr("viewBox","0 0 "+(r+i.left+i.right)+" "+(o+i.top+i.bottom)).append("g").attr("transform","translate("+i.left+","+i.top+")");e.$watch("bind",function(t){t&&(t=t.terms||[],f.selectAll("*").remove(),c.domain(t.map(function(e){return e.term})),d.domain([0,d3.max(t,function(e){return e.count})]),f.append("g").attr("fill",s).attr("font-size",l).attr("class","x axis").attr("transform","translate(0,"+o+")").call(p),f.append("g").attr("class","y axis").attr("font-size",l).attr("fill",s).call(h).append("text").attr("transform","rotate(-90)").attr("y",6).attr("dy",".51em").style("text-anchor","end").text(u),f.selectAll(".bar").data(t).enter().append("rect").attr("fill",a).attr("x",function(e){return c(e.term)}).attr("width",c.rangeBand()).attr("y",function(e){return d(e.count)}).attr("height",function(e){return o-d(e.count)}).on("mousedown",function(t){e.$apply(function(){(e.onClick||angular.noop)(n.field,t.term)})}))})}}}]),angular.module("dangle").directive("fsDateHisto",[function(){"use strict";return{restrict:"E",scope:{onClick:"=",width:"=",height:"=",bind:"=",label:"@",field:"@",duration:"@",delay:"@",interval:"@"},link:function(e,t,n){var i={top:20,right:20,bottom:30,left:80},r=e.width||1280,o=e.height||300,a=n.label||"Frequency",s=n["class"]||"";r=r-i.left-i.right,o=o-i.top-i.bottom;var l=d3.time.scale().range([0,r]),u=d3.scale.linear().range([o,0]),c=d3.svg.axis().scale(l).orient("bottom"),d=d3.svg.axis().scale(u).orient("left"),p=d3.select(t[0]).append("svg").attr("preserveAspectRatio","xMinYMin").attr("viewBox","0 0 "+(r+i.left+i.right)+" "+(o+i.top+i.bottom)).append("g").attr("transform","translate("+i.left+","+i.top+")");p.append("g").attr("class","histo x axis "+s).attr("transform","translate(0,"+o+")").call(c),p.append("g").attr("class","histo y axis "+s).call(d).append("text").attr("transform","rotate(-90)").attr("y",6).attr("dy",".51em").style("text-anchor","end").text(a),e.$watch("bind",function(t){var i=e.duration||0,a=e.delay||0,h=e.field||n.bind.split(".").pop().toLowerCase(),f=e.interval||"day";if(t){t=t.entries||[];var g=r/t.length-2,m=864e5;switch(f.toLowerCase()){case"minute":m=6e4;break;case"hour":m=36e5;break;case"day":m=864e5;break;case"week":m=6048e5;break;case"month":m=263e7;break;case"year":m=3156e7}l.domain([d3.min(t,function(e){return e.time}),d3.max(t,function(e){return e.time})+m]),u.domain([0,d3.max(t,function(e){return e.count})]);var v=p.transition().duration(i),y=p.selectAll("rect").data(t,function(e){return Math.random()});y.enter().append("rect").attr("class","histo rect "+s).attr("cursor","pointer").attr("x",function(e){return l(e.time)}).attr("y",function(e){return o}).attr("width",g).transition().delay(function(e,t){return t*a}).duration(i).attr("height",function(e){return o-u(e.count)}).attr("y",function(e){return u(e.count)}),y.on("mousedown",function(t){e.$apply(function(){(e.onClick||angular.noop)(h,t.time)})}),y.exit().remove(),v.select(".x").call(c),v.select(".y").call(d)}},!0)}}}]),angular.module("dangle").directive("fsDonut",[function(){"use strict";return{restrict:"E",scope:{outerRadius:"=",innerRadius:"=",fontSize:"=",domain:"=",colorMap:"=",onClick:"=",bind:"=",duration:"@"},link:function(e,t,n){var i=e.outerRadius||200,r=e.innerRadius||0,o=(e.fontSize||14,n.fontColor||"#fff",void 0);void 0==n.field&&(n.field=n.bind.split(".").pop().toLowerCase()),void 0===e.colorMap?(o=d3.scale.category20c(),void 0!==e.domain&&o.domain(e.domain)):o=function(t){return e.colorMap[t]};var a=3*i+30,s=i*(/Trident\/7\./.test(navigator.userAgent)&&e.$parent.inDashboard?.25:3),l=d3.svg.arc().outerRadius(i-10).innerRadius(r),u=d3.layout.pie().sort(null).value(function(e){return e.count}),c="xMinYMin meet";/Trident\/7\./.test(navigator.userAgent)&&e.$parent.inDashboard&&(c="xMinYMax meet");var d=d3.select(t[0]).append("svg").attr("preserveAspectRatio",c).attr("viewBox","0 0 "+a+" "+s),p=d.append("g").attr("transform","translate("+a/2+","+s/2+") rotate(180) scale(-1, -1)"),h=d.append("g").attr("class","label_group").attr("transform","translate("+a/2+","+s/2+")");e.$watch("bind",function(t){function r(e,t){var t=d3.interpolate(this._current,e);return this._current=t(0),function(e){return l(t(e))}}function a(e,t){var n=(this._current.startAngle+this._current.endAngle-Math.PI)/2,r=(e.startAngle+e.endAngle-Math.PI)/2,o=d3.interpolateNumber(n,r);return function(e){var t=o(e);return"translate("+Math.cos(t)*(i+f)+","+Math.sin(t)*(i+f)+")"}}var s=e.duration||0,c=function(e){return(e.startAngle+e.endAngle)/2<Math.PI?"beginning":"end"},f=14;if(t){t=t.terms||[];for(var g=u(t),m=0,v=0;v<t.length;v++)m+=t[v].count;if(m>0){var y=p.selectAll("path").data(g);y.enter().append("path").attr("d",l).attr("stroke","#fff").attr("stroke-width","1.5").attr("cursor","pointer").style("fill",function(e){return o(e.data.term)}).each(function(e){this._current=e}).on("mousedown",function(t){e.$apply(function(){(e.onClick||angular.noop)(n.field,t.data.term)})}),y.transition().duration(s).attrTween("d",r);var b=h.selectAll("line").data(g);b.enter().append("line").attr("x1",0).attr("x2",0).attr("y1",-i-3).attr("y2",-i-8).attr("stroke","grey").attr("stroke-width",2).attr("transform",function(e){return"rotate("+(e.startAngle+e.endAngle)/2*(180/Math.PI)+")"}).each(function(e){this._current=e}),b.transition().duration(750).attr("transform",function(e){return"rotate("+(e.startAngle+e.endAngle)/2*(180/Math.PI)+")"}),b.exit().remove();var w=h.selectAll("text.value").data(g).attr("dy",function(e){return(e.startAngle+e.endAngle)/2>Math.PI/2&&(e.startAngle+e.endAngle)/2<1.5*Math.PI?17:-17}).attr("text-anchor",c).text(function(e){var t=e.value/m*100;return t.toFixed(1)+"%"});w.enter().append("text").attr("class","value").attr("font-size",20).attr("font-weight","bold").attr("transform",function(e){return"translate("+Math.cos((e.startAngle+e.endAngle-Math.PI)/2)*(i+f)+","+Math.sin((e.startAngle+e.endAngle-Math.PI)/2)*(i+f)+")"}).attr("dy",function(e){return(e.startAngle+e.endAngle)/2>Math.PI/2&&(e.startAngle+e.endAngle)/2<1.5*Math.PI?17:-17}).attr("text-anchor",c).text(function(e){var t=e.value/m*100;return t.toFixed(1)+"%"}).each(function(e){this._current=e}),w.transition().duration(s).attrTween("transform",a),w.exit().remove();var x=h.selectAll("text.units").data(g).attr("dy",function(e){return(e.startAngle+e.endAngle)/2>Math.PI/2&&(e.startAngle+e.endAngle)/2<1.5*Math.PI?36:2}).attr("text-anchor",function(e){return(e.startAngle+e.endAngle)/2<Math.PI?"beginning":"end"}).text(function(e){return"T"===e.data.term?"TRUE ("+e.value+")":"F"===e.data.term?"FALSE ("+e.value+")":e.data.term+" ("+e.value+")"});x.enter().append("text").attr("class","units").attr("font-size",16).attr("stroke","none").attr("fill","#000").attr("transform",function(e){return"translate("+Math.cos((e.startAngle+e.endAngle-Math.PI)/2)*(i+f)+","+Math.sin((e.startAngle+e.endAngle-Math.PI)/2)*(i+f)+")"}).attr("dy",function(e){return(e.startAngle+e.endAngle)/2>Math.PI/2&&(e.startAngle+e.endAngle)/2<1.5*Math.PI?36:2}).attr("text-anchor",c).text(function(e){return"T"===e.data.term?"TRUE ("+e.value+")":"F"===e.data.term?"FALSE ("+e.value+")":e.data.term+" ("+e.value+")"}).each(function(e){this._current=e}),x.transition().duration(s).attrTween("transform",a),x.exit().remove()}else d.selectAll("path").remove(),h.selectAll("line").remove(),h.selectAll("text.value").remove(),h.selectAll("text.units").remove()}})}}}]),angular.module("dangle").directive("fsPie",[function(){"use strict";return{restrict:"E",scope:{outerRadius:"=",innerRadius:"=",fontSize:"=",domain:"=",colorMap:"=",onClick:"=",bind:"="},link:function(e,t,n){var i=e.outerRadius||200,r=e.innerRadius||0,o=e.fontSize||14,a=n.fontColor||"#fff",s=void 0;void 0==n.field&&(n.field=n.bind.split(".").pop().toLowerCase()),void 0==e.colorMap?(s=d3.scale.category20c(),void 0!==e.domain&&s.domain(e.domain)):s=function(t){return e.colorMap[t]};var l=d3.svg.arc().outerRadius(i-10).innerRadius(r),u=d3.layout.pie().sort(null).value(function(e){return e.count}),c=d3.select(t[0]).append("svg").attr("preserveAspectRatio","xMinYMin meet").attr("viewBox","0 0 "+2*i+" "+2*i).append("g").attr("transform","translate("+i+","+i+") rotate(180) scale(-1, -1)");e.$watch("bind",function(t){if(t){t=t.terms||[],c.selectAll("*").remove();var i=c.selectAll(".arc").data(u(t)).enter().append("g").attr("class","arc").on("mousedown",function(t){e.$apply(function(){(e.onClick||angular.noop)(n.field,t.data.term)})});i.append("path").attr("d",l).style("fill",function(e){return s(e.data.term)}),i.append("text").attr("transform",function(e){return"translate("+l.centroid(e)+")"}).attr("dy",".55em").style("text-anchor","middle").attr("fill",a).attr("font-size",o).text(function(e){return e.data.term})}})}}}]);var _canLog=!0,getDynaTreePersistData=null,DTNodeStatus_Error=-1,DTNodeStatus_Loading=1,DTNodeStatus_Ok=0;!function($){function getDtNodeFromElement(e){return alert("getDtNodeFromElement is deprecated"),$.ui.dynatree.getNode(e)}function noop(){}function _initDragAndDrop(e){var t=e.options.dnd||null;t&&(t.onDragStart||t.onDrop)&&_registerDnd(),t&&t.onDragStart&&e.$tree.draggable({addClasses:!1,appendTo:"body",containment:!1,delay:0,distance:4,revert:!1,scroll:!0,scrollSpeed:7,scrollSensitivity:10,connectToDynatree:!0,helper:function(e){var t=$.ui.dynatree.getNode(e.target);return t?t.tree._onDragEvent("helper",t,null,e,null,null):"<div></div>"},start:function(e,t){var n=t.helper.data("dtSourceNode");return!!n},_last:null}),t&&t.onDrop&&e.$tree.droppable({addClasses:!1,tolerance:"intersect",greedy:!1,_last:null})}var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}},DynaTreeNode=Class.create();DynaTreeNode.prototype={initialize:function(e,t,n){this.parent=e,this.tree=t,"string"==typeof n&&(n={title:n}),void 0===n.key&&(n.key="_"+t._nodeCount++),this.data=$.extend({},$.ui.dynatree.nodedatadefaults,n),this.li=null,this.span=null,this.ul=null,this.childList=null,this._isLoading=!1,this.hasSubSel=!1,this.bExpanded=!1,this.bSelected=!1},toString:function(){return"DynaTreeNode<"+this.data.key+">: '"+this.data.title+"'"},toDict:function(e,t){var n=$.extend({},this.data);if(n.activate=this.tree.activeNode===this,n.focus=this.tree.focusNode===this,n.expand=this.bExpanded,n.select=this.bSelected,t&&t(n),e&&this.childList){n.children=[];for(var i=0,r=this.childList.length;r>i;i++)n.children.push(this.childList[i].toDict(!0,t))}else delete n.children;return n},fromDict:function(e){var t=e.children;return void 0===t?(this.data=$.extend(this.data,e),void this.render()):(e=$.extend({},e),e.children=void 0,this.data=$.extend(this.data,e),this.removeChildren(),void this.addChild(t))},_getInnerHtml:function(){var e,t=this.tree,n=t.options,i=t.cache,r=this.getLevel(),o=this.data,a="";r<n.minExpandLevel?r>1&&(a+=i.tagConnector):a+=this.hasChildren()!==!1?i.tagExpander:i.tagConnector,n.checkbox&&o.hideCheckbox!==!0&&!o.isStatusNode&&(a+=i.tagCheckbox),o.icon?(e="/"===o.icon.charAt(0)?o.icon:n.imagePath+o.icon,a+="<img src='"+e+"' alt='' />"):o.icon===!1||(a+=i.tagNodeIcon);var s="";if(n.onCustomRender&&(s=n.onCustomRender.call(t,this)||""),!s){var l=o.tooltip?' title="'+o.tooltip.replace(/\"/g,""")+'"':"",u=o.href||"#";s=n.noLink||o.noLink?'<span style="display:inline-block;" class="'+n.classNames.title+'"'+l+">"+o.title+"</span>":'<a href="'+u+'" class="'+n.classNames.title+'"'+l+">"+o.title+"</a>"}return a+=s},_fixOrder:function(){var e=this.childList;if(e&&this.ul)for(var t=this.ul.firstChild,n=0,i=e.length-1;i>n;n++){var r=e[n],o=t.dtnode;r!==o?(this.tree.logDebug("_fixOrder: mismatch at index "+n+": "+r+" != "+o),this.ul.insertBefore(r.li,o.li)):t=t.nextSibling}},render:function(e,t){var n=this.tree,i=this.parent,r=this.data,o=n.options,a=o.classNames,s=this.isLastSibling(),l=!1;if(i||this.ul){if(i){this.li||(l=!0,this.li=document.createElement("li"),this.li.dtnode=this,r.key&&o.generateIds&&(this.li.id=o.idPrefix+r.key),this.span=document.createElement("span"),this.span.className=a.title,this.li.appendChild(this.span),i.ul||(i.ul=document.createElement("ul"),i.ul.style.display="none",i.li.appendChild(i.ul)),i.ul.appendChild(this.li)),this.span.innerHTML=this._getInnerHtml();var u=[];u.push(a.node),r.isFolder&&u.push(a.folder),this.bExpanded&&u.push(a.expanded),this.hasChildren()!==!1&&u.push(a.hasChildren),r.isLazy&&null===this.childList&&u.push(a.lazy),s&&u.push(a.lastsib),this.bSelected&&u.push(a.selected),this.hasSubSel&&u.push(a.partsel),n.activeNode===this&&u.push(a.active),r.addClass&&u.push(r.addClass),u.push(a.combinedExpanderPrefix+(this.bExpanded?"e":"c")+(r.isLazy&&null===this.childList?"d":"")+(s?"l":"")),u.push(a.combinedIconPrefix+(this.bExpanded?"e":"c")+(r.isFolder?"f":"")),this.span.className=u.join(" "),this.li.className=s?a.lastsib:"",l&&o.onCreate&&o.onCreate.call(n,this,this.span),o.onRender&&o.onRender.call(n,this,this.span)}}else this.li=this.span=null,this.ul=document.createElement("ul"),o.minExpandLevel>1?this.ul.className=a.container+" "+a.noConnector:this.ul.className=a.container;if((this.bExpanded||t===!0)&&this.childList){for(var c=0,d=this.childList.length;d>c;c++)this.childList[c].render(!1,t);this._fixOrder()}if(this.ul){var p="none"===this.ul.style.display,h=!!this.bExpanded;if(e&&o.fx&&p===h){var f=o.fx.duration||200;$(this.ul).animate(o.fx,f)}else this.ul.style.display=this.bExpanded||!i?"":"none"}},getKeyPath:function(e){var t=[];return this.visitParents(function(e){e.parent&&t.unshift(e.data.key)},!e),"/"+t.join(this.tree.options.keyPathSeparator)},getParent:function(){return this.parent},getChildren:function(){return void 0===this.hasChildren()?void 0:this.childList},hasChildren:function(){return this.data.isLazy?null===this.childList||void 0===this.childList?void 0:0===this.childList.length?!1:1===this.childList.length&&this.childList[0].isStatusNode()?void 0:!0:!!this.childList},isFirstSibling:function(){var e=this.parent;return!e||e.childList[0]===this},isLastSibling:function(){var e=this.parent;return!e||e.childList[e.childList.length-1]===this},isLoading:function(){return!!this._isLoading},getPrevSibling:function(){if(!this.parent)return null;for(var e=this.parent.childList,t=1,n=e.length;n>t;t++)if(e[t]===this)return e[t-1];return null},getNextSibling:function(){if(!this.parent)return null;for(var e=this.parent.childList,t=0,n=e.length-1;n>t;t++)if(e[t]===this)return e[t+1];return null},isStatusNode:function(){return this.data.isStatusNode===!0},isChildOf:function(e){return this.parent&&this.parent===e},isDescendantOf:function(e){if(!e)return!1;for(var t=this.parent;t;){if(t===e)return!0;t=t.parent}return!1},countChildren:function(){var e=this.childList;if(!e)return 0;for(var t=e.length,n=0,i=t;i>n;n++){var r=e[n];t+=r.countChildren()}return t},sortChildren:function(e,t){var n=this.childList;if(n){if(e=e||function(e,t){var n=e.data.title.toLowerCase(),i=t.data.title.toLowerCase();return n===i?0:n>i?1:-1},n.sort(e),t)for(var i=0,r=n.length;r>i;i++)n[i].childList&&n[i].sortChildren(e,"$norender$");"$norender$"!==t&&this.render()}},_setStatusNode:function(e){var t=this.childList?this.childList[0]:null;if(e)t?(e.isStatusNode=!0,e.key="_statusNode",t.data=e,t.render()):(e.isStatusNode=!0,e.key="_statusNode",t=this.addChild(e));else if(t&&t.isStatusNode()){try{this.ul&&(this.ul.removeChild(t.li),t.li=null)}catch(n){}1===this.childList.length?this.childList=[]:this.childList.shift()}},setLazyNodeStatus:function(e,t){var n=t&&t.tooltip?t.tooltip:null,i=t&&t.info?" ("+t.info+")":"";switch(e){case DTNodeStatus_Ok:this._setStatusNode(null),$(this.span).removeClass(this.tree.options.classNames.nodeLoading),this._isLoading=!1,this.tree.options.autoFocus&&(this===this.tree.tnRoot&&this.childList&&this.childList.length>0?this.childList[0].focus():this.focus());break;case DTNodeStatus_Loading:this._isLoading=!0,$(this.span).addClass(this.tree.options.classNames.nodeLoading),this.parent||this._setStatusNode({title:this.tree.options.strings.loading+i,tooltip:n,addClass:this.tree.options.classNames.nodeWait});break;case DTNodeStatus_Error:this._isLoading=!1,this._setStatusNode({title:this.tree.options.strings.loadError+i,tooltip:n,addClass:this.tree.options.classNames.nodeError});break;default:throw"Bad LazyNodeStatus: '"+e+"'."}},_parentList:function(e,t){for(var n=[],i=t?this:this.parent;i;)(e||i.parent)&&n.unshift(i),i=i.parent;return n},getLevel:function(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e},_getTypeForOuterNodeEvent:function(e){var t=this.tree.options.classNames,n=e.target;if(n.className.indexOf(t.node)<0)return null;for(var i=e.pageX-n.offsetLeft,r=e.pageY-n.offsetTop,o=0,a=n.childNodes.length;a>o;o++){var s=n.childNodes[o],l=s.offsetLeft-n.offsetLeft,u=s.offsetTop-n.offsetTop,c=s.clientWidth,d=s.clientHeight;if(i>=l&&l+c>=i&&r>=u&&u+d>=r){if(s.className==t.title)return"title";if(s.className==t.expander)return"expander";if(s.className==t.checkbox)return"checkbox";if(s.className==t.nodeIcon)return"icon"}}return"prefix"},getEventTargetType:function(e){var t=e&&e.target?e.target.className:"",n=this.tree.options.classNames;return t===n.title?"title":t===n.expander?"expander":t===n.checkbox?"checkbox":t===n.nodeIcon?"icon":t===n.empty||t===n.vline||t===n.connector?"prefix":t.indexOf(n.node)>=0?this._getTypeForOuterNodeEvent(e):null},isVisible:function(){for(var e=this._parentList(!0,!1),t=0,n=e.length;n>t;t++)if(!e[t].bExpanded)return!1;return!0},makeVisible:function(){for(var e=this._parentList(!0,!1),t=0,n=e.length;n>t;t++)e[t]._expand(!0)},focus:function(){this.makeVisible();try{$(this.span).find(">a").focus()}catch(e){}},isFocused:function(){return this.tree.tnFocused===this},_activate:function(e,t){this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o",e,t,this);var n=this.tree.options;if(!(this.data.isStatusNode||t&&n.onQueryActivate&&n.onQueryActivate.call(this.tree,e,this)===!1))if(e){if(this.tree.activeNode){if(this.tree.activeNode===this)return;this.tree.activeNode.deactivate()}n.activeVisible&&this.makeVisible(),this.tree.activeNode=this,n.persist&&$.cookie(n.cookieId+"-active",this.data.key,n.cookie),this.tree.persistence.activeKey=this.data.key,$(this.span).addClass(n.classNames.active),t&&n.onActivate&&n.onActivate.call(this.tree,this)}else if(this.tree.activeNode===this){if(n.onQueryActivate&&n.onQueryActivate.call(this.tree,!1,this)===!1)return;$(this.span).removeClass(n.classNames.active),n.persist&&$.cookie(n.cookieId+"-active","",n.cookie),this.tree.persistence.activeKey=null,this.tree.activeNode=null,t&&n.onDeactivate&&n.onDeactivate.call(this.tree,this)}},activate:function(){this._activate(!0,!0)},activateSilently:function(){this._activate(!0,!1)},deactivate:function(){this._activate(!1,!0)},isActive:function(){return this.tree.activeNode===this},_userActivate:function(){var e=!0,t=!1;if(this.data.isFolder)switch(this.tree.options.clickFolderMode){case 2:e=!1,t=!0;break;case 3:e=t=!0}null===this.parent&&(t=!1),t&&(this.toggleExpand(),this.focus()),e&&this.activate()},_setSubSel:function(e){e?(this.hasSubSel=!0,$(this.span).addClass(this.tree.options.classNames.partsel)):(this.hasSubSel=!1,$(this.span).removeClass(this.tree.options.classNames.partsel))},_updatePartSelectionState:function(){var e;if(!this.hasChildren())return e=this.bSelected&&!this.data.unselectable&&!this.data.isStatusNode,this._setSubSel(!1),e;var t,n,i=this.childList,r=!0,o=!0;for(t=0,n=i.length;n>t;t++){var a=i[t],s=a._updatePartSelectionState();s!==!1&&(o=!1),s!==!0&&(r=!1)}return e=r?!0:o?!1:void 0,this._setSubSel(void 0===e),this.bSelected=e===!0,e},_fixSelectionState:function(){var e,t,n;if(this.bSelected)for(this.visit(function(e){e.parent._setSubSel(!0),e.data.unselectable||e._select(!0,!1,!1)}),e=this.parent;e;){e._setSubSel(!0);var i=!0;for(t=0,n=e.childList.length;n>t;t++){var r=e.childList[t];if(!r.bSelected&&!r.data.isStatusNode&&!r.data.unselectable){i=!1;break}}i&&e._select(!0,!1,!1),e=e.parent}else for(this._setSubSel(!1),this.visit(function(e){e._setSubSel(!1),e._select(!1,!1,!1)}),e=this.parent;e;){e._select(!1,!1,!1);var o=!1;for(t=0,n=e.childList.length;n>t;t++)if(e.childList[t].bSelected||e.childList[t].hasSubSel){o=!0;break}e._setSubSel(o),e=e.parent}},_select:function(e,t,n){var i=this.tree.options;this.data.isStatusNode||this.bSelected!==e&&(t&&i.onQuerySelect&&i.onQuerySelect.call(this.tree,e,this)===!1||(1==i.selectMode&&e&&this.tree.visit(function(e){return e.bSelected?(e._select(!1,!1,!1),!1):void 0}),this.bSelected=e,e?(i.persist&&this.tree.persistence.addSelect(this.data.key),$(this.span).addClass(i.classNames.selected),n&&3===i.selectMode&&this._fixSelectionState(),t&&i.onSelect&&i.onSelect.call(this.tree,!0,this)):(i.persist&&this.tree.persistence.clearSelect(this.data.key),$(this.span).removeClass(i.classNames.selected),n&&3===i.selectMode&&this._fixSelectionState(),t&&i.onSelect&&i.onSelect.call(this.tree,!1,this))))},select:function(e){return this.data.unselectable?this.bSelected:this._select(e!==!1,!0,!0)},toggleSelect:function(){return this.select(!this.bSelected)},isSelected:function(){return this.bSelected},isLazy:function(){return!!this.data.isLazy},_loadContent:function(){try{var e=this.tree.options;this.tree.logDebug("_loadContent: start - %o",this),this.setLazyNodeStatus(DTNodeStatus_Loading),!0===e.onLazyRead.call(this.tree,this)&&(this.setLazyNodeStatus(DTNodeStatus_Ok),this.tree.logDebug("_loadContent: succeeded - %o",this))}catch(t){this.tree.logWarning("_loadContent: failed - %o",t),this.setLazyNodeStatus(DTNodeStatus_Error,{tooltip:""+t})}},_expand:function(e,t){if(this.bExpanded===e)return void this.tree.logDebug("dtnode._expand(%o) IGNORED - %o",e,this);this.tree.logDebug("dtnode._expand(%o) - %o",e,this);var n=this.tree.options;if(!e&&this.getLevel()<n.minExpandLevel)return void this.tree.logDebug("dtnode._expand(%o) prevented collapse - %o",e,this);if(!n.onQueryExpand||n.onQueryExpand.call(this.tree,e,this)!==!1){this.bExpanded=e,n.persist&&(e?this.tree.persistence.addExpand(this.data.key):this.tree.persistence.clearExpand(this.data.key));var i=!(this.data.isLazy&&null===this.childList||this._isLoading||t);if(this.render(i),this.bExpanded&&this.parent&&n.autoCollapse)for(var r=this._parentList(!1,!0),o=0,a=r.length;a>o;o++)r[o].collapseSiblings();return n.activeVisible&&this.tree.activeNode&&!this.tree.activeNode.isVisible()&&this.tree.activeNode.deactivate(),e&&this.data.isLazy&&null===this.childList&&!this._isLoading?void this._loadContent():void(n.onExpand&&n.onExpand.call(this.tree,e,this))}},isExpanded:function(){return this.bExpanded},expand:function(e){e=e!==!1,(this.childList||this.data.isLazy||!e)&&(null!==this.parent||e)&&this._expand(e)},scheduleAction:function(e,t){this.tree.timer&&(clearTimeout(this.tree.timer),this.tree.logDebug("clearTimeout(%o)",this.tree.timer));var n=this;switch(e){case"cancel":break;case"expand":this.tree.timer=setTimeout(function(){n.tree.logDebug("setTimeout: trigger expand"),n.expand(!0)},t);break;case"activate":this.tree.timer=setTimeout(function(){n.tree.logDebug("setTimeout: trigger activate"),n.activate()},t);break;default:throw"Invalid mode "+e}this.tree.logDebug("setTimeout(%s, %s): %s",e,t,this.tree.timer)},toggleExpand:function(){this.expand(!this.bExpanded)},collapseSiblings:function(){if(null!==this.parent)for(var e=this.parent.childList,t=0,n=e.length;n>t;t++)e[t]!==this&&e[t].bExpanded&&e[t]._expand(!1)},_onClick:function(e){var t=this.getEventTargetType(e);if("expander"===t)this.toggleExpand(),this.focus();else if("checkbox"===t)this.toggleSelect(),this.focus();else{this._userActivate();var n=this.span.getElementsByTagName("a");if(!n[0])return!0;$.browser.msie&&parseInt($.browser.version,10)<9||n[0].focus()}e.preventDefault()},_onDblClick:function(e){},_onKeydown:function(e){var t,n=!0;switch(e.which){case 107:case 187:this.bExpanded||this.toggleExpand();break;case 109:case 189:this.bExpanded&&this.toggleExpand();break;case 32:this._userActivate();break;case 8:this.parent&&this.parent.focus();break;case 37:this.bExpanded?(this.toggleExpand(),this.focus()):this.parent&&this.parent.parent&&this.parent.focus();break;case 39:this.bExpanded||!this.childList&&!this.data.isLazy?this.childList&&this.childList[0].focus():(this.toggleExpand(),this.focus());break;case 38:for(t=this.getPrevSibling();t&&t.bExpanded&&t.childList;)t=t.childList[t.childList.length-1];!t&&this.parent&&this.parent.parent&&(t=this.parent),t&&t.focus();break;case 40:if(this.bExpanded&&this.childList)t=this.childList[0];else for(var i=this._parentList(!1,!0),r=i.length-1;r>=0&&!(t=i[r].getNextSibling());r--);t&&t.focus();break;default:n=!1}n&&e.preventDefault()},_onKeypress:function(e){},_onFocus:function(e){var t=this.tree.options;"blur"==e.type||"focusout"==e.type?(t.onBlur&&t.onBlur.call(this.tree,this),this.tree.tnFocused&&$(this.tree.tnFocused.span).removeClass(t.classNames.focused),this.tree.tnFocused=null,t.persist&&$.cookie(t.cookieId+"-focus","",t.cookie)):("focus"==e.type||"focusin"==e.type)&&(this.tree.tnFocused&&this.tree.tnFocused!==this&&(this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o",this.tree.tnFocused),$(this.tree.tnFocused.span).removeClass(t.classNames.focused)),this.tree.tnFocused=this,t.onFocus&&t.onFocus.call(this.tree,this),$(this.tree.tnFocused.span).addClass(t.classNames.focused),t.persist&&$.cookie(t.cookieId+"-focus",this.data.key,t.cookie))},visit:function(e,t){var n=!0;if(t===!0&&(n=e(this),n===!1||"skip"==n))return n;if(this.childList)for(var i=0,r=this.childList.length;r>i&&(n=this.childList[i].visit(e,!0),n!==!1);i++);return n},visitParents:function(e,t){if(t&&e(this)===!1)return!1;for(var n=this.parent;n;){if(e(n)===!1)return!1;n=n.parent}return!0},remove:function(){if(this===this.tree.root)throw"Cannot remove system root";return this.parent.removeChild(this)},removeChild:function(e){var t=this.childList;if(1==t.length){if(e!==t[0])throw"removeChild: invalid child";return this.removeChildren()}e===this.tree.activeNode&&e.deactivate(),this.tree.options.persist&&(e.bSelected&&this.tree.persistence.clearSelect(e.data.key),e.bExpanded&&this.tree.persistence.clearExpand(e.data.key)),e.removeChildren(!0),this.ul.removeChild(e.li);for(var n=0,i=t.length;i>n;n++)if(t[n]===e){this.childList.splice(n,1);break}},removeChildren:function(e,t){this.tree.logDebug("%s.removeChildren(%o)",this,e);var n=this.tree,i=this.childList;if(i){for(var r=0,o=i.length;o>r;r++){var a=i[r];a!==n.activeNode||t||a.deactivate(),this.tree.options.persist&&!t&&(a.bSelected&&this.tree.persistence.clearSelect(a.data.key),a.bExpanded&&this.tree.persistence.clearExpand(a.data.key)),a.removeChildren(!0,t),this.ul&&$("li",$(this.ul)).remove()}this.childList=null}e||(this._isLoading=!1,this.render())},setTitle:function(e){this.fromDict({title:e})},reload:function(e){throw"Use reloadChildren() instead"},reloadChildren:function(e){if(null===this.parent)throw"Use tree.reload() instead";if(!this.data.isLazy)throw"node.reloadChildren() requires lazy nodes.";if(e){var t=this,n="nodeLoaded.dynatree."+this.tree.$tree.attr("id")+"."+this.data.key;this.tree.$tree.bind(n,function(i,r,o){if(t.tree.$tree.unbind(n),t.tree.logDebug("loaded %o, %o, %o",i,r,o),r!==t)throw"got invalid load event";e.call(t.tree,r,o)})}this.removeChildren(),this._loadContent()},_loadKeyPath:function(e,t){var n=this.tree;if(n.logDebug("%s._loadKeyPath(%s)",this,e),""===e)throw"Key path must not be empty";var i=e.split(n.options.keyPathSeparator);if(""===i[0])throw"Key path must be relative (don't start with '/')";var r=i.shift();if(this.childList)for(var o=0,a=this.childList.length;a>o;o++){var s=this.childList[o];if(s.data.key===r){if(0===i.length)t.call(n,s,"ok");else if(!s.data.isLazy||null!==s.childList&&void 0!==s.childList)t.call(n,s,"loaded"),s._loadKeyPath(i.join(n.options.keyPathSeparator),t);else{n.logDebug("%s._loadKeyPath(%s) -> reloading %s...",this,e,s);var l=this;s.reloadChildren(function(r,o){o?(n.logDebug("%s._loadKeyPath(%s) -> reloaded %s.",r,e,r),t.call(n,s,"loaded"),r._loadKeyPath(i.join(n.options.keyPathSeparator),t)):(n.logWarning("%s._loadKeyPath(%s) -> reloadChildren() failed.",l,e),t.call(n,s,"error"))})}return}}t.call(n,void 0,"notfound",r,0===i.length),n.logWarning("Node not found: "+r)},resetLazy:function(){if(null===this.parent)throw"Use tree.reload() instead";if(!this.data.isLazy)throw"node.resetLazy() requires lazy nodes.";this.expand(!1),this.removeChildren()},_addChildNode:function(e,t){var n=this.tree,i=n.options,r=n.persistence;if(e.parent=this,null===this.childList?this.childList=[]:t||this.childList.length>0&&$(this.childList[this.childList.length-1].span).removeClass(i.classNames.lastsib),t){var o=$.inArray(t,this.childList);if(0>o)throw"<beforeNode> must be a child of <this>";this.childList.splice(o,0,e)}else this.childList.push(e);var a=n.isInitializing();
|
|
3260
|
|
-if(i.persist&&r.cookiesFound&&a?(r.activeKey===e.data.key&&(n.activeNode=e),r.focusedKey===e.data.key&&(n.focusNode=e),e.bExpanded=$.inArray(e.data.key,r.expandedKeyList)>=0,e.bSelected=$.inArray(e.data.key,r.selectedKeyList)>=0):(e.data.activate&&(n.activeNode=e,i.persist&&(r.activeKey=e.data.key)),e.data.focus&&(n.focusNode=e,i.persist&&(r.focusedKey=e.data.key)),e.bExpanded=e.data.expand===!0,e.bExpanded&&i.persist&&r.addExpand(e.data.key),e.bSelected=e.data.select===!0,e.bSelected&&i.persist&&r.addSelect(e.data.key)),i.minExpandLevel>=e.getLevel()&&(this.bExpanded=!0),e.bSelected&&3==i.selectMode)for(var s=this;s;)s.hasSubSel||s._setSubSel(!0),s=s.parent;return n.bEnableUpdate&&this.render(),e},addChild:function(e,t){if("string"==typeof e)throw"Invalid data type for "+e;if(e&&0!==e.length){if(e instanceof DynaTreeNode)return this._addChildNode(e,t);e.length||(e=[e]);for(var n=this.tree.enableUpdate(!1),i=null,r=0,o=e.length;o>r;r++){var a=e[r],s=this._addChildNode(new DynaTreeNode(this,this.tree,a),t);i||(i=s),a.children&&s.addChild(a.children,null)}return this.tree.enableUpdate(n),i}},append:function(e){return this.tree.logWarning("node.append() is deprecated (use node.addChild() instead)."),this.addChild(e,null)},appendAjax:function(e){var t=this;if(this.removeChildren(!1,!0),this.setLazyNodeStatus(DTNodeStatus_Loading),e.debugLazyDelay){var n=e.debugLazyDelay;return e.debugLazyDelay=0,this.tree.logInfo("appendAjax: waiting for debugLazyDelay "+n),void setTimeout(function(){t.appendAjax(e)},n)}var i=e.success,r=e.error,o="nodeLoaded.dynatree."+this.tree.$tree.attr("id")+"."+this.data.key,a=$.extend({},this.tree.options.ajaxDefaults,e,{success:function(e,n,r){var s=t.tree.phase;t.tree.phase="init",a.postProcess?e=a.postProcess.call(this,e,this.dataType):e&&e.hasOwnProperty("d")&&(e="string"==typeof e.d?$.parseJSON(e.d):e.d),$.isArray(e)&&0===e.length||t.addChild(e,null),t.tree.phase="postInit",i&&i.call(a,t,e,n),t.tree.logDebug("trigger "+o),t.tree.$tree.trigger(o,[t,!0]),t.tree.phase=s,t.setLazyNodeStatus(DTNodeStatus_Ok),$.isArray(e)&&0===e.length&&(t.childList=[],t.render())},error:function(e,n,i){t.tree.logWarning("appendAjax failed:",n,":\n",e,"\n",i),r&&r.call(a,t,e,n,i),t.tree.$tree.trigger(o,[t,!1]),t.setLazyNodeStatus(DTNodeStatus_Error,{info:n,tooltip:""+i})}});$.ajax(a)},move:function(e,t){var n;if(this!==e){if(!this.parent)throw"Cannot move system root";(void 0===t||"over"==t)&&(t="child");var i=this.parent,r="child"===t?e:e.parent;if(r.isDescendantOf(this))throw"Cannot move a node to it's own descendant";if(1==this.parent.childList.length)this.parent.childList=this.parent.data.isLazy?[]:null,this.parent.bExpanded=!1;else{if(n=$.inArray(this,this.parent.childList),0>n)throw"Internal error";this.parent.childList.splice(n,1)}if(this.parent.ul&&this.parent.ul.removeChild(this.li),this.parent=r,r.hasChildren())switch(t){case"child":r.childList.push(this);break;case"before":if(n=$.inArray(e,r.childList),0>n)throw"Internal error";r.childList.splice(n,0,this);break;case"after":if(n=$.inArray(e,r.childList),0>n)throw"Internal error";r.childList.splice(n+1,0,this);break;default:throw"Invalid mode "+t}else r.childList=[this];if(r.ul||(r.ul=document.createElement("ul"),r.ul.style.display="none",r.li.appendChild(r.ul)),this.li&&r.ul.appendChild(this.li),this.tree!==e.tree)throw this.visit(function(t){t.tree=e.tree},null,!0),"Not yet implemented.";i.isDescendantOf(r)||i.render(),r.isDescendantOf(i)||r.render()}},lastentry:void 0};var DynaTreeStatus=Class.create();DynaTreeStatus._getTreePersistData=function(e,t){var n=new DynaTreeStatus(e,t);return n.read(),n.toDict()},getDynaTreePersistData=DynaTreeStatus._getTreePersistData,DynaTreeStatus.prototype={initialize:function(e,t){void 0===e&&(e=$.ui.dynatree.prototype.options.cookieId),t=$.extend({},$.ui.dynatree.prototype.options.cookie,t),this.cookieId=e,this.cookieOpts=t,this.cookiesFound=void 0,this.activeKey=null,this.focusedKey=null,this.expandedKeyList=null,this.selectedKeyList=null},_log:function(e){Array.prototype.unshift.apply(arguments,["debug"]),_log.apply(this,arguments)},read:function(){this.cookiesFound=!1;var e=$.cookie(this.cookieId+"-active");this.activeKey=null===e?"":e,null!==e&&(this.cookiesFound=!0),e=$.cookie(this.cookieId+"-focus"),this.focusedKey=null===e?"":e,null!==e&&(this.cookiesFound=!0),e=$.cookie(this.cookieId+"-expand"),this.expandedKeyList=null===e?[]:e.split(","),null!==e&&(this.cookiesFound=!0),e=$.cookie(this.cookieId+"-select"),this.selectedKeyList=null===e?[]:e.split(","),null!==e&&(this.cookiesFound=!0)},write:function(){$.cookie(this.cookieId+"-active",null===this.activeKey?"":this.activeKey,this.cookieOpts),$.cookie(this.cookieId+"-focus",null===this.focusedKey?"":this.focusedKey,this.cookieOpts),$.cookie(this.cookieId+"-expand",null===this.expandedKeyList?"":this.expandedKeyList.join(","),this.cookieOpts),$.cookie(this.cookieId+"-select",null===this.selectedKeyList?"":this.selectedKeyList.join(","),this.cookieOpts)},addExpand:function(e){$.inArray(e,this.expandedKeyList)<0&&(this.expandedKeyList.push(e),$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts))},clearExpand:function(e){var t=$.inArray(e,this.expandedKeyList);t>=0&&(this.expandedKeyList.splice(t,1),$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts))},addSelect:function(e){$.inArray(e,this.selectedKeyList)<0&&(this.selectedKeyList.push(e),$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts))},clearSelect:function(e){var t=$.inArray(e,this.selectedKeyList);t>=0&&(this.selectedKeyList.splice(t,1),$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts))},isReloading:function(){return this.cookiesFound===!0},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList}},lastentry:void 0};var DynaTree=Class.create();DynaTree.version="$Version:$",DynaTree.prototype={initialize:function(e){this.phase="init",this.$widget=e,this.options=e.options,this.$tree=e.element,this.timer=null,this.divTree=this.$tree.get(0),_initDragAndDrop(this)},_load:function(e){var t=(this.$widget,this.options),n=this;this.bEnableUpdate=!0,this._nodeCount=1,this.activeNode=null,this.focusNode=null,void 0!==t.rootVisible&&this.logWarning("Option 'rootVisible' is no longer supported."),t.minExpandLevel<1&&(this.logWarning("Option 'minExpandLevel' must be >= 1."),t.minExpandLevel=1),t.classNames!==$.ui.dynatree.prototype.options.classNames&&(t.classNames=$.extend({},$.ui.dynatree.prototype.options.classNames,t.classNames)),t.ajaxDefaults!==$.ui.dynatree.prototype.options.ajaxDefaults&&(t.ajaxDefaults=$.extend({},$.ui.dynatree.prototype.options.ajaxDefaults,t.ajaxDefaults)),t.dnd!==$.ui.dynatree.prototype.options.dnd&&(t.dnd=$.extend({},$.ui.dynatree.prototype.options.dnd,t.dnd)),t.imagePath||$("script").each(function(){var e=/.*dynatree[^\/]*\.js$/i;return this.src.search(e)>=0?(this.src.indexOf("/")>=0?t.imagePath=this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/":t.imagePath="skin/",n.logDebug("Guessing imagePath from '%s': '%s'",this.src,t.imagePath),!1):void 0}),this.persistence=new DynaTreeStatus(t.cookieId,t.cookie),t.persist&&($.cookie||_log("warn","Please include jquery.cookie.js to use persistence."),this.persistence.read()),this.logDebug("DynaTree.persistence: %o",this.persistence.toDict()),this.cache={tagEmpty:"<span class='"+t.classNames.empty+"'></span>",tagVline:"<span class='"+t.classNames.vline+"'></span>",tagExpander:"<span class='"+t.classNames.expander+"'></span>",tagConnector:"<span class='"+t.classNames.connector+"'></span>",tagNodeIcon:"<span class='"+t.classNames.nodeIcon+"'></span>",tagCheckbox:"<span class='"+t.classNames.checkbox+"'></span>",lastentry:void 0},(t.children||t.initAjax&&t.initAjax.url||t.initId)&&$(this.divTree).empty();var i=this.$tree.find(">ul:first").hide();this.tnRoot=new DynaTreeNode(null,this,{}),this.tnRoot.bExpanded=!0,this.tnRoot.render(),this.divTree.appendChild(this.tnRoot.ul);var r=this.tnRoot,o=t.persist&&this.persistence.isReloading(),a=!1,s=this.enableUpdate(!1);this.logDebug("Dynatree._load(): read tree structure..."),t.children?r.addChild(t.children):t.initAjax&&t.initAjax.url?(a=!0,r.data.isLazy=!0,this._reloadAjax(e)):t.initId?this._createFromTag(r,$("#"+t.initId)):(this._createFromTag(r,i),i.remove()),this._checkConsistency(),a||3!=t.selectMode||r._updatePartSelectionState(),this.logDebug("Dynatree._load(): render nodes..."),this.enableUpdate(s),this.logDebug("Dynatree._load(): bind events..."),this.$widget.bind(),this.logDebug("Dynatree._load(): postInit..."),this.phase="postInit",t.persist&&this.persistence.write(),this.focusNode&&this.focusNode.isVisible()&&(this.logDebug("Focus on init: %o",this.focusNode),this.focusNode.focus()),a||(t.onPostInit&&t.onPostInit.call(this,o,!1),e&&e.call(this,"ok")),this.phase="idle"},_reloadAjax:function(e){var t=this.options;if(!t.initAjax||!t.initAjax.url)throw"tree.reload() requires 'initAjax' mode.";var n=this.persistence,i=$.extend({},t.initAjax);i.addActiveKey&&(i.data.activeKey=n.activeKey),i.addFocusedKey&&(i.data.focusedKey=n.focusedKey),i.addExpandedKeyList&&(i.data.expandedKeyList=n.expandedKeyList.join(",")),i.addSelectedKeyList&&(i.data.selectedKeyList=n.selectedKeyList.join(",")),i.success&&this.logWarning("initAjax: success callback is ignored; use onPostInit instead."),i.error&&this.logWarning("initAjax: error callback is ignored; use onPostInit instead.");var r=n.isReloading();i.success=function(n,i,o){3==t.selectMode&&n.tree.tnRoot._updatePartSelectionState(),t.onPostInit&&t.onPostInit.call(n.tree,r,!1),e&&e.call(n.tree,"ok")},i.error=function(n,i,o,a){t.onPostInit&&t.onPostInit.call(n.tree,r,!0,i,o,a),e&&e.call(n.tree,"error",i,o,a)},this.logDebug("Dynatree._init(): send Ajax request..."),this.tnRoot.appendAjax(i)},toString:function(){return"Dynatree '"+this.$tree.attr("id")+"'"},toDict:function(){return this.tnRoot.toDict(!0)},serializeArray:function(e){for(var t=this.getSelectedNodes(e),n=this.$tree.attr("name")||this.$tree.attr("id"),i=[],r=0,o=t.length;o>r;r++)i.push({name:n,value:t[r].data.key});return i},getPersistData:function(){return this.persistence.toDict()},logDebug:function(e){this.options.debugLevel>=2&&(Array.prototype.unshift.apply(arguments,["debug"]),_log.apply(this,arguments))},logInfo:function(e){this.options.debugLevel>=1&&(Array.prototype.unshift.apply(arguments,["info"]),_log.apply(this,arguments))},logWarning:function(e){Array.prototype.unshift.apply(arguments,["warn"]),_log.apply(this,arguments)},isInitializing:function(){return"init"==this.phase||"postInit"==this.phase},isReloading:function(){return("init"==this.phase||"postInit"==this.phase)&&this.options.persist&&this.persistence.cookiesFound},isUserEvent:function(){return"userEvent"==this.phase},redraw:function(){this.tnRoot.render(!1,!1)},renderInvisibleNodes:function(){this.tnRoot.render(!1,!0)},reload:function(e){this._load(e)},getRoot:function(){return this.tnRoot},enable:function(){this.$widget.enable()},disable:function(){this.$widget.disable()},getNodeByKey:function(e){var t=document.getElementById(this.options.idPrefix+e);if(t)return t.dtnode?t.dtnode:null;var n=null;return this.visit(function(t){return t.data.key==e?(n=t,!1):void 0},!0),n},getActiveNode:function(){return this.activeNode},reactivate:function(e){var t=this.activeNode;t&&(this.activeNode=null,t.activate(),e&&t.focus())},getSelectedNodes:function(e){var t=[];return this.tnRoot.visit(function(n){return n.bSelected&&(t.push(n),e===!0)?"skip":void 0}),t},activateKey:function(e){var t=null===e?null:this.getNodeByKey(e);return t?(t.focus(),t.activate(),t):(this.activeNode&&this.activeNode.deactivate(),this.activeNode=null,null)},loadKeyPath:function(e,t){var n=e.split(this.options.keyPathSeparator);return""===n[0]&&n.shift(),n[0]==this.tnRoot.data.key&&(this.logDebug("Removed leading root key."),n.shift()),e=n.join(this.options.keyPathSeparator),this.tnRoot._loadKeyPath(e,t)},selectKey:function(e,t){var n=this.getNodeByKey(e);return n?(n.select(t),n):null},enableUpdate:function(e){return this.bEnableUpdate==e?e:(this.bEnableUpdate=e,e&&this.redraw(),!e)},count:function(){return this.tnRoot.countChildren()},visit:function(e,t){return this.tnRoot.visit(e,t)},_createFromTag:function(parentTreeNode,$ulParent){var self=this;$ulParent.find(">li").each(function(){var $li=$(this),$liSpan=$li.find(">span:first"),$liA=$li.find(">a:first"),title,href=null,target=null,tooltip;if($liSpan.length)title=$liSpan.html();else if($liA.length)title=$liA.html(),href=$liA.attr("href"),target=$liA.attr("target"),tooltip=$liA.attr("title");else{title=$li.html();var iPos=title.search(/<ul/i);title=iPos>=0?$.trim(title.substring(0,iPos)):$.trim(title)}var data={title:title,tooltip:tooltip,isFolder:$li.hasClass("folder"),isLazy:$li.hasClass("lazy"),expand:$li.hasClass("expanded"),select:$li.hasClass("selected"),activate:$li.hasClass("active"),focus:$li.hasClass("focused"),noLink:$li.hasClass("noLink")};if(href&&(data.href=href,data.target=target),$li.attr("title")&&(data.tooltip=$li.attr("title")),$li.attr("id")&&(data.key=$li.attr("id")),$li.attr("data")){var dataAttr=$.trim($li.attr("data"));if(dataAttr){"{"!=dataAttr.charAt(0)&&(dataAttr="{"+dataAttr+"}");try{$.extend(data,eval("("+dataAttr+")"))}catch(e){throw"Error parsing node data: "+e+"\ndata:\n'"+dataAttr+"'"}}}var childNode=parentTreeNode.addChild(data),$ul=$li.find(">ul:first");$ul.length&&self._createFromTag(childNode,$ul)})},_checkConsistency:function(){},_setDndStatus:function(e,t,n,i,r){var o=e?$(e.span):null,a=$(t.span);if(this.$dndMarker||(this.$dndMarker=$("<div id='dynatree-drop-marker'></div>").hide().css({"z-index":1e3}).prependTo($(this.divTree).parent())),"after"===i||"before"===i||"over"===i){var s="0 0";switch(i){case"before":this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-over"),this.$dndMarker.addClass("dynatree-drop-before"),s="0 -8";break;case"after":this.$dndMarker.removeClass("dynatree-drop-before dynatree-drop-over"),this.$dndMarker.addClass("dynatree-drop-after"),s="0 8";break;default:this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-before"),this.$dndMarker.addClass("dynatree-drop-over"),a.addClass("dynatree-drop-target"),s="8 0"}this.$dndMarker.show().position({my:"left top",at:"left top",of:a,offset:s})}else a.removeClass("dynatree-drop-target"),this.$dndMarker.hide();"after"===i?a.addClass("dynatree-drop-after"):a.removeClass("dynatree-drop-after"),"before"===i?a.addClass("dynatree-drop-before"):a.removeClass("dynatree-drop-before"),r===!0?(o&&o.addClass("dynatree-drop-accept"),a.addClass("dynatree-drop-accept"),n.addClass("dynatree-drop-accept")):(o&&o.removeClass("dynatree-drop-accept"),a.removeClass("dynatree-drop-accept"),n.removeClass("dynatree-drop-accept")),r===!1?(o&&o.addClass("dynatree-drop-reject"),a.addClass("dynatree-drop-reject"),n.addClass("dynatree-drop-reject")):(o&&o.removeClass("dynatree-drop-reject"),a.removeClass("dynatree-drop-reject"),n.removeClass("dynatree-drop-reject"))},_onDragEvent:function(e,t,n,i,r,o){var a,s,l=(this.options,this.options.dnd),u=null,c=$(t.span);switch(e){case"helper":var d=$("<div class='dynatree-drag-helper'><span class='dynatree-drag-helper-img' /></div>").append($(i.target).closest("a").clone());$("ul.dynatree-container",t.tree.divTree).append(d),d.data("dtSourceNode",t),u=d;break;case"start":t.isStatusNode()?u=!1:l.onDragStart&&(u=l.onDragStart(t)),u===!1?(this.logDebug("tree.onDragStart() cancelled"),r.helper.trigger("mouseup"),r.helper.hide()):c.addClass("dynatree-drag-source");break;case"enter":u=l.onDragEnter?l.onDragEnter(t,n):null,u=u?{over:u===!0||"over"===u||$.inArray("over",u)>=0,before:u===!0||"before"===u||$.inArray("before",u)>=0,after:u===!0||"after"===u||$.inArray("after",u)>=0}:!1,r.helper.data("enterResponse",u);break;case"over":if(s=r.helper.data("enterResponse"),a=null,s===!1);else if("string"==typeof s)a=s;else{var p=c.offset(),h={x:i.pageX-p.left,y:i.pageY-p.top},f={x:h.x/c.width(),y:h.y/c.height()};s.after&&f.y>.75?a="after":!s.over&&s.after&&f.y>.5?a="after":s.before&&f.y<=.25?a="before":!s.over&&s.before&&f.y<=.5?a="before":s.over&&(a="over"),l.preventVoidMoves&&(t===n?a=null:"before"===a&&n&&t===n.getNextSibling()?a=null:"after"===a&&n&&t===n.getPrevSibling()?a=null:"over"===a&&n&&n.parent===t&&n.isLastSibling()&&(a=null)),r.helper.data("hitMode",a)}"over"===a&&l.autoExpandMS&&t.hasChildren()!==!1&&!t.bExpanded&&t.scheduleAction("expand",l.autoExpandMS),a&&l.onDragOver&&(u=l.onDragOver(t,n,a),("over"===u||"before"===u||"after"===u)&&(a=u)),this._setDndStatus(n,t,r.helper,a,u!==!1&&null!==a);break;case"drop":var g=r.helper.hasClass("dynatree-drop-reject");a=r.helper.data("hitMode"),a&&l.onDrop&&!g&&l.onDrop(t,n,a,r,o);break;case"leave":t.scheduleAction("cancel"),r.helper.data("enterResponse",null),r.helper.data("hitMode",null),this._setDndStatus(n,t,r.helper,"out",void 0),l.onDragLeave&&l.onDragLeave(t,n);break;case"stop":c.removeClass("dynatree-drag-source"),l.onDragStop&&l.onDragStop(t);break;default:throw"Unsupported drag event: "+e}return u},cancelDrag:function(){var e=$.ui.ddmanager.current;e&&e.cancel()},lastentry:void 0},$.widget("ui.dynatree",{_init:function(){return parseFloat($.ui.version)<1.8?(this.options.debugLevel>=0&&_log("warn","ui.dynatree._init() was called; you should upgrade to jquery.ui.core.js v1.8 or higher."),this._create()):void(this.options.debugLevel>=2&&_log("debug","ui.dynatree._init() was called; no current default functionality."))},_create:function(){var e=this.options;e.debugLevel>=1&&logMsg("Dynatree._create(): version='%s', debugLevel=%o.",$.ui.dynatree.version,this.options.debugLevel),this.options.event+=".dynatree";this.element.get(0);this.tree=new DynaTree(this),this.tree._load(),this.tree.logDebug("Dynatree._init(): done.")},bind:function(){function e(e){e=$.event.fix(e||window.event);var t=$.ui.dynatree.getNode(e.target);return t?t._onFocus(e):!1}this.unbind();var t="click.dynatree dblclick.dynatree";this.options.keyboard&&(t+=" keypress.dynatree keydown.dynatree"),this.element.bind(t,function(e){var t=$.ui.dynatree.getNode(e.target);if(!t)return!0;var n=t.tree,i=n.options;n.logDebug("event(%s): dtnode: %s",e.type,t);var r=n.phase;n.phase="userEvent";try{switch(e.type){case"click":return i.onClick&&i.onClick.call(n,t,e)===!1?!1:t._onClick(e);case"dblclick":return i.onDblClick&&i.onDblClick.call(n,t,e)===!1?!1:t._onDblClick(e);case"keydown":return i.onKeydown&&i.onKeydown.call(n,t,e)===!1?!1:t._onKeydown(e);case"keypress":return i.onKeypress&&i.onKeypress.call(n,t,e)===!1?!1:t._onKeypress(e)}}catch(o){n.logWarning("bind(%o): dtnode: %o, error: %o",e,t,o)}finally{n.phase=r}});var n=this.tree.divTree;n.addEventListener?(n.addEventListener("focus",e,!0),n.addEventListener("blur",e,!0)):n.onfocusin=n.onfocusout=e},unbind:function(){this.element.unbind(".dynatree")},enable:function(){this.bind(),$.Widget.prototype.enable.apply(this,arguments)},disable:function(){this.unbind(),$.Widget.prototype.disable.apply(this,arguments)},getTree:function(){return this.tree},getRoot:function(){return this.tree.getRoot()},getActiveNode:function(){return this.tree.getActiveNode()},getSelectedNodes:function(){return this.tree.getSelectedNodes()},lastentry:void 0}),parseFloat($.ui.version)<1.8&&($.ui.dynatree.getter="getTree getRoot getActiveNode getSelectedNodes"),$.ui.dynatree.version="$Version:$",$.ui.dynatree.getNode=function(e){if(e instanceof DynaTreeNode)return e;for(void 0!==e.selector&&(e=e[0]);e;){if(e.dtnode)return e.dtnode;e=e.parentNode}return null},$.ui.dynatree.getPersistData=DynaTreeStatus._getTreePersistData,$.ui.dynatree.prototype.options={title:"Dynatree",minExpandLevel:1,imagePath:null,children:null,initId:null,initAjax:null,autoFocus:!0,keyboard:!0,persist:!1,autoCollapse:!1,clickFolderMode:3,activeVisible:!0,checkbox:!1,selectMode:2,fx:null,noLink:!1,onClick:null,onDblClick:null,onKeydown:null,onKeypress:null,onFocus:null,onBlur:null,onQueryActivate:null,onQuerySelect:null,onQueryExpand:null,onPostInit:null,onActivate:null,onDeactivate:null,onSelect:null,onExpand:null,onLazyRead:null,onCustomRender:null,onCreate:null,onRender:null,postProcess:null,dnd:{onDragStart:null,onDragStop:null,autoExpandMS:1e3,preventVoidMoves:!0,onDragEnter:null,onDragOver:null,onDrop:null,onDragLeave:null},ajaxDefaults:{cache:!1,timeout:0,dataType:"json"},strings:{loading:"Loading…",loadError:"Load error!"},generateIds:!1,idPrefix:"dynatree-id-",keyPathSeparator:"/",cookieId:"dynatree",cookie:{expires:null},classNames:{container:"dynatree-container",node:"dynatree-node",folder:"dynatree-folder",empty:"dynatree-empty",vline:"dynatree-vline",expander:"dynatree-expander",connector:"dynatree-connector",checkbox:"dynatree-checkbox",nodeIcon:"dynatree-icon",title:"dynatree-title",noConnector:"dynatree-no-connector",nodeError:"dynatree-statusnode-error",nodeWait:"dynatree-statusnode-wait",hidden:"dynatree-hidden",combinedExpanderPrefix:"dynatree-exp-",combinedIconPrefix:"dynatree-ico-",nodeLoading:"dynatree-loading",hasChildren:"dynatree-has-children",active:"dynatree-active",selected:"dynatree-selected",expanded:"dynatree-expanded",lazy:"dynatree-lazy",focused:"dynatree-focused",partsel:"dynatree-partsel",lastsib:"dynatree-lastsib"},debugLevel:2,lastentry:void 0},parseFloat($.ui.version)<1.8&&($.ui.dynatree.defaults=$.ui.dynatree.prototype.options),$.ui.dynatree.nodedatadefaults={title:null,key:null,isFolder:!1,isLazy:!1,tooltip:null,href:null,icon:null,addClass:null,noLink:!1,activate:!1,focus:!1,expand:!1,select:!1,hideCheckbox:!1,unselectable:!1,children:null,lastentry:void 0};var didRegisterDnd=!1,_registerDnd=function(){didRegisterDnd||($.ui.plugin.add("draggable","connectToDynatree",{start:function(e,t){var n=$(this).data("draggable"),i=t.helper.data("dtSourceNode")||null;return i?(n.offset.click.top=-2,n.offset.click.left=16,i.tree._onDragEvent("start",i,null,e,t,n)):void 0},drag:function(e,t){var n=$(this).data("draggable"),i=t.helper.data("dtSourceNode")||null,r=t.helper.data("dtTargetNode")||null,o=$.ui.dynatree.getNode(e.target);if(e.target&&!o){var a=$(e.target).closest("div.dynatree-drag-helper,#dynatree-drop-marker").length>0;if(a)return}t.helper.data("dtTargetNode",o),r&&r!==o&&r.tree._onDragEvent("leave",r,i,e,t,n),o&&o.tree.options.dnd.onDrop&&(o===r?o.tree._onDragEvent("over",o,i,e,t,n):o.tree._onDragEvent("enter",o,i,e,t,n))},stop:function(e,t){var n=$(this).data("draggable"),i=t.helper.data("dtSourceNode")||null,r=t.helper.data("dtTargetNode")||null,o=(n._mouseDownEvent,e.type),a="mouseup"==o&&1==e.which;a||logMsg("Drag was cancelled"),r&&(a&&r.tree._onDragEvent("drop",r,i,e,t,n),r.tree._onDragEvent("leave",r,i,e,t,n)),i&&i.tree._onDragEvent("stop",i,null,e,t,n)}}),didRegisterDnd=!0)}}(jQuery),function(){function e(e){var t={};return e.forEach(function(e,n){t[e]=n}),t}function t(e,t){Object.keys(e).forEach(function(n){t[n]=e[n]})}function n(e){return Math.min.apply(null,e)}function i(e){return Math.max.apply(null,e)}function r(e){return Array.prototype.concat.apply([],e)}function o(e){return Object.keys(e).map(function(t){return e[t]})}function a(e){for(var t={},n=0;n<e.length;++n)for(var i=e[n],r=0;r<i.length;++r){var o=i[r];t[o]=o}var a=[];for(var s in t)a.push(t[s]);return a}function s(e,t,n,i){return function(r){return arguments.length?(t[n]=r,i&&i(r),e):t[n]}}function l(){function e(t){var i=d,r=2*t,o=r+1,a=t;r<i.length&&(a=i[r].pri<i[a].pri?r:a,o<i.length&&(a=i[o].pri<i[a].pri?o:a),a!==t&&(n(t,a),e(a)))}function t(e){for(var t,i=d,r=i[e].pri;e>0&&(t=e>>1,!(i[t].pri<r));)n(e,t),e=t}function n(e,t){var n=d,i=p,r=n[e];n[e]=n[t],n[t]=r,i[n[e].key]=e,i[n[t].key]=t}function i(){return d.length}function r(){return Object.keys(p)}function o(e){return e in p}function a(e){var t=p[e];return void 0!==t?d[t].pri:void 0}function s(e,n){if(!(e in p)){var i={key:e,pri:n},r=d.length;return p[e]=r,d.push(i),t(r),!0}return!1}function l(){return i()>0?d[0].key:void 0}function u(){n(0,d.length-1);var t=d.pop();return delete p[t.key],e(0),t.key}function c(e,n){var i=p[e];if(n>d[i].pri)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+d[i].pri+" New: "+n);d[i].pri=n,t(i)}var d=[],p={};return{size:i,keys:r,has:o,priority:a,add:s,min:l,removeMin:u,decrease:c}}dagre={},dagre.version="0.0.5",dagre.graph={},dagre.graph=function(){function e(e,t,n){var i=e[t];i||(i=e[t]={count:0,edges:{}}),i.count++,i.edges[n]=!0}function t(e,t,n){var i=e[t];0==--i.count?delete e[t]:delete i.edges[n]}function n(e){var t=s[e];if(!(e in s))throw new Error("Node '"+e+"' is not in buildGraph:\n"+p.toString());return t}function i(e){var t=c[e];if(!t)throw new Error("Edge '"+e+"' is not in buildGraph:\n"+p.toString());return t}var s={},l={},u={},c={},p={};return p.addNode=function(e,t){if(p.hasNode(e))throw new Error("Graph already has node '"+e+"':\n"+p.toString());s[e]={id:e,value:t},l[e]={},u[e]={}},p.delNode=function(e){n(e),p.edges(e).forEach(function(e){p.delEdge(e)}),delete l[e],delete u[e],delete s[e]},p.node=function(e){return n(e).value},p.hasNode=function(e){return e in s},p.addEdge=function(t,i,r,o){if(n(i),n(r),p.hasEdge(t))throw new Error("Graph already has edge '"+t+"':\n"+p.toString());c[t]={id:t,source:i,target:r,value:o},e(l[r],i,t),e(u[i],r,t)},p.delEdge=function(e){var n=i(e);t(l[n.target],n.source,e),t(u[n.source],n.target,e),delete c[e]},p.edge=function(e){return i(e).value},p.source=function(e){return i(e).source},p.target=function(e){return i(e).target},p.hasEdge=function(e){return e in c},p.successors=function(e){return n(e),d(u[e]).map(function(e){return s[e].id})},p.predecessors=function(e){return n(e),d(l[e]).map(function(e){return s[e].id})},p.neighbors=function(e){n(e);var t={};return d(u[e]).map(function(e){t[e]=!0}),d(l[e]).map(function(e){t[e]=!0}),d(t).map(function(e){return s[e].id})},p.nodes=function(){var e=[];return p.eachNode(function(t,n){e.push(t)}),e},p.eachNode=function(e){for(var t in s){var n=s[t];e(n.id,n.value)}},p.edges=function(e,t){var i,r;return arguments.length?1===arguments.length?a([p.inEdges(e),p.outEdges(e)]):2===arguments.length?(n(e),n(t),r=u[e],i=t in r?d(r[t].edges):[],i.map(function(e){return c[e].id})):void 0:(i=[],p.eachEdge(function(e){i.push(e)}),i)},p.eachEdge=function(e){for(var t in c){var n=c[t];e(n.id,n.source,n.target,n.value)}},p.inEdges=function(e){return n(e),r(o(l[e]).map(function(e){return d(e.edges)}))},p.outEdges=function(e){return n(e),r(o(u[e]).map(function(e){return d(e.edges)}))},p.subgraph=function(e){var t=dagre.graph();return e.forEach(function(e){t.addNode(e,p.node(e))}),o(c).forEach(function(e){t.hasNode(e.source)&&t.hasNode(e.target)&&t.addEdge(e.id,e.source,e.target,p.edge(e.id))}),t},p.toString=function(){var e="GRAPH:\n";return e+=" Nodes:\n",d(s).forEach(function(t){e+=" "+t+": "+JSON.stringify(s[t].value)+"\n"}),e+=" Edges:\n",d(c).forEach(function(t){var n=c[t];e+=" "+t+" ("+n.source+" -> "+n.target+"): "+JSON.stringify(c[t].value)+"\n"}),e},p},dagre.layout=function(){function e(){var e=dagre.graph(),t=0;return a.nodes.forEach(function(n){var i="id"in n?n.id:"_N"+t++;n.dagre={id:i,width:n.width,height:n.height},e.addNode(i,n.dagre)}),a.edges.forEach(function(n){var i=n.source.dagre.id;if(!e.hasNode(i))throw new Error("Source node for '"+n+"' not in node list");var r=n.target.dagre.id;if(!e.hasNode(r))throw new Error("Target node for '"+n+"' not in node list");if(n.dagre={points:[]},i!==r){var o="id"in n?n.id:"_E"+t++;n.dagre.id=o,n.dagre.minLen=n.minLen||1,n.dagre.width=n.width||0,n.dagre.height=n.height||0,e.addEdge(o,i,r,n.dagre)}}),e}function t(){var t=f.rankSep();try{if(!a.nodes.length)return;var o=e();o.eachEdge(function(e,t,n,i){i.minLen*=2}),f.rankSep(t/2),u.run(o),c.run(o),n(o),d.run(o),p.run(o),i(o),r(o),u.undo(o)}finally{f.rankSep(t)}return f}function n(e){var t=0;e.eachEdge(function(n,i,r,o){var a=e.node(i).rank,s=e.node(r).rank;if(s>a+1){for(var l=i,u=a+1,c=0;s>u;++u,++c){var d="_D"+ ++t,p={width:o.width,height:o.height,edge:{id:n,source:i,target:r,attrs:o},index:c,rank:u,dummy:!0};e.addNode(d,p),e.addEdge("_D"+ ++t,l,d,{}),l=d}e.addEdge("_D"+ ++t,l,r,{}),e.delEdge(n)}})}function i(e){e.eachNode(function(t,n){if(n.dummy){var i=n.edge;e.hasEdge(i.id)||e.addEdge(i.id,i.source,i.target,i.attrs);var r=e.edge(i.id).points;r[n.index]={x:n.x,y:n.y},e.delNode(t)}})}function r(e){e.eachEdge(function(e,t,n,i){i.reversed&&i.points.reverse()})}function o(e){return function(){return arguments.length?(e.apply(null,arguments),f):e()}}var a={nodes:[],edges:[],debugLevel:0},l=h(),u=dagre.layout.acyclic(),c=dagre.layout.rank(),d=dagre.layout.order(),p=dagre.layout.position(),f={};return f.nodes=s(f,a,"nodes"),f.edges=s(f,a,"edges"),f.orderIters=o(d.iterations),f.nodeSep=o(p.nodeSep),f.edgeSep=o(p.edgeSep),f.rankSep=o(p.rankSep),f.rankDir=o(p.rankDir),f.debugAlignment=o(p.debugAlignment),f.debugLevel=s(f,a,"debugLevel",function(e){l.enabled(e),u.debugLevel(e),c.debugLevel(e),d.debugLevel(e),p.debugLevel(e)}),f.run=l.wrap("Total layout",t),f},dagre.layout.acyclic=function(){function e(e){function n(t){t in r||(r[t]=i[t]=!0,e.outEdges(t).forEach(function(r){var a,s=e.target(r);s in i?(a=e.edge(r),e.delEdge(r),a.reversed=!0,++o,e.addEdge(r,s,t,a)):n(s)}),delete i[t])}var i={},r={},o=0;e.eachNode(function(e){n(e)}),t.debugLevel>=2&&console.log("Acyclic Phase: reversed "+o+" edge(s)")}var t={debugLevel:0},n=h(),i={};return i.debugLevel=s(i,t,"debugLevel",function(e){n.enabled(e)}),i.run=n.wrap("Acyclic Phase",e),i.undo=function(e){e.eachEdge(function(t,n,i,r){r.reversed&&(delete r.reversed,e.delEdge(t),e.addEdge(t,i,n,r))})},i},dagre.layout.rank=function(){function e(e){t(e),p(e).forEach(function(t){var n=e.subgraph(t);i(n),r(n)})}function t(e){var t={},n=l();for(e.eachNode(function(i){n.add(i,e.inEdges(i).length),t[i]=0});n.size()>0;){var i=n.min();if(n.priority(i)>0)throw new Error("Input buildGraph is not acyclic: "+e.toString());n.removeMin();var r=t[i];e.node(i).rank=r,e.outEdges(i).forEach(function(i){var o=e.target(i);t[o]=Math.max(t[o],r+(e.edge(i).minLen||1)),n.decrease(o,n.priority(o)-1)})}}function i(e){function t(a,s){r[a]=!0,e.node(a).rank=s,i[a].forEach(function(i){if(!(i in r)){var l=n[o(a,i)];t(i,s+(e.edges(a,i).length?l:-l))}})}var n={};e.eachEdge(function(e,t,i,r){var a=o(t,i);n[a]=Math.max(n[a]||1,r.minLen||1)});var i=dagre.util.prim(e,function(t,i){return Math.abs(e.node(t).rank-e.node(i).rank)-n[o(t,i)]}),r={};return t(e.nodes()[0],0),i}function r(e){var t=n(e.nodes().map(function(t){return e.node(t).rank}));e.eachNode(function(e,n){n.rank-=t})}function o(e,t){return t>e?e.length+":"+e+"-"+t:t.length+":"+t+"-"+e}var a={debugLevel:0},u=h(),c={};return c.debugLevel=s(c,a,"debugLevel",function(e){u.enabled(e)}),c.run=u.wrap("Rank Phase",e),c},dagre.layout.order=function(){function t(e){var t=n(e),r=a(t),o=u(e,t);l.debugLevel>=2&&console.log("Order phase start cross count: "+o);var s,c,d;for(c=0,d=0;4>d&&c<l.iterations;++c,++d)s=i(e,c,t),o>s&&(r=a(t),o=s,d=0),l.debugLevel>=3&&console.log("Order phase iter "+c+" cross count: "+o);return r.forEach(function(t){t.forEach(function(t,n){e.node(t).order=n})}),l.debugLevel>=2&&(console.log("Order iterations: "+c),console.log("Order phase best cross count: "+o)),r}function n(e){var t=[];return e.eachNode(function(e,n){var i=t[n.rank]||(t[n.rank]=[]);i.push(e)}),t}function i(e,t,n){var i,o=0;if(t%2===0)for(i=1;i<n.length;++i)r(e,n[i-1],n[i],"inEdges"),o+=c(e,n[i-1],n[i]);else for(i=n.length-2;i>=0;--i)r(e,n[i+1],n[i],"outEdges"),o+=c(e,n[i],n[i+1]);return o}function r(t,n,i,r){for(var a=e(i),s=o(t,n,i,r),l=i.slice(0).sort(function(e,t){return s[e]-s[t]||a[e]-a[t]}),u=i.length-1;u>=0;--u)-1!==s[i[u]]&&(i[u]=l.pop())}function o(t,n,i,r){var o=e(n),a={};return i.forEach(function(e){var n=-1,i=t[r](e);i.length>0&&(n=0,i.forEach(function(i){var r=t.source(i),a=r===e?t.target(i):r;
|
|
3261
|
|
-n+=o[a]}),n/=i.length),a[e]=n}),a}function a(e){return e.map(function(e){return e.slice(0)})}var l={iterations:24,debugLevel:0},d=h(),p={};return p.iterations=s(p,l,"iterations"),p.debugLevel=s(p,l,"debugLevel",function(e){d.enabled(e)}),p.run=d.wrap("Order Phase",t),p};var u=dagre.layout.order.crossCount=function(e,t){var n,i=0;return t.forEach(function(t){n&&(i+=c(e,n,t)),n=t}),i},c=dagre.layout.order.bilayerCrossCount=function(t,n,i){var r=e(i),o=[];n.forEach(function(e){var n=[];t.outEdges(e).forEach(function(e){n.push(r[t.target(e)])}),n.sort(function(e,t){return e-t}),o=o.concat(n)});for(var a=1;a<i.length;)a<<=1;var s=2*a-1;a-=1;for(var l=[],u=0;s>u;++u)l[u]=0;var c=0;return o.forEach(function(e){var t=e+a;++l[t];for(;t>0;)t%2&&(c+=l[t+1]),t=t-1>>1,++l[t]}),c};dagre.layout.position=function(){function e(e){var r=[];e.eachNode(function(e,t){var n=r[t.rank]||(r[t.rank]=[]);n[t.order]=e});var s=t(e,r),l={};["up","down"].forEach(function(t){"down"===t&&r.reverse(),["left","right"].forEach(function(n){"right"===n&&m(r);var i=t+"-"+n;if(!x.debugAlignment||x.debugAlignment===i){var o=a(e,r,s,"up"===t?"predecessors":"successors");l[i]=u(e,r,o.pos,o.root,o.align),"right"===n&&g(r,l[i])}"right"===n&&m(r)}),"down"===t&&r.reverse()}),x.debugAlignment?e.eachNode(function(t,n){b(e,t,l[x.debugAlignment][t])}):(f(e,r,l),e.eachNode(function(t){var n=o(l).map(function(e){return e[t]}).sort(function(e,t){return e-t});b(e,t,(n[1]+n[2])/2)}));var c=n(e.nodes().map(function(t){return b(e,t)-v(e,t)/2}));e.eachNode(function(t){b(e,t,b(e,t)-c)});var d=0;r.forEach(function(t){var n=i(t.map(function(t){return y(e,t)}));d+=n/2,t.forEach(function(t){w(e,t,d)}),d+=n/2+x.rankSep})}function t(e,t){var n={},i={};t[0].forEach(function(e,t){i[e]=t});for(var r=1;r<t.length;++r)for(var o=t[r],a=0,s=0,l=0;l<o.length;++l){var u=o[l];i[u]=l;var c=null;if(e.node(u).dummy&&e.predecessors(u).some(function(t){return e.node(t).dummy?(c=i[t],!0):!1}),null===c&&l===o.length-1&&(c=t[r-1].length-1),null!==c){for(;l>=s;++s){var d=o[s];e.inEdges(d).forEach(function(t){var r=i[e.source(t)];(a>r||r>c)&&(n[t]=!0)})}a=c}}return n}function a(e,t,n,i){var o={},a={},s={};return t.forEach(function(e){e.forEach(function(e,t){a[e]=e,s[e]=e,o[e]=t})}),t.forEach(function(t){var l=-1;t.forEach(function(t){var u=e[i](t);if(u.length>0){u.sort(function(e,t){return o[e]-o[t]});var c=(u.length-1)/2;u.slice(Math.floor(c),Math.ceil(c)+1).forEach(function(i){s[t]===t&&!n[r([e.edges(t,i),e.edges(i,t)])[0]]&&l<o[i]&&(s[i]=t,s[t]=a[t]=a[i],l=o[i])})}})}),{pos:o,root:a,align:s}}function l(e,t){var n=e.node(t).dummy?x.edgeSep:x.nodeSep;return v(e,t)/2+n/2}function u(e,t,n,i,r){function a(t){if(!(t in d)){d[t]=0;var o=t;do{if(n[o]>0){var p=i[c[o]];a(p),s[t]===t&&(s[t]=s[p]);var h=l(e,c[o])+l(e,o);s[t]!==s[p]?u[s[p]]=Math.min(u[s[p]]||Number.POSITIVE_INFINITY,d[t]-d[p]-h):d[t]=Math.max(d[t],d[p]+h)}o=r[o]}while(o!==t)}}var s={},u={},c={},d={};t.forEach(function(e){e.forEach(function(t,n){s[t]=t,c[t]=n>0?e[n-1]:null})}),o(i).forEach(function(e){a(e)});var p=0;return t.forEach(function(e){var t=u[e[0]];void 0===t&&(t=0),p=u[e[0]]=t+p}),t.forEach(function(e){e.forEach(function(e){if(d[e]=d[i[e]],i[e]===e){var t=u[s[e]];t<Number.POSITIVE_INFINITY&&(d[e]+=t)}})}),d}function c(e,t,i){return n(t.map(function(t){var n=t[0];return i[n]-v(e,n)/2}))}function d(e,t,n){return i(t.map(function(t){var i=t[t.length-1];return n[i]-v(e,i)/2}))}function p(e,t){Object.keys(t).forEach(function(n){t[n]+=e})}function f(e,t,n){var i,r,a=Number.POSITIVE_INFINITY;o(n).forEach(function(n){var o=c(e,t,n),s=d(e,t,n),l=s-o;a>l&&(i=o,r=s,a=l)}),["up","down"].forEach(function(r){var o=n[r+"-left"],a=i-c(e,t,o);a&&p(a,o)}),["up","down"].forEach(function(i){var o=n[i+"-right"],a=r-d(e,t,o);a&&p(a,o)})}function g(e,t){var n=i(o(t));Object.keys(t).forEach(function(e){t[e]=n-t[e]})}function m(e){e.forEach(function(e){e.reverse()})}function v(e,t){switch(x.rankDir){case"LR":return e.node(t).height;default:return e.node(t).width}}function y(e,t){switch(x.rankDir){case"LR":return e.node(t).width;default:return e.node(t).height}}function b(e,t,n){switch(x.rankDir){case"LR":if(arguments.length<3)return e.node(t).y;e.node(t).y=n;break;default:if(arguments.length<3)return e.node(t).x;e.node(t).x=n}}function w(e,t,n){switch(x.rankDir){case"LR":if(arguments.length<3)return e.node(t).x;e.node(t).x=n;break;default:if(arguments.length<3)return e.node(t).y;e.node(t).y=n}}var x={nodeSep:50,edgeSep:10,rankSep:30,rankDir:"TB",debugAlignment:null,debugLevel:0},k=h(),C={};return C.nodeSep=s(C,x,"nodeSep"),C.edgeSep=s(C,x,"edgeSep"),C.rankSep=s(C,x,"rankSep"),C.rankDir=s(C,x,"rankDir"),C.debugAlignment=s(C,x,"debugAlignment"),C.debugLevel=s(C,x,"debugLevel",function(e){k.enabled(e)}),C.run=k.wrap("Position Phase",e),C},dagre.util={};var d=dagre.util.keys=Object.keys,p=dagre.util.components=function(e){function t(n,r){n in i||(i[n]=!0,r.push(n),e.neighbors(n).forEach(function(e){t(e,r)}))}var n=[],i={};return e.eachNode(function(e){var i=[];t(e,i),i.length>0&&n.push(i)}),n},h=(dagre.util.prim=function(e,t){var n={},i={},r=l();if(0===e.nodes().length)return n;e.eachNode(function(e){r.add(e,Number.POSITIVE_INFINITY),n[e]=[]}),r.decrease(e.nodes()[0],0);for(var o,a=!1;r.size()>0;){if(o=r.removeMin(),o in i)n[o].push(i[o]),n[i[o]].push(o);else{if(a)throw new Error("Input buildGraph is not connected:\n"+e.toString());a=!0}e.neighbors(o).forEach(function(e){var n=r.priority(e);if(void 0!==n){var a=t(o,e);n>a&&(i[e]=o,r.decrease(e,a))}})}return n},dagre.util.intersectRect=function(e,t){var n,i,r=e.x,o=e.y,a=t.x-r,s=t.y-o,l=e.width/2,u=e.height/2;return Math.abs(s)*l>Math.abs(a)*u?(0>s&&(u=-u),n=0===s?0:u*a/s,i=u):(0>a&&(l=-l),n=l,i=0===a?0:l*s/a),{x:r+n,y:o+i}},dagre.util.pointStr=function(e){return e.x+","+e.y},function(){var e={},t=!1;return e.enabled=function(n){return arguments.length?(t=n,e):t},e.wrap=function(e,n){return function(){var i=t?(new Date).getTime():null;try{return n.apply(null,arguments)}finally{i&&console.log(e+" time: "+((new Date).getTime()-i)+"ms")}}},e});dagre.dot={},dagre.dot.toGraph=function(e){function n(e,n){a.hasNode(e)||a.addNode(e,{id:e,label:e}),n&&t(n,a.node(e))}function i(e,n,i){var r=e+"-"+n,o=l[r];o||(o=l[r]=0),l[r]++;var s=i.id||r+"-"+o,u={};t(i,u),t({id:s},u),a.addEdge(s,e,n,u)}function r(e){switch(e.type){case"node":n(e.id,e.attrs);break;case"edge":var t;e.elems.forEach(function(n){switch(r(n),n.type){case"node":var o=n.id;t&&(i(t,o,e.attrs),s&&i(o,t,e.attrs)),t=o;break;default:throw new Error("Unsupported type incident on edge: "+n.type)}});break;case"attr":break;default:throw new Error("Unsupported statement type: "+e.type)}}var o=dot_parser.parse(e),a=dagre.graph(),s="buildGraph"===o.type,l={};return o.stmts&&o.stmts.forEach(function(e){r(e)}),a},dagre.dot.toObjects=function(e){var t=dagre.dot.toGraph(e),n=t.nodes().map(function(e){return t.node(e)}),i=t.edges().map(function(e){var n=t.edge(e);return n.source=t.node(t.source(e)),n.target=t.node(t.target(e)),n});return{nodes:n,edges:i}},dot_parser=function(){function e(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var t={parse:function(t,n){function i(e){F>L||(L>F&&(F=L,q=[]),q.push(e))}function r(){var e,n,r,a,s,l,u,c,d,p,h,f,g,m,v,y;for(m=L,v=L,e=[],n=I();null!==n;)e.push(n),n=I();if(null!==e)if(y=L,n=$(),null!==n?(r=I(),null!==r?n=[n,r]:(n=null,L=y)):(n=null,L=y),n=null!==n?n:"",null!==n)if(r=E(),null!==r){for(a=[],s=I();null!==s;)a.push(s),s=I();if(null!==a)if(s=x(),s=null!==s?s:"",null!==s){for(l=[],u=I();null!==u;)l.push(u),u=I();if(null!==l)if(123===t.charCodeAt(L)?(u="{",L++):(u=null,0===R&&i('"{"')),null!==u){for(c=[],d=I();null!==d;)c.push(d),d=I();if(null!==c)if(d=o(),d=null!==d?d:"",null!==d){for(p=[],h=I();null!==h;)p.push(h),h=I();if(null!==p)if(125===t.charCodeAt(L)?(h="}",L++):(h=null,0===R&&i('"}"')),null!==h){for(f=[],g=I();null!==g;)f.push(g),g=I();null!==f?e=[e,n,r,a,s,l,u,c,d,p,h,f]:(e=null,L=v)}else e=null,L=v;else e=null,L=v}else e=null,L=v;else e=null,L=v}else e=null,L=v;else e=null,L=v}else e=null,L=v;else e=null,L=v}else e=null,L=v;else e=null,L=v;else e=null,L=v;return null!==e&&(e=function(e,t,n,i){return{type:t,id:n,stmts:i}}(m,e[2],e[4],e[8])),null===e&&(L=m),e}function o(){var e,n,r,o,s,l,u,c,d,p,h;if(d=L,p=L,e=a(),null!==e){for(n=[],r=I();null!==r;)n.push(r),r=I();if(null!==n)if(59===t.charCodeAt(L)?(r=";",L++):(r=null,0===R&&i('";"')),r=null!==r?r:"",null!==r){for(o=[],h=L,s=[],l=I();null!==l;)s.push(l),l=I();if(null!==s)if(l=a(),null!==l){for(u=[],c=I();null!==c;)u.push(c),c=I();null!==u?(59===t.charCodeAt(L)?(c=";",L++):(c=null,0===R&&i('";"')),c=null!==c?c:"",null!==c?s=[s,l,u,c]:(s=null,L=h)):(s=null,L=h)}else s=null,L=h;else s=null,L=h;for(;null!==s;){for(o.push(s),h=L,s=[],l=I();null!==l;)s.push(l),l=I();if(null!==s)if(l=a(),null!==l){for(u=[],c=I();null!==c;)u.push(c),c=I();null!==u?(59===t.charCodeAt(L)?(c=";",L++):(c=null,0===R&&i('";"')),c=null!==c?c:"",null!==c?s=[s,l,u,c]:(s=null,L=h)):(s=null,L=h)}else s=null,L=h;else s=null,L=h}null!==o?e=[e,n,r,o]:(e=null,L=p)}else e=null,L=p;else e=null,L=p}else e=null,L=p;return null!==e&&(e=function(e,t,n){for(var i=[t],r=0;r<n.length;++r)i.push(n[r][1]);return i}(d,e[0],e[3])),null===e&&(L=d),e}function a(){var e;return e=s(),null===e&&(e=d(),null===e&&(e=l(),null===e&&(e=c(),null===e&&(e=u())))),e}function s(){var e,t,n,i,r;if(i=L,r=L,e=S(),null===e&&(e=k(),null===e&&(e=C())),null!==e){for(t=[],n=I();null!==n;)t.push(n),n=I();null!==t?(n=p(),null!==n?e=[e,t,n]:(e=null,L=r)):(e=null,L=r)}else e=null,L=r;return null!==e&&(e=function(e,t,n){return{type:"attr",attrType:t,attrs:n||{}}}(i,e[0],e[2])),null===e&&(L=i),e}function l(){var e,n,r,o,a,s,l;if(s=L,l=L,e=x(),null!==e){for(n=[],r=I();null!==r;)n.push(r),r=I();if(null!==n)if(61===t.charCodeAt(L)?(r="=",L++):(r=null,0===R&&i('"="')),null!==r){for(o=[],a=I();null!==a;)o.push(a),a=I();null!==o?(a=x(),null!==a?e=[e,n,r,o,a]:(e=null,L=l)):(e=null,L=l)}else e=null,L=l;else e=null,L=l}else e=null,L=l;return null!==e&&(e=function(e,t,n){var i={};return i[t]=n,{type:"inlineAttr",attrs:i}}(s,e[0],e[4])),null===e&&(L=s),e}function u(){var e,t,n,i,r;if(i=L,r=L,e=y(),null!==e){for(t=[],n=I();null!==n;)t.push(n),n=I();null!==t?(n=p(),n=null!==n?n:"",null!==n?e=[e,t,n]:(e=null,L=r)):(e=null,L=r)}else e=null,L=r;return null!==e&&(e=function(e,t,n){return{type:"node",id:t,attrs:n||{}}}(i,e[0],e[2])),null===e&&(L=i),e}function c(){var e,t,n,i,r,o,a;if(o=L,a=L,e=v(),null!==e){for(t=[],n=I();null!==n;)t.push(n),n=I();if(null!==t)if(n=g(),null!==n){for(i=[],r=I();null!==r;)i.push(r),r=I();null!==i?(r=p(),r=null!==r?r:"",null!==r?e=[e,t,n,i,r]:(e=null,L=a)):(e=null,L=a)}else e=null,L=a;else e=null,L=a}else e=null,L=a;return null!==e&&(e=function(e,t,n,i){for(var r=[t],o=0;o<n.length;++o)r.push(n[o]);return{type:"edge",elems:r,attrs:i||{}}}(o,e[0],e[2],e[4])),null===e&&(L=o),e}function d(){var e,n,r,a,s,l,u,c,d,p;if(u=L,c=L,d=L,e=T(),null!==e){for(n=[],r=I();null!==r;)n.push(r),r=I();if(null!==n){if(p=L,r=x(),null!==r){for(a=[],s=I();null!==s;)a.push(s),s=I();null!==a?r=[r,a]:(r=null,L=p)}else r=null,L=p;r=null!==r?r:"",null!==r?e=[e,n,r]:(e=null,L=d)}else e=null,L=d}else e=null,L=d;if(e=null!==e?e:"",null!==e)if(123===t.charCodeAt(L)?(n="{",L++):(n=null,0===R&&i('"{"')),null!==n){for(r=[],a=I();null!==a;)r.push(a),a=I();if(null!==r)if(a=o(),null!==a){for(s=[],l=I();null!==l;)s.push(l),l=I();null!==s?(125===t.charCodeAt(L)?(l="}",L++):(l=null,0===R&&i('"}"')),null!==l?e=[e,n,r,a,s,l]:(e=null,L=c)):(e=null,L=c)}else e=null,L=c;else e=null,L=c}else e=null,L=c;else e=null,L=c;return null!==e&&(e=function(e,t,n){return t=t[2]||[],{type:"subgraph",id:t[0],stmts:n}}(u,e[0],e[3])),null===e&&(L=u),e}function p(){var e,t,n,i,r,o,a;if(r=L,o=L,e=h(),null!==e){for(t=[],a=L,n=[],i=I();null!==i;)n.push(i),i=I();for(null!==n?(i=h(),null!==i?n=[n,i]:(n=null,L=a)):(n=null,L=a);null!==n;){for(t.push(n),a=L,n=[],i=I();null!==i;)n.push(i),i=I();null!==n?(i=h(),null!==i?n=[n,i]:(n=null,L=a)):(n=null,L=a)}null!==t?e=[e,t]:(e=null,L=o)}else e=null,L=o;return null!==e&&(e=function(e,t,n){for(var i=t,r=0;r<n.length;++r)i=j(i,n[r][1]);return i}(r,e[0],e[1])),null===e&&(L=r),e}function h(){var e,n,r,o,a,s,l;if(s=L,l=L,91===t.charCodeAt(L)?(e="[",L++):(e=null,0===R&&i('"["')),null!==e){for(n=[],r=I();null!==r;)n.push(r),r=I();if(null!==n)if(r=f(),r=null!==r?r:"",null!==r){for(o=[],a=I();null!==a;)o.push(a),a=I();null!==o?(93===t.charCodeAt(L)?(a="]",L++):(a=null,0===R&&i('"]"')),null!==a?e=[e,n,r,o,a]:(e=null,L=l)):(e=null,L=l)}else e=null,L=l;else e=null,L=l}else e=null,L=l;return null!==e&&(e=function(e,t){return t}(s,e[2])),null===e&&(L=s),e}function f(){var e,n,r,o,a,s,l,u,c;if(l=L,u=L,e=m(),null!==e){for(n=[],c=L,r=[],o=I();null!==o;)r.push(o),o=I();if(null!==r)if(44===t.charCodeAt(L)?(o=",",L++):(o=null,0===R&&i('","')),o=null!==o?o:"",null!==o){for(a=[],s=I();null!==s;)a.push(s),s=I();null!==a?(s=m(),null!==s?r=[r,o,a,s]:(r=null,L=c)):(r=null,L=c)}else r=null,L=c;else r=null,L=c;for(;null!==r;){for(n.push(r),c=L,r=[],o=I();null!==o;)r.push(o),o=I();if(null!==r)if(44===t.charCodeAt(L)?(o=",",L++):(o=null,0===R&&i('","')),o=null!==o?o:"",null!==o){for(a=[],s=I();null!==s;)a.push(s),s=I();null!==a?(s=m(),null!==s?r=[r,o,a,s]:(r=null,L=c)):(r=null,L=c)}else r=null,L=c;else r=null,L=c}null!==n?e=[e,n]:(e=null,L=u)}else e=null,L=u;return null!==e&&(e=function(e,t,n){for(var i=t,r=0;r<n.length;++r)i=j(i,n[r][3]);return i}(l,e[0],e[1])),null===e&&(L=l),e}function g(){var e,n,r,o,a,s,l,u;if(s=L,l=L,u=L,"--"===t.substr(L,2)?(e="--",L+=2):(e=null,0===R&&i('"--"')),null!==e?(n=function(e){return O}(L)?null:"",null!==n?e=[e,n]:(e=null,L=u)):(e=null,L=u),null===e&&(u=L,"->"===t.substr(L,2)?(e="->",L+=2):(e=null,0===R&&i('"->"')),null!==e?(n=function(e){return O}(L)?"":null,null!==n?e=[e,n]:(e=null,L=u)):(e=null,L=u)),null!==e){for(n=[],r=I();null!==r;)n.push(r),r=I();if(null!==n)if(r=v(),null!==r){for(o=[],a=I();null!==a;)o.push(a),a=I();null!==o?(a=g(),a=null!==a?a:"",null!==a?e=[e,n,r,o,a]:(e=null,L=l)):(e=null,L=l)}else e=null,L=l;else e=null,L=l}else e=null,L=l;return null!==e&&(e=function(e,t,n){for(var i=[t],r=0;r<n.length;++r)i.push(n[r]);return i}(s,e[2],e[4])),null===e&&(L=s),e}function m(){var e,n,r,o,a,s,l,u;if(s=L,l=L,e=x(),null!==e){for(u=L,n=[],r=I();null!==r;)n.push(r),r=I();if(null!==n)if(61===t.charCodeAt(L)?(r="=",L++):(r=null,0===R&&i('"="')),null!==r){for(o=[],a=I();null!==a;)o.push(a),a=I();null!==o?(a=x(),null!==a?n=[n,r,o,a]:(n=null,L=u)):(n=null,L=u)}else n=null,L=u;else n=null,L=u;n=null!==n?n:"",null!==n?e=[e,n]:(e=null,L=l)}else e=null,L=l;return null!==e&&(e=function(e,t,n){var i={};return i[t]=n[3],i}(s,e[0],e[1])),null===e&&(L=s),e}function v(){var e,t;return e=d(),null===e&&(t=L,e=y(),null!==e&&(e=function(e,t){return{type:"node",id:t,attrs:{}}}(t,e)),null===e&&(L=t)),e}function y(){var e,t,n,i,r;if(i=L,r=L,e=x(),null!==e){for(t=[],n=I();null!==n;)t.push(n),n=I();null!==t?(n=b(),n=null!==n?n:"",null!==n?e=[e,t,n]:(e=null,L=r)):(e=null,L=r)}else e=null,L=r;return null!==e&&(e=function(e,t){return t}(i,e[0])),null===e&&(L=i),e}function b(){var e,n,r,o,a,s,l,u,c;if(u=L,58===t.charCodeAt(L)?(e=":",L++):(e=null,0===R&&i('":"')),null!==e){for(n=[],r=I();null!==r;)n.push(r),r=I();if(null!==n)if(r=x(),null!==r){for(o=[],a=I();null!==a;)o.push(a),a=I();if(null!==o){if(c=L,58===t.charCodeAt(L)?(a=":",L++):(a=null,0===R&&i('":"')),null!==a){for(s=[],l=I();null!==l;)s.push(l),l=I();null!==s?(l=w(),null!==l?a=[a,s,l]:(a=null,L=c)):(a=null,L=c)}else a=null,L=c;a=null!==a?a:"",null!==a?e=[e,n,r,o,a]:(e=null,L=u)}else e=null,L=u}else e=null,L=u;else e=null,L=u}else e=null,L=u;return e}function w(){var e;return 110===t.charCodeAt(L)?(e="n",L++):(e=null,0===R&&i('"n"')),null===e&&("ne"===t.substr(L,2)?(e="ne",L+=2):(e=null,0===R&&i('"ne"')),null===e&&(101===t.charCodeAt(L)?(e="e",L++):(e=null,0===R&&i('"e"')),null===e&&("se"===t.substr(L,2)?(e="se",L+=2):(e=null,0===R&&i('"se"')),null===e&&(115===t.charCodeAt(L)?(e="s",L++):(e=null,0===R&&i('"s"')),null===e&&("sw"===t.substr(L,2)?(e="sw",L+=2):(e=null,0===R&&i('"sw"')),null===e&&(119===t.charCodeAt(L)?(e="w",L++):(e=null,0===R&&i('"w"')),null===e&&("nw"===t.substr(L,2)?(e="nw",L+=2):(e=null,0===R&&i('"nw"')),null===e&&(99===t.charCodeAt(L)?(e="c",L++):(e=null,0===R&&i('"c"')),null===e&&(95===t.charCodeAt(L)?(e="_",L++):(e=null,0===R&&i('"_"'))))))))))),e}function x(){var e,n,r,o,a,s,l,u,c;if(R++,s=L,l=L,/^[a-zA-Z\u0200-\u0377_]/.test(t.charAt(L))?(e=t.charAt(L),L++):(e=null,0===R&&i("[a-zA-Z\\u0200-\\u0377_]")),null!==e){for(n=[],/^[a-zA-Z\u0200-\u0377_0-9]/.test(t.charAt(L))?(r=t.charAt(L),L++):(r=null,0===R&&i("[a-zA-Z\\u0200-\\u0377_0-9]"));null!==r;)n.push(r),/^[a-zA-Z\u0200-\u0377_0-9]/.test(t.charAt(L))?(r=t.charAt(L),L++):(r=null,0===R&&i("[a-zA-Z\\u0200-\\u0377_0-9]"));null!==n?e=[e,n]:(e=null,L=l)}else e=null,L=l;if(null!==e&&(e=function(e,t,n){return t+n.join("")}(s,e[0],e[1])),null===e&&(L=s),null===e){if(s=L,l=L,45===t.charCodeAt(L)?(e="-",L++):(e=null,0===R&&i('"-"')),e=null!==e?e:"",null!==e)if(46===t.charCodeAt(L)?(n=".",L++):(n=null,0===R&&i('"."')),null!==n){if(/^[0-9]/.test(t.charAt(L))?(o=t.charAt(L),L++):(o=null,0===R&&i("[0-9]")),null!==o)for(r=[];null!==o;)r.push(o),/^[0-9]/.test(t.charAt(L))?(o=t.charAt(L),L++):(o=null,0===R&&i("[0-9]"));else r=null;null!==r?e=[e,n,r]:(e=null,L=l)}else e=null,L=l;else e=null,L=l;if(null!==e&&(e=function(e,t,n,i){return t+n+i.join("")}(s,e[0],e[1],e[2])),null===e&&(L=s),null===e){if(s=L,l=L,45===t.charCodeAt(L)?(e="-",L++):(e=null,0===R&&i('"-"')),e=null!==e?e:"",null!==e){if(/^[0-9]/.test(t.charAt(L))?(r=t.charAt(L),L++):(r=null,0===R&&i("[0-9]")),null!==r)for(n=[];null!==r;)n.push(r),/^[0-9]/.test(t.charAt(L))?(r=t.charAt(L),L++):(r=null,0===R&&i("[0-9]"));else n=null;if(null!==n){if(u=L,46===t.charCodeAt(L)?(r=".",L++):(r=null,0===R&&i('"."')),null!==r){for(o=[],/^[0-9]/.test(t.charAt(L))?(a=t.charAt(L),L++):(a=null,0===R&&i("[0-9]"));null!==a;)o.push(a),/^[0-9]/.test(t.charAt(L))?(a=t.charAt(L),L++):(a=null,0===R&&i("[0-9]"));null!==o?r=[r,o]:(r=null,L=u)}else r=null,L=u;r=null!==r?r:"",null!==r?e=[e,n,r]:(e=null,L=l)}else e=null,L=l}else e=null,L=l;if(null!==e&&(e=function(e,t,n,i){return t+n.join("")+(i[0]||"")+(i[1]||[]).join("")}(s,e[0],e[1],e[2])),null===e&&(L=s),null===e){if(s=L,l=L,34===t.charCodeAt(L)?(e='"',L++):(e=null,0===R&&i('"\\""')),null!==e){if(u=L,'\\"'===t.substr(L,2)?(r='\\"',L+=2):(r=null,0===R&&i('"\\\\\\""')),null!==r&&(r=function(e){return'"'}(u)),null===r&&(L=u),null===r&&(u=L,c=L,92===t.charCodeAt(L)?(r="\\",L++):(r=null,0===R&&i('"\\\\"')),null!==r?(/^[^"]/.test(t.charAt(L))?(o=t.charAt(L),L++):(o=null,0===R&&i('[^"]')),null!==o?r=[r,o]:(r=null,L=c)):(r=null,L=c),null!==r&&(r=function(e,t){return"\\"+t}(u,r[1])),null===r&&(L=u),null===r&&(/^[^"]/.test(t.charAt(L))?(r=t.charAt(L),L++):(r=null,0===R&&i('[^"]')))),null!==r)for(n=[];null!==r;)n.push(r),u=L,'\\"'===t.substr(L,2)?(r='\\"',L+=2):(r=null,0===R&&i('"\\\\\\""')),null!==r&&(r=function(e){return'"'}(u)),null===r&&(L=u),null===r&&(u=L,c=L,92===t.charCodeAt(L)?(r="\\",L++):(r=null,0===R&&i('"\\\\"')),null!==r?(/^[^"]/.test(t.charAt(L))?(o=t.charAt(L),L++):(o=null,0===R&&i('[^"]')),null!==o?r=[r,o]:(r=null,L=c)):(r=null,L=c),null!==r&&(r=function(e,t){return"\\"+t}(u,r[1])),null===r&&(L=u),null===r&&(/^[^"]/.test(t.charAt(L))?(r=t.charAt(L),L++):(r=null,0===R&&i('[^"]'))));else n=null;null!==n?(34===t.charCodeAt(L)?(r='"',L++):(r=null,0===R&&i('"\\""')),null!==r?e=[e,n,r]:(e=null,L=l)):(e=null,L=l)}else e=null,L=l;null!==e&&(e=function(e,t){return t.join("")}(s,e[1])),null===e&&(L=s)}}}return R--,0===R&&null===e&&i("identifier"),e}function k(){var e,n;return n=L,"node"===t.substr(L,4).toLowerCase()?(e=t.substr(L,4),L+=4):(e=null,0===R&&i('"node"')),null!==e&&(e=function(e,t){return t.toLowerCase()}(n,e)),null===e&&(L=n),e}function C(){var e,n;return n=L,"edge"===t.substr(L,4).toLowerCase()?(e=t.substr(L,4),L+=4):(e=null,0===R&&i('"edge"')),null!==e&&(e=function(e,t){return t.toLowerCase()}(n,e)),null===e&&(L=n),e}function S(){var e,n;return n=L,"buildGraph"===t.substr(L,5).toLowerCase()?(e=t.substr(L,5),L+=5):(e=null,0===R&&i('"buildGraph"')),null!==e&&(e=function(e,t){return t.toLowerCase()}(n,e)),null===e&&(L=n),e}function _(){var e,n;return n=L,"digraph"===t.substr(L,7).toLowerCase()?(e=t.substr(L,7),L+=7):(e=null,0===R&&i('"digraph"')),null!==e&&(e=function(e,t){return t.toLowerCase()}(n,e)),null===e&&(L=n),e}function T(){var e,n;return n=L,"subgraph"===t.substr(L,8).toLowerCase()?(e=t.substr(L,8),L+=8):(e=null,0===R&&i('"subgraph"')),null!==e&&(e=function(e,t){return t.toLowerCase()}(n,e)),null===e&&(L=n),e}function $(){var e,n;return n=L,"strict"===t.substr(L,6).toLowerCase()?(e=t.substr(L,6),L+=6):(e=null,0===R&&i('"strict"')),null!==e&&(e=function(e,t){return t.toLowerCase()}(n,e)),null===e&&(L=n),e}function E(){var e,t;return e=S(),null===e&&(t=L,e=_(),null!==e&&(e=function(e,t){return O="digraph"===t,t}(t,e)),null===e&&(L=t)),e}function D(){var e,n;if(R++,/^[ \t\r\n]/.test(t.charAt(L))?(n=t.charAt(L),L++):(n=null,0===R&&i("[ \\t\\r\\n]")),null!==n)for(e=[];null!==n;)e.push(n),/^[ \t\r\n]/.test(t.charAt(L))?(n=t.charAt(L),L++):(n=null,0===R&&i("[ \\t\\r\\n]"));else e=null;return R--,0===R&&null===e&&i("whitespace"),e}function M(){var e,n,r,o,a,s,l;if(R++,a=L,"//"===t.substr(L,2)?(e="//",L+=2):(e=null,0===R&&i('"//"')),null!==e){for(n=[],/^[^\n]/.test(t.charAt(L))?(r=t.charAt(L),L++):(r=null,0===R&&i("[^\\n]"));null!==r;)n.push(r),/^[^\n]/.test(t.charAt(L))?(r=t.charAt(L),L++):(r=null,0===R&&i("[^\\n]"));null!==n?e=[e,n]:(e=null,L=a)}else e=null,L=a;if(null===e)if(a=L,"/*"===t.substr(L,2)?(e="/*",L+=2):(e=null,0===R&&i('"/*"')),null!==e){for(n=[],s=L,l=L,R++,"*/"===t.substr(L,2)?(r="*/",L+=2):(r=null,0===R&&i('"*/"')),R--,null===r?r="":(r=null,L=l),null!==r?(t.length>L?(o=t.charAt(L),L++):(o=null,0===R&&i("any character")),null!==o?r=[r,o]:(r=null,L=s)):(r=null,L=s);null!==r;)n.push(r),s=L,l=L,R++,"*/"===t.substr(L,2)?(r="*/",L+=2):(r=null,0===R&&i('"*/"')),R--,null===r?r="":(r=null,L=l),null!==r?(t.length>L?(o=t.charAt(L),L++):(o=null,0===R&&i("any character")),null!==o?r=[r,o]:(r=null,L=s)):(r=null,L=s);null!==n?("*/"===t.substr(L,2)?(r="*/",L+=2):(r=null,0===R&&i('"*/"')),null!==r?e=[e,n,r]:(e=null,L=a)):(e=null,L=a)}else e=null,L=a;return R--,0===R&&null===e&&i("comment"),e}function I(){var e;return e=D(),null===e&&(e=M()),e}function P(e){e.sort();for(var t=null,n=[],i=0;i<e.length;i++)e[i]!==t&&(n.push(e[i]),t=e[i]);return n}function A(){for(var e=1,n=1,i=!1,r=0;r<Math.max(L,F);r++){var o=t.charAt(r);"\n"===o?(i||e++,n=1,i=!1):"\r"===o||"\u2028"===o||"\u2029"===o?(e++,n=1,i=!0):(n++,i=!1)}return{line:e,column:n}}function j(e,t){var n={};for(var i in e)n[i]=e[i];for(var i in t)n[i]=t[i];return n}var N={start:r,stmtList:o,stmt:a,attrStmt:s,inlineAttrStmt:l,nodeStmt:u,edgeStmt:c,subgraphStmt:d,attrList:p,attrListBlock:h,aList:f,edgeRHS:g,idDef:m,nodeIdOrSubgraph:v,nodeId:y,port:b,compassPt:w,id:x,node:k,edge:C,graph:S,digraph:_,subgraph:T,strict:$,graphType:E,whitespace:D,comment:M,_:I};if(void 0!==n){if(void 0===N[n])throw new Error("Invalid rule name: "+e(n)+".")}else n="start";var O,L=0,R=0,F=0,q=[],H=N[n]();if(null===H||L!==t.length){var U=Math.max(L,F),B=U<t.length?t.charAt(U):null,z=A();throw new this.SyntaxError(P(q),B,U,z.line,z.column)}return H},toSource:function(){return this._source}};return t.SyntaxError=function(t,n,i,r,o){function a(t,n){var i,r;switch(t.length){case 0:i="end of input";break;case 1:i=t[0];break;default:i=t.slice(0,t.length-1).join(", ")+" or "+t[t.length-1]}return r=n?e(n):"end of input","Expected "+i+" but "+r+" found."}this.name="SyntaxError",this.expected=t,this.found=n,this.message=a(t,n),this.offset=i,this.line=r,this.column=o},t.SyntaxError.prototype=Error.prototype,t}()}(),function(){var e=function(e){function t(i){if(!(this instanceof arguments.callee))return new t(i);this.CLIENT_VERSION="1.1.3";var r=[],o={},a=!1;"string"==typeof i&&(i={url:i}),e.extend(o,m,i),this.request=function(n,i){var r=e.extend({},o,i);g(r.url,"No URL given");var a={};if(e.each(["username","password","timeout"],function(e,t){r[t]&&(a[t]=r[t])}),a.username&&a.password&&(window.btoa&&(a.beforeSend=function(e){var t=a.username+":"+a.password;e.setRequestHeader("Authorization","Basic "+window.btoa(t))}),a.xhrFields={withCredentials:!0}),"post"===l(n,r)?(e.extend(a,y),a.data=JSON.stringify(n),a.url=d(r.url)):(e.extend(a,v),a.dataType=r.jsonp?"jsonp":"json",a.url=r.url+"/"+c(n)),a.url=u(a.url,r),r.ajaxError&&(a.error=r.ajaxError),r.success){var p=s(r.success),h=s(r.error);return a.success=function(n){for(var i=e.isArray(n)?n:[n],r=0;r<i.length;r++){var o=i[r];t.isError(o)?h(o,r):p(o,r)}},e.ajax(a),null}if(r.jsonp)throw Error("JSONP is not supported for synchronous requests");a.async=!1;var m=e.ajax(a);return f(m)?e.parseJSON(m.responseText):null},this.register=function(){if(arguments.length<2)throw"At a least one request must be provided";var t,n=arguments[0],i=Array.prototype.slice.call(arguments,1);if("object"==typeof n){if(n.success&&n.error)t={success:n.success,error:n.error};else{if(!n.callback)throw"Either 'callback' or ('success' and 'error') callback must be provided when registering a Jolokia job";t={callback:n.callback}}t=e.extend(t,{config:n.config,onlyIfModified:n.onlyIfModified})}else{if("function"!=typeof n)throw"First argument must be either a callback func or an object with 'success' and 'error' attributes";t={success:null,error:null,callback:n}}if(!i)throw"No requests given";t.requests=i;var o=r.length;return r[o]=t,o},this.unregister=function(e){e<r.length&&(r[e]=void 0)},this.jobs=function(){for(var e=[],t=r.length,n=0;t>n;n++)r[n]&&e.push(n);return e},this.start=function(e){if(e=e||o.fetchInterval||3e4,a){if(e===o.fetchInterval)return;this.stop()}o.fetchInterval=e,this.timerId=setInterval(n(this,r),e),a=!0},this.stop=function(){(a||void 0==this.timerId)&&(clearInterval(this.timerId),this.timerId=null,a=!1)},this.isRunning=function(){return a}}function n(e,t){return function(){var n,s,l=[],u=[],c=t.length,d=[];for(n=0;c>n;n++){var p=t[n];if(p){var h=p.requests.length;if(p.success){var f=a(p,n),g=o(p,n);for(s=0;h>s;s++)d.push(i(p,s)),u.push(f),l.push(g)}else{var m=r(p,e);for(s=0;h-1>s;s++)d.push(i(p,s)),u.push(m.cb),l.push(m.cb);d.push(i(p,h-1)),u.push(m.lcb),l.push(m.lcb)}}}var v={success:function(t,n){return u[n].apply(e,[t,n])},error:function(t,n){return l[n].apply(e,[t,n])}};return e.request(d,v)}}function i(t,n){var i=t.requests[n],r=t.config||{},o=t.onlyIfModified&&t.lastModified?{ifModifiedSince:t.lastModified}:{};return i.config=e.extend({},r,i.config,o),i}function r(e,t){function n(e,t){304!=e.status&&((0==o||e.timestamp<o)&&(o=e.timestamp),i.push(e))}var i=[],r=e.callback,o=0;return{cb:n,lcb:function(a,s){n(a),i.length>0&&(e.lastModified=o,r.apply(t,i))}}}function o(e,t){var n=e.error;return function(e,i){304!=e.status&&n&&n(e,t,i)}}function a(e,t){var n=e.success;return function(i,r){n&&(e.onlyIfModified&&(e.lastModified=i.timestamp),n(i,t,r))}}function s(t){if(null==t)return function(e){console.warn("Ignoring response "+JSON.stringify(e))};if("ignore"===t)return function(){};var n=e.isArray(t)?t:[t];return function(e,t){n[t%n.length](e,t)}}function l(t,n){var i,r=n&&n.method?n.method.toLowerCase():null;if(r){if("get"===r){if(e.isArray(t))throw new Error("Cannot use GET with bulk requests");if("read"===t.type.toLowerCase()&&e.isArray(t.attribute))throw new Error("Cannot use GET for read with multiple attributes");if(t.target)throw new Error("Cannot use GET request with proxy mode");if(t.config)throw new Error("Cannot use GET with request specific config")}i=r}else i=e.isArray(t)||t.config||"read"===t.type.toLowerCase()&&e.isArray(t.attribute)||t.target?"post":"get";if(n.jsonp&&"post"===i)throw new Error("Can not use JSONP with POST requests");return i}function u(t,n){var i=t.indexOf("?")>0?"&":"?";return e.each(b,function(e,r){null!=n[r]&&(t+=i+r+"="+n[r],i="&")}),t}function c(n){var i=n.type;g(i,"No request type given for building a GET request"),i=i.toLowerCase();var r=w[i];g(r,"Unknown request type "+i);var o=r(n),a=o.parts||{},s=i;return e.each(a,function(e,n){s+="/"+t.escape(n)}),o.path&&(s+=("/"==o.path[0]?"":"/")+o.path),s}function d(e){return e.replace(/\/*$/,"/")}function p(t){if(null==t)return"[null]";if(e.isArray(t)){for(var n="",i=0;i<t.length;i++)n+=null==t?"[null]":h(t[i]),i<t.length-1&&(n+=",");return n}return h(t)}function h(e){return"string"==typeof e&&0==e.length?'""':e.toString()}function f(e){try{return!e.status&&"file:"===location.protocol||e.status>=200&&e.status<300||304===e.status||1223===e.status}catch(t){}return!1}function g(e,t){if(null==e)throw new Error(t)}var m={type:"POST",jsonp:!1},v={type:"GET"},y={type:"POST",processData:!1,dataType:"json",contentType:"text/json"},b=["maxDepth","maxCollectionSize","maxObjects","ignoreErrors","canonicalNaming","serializeException","includeStackTrace","ifModifiedSince"],w={read:function(e){return null==e.attribute?{parts:[e.mbean]}:{parts:[e.mbean,e.attribute],path:e.path}},write:function(e){return{parts:[e.mbean,e.attribute,p(e.value)],path:e.path}},exec:function(t){var n=[t.mbean,t.operation];return t.arguments&&t.arguments.length>0&&e.each(t.arguments,function(e,t){n.push(p(t))}),{parts:n}},version:function(){return{}},search:function(e){return{parts:[e.mbean]}},list:function(e){return{path:e.path}}};return t.prototype.escape=t.escape=function(e){return encodeURIComponent(e.replace(/!/g,"!!").replace(/\//g,"!/"))},t.prototype.isError=t.isError=function(e){return null==e.status||200!=e.status},t};!function(e,t){"function"==typeof define&&define.amd?define(["jquery"],t):e.Jolokia=t(e.jQuery)}(this,function(t){return e(t)})}(),function(e){function t(e){return e}function n(){}function r(e){return Math.floor(e/1e3)}function o(e){var t=e.indexOf("|"),n=e.substring(0,t),i=n.lastIndexOf(","),r=n.lastIndexOf(",",i-1),o=n.lastIndexOf(",",r-1);1e3*n.substring(o+1,r),1e3*n.substring(i+1);return e.substring(t+1).split(",").slice(1).map(function(e){return+e})}function a(e){if(!(e instanceof n))throw new Error("invalid context");this.context=e}function s(e,t){return function(n,i,r,o){e(new Date(+n+t),new Date(+i+t),r,o)}}function l(e,t){a.call(this,e),t=+t;var n=t+"";this.valueOf=function(){return t},this.toString=function(){return n}}function u(e,t){function n(t,n){if(n instanceof a){if(t.context!==n.context)throw new Error("mismatch context")}else n=new l(t.context,n);a.call(this,t.context),this.left=t,this.right=n,this.toString=function(){return t+" "+e+" "+n}}var i=n.prototype=Object.create(a.prototype);return i.valueAt=function(e){return t(this.left.valueAt(e),this.right.valueAt(e))},i.shift=function(e){return new n(this.left.shift(e),this.right.shift(e))},i.on=function(e,t){return arguments.length<2?this.left.on(e):(this.left.on(e,t),this.right.on(e,t),this)},function(e){return new n(this,e)}}function c(e){return 16777214&e}function d(e){return(e+1&16777214)-1}function p(e){e.style("position","absolute").style("top",0).style("bottom",0).style("width","1px").style("pointer-events","none")}function h(e){return e+"px"}var f=e.cubism={version:"1.6.0"},g=0;f.option=function(e,t){var n=f.options(e);return n.length?n[0]:t},f.options=function(e,t){for(var n,i=location.search.substring(1).split("&"),r=[],o=-1,a=i.length;++o<a;)(n=i[o].split("="))[0]==e&&r.push(decodeURIComponent(n[1]));return r.length||arguments.length<2?r:t},f.context=function(){function e(){var e=Date.now();return i=new Date(Math.floor((e-d-p)/u)*u),t=new Date(i-c*u),o=new Date(Math.floor((e-d)/u)*u),r=new Date(o-c*u),f.domain([t,i]),l}var t,i,r,o,a,s,l=new n,u=1e4,c=1440,d=5e3,p=5e3,h=d3.dispatch("prepare","beforechange","change","focus"),f=l.scale=d3.time.scale().range([0,c]);return l.start=function(){a&&clearTimeout(a);
|
|
3262
|
|
-var e=+o+d-Date.now();return p>e&&(e+=u),a=setTimeout(function n(){o=new Date(Math.floor((Date.now()-d)/u)*u),r=new Date(o-c*u),h.prepare.call(l,r,o),setTimeout(function(){f.domain([t=r,i=o]),h.beforechange.call(l,r,o),h.change.call(l,r,o),h.focus.call(l,s)},p),a=setTimeout(n,u)},e),l},l.stop=function(){return a=clearTimeout(a),l},a=setTimeout(l.start,10),l.step=function(t){return arguments.length?(u=+t,e()):u},l.size=function(t){return arguments.length?(f.range([0,c=+t]),e()):c},l.serverDelay=function(t){return arguments.length?(d=+t,e()):d},l.clientDelay=function(t){return arguments.length?(p=+t,e()):p},l.focus=function(e){return h.focus.call(l,s=e),l},l.on=function(e,n){return arguments.length<2?h.on(e):(h.on(e,n),null!=n&&(/^prepare(\.|$)/.test(e)&&n.call(l,r,o),/^beforechange(\.|$)/.test(e)&&n.call(l,t,i),/^change(\.|$)/.test(e)&&n.call(l,t,i),/^focus(\.|$)/.test(e)&&n.call(l,s)),l)},d3.select(window).on("keydown.context-"+ ++g,function(){switch(!d3.event.metaKey&&d3.event.keyCode){case 37:null==s&&(s=c-1),s>0&&l.focus(--s);break;case 39:null==s&&(s=c-2),c-1>s&&l.focus(++s);break;default:return}d3.event.preventDefault()}),e()};var m=f.context.prototype=n.prototype;m.constant=function(e){return new l(this,+e)},m.cube=function(e){arguments.length||(e="");var t={},n=this;return t.metric=function(t){return n.metric(function(n,i,r,o){d3.json(e+"/1.0/metric?expression="+encodeURIComponent(t)+"&start="+v(n)+"&stop="+v(i)+"&step="+r,function(e){return e?void o(null,e.map(function(e){return e.value})):o(new Error("unable to load data"))})},t+="")},t.toString=function(){return e},t};var v=d3.time.format.iso;m.librato=function(e,t){function n(e){var t=avail_rsts[0],n=avail_rsts[avail_rsts.length];if(e>=n)return n;if(t>=e)return t;var i,r,o;for(o=e;n>=o;o++)if(i=avail_rsts.indexOf(o),i>-1){r=avail_rsts[i];break}var a;for(o=e;o>=t;o--)if(i=avail_rsts.indexOf(o),i>-1){a=avail_rsts[i];break}return e-a>r-e?r:a}function r(e,t,i){var r,o=t-e,a=2419200,s=604800,l=172800;return o>a?3600:(r=n(i),o>s&&900>r?900:o>l&&60>r?60:r)}var o={},a=this;auth_string="Basic "+btoa(e+":"+t),avail_rsts=[1,60,900,3600];var s=function(e){function t(t,n,i){var a="compose="+e+"&start_time="+t+"&end_time="+n+"&resolution="+r(t,n,i);return o+"?"+a}function n(e,t,n,r){var o=[];for(i=e;i<=t;i+=n){for(var a=[];r.length&&r[0].measure_time<=i;)a.push(r.shift().value);var s;s=a.length?a.reduce(function(e,t){return e+t})/a.length:o.length?o[o.length-1]:0,o.push(s)}return o}var o="https://metrics-api.librato.com/v1/metrics";return request={},request.fire=function(e,i,r,o){function a(l){d3.json(l).header("X-Requested-With","XMLHttpRequest").header("Authorization",auth_string).header("Librato-User-Agent","cubism/"+f.version).get(function(l,u){if(!l){if(0===u.measurements.length)return;u.measurements[0].series.forEach(function(e){s.push(e)});var c="query"in u&&"next_time"in u.query;if(c)a(t(u.query.next_time,i,r));else{var d=n(e,i,r,s);o(d)}}})}var s=[];a(t(e,i,r))},request};return o.metric=function(e){return a.metric(function(t,n,i,r){s(e).fire(y(t),y(n),y(i),function(e){r(null,e)})},e+="")},o.toString=function(){return"librato"},o};var y=function(e){return Math.floor(e/1e3)};m.graphite=function(e){arguments.length||(e="");var t={},n=this;return t.metric=function(t){var i="sum",a=n.metric(function(n,a,s,l){var u=t;1e4!==s&&(u="summarize("+u+",'"+(s%36e5?s%6e4?s/1e3+"sec":s/6e4+"min":s/36e5+"hour")+"','"+i+"')"),d3.text(e+"/render?format=raw&target="+encodeURIComponent("alias("+u+",'')")+"&from="+r(n-2*s)+"&until="+r(a-1e3),function(e){return e?void l(null,o(e)):l(new Error("unable to load data"))})},t+="");return a.summarize=function(e){return i=e,a},a},t.find=function(t,n){d3.json(e+"/metrics/find?format=completer&query="+encodeURIComponent(t),function(e){return e?void n(null,e.metrics.map(function(e){return e.path})):n(new Error("unable to find metrics"))})},t.toString=function(){return e},t},m.gangliaWeb=function(e){var t="",n="/ganglia2/";arguments.length&&(e.host&&(t=e.host),e.uriPathPrefix&&(n=e.uriPathPrefix,"/"!=n[0]&&(n="/"+n),"/"!=n[n.length-1]&&(n+="/")));var i={},r=this;return i.metric=function(e){var i=e.clusterName,o=e.metricName,a=e.hostName,s=e.isReport||!1,l=e.titleGenerator||function(e){return"clusterName:"+i+" metricName:"+o+(a?" hostName:"+a:"")},u=e.onChangeCallback,c=s?"g":"m",d=r.metric(function(e,r,s,l){function u(){return"c="+i+"&"+c+"="+o+(a?"&h="+a:"")+"&cs="+e/1e3+"&ce="+r/1e3+"&step="+s/1e3+"&graphlot=1"}d3.json(t+n+"graph.php?"+u(),function(e){return e?void l(null,e[0].data):l(new Error("Unable to fetch GangliaWeb data"))})},l(e));return d.toString=function(){return l(e)},u&&d.on("change",u),d},i.toString=function(){return t+n},i};var b=a.prototype;f.metric=a,b.valueAt=function(){return NaN},b.alias=function(e){return this.toString=function(){return e},this},b.extent=function(){for(var e,t=0,n=this.context.size(),i=1/0,r=-(1/0);++t<n;)e=this.valueAt(t),i>e&&(i=e),e>r&&(r=e);return[i,r]},b.on=function(e,t){return arguments.length<2?null:this},b.shift=function(){return this},b.on=function(){return arguments.length<2?null:this},m.metric=function(e,t){function n(t,n){var i=Math.min(h,Math.round((t-d)/p));if(i&&!o){o=!0,i=Math.min(h,i+w);var r=new Date(n-i*p);e(r,n,p,function(e,t){if(o=!1,e)return console.warn(e);for(var i=isFinite(d)?Math.round((r-d)/p):0,a=0,s=t.length;s>a;++a)f[a+i]=t[a];m.change.call(u,d,n)})}}function i(e,t){isFinite(d)||(d=e),f.splice(0,Math.max(0,Math.min(h,Math.round((e-d)/p)))),d=e,r=t}var r,o,l=this,u=new a(l),c=".metric-"+ ++g,d=-(1/0),p=l.step(),h=l.size(),f=[],m=d3.dispatch("change"),v=0;return u.valueAt=function(e){return f[e]},u.shift=function(t){return l.metric(s(e,+t))},u.on=function(e,t){return arguments.length?(null==t?null!=m.on(e)&&0==--v&&l.on("prepare"+c,null).on("beforechange"+c,null):null==m.on(e)&&1==++v&&l.on("prepare"+c,n).on("beforechange"+c,i),m.on(e,t),null!=t&&/^change(\.|$)/.test(e)&&t.call(l,d,r),u):m.on(e)},arguments.length>1&&(u.toString=function(){return t}),u};var w=6,x=l.prototype=Object.create(a.prototype);x.valueAt=function(){return+this},x.extent=function(){return[+this,+this]},b.add=u("+",function(e,t){return e+t}),b.subtract=u("-",function(e,t){return e-t}),b.multiply=u("*",function(e,t){return e*t}),b.divide=u("/",function(e,t){return e/t}),m.horizon=function(){function e(e){e.on("mousemove.horizon",function(){n.focus(Math.round(d3.mouse(this)[0]))}).on("mouseout.horizon",function(){n.focus(null)}),e.append("canvas").attr("width",o).attr("height",a),e.append("span").attr("class","title").text(c),e.append("span").attr("class","value"),e.each(function(e,c){function h(e,t){T.save();var l=x.extent();v=l.every(isFinite),null!=C&&(l=C);var u=0,c=Math.max(-l[0],l[1]);if(this===n){if(c==m){u=o-w;var d=(e-S)/_;if(o>d){var p=r.getContext("2d");p.clearRect(0,0,o,a),p.drawImage(T.canvas,d,0,o-d,a,0,0,o-d,a),T.clearRect(0,0,o,a),T.drawImage(p.canvas,0,0)}}S=e}s.domain([0,m=c]),T.clearRect(u,0,o-u,a);for(var h,f=0;E>f;++f){T.fillStyle=k[E+f];var g=(f-E+1)*a;s.range([E*a+g,g]),g=s(0);for(var y,b=u,$=o;$>b;++b)y=x.valueAt(b),0>=y?h=!0:void 0!==y&&T.fillRect(b,y=s(y),1,g-y)}if(h){"offset"===i&&(T.translate(0,a),T.scale(1,-1));for(var f=0;E>f;++f){T.fillStyle=k[E-1-f];var g=(f-E+1)*a;s.range([E*a+g,g]),g=s(0);for(var y,b=u,$=o;$>b;++b)y=x.valueAt(b),y>=0||T.fillRect(b,s(-y),1,g-s(-y))}}T.restore()}function f(e){null==e&&(e=o-1);var t=x.valueAt(e);$.datum(t).text(isNaN(t)?null:d)}var m,v,y=this,b=++g,x="function"==typeof l?l.call(y,e,c):l,k="function"==typeof p?p.call(y,e,c):p,C="function"==typeof u?u.call(y,e,c):u,S=-(1/0),_=n.step(),T=d3.select(y).select("canvas"),$=d3.select(y).select(".value"),E=k.length>>1;T.datum({id:b,metric:x}),T=T.node().getContext("2d"),n.on("change.horizon-"+b,h),n.on("focus.horizon-"+b,f),x.on("change.horizon-"+b,function(e,n){h(e,n),f(),v&&x.on("change.horizon-"+b,t)})})}var n=this,i="offset",r=document.createElement("canvas"),o=r.width=n.size(),a=r.height=30,s=d3.scale.linear().interpolate(d3.interpolateRound),l=t,u=null,c=t,d=d3.format(".2s"),p=["#08519c","#3182bd","#6baed6","#bdd7e7","#bae4b3","#74c476","#31a354","#006d2c"];return e.remove=function(e){function t(e){e.metric.on("change.horizon-"+e.id,null),n.on("change.horizon-"+e.id,null),n.on("focus.horizon-"+e.id,null)}e.on("mousemove.horizon",null).on("mouseout.horizon",null),e.selectAll("canvas").each(t).remove(),e.selectAll(".title,.value").remove()},e.mode=function(t){return arguments.length?(i=t+"",e):i},e.height=function(t){return arguments.length?(r.height=a=+t,e):a},e.metric=function(t){return arguments.length?(l=t,e):l},e.scale=function(t){return arguments.length?(s=t,e):s},e.extent=function(t){return arguments.length?(u=t,e):u},e.title=function(t){return arguments.length?(c=t,e):c},e.format=function(t){return arguments.length?(d=t,e):d},e.colors=function(t){return arguments.length?(p=t,e):p},e},m.comparison=function(){function e(e){e.on("mousemove.comparison",function(){n.focus(Math.round(d3.mouse(this)[0]))}).on("mouseout.comparison",function(){n.focus(null)}),e.append("canvas").attr("width",i).attr("height",r),e.append("span").attr("class","title").text(u),e.append("span").attr("class","value primary"),e.append("span").attr("class","value change"),e.each(function(e,u){function v(e,t){$.save(),$.clearRect(0,0,i,r);var a=C.extent(),s=S.extent(),l=null==_?a:_;o.domain(l).range([r,0]),w=a.concat(s).every(isFinite);var u=e/n.step()&1?d:c;$.fillStyle=f[2];for(var p=0,h=i;h>p;++p){var g=o(C.valueAt(p)),v=o(S.valueAt(p));v>g&&$.fillRect(u(p),g,1,v-g)}for($.fillStyle=f[0],p=0;h>p;++p){var g=o(C.valueAt(p)),v=o(S.valueAt(p));g>v&&$.fillRect(u(p),v,1,g-v)}for($.fillStyle=f[3],p=0;h>p;++p){var g=o(C.valueAt(p)),v=o(S.valueAt(p));v>=g&&$.fillRect(u(p),g,1,m)}for($.fillStyle=f[1],p=0;h>p;++p){var g=o(C.valueAt(p)),v=o(S.valueAt(p));g>v&&$.fillRect(u(p),g-m,1,m)}$.restore()}function y(e){null==e&&(e=i-1);var t=C.valueAt(e),n=S.valueAt(e),r=(t-n)/n;E.datum(t).text(isNaN(t)?null:p),D.datum(r).text(isNaN(r)?null:h).attr("class","value change "+(r>0?"positive":0>r?"negative":""))}function b(e,n){v(e,n),y(),w&&(C.on("change.comparison-"+k,t),S.on("change.comparison-"+k,t))}var w,x=this,k=++g,C="function"==typeof a?a.call(x,e,u):a,S="function"==typeof s?s.call(x,e,u):s,_="function"==typeof l?l.call(x,e,u):l,T=d3.select(x),$=T.select("canvas"),E=T.select(".value.primary"),D=T.select(".value.change");$.datum({id:k,primary:C,secondary:S}),$=$.node().getContext("2d"),C.on("change.comparison-"+k,b),S.on("change.comparison-"+k,b),n.on("change.comparison-"+k,v),n.on("focus.comparison-"+k,y)})}var n=this,i=n.size(),r=120,o=d3.scale.linear().interpolate(d3.interpolateRound),a=function(e){return e[0]},s=function(e){return e[1]},l=null,u=t,p=k,h=C,f=["#9ecae1","#225b84","#a1d99b","#22723a"],m=1.5;return e.remove=function(e){function t(e){e.primary.on("change.comparison-"+e.id,null),e.secondary.on("change.comparison-"+e.id,null),n.on("change.comparison-"+e.id,null),n.on("focus.comparison-"+e.id,null)}e.on("mousemove.comparison",null).on("mouseout.comparison",null),e.selectAll("canvas").each(t).remove(),e.selectAll(".title,.value").remove()},e.height=function(t){return arguments.length?(r=+t,e):r},e.primary=function(t){return arguments.length?(a=t,e):a},e.secondary=function(t){return arguments.length?(s=t,e):s},e.scale=function(t){return arguments.length?(o=t,e):o},e.extent=function(t){return arguments.length?(l=t,e):l},e.title=function(t){return arguments.length?(u=t,e):u},e.formatPrimary=function(t){return arguments.length?(p=t,e):p},e.formatChange=function(t){return arguments.length?(h=t,e):h},e.colors=function(t){return arguments.length?(f=t,e):f},e.strokeWidth=function(t){return arguments.length?(m=t,e):m},e};var k=d3.format(".2s"),C=d3.format("+.0%");m.axis=function(){function e(r){var a,s=++g,l=r.append("svg").datum({id:s}).attr("width",t.size()).attr("height",Math.max(28,-e.tickSize())).append("g").attr("transform","translate(0,"+("top"===i.orient()?27:4)+")").call(i);t.on("change.axis-"+s,function(){l.call(i),a||(a=d3.select(l.node().appendChild(l.selectAll("text").node().cloneNode(!0))).style("display","none").text(null))}),t.on("focus.axis-"+s,function(e){if(a)if(null==e)a.style("display","none"),l.selectAll("text").style("fill-opacity",null);else{a.style("display",null).attr("x",e).text(o(n.invert(e)));var t=a.node().getComputedTextLength()+6;l.selectAll("text").style("fill-opacity",function(i){return Math.abs(n(i)-e)<t?0:1})}})}var t=this,n=t.scale,i=d3.svg.axis().scale(n),r=t.step()<6e4?S:t.step()<864e5?_:T,o=r;return e.remove=function(e){function n(e){t.on("change.axis-"+e.id,null),t.on("focus.axis-"+e.id,null)}e.selectAll("svg").each(n).remove()},e.focusFormat=function(t){return arguments.length?(o=null==t?r:t,e):o==r?null:t},d3.rebind(e,i,"orient","ticks","tickSubdivide","tickSize","tickPadding","tickFormat")};var S=d3.time.format("%I:%M:%S %p"),_=d3.time.format("%I:%M %p"),T=d3.time.format("%B %d");m.rule=function(){function e(e){var t=++g,r=e.append("div").datum({id:t}).attr("class","line").call(p);e.each(function(t,r){function o(t,i){for(var r=[],o=0,a=n.size();a>o;++o)l.valueAt(o)&&r.push(o);var s=e.selectAll(".metric").data(r);s.exit().remove(),s.enter().append("div").attr("class","metric line").call(p),s.style("left",h)}var a=this,s=++g,l="function"==typeof i?i.call(a,t,r):i;l&&(n.on("change.rule-"+s,o),l.on("change.rule-"+s,o))}),n.on("focus.rule-"+t,function(e){r.datum(e).style("display",null==e?"none":null).style("left",null==e?null:h)})}var n=this,i=t;return e.remove=function(e){function t(e){n.on("focus.rule-"+e.id,null)}e.selectAll(".line").each(t).remove()},e.metric=function(t){return arguments.length?(i=t,e):i},e}}(this),function(){var e=function(e,t){function n(t,n,i,r){3===arguments.length&&e.isPlainObject(i)?(r=i,i=null):2==arguments.length&&e.isPlainObject(n)&&(r=n,n=null,i=null);var o={type:"read",mbean:t,attribute:n};return l(o,i),u(this.request(o,c(r)),r)}function i(t,n,i,r,o){4===arguments.length&&e.isPlainObject(r)&&(o=r,r=null);var a={type:"write",mbean:t,attribute:n,value:i};return l(a,r),u(this.request(a,c(o)),o)}function r(t,n){var i,r={type:"exec",mbean:t,operation:n},o=arguments.length;if(arguments.length>2&&e.isPlainObject(arguments[arguments.length-1])&&(i=arguments[arguments.length-1],o=arguments.length-1),o>2){for(var a=[],s=2;o>s;s++)a[s-2]=arguments[s];r.arguments=a}return u(this.request(r,c(i)),i)}function o(e,t){var n={type:"search",mbean:e};return u(this.request(n,c(t)),t)}function a(e){return u(this.request({type:"version"},c(e)),e)}function s(t,n){1==arguments.length&&!e.isArray(t)&&e.isPlainObject(t)&&(n=t,t=null);var i={type:"list"};return l(i,t),u(this.request(i,c(n)),n)}function l(n,i){null!=i&&(e.isArray(i)?n.path=e.map(i,t.escape).join("/"):n.path=i)}function u(e,t){if(null==e)return null;if(200==e.status)return e.value;if(t&&t.error)return t.error(e);throw new Error("Jolokia-Error: "+JSON.stringify(e))}function c(t){if(t&&t.success){var n=e.extend({},t);return n.success=function(e){t.success(e.value)},n}return t}return e.extend(t.prototype,{getAttribute:n,setAttribute:i,execute:r,search:o,version:a,list:s}),t};!function(t,n){"function"==typeof define&&define.amd?define(["jquery","jolokia"],n):t.Jolokia?e(jQuery,t.Jolokia):console.error("No Jolokia definition found. Please include jolokia.js before jolokia-simple.js")}(this,function(t,n){return e(t,n)})}(),function(){var e=function(e,t){var n="1.1.3",i=function(e,n){function i(e,n){if(e instanceof t)return e;var i;if("string"==typeof e){if(i={url:e},n)for(var r in n)n.hasOwnProperty(r)&&(i[r]=n[r])}else i=e;return new t(i)}function r(e,t,n){return function(i,r,o,a){i=+i,r=+r;var s=[],l=r,u=e.length,c=0,d=u>0?e[u-1].time:void 0;if(!u||d>r){for(var p=i;r>=p;p+=o)s.push(NaN);return a(null,s)}for(;l>e[0].time+o;)s.unshift(NaN),l-=o;for(;l>=i&&l>=d;){for(;e[c].time>l;)c++;s.unshift(e[c].value),l-=o}for(;l>=i;)s.unshift(NaN),l-=o;if(u>n)if(t){for(var h=e[n].time-t,f=n;u>f&&e[f].time>h;)f++;e.length=f}else e.length=n;a(null,s)}}var o={},a=this,s=i(e,n),l=5e3;try{a.on("start",function(){s.start()}),a.on("stop",function(){s.stop()})}catch(u){}return o.metric=function(){var e,t=[],n=arguments.length,i={},o=arguments.length-1,l=arguments[o];"string"==typeof l&&(e=l,n=o),"object"!=typeof l||l.type||(i=l,e=i.name,n=o),e||"function"==typeof arguments[0]||(e=arguments[0].mbean);var u=a.metric(r(t,i.keepDelay,a.width),e);if(i.delta){var c=u.shift(-i.delta);u=u.subtract(c),e&&(u.toString=function(){return e})}if("function"==typeof arguments[0]){for(var d=arguments[0],p=function(e){for(var n=!1,i=0;i<arguments.length;i++)if(s.isError(arguments[i])){n=!0;break}t.unshift({time:Date.now(),value:n?NaN:d.apply(u,arguments)})},h=[p],f=1;n>f;f++)h.push(arguments[f]);s.register.apply(s,h)}else{var g=arguments[0];s.register(function(e){t.unshift({time:Date.now(),value:s.isError(e)?NaN:Number(e.value)})},g)}return u},o.start=function(e){e=e||l,s.start(e)},o.stop=function(){s.stop()},o.isRunning=function(){return s.isRunning()},o};return i.VERSION=n,e.context.prototype.jolokia=i,i};!function(t){"function"==typeof define&&define.amd?define(["cubism","jolokia"],function(t,n){return e(t,n)}):t.Jolokia&&t.cubism?e(t.cubism,t.Jolokia):console.error("No "+(t.cubism?"Cubism":"Jolokia")+" definition found. Please include jolokia.js and cubism.js before jolokia-cubism.js")}(this)}();var __extends=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n},Core;!function(e){var t=function(){function t(t){this.title=t,this.id=null,this.typeName=null,this.items=[],this.folderNames=[],this.domain=null,this.objectName=null,this.map={},this.entries={},this.addClass=null,this.parent=null,this.isLazy=!1,this.icon=null,this.tooltip=null,this.entity=null,this.version=null,this.mbean=null,this.addClass=e.escapeTreeCssStyles(t)}return Object.defineProperty(t.prototype,"key",{get:function(){return this.id},set:function(e){this.id=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this.items},set:function(e){this.items=e},enumerable:!0,configurable:!0}),t.prototype.get=function(e){return this.map[e]},t.prototype.isFolder=function(){return this.children.length>0},t.prototype.navigate=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this;return e.forEach(function(e){n&&(n=n.get(e))}),n},t.prototype.hasEntry=function(e,t){var n=this.entries;if(n){var i=n[e];return i&&t===i}return!1},t.prototype.parentHasEntry=function(e,t){return this.parent?this.parent.hasEntry(e,t):!1},t.prototype.ancestorHasEntry=function(e,t){for(var n=this.parent;n;){if(n.hasEntry(e,t))return!0;n=n.parent}return!1},t.prototype.ancestorHasType=function(e){for(var t=this.parent;t;){if(e===t.typeName)return!0;t=t.parent}return!1},t.prototype.getOrElse=function(e,n){void 0===n&&(n=new t(e));var i=this.map[e];return i||(i=n,this.map[e]=i,this.children.push(i),i.parent=this),i},t.prototype.sortChildren=function(e){var t=this.children;t&&(this.children=t.sortBy("title"),e&&angular.forEach(t,function(t){return t.sortChildren(e)}))},t.prototype.moveChild=function(e){e&&e.parent!==this&&(e.detach(),e.parent=this,this.children.push(e))},t.prototype.insertBefore=function(e,t){e.detach(),e.parent=this;var n=_.indexOf(this.children,t);n>=0&&this.children.splice(n,0,e)},t.prototype.insertAfter=function(e,t){e.detach(),e.parent=this;var n=_.indexOf(this.children,t);n>=0&&this.children.splice(n+1,0,e)},t.prototype.detach=function(){var e=this,t=this.parent;if(t){var n=t.children;if(n){var i=n.indexOf(this);0>i?t.children=t.children.remove(function(t){return t.key===e.key}):n.splice(i,1)}this.parent=null}},t.prototype.findDescendant=function(e){if(e(this))return this;var t=null;return angular.forEach(this.children,function(n){t||(t=n.findDescendant(e))}),t},t.prototype.findAncestor=function(e){return e(this)?this:null!=this.parent?this.parent.findAncestor(e):null},t}();e.Folder=t}(Core||(Core={}));var Folder=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t}(Core.Folder),Core;!function(e){function t(e,t,n){if(e){var i=e.mbeanTypesToDomain||{},r=i[n]||{},o=r[t];return angular.isArray(o)&&o.length?o[0]:o}return null}function n(t,n,i){var r=e.getMBeanTypeFolder(t,n,i);return e.pathGet(r,["objectName"])}function i(t,n,i,r,o,a,s,l){void 0===r&&(r=null),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=null);var u={xhr:null},c=e.lazyLoaders,d=new e.Workspace(t,u,c,n,o,a,i,r,s,l);return e.log.info("Loading the profile using jolokia: "+t),d.loadTree(),d}e.getMBeanTypeFolder=t,e.getMBeanTypeObjectName=n,e.createRemoteWorkspace=i}(Core||(Core={}));var Jmx;!function(e){function t(e,t,n,i){var r=new URI(e);return r.segment(t).segment(n).segment(i),r.toString()}function n(e,t,n,i){void 0===i&&(i="jmx");var r=e.id(i+"-attributes").title(function(){return'<i class="fa fa-list"></i> Attributes'}).tooltip(function(){return"List the attributes on the MBean"}).href(function(){return"/jmx/attributes"+t.hash()}).build(),o=e.id(i+"-operations").title(function(){return'<i class="fa fa-leaf"></i> Operations'}).tooltip(function(){return"List the operations on the MBean"}).href(function(){return"/jmx/operations"+t.hash()}).build(),a=e.id(i+"-chart").title(function(){return'<i class="fa fa-bar-chart"></i> Charts'}).tooltip(function(){return"Real time chart of the attributes from the MBean"}).href(function(){return"/jmx/charts"+t.hash()}).build(),s=e.id(i+"-edit-chart").title(function(){return'<i class="fa fa-cog"></i> Edit Chart'}).tooltip(function(){return"Edit the chart to choose which attributes to show from the MBean"}).href(function(){return"/jmx/chartEdit"+t.hash()}).build(),l=e.id(i+"-add-dashboard").title(function(){return'<i class="fa fa-share"></i>'}).tooltip(function(){return"Add current view to dashboard"}).attributes({"class":"pull-right"}).show(function(){if(!HawtioCore.injector)return!0;var e=HawtioCore.injector.get("HawtioDashboard");return e&&e.hasDashboard}).click(function(){if(HawtioCore.injector){var e=HawtioCore.injector.get("HawtioDashboard");if(e){var n=2,i=2,r=t.getSelectedMBeanName(),o=t.$location;o.path().has("/jmx/charts")&&(n=4,i=3);var a=e.getAddLink(r,n,i);t.$location.url(a.toString()),Core.$apply(t.$rootScope)}return!1}}).href(function(){return""}).build();return s.show=function(){return t.isLinkActive("jmx/chart")},[r,o,a,s,l]}function i(e,t){var n=e.jmxTreeLazyLoadRegistry[t.domain],i=null;return n&&n.length&&angular.forEach(n,function(e){i||(i=e(t))}),i}function r(e,t){Core.lazyLoaders||(Core.lazyLoaders={});var n=Core.lazyLoaders[e];n||(n=[],Core.lazyLoaders[e]=n),n.push(t)}function o(e,t){if(Core.lazyLoaders){var n=Core.lazyLoaders[e];n&&n.remove(t)}}function a(e,t,n){var i=p[t];i||(i=[],p[t]=i),i.push(n)}function s(t,n){n||(n=UrlHelpers.join(e.templatePath,"attributeToolBar.html"));var i=null,r=t?t.domain:null;if(r){var o=p[r];if(o)for(var a=0;a<o.length;a++){var s=o[a];if(s&&(i=s(t)))break}}return i?i:n}function l(e,t,n){void 0===n&&(n=!1),u(e,t,null,n)}function u(e,t,n,i){void 0===i&&(i=!1);var r=t.dynatree("getTree");if(r){var o=null,a=e.search().nid;if(a)try{o=r.activateKey(a)}catch(s){}if(o)o.expand(!0);else if(!t.dynatree("getActiveNode")){var l=t.dynatree("getRoot"),u=l?l.getChildren():null;if(u&&u.length){var c=u[0];if(c.expand(!0),n){var d=n(c);d&&(c=d)}i&&(c.expand(),c.activate())}}}}function c(e){var t={};angular.forEach(e,function(e){var n=e.typeName;n&&(t[n]=e)});var n=Object.keys(t);return n}function d(t,n,i,r,o,a,s){void 0===a&&(a=!1),void 0===s&&(s=null),r.length&&(s||(s=function(e){var n=e.data;i.updateSelectionNode(n),Core.$apply(t)}),i.treeElement=r,r.dynatree({onActivate:s,onLazyRead:function(t){var n=t.data,r=null;if(n&&(r=e.findLazyLoadingFunction(i,n)),r){console.log("Lazy loading folder "+n.title);var o=n.childen;r(i,n,function(){t.setLazyNodeStatus(DTNodeStatus_Ok);var e=n.children;e!==o&&(t.removeChildren(),angular.forEach(e,function(e){t.addChild(e)}))})}else t.setLazyNodeStatus(DTNodeStatus_Ok)},onClick:function(e,t){if(t.metaKey){t.preventDefault();var i=n.absUrl();if(e&&e.data){var r=e.data.key;if(r){var o=n.search();o.nid=r;var a=i.indexOf("?");0>=a?i+="?":i=i.substring(0,a+1),i+=$.param(o)}}return window.open(i,"_blank"),window.focus(),!1}return!0},persist:!1,debugLevel:0,children:o}),a&&i.redrawTree())}e.pluginName="hawtio-jmx",e.log=Logger.get(e.pluginName),e.currentProcessId="",e.templatePath="plugins/jmx/html",e.getUrlForThing=t,e.getNavItems=n;var p={};e.findLazyLoadingFunction=i,e.registerLazyLoadHandler=r,e.unregisterLazyLoadHandler=o,e.addAttributeToolBar=a,e.getAttributeToolBar=s,e.updateTreeSelectionFromURL=l,e.updateTreeSelectionFromURLAndAutoSelect=u,e.getUniqueTypeNames=c,e.enableTree=d}(Jmx||(Jmx={}));var __extends=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n},Core;!function(e){var t=Logger.get("workspace"),n=function(){function n(n,i,r,o,a,s,l,u,c,d){this.jolokia=n,this.jolokiaStatus=i,this.jmxTreeLazyLoadRegistry=r,this.$location=o,this.$compile=a,this.$templateCache=s,this.localStorage=l,this.$rootScope=u,this.userDetails=c,this.HawtioNav=d,this.operationCounter=0,this.tree=new e.Folder("MBeans"),this.mbeanTypesToDomain={},this.mbeanServicesToDomain={},this.attributeColumnDefs={},this.treePostProcessors={},this.topLevelTabs=void 0,this.subLevelTabs=[],this.keyToNodeMap={},this.pluginRegisterHandle=null,this.pluginUpdateCounter=null,this.treeWatchRegisterHandle=null,this.treeWatcherCounter=null,this.treeElement=null,this.treeFetched=!1,this.mapData={},"autoRefresh"in l||(l.autoRefresh=!0),"updateRate"in l||(l.updateRate=5e3);var p=this;this.topLevelTabs={push:function(e){t.debug("Added menu item: ",e);var n={id:e.id,title:function(){return e.content},isValid:function(){return e.isValid(p)},href:function(){return UrlHelpers.noHash(e.href())}};e.isActive&&(n.isSelected=function(){return e.isActive(p)}),p.HawtioNav.add(n)},find:function(e){}}}return n.prototype.createChildWorkspace=function(e){var t=new n(this.jolokia,this.jolokiaStatus,this.jmxTreeLazyLoadRegistry,this.$location,this.$compile,this.$templateCache,this.localStorage,this.$rootScope,this.userDetails,this.HawtioNav);return angular.forEach(this,function(e,n){return t[n]=e}),t.$location=e,t},n.prototype.getLocalStorage=function(e){return this.localStorage[e]},n.prototype.setLocalStorage=function(e,t){this.localStorage[e]=t},n.prototype.loadTree=function(){var n=this,i=this;if(this.jolokia.isDummy)return void setTimeout(function(){i.treeFetched=!0,i.populateTree({value:{}})},10);var r={ignoreErrors:!0,maxDepth:7,error:function(e){i.treeFetched=!0,t.debug("Error fetching JMX tree: ",e)}};t.debug("jolokia: ",this.jolokia),this.jolokia.request({type:"list"},e.onSuccess(function(e){e.value&&(n.jolokiaStatus.xhr=null),i.treeFetched=!0,i.populateTree(e)},r))},n.prototype.addTreePostProcessor=function(e){var t=_.keys(this.treePostProcessors).length,n=t+1;return this.addNamedTreePostProcessor(n+"",e)},n.prototype.addNamedTreePostProcessor=function(e,t){this.treePostProcessors[e]=t;var n=this.tree;return this.treeFetched&&n&&t(n),e},n.prototype.removeNamedTreePostProcessor=function(e){delete this.treePostProcessors[e]},n.prototype.maybeMonitorPlugins=function(){this.treeContainsDomainAndProperties("hawtio",{type:"Registry"})?null===this.pluginRegisterHandle&&(this.pluginRegisterHandle=this.jolokia.register(angular.bind(this,this.maybeUpdatePlugins),{type:"read",mbean:"hawtio:type=Registry",attribute:"UpdateCounter"})):null!==this.pluginRegisterHandle&&(this.jolokia.unregister(this.pluginRegisterHandle),this.pluginRegisterHandle=null,this.pluginUpdateCounter=null),this.treeContainsDomainAndProperties("hawtio",{type:"TreeWatcher"})&&null===this.treeWatchRegisterHandle&&(this.treeWatchRegisterHandle=this.jolokia.register(angular.bind(this,this.maybeReloadTree),{type:"read",mbean:"hawtio:type=TreeWatcher",attribute:"Counter"}))},n.prototype.maybeUpdatePlugins=function(t){return null===this.pluginUpdateCounter?void(this.pluginUpdateCounter=t.value):void(this.pluginUpdateCounter!==t.value&&e.parseBooleanValue(localStorage.autoRefresh)&&window.location.reload())},n.prototype.maybeReloadTree=function(t){function n(e){var t={value:e};r.populateTree(t)}var i=t.value;if(null===this.treeWatcherCounter)return void(this.treeWatcherCounter=i);if(this.treeWatcherCounter!==i){this.treeWatcherCounter=i;var r=this;this.jolokia.list(null,e.onSuccess(n,{ignoreErrors:!0,maxDepth:2}))}},n.prototype.folderGetOrElse=function(e,n){if(e)try{return e.getOrElse(n)}catch(i){t.warn("Failed to find value "+n+" on folder "+e)}return null},n.prototype.populateTree=function(n){t.debug("JMX tree has been loaded, data: ",n.value);var i="root",r="-";this.mbeanTypesToDomain={},this.mbeanServicesToDomain={},this.keyToNodeMap={};var o=new e.Folder("MBeans");o.key=i;var a=n.value;for(var s in a){var l=e.escapeDots(s),u=a[s];for(var c in u){var d={},p=this.folderGetOrElse(o,s);p.domain=s,p.key||(p.key=i+r+s);var h=[s];p.folderNames=h,h=h.clone();var f=c.split(","),g=[],m=null,v=null;f.forEach(function(e){var t=e.indexOf("="),n=[];t>0?(n[0]=e.substr(0,t),n[1]=e.substr(t+1)):n[0]=e;var i=n[0],r=n[1]||i;d[i]=r;var o=!1,a=i.toLowerCase();"type"===a&&(m=r,p.map[r]&&(o=!0)),"service"===a&&(v=r),o?g.splice(0,0,r):g.push(r)});var y=function(t,n){t.domain=s,t.key||(t.key=i+r+h.join(r)),this.keyToNodeMap[t.key]=t,t.folderNames=h.clone();var o="",a=t.entries,u=Object.keys(a).filter(function(e){return e.toLowerCase().indexOf("type")>=0});if(u.length)angular.forEach(u,function(e){var n=a[e];t.ancestorHasEntry(e,n)||(o+=" "+l+r+n)});else{var c=h.last();c===n&&(c+="-folder"),c&&(o+=" "+l+r+c)}return t.addClass=e.escapeTreeCssStyles(o),t},b=g.pop(),w=this;g.forEach(function(e){p=w.folderGetOrElse(p,e),p&&(h.push(e),angular.bind(w,y,p,e)())});var x=i+r+h.join(r)+r+b,k=s+":"+c;if(p){if(p=this.folderGetOrElse(p,b)){p.entries=d,p.key=x,angular.bind(this,y,p,b)(),p.title=e.trimQuotes(b),p.objectName=k,p.mbean=u[c],p.typeName=m;var C=function(e,t){var n=e[t];n||(n={},e[t]=n);var i=n[s];if(i){var r=null;angular.isArray(i)?r=i:(r=[i],n[s]=r),r.push(p)}else n[s]=p};v&&angular.bind(this,C,this.mbeanServicesToDomain,v)(),m&&angular.bind(this,C,this.mbeanTypesToDomain,m)()}}else t.info("No folder found for lastPath: "+b)}}o.sortChildren(!0),this.enableLazyLoading(o),this.tree=o;var S=this.treePostProcessors;_.forIn(S,function(e,n){t.debug("Running tree post processor: ",n),e(o)}),this.maybeMonitorPlugins();var T=this.$rootScope;T&&(T.$broadcast("jmxTreeUpdated"),e.$apply(T))},n.prototype.enableLazyLoading=function(e){var t=this,n=e.children;if(n&&n.length)angular.forEach(n,function(e){t.enableLazyLoading(e)});else{var i=Jmx.findLazyLoadingFunction(this,e);i&&(e.isLazy=!0)}},n.prototype.hash=function(){var t=this.$location.search(),n=e.hashToString(t);return n?"?"+n:""},n.prototype.getActiveTab=function(){var e=this;return this.topLevelTabs.find(function(t){return angular.isDefined(t.isActive)?t.isActive(e):e.isLinkActive(t.href())})},n.prototype.getStrippedPathName=function(){var t=e.trimLeading(this.$location.path()||"/","#");return t=t.replace(/^\//,"")},n.prototype.linkContains=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.getStrippedPathName();return e.all(function(e){return n.has(e)})},n.prototype.isLinkActive=function(t){var n=this.getStrippedPathName(),i=e.trimLeading(t,"#");i=i.replace(/^\//,"");var r=i.indexOf("?");return r>=0&&(i=i.substring(0,r)),n.length?n.startsWith(i):i===n},n.prototype.isLinkPrefixActive=function(t){var n=this.getStrippedPathName(),i=e.trimLeading(t,"#");i=i.replace(/^\//,"");var r=i.indexOf("?");return r>=0&&(i=i.substring(0,r)),n.startsWith(i)},n.prototype.isTopTabActive=function(e){var t=this.$location.search().tab;return angular.isString(t)?t.startsWith(e):this.isLinkActive(e);
|
|
3263
|
|
-},n.prototype.getSelectedMBeanName=function(){var e=this.selection;return e?e.objectName:null},n.prototype.getSelectedMBean=function(){if(this.selection)return this.selection;t.debug("Location: ",this.$location);var e=this.$location.search().nid;if(e&&this.tree){var n=this.tree.findDescendant(function(t){return e===t.id});return this.selection||(this.selection=n),n}return null},n.prototype.validSelection=function(e){return!0},n.prototype.removeAndSelectParentNode=function(){var e=this.selection;if(e){var t=e.parent;if(t){var n=t.children.indexOf(e);0>n&&(n=t.children.findIndex(function(t){return t.key===e.key})),n>=0&&t.children.splice(n,1),this.updateSelectionNode(t)}}},n.prototype.selectParentNode=function(){var e=this.selection;if(e){var t=e.parent;t&&this.updateSelectionNode(t)}},n.prototype.selectionViewConfigKey=function(){return this.selectionConfigKey("view/")},n.prototype.selectionConfigKey=function(e){void 0===e&&(e="");var t=null,n=this.selection;if(n){t=e+n.domain;var i=n.typeName;i||(i=n.title),t+="/"+i,n.isFolder()&&(t+="/folder")}return t},n.prototype.moveIfViewInvalid=function(){var n=this,i=e.trimLeading(this.$location.path(),"/");if(this.selection){var r=this.selectionViewConfigKey();if(this.validSelection(i))return this.setLocalStorage(r,i),!1;t.info("the uri '"+i+"' is not valid for this selection");var o=this.getLocalStorage(r);return o&&this.validSelection(o)||(o=null,angular.forEach(this.subLevelTabs,function(e){var t=e.isValid;!o&&e.href&&angular.isDefined(t)&&t(n)&&(o=e.href())})),o||(o="#/jmx/help"),t.info("moving the URL to be "+o),o.startsWith("#")&&(o=o.substring(1)),this.$location.path(o),!0}return!1},n.prototype.updateSelectionNode=function(e){this.selection;this.selection=e;var t=null;if(e&&(t=e.key),t){var n=this.$location,i=n.search();i.nid=t,n.search(i)}},n.prototype.redrawTree=function(){var e=this.treeElement;if(e&&angular.isDefined(e.dynatree)&&angular.isFunction(e.dynatree)){var t=e.dynatree("getTree");if(angular.isDefined(t))try{t.reload()}catch(n){}}},n.prototype.expandSelection=function(e){var t=this.treeElement;if(t&&angular.isDefined(t.dynatree)&&angular.isFunction(t.dynatree)){var n=t.dynatree("getActiveNode");angular.isDefined(n)&&n.expand(e)}},n.prototype.matchesProperties=function(e,t){if(!e)return!1;for(var n in t){var i=t[n];if(!i||e[n]!==i)return!1}return!0},n.prototype.hasInvokeRightsForName=function(n){for(var i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];var o=!0;if(n){var a=e.parseMBean(n);if(a){var s=this.findMBeanWithProperties(a.domain,a.attributes);if(s)return this.hasInvokeRights.apply(this,[s].concat(i));t.debug("Failed to find mbean folder with name "+n)}else t.debug("Failed to parse mbean name "+n)}return o},n.prototype.hasInvokeRights=function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=!0;if(e){var o=e,a=o.mbean;if(a&&(angular.isDefined(a.canInvoke)&&(r=a.canInvoke),r&&n&&n.length>0)){var s=a.opByString,l=a.op;s&&l&&n.forEach(function(e){if(r){var n=null;return(n=e.endsWith(")")?s[e]:l[e])?void(angular.isDefined(n.canInvoke)&&(r=n.canInvoke)):void t.debug("Could not find method:",e," to check permissions, skipping")}})}}return r},n.prototype.treeContainsDomainAndProperties=function(e,t){var n=this;void 0===t&&(t=null);var i=this,r=i.tree;if(r){var o=r.get(e);if(o){if(t){var a=o.children||[],s=function(i){return n.matchesProperties(i.entries,t)?!0:i.domain===e&&i.children&&i.children.length>0?i.children.some(s):!1};return a.some(s)}return!0}}return!1},n.prototype.matches=function(e,t,n){if(e){var i=e.entries;if(t){if(!i)return!1;for(var r in t){var o=t[r];if(!o||i[r]!==o)return!1}}return n?i&&Object.keys(i).length===n:!0}return!1},n.prototype.hasDomainAndProperties=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var i=this.selection;return i?this.matches(i,t,n)&&i.domain===e:!1},n.prototype.findMBeanWithProperties=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var i=this.tree;return i?this.findChildMBeanWithProperties(i.get(e),t,n):null},n.prototype.findChildMBeanWithProperties=function(e,t,n){var i=this;void 0===t&&(t=null),void 0===n&&(n=null);var r=this;if(e){var o=e.children;if(o){var a=o.find(function(e){return i.matches(e,t,n)});return a?a:o.map(function(e){return r.findChildMBeanWithProperties(e,t,n)}).find(function(e){return e})}}return null},n.prototype.selectionHasDomainAndLastFolderName=function(e,t){function n(e){return(e||"").toLowerCase()===i}var i=(t||"").toLowerCase(),r=this.selection;if(r&&e===r.domain){var o=r.folderNames;if(o){var a=o.last();return(n(a)||n(r.title))&&r.isFolder()&&!r.objectName}}return!1},n.prototype.selectionHasDomain=function(e){var t=this.selection;return t?e===t.domain:!1},n.prototype.selectionHasDomainAndType=function(e,t){var n=this.selection;return n?e===n.domain&&t===n.typeName:!1},n.prototype.hasMBeans=function(){var e=!1,t=this.tree;if(t){var n=t.children;angular.isArray(n)&&n.length>0&&(e=!0)}return e},n.prototype.hasFabricMBean=function(){return this.hasDomainAndProperties("io.fabric8",{type:"Fabric"})},n.prototype.isFabricFolder=function(){return this.hasDomainAndProperties("io.fabric8")},n.prototype.isCamelContext=function(){return this.hasDomainAndProperties("org.apache.camel",{type:"context"})},n.prototype.isCamelFolder=function(){return this.hasDomainAndProperties("org.apache.camel")},n.prototype.isEndpointsFolder=function(){return this.selectionHasDomainAndLastFolderName("org.apache.camel","endpoints")},n.prototype.isEndpoint=function(){return this.hasDomainAndProperties("org.apache.camel",{type:"endpoints"})},n.prototype.isRoutesFolder=function(){return this.selectionHasDomainAndLastFolderName("org.apache.camel","routes")},n.prototype.isRoute=function(){return this.hasDomainAndProperties("org.apache.camel",{type:"routes"})},n.prototype.isComponentsFolder=function(){return this.selectionHasDomainAndLastFolderName("org.apache.camel","components")},n.prototype.isComponent=function(){return this.hasDomainAndProperties("org.apache.camel",{type:"components"})},n.prototype.isOsgiFolder=function(){return this.hasDomainAndProperties("osgi.core")},n.prototype.isKarafFolder=function(){return this.hasDomainAndProperties("org.apache.karaf")},n.prototype.isOsgiCompendiumFolder=function(){return this.hasDomainAndProperties("osgi.compendium")},n}();e.Workspace=n}(Core||(Core={}));var Workspace=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t}(Core.Workspace),JVM;!function(e){function t(t,n,i){t.isActive=function(e){var t=Core.trimLeading(e,"#"),i=n.path();return i===t},t.isValid=function(e){return e&&e.isValid(i)},t.hasLocalMBean=function(){return e.hasLocalMBean(i)}}function n(e){return e.treeContainsDomainAndProperties("hawtio",{type:"JVMList"})}function i(e){return e.treeContainsDomainAndProperties("jolokia",{type:"Discovery"})}e.rootPath="plugins/jvm",e.templatePath=UrlHelpers.join(e.rootPath,"/html"),e.pluginName="hawtio-jvm",e.log=Logger.get(e.pluginName),e.connectControllerKey="jvmConnectSettings",e.connectionSettingsKey=Core.connectionSettingsKey,e.logoPath="img/icons/jvm/",e.logoRegistry={jetty:e.logoPath+"jetty-logo-80x22.png",tomcat:e.logoPath+"tomcat-logo.gif",generic:e.logoPath+"java-logo.svg"},e.configureScope=t,e.hasLocalMBean=n,e.hasDiscoveryMBean=i}(JVM||(JVM={}));var Core;!function(e){function t(e,t,n){var i={url:e,username:t,password:n,canonicalNaming:!1,ignoreErrors:!0,mimeType:"application/json"};return new Jolokia(i)}function n(t){return e.isBlank(t.recentConnections)&&e.clearConnections(),angular.fromJson(t.recentConnections)}function i(e,t){var i=n(e);i=i.add(t).unique().first(5),e.recentConnections=angular.toJson(i)}function r(e,t){var i=n(e);i=i.exclude(function(e){return e===t}),e.recentConnections=angular.toJson(i)}function o(){localStorage.recentConnections="[]"}function a(){return"con"in(new URI).query(!0)}function s(t){var n=e.loadConnectionMap(),i=angular.extend({},t);delete i.userName,delete i.password,n[t.name]=i,e.saveConnectionMap(n)}function l(t,n){if(e.log.debug("Connecting with options: ",StringHelpers.toString(n)),i(t,n.name),!("userName"in n)){var r=HawtioCore.injector.get("userDetails");n.userName=r.username,n.password=r.password}s(n);var o=HawtioCore.injector.get("$window"),a=(n.view||"/")+"?con="+n.name;a=a.replace(/\?/g,"&"),a=a.replace(/&/,"?");var l=o.open(a);l.con=n.name,l.userDetails={username:n.userName,password:n.password,loginDetails:{}}}function u(){var t=e.getLocalStorage();try{var n=angular.fromJson(t[e.connectionSettingsKey]);return n?n:{}}catch(i){return delete t[e.connectionSettingsKey],{}}}function c(t){Logger.get("Core").debug("Saving connection map: ",StringHelpers.toString(t)),localStorage[e.connectionSettingsKey]=angular.toJson(t)}function d(){return(new URI).search(!0).con}function p(t,n){return void 0===n&&(n=e.getLocalStorage()),t?e.loadConnectionMap()[t]:null}function h(e){Logger.get("Core").debug("Connect to server, options: ",StringHelpers.toString(e));var t=null;if(e.jolokiaUrl&&(t=e.jolokiaUrl),null===t){var n=new URI;n.protocol(e.scheme||"http").host(e.host||"localhost").port(e.port||"80").path(e.path),t=e.useProxy?UrlHelpers.join("proxy",n.protocol(),n.hostname(),n.port(),n.path()):n.toString()}return Logger.get(JVM.pluginName).debug("Using URL: ",t),t}e.createJolokia=t,e.getRecentConnections=n,e.addRecentConnection=i,e.removeRecentConnection=r,e.clearConnections=o,e.isRemoteConnection=a,e.saveConnection=s,e.connectToServer=l,e.loadConnectionMap=u,e.saveConnectionMap=c,e.getConnectionNameParameter=d,e.getConnectOptions=p,e.createServerConnectionUrl=h}(Core||(Core={}));var Jmx;!function(e){function t(e,t){var n="#"+e.route,i=angular.toJson(t),r=t.title,o=angular.toJson({size_x:e.size_x,size_y:e.size_y});return"/dashboard/add?tab=dashboard&href="+encodeURIComponent(n)+"&size="+encodeURIComponent(o)+"&title="+encodeURIComponent(r)+"&routeParams="+encodeURIComponent(i)}function n(t){return e.jmxWidgetTypes.find(function(e){return e.type===t.type})}e.createDashboardLink=t,e.getWidgetType=n,e.jmxWidgetTypes=[{type:"donut",icon:"fa fa-pie-chart",route:"/jmx/widget/donut",size_x:2,size_y:2,title:"Add Donut chart to Dashboard"},{type:"area",icon:"fa fa-bar-chart",route:"/jmx/widget/area",size_x:4,size_y:2,title:"Add Area chart to Dashboard"}],e.jmxWidgets=[{type:"donut",title:"Java Heap Memory",mbean:"java.lang:type=Memory",attribute:"HeapMemoryUsage",total:"Max",terms:"Used",remaining:"Free"},{type:"donut",title:"Java Non Heap Memory",mbean:"java.lang:type=Memory",attribute:"NonHeapMemoryUsage",total:"Max",terms:"Used",remaining:"Free"},{type:"donut",title:"File Descriptor Usage",mbean:"java.lang:type=OperatingSystem",total:"MaxFileDescriptorCount",terms:"OpenFileDescriptorCount",remaining:"Free"},{type:"donut",title:"Loaded Classes",mbean:"java.lang:type=ClassLoading",total:"TotalLoadedClassCount",terms:"LoadedClassCount,UnloadedClassCount",remaining:"-"},{type:"donut",title:"Swap Size",mbean:"java.lang:type=OperatingSystem",total:"TotalSwapSpaceSize",terms:"FreeSwapSpaceSize",remaining:"Used Swap"},{type:"area",title:"Process CPU Time",mbean:"java.lang:type=OperatingSystem",attribute:"ProcessCpuTime"},{type:"area",title:"Process CPU Load",mbean:"java.lang:type=OperatingSystem",attribute:"ProcessCpuLoad"},{type:"area",title:"System CPU Load",mbean:"java.lang:type=OperatingSystem",attribute:"SystemCpuLoad"},{type:"area",title:"System CPU Time",mbean:"java.lang:type=OperatingSystem",attribute:"SystemCpuTime"}]}(Jmx||(Jmx={}));var Jmx;!function(e){e._module=angular.module(e.pluginName,[]),e._module.config(["HawtioNavBuilderProvider","$routeProvider",function(t,n){n.when("/jmx",{redirectTo:"/jmx/attributes"}).when("/jmx/attributes",{templateUrl:UrlHelpers.join(e.templatePath,"attributes.html")}).when("/jmx/operations",{templateUrl:UrlHelpers.join(e.templatePath,"operations.html")}).when("/jmx/charts",{templateUrl:UrlHelpers.join(e.templatePath,"charts.html")}).when("/jmx/chartEdit",{templateUrl:UrlHelpers.join(e.templatePath,"chartEdit.html")}).when("/jmx/help/:tabName",{templateUrl:"app/core/html/help.html"}).when("/jmx/widget/donut",{templateUrl:UrlHelpers.join(e.templatePath,"donutChart.html")}).when("/jmx/widget/area",{templateUrl:UrlHelpers.join(e.templatePath,"areaChart.html")})}]),e._module.factory("jmxWidgetTypes",function(){return e.jmxWidgetTypes}),e._module.factory("jmxWidgets",function(){return e.jmxWidgets}),e._module.factory("workspace",["$location","jmxTreeLazyLoadRegistry","$compile","$templateCache","localStorage","jolokia","jolokiaStatus","$rootScope","userDetails","HawtioNav",function(e,t,n,i,r,o,a,s,l,u){var c=new Workspace(o,a,t,e,n,i,r,s,l,u);return c.loadTree(),c}]),e._module.controller("Jmx.MBeanTreeController",["$scope","workspace",function(t,n){t.node={},n.addNamedTreePostProcessor("MBeanTree",function(n){angular.copy(n,t.node),t.node.open=!0,e.log.debug("got tree: ",t.node)}),t.select=function(e){n.updateSelectionNode(e)}}]),e._module.factory("rbacACLMBean",function(){return{then:function(){}}}),e._module.constant("layoutTree","plugins/jmx/html/layoutTree.html"),e._module.factory("jolokiaStatus",function(){return{xhr:null}}),e.DEFAULT_MAX_DEPTH=7,e.DEFAULT_MAX_COLLECTION_SIZE=500,e._module.factory("jolokiaParams",["jolokiaUrl","localStorage",function(t,n){var i={canonicalNaming:!1,ignoreErrors:!0,mimeType:"application/json",maxDepth:e.DEFAULT_MAX_DEPTH,maxCollectionSize:e.DEFAULT_MAX_COLLECTION_SIZE};return"jolokiaParams"in n?i=angular.fromJson(n.jolokiaParams):n.jolokiaParams=angular.toJson(i),i.url=t,i}]),e._module.factory("jmxTreeLazyLoadRegistry",function(){return Core.lazyLoaders}),e._module.controller("Jmx.EditChartNav",["$scope","$location",function(e,t){e.valid=function(){return t.path().startsWith("/jmx/chart")}}]),e._module.run(["HawtioNav","$location","workspace","viewRegistry","layoutTree","jolokia","helpRegistry","pageTitle","$templateCache",function(t,n,i,r,o,a,s,l,u){e.log.debug("loaded"),r['{ "main-tab": "jmx" }']=o,s.addUserDoc("jmx","app/jmx/doc/help.md"),l.addTitleElement(function(){if(""===e.currentProcessId){try{e.currentProcessId=a.getAttribute("java.lang:type=Runtime","Name")}catch(t){}e.currentProcessId&&e.currentProcessId.has("@")&&(e.currentProcessId="pid:"+e.currentProcessId.split("@")[0])}return e.currentProcessId});var c="/jmx/attributes",d=t.builder(),p=d.id("jmx").title(function(){return"JMX"}).defaultPage({rank:10,isValid:function(e,t){var n="JmxDefaultPage";i.addNamedTreePostProcessor(n,function(r){i.removeNamedTreePostProcessor(n),i.hasMBeans()?e():t()})}}).isValid(function(){return i.hasMBeans()}).href(function(){return c}).build();p.tabs=e.getNavItems(d,i,u),t.add(p)}]),hawtioPluginLoader.addModule(e.pluginName),hawtioPluginLoader.addModule("dangle")}(Jmx||(Jmx={}));var Jmx;!function(e){e.AreaChartController=e._module.controller("Jmx.AreaChartController",["$scope","$routeParams","jolokia","$templateCache","localStorage",function(e,t,n,i,r){e.mbean=t.mbean,e.attribute=t.attribute,e.duration=r.updateRate,e.width=308,e.height=296,e.template="",e.entries=[],e.data={entries:e.entries},e.req=[{type:"read",mbean:e.mbean,attribute:e.attribute}],e.render=function(t){e.entries.push({time:t.timestamp,count:t.value}),e.entries=e.entries.last(15),""===e.template&&(e.template=i.get("areaChart")),e.data={_type:"date_histogram",entries:e.entries},Core.$apply(e)},Core.register(n,e,e.req,Core.onSuccess(e.render))}])}(Jmx||(Jmx={}));var Jmx;!function(e){e._module.controller("Jmx.AttributeController",["$scope","jolokia",function(e,t){function n(t){_.isEqual(e.data,t.value)&&(e.data=Core.safeNull(t.value),Core.$apply(e))}e.init=function(i,r){e.mbean=i,e.attribute=r,angular.isDefined(e.mbean)&&angular.isDefined(e.attribute)&&Core.register(t,e,{type:"read",mbean:e.mbean,attribute:e.attribute},Core.onSuccess(n))}}]),e._module.controller("Jmx.AttributeChartController",["$scope","jolokia","$document",function(e,t,n){function i(i){angular.isDefined(e.chart)||(e.chart=$(n.find("#"+e.attribute)[0]),e.chart&&(e.width=e.chart.width())),angular.isDefined(e.context)||(console.log("Got: ",i),e.context=cubism.context().serverDelay(0).clientDelay(0).step(1e3).size(e.width),e.jcontext=e.context.jolokia(t),e.metrics=[],_.forIn(i.value,function(t,n){e.metrics.push(e.jcontext.metric({type:"read",mbean:e.mbean,attribute:e.attribute,path:n},e.attribute))}),d3.select("#"+e.attribute).call(function(t){t.append("div").data(e.metrics).call(e.context.horizon())}),Core.unregister(t,e),Core.$apply(e))}e.init=function(n,r){e.mbean=n,e.attribute=r,angular.isDefined(e.mbean)&&angular.isDefined(e.attribute)&&Core.register(t,e,{type:"read",mbean:e.mbean,attribute:e.attribute},Core.onSuccess(i))}}])}(Jmx||(Jmx={}));var Jmx;!function(e){e.propertiesColumnDefs=[{field:"name",displayName:"Property",width:"27%",cellTemplate:'<div class="ngCellText" title="{{row.entity.attrDesc}}" data-placement="bottom"><div ng-show="!inDashboard" class="inline" compile="row.entity.getDashboardWidgets()"></div><a href="" ng-click="row.entity.onViewAttribute()">{{row.entity.name}}</a></div>'},{field:"value",displayName:"Value",width:"70%",cellTemplate:'<div class="ngCellText mouse-pointer" ng-click="row.entity.onViewAttribute()" title="{{row.entity.tooltip}}" ng-bind-html="row.entity.summary"></div>'}],e.foldersColumnDefs=[{displayName:"Name",cellTemplate:'<div class="ngCellText"><a href="{{row.entity.folderHref(row)}}"><i class="{{row.entity.folderIconClass(row)}}"></i> {{row.getProperty("title")}}</a></div>'}],e.AttributesController=e._module.controller("Jmx.AttributesController",["$scope","$element","$location","workspace","jolokia","jolokiaUrl","jmxWidgets","jmxWidgetTypes","$templateCache","localStorage","$browser","HawtioDashboard",function(t,n,i,r,o,a,s,l,u,c,d,p){function h(){f()}function f(){Core.unregister(o,t),t.gridData=[],t.mbeanIndex=null;var n=r.getSelectedMBeanName(),a=null,s=r.getSelectedMBean();if(null===s||angular.isUndefined(s)||s.key!==t.lastKey){if(t.attributesInfoCache=null,null==n){var l=i.search().nid,u=r.keyToNodeMap[l];u&&(n=u.objectName)}if(n){var c=function(e){var t=Core.escapeMBeanPath(e),n={type:"LIST",method:"post",path:t,ignoreErrors:!0};return n},d=c(n);o.request(d,Core.onSuccess(function(i){t.attributesInfoCache=i.value,e.log.debug("Updated attributes info cache for mbean "+n)}))}}if(n)a={type:"read",mbean:n},(null===s||angular.isUndefined(s)||s.key!==t.lastKey)&&(t.gridOptions.columnDefs=e.propertiesColumnDefs,t.gridOptions.enableRowClickSelection=!1);else if(s){s.key!==t.lastKey&&(t.gridOptions.columnDefs=[],t.gridOptions.enableRowClickSelection=!0);var p=s.children;if(p){var h=p.map(function(e){return e.objectName}),f=h.filter(function(e){return void 0!==e});if(f){var v=e.getUniqueTypeNames(p);if(v.length<=1){var y=f.map(function(e){return{type:"READ",mbean:e,ignoreErrors:!0}});y.length>0&&(a=y,t.mbeanIndex={},t.mbeanRowCounter=0,t.mbeanCount=f.length)}else console.log("Too many type names "+v)}}}var b=Core.onSuccess(g);a?(t.request=a,Core.register(o,t,a,b)):s&&(s.key!==t.lastKey&&(t.gridOptions.columnDefs=e.foldersColumnDefs,t.gridOptions.enableRowClickSelection=!0),t.gridData=s.children,m(t.gridData),Core.$apply(t)),s&&(t.lastKey=s.key)}function g(n){var i=n.value,o=t.mbeanIndex,a=n.request.mbean;if(a&&(i._id=a),o)if(a){var s=o[a];if(angular.isDefined(s)||(s=t.mbeanRowCounter,o[a]=s,t.mbeanRowCounter+=1),0===s&&(t.selectedIndices=t.selectedItems.map(function(e){return t.gridData.indexOf(e)}),t.gridData=[],!t.gridOptions.columnDefs.length)){var l=r.selectionConfigKey(),u=r.attributeColumnDefs[l]||[],c=u.length,d={};angular.forEach(u,function(e,t){var n=e.field;n&&(d[n]=e)});var p=[];angular.forEach(i,function(e,t){w(t,e)&&(d[t]||p.push({field:t,displayName:"_id"===t?"Object name":Core.humanizeValue(t),visible:0===c}))}),p=p.sort(function(e,t){return e.field.startsWith("_")?1:t.field.startsWith("_")?-1:e.field.localeCompare(t.field)}),p.forEach(function(e){u.push(e)}),u=u.remove(function(e){return angular.isDefined(e.visible)&&null!=e.visible?!e.visible:!1}),t.gridOptions.columnDefs=u,t.gridOptions.enableRowClickSelection=!0}t.gridData[s]=i,m(t.gridData);var h=t.mbeanCount;if(!h||s+1>=h){var f=t.selectedIndices.map(function(e){return t.gridData[e]}).filter(function(e){return e});t.selectedItems.splice(0,t.selectedItems.length),t.selectedItems.push.apply(t.selectedItems,f)}}else console.log("No mbean name in request "+JSON.stringify(n.request));else{t.gridOptions.columnDefs=e.propertiesColumnDefs,t.gridOptions.enableRowClickSelection=!1;var g=!0;if(angular.isObject(i)){var x=Array();if(angular.forEach(i,function(e,t){if((g||w(t,e))&&!t.startsWith("_")){"ObjectName"===t&&(e=v(e)),angular.isArray(e)&&(e=e.map(function(e){return v(e)}));var n=b(t),i={key:t,name:Core.humanizeValue(t),value:Core.safeNullAsString(e,n)};y(t,i),x.push(i)}}),!x.any(function(e){return"ObjectName"===e.key})){var k={key:"ObjectName",name:"Object Name",value:a};y(k.key,k),x.push(k)}x=x.sortBy("name"),t.selectedItems=[i],i=x}t.gridData=i,m(t.gridData)}Core.$apply(t)}function m(e){e.forEach(function(e){e.inDashboard=t.inDashboard,e.getDashboardWidgets=function(){return t.getDashboardWidgets(e)},e.onViewAttribute=function(){t.onViewAttribute(e)},e.folderIconClass=function(e){return t.folderIconClass(e)},e.folderHref=function(e){return t.folderHref(e)}})}function v(e){if(!angular.isObject(e))return e;var t=Object.keys(e);return 1===t.length&&"objectName"===t[0]?e.objectName:e}function y(e,n){var i=n.value;if(!angular.isArray(i)&&angular.isObject(i)){var r="<table class='table table-striped'>",o="",a=i,s=Object.keys(i).sort();angular.forEach(s,function(e){var t=a[e];r+="<tr><td>"+Core.humanizeValue(e)+"</td><td>"+t+"</td></tr>",o+=""+Core.humanizeValue(e)+": "+t+" "}),r+="</table>",n.summary=o,n.detailHtml=r,n.tooltip=o}else{var l=i;if(""===l?(l=" ",n.tooltip=""):n.tooltip=l,n.summary=""+l,n.detailHtml="<pre>"+l+"</pre>",angular.isArray(i)){var u="<ul>";angular.forEach(i,function(e){u+="<li>"+e+"</li>"}),u+="</ul>",n.detailHtml=u}}if(n.rw=!1,n.attrDesc=n.name,n.type="string",null!=t.attributesInfoCache&&"attr"in t.attributesInfoCache){var c=t.attributesInfoCache.attr[e];angular.isDefined(c)&&(n.rw=c.rw,n.attrDesc=c.desc,n.type=c.type)}}function b(e){if(null!=t.attributesInfoCache&&"attr"in t.attributesInfoCache){var n=t.attributesInfoCache.attr[e];if(angular.isDefined(n))return n.type}return null}function w(e,t){return!angular.isObject(t)}t.searchText="",t.nid="empty",t.selectedItems=[],t.lastKey=null,t.attributesInfoCache={},t.entity={},t.attributeSchema={},t.gridData=[],t.attributes="",t.inDashboard=p.inDashboard,t.$watch("gridData.length",function(e,n){e!==n&&(e>0?t.attributes=u.get("gridTemplate"):t.attributes="")});var x={style:HawtioForms.FormStyle.STANDARD,mode:HawtioForms.FormMode.VIEW,hideLegend:!0,properties:{key:{label:"Key",tooltip:"Attribute key",type:"static"},attrDesc:{label:"Description",type:"static"},type:{label:"Type",tooltip:"Attribute type",type:"static"},jolokia:{label:"Jolokia URL",tooltip:"Jolokia REST URL",type:"string","input-attributes":{readonly:!0}}}};t.gridOptions={scope:t,selectedItems:[],showFilter:!1,canSelectRows:!1,enableRowSelection:!1,enableRowClickSelection:!1,keepLastSelected:!1,multiSelect:!0,showColumnMenu:!0,displaySelectionCheckbox:!1,filterOptions:{filterText:""},data:"gridData",columnDefs:e.propertiesColumnDefs},t.$watch(function(e){return e.gridOptions.selectedItems.map(function(e){return e})},function(n,i){n!==i&&(e.log.debug("Selected items: ",n),t.selectedItems=n)},!0);var k=_.debounce(f,100,{trailing:!0});t.$on("$routeChangeSuccess",function(e,n,r){t.nid=i.search().nid,setTimeout(function(){k()},10)}),t.$watch("workspace.selection",function(){return r.moveIfViewInvalid()?void Core.unregister(o,t):void setTimeout(function(){k()},10)}),k(),t.hasWidget=function(e){return!0},t.onCancelAttribute=function(){t.entity={}},t.onUpdateAttribute=function(){var e=t.entity.value,n=t.entity.key;t.entity={};var i=r.getSelectedMBeanName();i&&o.setAttribute(i,n,e,Core.onSuccess(function(e){Core.notification("success","Updated attribute "+n)}))},t.onViewAttribute=function(n){if(n.summary){var i=t.entity=_.cloneDeep(n),o=t.attributeSchema=_.cloneDeep(x);"ObjectName"===i.key?delete o.properties.jolokia:i.jolokia=e.getUrlForThing(a,"read",r.getSelectedMBeanName(),i.key),o.properties.value={formTemplate:'<div class="form-group"><label class="control-label">Value</label><div hawtio-editor={{model}}></div></div>'},t.showAttributeDialog=!0}},t.getDashboardWidgets=function(n){var i=r.getSelectedMBeanName();if(!i)return"";var o=s.filter(function(e){return i===e.mbean});if(o.isEmpty())return"";if(o=o.filter(function(e){return e.attribute===n.key||e.total===n.key}),o.isEmpty())return"";n.addChartToDashboard=function(e){t.addChartToDashboard(n,e)};var a=[];return o.forEach(function(t){var n=e.getWidgetType(t);a.push('<i class="'+n.icon+' clickable" title="'+n.title+'" ng-click="row.entity.addChartToDashboard(\''+n.type+"')\"></i>")}),a.join()+" "},t.addChartToDashboard=function(t,n){var o=r.getSelectedMBeanName(),a=s.filter(function(e){return o===e.mbean});a=a.filter(function(e){return e.attribute===t.key||e.total===t.key}),a=a.filter(function(e){return e.type===n});var l=a.first(),u=e.getWidgetType(l);i.url(e.createDashboardLink(u,l))},t.toolBarTemplate=function(){var t=e.getAttributeToolBar(r.selection);return t},t.invokeSelectedMBeans=function(e,n){void 0===n&&(n=null);var i=[];if(angular.forEach(t.selectedItems||[],function(t){var n=t._id;if(n){var r=e;angular.isFunction(e)&&(r=e(t)),i.push({type:"exec",operation:r,mbean:n})}}),i.length){var r=function(){n?n():h()};o.request(i,Core.onSuccess(r,{error:r}))}},t.folderHref=function(e){if(!e.getProperty)return"";var t=e.getProperty("key");return t?Core.createHref(i,"#"+i.path()+"?nid="+t,["nid"]):""},t.folderIconClass=function(e){return e.getProperty?e.getProperty("objectName")?"fa fa-cog":"fa fa-folder-close":""}}])}(Jmx||(Jmx={}));var Jmx;!function(e){e._module.controller("Jmx.ChartEditController",["$scope","$location","workspace","jolokia",function(e,t,n,i){function r(){var r=n.selection;if(angular.isDefined(r)){e.selectedAttributes=[],e.selectedMBeans=[],e.metrics={},e.mbeans={};var o=0,a=0,s=r.children;s&&s.length&&!r.objectName||(s=[r]),s&&s.forEach(function(n){var r=n.objectName,s=n.title;if(s&&r){o++,e.mbeans[s]=s;var l=function(e){var t=Core.escapeMBeanPath(e),n={type:"list",path:t,ignoreErrors:!0};return n},u=l(r);i.request(u,Core.onSuccess(function(n){var i=n.value.attr;if(i){for(var r in i){var s=i[r];if(s){var l=s.type;Core.isNumberTypeName(l)&&(e.metrics[r]||(e.metrics[r]=r))}}if(++a>=o){var u=t.search(),c=Core.toSearchArgumentArray(u.att),d=Core.toSearchArgumentArray(u.el);if(c&&c.length&&c.forEach(function(t){e.metrics[t]&&e.selectedAttributes.push(t)}),d&&d.length&&d.forEach(function(t){e.mbeans[t]&&e.selectedMBeans.push(t)}),e.selectedMBeans.length<1&&(e.selectedMBeans=Object.keys(e.mbeans)),e.selectedAttributes.length<1){var p=Object.keys(e.metrics).sort();e.selectedMBeans.length>1?e.selectedAttributes=[p.first()]:e.selectedAttributes=p}$("#attributes").attr("size",_.keys(e.metrics).length),$("#mbeans").attr("size",_.keys(e.mbeans).length),Core.$apply(e)}}Core.$apply(e)},{method:"post"}))}})}}e.selectedAttributes=[],e.selectedMBeans=[],e.metrics={},e.mbeans={},e.size=function(e){return angular.isObject(e)?_.keys(e).length:angular.isArray(e)?e.length:1},e.canViewChart=function(){return e.selectedAttributes.length&&e.selectedMBeans.length&&e.size(e.mbeans)>0&&e.size(e.metrics)>0},e.showAttributes=function(){return e.canViewChart()&&e.size(e.metrics)>1},e.showElements=function(){return e.canViewChart()&&e.size(e.mbeans)>1},e.viewChart=function(){var n=t.search();e.selectedAttributes.length===e.size(e.metrics)?delete n.att:n.att=e.selectedAttributes,e.selectedMBeans.length===e.size(e.mbeans)&&1===e.size(e.mbeans)?delete n.el:n.el=e.selectedMBeans,t.search(n),t.path("jmx/charts")},e.$watch("workspace.selection",r),e.$on("$routeChangeSuccess",function(e,t,n){setTimeout(r,50)})}])}(Jmx||(Jmx={}));var Jmx;!function(e){e._module.controller("Jmx.ChartController",["$scope","$element","$location","workspace","localStorage","jolokiaUrl","jolokiaParams",function(e,t,n,i,r,o,a){function s(){var r=i.selection||i.getSelectedMBean();if(null!=r){if(!angular.isDefined(r)||!angular.isDefined(e.updateRate)||0===e.updateRate)return setTimeout(u,500),void Core.$apply(e);var o=594,s=t.find("#charts");if(!s)return setTimeout(u,500),void Core.$apply(e);o=s.width(),e.reset(),e.charts=s,e.jolokia=new Jolokia(a),e.jolokia.start(e.updateRate);var c=r.objectName;e.metrics=[];var d=cubism.context().serverDelay(e.updateRate).clientDelay(e.updateRate).step(e.updateRate).size(o);e.context=d,e.jolokiaContext=d.jolokia(e.jolokia);var p=n.search(),h=Core.toSearchArgumentArray(p.att);if(c){var f=function(e){var t=Core.escapeMBeanPath(e),n={type:"list",path:t,ignoreErrors:!0};return n},g=f(c),m=e.jolokia.request(g,{method:"post"});if(m){Core.defaultJolokiaErrorHandler(m,{});var v=m.value?m.value.attr:null;if(v){var y=[];for(var b in v){var w=v[b];if(w){var x=w.type;Core.isNumberTypeName(x)&&y.push(b)}}if(h.length){var k=y.filter(function(e){return h.indexOf(e)>=0});k.length&&(y=k)}y=y.sort(),angular.forEach(y,function(t){var n=e.jolokiaContext.metric({type:"read",mbean:c,attribute:t},Core.humanizeValue(t));n&&e.metrics.push(n)})}}}else{var C=Core.toSearchArgumentArray(p.el);if(h&&h.length&&C&&C.length){var S={};C.forEach(function(e){var t=r.get(e);if(!t&&r.children&&(t=r.children.find(function(t){return e===t.title})),t){var n=t.objectName;n&&(S[e]=n)}}),h=h.sort(),h.forEach(function(t){angular.forEach(S,function(n,i){var r=Core.humanizeValue(t),o=i+": "+r,a=e.jolokiaContext.metric({type:"read",mbean:n,attribute:t},o);a&&e.metrics.push(a)})})}r.children.length&&!e.metrics.length&&n.path("jmx/chartEdit")}if(e.metrics.length>0){var _=d3.select(s.get(0)),T=_.selectAll(".axis"),$=!1;if(T.data(["top","bottom"]).enter().append("div").attr("class",function(e){return e+" axis"}).each(function(e){if(!$)try{d3.select(this).call(d.axis().ticks(12).orient(e))}catch(t){$||($=!0)}}),$)return e.reset(),setTimeout(u,500),void Core.$apply(e);_.append("div").attr("class","rule").call(d.rule()),d.on("focus",function(e){try{_.selectAll(".value").style("right",null===e?null:d.size()-e+"px")}catch(t){l.info("error: ",t)}}),e.metrics.forEach(function(e){_.call(function(t){t.append("div").data([e]).attr("class","horizon").call(d.horizon())})})}else e.reset();Core.$apply(e)}}var l=Logger.get("JMX");e.metrics=[],e.updateRate=1e3,e.context=null,e.jolokia=null,e.charts=null,e.reset=function(){e.context&&(e.context.stop(),e.context=null),e.jolokia&&(e.jolokia.stop(),e.jolokia=null),e.charts&&(e.charts.empty(),e.charts=null)},e.$on("$destroy",function(){try{e.deregRouteChange()}catch(t){}try{e.dereg()}catch(t){}e.reset()}),e.errorMessage=function(){return 0===e.updateRate?"updateRate":0===e.metrics.length?"metrics":void 0};var u=_.debounce(s,200,{trailing:!0});e.deregRouteChange=e.$on("$routeChangeSuccess",function(e,t,n){u()}),e.dereg=e.$watch("workspace.selection",function(){i.moveIfViewInvalid()||u()}),u()}])}(Jmx||(Jmx={}));var Jmx;!function(e){e.DonutChartController=e._module.controller("Jmx.DonutChartController",["$scope","$routeParams","jolokia","$templateCache",function(e,t,n,i){if(e.mbean=t.mbean,e.total=t.total,e.attribute=t.attribute,e.terms=t.terms,e.remainder=t.remaining,e.template="",e.termsArray=e.terms.split(","),e.data={total:0,terms:[]},e.attribute){var r=e.termsArray.include(e.total);e.reqs=[{type:"read",mbean:e.mbean,attribute:e.attribute,paths:r.join(",")}],e.termsArray.forEach(function(t){e.data.terms.push({term:t,count:0})})}else e.reqs=[{type:"read",mbean:e.mbean,attribute:e.total}],e.termsArray.forEach(function(t){e.reqs.push({type:"read",mbean:e.mbean,attribute:t}),e.data.terms.push({term:t,count:0})});e.remainder&&"-"!==e.remainder&&e.data.terms.push({term:e.remainder,count:0}),e.render=function(t){
|
|
3264
|
|
-var n=null;if(e.remainder&&"-"!==e.remainder&&(n=e.data.terms.find(function(t){return t.term===e.remainder})),e.attribute)t.request.attribute===e.attribute&&(e.data.total=t.value[e.total.toLowerCase()],e.data.terms.forEach(function(n){n.term!==e.remainder&&(n.count=t.value[n.term.toLowerCase()])}),n&&(n.count=e.data.total,e.data.terms.forEach(function(t){t.term!==e.remainder&&(n.count=n.count-t.count)})));else if(t.request.attribute===e.total)e.data.total=t.value;else{var r=e.data.terms.find(function(e){return e.term===t.request.attribute});r&&(r.count=t.value),n&&(n.count=e.data.total,e.data.terms.forEach(function(t){t.term!==e.remainder&&(n.count=n.count-t.count)}))}""===e.template&&(e.template=i.get("donut")),e.data=Object.clone(e.data),Core.$apply(e)},Core.register(n,e,e.reqs,Core.onSuccess(e.render))}])}(Jmx||(Jmx={}));var Core;!function(e){function t(e,t,n,i){e.graphForce&&e.graphForce.stop(),i||(i=$("#canvas")[0]);var r=$(i);if(r.children("svg").remove(),t.length){var o=r.parent().width(),a=r.parent().height();if(100>a){var s=r.offset();a=$(document).height()-5,s&&(a-=s.top)}var l=d3.select(r[0]).append("svg").attr("width",o).attr("height",a),u=d3.layout.force().distance(100).charge(-1200).linkDistance(50).size([o,a]);e.graphForce=u,l.append("svg:defs").selectAll("marker").data(["from"]).enter().append("svg:marker").attr("id",String).attr("viewBox","0 -5 10 10").attr("refX",25).attr("refY",-1.5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("svg:path").attr("d","M0,-5L10,0L0,5"),u.nodes(t).links(n).start();var c=l.selectAll(".link").data(n).enter().append("line").attr("class","link");c.attr("class","link from"),c.attr("marker-end","url(#from)");var d=l.selectAll(".node").data(t).enter().append("g").attr("class","node").call(u.drag);d.append("image").attr("xlink:href",function(e){return e.imageUrl}).attr("x",-15).attr("y",-15).attr("width",30).attr("height",30),d.append("text").attr("dx",20).attr("dy",".35em").text(function(e){return e.label}),u.on("tick",function(){c.attr("x1",function(e){return e.source.x}).attr("y1",function(e){return e.source.y}).attr("x2",function(e){return e.target.x}).attr("y2",function(e){return e.target.y}),d.attr("transform",function(e){return"translate("+e.x+","+e.y+")"})})}}function n(e,t,n){var i={};e.forEach(function(e){var t=e.id;void 0===t?console.log("No node found for node "+JSON.stringify(e)):(void 0===e.edges&&(e.edges=[]),e.label||(e.label="node "+t),i[t]=e)});var r=d3.values(i);return t.forEach(function(e){var t=i[e.source],r=i[e.target];if(void 0===t||void 0===r)console.log("Bad link! "+t+" target "+r+" for "+e);else{var o={source:t,target:r};n.push(o),t.edges.push(o),r.edges.push(o)}}),r}function i(t,n,i,r,s,l,u){function c(e){var t=e.dagre.points.slice(0),n=dagre.util.intersectRect(e.source.dagre,t.length>0?t[0]:e.source.dagre),i=dagre.util.intersectRect(e.target.dagre,t.length>0?t[t.length-1]:e.source.dagre);return t.unshift(n),t.push(i),d3.svg.line().x(function(e){return e.x}).y(function(e){return e.y}).interpolate("linear")(t)}function d(e,t,n){e.dagre.points.forEach(function(e){e.x=Math.max(0,Math.min(_.width,e.x+t)),e.y=Math.max(0,Math.min(_.height,e.y+n))})}void 0===l&&(l=!1),void 0===u&&(u=null);var p=10,h=[],f=e.createGraphStates(t,n,h),g=s?d3.select(s):d3.select("svg");s&&$(s).children("g").remove(),$(g).children("g").remove();var m=g.append("g").attr("transform","translate(5, 5)"),t=m.selectAll("g .node").data(f).enter().append("g").attr("class","node").attr("data-cid",function(e){return e.cid}).attr("id",function(e){return"node-"+e.label});t.append("title").text(function(e){return e.tooltip||""});var v=m.selectAll("path .edge").data(h).enter().append("path").attr("class","edge").attr("marker-end","url(#arrowhead)"),y=t.append("rect").attr("rx","4").attr("ry","4").attr("class",function(e){return e.type}),b=t.append("image").attr("xlink:href",function(e){return e.imageUrl}).attr("x",-12).attr("y",-20).attr("height",24).attr("width",24),w=t.append("text").attr("text-anchor","end").attr("class","counter").attr("x",0).attr("dy",0).text(o),x=(t.append("text").attr("text-anchor","middle").attr("class","inflight").attr("x",10).attr("dy",-32).text(a),t.append("text").attr("text-anchor","middle").attr("x",0));x.append("tspan").attr("x",0).attr("dy",28).text(function(e){return e.label});var k=12,C=80;x.each(function(e){var t=this.getBBox();e.bbox=t,t.width<C&&(t.width=C),e.width=t.width+2*p,e.height=t.height+2*p+k}),y.attr("x",function(e){return-(e.bbox.width/2+p)}).attr("y",function(e){return-(e.bbox.height/2+p+k/2)}).attr("width",function(e){return e.width}).attr("height",function(e){return e.height}),null!=u&&y.on("click",u),b.attr("x",function(e){return-e.bbox.width/2}),x.attr("x",function(e){return-e.bbox.width/2}).attr("y",function(e){return-e.bbox.height/2}),w.attr("x",function(e){var t=e.bbox.width;return t/2}),dagre.layout().nodeSep(50).edgeSep(10).rankSep(50).nodes(f).edges(h).debugLevel(1).run(),t.attr("transform",function(e){return"translate("+e.dagre.x+","+e.dagre.y+")"}),v.attr("id",function(e){return e.dagre.id}).attr("d",function(e){return c(e)});var S=g.node();if(S){var _=S.getBBox();_&&(g.attr("width",_.width+10),g.attr("height",_.height+10))}if(l){var T=d3.behavior.drag().origin(function(e){return e.pos?{x:e.pos.x,y:e.pos.y}:{x:e.dagre.x,y:e.dagre.y}}).on("drag",function(e,t){var n=e.dagre.x,i=e.dagre.y;e.dagre.x=Math.max(e.width/2,Math.min(_.width-e.width/2,d3.event.x)),e.dagre.y=Math.max(e.height/2,Math.min(_.height-e.height/2,d3.event.y)),d3.select(this).attr("transform","translate("+e.dagre.x+","+e.dagre.y+")");var r=e.dagre.x-n,o=e.dagre.y-i;e.edges.forEach(function(e){d(e,r,o),d3.select("#"+e.dagre.id).attr("d",c(e))})}),E=d3.behavior.drag().on("drag",function(e,t){d(e,d3.event.dx,d3.event.dy),d3.select(this).attr("d",c(e))});t.call(T),v.call(E)}return f}function r(e){var t=d3.select("svg");t.selectAll("text.counter").text(o),t.selectAll("text.inflight").text(a),t.selectAll("g .node title").text(function(e){return e.tooltip||""})}function o(e){return e.counter||""}function a(e){return e.inflight||""}e.d3ForceGraph=t,e.createGraphStates=n,e.dagreLayoutGraph=i,e.dagreUpdateGraphData=r}(Core||(Core={}));var Tree;!function(e){function t(e){i(e,!0)}function n(e){i(e,!1)}function i(e,t){$(e).dynatree("getRoot").visit(function(e){e.expand(t)})}function r(t){if(t){angular.isArray(t)&&t.forEach(function(t){e.sanitize(t)});var n=t.title;n&&(t.title=n.unescapeHTML(!0).escapeHTML()),t.children&&e.sanitize(t.children)}}e.pluginName="tree",e.log=Logger.get("Tree"),e.expandAll=t,e.contractAll=n,e.sanitize=r,e._module=angular.module(e.pluginName,[]),e._module.directive("hawtioTree",["workspace","$timeout","$location",function(t,n,i){return function(r,o,a){function s(e){var t=null,n=a[e];return n&&(t=Core.pathGet(r,n),angular.isFunction(t)||(t=null)),t}function l(){Core.$applyNowOrLater(r)}function u(n){if(x=n,x&&e.sanitize(x),x&&!p){var s=$(o),u=Core.asArray(x),c=a.hideroot;"true"===c&&(u=x.children);var d={clickFolderMode:3,onActivate:function(e){var n=e.data;f?f(n,e):t.updateSelectionNode(n),Core.$apply(r)},onClick:function(e,t){if(t.metaKey){t.preventDefault();var n=i.absUrl();if(e&&e.data){var r=e.data.key;if(r){var o=i.search();o[y]=r;var a=n.indexOf("?");0>=a?n+="?":n=n.substring(0,a+1),n+=$.param(o)}}return window.open(n,"_blank"),window.focus(),!1}return!0},persist:!1,debugLevel:0,children:u,dnd:{onDragStart:g?g:function(e){return console.log("onDragStart!"),!0},onDragEnter:m?m:function(e,t){return console.log("onDragEnter!"),!0},onDrop:v?v:function(e,t,n){return console.log("onDrop!"),t.move(e,n),!0}}};v||m||g||delete d.dnd,p=s.dynatree(d);var h=!1,b=a.activatenodes;if(b){var w=r[b],x=s.dynatree("getTree");w&&x&&angular.forEach(Core.asArray(w),function(e){x.activateKey(e),h=!0})}var k=s.dynatree("getRoot");if(k){var C=a.onroot;if(C){var S=r[C];S&&S(k)}if(!h){var u=k.getChildren();if(u&&u.length){var _=u[0];_.expand(!0),_.activate(!0)}}}}l()}function c(){h=n(function(){l()},300)}var d=null,p=null,h=null,f=s("onselect"),g=s("ondragstart"),m=s("ondragenter"),v=s("ondrop"),d=a.hawtioTree,y=d;r.$watch(d,u),r.$on("hawtio.tree."+d,function(e){var t=Core.pathGet(r,d);u(t)}),o.bind("$destroy",function(){n.cancel(h)}),c()}}]),e._module.run(["helpRegistry",function(t){t.addDevDoc(e.pluginName,"app/tree/doc/developer.md")}]),hawtioPluginLoader.addModule(e.pluginName)}(Tree||(Tree={}));var Jmx;!function(e){e._module.controller("Jmx.TreeHeaderController",["$scope",function(e){e.expandAll=function(){Tree.expandAll("#jmxtree")},e.contractAll=function(){Tree.contractAll("#jmxtree")}}]),e._module.controller("Jmx.MBeansController",["$scope","$location","workspace",function(t,n,i){function r(){e.updateTreeSelectionFromURL(n,$("#jmxtree"))}t.num=1,t.$on("$routeChangeSuccess",function(e,t,n){setTimeout(r,50)}),t.select=function(e){t.workspace.updateSelectionNode(e),Core.$apply(t)},t.populateTree=function(){var o=$("#jmxtree");t.tree=i.tree,e.enableTree(t,n,i,o,t.tree.children,!0),setTimeout(r,50)},t.$on("jmxTreeUpdated",t.populateTree),t.populateTree()}])}(Jmx||(Jmx={}));var Jmx;!function(e){e.NavBarController=e._module.controller("Jmx.NavBarController",["$scope","$location","workspace","$route","jolokia","localStorage",function(t,n,i,r,o,a){t.hash=i.hash(),t.topLevelTabs=[],t.subLevelTabs=i.subLevelTabs,t.currentPerspective=null,t.localStorage=a,t.recentConnections=[],t.goTo=function(e){n.url(e)},t.$watch("hash",function(t,n){t!==n&&e.log.debug("hash changed from ",n," to ",t)}),t.$on("$routeChangeSuccess",function(){t.hash=i.hash()}),t.isValid=function(e){return"isValid"in e?e.isValid(i):!0},t.link=function(e,t){void 0===t&&(t=!1);var i;i=angular.isString(e)?e:angular.isObject(e)?e.href():null,i=i||"";var r=["tab","nid","chapter","pref","q"];return!t&&i&&(i.indexOf("?p=")>=0||i.indexOf("&p=")>=0)&&r.push("p"),Core.createHref(n,i,r)},t.fullScreenLink=function(){var e="#"+n.path()+"?tab=notree";return Core.createHref(n,e,["tab"])},t.addToDashboardLink=function(){var e="#"+n.path()+i.hash(),t="#/dashboard/add?tab=dashboard&href="+encodeURIComponent(e);if(n.url().has("/jmx/charts")){var r={size_x:4,size_y:3};t+="&size="+encodeURIComponent(angular.toJson(r))}return t},t.isActive=function(e){if(angular.isString(e))return i.isLinkActive(e);var t=e.isActive;return t?t(i):i.isLinkActive(e.href())},t.isTopTabActive=function(e){if(angular.isString(e))return i.isTopTabActive(e);var t=e.isActive;return t?t(i):i.isTopTabActive(e.href())},t.activeLink=function(){var e=t.topLevelTabs();if(!e)return"Loading...";var n=e.find(function(e){return t.isActive(e)});return n?n.content:""}}])}(Jmx||(Jmx={}));var Jmx;!function(e){e._module.controller("Jmx.OperationController",["$scope","workspace","jolokia","jolokiaUrl","$timeout","$location","localStorage","$browser",function(t,n,i,r,o,a,s,l){t.item=t.selectedOperation,t.title=t.item.humanReadable,t.desc=t.item.desc,t.operationResult="",t.executeIcon="fa fa-ok",t.mode="text",t.entity={},t.formConfig={hideLegend:!0,properties:{}},t.jolokiaUrl=e.getUrlForThing(r,"exec",n.getSelectedMBeanName(),t.item.name),t.item.args.forEach(function(e){var n={type:e.type,tooltip:e.desc,description:"Type: "+e.type};("java.util.list"===e.type.toLowerCase()||"[j"===e.type.toLowerCase())&&(n.type="array",n.items={type:"string"}),"java.util.map"===e.type.toLowerCase()&&(n.type="map",n.items={key:{type:"string"},value:{type:"string"}}),t.formConfig.properties[e.name]=n}),e.log.debug("Form config: ",t.formConfig),o(function(){$("html, body").animate({scrollTop:0},"medium")},250),t.dump=function(e){console.log(e)},t.ok=function(){t.operationResult=""},t.reset=function(){t.entity={}},t.close=function(){t.$parent.showInvoke=!1},t.handleResponse=function(e){t.executeIcon="fa fa-ok",t.operationStatus="success",null===e||"null"===e?t.operationResult="Operation Succeeded!":"string"==typeof e?t.operationResult=e:t.operationResult=angular.toJson(e,!0),t.mode=CodeEditor.detectTextFormat(t.operationResult),Core.$apply(t)},t.onSubmit=function(){var n=t.entity;e.log.debug("onSubmit: json:",n),e.log.debug("$scope.item.args: ",t.item.args),angular.forEach(n,function(e,n){t.item.args.find(function(e){return e.name===n}).value=e}),t.execute()},t.execute=function(){var e=n.selection;if(e){var r=e.objectName;if(r){var o=[r,t.item.name];t.item.args&&t.item.args.forEach(function(e){o.push(e.value)}),o.push(Core.onSuccess(t.handleResponse,{error:function(e){t.executeIcon="fa fa-ok",t.operationStatus="error";var n=e.error;t.operationResult=n;var i=e.stacktrace;i&&(t.operationResult=i),Core.$apply(t)}})),t.executeIcon="fa fa-spinner fa fa-spin";var a=i.execute;a.apply(i,o)}}}}]),e._module.controller("Jmx.OperationsController",["$scope","workspace","jolokia","rbacACLMBean","$templateCache",function(t,n,i,r,o){function a(e){return"("+e.map(function(e){return e.type}).join()+")"}function s(e){for(var t in e)t=""+t,e[t].name=t,e[t].humanReadable=Core.humanizeValue(t);return e}function l(n,o){var a={};a[n]=[],angular.forEach(o,function(e,t){a[n].push(e.name)}),r.then(function(r){i.request({type:"exec",mbean:r,operation:"canInvoke(java.util.Map)",arguments:[a]},Core.onSuccess(function(i){var r=i.value;angular.forEach(r[n],function(e,t){o[t].canInvoke=e.CanInvoke}),e.log.debug("Got operations: ",t.operations),Core.$apply(t)},{error:function(n){e.log.debug("Failed to fetch ACL for operations: ",n),Core.$apply(t)}}))})}function u(e){t.fetched=!0;var n=e.value.op,i={};angular.forEach(n,function(e,t){angular.isArray(e)?angular.forEach(e,function(e,n){i[t+a(e.args)]=e}):i[t+a(e.args)]=e}),t.operations=s(i),t.isOperationsEmpty()?Core.$apply(t):(l(t.objectName,t.operations),Core.$apply(t))}t.fetched=!1,t.operations={},t.objectName="",t.methodFilter="",t.workspace=n,t.selectedOperation=null,t.showInvoke=!1,t.template="",t.invokeOp=function(e){t.canInvoke(e)&&(t.selectedOperation=e,t.showInvoke=!0)},t.getJson=function(e){return angular.toJson(e,!0)},t.cancel=function(){t.selectedOperation=null,t.showInvoke=!1},t.$watch("showInvoke",function(e,n){e!==n&&(e?t.template=o.get("operationTemplate"):t.template="")});var c=_.debounce(function(){var e=n.selection||n.getSelectedMBean();e&&(t.objectName=e.objectName,t.objectName&&i.request({type:"list",path:Core.escapeMBeanPath(t.objectName)},Core.onSuccess(u)))},100,{trailing:!0});t.isOperationsEmpty=function(){return $.isEmptyObject(t.operations)},t.doFilter=function(e){return Core.isBlank(t.methodFilter)?!0:e.name.toLowerCase().has(t.methodFilter.toLowerCase())||e.humanReadable.toLowerCase().has(t.methodFilter.toLowerCase())?!0:!1},t.canInvoke=function(e){return"canInvoke"in e?e.canInvoke:!0},t.getClass=function(e){return t.canInvoke(e)?"can-invoke":"cant-invoke"},t.$watch("workspace.selection",function(e,t){n.moveIfViewInvalid()||c()})}])}(Jmx||(Jmx={}));var Jmx;!function(e){e.ViewController=e._module.controller("Jmx.ViewController",["$scope","$route","$location","layoutTree","layoutFull","viewRegistry",function(t,n,i,r,o,a){function s(t){var n=void 0;return _.forIn(a,function(i,r){if(!n)if(r.startsWith("/")&&r.endsWith("/")){var o=r.substring(1,r.length-1);try{var a=new RegExp(o,"");a.exec(t)&&(n=i)}catch(s){e.log.debug("Invalid RegExp "+o+" for viewRegistry value: "+i)}}else t.startsWith(r)&&(n=i)}),n}function l(){var n=null,o=i.search(),a=o.tab;if(angular.isString(a)&&(n=s(a)),!n){var l=i.path();l&&(l.startsWith("/")&&(l=l.substring(1)),n=s(l))}return n||(n=r),t.viewPartial=n,e.log.debug("Using view partial: "+n),n}l(),t.$on("$routeChangeSuccess",function(e,t,n){l()})}])}(Jmx||(Jmx={}));var JVM;!function(e){e.windowJolokia=void 0,e._module=angular.module(e.pluginName,[]),e._module.config(["$provide","$routeProvider",function(t,n){n.when("/jvm",{redirectTo:"/jvm/connect"}).when("/jvm/welcome",{templateUrl:UrlHelpers.join(e.templatePath,"welcome.html")}).when("/jvm/discover",{templateUrl:UrlHelpers.join(e.templatePath,"discover.html")}).when("/jvm/connect",{templateUrl:UrlHelpers.join(e.templatePath,"connect.html")}).when("/jvm/local",{templateUrl:UrlHelpers.join(e.templatePath,"local.html")})}]),e._module.constant("mbeanName","hawtio:type=JVMList"),e._module.run(["HawtioNav","$location","workspace","viewRegistry","layoutFull","helpRegistry","preferencesRegistry","ConnectOptions","locationChangeStartTasks","HawtioDashboard","HawtioExtension","$templateCache","$compile",function(t,n,i,r,o,a,s,l,u,c,d,p,h){d.add("hawtio-header",function(t){var n=p.get(UrlHelpers.join(e.templatePath,"navbarHeaderExtension.html"));return h(n)(t)}),c.inDashboard||u.addTask("ConParam",function(e,t,i){if(HawtioCore.injector&&l&&l.name&&t){var r=new URI(t).query(!0);r.con||(r.con=l.name,n.search(r))}});var f=t.builder(),g=f.id("jvm-remote").href(function(){return"/jvm/connect"}).title(function(){return"Remote"}).tooltip(function(){return"To connect to a remote JVM"}).build(),m=f.id("jvm-local").href(function(){return"/jvm/local"}).title(function(){return"Local"}).tooltip(function(){return"To connect to a locale JVM"}).show(function(){return e.hasLocalMBean(i)}).build(),v=f.id("jvm-discover").href(function(){return"/jvm/discover"}).title(function(){return"Discover"}).tooltip(function(){return"To discover JVMs in the network that has Jolokia agent running"}).show(function(){return e.hasDiscoveryMBean(i)}).build(),y=f.id("jvm").href(function(){return"/jvm"}).title(function(){return"Connect"}).isValid(function(){return null==l||null==l.name}).tabs(g,m,v).build();t.add(y),a.addUserDoc("jvm","plugins/jvm/doc/help.md"),s.addTab("Connect","plugins/jvm/html/reset.html"),s.addTab("Jolokia","plugins/jvm/html/jolokiaPreferences.html")}]),hawtioPluginLoader.addModule(e.pluginName)}(JVM||(JVM={}));var JVM;!function(e){e.ConnectController=e._module.controller("JVM.ConnectController",["$scope","$location","localStorage","workspace","$http",function(t,n,i,r,o){function a(){return Core.createConnectOptions({scheme:"http",host:"localhost",path:"jolokia",port:8181,userName:"",password:"",useProxy:!t.disableProxy})}e.configureScope(t,n,r),t.forms={},o.get("proxy").then(function(e){200===e.status&&Core.isBlank(e.data)?t.disableProxy=!1:t.disableProxy=!0});var s=!1;if(r.addNamedTreePostProcessor("ConnectTab",function(e){s=r&&r.tree&&r.tree.children&&r.tree.children.length>0,t.disableProxy=!s||Core.isChromeApp(),Core.$apply(t)}),t.lastConnection="",e.connectControllerKey in i)try{t.lastConnection=angular.fromJson(i[e.connectControllerKey])}catch(l){t.lastConnection="",delete i[e.connectControllerKey]}t.connectionConfigs=Core.loadConnectionMap(),Core.isBlank(t.lastConnection)?t.currentConfig=a():t.currentConfig=t.connectionConfigs[t.lastConnection],t.formConfig={properties:{name:{type:"java.lang.String",tooltip:"Name for this connection",required:!0,"input-attributes":{placeholder:"Unnamed..."}},scheme:{type:"java.lang.String",tooltip:"HTTP or HTTPS","enum":["http","https"],required:!0},host:{type:"java.lang.String",tooltip:"Target host to connect to",required:!0},port:{type:"java.lang.Integer",tooltip:"The HTTP port used to connect to the server","input-attributes":{min:"0"},required:!0},path:{type:"java.lang.String",tooltip:"The URL path used to connect to Jolokia on the remote server"},userName:{type:"java.lang.String",tooltip:"The user name to be used when connecting to Jolokia"},password:{type:"password",tooltip:"The password to be used when connecting to Jolokia"},useProxy:{type:"java.lang.Boolean",tooltip:"Whether or not we should use a proxy. See more information in the panel to the left.","control-attributes":{"ng-hide":"disableProxy"}}}},t.newConnection=function(){t.lastConnection=""},t.deleteConnection=function(){delete t.connectionConfigs[t.lastConnection],Core.saveConnectionMap(t.connectionConfigs);var e=_.keys(t.connectionConfigs);0===e.length?t.lastConnection="":t.lastConnection=e[0]},t.$watch("lastConnection",function(n,r){e.log.debug("lastConnection: ",n),n!==r&&(Core.isBlank(n)?t.currentConfig=a():t.currentConfig=t.connectionConfigs[n],i[e.connectControllerKey]=angular.toJson(n))},!0),t.save=function(){t.gotoServer(t.currentConfig,null,!0)},t.gotoServer=function(e,n,r){e||(e=Core.getConnectOptions(t.lastConnection));var o=e.name;return t.connectionConfigs[o]=e,t.lastConnection=o,r===!0?(Core.saveConnectionMap(t.connectionConfigs),t.connectionConfigs=Core.loadConnectionMap(),angular.extend(t.currentConfig,t.connectionConfigs[t.lastConnection]),void Core.$apply(t)):(Core.connectToServer(i,e),t.connectionConfigs=Core.loadConnectionMap(),angular.extend(t.currentConfig,t.connectionConfigs[t.lastConnection]),void Core.$apply(t))}}])}(JVM||(JVM={}));var JVM;!function(e){e._module.controller("JVM.DiscoveryController",["$scope","localStorage","jolokia",function(t,n,i){function r(e){if(!e.url)return void Core.notification("warning","No URL available to connect to agent");var t=Core.createConnectOptions();t.name=e.agent_description;var i=Core.parseUrl(e.url);angular.extend(t,i),t.userName=e.username,t.password=e.password,Core.connectToServer(n,t)}t.discovering=!0,t.agents=void 0,t.$watch("agents",function(e,n){e!==n&&(t.selectedAgent=t.agents.find(function(e){return e.selected}))},!0),t.closePopover=function(e){$(e.currentTarget).parents(".popover").prev().popover("hide")},t.connectWithCredentials=function(e,n){t.closePopover(e),r(n)},t.gotoServer=function(e,t){t.secured?$(e.currentTarget).popover("show"):r(t)},t.getElementId=function(e){return e.agent_id.dasherize().replace(/\./g,"-")},t.getLogo=function(t){return t.server_product?e.logoRegistry[t.server_product]:e.logoRegistry.generic},t.filterMatches=function(e){return Core.isBlank(t.filter)?!0:angular.toJson(e).toLowerCase().has(t.filter.toLowerCase())},t.getAgentIdClass=function(e){return t.hasName(e)?"":"strong"},t.hasName=function(e){return e.server_vendor&&e.server_product&&e.server_version?!0:!1},t.render=function(e){if(t.discovering=!1,e){var n=angular.toJson(e,!0);t.responseJson!==n&&(t.responseJson=n,t.agents=e)}Core.$apply(t)},t.fetch=function(){t.discovering=!0,i.execute("jolokia:type=Discovery","lookupAgentsWithTimeout(int)",1e4,Core.onSuccess(t.render))},t.fetch()}])}(JVM||(JVM={}));var JVM;!function(e){e.HeaderController=e._module.controller("JVM.HeaderController",["$scope","ConnectOptions",function(e,t){t&&(e.containerName=t.name||"",t.returnTo&&(e.goBack=function(){window.location.href=t.returnTo}))}])}(JVM||(JVM={}));var JVM;!function(e){e._module.controller("JVM.JolokiaPreferences",["$scope","localStorage","jolokiaParams","$window",function(t,n,i,r){var o={properties:{maxDepth:{type:"number",description:"The number of levels jolokia will marshal an object to json on the server side before returning"},maxCollectionSize:{type:"number",description:"The maximum number of elements in an array that jolokia will marshal in a response"}}};t.entity=t,t.config=o,Core.initPreferenceScope(t,n,{maxDepth:{value:e.DEFAULT_MAX_DEPTH,converter:parseInt,formatter:parseInt,post:function(e){i.maxDepth=e,n.jolokiaParams=angular.toJson(i)}},maxCollectionSize:{value:e.DEFAULT_MAX_COLLECTION_SIZE,converter:parseInt,formatter:parseInt,post:function(e){i.maxCollectionSize=e,n.jolokiaParams=angular.toJson(i)}}}),t.reboot=function(){r.location.reload()}}])}(JVM||(JVM={}));var JVM;!function(e){var t=["/hawtio/jolokia","/jolokia","jolokia"],n=null;hawtioPluginLoader.registerPreBootstrapTask(function(i){function r(e){0===e.length?i():o(e.pop())}function o(o){e.log.debug("trying URL: ",o),$.ajax(o).always(function(a,s,l){if(200===l.status)try{var u=angular.fromJson(a);"value"in u&&"agent"in u.value?(n=o,e.log.debug("Found jolokia agent at: ",o," version: ",u.value.agent),i()):r(t)}catch(c){r(t)}else 401===l.status||403===l.status?(n=o,e.log.debug("Using URL: ",o," assuming it could be an agent but got return code: ",l.status),i()):r(t)})}var a=new URI,s=a.query(!0);e.log.debug("query: ",s);var l=s.jolokiaUrl;if(l){delete s["sub-tab"],delete s["main-tab"],l=l.unescapeURL();var u=new URI(l),c=s.title||"Unknown Connection",d=s.token||Core.trimLeading(a.hash(),"#"),p=Core.createConnectOptions({name:c,scheme:u.protocol(),host:u.hostname(),port:Core.parseIntValue(u.port()),path:Core.trimLeading(u.pathname(),"/"),useProxy:!1});Core.isBlank(d)||(p.token=d),_.merge(p,u.query(!0)),_.assign(p,s),e.log.debug("options: ",p);var h=Core.loadConnectionMap();h[c]=p,Core.saveConnectionMap(h),a.hash("").query({con:c}),window.location.replace(a.toString())}var f=s.con;return f?(e.log.debug("Not discovering jolokia"),void i()):void o(t.pop())}),e._module.service("ConnectionName",["$location",function(t){var n=null;return function(i){if(void 0===i&&(i=!1),!Core.isBlank(n)&&!i)return n;n="";var r=t.search();return"con"in window?(n=window.con,e.log.debug("Using connection name from window: ",n)):"con"in r?(n=r.con,e.log.debug("Using connection name from URL: ",n)):e.log.debug("No connection name found, using direct connection to JVM"),n}}]),e._module.service("ConnectOptions",["ConnectionName",function(e){var t=e();if(Core.isBlank(t))return!1;var n=Core.getConnectOptions(t);try{window.opener&&"passUserDetails"in window.opener&&(n.userName=window.opener.passUserDetails.username,n.password=window.opener.passUserDetails.password)}catch(i){}return n}]),e._module.factory("jolokiaUrl",["ConnectOptions","documentBase",function(t,i){var r=void 0;if(t&&t.name?(r=Core.createServerConnectionUrl(t),e.log.debug("Using configured URL")):(e.log.debug("Using discovered URL"),r=n),!r)return!1;var o=new URI,a=void 0;return a=_.startsWith(r,"/")||_.startsWith(r,"http")?new URI(r):new URI(UrlHelpers.join(i,r)),a.protocol()||a.protocol(o.protocol()),a.hostname()||a.host(o.hostname()),a.port()||a.port(o.port()),r=a.toString(),e.log.debug("Complete jolokia URL: ",r),r}]),e._module.factory("jolokiaStatus",function(){return{xhr:null}}),e.DEFAULT_MAX_DEPTH=7,e.DEFAULT_MAX_COLLECTION_SIZE=500,e._module.factory("jolokiaParams",["jolokiaUrl","localStorage",function(t,n){var i={canonicalNaming:!1,ignoreErrors:!0,mimeType:"application/json",maxDepth:e.DEFAULT_MAX_DEPTH,maxCollectionSize:e.DEFAULT_MAX_COLLECTION_SIZE};return"jolokiaParams"in n?i=angular.fromJson(n.jolokiaParams):n.jolokiaParams=angular.toJson(i),i.url=t,i}]),e._module.factory("jolokia",["$location","localStorage","jolokiaStatus","$rootScope","userDetails","jolokiaParams","jolokiaUrl","ConnectOptions","HawtioDashboard",function(t,n,i,r,o,a,s,l,u){if(u.inDashboard&&e.windowJolokia)return e.windowJolokia;if(s){var c=null,d=null;if(l.userName&&l.password)c=l.userName,d=l.password;else if(angular.isDefined(o)&&angular.isDefined(o.username)&&angular.isDefined(o.password))c=o.username,d=o.password;else{var p=t.search();c=p._user,d=p._pwd,angular.isArray(c)&&(c=c[0]),angular.isArray(d)&&(d=d[0])}var h=["Authorization","X-Authorization"];c&&d&&!l.token?(o.username=c,o.password=d,e.log.debug("Setting authorization header to username/password"),$.ajaxSetup({beforeSend:function(e){h.forEach(function(t){e.setRequestHeader(t,Core.getBasicAuthHeader(c,d))})}})):l.token?(e.log.debug("Setting authorization header to token"),$.ajaxSetup({beforeSend:function(e){h.forEach(function(t){e.setRequestHeader(t,"Bearer "+l.token)})}})):e.log.debug("Not setting any authorization header"),a.ajaxError=function(e,t,n){401===e.status||403===e.status?(o.username=null,o.password=null,delete o.loginDetails,delete window.opener.passUserDetails):(i.xhr=e,!e.responseText&&n&&(e.responseText=n.stack)),Core.$apply(r)};var f=new Jolokia(a);return f.stop(),"updateRate"in n&&n.updateRate>0&&f.start(n.updateRate),e.windowJolokia=f,f}var g={isDummy:!0,running:!1,request:function(e,t){return null},register:function(e,t){return null},list:function(e,t){return null},search:function(e,t){return null},getAttribute:function(e,t,n,i){return null},setAttribute:function(e,t,n,i,r){},version:function(e){return null},execute:function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return null},start:function(e){g.running=!0},stop:function(){g.running=!1},isRunning:function(){return g.running},jobs:function(){return[]}};return e.windowJolokia=g,g}])}(JVM||(JVM={}));var JVM;!function(e){e._module.controller("JVM.JVMsController",["$scope","$window","$location","localStorage","workspace","jolokia","mbeanName",function(t,n,i,r,o,a,s){function l(e){t.initDone=!0,t.data=e.value,0===t.data.length&&(t.status="Could not discover local JVM processes"),Core.$apply(t)}e.configureScope(t,i,o),t.data=[],t.deploying=!1,t.status="",t.initDone=!1,t.filter="",t.filterMatches=function(e){return Core.isBlank(t.filter)?!0:e.alias.toLowerCase().has(t.filter.toLowerCase())},t.fetch=function(){a.request({type:"exec",mbean:s,operation:"listLocalJVMs()",arguments:[]},{success:l,error:function(e){t.data=[],t.initDone=!0,t.status="Could not discover local JVM processes: "+e.error,Core.$apply(t)}})},t.stopAgent=function(e){a.request({type:"exec",mbean:s,operation:"stopAgent(java.lang.String)",arguments:[e]},Core.onSuccess(function(){t.fetch()}))},t.startAgent=function(e){a.request({type:"exec",mbean:s,operation:"startAgent(java.lang.String)",arguments:[e]},Core.onSuccess(function(){t.fetch()}))},t.connectTo=function(n,i,o,a,s){var l={};l.scheme=i,l.host=o,l.port=a,l.path=s,l.userName="",l.password="";var u=Core.createConnectToServerOptions(l);u.name="local",e.log.debug("Connecting to local JVM agent: "+n),Core.connectToServer(r,u),Core.$apply(t)},t.fetch()}])}(JVM||(JVM={}));var JVM;!function(e){e._module.controller("JVM.NavController",["$scope","$location","workspace",function(t,n,i){e.configureScope(t,n,i)}])}(JVM||(JVM={}));var JVM;!function(e){e._module.controller("JVM.ResetController",["$scope","localStorage",function(t,n){t.doClearConnectSettings=function(){var t=function(){delete n[e.connectControllerKey],delete n[e.connectionSettingsKey],setTimeout(function(){window.location.reload()},10)};t()}}])}(JVM||(JVM={}));var Threads;!function(e){e.pluginName="threads",e.templatePath="plugins/threads/html/",e.log=Logger.get("Threads"),e.jmxDomain="java.lang",e.mbeanType="Threading",e.mbean=e.jmxDomain+":type="+e.mbeanType,e._module=angular.module(e.pluginName,[]),e._module.config(["$routeProvider",function(t){t.when("/threads",{templateUrl:UrlHelpers.join(e.templatePath,"index.html")})}]),e._module.run(["$templateCache","workspace","viewRegistry","layoutFull","helpRegistry","HawtioNav",function(t,n,i,r,o,a){i.threads=r,o.addUserDoc("threads","plugins/threads/doc/help.md");var s=a.builder(),l=s.id("threads-toolbar").href(function(){return"#"}).template(function(){return t.get(UrlHelpers.join(e.templatePath,"toolbar.html"))}).build(),u=s.id("threads").href(function(){return"/threads"}).isValid(function(){return n.treeContainsDomainAndProperties(e.jmxDomain,{type:e.mbeanType})}).title(function(){return"Threads"}).tooltip(function(){return"View information about the threads in the JVM"}).isSelected(function(){return n.isTopTabActive("threads")}).tabs(l).build();a.add(u)}]),hawtioPluginLoader.addModule(e.pluginName)}(Threads||(Threads={}));var Threads;!function(e){e._module.controller("Threads.ToolbarController",["$scope","$rootScope","jolokia",function(t,n,i){t.$on("ThreadControllerSupport",function(e,n){t.support=n}),t.$on("ThreadControllerThreads",function(n,i){e.log.debug("got threads: ",i),t.unfilteredThreads=i,t.totals={},i.forEach(function(e){var n=e.threadState;n in t.totals?t.totals[n]++:t.totals[n]=1}),t.threads=i}),t.stateFilter="NONE",t.filterOn=function(e){t.stateFilter=e,n.$broadcast("ThreadsToolbarState",e)},t.selectedFilterClass=function(e){return e===t.stateFilter?"active":""},t.getMonitorClass=function(e,t){return t.toString()},t.getMonitorName=function(e){return e=e.replace("Supported",""),e.titleize()}}]),e._module.controller("Threads.ThreadsController",["$scope","$rootScope","$routeParams","$templateCache","jolokia",function(t,n,i,r,o){function a(e){var i=angular.toJson(e.value,!0);if(t.getThreadInfoResponseJson!==i){t.getThreadInfoResponseJson=i;var r=e.value.exclude(function(e){return null===e});t.unfilteredThreads=r,r=t.filterThreads(t.stateFilter,r),
|
|
3265
|
|
-t.threads=r,n.$broadcast("ThreadControllerThreads",r),Core.$apply(t)}}function s(n){e.log.info("Disabled contention monitoring: ",n),Core.$apply(t)}function l(n){t.$on("$routeChangeStart",function(){o.setAttribute(e.mbean,"ThreadContentionMonitoringEnabled",!1,Core.onSuccess(s))}),e.log.info("Enabled contention monitoring"),Core.$apply(t)}t.selectedRowJson="",t.lastThreadJson="",t.getThreadInfoResponseJson="",t.threads=[],t.totals={},t.support={},t.row={},t.threadSelected=!1,t.selectedRowIndex=-1,t.stateFilter="NONE",t.showRaw={expanded:!1},t.addToDashboardLink=function(){var e="#/threads",t=angular.toJson({size_x:8,size_y:2}),n="Threads";return"#/dashboard/add?tab=dashboard&href="+encodeURIComponent(e)+"&title="+encodeURIComponent(n)+"&size="+encodeURIComponent(t)},t.isInDashboardClass=function(){return angular.isDefined(t.inDashboard&&t.inDashboard)?"threads-dashboard":"threads logbar"},t.$watch("searchFilter",function(e,n){e!==n&&(t.threadGridOptions.filterOptions.filterText=e)}),t.$watch("stateFilter",function(e,n){e!==n&&("NONE"===t.stateFilter?t.threads=t.unfilteredThreads:t.threads=t.filterThreads(t.stateFilter,t.unfilteredThreads))}),t.threadGridOptions={selectedItems:[],data:"threads",showSelectionCheckbox:!1,enableRowClickSelection:!0,multiSelect:!1,primaryKeyFn:function(e,t){return e.threadId},filterOptions:{filterText:""},sortInfo:{sortBy:"threadId",ascending:!1},columnDefs:[{field:"threadId",displayName:"ID"},{field:"threadState",displayName:"State",cellTemplate:r.get("threadStateTemplate")},{field:"threadName",displayName:"Name"},{field:"waitedTime",displayName:"Waited Time",cellTemplate:'<div class="ngCellText" ng-show="row.entity.waitedTime > 0">{{row.entity.waitedTime | humanizeMs}}</div>'},{field:"blockedTime",displayName:"Blocked Time",cellTemplate:'<div class="ngCellText" ng-show="row.entity.blockedTime > 0">{{row.entity.blockedTime | humanizeMs}}</div>'},{field:"inNative",displayName:"Native",cellTemplate:'<div class="ngCellText"><span ng-show="row.entity.inNative" class="orange">(in native)</span></div>'},{field:"suspended",displayName:"Suspended",cellTemplate:'<div class="ngCellText"><span ng-show="row.entity.suspended" class="red">(suspended)</span></div>'}]},t.$watch("threadGridOptions.selectedItems",function(e,n){e!==n&&(0===e.length?(t.row={},t.threadSelected=!1,t.selectedRowIndex=-1):(t.row=e.first(),t.threadSelected=!0,t.selectedRowIndex=Core.pathGet(t,["hawtioSimpleTable","threads","rows"]).findIndex(function(e){return e.entity.threadId===t.row.threadId})),t.selectedRowJson=angular.toJson(t.row,!0))},!0),t.$on("ThreadsToolbarState",function(e,n){t.filterOn(n)}),t.filterOn=function(e){t.stateFilter=e},t.filterThreads=function(t,n){return e.log.debug("Filtering threads by: ",t),"NONE"===t?n:n.filter(function(e){return e&&e.threadState===t})},t.deselect=function(){t.threadGridOptions.selectedItems=[]},t.selectThreadById=function(e){t.threadGridOptions.selectedItems=t.threads.filter(function(t){return t.threadId===e})},t.selectThreadByIndex=function(e){var n=Core.pathGet(t,["hawtioSimpleTable","threads","rows"])[e];t.threadGridOptions.selectedItems=t.threads.filter(function(e){return e&&e.threadId==n.entity.threadId})},t.init=function(){o.request([{type:"read",mbean:e.mbean,attribute:"ThreadContentionMonitoringSupported"},{type:"read",mbean:e.mbean,attribute:"ObjectMonitorUsageSupported"},{type:"read",mbean:e.mbean,attribute:"SynchronizerUsageSupported"}],{method:"post",success:[function(i){t.support.threadContentionMonitoringSupported=i.value,n.$broadcast("ThreadControllerSupport",t.support),e.log.debug("ThreadContentionMonitoringSupported: ",t.support.threadContentionMonitoringSupported),t.maybeRegister()},function(i){t.support.objectMonitorUsageSupported=i.value,n.$broadcast("ThreadControllerSupport",t.support),e.log.debug("ObjectMonitorUsageSupported: ",t.support.objectMonitorUsageSupported),t.maybeRegister()},function(i){t.support.synchronizerUsageSupported=i.value,n.$broadcast("ThreadControllerSupport",t.support),e.log.debug("SynchronizerUsageSupported: ",t.support.synchronizerUsageSupported),t.maybeRegister()}],error:function(t){e.log.error("Failed to query for supported usages: ",t.error)}})};var u=Core.throttled(t.init,500);t.maybeRegister=function(){"objectMonitorUsageSupported"in t.support&&"synchronizerUsageSupported"in t.support&&"threadContentionMonitoringSupported"in t.support&&(e.log.debug("Registering dumpAllThreads polling"),Core.register(o,t,{type:"exec",mbean:e.mbean,operation:"dumpAllThreads",arguments:[t.support.objectMonitorUsageSupported,t.support.synchronizerUsageSupported]},Core.onSuccess(a)),t.support.threadContentionMonitoringSupported&&o.request({type:"read",mbean:e.mbean,attribute:"ThreadContentionMonitoringEnabled"},Core.onSuccess(t.maybeEnableThreadContentionMonitoring)))},t.maybeEnableThreadContentionMonitoring=function(n){n.value===!1?(e.log.info("Thread contention monitoring not enabled, enabling"),o.setAttribute(e.mbean,"ThreadContentionMonitoringEnabled",!0,Core.onSuccess(l))):e.log.info("Thread contention monitoring already enabled"),Core.$apply(t)},u()}])}(Threads||(Threads={})),angular.module("hawtio-jmx-templates",[]).run(["$templateCache",function(e){e.put("plugins/jmx/html/areaChart.html",'<div ng-controller="Jmx.AreaChartController">\n <script type="text/ng-template" id="areaChart">\n <fs-area bind="data" duration="250" interpolate="false" point-radius="5" width="width" height="height" label=""></fs-area>\n </script>\n <div compile="template"></div>\n</div>\n'),e.put("plugins/jmx/html/attributeToolBar.html",'<div class="pull-right" ng-hide="inDashboard">\n <hawtio-filter ng-model="gridOptions.filterOptions.filterText" placeholder="Filter..." save-as="{{nid}}-filter-text"></hawtio-filter>\n</div>\n'),e.put("plugins/jmx/html/attributes.html",'<script type="text/ng-template" id="gridTemplate">\n <table id="attributesGrid"\n class="table table-condensed table-striped"\n hawtio-simple-table="gridOptions">\n </table>\n</script>\n\n<div ng-controller="Jmx.AttributesController">\n <div ng-include src="toolBarTemplate()"></div>\n\n <div class="attributes-wrapper gridStyle">\n <div compile="attributes"></div>\n </div>\n\n <!-- modal dialog to show/edit the attribute -->\n <div hawtio-confirm-dialog="showAttributeDialog"\n ok-button-text="Update" show-ok-button="{{entity.rw ? \'true\' : \'false\'}}" on-ok="onUpdateAttribute()" on-cancel="onCancelAttribute()"\n cancel-button-text="Close"\n title="Attribute: {{entity.key}}">\n <div class="dialog-body">\n <div hawtio-form-2=\'attributeSchema\' entity=\'entity\'></div>\n </div>\n </div>\n\n</div>\n'),e.put("plugins/jmx/html/chartEdit.html",'<div ng-controller="Jmx.ChartEditController">\n <form>\n <fieldset>\n <div class="control-group" ng-show="canViewChart()">\n <input type="submit" class="btn" value="View Chart" ng-click="viewChart()"\n ng-disabled="!selectedAttributes.length && !selectedMBeans.length"/>\n </div>\n <div class="control-group">\n <table class="table">\n <thead>\n <tr>\n <th ng-show="showAttributes()">Attributes</th>\n <th ng-show="showElements()">Elements</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td ng-show="showAttributes()">\n <select id="attributes" size="20" multiple ng-multiple="true" ng-model="selectedAttributes"\n ng-options="name | humanize for (name, value) in metrics"></select>\n </td>\n <td ng-show="showElements()">\n <select id="mbeans" size="20" multiple ng-multiple="true" ng-model="selectedMBeans"\n ng-options="name for (name, value) in mbeans"></select>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div class="alert" ng-show="!canViewChart()">\n <button type="button" class="close" data-dismiss="alert">×</button>\n <strong>No numeric metrics available!</strong> Try select another item to chart on.\n </div>\n </div>\n </fieldset>\n </form>\n</div>\n'),e.put("plugins/jmx/html/charts.html",'<div ng-controller="Jmx.ChartController" ng-switch="errorMessage()">\n <div ng-switch-when="metrics">No valid metrics to show for this mbean.</div>\n <div ng-switch-when="updateRate">Charts aren\'t available when the update rate is set to "No refreshes", go to the <a ng-href="#/preferences{{hash}}">Preferences</a> panel and set a refresh rate to enable charts</div>\n <div id="charts"></div>\n</div>\n\n'),e.put("plugins/jmx/html/donutChart.html",'<div ng-controller="Jmx.DonutChartController">\n <script type="text/ng-template" id="donut">\n <fs-donut bind="data" outer-radius="200" inner-radius="75"></fs-donut>\n </script>\n <div compile="template"></div>\n</div>\n'),e.put("plugins/jmx/html/layoutTree.html",'<script type="text/ng-template" id="header">\n <div class="tree-header" ng-controller="Jmx.TreeHeaderController">\n <div class="left">\n </div>\n <div class="right">\n <i class="fa fa-chevron-down clickable"\n title="Expand all nodes"\n ng-click="expandAll()"></i>\n <i class="fa fa-chevron-up clickable"\n title="Unexpand all nodes"\n ng-click="contractAll()"></i>\n </div>\n </div>\n</script>\n\n<hawtio-pane position="left" width="300" header="header">\n <div id="tree-container"\n ng-controller="Jmx.MBeansController">\n <div id="jmxtree"></div>\n </div>\n</hawtio-pane>\n\n<div class="row-fluid">\n <!--\n <ng-include src="\'plugins/jmx/html/subLevelTabs.html\'"></ng-include>\n -->\n <div id="properties" ng-view></div>\n</div>\n\n\n'),e.put("plugins/jmx/html/operations.html",' <script type="text/ng-template" id="operationTemplate">\n <div>\n <div ng-controller="Jmx.OperationController">\n <div ng-show="operationResult!=\'\'">\n <div class="row">\n <h3 ng-bind="item.name"></h3>\n <div hawtio-editor="operationResult" mode="mode"></div>\n <p></p>\n <div class="control-group pull-right">\n <div class="controls">\n <button class="btn cancel"\n title="Back to operation list"\n ng-click="close()">\n <i class="fa fa-list"></i>\n </button>\n <button class="btn"\n zero-clipboard\n data-clipboard-text="{{operationResult}}"\n title="Copy value to clipboard">\n <i class="fa fa-copy"></i>\n </button>\n <button class="btn"\n title="Back to operation"\n ng-click="ok()">\n <i class="fa fa-check"></i> Invoke Again\n </button>\n </div>\n </div>\n </div>\n </div>\n <div ng-show="operationResult==\'\'">\n <div class="row">\n <h3 ng-bind="item.name"></h3>\n <div ng-hide="item.args.length">\n This JMX operation requires no arguments. Click the \'Execute\' button to invoke the operation.\n </div>\n <div ng-show="item.args.length">\n This JMX operation requires some parameters. Fill in the fields below as necessary and click the \'Execute\' button to invoke the operation.\n </div>\n <p></p>\n <div ng-show="item.args.length" hawtio-form-2="formConfig"\n entity="entity"\n name="entryForm"></div>\n <div class="row">\n <div class="control-group pull-right">\n <div class="controls">\n <button class="btn cancel"\n title="Back to list"\n ng-click="close()">\n <i class="fa fa-list"></i>\n </button>\n <button class="btn"\n title="Clear form"\n ng-click="reset()"\n ng-show="item.args.length">\n <i class="fa fa-undo"></i>\n </button>\n <button class="btn btn-success execute"\n ng-click="onSubmit()">\n <i class="{{executeIcon}}"></i> Execute\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="expandable closed">\n <div class="title">\n <i class="expandable-indicator"></i> Jolokia REST URL\n </div>\n <div class="expandable-body well">\n <div class="input-group">\n <span class="input-group-addon" zero-clipboard\n data-clipboard-text="{{jolokiaUrl}}"\n title="Copy Jolokia REST Url to clipboard">\n <i class="fa fa-copy"></i>\n </span>\n <input class="form-control" type="text" name="jolokiaUrl" id="jolokiaUrl" value="{{jolokiaUrl}}" readonly>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </script>\n\n<div id="threadForm" ng-controller="Jmx.OperationsController">\n <div ng-show="fetched">\n <h2 ng-bind="objectName"></h2>\n <div class="row" ng-hide="isOperationsEmpty() || showInvoke">\n This MBean supports the following JMX operations. Click an item in the list to invoke that operation.\n </div>\n <div class="row" ng-show="isOperationsEmpty()">\n This MBean has no JMX operations.\n </div>\n <hr>\n <div class="row" ng-hide="isOperationsEmpty() || showInvoke">\n <div class="pull-right">\n <hawtio-filter ng-model="methodFilter" placeholder="Filter..." save-as="{{objectName}}-text-filter"></hawtio-filter>\n </div>\n </div>\n\n <div ng-show="showInvoke">\n <div compile="template"></div>\n </div>\n\n <ul ng-hide="showInvoke" class="zebra-list" ng-hide="isOperationsEmpty()">\n <li class="operation-row"\n ng-repeat="operation in operations"\n ng-show="doFilter(operation)"\n ng-click="invokeOp(operation)"\n ng-class="getClass(operation)"\n title="Click to invoke {{operation.name}}"\n data-placement="bottom">\n <i class="fa fa-cog"\n ng-class="getClass(operation)"></i>\n <span>{{operation.name}}</span>\n <span class="operation-actions">\n <button class="btn"\n zero-clipboard\n data-clipboard-text="{{operation.name}}"\n title="Copy method name to clipboard">\n <i class="fa fa-copy"></i>\n </button>\n </span>\n </li>\n </ul>\n </div>\n\n</div>\n'),e.put("plugins/jmx/html/subLevelTabs.html",'<ul class="nav nav-tabs" ng-controller="Jmx.NavBarController" hawtio-auto-dropdown>\n <li ng-repeat="nav in subLevelTabs track by $index | orderBy:index" ng-show="isValid(nav)" ng-class="{active : isActive(nav)}">\n <a ng-href="{{nav.href()}}{{hash}}" title="{{nav.title}}"\n data-placement="bottom" ng-bind-html="nav.content">\n </a>\n </li>\n\n <li class="pull-right">\n <a ng-href="{{fullScreenLink()}}" title="Show this view in full screen" data-placement="bottom">\n <i class="fa fa-fullscreen"></i>\n </a>\n </li>\n <li class="pull-right">\n <a ng-href="{{addToDashboardLink()}}" title="Add this view to a dashboard" data-placement="bottom">\n <i class="fa fa-share"></i>\n </a>\n </li>\n <li class="pull-right dropdown overflow" style="visibility: hidden;">\n <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-chevron-down"></i></a>\n <ul class="dropdown-menu right"></ul>\n </li>\n\n\n</ul>\n\n'),e.put("plugins/threads/html/index.html",'<div ng-controller="Threads.ThreadsController">\n\n <div>\n <div class="pull-right">\n <hawtio-filter ng-model="searchFilter" placeholder="Filter..." save-as="threads-text-filter"></hawtio-filter>\n </div>\n\n <p></p>\n\n <table class="table table-condensed table-striped"\n hawtio-simple-table="threadGridOptions"></table>\n\n <div ng-show="threadSelected" class="log-info-panel">\n <div class="log-info-panel-frame">\n <div class="log-info-panel-header">\n <div class="row-fluid">\n <button class="btn" ng-click="deselect()"><i class="icon-remove"></i> Close</button>\n <div class="btn-group"\n style="margin-top: 9px;"\n hawtio-pager="hawtioSimpleTable.threads.rows"\n on-index-change="selectThreadByIndex"\n row-index="selectedRowIndex">\n </div>\n\n <span><strong>Thread ID:</strong> {{row.threadId}}</span>\n </div>\n\n <div class="row-fluid">\n <span><strong>Thread Name:</strong> {{row.threadName}}</span>\n </div>\n\n </div>\n <div class="log-info-panel-body">\n\n <div class="row-fluid">\n <span><strong>Waited Count:</strong> {{row.waitedCount}}</span>\n <span><strong>Waited Time:</strong> {{row.waitedTime}}ms</span>\n </div>\n\n <div class="row-fluid">\n <span><strong>Blocked Count:</strong> {{row.blockedCount}}</span>\n <span><strong>Blocked Time:</strong> {{row.blockedTime}}ms</span>\n </div>\n\n <div class="row-fluid" ng-show="row.lockInfo != null">\n <span><strong>Lock Name:</strong> {{row.lockName}}</span>\n <span><strong>Lock Class Name:</strong> {{row.lockInfo.className}}</span>\n <span><strong>Lock Identity Hash Code:</strong> {{row.lockInfo.identityHashCode}}</span>\n </div>\n\n <div class="row-fluid" ng-show="row.lockOwnerId > 0">\n <span>Waiting for lock owned by <a href="" ng-click="selectThreadById(row.lockOwnerId)">{{row.lockOwnerId}}</a></span>\n <span><strong>Owner Name:</strong> {{row.lockOwnerName}}</span>\n </div>\n\n <dl ng-show="row.lockedSynchronizers.length > 0">\n <dt>Locked Synchronizers</dt>\n <dd>\n <ol class="zebra-list">\n <li ng-repeat="synchronizer in row.lockedSynchronizers">\n <span><strong>Class Name:</strong> {{synchronizer.className}}</span>\n <span><strong>Identity Hash Code:</strong> {{synchronizer.identityHashCode}}</span>\n </li>\n </ol>\n </dd>\n </dl>\n\n <dl ng-show="row.lockedMonitors.length > 0">\n <dt>Locked Monitors</dt>\n <dd>\n <ol class="zebra-list">\n <li ng-repeat="monitor in row.lockedMonitors">\n Frame: <strong>{{monitor.lockedStackDepth}}</strong>\n <span class="green">{{monitor.lockedStackFrame.className}}</span>\n <span class="bold">.</span>\n <span class="blue bold">{{monitor.lockedStackFrame.methodName}}</span>\n ({{monitor.lockedStackFrame.fileName}}<span ng-show="frame.lineNumber > 0">:{{monitor.lockedStackFrame.lineNumber}}</span>)\n <span class="orange" ng-show="monitor.lockedStackFrame.nativeMethod">(Native)</span>\n </li>\n </ol>\n </dd>\n </dl>\n\n <!-- a simple stack trace display, ideally we\n could show maven links eventually -->\n <dl>\n <dt>Stack Trace</dt>\n <dd>\n <ol class="zebra-list">\n <li ng-repeat="frame in row.stackTrace">\n <span class="green">{{frame.className}}</span>\n <span class="bold">.</span>\n <span class="blue bold">{{frame.methodName}}</span>\n ({{frame.fileName}}<span ng-show="frame.lineNumber > 0">:{{frame.lineNumber}}</span>)\n <span class="orange" ng-show="frame.nativeMethod">(Native)</span>\n </li>\n </ol>\n </dd>\n </dl>\n\n <!--\n <div class="expandable" model="showRaw">\n <div class="title">\n <i class="expandable-indicator"></i><span> Show JSON</span>\n </div>\n <div class="expandable-body">\n <div hawtio-editor="selectedRowJson" mode="javascript"></div>\n </div>\n </div>\n -->\n\n </div>\n </div>\n </div>\n\n </div>\n</div>\n\n\n\n'),e.put("plugins/threads/html/toolbar.html",'<div ng-controller="Threads.ToolbarController">\n <script type="text/ng-template" id="threadStateTemplate">\n <div class="thread-state-indicator"\n title="{{row.entity.threadState | humanize}}"\n ng-switch on="row.entity.threadState">\n <i ng-switch-when="NEW"\n class="lightgreen icon-bolt"></i>\n <i ng-switch-when="RUNNABLE"\n class="green icon-play-circle"></i>\n <i ng-switch-when="BLOCKED"\n class="red icon-stop"></i>\n <i ng-switch-when="WAITING"\n class="darkgray icon-pause"></i>\n <i ng-switch-when="TIMED_WAITING"\n class="orange icon-time"></i>\n <i ng-switch-default="TERMINATED"\n class="darkred icon-remove"></i>\n </div>\n </script>\n\n <div class="state-panel inline-block">\n <ul class="inline">\n <li ng-click="filterOn(\'NONE\')"\n title="Clear state filter"\n ng-class="selectedFilterClass(\'NONE\')">\n <span class="clickable no-fade total">Total:</span> {{unfilteredThreads.length}}\n </li>\n <li ng-repeat="(state, total) in totals track by $index"\n ng-click="filterOn(state)"\n title="Filter by {{state}}"\n ng-class="selectedFilterClass(state)">\n <span class="clickable no-fade {{state.dasherize()}}">{{state | humanize}}:</span> {{total}}\n </li>\n </ul>\n </div>\n\n <div class="inline-block support-panel pull-right">\n <ul class="inline">\n <li ng-repeat="(name, value) in support track by $index">\n <span class="monitor-indicator {{getMonitorClass(name, value)}}" ng-click="maybeToggleMonitor(name, value)">{{getMonitorName(name)}}</span>\n </li>\n <li ng-hide="inDashboard">\n <a ng-href="{{addToDashboardLink()}}" title="Add this view to a dashboard">\n <i class="icon-share"></i>\n </a>\n </li>\n </ul>\n </div>\n\n</div>\n\n'),e.put("plugins/jvm/html/connect.html",'<div ng-controller="JVM.ConnectController">\n\n <div class="row">\n <div class="col-md-6">\n <div class="alert alert-info">\n <p>\n This page allows you to connect to remote processes which <strong>already have a <a\n href="http://jolokia.org/">jolokia agent</a> running inside them</strong>. You will need to know the\n host name, port and path of the jolokia agent to be able to connect.\n </p>\n\n <p>\n If the process you wish to connect to does not have a jolokia agent inside, please refer to the <a\n href="http://jolokia.org/agent.html">jolokia documentation</a> for how to add a JVM, servlet or OSGi\n based agent inside it.\n </p>\n\n <p>\n If you are using <a href="http://fabric8.io/">Fabric8</a>, <a href="http://www.jboss.org/products/fuse">JBoss Fuse</a>, or <a href="http://activemq.apache.org">Apache ActiveMQ</a>;\n then a jolokia agent is included by default. Or you can always just deploy hawtio inside the process (which includes the jolokia agent).\n </p>\n\n <p>\n <strong>Use Proxy</strong>:\n hawtio is running in your browser; usually due to CORS; you cannot open a different host or port from your browser (due to browse security restrictions);\n so we have to use a proxy servlet inside the hawtio web app to proxy all requests for a different jolokia server - so we can communicate with a different jolokia agent.\n If you use the hawtio Chrome Extension this isn’t required; since Chrome Extensions are allowed to connect to any host/port.\n </p>\n\n <p ng-show="hasLocalMBean()">\n Use the <strong><a href="#/jvm/local">Local Tab</a></strong> to connect to processes locally on this machine (which will install a jolokia agent automatically if required).\n </p>\n\n <p ng-show="!hasLocalMBean()">\n The <strong>Local Tab</strong> is not currently enabled because either the server side <strong>hawtio-local-jvm-mbean plugin</strong> is not installed or this\n JVM cannot find the <strong>com.sun.tools.attach.VirtualMachine</strong> API usually found in the <strong>tool.jar</strong>.\n Please see the <a href="http://hawt.io/faq/index.html">FAQ entry</a> for more details.\n </p>\n </div>\n </div>\n\n <div class="col-md-6">\n <dl>\n <dt>Saved Connections</dt>\n <dd>\n <form class="form-horizontal no-bottom-margin">\n <fieldset>\n <div class="control-group">\n <label class="control-label">Connections: </label>\n <div class="controls">\n <select ng-model="lastConnection"\n ng-options="value.name as key for (key, value) in connectionConfigs">\n <option value=""\n ng-hide="lastConnection">New connection...</option>\n </select>\n <button class="btn btn-success"\n title="Connect to this server"\n ng-disabled="!lastConnection"\n ng-click="gotoServer()"><i class="fa fa-share"></i></button>\n <button class="btn btn-danger"\n title="Delete this connection"\n ng-disabled="!lastConnection"\n ng-click="deleteConnection()"><i class="fa fa-remove"></i></button>\n <button class="btn btn-primary"\n title="Create a new connection"\n ng-disabled="!lastConnection"\n ng-click="newConnection()"><i class="fa fa-plus"></i></button>\n </div>\n </div>\n </fieldset>\n </form>\n </dd>\n </dl>\n\n <dl>\n <dt>Connection Settings</dt>\n <dd>\n <div simple-form name="connectForm" data="formConfig" entity="currentConfig" onSubmit="gotoServer()"></div>\n\n <div class="centered">\n <button class="btn btn-primary"\n ng-disabled="!forms.connectForm.$valid"\n hawtio-submit="connectForm"\n title="Saves the connection and opens a new browser window connecting to the given JVM process via its Jolokia servlet URL">Connect to remote server</button>\n <button class="btn"\n title="Save this configuration but don\'t open a new tab"\n ng-disabled="!forms.connectForm.$valid"\n ng-click="save()">Save</button>\n </div>\n </dd>\n </dl>\n\n </div>\n\n </div>\n\n</div>\n'),e.put("plugins/jvm/html/discover.html",'<div ng-controller="JVM.DiscoveryController">\n\n <div class="row">\n\n <div class="pull-right">\n <button class="btn" ng-click="fetch()" title="Refresh"><i class="fa fa-refresh"></i></button>\n </div>\n <div class="pull-right">\n <input class="search-query" type="text" ng-model="filter" placeholder="Filter...">\n </div>\n\n <script type="text/ng-template" id="authPrompt">\n <div class="auth-form">\n <form name="authForm">\n <input type="text"\n class="input-sm"\n placeholder="Username..."\n ng-model="agent.username"\n required>\n <input type="password"\n class="input-sm"\n placeholder="Password..."\n ng-model="agent.password"\n required>\n <button ng-disabled="!authForm.$valid"\n ng-click="connectWithCredentials($event, agent)"\n class="btn btn-success">\n <i class="fa fa-share"></i> Connect\n </button>\n <button class="btn" ng-click="closePopover($event)"><i class="fa fa-remove"></i></button>\n </form>\n </div>\n </script>\n\n </div>\n\n <div class="row">\n\n <div ng-show="discovering">\n <p></p>\n\n <div class="alert alert-info">\n <i class="fa fa-spinner icon-spin"></i> Please wait, discovering agents ...\n </div>\n </div>\n\n <div ng-hide="discovering">\n <div ng-hide="agents">\n <p></p>\n\n <div class="alert alert-warning">\n No agents discovered.\n </div>\n </div>\n <div ng-show="agents">\n <ul class="discovery zebra-list">\n <li ng-repeat="agent in agents track by $index" ng-show="filterMatches(agent)">\n\n <div class="inline-block">\n <img ng-src="{{getLogo(agent)}}">\n </div>\n\n <div class="inline-block">\n <p ng-hide="!hasName(agent)">\n <span class="strong"\n ng-show="agent.server_vendor">\n {{agent.server_vendor}} {{agent.server_product.titleize()}} {{agent.server_version}}\n </span>\n </p>\n <span ng-class="getAgentIdClass(agent)">\n <strong ng-show="hasName(agent)">Agent ID: </strong>{{agent.agent_id}}<br/>\n <strong ng-show="hasName(agent)">Agent Version: </strong><span ng-hide="hasName(agent)"> Version: </span>{{agent.agent_version}}</span><br/>\n <strong ng-show="hasName(agent)">Agent Description: </strong><span\n ng-hide="hasName(agent)"> Description: </span>{{agent.agent_description}}</span><br/>\n\n <p ng-hide="!agent.url"><strong>Agent URL: </strong><a ng-href="{{agent.url}}"\n target="_blank">{{agent.url}}</a>\n </p>\n </div>\n\n <div class="inline-block lock" ng-show="agent.secured">\n <i class="fa fa-lock" title="A valid username and password will be required to connect"></i>\n </div>\n\n <div class="inline-block" ng-hide="!agent.url">\n <div class="connect-button"\n ng-click="gotoServer($event, agent)"\n hawtio-template-popover\n content="authPrompt"\n trigger="manual"\n placement="auto"\n data-title="Please enter your username and password">\n <i ng-show="agent.url" class="icon-play-circle"></i>\n </div>\n </div>\n\n </li>\n </ul>\n </div>\n </div>\n </div>\n</div>\n'),e.put("plugins/jvm/html/jolokiaPreferences.html",'<div ng-controller="JVM.JolokiaPreferences">\n <div hawtio-form-2="config" entity="entity"></div>\n\n <div class="control-group">\n <div class="controls">\n <button class="btn btn-primary" ng-click="reboot()">Apply</button>\n <span class="help-block">Restart hawtio with the new values in effect</span>\n </div>\n </div>\n\n</div>\n'),e.put("plugins/jvm/html/layoutConnect.html",'<ul class="nav nav-tabs connected" ng-controller="JVM.NavController">\n <li ng-repeat="link in breadcrumbs" ng-show="isValid(link)" ng-class=\'{active : isActive(link.href)}\'>\n <a ng-href="{{link.href}}{{hash}}" ng-bind-html="link.content"></a>\n </li>\n</ul>\n<div class="row">\n <div ng-view></div>\n</div>\n'),
|
|
3266
|
|
-e.put("plugins/jvm/html/local.html",'<div ng-controller="JVM.JVMsController">\n\n <div class="row">\n <div class="pull-right">\n <button class="btn" ng-click="fetch()" title="Refresh"><i class="fa fa-refresh"></i></button>\n </div>\n <div class="pull-right">\n <input class="search-query" type="text" ng-model="filter" placeholder="Filter...">\n </div>\n </div>\n\n <div ng-hide="initDone">\n <div class="alert alert-info">\n <i class="fa fa-spinner icon-spin"></i> Please wait, discovering local JVM processes ...\n </div>\n </div>\n\n <div ng-hide=\'data.length > 0\' class=\'row\'>\n {{status}}\n </div>\n\n <div ng-show=\'data.length > 0\' class="row">\n <table class=\'centered table table-bordered table-condensed table-striped\'>\n <thead>\n <tr>\n <th style="width: 70px">PID</th>\n <th>Name</th>\n <th style="width: 300px">Agent URL</th>\n <th style="width: 50px"></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="jvm in data track by $index" ng-show="filterMatches(jvm)">\n <td>{{jvm.id}}</td>\n <td title="{{jvm.displayName}}">{{jvm.alias}}</td>\n <td><a href=\'\' title="Connect to this agent"\n ng-click="connectTo(jvm.url, jvm.scheme, jvm.hostname, jvm.port, jvm.path)">{{jvm.agentUrl}}</a></td>\n <td>\n <a class=\'btn control-button\' href="" title="Stop agent" ng-show="jvm.agentUrl"\n ng-click="stopAgent(jvm.id)"><i class="fa fa-off"></i></a>\n <a class=\'btn control-button\' href="" title="Start agent" ng-hide="jvm.agentUrl"\n ng-click="startAgent(jvm.id)"><i class="icon-play-circle"></i></a>\n </td>\n </tr>\n\n </tbody>\n </table>\n\n </div>\n\n\n</div>\n'),e.put("plugins/jvm/html/navbarHeaderExtension.html",'<style>\n .navbar-header-hawtio-jvm {\n float: left;\n margin: 0;\n }\n\n .navbar-header-hawtio-jvm h4 {\n color: white;\n margin: 0px;\n }\n\n .navbar-header-hawtio-jvm li {\n list-style-type: none;\n display: inline-block;\n margin-right: 10px;\n margin-top: 4px;\n }\n</style>\n<ul class="navbar-header-hawtio-jvm" ng-controller="JVM.HeaderController">\n <li ng-show="containerName"><h4 ng-bind="containerName"></h4></li>\n <li ng-show="goBack"><strong><a href="" ng-click="goBack()">Back</a></strong></li>\n</ul>\n'),e.put("plugins/jvm/html/reset.html",'<div ng-controller="JVM.ResetController">\n <form class="form-horizontal">\n <fieldset>\n <div class="control-group">\n <label class="control-label">\n <strong>\n <i class=\'yellow text-shadowed icon-warning-sign\'></i> Clear saved connections\n </strong>\n </label>\n <div class="controls">\n <button class="btn btn-danger" ng-click="doClearConnectSettings()">Clear saved connections</button>\n <span class="help-block">Wipe all saved connection settings stored by {{branding.appName}} in your browser\'s local storage</span>\n </div>\n </div>\n </fieldset>\n </form>\n</div>\n\n')}]),hawtioPluginLoader.addModule("hawtio-jmx-templates"),function(e,t,n){"use strict";function i(e){return null!=e&&""!==e&&"hasOwnProperty"!==e&&s.test("."+e)}function r(e,t){if(!i(t))throw a("badmember",'Dotted member path "@{0}" is invalid.',t);for(var r=t.split("."),o=0,s=r.length;s>o&&e!==n;o++){var l=r[o];e=null!==e?e[l]:n}return e}function o(e,n){n=n||{},t.forEach(n,function(e,t){delete n[t]});for(var i in e)!e.hasOwnProperty(i)||"$"===i.charAt(0)&&"$"===i.charAt(1)||(n[i]=e[i]);return n}var a=t.$$minErr("$resource"),s=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;t.module("ngResource",["ng"]).provider("$resource",function(){var e=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}},this.$get=["$http","$q",function(i,s){function l(e){return u(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function u(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function c(t,n){this.template=t,this.defaults=f({},e.defaults,n),this.urlParams={}}function d(l,u,v,y){function b(e,t){var n={};return t=f({},u,t),h(t,function(t,i){m(t)&&(t=t()),n[i]=t&&t.charAt&&"@"==t.charAt(0)?r(e,t.substr(1)):t}),n}function w(e){return e.resource}function x(e){o(e||{},this)}var k=new c(l,y);return v=f({},e.defaults.actions,v),x.prototype.toJSON=function(){var e=f({},this);return delete e.$promise,delete e.$resolved,e},h(v,function(e,r){var l=/^(POST|PUT|PATCH)$/i.test(e.method);x[r]=function(u,c,d,v){var y,C,S,_={};switch(arguments.length){case 4:S=v,C=d;case 3:case 2:if(!m(c)){_=u,y=c,C=d;break}if(m(u)){C=u,S=c;break}C=c,S=d;case 1:m(u)?C=u:l?y=u:_=u;break;case 0:break;default:throw a("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var T=this instanceof x,$=T?y:e.isArray?[]:new x(y),E={},D=e.interceptor&&e.interceptor.response||w,M=e.interceptor&&e.interceptor.responseError||n;h(e,function(e,t){"params"!=t&&"isArray"!=t&&"interceptor"!=t&&(E[t]=g(e))}),l&&(E.data=y),k.setUrlParams(E,f({},b(y,e.params||{}),_),e.url);var I=i(E).then(function(n){var i=n.data,s=$.$promise;if(i){if(t.isArray(i)!==!!e.isArray)throw a("badcfg","Error in resource configuration for action `+"`"+`{0}`+"`"+`. Expected response to contain an {1} but got an {2}",r,e.isArray?"array":"object",t.isArray(i)?"array":"object");e.isArray?($.length=0,h(i,function(e){"object"==typeof e?$.push(new x(e)):$.push(e)})):(o(i,$),$.$promise=s)}return $.$resolved=!0,n.resource=$,n},function(e){return $.$resolved=!0,(S||p)(e),s.reject(e)});return I=I.then(function(e){var t=D(e);return(C||p)(t,e.headers),t},M),T?I:($.$promise=I,$.$resolved=!1,$)},x.prototype["$"+r]=function(e,t,n){m(e)&&(n=t,t=e,e={});var i=x[r].call(this,e,this,t,n);return i.$promise||i}}),x.bind=function(e){return d(l,f({},u,e),v)},x}var p=t.noop,h=t.forEach,f=t.extend,g=t.copy,m=t.isFunction;return c.prototype={setUrlParams:function(e,n,i){var r,o,s=this,u=i||s.template,c=s.urlParams={};h(u.split(/\W/),function(e){if("hasOwnProperty"===e)throw a("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(e)&&e&&new RegExp("(^|[^\\\\]):"+e+"(\\W|$)").test(u)&&(c[e]=!0)}),u=u.replace(/\\:/g,":"),n=n||{},h(s.urlParams,function(e,i){r=n.hasOwnProperty(i)?n[i]:s.defaults[i],t.isDefined(r)&&null!==r?(o=l(r),u=u.replace(new RegExp(":"+i+"(\\W|$)","g"),function(e,t){return o+t})):u=u.replace(new RegExp("(/?):"+i+"(\\W|$)","g"),function(e,t,n){return"/"==n.charAt(0)?n:t+n})}),s.defaults.stripTrailingSlashes&&(u=u.replace(/\/+$/,"")||"/"),u=u.replace(/\/\.(?=\w+($|\?))/,"."),e.url=u.replace(/\/\\\./,"/."),h(n,function(t,n){s.urlParams[n]||(e.params=e.params||{},e.params[n]=t)})}},d}]})}(window,window.angular),function(e,t,n){function i(e,t,n,i,r,o,a){this.divId=e,this.className=t,this.metricName=n,this.max=i,this.title=r,this.type=o,this.subTitle=a,this.getMax=function(e){return this.max},this.getMetricNode=function(e,t,n){return n[o][e+"."+t]?n[o][e+"."+t]:null},this.getSubTitle=function(){return null!=this.subTitle?this.subTitle:this.title}}function r(e,t){var n=e/t*100;return n.toFixed(0)}function o(e,t){return isNaN(t)&&(t=1),isNaN(e)?t:e.toFixed(t)}function a(e){return e.charAt(0).toUpperCase()+e.slice(1)}function s(e,t,n,r,o,a,s,l){var u=new i(e,t,n,r,o,"timers",a);return u.getMeterInfo=function(){var e=this.divId+" div.timerGraph td.meterGraph",t=new i(e,this.className,this.metricName,this.max,"Frequency","timers",null);return t.getMetricNode=function(e,t,n){return n.timers[e+"."+t]?n.timers[e+"."+t]:null},t.eventType=a,t},u.getTimerStatsDivId=function(){return"#"+this.divId+" div.timerGraph td.timerStatsGraph"},u.getTimerHistogramDivId=function(){return"#"+this.divId+" div.timerGraph td.timerHistogram"},u.durationMax=s,u.isNested=l,u}function l(e){var n=t("#"+e.divId),i="<div class='metricsWatcher counter counterGraph'><div class='heading3'>"+e.title+"</div><div class='progress'><div class='progress-bar' style='width: 0%;'></div></div></div>";n.html(i)}function u(e,n){var i=e.getMetricNode(e.className,e.metricName,n),o=r(i.count,e.getMax(n));t("#"+e.divId+" div.progress div.progress-bar").css("width",o+"%"),t("#"+e.divId+" div.progress div.progress-bar").html(i.count+"/"+e.getMax(n))}function c(e){var n=t("#"+e.divId),i=e.isNested?" nested":"",r="<div class='metricsWatcher timer timerGraph"+i+" col-md-12'><fieldset><legend>"+(e.isNested?"<div class='heading1'>":"<div class='heading1 btn-link' data-toggle='collapse' data-target='#"+e.divId+"Collapse'>")+e.title+"</div></legend><div class='timerContainer col-md-12"+(e.isNested?"":"collapse")+"' id='"+e.divId+"Collapse'><table><tr><td class='meterGraph col-md-4'></td><td class='timerStatsGraph col-md-4'></td><td class='timerHistogram col-md-4'></td></tr></table></div></fieldset>";n.html(r),b(e.getMeterInfo()),d(e),p(e)}function d(e){var n="<div class='heading3'>Duration</div><div class='timeUnit'></div><div class='metricGraph'><table class='progressTable'>"+w("Min","min")+w("Mean","mean")+w("Max","max")+w("Std Dev","stddev")+"</table></div>",i=t(e.getTimerStatsDivId());i.html(n)}function p(e){var n="<div class='heading3'> "+(e.isNested?"Histogram":e.getSubTitle())+"</div><p>Percentiles</p><div class='metricGraph'><table class='progressTable'>"+w("99.9%","p999")+w("99%","p99")+w("98%","p98")+w("95%","p95")+w("75%","p75")+w("50%","p50")+"</table></div>",i=t(e.getTimerHistogramDivId());i.html(n)}function h(e,t){x(e.getMeterInfo(),t),f(e,t),m(e,t)}function f(e,n){var i=e.getMetricNode(e.className,e.metricName,n);if(i){var r=t(e.getTimerStatsDivId()+" div.timeUnit");r.html(a(i.duration_units)),g(e.getTimerStatsDivId(),i,"min",e.durationMax),g(e.getTimerStatsDivId(),i,"mean",e.durationMax),g(e.getTimerStatsDivId(),i,"max",e.durationMax),g(e.getTimerStatsDivId(),i,"stddev",e.durationMax)}}function g(e,n,i,a){t(e+" tr."+i+" td.progressValue").html(o(n[i])),t(e+" tr."+i+" td.progressBar div.progress div.progress-bar").css("width",r(n[i],a)+"%")}function m(e,t){var n=e.getMetricNode(e.className,e.metricName,t);n&&(g(e.getTimerHistogramDivId(),n,"p999",e.durationMax),g(e.getTimerHistogramDivId(),n,"p99",e.durationMax),g(e.getTimerHistogramDivId(),n,"p98",e.durationMax),g(e.getTimerHistogramDivId(),n,"p95",e.durationMax),g(e.getTimerHistogramDivId(),n,"p75",e.durationMax),g(e.getTimerHistogramDivId(),n,"p50",e.durationMax))}function v(e){var n=t("#"+e.divId),i="<div class='metricsWatcher histogram histogramContainer'><div class='heading1 btn-link col-md-12' data-toggle='collapse' data-target='#"+e.divId+"Collapse'> "+(e.isNested?"Histogram":e.title)+"</div><div class='collapse' id='"+e.divId+"Collapse'><table><tr><td class='col-md-4'>Count</td><td class='col-md-4'>Min</td><td class='col-md-4'>Max<td class='col-md-4'>Mean</td></tr><tr><td class='countVal'></td><td class='minVal'></td><td class='meanVal'></td><td class='maxVal'></td></tr></table><p>Percentiles</p><table class='progressTable'>"+w("99.9%","p999")+w("99%","p99")+w("98%","p98")+w("95%","p95")+w("75%","p75")+w("50%","p50")+"</table></div></div>";n.html(i)}function y(e,n){var i=e.getMetricNode(e.className,e.metricName,n);t("#"+e.divId+" td.countVal").html(o(i.count,0)),t("#"+e.divId+" td.minVal").html(o(i.min,0)),t("#"+e.divId+" td.maxVal").html(o(i.max,0)),t("#"+e.divId+" td.meanVal").html(o(i.mean,0)),C(e,i,"p999","p999",e.max),C(e,i,"p99","p99",e.max),C(e,i,"p98","p98",e.max),C(e,i,"p95","p95",e.max),C(e,i,"p75","p75",e.max),C(e,i,"p50","p50",e.max)}function b(e){var n=t("#"+e.divId),i="<div class='metricsWatcher metric metricGraph'><div class='heading3'>"+e.title+"</div><div class='counterVal'></div><table class='progressTable'>"+w("1 min","onemin")+w("5 min","fivemin")+w("15 min","fifteenmin")+w("Mean","mean")+"</table></div>";n.html(i)}function w(e,t){return"<tr class='"+t+"'><td class='progressLabel'>"+e+"</td><td class='progressBar'><div class='progress'><div class='progress-bar' style='width: 0%;'></div></div></td><td class='progressValue'>0</td></tr>"}function x(e,t){var n=e.getMetricNode(e.className,e.metricName,t);n&&k(e,n)}function k(e,n){var i=t("#"+e.divId+" div.counterVal");i.html(n.rate_units+" ("+n.count+" total)");var r=Math.max(n.mean_rate,n.m1_rate,n.m5_rate,n.m15_rate);C(e,n,"mean_rate","mean",r),C(e,n,"m1_rate","onemin",r),C(e,n,"m5_rate","fivemin",r),C(e,n,"m15_rate","fifteenmin",r)}function C(e,t,n,i){C(e,t,n,i,e.max)}function C(e,n,i,a,s){t("#"+e.divId+" tr."+a+" td.progressValue").html(o(n[i])),t("#"+e.divId+" tr."+a+" td.progressBar div.progress div.progress-bar").css("width",r(n[i],s)+"%")}function S(e){var n=t("#"+e.divId),i="<div class='metricsWatcher metric metricGraph'><div class='heading3'>"+e.title+"</span><div class='gaugeDataVal'></div></div>";n.html(i)}function _(e,t){var n=e.getMetricNode(e.className,e.metricName,t);n&&T(e,n)}function T(e,n){var i=t("#"+e.divId+" div.gaugeDataVal");i.html(n.value)}function $(e,n,i){var r=t("#"+e),o="<div class='metricsWatcher metric metricGraph nested'><fieldset><legend><div class='heading1'>"+n+"</div></legend><div class='gaugeTableContainer'><table class='gaugeTable'></table></div></fieldset></div>";r.html(o)}function E(e,n,i){for(var r=t("#"+e+" table"),o="",a=n.length,s=0;a>s;s++){var l=n[s];o+="<tr><td><h5>"+l.title+"</h5></td><td><h4>"+l.getMetricNode(l.className,l.metricName,i).value+"</h4></td></tr>"}r.html(o)}function D(e){var n=t("#"+e.divId),i="<div class='metricsWatcher cache cacheGraph col-md-12'><fieldset><legend><div class='heading1'>"+e.title+"</div></legend><div class='cacheContainer col-md-12'> <div class='row'> <div class='col-md-3'><div id='"+e.divId+"Statistics'></div></div> <div class='col-md-9'> <div id='"+e.divId+"gettimer'></div> <div id='"+e.divId+"puttimer'></div> </div> </div></div></fieldset></div>";n.html(i);for(var r=e.components.gauges.length,o=0;r>o;o++)S(e.components.gauges[o]);c(e.getTimer),c(e.putTimer),$(e.divId+"Statistics","Statistics",e.components.gauges)}function M(e,n){for(var i=e.components.gauges.length,r=0;i>r;r++){var o=e.components.gauges[r],a=o.getMetricNode(e.className,o.metricName,n);if(a){var s=t("#"+o.divId+" div.metricGraph div.gaugeDataVal");s.html(a.value)}}h(e.getTimer,n),h(e.putTimer,n),E(e.divId+"Statistics",e.components.gauges,n)}function I(e){var n=t("#"+e.divId),i="<div class='metricsWatcher jvm metricGraph col-md-12'><fieldset><legend><div class='heading1 btn-link' data-toggle='collapse' data-target='#"+e.divId+"Collapse'>"+e.title+"</div></legend><div class='jvmContainer col-md-12 collapse' id='"+e.divId+"Collapse'> <div id='"+e.divId+"Vm'></div></div></fieldset></div>";n.html(i)}function P(e,n){var i=t("#"+e.divId+"Vm"),r=n.gauges,a="<div class='row'><div class='col-md-3'><table class='jvmTable'><caption>Memory</caption><tr><td><h5>Total Init</h5></td><td>"+r["jvm.memory.total.init"].value+"</td></tr><tr><td><h5>Total Used</h5></td><td>"+r["jvm.memory.total.used"].value+"</td></tr><tr><td><h5>Total Max</h5></td><td>"+r["jvm.memory.total.max"].value+"</td></tr><tr><td><h5>Total Committed</h5></td><td>"+r["jvm.memory.total.committed"].value+"</td></tr><tr><td><h5>Heap Init</h5></td><td>"+r["jvm.memory.heap.init"].value+"</td></tr><tr><td><h5>Heap Used</h5></td><td>"+r["jvm.memory.heap.used"].value+"</td></tr><tr><td><h5>Heap Max</h5></td><td>"+r["jvm.memory.heap.max"].value+"</td></tr><tr><td><h5>Heap Committed</h5></td><td>"+r["jvm.memory.heap.committed"].value+"</td></tr><tr><td><h5>Non Heap Init</h5></td><td>"+r["jvm.memory.non-heap.init"].value+"</td></tr><tr><td><h5>Non Heap Used</h5></td><td>"+r["jvm.memory.non-heap.used"].value+"</td></tr><tr><td><h5>Non Heap Max</h5></td><td>"+r["jvm.memory.non-heap.max"].value+"</td></tr><tr><td><h5>Non Heap Committed</h5></td><td>"+r["jvm.memory.non-heap.committed"].value+"</td></tr></table></div><div class='col-md-3'><table class='jvmTable'><caption>Memory Usage</caption><tr><td><h5>Heap Usage</h5></td><td>"+(100*r["jvm.memory.heap.usage"].value).toFixed(2)+"</td></tr><tr><td><h5>Non Heap Usage</h5></td><td>"+(100*r["jvm.memory.non-heap.usage"].value).toFixed(2)+"</td></tr>"+(r["jvm.memory.pools.JIT-code-cache.usage"]?"<tr><td><h5>JIT Code Cache Usage</h5></td><td>"+(100*r["jvm.memory.pools.JIT-code-cache.usage"].value).toFixed(2)+"</td></tr>":"")+(r["jvm.memory.pools.Code-Cache.usage"]?"<tr><td><h5>JIT Code Cache Usage</h5></td><td>"+(100*r["jvm.memory.pools.Code-Cache.usage"].value).toFixed(2)+"</td></tr>":"")+(r["jvm.memory.pools.JIT-data-cache.usage"]?"<tr><td><h5>JIT Data Cache Usage</h5></td><td>"+(100*r["jvm.memory.pools.JIT-data-cache.usage"].value).toFixed(2)+"</td></tr>":"")+(r["jvm.memory.pools.Java-heap.usage"]?"<tr><td><h5>Java Heap Usage</h5></td><td>"+(100*r["jvm.memory.pools.Java-heap.usage"].value).toFixed(2)+"</td></tr>":"")+(r["jvm.memory.pools.class-storage.usage"]?"<tr><td><h5>Class Storage Usage</h5></td><td>"+(100*r["jvm.memory.pools.class-storage.usage"].value).toFixed(2)+"</td></tr>":"")+(r["jvm.memory.pools.Perm-Gen.usage"]?"<tr><td><h5>Perm Gen Usage</h5></td><td>"+(100*r["jvm.memory.pools.Perm-Gen.usage"].value).toFixed(2)+"</td></tr>":"")+(r["jvm.memory.pools.Tenured-Gen.usage"]?"<tr><td><h5>Tenured Gen Usage</h5></td><td>"+(100*r["jvm.memory.pools.Tenured-Gen.usage"].value).toFixed(2)+"</td></tr>":"")+(r["jvm.memory.pools.miscellaneous-non-heap-storage.usage"]?"<tr><td><h5>Misc Non Heap Storage Usage</h5></td><td>"+(100*r["jvm.memory.pools.miscellaneous-non-heap-storage.usage"].value).toFixed(2)+"</td></tr>":"")+(r["jvm.memory.pools.Survivor-Space.usage"]?"<tr><td><h5>Survivor Space Usage</h5></td><td>"+(100*r["jvm.memory.pools.Survivor-Space.usage"].value).toFixed(2)+"</td></tr>":"")+(r["jvm.memory.pools.Eden-Space.usage"]?"<tr><td><h5>Eden Space Usage</h5></td><td>"+(100*r["jvm.memory.pools.Eden-Space.usage"].value).toFixed(2)+"</td></tr>":"")+"</table></div><div class='col-md-3'><table class='jvmTable'><caption>Garbage Collection</caption><tr><td><h5>PS Mark Sweep Runs</h5></td><td>"+r["jvm.gc.MarkSweepCompact.count"].value+"</td></tr><tr><td><h5>PS Mark Sweep Time</h5></td><td>"+r["jvm.gc.MarkSweepCompact.time"].value+"</td></tr><tr><td><h5>GC Copy Runs</h5></td><td>"+r["jvm.gc.Copy.count"].value+"</td></tr><tr><td><h5>GC Copy Time</h5></td><td>"+r["jvm.gc.Copy.time"].value+"</td></tr></table></div><div class='col-md-3'><table class='jvmTable'><caption>Threads</caption><tr><td><h5>FD Usage</h5></td><td>"+o(r["jvm.fd.usage"].value,2)+"</td></tr><tr><td><h5>Daemon Threads</h5></td><td>"+r["jvm.thread-states.daemon.count"].value+"</td></tr><tr><td><h5>Threads</h5></td><td>"+r["jvm.thread-states.count"].value+"</td></tr><tr><td><h5>Deadlocks</h5></td><td>"+r["jvm.thread-states.deadlocks"].value+"</td></tr></table><table class='jvmTable'><caption>Thread States</caption><tr><td><h5>Terminated</h5></td><td>"+r["jvm.thread-states.terminated.count"].value+"</td></tr><tr><td><h5>Timed Waiting</h5></td><td>"+r["jvm.thread-states.timed_waiting.count"].value+"</td></tr><tr><td><h5>Blocked</h5></td><td>"+r["jvm.thread-states.blocked.count"].value+"</td></tr><tr><td><h5>Waiting</h5></td><td>"+r["jvm.thread-states.waiting.count"].value+"</td></tr><tr><td><h5>Runnable</h5></td><td>"+r["jvm.thread-states.runnable.count"].value+"</td></tr><tr><td><h5>New</h5></td><td>"+r["jvm.thread-states.new.count"].value+"</td></tr></table></div></div>";i.html(a)}function A(e){var n=t("#"+e.divId),i="<div class='metricsWatcher web metricGraph col-md-12'><fieldset><legend><div class='heading1 btn-link' data-toggle='collapse' data-target='#"+e.divId+"Collapse'>"+e.title+"</div></legend><div class='webContainer col-md-12' id='"+e.divId+"Collapse'> <div id='"+e.divId+"Web'></div><table><tr><td colspan='4' class='requestsGraph col-md-12'></td></tr><tr><td class='activeRequestsGraph col-md-3'></td><td class='responseCodesOkGraph col-md-3'></td><td class='responseCodesCreatedGraph col-md-3'></td><td class='responseCodesOtherGraph col-md-3'></td></tr><tr><td class='responseCodesBadRequestGraph col-md-3'></td><td class='responseCodesNoContentGraph col-md-3'></td><td class='responseCodesNotFoundGraph col-md-3'></td><td class='responseCodesServerErrorGraph col-md-3'></td></tr></table></div></fieldset></div>";n.html(i),c(e.components.requestsInfo),l(e.components.activeRequestsInfo);for(var r=e.components.meters.length,o=0;r>o;o++)b(e.components.meters[o])}function j(e,t){h(e.components.requestsInfo,t),u(e.components.activeRequestsInfo,t);for(var n=e.components.meters.length,i=0;n>i;i++)x(e.components.meters[i],t)}function N(e){var n=t("#"+e.divId),i="<div class='metricsWatcher log4j metricGraph col-md-12'><fieldset><legend><div class='heading1 btn-link' data-toggle='collapse' data-target='#"+e.divId+"Collapse'>"+e.title+"</div></legend><div class='log4jContainer col-md-12' id='"+e.divId+"Collapse'> <div id='"+e.divId+"Log4j'></div><table><tr><td colspan='4' class='col-md-12'></td></tr><tr><td class='all col-md-3'></td><td class='fatal col-md-3'></td><td class='error col-md-3'></td><td class='warn col-md-3'></td></tr><tr><td class='info col-md-3'></td><td class='debug col-md-3'></td><td class='trace col-md-3'></td></tr></table></div></fieldset></div>";n.html(i);for(var r=e.components.meters.length,o=0;r>o;o++)b(e.components.meters[o])}function O(e,t){for(var n=e.components.meters.length,i=0;n>i;i++)x(e.components.meters[i],t)}e.addGauge=function(e,t,n,r){var o=new i(e,t,n,null,r,"gauges",null);L.push(o)},e.addMeter=function(e,t,r,o,a,s){s==n&&(s="Calls");var l=new i(e,t,r,o,a,"meters",s);l.eventType=s,L.push(l)},e.addCounter=function(e,t,n,r,o){var a=new i(e,t,n,r,o,"counters",null);L.push(a)},e.addHistogram=function(e,t,n,r,o){var a=new i(e,t,n,r?r:1,o,"histograms",null);L.push(a)},e.addLinkedCounter=function(e,t,n,r,o,a){var s=new i(e,t,n,null,a,"counters",null);s||(s=new i(e,t,n,null,a,"timers",null)),s.maxClassName=r,s.maxMetricName=o,s.getMax=function(e){var t=this.getMetricNode(this.maxClassName,this.maxMetricName,e);return t.count},s.getMetricNode=function(e,t,n){var i=n.counters[e+"."+t]?n.counters[e+"."+t]:null;return i?i:n.timers[e+"."+t]?n.timers[e+"."+t]:null},L.push(s)},e.addTimer=function(e,t,n,i,r,o,a){var l=s(e,t,n,i,r,o,a,!1);L.push(l)},e.addCache=function(e,t,n){var r=new i(e,t,null,null,n,"caches",null);r.components={gauges:[new i(null,t,"hits",null,"Hits","gauges",null),new i(null,t,"misses",null,"Misses","gauges",null),new i(null,t,"objects",null,"Objects","gauges",null),new i(null,t,"eviction-count",null,"Eviction Count","gauges",null),new i(null,t,"in-memory-hits",null,"In Memory Hits","gauges",null),new i(null,t,"in-memory-misses",null,"In Memory Misses","gauges",null),new i(null,t,"in-memory-objects",null,"In Memory Objects","gauges",null),new i(null,t,"off-heap-hits",null,"Off Heap Hits","gauges",null),new i(null,t,"off-heap-misses",null,"Off Heap Misses","gauges",null),new i(null,t,"off-heap-objects",null,"Off Heap Objects","gauges",null),new i(null,t,"on-disk-hits",null,"On Disk Hits","gauges",null),new i(null,t,"on-disk-misses",null,"On Disk Misses","gauges",null),new i(null,t,"on-disk-objects",null,"On Disk Objects","gauges",null),new i(null,t,"mean-get-time",null,"Mean Get Time","gauges",null),new i(null,t,"mean-search-time",null,"Mean Search Time","gauges",null),new i(null,t,"searches-per-second",null,"Searches Per Sec","gauges",null),new i(null,t,"writer-queue-size",null,"Writer Queue Size","gauges",null),new i(null,t,"accuracy",null,"Accuracy","gauges",null)]},r.getTimer=s(e+"gettimer",t,"gets",5,"Get","get",1,!0),r.putTimer=s(e+"puttimer",t,"puts",5,"Put","put",1,!0),L.push(r)},e.addJvm=function(e,t,n){var r=new i(e,t,null,null,n,"jvms",null);L.push(r)},e.addWeb=function(e,t,n){var r=new i(e,t,null,null,n,"webs",null);r.components={meters:[new i(e+" td.responseCodesOkGraph",t,"responseCodes.ok",10,"OK Responses","meters",null),new i(e+" td.responseCodesBadRequestGraph",t,"responseCodes.badRequest",10,"Bad Requests","meters",null),new i(e+" td.responseCodesCreatedGraph",t,"responseCodes.created",10,"Created Responses","meters",null),new i(e+" td.responseCodesNoContentGraph",t,"responseCodes.noContent",10,"No Content Responses","meters",null),new i(e+" td.responseCodesNotFoundGraph",t,"responseCodes.notFound",10,"Not Found Responses","meters",null),new i(e+" td.responseCodesOtherGraph",t,"responseCodes.other",10,"Other Responses","meters",null),new i(e+" td.responseCodesServerErrorGraph",t,"responseCodes.serverError",10,"Server Error Responses","meters",null)],activeRequestsInfo:new i(e+" td.activeRequestsGraph",t,"activeRequests",10,"Active Requests","counters",null),requestsInfo:s(e+" td.requestsGraph",t,"requests",100,"Requests","requests",100,!0)},L.push(r)},e.addLog4j=function(e,t,n){var r=new i(e,t,null,null,n,"log4js",null);r.components={meters:[new i(e+" td.all",t,"all",100,"all","meters",null),new i(e+" td.fatal",t,"fatal",100,"fatal","meters",null),new i(e+" td.error",t,"error",100,"error","meters",null),new i(e+" td.warn",t,"warn",100,"warn","meters",null),new i(e+" td.info",t,"info",100,"info","meters",null),new i(e+" td.debug",t,"debug",100,"debug","meters",null),new i(e+" td.trace",t,"trace",100,"trace","meters",null)]},L.push(r)},e.initGraphs=function(){for(var e=0;e<L.length;e++)"gauges"==L[e].type?S(L[e]):"meters"==L[e].type?b(L[e]):"counters"==L[e].type||"linkedTimerCounters"==L[e].type?l(L[e]):"histograms"==L[e].type?v(L[e]):"timers"==L[e].type?c(L[e]):"caches"==L[e].type?D(L[e]):"jvms"==L[e].type?I(L[e]):"webs"==L[e].type?A(L[e]):"log4js"==L[e].type?N(L[e]):alert("Unknown meter info type: "+L[e].type)},e.updateGraphs=function(e){for(var t=0;t<L.length;t++)"gauges"==L[t].type?_(L[t],e):"meters"==L[t].type?x(L[t],e):"counters"==L[t].type||"linkedTimerCounters"==L[t].type?u(L[t],e):"histograms"==L[t].type?y(L[t],e):"timers"==L[t].type?h(L[t],e):"caches"==L[t].type?M(L[t],e):"jvms"==L[t].type?P(L[t],e):"webs"==L[t].type?j(L[t],e):"log4js"==L[t].type?O(L[t],e):alert("Unknown meter info type: "+L[t].type)};var L=[]}(window.metricsWatcher=window.metricsWatcher||{},jQuery);var _apacheCamelModelVersion="2.15.2",_apacheCamelModel={definitions:{expression:{type:"object",title:"expression",group:"language",icon:"generic24.png",description:"Expression in the choose language",properties:{expression:{kind:"element",type:"string",title:"Expression",description:"The expression",required:!0},language:{kind:"element",type:"string",title:"Expression",description:"The chosen language",required:!0,"enum":["constant","el","exchangeProperty","groovy","header","javaScript","jsonpath","jxpath","language","method","mvel","ognl","php","python","ref","ruby","simple","spel","sql","terser","tokenize","vtdxml","xpath","xquery","xtokenize"]}}},aggregate:{type:"object",title:"Aggregate",group:"eip,routing",icon:"aggregate24.png",description:"Aggregates many messages into a single message",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{correlationExpression:{kind:"expression",type:"object",description:"The expression used to calculate the correlation key to use for aggregation. The Exchange which has the same correlation key is aggregated together. If the correlation key could not be evaluated an Exception is thrown. You can disable this by using the ignoreBadCorrelationKeys option.",title:"Correlation Expression",required:!0,deprecated:!1},completionPredicate:{kind:"expression",type:"object",description:"Sets the predicate used to determine if the aggregation is completed",title:"Completion Predicate",required:!1,deprecated:!1},completionTimeoutExpression:{kind:"expression",type:"object",description:"Sets the completion timeout which would cause the aggregate to consider the group as complete and send out the aggregated exchange.",title:"Completion Timeout",required:!1,deprecated:!1},completionSizeExpression:{kind:"expression",type:"object",description:"Sets the completion size which is the number of aggregated exchanges which would cause the aggregate to consider the group as complete and send out the aggregated exchange.",title:"Completion Size",required:!1,deprecated:!1},optimisticLockRetryPolicy:{kind:"element",type:"object",description:"Allows to configure retry settings when using optimistic locking.",title:"Optimistic Lock Retry Policy",required:!1,deprecated:!1},parallelProcessing:{kind:"attribute",type:"boolean",defaultValue:"false",description:"When aggregated are completed they are being send out of the aggregator. This option indicates whether or not Camel should use a thread pool with multiple threads for concurrency. If no custom thread pool has been specified then Camel creates a default pool with 10 concurrent threads.",title:"Parallel Processing",required:!1,deprecated:!1},optimisticLocking:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Turns on using optimistic locking which requires the aggregationRepository being used is supporting this by implementing org.apache.camel.spi.OptimisticLockingAggregationRepository.",title:"Optimistic Locking",required:!1,deprecated:!1},executorServiceRef:{kind:"attribute",type:"string",description:"If using parallelProcessing you can specify a custom thread pool to be used. In fact also if you are not using parallelProcessing this custom thread pool is used to send out aggregated exchanges as well.",title:"Executor Service Ref",required:!1,deprecated:!1},timeoutCheckerExecutorServiceRef:{kind:"attribute",type:"string",description:"If using either of the completionTimeout completionTimeoutExpression or completionInterval options a background thread is created to check for the completion for every aggregator. Set this option to provide a custom thread pool to be used rather than creating a new thread for every aggregator.",title:"Timeout Checker Executor Service Ref",required:!1,deprecated:!1},aggregationRepositoryRef:{kind:"attribute",type:"string",description:"Sets the custom aggregate repository to use Will by default use org.apache.camel.processor.aggregate.MemoryAggregationRepository",title:"Aggregation Repository Ref",required:!1,deprecated:!1},strategyRef:{kind:"attribute",type:"string",description:"A reference to lookup the AggregationStrategy in the Registry. Configuring an AggregationStrategy is required and is used to merge the incoming Exchange with the existing already merged exchanges. At first call the oldExchange parameter is null. On subsequent invocations the oldExchange contains the merged exchanges and newExchange is of course the new incoming Exchange.",title:"Strategy Ref",required:!1,deprecated:!1},strategyMethodName:{kind:"attribute",type:"string",description:"This option can be used to explicit declare the method name to use when using POJOs as the AggregationStrategy.",title:"Strategy Method Name",required:!1,deprecated:!1},strategyMethodAllowNull:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If this option is false then the aggregate method is not used for the very first aggregation. If this option is true then null values is used as the oldExchange (at the very first aggregation) when using POJOs as the AggregationStrategy.",title:"Strategy Method Allow Null",required:!1,deprecated:!1},completionSize:{kind:"attribute",type:"integer",description:"Sets the completion size which is the number of aggregated exchanges which would cause the aggregate to consider the group as complete and send out the aggregated exchange.",title:"Completion Size",required:!1,deprecated:!1},completionInterval:{kind:"attribute",type:"integer",description:"Sets the completion interval which would cause the aggregate to consider the group as complete and send out the aggregated exchange.",title:"Completion Interval",required:!1,deprecated:!1},completionTimeout:{kind:"attribute",type:"integer",description:"Sets the completion timeout which would cause the aggregate to consider the group as complete and send out the aggregated exchange.",
|
|
3267
|
|
-title:"Completion Timeout",required:!1,deprecated:!1},completionFromBatchConsumer:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Enables the batch completion mode where we aggregate from a org.apache.camel.BatchConsumer and aggregate the total number of exchanges the org.apache.camel.BatchConsumer has reported as total by checking the exchange property link org.apache.camel.ExchangeBATCH_COMPLETE when its complete.",title:"Completion From Batch Consumer",required:!1,deprecated:!1},groupExchanges:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Enables grouped exchanges so the aggregator will group all aggregated exchanges into a single combined Exchange holding all the aggregated exchanges in a java.util.List.",title:"Group Exchanges",required:!1,deprecated:!0},eagerCheckCompletion:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Use eager completion checking which means that the completionPredicate will use the incoming Exchange. At opposed to without eager completion checking the completionPredicate will use the aggregated Exchange.",title:"Eager Check Completion",required:!1,deprecated:!1},ignoreInvalidCorrelationKeys:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If a correlation key cannot be successfully evaluated it will be ignored by logging a DEBUG and then just ignore the incoming Exchange.",title:"Ignore Invalid Correlation Keys",required:!1,deprecated:!1},closeCorrelationKeyOnCompletion:{kind:"attribute",type:"integer",description:"Closes a correlation key when its complete. Any late received exchanges which has a correlation key that has been closed it will be defined and a org.apache.camel.processor.aggregate.ClosedCorrelationKeyException is thrown.",title:"Close Correlation Key On Completion",required:!1,deprecated:!1},discardOnCompletionTimeout:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Discards the aggregated message on completion timeout. This means on timeout the aggregated message is dropped and not sent out of the aggregator.",title:"Discard On Completion Timeout",required:!1,deprecated:!1},forceCompletionOnStop:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Indicates to complete all current aggregated exchanges when the context is stopped",title:"Force Completion On Stop",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},aop:{type:"object",title:"Aop",group:"configuration",icon:"generic24.png",description:"Does processing before and/or after the route is completed",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{beforeUri:{kind:"attribute",type:"string",description:"Endpoint to call in AOP before.",title:"Before Uri",required:!1,deprecated:!1},afterUri:{kind:"attribute",type:"string",description:"Endpoint to call in AOP after. The difference between after and afterFinally is that afterFinally is invoked from a finally block so it will always be invoked no matter what eg also in case of an exception occur.",title:"After Uri",required:!1,deprecated:!1},afterFinallyUri:{kind:"attribute",type:"string",description:"Endpoint to call in AOP after finally. The difference between after and afterFinally is that afterFinally is invoked from a finally block so it will always be invoked no matter what eg also in case of an exception occur.",title:"After Finally Uri",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},"batch-config":{type:"object",title:"Batch-config",group:"configuration,resequence",icon:"generic24.png",description:"Configures batch-processing resequence eip.",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{batchSize:{kind:"attribute",type:"integer",defaultValue:"100",description:"Sets the size of the batch to be re-ordered. The default size is 100.",title:"Batch Size",required:!1,deprecated:!1},batchTimeout:{kind:"attribute",type:"integer",defaultValue:"1000",description:"Sets the timeout for collecting elements to be re-ordered. The default timeout is 1000 msec.",title:"Batch Timeout",required:!1,deprecated:!1},allowDuplicates:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to allow duplicates.",title:"Allow Duplicates",required:!1,deprecated:!1},reverse:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to reverse the ordering.",title:"Reverse",required:!1,deprecated:!1},ignoreInvalidExchanges:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to ignore invalid exchanges",title:"Ignore Invalid Exchanges",required:!1,deprecated:!1}}},bean:{type:"object",title:"Bean",group:"eip,endpoint",icon:"bean24.png",description:"Calls a java bean",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{ref:{kind:"attribute",type:"string",description:"Sets a reference to a bean to use",title:"Ref",required:!1,deprecated:!1},method:{kind:"attribute",type:"string",description:"Sets the method name on the bean to use",title:"Method",required:!1,deprecated:!1},beanType:{kind:"attribute",type:"string",description:"Sets the Class of the bean",title:"Bean Type",required:!1,deprecated:!1},cache:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Caches the bean lookup to avoid lookup up bean on every usage.",title:"Cache",required:!1,deprecated:!1},multiParameterArray:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether the message body is an array type.",title:"Multi Parameter Array",required:!1,deprecated:!0},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},choice:{type:"object",title:"Choice",group:"eip,routing",icon:"choice24.png",description:"Routes messages based on a series of predicates",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{whenClauses:{kind:"element",type:"array",description:"Sets the when clauses",title:"When Clauses",required:!1,deprecated:!1},otherwise:{kind:"element",type:"object",description:"Sets the otherwise node",title:"Otherwise",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},circuitBreaker:{type:"object",title:"Circuit Breaker",group:"configuration,loadbalance",icon:"generic24.png",description:"Circuit break load balancer",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{exception:{kind:"element",type:"array",description:"A list of class names for specific exceptions to monitor. If no exceptions is configured then all exceptions is monitored",title:"Exception",required:!1,deprecated:!1},halfOpenAfter:{kind:"attribute",type:"integer",description:"The timeout in millis to use as threshold to move state from closed to half-open or open state",title:"Half Open After",required:!1,deprecated:!1},threshold:{kind:"attribute",type:"integer",description:"Number of previous failed messages to use as threshold to move state from closed to half-open or open state",title:"Threshold",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},contextScan:{type:"object",title:"Context Scan",group:"configuration",icon:"generic24.png",description:"Scans for Java org.apache.camel.builder.RouteBuilder instances in the context org.apache.camel.spi.Registry.",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{excludes:{kind:"element",type:"array",description:"Exclude finding route builder from these java package names.",title:"Excludes",required:!1,deprecated:!1},includes:{kind:"element",type:"array",description:"Include finding route builder from these java package names.",title:"Includes",required:!1,deprecated:!1}}},convertBodyTo:{type:"object",title:"Convert Body To",group:"eip,transformation",icon:"convertBodyTo24.png",description:"Converts the message body to another type",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{type:{kind:"attribute",type:"string",description:"The java type to convert to",title:"Type",required:!0,deprecated:!1},charset:{kind:"attribute",type:"string",description:"To use a specific charset when converting",title:"Charset",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},customLoadBalancer:{type:"object",title:"Custom Load Balancer",group:"configuration,loadbalance",icon:"generic24.png",description:"Custom load balancer",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{ref:{kind:"attribute",type:"string",description:"Refers to the custom load balancer to lookup from the registry",title:"Ref",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},delay:{type:"object",title:"Delay",group:"eip,routing",icon:"generic24.png",description:"Delays processing for a specified length of time",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{executorServiceRef:{kind:"attribute",type:"string",description:"Refers to a custom Thread Pool if asyncDelay has been enabled.",title:"Executor Service Ref",required:!1,deprecated:!1},asyncDelayed:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Enables asynchronous delay which means the thread will noy block while delaying.",title:"Async Delayed",required:!1,deprecated:!1},callerRunsWhenRejected:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether or not the caller should run the task when it was rejected by the thread pool. Is by default true",title:"Caller Runs When Rejected",required:!1,deprecated:!1},expression:{kind:"expression",type:"object",description:"Expression to define how long time to wait (in millis)",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},description:{type:"object",title:"Description",group:"configuration",icon:"generic24.png",description:"To provide comments about the node.",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{lang:{kind:"attribute",type:"string",description:"Language such as en for english.",title:"Lang",required:!1,deprecated:!1},layoutX:{kind:"attribute",type:"number",description:"Layout position X",title:"Layout X",required:!1,deprecated:!0},layoutY:{kind:"attribute",type:"number",description:"Layout position Y",title:"Layout Y",required:!1,deprecated:!0},layoutWidth:{kind:"attribute",type:"number",description:"Layout width",title:"Layout Width",required:!1,deprecated:!0},layoutHeight:{kind:"attribute",type:"number",description:"Layout height",title:"Layout Height",required:!1,deprecated:!0},text:{kind:"value",type:"string",description:"The description as human readable text",title:"Text",required:!0,deprecated:!1}}},doCatch:{type:"object",title:"Do Catch",group:"error",icon:"generic24.png",description:"Catches exceptions as part of a try catch finally block",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{exception:{kind:"element",type:"array",description:"The exception(s) to catch.",title:"Exception",required:!1,deprecated:!1},onWhen:{kind:"element",type:"object",description:"Sets an additional predicate that should be true before the onCatch is triggered. To be used for fine grained controlling whether a thrown exception should be intercepted by this exception type or not.",title:"On When",required:!1,deprecated:!1},handled:{kind:"expression",type:"object",description:"Sets whether the exchange should be marked as handled or not.",title:"Handled",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},doFinally:{type:"object",title:"Do Finally",group:"error",icon:"generic24.png",description:"Path traversed when a try catch finally block exits",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},doTry:{type:"object",title:"Do Try",group:"error",icon:"generic24.png",description:"Marks the beginning of a try catch finally block",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},dynamicRouter:{type:"object",title:"Dynamic Router",group:"eip,endpoint,routing",icon:"dynamicRouter25.png",description:"Routes messages based on dynamic rules",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{uriDelimiter:{kind:"attribute",type:"string",defaultValue:",",description:"Sets the uri delimiter to use",title:"Uri Delimiter",required:!1,deprecated:!1},ignoreInvalidEndpoints:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Ignore the invalidate endpoint exception when try to create a producer with that endpoint",title:"Ignore Invalid Endpoints",required:!1,deprecated:!1},cacheSize:{kind:"attribute",type:"integer",description:"Sets the maximum size used by the org.apache.camel.impl.ProducerCache which is used to cache and reuse producers when using this recipient list when uris are reused.",title:"Cache Size",required:!1,deprecated:!1},expression:{kind:"expression",type:"object",description:"Expression to call that returns the endpoint(s) to route to in the dynamic routing. Important: The expression will be called in a while loop fashion until the expression returns null which means the dynamic router is finished.",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},enrich:{type:"object",title:"Enrich",group:"eip,transformation",icon:"enrich24.png",description:"Enriches a message with data from a secondary resource",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{uri:{kind:"attribute",type:"string",description:"The endpoint uri for the external service to enrich from. You must use either uri or ref.",title:"Uri",required:!1,deprecated:!1},ref:{kind:"attribute",type:"string",description:"Refers to the endpoint for the external service to enrich from. You must use either uri or ref.",title:"Ref",required:!1,deprecated:!0},strategyRef:{kind:"attribute",type:"string",description:"Refers to an AggregationStrategy to be used to merge the reply from the external service into a single outgoing message. By default Camel will use the reply from the external service as outgoing message.",title:"Strategy Ref",required:!1,deprecated:!1},strategyMethodName:{kind:"attribute",type:"string",description:"This option can be used to explicit declare the method name to use when using POJOs as the AggregationStrategy.",title:"Strategy Method Name",required:!1,deprecated:!1},strategyMethodAllowNull:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If this option is false then the aggregate method is not used if there was no data to enrich. If this option is true then null values is used as the oldExchange (when no data to enrich) when using POJOs as the AggregationStrategy.",title:"Strategy Method Allow Null",required:!1,deprecated:!1},aggregateOnException:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If this option is false then the aggregate method is not used if there was an exception thrown while trying to retrieve the data to enrich from the resource. Setting this option to true allows end users to control what to do if there was an exception in the aggregate method. For example to suppress the exception or set a custom message body etc.",title:"Aggregate On Exception",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},failover:{type:"object",title:"Failover",group:"configuration,loadbalance",icon:"generic24.png",description:"Failover load balancer",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{exception:{kind:"element",type:"array",description:"A list of class names for specific exceptions to monitor. If no exceptions is configured then all exceptions is monitored",title:"Exception",required:!1,deprecated:!1},roundRobin:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether or not the failover load balancer should operate in round robin mode or not. If not then it will always start from the first endpoint when a new message is to be processed. In other words it restart from the top for every message. If round robin is enabled then it keeps state and will continue with the next endpoint in a round robin fashion. When using round robin it will not stick to last known good endpoint it will always pick the next endpoint to use.",title:"Round Robin",required:!1,deprecated:!1},maximumFailoverAttempts:{kind:"attribute",type:"integer",defaultValue:"-1",description:"A value to indicate after X failover attempts we should exhaust (give up). Use -1 to indicate never give up and continuously try to failover. Use 0 to never failover. And use e.g. 3 to failover at most 3 times before giving up. his option can be used whether or not roundRobin is enabled or not.",title:"Maximum Failover Attempts",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},filter:{type:"object",title:"Filter",group:"eip,routing",icon:"filter24.png",description:"Filter out messages based using a predicate",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{expression:{kind:"expression",type:"object",description:"Expression to determine if the message should be filtered or not. If the expression returns an empty value or false then the message is filtered (dropped) otherwise the message is continued being routed.",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},from:{type:"object",title:"From",group:"eip,endpoint,routing",icon:"endpoint24.png",description:"Act as a message source as input to a route",acceptInput:"false",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{uri:{kind:"attribute",type:"string",description:"Sets the URI of the endpoint to use",title:"Uri",required:!1,deprecated:!1},ref:{kind:"attribute",type:"string",description:"Sets the name of the endpoint within the registry (such as the Spring ApplicationContext or JNDI) to use",title:"Ref",required:!1,deprecated:!0},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},idempotentConsumer:{type:"object",title:"Idempotent Consumer",group:"eip,routing",icon:"generic24.png",description:"Filters out duplicate messages",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{messageIdRepositoryRef:{kind:"attribute",type:"string",description:"Sets the reference name of the message id repository",title:"Message Id Repository Ref",required:!0,deprecated:!1},eager:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Sets whether to eagerly add the key to the idempotent repository or wait until the exchange is complete. Eager is default enabled.",title:"Eager",required:!1,deprecated:!1},skipDuplicate:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Sets whether to skip duplicates or not. The default behavior is to skip duplicates. A duplicate message would have the Exchange property link org.apache.camel.ExchangeDUPLICATE_MESSAGE set to a link BooleanTRUE value. A none duplicate message will not have this property set.",title:"Skip Duplicate",required:!1,deprecated:!1},removeOnFailure:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Sets whether to remove or keep the key on failure. The default behavior is to remove the key on failure.",title:"Remove On Failure",required:!1,deprecated:!1},expression:{kind:"expression",type:"object",description:"Expression used to calculate the correlation key to use for duplicate check. The Exchange which has the same correlation key is regarded as a duplicate and will be rejected.",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},inOnly:{type:"object",title:"In Only",group:"eip,endpoint,routing",icon:"eventMessage24.png",description:"Marks the exchange pattern for the route to one way",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{uri:{kind:"attribute",type:"string",description:"Sets the uri of the endpoint to send to.",title:"Uri",required:!1,deprecated:!1},ref:{kind:"attribute",type:"string",description:"Sets the reference of the endpoint to send to.",title:"Ref",required:!1,deprecated:!0},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},inOut:{type:"object",title:"In Out",group:"eip,endpoint,routing",icon:"requestReply24.png",description:"Marks the exchange pattern for the route to request/reply",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{uri:{kind:"attribute",type:"string",description:"Sets the uri of the endpoint to send to.",title:"Uri",required:!1,deprecated:!1},ref:{kind:"attribute",type:"string",description:"Sets the reference of the endpoint to send to.",title:"Ref",required:!1,deprecated:!0},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},intercept:{type:"object",title:"Intercept",group:"configuration",icon:"generic24.png",description:"Intercepts a message at each step in the route",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},interceptFrom:{type:"object",title:"Intercept From",group:"configuration",icon:"generic24.png",description:"Intercepts incoming messages",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{uri:{kind:"attribute",type:"string",description:"Intercept incoming messages from the uri or uri pattern. If this option is not configured then all incoming messages is intercepted.",title:"Uri",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},interceptSendToEndpoint:{type:"object",title:"Intercept Send To Endpoint",group:"configuration",icon:"generic24.png",description:"Intercepts messages being sent to an endpoint",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{uri:{kind:"attribute",type:"string",description:"Intercept sending to the uri or uri pattern.",title:"Uri",required:!0,deprecated:!1},skipSendToOriginalEndpoint:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If set to true then the message is not sent to the original endpoint. By default (false) the message is both intercepted and then sent to the original endpoint.",title:"Skip Send To Original Endpoint",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},loadBalance:{type:"object",title:"Load Balance",group:"eip,routing",icon:"loadBalance24.png",description:"Balances message processing among a number of nodes",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{loadBalancerType:{kind:"element",type:"object",description:"The load balancer to be used",title:"Load Balancer Type",required:!0,deprecated:!1},inheritErrorHandler:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Sets whether or not to inherit the configured error handler. The default value is true. You can use this to disable using the inherited error handler for a given DSL such as a load balancer where you want to use a custom error handler strategy.",title:"Inherit Error Handler",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},log:{type:"object",title:"Log",group:"configuration",icon:"log24.png",description:"Logs the defined message to the logger",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{message:{kind:"attribute",type:"string",description:"Sets the log message (uses simple language)",title:"Message",required:!0,deprecated:!1},loggingLevel:{kind:"attribute",type:"string",defaultValue:"INFO","enum":["DEBUG","ERROR","INFO","OFF","TRACE","WARN"],description:"Sets the logging level. The default value is INFO",title:"Logging Level",required:!1,deprecated:!1},logName:{kind:"attribute",type:"string",description:"Sets the name of the logger",title:"Log Name",required:!1,deprecated:!1},marker:{kind:"attribute",type:"string",description:"To use slf4j marker",title:"Marker",required:!1,deprecated:!1},loggerRef:{kind:"attribute",type:"string",description:"To refer to a custom logger instance to lookup from the registry.",title:"Logger Ref",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},loop:{type:"object",title:"Loop",group:"eip,routing",icon:"generic24.png",description:"Processes a message multiple times",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{copy:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If the copy attribute is true a copy of the input Exchange is used for each iteration. That means each iteration will start from a copy of the same message. By default loop will loop the same exchange all over so each iteration may have different message content.",title:"Copy",required:!1,deprecated:!1},expression:{kind:"expression",type:"object",description:"Expression to define how many times we should loop. Notice the expression is only evaluated once and should return a number as how many times to loop. A value of zero or negative means no looping. The loop is like a for-loop fashion if you want a while loop then the dynamic router may be a better choice.",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},marshal:{type:"object",title:"Marshal",group:"eip,transformation",icon:"marshal24.png",description:"Marshals data into a specified format for transmission over a transport or component",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{dataFormatType:{kind:"element",type:"object",description:"The data format to be used",title:"Data Format Type",required:!0,deprecated:!1},ref:{kind:"attribute",type:"string",description:"To refer to a custom data format to use as marshaller",title:"Ref",required:!1,deprecated:!0},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},multicast:{type:"object",title:"Multicast",group:"eip,routing",icon:"multicast24.png",description:"Routes the same message to multiple paths either sequentially or in parallel.",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{parallelProcessing:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If enabled then sending messages to the multicasts occurs concurrently. Note the caller thread will still wait until all messages has been fully processed before it continues. Its only the sending and processing the replies from the multicasts which happens concurrently.",title:"Parallel Processing",required:!1,deprecated:!1},strategyRef:{kind:"attribute",type:"string",description:"Refers to an AggregationStrategy to be used to assemble the replies from the multicasts into a single outgoing message from the Multicast. By default Camel will use the last reply as the outgoing message. You can also use a POJO as the AggregationStrategy",title:"Strategy Ref",required:!1,deprecated:!1},strategyMethodName:{kind:"attribute",type:"string",description:"This option can be used to explicit declare the method name to use when using POJOs as the AggregationStrategy.",
|
|
3268
|
|
-title:"Strategy Method Name",required:!1,deprecated:!1},strategyMethodAllowNull:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If this option is false then the aggregate method is not used if there was no data to enrich. If this option is true then null values is used as the oldExchange (when no data to enrich) when using POJOs as the AggregationStrategy",title:"Strategy Method Allow Null",required:!1,deprecated:!1},executorServiceRef:{kind:"attribute",type:"string",description:"Refers to a custom Thread Pool to be used for parallel processing. Notice if you set this option then parallel processing is automatic implied and you do not have to enable that option as well.",title:"Executor Service Ref",required:!1,deprecated:!1},streaming:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If enabled then Camel will process replies out-of-order eg in the order they come back. If disabled Camel will process replies in the same order as defined by the multicast.",title:"Streaming",required:!1,deprecated:!1},stopOnException:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Will now stop further processing if an exception or failure occurred during processing of an org.apache.camel.Exchange and the caused exception will be thrown. Will also stop if processing the exchange failed (has a fault message) or an exception was thrown and handled by the error handler (such as using onException). In all situations the multicast will stop further processing. This is the same behavior as in pipeline which is used by the routing engine. The default behavior is to not stop but continue processing till the end",title:"Stop On Exception",required:!1,deprecated:!1},timeout:{kind:"attribute",type:"integer",defaultValue:"0",description:"Sets a total timeout specified in millis when using parallel processing. If the Multicast hasn't been able to send and process all replies within the given timeframe then the timeout triggers and the Multicast breaks out and continues. Notice if you provide a TimeoutAwareAggregationStrategy then the timeout method is invoked before breaking out. If the timeout is reached with running tasks still remaining certain tasks for which it is difficult for Camel to shut down in a graceful manner may continue to run. So use this option with a bit of care.",title:"Timeout",required:!1,deprecated:!1},onPrepareRef:{kind:"attribute",type:"string",description:"Uses the Processor when preparing the org.apache.camel.Exchange to be send. This can be used to deep-clone messages that should be send or any custom logic needed before the exchange is send.",title:"On Prepare Ref",required:!1,deprecated:!1},shareUnitOfWork:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Shares the org.apache.camel.spi.UnitOfWork with the parent and each of the sub messages. Multicast will by default not share unit of work between the parent exchange and each multicasted exchange. This means each sub exchange has its own individual unit of work.",title:"Share Unit Of Work",required:!1,deprecated:!1},parallelAggregate:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If enabled then the aggregate method on AggregationStrategy can be called concurrently. Notice that this would require the implementation of AggregationStrategy to be implemented as thread-safe. By default this is false meaning that Camel synchronizes the call to the aggregate method. Though in some use-cases this can be used to archive higher performance when the AggregationStrategy is implemented as thread-safe.",title:"Parallel Aggregate",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},onCompletion:{type:"object",title:"On Completion",group:"configuration",icon:"generic24.png",description:"Route to be executed when normal route processing completes",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{mode:{kind:"attribute",type:"string",defaultValue:"AfterConsumer","enum":["AfterConsumer","BeforeConsumer"],description:"Sets the on completion mode. The default value is AfterConsumer",title:"Mode",required:!1,deprecated:!1},onCompleteOnly:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Will only synchronize when the org.apache.camel.Exchange completed successfully (no errors).",title:"On Complete Only",required:!1,deprecated:!1},onFailureOnly:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Will only synchronize when the org.apache.camel.Exchange ended with failure (exception or FAULT message).",title:"On Failure Only",required:!1,deprecated:!1},onWhen:{kind:"element",type:"object",description:"Sets an additional predicate that should be true before the onCompletion is triggered. To be used for fine grained controlling whether a completion callback should be invoked or not",title:"On When",required:!1,deprecated:!1},parallelProcessing:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If enabled then the on completion process will run asynchronously by a separate thread from a thread pool. By default this is false meaning the on completion process will run synchronously using the same caller thread as from the route.",title:"Parallel Processing",required:!1,deprecated:!1},executorServiceRef:{kind:"attribute",type:"string",description:"Refers to a custom Thread Pool to be used for parallel processing. Notice if you set this option then parallel processing is automatic implied and you do not have to enable that option as well.",title:"Executor Service Ref",required:!1,deprecated:!1},useOriginalMessage:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Will use the original input body when an org.apache.camel.Exchange for this on completion. By default this feature is off.",title:"Use Original Message",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},onException:{type:"object",title:"On Exception",group:"error",icon:"generic24.png",description:"Route to be executed when an exception is thrown",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{exception:{kind:"element",type:"array",description:"A set of exceptions to react upon.",title:"Exception",required:!0,deprecated:!1},onWhen:{kind:"element",type:"object",description:"Sets an additional predicate that should be true before the onException is triggered. To be used for fine grained controlling whether a thrown exception should be intercepted by this exception type or not.",title:"On When",required:!1,deprecated:!1},retryWhile:{kind:"expression",type:"object",description:"Sets the retry while predicate. Will continue retrying until predicate returns false.",title:"Retry While",required:!1,deprecated:!1},redeliveryPolicy:{kind:"element",type:"object",description:"Set the RedeliveryPolicy to be used.",title:"Redelivery Policy",required:!1,deprecated:!1},redeliveryPolicyRef:{kind:"attribute",type:"string",description:"Sets a reference to a RedeliveryPolicy to lookup in the org.apache.camel.spi.Registry to be used.",title:"Redelivery Policy Ref",required:!1,deprecated:!1},handled:{kind:"expression",type:"object",description:"Sets whether the exchange should be marked as handled or not.",title:"Handled",required:!1,deprecated:!1},continued:{kind:"expression",type:"object",description:"Sets whether the exchange should handle and continue routing from the point of failure. If this option is enabled then its considered handled as well.",title:"Continued",required:!1,deprecated:!1},onRedeliveryRef:{kind:"attribute",type:"string",description:"Sets a reference to a processor that should be processed before a redelivery attempt. Can be used to change the org.apache.camel.Exchange before its being redelivered.",title:"On Redelivery Ref",required:!1,deprecated:!1},useOriginalMessage:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Will use the original input message when an org.apache.camel.Exchange is moved to the dead letter queue. Notice: this only applies when all redeliveries attempt have failed and the org.apache.camel.Exchange is doomed for failure. Instead of using the current inprogress org.apache.camel.Exchange IN body we use the original IN body instead. This allows you to store the original input in the dead letter queue instead of the inprogress snapshot of the IN body. For instance if you route transform the IN body during routing and then failed. With the original exchange store in the dead letter queue it might be easier to manually re submit the org.apache.camel.Exchange again as the IN body is the same as when Camel received it. So you should be able to send the org.apache.camel.Exchange to the same input. By default this feature is off.",title:"Use Original Message",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},optimisticLockRetryPolicy:{type:"object",title:"Optimistic Lock Retry Policy",group:"configuration",icon:"generic24.png",description:"To configure optimistic locking",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{maximumRetries:{kind:"attribute",type:"integer",description:"Sets the maximum number of retries",title:"Maximum Retries",required:!1,deprecated:!1},retryDelay:{kind:"attribute",type:"integer",defaultValue:"50",description:"Sets the delay in millis between retries",title:"Retry Delay",required:!1,deprecated:!1},maximumRetryDelay:{kind:"attribute",type:"integer",defaultValue:"1000",description:"Sets the upper value of retry in millis between retries when using exponential or random backoff",title:"Maximum Retry Delay",required:!1,deprecated:!1},exponentialBackOff:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Enable exponential backoff",title:"Exponential Back Off",required:!1,deprecated:!1},randomBackOff:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Enables random backoff",title:"Random Back Off",required:!1,deprecated:!1}}},otherwise:{type:"object",title:"Otherwise",group:"eip,routing",icon:"generic24.png",description:"Route to be executed when all other choices evaluate to false",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},packageScan:{type:"object",title:"Package Scan",group:"configuration",icon:"generic24.png",description:"Scans for Java org.apache.camel.builder.RouteBuilder classes in java packages",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{"package":{kind:"element",type:"array",description:"Sets the java package names to use for scanning for route builder classes",title:"Package",required:!0,deprecated:!1},excludes:{kind:"element",type:"array",description:"Exclude finding route builder from these java package names.",title:"Excludes",required:!1,deprecated:!1},includes:{kind:"element",type:"array",description:"Include finding route builder from these java package names.",title:"Includes",required:!1,deprecated:!1}}},pipeline:{type:"object",title:"Pipeline",group:"eip,routing",icon:"pipeline24.png",description:"Routes the message to a sequence of processors.",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},policy:{type:"object",title:"Policy",group:"configuration",icon:"generic24.png",description:"Defines a policy the route will use",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{ref:{kind:"attribute",type:"string",description:"Sets a reference to use for lookup the policy in the registry.",title:"Ref",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},pollEnrich:{type:"object",title:"Poll Enrich",group:"eip,transformation",icon:"pollEnrich24.png",description:"Enriches messages with data polled from a secondary resource",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{uri:{kind:"attribute",type:"string",description:"The endpoint uri for the external service to poll enrich from. You must use either uri or ref.",title:"Uri",required:!1,deprecated:!1},ref:{kind:"attribute",type:"string",description:"Refers to the endpoint for the external service to poll enrich from. You must use either uri or ref.",title:"Ref",required:!1,deprecated:!0},timeout:{kind:"attribute",type:"integer",defaultValue:"-1",description:"Timeout in millis when polling from the external service. The timeout has influence about the poll enrich behavior. It basically operations in three different modes: negative value - Waits until a message is available and then returns it. Warning that this method could block indefinitely if no messages are available. 0 - Attempts to receive a message exchange immediately without waiting and returning null if a message exchange is not available yet. positive value - Attempts to receive a message exchange waiting up to the given timeout to expire if a message is not yet available. Returns null if timed out The default value is -1 and therefore the method could block indefinitely and therefore its recommended to use a timeout value",title:"Timeout",required:!1,deprecated:!1},strategyRef:{kind:"attribute",type:"string",description:"Refers to an AggregationStrategy to be used to merge the reply from the external service into a single outgoing message. By default Camel will use the reply from the external service as outgoing message.",title:"Strategy Ref",required:!1,deprecated:!1},strategyMethodName:{kind:"attribute",type:"string",description:"This option can be used to explicit declare the method name to use when using POJOs as the AggregationStrategy.",title:"Strategy Method Name",required:!1,deprecated:!1},strategyMethodAllowNull:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If this option is false then the aggregate method is not used if there was no data to enrich. If this option is true then null values is used as the oldExchange (when no data to enrich) when using POJOs as the AggregationStrategy.",title:"Strategy Method Allow Null",required:!1,deprecated:!1},aggregateOnException:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If this option is false then the aggregate method is not used if there was an exception thrown while trying to retrieve the data to enrich from the resource. Setting this option to true allows end users to control what to do if there was an exception in the aggregate method. For example to suppress the exception or set a custom message body etc.",title:"Aggregate On Exception",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},process:{type:"object",title:"Process",group:"eip,endpoint",icon:"process24.png",description:"Calls a Camel processor.",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{ref:{kind:"attribute",type:"string",description:"Reference to the Processor to lookup in the registry to use.",title:"Ref",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},properties:{type:"object",title:"Properties",group:"configuration",icon:"generic24.png",description:"A series of key value pair",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{property:{kind:"element",type:"array",description:"A series of properties as key value pairs",title:"Property",required:!1,deprecated:!1}}},property:{type:"object",title:"Property",group:"configuration",icon:"generic24.png",description:"A key value pair",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{key:{kind:"attribute",type:"string",description:"Property key",title:"Key",required:!0,deprecated:!1},value:{kind:"attribute",type:"string",description:"Property value",title:"Value",required:!0,deprecated:!1}}},random:{type:"object",title:"Random",group:"configuration,loadbalance",icon:"generic24.png",description:"Random load balancer",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},recipientList:{type:"object",title:"Recipient List",group:"eip,endpoint,routing",icon:"recipientList24.png",description:"Routes messages to a number of dynamically specified recipients (dynamic to)",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{delimiter:{kind:"attribute",type:"string",defaultValue:",",description:"Delimiter used if the Expression returned multiple endpoints. Can be turned off using the value false. The default value is",title:"Delimiter",required:!1,deprecated:!1},parallelProcessing:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If enabled then sending messages to the recipients occurs concurrently. Note the caller thread will still wait until all messages has been fully processed before it continues. Its only the sending and processing the replies from the recipients which happens concurrently.",title:"Parallel Processing",required:!1,deprecated:!1},strategyRef:{kind:"attribute",type:"string",description:"Sets a reference to the AggregationStrategy to be used to assemble the replies from the recipients into a single outgoing message from the RecipientList. By default Camel will use the last reply as the outgoing message. You can also use a POJO as the AggregationStrategy",title:"Strategy Ref",required:!1,deprecated:!1},strategyMethodName:{kind:"attribute",type:"string",description:"This option can be used to explicit declare the method name to use when using POJOs as the AggregationStrategy.",title:"Strategy Method Name",required:!1,deprecated:!1},strategyMethodAllowNull:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If this option is false then the aggregate method is not used if there was no data to enrich. If this option is true then null values is used as the oldExchange (when no data to enrich) when using POJOs as the AggregationStrategy",title:"Strategy Method Allow Null",required:!1,deprecated:!1},executorServiceRef:{kind:"attribute",type:"string",description:"Refers to a custom Thread Pool to be used for parallel processing. Notice if you set this option then parallel processing is automatic implied and you do not have to enable that option as well.",title:"Executor Service Ref",required:!1,deprecated:!1},stopOnException:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Will now stop further processing if an exception or failure occurred during processing of an org.apache.camel.Exchange and the caused exception will be thrown. Will also stop if processing the exchange failed (has a fault message) or an exception was thrown and handled by the error handler (such as using onException). In all situations the recipient list will stop further processing. This is the same behavior as in pipeline which is used by the routing engine. The default behavior is to not stop but continue processing till the end",title:"Stop On Exception",required:!1,deprecated:!1},ignoreInvalidEndpoints:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Ignore the invalidate endpoint exception when try to create a producer with that endpoint",title:"Ignore Invalid Endpoints",required:!1,deprecated:!1},streaming:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If enabled then Camel will process replies out-of-order eg in the order they come back. If disabled Camel will process replies in the same order as defined by the recipient list.",title:"Streaming",required:!1,deprecated:!1},timeout:{kind:"attribute",type:"integer",defaultValue:"0",description:"Sets a total timeout specified in millis when using parallel processing. If the Recipient List hasn't been able to send and process all replies within the given timeframe then the timeout triggers and the Recipient List breaks out and continues. Notice if you provide a TimeoutAwareAggregationStrategy then the timeout method is invoked before breaking out. If the timeout is reached with running tasks still remaining certain tasks for which it is difficult for Camel to shut down in a graceful manner may continue to run. So use this option with a bit of care.",title:"Timeout",required:!1,deprecated:!1},onPrepareRef:{kind:"attribute",type:"string",description:"Uses the Processor when preparing the org.apache.camel.Exchange to be send. This can be used to deep-clone messages that should be send or any custom logic needed before the exchange is send.",title:"On Prepare Ref",required:!1,deprecated:!1},shareUnitOfWork:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Shares the org.apache.camel.spi.UnitOfWork with the parent and each of the sub messages. Recipient List will by default not share unit of work between the parent exchange and each recipient exchange. This means each sub exchange has its own individual unit of work.",title:"Share Unit Of Work",required:!1,deprecated:!1},cacheSize:{kind:"attribute",type:"integer",description:"Sets the maximum size used by the org.apache.camel.impl.ProducerCache which is used to cache and reuse producers when using this recipient list when uris are reused.",title:"Cache Size",required:!1,deprecated:!1},parallelAggregate:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If enabled then the aggregate method on AggregationStrategy can be called concurrently. Notice that this would require the implementation of AggregationStrategy to be implemented as thread-safe. By default this is false meaning that Camel synchronizes the call to the aggregate method. Though in some use-cases this can be used to archive higher performance when the AggregationStrategy is implemented as thread-safe.",title:"Parallel Aggregate",required:!1,deprecated:!1},expression:{kind:"expression",type:"object",description:"Expression that returns which endpoints (url) to send the message to (the recipients). If the expression return an empty value then the message is not sent to any recipients.",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},redeliveryPolicy:{type:"object",title:"Redelivery Policy",group:"configuration",icon:"generic24.png",description:"To configure re-delivery for error handling",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{maximumRedeliveries:{kind:"attribute",type:"string",description:"Sets the maximum redeliveries x = redeliver at most x times 0 = no redeliveries -1 = redeliver forever",title:"Maximum Redeliveries",required:!1,deprecated:!1},redeliveryDelay:{kind:"attribute",type:"string",description:"Sets the initial redelivery delay",title:"Redelivery Delay",required:!1,deprecated:!1},asyncDelayedRedelivery:{kind:"attribute",type:"string",description:"Allow synchronous delayed redelivery.",title:"Async Delayed Redelivery",required:!1,deprecated:!1},backOffMultiplier:{kind:"attribute",type:"string",description:"Sets the back off multiplier",title:"Back Off Multiplier",required:!1,deprecated:!1},useExponentialBackOff:{kind:"attribute",type:"string",description:"Turn on exponential backk off",title:"Use Exponential Back Off",required:!1,deprecated:!1},collisionAvoidanceFactor:{kind:"attribute",type:"string",description:"Sets the collision avoidance factor",title:"Collision Avoidance Factor",required:!1,deprecated:!1},useCollisionAvoidance:{kind:"attribute",type:"string",description:"Turn on collision avoidance.",title:"Use Collision Avoidance",required:!1,deprecated:!1},maximumRedeliveryDelay:{kind:"attribute",type:"string",description:"Sets the maximum delay between redelivery",title:"Maximum Redelivery Delay",required:!1,deprecated:!1},retriesExhaustedLogLevel:{kind:"attribute",type:"string","enum":["DEBUG","ERROR","INFO","OFF","TRACE","WARN"],description:"Sets the logging level to use when retries has exhausted",title:"Retries Exhausted Log Level",required:!1,deprecated:!1},retryAttemptedLogLevel:{kind:"attribute",type:"string","enum":["DEBUG","ERROR","INFO","OFF","TRACE","WARN"],description:"Sets the logging level to use for logging retry attempts",title:"Retry Attempted Log Level",required:!1,deprecated:!1},logRetryAttempted:{kind:"attribute",type:"string",description:"Sets whether retry attempts should be logged or not. Can be used to include or reduce verbose.",title:"Log Retry Attempted",required:!1,deprecated:!1},logStackTrace:{kind:"attribute",type:"string",description:"Sets whether stack traces should be logged. Can be used to include or reduce verbose.",title:"Log Stack Trace",required:!1,deprecated:!1},logRetryStackTrace:{kind:"attribute",type:"string",description:"Sets whether stack traces should be logged when an retry attempt failed. Can be used to include or reduce verbose.",title:"Log Retry Stack Trace",required:!1,deprecated:!1},logHandled:{kind:"attribute",type:"string",description:"Sets whether handled exceptions should be logged or not. Can be used to include or reduce verbose.",title:"Log Handled",required:!1,deprecated:!1},logNewException:{kind:"attribute",type:"string",description:"Sets whether new exceptions should be logged or not. Can be used to include or reduce verbose. A new exception is an exception that was thrown while handling a previous exception.",title:"Log New Exception",required:!1,deprecated:!1},logContinued:{kind:"attribute",type:"string",description:"Sets whether continued exceptions should be logged or not. Can be used to include or reduce verbose.",title:"Log Continued",required:!1,deprecated:!1},logExhausted:{kind:"attribute",type:"string",description:"Sets whether exhausted exceptions should be logged or not. Can be used to include or reduce verbose.",title:"Log Exhausted",required:!1,deprecated:!1},logExhaustedMessageHistory:{kind:"attribute",type:"string",description:"Sets whether exhausted exceptions should be logged including message history or not (supports property placeholders). Can be used to include or reduce verbose.",title:"Log Exhausted Message History",required:!1,deprecated:!1},disableRedelivery:{kind:"attribute",type:"string",description:"Disables redelivery (same as setting maximum redeliveries to 0)",title:"Disable Redelivery",required:!1,deprecated:!1},delayPattern:{kind:"attribute",type:"string",description:"Sets the delay pattern with delay intervals.",title:"Delay Pattern",required:!1,deprecated:!1},allowRedeliveryWhileStopping:{kind:"attribute",type:"string",description:"Controls whether to allow redelivery while stopping/shutting down a route that uses error handling.",title:"Allow Redelivery While Stopping",required:!1,deprecated:!1},exchangeFormatterRef:{kind:"attribute",type:"string",description:"Sets the reference of the instance of org.apache.camel.spi.ExchangeFormatter to generate the log message from exchange.",title:"Exchange Formatter Ref",required:!1,deprecated:!1}}},removeHeader:{type:"object",title:"Remove Header",group:"eip,transformation",icon:"generic24.png",description:"Removes a named header from the message",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{headerName:{kind:"attribute",type:"string",description:"Name of header to remove",title:"Header Name",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},removeHeaders:{type:"object",title:"Remove Headers",group:"eip,transformation",icon:"generic24.png",description:"Removes message headers whose name matches a specified pattern",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{pattern:{kind:"attribute",type:"string",description:"Name or pattern of headers to remove",title:"Pattern",required:!0,deprecated:!1},excludePattern:{kind:"attribute",type:"string",description:"Name or patter of headers to not remove",title:"Exclude Pattern",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},removeProperties:{type:"object",title:"Remove Properties",group:"eip,transformation",icon:"generic24.png",description:"Removes message exchange properties whose name matches a specified pattern",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{pattern:{kind:"attribute",type:"string",description:"Name or pattern of properties to remove",title:"Pattern",required:!0,deprecated:!1},excludePattern:{kind:"attribute",type:"string",description:"Name or pattern of properties to not remove",title:"Exclude Pattern",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},removeProperty:{type:"object",title:"Remove Property",group:"eip,transformation",icon:"generic24.png",description:"Removes a named property from the message exchange",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{propertyName:{kind:"attribute",type:"string",description:"Name of property to remove",title:"Property Name",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},resequence:{type:"object",title:"Resequence",group:"eip,routing",icon:"resequence24.png",description:"Resequences (re-order) messages based on an expression",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{resequencerConfig:{kind:"element",type:"object",description:"To configure the resequencer in using either batch or stream configuration. Will by default use batch configuration.",
|
|
3269
|
|
-title:"Resequencer Config",required:!1,deprecated:!1},expression:{kind:"expression",type:"object",description:"Expression to use for re-ordering the messages such as a header with a sequence number",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},rollback:{type:"object",title:"Rollback",group:"eip,routing",icon:"generic24.png",description:"Forces a rollback by stopping routing the message",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{markRollbackOnly:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Mark the transaction for rollback only (cannot be overruled to commit)",title:"Mark Rollback Only",required:!1,deprecated:!1},markRollbackOnlyLast:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Mark only last sub transaction for rollback only. When using sub transactions (if the transaction manager support this)",title:"Mark Rollback Only Last",required:!1,deprecated:!1},message:{kind:"attribute",type:"string",description:"Message to use in rollback exception",title:"Message",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},roundRobin:{type:"object",title:"Round Robin",group:"configuration,loadbalance",icon:"generic24.png",description:"Round robin load balancer",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},route:{type:"object",title:"Route",group:"configuration",icon:"route24.png",description:"A Camel route",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{group:{kind:"attribute",type:"string",description:"The group that this route belongs to; could be the name of the RouteBuilder class or be explicitly configured in the XML. May be null.",title:"Group",required:!1,deprecated:!1},streamCache:{kind:"attribute",type:"string",description:"Whether stream caching is enabled on this route.",title:"Stream Cache",required:!1,deprecated:!1},trace:{kind:"attribute",type:"string",description:"Whether tracing is enabled on this route.",title:"Trace",required:!1,deprecated:!1},messageHistory:{kind:"attribute",type:"string",defaultValue:"true",description:"Whether message history is enabled on this route.",title:"Message History",required:!1,deprecated:!1},handleFault:{kind:"attribute",type:"string",description:"Whether handle fault is enabled on this route.",title:"Handle Fault",required:!1,deprecated:!1},delayer:{kind:"attribute",type:"string",description:"Whether to slow down processing messages by a given delay in msec.",title:"Delayer",required:!1,deprecated:!1},autoStartup:{kind:"attribute",type:"string",defaultValue:"true",description:"Whether to auto start this route",title:"Auto Startup",required:!1,deprecated:!1},startupOrder:{kind:"attribute",type:"integer",description:"To configure the ordering of the routes being started",title:"Startup Order",required:!1,deprecated:!1},errorHandlerRef:{kind:"attribute",type:"string",description:"Sets the bean ref name of the error handler builder to use on this route",title:"Error Handler Ref",required:!1,deprecated:!1},routePolicyRef:{kind:"attribute",type:"string",description:"Reference to custom org.apache.camel.spi.RoutePolicy to use by the route. Multiple policies can be configured by separating values using comma.",title:"Route Policy Ref",required:!1,deprecated:!1},shutdownRoute:{kind:"attribute",type:"string","enum":["Default","Defer"],description:"To control how to shutdown the route.",title:"Shutdown Route",required:!1,deprecated:!1},shutdownRunningTask:{kind:"attribute",type:"string","enum":["CompleteCurrentTaskOnly","CompleteAllTasks"],description:"To control how to shutdown the route.",title:"Shutdown Running Task",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},routeBuilder:{type:"object",title:"Route Builder",group:"configuration",icon:"generic24.png",description:"To refer to a Java org.apache.camel.builder.RouteBuilder instance to use.",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{ref:{kind:"attribute",type:"string",description:"Reference to the route builder instance",title:"Ref",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},routeContextRef:{type:"object",title:"Route Context Ref",group:"configuration",icon:"generic24.png",description:"To refer to an XML file with routes defined using the xml-dsl",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{ref:{kind:"attribute",type:"string",description:"Reference to the routes in the xml dsl",title:"Ref",required:!0,deprecated:!1}}},routes:{type:"object",title:"Routes",group:"configuration",icon:"generic24.png",description:"A series of Camel routes",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},routingSlip:{type:"object",title:"Routing Slip",group:"eip,endpoint,routing",icon:"routingSlip24.png",description:"Routes a message through a series of steps that are pre-determined (the slip)",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{uriDelimiter:{kind:"attribute",type:"string",defaultValue:",",description:"Sets the uri delimiter to use",title:"Uri Delimiter",required:!1,deprecated:!1},ignoreInvalidEndpoints:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Ignore the invalidate endpoint exception when try to create a producer with that endpoint",title:"Ignore Invalid Endpoints",required:!1,deprecated:!1},cacheSize:{kind:"attribute",type:"integer",description:"Sets the maximum size used by the org.apache.camel.impl.ProducerCache which is used to cache and reuse producers when using this recipient list when uris are reused.",title:"Cache Size",required:!1,deprecated:!1},expression:{kind:"expression",type:"object",description:"Expression to define the routing slip which defines which endpoints to route the message in a pipeline style. Notice the expression is evaluated once if you want a more dynamic style then the dynamic router eip is a better choice.",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},sample:{type:"object",title:"Sample",group:"eip,routing",icon:"generic24.png",description:"Extract a sample of the messages passing through a route",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{samplePeriod:{kind:"attribute",type:"integer",defaultValue:"1",description:"Sets the sample period during which only a single Exchange will pass through.",title:"Sample Period",required:!1,deprecated:!1},messageFrequency:{kind:"attribute",type:"integer",description:"Sets the sample message count which only a single Exchange will pass through after this many received.",title:"Message Frequency",required:!1,deprecated:!1},units:{kind:"attribute",type:"string",defaultValue:"SECONDS","enum":["DAYS","HOURS","MICROSECONDS","MILLISECONDS","MINUTES","NANOSECONDS","SECONDS"],description:"Sets the time units for the sample period defaulting to seconds.",title:"Units",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},setBody:{type:"object",title:"Set Body",group:"eip,transformation",icon:"setBody24.png",description:"Sets the contents of the message body",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{expression:{kind:"expression",type:"object",description:"Expression that returns the new body to use",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},setExchangePattern:{type:"object",title:"Set Exchange Pattern",group:"configuration",icon:"generic24.png",description:"Sets the exchange pattern on the message exchange",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{pattern:{kind:"attribute",type:"string","enum":["InOnly","InOptionalOut","InOut","OutIn","OutOnly","OutOptionalIn","RobustInOnly","RobustOutOnly"],description:"Sets the new exchange pattern of the Exchange to be used from this point forward",title:"Pattern",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},setFaultBody:{type:"object",title:"Set Fault Body",group:"eip,transformation",icon:"generic24.png",description:"Sets the contents of a fault message's body",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{expression:{kind:"expression",type:"object",description:"Expression that returns the new fault body to use",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},setHeader:{type:"object",title:"Set Header",group:"eip,transformation",icon:"generic24.png",description:"Sets the value of a message header",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{headerName:{kind:"attribute",type:"string",description:"Name of message header to set a new value",title:"Header Name",required:!0,deprecated:!1},expression:{kind:"expression",type:"object",description:"Expression to return the value of the header",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},setOutHeader:{type:"object",title:"Set Out Header",group:"eip,transformation",icon:"generic24.png",description:"Sets the value of a header on the outbound message",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{headerName:{kind:"attribute",type:"string",description:"Name of message header to set a new value",title:"Header Name",required:!0,deprecated:!0},expression:{kind:"expression",type:"object",description:"Expression to return the value of the header",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},setProperty:{type:"object",title:"Set Property",group:"eip,transformation",icon:"generic24.png",description:"Sets a named property on the message exchange",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{propertyName:{kind:"attribute",type:"string",description:"Name of exchange property to set a new value",title:"Property Name",required:!0,deprecated:!1},expression:{kind:"expression",type:"object",description:"Expression to return the value of the message exchange property",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},sort:{type:"object",title:"Sort",group:"eip,routing",icon:"generic24.png",description:"Sorts the contents of the message",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{comparatorRef:{kind:"attribute",type:"string",description:"Sets a reference to lookup for the comparator to use for sorting",title:"Comparator Ref",required:!1,deprecated:!1},expression:{kind:"expression",type:"object",description:"Optional expression to sort by something else than the message body",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},split:{type:"object",title:"Split",group:"eip,routing",icon:"split24.png",description:"Splits a single message into many sub-messages.",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{parallelProcessing:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If enabled then processing each splitted messages occurs concurrently. Note the caller thread will still wait until all messages has been fully processed before it continues. Its only processing the sub messages from the splitter which happens concurrently.",title:"Parallel Processing",required:!1,deprecated:!1},strategyRef:{kind:"attribute",type:"string",description:"Sets a reference to the AggregationStrategy to be used to assemble the replies from the splitted messages into a single outgoing message from the Splitter. By default Camel will use the original incoming message to the splitter (leave it unchanged). You can also use a POJO as the AggregationStrategy",title:"Strategy Ref",required:!1,deprecated:!1},strategyMethodName:{kind:"attribute",type:"string",description:"This option can be used to explicit declare the method name to use when using POJOs as the AggregationStrategy.",title:"Strategy Method Name",required:!1,deprecated:!1},strategyMethodAllowNull:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If this option is false then the aggregate method is not used if there was no data to enrich. If this option is true then null values is used as the oldExchange (when no data to enrich) when using POJOs as the AggregationStrategy",title:"Strategy Method Allow Null",required:!1,deprecated:!1},executorServiceRef:{kind:"attribute",type:"string",description:"Refers to a custom Thread Pool to be used for parallel processing. Notice if you set this option then parallel processing is automatic implied and you do not have to enable that option as well.",title:"Executor Service Ref",required:!1,deprecated:!1},streaming:{kind:"attribute",type:"boolean",defaultValue:"false",description:"When in streaming mode then the splitter splits the original message on-demand and each splitted message is processed one by one. This reduces memory usage as the splitter do not split all the messages first but then we do not know the total size and therefore the link org.apache.camel.ExchangeSPLIT_SIZE is empty. In non-streaming mode (default) the splitter will split each message first to know the total size and then process each message one by one. This requires to keep all the splitted messages in memory and therefore requires more memory. The total size is provided in the link org.apache.camel.ExchangeSPLIT_SIZE header. The streaming mode also affects the aggregation behavior. If enabled then Camel will process replies out-of-order eg in the order they come back. If disabled Camel will process replies in the same order as the messages was splitted.",title:"Streaming",required:!1,deprecated:!1},stopOnException:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Will now stop further processing if an exception or failure occurred during processing of an org.apache.camel.Exchange and the caused exception will be thrown. Will also stop if processing the exchange failed (has a fault message) or an exception was thrown and handled by the error handler (such as using onException). In all situations the splitter will stop further processing. This is the same behavior as in pipeline which is used by the routing engine. The default behavior is to not stop but continue processing till the end",title:"Stop On Exception",required:!1,deprecated:!1},timeout:{kind:"attribute",type:"integer",defaultValue:"0",description:"Sets a total timeout specified in millis when using parallel processing. If the Splitter hasn't been able to split and process all the sub messages within the given timeframe then the timeout triggers and the Splitter breaks out and continues. Notice if you provide a TimeoutAwareAggregationStrategy then the timeout method is invoked before breaking out. If the timeout is reached with running tasks still remaining certain tasks for which it is difficult for Camel to shut down in a graceful manner may continue to run. So use this option with a bit of care.",title:"Timeout",required:!1,deprecated:!1},onPrepareRef:{kind:"attribute",type:"string",description:"Uses the Processor when preparing the org.apache.camel.Exchange to be send. This can be used to deep-clone messages that should be send or any custom logic needed before the exchange is send.",title:"On Prepare Ref",required:!1,deprecated:!1},shareUnitOfWork:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Shares the org.apache.camel.spi.UnitOfWork with the parent and each of the sub messages. Splitter will by default not share unit of work between the parent exchange and each splitted exchange. This means each splitted exchange has its own individual unit of work.",title:"Share Unit Of Work",required:!1,deprecated:!1},parallelAggregate:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If enabled then the aggregate method on AggregationStrategy can be called concurrently. Notice that this would require the implementation of AggregationStrategy to be implemented as thread-safe. By default this is false meaning that Camel synchronizes the call to the aggregate method. Though in some use-cases this can be used to archive higher performance when the AggregationStrategy is implemented as thread-safe.",title:"Parallel Aggregate",required:!1,deprecated:!1},expression:{kind:"expression",type:"object",description:"Expression of how to split the message body such as as-is using a tokenizer or using an xpath.",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},sticky:{type:"object",title:"Sticky",group:"configuration,loadbalance",icon:"generic24.png",description:"Sticky load balancer",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{correlationExpression:{kind:"expression",type:"object",description:"The correlation expression to use to calculate the correlation key",title:"Correlation Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},stop:{type:"object",title:"Stop",group:"eip,routing",icon:"generic24.png",description:"Stops the processing of the current message",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},"stream-config":{type:"object",title:"Stream-config",group:"configuration,resequence",icon:"generic24.png",description:"Configures stream-processing resequence eip.",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{capacity:{kind:"attribute",type:"integer",defaultValue:"100",description:"Sets the capacity of the resequencer's inbound queue.",title:"Capacity",required:!1,deprecated:!1},timeout:{kind:"attribute",type:"integer",defaultValue:"1000",description:"Sets minimum time to wait for missing elements (messages).",title:"Timeout",required:!1,deprecated:!1},ignoreInvalidExchanges:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to ignore invalid exchanges",title:"Ignore Invalid Exchanges",required:!1,deprecated:!1},comparatorRef:{kind:"attribute",type:"string",description:"To use a custom comparator",title:"Comparator Ref",required:!1,deprecated:!1},rejectOld:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If true throws an exception when messages older than the last delivered message are processed",title:"Reject Old",required:!1,deprecated:!1}}},threadPoolProfile:{type:"object",title:"Thread Pool Profile",group:"configuration",icon:"generic24.png",description:"To configure thread pools",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{defaultProfile:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether this profile is the default thread pool profile",title:"Default Profile",required:!1,deprecated:!1},poolSize:{kind:"attribute",type:"string",description:"Sets the core pool size",title:"Pool Size",required:!1,deprecated:!1},maxPoolSize:{kind:"attribute",type:"string",description:"Sets the maximum pool size",title:"Max Pool Size",required:!1,deprecated:!1},keepAliveTime:{kind:"attribute",type:"string",description:"Sets the keep alive time for idle threads in the pool",title:"Keep Alive Time",required:!1,deprecated:!1},maxQueueSize:{kind:"attribute",type:"string",description:"Sets the maximum number of tasks in the work queue. Use -1 or Integer.MAX_VALUE for an unbounded queue",title:"Max Queue Size",required:!1,deprecated:!1},allowCoreThreadTimeOut:{kind:"attribute",type:"string",description:"Whether idle core threads is allowed to timeout and therefore can shrink the pool size below the core pool size Is by default false",title:"Allow Core Thread Time Out",required:!1,deprecated:!1},rejectedPolicy:{kind:"attribute",type:"string","enum":["Abort","CallerRuns","Discard","DiscardOldest"],description:"Sets the handler for tasks which cannot be executed by the thread pool.",title:"Rejected Policy",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},threads:{type:"object",title:"Threads",group:"eip,routing",icon:"generic24.png",description:"Specifies that all steps after this node are processed asynchronously",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{executorServiceRef:{kind:"attribute",type:"string",description:"To refer to a custom thread pool or use a thread pool profile (as overlay)",title:"Executor Service Ref",required:!1,deprecated:!1},poolSize:{kind:"attribute",type:"integer",description:"Sets the core pool size",title:"Pool Size",required:!1,deprecated:!1},maxPoolSize:{kind:"attribute",type:"integer",description:"Sets the maximum pool size",title:"Max Pool Size",required:!1,deprecated:!1},keepAliveTime:{kind:"attribute",type:"integer",description:"Sets the keep alive time for idle threads",title:"Keep Alive Time",required:!1,deprecated:!1},timeUnit:{kind:"attribute",type:"string","enum":["DAYS","HOURS","MICROSECONDS","MILLISECONDS","MINUTES","NANOSECONDS","SECONDS"],description:"Sets the keep alive time unit. By default SECONDS is used.",title:"Time Unit",required:!1,deprecated:!1},maxQueueSize:{kind:"attribute",type:"integer",description:"Sets the maximum number of tasks in the work queue. Use -1 or Integer.MAX_VALUE for an unbounded queue",title:"Max Queue Size",required:!1,deprecated:!1},allowCoreThreadTimeOut:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether idle core threads is allowed to timeout and therefore can shrink the pool size below the core pool size Is by default false",title:"Allow Core Thread Time Out",required:!1,deprecated:!1},threadName:{kind:"attribute",type:"string",defaultValue:"Threads",description:"Sets the thread name to use.",title:"Thread Name",required:!1,deprecated:!1},rejectedPolicy:{kind:"attribute",type:"string","enum":["Abort","CallerRuns","Discard","DiscardOldest"],description:"Sets the handler for tasks which cannot be executed by the thread pool.",title:"Rejected Policy",required:!1,deprecated:!1},callerRunsWhenRejected:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether or not the caller should run the task when it was rejected by the thread pool. Is by default true",title:"Caller Runs When Rejected",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},throttle:{type:"object",title:"Throttle",group:"eip,routing",icon:"generic24.png",description:"Controls the rate at which messages are passed to the next node in the route",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{executorServiceRef:{kind:"attribute",type:"string",description:"Sets the ExecutorService which could be used by throttle definition",title:"Executor Service Ref",required:!1,deprecated:!1},timePeriodMillis:{kind:"attribute",type:"integer",defaultValue:"1000",description:"Sets the time period during which the maximum request count is valid for",title:"Time Period Millis",required:!1,deprecated:!1},asyncDelayed:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Enables asynchronous delay which means the thread will no block while delaying.",title:"Async Delayed",required:!1,deprecated:!1},callerRunsWhenRejected:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether or not the caller should run the task when it was rejected by the thread pool. Is by default true",title:"Caller Runs When Rejected",required:!1,deprecated:!1},rejectExecution:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether or not throttler throws the ThrottlerRejectedExecutionException when the exchange exceeds the request limit Is by default false",title:"Reject Execution",required:!1,deprecated:!1},expression:{kind:"expression",type:"object",description:"Expression to configure the maximum number of messages to throttle per request",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},throwException:{type:"object",title:"Throw Exception",group:"error",icon:"generic24.png",description:"Throws an exception",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{ref:{kind:"attribute",type:"string",description:"Reference to the exception instance to lookup from the registry to throw",title:"Ref",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},to:{type:"object",title:"To",group:"eip,endpoint,routing",icon:"endpoint24.png",description:"Sends the message to an endpoint",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{uri:{kind:"attribute",type:"string",description:"Sets the uri of the endpoint to send to.",title:"Uri",required:!1,deprecated:!1},ref:{kind:"attribute",type:"string",description:"Sets the reference of the endpoint to send to.",title:"Ref",required:!1,deprecated:!0},pattern:{kind:"attribute",type:"string","enum":["InOnly","InOptionalOut","InOut","OutIn","OutOnly","OutOptionalIn","RobustInOnly","RobustOutOnly"],description:"Sets the optional ExchangePattern used to invoke this endpoint",title:"Pattern",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},topic:{type:"object",title:"Topic",group:"configuration,loadbalance",icon:"generic24.png",description:"Topic load balancer",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},transacted:{type:"object",title:"Transacted",group:"configuration",icon:"transactionalClient24.png",description:"Enables transaction on the route",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{ref:{kind:"attribute",type:"string",description:"Sets a reference to use for lookup the policy in the registry.",title:"Ref",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},transform:{type:"object",title:"Transform",group:"eip,transformation",icon:"transform24.png",description:"Transforms the message body based on an expression",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{expression:{kind:"expression",type:"object",description:"Expression to return the transformed message body (the new message body to use)",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},unmarshal:{type:"object",title:"Unmarshal",group:"eip,transformation",icon:"unmarshal24.png",description:"Converts the message data received from the wire into a format that Apache Camel processors can consume",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{dataFormatType:{kind:"element",type:"object",description:"The data format to be used",title:"Data Format Type",required:!0,deprecated:!1},ref:{kind:"attribute",type:"string",description:"To refer to a custom data format to use as unmarshaller",title:"Ref",required:!1,deprecated:!0},id:{kind:"attribute",type:"string",
|
|
3270
|
|
-description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},validate:{type:"object",title:"Validate",group:"eip,transformation",icon:"generic24.png",description:"Validates a message based on an expression",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{expression:{kind:"expression",type:"object",description:"Expression to use for validation as a predicate. The expression should return either true or false. If returning false the message is invalid and an exception is thrown.",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},weighted:{type:"object",title:"Weighted",group:"configuration,loadbalance",icon:"generic24.png",description:"Weighted load balancer",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{roundRobin:{kind:"attribute",type:"boolean",defaultValue:"false",description:"To enable round robin mode. By default the weighted distribution mode is used. The default value is false.",title:"Round Robin",required:!1,deprecated:!1},distributionRatio:{kind:"attribute",type:"string",description:"The distribution ratio is a delimited String consisting on integer weights separated by delimiters for example 235. The distributionRatio must match the number of endpoints and/or processors specified in the load balancer list.",title:"Distribution Ratio",required:!0,deprecated:!1},distributionRatioDelimiter:{kind:"attribute",type:"string",defaultValue:",",description:"Delimiter used to specify the distribution ratio. The default value is",title:"Distribution Ratio Delimiter",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},when:{type:"object",title:"When",group:"eip,routing",icon:"generic24.png",description:"Triggers a route when an expression evaluates to true",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{expression:{kind:"expression",type:"object",description:"Expression used as the predicate to evaluate whether this when should trigger and route the message or not.",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},whenSkipSendToEndpoint:{type:"object",title:"When Skip Send To Endpoint",group:"configuration",icon:"generic24.png",description:"Predicate to determine if the message should be sent or not to the endpoint when using interceptSentToEndpoint.",acceptInput:"true",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{expression:{kind:"expression",type:"object",description:"Expression used as the predicate to evaluate whether the message should be sent or not to the endpoint",title:"Expression",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},wireTap:{type:"object",title:"Wire Tap",group:"eip,endpoint,routing",icon:"wireTap24.png",description:"Routes a copy of a message (or creates a new message) to a secondary destination while continue routing the original message.",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{uri:{kind:"attribute",type:"string",description:"Uri of the endpoint to use as wire tap",title:"Uri",required:!1,deprecated:!1},ref:{kind:"attribute",type:"string",description:"Reference of the endpoint to use as wire tap",title:"Ref",required:!1,deprecated:!0},processorRef:{kind:"attribute",type:"string",description:"Reference to a Processor to use for creating a new body as the message to use for wire tapping",title:"Processor Ref",required:!1,deprecated:!1},body:{kind:"expression",type:"object",description:"Expression used for creating a new body as the message to use for wire tapping",title:"Body",required:!1,deprecated:!1},executorServiceRef:{kind:"attribute",type:"string",description:"Uses a custom thread pool",title:"Executor Service Ref",required:!1,deprecated:!1},copy:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Uses a copy of the original exchange",title:"Copy",required:!1,deprecated:!1},onPrepareRef:{kind:"attribute",type:"string",description:"Uses the Processor when preparing the org.apache.camel.Exchange to be send. This can be used to deep-clone messages that should be send or any custom logic needed before the exchange is send.",title:"On Prepare Ref",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}}},rests:{"delete":{type:"object",title:"Delete",group:"rest",icon:"generic24.png",description:"Rest DELETE command",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{method:{kind:"attribute",type:"string",description:"The HTTP verb such as GET or POST",title:"Method",required:!1,deprecated:!1},uri:{kind:"attribute",type:"string",description:"Uri template of this REST service such as /id.",title:"Uri",required:!1,deprecated:!1},consumes:{kind:"attribute",type:"string",description:"To define the content type what the REST service consumes (accept as input) such as application/xml or application/json. This option will override what may be configured on a parent level",title:"Consumes",required:!1,deprecated:!1},produces:{kind:"attribute",type:"string",description:"To define the content type what the REST service produces (uses for output) such as application/xml or application/json This option will override what may be configured on a parent level",title:"Produces",required:!1,deprecated:!1},bindingMode:{kind:"attribute",type:"string",defaultValue:"auto","enum":["auto","json","json_xml","off","xml"],description:"Sets the binding mode to use. This option will override what may be configured on a parent level The default value is auto",title:"Binding Mode",required:!1,deprecated:!1},skipBindingOnErrorCode:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc as success messages otherwise will do. This option will override what may be configured on a parent level",title:"Skip Binding On Error Code",required:!1,deprecated:!1},enableCORS:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level The default value is false.",title:"Enable C O R S",required:!1,deprecated:!1},type:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level",title:"Type",required:!1,deprecated:!1},outType:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level",title:"Out Type",required:!1,deprecated:!1},toOrRoute:{kind:"element",type:"object",description:"To route from this REST service to a Camel endpoint or an inlined route",title:"To Or Route",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},get:{type:"object",title:"Get",group:"rest",icon:"generic24.png",description:"Rest GET command",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{method:{kind:"attribute",type:"string",description:"The HTTP verb such as GET or POST",title:"Method",required:!1,deprecated:!1},uri:{kind:"attribute",type:"string",description:"Uri template of this REST service such as /id.",title:"Uri",required:!1,deprecated:!1},consumes:{kind:"attribute",type:"string",description:"To define the content type what the REST service consumes (accept as input) such as application/xml or application/json. This option will override what may be configured on a parent level",title:"Consumes",required:!1,deprecated:!1},produces:{kind:"attribute",type:"string",description:"To define the content type what the REST service produces (uses for output) such as application/xml or application/json This option will override what may be configured on a parent level",title:"Produces",required:!1,deprecated:!1},bindingMode:{kind:"attribute",type:"string",defaultValue:"auto","enum":["auto","json","json_xml","off","xml"],description:"Sets the binding mode to use. This option will override what may be configured on a parent level The default value is auto",title:"Binding Mode",required:!1,deprecated:!1},skipBindingOnErrorCode:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc as success messages otherwise will do. This option will override what may be configured on a parent level",title:"Skip Binding On Error Code",required:!1,deprecated:!1},enableCORS:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level The default value is false.",title:"Enable C O R S",required:!1,deprecated:!1},type:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level",title:"Type",required:!1,deprecated:!1},outType:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level",title:"Out Type",required:!1,deprecated:!1},toOrRoute:{kind:"element",type:"object",description:"To route from this REST service to a Camel endpoint or an inlined route",title:"To Or Route",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},head:{type:"object",title:"Head",group:"rest",icon:"generic24.png",description:"Rest HEAD command",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{method:{kind:"attribute",type:"string",description:"The HTTP verb such as GET or POST",title:"Method",required:!1,deprecated:!1},uri:{kind:"attribute",type:"string",description:"Uri template of this REST service such as /id.",title:"Uri",required:!1,deprecated:!1},consumes:{kind:"attribute",type:"string",description:"To define the content type what the REST service consumes (accept as input) such as application/xml or application/json. This option will override what may be configured on a parent level",title:"Consumes",required:!1,deprecated:!1},produces:{kind:"attribute",type:"string",description:"To define the content type what the REST service produces (uses for output) such as application/xml or application/json This option will override what may be configured on a parent level",title:"Produces",required:!1,deprecated:!1},bindingMode:{kind:"attribute",type:"string",defaultValue:"auto","enum":["auto","json","json_xml","off","xml"],description:"Sets the binding mode to use. This option will override what may be configured on a parent level The default value is auto",title:"Binding Mode",required:!1,deprecated:!1},skipBindingOnErrorCode:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc as success messages otherwise will do. This option will override what may be configured on a parent level",title:"Skip Binding On Error Code",required:!1,deprecated:!1},enableCORS:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level The default value is false.",title:"Enable C O R S",required:!1,deprecated:!1},type:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level",title:"Type",required:!1,deprecated:!1},outType:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level",title:"Out Type",required:!1,deprecated:!1},toOrRoute:{kind:"element",type:"object",description:"To route from this REST service to a Camel endpoint or an inlined route",title:"To Or Route",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},post:{type:"object",title:"Post",group:"rest",icon:"generic24.png",description:"Rest POST command",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{method:{kind:"attribute",type:"string",description:"The HTTP verb such as GET or POST",title:"Method",required:!1,deprecated:!1},uri:{kind:"attribute",type:"string",description:"Uri template of this REST service such as /id.",title:"Uri",required:!1,deprecated:!1},consumes:{kind:"attribute",type:"string",description:"To define the content type what the REST service consumes (accept as input) such as application/xml or application/json. This option will override what may be configured on a parent level",title:"Consumes",required:!1,deprecated:!1},produces:{kind:"attribute",type:"string",description:"To define the content type what the REST service produces (uses for output) such as application/xml or application/json This option will override what may be configured on a parent level",title:"Produces",required:!1,deprecated:!1},bindingMode:{kind:"attribute",type:"string",defaultValue:"auto","enum":["auto","json","json_xml","off","xml"],description:"Sets the binding mode to use. This option will override what may be configured on a parent level The default value is auto",title:"Binding Mode",required:!1,deprecated:!1},skipBindingOnErrorCode:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc as success messages otherwise will do. This option will override what may be configured on a parent level",title:"Skip Binding On Error Code",required:!1,deprecated:!1},enableCORS:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level The default value is false.",title:"Enable C O R S",required:!1,deprecated:!1},type:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level",title:"Type",required:!1,deprecated:!1},outType:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level",title:"Out Type",required:!1,deprecated:!1},toOrRoute:{kind:"element",type:"object",description:"To route from this REST service to a Camel endpoint or an inlined route",title:"To Or Route",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},put:{type:"object",title:"Put",group:"rest",icon:"generic24.png",description:"Rest PUT command",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{method:{kind:"attribute",type:"string",description:"The HTTP verb such as GET or POST",title:"Method",required:!1,deprecated:!1},uri:{kind:"attribute",type:"string",description:"Uri template of this REST service such as /id.",title:"Uri",required:!1,deprecated:!1},consumes:{kind:"attribute",type:"string",description:"To define the content type what the REST service consumes (accept as input) such as application/xml or application/json. This option will override what may be configured on a parent level",title:"Consumes",required:!1,deprecated:!1},produces:{kind:"attribute",type:"string",description:"To define the content type what the REST service produces (uses for output) such as application/xml or application/json This option will override what may be configured on a parent level",title:"Produces",required:!1,deprecated:!1},bindingMode:{kind:"attribute",type:"string",defaultValue:"auto","enum":["auto","json","json_xml","off","xml"],description:"Sets the binding mode to use. This option will override what may be configured on a parent level The default value is auto",title:"Binding Mode",required:!1,deprecated:!1},skipBindingOnErrorCode:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc as success messages otherwise will do. This option will override what may be configured on a parent level",title:"Skip Binding On Error Code",required:!1,deprecated:!1},enableCORS:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level The default value is false.",title:"Enable C O R S",required:!1,deprecated:!1},type:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level",title:"Type",required:!1,deprecated:!1},outType:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level",title:"Out Type",required:!1,deprecated:!1},toOrRoute:{kind:"element",type:"object",description:"To route from this REST service to a Camel endpoint or an inlined route",title:"To Or Route",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},rest:{type:"object",title:"Rest",group:"rest",icon:"generic24.png",description:"Defines a rest service using the rest-dsl",acceptInput:"false",acceptOutput:"true",nextSiblingAddedAsChild:"false",properties:{path:{kind:"attribute",type:"string",description:"Path of the rest service such as /foo",title:"Path",required:!1,deprecated:!1},consumes:{kind:"attribute",type:"string",description:"To define the content type what the REST service consumes (accept as input) such as application/xml or application/json. This option will override what may be configured on a parent level",title:"Consumes",required:!1,deprecated:!1},produces:{kind:"attribute",type:"string",description:"To define the content type what the REST service produces (uses for output) such as application/xml or application/json This option will override what may be configured on a parent level",title:"Produces",required:!1,deprecated:!1},bindingMode:{kind:"attribute",type:"string",defaultValue:"auto","enum":["auto","json","json_xml","off","xml"],description:"Sets the binding mode to use. This option will override what may be configured on a parent level The default value is auto",title:"Binding Mode",required:!1,deprecated:!1},skipBindingOnErrorCode:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc as success messages otherwise will do. This option will override what may be configured on a parent level",title:"Skip Binding On Error Code",required:!1,deprecated:!1},enableCORS:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level The default value is false.",title:"Enable C O R S",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},restBinding:{type:"object",title:"Rest Binding",group:"rest",icon:"generic24.png",description:"To configure rest binding",acceptInput:"true",acceptOutput:"false",nextSiblingAddedAsChild:"true",properties:{consumes:{kind:"attribute",type:"string",description:"To define the content type what the REST service consumes (accept as input) such as application/xml or application/json",title:"Consumes",required:!1,deprecated:!1},produces:{kind:"attribute",type:"string",description:"To define the content type what the REST service produces (uses for output) such as application/xml or application/json",title:"Produces",required:!1,deprecated:!1},bindingMode:{kind:"attribute",type:"string",defaultValue:"auto","enum":["auto","json","json_xml","off","xml"],description:"Sets the binding mode to use. The default value is auto",title:"Binding Mode",required:!1,deprecated:!1},type:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from input to POJO for the incoming data",title:"Type",required:!1,deprecated:!1},outType:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from POJO to output for the outgoing data",title:"Out Type",required:!1,deprecated:!1},skipBindingOnErrorCode:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc as success messages otherwise will do.",title:"Skip Binding On Error Code",required:!1,deprecated:!1},enableCORS:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to enable CORS headers in the HTTP response. The default value is false.",title:"Enable C O R S",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},restConfiguration:{type:"object",title:"Rest Configuration",group:"rest",icon:"generic24.png",description:"To configure rest",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{component:{kind:"attribute",type:"string",description:"The Camel Rest component to use for the REST transport such as restlet spark-rest. If no component has been explicit configured then Camel will lookup if there is a Camel component that integrates with the Rest DSL or if a org.apache.camel.spi.RestConsumerFactory is registered in the registry. If either one is found then that is being used.",title:"Component",required:!1,deprecated:!1},scheme:{kind:"attribute",type:"string",description:"The scheme to use for exposing the REST service. Usually http or https is supported. The default value is http",title:"Scheme",required:!1,deprecated:!1},host:{kind:"attribute",type:"string",description:"The hostname to use for exposing the REST service.",title:"Host",required:!1,deprecated:!1},port:{kind:"attribute",type:"string",description:"The port number to use for exposing the REST service. Notice if you use servlet component then the port number configured here does not apply as the port number in use is the actual port number the servlet component is using. eg if using Apache Tomcat its the tomcat http port if using Apache Karaf its the HTTP service in Karaf that uses port 8181 by default etc. Though in those situations setting the port number here allows tooling and JMX to know the port number so its recommended to set the port number to the number that the servlet engine uses.",title:"Port",required:!1,deprecated:!1},contextPath:{kind:"attribute",type:"string",description:"Sets a leading context-path the REST services will be using. This can be used when using components such as SERVLET where the deployed web application is deployed using a context-path.",title:"Context Path",required:!1,deprecated:!1},hostNameResolver:{kind:"attribute",type:"string","enum":["localHostName","localIp"],description:"If no hostname has been explicit configured then this resolver is used to compute the hostname the REST service will be using.",title:"Host Name Resolver",required:!1,deprecated:!1},bindingMode:{kind:"attribute",type:"string",defaultValue:"auto","enum":["auto","json","json_xml","off","xml"],description:"Sets the binding mode to use. The default value is auto",title:"Binding Mode",required:!1,deprecated:!1},skipBindingOnErrorCode:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc as success messages otherwise will do.",title:"Skip Binding On Error Code",required:!1,deprecated:!1},enableCORS:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to enable CORS headers in the HTTP response. The default value is false.",title:"Enable C O R S",required:!1,deprecated:!1},jsonDataFormat:{kind:"attribute",type:"string",description:"Name of specific json data format to use. By default json-jackson will be used. Important: This option is only for setting a custom name of the data format not to refer to an existing data format instance.",title:"Json Data Format",required:!1,deprecated:!1},xmlDataFormat:{kind:"attribute",type:"string",description:"Name of specific XML data format to use. By default jaxb will be used. Important: This option is only for setting a custom name of the data format not to refer to an existing data format instance.",title:"Xml Data Format",required:!1,deprecated:!1},componentProperty:{kind:"element",type:"array",description:"Allows to configure as many additional properties for the rest component in use.",title:"Component Property",required:!1,deprecated:!1},endpointProperty:{kind:"element",type:"array",description:"Allows to configure as many additional properties for the rest endpoint in use.",title:"Endpoint Property",required:!1,deprecated:!1},consumerProperty:{kind:"element",type:"array",description:"Allows to configure as many additional properties for the rest consumer in use.",title:"Consumer Property",required:!1,deprecated:!1},dataFormatProperty:{kind:"element",type:"array",description:"Allows to configure as many additional properties for the data formats in use. For example set property prettyPrint to true to have json outputted in pretty mode. The properties can be prefixed to denote the option is only for either JSON or XML and for either the IN or the OUT. The prefixes are: json.in. json.out. xml.in. xml.out. For example a key with value xml.out.mustBeJAXBElement is only for the XML data format for the outgoing. A key without a prefix is a common key for all situations.",title:"Data Format Property",required:!1,deprecated:!1},corsHeaders:{kind:"element",type:"array",description:"Allows to configure custom CORS headers.",title:"Cors Headers",required:!1,deprecated:!1}}},restContextRef:{type:"object",title:"Rest Context Ref",group:"configuration,rest",icon:"generic24.png",description:"To refer to an XML file with rest services defined using the rest-dsl",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{ref:{kind:"attribute",type:"string",description:"Reference to the rest-dsl",title:"Ref",required:!0,deprecated:!1}}},restProperty:{type:"object",title:"Rest Property",group:"rest",icon:"generic24.png",description:"A key value pair",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{key:{kind:"attribute",type:"string",description:"Property key",title:"Key",required:!0,deprecated:!1},value:{kind:"attribute",type:"string",description:"Property value",title:"Value",required:!0,deprecated:!1}}},rests:{type:"object",title:"Rests",group:"rest",icon:"generic24.png",description:"A series of rest services defined using the rest-dsl",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}},verb:{type:"object",title:"Verb",group:"rest",icon:"generic24.png",description:"Rest command",acceptInput:"false",acceptOutput:"false",nextSiblingAddedAsChild:"false",properties:{method:{kind:"attribute",type:"string",description:"The HTTP verb such as GET or POST",title:"Method",required:!1,deprecated:!1},uri:{kind:"attribute",type:"string",description:"Uri template of this REST service such as /id.",title:"Uri",required:!1,deprecated:!1},consumes:{kind:"attribute",type:"string",description:"To define the content type what the REST service consumes (accept as input) such as application/xml or application/json. This option will override what may be configured on a parent level",title:"Consumes",required:!1,deprecated:!1},produces:{kind:"attribute",type:"string",description:"To define the content type what the REST service produces (uses for output) such as application/xml or application/json This option will override what may be configured on a parent level",title:"Produces",required:!1,deprecated:!1},bindingMode:{kind:"attribute",type:"string",defaultValue:"auto","enum":["auto","json","json_xml","off","xml"],description:"Sets the binding mode to use. This option will override what may be configured on a parent level The default value is auto",title:"Binding Mode",required:!1,deprecated:!1},skipBindingOnErrorCode:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc as success messages otherwise will do. This option will override what may be configured on a parent level",
|
|
3271
|
|
-title:"Skip Binding On Error Code",required:!1,deprecated:!1},enableCORS:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level The default value is false.",title:"Enable C O R S",required:!1,deprecated:!1},type:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level",title:"Type",required:!1,deprecated:!1},outType:{kind:"attribute",type:"string",description:"Sets the class name to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level",title:"Out Type",required:!1,deprecated:!1},toOrRoute:{kind:"element",type:"object",description:"To route from this REST service to a Camel endpoint or an inlined route",title:"To Or Route",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1},description:{kind:"element",type:"object",description:"Sets the description of this node",title:"Description",required:!1,deprecated:!1}}}},dataformats:{avro:{type:"object",title:"Avro",group:"dataformat,transformation",icon:"generic24.png",description:"Avro data format",properties:{instanceClassName:{kind:"attribute",type:"string",description:"Class name to use for marshal and unmarshalling",title:"Instance Class Name",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},barcode:{type:"object",title:"Barcode",group:"dataformat,transformation",icon:"generic24.png",description:"Barcode data format",properties:{width:{kind:"attribute",type:"integer",description:"Width of the barcode",title:"Width",required:!1,deprecated:!1},height:{kind:"attribute",type:"integer",description:"Height of the barcode",title:"Height",required:!1,deprecated:!1},imageType:{kind:"attribute",type:"string",description:"Image type of the barcode such as png",title:"Image Type",required:!1,deprecated:!1},barcodeFormat:{kind:"attribute",type:"string",description:"Barcode format such as QR-Code",title:"Barcode Format",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},base64:{type:"object",title:"Base64",group:"dataformat,transformation",icon:"generic24.png",description:"Base64 data format",properties:{lineLength:{kind:"attribute",type:"integer",defaultValue:"76",description:"To specific a maximum line length for the encoded data. By default 76 is used.",title:"Line Length",required:!1,deprecated:!1},lineSeparator:{kind:"attribute",type:"string",defaultValue:"\r\n",description:"The line separators to use. By default \r\n is used.",title:"Line Separator",required:!1,deprecated:!1},urlSafe:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Instead of emitting '' and '/' we emit '-' and '_' respectively. urlSafe is only applied to encode operations. Decoding seamlessly handles both modes. Is by default false.",title:"Url Safe",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},beanio:{type:"object",title:"BeanIO",group:"dataformat,transformation",icon:"generic24.png",description:"BeanIO data format",properties:{mapping:{kind:"attribute",type:"string",description:"The BeanIO mapping file. Is by default loaded from the classpath. You can prefix with file: http: or classpath: to denote from where to load the mapping file.",title:"Mapping",required:!0,deprecated:!1},streamName:{kind:"attribute",type:"string",description:"The name of the stream to use.",title:"Stream Name",required:!0,deprecated:!1},ignoreUnidentifiedRecords:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to ignore unidentified records.",title:"Ignore Unidentified Records",required:!1,deprecated:!1},ignoreUnexpectedRecords:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to ignore unexpected records.",title:"Ignore Unexpected Records",required:!1,deprecated:!1},ignoreInvalidRecords:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to ignore invalid records.",title:"Ignore Invalid Records",required:!1,deprecated:!1},encoding:{kind:"attribute",type:"string",description:"The charset to use. Is by default the JVM platform default charset.",title:"Encoding",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},bindy:{type:"object",title:"Bindy",group:"dataformat,transformation",icon:"generic24.png",description:"Bindy data format",properties:{type:{kind:"attribute",type:"string","enum":["Csv","Fixed","KeyValue"],description:"Whether to use csv fixed or key value pairs mode.",title:"Type",required:!0,deprecated:!1},packages:{kind:"attribute",type:"array",description:"The java package names to scan for model classes.",title:"Packages",required:!1,deprecated:!1},classType:{kind:"attribute",type:"string",description:"Name of model class to use.",title:"Class Type",required:!1,deprecated:!1},locale:{kind:"attribute",type:"string",description:"To configure a default locale to use such as us for united states. To use the JVM platform default locale then use the name default",title:"Locale",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},castor:{type:"object",title:"Castor",group:"dataformat,transformation",icon:"generic24.png",description:"Castor data format",properties:{mappingFile:{kind:"attribute",type:"string",description:"Path to a Castor mapping file to load from the classpath.",title:"Mapping File",required:!1,deprecated:!1},validation:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether validation is turned on or off. Is by default true.",title:"Validation",required:!1,deprecated:!1},encoding:{kind:"attribute",type:"string",defaultValue:"UTF-8",description:"Encoding to use when marshalling an Object to XML. Is by default UTF-8",title:"Encoding",required:!1,deprecated:!1},packages:{kind:"attribute",type:"array",description:"Add additional packages to Castor XmlContext",title:"Packages",required:!1,deprecated:!1},classes:{kind:"attribute",type:"array",description:"Add additional class names to Castor XmlContext",title:"Classes",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},crypto:{type:"object",title:"Crypto (Java Cryptographic Extension)",group:"dataformat,transformation",icon:"generic24.png",description:"Crypto data format",properties:{algorithm:{kind:"attribute",type:"string",defaultValue:"DES/CBC/PKCS5Padding",description:"The JCE algorithm name indicating the cryptographic algorithm that will be used. Is by default DES/CBC/PKCS5Padding.",title:"Algorithm",required:!1,deprecated:!1},cryptoProvider:{kind:"attribute",type:"string",description:"The name of the JCE Security Provider that should be used.",title:"Crypto Provider",required:!1,deprecated:!1},keyRef:{kind:"attribute",type:"string",description:"Refers to the secret key to lookup from the register to use.",title:"Key Ref",required:!1,deprecated:!1},initVectorRef:{kind:"attribute",type:"string",description:"Refers to a byte array containing the Initialization Vector that will be used to initialize the Cipher.",title:"Init Vector Ref",required:!1,deprecated:!1},algorithmParameterRef:{kind:"attribute",type:"string",description:"A JCE AlgorithmParameterSpec used to initialize the Cipher. Will lookup the type using the given name as a java.security.spec.AlgorithmParameterSpec type.",title:"Algorithm Parameter Ref",required:!1,deprecated:!1},buffersize:{kind:"attribute",type:"integer",description:"The size of the buffer used in the signature process.",title:"Buffersize",required:!1,deprecated:!1},macAlgorithm:{kind:"attribute",type:"string",defaultValue:"HmacSHA1",description:"The JCE algorithm name indicating the Message Authentication algorithm.",title:"Mac Algorithm",required:!1,deprecated:!1},shouldAppendHMAC:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Flag indicating that a Message Authentication Code should be calculated and appended to the encrypted data.",title:"Should Append H M A C",required:!1,deprecated:!1},inline:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Flag indicating that the configured IV should be inlined into the encrypted data stream. Is by default false.",title:"Inline",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},csv:{type:"object",title:"CSV",group:"dataformat,transformation",icon:"generic24.png",description:"CSV data format",properties:{formatRef:{kind:"attribute",type:"string",description:"The reference format to use it will be updated with the other format options the default value is CSVFormat.DEFAULT",title:"Format Ref",required:!1,deprecated:!1},formatName:{kind:"attribute",type:"string",description:"The name of the format to use the default value is CSVFormat.DEFAULT",title:"Format Name",required:!1,deprecated:!1},commentMarkerDisabled:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Disables the comment marker of the reference format.",title:"Comment Marker Disabled",required:!1,deprecated:!1},commentMarker:{kind:"attribute",type:"string",description:"Sets the comment marker of the reference format.",title:"Comment Marker",required:!1,deprecated:!1},delimiter:{kind:"attribute",type:"string",description:"Sets the delimiter to use. The default value is (comma)",title:"Delimiter",required:!1,deprecated:!1},escapeDisabled:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Use for disabling using escape character",title:"Escape Disabled",required:!1,deprecated:!1},escape:{kind:"attribute",type:"string",description:"Sets the escape character to use",title:"Escape",required:!1,deprecated:!1},headerDisabled:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Use for disabling headers",title:"Header Disabled",required:!1,deprecated:!1},header:{kind:"element",type:"array",description:"To configure the CSV headers",title:"Header",required:!1,deprecated:!1},allowMissingColumnNames:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to allow missing column names.",title:"Allow Missing Column Names",required:!1,deprecated:!1},ignoreEmptyLines:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to ignore empty lines.",title:"Ignore Empty Lines",required:!1,deprecated:!1},ignoreSurroundingSpaces:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to ignore surrounding spaces",title:"Ignore Surrounding Spaces",required:!1,deprecated:!1},nullStringDisabled:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Used to disable null strings",title:"Null String Disabled",required:!1,deprecated:!1},nullString:{kind:"attribute",type:"string",description:"Sets the null string",title:"Null String",required:!1,deprecated:!1},quoteDisabled:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Used to disable quotes",title:"Quote Disabled",required:!1,deprecated:!1},quote:{kind:"attribute",type:"string",description:"Sets the quote which by default is",title:"Quote",required:!1,deprecated:!1},recordSeparatorDisabled:{kind:"attribute",type:"string",description:"Used for disabling record separator",title:"Record Separator Disabled",required:!1,deprecated:!1},recordSeparator:{kind:"attribute",type:"string",description:"Sets the record separator (aka new line) which by default is \r\n (CRLF)",title:"Record Separator",required:!1,deprecated:!1},skipHeaderRecord:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to skip the header record in the output",title:"Skip Header Record",required:!1,deprecated:!1},lazyLoad:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all the lines must be read at one.",title:"Lazy Load",required:!1,deprecated:!1},useMaps:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether the unmarshalling should produce maps for the lines values instead of lists. It requires to have header (either defined or collected).",title:"Use Maps",required:!1,deprecated:!1},recordConverterRef:{kind:"attribute",type:"string",description:"Refers to a custom CsvRecordConverter to lookup from the registry to use.",title:"Record Converter Ref",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},customDataFormat:{type:"object",title:"Custom",group:"dataformat,transformation",icon:"generic24.png",description:"Custom data format",properties:{ref:{kind:"attribute",type:"string",description:"Reference to the custom org.apache.camel.spi.DataFormat to lookup from the Camel registry.",title:"Ref",required:!0,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},dataFormats:{type:"object",title:"Data formats",group:"dataformat,transformation",icon:"generic24.png",description:"To configure data formats",properties:{dataFormats:{kind:"element",type:"array",description:"A list holding the configured data formats",title:"Data Formats",required:!0,deprecated:!1}}},flatpack:{type:"object",title:"Flatpack",group:"dataformat,transformation",icon:"generic24.png",description:"Flatpack data format",properties:{parserFactoryRef:{kind:"attribute",type:"string",description:"References to a custom parser factory to lookup in the registry",title:"Parser Factory Ref",required:!1,deprecated:!1},definition:{kind:"attribute",type:"string",description:"The flatpack pzmap configuration file. Can be omitted in simpler situations but its preferred to use the pzmap.",title:"Definition",required:!1,deprecated:!1},fixed:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Delimited or fixed. Is by default false = delimited",title:"Fixed",required:!1,deprecated:!1},ignoreFirstRecord:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether the first line is ignored for delimited files (for the column headers). Is by default true.",title:"Ignore First Record",required:!1,deprecated:!1},textQualifier:{kind:"attribute",type:"string",defaultValue:'"',description:'If the text is qualified with a char such as "',title:"Text Qualifier",required:!1,deprecated:!1},delimiter:{kind:"attribute",type:"string",defaultValue:",",description:"The delimiter char (could be ; or similar)",title:"Delimiter",required:!1,deprecated:!1},allowShortLines:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Allows for lines to be shorter than expected and ignores the extra characters",title:"Allow Short Lines",required:!1,deprecated:!1},ignoreExtraColumns:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Allows for lines to be longer than expected and ignores the extra characters.",title:"Ignore Extra Columns",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},gzip:{type:"object",title:"GZip",group:"dataformat,transformation",icon:"generic24.png",description:"GZip data format",properties:{id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},hl7:{type:"object",title:"HL7",group:"dataformat,transformation,hl7",icon:"generic24.png",description:"HL7 data format",properties:{validate:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to validate the HL7 message Is by default true.",title:"Validate",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},ical:{type:"object",title:"iCal",group:"dataformat,transformation",icon:"generic24.png",description:"iCal data format",properties:{validating:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to validate.",title:"Validating",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},jaxb:{type:"object",title:"JAXB",group:"dataformat,transformation",icon:"generic24.png",description:"JAXB data format",properties:{contextPath:{kind:"attribute",type:"string",description:"Package name where your JAXB classes are located.",title:"Context Path",required:!0,deprecated:!1},schema:{kind:"attribute",type:"string",description:"To validate against an existing schema. Your can use the prefix classpath: file: or http: to specify how the resource should by resolved. You can separate multiple schema files by using the '' character.",title:"Schema",required:!1,deprecated:!1},prettyPrint:{kind:"attribute",type:"boolean",defaultValue:"false",description:"To enable pretty printing output nicely formatted. Is by default false.",title:"Pretty Print",required:!1,deprecated:!1},ignoreJAXBElement:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to ignore JAXBElement elements - only needed to be set to false in very special use-cases.",title:"Ignore J A X B Element",required:!1,deprecated:!1},mustBeJAXBElement:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether marhsalling must be java objects with JAXB annotations. And if not then it fails. This option can be set to false to relax that such as when the data is already in XML format.",title:"Must Be J A X B Element",required:!1,deprecated:!1},filterNonXmlChars:{kind:"attribute",type:"boolean",defaultValue:"false",description:"To ignore non xml characheters and replace them with an empty space.",title:"Filter Non Xml Chars",required:!1,deprecated:!1},encoding:{kind:"attribute",type:"string",description:"To overrule and use a specific encoding",title:"Encoding",required:!1,deprecated:!1},fragment:{kind:"attribute",type:"boolean",defaultValue:"false",description:"To turn on marshalling XML fragment trees. By default JAXB looks for XmlRootElement annotation on given class to operate on whole XML tree. This is useful but not always - sometimes generated code does not have XmlRootElement annotation sometimes you need unmarshall only part of tree. In that case you can use partial unmarshalling. To enable this behaviours you need set property partClass. Camel will pass this class to JAXB's unmarshaler.",title:"Fragment",required:!1,deprecated:!1},partClass:{kind:"attribute",type:"string",description:"Name of class used for fragment parsing. See more details at the fragment option.",title:"Part Class",required:!1,deprecated:!1},partNamespace:{kind:"attribute",type:"string",description:"XML namespace to use for fragment parsing. See more details at the fragment option.",title:"Part Namespace",required:!1,deprecated:!1},namespacePrefixRef:{kind:"attribute",type:"string",description:"When marshalling using JAXB or SOAP then the JAXB implementation will automatic assign namespace prefixes such as ns2 ns3 ns4 etc. To control this mapping Camel allows you to refer to a map which contains the desired mapping.",title:"Namespace Prefix Ref",required:!1,deprecated:!1},xmlStreamWriterWrapper:{kind:"attribute",type:"string",description:"To use a custom xml stream writer.",title:"Xml Stream Writer Wrapper",required:!1,deprecated:!1},schemaLocation:{kind:"attribute",type:"string",description:"To define the location of the schema",title:"Schema Location",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},jibx:{type:"object",title:"JiBX",group:"dataformat,transformation",icon:"generic24.png",description:"JiBX data format",properties:{unmarshallClass:{kind:"attribute",type:"string",description:"Class name to use when unmarshalling from XML to Java.",title:"Unmarshall Class",required:!1,deprecated:!1},bindingName:{kind:"attribute",type:"string",description:"To use a custom binding factory",title:"Binding Name",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},json:{type:"object",title:"JSon",group:"dataformat,transformation",icon:"generic24.png",description:"Json data format",properties:{prettyPrint:{kind:"attribute",type:"boolean",defaultValue:"false",description:"To enable pretty printing output nicely formatted. Is by default false.",title:"Pretty Print",required:!1,deprecated:!1},library:{kind:"attribute",type:"string",defaultValue:"XStream","enum":["Gson","Jackson","XStream"],description:"Which json library to use such. Is by default xstream",title:"Library",required:!1,deprecated:!1},unmarshalTypeName:{kind:"attribute",type:"string",description:"Class name of the java type to use when unarmshalling",title:"Unmarshal Type Name",required:!1,deprecated:!1},jsonView:{kind:"attribute",type:"string",description:"When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations",title:"Json View",required:!1,deprecated:!1},include:{kind:"attribute",type:"string",description:"If you want to marshal a pojo to JSON and the pojo has some fields with null values. And you want to skip these null values you can set this option to NOT_NULL",title:"Include",required:!1,deprecated:!1},allowJmsType:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.",title:"Allow Jms Type",required:!1,deprecated:!1},collectionTypeName:{kind:"attribute",type:"string",description:"Refers to a custom collection type to lookup in the registry to use. This option should rarely be used but allows to use different collection types than java.util.Collection based as default.",title:"Collection Type Name",required:!1,deprecated:!1},useList:{kind:"attribute",type:"boolean",defaultValue:"false",description:"To unarmshal to a List of Map or a List of Pojo.",title:"Use List",required:!1,deprecated:!1},enableJaxbAnnotationModule:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to enable the JAXB annotations module when using jackson. When enabled then JAXB annotations can be used by Jackson.",title:"Enable Jaxb Annotation Module",required:!1,deprecated:!1},moduleClassNames:{kind:"attribute",type:"string",description:"To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names. Multiple classes can be separated by comma.",title:"Module Class Names",required:!1,deprecated:!1},moduleRefs:{kind:"attribute",type:"string",description:"To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma.",title:"Module Refs",required:!1,deprecated:!1},enableFeatures:{kind:"attribute",type:"string",description:"Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma",title:"Enable Features",required:!1,deprecated:!1},disableFeatures:{kind:"attribute",type:"string",description:"Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma",title:"Disable Features",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},pgp:{type:"object",title:"PGP",group:"dataformat,transformation",icon:"generic24.png",description:"PGP data format",properties:{keyUserid:{kind:"attribute",type:"string",description:"The user ID of the key in the PGP keyring used during encryption. Can also be only a part of a user ID. For example if the user ID is Test User then you can use the part Test User or to address the user ID.",title:"Key Userid",required:!1,deprecated:!1},signatureKeyUserid:{kind:"attribute",type:"string",description:"User ID of the key in the PGP keyring used for signing (during encryption) or signature verification (during decryption). During the signature verification process the specified User ID restricts the public keys from the public keyring which can be used for the verification. If no User ID is specified for the signature verficiation then any public key in the public keyring can be used for the verification. Can also be only a part of a user ID. For example if the user ID is Test User then you can use the part Test User or to address the User ID.",title:"Signature Key Userid",required:!1,deprecated:!1},password:{kind:"attribute",type:"string",description:"Password used when opening the private key (not used for encryption).",title:"Password",required:!1,deprecated:!1},signaturePassword:{kind:"attribute",type:"string",description:"Password used when opening the private key used for signing (during encryption).",title:"Signature Password",required:!1,deprecated:!1},keyFileName:{kind:"attribute",type:"string",description:"Filename of the keyring; must be accessible as a classpath resource (but you can specify a location in the file system by using the file: prefix).",title:"Key File Name",required:!1,deprecated:!1},signatureKeyFileName:{kind:"attribute",type:"string",description:"Filename of the keyring to use for signing (during encryption) or for signature verification (during decryption); must be accessible as a classpath resource (but you can specify a location in the file system by using the file: prefix).",title:"Signature Key File Name",required:!1,deprecated:!1},signatureKeyRing:{kind:"attribute",type:"string",description:"Keyring used for signing/verifying as byte array. You can not set the signatureKeyFileName and signatureKeyRing at the same time.",title:"Signature Key Ring",required:!1,deprecated:!1},armored:{kind:"attribute",type:"boolean",defaultValue:"false",description:"This option will cause PGP to base64 encode the encrypted text making it available for copy/paste etc.",title:"Armored",required:!1,deprecated:!1},integrity:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Adds an integrity check/sign into the encryption file. The default value is true.",title:"Integrity",required:!1,deprecated:!1},provider:{kind:"attribute",type:"string",description:"Java Cryptography Extension (JCE) provider default is Bouncy Castle (BC). Alternatively you can use for example the IAIK JCE provider; in this case the provider must be registered beforehand and the Bouncy Castle provider must not be registered beforehand. The Sun JCE provider does not work.",title:"Provider",required:!1,deprecated:!1},algorithm:{kind:"attribute",type:"integer",description:"Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 2 (= TRIPLE DES) 3 (= CAST5) 4 (= BLOWFISH) 6 (= DES) 7 (= AES_128). Only relevant for encrypting.",title:"Algorithm",required:!1,deprecated:!1},compressionAlgorithm:{kind:"attribute",type:"integer",description:"Compression algorithm; possible values are defined in org.bouncycastle.bcpg.CompressionAlgorithmTags; for example 0 (= UNCOMPRESSED) 1 (= ZIP) 2 (= ZLIB) 3 (= BZIP2). Only relevant for encrypting.",title:"Compression Algorithm",required:!1,deprecated:!1},hashAlgorithm:{kind:"attribute",type:"integer",description:"Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 2 (= SHA1) 8 (= SHA256) 9 (= SHA384) 10 (= SHA512) 11 (=SHA224). Only relevant for signing.",title:"Hash Algorithm",required:!1,deprecated:!1},signatureVerificationOption:{kind:"attribute",type:"string",description:"Controls the behavior for verifying the signature during unmarshaling. There are 4 values possible: optional: The PGP message may or may not contain signatures; if it does contain signatures then a signature verification is executed. required: The PGP message must contain at least one signature; if this is not the case an exception (PGPException) is thrown. A signature verification is executed. ignore: Contained signatures in the PGP message are ignored; no signature verification is executed. no_signature_allowed: The PGP message must not contain a signature; otherwise an exception (PGPException) is thrown.",title:"Signature Verification Option",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},protobuf:{type:"object",title:"Protobuf",group:"dataformat,transformation",icon:"generic24.png",description:"Google protobuf data format",properties:{instanceClass:{kind:"attribute",type:"string",description:"Name of class to use when unarmshalling",title:"Instance Class",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},rss:{type:"object",title:"RSS",group:"dataformat,transformation",icon:"generic24.png",description:"RSS data format",properties:{id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},secureXML:{type:"object",title:"XML Security",group:"dataformat,transformation",icon:"generic24.png",description:"xml-security data format",properties:{xmlCipherAlgorithm:{kind:"attribute",type:"string",defaultValue:"TRIPLEDES",description:"The cipher algorithm to be used for encryption/decryption of the XML message content. The available choices are: XMLCipher.TRIPLEDES XMLCipher.AES_128 XMLCipher.AES_128_GCM XMLCipher.AES_192 XMLCipher.AES_192_GCM XMLCipher.AES_256 XMLCipher.AES_256_GCM XMLCipher.SEED_128 XMLCipher.CAMELLIA_128 XMLCipher.CAMELLIA_192 XMLCipher.CAMELLIA_256 The default value is MLCipher.TRIPLEDES",title:"Xml Cipher Algorithm",required:!1,deprecated:!1},passPhrase:{kind:"attribute",type:"string",description:"A String used as passPhrase to encrypt/decrypt content. The passPhrase has to be provided. If no passPhrase is specified a default passPhrase is used. The passPhrase needs to be put together in conjunction with the appropriate encryption algorithm. For example using TRIPLEDES the passPhase can be a Only another 24 Byte key",title:"Pass Phrase",required:!1,deprecated:!1},secureTag:{kind:"attribute",type:"string",description:"The XPath reference to the XML Element selected for encryption/decryption. If no tag is specified the entire payload is encrypted/decrypted.",title:"Secure Tag",required:!1,deprecated:!1},secureTagContents:{kind:"attribute",type:"boolean",defaultValue:"false",description:"A boolean value to specify whether the XML Element is to be encrypted or the contents of the XML Element false = Element Level true = Element Content Level",title:"Secure Tag Contents",required:!1,deprecated:!1},keyCipherAlgorithm:{kind:"attribute",
|
|
3272
|
|
-type:"string",defaultValue:"RSA_OAEP",description:"The cipher algorithm to be used for encryption/decryption of the asymmetric key. The available choices are: XMLCipher.RSA_v1dot5 XMLCipher.RSA_OAEP XMLCipher.RSA_OAEP_11 The default value is XMLCipher.RSA_OAEP",title:"Key Cipher Algorithm",required:!1,deprecated:!1},recipientKeyAlias:{kind:"attribute",type:"string",description:"The key alias to be used when retrieving the recipient's public or private key from a KeyStore when performing asymmetric key encryption or decryption.",title:"Recipient Key Alias",required:!1,deprecated:!1},keyOrTrustStoreParametersId:{kind:"attribute",type:"string",description:"Refers to a KeyStore instance to lookup in the registry which is used for configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore.",title:"Key Or Trust Store Parameters Id",required:!1,deprecated:!1},keyPassword:{kind:"attribute",type:"string",description:"The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption.",title:"Key Password",required:!1,deprecated:!1},digestAlgorithm:{kind:"attribute",type:"string",defaultValue:"SHA1",description:"The digest algorithm to use with the RSA OAEP algorithm. The available choices are: XMLCipher.SHA1 XMLCipher.SHA256 XMLCipher.SHA512 The default value is XMLCipher.SHA1",title:"Digest Algorithm",required:!1,deprecated:!1},mgfAlgorithm:{kind:"attribute",type:"string",defaultValue:"MGF1_SHA1",description:"The MGF Algorithm to use with the RSA OAEP algorithm. The available choices are: EncryptionConstants.MGF1_SHA1 EncryptionConstants.MGF1_SHA256 EncryptionConstants.MGF1_SHA512 The default value is EncryptionConstants.MGF1_SHA1",title:"Mgf Algorithm",required:!1,deprecated:!1},addKeyValueForEncryptedKey:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey structure or not.",title:"Add Key Value For Encrypted Key",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},serialization:{type:"object",title:"Java Object Serialization",group:"dataformat,transformation",icon:"generic24.png",description:"Java Object Serialization data format",properties:{id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},soapjaxb:{type:"object",title:"SOAP",group:"dataformat,transformation",icon:"generic24.png",description:"SOAP data format",properties:{contextPath:{kind:"attribute",type:"string",description:"Package name where your JAXB classes are located.",title:"Context Path",required:!0,deprecated:!1},encoding:{kind:"attribute",type:"string",description:"To overrule and use a specific encoding",title:"Encoding",required:!1,deprecated:!1},elementNameStrategyRef:{kind:"attribute",type:"string",description:"Refers to an element strategy to lookup from the registry. An element name strategy is used for two purposes. The first is to find a xml element name for a given object and soap action when marshaling the object into a SOAP message. The second is to find an Exception class for a given soap fault name. The following three element strategy class name is provided out of the box. QNameStrategy - Uses a fixed qName that is configured on instantiation. Exception lookup is not supported TypeNameStrategy - Uses the name and namespace from the XMLType annotation of the given type. If no namespace is set then package-info is used. Exception lookup is not supported ServiceInterfaceStrategy - Uses information from a webservice interface to determine the type name and to find the exception class for a SOAP fault All three classes is located in the package name org.apache.camel.dataformat.soap.name If you have generated the web service stub code with cxf-codegen or a similar tool then you probably will want to use the ServiceInterfaceStrategy. In the case you have no annotated service interface you should use QNameStrategy or TypeNameStrategy.",title:"Element Name Strategy Ref",required:!1,deprecated:!1},version:{kind:"attribute",type:"string",defaultValue:"1.1",description:"SOAP version should either be 1.1 or 1.2. Is by default 1.1",title:"Version",required:!1,deprecated:!1},namespacePrefixRef:{kind:"attribute",type:"string",description:"When marshalling using JAXB or SOAP then the JAXB implementation will automatic assign namespace prefixes such as ns2 ns3 ns4 etc. To control this mapping Camel allows you to refer to a map which contains the desired mapping.",title:"Namespace Prefix Ref",required:!1,deprecated:!1},schema:{kind:"attribute",type:"string",description:"To validate against an existing schema. Your can use the prefix classpath: file: or http: to specify how the resource should by resolved. You can separate multiple schema files by using the '' character.",title:"Schema",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},string:{type:"object",title:"String Encoding",group:"dataformat,transformation",icon:"generic24.png",description:"Represents the String (text based) DataFormat",properties:{charset:{kind:"attribute",type:"string",description:"Sets an encoding to use. Will by default use the JVM platform default charset.",title:"Charset",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},syslog:{type:"object",title:"Syslog",group:"dataformat,transformation",icon:"generic24.png",description:"Syslog data format",properties:{id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},tidyMarkup:{type:"object",title:"TidyMarkup",group:"dataformat,transformation",icon:"generic24.png",description:"Tidymark (wellformed HTML) data format",properties:{dataObjectType:{kind:"attribute",type:"string",description:"What data type to unmarshal as can either be org.w3c.dom.Node or java.lang.String. Is by default org.w3c.dom.Node",title:"Data Object Type",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},"univocity-csv":{type:"object",title:"uniVocity CSV",group:"dataformat,transformation",icon:"generic24.png",description:"UniVocity CSV data format",properties:{quoteAllFields:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether or not all values must be quoted when writing them.",title:"Quote All Fields",required:!1,deprecated:!1},quote:{kind:"attribute",type:"string",defaultValue:'"',description:"The quote symbol.",title:"Quote",required:!1,deprecated:!1},quoteEscape:{kind:"attribute",type:"string",defaultValue:'"',description:"The quote escape symbol",title:"Quote Escape",required:!1,deprecated:!1},delimiter:{kind:"attribute",type:"string",defaultValue:",",description:"The delimiter of values",title:"Delimiter",required:!1,deprecated:!1},nullValue:{kind:"attribute",type:"string",description:"The string representation of a null value. The default value is null",title:"Null Value",required:!1,deprecated:!1},skipEmptyLines:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether or not the empty lines must be ignored. The default value is true",title:"Skip Empty Lines",required:!1,deprecated:!1},ignoreTrailingWhitespaces:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether or not the trailing white spaces must ignored. The default value is true",title:"Ignore Trailing Whitespaces",required:!1,deprecated:!1},ignoreLeadingWhitespaces:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether or not the leading white spaces must be ignored. The default value is true",title:"Ignore Leading Whitespaces",required:!1,deprecated:!1},headersDisabled:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether or not the headers are disabled. When defined this option explicitly sets the headers as null which indicates that there is no header. The default value is false",title:"Headers Disabled",required:!1,deprecated:!1},headerExtractionEnabled:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether or not the header must be read in the first line of the test document The default value is false",title:"Header Extraction Enabled",required:!1,deprecated:!1},numberOfRecordsToRead:{kind:"attribute",type:"integer",description:"The maximum number of record to read.",title:"Number Of Records To Read",required:!1,deprecated:!1},emptyValue:{kind:"attribute",type:"string",description:"The String representation of an empty value",title:"Empty Value",required:!1,deprecated:!1},lineSeparator:{kind:"attribute",type:"string",description:"The line separator of the files The default value is to use the JVM platform line separator",title:"Line Separator",required:!1,deprecated:!1},normalizedLineSeparator:{kind:"attribute",type:"string",defaultValue:"\n",description:"The normalized line separator of the files The default value is \n",title:"Normalized Line Separator",required:!1,deprecated:!1},comment:{kind:"attribute",type:"string",defaultValue:"#",description:"The comment symbol. The default value is",title:"Comment",required:!1,deprecated:!1},lazyLoad:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all the lines must be read at one. The default value is false",title:"Lazy Load",required:!1,deprecated:!1},asMap:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether the unmarshalling should produce maps for the lines values instead of lists. It requires to have header (either defined or collected). The default value is false",title:"As Map",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},"univocity-fixed":{type:"object",title:"uniVocity Fixed Length",group:"dataformat,transformation",icon:"generic24.png",description:"UniVocity fixed-width data format",properties:{skipTrailingCharsUntilNewline:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether or not the trailing characters until new line must be ignored. The default value is false",title:"Skip Trailing Chars Until Newline",required:!1,deprecated:!1},recordEndsOnNewline:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether or not the record ends on new line. The default value is false",title:"Record Ends On Newline",required:!1,deprecated:!1},padding:{kind:"attribute",type:"string",defaultValue:"",description:"The padding character. The default value is a space",title:"Padding",required:!1,deprecated:!1},nullValue:{kind:"attribute",type:"string",description:"The string representation of a null value. The default value is null",title:"Null Value",required:!1,deprecated:!1},skipEmptyLines:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether or not the empty lines must be ignored. The default value is true",title:"Skip Empty Lines",required:!1,deprecated:!1},ignoreTrailingWhitespaces:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether or not the trailing white spaces must ignored. The default value is true",title:"Ignore Trailing Whitespaces",required:!1,deprecated:!1},ignoreLeadingWhitespaces:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether or not the leading white spaces must be ignored. The default value is true",title:"Ignore Leading Whitespaces",required:!1,deprecated:!1},headersDisabled:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether or not the headers are disabled. When defined this option explicitly sets the headers as null which indicates that there is no header. The default value is false",title:"Headers Disabled",required:!1,deprecated:!1},headerExtractionEnabled:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether or not the header must be read in the first line of the test document The default value is false",title:"Header Extraction Enabled",required:!1,deprecated:!1},numberOfRecordsToRead:{kind:"attribute",type:"integer",description:"The maximum number of record to read.",title:"Number Of Records To Read",required:!1,deprecated:!1},emptyValue:{kind:"attribute",type:"string",description:"The String representation of an empty value",title:"Empty Value",required:!1,deprecated:!1},lineSeparator:{kind:"attribute",type:"string",description:"The line separator of the files The default value is to use the JVM platform line separator",title:"Line Separator",required:!1,deprecated:!1},normalizedLineSeparator:{kind:"attribute",type:"string",defaultValue:"\n",description:"The normalized line separator of the files The default value is \n",title:"Normalized Line Separator",required:!1,deprecated:!1},comment:{kind:"attribute",type:"string",defaultValue:"#",description:"The comment symbol. The default value is",title:"Comment",required:!1,deprecated:!1},lazyLoad:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all the lines must be read at one. The default value is false",title:"Lazy Load",required:!1,deprecated:!1},asMap:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether the unmarshalling should produce maps for the lines values instead of lists. It requires to have header (either defined or collected). The default value is false",title:"As Map",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},"univocity-header":{type:"object",title:"uniVocity Header",group:"dataformat,transformation",icon:"generic24.png",description:"To configure headers for UniVocity data formats.",properties:{name:{kind:"value",type:"string",description:"Header name",title:"Name",required:!0,deprecated:!1},length:{kind:"attribute",type:"integer",description:"Header length",title:"Length",required:!1,deprecated:!1}}},"univocity-tsv":{type:"object",title:"uniVocity TSV",group:"dataformat,transformation",icon:"generic24.png",description:"UniVocity TSV data format",properties:{escapeChar:{kind:"attribute",type:"string",defaultValue:"\\",description:"The escape character.",title:"Escape Char",required:!1,deprecated:!1},nullValue:{kind:"attribute",type:"string",description:"The string representation of a null value. The default value is null",title:"Null Value",required:!1,deprecated:!1},skipEmptyLines:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether or not the empty lines must be ignored. The default value is true",title:"Skip Empty Lines",required:!1,deprecated:!1},ignoreTrailingWhitespaces:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether or not the trailing white spaces must ignored. The default value is true",title:"Ignore Trailing Whitespaces",required:!1,deprecated:!1},ignoreLeadingWhitespaces:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether or not the leading white spaces must be ignored. The default value is true",title:"Ignore Leading Whitespaces",required:!1,deprecated:!1},headersDisabled:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether or not the headers are disabled. When defined this option explicitly sets the headers as null which indicates that there is no header. The default value is false",title:"Headers Disabled",required:!1,deprecated:!1},headerExtractionEnabled:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether or not the header must be read in the first line of the test document The default value is false",title:"Header Extraction Enabled",required:!1,deprecated:!1},numberOfRecordsToRead:{kind:"attribute",type:"integer",description:"The maximum number of record to read.",title:"Number Of Records To Read",required:!1,deprecated:!1},emptyValue:{kind:"attribute",type:"string",description:"The String representation of an empty value",title:"Empty Value",required:!1,deprecated:!1},lineSeparator:{kind:"attribute",type:"string",description:"The line separator of the files The default value is to use the JVM platform line separator",title:"Line Separator",required:!1,deprecated:!1},normalizedLineSeparator:{kind:"attribute",type:"string",defaultValue:"\n",description:"The normalized line separator of the files The default value is \n",title:"Normalized Line Separator",required:!1,deprecated:!1},comment:{kind:"attribute",type:"string",defaultValue:"#",description:"The comment symbol. The default value is",title:"Comment",required:!1,deprecated:!1},lazyLoad:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all the lines must be read at one. The default value is false",title:"Lazy Load",required:!1,deprecated:!1},asMap:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether the unmarshalling should produce maps for the lines values instead of lists. It requires to have header (either defined or collected). The default value is false",title:"As Map",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},xmlBeans:{type:"object",title:"XML Beans",group:"dataformat,transformation",icon:"generic24.png",description:"XMLBeans data format",properties:{prettyPrint:{kind:"attribute",type:"boolean",defaultValue:"false",description:"To enable pretty printing output nicely formatted. Is by default false.",title:"Pretty Print",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},xmljson:{type:"object",title:"XML JSon",group:"dataformat,transformation",icon:"generic24.png",description:"xml-json data format",properties:{encoding:{kind:"attribute",type:"string",description:"Sets the encoding. Used for unmarshalling (JSON to XML conversion).",title:"Encoding",required:!1,deprecated:!1},elementName:{kind:"attribute",type:"string",description:"Specifies the name of the XML elements representing each array element. Used for unmarshalling (JSON to XML conversion).",title:"Element Name",required:!1,deprecated:!1},arrayName:{kind:"attribute",type:"string",description:"Specifies the name of the top-level XML element. Used for unmarshalling (JSON to XML conversion). For example when converting 1 2 3 it will be output by default as 123. By setting this option or rootName you can alter the name of element 'a'.",title:"Array Name",required:!1,deprecated:!1},forceTopLevelObject:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Determines whether the resulting JSON will start off with a top-most element whose name matches the XML root element. Used for marshalling (XML to JSon conversion). If disabled XML string 12 turns into 'x: '1' 'y': '2' . Otherwise it turns into 'a': 'x: '1' 'y': '2' .",title:"Force Top Level Object",required:!1,deprecated:!1},namespaceLenient:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Flag to be tolerant to incomplete namespace prefixes. Used for unmarshalling (JSON to XML conversion). In most cases json-lib automatically changes this flag at runtime to match the processing.",title:"Namespace Lenient",required:!1,deprecated:!1},rootName:{kind:"attribute",type:"string",description:"Specifies the name of the top-level element. Used for unmarshalling (JSON to XML conversion). If not set json-lib will use arrayName or objectName (default value: 'o' at the current time it is not configurable in this data format). If set to 'root' the JSON string 'x': 'value1' 'y' : 'value2' would turn into value1value2 otherwise the 'root' element would be named 'o'.",title:"Root Name",required:!1,deprecated:!1},skipWhitespace:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Determines whether white spaces between XML elements will be regarded as text values or disregarded. Used for marshalling (XML to JSon conversion).",title:"Skip Whitespace",required:!1,deprecated:!1},trimSpaces:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Determines whether leading and trailing white spaces will be omitted from String values. Used for marshalling (XML to JSon conversion).",title:"Trim Spaces",required:!1,deprecated:!1},skipNamespaces:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Signals whether namespaces should be ignored. By default they will be added to the JSON output using xmlns elements. Used for marshalling (XML to JSon conversion).",title:"Skip Namespaces",required:!1,deprecated:!1},removeNamespacePrefixes:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Removes the namespace prefixes from XML qualified elements so that the resulting JSON string does not contain them. Used for marshalling (XML to JSon conversion).",title:"Remove Namespace Prefixes",required:!1,deprecated:!1},expandableProperties:{kind:"attribute",type:"array",description:"With expandable properties JSON array elements are converted to XML as a sequence of repetitive XML elements with the local name equal to the JSON key for example: number: 123 normally converted to: 123 (where e can be modified by setting elementName) would instead translate to 123 if number is set as an expandable property Used for unmarshalling (JSON to XML conversion).",title:"Expandable Properties",required:!1,deprecated:!1},typeHints:{kind:"attribute",type:"string",description:"Adds type hints to the resulting XML to aid conversion back to JSON. Used for unmarshalling (JSON to XML conversion).",title:"Type Hints",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},xmlrpc:{type:"object",title:"XML RPC",group:"dataformat,transformation",icon:"generic24.png",description:"xml-rpc data format",properties:{request:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to unmarshal request or response Is by default false",title:"Request",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},xstream:{type:"object",title:"XStream",group:"dataformat,transformation",icon:"generic24.png",description:"xstream data format",properties:{encoding:{kind:"attribute",type:"string",description:"Sets the encoding to use",title:"Encoding",required:!1,deprecated:!1},driver:{kind:"attribute",type:"string",description:"To use a custom XStream driver. The instance must be of type com.thoughtworks.xstream.io.HierarchicalStreamDriver",title:"Driver",required:!1,deprecated:!1},driverRef:{kind:"attribute",type:"string",description:"To refer to a custom XStream driver to lookup in the registry. The instance must be of type com.thoughtworks.xstream.io.HierarchicalStreamDriver",title:"Driver Ref",required:!1,deprecated:!1},mode:{kind:"attribute",type:"string",description:"Mode for dealing with duplicate references The possible values are: NO_REFERENCES ID_REFERENCES XPATH_RELATIVE_REFERENCES XPATH_ABSOLUTE_REFERENCES SINGLE_NODE_XPATH_RELATIVE_REFERENCES SINGLE_NODE_XPATH_ABSOLUTE_REFERENCES",title:"Mode",required:!1,deprecated:!1},converters:{kind:"element",type:"array",description:"List of class names for using custom XStream converters. The classes must be of type com.thoughtworks.xstream.converters.Converter",title:"Converters",required:!1,deprecated:!1},aliases:{kind:"element",type:"object",description:"Alias a Class to a shorter name to be used in XML elements.",title:"Aliases",required:!1,deprecated:!1},omitFields:{kind:"element",type:"object",description:"Prevents a field from being serialized. To omit a field you must always provide the declaring type and not necessarily the type that is converted.",title:"Omit Fields",required:!1,deprecated:!1},implicitCollections:{kind:"element",type:"object",description:"Adds a default implicit collection which is used for any unmapped XML tag.",title:"Implicit Collections",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},zip:{type:"object",title:"Zip Deflate Compression",group:"dataformat,transformation",icon:"generic24.png",description:"zip data format (not for zip files)",properties:{compressionLevel:{kind:"attribute",type:"integer",defaultValue:"-1",description:"To specify a specific compression between 0-9. -1 is default compression 0 is no compression and 9 is best compression.",title:"Compression Level",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}},zipFile:{type:"object",title:"Zip File",group:"dataformat,transformation",icon:"generic24.png",description:"zip-file data format",properties:{usingIterator:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If the zip file has more then one entry the setting this option to true allows to work with the splitter EIP to split the data using an iterator in a streaming mode.",title:"Using Iterator",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the value of the id property.",title:"Id",required:!1,deprecated:!1}}}},languages:{constant:{type:"object",title:"Constant",group:"language",icon:"generic24.png",description:"For expressions and predicates using a constant",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},el:{type:"object",title:"EL",group:"language",icon:"generic24.png",description:"For EL expressions and predicates",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},exchangeProperty:{type:"object",title:"ExchangeProperty",group:"language",icon:"generic24.png",description:"An expression which extracts the named exchange property",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},expression:{type:"object",title:"Expression",group:"language",icon:"generic24.png",description:"A useful base class for an expression",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},groovy:{type:"object",title:"Groovy",group:"language",icon:"generic24.png",description:"For Groovy expressions and predicates",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},header:{type:"object",title:"Header",group:"language",icon:"generic24.png",description:"An expression which extracts the named exchange header",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},javaScript:{type:"object",title:"JavaScript",group:"language",icon:"generic24.png",description:"For JavaScript expressions and predicates",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},jsonpath:{type:"object",title:"JSonPath",group:"language",icon:"generic24.png",description:"For JSonPath expressions and predicates",properties:{resultType:{kind:"attribute",type:"string",description:"Sets the class name of the result type (type from output)",title:"Result Type",required:!1,deprecated:!1},expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},jxpath:{type:"object",title:"JXPath",group:"language",icon:"generic24.png",description:"For JXPath expressions and predicates",properties:{lenient:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Allows to turn lenient on the JXPathContext. When turned on this allows the JXPath expression to evaluate against expressions and message bodies which may be invalid / missing data. This option is by default false",title:"Lenient",required:!1,deprecated:!1},expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},language:{type:"object",title:"Language",group:"language",icon:"generic24.png",description:"Represents a parameterised language expression which can support any language at runtime using the language attribute.",
|
|
3273
|
|
-properties:{language:{kind:"attribute",type:"string",description:"The name of the language to use",title:"Language",required:!0,deprecated:!1},expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},method:{type:"object",title:"Bean method",group:"language",icon:"generic24.png",description:"For expressions and predicates using a java bean (aka method call)",properties:{bean:{kind:"attribute",type:"string",description:"Either a reference or a class name of the bean to use",title:"Bean",required:!1,deprecated:!0},ref:{kind:"attribute",type:"string",description:"Reference to bean to lookup in the registry",title:"Ref",required:!1,deprecated:!1},method:{kind:"attribute",type:"string",description:"Name of method to call",title:"Method",required:!1,deprecated:!1},beanType:{kind:"attribute",type:"string",description:"Class name of the bean to use",title:"Bean Type",required:!1,deprecated:!1},expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},mvel:{type:"object",title:"MVEL",group:"language",icon:"generic24.png",description:"For MVEL expressions and predicates",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},ognl:{type:"object",title:"OGNL",group:"language",icon:"generic24.png",description:"For OGNL expressions and predicates",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},php:{type:"object",title:"PHP",group:"language",icon:"generic24.png",description:"For PHP expressions and predicates",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},python:{type:"object",title:"Python",group:"language",icon:"generic24.png",description:"For Python expressions and predicates",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},ref:{type:"object",title:"Ref",group:"language",icon:"generic24.png",description:"For using a custom expression",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},ruby:{type:"object",title:"Ruby",group:"language",icon:"generic24.png",description:"For Ruby expressions and predicates",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},simple:{type:"object",title:"Simple",group:"language",icon:"generic24.png",description:"For expressions and predicates using the simple language",properties:{resultType:{kind:"attribute",type:"string",description:"Sets the class name of the result type (type from output)",title:"Result Type",required:!1,deprecated:!1},expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},spel:{type:"object",title:"SpEL",group:"language",icon:"generic24.png",description:"For Spring Expression Language (SpEL) expressions and predicates",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},sql:{type:"object",title:"SQL",group:"language",icon:"generic24.png",description:"For SQL expressions and predicates",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},terser:{type:"object",title:"HL7 Terser",group:"language,hl7",icon:"generic24.png",description:"For HL7 terser expressions and predicates",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},tokenize:{type:"object",title:"Tokenize",group:"language",icon:"generic24.png",description:"For expressions and predicates using a body or header tokenizer.",properties:{token:{kind:"attribute",type:"string",description:"The (start) token to use as tokenizer for example \n for a new line token",title:"Token",required:!0,deprecated:!1},endToken:{kind:"attribute",type:"string",description:"The end token to use as tokenizer if using start/end token pairs.",title:"End Token",required:!1,deprecated:!1},inheritNamespaceTagName:{kind:"attribute",type:"string",description:"To inherit namepaces from a root/parent tag name",title:"Inherit Namespace Tag Name",required:!1,deprecated:!1},headerName:{kind:"attribute",type:"string",description:"Name of header to tokenize instead of using the message body.",title:"Header Name",required:!1,deprecated:!1},regex:{kind:"attribute",type:"boolean",defaultValue:"false",description:"If the token is a regular expression pattern. The default value is false",title:"Regex",required:!1,deprecated:!1},xml:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether the input is XML messages. This option must be set to true if working with XML payloads.",title:"Xml",required:!1,deprecated:!1},includeTokens:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to include the tokens in the parts The default value is false",title:"Include Tokens",required:!1,deprecated:!1},group:{kind:"attribute",type:"integer",description:"To group N parts together for example to split big files into chunks of 1000 lines.",title:"Group",required:!1,deprecated:!1},expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},vtdxml:{type:"object",title:"VtdXML",group:"language",icon:"generic24.png",description:"For VTD-XML (fast and efficient XPath) expressions and predicates",properties:{expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},xpath:{type:"object",title:"XPath",group:"language",icon:"generic24.png",description:"For XPath expressions and predicates",properties:{documentType:{kind:"attribute",type:"string",description:"Name of class for document type The default value is org.w3c.dom.Document",title:"Document Type",required:!1,deprecated:!1},resultType:{kind:"attribute",type:"string",description:"Sets the class name of the result type (type from output) The default result type is NodeSet",title:"Result Type",required:!1,deprecated:!1},saxon:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to use Saxon.",title:"Saxon",required:!1,deprecated:!1},factoryRef:{kind:"attribute",type:"string",description:"References to a custom XPathFactory to lookup in the registry",title:"Factory Ref",required:!1,deprecated:!1},objectModel:{kind:"attribute",type:"string",description:"The XPath object model to use",title:"Object Model",required:!1,deprecated:!1},logNamespaces:{kind:"attribute",type:"boolean",defaultValue:"false",description:"Whether to log namespaces which can assist during trouble shooting",title:"Log Namespaces",required:!1,deprecated:!1},headerName:{kind:"attribute",type:"string",description:"Name of header to use as input instead of the message body",title:"Header Name",required:!1,deprecated:!1},expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},xquery:{type:"object",title:"XQuery",group:"language",icon:"generic24.png",description:"For XQuery expressions and predicates",properties:{type:{kind:"attribute",type:"string",description:"Sets the class name of the result type (type from output) The default result type is NodeSet",title:"Type",required:!1,deprecated:!1},headerName:{kind:"attribute",type:"string",description:"Name of header to use as input instead of the message body",title:"Header Name",required:!1,deprecated:!1},expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}},xtokenize:{type:"object",title:"XML Tokenize",group:"language",icon:"generic24.png",description:"For expressions and predicates using a body or header tokenizer.",properties:{headerName:{kind:"attribute",type:"string",description:"Name of header to tokenize instead of using the message body.",title:"Header Name",required:!1,deprecated:!1},mode:{kind:"attribute",type:"string",description:"The extraction mode. The available extraction modes are: i - injecting the contextual namespace bindings into the extracted token (default) w - wrapping the extracted token in its ancestor context u - unwrapping the extracted token to its child content t - extracting the text content of the specified element",title:"Mode",required:!1,deprecated:!1},group:{kind:"attribute",type:"integer",description:"To group N parts together",title:"Group",required:!1,deprecated:!1},expression:{kind:"value",type:"string",description:"The expression value in your chosen language syntax",title:"Expression",required:!0,deprecated:!1},trim:{kind:"attribute",type:"boolean",defaultValue:"true",description:"Whether to trim the value to remove leading and trailing whitespaces and line breaks",title:"Trim",required:!1,deprecated:!1},id:{kind:"attribute",type:"string",description:"Sets the id of this node",title:"Id",required:!1,deprecated:!1}}}}},ActiveMQ;!function(e){function t(e){function t(e){if(e){if("Queues"===e.title||"Queue"===e.title)return e;var n=e.parent;if(n)return t(n)}return null}var n=e.selection;return n?t(n):null}function n(e){function t(e){var t=null;return e&&(("Topics"===e.title||"Topic"===e.title)&&(t=e),null===t&&angular.forEach(e.children,function(e){("Topics"===e.title||"Topic"===e.title)&&(t=e)})),t}var n=e.selection;return n?t(n):null}function i(e,t,n){"selectAll"in n.gridOptions?n.gridOptions.selectAll(!1):n.gridOptions.selectedItems.length=0;var i=Core.pathGet(e,["rowIndex"])||Core.pathGet(e,["index"]),r=Core.pathGet(e,["entity",t]);n.rowIndex=i;var o=n.gridOptions.selectedItems;o.splice(0,o.length),i>=0&&i<n.messages.length?(n.row=n.messages.find(function(e){return e[t]===r}),n.row&&o.push(n.row)):n.row=null}function r(e,t){void 0===t&&(t=null),e.selectRowIndex=function(n){e.rowIndex=n;var i=e.gridOptions.selectedItems;i.splice(0,i.length),n>=0&&n<e.messages.length?(e.row=e.messages[n],e.row&&i.push(e.row)):e.row=null,t&&t.apply()},e.$watch("showMessageDetails",function(){e.showMessageDetails||(e.row=null,e.gridOptions.selectedItems.splice(0,e.gridOptions.selectedItems.length))})}e.pluginName="activemq",e.log=Logger.get("activemq"),e.jmxDomain="org.apache.activemq",e.getSelectionQueuesFolder=t,e.getSelectionTopicsFolder=n,e.selectCurrentMessage=i,e.decorate=r}(ActiveMQ||(ActiveMQ={}));var ActiveMQ;!function(e){function t(e){var t=null,n=e.selection;return n&&(t=n.findAncestor(function(e){var t=e.entries;return t?"type"in t&&"Broker"===t.type&&"brokerName"in t&&!("destinationName"in t)&&!("destinationType"in t):!1})),t}function n(t){return t.hasDomainAndProperties(e.jmxDomain,{destinationType:"Queue"},4)||t.selectionHasDomainAndType(e.jmxDomain,"Queue")}function i(t){return t.hasDomainAndProperties(e.jmxDomain,{destinationType:"Topic"},4)||t.selectionHasDomainAndType(e.jmxDomain,"Topic")}function r(t){return t.selectionHasDomainAndLastFolderName(e.jmxDomain,"Queue")}function o(t){return t.selectionHasDomainAndLastFolderName(e.jmxDomain,"Topic")}function a(t){return t.hasDomainAndProperties(e.jmxDomain,{service:"JobScheduler"},4)}function s(t){if(t.selectionHasDomainAndType(e.jmxDomain,"Broker")){var n=Core.pathGet(t,["selection"]),i=Core.pathGet(t,["selection","parent"]);return!(i&&(i.ancestorHasType("Broker")||n.ancestorHasType("Broker")))}return!1}e._module=angular.module(e.pluginName,[]),e._module.config(["$routeProvider",function(e){e.when("/activemq/browseQueue",{templateUrl:"plugins/activemq/html/browseQueue.html"}).when("/activemq/createDestination",{templateUrl:"plugins/activemq/html/createDestination.html"}).when("/activemq/deleteQueue",{templateUrl:"plugins/activemq/html/deleteQueue.html"}).when("/activemq/deleteTopic",{templateUrl:"plugins/activemq/html/deleteTopic.html"}).when("/activemq/sendMessage",{templateUrl:"plugins/camel/html/sendMessage.html"}).when("/activemq/durableSubscribers",{templateUrl:"plugins/activemq/html/durableSubscribers.html"}).when("/activemq/jobs",{templateUrl:"plugins/activemq/html/jobs.html"})}]),e._module.run(["HawtioNav","$location","workspace","viewRegistry","helpRegistry","preferencesRegistry","$templateCache","documentBase",function(l,u,c,d,p,h,f,g){function m(e){var t=e.get("org.apache.activemq");v(t),t&&angular.forEach(t.children,function(e){angular.forEach(e.children,function(e){var t=e.children;if(t){var n=["Topic","Queue"];angular.forEach(n,function(e){var n=t.findIndex(function(t){return t.title===e});if(n>0){var i=t[n];t.splice(n,1),t.splice(0,0,i)}})}})})}function v(e){if(e){var t=e.parent,n=e.entries;if(t&&!t.typeName&&n){var i=n.endpoint;("Consumer"===i||"Producer"===i)&&(t.typeName=i);var r=n.connectorName;r&&!e.icon&&(e.icon=UrlHelpers.join(g,"/img/icons/activemq/connector.png"))}angular.forEach(e.children,function(e){return v(e)})}}d['{ "main-tab": "activemq" }']="plugins/activemq/html/layoutActiveMQTree.html",p.addUserDoc("activemq","plugins/activemq/doc/help.md",function(){return c.treeContainsDomainAndProperties("org.apache.activemq")}),h.addTab("ActiveMQ","plugins/activemq/html/preferences.html",function(){return c.treeContainsDomainAndProperties("org.apache.activemq")}),c.addTreePostProcessor(m);var y=c.attributeColumnDefs;y[e.jmxDomain+"/Broker/folder"]=[{field:"BrokerName",displayName:"Name",width:"**"},{field:"TotalProducerCount",displayName:"Producer"},{field:"TotalConsumerCount",displayName:"Consumer"},{field:"StorePercentUsage",displayName:"Store %"},{field:"TempPercentUsage",displayName:"Temp %"},{field:"MemoryPercentUsage",displayName:"Memory %"},{field:"TotalEnqueueCount",displayName:"Enqueue"},{field:"TotalDequeueCount",displayName:"Dequeue"}],y[e.jmxDomain+"/Queue/folder"]=[{field:"Name",displayName:"Name",width:"***"},{field:"QueueSize",displayName:"Queue Size"},{field:"ProducerCount",displayName:"Producer"},{field:"ConsumerCount",displayName:"Consumer"},{field:"EnqueueCount",displayName:"Enqueue"},{field:"DequeueCount",displayName:"Dequeue"},{field:"MemoryPercentUsage",displayName:"Memory %"},{field:"DispatchCount",displayName:"Dispatch",visible:!1}],y[e.jmxDomain+"/Topic/folder"]=[{field:"Name",displayName:"Name",width:"****"},{field:"ProducerCount",displayName:"Producer"},{field:"ConsumerCount",displayName:"Consumer"},{field:"EnqueueCount",displayName:"Enqueue"},{field:"DequeueCount",displayName:"Dequeue"},{field:"MemoryPercentUsage",displayName:"Memory %"},{field:"DispatchCount",displayName:"Dispatch",visible:!1}],y[e.jmxDomain+"/Consumer/folder"]=[{field:"ConnectionId",displayName:"Name",width:"**"},{field:"PrefetchSize",displayName:"Prefetch Size"},{field:"Priority",displayName:"Priority"},{field:"DispatchedQueueSize",displayName:"Dispatched Queue #"},{field:"SlowConsumer",displayName:"Slow ?"},{field:"Retroactive",displayName:"Retroactive"},{field:"Selector",displayName:"Selector"}],y[e.jmxDomain+"/networkConnectors/folder"]=[{field:"Name",displayName:"Name",width:"**"},{field:"UserName",displayName:"User Name"},{field:"PrefetchSize",displayName:"Prefetch Size"},{field:"ConduitSubscriptions",displayName:"Conduit Subscriptions?"},{field:"Duplex",displayName:"Duplex"},{field:"DynamicOnly",displayName:"Dynamic Only"}],y[e.jmxDomain+"/PersistenceAdapter/folder"]=[{field:"IndexDirectory",displayName:"Index Directory",width:"**"},{field:"LogDirectory",displayName:"Log Directory",width:"**"}];var b="/jmx/attributes",w=l.builder(),x=w.id("activemq").title(function(){return"ActiveMQ"}).defaultPage({rank:15,isValid:function(t,n){var i="ActiveMQDefaultPage";c.addNamedTreePostProcessor(i,function(r){c.removeNamedTreePostProcessor(i),c.treeContainsDomainAndProperties(e.jmxDomain)?t():n()})}}).href(function(){return b}).isValid(function(){return c.treeContainsDomainAndProperties(e.jmxDomain)}).build();x.tabs=Jmx.getNavItems(w,c,f,"activemq"),x.tabs.push({id:"activemq-browse",title:function(){return'<i class="fa fa-envelope"></i> Browse'},tooltip:function(){return"Browse the messages on the queue"},show:function(){return n(c)&&c.hasInvokeRights(c.selection,"browse()")},href:function(){return"/activemq/browseQueue"+c.hash()}}),x.tabs.push({id:"activemq-send",title:function(){return'<i class="fa fa-pencil"></i> Send'},tooltip:function(){return"Send a message to this destination"},show:function(){return(n(c)||i(c))&&c.hasInvokeRights(c.selection,"sendTextMessage(java.util.Map,java.lang.String,java.lang.String,java.lang.String)")},href:function(){return"/activemq/sendMessage"+c.hash()}}),x.tabs.push({id:"activemq-durable-subscribers",title:function(){return'<i class="fa fa-list"></i> Durable Subscribers'},tooltip:function(){return"Manage durable subscribers"},show:function(){return s(c)},href:function(){return"/activemq/durableSubscribers"+c.hash()}}),x.tabs.push({id:"activemq-jobs",title:function(){return'<i class="fa fa-list"></i> Jobs'},tooltip:function(){return"Manage jobs"},show:function(){return a(c)},href:function(){return"/activemq/jobs"+c.hash()}}),x.tabs.push({id:"activemq-create-destination",title:function(){return'<i class="fa fa-plus"></i> Create'},tooltip:function(){return"Create a new destination"},show:function(){return(s(c)||r(c)||o(c)||n(c)||i(c))&&c.hasInvokeRights(t(c),"addQueue","addTopic")},href:function(){return"/activemq/createDestination"+c.hash()}}),x.tabs.push({id:"activemq-delete-topic",title:function(){return'<i class="fa fa-remove"></i> Delete'},tooltip:function(){return"Delete this topic"},show:function(){return i(c)&&c.hasInvokeRights(t(c),"removeTopic")},href:function(){return"/activemq/deleteTopic"+c.hash()}}),x.tabs.push({id:"activemq-delete-queue",title:function(){return'<i class="fa fa-remove"></i> Delete'},tooltip:function(){return"Delete or purge this queue"},show:function(){return n(c)&&c.hasInvokeRights(t(c),"removeQueue")},href:function(){return"/activemq/deleteQueue"+c.hash()}}),l.add(x)}]),hawtioPluginLoader.addModule(e.pluginName),e.getBroker=t,e.isQueue=n,e.isTopic=i,e.isQueuesFolder=r,e.isTopicsFolder=o,e.isJobScheduler=a,e.isBroker=s}(ActiveMQ||(ActiveMQ={}));var ActiveMQ;!function(e){e.BrowseQueueController=e._module.controller("ActiveMQ.BrowseQueueController",["$scope","workspace","jolokia","localStorage","$location","activeMQMessage","$timeout","$dialog","$templateCache",function(t,n,i,r,o,a,s,l,u){function c(e){var n=e.value;angular.isArray(n)?t.allMessages=n:(t.allMessages=[],angular.forEach(n,function(e,n){t.allMessages.push(e)})),angular.forEach(t.allMessages,function(e){e.openMessageDialog=t.openMessageDialog,e.headerHtml=p(e),e.bodyText=d(e)}),w(t.gridOptions.filterOptions.filterText),Core.$apply(t)}function d(e){if(e.Text){var t=e.Text,n=""+t.length;return e.textMode="text ("+n+" chars)",t}if(e.BodyPreview){var t,i=Core.parseIntValue(r.activemqBrowseBytesMessages||"1","browse bytes messages");if(e.textMode="bytes (turned off)",99!=i){var o=[],a=[];e.BodyPreview.forEach(function(e){if((1===i||2===i)&&a.push(String.fromCharCode(e)),1===i||4===i){var t=e.toString(16);1===t.length&&(t="0"+t),o.push(t)}else{var t=e.toString(10);o.push(t)}});var s=o.join(" "),l=a.join("");if(1===i||2===i){var u=e.BodyPreview.length,n=""+a.length;t="bytes:\n"+s+"\n\ntext:\n"+l,e.textMode="bytes ("+u+" bytes) and text ("+n+" chars)"}else{var u=e.BodyPreview.length;t=s,e.textMode="bytes ("+u+" bytes)"}}return t}return e.textMode="unsupported","Unsupported message body type which cannot be displayed by hawtio"}function p(e){function t(e,t){return e>t?1:t>e?-1:0}function n(e){var t=r[e];null===t&&(t=""),c.push('<tr><td class="propertyName"><span class="green">Header</span> - '+e+'</td><td class="property-value">'+t+"</td></tr>")}function i(e){var t=o[e];null===t&&(t=""),c.push('<tr><td class="propertyName">'+e+'</td><td class="property-value">'+t+"</td></tr>")}var r=h(e),o=f(e),a=_.keys(r),s=_.keys(o).sort(t),l=a.filter(function(e){return e.startsWith("JMS")}).sort(t),u=a.subtract(l.concat(s)).sort(t),c=[];return l.forEach(n),u.forEach(n),s.forEach(i),c.join("\n")}function h(e){var t={};return angular.forEach(e,function(e,n){T.any(n)||E.any(n)||(t[Core.escapeHtml(n)]=Core.escapeHtml(e))}),t}function f(e){var t={};return angular.forEach(e,function(e,n){!T.any(n)&&E.any(n)&&angular.forEach(e,function(e,i){t['<span class="green">'+n.replace("Properties"," Property")+"</span> - "+Core.escapeHtml(i)]=Core.escapeHtml(e)})}),t}function g(){var e;if(n.selection)e=n.selection.objectName;else{var r=o.search().nid,a=n.keyToNodeMap[r];e=a.objectName}e&&(t.dlq=!1,i.getAttribute(e,"DLQ",Core.onSuccess(m,{silent:!0})),i.request({type:"exec",mbean:e,operation:"browse()"},Core.onSuccess(c)))}function m(e){t.dlq=e,Core.$apply(t)}function v(){}function y(){t.gridOptions.selectedItems.splice(0),Core.notification("success",t.message),setTimeout(g,50)}function b(){y(),n.loadTree()}function w(e){var t=S(e);x(t)}function x(n){n&&0!==n.length?(e.log.debug("Filtering conditions:",n),t.messages=t.allMessages.filter(function(t){e.log.debug("Message:",t);var i=!0;return $.each(n,function(e,n){i=n.column?i&&t[n.column]&&n.regex.test(t[n.column])||t.StringProperties&&t.StringProperties[n.column]&&n.regex.test(t.StringProperties[n.column]):i&&k(t,n.regex)}),i})):t.messages=t.allMessages}function k(e,t){for(var n=["JMSDestination","JMSDeliveryMode","JMSExpiration","JMSPriority","JMSMessageID","JMSTimestamp","JMSCorrelationID","JMSReplyTo","JMSType","JMSRedelivered"],i=0;i<n.length;i++){var r=n[i];if(e[r]&&t.test(e[r]))return!0}if(e.StringProperties)for(var o in e.StringProperties)if(t.test(e.StringProperties[o]))return!0;return e.bodyText&&t.test(e.bodyText)?!0:!1}function C(e,t){try{return new RegExp(e,t)}catch(n){return new RegExp(e.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\\|\||\.|\*|\+|\?)/g,"\\$1"))}}function S(e){var t,n=[];if(t=$.trim(e)){for(var i=t.split(";"),r=0;r<i.length;r++){var o=i[r].split(":");if(o.length>1){var a=$.trim(o[0]),s=$.trim(o[1]);a&&s&&n.push({column:a,columnDisplay:a.replace(/\s+/g,"").toLowerCase(),regex:C(s,"i")})}else{var l=$.trim(o[0]);l&&n.push({column:"",regex:C(l,"i")})}}return n}}t.searchText="",t.allMessages=[],t.messages=[],t.headers={},t.mode="text",t.gridOptions={selectedItems:[],data:"messages",displayFooter:!1,showFilter:!1,showColumnMenu:!0,enableColumnResize:!0,enableColumnReordering:!0,enableHighlighting:!0,filterOptions:{filterText:"",useExternalFilter:!0},selectWithCheckboxOnly:!0,showSelectionCheckbox:!0,maintainColumnRatios:!1,columnDefs:[{field:"JMSMessageID",displayName:"Message ID",cellTemplate:'<div class="ngCellText"><a href="" ng-click="row.entity.openMessageDialog(row)">{{row.entity.JMSMessageID}}</a></div>',width:"34%"},{field:"JMSType",displayName:"Type",width:"10%"},{field:"JMSPriority",displayName:"Priority",width:"7%"},{field:"JMSTimestamp",displayName:"Timestamp",width:"19%"},{field:"JMSExpiration",displayName:"Expires",width:"10%"},{field:"JMSReplyTo",displayName:"Reply To",width:"10%"},{field:"JMSCorrelationID",displayName:"Correlation ID",width:"10%"}]},t.showMessageDetails=!1;var T=["PropertiesText","BodyPreview","Text","openMessageDialog"],E=["BooleanProperties","ByteProperties","ShortProperties","IntProperties","LongProperties","FloatProperties","DoubleProperties","StringProperties"];t.$watch("workspace.selection",function(){n.moveIfViewInvalid()||setTimeout(g,50)}),t.$watch("gridOptions.filterOptions.filterText",function(e){w(e)}),t.openMessageDialog=function(n){e.selectCurrentMessage(n,"JMSMessageID",t),t.row&&(t.mode=CodeEditor.detectTextFormat(t.row.Text),t.showMessageDetails=!0)},t.refresh=g,e.decorate(t),t.moveMessages=function(){var e=n.selection,r=e.objectName;if(r&&e){var o=t.gridOptions.selectedItems;l.dialog({resolve:{selectedItems:function(){return o},gridOptions:function(){return t.gridOptions},queueNames:function(){return t.queueNames},parent:function(){return t}},template:u.get("activemqMoveMessageDialog.html"),controller:["$scope","dialog","selectedItems","gridOptions","queueNames","parent",function(e,t,n,o,a,s){e.selectedItems=n,e.gridOptions=o,e.queueNames=a,e.queueName="",e.close=function(o){if(t.close(),o){s.message="Moved "+Core.maybePlural(n.length,"message")+" to "+e.queueName;var a="moveMessageTo(java.lang.String, java.lang.String)";angular.forEach(n,function(t,o){var s=t.JMSMessageID;if(s){var l=o+1<n.length?v:b;i.execute(r,a,s,e.queueName,Core.onSuccess(l))}})}}}]}).open()}},t.resendMessage=function(){var e=n.selection,i=e.objectName;if(i&&e){var r=t.gridOptions.selectedItems;a.message=r[0],o.path("activemq/sendMessage")}},t.deleteMessages=function(){var e=n.selection,r=e.objectName;if(r&&e){var o=t.gridOptions.selectedItems;o&&0!==o.length&&UI.multiItemConfirmActionDialog({collection:o,index:"JMSMessageID",onClose:function(e){if(e){t.message="Deleted "+Core.maybePlural(o.length,"message");var n="removeMessage(java.lang.String)";_.forEach(o,function(e,t){var a=e.JMSMessageID;if(a){var s=t+1<o.length?v:y;i.execute(r,n,a,Core.onSuccess(s))}})}},title:"Delete messages?",action:"The following messages will be deleted:",okText:"Delete",okClass:"btn-danger",custom:"This operation is permanent once completed!",customClass:"alert alert-warning"}).open()}},t.retryMessages=function(){var e=n.selection,r=e.objectName;if(r&&e){var o=t.gridOptions.selectedItems;t.message="Retry "+Core.maybePlural(o.length,"message");var a="retryMessage(java.lang.String)";angular.forEach(o,function(e,t){var n=e.JMSMessageID;if(n){var s=t+1<o.length?v:y;i.execute(r,a,n,Core.onSuccess(s))}})}},t.queueNames=function(t){var i=e.getSelectionQueuesFolder(n);return i?i.children.map(function(e){return e.title}):[]}}])}(ActiveMQ||(ActiveMQ={}));var ActiveMQ;!function(e){e._module.controller("ActiveMQ.DestinationController",["$scope","workspace","$location","jolokia",function(t,n,i,r){function o(){t.destinationTypeName="true"===t.queueType?"Queue":"Topic"}function a(){t.destinationName="",t.workspace.operationCounter+=1,Core.notification("success",t.message),t.workspace.loadTree(),Core.$apply(t)}function s(){n.removeAndSelectParentNode(),t.workspace.operationCounter+=1,Core.notification("success",t.message),i.path("/jmx/attributes").search({"main-tab":"activemq","sub-tab":"activemq-attributes"}),Core.$apply(t)}function l(t){var i=null,r=n.selection;if(r&&e.isBroker(n)&&r.objectName)return r.objectName;var o=r.folderNames,a=r?r.parent:null;return r&&a&&t&&o&&o.length>1&&(i=a.objectName,
|
|
3274
|
|
-!i&&a&&(i=a.parent.objectName),i||(i=""+o[0]+":BrokerName="+o[1]+",Type=Broker")),i}t.workspace=n,t.message="",t.destinationName="",t.queueType=e.isTopicsFolder(n)||e.isTopic(n)?"false":"true",t.destinationTypeName=t.queueType?"Queue":"Topic",t.deleteDialog=!1,t.purgeDialog=!1,o(),t.$watch("queueType",function(){o()}),t.$watch("workspace.selection",function(){n.moveIfViewInvalid()}),t.createDestination=function(e,n){var i=l(r);if(i){var o;"true"===n?(o="addQueue(java.lang.String)",t.message="Created queue "+e):(o="addTopic(java.lang.String)",t.message="Created topic "+e),i?r.execute(i,o,e,Core.onSuccess(a)):Core.notification("error","Could not find the Broker MBean!")}},t.deleteDestination=function(){var e=l(r),i=n.selection,o=i.entries;if(e&&i&&r&&o){var a=(i.domain,o.Destination||o.destinationName||i.title);a=a.unescapeHTML();var u,c="Topic"!==(o.Type||o.destinationType);c?(u="removeQueue(java.lang.String)",t.message="Deleted queue "+a):(u="removeTopic(java.lang.String)",t.message="Deleted topic "+a),r.execute(e,u,a,Core.onSuccess(s))}},t.purgeDestination=function(){var e=n.getSelectedMBeanName(),i=n.selection,o=i.entries;if(e&&i&&r&&o){var s=o.Destination||o.destinationName||i.title;s=s.unescapeHTML();var l="purge()";t.message="Purged queue "+s,r.execute(e,l,Core.onSuccess(a))}},t.name=function(){var e=n.selection;return e?e.title:null}}])}(ActiveMQ||(ActiveMQ={}));var ActiveMQ;!function(e){e._module.controller("ActiveMQ.DurableSubscriberController",["$scope","workspace","jolokia",function(t,n,i){function r(){var e=a(i);e&&(t.durableSubscribers=[],i.request({type:"read",mbean:e,attribute:["DurableTopicSubscribers"]},Core.onSuccess(function(e){return o(e,"DurableTopicSubscribers","Active")})),i.request({type:"read",mbean:e,attribute:["InactiveDurableTopicSubscribers"]},Core.onSuccess(function(e){return o(e,"InactiveDurableTopicSubscribers","Offline")})))}function o(n,i,r){var o=n.value;e.log.debug("Got data: ",o),t.durableSubscribers.push.apply(t.durableSubscribers,o[i].map(function(e){var t=e.objectName,n=Core.objectNameProperties(t);return"objectName"in e||("canonicalName"in e&&(t=e.canonicalName),n=_.cloneDeep(e.keyPropertyList)),n._id=t,n.status=r,n})),Core.$apply(t)}function a(t){var i=null,r=n.selection;if(r&&e.isBroker(n)&&r.objectName)return r.objectName;var o=r.folderNames,a=r?r.parent:null;return r&&a&&t&&o&&o.length>1&&(i=a.objectName,!i&&a&&(i=a.parent.objectName),i||(i=""+o[0]+":BrokerName="+o[1]+",Type=Broker")),i}t.refresh=r,t.durableSubscribers=[],t.tempData=[],t.createSubscriberDialog=new UI.Dialog,t.deleteSubscriberDialog=new UI.Dialog,t.showSubscriberDialog=new UI.Dialog,t.topicName="",t.clientId="",t.subscriberName="",t.subSelector="",t.gridOptions={selectedItems:[],data:"durableSubscribers",displayFooter:!1,showFilter:!1,showColumnMenu:!0,enableCellSelection:!1,enableColumnResize:!0,enableColumnReordering:!0,selectWithCheckboxOnly:!1,showSelectionCheckbox:!1,multiSelect:!1,displaySelectionCheckbox:!1,filterOptions:{filterText:""},maintainColumnRatios:!1,columnDefs:[{field:"destinationName",displayName:"Topic",width:"30%"},{field:"clientId",displayName:"Client ID",width:"30%"},{field:"consumerId",displayName:"Consumer ID",cellTemplate:'<div class="ngCellText"><span ng-hide="row.entity.status != \'Offline\'">{{row.entity.consumerId}}</span><a ng-show="row.entity.status != \'Offline\'" ng-click="openSubscriberDialog(row)">{{row.entity.consumerId}}</a></div>',width:"30%"},{field:"status",displayName:"Status",width:"10%"}]},t.doCreateSubscriber=function(e,n,o,s){t.createSubscriberDialog.close(),t.clientId=e,t.subscriberName=n,t.topicName=o,t.subSelector=s,Core.isBlank(t.subSelector)&&(t.subSelector=null);var l=a(i);l?i.execute(l,"createDurableSubscriber(java.lang.String, java.lang.String, java.lang.String, java.lang.String)",t.clientId,t.subscriberName,t.topicName,t.subSelector,Core.onSuccess(function(){Core.notification("success","Created durable subscriber "+e),t.clientId="",t.subscriberName="",t.topicName="",t.subSelector="",r()})):Core.notification("error","Could not find the Broker MBean!")},t.deleteSubscribers=function(){var e=t.gridOptions.selectedItems[0]._id;i.execute(e,"destroy()",Core.onSuccess(function(){t.showSubscriberDialog.close(),Core.notification("success","Deleted durable subscriber"),r(),t.gridOptions.selectedItems.splice(0,t.gridOptions.selectedItems.length)}))},t.openSubscriberDialog=function(e){i.request({type:"read",mbean:e.entity._id},Core.onSuccess(function(n){t.showSubscriberDialog.subscriber=n.value,t.showSubscriberDialog.subscriber.Status=e.entity.status,console.log("Subscriber is now "+t.showSubscriberDialog.subscriber),Core.$apply(t),setTimeout(function(){t.showSubscriberDialog.open(),Core.$apply(t)},100)}))},t.topicNames=function(t){var i=e.getSelectionTopicsFolder(n);return i?i.children.map(function(e){return e.title}):[]},t.$watch("workspace.selection",function(){n.moveIfViewInvalid()||setTimeout(r,50)})}])}(ActiveMQ||(ActiveMQ={}));var ActiveMQ;!function(e){e._module.controller("ActiveMQ.JobSchedulerController",["$scope","workspace","jolokia",function(e,t,n){function i(){var i=t.selection;if(i){var o=i.objectName;o&&n.request({type:"read",mbean:o,attribute:"AllJobs"},Core.onSuccess(r))}Core.$apply(e)}function r(t){var n=t.value;angular.isArray(n)?e.jobs=n:(e.jobs=[],angular.forEach(n,function(t,n){e.jobs.push(t)})),Core.$apply(e)}function o(){}function a(){e.gridOptions.selectedItems.splice(0),Core.notification("success",e.message),setTimeout(i,50)}e.refresh=i,e.jobs=[],e.deleteJobsDialog=new UI.Dialog,e.gridOptions={selectedItems:[],data:"jobs",displayFooter:!1,showFilter:!1,showColumnMenu:!0,enableColumnResize:!0,enableColumnReordering:!0,filterOptions:{filterText:""},selectWithCheckboxOnly:!0,showSelectionCheckbox:!0,maintainColumnRatios:!1,columnDefs:[{field:"jobId",displayName:"Job ID",width:"25%"},{field:"cronEntry",displayName:"Cron Entry",width:"10%"},{field:"delay",displayName:"Delay",width:"5%"},{field:"repeat",displayName:"repeat",width:"5%"},{field:"period",displayName:"period",width:"5%"},{field:"start",displayName:"Start",width:"25%"},{field:"next",displayName:"Next",width:"25%"}]},e.$watch("workspace.selection",function(){t.moveIfViewInvalid()||setTimeout(i,50)}),e.deleteJobs=function(){var i=t.selection,r=i.objectName;if(r&&i){var s=e.gridOptions.selectedItems;e.message="Deleted "+Core.maybePlural(s.length,"job");var l="removeJob(java.lang.String)";angular.forEach(s,function(e,t){var i=e.jobId;if(i){var u=t+1<s.length?o:a;n.execute(r,l,i,Core.onSuccess(u))}})}}}])}(ActiveMQ||(ActiveMQ={}));var ActiveMQ;!function(e){e._module.controller("ActiveMQ.PreferencesController",["$scope","localStorage","userDetails","$rootScope",function(e,t,n,i){var r={properties:{activemqUserName:{type:"string",description:"The user name to be used when connecting to the broker"},activemqPassword:{type:"string",description:"Password to be used when connecting to the broker"},activemqFilterAdvisoryTopics:{type:"boolean","default":"false",description:"Whether to exclude advisory topics in tree/table"},activemqBrowseBytesMessages:{type:"number","enum":{"Hex and text":1,"Decimal and text":2,Hex:4,Decimal:8,Off:99},description:"Browsing byte messages should display the message body as"}}};e.entity=e,e.config=r,Core.initPreferenceScope(e,t,{activemqUserName:{value:n.username?n.username:""},activemqPassword:{value:n.password?n.password:""},activemqBrowseBytesMessages:{value:1,converter:parseInt},activemqFilterAdvisoryTopics:{value:!1,converter:Core.parseBooleanValue,post:function(e){i.$broadcast("jmxTreeUpdated")}}})}])}(ActiveMQ||(ActiveMQ={}));var ActiveMQ;!function(e){e._module.controller("ActiveMQ.TreeHeaderController",["$scope",function(e){e.expandAll=function(){Tree.expandAll("#activemqtree")},e.contractAll=function(){Tree.contractAll("#activemqtree")}}]),e._module.controller("ActiveMQ.TreeController",["$scope","$location","workspace","localStorage",function(t,n,i,r){function o(){e.log.debug("workspace tree has changed, lets reload the activemq tree");var o=[],s=i.tree;if(s){var l="org.apache.activemq",u=s.get(l);if(u&&(o=u.children),o.length){var c=o[0];if(!c.typeName&&c.children.length<4){var d=[];angular.forEach(o,function(e){d=d.concat(e.children)}),o=d}}o.forEach(function(e){var t=e.children;if(t){Tree.sanitize(t);var n=t.findIndex(function(e){return"Topic"===e.title});if(n>0){var o=t[n],a="ActiveMQ-allTopics-"+e.title,s=o.children.clone();i.mapData[a]=s;var l=Core.parseBooleanValue(r.activemqFilterAdvisoryTopics);if(l){if(o&&o.children){var u=o.children.filter(function(e){return!e.title.startsWith("ActiveMQ.Advisory")});o.children=u}}else s&&(o.children=s)}}});var p=$("#activemqtree");Jmx.enableTree(t,n,i,p,o,!0),setTimeout(a,50)}}function a(){Jmx.updateTreeSelectionFromURLAndAutoSelect(n,$("#activemqtree"),function(e){var t=e.getChildren()[0];return t&&"Queue"===t.data.title?(e=t,e.expand(!0),e):null},!0)}t.$on("$routeChangeSuccess",function(e,t,n){setTimeout(a,50)}),t.$watch("workspace.tree",function(){o()}),t.$on("jmxTreeUpdated",function(){o()})}])}(ActiveMQ||(ActiveMQ={}));var Camel;!function(e){function t(e,t){var n=F(e);if(n){var i=t.request({type:"read",mbean:n,attribute:["NumberOfRestServices"]}),r=i.value.NumberOfRestServices;return r>0}return!1}function n(e,t,n,i){function r(e){var t=null,n=e?e.value:null;if(n){var r=$.parseXML(n),a=$(r).find("route[id='"+o+"']");a&&a.length&&(t=a[0])}i(t)}var o=W(e,n),a=j(e);a&&o?t.request({type:"exec",mbean:a,operation:"dumpRoutesAsXml()"},Core.onSuccess(r,{error:r})):(o||console.log("No selectedRouteId when trying to lazy load the route!"),i(null))}function i(e){var t=null;if(e&&(t=e.getAttribute("uri"),!t)){var n=e.getAttribute("ref");if(n){var i=e.getAttribute("method");t=i?n+"."+i+"()":"ref:"+n}}return t}function r(t,n){void 0===n&&(n={});var i=t.camelNodeData;if(!i){var r=t.routeXmlNode;r&&(i=e.getRouteNodeJSON(r)),i||(i=n),t.camelNodeData=i}return i}function o(t,n){if(void 0===n&&(n={}),t){angular.forEach(t.attributes,function(e){n[e.name]=e.value});var i=t.localName;"route"!==i&&"routes"!==i&&"camelContext"!==i&&"rests"!==i&&$(t).children("*").each(function(t,i){var r=i.localName,a=e.camelLanguageSettings(r);if(a)n.expression={language:r,expression:i.textContent};else if(!g(r)){var s=o(i);s&&(s.expression&&(s=s.expression),"completionSize"===r?r="completionSizeExpression":"completionTimeout"===r&&(r="completionTimeoutExpression"),n[r]=s)}})}return n}function a(e,t){return void 0===t&&(t=" "),e+t}function s(e,t,n){function i(t,n,o){if(void 0===o&&(o=!1),angular.isArray(t))$(e).children(n).remove(),angular.forEach(t,function(e){i(e,n,!0)});else if(angular.isObject(t)){var a=null;if("expression"===n){var l=t.language;l&&(n=l,a=t.expression,t=angular.copy(t),delete t.expression,delete t.language)}var u=$(e).children(n),c=null;if(!o&&u&&u.length)c=u[0];else{var d=e.ownerDocument||document;e.appendChild(d.createTextNode("\n"+r)),c=d.createElementNS(e.namespaceURI,n),a&&c.appendChild(d.createTextNode(a)),e.appendChild(c)}s(c,t,r),a&&u.text(a)}else if(t)if(n.startsWith("_"));else{var p=t.toString();e.setAttribute(n,p)}else e.removeAttribute(n)}if(e){var r=a(n);angular.forEach(t,function(e,t){return i(e,t,!1)})}}function l(e){var t=null;if(e){var n=e.localName;t=n?f(n):e}if(!t)return null;var i=t.icon||"generic24.png",r=HawtioCore.injector;if(!r)return UrlHelpers.join("img/icons/camel/",i);var o=r.get("documentBase");return o?UrlHelpers.join(o,"/img/icons/camel/",i):void 0}function u(e){var t=e.selection;if(t&&t.objectName&&t.typeName&&"endpoints"===t.typeName){var n=Core.parseMBean(t.objectName);if(!n)return null;var i=n.attributes;if(!i)return null;if(!("name"in i))return null;var r=i.name;return r=r.replace("\\?","?"),r.startsWith('"')&&(r=r.last(r.length-1)),r.endsWith('"')&&(r=r.first(r.length-1)),r}return null}function c(e){if(angular.isString(e)){var t=e.replace("?","\\?");return t=t.replace(/\:(\/[^\/])/,"://$1"),t=t.replace(/\:([^\/])/,"://$1")}return e}function d(t){return{uri:e.getSelectedEndpointName(t),mbean:e.getSelectionCamelContextMBean(t)}}function p(t){var n=t.selection||t.getSelectedMBean();return n&&e.jmxDomain===n.domain?n.routeXmlNode:null}function h(t){var n=t.selection;n&&e.jmxDomain===n.domain&&delete n.routeXmlNode}function f(t){return angular.isObject(t)?t:Forms.lookupDefinition(t,e._apacheCamelModel)}function g(t){return null!=Forms.lookupDefinition(t,e._apacheCamelModel)}function m(e){var t=f(e);return t?t.nextSiblingAddedAsChild||!1:null}function v(e){var t=f(e);return t?t.acceptInput||!1:null}function y(e){var t=f(e);return t?t.acceptOutput||!1:null}function b(t){return e._apacheCamelModel.languages[t]}function w(e){return b(e)||"expression"===e?!0:!1}function x(t,n){var i=t;angular.isString(t)&&(i=$.parseXML(t));var r="camelContext",o=new Folder(r);o.addClass="org-apache-camel-context",o.domain=e.jmxDomain,o.typeName="context",o.key=Core.toSafeDomID(n);var a=$(i).find("camelContext");return a&&a.length||(a=$(i).find("routes")),a&&a.length&&(o.xmlDocument=i,o.routeXmlNode=a,$(a).children("route").each(function(t,n){var i=n.getAttribute("id");i||(i="route"+t,n.setAttribute("id",i));var r=new Folder(i);r.addClass="org-apache-camel-route",r.typeName="routes",r.domain=e.jmxDomain,r.key=o.key+"_"+Core.toSafeDomID(i),r.parent=o;var a=f("route");if(a){var s=l(a);r.tooltip=a.tooltip||a.description||i,r.icon=s}o.children.push(r),k(r,n)})),o}function k(e,t){e.children=[],e.routeXmlNode=t,t.setAttribute("_cid",e.key),$(t).children("*").each(function(t,n){C(e,n)})}function C(t,n){var i=n.localName;if(i){var r=f(i);if(r){var o=l(r),a=new Folder(i);a.domain=e.jmxDomain,a.typeName="routeNode",A(a,n,r),a.parent=t,a.folderNames=t.folderNames;for(var s=n.getAttribute("id")||i,u=t.key+"_"+Core.toSafeDomID(s),c=1,d=!0;d;){var p=u+c;t.children.some({key:p})?c+=1:(d=!1,u=p)}return a.key=u,a.icon=o,a.routeXmlNode=n,t.children||(t.children=[]),t.children.push(a),k(a,n),a}}return null}function S(t){var n=t?t.tree:null;return n?n.get(e.jmxDomain):null}function _(e,t){var n=null,i=S(e);return i&&t&&angular.forEach(i.children,function(e){n||t!==e.title||(n=e)}),n}function T(e,t){var n=_(e,t);if(n){var i=n.navigate("context");if(i&&i.children&&i.children.length){var r=i.children[0];return r.objectName}}return null}function E(e){var t=null,n=e.selection;if(n){var i=n.entries;if(i){var r=i.context,o=i.name,a=i.type;if("endpoints"===a)return D(r,o);if("routes"===a)return M(r,o)}}return t}function D(e,t){var n=null;return e&&t&&(n="#/camel/endpoint/browse/"+e+"/"+t),n}function M(e,t){var n=null;return e&&t&&(n="#/camel/route/diagram/"+e+"/"+t),n}function I(e){var t=Core.pathGet(e,["routeXmlNode","localName"]);return"from"===t||"to"===t?"endpoint":t}function P(t,n,i){void 0===i&&(i=e.increaseIndent(""));var r=t.data||t,o=0,a=I(r);if(r){if(!n){n=document.createElement(a);var s=e.getRouteFolderJSON(r);s&&e.setRouteNodeJSON(n,s,i)}var l=n.ownerDocument||document,u=n.namespaceURI,c="route"!==a,d=e.increaseIndent(i);angular.forEach(t.children||t.getChildren(),function(t){var i=t.data||t,r=e.getFolderCamelNodeId(i),a=e.getRouteFolderJSON(i);if(r&&a){var s=!1;if("endpoint"===r&&(c?r="to":(r="from",c=!0)),"expression"===r){var p=a.language;p&&(r=p,s=!0)}n.appendChild(l.createTextNode("\n"+d));var h=l.createElementNS(u,r);e.setRouteNodeJSON(h,a,d),n.appendChild(h),o+=1,P(t,h,d)}}),o&&n.appendChild(l.createTextNode("\n"+i))}return n}function A(t,n,r){var o=n.localName,a=n.getAttribute("id"),s=r.title||o,l=r.tooltip||r.description||s;if(a)s=a;else{var u=i(n);if(u){s=u;var c=u.split("?");c&&c.length>1&&(s=c[0]),l+=" "+u}else{var d=$(n).children("*");if(d&&d.length){var p=d[0],h=p.localName,f=null;e.isCamelLanguage(h)&&(f=p.textContent,f||(f=p.getAttribute("expression"))),f&&(s+=" "+f,l+=" "+h+" expression")}}}return t.title=s,t.tooltip=l,s}function j(e){if(e){var t=B(e),n=e.selection,i=e.tree;if(i&&n){var r=n.domain;if(r&&t){var o=i.navigate(r,t,"context");if(o&&o.children){var a=o.children.first();if(a.title){var s=a.title;return""+r+":context="+t+',type=context,name="'+s+'"'}}}}}return null}function N(e){if(e){var t=B(e),n=e.selection,i=e.tree;if(i&&n){var r=n.domain;if(r&&t)return i.navigate(r,t,"endpoints")}}return null}function O(e){if(e){var t=B(e),n=e.selection,i=e.tree;if(i&&n){var r=n.domain;if(r&&t){var o=i.navigate(r,t,"tracer");if(o&&o.children){var a=o.children.find(function(e){return e.title.startsWith("BacklogTracer")});if(a)return a.objectName}}}}return null}function L(e){if(e){var t=B(e),n=e.selection,i=e.tree;if(i&&n){var r=n.domain;if(r&&t){var o=i.navigate(r,t,"tracer");if(o&&o.children){var a=o.children.find(function(e){return e.title.startsWith("BacklogDebugger")});if(a)return a.objectName}}}}return null}function R(e){if(e){var t=B(e),n=e.selection,i=e.tree;if(i&&n){var r=n.domain;if(r&&t){var o=i.navigate(r,t,"services");if(o&&o.children){var a=o.children.find(function(e){return e.title.startsWith("DefaultTypeConverter")});if(a)return a.objectName}}}}return null}function F(e){if(e){var t=B(e),n=e.selection,i=e.tree;if(i&&n){var r=n.domain;if(r&&t){var o=i.navigate(r,t,"services");if(o&&o.children){var a=o.children.find(function(e){return e.title.startsWith("DefaultRestRegistry")});if(a)return a.objectName}}}}return null}function q(e){if(e){var t=B(e),n=e.selection,i=e.tree;if(i&&n){var r=n.domain;if(r&&t){var o=i.navigate(r,t,"services");if(o&&o.children){var a=o.children.find(function(e){return e.title.startsWith("DefaultRuntimeEndpointRegistry")});if(a)return a.objectName}}}}return null}function H(e){if(e){var t=B(e),n=e.selection,i=e.tree;if(i&&n){var r=n.domain;if(r&&t){var o=i.navigate(r,t,"services");if(o&&o.children){var a=o.children.find(function(e){return e.title.startsWith("DefaultInflightRepository")});if(a)return a.objectName}}}}return null}function U(e){if(e){var t=B(e),n=e.selection,i=e.tree;if(i&&n){var r=n.domain;if(r&&t){var o=i.navigate(r,t,"services");if(o&&o.children){var a=o.children.find(function(e){return e.title.startsWith("MetricsRegistryService")});if(a)return a.objectName}}}}return null}function B(e){var t=e.selection;if(t&&(t=t.findAncestor(function(e){return"context"===e.title||null!=e.parent&&"org.apache.camel"===e.parent.title}))){var n,i=e.tree,r=t.folderNames,o=t.entries;i&&(r&&r.length>1?n=r[1]:o&&(n=o.context))}return n}function z(e,t){var n=(e.State||"").toLowerCase();return angular.isArray(t)?t.any(function(e){return n.startsWith(e)}):n.startsWith(t)}function V(e){if(e)switch(e.toLowerCase()){case"started":return"green fa fa-play-circle";case"suspended":return"fa fa-pause"}return"orange fa fa-off"}function W(e,t){void 0===t&&(t=null);var n=t||e.selection,i=null;if(n&&n&&n.entries){var r=n.entries.type,o=n.entries.name;"routes"===r&&o&&(i=Core.trimQuotes(o))}return i}function G(e,t){if(e){var n=B(e),i=e.selection,r=e.tree;if(r&&i){var o=i.domain;if(o&&n){var a=r.navigate(o,n,"routes");if(a&&a.children){var s=a.children.find(function(e){return e.title===t});if(s)return s.objectName}}}}return null}function J(e,t){if(e){var n=B(e),i=e.selection,r=e.tree;if(r&&i){var o=i.domain;if(o&&n){var a=r.navigate(o,n,"context");if(a&&a.children){var s=a.children.first();if(s.version)return s.version;if(s.title){var l=s.title,u=""+o+":context="+n+',type=context,name="'+l+'"',c=t.getAttribute(u,"CamelVersion",Core.onSuccess(null));return s.version=c,c}}}}}return null}function X(e){var t=$(e),n=t.children("uid").text(),i=t.children("timestamp").text(),r={headers:{},headerTypes:{},id:null,uid:n,timestamp:i,headerHtml:""},o=t.children("message")[0];o||(o=e);var a=$(o),s=a.find("header"),l="";s.each(function(e,t){var n=t.getAttribute("key"),i=t.getAttribute("type"),o=t.textContent;n&&(o&&(r.headers[n]=o),i&&(r.headerTypes[n]=i),l+="<tr><td class='property-name'>"+n+"</td><td class='property-value'>"+Y(i)+"</td><td class='property-value'>"+(o||"")+"</td></tr>")}),r.headerHtml=l;var u=r.headers.breadcrumbId;if(!u){var c=["MessageID","ID","Path","Name"];angular.forEach(c,function(e){u||angular.forEach(r.headers,function(t,n){!u&&n.endsWith(e)&&(u=t)})}),angular.forEach(r.headers,function(e,t){u||(u=e)})}r.id=u;var d=a.children("body")[0];if(d){var p=d.textContent,h=d.getAttribute("type");r.body=p,r.bodyType=Y(h)}return r}function Y(e){return e?e.startsWith("java.lang")?e.substr(10):e:""}function K(){return{selectedItems:[],data:"messages",displayFooter:!1,showFilter:!1,showColumnMenu:!0,enableColumnResize:!0,enableColumnReordering:!0,filterOptions:{filterText:""},selectWithCheckboxOnly:!0,showSelectionCheckbox:!0,maintainColumnRatios:!1,columnDefs:[{field:"id",displayName:"ID",cellTemplate:'<div class="ngCellText"><a href="" ng-click="row.entity.openMessageDialog(row)">{{row.entity.id}}</a></div>'}]}}function Q(t,n,i,r,o,a){var s=$(n).find("route"),l=a/s.length,u=0;s.each(function(n,a){var s=a.getAttribute("id");i&&s&&i!==s||(e.addRouteXmlChildren(t,a,r,o,null,u,0),u+=l)})}function Z(t,n,r,o,a,s,u,c){void 0===c&&(c=null);var d=150,p=s,h=u+d,g=n.getAttribute("id"),m=[],v=n.localName;return $(n).children().each(function(n,s){var u=r.length,y=s.localName;"from"!==y||a||(a=u);var b=f(y),w=null;if(b){var x=b.title||y,k=i(s);k&&(x+=" "+k.split("?")[0]);var C=b.tooltip||b.description||x;k&&(C+=" "+k);var S=s.getAttribute("id"),_=x;if(S){var T=s.getAttribute("customId");t.camelIgnoreIdForLabel||!T||"false"===T?_="id: "+S:x=S}var $=t.camelMaximumLabelWidth||e.defaultMaximumLabelWidth,E=x.length;E>$&&(_=x+"\n\n"+_,x=x.substring(0,$)+"..");var D=l(b);if(("from"===y||"to"===y)&&k){var M=k.indexOf(":");if(M>0){var I=k.substring(0,M);if(I){var P=e.getEndpointIcon(I);if(P){var A=HawtioCore.injector;if(A){var j=A.get("documentBase");j&&(D=UrlHelpers.join(j,P))}else D=Core.url(P)}}}}var N=s.getAttribute("_cid")||s.getAttribute("id");w={name:L,label:x,labelSummary:_,group:1,id:u,elementId:S,x:p,"y:":h,imageUrl:D,cid:N,tooltip:C,type:y},g&&(w.rid=g,t.routeNodes||(t.routeNodes={}),t.routeNodes[g]=w),N||(N=y+(r.length+1)),N&&(w.cid=N,t.nodes||(t.nodes={}),t.nodes[N]=w),g=null,r.push(w),null!==a&&a!==u&&(0===m.length||"choice"===v?o.push({source:a,target:u,value:1}):(m.forEach(function(e){o.push({source:e,target:u,value:1})}),m.length=0))}else{var O=e.camelLanguageSettings(y);if(O&&c){var L=O.name||y,R=s.textContent;R?(c.tooltip=c.label+" "+L+" "+R,c.label=R):c.label=c.label+" "+L}}var F=Z(t,s,r,o,u,p,h,w);"choice"===v?(m=m.concat(F),p+=d):"choice"===y?(m=F,h+=d):(m=[r.length-1],h+=d)}),m}function ee(e){var t=e.height();if(300>t){console.log("browse thinks the height is only "+t+" so calculating offset from doc height");var n=e.offset();if(t=$(document).height()-5,n){var i=n.top;i&&(t-=i)}}return t}function te(e,t){if(void 0===t&&(t={}),e){var n=e.key;n&&(t[n]=e),angular.forEach(e.children,function(e){return te(e,t)})}return t}function ne(t){var n=t&&t.data?t.data:t;if(!n)return null;var i=n.xmlDocument,r=n.routeXmlNode;if(r&&r.length){for(var o=r[0],a=o.childNodes,s=[],l=0;l<a.length;l++){var u=a[l],c=u.localName;"route"===c&&parent&&s.push(l)}for(;s.length;){for(var d=s.pop(),p=d+1;;){var u=o.childNodes[p];if(!Core.isTextNode(u))break;o.removeChild(u)}d<o.childNodes.length&&o.removeChild(o.childNodes[d]);for(var l=d-1;l>=0;l--){var u=o.childNodes[l];if(!Core.isTextNode(u))break;o.removeChild(u)}}e.createFolderXmlTree(t,r[0])}return i}function ie(t){var n={},i=t.tree;if(i){var r=i.navigate(e.jmxDomain);r&&angular.forEach(r.children,function(e){var t=e.navigate("context");if(t&&t.children&&t.children.length){var i=t.children[0],r=Core.pathGet(i,["entries","name"])||i.key;r&&(n[r]={folder:i,mbean:i.objectName})}})}return n}function re(e){return ae(e,"components")}function oe(e){return ae(e,"routes")}function ae(t,n){var i={},r=t.tree;if(r){var o=r.navigate(e.jmxDomain);o&&angular.forEach(o.children,function(e){var t=e.navigate("context"),r=e.navigate(n);if(t&&r&&t.children&&t.children.length){var o=t.children[0],a=o.objectName;if(a){var s={folder:o,mbean:a};angular.forEach(r.children,function(e){var t=e.title;t&&(i[t]=s)})}}})}return i}function se(t){var n={},i=t.tree;if(i){var r=i.navigate(e.jmxDomain);r&&angular.forEach(r.children,function(e){var t=e.navigate("processors");t&&t.children&&t.children.length&&angular.forEach(t.children,function(e){var i=e.title;if(i){var r={folder:t,key:e.key};n[i]=r}})})}return n}function le(e){var t=e.camelIgnoreIdForLabel;return Core.parseBooleanValue(t)}function ue(t){var n=t.camelMaximumLabelWidth;return angular.isString(n)&&(n=parseInt(n)),n||(n=e.defaultMaximumLabelWidth),n}function ce(t){var n=t.camelMaximumTraceOrDebugBodyLength;return angular.isString(n)&&(n=parseInt(n)),n||(n=e.defaultCamelMaximumTraceOrDebugBodyLength),n}function de(t){var n=t.camelTraceOrDebugIncludeStreams;return Core.parseBooleanValue(n,e.defaultCamelTraceOrDebugIncludeStreams)}function pe(e){var t=e.camelShowInflightCounter;return Core.parseBooleanValue(t,!0)}function he(t){var n=t.camelRouteMetricMaxSeconds;return angular.isString(n)&&(n=parseInt(n)),n||(n=e.defaultCamelRouteMetricMaxSeconds),n}function fe(t){var n=t.camelHideOptionDocumentation;return Core.parseBooleanValue(n,e.defaultHideOptionDocumentation)}function ge(t){var n=t.camelHideOptionDefaultValue;return Core.parseBooleanValue(n,e.defaultHideOptionDefaultValue)}function me(t){var n=t.camelHideOptionUnusedValue;return Core.parseBooleanValue(n,e.defaultHideOptionUnusedValue)}function ve(e,t){e.attr("class","node"),e.filter(function(e){if(e){var n=e.cid,i=e.rid,r=e.type,o=e.elementId;return"from"===r?t===i:o?t===o:n?t===n:t===i}return null}).attr("class","node selected")}function ye(e,t,n,i){var r=J(n,i);if(r){r+="camel-";var o=Core.parseVersionNumbers(r);return Core.compareVersionNumberArrays(o,[e,t])>=0?!0:!1}return!1}e.log=Logger.get("Camel"),e.jmxDomain="org.apache.camel",e.defaultMaximumLabelWidth=34,e.defaultCamelMaximumTraceOrDebugBodyLength=5e3,e.defaultCamelTraceOrDebugIncludeStreams=!0,e.defaultCamelRouteMetricMaxSeconds=10,e.defaultHideOptionDocumentation=!1,e.defaultHideOptionDefaultValue=!1,e.defaultHideOptionUnusedValue=!1,e._apacheCamelModel=void 0,hawtioPluginLoader.registerPreBootstrapTask(function(t){e._apacheCamelModel=window._apacheCamelModel,e.log.debug("Setting apache camel model: ",e._apacheCamelModel),t()}),e.hasRestServices=t,e.processRouteXml=n,e.getRouteNodeUri=i,e.getRouteFolderJSON=r,e.getRouteNodeJSON=o,e.increaseIndent=a,e.setRouteNodeJSON=s,e.getRouteNodeIcon=l,e.getSelectedEndpointName=u,e.escapeEndpointUriNameForJmx=c,e.getContextAndTargetEndpoint=d,e.getSelectedRouteNode=p,e.clearSelectedRouteNode=h,e.getCamelSchema=f,e.isCamelPattern=g,e.isNextSiblingAddedAsChild=m,e.acceptInput=v,e.acceptOutput=y,e.camelLanguageSettings=b,e.isCamelLanguage=w,e.loadCamelTree=x,e.addRouteChildren=k,e.addRouteChild=C,e.getRootCamelFolder=S,e.getCamelContextFolder=_,e.getCamelContextMBean=T,e.linkToFullScreenView=E,e.linkToBrowseEndpointFullScreen=D,e.linkToRouteDiagramFullScreen=M,e.getFolderCamelNodeId=I,e.createFolderXmlTree=P,e.updateRouteNodeLabelAndTooltip=A,e.getSelectionCamelContextMBean=j,e.getSelectionCamelContextEndpoints=N,e.getSelectionCamelTraceMBean=O,e.getSelectionCamelDebugMBean=L,e.getSelectionCamelTypeConverter=R,e.getSelectionCamelRestRegistry=F,e.getSelectionCamelEndpointRuntimeRegistry=q,e.getSelectionCamelInflightRepository=H,e.getSelectionCamelRouteMetrics=U,e.getContextId=B,e.isState=z,e.iconClass=V,e.getSelectedRouteId=W,e.getSelectionRouteMBean=G,e.getCamelVersion=J,e.createMessageFromXml=X,e.humanizeJavaType=Y,e.createBrowseGridOptions=K,e.loadRouteXmlNodes=Q,e.addRouteXmlChildren=Z,e.getCanvasHeight=ee,e.addFoldersToIndex=te,e.generateXmlFromFolder=ne,e.camelContextMBeansById=ie,e.camelContextMBeansByComponentName=re,e.camelContextMBeansByRouteId=oe,e.camelProcessorMBeansById=se,e.ignoreIdForLabel=le,e.maximumLabelWidth=ue,e.maximumTraceOrDebugBodyLength=ce,e.traceOrDebugIncludeStreams=de,e.showInflightCounter=pe,e.routeMetricMaxSeconds=he,e.hideOptionDocumentation=fe,e.hideOptionDefaultValue=ge,e.hideOptionUnusedValue=me,e.highlightSelectedNode=ve,e.isCamelVersionEQGT=ye}(Camel||(Camel={}));var Camel;!function(e){var t=Jmx;e.pluginName="camel";var n="plugins/camel/html/attributeToolBarRoutes.html",i="plugins/camel/html/attributeToolBarContext.html";e._module=angular.module(e.pluginName,[]),e._module.config(["$routeProvider",function(e){e.when("/camel/browseEndpoint",{templateUrl:"plugins/camel/html/browseEndpoint.html"}).when("/camel/endpoint/browse/:contextId/*endpointPath",{templateUrl:"plugins/camel/html/browseEndpoint.html"}).when("/camel/createEndpoint",{templateUrl:"plugins/camel/html/createEndpoint.html"}).when("/camel/route/diagram/:contextId/:routeId",{templateUrl:"plugins/camel/html/routes.html"}).when("/camel/routes",{templateUrl:"plugins/camel/html/routes.html"}).when("/camel/typeConverter",{templateUrl:"plugins/camel/html/typeConverter.html",reloadOnSearch:!1}).when("/camel/restRegistry",{templateUrl:"plugins/camel/html/restRegistry.html",reloadOnSearch:!1}).when("/camel/endpointRuntimeRegistry",{templateUrl:"plugins/camel/html/endpointRuntimeRegistry.html",reloadOnSearch:!1}).when("/camel/routeMetrics",{templateUrl:"plugins/camel/html/routeMetrics.html",reloadOnSearch:!1}).when("/camel/inflight",{templateUrl:"plugins/camel/html/inflight.html",reloadOnSearch:!1}).when("/camel/sendMessage",{templateUrl:"plugins/camel/html/sendMessage.html",reloadOnSearch:!1}).when("/camel/source",{templateUrl:"plugins/camel/html/source.html"}).when("/camel/traceRoute",{templateUrl:"plugins/camel/html/traceRoute.html"}).when("/camel/debugRoute",{templateUrl:"plugins/camel/html/debug.html"}).when("/camel/profileRoute",{templateUrl:"plugins/camel/html/profileRoute.html"}).when("/camel/properties",{templateUrl:"plugins/camel/html/properties.html"}).when("/camel/propertiesComponent",{templateUrl:"plugins/camel/html/propertiesComponent.html"}).when("/camel/propertiesEndpoint",{templateUrl:"plugins/camel/html/propertiesEndpoint.html"})}]),e._module.factory("tracerStatus",function(){return{jhandle:null,messages:[]}}),e._module.filter("camelIconClass",function(){return e.iconClass}),e._module.factory("activeMQMessage",function(){return{message:null}}),e._module.factory("metricsWatcher",["$window",function(e){var t=e.metricsWatcher;return t||(t={},e.metricsWatcher=t),t}]),e._module.run(["HawtioNav","workspace","jolokia","viewRegistry","layoutFull","helpRegistry","preferencesRegistry","$templateCache","$location",function(t,r,o,a,s,l,u,c,d){a["camel/endpoint/"]=s,a["camel/route/"]=s,a['{ "main-tab": "camel" }']="plugins/camel/html/layoutCamelTree.html",l.addUserDoc("camel","plugins/camel/doc/help.md",function(){return r.treeContainsDomainAndProperties(e.jmxDomain)}),u.addTab("Camel","plugins/camel/html/preferences.html",function(){return r.treeContainsDomainAndProperties(e.jmxDomain)}),Jmx.addAttributeToolBar(e.pluginName,e.jmxDomain,function(t){var r=t.typeName;if(r){if(r.startsWith("context"))return i;if(r.startsWith("route"))return n}var o=t.folderNames;if(o&&t.domain===e.jmxDomain){var a=o.last();if("routes"===a)return n;if("context"===a)return i}return null});var p="State",h='<div class="ngCellText pagination-centered" title="{{row.getProperty(col.field)}}"><i class="{{row.getProperty(\''+p+"') | camelIconClass}}\"></i></div>",f={field:p,displayName:p,cellTemplate:h,width:56,minWidth:56,maxWidth:56,resizable:!1,defaultSort:!1},g=r.attributeColumnDefs;g[e.jmxDomain+"/context/folder"]=[f,{field:"CamelId",displayName:"Context"},{field:"Uptime",displayName:"Uptime",visible:!1},{field:"CamelVersion",displayName:"Version",visible:!1},{field:"ExchangesCompleted",displayName:"Completed"},{field:"ExchangesFailed",displayName:"Failed"},{field:"FailuresHandled",displayName:"Failed Handled",visible:!1},{field:"ExchangesTotal",displayName:"Total",visible:!1},{field:"Redeliveries",displayName:"Redelivery",visible:!1},{field:"ExchangesInflight",displayName:"Inflight"},{field:"OldestInflightDuration",displayName:"Oldest Inflight Time",visible:!1},{field:"MeanProcessingTime",displayName:"Mean Time"
|
|
3275
|
|
-},{field:"MinProcessingTime",displayName:"Min Time"},{field:"MaxProcessingTime",displayName:"Max Time"},{field:"TotalProcessingTime",displayName:"Total Time",visible:!1},{field:"DeltaProcessingTime",displayName:"Delta Time",visible:!1},{field:"LastProcessingTime",displayName:"Last Time",visible:!1},{field:"LastExchangeCompletedTimestamp",displayName:"Last completed",visible:!1},{field:"LastExchangeFailedTimestamp",displayName:"Last failed",visible:!1},{field:"ExternalRedeliveries",displayName:"External Redelivery",visible:!1},{field:"StartedRoutes",displayName:"Started Routes"},{field:"TotalRoutes",displayName:"Total Routes"}],g[e.jmxDomain+"/routes/folder"]=[f,{field:"CamelId",displayName:"Context"},{field:"RouteId",displayName:"Route"},{field:"ExchangesCompleted",displayName:"Completed"},{field:"ExchangesFailed",displayName:"Failed"},{field:"FailuresHandled",displayName:"Failed Handled",visible:!1},{field:"Redeliveries",displayName:"Redelivery",visible:!1},{field:"ExchangesTotal",displayName:"Total",visible:!1},{field:"ExchangesInflight",displayName:"Inflight"},{field:"OldestInflightDuration",displayName:"Oldest Inflight Time",visible:!1},{field:"MeanProcessingTime",displayName:"Mean Time"},{field:"MinProcessingTime",displayName:"Min Time"},{field:"MaxProcessingTime",displayName:"Max Time"},{field:"TotalProcessingTime",displayName:"Total Time",visible:!1},{field:"DeltaProcessingTime",displayName:"Delta Time",visible:!1},{field:"LastProcessingTime",displayName:"Last Time",visible:!1},{field:"LastExchangeCompletedTimestamp",displayName:"Last completed",visible:!1},{field:"LastExchangeFailedTimestamp",displayName:"Last failed",visible:!1},{field:"Redeliveries",displayName:"Redelivery",visible:!1},{field:"ExternalRedeliveries",displayName:"External Redelivery",visible:!1}],g[e.jmxDomain+"/processors/folder"]=[f,{field:"CamelId",displayName:"Context"},{field:"RouteId",displayName:"Route"},{field:"ProcessorId",displayName:"Processor"},{field:"ExchangesCompleted",displayName:"Completed"},{field:"ExchangesFailed",displayName:"Failed"},{field:"FailuresHandled",displayName:"Failed Handled",visible:!1},{field:"Redeliveries",displayName:"Redelivery",visible:!1},{field:"ExchangesTotal",displayName:"Total",visible:!1},{field:"ExchangesInflight",displayName:"Inflight"},{field:"OldestInflightDuration",displayName:"Oldest Inflight Time",visible:!1},{field:"MeanProcessingTime",displayName:"Mean Time"},{field:"MinProcessingTime",displayName:"Min Time"},{field:"MaxProcessingTime",displayName:"Max Time"},{field:"TotalProcessingTime",displayName:"Total Time",visible:!1},{field:"DeltaProcessingTime",displayName:"Delta Time",visible:!1},{field:"LastProcessingTime",displayName:"Last Time",visible:!1},{field:"LastExchangeCompletedTimestamp",displayName:"Last completed",visible:!1},{field:"LastExchangeFailedTimestamp",displayName:"Last failed",visible:!1},{field:"ExternalRedeliveries",displayName:"External Redelivery",visible:!1}],g[e.jmxDomain+"/components/folder"]=[f,{field:"CamelId",displayName:"Context"},{field:"ComponentName",displayName:"Name"}],g[e.jmxDomain+"/consumers/folder"]=[f,{field:"CamelId",displayName:"Context"},{field:"RouteId",displayName:"Route"},{field:"EndpointUri",displayName:"Endpoint URI",width:"**"},{field:"Suspended",displayName:"Suspended",resizable:!1},{field:"InflightExchanges",displayName:"Inflight"}],g[e.jmxDomain+"/producers/folder"]=[f,{field:"CamelId",displayName:"Context"},{field:"RouteId",displayName:"Route"},{field:"EndpointUri",displayName:"Endpoint URI",width:"**"},{field:"Suspended",displayName:"Suspended",resizable:!1}],g[e.jmxDomain+"/services/folder"]=[f,{field:"CamelId",displayName:"Context"},{field:"RouteId",displayName:"Route"},{field:"Suspended",displayName:"Suspended",resizable:!1},{field:"SupportsSuspended",displayName:"Can Suspend",resizable:!1}],g[e.jmxDomain+"/endpoints/folder"]=[f,{field:"CamelId",displayName:"Context"},{field:"EndpointUri",displayName:"Endpoint URI",width:"***"},{field:"Singleton",displayName:"Singleton",resizable:!1}],g[e.jmxDomain+"/threadpools/folder"]=[{field:"Id",displayName:"Id",width:"**"},{field:"ActiveCount",displayName:"Active"},{field:"PoolSize",displayName:"Pool Size"},{field:"CorePoolSize",displayName:"Core Pool Size"},{field:"TaskQueueSize",displayName:"Task Queue Size"},{field:"TaskCount",displayName:"Task"},{field:"CompletedTaskCount",displayName:"Completed Task"}],g[e.jmxDomain+"/errorhandlers/folder"]=[{field:"CamelId",displayName:"Context"},{field:"DeadLetterChannel",displayName:"Dead Letter"},{field:"DeadLetterChannelEndpointUri",displayName:"Endpoint URI",width:"**",resizable:!0},{field:"MaximumRedeliveries",displayName:"Max Redeliveries"},{field:"RedeliveryDelay",displayName:"Redelivery Delay"},{field:"MaximumRedeliveryDelay",displayName:"Max Redeliveries Delay"}];var m="/jmx/attributes?main-tab=camel&sub-tab=camel-attributes",v=t.builder(),y=v.id("camel").title(function(){return"Camel"}).defaultPage({rank:20,isValid:function(t,n){var i="CamelDefaultPage";r.addNamedTreePostProcessor(i,function(o){r.removeNamedTreePostProcessor(i),r.treeContainsDomainAndProperties(e.jmxDomain)?t():n()})}}).href(function(){return m}).isValid(function(){return r.treeContainsDomainAndProperties(e.jmxDomain)}).build();y.tabs=Jmx.getNavItems(v,r,c,"camel"),y.tabs.push({id:"camel-route-diagram",title:function(){return'<i class="fa fa-sitemap"></i> Route Diagram'},tooltip:function(){return"View a diagram of the Camel routes"},show:function(){return(r.isRoute()||r.isRoutesFolder())&&r.hasInvokeRightsForName(e.getSelectionCamelContextMBean(r),"dumpRoutesAsXml")},isSelected:function(){return r.isLinkActive("camel/routes")},href:function(){return"/camel/routes"+r.hash()},index:-2}),y.tabs.push({id:"camel-route-source",title:function(){return'<i class=" fa fa-file-code-o"></i> Source'},tooltip:function(){return"View the source of the Camel routes"},show:function(){return!r.isEndpointsFolder()&&!r.isEndpoint()&&(r.isRoute()||r.isRoutesFolder())&&r.hasInvokeRightsForName(e.getSelectionCamelContextMBean(r),"dumpRoutesAsXml")},isSelected:function(){return r.isLinkActive("camel/source")},href:function(){return"/camel/source"+r.hash()}}),y.tabs.push({id:"camel-route-properties",title:function(){return'<i class=" fa fa-edit"></i> Properties'},tooltip:function(){return"View the pattern properties"},show:function(){return e.getSelectedRouteNode(r)},href:function(){return"/camel/properties"+r.hash()}}),y.tabs.push({id:"camel-endpoint-properties",title:function(){return'<i class="fa fa-list"></i> Properties'},tooltip:function(){return"Show the endpoint properties"},show:function(){return r.isEndpoint()&&e.isCamelVersionEQGT(2,15,r,o)&&r.hasInvokeRights(r.selection,"explainEndpointJson")},href:function(){return"/camel/propertiesEndpoint"+r.hash()}}),y.tabs.push({id:"camel-component-properties",title:function(){return'<i class="fa fa-list"></i> Properties'},tooltip:function(){return"Show the component properties"},show:function(){return r.isComponent()&&e.isCamelVersionEQGT(2,15,r,o)&&r.hasInvokeRights(r.selection,"explainComponentJson")},href:function(){return"/camel/propertiesComponent"+r.hash()}}),y.tabs.push({id:"camel-inflight-exchanges",title:function(){return'<i class="fa fa-bar-chart"></i> Inflight Exchanges'},tooltip:function(){return"View the entire JVMs Camel inflight exchanges"},show:function(){return!r.isEndpointsFolder()&&!r.isEndpoint()&&!r.isComponentsFolder()&&!r.isComponent()&&(r.isCamelContext()||r.isRoutesFolder()||r.isRoute())&&e.isCamelVersionEQGT(2,15,r,o)&&r.hasInvokeRightsForName(e.getSelectionCamelInflightRepository(r),"browse")},href:function(){return"/camel/inflight"+r.hash()}}),y.tabs.push({id:"camel-route-metrics",title:function(){return'<i class="fa fa-bar-chart"></i> Route Metrics'},tooltip:function(){return"View the entire JVMs Camel route metrics"},show:function(){return!r.isEndpointsFolder()&&!r.isEndpoint()&&(r.isCamelContext()||r.isRoutesFolder())&&e.isCamelVersionEQGT(2,14,r,o)&&e.getSelectionCamelRouteMetrics(r)&&r.hasInvokeRightsForName(e.getSelectionCamelRouteMetrics(r),"dumpStatisticsAsJson")},href:function(){return"/camel/routeMetrics"+r.hash()}}),y.tabs.push({id:"camel-rest-services",title:function(){return'<i class="fa fa-list"></i> Rest Services'},tooltip:function(){return"List all the REST services registered in the context"},show:function(){return!r.isEndpointsFolder()&&!r.isEndpoint()&&!r.isComponentsFolder()&&!r.isComponent()&&(r.isCamelContext()||r.isRoutesFolder())&&e.isCamelVersionEQGT(2,14,r,o)&&e.getSelectionCamelRestRegistry(r)&&e.hasRestServices(r,o)&&r.hasInvokeRightsForName(e.getSelectionCamelRestRegistry(r),"listRestServices")},href:function(){return"/camel/restRegistry"+r.hash()}}),y.tabs.push({id:"camel-endpoint-runtime-registry",title:function(){return'<i class="fa fa-list"></i> Endpoints (in/out)'},tooltip:function(){return"List all the incoming and outgoing endpoints in the context"},show:function(){return!r.isEndpointsFolder()&&!r.isEndpoint()&&!r.isComponentsFolder()&&!r.isComponent()&&(r.isCamelContext()||r.isRoutesFolder())&&e.isCamelVersionEQGT(2,16,r,o)&&e.getSelectionCamelEndpointRuntimeRegistry(r)&&r.hasInvokeRightsForName(e.getSelectionCamelEndpointRuntimeRegistry(r),"endpointStatistics")},href:function(){return"/camel/endpointRuntimeRegistry"+r.hash()}}),y.tabs.push({id:"camel-type-converters",title:function(){return'<i class="fa fa-list"></i> Type Converters'},tooltip:function(){return"List all the type converters registered in the context"},show:function(){return!r.isEndpointsFolder()&&!r.isEndpoint()&&!r.isComponentsFolder()&&!r.isComponent()&&(r.isCamelContext()||r.isRoutesFolder())&&e.isCamelVersionEQGT(2,13,r,o)&&r.hasInvokeRightsForName(e.getSelectionCamelTypeConverter(r),"listTypeConverters")},href:function(){return"/camel/typeConverter"+r.hash()}}),y.tabs.push({id:"camel-route-profile",title:function(){return'<i class="fa fa-bar-chart"></i> Profile'},tooltip:function(){return"Profile the messages flowing through the Camel route"},show:function(){return r.isRoute()&&e.getSelectionCamelTraceMBean(r)&&r.hasInvokeRightsForName(e.getSelectionCamelTraceMBean(r),"dumpAllTracedMessagesAsXml")},href:function(){return"/camel/profileRoute"+r.hash()}}),y.tabs.push({id:"camel-route-debug",title:function(){return'<i class="fa fa-stethoscope"></i> Debug'},tooltip:function(){return"Debug the Camel route"},show:function(){return r.isRoute()&&e.getSelectionCamelDebugMBean(r)&&r.hasInvokeRightsForName(e.getSelectionCamelDebugMBean(r),"getBreakpoints")},href:function(){return"/camel/debugRoute"+r.hash()}}),y.tabs.push({id:"camel-route-trace",title:function(){return'<i class="fa fa-envelope"></i> Trace'},tooltip:function(){return"Trace the messages flowing through the Camel route"},show:function(){return r.isRoute()&&e.getSelectionCamelTraceMBean(r)&&r.hasInvokeRightsForName(e.getSelectionCamelTraceMBean(r),"dumpAllTracedMessagesAsXml")},href:function(){return"/camel/traceRoute"+r.hash()}}),y.tabs.push({id:"camel-endpoint-browser",title:function(){return'<i class="fa fa-envelope"></i> Browse'},tooltip:function(){return"Browse the messages on the endpoint"},show:function(){return r.isEndpoint()&&r.hasInvokeRights(r.selection,"browseAllMessagesAsXml")},href:function(){return"/camel/browseEndpoint"+r.hash()}}),y.tabs.push({id:"camel-endpoint-send",title:function(){return'<i class="fa fa-pencil"></i> Send'},show:function(){return r.isEndpoint()&&r.hasInvokeRights(r.selection,"org.apache.camel"===r.selection.domain?"sendBodyAndHeaders":"sendTextMessage")},href:function(){return"/camel/sendMessage"+r.hash()}}),y.tabs.push({id:"camel-endpoint-create",title:function(){return'<i class="fa fa-plus"></i> Endpoint'},tooltip:function(){return"Create a new endpoint"},show:function(){return r.isEndpointsFolder()&&r.hasInvokeRights(r.selection,"createEndpoint")},href:function(){return"/camel/createEndpoint"+r.hash()}}),t.add(y),r.addNamedTreePostProcessor("camel",function(t){var n=[],i=e.jmxDomain;if(t){var r=new Folder("Camel Contexts");r.addClass="org-apache-camel-context-folder",r.children=n,r.typeName="context",r.key="camelContexts",r.domain=i;var o=t.get(i);o&&(angular.forEach(o.children,function(t,o){var a=t.map;if(a){var s=a.context,l=a.routes,u=a.endpoints,c=a.components;if(s){var d=s.children[0];if(d){var p=d.title,h=!0;if(h){var f=new Folder(p);if(f.addClass="org-apache-camel-context",f.domain=i,f.objectName=d.objectName,f.entries=d.entries,f.typeName=d.typeName,f.key=d.key,f.version=d.version,l){var g=new Folder("Routes");g.addClass="org-apache-camel-routes-folder",g.parent=s,g.children=l.children,angular.forEach(g.children,function(e){return e.addClass="org-apache-camel-routes"}),f.children.push(g),g.typeName="routes",g.key=l.key,g.domain=l.domain}if(u){var m=new Folder("Endpoints");m.addClass="org-apache-camel-endpoints-folder",m.parent=s,m.children=u.children,angular.forEach(m.children,function(t){t.addClass="org-apache-camel-endpoints",e.getContextId(t)||(t.entries.context=d.entries.context)}),f.children.push(m),m.entries=d.entries,m.typeName="endpoints",m.key=u.key,m.domain=u.domain}if(c){var v=new Folder("Components");v.addClass="org-apache-camel-components-folder",v.parent=s,v.children=c.children,angular.forEach(v.children,function(t){t.addClass="org-apache-camel-components",e.getContextId(t)||(t.entries.context=d.entries.context)}),f.children.push(v),v.entries=d.entries,v.typeName="components",v.key=c.key,v.domain=c.domain}var y=new Folder("MBeans");angular.forEach(a,function(e,t){"context"!==t&&"routes"!==t&&"endpoints"!==t&&"components"!==t&&y.children.push(e)}),y.children.length>0&&(y.sortChildren(!1),f.children.push(y)),f.parent=r,n.push(f)}}}}}),o.children.splice(0,0,r))}})}]),hawtioPluginLoader.addModule(e.pluginName),hawtioPluginLoader.registerPreBootstrapTask(function(n){t.registerLazyLoadHandler(e.jmxDomain,function(t){return e.jmxDomain===t.domain&&"routes"===t.typeName?function(t,n,i){"routes"===n.typeName?e.processRouteXml(t,t.jolokia,n,function(t){t&&e.addRouteChildren(n,t),i()}):i()}:null}),n()})}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.AttributesToolBarController",["$scope","workspace","jolokia",function(t,n,i){t.deleteDialog=!1,t.start=function(){t.invokeSelectedMBeans(function(t){return e.isState(t,"suspend")?"resume()":"start()"})},t.pause=function(){t.invokeSelectedMBeans("suspend()")},t.stop=function(){t.invokeSelectedMBeans("stop()",function(){n.removeAndSelectParentNode()})},t["delete"]=function(){t.invokeSelectedMBeans("remove()",function(){t.workspace.operationCounter+=1,Core.$apply(t)})},t.anySelectionHasState=function(n){var i=t.selectedItems||[];return i.length&&i.any(function(t){return e.isState(t,n)})},t.everySelectionHasState=function(n){var i=t.selectedItems||[];return i.length&&i.every(function(t){return e.isState(t,n)})}}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.BreadcrumbBarController",["$scope","$routeParams","workspace","jolokia",function(t,n,i,r){function o(){var n=[],r=e.getRootCamelFolder(i);return r&&angular.forEach(r.children,function(e){var i=e.title;if(i&&i!==t.contextId){var r=i,o=l(i,s());n.push({name:r,tooltip:"Camel Context",link:o})}}),n}function a(e){var t=[];return angular.forEach(["endpoints","routes"],function(n){if(n&&n!==s()){var i=l(e,n);t.push({name:n,tooltip:"Entity inside a Camel Context",link:i})}}),t}function s(){var e=Core.pathGet(t,["breadcrumbs","childEntity"]);return e||f}function l(t,n){var i=u(t,n),r=i.length>0?i[0].link:e.linkToBrowseEndpointFullScreen(t,"noEndpoints");return r}function u(e,t){return"endpoints"===t?c(e):d(e)}function c(t){var n=[],r=e.getCamelContextFolder(i,t);if(r){var o=(r.children||[]).find(function(e){return"endpoints"===e.title});o&&angular.forEach(o.children,function(i){var r=i?i.entries:null;if(r){var o=r.name;if(o){var a=h(o),s=e.linkToBrowseEndpointFullScreen(t,o);n.push({contextId:t,path:o,name:a,tooltip:"Endpoint",link:s})}}})}return n}function d(t){var n=[],r=e.getCamelContextFolder(i,t);if(r){var o=(r.children||[]).find(function(e){return"routes"===e.title});o&&angular.forEach(o.children,function(i){var r=i?i.entries:null;if(r){var o=r.name;if(o){var a=h(o),s=e.linkToRouteDiagramFullScreen(t,o);n.push({contextId:t,path:o,name:a,tooltip:"Camel Route",link:s})}}})}return n}function p(){var n=null;if(t.contextId){var r=null,o=null;t.endpointPath?(o="browseEndpoint",r=i.findMBeanWithProperties(e.jmxDomain,{context:t.contextId,type:"endpoints",name:t.endpointPath})):t.routeId&&(o="routes",r=i.findMBeanWithProperties(e.jmxDomain,{context:t.contextId,type:"routes",name:t.routeId}));var a=r?r.key:null;a&&o&&(n="#/camel/"+o+"?tab=camel&nid="+a)}return n}function h(e){return e?Core.trimQuotes(e):e}t.workspace=i,null!=n&&(t.contextId=n.contextId,t.endpointPath=n.endpointPath,t.endpointName=h(t.endpointPath),t.routeId=n.routeId),t.treeViewLink=p();var f=t.endpointPath?"endpoints":"routes",g={endpoints:"Camel Endpoint",routes:"Camel Route"};t.breadcrumbs=[{name:t.contextId,items:o(),tooltip:"Camel Context"},{name:f,items:a(t.contextId),tooltip:"Entity inside a Camel Context"},{name:t.endpointName||h(t.routeId),items:u(t.contextId,s()),tooltip:g[f]}]}])}(Camel||(Camel={}));var Camel;!function(e){e.BrowseEndpointController=e._module.controller("Camel.BrowseEndpointController",["$scope","$routeParams","workspace","jolokia",function(t,n,i,r){function o(){}function a(){t.messageDialog&&t.messageDialog.close(),t.gridOptions.selectedItems.splice(0),Core.notification("success",t.message),setTimeout(s,50)}function s(){var n=null;if(t.contextId&&t.endpointPath){var o=i.findMBeanWithProperties(e.jmxDomain,{context:t.contextId,type:"endpoints",name:t.endpointPath});o&&(n=o.objectName)}if(n||(n=i.getSelectedMBeanName()),n){e.log.info("MBean: "+n);var a=Core.onSuccess(l);r.execute(n,"browseAllMessagesAsXml(java.lang.Boolean)",!0,a)}}function l(n){var i=[];if(angular.isString(n)){var r=$.parseXML(n),o=$(r).find("message");o.each(function(n,r){var o=e.createMessageFromXml(r);o.openMessageDialog=t.openMessageDialog,i.push(o)})}t.messages=i,Core.$apply(t)}t.workspace=i,t.forwardDialog=new UI.Dialog,t.showMessageDetails=!1,t.mode="text",t.gridOptions=e.createBrowseGridOptions(),t.contextId=n.contextId,t.endpointPath=n.endpointPath,t.isJmxTab=!n.contextId||!n.endpointPath,t.$watch("workspace.selection",function(){t.isJmxTab&&i.moveIfViewInvalid()||s()}),t.openMessageDialog=function(e){ActiveMQ.selectCurrentMessage(e,"id",t),t.row&&(t.mode=CodeEditor.detectTextFormat(t.row.body),t.showMessageDetails=!0)},ActiveMQ.decorate(t),t.forwardMessagesAndCloseForwardDialog=function(){var n=e.getSelectionCamelContextMBean(i),s=t.gridOptions.selectedItems,l=t.endpointUri;n&&l&&s&&s.length&&(r.execute(n,"createEndpoint(java.lang.String)",l,Core.onSuccess(o)),t.message="Forwarded "+Core.maybePlural(s.length,"message to "+l),angular.forEach(s,function(e,t){var i=t+1<s.length?o:a,u=e.body,c=e.headers;r.execute(n,"sendBodyAndHeaders(java.lang.String, java.lang.Object, java.util.Map)",l,u,c,Core.onSuccess(i))})),t.forwardDialog.close()},t.endpointUris=function(){var t=e.getSelectionCamelContextEndpoints(i);return t?t.children.map(function(e){return e.title}):[]},t.refresh=s}])}(Camel||(Camel={}));var Camel;!function(e){e.camelHeaderSchema={definitions:{headers:{properties:{CamelAuthentication:{type:"java.lang.String"},CamelAuthenticationFailurePolicyId:{type:"java.lang.String"},CamelAcceptContentType:{type:"java.lang.String"},CamelAggregatedSize:{type:"java.lang.String"},CamelAggregatedTimeout:{type:"java.lang.String"},CamelAggregatedCompletedBy:{type:"java.lang.String"},CamelAggregatedCorrelationKey:{type:"java.lang.String"},CamelAggregationStrategy:{type:"java.lang.String"},CamelAggregationCompleteAllGroups:{type:"java.lang.String"},CamelAggregationCompleteAllGroupsInclusive:{type:"java.lang.String"},CamelAsyncWait:{type:"java.lang.String"},CamelBatchIndex:{type:"java.lang.String"},CamelBatchSize:{type:"java.lang.String"},CamelBatchComplete:{type:"java.lang.String"},CamelBeanMethodName:{type:"java.lang.String"},CamelBeanMultiParameterArray:{type:"java.lang.String"},CamelBinding:{type:"java.lang.String"},breadcrumbId:{type:"java.lang.String"},CamelCharsetName:{type:"java.lang.String"},CamelCreatedTimestamp:{type:"java.lang.String"},"Content-Encoding":{type:"java.lang.String"},"Content-Length":{type:"java.lang.String"},"Content-Type":{type:"java.lang.String"},CamelCorrelationId:{type:"java.lang.String"},CamelDataSetIndex:{type:"java.lang.String"},"org.apache.camel.default.charset":{type:"java.lang.String"},CamelDestinationOverrideUrl:{type:"java.lang.String"},CamelDisableHttpStreamCache:{type:"java.lang.String"},CamelDuplicateMessage:{type:"java.lang.String"},CamelExceptionCaught:{type:"java.lang.String"},CamelExceptionHandled:{type:"java.lang.String"},CamelEvaluateExpressionResult:{type:"java.lang.String"},CamelErrorHandlerHandled:{type:"java.lang.String"},CamelExternalRedelivered:{type:"java.lang.String"},CamelFailureHandled:{type:"java.lang.String"},CamelFailureEndpoint:{type:"java.lang.String"},CamelFailureRouteId:{type:"java.lang.String"},CamelFilterNonXmlChars:{type:"java.lang.String"},CamelFileLocalWorkPath:{type:"java.lang.String"},CamelFileName:{type:"java.lang.String"},CamelFileNameOnly:{type:"java.lang.String"},CamelFileNameProduced:{type:"java.lang.String"},CamelFileNameConsumed:{type:"java.lang.String"},CamelFilePath:{type:"java.lang.String"},CamelFileParent:{type:"java.lang.String"},CamelFileLastModified:{type:"java.lang.String"},CamelFileLength:{type:"java.lang.String"},CamelFilterMatched:{type:"java.lang.String"},CamelFileLockFileAcquired:{type:"java.lang.String"},CamelFileLockFileName:{type:"java.lang.String"},CamelGroupedExchange:{type:"java.lang.String"},CamelHttpBaseUri:{type:"java.lang.String"},CamelHttpCharacterEncoding:{type:"java.lang.String"},CamelHttpMethod:{type:"java.lang.String"},CamelHttpPath:{type:"java.lang.String"},CamelHttpProtocolVersion:{type:"java.lang.String"},CamelHttpQuery:{type:"java.lang.String"},CamelHttpResponseCode:{type:"java.lang.String"},CamelHttpUri:{type:"java.lang.String"},CamelHttpUrl:{type:"java.lang.String"},CamelHttpChunked:{type:"java.lang.String"},CamelHttpServletRequest:{type:"java.lang.String"},CamelHttpServletResponse:{type:"java.lang.String"},CamelInterceptedEndpoint:{type:"java.lang.String"},CamelInterceptSendToEndpointWhenMatched:{type:"java.lang.String"},CamelLanguageScript:{type:"java.lang.String"},CamelLogDebugBodyMaxChars:{type:"java.lang.String"},CamelLogDebugStreams:{type:"java.lang.String"},CamelLoopIndex:{type:"java.lang.String"},CamelLoopSize:{type:"java.lang.String"},CamelMaximumCachePoolSize:{type:"java.lang.String"},CamelMaximumEndpointCacheSize:{type:"java.lang.String"},CamelMessageHistory:{type:"java.lang.String"},CamelMulticastIndex:{type:"java.lang.String"},CamelMulticastComplete:{type:"java.lang.String"},CamelNotifyEvent:{type:"java.lang.String"},CamelOnCompletion:{type:"java.lang.String"},CamelOverruleFileName:{type:"java.lang.String"},CamelParentUnitOfWork:{type:"java.lang.String"},CamelRecipientListEndpoint:{type:"java.lang.String"},CamelReceivedTimestamp:{type:"java.lang.String"},CamelRedelivered:{type:"java.lang.String"},CamelRedeliveryCounter:{type:"java.lang.String"},CamelRedeliveryMaxCounter:{type:"java.lang.String"},CamelRedeliveryExhausted:{type:"java.lang.String"},CamelRedeliveryDelay:{type:"java.lang.String"},CamelRollbackOnly:{type:"java.lang.String"},CamelRollbackOnlyLast:{type:"java.lang.String"},CamelRouteStop:{type:"java.lang.String"},CamelSoapAction:{type:"java.lang.String"},CamelSkipGzipEncoding:{type:"java.lang.String"},CamelSlipEndpoint:{type:"java.lang.String"},CamelSplitIndex:{type:"java.lang.String"},CamelSplitComplete:{type:"java.lang.String"},CamelSplitSize:{type:"java.lang.String"},CamelTimerCounter:{type:"java.lang.String"},CamelTimerFiredTime:{type:"java.lang.String"},CamelTimerName:{type:"java.lang.String"},CamelTimerPeriod:{type:"java.lang.String"},CamelTimerTime:{type:"java.lang.String"},CamelToEndpoint:{type:"java.lang.String"},CamelTraceEvent:{type:"java.lang.String"},CamelTraceEventNodeId:{type:"java.lang.String"},CamelTraceEventTimestamp:{type:"java.lang.String"},CamelTraceEventExchange:{type:"java.lang.String"},"Transfer-Encoding":{type:"java.lang.String"},CamelUnitOfWorkExhausted:{type:"java.lang.String"},CamelUnitOfWorkProcessSync:{type:"java.lang.String"},CamelXsltFileName:{type:"java.lang.String"}}}}}}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.DebugRouteController",["$scope","$element","workspace","jolokia","localStorage","documentBase",function(t,n,i,r,o,a){function s(){var t=g();if(t){var n=x();e.highlightSelectedNode(n,t)}else e.highlightSelectedNode(n,null)}function l(){t.debugging=!1;var n=e.getSelectionCamelDebugMBean(i);n&&(t.debugging=r.getAttribute(n,"Enabled",Core.onSuccess(null)),t.debugging?(r.execute(n,"getBreakpoints",Core.onSuccess(v)),t.graphView="plugins/camel/html/routes.html",Core.register(r,t,{type:"exec",mbean:n,operation:"getDebugCounter"},Core.onSuccess(u))):t.graphView=null)}function u(e){var n=e.value;n&&n!==t.breakpointCounter&&(t.breakpointCounter=n,c())}function c(){var t=e.getSelectionCamelDebugMBean(i);t&&(console.log("getting suspended breakpoints!"),r.execute(t,"getSuspendedBreakpointNodeIds",Core.onSuccess(d)))}function d(n){var o=e.getSelectionCamelDebugMBean(i);t.suspendedBreakpoints=n,t.stopped=n&&n.length;var a=g();o&&a&&(r.execute(o,"dumpTracedMessagesAsXml",a,Core.onSuccess(p)),t.selectedDiagramNodeId=a)}function p(n,i){if(_.debug("onMessage -> "+n),t.messages=[],n){var r=n;if(angular.isString(r)){var o=$.parseXML(r),a=$(o).find("fabricTracerEventMessage");a&&a.length||(a=$(o).find("backlogTracerEventMessage")),a.each(function(n,i){var r=e.createMessageFromXml(i),o=$(i).find("toNode").text();o&&(r.toNode=o),r.openMessageDialog=t.openMessageDialog,t.messages.push(r)})}}else _.warn("WARNING: dumpTracedMessagesAsXml() returned no results!");h(),k(),s(),_.debug("has messages "+t.messages.length+" selected row "+t.row+" index "+t.rowIndex),Core.$apply(t)}function h(){if(t.messages.length>0){t.row=t.messages[0];var e=t.row.body;t.mode=angular.isString(e)?CodeEditor.detectTextFormat(e):"text","javascript"==t.mode&&(t.mode="text")}else t.row={headers:{},body:"",bodyType:""},t.mode="text"}function f(){t.messages=[],t.suspendedBreakpoints=[],t.stopped=!1,h(),k(),s(),Core.$apply(t)}function g(){var e=null,n=t.suspendedBreakpoints;return n&&n.length&&(e=n[0],n.length>1&&m(t.selectedDiagramNodeId)&&(e=t.selectedDiagramNodeId)),e}function m(e){return w(t.suspendedBreakpoints,e)}function v(e){t.breakpoints=e,b();var n=x();n.length&&k(n),Core.$apply(t)}function y(e){return w(t.breakpoints,e)}function b(){t.hasBreakpoint=y(t.selectedDiagramNodeId)}function w(e,t){return t&&e&&e.some(t)}function x(){var e=d3.select("svg");return e.selectAll("g .node")}function k(e){void 0===e&&(e=x()),e.each(function(e){var t=e.cid,n=d3.select(this),i=n.selectAll("image.breakpoint"),r=m(t),o=y(t);if(o||r){var a=r?E:T;i.length&&i[0].length?i.attr("xlink:href",function(e){return a}):n.append("image").attr("xlink:href",function(e){return a}).attr("class","breakpoint").attr("x",-12).attr("y",-20).attr("height",24).attr("width",24)}else i.remove()})}function C(e){l(),Core.$apply(t)}function S(t){var n=e.getSelectionCamelDebugMBean(i);if(n){var a=t?"enableDebugger":"disableDebugger",s=e.maximumTraceOrDebugBodyLength(o),l=e.traceOrDebugIncludeStreams(o);r.setAttribute(n,"BodyMaxChars",s),r.setAttribute(n,"BodyIncludeStreams",l),r.setAttribute(n,"BodyIncludeFiles",l),r.execute(n,a,Core.onSuccess(C))}}var _=Logger.get("CamelDebugger");t.debugging=!1,t.stopped=!1,t.ignoreRouteXmlNode=!0,t.messages=[],t.mode="text",t.showMessageDetails=!0,t.startDebugging=function(){_.info("Start debugging"),S(!0)},t.stopDebugging=function(){_.info("Stop debugging"),S(!1)},t.$on("$routeChangeSuccess",function(e,t,n){setTimeout(l,50)}),t.$on("camel.diagram.selectedNodeId",function(e,n){t.selectedDiagramNodeId=n,b()}),t.$on("camel.diagram.layoutComplete",function(e,i){k(),$(n).find("g.node").dblclick(function(e){var n=this.getAttribute("data-cid");t.toggleBreakpoint(n)})}),t.$watch("workspace.selection",function(){i.moveIfViewInvalid()||l()}),t.toggleBreakpoint=function(t){_.info("Toggle breakpoint");var n=e.getSelectionCamelDebugMBean(i);if(n&&t){var o=y(t)?"removeBreakpoint":"addBreakpoint";r.execute(n,o,t,Core.onSuccess(C))}},t.addBreakpoint=function(){_.info("Add breakpoint");var n=e.getSelectionCamelDebugMBean(i);n&&t.selectedDiagramNodeId&&r.execute(n,"addBreakpoint",t.selectedDiagramNodeId,Core.onSuccess(C))},t.removeBreakpoint=function(){_.info("Remove breakpoint");var n=e.getSelectionCamelDebugMBean(i);n&&t.selectedDiagramNodeId&&r.execute(n,"removeBreakpoint",t.selectedDiagramNodeId,Core.onSuccess(C))},t.resume=function(){_.info("Resume");var t=e.getSelectionCamelDebugMBean(i);t&&r.execute(t,"resumeAll",Core.onSuccess(f))},t.suspend=function(){_.info("Suspend");var t=e.getSelectionCamelDebugMBean(i);t&&r.execute(t,"suspendAll",Core.onSuccess(f))},t.step=function(){_.info("Step");var t=e.getSelectionCamelDebugMBean(i),n=g();t&&n&&r.execute(t,"stepBreakpoint(java.lang.String)",n,Core.onSuccess(f))};var T=UrlHelpers.join(a,"/img/icons/camel/breakpoint.gif"),E=UrlHelpers.join(a,"/img/icons/camel/breakpoint-suspended.gif")}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.EndpointController",["$scope","$location","localStorage","workspace","jolokia",function(t,n,i,r,o){function a(){t.endpointName="",t.workspace.operationCounter+=1,Core.$apply(t),Core.notification("success",t.message)}function s(){if(r.selection){var e=Core.pathGet(r,["selection","parent"]);e&&t.workspace.updateSelectionNode(e)}t.workspace.operationCounter+=1,Core.$apply(t),Core.notification("success",t.message)}e.initEndpointChooserScope(t,n,i,r,o),t.workspace=r,t.message="",t.createEndpoint=function(n){var i=r.jolokia;if(i){var o=e.getSelectionCamelContextMBean(r);if(o){t.message="Creating endpoint "+n;var s="createEndpoint(java.lang.String)";i.execute(o,s,n,Core.onSuccess(a))}else Core.notification("error","Could not find the CamelContext MBean!")}},t.createEndpointFromData=function(){if(t.selectedComponentName&&t.endpointPath){var e=t.selectedComponentName+"://"+t.endpointPath;console.log("Have endpoint data "+JSON.stringify(t.endpointParameters));var n="";angular.forEach(t.endpointParameters,function(e,t){var i=n?"&":"";n+=i+t+"="+e}),n&&(e+="?"+n),t.createEndpoint(e)}},t.deleteEndpoint=function(){var e=r.jolokia,n=r.selection,i=n.entries;if(n&&e&&i){var o=n.domain,a=i.BrokerName,l=i.Destination,u="Topic"!==i.Type;if(o&&a){var c=""+o+":BrokerName="+a+",Type=Broker";t.message="Deleting "+(u?"queue":"topic")+" "+l;var d="removeEndpoint(java.lang.String)";e.execute(c,d,l,Core.onSuccess(s))}}}}])}(Camel||(Camel={}));var Camel;!function(e){function t(t){var n=e.getEndpointConfig(t,null),r=Core.pathGet(n,["icon"]);if(!r){var o=i(t);r=Core.pathGet(o,["endpointIcon"])}if(r=r||e.endpointIcon,HawtioCore.injector){var a=HawtioCore.injector.get("documentBase");r=UrlHelpers.join(a,r)}return r}function n(t,n){var i=e.endpointConfigurations[t];return i||(i={},e.endpointConfigurations[t]=i),i.label||(i.label=t),i.icon||(i.icon=Core.pathGet(n,["endpointIcon"])||e.endpointIcon),i.category||(i.category=n),i}function i(t){return e.endpointToCategory[t]||e.endpointCategories.core}function r(){var t=e._apacheCamelModel,n=t.definitions;return n&&angular.forEach(a,function(e,t){var i=n[t];i&&(i.tabs||(i.tabs=e))}),t}function o(t,n,i,r,o){function a(n){t.componentNames=n,e.log.info("onComponents: "+n),t.hasComponentNames=t.componentNames?!0:!1,Core.$apply(t)}function s(e){if(e)try{var n=JSON.parse(e),i=t.selectedComponentName;l(i,n),t.endpointSchema=n,t.schema.definitions[i]=n,t.loadedEndpointSchema=i,Core.$apply(t)}catch(r){console.log("Failed to parse JSON "+r),console.log("JSON: "+e)}}
|
|
3276
|
|
-function l(t,n){console.log("======== configuring schema for "+t);var i=e.endpointForms[t];i&&n&&i.tabs&&(n.tabs=i.tabs)}function u(){var o=t.profileWorkspace;if(!o){var a=t.jolokia;a&&(o=Core.createRemoteWorkspace(a,n,i),t.profileWorkspace=o)}o||(e.log.info("No profileWorkspace found so defaulting it to workspace for now"),o=r);var s,l,u=t.selectedComponentName;angular.isDefined(t.camelSelectionDetails)&&(s=t.camelSelectionDetails.selectedCamelContextId,l=t.camelSelectionDetails.selectedRouteId),console.log("==== componentName "+u+" selectedCamelContextId: "+s+" selectedRouteId: "+l);var c=e.camelContextMBeansById(o);if(s){var d=Core.pathGet(c,[s,"mbean"]);if(d)return d}if(l){var p=e.camelContextMBeansByRouteId(o),d=Core.pathGet(p,[l,"mbean"]);if(d)return d}if(u){var p=e.camelContextMBeansByComponentName(o),d=Core.pathGet(p,[u,"mbean"]);if(d)return d}var h=null;return angular.forEach(c,function(e,t){var n=e.mbean;!h&&n&&(h=n)}),h}t.selectedComponentName=null,t.endpointParameters={},t.endpointPath="",t.schema={definitions:{}},t.jolokia=o;var c={silent:!0};t.$watch("workspace.selection",function(){t.loadEndpointNames()}),t.$watch("selectedComponentName",function(){t.selectedComponentName!==t.loadedComponentName&&(t.endpointParameters={},t.loadEndpointSchema(t.selectedComponentName),t.loadedComponentName=t.selectedComponentName)}),t.endpointCompletions=function(e){var n=null,i=u(),r=t.selectedComponentName,o={};return i&&r&&e&&(n=t.jolokia.execute(i,"completeEndpointPath",r,o,e,Core.onSuccess(null,c))),n||[]},t.loadEndpointNames=function(){t.componentNames=null;var e=u();e?t.jolokia.execute(e,"findComponentNames",Core.onSuccess(a,{silent:!0})):console.log("WARNING: No camel context mbean so cannot load component names")},t.loadEndpointSchema=function(e){var n=u();n&&e&&e!==t.loadedEndpointSchema&&(t.selectedComponentName=e,t.jolokia.execute(n,"componentParameterJsonSchema",e,Core.onSuccess(s,c)))}}e.endpointCategories={bigdata:{label:"Big Data",endpoints:["hdfs","hbase","lucene","solr"],endpointIcon:"img/icons/camel/endpointRepository24.png"},database:{label:"Database",endpoints:["couchdb","elasticsearch","hbase","jdbc","jpa","hibernate","mongodb","mybatis","sql"],endpointIcon:"img/icons/camel/endpointRepository24.png"},cloud:{label:"Cloud",endpoints:["aws-cw","aws-ddb","aws-sdb","aws-ses","aws-sns","aws-sqs","aws-s3","gauth","ghhtp","glogin","gtask","jclouds"]},core:{label:"Core",endpoints:["bean","direct","seda"]},messaging:{label:"Messaging",endpoints:["jms","activemq","amqp","cometd","cometds","mqtt","netty","vertx","websocket"],endpointIcon:"img/icons/camel/endpointQueue24.png"},mobile:{label:"Mobile",endpoints:["apns"]},sass:{label:"SaaS",endpoints:["salesforce","sap-netweaver"]},social:{label:"Social",endpoints:["atom","facebook","irc","ircs","rss","smpp","twitter","weather"]},storage:{label:"Storage",endpointIcon:"img/icons/camel/endpointFolder24.png",endpoints:["file","ftp","sftp","scp","jsch"]},template:{label:"Templating",endpoints:["freemarker","velocity","xquery","xslt","scalate","string-template"]}},e.endpointToCategory={},e.endpointIcon="img/icons/camel/endpoint24.png",e.endpointConfigurations={drools:{icon:"img/icons/camel/endpointQueue24.png"},quartz:{icon:"img/icons/camel/endpointTimer24.png"},facebook:{icon:"img/icons/camel/endpoints/facebook24.jpg"},salesforce:{icon:"img/icons/camel/endpoints/salesForce24.png"},sap:{icon:"img/icons/camel/endpoints/SAPe24.png"},"sap-netweaver":{icon:"img/icons/camel/endpoints/SAPNetweaver24.jpg"},timer:{icon:"img/icons/camel/endpointTimer24.png"},twitter:{icon:"img/icons/camel/endpoints/twitter24.png"},weather:{icon:"img/icons/camel/endpoints/weather24.jpg"}},e.endpointForms={file:{tabs:{Options:["*"]}},activemq:{tabs:{Connection:["clientId","transacted","transactedInOut","transactionName","transactionTimeout"],Producer:["timeToLive","priority","allowNullBody","pubSubNoLocal","preserveMessageQos"],Consumer:["concurrentConsumers","acknowledgementModeName","selector","receiveTimeout"],Reply:["replyToDestination","replyToDeliveryPersistent","replyToCacheLevelName","replyToDestinationSelectorName"],Options:["*"]}}},e.endpointForms.jms=e.endpointForms.activemq,angular.forEach(e.endpointCategories,function(t,n){t.id=n,angular.forEach(t.endpoints,function(n){e.endpointToCategory[n]=t})});var a={route:{Overview:["id","description"],Advanced:["*"]}};e.getEndpointIcon=t,e.getEndpointConfig=n,e.getEndpointCategory=i,e.getConfiguredCamelModel=r,e.initEndpointChooserScope=o}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.EndpointRuntimeRegistryController",["$scope","$location","workspace","jolokia",function(t,n,i,r){function o(e){var n=e.value;if(n){var i=[];for(var r in n){var o=n[r];i.push({url:o.url,routeId:o.routeId,direction:o.direction,"static":o["static"],dynamic:o.dynamic,hits:o.hits})}i=i.sortBy("url"),t.data=i,t.selectedMBean=e.request.mbean}else t.selectedMBean="true";Core.$apply(t)}function a(){console.log("Loading EndpointRuntimeRegistry data...");var t=e.getSelectionCamelEndpointRuntimeRegistry(i);t&&r.request({type:"exec",mbean:t,operation:"endpointStatistics"},Core.onSuccess(o))}t.data=[],t.selectedMBean=null,t.mbeanAttributes={};var s=[{field:"url",displayName:"Url",cellFilter:null,width:"*",resizable:!0},{field:"routeId",displayName:"Route Id",cellFilter:null,width:"*",resizable:!0},{field:"direction",displayName:"Direction",cellFilter:null,width:"*",resizable:!0},{field:"static",displayName:"Static",cellFilter:null,width:"*",resizable:!0},{field:"dynamic",displayName:"Dynamic",cellFilter:null,width:"*",resizable:!0},{field:"hits",displayName:"Hits",cellFilter:null,width:"*",resizable:!0}];t.gridOptions={data:"data",displayFooter:!0,displaySelectionCheckbox:!1,canSelectRows:!1,enableSorting:!0,columnDefs:s,selectedItems:[],filterOptions:{filterText:""}},t.renderIcon=function(t){return e.iconClass(t)},a()}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.InflightController",["$scope","$location","workspace","jolokia",function(t,n,i,r){function o(e){var n=e.value;if(n){var i=[];for(var r in n){var o=n[r];i.push({exchangeId:o.exchangeId,routeId:o.routeId,nodeId:o.nodeId,duration:o.duration,elapsed:o.elapsed})}i=i.sortBy("exchangeId"),t.data=i,t.selectedMBean=e.request.mbean}else t.data=[];t.initDone="true",Core.$apply(t)}function a(){console.log("Loading inflight data...");var n=e.getSelectedRouteId(i);null!=n&&(t.gridOptions.filterOptions.filterText=n);var a=e.getSelectionCamelInflightRepository(i);if(a){var s={type:"exec",mbean:a,operation:"browse()"};Core.scopeStoreJolokiaHandle(t,r,r.register(o,s))}}t.data=[],t.initDone=!1,t.mbeanAttributes={};var s=[{field:"exchangeId",displayName:"Exchange Id",cellFilter:null,width:"*",resizable:!0},{field:"routeId",displayName:"Route Id",cellFilter:null,width:"*",resizable:!0},{field:"nodeId",displayName:"Node Id",cellFilter:null,width:"*",resizable:!0},{field:"duration",displayName:"Duration (ms)",cellFilter:null,width:"*",resizable:!0},{field:"elapsed",displayName:"Elapsed (ms)",cellFilter:null,width:"*",resizable:!0}];t.gridOptions={data:"data",displayFooter:!0,displaySelectionCheckbox:!1,canSelectRows:!1,enableSorting:!0,columnDefs:s,selectedItems:[],filterOptions:{filterText:""}},t.renderIcon=function(t){return e.iconClass(t)},a()}])}(Camel||(Camel={}));var Camel;!function(e){e.jmsHeaderSchema={definitions:{headers:{properties:{JMSCorrelationID:{type:"java.lang.String"},JMSDeliveryMode:{type:"string","enum":["PERSISTENT","NON_PERSISTENT"]},JMSDestination:{type:"javax.jms.Destination"},JMSExpiration:{type:"long"},JMSPriority:{type:"int"},JMSReplyTo:{type:"javax.jms.Destination"},JMSType:{type:"java.lang.String"},JMSXGroupId:{type:"java.lang.String"},AMQ_SCHEDULED_CRON:{type:"java.lang.String"},AMQ_SCHEDULED_DELAY:{type:"java.lang.String"},AMQ_SCHEDULED_PERIOD:{type:"java.lang.String"},AMQ_SCHEDULED_REPEAT:{type:"java.lang.String"}}},"javax.jms.Destination":{type:"java.lang.String"}}}}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.PreferencesController",["$scope","localStorage",function(t,n){var i={properties:{camelHideOptionDocumentation:{type:"boolean","default":e.defaultHideOptionDocumentation,description:"Whether to hide documentation in the properties view and Camel route editor"},camelHideOptionDefaultValue:{type:"boolean","default":e.defaultHideOptionDefaultValue,description:"Whether to hide options that are using a default value in the properties view"},camelHideOptionUnusedValue:{type:"boolean","default":e.defaultHideOptionUnusedValue,description:"Whether to hide unused/empty options in the properties view"},camelTraceOrDebugIncludeStreams:{type:"boolean","default":e.defaultCamelTraceOrDebugIncludeStreams,description:"Whether to include stream based message body when using the tracer and debugger"},camelMaximumTraceOrDebugBodyLength:{type:"number","default":e.defaultCamelMaximumTraceOrDebugBodyLength,description:"The maximum length of the body before its clipped when using the tracer and debugger"},camelMaximumLabelWidth:{type:"number",description:"The maximum length of a label in Camel diagrams before it is clipped"},camelIgnoreIdForLabel:{type:"boolean","default":!1,description:"If enabled then we will ignore the ID value when viewing a pattern in a Camel diagram; otherwise we will use the ID value as the label (the tooltip will show the actual detail)"},camelShowInflightCounter:{type:"boolean","default":!0,description:"Whether to show inflight counter in route diagram"},camelRouteMetricMaxSeconds:{type:"number",min:"1",max:"100",description:"The maximum value in seconds used by the route metrics duration and histogram charts"}}};t.entity=t,t.config=i,Core.initPreferenceScope(t,n,{camelIgnoreIdForLabel:{value:!1,converter:Core.parseBooleanValue},camelShowInflightCounter:{value:!0,converter:Core.parseBooleanValue},camelMaximumLabelWidth:{value:e.defaultMaximumLabelWidth,converter:parseInt},camelMaximumTraceOrDebugBodyLength:{value:e.defaultCamelMaximumTraceOrDebugBodyLength,converter:parseInt},camelTraceOrDebugIncludeStreams:{value:e.defaultCamelTraceOrDebugIncludeStreams,converter:Core.parseBooleanValue},camelRouteMetricMaxSeconds:{value:e.defaultCamelRouteMetricMaxSeconds,converter:parseInt},camelHideOptionDocumentation:{value:e.defaultHideOptionDocumentation,converter:Core.parseBooleanValue},camelHideOptionDefaultValue:{value:e.defaultHideOptionDefaultValue,converter:Core.parseBooleanValue},camelHideOptionUnusedValue:{value:e.defaultHideOptionUnusedValue,converter:Core.parseBooleanValue}})}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.ProfileRouteController",["$scope","$location","workspace","jolokia",function(t,n,i,r){function o(e){var n=[],i=e.value;if(angular.isString(i)){var r=$.parseXML(i),o=$(r).find("routeStat");o.each(function(e,t){var i={id:{},count:{},last:{},delta:{},mean:{},min:{},max:{},total:{},self:{}};i.id=t.getAttribute("id");var r=0;r+=+t.getAttribute("exchangesCompleted"),r+=+t.getAttribute("exchangesFailed"),i.count=r,i.last=t.getAttribute("lastProcessingTime");var o=t.getAttribute("deltaProcessingTime");o?i.delta=o:i.delta=0,i.mean=t.getAttribute("meanProcessingTime"),i.min=t.getAttribute("minProcessingTime"),i.max=t.getAttribute("maxProcessingTime"),i.total=t.getAttribute("totalProcessingTime"),i.self=t.getAttribute("selfProcessingTime"),n.push(i)});var a=$(r).find("processorStat");a.each(function(e,t){var i={id:{},count:{},last:{},delta:{},mean:{},min:{},max:{},total:{},self:{}};i.id=t.getAttribute("id");var r=0;r+=+t.getAttribute("exchangesCompleted"),r+=+t.getAttribute("exchangesFailed"),i.count=r,i.last=t.getAttribute("lastProcessingTime");var o=t.getAttribute("deltaProcessingTime");o?i.delta=o:i.delta=0,i.mean=t.getAttribute("meanProcessingTime"),i.min=t.getAttribute("minProcessingTime"),i.max=t.getAttribute("maxProcessingTime");var a=t.getAttribute("accumulatedProcessingTime");a?i.total=a:i.total="0",i.self=t.getAttribute("totalProcessingTime"),n.push(i)})}t.data=n,t.initDone=!0,Core.$apply(t)}function a(){console.log("Loading Camel route profile data...");var n=e.getSelectedRouteId(i),a=e.getSelectionRouteMBean(i,n);if(a){var s={type:"exec",mbean:a,operation:"dumpRouteStatsAsXml(boolean,boolean)",arguments:[!1,!0]};Core.scopeStoreJolokiaHandle(t,r,r.register(o,s))}}t.initDone=!1,t.data=[];var s=[{field:"id",displayName:"Id",cellFilter:null,width:"**",resizable:!0},{field:"count",displayName:"Count",cellFilter:null,width:"*",resizable:!0},{field:"last",displayName:"Last",cellFilter:null,width:"*",resizable:!0},{field:"delta",displayName:"Delta",cellFilter:null,width:"*",resizable:!0},{field:"mean",displayName:"Mean",cellFilter:null,width:"*",resizable:!0},{field:"min",displayName:"Min",cellFilter:null,width:"*",resizable:!0},{field:"max",displayName:"Max",cellFilter:null,width:"*",resizable:!0},{field:"total",displayName:"Total",cellFilter:null,width:"*",resizable:!0},{field:"self",displayName:"Self",cellFilter:null,width:"*",resizable:!0}];t.rowIcon=function(e){var n=t.icons[e];return n?n.img+" "+e:e},t.gridOptions={data:"data",displayFooter:!0,displaySelectionCheckbox:!1,canSelectRows:!1,enableSorting:!1,columnDefs:s,filterOptions:{filterText:""}},a()}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.PropertiesController",["$scope","workspace","localStorage","jolokia",function(t,n,i,r){function o(e){var n=Core.pathGet(t.model,["properties",e,"defaultValue"]);if(angular.isDefined(n)){var i=Core.pathGet(t.nodeData,e);if(angular.isDefined(i)){var r=i.toString();return 0===r.localeCompare(n)}}return!1}function a(e){var n=Core.pathGet(t.nodeData,e);return angular.isUndefined(n)||Core.isBlank(n)?!1:angular.isString(n)?!Core.isBlank(n):!0}function s(){var i=e.getSelectedRouteNode(n);if(t.nodeData=e.getRouteNodeJSON(i),i&&(t.model=e.getCamelSchema(i.nodeName),t.model)){l.enabledFor(Logger.DEBUG)&&(l.debug("Properties - data: "+JSON.stringify(t.nodeData,null," ")),l.debug("Properties - schema: "+JSON.stringify(t.model,null," ")));var r=[];t.model.group&&(r=t.model.group.split(",")),t.labels=r,t.nodeData=e.getRouteNodeJSON(i),t.icon=e.getRouteNodeIcon(i),t.viewTemplate="plugins/camel/html/nodePropertiesView.html",Core.$apply(t)}}var l=Logger.get("Camel");t.hideHelp=e.hideOptionDocumentation(i),t.hideUnused=e.hideOptionUnusedValue(i),t.hideDefault=e.hideOptionDefaultValue(i),t.viewTemplate=null,t.schema=e._apacheCamelModel,t.model=null,t.labels=[],t.nodeData=null,t.icon=null,t.$watch("hideHelp",function(e,t){e!==t&&s()}),t.$watch("hideUnused",function(e,t){e!==t&&s()}),t.$watch("hideDefault",function(e,t){e!==t&&s()}),t.$on("$routeChangeSuccess",function(e,t,n){setTimeout(s,50)}),t.$watch("workspace.selection",function(){n.moveIfViewInvalid()||s()}),t.showEntity=function(e){return t.hideDefault&&o(e)?!1:t.hideUnused&&!a(e)?!1:!0}}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.PropertiesComponentController",["$scope","workspace","localStorage","jolokia","documentBase",function(t,n,i,r,o){function a(e){var n=Core.pathGet(t.model,["properties",e,"defaultValue"]);if(angular.isDefined(n)){var i=Core.pathGet(t.nodeData,e);if(angular.isDefined(i)){var r=i.toString();return 0===r.localeCompare(n)}}return!1}function s(e){var n=Core.pathGet(t.nodeData,e);return angular.isUndefined(n)||Core.isBlank(n)?!1:angular.isString(n)?!Core.isBlank(n):!0}function l(){var i=e.getSelectionCamelContextMBean(n),o=null;if(o||(o=n.getSelectedMBeanName()),o&&i){var a=r.request({type:"read",mbean:o,attribute:["ComponentName"]}),s=a.value.ComponentName;if(s){t.componentName=s,c.info("Calling explainComponentJson for name: "+s);var l={type:"exec",mbean:i,operation:"explainComponentJson(java.lang.String,boolean)",arguments:[s,!0]};r.request(l,Core.onSuccess(u))}}}function u(e){c.debug("Populate data "+e);var n=e.value;if(n){t.model=JSON.parse(n),t.model.title=t.componentName,t.model.description=t.model.component.description,t.icon=UrlHelpers.join(o,"/img/icons/camel/endpoint24.png"),t.nodeData={},t.model.properties=t.model.componentProperties,angular.forEach(t.model.componentProperties,function(e,n){var i=e.value||e.defaultValue;angular.isDefined(i)&&null!==i&&(t.nodeData[n]=i),delete e.label});var i=[];t.model.component.label&&(i=t.model.component.label.split(",")),t.labels=i,t.viewTemplate="plugins/camel/html/nodePropertiesView.html",Core.$apply(t)}}var c=Logger.get("Camel");t.hideHelp=e.hideOptionDocumentation(i),t.hideUnused=e.hideOptionUnusedValue(i),t.hideDefault=e.hideOptionDefaultValue(i),t.viewTemplate=null,t.schema=null,t.model=null,t.labels=[],t.nodeData=null,t.icon=null,t.componentName=null,t.$watch("hideHelp",function(e,t){e!==t&&l()}),t.$watch("hideUnused",function(e,t){e!==t&&l()}),t.$watch("hideDefault",function(e,t){e!==t&&l()}),t.$on("$routeChangeSuccess",function(e,t,n){setTimeout(l,50)}),t.$watch("workspace.selection",function(){n.moveIfViewInvalid()||l()}),t.showEntity=function(e){return t.hideDefault&&a(e)?!1:t.hideUnused&&!s(e)?!1:!0}}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.PropertiesEndpointController",["$scope","workspace","localStorage","jolokia","documentBase",function(t,n,i,r,o){function a(e){var n=Core.pathGet(t.model,["properties",e,"defaultValue"]);if(angular.isDefined(n)){var i=Core.pathGet(t.nodeData,e);if(angular.isDefined(i)){var r=i.toString();return 0===r.localeCompare(n)}}return!1}function s(e){var n=Core.pathGet(t.nodeData,e);return angular.isUndefined(n)||Core.isBlank(n)?!1:angular.isString(n)?!Core.isBlank(n):!0}function l(){var i=e.getSelectionCamelContextMBean(n),o=null;if(t.contextId&&t.endpointPath){var a=n.findMBeanWithProperties(e.jmxDomain,{context:t.contextId,type:"endpoints",name:t.endpointPath});a&&(o=a.objectName)}if(o||(o=n.getSelectedMBeanName()),o&&i){var s=r.request({type:"read",mbean:o,attribute:["EndpointUri"]}),l=s.value.EndpointUri;if(l){t.endpointUrl=l,c.info("Calling explainEndpointJson for url: "+l);var d={type:"exec",mbean:i,operation:"explainEndpointJson(java.lang.String,boolean)",arguments:[l,!0]};r.request(d,Core.onSuccess(u))}}}function u(e){c.debug("Populate data "+e);var n=e.value;if(n){t.model=JSON.parse(n),t.model.title=t.endpointUrl,t.model.description=t.model.component.description,t.icon=UrlHelpers.join(o,"/img/icons/camel/endpoint24.png"),t.nodeData={},angular.forEach(t.model.properties,function(e,n){var i=e.value||e.defaultValue;angular.isDefined(i)&&null!==i&&(t.nodeData[n]=i),delete e.label});var i=[];t.model.component.label&&(i=t.model.component.label.split(",")),t.labels=i,t.viewTemplate="plugins/camel/html/nodePropertiesView.html",Core.$apply(t)}}var c=Logger.get("Camel");t.hideHelp=e.hideOptionDocumentation(i),t.hideUnused=e.hideOptionUnusedValue(i),t.hideDefault=e.hideOptionDefaultValue(i),t.viewTemplate=null,t.schema=null,t.model=null,t.labels=[],t.nodeData=null,t.icon=null,t.endpointUrl=null,t.$watch("hideHelp",function(e,t){e!==t&&l()}),t.$watch("hideUnused",function(e,t){e!==t&&l()}),t.$watch("hideDefault",function(e,t){e!==t&&l()}),t.$on("$routeChangeSuccess",function(e,t,n){setTimeout(l,50)}),t.$watch("workspace.selection",function(){n.moveIfViewInvalid()||l()}),t.showEntity=function(e){return t.hideDefault&&a(e)?!1:t.hideUnused&&!s(e)?!1:!0}}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.RestServiceController",["$scope","$location","workspace","jolokia",function(t,n,i,r){function o(e){var n=e.value;if(n){var i=[];for(var r in n){var o=n[r];for(var a in o){var s=o[a];i.push({url:s.url,baseUrl:s.baseUrl,basePath:s.basePath,uriTemplate:s.uriTemplate,method:s.method,consumes:s.consumes,produces:s.produces,inType:s.inType,outType:s.outType,state:s.state,routeId:s.routeId,description:s.description})}}i=i.sortBy("url"),t.data=i,t.selectedMBean=e.request.mbean}else t.selectedMBean="true";Core.$apply(t)}function a(){console.log("Loading RestRegistry data...");var t=e.getSelectionCamelRestRegistry(i);t&&r.request({type:"exec",mbean:t,operation:"listRestServices"},Core.onSuccess(o))}t.data=[],t.selectedMBean=null,t.mbeanAttributes={};var s=[{field:"url",displayName:"Absolute Url",cellFilter:null,width:"*",resizable:!0},{field:"baseUrl",displayName:"Base Url",cellFilter:null,width:"*",resizable:!0},{field:"basePath",displayName:"Base Path",cellFilter:null,width:"*",resizable:!0},{field:"uriTemplate",displayName:"Uri Template",cellFilter:null,width:"*",resizable:!0},{field:"method",displayName:"Method",cellFilter:null,width:"*",resizable:!0},{field:"consumes",displayName:"Consumes",cellFilter:null,width:"*",resizable:!0},{field:"produces",displayName:"Produces",cellFilter:null,width:"*",resizable:!0},{field:"inType",displayName:"Input Type",cellFilter:null,width:"*",resizable:!0},{field:"outType",displayName:"Output Type",cellFilter:null,width:"*",resizable:!0},{field:"state",displayName:"State",cellFilter:null,width:"*",resizable:!0},{field:"routeId",displayName:"Route Id",cellFilter:null,width:"*",resizable:!0},{field:"description",displayName:"Description",cellFilter:null,width:"*",resizable:!0}];t.gridOptions={data:"data",displayFooter:!0,displaySelectionCheckbox:!1,canSelectRows:!1,enableSorting:!0,columnDefs:s,selectedItems:[],filterOptions:{filterText:""}},t.renderIcon=function(t){return e.iconClass(t)},a()}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.RouteMetricsController",["$scope","$location","workspace","jolokia","metricsWatcher",function(t,n,i,r,o){function a(e){var n=e.value;if(n){var i=JSON.parse(n);if(!t.initDone){var r=i.timers,a=0;if(null!=r){for(var s in r){var u=s,c=u.lastIndexOf("."),d=u.substr(0,c),p=u.substr(c+1),h=u.indexOf(":"),f=u.substr(h+1);c=f.lastIndexOf("."),c>0&&(f=f.substr(0,c));var g=(r[s],"timer-"+a);t.metricDivs.push({id:g,routeId:f}),a++,l.info("Added timer: "+g+" ("+d+"."+p+") for route: "+f+" with max seconds: "+t.maxSeconds),o.addTimer(g,d,p,t.maxSeconds,f,"Histogram",1e3*t.maxSeconds)}l.info("Pre-init graphs"),Core.$apply(t)}l.info("Init graphs"),o.initGraphs()}t.initDone=!0,l.debug("Updating graphs: "+i),o.updateGraphs(i)}t.initDone=!0,Core.$apply(t)}function s(){l.info("Loading RouteMetrics data...");var n=e.getSelectedRouteId(i);null!=n&&(t.filterText=n);var o=e.getSelectionCamelRouteMetrics(i);if(o){var s={type:"exec",mbean:o,operation:"dumpStatisticsAsJson"};Core.scopeStoreJolokiaHandle(t,r,r.register(a,s))}else t.initDone=!0,Core.$apply(t)}var l=Logger.get("Camel");t.maxSeconds=e.routeMetricMaxSeconds(localStorage),t.filterText=null,t.initDone=!1,t.metricDivs=[],t.filterByRoute=function(e){l.debug("Filter by route "+e);var n=Core.matchFilterIgnoreCase(e.routeId,t.filterText);return n?"":"display: none;"},t.onResponse=function(e){s()},t.$watch("workspace.tree",function(){setTimeout(s,50)})}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.RouteController",["$scope","$routeParams","$element","$timeout","workspace","$location","jolokia","localStorage",function(t,n,i,r,o,a,s,l){function u(){var n=null;if(!t.ignoreRouteXmlNode&&(n=e.getSelectedRouteNode(o),n||(n=t.nodeXmlNode),n&&"route"!==n.localName)){var i=document.createElement("route");i.appendChild(n.cloneNode(!0)),n=i}if(t.mbean=e.getSelectionCamelContextMBean(o),!t.mbean&&t.contextId&&(t.mbean=e.getCamelContextMBean(o,t.contextId)),n){t.nodes={};var r=[],a=[];t.processorTree=e.camelProcessorMBeansById(o),e.addRouteXmlChildren(t,n,r,a,null,0,0),p(r,a)}else t.mbean?s.request({type:"exec",mbean:t.mbean,operation:"dumpRoutesAsXml()"},Core.onSuccess(y)):m.info("No camel context bean! Selection: "+o.selection)}function c(e){if(e){var t=e.getAttribute("class");return t&&t.endsWith(b)}return!1}function d(e,t){var n=!1;if(e){var i=e.getAttribute("class"),r=i&&i.endsWith(b);if(r)i=i.substring(0,i.length-b.length);else{if(!t)return n;i+=b,n=!0}e.setAttribute("class",i)}return n}function p(e,n){var r,o=i,l=h(),u=f(),p=o.children("svg")[0],m=a.path();r=m.startsWith("/camel/debugRoute")||m.startsWith("/camel/traceRoute")?null:w,t.graphData=Core.dagreLayoutGraph(e,n,l,u,p,!1,r);var v=o.find("g.node");return v.click(function(){var e=c(this);v.each(function(e,t){d(t,!1)});var n=null;e||(n=this.getAttribute("data-cid"),d(this,!0)),t.$emit("camel.diagram.selectedNodeId",n),Core.$apply(t)}),t.mbean&&Core.register(s,t,{type:"exec",mbean:t.mbean,operation:"dumpRoutesStatsAsXml",arguments:[!0,!0]},Core.onSuccess(g,{silent:!0,error:!1})),t.$emit("camel.diagram.layoutComplete"),l}function h(){var e=i;return e.width()}function f(){var t=i;return e.getCanvasHeight(t)}function g(e){function n(e,n){var i=n.getAttribute("id"),r=n.getAttribute("exchangesCompleted"),o=n.hasAttribute("exchangesInflight")?n.getAttribute("exchangesInflight"):0,a="";if(i&&r){var s=e?t.routeNodes:t.nodes,l=s[i];if(l||angular.forEach(s,function(e,t){l||i!==e.elementId||(l=e)}),l){var u=0+parseInt(r),c=n.getAttribute("exchangesFailed");c&&(u+=parseInt(c));var d=n.getAttribute("lastProcessingTime"),p=n.getAttribute("meanProcessingTime"),h=n.getAttribute("minProcessingTime"),f=n.getAttribute("maxProcessingTime");a="totoal: "+u+"\ninflight:"+o+"\nlast: "+d+" (ms)\nmean: "+p+" (ms)\nmin: "+h+" (ms)\nmax: "+f+" (ms)",l.counter=u,t.camelShowInflightCounter&&(l.inflight=o);var g=l.labelSummary;g&&(a=g+"\n\n"+a),l.tooltip=a}}}var i=e.value;if(i){var r=$.parseXML(i),o=$(r).find("routeStat");o.each(function(e,t){n(!0,t)});var o=$(r).find("processorStat");o.each(function(e,t){n(!1,t)}),Core.dagreUpdateGraphData(t.graphData)}}var m=Logger.get("Camel");t.routes=[],t.routeNodes={},null!=n&&(t.contextId=n.contextId,t.routeId=Core.trimQuotes(n.routeId),t.isJmxTab=!n.contextId||!n.routeId),t.camelIgnoreIdForLabel=e.ignoreIdForLabel(l),t.camelMaximumLabelWidth=e.maximumLabelWidth(l),t.camelShowInflightCounter=e.showInflightCounter(l);var v=_.debounce(u,300,{trailing:!0});t.$on("$routeChangeSuccess",function(e,t,n){v()}),t.$watch("workspace.selection",function(){t.isJmxTab&&o.moveIfViewInvalid()||v()}),t.$on("jmxTreeUpdated",function(){v()}),t.$watch("nodeXmlNode",function(){t.isJmxTab&&o.moveIfViewInvalid()||v()});var y=function(n){var i=n.value;t.routes=i,t.nodes={},t.routeNodes={};var r=[],a=[],s=t.routeId;if(s||(s=e.getSelectedRouteId(o)),i){var l=$.parseXML(i);t.processorTree=e.camelProcessorMBeansById(o),e.loadRouteXmlNodes(t,l,s,r,a,h()),p(r,a)}else console.log("No data from route XML!");Core.$apply(t)},b=" selected",w=function(e){m.debug("Clicked on Camel Route Diagram node: "+e.cid),a.path("/camel/properties").search({"main-tab":"camel","sub-tab":"camel-route-properties",nid:e.cid})}}])}(Camel||(Camel={}));var Camel;!function(e){var t="2";e._module.controller("Camel.SendMessageController",["$route","$scope","$element","$timeout","workspace","jolokia","localStorage","$location","activeMQMessage","PreferencesLastPath",function(n,i,r,o,a,s,l,u,c,d){function p(n,r){var o=a.selection;if(o){var u=o.objectName;if(u){var c=null;i.headers.length&&(c={},angular.forEach(i.headers,function(e){var t=e.name;t&&(c[t]=e.value)}),g.info("About to send headers: "+JSON.stringify(c)));var d=Core.onSuccess(r);if("org.apache.camel"===o.domain){var p=e.getContextAndTargetEndpoint(a),h=p.uri;if(u=p.mbean,u&&h){var f=!0;if(e.isCamelVersionEQGT(2,14,a,s)){var m=s.execute(u,"canSendToEndpoint(java.lang.String)",h);m||(Core.notification("warning","Camel does not support sending to this endpoint."),f=!1)}f&&(c?s.execute(u,"sendBodyAndHeaders(java.lang.String, java.lang.Object, java.util.Map)",h,n,c,d):s.execute(u,"sendStringBody(java.lang.String, java.lang.String)",h,n,d))}else u?Core.notification("error","Failed to determine endpoint name!"):Core.notification("error","Could not find CamelContext MBean!"),g.debug("Parsed context and endpoint: ",p)}else{var v=l.activemqUserName,y=l.activemqPassword;c||(c={}),c.JMSDeliveryMode||(c.JMSDeliveryMode=t),s.execute(u,"sendTextMessage(java.util.Map, java.lang.String, java.lang.String, java.lang.String)",c,n,v,y,d)}}}}function h(){return!0}function f(){return!0}var g=Logger.get("Camel");if(i.noCredentials=!1,i.container={},i.message="\n\n\n\n",i.headers=[],Core.bindModelToSearchParam(i,u,"tab","subtab","compose"),Core.bindModelToSearchParam(i,u,"searchText","q",""),Core.reloadWhenParametersChange(n,i,u),i.checkCredentials=function(){i.noCredentials=Core.isBlank(l.activemqUserName)||Core.isBlank(l.activemqPassword)},u.path().has("activemq")){if(i.localStorage=l,i.$watch("localStorage.activemqUserName",i.checkCredentials),i.$watch("localStorage.activemqPassword",i.checkCredentials),null!==c.message&&(i.message=c.message.bodyText,null!==c.message.PropertiesText))for(var m in c.message.StringProperties)i.headers.push({name:m,value:c.message.StringProperties[m]});c.message=null}i.openPrefs=function(){d.lastPath=u.path(),d.lastSearch=u.search(),u.path("/preferences").search({pref:"ActiveMQ"})};var v="defaultLanguageFormat",y=a.getLocalStorage(v)||"javascript";i.codeMirror=void 0;var b={mode:{name:y},onChange:function(e){i.codeMirror||(i.codeMirror=e)}};i.codeMirrorOptions=CodeEditor.createEditorSettings(b),i.addHeader=function(){i.headers.push({name:"",value:""}),r&&o(function(){var e=r.find("input.headerName").last();e.focus()},100)},i.removeHeader=function(e){i.headers=i.headers.remove(e)},i.defaultHeaderNames=function(){function t(e){angular.forEach(e.definitions.headers.properties,function(e,t){n.push(t)})}var n=[];return f()&&t(e.jmsHeaderSchema),h()&&t(e.camelHeaderSchema),n},i.$watch("workspace.selection",function(){a.moveIfViewInvalid()}),i.$watch("codeMirrorOptions.mode.name",function(e,t){a.setLocalStorage(v,e)});var w=function(){i.message="",Core.notification("success","Message sent!")};i.autoFormat=function(){setTimeout(function(){CodeEditor.autoFormatEditor(i.codeMirror)},50)},i.sendMessage=function(){var e=i.message;p(e,w)}}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.SourceController",["$scope","workspace",function(t,n){function i(e){function t(e,t){var n=t.getAttribute("customId");"route"===t.nodeName&&(n="true"),n&&"true"===n||t.removeAttribute("id"),t.removeAttribute("customId"),t.removeAttribute("_cid"),t.removeAttribute("group")}var n=$(e).clone();n.each(t),n.find("*").each(t);var i=n&&n.length?n[0]:e;return Core.xmlNodeToString(i)}function r(){var r=e.getSelectedRouteNode(n);if(r)t.source=i(r),Core.$apply(t);else{if(t.mbean=e.getSelectionCamelContextMBean(n),!t.mbean){var a=Core.pathGet(n,["selection","parent"]);a&&"context"===a.title&&(t.mbean=a.children[0].objectName)}if(t.mbean){var s=n.jolokia;s.request({type:"exec",mbean:t.mbean,operation:"dumpRoutesAsXml()"},Core.onSuccess(o))}}}t.$on("$routeChangeSuccess",function(e,t,n){setTimeout(r,50)}),t.$watch("workspace.selection",function(){n.moveIfViewInvalid()||r()}),t.mode="xml";var o=function(r){var o=r.value,a=e.getSelectedRouteId(n);if(o&&a){var s=$.parseXML(o),l=$(s).find('route[id="'+a+'"]');if(l&&l.length){var u=l[0],c=i(u);c&&(o=c)}}t.source=o,Core.$apply(t)},a=function(){Core.notification("success","Route updated!"),e.clearSelectedRouteNode(n),r()};t.saveRouteXml=function(){var i=t.source;if(i){var r=decodeURIComponent(i);e.log.debug("addOrUpdateRoutesFromXml xml decoded: "+r);var o=n.jolokia,s=e.getSelectionCamelContextMBean(n);s?o.execute(s,"addOrUpdateRoutesFromXml(java.lang.String)",r,Core.onSuccess(a)):Core.notification("error","Could not find CamelContext MBean!")}}}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.TraceRouteController",["$scope","workspace","jolokia","localStorage","tracerStatus",function(t,n,i,r,o){function a(){t.tracing=!1,null!=o.jhandle&&(d.debug("Unregistering jolokia handle"),i.unregister(o.jhandle),o.jhandle=null);var r=e.getSelectionCamelTraceMBean(n);if(r)if(t.tracing=i.getAttribute(r,"Enabled",Core.onSuccess(null)),t.tracing){var a=r;a&&null===o.jhandle&&(d.debug("Registering jolokia handle"),o.jhandle=i.register(s,{type:"exec",mbean:a,operation:"dumpAllTracedMessagesAsXml()",ignoreErrors:!0,arguments:[]})),t.graphView="plugins/camel/html/routes.html";
|
|
3277
|
|
-}else o.messages=[],t.messages=[],t.graphView=null,t.showMessageDetails=!1}function s(i){d.debug("Populating response "+i);var r=e.getSelectedRouteId(n),a=i.value;if(angular.isString(a)){var s=$.parseXML(a),l=$(s).find("fabricTracerEventMessage");l&&l.length||(l=$(s).find("backlogTracerEventMessage")),l.each(function(n,i){var o=$(i).find("routeId").text();if(o===r){var a=e.createMessageFromXml(i),s=$(i).find("toNode").text();s&&(a.toNode=s),a.openMessageDialog=t.openMessageDialog,d.debug("Adding new message to trace table with id "+a.id),t.messages.push(a)}}),o.messages=t.messages,Core.$apply(t)}}function l(){angular.forEach(t.gridOptions.selectedItems,function(t){if(t){var n=t.toNode;if(n){var i=d3.select("svg").selectAll("g .node");e.highlightSelectedNode(i,n)}}})}function u(e){a(),Core.$apply(t)}function c(t){var o=e.getSelectionCamelTraceMBean(n);if(o){if(o.toString().endsWith("BacklogTracer")){var a=e.maximumTraceOrDebugBodyLength(r),s=e.traceOrDebugIncludeStreams(r);i.setAttribute(o,"BodyMaxChars",a),i.setAttribute(o,"BodyIncludeStreams",s),i.setAttribute(o,"BodyIncludeFiles",s)}i.setAttribute(o,"Enabled",t,Core.onSuccess(u))}}var d=Logger.get("CamelTracer");t.tracing=!1,t.messages=[],t.graphView=null,t.mode="text",t.showMessageDetails=!1,t.gridOptions=e.createBrowseGridOptions(),t.gridOptions.selectWithCheckboxOnly=!1,t.gridOptions.showSelectionCheckbox=!1,t.gridOptions.multiSelect=!1,t.gridOptions.afterSelectionChange=l,t.gridOptions.columnDefs.push({field:"toNode",displayName:"To Node"}),t.startTracing=function(){d.info("Start tracing"),c(!0)},t.stopTracing=function(){d.info("Stop tracing"),c(!1)},t.clear=function(){d.debug("Clear messages"),o.messages=[],t.messages=[],Core.$apply(t)},t.$watch("workspace.selection",function(){n.moveIfViewInvalid()||(t.messages=o.messages,a())}),t.openMessageDialog=function(e){if(ActiveMQ.selectCurrentMessage(e,"id",t),t.row){var n=t.row.body;t.mode=angular.isString(n)?CodeEditor.detectTextFormat(n):"text","javascript"==t.mode&&(t.mode="text"),t.showMessageDetails=!0}else t.showMessageDetails=!1;Core.$apply(t)},ActiveMQ.decorate(t,l),d.info("Re-activating tracer with "+o.messages.length+" existing messages"),t.messages=o.messages,t.tracing=null!=o.jhandle}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.TreeHeaderController",["$scope","$location",function(e,t){e.contextFilterText="",e.$watch("contextFilterText",function(t,n){t!==n&&e.$emit("camel-contextFilterText",t)}),e.expandAll=function(){Tree.expandAll("#cameltree")},e.contractAll=function(){Tree.contractAll("#cameltree")}}]),e._module.controller("Camel.TreeController",["$scope","$location","$timeout","workspace","$rootScope",function(t,n,i,r,o){function a(o){void 0===o&&(o=null),t.fullScreenViewLink=e.linkToFullScreenView(r);var a=(e.jmxDomain,r.tree);if(a){var l=a.findDescendant(function(e){return"camelContexts"===e.id});l&&i(function(){var e=$("#cameltree");Jmx.enableTree(t,n,r,e,[l],!0),s(),angular.isFunction(o)&&o()},10)}}function s(){Jmx.updateTreeSelectionFromURLAndAutoSelect(n,$("#cameltree"),function(e){var t=e.getChildren();if(t&&1===t.length){e=t[0],e.expand(!0);var n=e.getChildren();if(n&&n.length){var i=n[0];if("routes"===i.data.typeName)return e=i}}return null},!0),t.fullScreenViewLink=e.linkToFullScreenView(r)}t.contextFilterText=n.search().cq,t.fullScreenViewLink=e.linkToFullScreenView(r),t.$on("$routeChangeSuccess",function(e,t,n){i(s,50,!1)}),t.$watch("workspace.tree",function(){a()}),t.$on("jmxTreeUpdated",function(){a()})}])}(Camel||(Camel={}));var Camel;!function(e){e._module.controller("Camel.TypeConverterController",["$scope","$location","workspace","jolokia",function(t,n,i,r){function o(e){var n=e.value;n&&(t.mbeanAttributes=n,Core.$apply(t))}function a(e){var n=e.value;if(n){var i=[];for(var r in n){var o=n[r];for(var a in o)i.push({from:r,to:a})}i=i.sortBy("from"),t.data=i,t.selectedMBean=e.request.mbean,Core.$apply(t)}}function s(){console.log("Loading TypeConverter data...");var n=e.getSelectionCamelTypeConverter(i);if(n){var s={type:"read",mbean:n,attribute:["AttemptCounter","FailedCounter","HitCounter","MissCounter","NumberOfTypeConverters","StatisticsEnabled"]};r.request(s,Core.onSuccess(o)),Core.scopeStoreJolokiaHandle(t,r,r.register(o,s)),r.request({type:"exec",mbean:n,operation:"listTypeConverters"},Core.onSuccess(a))}}t.data=[],t.selectedMBean=null,t.mbeanAttributes={};var l=[{field:"from",displayName:"From",cellFilter:null,width:"*",resizable:!0},{field:"to",displayName:"To",cellFilter:null,width:"*",resizable:!0}];t.gridOptions={data:"data",displayFooter:!0,displaySelectionCheckbox:!1,canSelectRows:!1,enableSorting:!0,columnDefs:l,selectedItems:[],filterOptions:{filterText:""}},t.renderIcon=function(t){return e.iconClass(t)},t.disableStatistics=function(){t.selectedMBean&&r.setAttribute(t.selectedMBean,"StatisticsEnabled",!1)},t.enableStatistics=function(){t.selectedMBean&&r.setAttribute(t.selectedMBean,"StatisticsEnabled",!0)},t.resetStatistics=function(){t.selectedMBean&&r.request({type:"exec",mbean:t.selectedMBean,operation:"resetTypeConversionCounters"},Core.onSuccess(null,{silent:!0}))},s()}])}(Camel||(Camel={}));var Karaf;!function(e){function t(e,t){if(!angular.isDefined(e))return t[0];var n=t.findIndex(function(t){return t.id===e.id});return-1!==n?t[n]:t[0]}function n(t,n,i,r,o){e.log.info("installing URI: ",i),n.request({type:"exec",mbean:C(t),operation:"addRepository(java.lang.String)",arguments:[i]},Core.onSuccess(r,{error:o}))}function i(t,n,i,r,o){e.log.info("uninstalling URI: ",i),n.request({type:"exec",mbean:C(t),operation:"removeRepository(java.lang.String)",arguments:[i]},Core.onSuccess(r,{error:o}))}function r(e,t,n,i,r,o){t.request({type:"exec",mbean:C(e),operation:"installFeature(java.lang.String, java.lang.String)",arguments:[n,i]},Core.onSuccess(r,{error:o}))}function o(e,t,n,i,r,o){t.request({type:"exec",mbean:C(e),operation:"uninstallFeature(java.lang.String, java.lang.String)",arguments:[n,i]},Core.onSuccess(r,{error:o}))}function a(e){var t=e;return angular.isArray(e)||(t=[e]),t}function s(e,t,n){return"<a href='"+Core.url("#/karaf/feature/"+t+"/"+n+e.hash())+"'>"+n+"</a>"}function l(e,t,n){var i=[],r=[];return h(e,i,r),i.find(function(e){return e.Name==t&&e.Version==n})}function u(e){return $.test(e)}function c(e){return A.test(e)}function d(e){return D.test(e)}function p(e){return I.test(e)}function h(e,t,n){var i=e.Features;angular.forEach(e.Repositories,function(e){n.push({id:e.Name,uri:e.Uri}),i&&angular.forEach(e.Features,function(n){angular.forEach(n,function(n){if(void 0!==i[n.Name]){var r=_.cloneDeep(i[n.Name][n.Version]);r.Id=n.Name+"/"+n.Version,r.RepositoryName=e.Name,r.RepositoryURI=e.Uri,t.push(r)}})})})}function f(e,t,n){var i=[];return angular.forEach(n,function(n){i.push({Name:n,State:g(b(e,t,n))})}),i}function g(e){switch(e){case 2:return"Enabled";case 4:return"Unsatisfied";case 8:return"Activating";case 16:return"Active";case 32:return"Registered";case 64:return"Factory";case 128:return"Deactivating";case 256:return"Destroying";case 1024:return"Disabling";case 2048:return"Disposing"}return"Unknown"}function m(e,t){var n=S(e),i=t.request({type:"read",mbean:n,arguments:[]});return"Components"in i.value?i.value.Components.values:(i=t.request({type:"exec",mbean:n,operation:"listComponents()"}),f(e,t,i.value))}function v(e,t,n){var i=m(e,t);return i.find(function(e){return e.Name==n})}function y(e,t,n){var i=t.request({type:"exec",mbean:S(e),operation:"isComponentActive(java.lang.String)",arguments:[n]});return i.value}function b(e,t,n){var i=t.request({type:"exec",mbean:S(e),operation:"componentState(java.lang.String)",arguments:[n]});return i.value}function w(e,t,n,i,r){t.request({type:"exec",mbean:S(e),operation:"activateComponent(java.lang.String)",arguments:[n]},Core.onSuccess(i,{error:r}))}function x(e,t,n,i,r){t.request({type:"exec",mbean:S(e),operation:"deactiveateComponent(java.lang.String)",arguments:[n]},Core.onSuccess(i,{error:r}))}function k(e,t,n){angular.forEach(t,function(t){angular.forEach(t,function(t){var i=l(e,t.Name,t.Version);i.id=t.Name+"/"+t.Version,n.push(i)})})}function C(e){if(e){var t=e.mbeanTypesToDomain.features||{},n=t["org.apache.karaf"]||{},i=n.objectName;if(i)return i;var r=e.tree.navigate("org.apache.karaf","features");if(!r&&(r=e.tree.navigate("org.apache.karaf"))){var o=r.children;r=null,angular.forEach(o,function(e){r||(r=e.navigate("features"))})}if(r){var o=r.children;if(o){var a=o[0];if(a)return a.objectName}return r.objectName}}return null}function S(e){if(e){var t=e.mbeanTypesToDomain.scr||{},n=t["org.apache.karaf"]||{},i=n.objectName;if(i)return i;var r=e.tree.navigate("org.apache.karaf","scr");if(!r&&(r=e.tree.navigate("org.apache.karaf"))){var o=r.children;r=null,angular.forEach(o,function(e){r||(r=e.navigate("scr"))})}if(r){var o=r.children;if(o){var a=o[0];if(a)return a.objectName}return r.objectName}}return null}e.log=Logger.get("Karaf"),e.setSelect=t,e.installRepository=n,e.uninstallRepository=i,e.installFeature=r,e.uninstallFeature=o,e.toCollection=a,e.featureLinks=s,e.extractFeature=l;var T=["^org.apache.aries","^org.apache.karaf","^activemq-karaf","^org.apache.commons","^org.apache.felix","^io.fabric8","^io.fabric8.fab","^io.fabric8.insight","^io.fabric8.mq","^io.fabric8.patch","^io.fabric8.runtime","^io.fabric8.security","^org.apache.geronimo.specs","^org.apache.servicemix.bundles","^org.objectweb.asm","^io.hawt","^javax.mail","^javax","^org.jvnet","^org.mvel2","^org.apache.mina.core","^org.apache.sshd.core","^org.apache.neethi","^org.apache.servicemix.specs","^org.apache.xbean","^org.apache.santuario.xmlsec","^biz.aQute.bndlib","^groovy-all","^com.google.guava","jackson-\\w+-asl","^com.fasterxml.jackson","^org.ops4j","^org.springframework","^bcprov$","^jline$","scala-library$","^org.scala-lang","^stax2-api$","^woodstox-core-asl","^org.jboss.amq.mq-fabric","^gravia-","^joda-time$","^org.apache.ws","-commands$","patch.patch","org.fusesource.insight","activeio-core","activemq-osgi","^org.eclipse.jetty","org.codehaus.jettison.jettison","org.jledit.core","org.fusesource.jansi","org.eclipse.equinox.region"],$=new RegExp(T.join("|")),E=["^org.apache.camel","camel-karaf-commands$","activemq-camel$"],D=new RegExp(E.join("|")),M=["^org.apache.cxf"],I=new RegExp(M.join("|")),P=["^org.apache.activemq","activemq-camel$"],A=new RegExp(P.join("|"));e.isPlatformBundle=u,e.isActiveMQBundle=c,e.isCamelBundle=d,e.isCxfBundle=p,e.populateFeaturesAndRepos=h,e.createScrComponentsView=f,e.getComponentStateDescription=g,e.getAllComponents=m,e.getComponentByName=v,e.isComponentActive=y,e.getComponentState=b,e.activateComponent=w,e.deactivateComponent=x,e.populateDependencies=k,e.getSelectionFeaturesMBean=C,e.getSelectionScrMBean=S}(Karaf||(Karaf={}));var Karaf;!function(e){var t="karaf";e._module=angular.module(t,["ngResource","hawtio-core"]),e._module.config(["$routeProvider",function(e){e.when("/osgi/server",{templateUrl:"plugins/karaf/html/server.html"}).when("/osgi/features",{templateUrl:"plugins/karaf/html/features.html",reloadOnSearch:!1}).when("/osgi/scr-components",{templateUrl:"plugins/karaf/html/scr-components.html"}).when("/osgi/scr-component/:name",{templateUrl:"plugins/karaf/html/scr-component.html"}).when("/osgi/feature/:name/:version",{templateUrl:"plugins/karaf/html/feature.html"})}]),e._module.run(["workspace","viewRegistry","helpRegistry",function(e,t,n){n.addUserDoc("karaf","plugins/karaf/doc/help.md",function(){return e.treeContainsDomainAndProperties("org.apache.karaf")})}]),hawtioPluginLoader.addModule(t)}(Karaf||(Karaf={}));var Karaf;!function(e){e._module.controller("Karaf.FeatureController",["$scope","jolokia","workspace","$routeParams",function(t,n,i,r){function o(n){if(t.row=e.extractFeature(n.value,t.name,t.version),t.row){l(t.row);var i=[];angular.forEach(t.row.Dependencies,function(e,t){angular.forEach(e,function(e,n){i.push({Name:t,Version:n})})}),t.row.Dependencies=i}Core.$apply(t)}function a(e){Osgi.defaultBundleValues(i,t,e.values),angular.forEach(e.value,function(e){var n=e.Location;t.bundlesByLocation[n]=e})}function s(){var t=e.getSelectionFeaturesMBean(i),n=Osgi.getSelectionBundleMBean(i),r=i.jolokia;n&&a(r.request({type:"exec",mbean:n,operation:"listBundles()"})),t&&r.request({type:"read",mbean:t},Core.onSuccess(o))}function l(e){var n=[];angular.forEach(e.Bundles,function(e){var i=t.bundlesByLocation[e];i?(i.Installed=!0,n.push(i)):n.push({Location:e,Installed:!1})}),e.BundleDetails=n}t.name=r.name,t.version=r.version,t.bundlesByLocation={},t.props="properties",s(),t.install=function(){e.installFeature(i,n,t.name,t.version,function(){Core.notification("success","Installed feature "+t.name)},function(e){Core.notification("error","Failed to install feature "+t.name+" due to "+e.error)})},t.uninstall=function(){e.uninstallFeature(i,n,t.name,t.version,function(){Core.notification("success","Uninstalled feature "+t.name)},function(e){Core.notification("error","Failed to uninstall feature "+t.name+" due to "+e.error)})},t.toProperties=function(e){var t="";return angular.forEach(e,function(e,n){t+=e.Key+" = "+e.Value+"\n"}),t.trim()}}])}(Karaf||(Karaf={}));var Karaf;!function(e){e._module.controller("Karaf.FeaturesController",["$scope","$location","workspace","jolokia",function(t,n,i,r){function o(n){var i=angular.toJson(n.value);if(t.responseJson!==i){t.responseJson=i,null===n.value.Features?t.featuresError=!0:t.featuresError=!1,t.features=[],t.repositories=[];var r=[],o=[];e.populateFeaturesAndRepos(n.value,r,o);var a=r.filter(function(e){return Core.parseBooleanValue(e.Installed)}),s=r.filter(function(e){return!Core.parseBooleanValue(e.Installed)});if(t.installedFeatures=a.sortBy(function(e){return e.Name}),s=s.sortBy(function(e){return e.Name}),o.sortBy("id").forEach(function(e){t.repositories.push({repository:e.id,uri:e.uri,features:s.filter(function(t){return t.RepositoryName===e.id})})}),!Core.isBlank(t.newRepositoryURI)){var l=o.find(function(e){return e.uri===t.newRepositoryURI});l&&(t.selectedRepositoryId=l.id),t.newRepositoryURI=""}Core.isBlank(t.selectedRepositoryId)?t.selectedRepository=t.repositories.first():t.selectedRepository=t.repositories.find(function(e){return e.repository===t.selectedRepositoryId}),Core.$apply(t)}}t.responseJson="",t.filter="",t.installedFeatures=[],t.features=[],t.repositories=[],t.selectedRepositoryId="",t.selectedRepository={},t.newRepositoryURI="",t.init=function(){var e=n.search().repositoryId;e&&(t.selectedRepositoryId=e);var i=n.search().filter;i&&(t.filter=i)},t.init(),t.$watch("selectedRepository",function(e,i){e!==i&&(e?t.selectedRepositoryId=e.repository:t.selectedRepositoryId="",n.search("repositoryId",t.selectedRepositoryId))},!0),t.$watch("filter",function(e,t){e!==t&&n.search("filter",e)});var a=e.getSelectionFeaturesMBean(i);e.log.debug("Features mbean: ",a),a&&Core.register(r,t,{type:"read",mbean:a},Core.onSuccess(o)),t.inSelectedRepository=function(e){return t.selectedRepository&&"repository"in t.selectedRepository&&e&&"RepositoryName"in e&&e.RepositoryName===t.selectedRepository.repository?"in-selected-repository":""},t.isValidRepository=function(){return Core.isBlank(t.newRepositoryURI)},t.installRepository=function(){var n=t.newRepositoryURI;Core.notification("info","Adding feature repository URL"),e.installRepository(i,r,n,function(){Core.notification("success","Added feature repository URL"),t.selectedRepository={},t.selectedRepositoryId="",t.responseJson=null,t.triggerRefresh()},function(i){e.log.error("Failed to add feature repository URL ",n," due to ",i.error),e.log.info("stack trace: ",i.stacktrace),Core.$apply(t)})},t.uninstallRepository=function(){var n=t.selectedRepository.uri;Core.notification("info","Removing feature repository "+n),e.uninstallRepository(i,r,n,function(){Core.notification("success","Removed feature repository "+n),t.responseJson=null,t.selectedRepositoryId="",t.selectedRepository={},t.triggerRefresh()},function(i){e.log.error("Failed to remove feature repository ",n," due to ",i.error),e.log.info("stack trace: ",i.stacktrace),Core.$apply(t)})},t.triggerRefresh=function(){r.request({type:"read",method:"POST",mbean:a},Core.onSuccess(o))},t.install=function(n){Core.notification("info","Installing feature "+n.Name),e.installFeature(i,r,n.Name,n.Version,function(){Core.notification("success","Installed feature "+n.Name),t.installedFeatures.add(n),t.responseJson=null,t.triggerRefresh()},function(i){e.log.error("Failed to install feature ",n.Name," due to ",i.error),e.log.info("stack trace: ",i.stacktrace),Core.$apply(t)})},t.uninstall=function(n){Core.notification("info","Uninstalling feature "+n.Name),e.uninstallFeature(i,r,n.Name,n.Version,function(){Core.notification("success","Uninstalled feature "+n.Name),t.installedFeatures.remove(n),t.responseJson=null,t.triggerRefresh()},function(i){e.log.error("Failed to uninstall feature ",n.Name," due to ",i.error),e.log.info("stack trace: ",i.stacktrace),Core.$apply(t)})},t.filteredRows=["Bundles","Configurations","Configuration Files","Dependencies"],t.showRow=function(e,n){return t.filteredRows.any(e)?!1:angular.isArray(n)&&0===n.length?!1:angular.isString(n)&&Core.isBlank(n)?!1:!angular.isObject(n)||n&&!angular.equals(n,{})?!0:!1},t.installed=function(e){var t=Core.parseBooleanValue(e);return t},t.showValue=function(e){if(angular.isArray(e)){var t=['<ul class="zebra-list">'];return e.forEach(function(e){t.push("<li>"+e+"</li>")}),t.push("</ul>"),t.join("\n")}if(angular.isObject(e)){var t=['<table class="table">',"<tbody>"];return angular.forEach(e,function(e,n){t.push("<tr>"),t.push("<td>"+n+"</td>"),t.push("<td>"+e+"</td>"),t.push("</tr>")}),t.push("</tbody>"),t.push("</table>"),t.join("\n")}return""+e},t.getStateStyle=function(e){return Core.parseBooleanValue(e.Installed)?"badge badge-success":"badge"},t.filterFeature=function(e){return Core.isBlank(t.filter)?!0:e.Id.has(t.filter)?!0:!1}}])}(Karaf||(Karaf={}));var Karaf;!function(e){e._module.controller("Karaf.NavBarController",["$scope","workspace",function(t,n){t.hash=n.hash(),t.isKarafEnabled=n.treeContainsDomainAndProperties("org.apache.karaf"),t.isFeaturesEnabled=e.getSelectionFeaturesMBean(n),t.isScrEnabled=e.getSelectionScrMBean(n),t.$on("$routeChangeSuccess",function(){t.hash=n.hash()}),t.isActive=function(e){return n.isLinkActive(e)},t.isPrefixActive=function(e){return n.isLinkPrefixActive(e)}}])}(Karaf||(Karaf={}));var Karaf;!function(e){e._module.controller("Karaf.ScrComponentController",["$scope","$location","workspace","jolokia","$routeParams",function(t,n,i,r,o){function a(){t.row=e.getComponentByName(i,r,t.name),Core.$apply(t)}t.name=o.name,a(),t.activate=function(){e.activateComponent(i,r,t.row.Name,function(){console.log("Activated!")},function(){console.log("Failed to activate!")})},t.deactivate=function(){e.deactivateComponent(i,r,t.row.Name,function(){console.log("Deactivated!")},function(){console.log("Failed to deactivate!")})}}])}(Karaf||(Karaf={}));var Karaf;!function(e){e._module.controller("Karaf.ScrComponentsController",["$scope","$location","workspace","jolokia",function(t,n,i,r){function o(){return[{Name:"",Status:!1}]}function a(e){angular.equals(t.result,e)||(t.components=e,t.result=t.components,Core.$apply(t))}t.component=o(),t.result=[],t.components=[],t.selectedComponents=[],t.scrOptions={data:"components",showFilter:!1,showColumnMenu:!1,filterOptions:{useExternalFilter:!1},sortInfo:{fields:["Name"],directions:["asc"]},selectedItems:t.selectedComponents,rowHeight:32,selectWithCheckboxOnly:!0,columnDefs:[{field:"Name",displayName:"Name",cellTemplate:'<div class="ngCellText"><a href="#/osgi/scr-component/{{row.entity.Name}}?p=container">{{row.getProperty(col.field)}}</a></div>',width:400},{field:"State",displayName:"State",cellTemplate:'<div class="ngCellText">{{row.getProperty(col.field)}}</div>',width:200}]};var s=e.getSelectionScrMBean(i);s&&a(e.getAllComponents(i,r)),t.activate=function(){t.selectedComponents.forEach(function(t){e.activateComponent(i,r,t.Name,function(){console.log("Activated!")},function(){console.log("Failed to activate!")})})},t.deactivate=function(){t.selectedComponents.forEach(function(t){e.deactivateComponent(i,r,t.Name,function(){console.log("Deactivated!")},function(){console.log("Failed to deactivate!")})})}}])}(Karaf||(Karaf={}));var Karaf;!function(e){e._module.controller("Karaf.ServerController",["$scope","$location","workspace","jolokia",function(e,t,n,i){function r(){setTimeout(o,50)}function o(){console.log("Loading Karaf data..."),i.search("org.apache.karaf:type=admin,*",Core.onSuccess(a))}function a(e){if(angular.isArray(e)){var t=e[0];t&&i.getAttribute(t,"Instances",Core.onSuccess(function(e){s(e,t)}))}}function s(t,n){if(t){var r=Core.parseMBean(n),o="root";"attributes"in r&&"name"in r.attributes&&(o=r.attributes.name);var a=t[o];e.data.name=a.Name,e.data.state=a.State,e.data.root=a["Is Root"],e.data.location=a.Location,e.data.sshPort=a["SSH Port"],e.data.rmiRegistryPort=a["RMI Registry Port"],e.data.rmiServerPort=a["RMI Server Port"],e.data.pid=a.Pid,e.data.version="?",e.data.startLevel="?",e.data.framework="?",e.data.frameworkVersion="?";var s="org.apache.karaf:type=system,name="+a.Name,l=i.request({type:"read",mbean:s,attribute:["StartLevel","Framework","Version"]},Core.onSuccess(null)),u=l.value;u&&(e.data.version=u.Version,e.data.startLevel=u.StartLevel,e.data.framework=u.Framework);var c=i.search("osgi.core:type=bundleState,*",Core.onSuccess(null));if(angular.isArray(c)){var n=c[0];if(n){var d=i.request({type:"exec",mbean:n,operation:"getVersion(long)",arguments:[0]},Core.onSuccess(null)),p=d.value;p&&(e.data.frameworkVersion=p)}}}Core.$apply(e)}e.data={name:"",version:"",state:"",root:"",startLevel:"",framework:"",frameworkVersion:"",location:"",sshPort:"",rmiRegistryPort:"",rmiServerPort:"",pid:""},e.$on("jmxTreeUpdated",r),e.$watch("workspace.tree",r)}])}(Karaf||(Karaf={}));var Osgi;!function(e){function t(e,t,i){var r=i;return angular.forEach(i,function(t){t.ImportData=a(t.ImportedPackages),t.ExportData=a(t.ExportedPackages),t.IdentifierLink=d(e,t.Identifier),t.Hosts=c(e,t.Hosts,r),t.Fragments=c(e,t.Fragments,r),t.ImportedPackages=t.ImportedPackages.union([]),t.StateStyle=n("label",t.State),t.RequiringBundles=c(e,t.RequiringBundles,r)}),i}function n(e,t){switch(t){case"INSTALLED":return e+"-important";case"RESOLVED":return e+"-inverse";case"STARTING":return e+"-warning";case"ACTIVE":return e+"-success";case"STOPPING":return e+"-info";case"UNINSTALLED":return"";default:return e+"-important"}}function i(e,t,n){return angular.forEach(n,function(t){t.BundleIdentifier=d(e,t.BundleIdentifier)}),n}function r(e,t,n){function i(t,n){n||(n=t);var i=t.Name,o=t.Version;if(i&&!i.startsWith("#")){t.VersionLink="<a href='"+Core.url("#/osgi/package/"+i+"/"+o+e.hash())+"'>"+o+"</a>";var a=n.ImportingBundles||t.ImportingBundles,s=n.ExportingBundles||t.ExportingBundles;t.ImportingBundleLinks=d(e,a),t.ImportingBundleLinks=d(e,a),t.ExportingBundleLinks=d(e,s),r.push(t)}}var r=[],o=n.values;return o&&angular.forEach(o,i),angular.forEach(n,function(e){angular.forEach(e,function(t){angular.forEach(t,function(t){i(t,e)})})}),r}function o(e,t,n){var i=[];return angular.forEach(n,function(t){var n={};n.Pid=t[0],n.PidLink="<a href='"+Core.url("#/osgi/pid/"+t[0]+e.hash())+"'>"+t[0]+"</a>",n.Bundle=t[1],i.push(n)}),i}function a(e){for(var t={},n=0;n<e.length;n++){var i=e[n],r=i.indexOf(";");if(r>0){var o=i.substring(0,r),a=i.substring(r+1),s=t[o];void 0===s&&(s={},t[o]=s),s.ReportedVersion=a}}return t}function s(e,t){var n={},i={},r=e[t];if(void 0===r)return n;for(var o=r.Value,a=!0,s=!1,u="",c="",d=0;d<o.length;d++){var p=o[d];'"'!==p?s?c+=p:";"!==p?","!==p?a?u+=p:c+=p:(l(i,c),n[u]=i,i={},u="",c="",a=!0):a?a=!1:(l(i,c),c=""):s=!s}return l(i,c),n[u]=i,n}function l(e,t){var n=t.indexOf(":=");if(n>0)return void(e["D"+t.substring(0,n)]=t.substring(n+2));var i=t.indexOf("=");return i>0?void(e["A"+t.substring(0,i)]=t.substring(i+1)):void 0}function u(e){var t=e;return angular.isArray(e)||(t=[e]),t}function c(e,t,n){var i="",r=u(t).sort(function(e,t){return e-t});return angular.forEach(r,function(t,r){var o="";i.length>0&&(o=" ");var a=n[t]||{},s=a.SymbolicName;i+=o+"<a class='label' href='"+Core.url("#/osgi/bundle/"+t+e.hash())+"'>"+s+"</a>"}),i}function d(e,t){var n="",i=u(t).sort(function(e,t){return e-t});return angular.forEach(i,function(t,i){var r="";n.length>0&&(r=" "),n+=r+"<a class='label' href='"+Core.url("#/osgi/bundle/"+t+e.hash())+"'>"+t+"</a>"}),n}function p(e,t){var n="";return angular.forEach(u(t),function(t,i){var r="";n.length>0&&(r=" "),n+=r+"<a href='"+Core.url("#/osgi/bundle/"+t+e.hash())+"'>"+t+"</a>"}),n}function h(e,t){var n="";return angular.forEach(t,function(t){var i=t.Identifier;return e===i.toString()?n=t:void 0}),n}function f(t){if(t){var n=t.tree.navigate("osgi.core","bundleState");return e.findFirstObjectName(n)}return null}function g(e){if(e){var t=e.objectName;if(t)return t;var n=e.children;if(n&&n.length)return g(n[0])}return null}function m(t){if(t){var n=t.tree.navigate("osgi.core","framework");return e.findFirstObjectName(n)}return null}function v(t){if(t){var n=t.tree.navigate("osgi.core","serviceState");return e.findFirstObjectName(n)}return null}function y(t){if(t){var n=t.tree.navigate("osgi.core","packageState");return e.findFirstObjectName(n)}return null}function b(t){if(t){var n=t.tree.navigate("osgi.compendium","cm");return e.findFirstObjectName(n)}return null}function w(e){if(e){var t=e.mbeanTypesToDomain,n=t.MetaTypeFacade||{},i=n["io.fabric8"]||{};return i.objectName}return null}function x(e){if(e){var t=e.mbeanTypesToDomain,n=t.ProfileMetadata||{},i=n["io.fabric8"]||{};return i.objectName}return null}function k(e){if(e){var t=e.mbeanTypesToDomain,n=t.OSGiTools||{},i=n.hawtio||{};return i.objectName}return null}function C(e){if(e){var t=e.mbeanTypesToDomain,n=t.ConfigAdmin||{},i=n.hawtio||{};return i.objectName}return null}function S(e,t,n,i){return void 0===i&&(i=!1),Core.url("#"+_(e,n,i)+t.hash())}function _(e,t,n){void 0===n&&(n=!1);var i=t,r=e.versionId;e.profileId;if(r&&r){var o=n?"/newConfiguration/":"/configuration/";return"/wiki/branch/"+r+o+i+"/"+e.pageId}return"/osgi/pid/"+i}function T(e,t,n,i){var r=b(e),o=null;return t&&r&&(o=t.execute(r,"getProperties",n,Core.onSuccess(i))),o}function $(e,t){if(e&&t){if(e.startsWith(t))return e.substring(t.length+1);var n=t.lastIndexOf(".");if(n>0){var i=t.substring(0,n+1);return Core.trimLeading(e,i)}}return e}e.log=Logger.get("OSGi"),e.defaultBundleValues=t,e.getStateStyle=n,e.defaultServiceValues=i,e.defaultPackageValues=r,e.defaultConfigurationValues=o,e.parseActualPackages=a,e.parseManifestHeader=s,e.toCollection=u,e.labelBundleLinks=c,e.bundleLinks=d,e.pidLinks=p,e.findBundle=h,e.getSelectionBundleMBean=f,e.findFirstObjectName=g,e.getSelectionFrameworkMBean=m,e.getSelectionServiceMBean=v,e.getSelectionPackageMBean=y,e.getSelectionConfigAdminMBean=b,e.getMetaTypeMBean=w,e.getProfileMetadataMBean=x,e.getHawtioOSGiToolsMBean=k,e.getHawtioConfigAdminMBean=C,e.createConfigPidLink=S,e.createConfigPidPath=_,e.getConfigurationProperties=T,e.removeFactoryPidPrefix=$}(Osgi||(Osgi={}));var Osgi;!function(e){var t=function(){function t(e,t){this.jolokia=t,this.workspace=e}return t.prototype.getBundles=function(){var t={},n=this.jolokia.request({type:"exec",mbean:e.getSelectionBundleMBean(this.workspace),operation:"listBundles()"},Core.onSuccess(null));return angular.forEach(n.value,function(e,n){var i={Identifier:e.Identifier,Name:"",SymbolicName:e.SymbolicName,Fragment:e.Fragment,State:e.State,Version:e.Version,LastModified:new Date(Number(e.LastModified)),Location:e.Location,StartLevel:void 0,RegisteredServices:e.RegisteredServices,ServicesInUse:e.ServicesInUse};e.Headers["Bundle-Name"]&&(i.Name=e.Headers["Bundle-Name"].Value),t[e.Identifier]=i}),t},t.prototype.getServices=function(){var t={},n=this.jolokia.request({type:"exec",mbean:e.getSelectionServiceMBean(this.workspace),operation:"listServices()"},Core.onSuccess(null)),i=n.value;return angular.forEach(i,function(e,n){t[e.Identifier]=e}),t},t.prototype.getPackages=function(){var t={},n=this.jolokia.request({type:"exec",mbean:e.getSelectionPackageMBean(this.workspace),operation:"listPackages()"},Core.onSuccess(null)),i=n.value.values;return i.forEach(function(e){t[e.Name+"-"+e.Version]=e}),t},t}();e.OsgiDataService=t}(Osgi||(Osgi={}));var Osgi;!function(e){e.pluginName="osgi",e._module=angular.module(e.pluginName,[]),e._module.config(["$routeProvider",function(e){e.when("/osgi",{redirectTo:"/osgi/bundle-list"}).when("/osgi/bundle-list",{templateUrl:"plugins/osgi/html/bundle-list.html"}).when("/osgi/bundles",{templateUrl:"plugins/osgi/html/bundles.html"}).when("/osgi/bundle/:bundleId",{templateUrl:"plugins/osgi/html/bundle.html"}).when("/osgi/services",{templateUrl:"plugins/osgi/html/services.html"}).when("/osgi/packages",{templateUrl:"plugins/osgi/html/packages.html"}).when("/osgi/package/:package/:version",{templateUrl:"plugins/osgi/html/package.html"}).when("/osgi/configurations",{templateUrl:"plugins/osgi/html/configurations.html"}).when("/osgi/pid/:pid/:factoryPid",{templateUrl:"plugins/osgi/html/pid.html"}).when("/osgi/pid/:pid",{templateUrl:"plugins/osgi/html/pid.html"}).when("/osgi/fwk",{templateUrl:"plugins/osgi/html/framework.html"}).when("/osgi/dependencies",{templateUrl:"plugins/osgi/html/svc-dependencies.html",reloadOnSearch:!1})}]),e._module.run(["HawtioNav","workspace","viewRegistry","helpRegistry",function(e,t,n,i){i.addUserDoc("osgi","plugins/osgi/doc/help.md",function(){return t.treeContainsDomainAndProperties("osgi.core")});var r=e.builder(),o=r.id("osgi-configuration").href(function(){return"/osgi/configurations"+t.hash()}).title(function(){return"Configuration"}).isSelected(function(){return t.isLinkPrefixActive("/osgi/configuration")||t.isLinkPrefixActive("/osgi/pid")}).build(),a=r.id("osgi-bundles").href(function(){return"/osgi/bundle-list"+t.hash()}).title(function(){return"Bundles"}).isSelected(function(){return t.isLinkPrefixActive("/osgi/bundle")}).build(),s=r.id("osgi-features").href(function(){return"/osgi/features"+t.hash()}).title(function(){return"Features"}).show(function(){return!Core.isBlank(Karaf.getSelectionFeaturesMBean(t))}).isSelected(function(){return t.isLinkPrefixActive("/osgi/feature")}).build(),l=r.id("osgi-packages").href(function(){return"/osgi/packages"+t.hash()}).title(function(){return"Packages"}).isSelected(function(){return t.isLinkPrefixActive("/osgi/package")}).build(),u=r.id("osgi-services").href(function(){return"/osgi/services"+t.hash()}).title(function(){return"Services"}).isSelected(function(){return t.isLinkPrefixActive("/osgi/service")}).build(),c=r.id("osgi-scr-components").href(function(){return"/osgi/scr-components"+t.hash()}).title(function(){return"Declarative Services"}).show(function(){return!Core.isBlank(Karaf.getSelectionScrMBean(t))}).isSelected(function(){return t.isLinkPrefixActive("/osgi/scr-component")}).build(),d=r.id("osgi-server").href(function(){return"/osgi/server"+t.hash()}).title(function(){return"Server"}).isSelected(function(){return t.isLinkPrefixActive("/osgi/server")}).build(),p=r.id("osgi-fwk").href(function(){return"/osgi/fwk"+t.hash()}).title(function(){return"Framework"}).isSelected(function(){return t.isLinkPrefixActive("/osgi/fwk")}).build(),h=r.id("osgi-dependencies").href(function(){return"/osgi/dependencies"+t.hash()}).title(function(){return"Dependencies"}).isSelected(function(){return t.isLinkPrefixActive("/osgi/dependencies")}).build(),f=r.id("osgi").title(function(){return"OSGi"}).href(function(){return"/osgi"}).isValid(function(){return t.treeContainsDomainAndProperties("osgi.core")}).isSelected(function(){return t.isLinkActive("osgi")}).tabs(o,a,s,l,u,c,d,p,h).build();e.add(f)}]),e._module.factory("osgiDataService",["workspace","jolokia",function(t,n){return new e.OsgiDataService(t,n)}]),hawtioPluginLoader.addModule(e.pluginName)}(Osgi||(Osgi={}));var Osgi;
|
|
3278
|
|
-!function(e){e._module.controller("Osgi.BundleListController",["$scope","workspace","jolokia","localStorage",function(t,n,i,r){function o(r){var o=r.value,a=angular.toJson(o);t.responseJson!==a&&(t.responseJson=a,t.bundles=[],angular.forEach(o,function(e,n){var i={Identifier:e.Identifier,Name:"",SymbolicName:e.SymbolicName,Fragment:e.Fragment,State:e.State,Version:e.Version,LastModified:new Date(Number(e.LastModified)),Location:e.Location,StartLevel:void 0};e.Headers["Bundle-Name"]&&(i.Name=e.Headers["Bundle-Name"].Value),t.bundles.push(i)}),t.bundles=t.bundles.sortBy(t.display.sortField),Core.$apply(t),setTimeout(function(){for(var r=[],o=0;o<t.bundles.length;o++){var a=t.bundles[o];r.push({type:"exec",mbean:e.getSelectionBundleMBean(n),operation:"getStartLevel(long)",arguments:[a.Identifier]})}var s=r.length;i.request(r,Core.onSuccess(function(n){var i=n.request.arguments.first();if(angular.isDefined(i)){var r=t.bundles[i];r&&(e.log.debug("Setting bundle: ",r.Identifier," start level to: ",n.value),r.StartLevel=n.value)}s-=1,e.log.debug("oustanding responses: ",s),0===s&&(e.log.debug("Updating page..."),Core.$apply(t))}))},500))}t.result={},t.bundles=[],t.bundleUrl="",t.display={bundleField:"Name",sortField:"Identifier",bundleFilter:"",startLevelFilter:0,showActiveMQBundles:!1,showCamelBundles:!1,showCxfBundles:!1,showPlatformBundles:!1},"bundleList"in r&&(t.display=angular.fromJson(r.bundleList)),t.$watch("display",function(e,t){e!==t&&(r.bundleList=angular.toJson(e))},!0),t.installDisabled=function(){return""===t.bundleUrl},t.install=function(){i.request({type:"exec",mbean:e.getSelectionFrameworkMBean(n),operation:"installBundle(java.lang.String)",arguments:[t.bundleUrl]},{success:function(r){var o=r.value;i.request({type:"exec",mbean:e.getSelectionBundleMBean(n),operation:"isFragment(long)",arguments:[o]},{success:function(r){var a=r.value;a?(Core.notification("success","Fragment installed successfully."),t.bundleUrl="",Core.$apply(t)):i.request({type:"exec",mbean:e.getSelectionFrameworkMBean(n),operation:"startBundle(long)",arguments:[o]},{success:function(e){Core.notification("success","Bundle installed and started successfully."),t.bundleUrl="",Core.$apply(t)},error:function(e){Core.notification("error",e.error)}})},error:function(e){Core.notification("error",e.error)}})},error:function(e){Core.notification("error",e.error)}})},t.$watch("display.sortField",function(e,n){e!==n&&(t.bundles=t.bundles.sortBy(e))}),t.getStateStyle=function(t){return e.getStateStyle("badge",t)},t.getLabel=function(e){var n;return"Name"===t.display.bundleField?(n=e.Name,""===n&&(n=e.SymbolicName)):n=e.SymbolicName,n},t.filterBundle=function(e){if(t.display.startLevelFilter>0&&e.StartLevel<t.display.startLevelFilter)return!1;var n=t.getLabel(e);return t.display.bundleFilter&&!n.toLowerCase().has(t.display.bundleFilter.toLowerCase())?!1:Core.isBlank(t.display.bundleFilter)?t.display.showPlatformBundles&&Karaf.isPlatformBundle(e.SymbolicName)||t.display.showActiveMQBundles&&Karaf.isActiveMQBundle(e.SymbolicName)||t.display.showCxfBundles&&Karaf.isCxfBundle(e.SymbolicName)||t.display.showCamelBundles&&Karaf.isCamelBundle(e.SymbolicName)?!0:!1:!0},Core.register(i,t,{type:"exec",mbean:e.getSelectionBundleMBean(n),operation:"listBundles()"},Core.onSuccess(o))}])}(Osgi||(Osgi={}));var Osgi;!function(e){function t(e){var t=e.indexOf(";");return 0>=t?"":e.substring(t+1).trim()}function n(e,t){var n="";if(!e)return n;for(var i=Object.keys(e).sort(),r=0;r<i.length;r++){var o,a=i[r],s=a.charAt(0),l="";if("A"===s&&(l="=",o="text-info"),"D"===s&&(l=":=",o="muted"),""!==l){if(t&&"Aversion"===a)continue;var u=e[a];u.length>15&&(u=u.replace(/[,]/g,",<br/> ")),n+="<tr><td><strong class='"+o+"'>"+a.substring(1)+"</strong>"+l+u+"</td></tr>"}}return n}function i(e){if(angular.isArray(e))return r(e);var t=e.toString(),n=t.lastIndexOf(".");return t.substring(n+1)}function r(e){for(var t=[],n=0;n<e.length;n++)t.add(i(e[n]));return t=t.filter(function(e,t,n){return n.indexOf(e)===t}),t.sort(),t.toString()}e.readBSNHeaderData=t,e.formatAttributesAndDirectivesForPopover=n,e.formatServiceName=i,e._module.controller("Osgi.BundleController",["$scope","$location","workspace","$routeParams","jolokia",function(r,o,a,s,l){function u(){var e=document.getElementById("loadClassResult");e.innerHTML+="<div class='alert alert-error'><button type='button' class='close' data-dismiss='alert'>×</button>The hawtio.OSGiTools MBean is not available. Please contact technical support.</div>"}function c(e){var t=document.getElementById("loadClassResult");t.innerHTML+="<div class='alert alert-error'><button type='button' class='close' data-dismiss='alert'>×</button>Problem invoking hawtio.OSGiTools MBean. "+e+"</div>"}function d(n){var i=n.value;r.bundles=i,e.defaultBundleValues(a,r,i),r.row=e.findBundle(r.bundleId,i),Core.$apply(r),$(".accordion-body.collapse").hover(function(){$(this).css("overflow","visible")},function(){$(this).css("overflow","hidden")}),$("#bsn").tooltip({title:t(r.row.Headers["Bundle-SymbolicName"].Value),placement:"right"}),p(),h(),f()}function p(){var t=e.parseManifestHeader(r.row.Headers,"Import-Package");for(var i in r.row.ImportData){var o=t[i],a="<small><table><tr><td><strong>Imported Version=</strong>"+r.row.ImportData[i].ReportedVersion+"</td></tr>";if(void 0!==o)a+=n(o,!1),"optional"!==t[i].Dresolution&&$(document.getElementById("import."+i)).addClass("badge-info");else{$(document.getElementById("import."+i)).addClass("badge-important");var s=r.row.Headers["DynamicImport-Package"];void 0!==s&&(s=s.Value,a+="<tr><td>Dynamic Import. Imported due to:</td></tr>",a+="<tr><td><strong>DynamicImport-Package=</strong>"+s+"</td></tr>")}a+="</table></small>",$(document.getElementById("import."+i)).popover({title:"attributes and directives",content:a,trigger:"hover",html:!0}),t[i]=void 0}var l="";for(var i in t)void 0!==t[i]&&void 0===r.row.ExportData[i]&&(l+="<tr><td><div class='less-big badge badge-warning' id='unsatisfied."+i+"'>"+i+"</div></td></tr>");""!==l&&(l="<p/><p class='text-warning'>The following optional imports were not satisfied:<table>"+l+"</table></p>",document.getElementById("unsatisfiedOptionalImports").innerHTML=l);for(var i in t)if(void 0!==t[i]){var a="<small><table>";a+=n(t[i],!1),a+="</table></small>",$(document.getElementById("unsatisfied."+i)).popover({title:"attributes and directives",content:a,trigger:"hover",html:!0})}}function h(){var t=e.parseManifestHeader(r.row.Headers,"Export-Package");for(var i in r.row.ExportData){var o="<small><table><tr><td><strong>Exported Version=</strong>"+r.row.ExportData[i].ReportedVersion+"</td></tr>";o+=n(t[i],!0),o+="</table></small>",$(document.getElementById("export."+i)).popover({title:"attributes and directives",content:o,trigger:"hover",html:!0})}}function f(){if(void 0!==r.row.RegisteredServices&&0!==r.row.RegisteredServices.length||void 0!==r.row.ServicesInUse&&0!==r.row.ServicesInUse){var t=e.getSelectionServiceMBean(a);t&&l.request({type:"exec",mbean:t,operation:"listServices()"},Core.onSuccess(g))}}function g(t){var n=t.value;for(var o in n){var s=document.getElementById("registers.service."+o),u=document.getElementById("uses.service."+o);(void 0!==s&&null!==s||void 0!==u&&null!==u)&&l.request({type:"exec",mbean:e.getSelectionServiceMBean(a),operation:"getProperties",arguments:[o]},Core.onSuccess(function(e,t,o){return function(a){for(var s=a.value,l=Object.keys(s).sort(),u="<small><table>",c=0;c<l.length;c++){var d=s[l[c]];if(void 0!==d){var p=d.Value;p.length>15&&(p=p.replace(/[,]/g,",<br/> ")),u+="<tr><td valign='top'>"+l[c]+"</td><td>"+p+"</td></tr>"}}var h=n[e].BundleIdentifier;u+="<tr><td>Registered by</td><td>Bundle "+h+" <div class='less-big label'>"+r.bundles[h].SymbolicName+"</div></td></tr>",u+="</table></small>",void 0!==t&&null!==t&&(t.innerText=" "+i(n[e].objectClass),$(t).popover({title:"service properties",content:u,trigger:"hover",html:!0})),void 0!==o&&null!==o&&(o.innerText=" "+i(n[e].objectClass),$(o).popover({title:"service properties",content:u,trigger:"hover",html:!0}))}}(o,s,u)))}}function m(){var t=e.getSelectionBundleMBean(a);t&&l.request({type:"exec",mbean:t,operation:"listBundles()"},Core.onSuccess(d))}r.bundleId=s.bundleId,m(),r.showValue=function(e){switch(e){case"Bundle-Name":case"Bundle-SymbolicName":case"Bundle-Version":case"Export-Package":case"Import-Package":return!1;default:return!0}},r.executeLoadClass=function(t){var n=e.getHawtioOSGiToolsMBean(a);n?l.request({type:"exec",mbean:n,operation:"getLoadClassOrigin",arguments:[r.bundleId,t]},{success:function(n){var i,o,s=document.getElementById("loadClassResult"),l=n.value;-1===l?(i="",o="Class can not be loaded from this bundle."):(i="alert-success",o="Class is served from Bundle "+e.bundleLinks(a,l)),s.innerHTML+="<div class='alert "+i+"'><button type='button' class='close' data-dismiss='alert'>×</button>Loading class <strong>"+t+"</strong> in Bundle "+r.bundleId+". "+o+"</div>"},error:function(e){c(e)}}):u()},r.executeFindResource=function(t){var n=e.getHawtioOSGiToolsMBean(a);n?l.request({type:"exec",mbean:n,operation:"getResourceURL",arguments:[r.bundleId,t]},{success:function(e){var n,i,o=document.getElementById("loadClassResult"),a=e.value;null===a?(n="",i="Resource can not be found from this bundle."):(n="alert-success",i="Resource is available from: "+a),o.innerHTML+="<div class='alert "+n+"'><button type='button' class='close' data-dismiss='alert'>×</button>Finding resource <strong>"+t+"</strong> in Bundle "+r.bundleId+". "+i+"</div>"},error:function(e){c(e)}}):u()},r.startBundle=function(t){l.request([{type:"exec",mbean:e.getSelectionFrameworkMBean(a),operation:"startBundle",arguments:[t]}],Core.onSuccess(m))},r.stopBundle=function(t){l.request([{type:"exec",mbean:e.getSelectionFrameworkMBean(a),operation:"stopBundle",arguments:[t]}],Core.onSuccess(m))},r.updatehBundle=function(t){l.request([{type:"exec",mbean:e.getSelectionFrameworkMBean(a),operation:"updateBundle",arguments:[t]}],Core.onSuccess(m))},r.refreshBundle=function(t){l.request([{type:"exec",mbean:e.getSelectionFrameworkMBean(a),operation:"refreshBundle",arguments:[t]}],Core.onSuccess(m))},r.uninstallBundle=function(t){l.request([{type:"exec",mbean:e.getSelectionFrameworkMBean(a),operation:"uninstallBundle",arguments:[t]}],Core.onSuccess(function(){o.path("/osgi/bundle-list"),Core.$apply(r)}))}}])}(Osgi||(Osgi={}));var Osgi;!function(e){e._module.controller("Osgi.BundlesController",["$scope","workspace","jolokia",function(t,n,i){function r(e){angular.equals(t.result,e.value)||(t.selected.length=0,t.result=e.value,t.bundles=[],angular.forEach(t.result,function(e,n){var i={Identifier:e.Identifier,Name:"",SymbolicName:e.SymbolicName,State:e.State,Version:e.Version,LastModified:e.LastModified,Location:e.Location};e.Headers["Bundle-Name"]&&(i.Name=e.Headers["Bundle-Name"].Value),t.bundles.push(i)}),t.loading=!1,Core.$apply(t))}t.result={},t.bundles=[],t.selected=[],t.loading=!0,t.bundleUrl="",t.installDisabled=function(){return""===t.bundleUrl};var o=[{field:"Identifier",displayName:"Identifier",width:"48",headerCellTemplate:'<div ng-click="col.sort()" class="ngHeaderSortColumn {{col.headerClass}}" ng-style="{\'cursor\': col.cursor}" ng-class="{ \'ngSorted\': !noSortVisible }"><div class="ngHeaderText colt{{$index}} pagination-centered" title="Identifier"><i class="fa fa-tag"></i></div><div class="ngSortButtonDown" ng-show="col.showSortButtonDown()"></div><div class="ngSortButtonUp" ng-show="col.showSortButtonUp()"></div></div>'},{field:"State",displayName:"Bundle State",width:"24",headerCellTemplate:'<div ng-click="col.sort()" class="ngHeaderSortColumn {{col.headerClass}}" ng-style="{\'cursor\': col.cursor}" ng-class="{ \'ngSorted\': !noSortVisible }"><div class="ngHeaderText colt{{$index}} pagination-centered" title="State"><i class="fa fa-tasks"></i></div><div class="ngSortButtonDown" ng-show="col.showSortButtonDown()"></div><div class="ngSortButtonUp" ng-show="col.showSortButtonUp()"></div></div>',cellTemplate:'<div class="ngCellText" title="{{row.getProperty(col.field)}}"><i class="{{row.getProperty(col.field)}}"></i></div>'},{field:"Name",displayName:"Name",width:"***",cellTemplate:'<div class="ngCellText"><a href="#/osgi/bundle/{{row.entity.Identifier}}?p=container">{{row.getProperty(col.field)}}</a></div>'},{field:"SymbolicName",displayName:"Symbolic Name",width:"***",cellTemplate:'<div class="ngCellText"><a href="#/osgi/bundle/{{row.entity.Identifier}}?p=container">{{row.getProperty(col.field)}}</a></div>'},{field:"Version",displayName:"Version",width:"**"},{field:"Location",displayName:"Update Location",width:"***"}];t.gridOptions={data:"bundles",showFilter:!1,selectedItems:t.selected,selectWithCheckboxOnly:!0,columnDefs:o,filterOptions:{filterText:""}},t.onResponse=function(){i.request({type:"exec",mbean:e.getSelectionBundleMBean(n),operation:"listBundles()"},{success:r,error:r})},t.controlBundles=function(r){var o=t.selected.map(function(e){return e.Identifier});angular.isArray(o)||(o=[o]),i.request({type:"exec",mbean:e.getSelectionFrameworkMBean(n),operation:r,arguments:[o]},{success:t.onResponse,error:t.onResponse})},t.stop=function(){t.controlBundles("stopBundles([J)")},t.start=function(){t.controlBundles("startBundles([J)")},t.update=function(){t.controlBundles("updateBundles([J)")},t.refresh=function(){t.controlBundles("refreshBundles([J)")},t.uninstall=function(){t.controlBundles("uninstallBundles([J)")},t.install=function(){i.request({type:"exec",mbean:e.getSelectionFrameworkMBean(n),operation:"installBundle(java.lang.String)",arguments:[t.bundleUrl]},{success:function(r){console.log("Got: ",r),t.bundleUrl="",i.request({type:"exec",mbean:e.getSelectionFrameworkMBean(n),operation:"startBundle(long)",arguments:[r.value]},{success:t.onResponse,error:t.onResponse})},error:function(e){t.bundleUrl="",t.onResponse()}})},Core.register(i,t,{type:"exec",mbean:e.getSelectionBundleMBean(n),operation:"listBundles()"},Core.onSuccess(r))}])}(Osgi||(Osgi={}));var Osgi;!function(e){e._module.controller("Osgi.ConfigurationsController",["$scope","$routeParams","$location","workspace","jolokia",function(t,n,i,r,o){function a(n){var i={};angular.forEach(n,function(e){var t=e[0],n=e[1],r=m(t,n);v(t)||(r.hasValue=!0,r.kind=C.pid,i[t]=r)}),t.pids=i;var r=e.getSelectionConfigAdminMBean(t.workspace);r&&t.jolokia.execute(r,"getConfigurations","(service.factoryPid=*)",Core.onSuccess(s,k("Failed to load factory PID configurations: "))),d()}function s(n){var i=e.getSelectionConfigAdminMBean(t.workspace),r=t.pids;r&&i&&angular.forEach(n,function(n){var o=n[0],a=n[1];if(o&&!v(o)){var s=r[o];s&&(s.isFactoryInstance=!0,t.jolokia.execute(i,"getFactoryPid",o,Core.onSuccess(function(n){if(s.factoryPid=n,s.name=e.removeFactoryPidPrefix(o,n),n){var i=y(n,a,r);i&&(b(o,i,s),t.inFabricProfile&&e.getConfigurationProperties(t.workspace,t.jolokia,o,function(i){var r=Core.pathGet(i,["fabric.zookeeper.pid","Value"]);r&&(s.name=e.removeFactoryPidPrefix(r,n),s.zooKeeperPid=r,Core.$apply(t))}),Core.$apply(t))}})))}}),c()}function l(e){t.metaType=e,c()}function u(){var e=t.pids,n=[];angular.forEach(e,function(e,t){e.isFactoryInstance||n.push(e)}),t.configurations=n.sortBy("name"),Core.$apply(t)}function c(n){void 0===n&&(n=!0);var i=t.metaType;if(i){var r=e.configuration.pidMetadata,o=t.pids||{};angular.forEach(i.pids,function(e,t){var i=null,a=n?y(t,i):o[t];if(a){var s=e.factoryPidBundleIds;s&&s.length&&w(a),a.name=Core.pathGet(r,[t,"name"])||f(e.name)||t;var l=Core.pathGet(r,[t,"description"])||e.description;a.description=l}})}u()}function d(){if(t.pids)if(t.profileNotRunning&&t.profileMetadataMBean&&t.versionId&&t.profileId)o.execute(t.profileMetadataMBean,"metaTypeSummary",t.versionId,t.profileId,Core.onSuccess(l));else{var n=e.getMetaTypeMBean(t.workspace);n&&t.jolokia.execute(n,"metaTypeSummary",Core.onSuccess(l))}}function p(){if(t.configurations=[],t.profileNotRunning&&t.profileMetadataMBean&&t.versionId&&t.profileId)o.execute(t.profileMetadataMBean,"metaTypeSummary",t.versionId,t.profileId,Core.onSuccess(h,{silent:!0}));else if(t.jolokia){var n=e.getSelectionConfigAdminMBean(t.workspace);n&&t.jolokia.execute(n,"getConfigurations","(service.pid=*)",Core.onSuccess(a,k("Failed to load PID configurations: ")))}}function h(e){var n=e;if(n){var i={};angular.forEach(n.pids,function(e,t){if(e&&!v(t)){var n="mvn:"+t,r={pid:t,name:e.name,"class":"pid",description:e.description,bundle:n,kind:C.pid,pidLink:x(t)};i[t]=r}}),angular.forEach(i,function(e,t){var n=t.indexOf("-");if(n>0){var r=t.substring(0,n),o=t.substring(n+1,t.length),a=i[r];if(!a){var s=e.bundle;a=y(r,s,i)}a&&(b(t,a,e,r),e.name=o,i[r]=a,delete i[t])}}),t.pids=i}t.metaType=n,c(!1)}function f(e){return angular.forEach(["Fabric8 ","Apache "],function(t){e&&e.startsWith(t)&&e.length>t.length&&(e=e.substring(t.length))}),e}function g(t,n){var i=e.configuration.pidMetadata;return Core.pathGet(i,[t,"description"])||"pid: "+t+"\nbundle: "+n}function m(t,n){var i=e.configuration.pidMetadata,r={pid:t,name:Core.pathGet(i,[t,"name"])||t,"class":"pid",description:Core.pathGet(i,[t,"description"])||g(t,n),bundle:n,kind:C.pidNoValue,pidLink:x(t)};return r}function v(t){var n=!1;return angular.forEach(e.configuration.ignorePids,function(e){t.startsWith(e)&&(n=!0)}),n}function y(n,i,r){if(void 0===r&&(r=null),v(n))return e.log.info("ignoring pid "+n),null;r||(r=t.pids);var o=r[n];return o||(o=m(n,i),r[n]=o,u()),o}function b(e,t,n,i){void 0===i&&(i=null),w(t,i,e);var r=t.children;i&&(t.pidLink=x(i,!0)),r||(r={},t.children=r),r[e]=n}function w(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null),e.isFactory=!0,e["class"]="factoryPid",e.kind=C.factory,t||(t=e.factoryPid||""),n||(n=e.pid||""),t||(t=n,n=null),e.pidLink=x(t)}function x(n,i){return void 0===i&&(i=!1),e.createConfigPidLink(t,r,n,i)}function k(e){return{error:function(t){Core.notification("error",e+t.error||t),Core.defaultJolokiaErrorHandler(t)}}}t.selectedItems=[],t.grid={data:"configurations",showFilter:!1,showColumnMenu:!1,multiSelect:!1,filterOptions:{filterText:"",useExternalFilter:!1},selectedItems:t.selectedItems,showSelectionCheckbox:!1,displaySelectionCheckbox:!1,columnDefs:[{field:"Pid",displayName:"Configuration",cellTemplate:'<div class="ngCellText"><a ng-href="{{row.entity.pidLink}}" title="{{row.entity.description}}">{{row.entity.name}}</a></div>'}]};var C={factory:{"class":"badge badge-info",title:"Configuration factory used to create separate instances of the configuration"},pid:{"class":"badge badge-success",title:"Configuration which has a set of properties associated with it"},pidNoValue:{"class":"badge badge-warning",title:"Configuration which does not yet have any bound values"}};t.addPidDialog=new UI.Dialog,t.addPid=function(n){if(t.configurations.any(function(e){return e.pid==n}))return void Core.notification("error",'pid "'+n+'" already exists.');t.addPidDialog.close();var i=e.getHawtioConfigAdminMBean(t.workspace);if(i&&n){var r=JSON.stringify({});t.jolokia.execute(i,"configAdminUpdate",n,r,Core.onSuccess(function(e){Core.notification("success","Successfully created pid: "+n),p()}))}},t.$on("$routeChangeSuccess",function(e,t,n){setTimeout(p,50)}),p()}])}(Osgi||(Osgi={}));var Osgi;!function(e){e._module.controller("Osgi.FrameworkController",["$scope","$dialog","workspace",function(t,n,i){function r(e,t){Core.notification(e,t),a()}function o(e){t.startLevel=e.value.FrameworkStartLevel,t.initialBundleStartLevel=e.value.InitialBundleStartLevel,Core.$apply(t)}function a(){var t=e.getSelectionFrameworkMBean(i);if(t){var n=i.jolokia;n.request({type:"read",mbean:t},Core.onSuccess(o))}}t.editDialog=new UI.Dialog,a(),t.edit=function(e,n){t.editAttr=e,t.editDisplayName=n,t.editDialog.open()},t.edited=function(n,o,a){if(t.editDialog.close(),angular.isNumber(a)){var s=e.getSelectionFrameworkMBean(i);if(s){var l=i.jolokia;l.request({type:"write",mbean:s,attribute:n,value:a},{error:function(e){r("error",e.error)},success:function(e){r("success",o+" changed to "+a)}})}}}}])}(Osgi||(Osgi={}));var Osgi;!function(e){e.configuration={pidMetadata:{"io.fabric8.container.java":{name:"Java Container"},"io.fabric8.container.process":{name:"Process Container"},"io.fabric8.container.process.overlay.resources":{name:"Container Overlay Resources",description:"The resources overlaid over the distribution of the process",schemaExtensions:{disableHumanizeLabel:!0}},"io.fabric8.dosgi":{name:"Fabric8 DOSGi",description:"The configuration for the Distributed OSGi implementation in Fabric8"},"io.fabric8.environment":{name:"Environment Variables",description:"The operating system Environment Variables which are exported into any child processes",schemaExtensions:{disableHumanizeLabel:!0}},"io.fabric8.fab.osgi.url":{name:"FAB URL",description:"Configures the 'fab:' URL handler for deploying JARs as bundles"},"io.fabric8.mq.fabric.server":{name:"ActiveMQ Broker",description:"The configuration of the Apache ActiveMQ server configured via the fabric"},"io.fabric8.openshift":{name:"OpenShift"},"io.fabric8.ports":{name:"Ports",description:"The network ports exported by the container",schemaExtensions:{disableHumanizeLabel:!0}},"io.fabric8.system":{name:"System Properties",description:"The Java System Properties which are exported into any child Java processes",schemaExtensions:{disableHumanizeLabel:!0}},"io.fabric8.version":{name:"Versions",schemaExtensions:{disableHumanizeLabel:!0}},"org.ops4j.pax.logging":{name:"Logging",description:"The configuration of the logging subsystem"},"org.ops4j.pax.url.mvn":{name:"Maven URL",description:"Configures the Maven 'mvn:' URL handler for referencing maven artifacts"},"org.ops4j.pax.url.war":{name:"WAR URL",description:"Configures the 'war:' URL handler for referencing WAR deployments"},"org.ops4j.pax.url.wrap":{name:"Wrap URL",description:"Configures the 'wrap:' URL handler for wrapping JARs as bundles"}},ignorePids:["jmx.acl","io.fabric8.agent","io.fabric8.git","io.fabric8.mq.fabric.template","io.fabric8.openshift.agent","io.fabric8.service.ZkDataStoreImpl","org.apache.felix.fileinstall","org.apache.karaf.command.acl.","org.apache.karaf.service.acl."],tabs:{fabric8:{label:"Fabric8",description:"Configuration options for the Fabric8 services",pids:["io.fabric8"]},karaf:{label:"Karaf",description:"Configuration options for the Apache Karaf container and subsystem",pids:["org.apache.karaf"]}}}}(Osgi||(Osgi={}));var Osgi;!function(e){var t=function(){function e(e,t,n,i,r,o){this.filteredBundles={},this.bundles=null,this.services=null,this.packages=null,this.PREFIX_BUNDLE="Bundle-",this.PREFIX_SVC="Service-",this.PREFIX_PKG="Package-",this.osgiDataService=e,this.bundleFilter=t,this.packageFilter=n,this.showServices=i,this.showPackages=r,this.hideUnused=o,this.graphBuilder=new ForceGraph.GraphBuilder}return e.prototype.getBundles=function(){return null==this.bundles&&(this.bundles=this.osgiDataService.getBundles()),this.bundles},e.prototype.getServices=function(){return null==this.services&&(this.services=this.osgiDataService.getServices()),this.services},e.prototype.getPackages=function(){return null==this.packages&&(this.packages=this.osgiDataService.getPackages()),this.packages},e.prototype.bundleNodeId=function(e){return this.PREFIX_BUNDLE+e.Identifier},e.prototype.serviceNodeId=function(e){return this.PREFIX_SVC+e.Identifier},e.prototype.pkgNodeId=function(e){return this.PREFIX_PKG+e.Name+"-"+e.Version},e.prototype.buildSvcNode=function(e){return{id:this.serviceNodeId(e),name:""+e.Identifier,type:"service",used:!1,popup:{title:"Service ["+e.Identifier+"]",content:function(){var t="";return null!=e&&e.objectClass.forEach(function(e){t.length>0&&(t+="<br/>"),t+=e}),t}}}},e.prototype.buildBundleNode=function(e){return{id:this.bundleNodeId(e),name:e.SymbolicName,type:"bundle",used:!1,navUrl:"#/osgi/bundle/"+e.Identifier,popup:{title:"Bundle ["+e.Identifier+"]",content:"<p>"+e.SymbolicName+"<br/>Version "+e.Version+"</p>"}}},e.prototype.buildPackageNode=function(e){return{id:this.pkgNodeId(e),name:e.Name,type:"package",used:!1,popup:{title:"Package ["+e.Name+"]",content:"<p>"+e.Version+"</p>"}}},e.prototype.exportingBundle=function(e){var t=this,n=null;return e.ExportingBundles.forEach(function(e){null!=t.filteredBundles[t.PREFIX_BUNDLE+e]&&(n=e)}),n},e.prototype.addFilteredBundles=function(){var e=this;d3.values(this.getBundles()).forEach(function(t){if(null==e.bundleFilter||""==e.bundleFilter||t.SymbolicName.startsWith(e.bundleFilter)){var n=e.buildBundleNode(t);if(e.filteredBundles[n.id]=t,n.used=!0,e.graphBuilder.addNode(n),e.showServices){var i=e.getServices();t.RegisteredServices.forEach(function(t){var r=i[t];if(r){var o=e.buildSvcNode(i[t]);e.graphBuilder.addNode(o),e.graphBuilder.addLink(n.id,o.id,"registered")}})}}})},e.prototype.addFilteredServices=function(){var e=this;this.showServices&&d3.values(this.getBundles()).forEach(function(t){t.ServicesInUse.forEach(function(n){var i=e.PREFIX_SVC+n;if(null!=e.graphBuilder.getNode(i)){e.graphBuilder.getNode(i).used=!0;var r=e.graphBuilder.getNode(e.bundleNodeId(t))||e.buildBundleNode(t);r.used=!0,e.graphBuilder.addNode(r),e.graphBuilder.addLink(i,r.id,"inuse")}})})},e.prototype.addFilteredPackages=function(){var e=this;this.showPackages&&d3.values(this.getPackages()).forEach(function(t){if(null==e.packageFilter||""==e.packageFilter||t.Name.startsWith(e.packageFilter)){var n=e.exportingBundle(t);if(null!=n){var i=e.graphBuilder.getNode(e.PREFIX_BUNDLE+n);i.used=!0;var r=e.buildPackageNode(t);e.graphBuilder.addNode(r),e.graphBuilder.addLink(i.id,r.id,"registered"),t.ImportingBundles.forEach(function(t){var n=e.graphBuilder.getNode(e.PREFIX_BUNDLE+t)||e.buildBundleNode(e.getBundles()[t]);n.used=!0,r.used=!0,e.graphBuilder.addNode(n),e.graphBuilder.addLink(n.id,r.id,"inuse")})}}})},e.prototype.buildGraph=function(){var e=this;return this.addFilteredBundles(),this.addFilteredServices(),this.addFilteredPackages(),this.hideUnused&&(this.graphBuilder.filterNodes(function(e){return e.used}),this.graphBuilder.filterNodes(function(t){return e.graphBuilder.hasLinks(t.id)})),this.graphBuilder.buildGraph()},e}();e.OsgiGraphBuilder=t}(Osgi||(Osgi={}));var Osgi;!function(e){e.TopLevelController=e._module.controller("Osgi.TopLevelController",["$scope","workspace",function(t,n){t.frameworkMBean=e.getSelectionFrameworkMBean(n),t.bundleMBean=e.getSelectionBundleMBean(n),t.serviceMBean=e.getSelectionServiceMBean(n),t.packageMBean=e.getSelectionPackageMBean(n),t.configAdminMBean=e.getSelectionConfigAdminMBean(n),t.metaTypeMBean=e.getMetaTypeMBean(n),t.osgiToolsMBean=e.getHawtioOSGiToolsMBean(n),t.hawtioConfigAdminMBean=e.getHawtioConfigAdminMBean(n),t.scrMBean=Karaf.getSelectionScrMBean(n),t.featuresMBean=Karaf.getSelectionFeaturesMBean(n)}])}(Osgi||(Osgi={}));var Osgi;!function(e){e._module.controller("Osgi.PackageController",["$scope","$filter","workspace","$routeParams",function(t,n,i,r){function o(n){var r=e.defaultPackageValues(i,t,n.value);t.row=r.filter({Name:t["package"],Version:t.version})[0],Core.$apply(t)}function a(){var t=e.getSelectionPackageMBean(i);if(t){var n=i.jolokia;n.request({type:"exec",mbean:t,operation:"listPackages"},Core.onSuccess(o))}}t["package"]=r["package"],t.version=r.version,a()}])}(Osgi||(Osgi={}));var Osgi;!function(e){e.PackagesController=e._module.controller("Osgi.PackagesController",["$scope","$filter","workspace","$templateCache","$compile",function(t,n,i,r,o){function a(n){var r=e.defaultPackageValues(i,t,n.value);s(r)}function s(n){var r={},o=function(e){angular.forEach(e.value,function(e,t){var n={Identifier:e.Identifier,Name:"",SymbolicName:e.SymbolicName,State:e.State,Version:e.Version,LastModified:e.LastModified,Location:e.Location};e.Headers["Bundle-Name"]&&(n.Name=e.Headers["Bundle-Name"].Value),r[n.Identifier]=n}),angular.forEach(n,function(e,t){angular.forEach(e.ExportingBundles,function(t,n){e.ExportingBundles[n]=r[t]}),angular.forEach(e.ImportingBundles,function(t,n){e.ImportingBundles[n]=r[t]})}),t.packages=n,Core.$apply(t)};i.jolokia.request({type:"exec",mbean:e.getSelectionBundleMBean(i),operation:"listBundles()"},{success:o,error:o})}function l(){var t=e.getSelectionPackageMBean(i);if(t){var n=i.jolokia;n.request({type:"exec",mbean:t,operation:"listPackages"},Core.onSuccess(a))}}n("date");t.packages=[],t.selectedItems=[],t.mygrid={data:"packages",showFilter:!1,showColumnMenu:!1,filterOptions:{filterText:"",useExternalFilter:!1},selectedItems:t.selectedItems,rowHeight:32,selectWithCheckboxOnly:!0,columnDefs:[{field:"Name",displayName:"Name",width:"***"},{field:"VersionLink",displayName:"Version",width:"***"},{field:"RemovalPending",displayName:"Removal Pending",width:"***"}]},t.$watch("workspace.selection",function(){l()})}])}(Osgi||(Osgi={}));var Osgi;!function(e){e._module.controller("Osgi.PidController",["$scope","$timeout","$routeParams","$location","workspace","jolokia",function(t,n,i,r,o,a){function s(n,i,o){var a=function(n){if(Core.notification("success","Successfully updated pid: "+i),i&&t.factoryPid&&t.newPid){var o=e.createConfigPidPath(t,i);r.path(o)}else t.setEditMode(!1),t.canSave=!1,t.saved=!0},s=Core.onSuccess(a,l("Failed to update: "+i)),u=JSON.stringify(o);t.jolokia.execute(n,"configAdminUpdate",i,u,s)}function l(e){return{error:function(t){Core.notification("error",e+"\n"+t.error||t),Core.defaultJolokiaErrorHandler(t)}}}function u(){t.editMode&&(t.canSave=!0)}function c(e){t.modelLoaded=!0;var n=e||{};t.configValues=n,t.zkPid=Core.pathGet(n,["fabric.zookeeper.pid","Value"]),t.zkPid&&t.saved||d()}function d(){h();var n=t.configValues;if(n)if(t.profileNotRunning&&t.profileMetadataMBean&&t.versionId&&t.profileId){var i=t.factoryPid||t.pid;a.execute(t.profileMetadataMBean,"getPidMetaTypeObject",t.versionId,t.profileId,i,Core.onSuccess(p))}else{var r=null,i=null,o=n["service.factoryPid"];o&&!i&&(i=o.Value);var s=e.getMetaTypeMBean(t.workspace);s&&t.jolokia.execute(s,"getPidMetaTypeObject",i,r,Core.onSuccess(p))}Core.$apply(t)}function p(e){t.metaType=e,h(),Core.$apply(t)}function h(){var n={},i=[];t.defaultValues={};var r={type:"object",required:i,properties:n},o="span12",a="control-label",s="",l=a,u=t.metaType;if(u){var c=e.configuration.pidMetadata,d=u.id;r.id=d,r.name=Core.pathGet(c,[d,"name"])||u.name,r.description=Core.pathGet(c,[d,"description"])||u.description;var p=Core.pathGet(c,[d,"schemaExtensions","disableHumanizeLabel"]);angular.forEach(u.attributes,function(e){var r=e.id;if(g(r)){var u=m(r,d),c=y(e.typeName,e.id),h={title:e.name,tooltip:e.description,"input-attributes":{"class":o},"label-attributes":{"class":a},type:c};p&&(h.title=r),"char"===e.typeName&&(h.maxLength=1,h.minLength=1);var f=e.cardinality;f&&(h["input-attributes"]["class"]=null,h.type="array",h.items={"input-attributes":{"class":s},"label-attributes":{"class":l},type:c}),e.required&&i.push(r);var v=e.defaultValue;v&&(angular.isArray(v)&&1===v.length&&(v=v[0]),t.defaultValues[u]=v);var b=e.optionLabels,w=e.optionValues;if(b&&b.length&&w&&w.length){for(var x={},k=0;k<b.length;k++){var C=b[k],S=w[k];x[S]=C}t.selectValues[u]=x,Core.pathSet(h,["input-element"],"select"),Core.pathSet(h,["input-attributes","ng-options"],"key as value for (key, value) in selectValues."+u)}n[u]=h}});var h=Core.pathGet(e.configuration.pidMetadata,[d,"schemaExtensions"]);h&&f(r,h)}var v={};angular.forEach(t.configValues,function(e,t){if(g(t)){var i=m(t,d),r=e,s="string";angular.isObject(e)&&(r=e.Value,s=y(e.Type,t));var l=n[i];if(l){var u=l.type;"array"===u&&(angular.isArray(r)||(r=r?r.split(","):[]))}else l={"input-attributes":{"class":o},"label-attributes":{"class":a},type:s},n[i]=l,"org.osgi.service.http.port"==t&&(n[i]["input-attributes"].disabled="disabled",n[i]["input-attributes"].title="Changing port of OSGi http service is not possible from Hawtio");p&&(l.title=t),i=i.replace(/-/g,"_"),v[i]=r}}),angular.forEach(t.defaultValues,function(e,t){var n=v[t];angular.isDefined(n)||(v[t]=e)}),t.entity=v,t.schema=r,t.fullSchema=r;
|
|
3279
|
|
-}function f(e,t){angular.isObject(e)&&angular.isObject(t)&&angular.forEach(t,function(t,n){if(angular.isObject(t)){var i=e[n];i||(i={},e[n]=i),f(i,t)}else e[n]=t})}function g(e){return e&&k.indexOf(e)<0}function m(e,t){return e.replace(/\./g,"__")}function v(e,t){return e.replace(/__/g,".")}function y(e,t){if(e){var n=e.toLowerCase();return n.startsWith("int")||"long"===n||"short"===n||"byte"===n||n.endsWith("int")?"integer":"double"===n||"float"===n||"bigdecimal"===n?"number":"string"===n?t&&t.endsWith("password")?"password":"string":e}return"string"}function b(){t.modelLoaded=!1,e.getConfigurationProperties(t.workspace,t.jolokia,t.pid,c)}if(t.deletePropDialog=new UI.Dialog,t.deletePidDialog=new UI.Dialog,t.addPropertyDialog=new UI.Dialog,t.factoryPid=i.factoryPid,t.pid=i.pid,t.createForm={pidInstanceName:null},t.newPid=t.factoryPid&&!t.pid,t.newPid&&(t.editMode=!0),t.pid&&!t.factoryPid){var w=t.pid.indexOf("-");w>0&&(t.factoryPid=t.pid.substring(0,w),t.factoryInstanceName=t.pid.substring(w+1,t.pid.length))}t.selectValues={},t.modelLoaded=!1,t.canSave=!1,t.setEditMode=function(e){t.editMode=e,t.formMode=e?"edit":"view",e&&t.entity||(t.entity={},b())};var x=t.factoryPid&&!i.pid;t.setEditMode(x),t.$on("hawtio.form.modelChange",function(){t.modelLoaded&&(u(),Core.$apply(t))}),t.pidSave=function(){var n={};angular.forEach(t.entity,function(e,i){var r=void 0;angular.isString(e)?r=e:angular.isDefined(e)&&(r=e.toString()),angular.isDefined(r)&&(n[v(i,t.pid)]=r)});var i=e.getHawtioConfigAdminMBean(o);if(i||t.inFabricProfile){var r=e.getSelectionConfigAdminMBean(t.workspace),a=t.pid,u=t.zkPid,c=t.factoryPid;if(!t.inFabricProfile&&c&&r&&!u)t.jolokia.execute(r,"createFactoryConfiguration",c,Core.onSuccess(function(e){a=e,a&&s(i,a,n)},l("Failed to create new PID: ")));else{if(t.newPid){var d=t.createForm.pidInstanceName;if(!d||!c)return;a=c+"-"+d}else u&&(a=u);s(i,a,n)}}},t.addPropertyConfirmed=function(e,n){t.addPropertyDialog.close(),t.configValues[e]={Key:e,Value:n,Type:"String"},u(),h()},t.deletePidProp=function(e){t.deleteKey=e.Key,t.deletePropDialog.open()},t.deletePidPropConfirmed=function(){t.deletePropDialog.close();var e=document.getElementById("pid."+t.deleteKey);e.parentElement.remove(),u()},t.deletePidConfirmed=function(){function n(e){Core.notification("error",e.error)}function i(e){Core.notification("success","Successfully deleted pid: "+t.pid),r.path(t.configurationsLink)}t.deletePidDialog.close();var o=e.getSelectionConfigAdminMBean(t.workspace);o&&t.jolokia.request({type:"exec",mbean:o,operation:"delete",arguments:[t.pid]},{error:n,success:i})};var k=["service.pid","service.factoryPid","fabric.zookeeper.pid"];b()}])}(Osgi||(Osgi={}));var Osgi;!function(e){e.ServiceController=e._module.controller("Osgi.ServiceController",["$scope","$filter","workspace","$templateCache","$compile",function(t,n,i,r,o){function a(n){var r={},o=function(e){angular.forEach(e.value,function(e,t){var n={Identifier:e.Identifier,Name:"",SymbolicName:e.SymbolicName,State:e.State,Version:e.Version,LastModified:e.LastModified,Location:e.Location};e.Headers["Bundle-Name"]&&(n.Name=e.Headers["Bundle-Name"].Value),r[n.Identifier]=n}),angular.forEach(n,function(e,t){angular.forEach(e.UsingBundles,function(t,n){e.UsingBundles[n]=r[t]})}),t.services=n,Core.$apply(t)};i.jolokia.request({type:"exec",mbean:e.getSelectionBundleMBean(i),operation:"listBundles()"},{success:o,error:o})}n("date");t.services=[],t.selectedItems=[],t.mygrid={data:"services",showFilter:!1,showColumnMenu:!1,filterOptions:{filterText:"",useExternalFilter:!1},selectedItems:t.selectedItems,rowHeight:32,selectWithCheckboxOnly:!0,columnDefs:[{field:"Identifier",displayName:"ID",width:"***"},{field:"BundleIdentifier",displayName:"Bundle",width:"***"},{field:"objectClass",displayName:"Object Class(es)",width:"***"}]},t.$watch("workspace.selection",function(){var t=e.getSelectionServiceMBean(i);if(t){var n=i.jolokia;n.request({type:"exec",mbean:t,operation:"listServices()"},Core.onSuccess(s))}});var s=function(n){var r=e.defaultServiceValues(i,t,n.value);a(r)}}])}(Osgi||(Osgi={}));var Osgi;!function(e){e._module.controller("Osgi.ServiceDependencyController",["$scope","$location","$routeParams","workspace","osgiDataService",function(t,n,i,r,o){t.init=function(){i.bundleFilter?t.bundleFilter=i.bundleFilter:t.bundleFilter="",i.pkgFilter?t.packageFilter=i.pkgFilter:t.packageFilter="","packages"==i.view?t.selectView="packages":t.selectView="services",i.hideUnused?t.hideUnused="true"==i.hideUnused:t.hideUnused=!0},t.updateLink=function(){var e=n.search();t.bundleFilter&&""!=t.bundleFilter?e.bundleFilter=t.bundleFilter:delete e.bundleFilter,t.packageFilter&&""!=t.packageFilter?e.pkgFilter=t.packageFilter:delete e.pkgFilter,e.view=t.selectView,t.hideUnused?e.hideUnused="true":e.hideUnused="false",n.search(e)},t.addToDashboardLink=function(){var e=angular.toJson(i),t="#/osgi/dependencies",n="OSGi dependencies",r=angular.toJson({size_x:2,size_y:2}),o="#/dashboard/add?tab=dashboard&href="+encodeURIComponent(t)+"&routeParams="+encodeURIComponent(e)+"&size="+encodeURIComponent(r)+"&title="+encodeURIComponent(n);return o},t.$on("$routeUpdate",function(){var e=n.search;e.bundleFilter?t.bundleFilter=i.bundleFilter:t.bundleFilter="",e.pkgFilter?t.packageFilter=i.pkgFilter:t.packageFilter="","packages"==e.view?t.selectView="packages":t.selectView="services",e.hideUnused?t.hideUnused="true"==i.hideUnused:t.hideUnused=!0,t.updateLink(),t.updateGraph()}),t.updateGraph=function(){t.updateLink(),t.updatePkgFilter();var n=new e.OsgiGraphBuilder(o,t.bundleFilter,t.packageFilter,"services"==t.selectView,"packages"==t.selectView,t.hideUnused);t.graph=n.buildGraph(),Core.$apply(t)},t.updatePkgFilter=function(){null==t.packageFilter||""==t.packageFilter?(t.selectView="services",t.disablePkg=!0):t.disablePkg=!1},t.init(),t.updateGraph()}])}(Osgi||(Osgi={})),angular.module("hawtio-integration-templates",[]).run(["$templateCache",function(e){e.put("plugins/activemq/html/browseQueue.html",'<div ng-controller="ActiveMQ.BrowseQueueController">\n <div class="row">\n <div class="col-md-6">\n <input class="search-query col-md-12" type="text" ng-model="gridOptions.filterOptions.filterText"\n placeholder="Filter messages">\n </div>\n <div class="col-md-6">\n <div class="pull-right">\n <form class="form-inline">\n <button class="btn" ng-disabled="!gridOptions.selectedItems.length" ng-show="dlq" ng-click="retryMessages()"\n title="Moves the dead letter queue message back to its original destination so it can be retried" data-placement="bottom">\n <i class="fa fa-reply"></i> Retry\n </button>\n <button class="btn" ng-disabled="gridOptions.selectedItems.length !== 1" ng-click="resendMessage()"\n title="Edit the message to resend it" data-placement="bottom">\n <i class="fa fa-share-alt"></i> Resend\n </button>\n\n <button class="btn" ng-disabled="!gridOptions.selectedItems.length" ng-click="moveMessages()"\n title="Move the selected messages to another destination" data-placement="bottom">\n <i class="fa fa-share-alt"></i> Move\n </button>\n <button class="btn" ng-disabled="!gridOptions.selectedItems.length"\n ng-click="deleteMessages()"\n title="Delete the selected messages">\n <i class="fa fa-remove"></i> Delete\n </button>\n <button class="btn" ng-click="refresh()"\n title="Refreshes the list of messages">\n <i class="fa fa-refresh"></i>\n </button>\n </form>\n </div>\n </div>\n </div>\n\n <div class="row">\n <table class="table table-striped" hawtio-simple-table="gridOptions"></table>\n </div>\n\n <div hawtio-slideout="showMessageDetails" title="{{row.JMSMessageID}}">\n <div class="dialog-body">\n\n <div class="row">\n <div class="pull-right">\n <form class="form-horizontal no-bottom-margin">\n\n <div class="btn-group"\n hawtio-pager="messages"\n on-index-change="selectRowIndex"\n row-index="rowIndex"></div>\n\n <button class="btn" ng-disabled="!gridOptions.selectedItems.length" ng-click="moveMessages()"\n title="Move the selected messages to another destination" data-placement="bottom">\n <i class="fa fa-share-alt"></i> Move\n </button>\n\n <button class="btn btn-danger" ng-disabled="!gridOptions.selectedItems.length"\n ng-click="deleteMessages()"\n title="Delete the selected messages">\n <i class="fa fa-remove"></i> Delete\n </button>\n\n <!-- no need for close button as the hawtio-slideout already have that -->\n\n </form>\n </div>\n </div>\n\n <div class="row">\n <div class="expandable closed">\n <div title="Headers" class="title">\n <i class="expandable-indicator"></i> Headers & Properties\n </div>\n <div class="expandable-body well">\n <table class="table table-condensed table-striped">\n <thead>\n <tr>\n <th>Header</th>\n <th>Value</th>\n </tr>\n </thead>\n <tbody compile="row.headerHtml"></tbody>\n </table>\n </div>\n </div>\n </div>\n\n <div class="row">\n <div>Displaying body as <span ng-bind="row.textMode"></span></div>\n <div hawtio-editor="row.bodyText" read-only="true" mode=\'mode\'></div>\n </div>\n\n </div>\n </div>\n\n <script type="text/ng-template" id="activemqMoveMessageDialog.html">\n <div class="modal-header">\n <span>Move messages?</span>\n </div>\n <div class="modal-body">\n <p>Move\n <ng-pluralize count="gridOptions.selectedItems.length"\n when="{\'1\': \'message\', \'other\': \'{} messages\'}"></ng-pluralize>\n to: <input type="text" ng-model="queueName" placeholder="Queue name"\n typeahead="title.unescapeHTML() for title in queueNames($viewValue) | filter:$viewValue" typeahead-editable=\'true\'></p>\n <p>\n You cannot undo this operation.<br>\n Though after the move you can always move the\n <ng-pluralize count="gridOptions.selectedItems.length"\n when="{\'1\': \'message\', \'other\': \'messages\'}"></ng-pluralize>\n back again.\n </p>\n </div>\n <div class="modal-footer">\n <button class="btn btn-info" \n ng-click="close(true)">Move</button>\n <button class="btn" \n ng-click="close(false)">Cancel</button>\n </div>\n </script>\n\n</div>\n\n'),e.put("plugins/activemq/html/createDestination.html",'<form class="form-horizontal" ng-controller="ActiveMQ.DestinationController">\n\n <div class="alert alert-info">\n <span class="pficon pficon-info"></span>The JMS API does not define a standard address syntax. <p></p> Although a\n standard address syntax was considered, it was decided that the differences in address semantics between existing\n message-oriented middleware (MOM) products were too wide to bridge with a single syntax.\n </div>\n\n <div class="form-group">\n <label class="col-sm-2 control-label" for="name-markup">{{destinationTypeName}} name</label>\n\n <div class="col-sm-10">\n <input id="name-markup" class="form-control" type="text" size="60" style="margin-left:15px;" maxlength="300"\n name="destinationName" ng-model="destinationName" placeholder="{{destinationTypeName}} name"/>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-2 control-label">Destination type</label>\n\n <div class="col-sm-10">\n <label class="checkbox">\n <input type="radio" ng-model="queueType" value="true"> Queue\n </label>\n <label class="checkbox">\n <input type="radio" ng-model="queueType" value="false"> Topic\n </label>\n </div>\n </div>\n\n <div class="control-group col-md-12">\n <button type="submit" class="btn btn-primary" ng-click="createDestination(destinationName, queueType)"\n ng-disabled="!destinationName">Create {{destinationTypeName}}\n </button>\n </div>\n\n</form>\n'),e.put("plugins/activemq/html/deleteQueue.html",'<div ng-controller="ActiveMQ.DestinationController">\n <div class="row">\n\n <div class="control-group">\n\n <div class="alert alert-warning">\n <span class="pficon-layered">\n <span class="pficon pficon-warning-triangle"></span>\n <span class="pficon pficon-warning-exclamation"></span>\n </span>\n <strong>Warning:</strong> these operations cannot be undone. Please be careful!\n </div>\n </div>\n </div>\n\n <div class="row">\n <div class="col-md-4">\n <div class="control-group">\n <button type="submit" class="btn btn-warning" ng-click="deleteDialog = true">Delete queue\n \'{{name().unescapeHTML()}}\'\n </button>\n <label>This will remove the queue completely.</label>\n </div>\n </div>\n <div class="col-md-4">\n <div class="control-group">\n <button type="submit" class="btn btn-warning" ng-click="purgeDialog = true">Purge queue\n \'{{name().unescapeHTML()}}\'\n </button>\n <label>Purges all the current messages on the queue.</label>\n </div>\n </div>\n </div>\n\n <div hawtio-confirm-dialog="deleteDialog"\n title="Confirm delete queue"\n ok-button-text="Delete"\n cancel-button-text="Cancel"\n on-ok="deleteDestination()">\n <div class="dialog-body">\n <p>You are about to delete the <b>{{name().unescapeHTML()}}</b> queue</p>\n <p>This operation cannot be undone so please be careful.</p>\n </div>\n </div>\n\n <div hawtio-confirm-dialog="purgeDialog"\n title="Confirm purge queue"\n ok-button-text="Purge"\n cancel-button-text="Cancel"\n on-ok="purgeDestination()">\n <div class="dialog-body">\n <p>You are about to purge the <b>{{name().unescapeHTML()}}</b> queue</p>\n <p>This operation cannot be undone so please be careful.</p>\n </div>\n </div>\n\n</div>\n'),e.put("plugins/activemq/html/deleteTopic.html",'<div ng-controller="ActiveMQ.DestinationController">\n <div class="row">\n\n <div class="control-group">\n\n <div class="alert alert-warning">\n <span class="pficon-layered">\n <span class="pficon pficon-warning-triangle"></span>\n <span class="pficon pficon-warning-exclamation"></span>\n </span>\n <strong>Warning:</strong> this operation cannot be undone. Please be careful!\n </div>\n </div>\n </div>\n\n <div class="row">\n <div class="col-md-4">\n <div class="control-group">\n <button type="submit" class="btn btn-warning" ng-click="deleteDialog = true">Delete topic\n \'{{name().unescapeHTML()}}\'\n </button>\n <label>This will remove the topic completely.</label>\n </div>\n </div>\n </div>\n\n <div hawtio-confirm-dialog="deleteDialog"\n title="Confirm delete topic"\n ok-button-text="Delete"\n cancel-button-text="Cancel"\n on-ok="deleteDestination()">\n <div class="dialog-body">\n <p>You are about to delete the <b>{{name().unescapeHTML()}}</b> topic</p>\n <p>This operation cannot be undone so please be careful.</p>\n </div>\n </div>\n\n</div>\n'),e.put("plugins/activemq/html/durableSubscribers.html",'<div ng-controller="ActiveMQ.DurableSubscriberController">\n\n <div class="row">\n <div class="col-md-12">\n <div class="pull-right">\n <form class="form-inline">\n <button class="btn" ng-click="createSubscriberDialog.open()"\n hawtio-show object-name="{{workspace.selection.objectName}}" method-name="createDurableSubscriber"\n title="Create durable subscriber">\n <i class="fa fa-plus"></i> Create\n </button>\n <button class="btn" ng-click="deleteSubscriberDialog.open()"\n hawtio-show object-name="{{$scope.gridOptions.selectedItems[0]._id}}" method-name="destroy"\n title="Destroy durable subscriber" ng-disabled="gridOptions.selectedItems.length != 1">\n <i class="fa fa-exclamation"></i> Destroy\n </button>\n <button class="btn" ng-click="refresh()"\n title="Refreshes the list of subscribers">\n <i class="fa fa-refresh"></i>\n </button>\n </form>\n </div>\n </div>\n </div>\n\n <div class="row">\n <div class="gridStyle" ng-grid="gridOptions"></div>\n </div>\n\n <div modal="createSubscriberDialog.show">\n <form name="createSubscriber" class="form-horizontal no-bottom-margin" ng-submit="doCreateSubscriber(clientId, subscriberName, topicName, subSelector)">\n <div class="modal-header"><h4>Create Durable Subscriber</h4></div>\n <div class="modal-body">\n <label>Client Id: </label>\n <input name="clientId" class="input-xlarge" type="text" ng-model="clientId" required>\n <label>Subscriber name: </label>\n <input name="subscriberName" class="input-xlarge" type="text" ng-model="subscriberName" required>\n <label>Topic name: </label>\n <input name="topicName" class="input-xlarge" type="text" ng-model="topicName" required typeahead="title for title in topicNames($viewValue) | filter:$viewValue" typeahead-editable=\'true\'>\n <label>Selector: </label>\n <input name="subSelector" class="input-xlarge" type="text" ng-model="subSelector">\n </div>\n <div class="modal-footer">\n <input class="btn btn-success" type="submit" value="Create">\n <input class="btn btn-primary" type="button" ng-click="createSubscriberDialog.close()" value="Cancel">\n </div>\n </form>\n </div>\n\n <div hawtio-slideout="showSubscriberDialog.show" title="Details">\n <div class="dialog-body">\n\n <div class="row">\n <div class="pull-right">\n <form class="form-inline">\n\n <button class="btn btn-danger" ng-disabled="showSubscriberDialog.subscriber.Status == \'Active\'"\n ng-click="deleteSubscriberDialog.open()"\n title="Delete subscriber">\n <i class="fa fa-remove"></i> Delete\n </button>\n\n <button class="btn" ng-click="showSubscriberDialog.close()" title="Close this dialog">\n <i class="fa fa-remove"></i> Close\n </button>\n\n </form>\n </div>\n </div>\n\n <div class="row">\n <div class="expandable-body well">\n <table class="table table-condensed table-striped">\n <thead>\n <tr>\n <th>Property</th>\n <th>Value</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td class="property-name">Client Id</td>\n <td class="property-value">{{showSubscriberDialog.subscriber["ClientId"]}}</td>\n </tr>\n <tr>\n <td class="property-name">Subscription Name</td>\n <td class="property-value">{{showSubscriberDialog.subscriber["SubscriptionName"]}}</td>\n </tr>\n <tr>\n <td class="property-name">Topic Name</td>\n <td class="property-value">{{showSubscriberDialog.subscriber["DestinationName"]}}</td>\n </tr>\n <tr>\n <td class="property-name">Selector</td>\n <td class="property-value">{{showSubscriberDialog.subscriber["Selector"]}}</td>\n </tr>\n <tr>\n <td class="property-name">Status</td>\n <td class="property-value">{{showSubscriberDialog.subscriber.Status}}</td>\n </tr>\n <tr>\n <td class="property-name">Enqueue Counter</td>\n <td class="property-value">{{showSubscriberDialog.subscriber["EnqueueCounter"]}}</td>\n </tr>\n <tr>\n <td class="property-name">Dequeue Counter</td>\n <td class="property-value">{{showSubscriberDialog.subscriber["DequeueCounter"]}}</td>\n </tr>\n <tr>\n <td class="property-name">Dispatched Counter</td>\n <td class="property-value">{{showSubscriberDialog.subscriber["DispatchedCounter"]}}</td>\n </tr>\n <tr>\n <td class="property-name">Pending Size</td>\n <td class="property-value">{{showSubscriberDialog.subscriber["PendingQueueSize"]}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n\n </div>\n\n </div>\n\n <div hawtio-confirm-dialog="deleteSubscriberDialog.show" ok-button-text="Yes" cancel-button-text="No" on-ok="deleteSubscribers()">\n <div class="dialog-body">\n <p>Are you sure you want to delete the subscriber</p>\n </div>\n </div>\n\n</div>'),e.put("plugins/activemq/html/jobs.html",'<div ng-controller="ActiveMQ.JobSchedulerController">\n\n <div class="row">\n <div class="col-md-12">\n <div class="pull-right">\n <form class="form-inline">\n <button class="btn" ng-disabled="!gridOptions.selectedItems.length"\n hawtio-show object-name="{{workspace.selection.objectName}}" method-name="removeJob"\n ng-click="deleteJobsDialog.open()"\n title="Delete the selected jobs">\n <i class="fa fa-remove"></i> Delete\n </button>\n <button class="btn" ng-click="refresh()"\n title="Refreshes the list of subscribers">\n <i class="fa fa-refresh"></i>\n </button>\n </form>\n </div>\n </div>\n </div>\n\n <div class="row">\n <div class="gridStyle" ng-grid="gridOptions"></div>\n </div>\n\n <div hawtio-confirm-dialog="deleteJobsDialog.show" ok-button-text="Yes" cancel-button-text="No" on-ok="deleteJobs()">\n <div class="dialog-body">\n <p>Are you sure you want to delete the jobs</p>\n </div>\n </div>\n\n</div>'),e.put("plugins/activemq/html/layoutActiveMQTree.html",'<script type="text/ng-template" id="ActiveMQTreeHeader.html">\n <div class="tree-header" ng-controller="ActiveMQ.TreeHeaderController">\n <div class="left">\n </div>\n <div class="right">\n <i class="fa fa-chevron-down clickable"\n title="Expand all nodes"\n ng-click="expandAll()"></i>\n <i class="fa fa-chevron-up clickable"\n title="Unexpand all nodes"\n ng-click="contractAll()"></i>\n </div>\n </div>\n</script>\n\n<hawtio-pane position="left" width="300" header="ActiveMQTreeHeader.html">\n <div id="tree-container"\n ng-controller="Jmx.MBeansController">\n <div id="activemqtree"\n ng-controller="ActiveMQ.TreeController"></div>\n </div>\n</hawtio-pane>\n<div class="row">\n <!--\n <ng-include src="\'plugins/jmx/html/subLevelTabs.html\'"></ng-include>\n -->\n <div id="properties" ng-view></div>\n</div>\n'),e.put("plugins/activemq/html/preferences.html",'<div ng-controller="ActiveMQ.PreferencesController">\n <div hawtio-form-2="config" entity="entity"></div>\n</div>\n'),e.put("plugins/camel/html/attributeToolBarContext.html",'<div class="row">\n <div class="col-md-6" ng-controller="Camel.AttributesToolBarController">\n <div class="control-group">\n <button class="btn" ng-disabled="!anySelectionHasState([\'stop\', \'suspend\'])" ng-click="start()"><i\n class="fa fa-play-circle"></i> Start\n </button>\n <button class="btn" ng-disabled="!anySelectionHasState(\'start\')" ng-click="pause()"><i class="fa fa-pause"></i>\n Pause\n </button>\n <button class="btn" ng-disabled="!anySelectionHasState([\'start\', \'suspend\'])" ng-click="deleteDialog = true"><i\n class="fa fa-remove"></i> Destroy\n </button>\n </div>\n\n <div hawtio-confirm-dialog="deleteDialog"\n ok-button-text="Delete"\n on-ok="stop()">\n <div class="dialog-body">\n <p>You are about to delete this Camel Context.</p>\n <p>This operation cannot be undone so please be careful.</p>\n </div>\n </div>\n\n </div>\n <div class="col-md-6">\n <div class="control-group">\n <input class="col-md-12 search-query" type="text" ng-model="$parent.gridOptions.filterOptions.filterText" placeholder="Filter...">\n </div>\n </div>\n</div>\n'),e.put("plugins/camel/html/attributeToolBarRoutes.html",'<div class="row">\n <div class="col-md-6">\n <div class="control-group" ng-controller="Camel.AttributesToolBarController">\n <button class="btn" ng-disabled="!anySelectionHasState([\'stop\', \'suspend\'])" ng-click="start()"><i class="fa fa-play-circle"></i> Start</button>\n <button class="btn" ng-disabled="!anySelectionHasState(\'start\')" ng-click="pause()"><i class="fa fa-pause"></i> Pause</button>\n <button class="btn" ng-disabled="!anySelectionHasState([\'start\', \'suspend\'])" ng-click="stop()"><i class="fa fa-off"></i> Stop</button>\n <button class="btn" ng-disabled="!everySelectionHasState(\'stop\')" ng-click="delete()"><i class="fa fa-remove"></i> Delete</button>\n </div>\n </div>\n <div class="col-md-6">\n <div class="control-group">\n <input type="text" class="col-md-12 search-query" ng-model="$parent.gridOptions.filterOptions.filterText" placeholder="Filter...">\n </div>\n </div>\n</div>\n'),e.put("plugins/camel/html/breadcrumbBar.html",'<div ng-hide="inDashboard" class="logbar logbar-wiki" ng-controller="Camel.BreadcrumbBarController">\n <div class="wiki logbar-container">\n <ul class="nav nav-tabs">\n <li class="" >\n <a class="breadcrumb-link">\n <span class="contained c-medium">Camel Contexts</span>\n </a>\n </li>\n <li class="dropdown" ng-repeat="breadcrumb in breadcrumbs">\n <a ng-show="breadcrumb.items.length > 0" href="#" class="breadcrumb-link dropdown-toggle" data-toggle="dropdown"\n data-placement="bottom" title="{{breadcrumb.tooltip}}">\n {{breadcrumb.name}}\n <span class="caret"></span>\n </a>\n <ul class="dropdown-menu">\n <li ng-repeat="item in breadcrumb.items">\n <a ng-href="{{item.link}}{{hash}}"\n title="Switch to {{item.name}} "\n data-placement="bottom">\n {{item.name}}</a>\n </li>\n </ul>\n </li>\n <li class="pull-right" ng-show="treeViewLink" title="Switch to the tree based explorer view">\n <a href="{{treeViewLink}}"><i class="fa fa-resize-full"></i></a>\n </li>\n </ul>\n </div>\n</div>\n'),e.put("plugins/camel/html/browseEndpoint.html",'<div ng-controller="Camel.BrowseEndpointController">\n <div ng-hide="isJmxTab">\n <ng-include src="\'plugins/camel/html/breadcrumbBar.html\'"></ng-include>\n </div>\n <div ng-class="{\'wiki-fixed\' : !isJmxTab}">\n <div class="row">\n <div class="col-md-6">\n <input class="search-query col-md-12" type="text" ng-model="gridOptions.filterOptions.filterText"\n placeholder="Filter messages">\n </div>\n <div class="col-md-6">\n <div class="pull-right">\n <form class="form-inline">\n <button class="btn" ng-disabled="!gridOptions.selectedItems.length" ng-click="forwardDialog.open()"\n hawtio-show object-name="{{workspace.selection.objectName}}" method-name="sendBodyAndHeaders"\n title="Forward the selected messages to another endpoint" data-placement="bottom">\n <i class="fa fa-forward"></i> Forward\n </button>\n <button class="btn" ng-click="refresh()"\n title="Refreshes the list of messages">\n <i class="fa fa-refresh"></i>\n </button>\n </form>\n </div>\n </div>\n </div>\n\n\n <div class="row">\n <table class="table table-striped" hawtio-simple-table="gridOptions"></table>\n </div>\n\n <div hawtio-slideout="showMessageDetails" title="{{row.id}}">\n <div class="dialog-body">\n\n <div class="row">\n <div class="pull-right">\n <form class="form-horizontal no-bottom-margin">\n <div class="btn-group" hawtio-pager="messages" on-index-change="selectRowIndex"\n row-index="rowIndex"></div>\n <button class="btn" ng-disabled="!gridOptions.selectedItems.length" ng-click="forwardDialog.open()"\n hawtio-show object-name="{{workspace.selection.objectName}}" method-name="sendBodyAndHeaders"\n title="Forward the selected messages to another endpoint" data-placement="bottom">\n <i class="fa fa-forward"></i> Forward\n </button>\n\n <!-- no need for close button as the hawtio-slideout already have that -->\n\n </form>\n </div>\n </div>\n\n <div class="row">\n <div class="expandable closed">\n <div title="Headers" class="title">\n <i class="expandable-indicator"></i> Headers\n </div>\n <div class="expandable-body well">\n <table class="table table-condensed table-striped">\n <thead>\n <tr>\n <th>Header</th>\n <th>Type</th>\n <th>Value</th>\n </tr>\n </thead>\n <tbody compile="row.headerHtml"></tbody>\n </table>\n </div>\n </div>\n\n <div class="row">\n <div hawtio-editor="row.body" read-only="true" mode="mode"></div>\n </div>\n\n </div>\n\n </div>\n </div>\n </div>\n\n <div modal="forwardDialog.show" close="forwardDialog.close()" options="forwardDialog.options">\n <form class="form-horizontal no-bottom-margin" ng-submit="forwardDialog.close()">\n <div class="modal-header">\n <h4>Forward\n <ng-pluralize count="selectedItems.length"\n when="{\'1\': \'a message\', \'other\': \'messages\'}"></ng-pluralize>\n </h4>\n </div>\n <div class="modal-body">\n <p>Forward\n <ng-pluralize count="selectedItems.length"\n when="{\'1\': \'a message\', \'other\': \'{} messages\'}"></ng-pluralize>\n to: <input type="text" style="width: 100%" ng-model="endpointUri" placeholder="Endpoint URI"\n typeahead="title for title in endpointUris() | filter:$viewValue" typeahead-editable=\'true\'></p>\n </div>\n <div class="modal-footer">\n <input id="submit" class="btn btn-primary add" type="submit" ng-click="forwardMessagesAndCloseForwardDialog()"\n value="Forward">\n <button class="btn btn-warning cancel" type="button" ng-click="forwardDialog.close()">Cancel</button>\n </div>\n </form>\n </div>\n</div>\n'),
|
|
3280
|
|
-e.put("plugins/camel/html/browseRoute.html",'<ng-include src="\'plugins/camel/html/browseMessageTemplate.html\'"></ng-include>\n\n<div class="row">\n <table class="table table-striped" hawtio-simple-table="gridOptions"></table>\n <!--\n <div class="gridStyle" hawtio-datatable="gridOptions"></div>\n -->\n</div>\n'),e.put("plugins/camel/html/createEndpoint.html",'<div ng-controller="Camel.EndpointController" ng-switch="hasComponentNames">\n <div ng-switch-when="true">\n <tabs>\n <pane heading="URL">\n <ng-include src="\'plugins/camel/html/createEndpointURL.html\'"></ng-include>\n </pane>\n <pane heading="Components">\n <ng-include src="\'plugins/camel/html/createEndpointWizard.html\'"></ng-include>\n </pane>\n </tabs>\n </div>\n <div ng-switch-default="false">\n <ng-include src="\'plugins/camel/html/createEndpointURL.html\'"></ng-include>\n </div>\n</div>\n'),e.put("plugins/camel/html/createEndpointURL.html",'<form class="form-horizontal">\n <div class="control-group">\n <input class="col-md-12" type="text" size="255" ng-model="endpointName" placeholder="Endpoint URI"/>\n </div>\n <div class="control-group">\n <button type="submit" class="btn btn-info" ng-click="createEndpoint(endpointName)"\n ng-disabled="!endpointName">\n Create endpoint\n </button>\n </div>\n</form>\n'),e.put("plugins/camel/html/createEndpointWizard.html",'<div ng-controller="Camel.EndpointController">\n <form class="form-horizontal">\n <div class="control-group">\n <label class="control-label" for="componentName">Component</label>\n\n <div class="controls">\n <select id="componentName" ng-model="selectedComponentName"\n ng-options="componentName for componentName in componentNames"></select>\n </div>\n </div>\n <div ng-show="selectedComponentName">\n <div class="control-group">\n <label class="control-label" for="endpointPath">Endpoint</label>\n\n <div class="controls">\n <input id="endpointPath" class="col-md-10" type="text" ng-model="endpointPath" placeholder="name"\n typeahead="title for title in endpointCompletions($viewValue) | filter:$viewValue" typeahead-editable=\'true\'\n min-length="1">\n </div>\n </div>\n\n <div simple-form name="formEditor" entity=\'endpointParameters\' data=\'endpointSchema\' schema="schema"></div>\n\n <div class="control-group">\n <div class="controls">\n <button type="submit" class="btn btn-info" ng-click="createEndpointFromData()"\n ng-disabled="!endpointPath || !selectedComponentName">\n Create endpoint\n </button>\n </div>\n </div>\n </div>\n </form>\n</div>\n'),e.put("plugins/camel/html/debug.html",'<div ng-controller="Camel.DebugRouteController" ng-switch="debugging">\n <div ng-switch-when="true">\n <div class="row">\n <div class="col-md-10">\n <div ng-include src="graphView">\n </div>\n </div>\n <div class="col-md-2">\n <div class="btn-toolbar pull-right">\n <div class="btn-group">\n <div ng-switch="hasBreakpoint">\n <button ng-switch-when="true" class="btn" ng-disabled="!selectedDiagramNodeId"\n ng-click="removeBreakpoint()" title="Remove the breakpoint on the selected node"><i\n class="fa fa-remove"></i>\n </button>\n <button ng-switch-default="false" class="btn" ng-disabled="!selectedDiagramNodeId"\n ng-click="addBreakpoint()" title="Add a breakpoint on the selected node"><i class="fa fa-plus"></i>\n </button>\n </div>\n </div>\n <div class="btn-group">\n <button class="btn" type="submit" ng-click="stopDebugging()" title="Stops the debugger">Close\n </button>\n </div>\n </div>\n <div class="btn-toolbar pull-right">\n <div class="btn-group">\n <button class="btn" ng-click="step()" ng-disabled="!stopped" title="Step into the next node"><img\n ng-src="img/icons/camel/step.gif"></button>\n <button class="btn" ng-click="resume()" ng-disabled="!stopped" title="Resume running"><img\n ng-src="img/icons/camel/resume.gif"></button>\n <button class="btn" ng-click="suspend()" ng-disabled="stopped"\n title="Suspend all threads in this route"><img ng-src="img/icons/camel/suspend.gif"></button>\n </div>\n </div>\n <div class="col-md-12 well">\n <form>\n <div class="table-header">Breakpoints:</div>\n <ul>\n <li class="table-row" ng-repeat="b in breakpoints">\n {{b}}\n </li>\n </ul>\n <div class="table-row">Suspended:</div>\n <ul>\n <li class="table-row" ng-repeat="b in suspendedBreakpoints">\n {{b}}\n </li>\n </ul>\n </form>\n </div>\n </div>\n </div>\n\n <!-- slider to always show the current debugged message -->\n <div hawtio-slideout="true" title="Breakpoint suspended at {{row.toNode}}" close="false" top="60%" height="40%">\n <div class="dialog-body">\n\n <div title="ID" class="title">\n {{row.id}}\n </div>\n\n <div class="row">\n <div class="expandable closed">\n <div title="Headers" class="title">\n <i class="expandable-indicator"></i> Headers\n </div>\n <div class="expandable-body well">\n <table class="table table-condensed table-striped">\n <thead>\n <tr>\n <th>Header</th>\n <th>Type</th>\n <th>Value</th>\n </tr>\n </thead>\n <tbody compile="row.headerHtml"></tbody>\n </table>\n </div>\n </div>\n\n <div title="Body" class="row">\n <div>Body type: <span ng-bind="row.bodyType"></span></div>\n <div hawtio-editor="row.body" read-only="true" mode="mode"></div>\n </div>\n\n </div>\n\n </div>\n </div>\n\n </div>\n <div class="col-md-12 well" ng-switch-default="false">\n <form>\n <p>Debugging allows you to step through camel routes to diagnose issues</p>\n\n <button class="btn btn-info" type="submit" ng-click="startDebugging()">Start debugging</button>\n </form>\n </div>\n</div>'),e.put("plugins/camel/html/endpointRuntimeRegistry.html",'<div class="row" ng-controller="Camel.EndpointRuntimeRegistryController">\n\n <div ng-show="selectedMBean">\n\n <div class="row" ng-show="data.length > 0">\n <div class="pull-right">\n <form class="form-inline no-bottom-margin">\n <fieldset>\n <div class="control-group inline-block">\n <input type="text" class="search-query" placeholder="Filter..."\n ng-model="gridOptions.filterOptions.filterText">\n </div>\n </fieldset>\n </form>\n </div>\n </div>\n\n <div class="row" ng-show="data.length > 0">\n <table class="table table-condensed table-striped" hawtio-simple-table="gridOptions"></table>\n </div>\n <div class="row well" ng-show="data.length == 0">\n <form>\n <p>There are no endpoints currently in use in this CamelContext.</p>\n </form>\n </div>\n </div>\n\n <div ng-hide="selectedMBean">\n <p class="text-center"><i class="fa fa-spinner fa-spin"></i></p>\n </div>\n\n</div>\n\n'),e.put("plugins/camel/html/inflight.html",'<div class="row-fluid" ng-controller="Camel.InflightController">\n\n <div ng-show="initDone">\n\n <div class="row-fluid">\n <div class="pull-right">\n <hawtio-filter ng-model="gridOptions.filterOptions.filterText"\n placeholder="Filter..."></hawtio-filter>\n </div>\n </div>\n\n <div class="row-fluid">\n <table class="table table-condensed table-striped" hawtio-simple-table="gridOptions"></table>\n </div>\n\n </div>\n\n <div ng-hide="initDone">\n <p class="text-center"><i class="fa fa-spinner fa-spin"></i></p>\n </div>\n\n</div>\n\n'),e.put("plugins/camel/html/layoutCamelTree.html",'\n<script type="text/ng-template" id="camelTreeHeader.html">\n <div class="camel tree-header" ng-controller="Camel.TreeHeaderController">\n\n <!--\n TODO - changes to the tree made this filter not work\n <div class="left">\n <div class="section-filter">\n <input id="camelContextIdFilter"\n class="search-query"\n type="text"\n ng-model="contextFilterText"\n title="filter camel context IDs"\n placeholder="Filter...">\n <i class="fa fa-remove clickable"\n title="Clear filter"\n ng-click="contextFilterText = \'\'"></i>\n </div>\n </div>\n -->\n\n <div class="right">\n <i class="fa fa-chevron-down clickable"\n title="Expand all nodes"\n ng-click="expandAll()"></i>\n <i class="fa fa-chevron-up clickable"\n title="Unexpand all nodes"\n ng-click="contractAll()"></i>\n </div>\n </div>\n</script>\n\n<hawtio-pane position="left" width="300" header="camelTreeHeader.html">\n <div id="tree-container" ng-controller="Jmx.MBeansController">\n <div class="camel-tree" ng-controller="Camel.TreeController">\n <div id="cameltree"></div>\n </div>\n </div>\n</hawtio-pane>\n<div class="row">\n <!--\n <ng-include src="\'plugins/jmx/html/subLevelTabs.html\'"></ng-include>\n -->\n <div id="properties" ng-view></div>\n</div>\n'),e.put("plugins/camel/html/nodePropertiesEdit.html",'<div class="row-fluid">\n\n <!-- the label and input fields needs to be wider -->\n <style>\n input, textarea, .uneditable-input {\n width: 600px;\n }\n input, textarea, .editable-input {\n width: 600px;\n }\n\n .form-horizontal .control-label {\n width: 180px;\n }\n\n .form-horizontal .controls {\n margin-left: 200px;\n }\n </style>\n\n <h3>\n <img src="{{icon}}" width="48" height="48" ng-show="icon"/> {{model.title}}\n <span style="margin-left: 10px" ng-repeat="label in labels track by $index" class="pod-label badge" title="{{label}}">{{label}}</span>\n </h3>\n\n <div simple-form name="formViewer" mode=\'edit\' entity=\'nodeData\' data=\'model\' schema="schema"\n showhelp="!hideHelp"></div>\n</div>\n'),e.put("plugins/camel/html/nodePropertiesView.html",'<div class="row-fluid">\n\n <!-- the label and input fields needs to be wider -->\n <style>\n input, textarea, .uneditable-input {\n width: 600px;\n }\n\n input, textarea, .editable-input {\n width: 600px;\n }\n\n .form-horizontal .control-label {\n width: 180px;\n }\n\n .form-horizontal .controls {\n margin-left: 200px;\n }\n </style>\n\n <h3>\n <img src="{{icon}}" width="48" height="48" ng-show="icon"/> {{model.title}}\n <span style="margin-left: 10px" ng-repeat="label in labels track by $index" class="pod-label badge" title="{{label}}">{{label}}</span>\n </h3>\n\n <div simple-form name="formViewer" mode=\'view\' entity=\'nodeData\' data=\'model\' schema="schema"\n showhelp="!hideHelp" showempty="showEntity"></div>\n</div>\n'),e.put("plugins/camel/html/preferences.html",'<div ng-controller="Camel.PreferencesController">\n <div hawtio-form-2="config" entity="entity"></div>\n</div>\n'),e.put("plugins/camel/html/profileRoute.html",'<div class="row" ng-controller="Camel.ProfileRouteController">\n\n <div ng-show="initDone">\n\n <div class="row-fluid">\n <div class="pull-right">\n <hawtio-filter ng-model="gridOptions.filterOptions.filterText"\n placeholder="Filter..."></hawtio-filter>\n </div>\n </div>\n\n <div class="row-fluid">\n <table class="table table-condensed table-striped" hawtio-simple-table="gridOptions"></table>\n </div>\n\n </div>\n\n <div ng-hide="initDone">\n <p class="text-center"><i class="fa fa-spinner fa-spin"></i></p>\n </div>\n\n</div>\n\n'),e.put("plugins/camel/html/properties.html",'<div ng-controller="Camel.PropertiesController">\n\n <div class="control-group inline-block">\n <form class="form-inline no-bottom-margin">\n <label>Hide Documentation:\n <input type="checkbox" ng-model="hideHelp"\n title="Hide documentation for the options"/>\n </label>\n <label>Hide Default:\n <input type="checkbox" ng-model="hideDefault"\n title="Hide options with default values"/>\n </label>\n <label>Hide Unused:\n <input type="checkbox" ng-model="hideUnused"\n title="Hide options with unused/empty values"/>\n </label>\n </form>\n </div>\n\n <div ng-include="viewTemplate"></div>\n</div>\n'),e.put("plugins/camel/html/propertiesComponent.html",'<div ng-controller="Camel.PropertiesComponentController">\n\n <div class="control-group inline-block">\n <form class="form-inline no-bottom-margin">\n <label>Hide Documentation:\n <input type="checkbox" ng-model="hideHelp"\n title="Hide documentation for the options"/>\n </label>\n <label>Hide Default:\n <input type="checkbox" ng-model="hideDefault"\n title="Hide options with default values"/>\n </label>\n <label>Hide Unused:\n <input type="checkbox" ng-model="hideUnused"\n title="Hide options with unused/empty values"/>\n </label>\n </form>\n </div>\n\n <div ng-include="viewTemplate"></div>\n</div>\n'),e.put("plugins/camel/html/propertiesEndpoint.html",'<div ng-controller="Camel.PropertiesEndpointController">\n\n <div class="control-group inline-block">\n <form class="form-inline no-bottom-margin">\n <label>Hide Documentation:\n <input type="checkbox" ng-model="hideHelp"\n title="Hide documentation for the options"/>\n </label>\n <label>Hide Default:\n <input type="checkbox" ng-model="hideDefault"\n title="Hide options with default values"/>\n </label>\n <label>Hide Unused:\n <input type="checkbox" ng-model="hideUnused"\n title="Hide options with unused/empty values"/>\n </label>\n </form>\n </div>\n\n <div ng-include="viewTemplate"></div>\n</div>\n'),e.put("plugins/camel/html/restRegistry.html",'<div class="row" ng-controller="Camel.RestServiceController">\n\n <div ng-show="selectedMBean">\n\n <div class="row" ng-show="data.length > 0">\n <div class="pull-right">\n <form class="form-inline no-bottom-margin">\n <fieldset>\n <div class="control-group inline-block">\n <input type="text" class="search-query" placeholder="Filter..."\n ng-model="gridOptions.filterOptions.filterText">\n </div>\n </fieldset>\n </form>\n </div>\n </div>\n\n <div class="row" ng-show="data.length > 0">\n <table class="table table-condensed table-striped" hawtio-simple-table="gridOptions"></table>\n </div>\n <div class="row well" ng-show="data.length == 0">\n <form>\n <p>There are no Rest Services registered in this CamelContext.</p>\n </form>\n </div>\n </div>\n\n <div ng-hide="selectedMBean">\n <p class="text-center"><i class="fa fa-spinner fa-spin"></i></p>\n </div>\n\n</div>\n\n'),e.put("plugins/camel/html/routeMetrics.html",'<div class="row" ng-controller="Camel.RouteMetricsController">\n\n <div class="row">\n <div class="pull-right">\n <form class="form-inline no-bottom-margin">\n <fieldset>\n <div class="control-group inline-block">\n <input type="text" class="search-query" placeholder="Filter..." ng-model="filterText">\n </div>\n </fieldset>\n </form>\n </div>\n </div>\n\n <div class="row" ng-show="!initDone">\n <p class="text-center"><i class="fa fa-spinner fa-spin"></i></p>\n </div>\n\n <div class="col-md-8 centered well" ng-show="initDone && metricDivs.length === 0">\n <form>\n This Camel context has no route metrics data.\n </form>\n </div>\n\n <!-- div to contain the graphs -->\n <div class="metricsWatcher container mainContent">\n <div id="{{metric.id}}" class="row" ng-repeat="metric in metricDivs track by $index" style="{{filterByRoute(metric)}}"></div>\n </div>\n\n</div>\n\n'),e.put("plugins/camel/html/routes.html",'<style>\n\n #node-CLOSED rect {\n stroke-width: 1px;\n fill: #f88;\n }\n\n .node:hover,\n .node > *:hover,\n rect > *:hover {\n cursor: pointer;\n opacity: 0.6;\n }\n\n path.edge {\n fill: none;\n stroke: #666;\n stroke-width: 3px;\n }\n\n .edge:hover {\n cursor: pointer;\n opacity: 0.4;\n }\n\n text.counter {\n stroke: #080;\n }\n\n text.inflight {\n stroke: #08f;\n }\n</style>\n<div ng-class="{\'wiki-fixed\' : !isJmxTab}" id="canvas" ng-controller="Camel.RouteController">\n <!--\n <div ng-hide="isJmxTab">\n <ng-include src="\'plugins/camel/html/breadcrumbBar.html\'"></ng-include>\n </div>\n -->\n <svg class="camel-diagram" width=0 height=0>\n <defs>\n <marker id="arrowhead"\n viewBox="0 0 10 10"\n refX="8"\n refY="5"\n markerUnits="strokeWidth"\n markerWidth="4"\n markerHeight="3"\n orient="auto"\n style="fill: #333">\n <path d="M 0 0 L 10 5 L 0 10 z"></path>\n </marker>\n\n <filter id="drop-shadow" width="300%" height="300%">\n <feGaussianBlur in="SourceAlpha" result="blur-out" stdDeviation="19"/>\n <feOffset in="blur-out" result="the-shadow" dx="2" dy="2"/>\n <feComponentTransfer xmlns="http://www.w3.org/2000/svg">\n <feFuncA type="linear" slope="0.2"/>\n </feComponentTransfer>\n <feMerge xmlns="http://www.w3.org/2000/svg">\n <feMergeNode/>\n <feMergeNode in="SourceGraphic"/>\n </feMerge>\n </filter>\n <linearGradient id="rect-gradient" x1="0%" y1="0%" x2="0%" y2="100%">\n <stop offset="0%" style="stop-color:rgb(254,254,255);stop-opacity:1"/>\n <stop offset="100%" style="stop-color:rgb(247,247,255);stop-opacity:1"/>\n </linearGradient>\n <linearGradient id="rect-select-gradient" x1="0%" y1="0%" x2="0%" y2="100%">\n <stop offset="0%" style="stop-color: #ffffa0; stop-opacity: 0.7"/>\n <stop offset="100%" style="stop-color: #f0f0a0; stop-opacity: 0.7"/>\n </linearGradient>\n </defs>\n </svg>\n</div>\n\n'),e.put("plugins/camel/html/sendMessage.html",'<div ng-controller="Camel.SendMessageController">\n\n <div class="tabbable" ng-model="tab">\n\n <div value="compose" class="tab-pane" title="Compose">\n <div class="row">\n <span ng-show="noCredentials" class="alert">\n No credentials set for endpoint! Please set your username and password in the <a\n href="" ng-click="openPrefs()">Preferences</a> page\n </span>\n\n <form class="form-inline pull-right">\n <button class="btn" ng-click="addHeader()" title="Add a new message header"><i\n class="fa fa-plus"></i> Header\n </button>\n <button type="submit" class="btn btn-primary" ng-click="sendMessage()">Send message</button>\n </form>\n </div>\n\n <form class="form-inline bottom-margin" ng-submit="addHeader()">\n <ol class="zebra-list header-list">\n <div class="row">\n <li ng-repeat="header in headers">\n <div class="col-md-4">\n <input type="text" style="width: 100%" class="headerName"\n ng-model="header.name"\n typeahead="completion for completion in defaultHeaderNames() | filter:$viewValue"\n typeahead-editable=\'true\'\n placeholder="Header name">\n </div>\n <div class="col-md-6">\n <input type="text" style="width: 100%" ng-model="header.value"\n placeholder="Value of the message header">\n </div>\n <div class="col-md-2">\n <button type="submit" class="btn" title="Add a new message header">\n <i class="fa fa-plus"></i>\n </button>\n <button type="button" ng-click="removeHeader(header)" class="btn" title="Removes this message header">\n <i class="fa fa-remove"></i>\n </button>\n </div>\n </li>\n </div>\n </ol>\n </form>\n\n <div class="row">\n <form class="form-inline">\n <div class="controls">\n <label class="control-label" for="sourceFormat" title="The text format to use for the message payload">Payload\n format: </label>\n <select ng-model="codeMirrorOptions.mode.name" id="sourceFormat">\n <option value="javascript">JSON</option>\n <option value="text" selected>Plain text</option>\n <option value="properties">Properties</option>\n <option value="xml">XML</option>\n </select>\n\n <button class="btn" ng-click="autoFormat()"\n title="Automatically pretty prints the message so its easier to read">Auto format\n </button>\n </div>\n </form>\n </div>\n\n <div class="row">\n <div hawtio-editor="message" mode="codeMirrorOptions.mode.name"></div>\n <!--\n <textarea ui-codemirror="codeMirrorOptions" ng-model="message"></textarea>\n -->\n </div>\n </div>\n\n </div>\n</div>\n'),e.put("plugins/camel/html/source.html",'<div class="form-horizontal" ng-controller="Camel.SourceController">\n <div class="row">\n <div class="col-md-12">\n <button class="pull-right btn btn-primary"\n hawtio-show object-name="{{getSelectionCamelContextMBean(workspace)}}" method-name="addOrUpdateRoutesFromXml"\n ng-click="saveRouteXml()"><i class="fa fa-save"></i> Update</button>\n </div>\n </div>\n <p></p>\n <div class="row">\n <div class="col-md-12">\n <div hawtio-editor="source" mode="mode"></div>\n </div>\n </div>\n</div>\n'),e.put("plugins/camel/html/traceRoute.html",'<div ng-controller="Camel.TraceRouteController">\n <div class="col-md-12 well" ng-hide="tracing">\n <form>\n <p>Tracing allows you to send messages to a route and then step through and see the messages flow through a route\n to aid debugging and to help diagnose issues.</p>\n\n <p>Once you start tracing, you can send messages to the input endpoints, then come back to this page and see the\n flow of messages through your route.</p>\n\n <p>As you click on the message table, you can see which node in the flow it came through; moving the selection up\n and down in the message table lets you see the flow of the message through the diagram.</p>\n\n <button class="btn btn-info" type="submit" ng-click="startTracing()">Start tracing</button>\n </form>\n </div>\n <div ng-show="tracing">\n\n <form>\n <button class="btn btn-info pull-right" type="submit" ng-click="stopTracing()">Stop tracing</button>\n </form>\n <div ng-include src="graphView">\n </div>\n\n <form>\n <button class="btn btn-info pull-right" type="submit" ng-click="clear()">Clear messages</button>\n </form>\n <div> </div>\n\n <!-- table and slider to show the traced messages -->\n <div class="row">\n <table class="table table-striped" hawtio-simple-table="gridOptions"></table>\n </div>\n\n <div hawtio-slideout="showMessageDetails" title="{{row.id}}" top="60%" height="40%">\n <div class="dialog-body">\n\n <div class="row">\n <div class="pull-right">\n <form class="form-horizontal no-bottom-margin">\n <div class="btn-group" hawtio-pager="messages" on-index-change="selectRowIndex"\n row-index="rowIndex"></div>\n\n <!-- no need for close button as the hawtio-slideout already have that -->\n\n </form>\n </div>\n </div>\n\n <div class="row">\n <div class="expandable closed">\n <div title="Headers" class="title">\n <i class="expandable-indicator"></i> Headers\n </div>\n <div class="expandable-body well">\n <table class="table table-condensed table-striped">\n <thead>\n <tr>\n <th>Header</th>\n <th>Type</th>\n <th>Value</th>\n </tr>\n </thead>\n <tbody compile="row.headerHtml"></tbody>\n </table>\n </div>\n </div>\n\n <div class="row">\n <div>Body type: <span ng-bind="row.bodyType"></span></div>\n <div hawtio-editor="row.body" read-only="true" mode="mode"></div>\n </div>\n\n </div>\n\n </div>\n </div>\n\n </div>\n\n</div>\n'),e.put("plugins/camel/html/typeConverter.html",'<div class="row" ng-controller="Camel.TypeConverterController">\n\n <!-- the dl need to be wider so we can see the labels -->\n <style>\n .dl-horizontal dt {\n width: 260px;\n }\n .dl-horizontal dd {\n margin-left: 280px;\n }\n </style>\n\n <div ng-show="selectedMBean">\n\n <div class="row">\n\n <div class="pull-right">\n <form class="form-inline no-bottom-margin">\n <fieldset>\n <div class="controls control-group inline-block controls-row">\n <div class="btn-group">\n <button\n class="btn" ng-click="resetStatistics()" title="Reset statistics">\n <i class="fa fa-refresh"></i></button>\n <button\n ng-disabled="mbeanAttributes.StatisticsEnabled"\n class="btn" ng-click="enableStatistics()" title="Enable statistics">\n <i class="fa fa-play-circle"></i></button>\n <button\n ng-disabled="!mbeanAttributes.StatisticsEnabled"\n class="btn" ng-click="disableStatistics()" title="Disable statistics">\n <i class="fa fa-power-off"></i></button>\n </div>\n </div>\n </fieldset>\n </form>\n </div>\n <div>\n <dl class="dl-horizontal">\n <dt>Number of Type Converters</dt>\n <dd>{{mbeanAttributes.NumberOfTypeConverters}}</dd>\n <dt># Attempts</dt>\n <dd>{{mbeanAttributes.AttemptCounter}}</dd>\n <dt># Hit</dt>\n <dd>{{mbeanAttributes.HitCounter}}</dd>\n <dt># Miss</dt>\n <dd>{{mbeanAttributes.MissCounter}}</dd>\n <dt># Failed</dt>\n <dd>{{mbeanAttributes.FailedCounter}}</dd>\n <dt>Statistics Enabled</dt>\n <dd>{{mbeanAttributes.StatisticsEnabled}}</dd>\n </dl>\n </div>\n\n </div>\n\n <div class="row">\n <div class="pull-right">\n <form class="form-inline no-bottom-margin">\n <fieldset>\n <div class="control-group inline-block">\n <input type="text" class="search-query" placeholder="Filter..."\n ng-model="gridOptions.filterOptions.filterText">\n </div>\n </fieldset>\n </form>\n </div>\n </div>\n\n <div class="row" ng-show="data.length > 0">\n <table class="table table-condensed table-striped" hawtio-simple-table="gridOptions"></table>\n </div>\n <div class="row" ng-show="data.length == 0">\n <p class="text-center"><i class="fa fa-spinner fa-spin"></i></p>\n </div>\n\n </div>\n\n</div>\n\n'),e.put("plugins/karaf/html/feature-details.html",'<div>\n <table class="overviewSection">\n <tr ng-hide="hasFabric">\n <td></td>\n <td class="less-big">\n <div class="btn-group">\n <button ng-click="uninstall(name,version)" \n class="btn" \n title="uninstall" \n hawtio-show\n object-name="{{featuresMBean}"\n method-name="uninstallFeature">\n <i class="fa fa-off"></i>\n </button>\n <button ng-click="install(name,version)" \n class="btn" \n title="install" \n hawtio-show\n object-name="{{featuresMBean}"\n method-name="installFeature">\n <i class=icon-play-circle"></i>\n </button>\n </div>\n </td>\n </tr>\n <tr>\n <td class="pull-right"><strong>Name:</strong></td>\n <td class="less-big">{{row.Name}}\n </td>\n </tr>\n <tr>\n <td class="pull-right"><strong>Version:</strong></td>\n <td class="less-big">{{row.Version}}\n </td>\n </tr>\n <tr>\n <td class="pull-right"><strong>Repository:</strong></td>\n <td class="less-big">{{row.RepositoryName}}\n </td>\n </tr>\n <tr>\n <td class="pull-right"><strong>Repository URI:</strong></td>\n <td class="less-big">{{row.RepositoryURI}}\n </td>\n </tr>\n <tr>\n <td class="pull-right"><strong>State:</strong></td>\n <td class="wrap">\n <div ng-switch="row.Installed">\n <p style="display: inline;" ng-switch-when="true">Installed</p>\n\n <p style="display: inline;" ng-switch-default>Not Installed</p>\n </div>\n </td>\n </tr>\n <tr>\n <td>\n </td>\n <td>\n <div class="accordion" id="accordionFeatures">\n <div class="accordion-group">\n <div class="accordion-heading">\n <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionFeatures"\n href="#collapseFeatures">\n Features\n </a>\n </div>\n <div id="collapseFeatures" class="accordion-body collapse in">\n <ul class="accordion-inner">\n <li ng-repeat="feature in row.Dependencies">\n <a href=\'#/osgi/feature/{{feature.Name}}/{{feature.Version}}?p=container\'>{{feature.Name}}/{{feature.Version}}</a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <td>\n </td>\n <td>\n <div class="accordion" id="accordionBundles">\n <div class="accordion-group">\n <div class="accordion-heading">\n <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionBundles"\n href="#collapseBundles">\n Bundles\n </a>\n </div>\n <div id="collapseBundles" class="accordion-body collapse in">\n <ul class="accordion-inner">\n <li ng-repeat="bundle in row.BundleDetails">\n <div ng-switch="bundle.Installed">\n <p style="display: inline;" ng-switch-when="true">\n <a href=\'#/osgi/bundle/{{bundle.Identifier}}?p=container\'>{{bundle.Location}}</a></p>\n\n <p style="display: inline;" ng-switch-default>{{bundle.Location}}</p>\n </div>\n </li>\n </ul>\n </div>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <td>\n </td>\n <td>\n <div class="accordion" id="accordionConfigurations">\n <div class="accordion-group">\n <div class="accordion-heading">\n <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionConfigurations"\n href="#collapsConfigurations">\n Configurations\n </a>\n </div>\n <div id="collapsConfigurations" class="accordion-body collapse in">\n <table class="accordion-inner">\n <tr ng-repeat="(pid, value) in row.Configurations">\n <td>\n <p>{{value.Pid}}</p>\n <div hawtio-editor="toProperties(value.Elements)" mode="props"></div></td>\n </tr>\n </table>\n </div>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <td>\n </td>\n <td>\n <div class="accordion" id="accordionConfigurationFiles">\n <div class="accordion-group">\n <div class="accordion-heading">\n <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionConfigurationFiles"\n href="#collapsConfigurationFiles">\n Configuration Files\n </a>\n </div>\n <div id="collapsConfigurationFiles" class="accordion-body collapse in">\n <table class="accordion-inner">\n <tr ng-repeat="file in row.Files">\n <td>{{file.Files}}</td>\n </tr>\n </table>\n </div>\n </div>\n </div>\n </td>\n </tr>\n </table>\n</div>\n'),
|
|
3281
|
|
-e.put("plugins/karaf/html/feature.html",'<div class="controller-section" ng-controller="Karaf.FeatureController">\n <div class="row">\n <div class="col-md-4">\n <h1>{{row.id}}</h1>\n </div>\n </div>\n\n <div ng-include src="\'plugins/karaf/html/feature-details.html\'"></div>\n\n</div>\n\n'),e.put("plugins/karaf/html/features.html",'<div class="controller-section" ng-controller="Karaf.FeaturesController">\n\n <div class="row section-filter">\n <input type="text" class="col-md-12 search-query" placeholder="Filter..." ng-model="filter">\n <i class="fa fa-remove clickable" title="Clear filter" ng-click="filter = \'\'"></i>\n </div>\n\n <script type="text/ng-template" id="popoverTemplate">\n <small>\n <table class="table">\n <tbody>\n <tr ng-repeat="(k, v) in feature track by $index" ng-show="showRow(k, v)">\n <td class="property-name">{{k}}</td>\n <td class="property-value" ng-bind-html-unsafe="showValue(v)"></td>\n </tr>\n </tbody>\n </table>\n </small>\n </script>\n\n <p></p>\n <div class="row">\n <div class="col-md-6">\n <h3 class="centered">Installed Features</h3>\n <div ng-show="featuresError" class="alert alert-warning">\n The feature list returned by the server was null, please check the logs and Karaf console for errors.\n </div>\n <div class="bundle-list"\n hawtio-auto-columns=".bundle-item">\n <div ng-repeat="feature in installedFeatures"\n class="bundle-item"\n ng-show="filterFeature(feature)"\n ng-class="inSelectedRepository(feature)">\n <a ng-href="#/osgi/feature/{{feature.Id}}?p=container"\n hawtio-template-popover title="Feature details">\n <span class="badge" ng-class="getStateStyle(feature)">{{feature.Name}} / {{feature.Version}}</span>\n </a>\n <span ng-hide="hasFabric">\n <a class="toggle-action"\n href=""\n ng-show="installed(feature.Installed)"\n ng-click="uninstall(feature)"\n hawtio-show\n object-name="{{featuresMBean}"\n method-name="uninstallFeature">\n <i class="fa fa-power-off"></i>\n </a>\n <a class="toggle-action"\n href=""\n ng-hide="installed(feature.Installed)"\n ng-click="install(feature)"\n hawtio-show\n object-name="{{featuresMBean}"\n method-name="installFeature">\n <i class="fa fa-play-circle"></i>\n </a>\n </span>\n </div>\n </div>\n </div>\n\n <div class="col-md-6">\n <h3 class="centered">Available Features</h3>\n <div class="row repository-browser-toolbar centered">\n <select id="repos"\n class="input-xlarge"\n title="Feature repositories"\n ng-model="selectedRepository"\n ng-options="r.repository for r in repositories"></select>\n <button class="btn"\n title="Remove selected feature repository"\n ng-click="uninstallRepository()"\n ng-hide="hasFabric"\n hawtio-show\n object-name="{{featuresMBean}}"\n method-name="removeRepository"><i class="fa fa-remove-sign"></i></button>\n <input type="text"\n class="input-xlarge"\n placeholder="mvn:foo/bar/1.0/xml/features"\n title="New feature repository URL"\n ng-model="newRepositoryURI"\n ng-hide="hasFabric"\n hawtio-show\n object-name="{{featuresMBean}}"\n method-name="addRepository">\n <button class="btn"\n title="Add feature repository URL"\n ng-hide="hasFabric"\n ng-click="installRepository()"\n ng-disabled="isValidRepository()"\n hawtio-show\n object-name="{{featuresMBean}}"\n method-name="addRepository"><i class="fa fa-plus"></i></button>\n </div>\n <div class="row">\n <div class="bundle-list"\n hawtio-auto-columns=".bundle-item">\n <div ng-repeat="feature in selectedRepository.features"\n class="bundle-item"\n ng-show="filterFeature(feature)"\n hawtio-template-popover title="Feature details">\n <a ng-href="#/osgi/feature/{{feature.Id}}?p=container">\n <span class="badge" ng-class="getStateStyle(feature)">{{feature.Name}} / {{feature.Version}}</span>\n </a >\n <span ng-hide="hasFabric">\n <a class="toggle-action"\n href=""\n ng-show="installed(feature.Installed)"\n ng-click="uninstall(feature)"\n hawtio-show\n object-name="{{featuresMBean}"\n method-name="uninstallFeature">\n <i class="fa fa-power-off"></i>\n </a>\n <a class="toggle-action"\n href=""\n ng-hide="installed(feature.Installed)"\n ng-click="install(feature)"\n hawtio-show\n object-name="{{featuresMBean}"\n method-name="installFeature">\n <i class="fa fa-play-circle"></i>\n </a>\n </span>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n\n</div>\n'),e.put("plugins/karaf/html/scr-component-details.html",'<div>\n <table class="overviewSection">\n <tr ng-hide="hasFabric">\n <td></td>\n <td class="less-big">\n <div class="btn-group">\n <button class="btn" \n ng-click="activate()"\n hawtio-show\n object-name="{{scrMBean}}"\n method-name="activateComponent">\n <i class="fa fa-play-circle"></i> Activate\n </button>\n <button class="btn" \n ng-click="deactivate()"\n hawtio-show\n object-name="{{scrMBean}}"\n method-name="deactiveateComponent">\n <i class="fa fa-off"></i> Deactivate\n </button>\n </div>\n </td>\n </tr>\n <tr>\n <td class="pull-right"><strong>Id:</strong></td>\n <td class="less-big">{{row.Id}}\n </td>\n </tr>\n <tr>\n <td class="pull-right"><strong>Name:</strong></td>\n <td class="less-big">{{row.Name}}\n </td>\n </tr>\n <tr>\n <td class="pull-right"><strong>State:</strong></td>\n <td class="less-big">{{row.State}}\n </td>\n </tr>\n <tr>\n <td>\n </td>\n <td>\n <div class="accordion" id="accordionProperties">\n <div class="accordion-group">\n <div class="accordion-heading">\n <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionProperties"\n href="#collapseProperties">\n Properties\n </a>\n </div>\n <div id="collapseProperties" class="accordion-body collapse in">\n <table class="accordion-inner">\n <tr ng-repeat="(key, value) in row.Properties">\n <td valign="top">{{key}}</td>\n <td>{{value.Value}}</td>\n </tr>\n </table>\n </div>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <td>\n </td>\n <td>\n <div class="accordion" id="accordionReferences">\n <div class="accordion-group">\n <div class="accordion-heading">\n <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionReferences"\n href="#collapseReferences">\n References\n </a>\n </div>\n <div id="collapseReferences" class="accordion-body collapse in">\n <table class="accordion-inner">\n <thead>\n <tr>\n <th>Name</th>\n <th>Availability</th>\n <th>Cardinality</th>\n <th>Policy</th>\n <th>Bound Services</th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="(key, value) in row.References">\n <td valign="left" class="less-big">{{value.Name}}</td>\n <td valign="left" class="less-big">{{value.Availability}}</td>\n <td valign="left" class="less-big">{{value.Cardinality}}</td>\n <td valign="left" class="less-big">{{value.Policy}}</td>\n <td>\n <ul>\n <li ng-repeat="id in value[\'Bound Services\']">\n <i class="fa fa-cog less-big text-info" id="bound.service.{{id}}">{{id}}</i>\n </li>\n </ul>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </td>\n </tr>\n </table>\n</div>\n'),e.put("plugins/karaf/html/scr-component.html",'<div class="controller-section" ng-controller="Karaf.ScrComponentController">\n <div class="row">\n <div class="col-md-4">\n <h1>{{row.id}}</h1>\n </div>\n </div>\n\n <div ng-include src="\'plugins/karaf/html/scr-component-details.html\'"></div>\n\n</div>\n'),e.put("plugins/karaf/html/scr-components.html",'<div class="controller-section" ng-controller="Karaf.ScrComponentsController">\n <div class="row">\n <div class="pull-left">\n <form class="form-inline no-bottom-margin">\n <fieldset>\n <div class="control-group inline-block">\n <div class="btn-group">\n <button ng-disabled="selectedComponents.length == 0" \n class="btn" \n ng-click="activate()"\n hawtio-show\n object-name="{{scrMBean}}"\n method-name="activateComponent"><i\n class="fa fa-play-circle"></i> Activate\n </button>\n <button ng-disabled="selectedComponents.length == 0" \n class="btn" \n ng-click="deactivate()"\n hawtio-show\n object-name="{{scrMBean}}"\n method-name="deactiveateComponent"><i\n class="fa fa-off"></i> Deactivate\n </button>\n </div>\n </div>\n </fieldset>\n </form>\n </div>\n\n <div class="pull-right">\n <input type="text" class="input-text search-query" placeholder="Filter..." ng-model="scrOptions.filterOptions.filterText">\n </div>\n </div>\n\n\n <div class="row">\n <div class="gridStyle" ng-grid="scrOptions"></div>\n </div>\n</div>\n'),e.put("plugins/karaf/html/server.html",'<div class="controller-section row" ng-controller="Karaf.ServerController">\n\n <dl class="dl-horizontal">\n <dt>Name</dt>\n <dd>{{data.name}}</dd>\n <dt>Version</dt>\n <dd>{{data.version}}</dd>\n <dt>State</dt>\n <dd>{{data.state}}</dd>\n <dt>Is root</dt>\n <dd>{{data.root}}</dd>\n <dt>Start Level</dt>\n <dd>{{data.startLevel}}</dd>\n <dt>Framework</dt>\n <dd>{{data.framework}}</dd>\n <dt>Framework Version</dt>\n <dd>{{data.frameworkVersion}}</dd>\n <dt>Location</dt>\n <dd>{{data.location}}</dd>\n <dt>SSH Port</dt>\n <dd>{{data.sshPort}}</dd>\n <dt>RMI Registry Port</dt>\n <dd>{{data.rmiRegistryPort}}</dd>\n <dt>RMI Server Port</dt>\n <dd>{{data.rmiServerPort}}</dd>\n <dt>PID</dt>\n <dd>{{data.pid}}</dd>\n </dl>\n\n</div>\n\n'),e.put("plugins/osgi/html/bundle-details.html",'<div>\n <table>\n <tr>\n <td></td>\n <td class="less-big">\n <div class="btn-group">\n <button ng-click="stopBundle(bundleId)" \n class="btn" \n hawtio-show\n object-name="{{frameworkMBean}}"\n method-name="stopBundle"\n title="stop"><i class="fa fa-off"/></button>\n <button ng-click="startBundle(bundleId)" \n class="btn" \n hawtio-show\n object-name="{{frameworkMBean}}"\n method-name="startBundle"\n title="start"><i class="fa fa-play-circle"/></button>\n <button ng-click="refreshBundle(bundleId)" \n class="btn" \n hawtio-show\n object-name="{{frameworkMBean}}"\n method-name="refreshBundle"\n title="refresh"><i class="fa fa-refresh"/></button>\n <button ng-click="updateBundle(bundleId)" \n class="btn" \n hawtio-show\n object-name="{{frameworkMBean}}"\n method-name="updateBundle"\n title="update"><i class="fa fa-cloud-download"/></button>\n <button ng-click="uninstallBundle(bundleId)" \n class="btn" \n hawtio-show\n object-name="{{frameworkMBean}}"\n method-name="uninstallBundle"\n title="uninstall"><i class="fa fa-eject"/></button>\n </div>\n </td>\n </tr>\n <tr>\n <td><p/></td>\n <td/>\n <tr>\n <td>\n <div ng-switch="row.Fragment">\n <div ng-switch-when="true"><strong>Fragment ID:</strong></div>\n <div ng-switch-default><strong>Bundle ID:</strong></div>\n </div>\n </td>\n <td class="less-big">{{row.Identifier}}\n </td>\n </tr>\n <tr>\n <td><strong>Bundle Name:</strong></td>\n <td class="less-big">{{row.Headers[\'Bundle-Name\'].Value}}\n </td>\n </tr>\n <tr>\n <td><strong>Symbolic Name:</strong></td>\n <td class="less-big label">\n <div id="bsn" rel="tooltip">{{row.SymbolicName}}</div>\n </td>\n </tr>\n <tr>\n <td><strong>Version:</strong></td>\n <td class="less-big">{{row.Version}}\n </td>\n </tr>\n <tr>\n <td><strong>Start Level:</strong></td>\n <td class="less-big">{{row.StartLevel}}\n </td>\n </tr>\n <tr>\n <td><strong>Location:</strong></td>\n <td class="less-big">{{row.Location}}\n </td>\n </tr>\n <tr>\n <td><strong>State:</strong></td>\n <td>\n <div class="less-big label" ng-class="row.StateStyle">{{row.State}}</div>\n </td>\n </tr>\n <tr>\n <td><strong>Last Modified:</strong></td>\n <td class="less-big">{{row.LastModified | date:\'medium\'}}\n </td>\n </tr>\n <tr>\n <td>\n <div ng-switch="row.Fragment">\n <div ng-switch-when="true"><strong>Hosts:</strong></div>\n <div ng-switch-default><strong>Fragments:</strong></div>\n </div>\n </td>\n <td class="less-big">\n <div ng-switch="row.Fragment">\n <div ng-switch-when="true" ng-bind-html-unsafe="row.Hosts"/>\n <div ng-switch-default ng-bind-html-unsafe="row.Fragments"/>\n </div>\n </td>\n </tr>\n <tr>\n <td>\n </td>\n <td>\n <div class="accordion" id="accordionInspectClassloading">\n <div class="accordion-group">\n <div class="accordion-heading">\n <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionInspectClassloading"\n href="#collapseInspectClassloading">\n Inspect Classloading\n </a>\n </div>\n <div id="collapseInspectClassloading" class="accordion-body collapse in">\n <form class="form-inline" hawtio-show object-name="{{osgiToolsMBean}}" operation-name="getLoadClassOrigin">\n <fieldset>\n \n <input class="input-xlarge" type="text" ng-model="classToLoad" placeHolder="Enter Class Name to Load...">\n <button class="btn btn-success execute" ng-click="executeLoadClass(classToLoad)">Load class</button>\n </fieldset>\n </form>\n <form class="form-inline" hawtio-show object-name="{{osgiToolsMBean}}" operation-name="getResourceURL">\n <fieldset>\n \n <input class="input-xlarge" type="text" ng-model="resourceToLoad"\n placeHolder="Enter Resource Name to Find...">\n <button class="btn btn-success execute" ng-click="executeFindResource(resourceToLoad)">Get resource\n </button>\n </fieldset>\n </form>\n <div id="loadClassResult"/>\n </div>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <td>\n </td>\n <td>\n <div class="accordion" id="accordionImportedPackages">\n <div class="accordion-group">\n <div class="accordion-heading">\n <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionImportedPackages"\n href="#collapseImportedPackages">\n Imported Packages\n </a>\n </div>\n <div id="collapseImportedPackages" class="accordion-body collapse in">\n <table>\n <tr ng-repeat="(package, data) in row.ImportData">\n <td>\n <div class="less-big badge" id="import.{{package}}">{{package}}</div>\n </td>\n </tr>\n </table>\n <div id="unsatisfiedOptionalImports"/>\n </div>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <td>\n </td>\n <td>\n <div class="accordion" id="accordionExportedPackages">\n <div class="accordion-group">\n <div class="accordion-heading">\n <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionExportedPackages"\n href="#collapseExportedPackages">\n Exported Packages\n </a>\n </div>\n <div id="collapseExportedPackages" class="accordion-body collapse in">\n <table>\n <tr ng-repeat="(package, data) in row.ExportData">\n <td>\n <div class="less-big badge badge-success" id="export.{{package}}">{{package}}</div>\n </td>\n </tr>\n </table>\n </div>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <td></td>\n <td>\n <div class="accordion" id="accordionServices">\n <div class="accordion-group">\n <div class="accordion-heading">\n <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionServices"\n href="#collapseServices">\n Services\n </a>\n </div>\n <div id="collapseServices" class="accordion-body collapse in">\n Registered Services\n <table>\n <tr ng-repeat="id in row.RegisteredServices">\n <td><i class="fa fa-cog less-big text-success" id="registers.service.{{id}}">{{id}}</i></td>\n </tr>\n </table>\n <br/>\n Services used by this Bundle\n <table>\n <tr ng-repeat="id in row.ServicesInUse">\n <td><i class="fa fa-cog less-big text-info" id="uses.service.{{id}}">{{id}}</i></td>\n </tr>\n </table>\n </div>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <td>\n </td>\n <td>\n <div class="accordion" id="accordionRequiringBundles">\n <div class="accordion-group">\n <div class="accordion-heading">\n <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionRequiringBundles"\n href="#collapseRequiringBundles">\n Other Bundles using this Bundle\n </a>\n </div>\n <div id="collapseRequiringBundles" class="accordion-body collapse in">\n <div class="accordion-inner">\n <span ng-bind-html-unsafe="row.RequiringBundles"/>\n </div>\n </div>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <td>\n </td>\n <td>\n <div class="accordion" id="accordionHeaders">\n <div class="accordion-group">\n <div class="accordion-heading">\n <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionHeaders"\n href="#collapsHeaders">\n Headers\n </a>\n </div>\n <div id="collapsHeaders" class="accordion-body collapse in">\n <table class="accordion-inner">\n <tr ng-repeat="(key, value) in row.Headers" ng-show="showValue(key)">\n <td valign="top">{{key}}</td>\n <td>{{value.Value}}</td>\n </tr>\n </table>\n </div>\n </div>\n </div>\n </td>\n </tr>\n </table>\n</div>\n'),e.put("plugins/osgi/html/bundle-list.html",'<div class="controller-section" ng-controller="Osgi.BundleListController">\n <div class="row bundle-list-toolbar">\n\n <div class="pull-left">\n <div class="btn-group">\n <a ng-href="#/osgi/bundle-list?p=container"\n type="button"\n class="btn active"\n title="List view">\n <i class="fa fa-list"></i>\n </a>\n <a ng-href="#/osgi/bundles?p=container"\n type="button"\n class="btn"\n title="Table view">\n <i class="fa fa-table"></i>\n </a>\n </div>\n\n <div class="input-group" hawtio-show object-name="{{frameworkMBean}}" method-name="installBundle">\n <input class="input-xxlarge"\n type="text"\n placeholder="Install Bundle..."\n ng-model="bundleUrl">\n <button ng-disabled="installDisabled()"\n class="btn"\n ng-click="install()"\n title="Install">\n <i class="fa fa-ok"></i>\n </button>\n </div>\n\n </div>\n\n\n <div class="pull-right">\n <strong>Show bundles: </strong>\n \n <label for="showActiveMQBundles">ActiveMQ</label>\n <input id="showActiveMQBundles" type="checkbox" ng-model="display.showActiveMQBundles">\n \n \n <label for="showCamelBundles">Camel</label>\n <input id="showCamelBundles" type="checkbox" ng-model="display.showCamelBundles">\n \n \n <label for="showCxfBundles">CXF</label>\n <input id="showCxfBundles" type="checkbox" ng-model="display.showCxfBundles">\n \n \n <label for="showPlatformBundles">Platform</label>\n <input id="showPlatformBundles" type="checkbox" ng-model="display.showPlatformBundles">\n \n \n \n <select class="input-lg" ng-model="display.sortField" id="sortField">\n <option value="Identifier">Sort by ID</option>\n <option value="Name">Sort by Name</option>\n <option value="SymbolicName">Sort by Symbolic Name</option>\n </select>\n <select class="input-lg" ng-model="display.bundleField" id="bundleField">\n <option value="Name">Display Name</option>\n <option value="SymbolicName">Display Symbolic Name</option>\n </select>\n <input class="input-sm search-query" type="number" min="0"\n ng-model="display.startLevelFilter"\n placeholder="Start Level..."/>\n <hawtio-filter ng-model="display.bundleFilter" placeholder="Filter..." save-as="osgi-bundle-list-text-filter"></hawtio-filter>\n </div>\n\n </div>\n\n <div class="row" id="bundleTableHolder">\n <!-- Just create a bit of space between the form and the controls -->\n <p></p>\n\n <script type="text/ng-template" id="popoverTemplate">\n<small>\n <table class="table">\n <tbody>\n <tr ng-repeat="(k, v) in bundle track by $index">\n <td class="property-name">{{k}}</td>\n <td class="property-value">{{v}}</td>\n </tr>\n </tbody>\n </table>\n</small>\n </script>\n\n <div class="bundle-list centered"\n hawtio-auto-columns=".bundle-item">\n <div ng-repeat="bundle in bundles"\n class="bundle-item"\n ng-show="filterBundle(bundle)"\n hawtio-template-popover title="Bundle details">\n <a id="{{bundle.Identifier}}"\n ng-href="#/osgi/bundle/{{bundle.Identifier}}?p=container">\n <span class="badge" ng-class="getStateStyle(bundle.State)">{{getLabel(bundle)}}</span>\n </a>\n </div>\n </div>\n </div>\n</div>\n'),e.put("plugins/osgi/html/bundle.html",'<div class="controller-section" ng-controller="Osgi.BundleController">\n <div ng-include src="\'plugins/osgi/html/bundle-details.html\'"></div>\n</div>\n'),e.put("plugins/osgi/html/bundles.html",'<div class="controller-section" ng-controller="Osgi.BundlesController">\n <div class="row">\n <div class="pull-left">\n\n <form class="form-inline no-bottom-margin">\n <fieldset>\n\n <div class="btn-group inline-block">\n <a ng-href="#/osgi/bundle-list?p=container"\n type="button"\n class="btn"\n title="List view">\n <i class="fa fa-list"></i>\n </a>\n <a ng-href="#/osgi/bundles?p=container"\n type="button"\n class="btn active"\n title="Table view">\n <i class="fa fa-table"></i>\n </a>\n </div>\n\n <div class="controls control-group inline-block controls-row">\n <div class="btn-group">\n <button ng-disabled="selected.length == 0" class="btn" ng-click="stop()" title="Stop"><i class="fa fa-off"></i></button>\n <button ng-disabled="selected.length == 0" class="btn" ng-click="start()" title="Start"><i class="fa fa-play-circle"></i></button>\n <button ng-disabled="selected.length == 0" class="btn" ng-click="refresh()" title="Refresh"><i class="fa fa-refresh"></i></button>\n <button ng-disabled="selected.length == 0" class="btn" ng-click="update()" title="Update"><i class="fa fa-cloud-download"></i></button>\n <button ng-disabled="selected.length == 0" class="btn" ng-click="uninstall()" title="Uninstall"><i class="fa fa-eject"></i></button>\n </div>\n <div class="input-group">\n <input class="input-xlarge" type="text" placeholder="Install Bundle..." ng-model="bundleUrl">\n <button ng-disabled="installDisabled()" class="btn" ng-click="install()" title="Install"><i class="fa fa-ok"></i></button>\n </div>\n </div>\n </fieldset>\n </form>\n \n </div>\n\n <div class="pull-right">\n <form class="form-inline no-bottom-margin">\n <fieldset>\n <div class="control-group inline-block">\n <input type="text"\n class="input-lg search-query"\n placeholder="Filter..."\n ng-model="gridOptions.filterOptions.filterText">\n </div>\n </fieldset>\n </form>\n\n </div>\n </div>\n \n \n <div class="row">\n <div ng-hide="loading" class="gridStyle" ng-grid="gridOptions"></div>\n <div ng-show="loading">\n Please wait, loading...\n </div>\n </div>\n</div>\n'),e.put("plugins/osgi/html/configurations.html",'<style type="text/css">\n .configuration-header {\n margin: 20px 20px;\n }\n\n ul.configurations,\n ul.configurations li {\n list-style: none;\n }\n\n ul.configurations {\n margin: 0px 20px;\n }\n\n ul.configurations .bundle-item {\n display: list-item;\n margin-bottom: 4px;\n }\n\n ul.configurations li.bundle-item a {\n /*\n TODO it\'d be nice to use the natural widgth here,\n but then it might be nice to use multiple columns?\n */\n width: 450px;\n }\n</style>\n\n<div class="controller-section" ng-controller="Osgi.ConfigurationsController">\n <div class="row">\n <div class="configuration-header">\n <div class="configuration-filter">\n <input type="text" class="col-md-8 search-query" placeholder="Filter..." ng-model="filterText">\n <i class="fa fa-remove clickable" title="Clear filter" ng-click="filterText = \'\'"></i>\n <button class="btn pull-right" ng-click="addPidDialog.open()" title="Add a new configuration" hawtio-show object-name="{{hawtioConfigAdminMBean}}" method-name="configAdminUpdate"><i\n class="fa fa-plus"></i> Configuration\n </button>\n </div>\n </div>\n </div>\n\n <div class="row centered" ng-hide="configurations.length">\n <p class="text-center"><i class="fa fa-spinner fa-spin"></i></p>\n </div>\n\n <ul class="configurations">\n <li ng-repeat=\'config in configurations | filter:filterText\' class=\'{{config.class}} bundle-item\'>\n <a ng-href="{{config.pidLink}}" title="{{config.description}}">\n <span class="{{config.kind.class}}">{{config.name}}</span>\n </a>\n <ul ng-show="config.isFactory">\n <li ng-repeat="child in config.children" class=\'{{child.class}} bundle-item\'>\n <a ng-href="{{child.pidLink}}" title="{{child.description}}">\n <span class="{{child.kind.class}}">{{child.name}}</span>\n </a>\n </li>\n </ul>\n </li>\n </ul>\n\n <div modal="addPidDialog.show" close="addPidDialog.close()" options="addPidDialog.options">\n <form name="addPidDialogForm" class="form-horizontal no-bottom-margin" ng-submit="addPid(newPid)">\n <div class="modal-header"><h4>Add New Configuration</h4></div>\n <div class="modal-body">\n <div class="control-group">\n <label class="control-label" for="newPid">New configuration ID</label>\n\n <div class="controls">\n <input class="input-xlarge" type="text" id="newPid" ng-model="newPid"/>\n </div>\n </div>\n </div>\n <div class="modal-footer">\n <input class="btn btn-success" ng-disabled="!(newPid !== \'\' && newPid !== undefined)" type="submit" value="Add">\n <input class="btn btn-primary" ng-click="addPidDialog.close()" type="button" value="Cancel">\n </div>\n </form>\n </div>\n</div>\n\n'),
|
|
3282
|
|
-e.put("plugins/osgi/html/framework.html",'<div class="container" ng-controller="Osgi.FrameworkController">\n <h3>Framework Configuration</h3>\n <div class="col-md-11">\n <table>\n <tr>\n <td><strong>Current Framework Start Level:</strong></td>\n <td class="less-big">{{startLevel}}</td>\n <td><button class="btn btn-primary" \n ng-click="edit(\'FrameworkStartLevel\', \'Framework Start Level\')" \n title="Edit framework start level"\n hawtio-show\n object-name="{{frameworkMBean}}"\n method-name="setFrameworkStartLevel">Edit</button></td>\n </tr>\n <tr><td><p></p></td></tr>\n <tr>\n <td><strong>Initial Bundle Start Level:</strong></td>\n <td class="less-big">{{initialBundleStartLevel}}</td>\n <td><button class="btn btn-primary"\n ng-click="edit(\'InitialBundleStartLevel\', \'Initial Bundle Start Level\')" \n title="Edit initial bundle start level"\n hawtio-show\n object-name="{{frameworkMBean}}"\n method-name="setInitialBundleStartLevel">Edit</button></td>\n </tr>\n </table>\n </div>\n\n <div modal="editDialog.show" close="editDialog.close()" options="editDialog.options">\n <form id="myForm" class="form-horizontal no-bottom-margin" ng-submit="editDialog.close()">\n <div class="modal-header"><h4>Change {{editDisplayName}}</h4></div>\n <div class="modal-body">\n <p>New Start Level (0-100): <input ng-model="editResult" type="number" min="0" max="100" required/></p>\n </div>\n <div class="modal-footer">\n <input class="btn" ng-click="editDialog.close()" type="submit" value="Cancel">\n <input class="btn btn-primary" ng-click="edited(editAttr, editDisplayName, editResult)" type="submit" value="OK">\n </div>\n </form>\n </div>\n</div>\n'),e.put("plugins/osgi/html/layoutOsgi.html",'<ul class="nav nav-tabs" hawtio-auto-dropdown ng-controller="Karaf.NavBarController">\n <li ng-class=\'{active : isActive("#/osgi/configuration") || isPrefixActive("#/osgi/pid")}\'>\n <a ng-href="#/osgi/configurations{{hash}}">Configuration</a>\n </li>\n <li ng-class=\'{active : isActive("#/osgi/bundle")}\'>\n <a ng-href="#/osgi/bundle-list{{hash}}">Bundles</a>\n </li>\n <li ng-class=\'{active : isActive("#/osgi/features") || isActive("#/osgi/feature")}\' ng-show="isFeaturesEnabled">\n <a ng-href="#/osgi/features{{hash}}">Features</a>\n </li>\n <li ng-class=\'{active : isActive("#/osgi/package")}\'>\n <a ng-href="#/osgi/packages{{hash}}">Packages</a>\n </li>\n <li ng-class=\'{active : isActive("#/osgi/service")}\'>\n <a ng-href="#/osgi/services{{hash}}">Services</a>\n </li>\n <li ng-class=\'{active : isActive("#/osgi/scr-components")}\' ng-show="isScrEnabled">\n <a ng-href="#/osgi/scr-components{{hash}}">Declarative Services</a>\n </li>\n <li ng-class=\'{active : isActive("#/osgi/server")}\'>\n <a ng-href="#/osgi/server{{hash}}">Server</a>\n </li>\n <li ng-class=\'{active : isActive("#/osgi/fwk")}\'>\n <a ng-href="#/osgi/fwk{{hash}}">Framework</a>\n </li>\n <li ng-class=\'{active : isActive("#/osgi/dependencies")}\'>\n <a ng-href="#/osgi/dependencies{{hash}}">Dependencies</a>\n </li>\n\n <li class="dropdown overflow" style="float: right !important; visibility: hidden;">\n <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chevron-down"></i></a>\n <ul class="dropdown-menu right"></ul>\n </li>\n\n</ul>\n<div class="row" ng-controller="Osgi.TopLevelController">\n <div ng-view></div>\n</div>\n\n\n'),e.put("plugins/osgi/html/package-details.html",'<div>\n <table class="overviewSection">\n <tr>\n <td><strong>Name:</strong></td>\n <td class="less-big">{{row.Name}}\n </td>\n </tr>\n <tr>\n <td><strong>Version:</strong></td>\n <td class="less-big">{{row.Version}}\n </td>\n </tr>\n <tr>\n <td><strong>Removal Pending:</strong></td>\n <td class="less-big">{{row.RemovalPending}}\n </tr>\n <tr>\n <td><strong>Exporting Bundles:</strong></td>\n <td>\n <ul>\n <li ng-repeat="name in row.ExportingBundles">\n <a href=\'#/osgi/bundle/{{name}}{{hash}}\'>{{name}}</a>\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td><strong>Importing Bundles:</strong></td>\n <td>\n <ul>\n <li ng-repeat="name in row.ImportingBundles">\n <a href=\'#/osgi/bundle/{{name}}{{hash}}\'>{{name}}</a>\n </li>\n </ul>\n </td>\n </tr>\n </table>\n</div>'),e.put("plugins/osgi/html/package.html",'<div class="controller-section" ng-controller="Osgi.PackageController">\n\n<h1>{{row.id}}</h1>\n\n<div ng-include src="\'plugins/osgi/html/package-details.html\'"></div>\n</div>\n'),e.put("plugins/osgi/html/packages.html",'<script type="text/ng-template" id="packageBundlesTemplate">\n <table>\n <tr>\n <th>Exporting Bundles</th>\n <th>Importing Bundles</th>\n </tr>\n <tr>\n <td>\n <ul>\n <li ng-repeat="b in row.ExportingBundles">\n <a href=\'#/osgi/bundle/{{b.Identifier}}?\'>{{b.SymbolicName}}</a>\n </li>\n </ul>\n </td>\n <td>\n <ul>\n <li ng-repeat="b in row.ImportingBundles">\n <a href=\'#/osgi/bundle/{{b.Identifier}}?\'>{{b.SymbolicName}}</a>\n </li>\n </ul>\n </td>\n </tr>\n </table>\n</script>\n\n<div class="controller-section" ng-controller="Osgi.PackagesController">\n <table class="table table-striped" hawtio-simple-table="mygrid"></table>\n</div>\n'),e.put("plugins/osgi/html/pid-details.html",'<div>\n <h4 title="{{metaType.description}}">{{zkPid || metaType.name || pid}}\n <span ng-show="factoryInstanceName">: {{factoryInstanceName}}</span>\n </h4>\n\n <div ng-hide="editMode">\n <div class="row">\n <button class="btn" ng-click="setEditMode(true)" title="Edit this configuration" hawtio-show object-name="{{hawtioConfigAdminMBean}}" method-name="configAdminUpdate"><i class="fa fa-edit"></i> Edit</button>\n <button class="btn btn-danger pull-right" ng-click="deletePidDialog.open()" title="Delete this configuration" hawtio-show object-name="{{configAdminMBean}}" method-name="delete"><i class="fa fa-remove"></i> Delete</button>\n </div>\n <div class="row config-admin-form view">\n <div simple-form name="pidEditor" mode=\'view\' entity=\'entity\' data=\'schema\' schema="fullSchema"></div>\n </div>\n </div>\n <div ng-show="editMode">\n <div class="row">\n <button ng-show="newPid" class="btn btn-primary" ng-disabled="!canSave || !createForm.pidInstanceName" ng-click="pidSave()"><i class="fa fa-save"></i> Create</button>\n <button ng-hide="newPid" class="btn btn-primary" ng-disabled="!canSave" ng-click="pidSave()"><i class="fa fa-save"></i> Save</button>\n <button class="btn btn-warning" ng-click="setEditMode(false)"><i class="fa fa-remove"></i> Cancel</button>\n <button class="btn pull-right" ng-click="addPropertyDialog.open()" title="Add a new property value to this configuration"><i class="fa fa-plus"></i> Property</button>\n </div>\n <div class="row config-admin-form edit">\n <div ng-show="newPid" class="new-config-name-form">\n <form class="form-horizontal" action="">\n <fieldset>\n <div class="control-group">\n <label class="control-label" title="The name of the configuration file">Configuration name: </label>\n <div class="controls">\n <input type="text" class="col-md-12"\n title="The name of the configuration file"\n ng-required="true"\n ng-model="createForm.pidInstanceName" name="path"\n autofocus="autofocus">\n </div>\n </div>\n </fieldset>\n </form>\n </div>\n\n <div simple-form name="pidEditor" mode=\'edit\' entity=\'entity\' data=\'schema\' schema="fullSchema" onSubmit="pidSave()"></div>\n </div>\n </div>\n\n <div modal="deletePropDialog.show" close="deletePropDialog.close()" options="deletePropDialog.options">\n <form name="deleteProperty" class="form-horizontal no-bottom-margin" ng-submit="deletePidPropConfirmed()">\n <div class="modal-header"><h4>Delete property \'{{deleteKey}}\'</h4></div>\n <div class="modal-body">\n <p>Are you sure?</p>\n </div>\n <div class="modal-footer">\n <input class="btn btn-success" type="submit" value="Delete">\n <input class="btn btn-primary" ng-click="deletePropDialog.close()" type="button" value="Cancel">\n </div>\n </form>\n </div>\n\n <div modal="deletePidDialog.show" close="deletePidDialog.close()" options="deletePidDialog.options">\n <form name="deletePid" class="form-horizontal no-bottom-margin" ng-submit="deletePidConfirmed()">\n <div class="modal-header"><h4>Delete configuration: {{pid}}</h4></div>\n <div class="modal-body">\n <p>Are you sure?</p>\n </div>\n <div class="modal-footer">\n <input class="btn btn-success" type="submit" value="Delete">\n <input class="btn btn-primary" ng-click="deletePidDialog.close()" type="button" value="Cancel">\n </div>\n </form>\n </div>\n\n <div modal="addPropertyDialog.show" close="addPropertyDialog.close()" options="addPropertyDialog.options">\n <form name="addProperty" class="form-horizontal no-bottom-margin"\n ng-submit="addPropertyConfirmed(addPropKey, addPropValue)">\n <div class="modal-header"><h4>Add property</h4></div>\n <div class="modal-body">\n <div class="control-group">\n <label class="control-label" for="propKey">Key</label>\n\n <div class="controls">\n <input class="input-xlarge" type="text" id="propKey" placeholder="Key" ng-model="addPropKey"/>\n <span class="help-block"\n ng-hide="addPropKey !== \'\' && addPropKey !== undefined">A key must be specified</span>\n </div>\n </div>\n <div class="control-group">\n <label class="control-label" for="propValue">Value</label>\n\n <div class="controls">\n <input class="input-xlarge" type="text" id="propValue" placeholder="Value" ng-model="addPropValue"/>\n </div>\n </div>\n </div>\n <div class="modal-footer">\n <input class="btn btn-success" ng-disabled="!(addPropKey !== \'\' && addPropKey !== undefined)" type="submit"\n value="Add">\n <input class="btn btn-primary" ng-click="addPropertyDialog.close()" type="button" value="Cancel">\n </div>\n </form>\n </div>\n</div>\n'),e.put("plugins/osgi/html/pid.html",'<div class="controller-section" ng-controller="Osgi.PidController">\n <div ng-include src="\'plugins/osgi/html/pid-details.html\'"></div>\n</div>\n'),e.put("plugins/osgi/html/services.html",'<script type="text/ng-template" id="osgiServiceTemplate">\n <table>\n <tr>\n <th>Using Bundles</th>\n </tr>\n <tr>\n <td>\n <ul>\n <li ng-repeat="b in row.UsingBundles">\n <a href=\'#/osgi/bundle/{{b.Identifier}}{{hash}}\'>{{b.SymbolicName}}</a>\n </li>\n </ul>\n </td>\n </tr>\n </table>\n</script>\n\n<div class="controller-section" ng-controller="Osgi.ServiceController">\n\n <table class="table table-striped" hawtio-simple-table="mygrid"></table>\n\n <table cellpadding="0" cellspacing="0" border="0"\n class="table table-condensed table-striped table-bordered table-hover"\n id="grid">\n <thead>\n <tr>\n <th></th>\n <th>ID</th>\n <th>Bundle</th>\n <th>Object Class(es)</th>\n </tr>\n </thead>\n <tbody>\n </table>\n</div>\n'),e.put("plugins/osgi/html/svc-dependencies.html",'<style type="text/css">\n\n div#pop-up {\n display: none;\n position:absolute;\n color: white;\n font-size: 14px;\n background: rgba(0,0,0,0.6);\n padding: 5px 10px 5px 10px;\n -moz-border-radius: 8px 8px;\n border-radius: 8px 8px;\n }\n\n div#pop-up-title {\n font-size: 15px;\n margin-bottom: 4px;\n font-weight: bolder;\n }\n div#pop-up-content {\n font-size: 12px;\n }\n\n rect.graphbox {\n fill: #DDD;\n }\n\n rect.graphbox.frame {\n stroke: #222;\n stroke-width: 2px\n }\n\n path.link {\n fill: none;\n stroke: #666;\n stroke-width: 1.5px;\n }\n\n path.link.registered {\n stroke: #444;\n }\n\n path.link.inuse {\n stroke-dasharray: 0,2 1;\n }\n\n circle {\n fill: #black;\n }\n\n circle.service {\n fill: blue;\n }\n\n circle.bundle {\n fill: black;\n }\n\n circle.package {\n fill: gray;\n }\n\n text {\n font: 10px sans-serif;\n pointer-events: none;\n }\n\n text.shadow {\n stroke: #fff;\n stroke-width: 3px;\n stroke-opacity: .8;\n }\n\n</style>\n\n<div ng-controller="Osgi.ServiceDependencyController">\n\n <div class="pull-left">\n <form class="form-inline no-bottom-margin">\n <fieldset>\n <div class="control-group inline-block">\n <input type="text" class="search-query" placeholder="Filter Bundle Symbolic Name..." ng-model="bundleFilter">\n <input type="text" class="search-query" placeholder="Filter Package Name..." ng-model="packageFilter" ng-change="updatePkgFilter()">\n <label class="radio" for="showServices">\n <input id="showServices" type="radio" value="services" ng-model="selectView"> Show Services\n </label>\n <label class="radio" for="showPackages">\n <input id="showPackages" type="radio" value="packages" ng-model="selectView" ng-disabled="disablePkg"> Show Packages\n </label>\n <label class="checkbox" for="hideUnused">\n <input id="hideUnused" type="checkbox" ng-model="hideUnused"> Hide Unused\n </label>\n <button class="btn btn-primary" ng-click="updateGraph()" title="Apply the selected criteria to the Graph.">Apply</button>\n </div>\n </fieldset>\n </form>\n </div>\n\n <div ng-hide="inDashboard" class="add-link">\n <a ng-href="{{addToDashboardLink()}}" title="Add this view to a Dashboard"><i class="fa fa-share"></i></a>\n </div>\n\n <div id="pop-up">\n <div id="pop-up-title"></div>\n <div id="pop-up-content"></div>\n </div>\n\n <div class="row">\n <div class="col-md-12 canvas" style="min-height: 800px">\n <div hawtio-force-graph graph="graph" link-distance="100" charge="-300" nodesize="6"></div>\n </div>\n </div>\n\n</div>\n')}]),hawtioPluginLoader.addModule("hawtio-integration-templates");var HawtioExtensionService;!function(e){e.pluginName="hawtio-extension-service",e.templatePath="plugins/hawtio-extension-service/html",e._module=angular.module(e.pluginName,[]),e._module.service("HawtioExtension",function(){this._registeredExtensions={},this.add=function(e,t){this._registeredExtensions[e]||(this._registeredExtensions[e]=[]),this._registeredExtensions[e].push(t)},this.render=function(e,t,n){var i=this._registeredExtensions[e];if(i)for(var r=0;r<i.length;r++){var o=i[r](n);if(!o)return;"string"==typeof o&&(o=document.createTextNode(o)),t.append(o)}}}),e._module.directive("hawtioExtension",["HawtioExtension",function(e){return{restrict:"EA",link:function(t,n,i){i.name&&e.render(i.name,n,t)}}}]),hawtioPluginLoader.addModule(e.pluginName)}(HawtioExtensionService||(HawtioExtensionService={}));var HawtioPreferences;!function(e){function t(e,t){var n=null;return angular.isDefined(e)&&(n=Core.parseJsonText(e,"localStorage for "+t)),n}function n(t,n,i){angular.forEach(i,function(i,r){t[r]=i.value;var o=i.converter,a=i.formatter;if(a||(a=function(e){return e}),o||(o=function(e){return e}),r in n){var s=o(n[r]);e.log.debug("from local storage, setting ",r," to ",s),t[r]=s}else{var s=i.value;e.log.debug("from default, setting ",r," to ",s),n[r]=s}var l=i.override;l||(l=function(t,o){if(t!==o){angular.isFunction(i.pre)&&i.pre(t);var s=a(t);e.log.debug("to local storage, setting ",r," to ",s),n[r]=s,angular.isFunction(i.post)&&i.post(t)}}),i.compareAsObject?t.$watch(r,l,!0):t.$watch(r,l)})}function i(e,t,n){return!t||t(e,n)}e.pluginName="hawtio-preferences",e.templatePath="plugins/preferences/html",e.log=Logger.get(e.pluginName),e.parsePreferencesJson=t,e.initPreferenceScope=n,e.isValidFunction=i}(HawtioPreferences||(HawtioPreferences={}));var HawtioPreferences;!function(e){var t=function(){function e(e){this.$rootScope=e,this.tabs={}}return e.prototype.addTab=function(e,t,n){void 0===n&&(n=void 0),n||(n=function(){return!0}),this.tabs[e]={template:t,isValid:n},this.$rootScope.$broadcast("HawtioPreferencesTabAdded"),Core.$apply(this.$rootScope)},e.prototype.getTab=function(e){return this.tabs[e]},e.prototype.getTabs=function(){var e={};return angular.forEach(this.tabs,function(t,n){t.isValid()&&(e[n]=t)}),e},e}();e.PreferencesRegistry=t}(HawtioPreferences||(HawtioPreferences={}));var HawtioPreferences;!function(e){e._module=angular.module(e.pluginName,[]),e._module.config(["$provide","$routeProvider",function(t,n){n.when("/preferences",{templateUrl:UrlHelpers.join(e.templatePath,"preferences.html"),reloadOnSearch:!1}),t.decorator("preferencesRegistry",["$delegate","$rootScope",function(t,n){return new e.PreferencesRegistry(n)}])}]),e._module.run(["$templateCache","HawtioExtension","$compile","preferencesRegistry",function(t,n,i,r){n.add("hawtio-user",function(n){var r=t.get(UrlHelpers.join(e.templatePath,"menuItem.html"));return i(r)(n)}),e.log.debug("loaded"),r.addTab("Console Logging",UrlHelpers.join(e.templatePath,"loggingPreferences.html")),r.addTab("Reset",UrlHelpers.join(e.templatePath,"resetPreferences.html"))}]),hawtioPluginLoader.addModule(e.pluginName)}(HawtioPreferences||(HawtioPreferences={}));var HawtioPreferences;!function(e){e._module.controller("HawtioPreferences.LoggingPreferences",["$scope","SchemaRegistry",function(e,t){function n(){var e=Logger.loggers,t=(_.keys(e),{});return _.forIn(e,function(e,n){t[n]=n}),t}function i(){e.childLoggers&&_.forEach(e.childLoggers,function(e){Logger.get(e.logger).setLevel(Logger[e.level])})}var r={Off:"OFF",Error:"ERROR",Warn:"WARN",Info:"INFO",Debug:"DEBUG"};t.addSchema("ChildLoggers",{properties:{logger:{type:"string","enum":n()},level:{type:"string","enum":r}}});var o={properties:{logBuffer:{type:"number","default":100,description:"The number of log statements to keep available in the logging console"},globalLogLevel:{type:"string","enum":r},childLoggers:{type:"array",items:{type:"ChildLoggers"}}}};e.$watch("globalLogLevel",function(t,n){if(t!==n)localStorage.logLevel=angular.toJson(Logger[t]),Logger.setLevel(Logger[t]),i();else{try{e.globalLogLevel=angular.fromJson(localStorage.logLevel).name}catch(r){e.globalLogLevel="INFO"}i()}}),e.$watchCollection("childLoggers",function(t,n){if(t!==n)localStorage.childLoggers=angular.toJson(t),i();else try{e.childLoggers=angular.fromJson(localStorage.childLoggers)}catch(r){e.childLoggers=[]}}),e.entity=e,e.config=o,Core.initPreferenceScope(e,localStorage,{logBuffer:{value:100,converter:parseInt,formatter:parseInt,post:function(e){window.LogBuffer=e}}})}])}(HawtioPreferences||(HawtioPreferences={}));var HawtioPreferences;!function(e){e._module.service("PreferencesLastPath",function(){return{lastPath:void 0,lastTab:void 0}}),e._module.controller("HawtioPreferences.MenuItemController",["$scope","$location","PreferencesLastPath",function(e,t,n){e.gotoPreferences=function(){n.lastPath=t.path(),n.lastSearch=t.search(),t.path("/preferences").search({}),Core.$apply(e)}}]),e._module.controller("HawtioPreferences.PreferencesController",["$scope","$location","preferencesRegistry","PreferencesLastPath",function(e,t,n,i){function r(e){return e.sort(function(e,t){return"Reset"==e?1:"Reset"==t?-1:e.localeCompare(t)})}var o=n.getTabs();e.names=r(_.keys(o)),e.$watch(function(){o=n.getTabs(),e.names=r(_.keys(o)),Core.$apply(e)}),Core.bindModelToSearchParam(e,t,"pref","pref",e.names[0]),e.setPanel=function(t){e.pref=t},e.active=function(t){return t===e.pref?"active":""},e.done=function(){t.path(i.lastPath).search(i.lastSearch),Core.$apply(e)},e.getPrefs=function(e){var t=o[e];return t?t.template:void 0}}])}(HawtioPreferences||(HawtioPreferences={}));var HawtioPreferences;if(function(e){e._module.controller("HawtioPreferences.ResetPreferences",["$scope","localStorage",function(t,n){t.doReset=function(){e.log.info("Resetting");var t=function(){n.clear(),setTimeout(function(){window.location.reload()},10)};t()}}])}(HawtioPreferences||(HawtioPreferences={})),angular.module("hawtio-preferences-templates",[]).run(["$templateCache",function(e){e.put("plugins/preferences/html/loggingPreferences.html",'<div ng-controller="HawtioPreferences.LoggingPreferences">\n <div hawtio-form-2="config" entity="entity"></div>\n</div>\n'),e.put("plugins/preferences/html/menuItem.html",'<li ng-controller="HawtioPreferences.MenuItemController">\n <a href="" ng-click="gotoPreferences()">Preferences</a>\n</li>\n'),e.put("plugins/preferences/html/preferences.html",'<div ng-controller="HawtioPreferences.PreferencesController">\n <div class="row">\n <div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">\n <h3>{{pref}}</h3>\n <div ng-include="getPrefs(pref)"></div>\n </div>\n <div class="col-sm-3 col-md-2 col-sm-pull-9 col-md-pull-10 sidebar-pf sidebar-pf-left">\n <div class="nav-category">\n <ul class="nav nav-pills nav-stacked">\n <li ng-repeat="name in names" ng-class="active(name)">\n <a href="" ng-click="setPanel(name)">{{name}}</a>\n </li>\n <li class="align-center">\n <p></p>\n <button ng-click="done()">Done</button>\n <p></p>\n </li>\n </ul>\n </div>\n </div>\n </div>\n</div>\n'),e.put("plugins/preferences/html/resetPreferences.html",'<div ng-controller="HawtioPreferences.ResetPreferences">\n <form class="form-horizontal">\n <fieldset>\n <div class="control-group">\n <label class="control-label">\n <strong>\n <i class=\'yellow text-shadowed icon-warning-sign\'></i> Reset settings\n </strong>\n </label>\n <div class="controls">\n <button class="btn btn-danger" ng-click="doReset()">Reset to defaults</button>\n <span class="help-block">Wipe settings stored by {{branding.appName}} in your browser\'s local storage</span>\n </div>\n </div>\n </fieldset>\n </form>\n</div>\n')}]),hawtioPluginLoader.addModule("hawtio-preferences-templates"),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),s=[],l=0;l<n.length;l++){if(!n[l].empty())return e.Pass;var u=n[l].head,c=t.getTokenAt(u),d=e.innerMode(t.getMode(),c.state),p=d.state;if("xml"!=d.mode.name||!p.tagName)return e.Pass;var h=t.getOption("autoCloseTags"),f="html"==d.mode.configuration,g="object"==typeof h&&h.dontCloseTags||f&&o,m="object"==typeof h&&h.indentTags||f&&a,v=p.tagName;c.end>u.ch&&(v=v.slice(0,v.length-c.end+u.ch));var y=v.toLowerCase();if(!v||"string"==c.type&&(c.end!=u.ch||!/[\"\']/.test(c.string.charAt(c.string.length-1))||1==c.string.length)||"tag"==c.type&&"closeTag"==p.type||c.string.indexOf("/")==c.string.length-1||g&&i(g,y)>-1||r(t,v,u,p,!0))return e.Pass;var b=m&&i(m,y)>-1;s[l]={indent:b,text:">"+(b?"\n\n":"")+"</"+v+">",newPos:b?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}for(var l=n.length-1;l>=0;l--){var w=s[l];t.replaceRange(w.text,n[l].head,n[l].anchor,"+insert");var x=t.listSelections().slice(0);x[l]={head:w.newPos,anchor:w.newPos},t.setSelections(x),w.indent&&(t.indentLine(w.newPos.line,null,!0),t.indentLine(w.newPos.line+1,null,!0))}}function n(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),i=[],o=0;o<n.length;o++){if(!n[o].empty())return e.Pass;var a=n[o].head,s=t.getTokenAt(a),l=e.innerMode(t.getMode(),s.state),u=l.state;if("string"==s.type||"<"!=s.string.charAt(0)||s.start!=a.ch-1)return e.Pass;if("xml"!=l.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==l.mode.name)i[o]="/script>";else{if("htmlmixed"!=t.getMode().name||"css"!=l.mode.name)return e.Pass;i[o]="/style>"}else{if(!u.context||!u.context.tagName||r(t,u.context.tagName,a,u))return e.Pass;i[o]="/"+u.context.tagName+">"}}t.replaceSelections(i),n=t.listSelections();for(var o=0;o<n.length;o++)(o==n.length-1||n[o].head.line<n[o+1].head.line)&&t.indentLine(n[o].head.line)}function i(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;i>n;++n)if(e[n]==t)return n;return-1}function r(t,n,i,r,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,i.line+500),s=e.scanForClosingTag(t,i,null,a);if(!s||s.tag!=n)return!1;for(var l=r.context,u=o?1:0;l&&l.tagName==n;l=l.prev)++u;i=s.to;for(var c=1;u>c;c++){var d=e.scanForClosingTag(t,i,null,a);if(!d||d.tag!=n)return!1;i=d.to}return!0}e.defineOption("autoCloseTags",!1,function(i,r,o){if(o!=e.Init&&o&&i.removeKeyMap("autoCloseTags"),r){var a={name:"autoCloseTags"};("object"!=typeof r||r.whenClosing)&&(a["'/'"]=function(e){return n(e)}),("object"!=typeof r||r.whenOpening)&&(a["'>'"]=function(e){return t(e)}),i.addKeyMap(a)}});var o=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],a=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"]}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t=/^(\s*)(>[> ]*|[*+-]\s|(\d+)\.)(\s*)/,n=/^(\s*)(>[> ]*|[*+-]|(\d+)\.)(\s*)$/,i=/[*+-]\s/;e.commands.newlineAndIndentContinueMarkdownList=function(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),a=[],s=0;s<o.length;s++){var l,u=o[s].head,c=r.getStateAfter(u.line),d=c.list!==!1,p=c.quote!==!1;if(!o[s].empty()||!d&&!p||!(l=r.getLine(u.line).match(t)))return void r.execCommand("newlineAndIndent");if(r.getLine(u.line).match(n))r.replaceRange("",{line:u.line,ch:0},{line:u.line,ch:u.ch+1}),a[s]="\n";else{var h=l[1],f=l[4],g=i.test(l[2])||l[2].indexOf(">")>=0?l[2]:parseInt(l[3],10)+1+".";a[s]="\n"+h+g+f}}r.replaceSelections(a)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,i,r){var o=e.getLineHandle(t.line),l=t.ch-1,u=l>=0&&s[o.text.charAt(l)]||s[o.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(i&&c>0!=(l==t.ch))return null;var d=e.getTokenTypeAt(a(t.line,l+1)),p=n(e,a(t.line,l+(c>0?1:0)),c,d||null,r);return null==p?null:{from:a(t.line,l),to:p&&p.pos,match:p&&p.ch==u.charAt(0),forward:c>0}}function n(e,t,n,i,r){for(var o=r&&r.maxScanLineLength||1e4,l=r&&r.maxScanLines||1e3,u=[],c=r&&r.bracketRegex?r.bracketRegex:/[(){}[\]]/,d=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),p=t.line;p!=d;p+=n){var h=e.getLine(p);if(h){var f=n>0?0:h.length-1,g=n>0?h.length:-1;if(!(h.length>o))for(p==t.line&&(f=t.ch-(0>n?1:0));f!=g;f+=n){var m=h.charAt(f);if(c.test(m)&&(void 0===i||e.getTokenTypeAt(a(p,f+1))==i)){var v=s[m];if(">"==v.charAt(1)==n>0)u.push(m);else{if(!u.length)return{pos:a(p,f),ch:m};u.pop()}}}}}return p-n==(n>0?e.lastLine():e.firstLine())?!1:null}function i(e,n,i){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],l=e.listSelections(),u=0;u<l.length;u++){var c=l[u].empty()&&t(e,l[u].head,!1,i);if(c&&e.getLine(c.from.line).length<=r){var d=c.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";s.push(e.markText(c.from,a(c.from.line,c.from.ch+1),{className:d})),c.to&&e.getLine(c.to.line).length<=r&&s.push(e.markText(c.to,a(c.to.line,c.to.ch+1),{className:d}))}}if(s.length){o&&e.state.focused&&e.display.input.focus();var p=function(){e.operation(function(){for(var e=0;e<s.length;e++)s[e].clear()})};if(!n)return p;setTimeout(p,800)}}function r(e){e.operation(function(){l&&(l(),l=null),l=i(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=e.Pos,s={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&t.off("cursorActivity",r),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",r))}),e.defineExtension("matchBrackets",function(){i(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,i){return t(this,e,n,i)}),e.defineExtension("scanForBracket",function(e,t,i,r){return n(this,e,t,i,r)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,r,o,a){function s(e){var n=l(t,r);if(!n||n.to.line-n.from.line<u)return null;for(var i=t.findMarksAt(n.from),o=0;o<i.length;++o)if(i[o].__isFold&&"fold"!==a){if(!e)return null;n.cleared=!0,i[o].clear()}return n}if(o&&o.call){var l=o;o=null}else var l=i(t,o,"rangeFinder");"number"==typeof r&&(r=e.Pos(r,0));var u=i(t,o,"minFoldSize"),c=s(!0);if(i(t,o,"scanUp"))for(;!c&&r.line>t.firstLine();)r=e.Pos(r.line-1,0),c=s(!1);if(c&&!c.cleared&&"unfold"!==a){var d=n(t,o);e.on(d,"mousedown",function(t){p.clear(),e.e_preventDefault(t)});var p=t.markText(c.from,c.to,{replacedWith:d,clearOnEnter:!0,__isFold:!0});p.on("clear",function(n,i){e.signal(t,"unfold",t,n,i)}),e.signal(t,"fold",t,c.from,c.to)}}function n(e,t){var n=i(e,t,"widget");if("string"==typeof n){var r=document.createTextNode(n);n=document.createElement("span"),n.appendChild(r),n.className="CodeMirror-foldmarker"}return n}function i(e,t,n){if(t&&void 0!==t[n])return t[n];var i=e.options.foldOptions;return i&&void 0!==i[n]?i[n]:r[n]}e.newFoldFunction=function(e,n){return function(i,r){t(i,r,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",function(e,n,i){t(this,e,n,i)}),e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0}),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},e.commands.foldAll=function(t){t.operation(function(){for(var n=t.firstLine(),i=t.lastLine();i>=n;n++)t.foldCode(e.Pos(n,0),null,"fold")})},e.commands.unfoldAll=function(t){t.operation(function(){for(var n=t.firstLine(),i=t.lastLine();i>=n;n++)t.foldCode(e.Pos(n,0),null,"unfold")})},e.registerHelper("fold","combine",function(){
|
|
3283
|
|
-var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var i=0;i<e.length;++i){var r=e[i](t,n);if(r)return r}}}),e.registerHelper("fold","auto",function(e,t){for(var n=e.getHelpers(t,"fold"),i=0;i<n.length;i++){var r=n[i](e,t);if(r)return r}});var r={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1};e.defineOption("foldOptions",null)}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerHelper("fold","brace",function(t,n){function i(i){for(var r=n.ch,l=0;;){var u=0>=r?-1:s.lastIndexOf(i,r-1);if(-1!=u){if(1==l&&u<n.ch)break;if(o=t.getTokenTypeAt(e.Pos(a,u+1)),!/^(comment|string)/.test(o))return u+1;r=u-1}else{if(1==l)break;l=1,r=s.length}}}var r,o,a=n.line,s=t.getLine(a),l="{",u="}",r=i("{");if(null==r&&(l="[",u="]",r=i("[")),null!=r){var c,d,p=1,h=t.lastLine();e:for(var f=a;h>=f;++f)for(var g=t.getLine(f),m=f==a?r:0;;){var v=g.indexOf(l,m),y=g.indexOf(u,m);if(0>v&&(v=g.length),0>y&&(y=g.length),m=Math.min(v,y),m==g.length)break;if(t.getTokenTypeAt(e.Pos(f,m+1))==o)if(m==v)++p;else if(!--p){c=f,d=m;break e}++m}if(null!=c&&(a!=c||d!=r))return{from:e.Pos(a,r),to:e.Pos(c,d)}}}),e.registerHelper("fold","import",function(t,n){function i(n){if(n<t.firstLine()||n>t.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));if(/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"keyword"!=i.type||"import"!=i.string)return null;for(var r=n,o=Math.min(t.lastLine(),n+10);o>=r;++r){var a=t.getLine(r),s=a.indexOf(";");if(-1!=s)return{startCh:i.end,end:e.Pos(r,s)}}}var r,n=n.line,o=i(n);if(!o||i(n-1)||(r=i(n-2))&&r.end.line==n-1)return null;for(var a=o.end;;){var s=i(a.line+1);if(null==s)break;a=s.end}return{from:t.clipPos(e.Pos(n,o.startCh+1)),to:a}}),e.registerHelper("fold","include",function(t,n){function i(n){if(n<t.firstLine()||n>t.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));return/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"meta"==i.type&&"#include"==i.string.slice(0,8)?i.start+8:void 0}var n=n.line,r=i(n);if(null==r||null!=i(n-1))return null;for(var o=n;;){var a=i(o+1);if(null==a)break;++o}return{from:e.Pos(n,r+1),to:t.clipPos(e.Pos(o))}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,i){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=i?i.from:e.firstLine(),this.max=i?i.to-1:e.lastLine()}function i(e,t){var n=e.cm.getTokenTypeAt(p(e.line,t));return n&&/\btag\b/.test(n)}function r(e){return e.line>=e.max?void 0:(e.ch=0,e.text=e.cm.getLine(++e.line),!0)}function o(e){return e.line<=e.min?void 0:(e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0)}function a(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(r(e))continue;return}{if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function s(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(o(e))continue;return}if(i(e,t+1)){g.lastIndex=t,e.ch=t;var n=g.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function l(e){for(;;){g.lastIndex=e.ch;var t=g.exec(e.text);if(!t){if(r(e))continue;return}{if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(o(e))continue;return}{if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}}function c(e,t){for(var n=[];;){var i,r=l(e),o=e.line,s=e.ch-(r?r[0].length:0);if(!r||!(i=a(e)))return;if("selfClose"!=i)if(r[1]){for(var u=n.length-1;u>=0;--u)if(n[u]==r[2]){n.length=u;break}if(0>u&&(!t||t==r[2]))return{tag:r[2],from:p(o,s),to:p(e.line,e.ch)}}else n.push(r[2])}}function d(e,t){for(var n=[];;){var i=u(e);if(!i)return;if("selfClose"!=i){var r=e.line,o=e.ch,a=s(e);if(!a)return;if(a[1])n.push(a[2]);else{for(var l=n.length-1;l>=0;--l)if(n[l]==a[2]){n.length=l;break}if(0>l&&(!t||t==a[2]))return{tag:a[2],from:p(e.line,e.ch),to:p(r,o)}}}else s(e)}}var p=e.Pos,h="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",f=h+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",g=new RegExp("<(/?)(["+h+"]["+f+"]*)","g");e.registerHelper("fold","xml",function(e,t){for(var i=new n(e,t.line,0);;){var r,o=l(i);if(!o||i.line!=t.line||!(r=a(i)))return;if(!o[1]&&"selfClose"!=r){var t=p(i.line,i.ch),s=c(i,o[2]);return s&&{from:t,to:s.from}}}}),e.findMatchingTag=function(e,i,r){var o=new n(e,i.line,i.ch,r);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var l=a(o),u=l&&p(o.line,o.ch),h=l&&s(o);if(l&&h&&!(t(o,i)>0)){var f={from:p(o.line,o.ch),to:u,tag:h[2]};return"selfClose"==l?{open:f,close:null,at:"open"}:h[1]?{open:d(o,h[2]),close:f,at:"close"}:(o=new n(e,u.line,u.ch,r),{open:f,close:c(o,h[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,i){for(var r=new n(e,t.line,t.ch,i);;){var o=d(r);if(!o)break;var a=new n(e,t.line,t.ch,i),s=c(a,o.tag);if(s)return{open:o,close:s}}},e.scanForClosingTag=function(e,t,i,r){var o=new n(e,t.line,t.ch,r?{from:0,to:r}:null);return c(o,i)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,n){function i(e){for(var t,n=!1,i=!1;null!=(t=e.next());){if(!n){if("/"==t&&!i)return;"["==t?i=!0:i&&"]"==t&&(i=!1)}n=!n&&"\\"==t}}function r(e,t,n){return fe=e,ge=n,t}function o(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=a(n),t.tokenize(e,t);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&e.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&e.eat(">"))return r("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),r("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return e.eat("*")?(t.tokenize=s,s(e,t)):e.eat("/")?(e.skipToEnd(),r("comment","comment")):"operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)?(i(e),e.eatWhile(/[gimy]/),r("regexp","string-2")):(e.eatWhile(Ce),r("operator","operator",e.current()));if("`+"`"+`"==n)return t.tokenize=l,l(e,t);if("#"==n)return e.skipToEnd(),r("error","error");if(Ce.test(n))return e.eatWhile(Ce),r("operator","operator",e.current());if(xe.test(n)){e.eatWhile(xe);var o=e.current(),u=ke.propertyIsEnumerable(o)&&ke[o];return u&&"."!=t.lastType?r(u.type,u.style,o):r("variable","variable",o)}}function a(e){return function(t,n){var i,a=!1;if(ye&&"@"==t.peek()&&t.match(Se))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=t.next())&&(i!=e||a);)a=!a&&"\\"==i;return a||(n.tokenize=o),r("string","string")}}function s(e,t){for(var n,i=!1;n=e.next();){if("/"==n&&i){t.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(e,t){for(var n,i=!1;null!=(n=e.next());){if(!i&&("`+"`"+`"==n||"$"==n&&e.eat("{"))){t.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){for(var i=0,r=!1,o=n-1;o>=0;--o){var a=e.string.charAt(o),s=_e.indexOf(a);if(s>=0&&3>s){if(!i){++o;break}if(0==--i)break}else if(s>=3&&6>s)++i;else if(xe.test(a))r=!0;else{if(/["'\/]/.test(a))return;if(r&&!i){++o;break}}}r&&!i&&(t.fatArrowAt=o)}}function c(e,t,n,i,r,o){this.indented=e,this.column=t,this.type=n,this.prev=r,this.info=o,null!=i&&(this.align=i)}function d(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var i=e.context;i;i=i.prev)for(var n=i.vars;n;n=n.next)if(n.name==t)return!0}function p(e,t,n,i,r){var o=e.cc;for($e.state=e,$e.stream=r,$e.marked=null,$e.cc=o,$e.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():be?k:x;if(a(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return $e.marked?$e.marked:"variable"==n&&d(e,i)?"variable-2":t}}}function h(){for(var e=arguments.length-1;e>=0;e--)$e.cc.push(arguments[e])}function f(){return h.apply(null,arguments),!0}function g(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var i=$e.state;if(i.context){if($e.marked="def",t(i.localVars))return;i.localVars={name:e,next:i.localVars}}else{if(t(i.globalVars))return;n.globalVars&&(i.globalVars={name:e,next:i.globalVars})}}function m(){$e.state.context={prev:$e.state.context,vars:$e.state.localVars},$e.state.localVars=Ee}function v(){$e.state.localVars=$e.state.context.vars,$e.state.context=$e.state.context.prev}function y(e,t){var n=function(){var n=$e.state,i=n.indented;if("stat"==n.lexical.type)i=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)i=r.indented;n.lexical=new c(i,$e.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function b(){var e=$e.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(n){return n==e?f():";"==e?h():f(t)}return t}function x(e,t){return"var"==e?f(y("vardef",t.length),B,w(";"),b):"keyword a"==e?f(y("form"),k,x,b):"keyword b"==e?f(y("form"),x,b):"{"==e?f(y("}"),q,b):";"==e?f():"if"==e?("else"==$e.state.lexical.info&&$e.state.cc[$e.state.cc.length-1]==b&&$e.state.cc.pop()(),f(y("form"),k,x,b,J)):"function"==e?f(ee):"for"==e?f(y("form"),X,x,b):"variable"==e?f(y("stat"),A):"switch"==e?f(y("form"),k,y("}","switch"),w("{"),q,b,b):"case"==e?f(k,w(":")):"default"==e?f(w(":")):"catch"==e?f(y("form"),m,w("("),te,w(")"),x,b,v):"module"==e?f(y("form"),m,ae,v,b):"class"==e?f(y("form"),ne,b):"export"==e?f(y("form"),se,b):"import"==e?f(y("form"),le,b):h(y("stat"),k,w(";"),b)}function k(e){return S(e,!1)}function C(e){return S(e,!0)}function S(e,t){if($e.state.fatArrowAt==$e.stream.start){var n=t?P:I;if("("==e)return f(m,y(")"),R(z,")"),b,w("=>"),n,v);if("variable"==e)return h(m,z,w("=>"),n,v)}var i=t?E:$;return Te.hasOwnProperty(e)?f(i):"function"==e?f(ee,i):"keyword c"==e?f(t?T:_):"("==e?f(y(")"),_,he,w(")"),b,i):"operator"==e||"spread"==e?f(t?C:k):"["==e?f(y("]"),de,b,i):"{"==e?F(N,"}",null,i):"quasi"==e?h(D,i):f()}function _(e){return e.match(/[;\}\)\],]/)?h():h(k)}function T(e){return e.match(/[;\}\)\],]/)?h():h(C)}function $(e,t){return","==e?f(k):E(e,t,!1)}function E(e,t,n){var i=0==n?$:E,r=0==n?k:C;return"=>"==e?f(m,n?P:I,v):"operator"==e?/\+\+|--/.test(t)?f(i):"?"==t?f(k,w(":"),r):f(r):"quasi"==e?h(D,i):";"!=e?"("==e?F(C,")","call",i):"."==e?f(j,i):"["==e?f(y("]"),_,w("]"),b,i):void 0:void 0}function D(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?f(D):f(k,M)}function M(e){return"}"==e?($e.marked="string-2",$e.state.tokenize=l,f(D)):void 0}function I(e){return u($e.stream,$e.state),h("{"==e?x:k)}function P(e){return u($e.stream,$e.state),h("{"==e?x:C)}function A(e){return":"==e?f(b,x):h($,w(";"),b)}function j(e){return"variable"==e?($e.marked="property",f()):void 0}function N(e,t){return"variable"==e||"keyword"==$e.style?($e.marked="property",f("get"==t||"set"==t?O:L)):"number"==e||"string"==e?($e.marked=ye?"property":$e.style+" property",f(L)):"jsonld-keyword"==e?f(L):"["==e?f(k,w("]"),L):void 0}function O(e){return"variable"!=e?h(L):($e.marked="property",f(ee))}function L(e){return":"==e?f(C):"("==e?h(ee):void 0}function R(e,t){function n(i){if(","==i){var r=$e.state.lexical;return"call"==r.info&&(r.pos=(r.pos||0)+1),f(e,n)}return i==t?f():f(w(t))}return function(i){return i==t?f():h(e,n)}}function F(e,t,n){for(var i=3;i<arguments.length;i++)$e.cc.push(arguments[i]);return f(y(t,n),R(e,t),b)}function q(e){return"}"==e?f():h(x,q)}function H(e){return we&&":"==e?f(U):void 0}function U(e){return"variable"==e?($e.marked="variable-3",f()):void 0}function B(){return h(z,H,W,G)}function z(e,t){return"variable"==e?(g(t),f()):"["==e?F(z,"]"):"{"==e?F(V,"}"):void 0}function V(e,t){return"variable"!=e||$e.stream.match(/^\s*:/,!1)?("variable"==e&&($e.marked="property"),f(w(":"),z,W)):(g(t),f(W))}function W(e,t){return"="==t?f(C):void 0}function G(e){return","==e?f(B):void 0}function J(e,t){return"keyword b"==e&&"else"==t?f(y("form","else"),x,b):void 0}function X(e){return"("==e?f(y(")"),Y,w(")"),b):void 0}function Y(e){return"var"==e?f(B,w(";"),Q):";"==e?f(Q):"variable"==e?f(K):h(k,w(";"),Q)}function K(e,t){return"in"==t||"of"==t?($e.marked="keyword",f(k)):f($,Q)}function Q(e,t){return";"==e?f(Z):"in"==t||"of"==t?($e.marked="keyword",f(k)):h(k,w(";"),Z)}function Z(e){")"!=e&&f(k)}function ee(e,t){return"*"==t?($e.marked="keyword",f(ee)):"variable"==e?(g(t),f(ee)):"("==e?f(m,y(")"),R(te,")"),b,x,v):void 0}function te(e){return"spread"==e?f(te):h(z,H)}function ne(e,t){return"variable"==e?(g(t),f(ie)):void 0}function ie(e,t){return"extends"==t?f(k,ie):"{"==e?f(y("}"),re,b):void 0}function re(e,t){return"variable"==e||"keyword"==$e.style?($e.marked="property","get"==t||"set"==t?f(oe,ee,re):f(ee,re)):"*"==t?($e.marked="keyword",f(re)):";"==e?f(re):"}"==e?f():void 0}function oe(e){return"variable"!=e?h():($e.marked="property",f())}function ae(e,t){return"string"==e?f(x):"variable"==e?(g(t),f(ce)):void 0}function se(e,t){return"*"==t?($e.marked="keyword",f(ce,w(";"))):"default"==t?($e.marked="keyword",f(k,w(";"))):h(x)}function le(e){return"string"==e?f():h(ue,ce)}function ue(e,t){return"{"==e?F(ue,"}"):("variable"==e&&g(t),f())}function ce(e,t){return"from"==t?($e.marked="keyword",f(k)):void 0}function de(e){return"]"==e?f():h(C,pe)}function pe(e){return"for"==e?h(he,w("]")):","==e?f(R(T,"]")):h(R(C,"]"))}function he(e){return"for"==e?f(X,he):"if"==e?f(k,he):void 0}var fe,ge,me=t.indentUnit,ve=n.statementIndent,ye=n.jsonld,be=n.json||ye,we=n.typescript,xe=n.wordCharacters||/[\w$\xa1-\uffff]/,ke=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),i=e("keyword c"),r=e("operator"),o={type:"atom",style:"atom"},a={"if":e("if"),"while":t,"with":t,"else":n,"do":n,"try":n,"finally":n,"return":i,"break":i,"continue":i,"new":i,"delete":i,"throw":i,"debugger":i,"var":e("var"),"const":e("var"),let:e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":r,"typeof":r,"instanceof":r,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o,"this":e("this"),module:e("module"),"class":e("class"),"super":e("atom"),"yield":i,"export":e("export"),"import":e("import"),"extends":i};if(we){var s={type:"variable",style:"variable-3"},l={"interface":e("interface"),"extends":e("extends"),constructor:e("constructor"),"public":e("public"),"private":e("private"),"protected":e("protected"),"static":e("static"),string:s,number:s,bool:s,any:s};for(var u in l)a[u]=l[u]}return a}(),Ce=/[+\-*&%=<>!?|~^]/,Se=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,_e="([{}])",Te={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},$e={state:null,column:null,marked:null,cc:null},Ee={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new c((e||0)-me,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=s&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==fe?n:(t.lastType="operator"!=fe||"++"!=ge&&"--"!=ge?fe:"incdec",p(t,n,fe,ge,e))},indent:function(t,i){if(t.tokenize==s)return e.Pass;if(t.tokenize!=o)return 0;var r=i&&i.charAt(0),a=t.lexical;if(!/^\s*else\b/.test(i))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==b)a=a.prev;else if(u!=J)break}"stat"==a.type&&"}"==r&&(a=a.prev),ve&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var c=a.type,d=r==c;return"vardef"==c?a.indented+("operator"==t.lastType||","==t.lastType?a.info+1:0):"form"==c&&"{"==r?a.indented:"form"==c?a.indented+me:"stat"==c?a.indented+("operator"==t.lastType||","==t.lastType?ve||me:0):"switch"!=a.info||d||0==n.doubleIndentSwitch?a.align?a.column+(d?0:1):a.indented+(d?0:me):a.indented+(/^(?:case|default)\b/.test(i)?me:2*me)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:be?null:"/*",blockCommentEnd:be?null:"*/",lineComment:be?null:"//",fold:"brace",helperType:be?"json":"javascript",jsonldMode:ye,jsonMode:be}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("xml",function(t,n){function i(e,t){function n(n){return t.tokenize=n,n(e,t)}var i=e.next();if("<"==i)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(a("atom","]]>")):null:e.match("--")?n(a("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(s(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=a("meta","?>"),"meta"):(C=e.eat("/")?"closeTag":"openTag",t.tokenize=r,"tag bracket");if("&"==i){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function r(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=i,C=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return C="equals",null;if("<"==n){t.tokenize=i,t.state=d,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=o(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function o(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=r;break}return"string"};return t.isInAttribute=!0,t}function a(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=i;break}n.next()}return e}}function s(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=s(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=i;break}return n.tokenize=s(e-1),n.tokenize(t,n)}}return"meta"}}function l(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(_.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function c(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!_.contextGrabbers.hasOwnProperty(n)||!_.contextGrabbers[n].hasOwnProperty(t))return;u(e)}}function d(e,t,n){return"openTag"==e?(n.tagStart=t.column(),p):"closeTag"==e?h:d}function p(e,t,n){return"word"==e?(n.tagName=t.current(),S="tag",m):(S="error",p)}function h(e,t,n){if("word"==e){var i=t.current();return n.context&&n.context.tagName!=i&&_.implicitlyClosed.hasOwnProperty(n.context.tagName)&&u(n),n.context&&n.context.tagName==i?(S="tag",f):(S="tag error",g)}return S="error",g}function f(e,t,n){return"endTag"!=e?(S="error",f):(u(n),d)}function g(e,t,n){return S="error",f(e,t,n)}function m(e,t,n){if("word"==e)return S="attribute",v;if("endTag"==e||"selfcloseTag"==e){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||_.autoSelfClosers.hasOwnProperty(i)?c(n,i):(c(n,i),n.context=new l(n,i,r==n.indented)),d}return S="error",m}function v(e,t,n){return"equals"==e?y:(_.allowMissing||(S="error"),m(e,t,n))}function y(e,t,n){return"string"==e?b:"word"==e&&_.allowUnquoted?(S="string",m):(S="error",m(e,t,n))}function b(e,t,n){return"string"==e?b:m(e,t,n)}var w=t.indentUnit,x=n.multilineTagIndentFactor||1,k=n.multilineTagIndentPastTag;null==k&&(k=!0);var C,S,_=n.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},T=n.alignCDATA;return{startState:function(){return{tokenize:i,state:d,indented:0,tagName:null,tagStart:null,context:null}},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;C=null;var n=t.tokenize(e,t);return(n||C)&&"comment"!=n&&(S=null,t.state=t.state(C||n,e,t),S&&(n="error"==S?n+" error":S)),n},indent:function(t,n,o){var a=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+w;if(a&&a.noIndent)return e.Pass;if(t.tokenize!=r&&t.tokenize!=i)return o?o.match(/^(\s*)/)[0].length:0;if(t.tagName)return k?t.tagStart+t.tagName.length+2:t.tagStart+w*x;if(T&&/<!\[CDATA\[/.test(n))return 0;var s=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(s&&s[1])for(;a;){if(a.tagName==s[2]){a=a.prev;break}if(!_.implicitlyClosed.hasOwnProperty(a.tagName))break;a=a.prev}else if(s)for(;a;){var l=_.contextGrabbers[a.tagName];if(!l||!l.hasOwnProperty(s[2]))break;a=a.prev}for(;a&&!a.startOfLine;)a=a.prev;return a?a.indent+w:0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:n.htmlMode?"html":"xml",helperType:n.htmlMode?"html":"xml"}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}function n(e,t){for(var n,i=!1;null!=(n=e.next());){if(i&&"/"==n){t.tokenize=null;break}i="*"==n}return["comment","comment"]}function i(e,t){return e.skipTo("-->")?(e.match("-->"),t.tokenize=null):e.skipToEnd(),["comment","comment"]}e.defineMode("css",function(t,n){function i(e,t){return h=t,e}function r(e,t){var n=e.next();if(m[n]){var r=m[n](e,t);if(r!==!1)return r}return"@"==n?(e.eatWhile(/[\w\\\-]/),i("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?i(null,"compare"):'"'==n||"'"==n?(t.tokenize=o(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),i("atom","hash")):"!"==n?(e.match(/^\s*\w*/),i("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),i("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?i(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&e.match("rl(")?(e.backUp(1),t.tokenize=a,i("property","word")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),i("number","unit")):e.match(/^\w+-/)?i("meta","meta"):void 0}function o(e){return function(t,n){for(var r,o=!1;null!=(r=t.next());){if(r==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==r}return(r==e||!o&&")"!=e)&&(n.tokenize=null),i("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),i(null,"(")}function s(e,t,n){this.type=e,this.indent=t,this.prev=n}function l(e,t,n){return e.context=new s(n,t.indentation()+g,e.context),n}function u(e){return e.context=e.context.prev,e.context.type}function c(e,t,n){return _[n.context.type](e,t,n)}function d(e,t,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return c(e,t,n)}function p(e){var t=e.current().toLowerCase();f=k.hasOwnProperty(t)?"atom":x.hasOwnProperty(t)?"keyword":"variable"}n.propertyKeywords||(n=e.resolveMode("text/css"));var h,f,g=t.indentUnit,m=n.tokenHooks,v=n.mediaTypes||{},y=n.mediaFeatures||{},b=n.propertyKeywords||{},w=n.nonStandardPropertyKeywords||{},x=n.colorKeywords||{},k=n.valueKeywords||{},C=n.fontProperties||{},S=n.allowNested,_={};return _.top=function(e,t,n){if("{"==e)return l(n,t,"block");if("}"==e&&n.context.prev)return u(n);if("@media"==e)return l(n,t,"media");if("@font-face"==e)return"font_face_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return l(n,t,"at");if("hash"==e)f="builtin";else if("word"==e)f="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return l(n,t,"interpolation");if(":"==e)return"pseudo";if(S&&"("==e)return l(n,t,"parens")}return n.context.type},_.block=function(e,t,n){if("word"==e){var i=t.current().toLowerCase();return b.hasOwnProperty(i)?(f="property","maybeprop"):w.hasOwnProperty(i)?(f="string-2","maybeprop"):S?(f=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(f+=" error","maybeprop")}return"meta"==e?"block":S||"hash"!=e&&"qualifier"!=e?_.top(e,t,n):(f="error","block")},_.maybeprop=function(e,t,n){return":"==e?l(n,t,"prop"):c(e,t,n)},_.prop=function(e,t,n){if(";"==e)return u(n);if("{"==e&&S)return l(n,t,"propBlock");if("}"==e||"{"==e)return d(e,t,n);if("("==e)return l(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t.current())){if("word"==e)p(t);else if("interpolation"==e)return l(n,t,"interpolation")}else f+=" error";return"prop"},_.propBlock=function(e,t,n){return"}"==e?u(n):"word"==e?(f="property","maybeprop"):n.context.type},_.parens=function(e,t,n){return"{"==e||"}"==e?d(e,t,n):")"==e?u(n):"("==e?l(n,t,"parens"):("word"==e&&p(t),"parens")},_.pseudo=function(e,t,n){return"word"==e?(f="variable-3",n.context.type):c(e,t,n)},_.media=function(e,t,n){if("("==e)return l(n,t,"media_parens");if("}"==e)return d(e,t,n);if("{"==e)return u(n)&&l(n,t,S?"block":"top");if("word"==e){var i=t.current().toLowerCase();f="only"==i||"not"==i||"and"==i?"keyword":v.hasOwnProperty(i)?"attribute":y.hasOwnProperty(i)?"property":"error"}return n.context.type},_.media_parens=function(e,t,n){return")"==e?u(n):"{"==e||"}"==e?d(e,t,n,2):_.media(e,t,n)},_.font_face_before=function(e,t,n){return"{"==e?l(n,t,"font_face"):c(e,t,n)},_.font_face=function(e,t,n){return"}"==e?u(n):"word"==e?(f=C.hasOwnProperty(t.current().toLowerCase())?"property":"error","maybeprop"):"font_face"},_.keyframes=function(e,t,n){return"word"==e?(f="variable","keyframes"):"{"==e?l(n,t,"top"):c(e,t,n)},_.at=function(e,t,n){return";"==e?u(n):"{"==e||"}"==e?d(e,t,n):("word"==e?f="tag":"hash"==e&&(f="builtin"),"at")},_.interpolation=function(e,t,n){return"}"==e?u(n):"{"==e||";"==e?d(e,t,n):("variable"!=e&&(f="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:"top",context:new s("top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||r)(e,t);return n&&"object"==typeof n&&(h=n[1],n=n[0]),f=n,t.state=_[t.state](h,e,t),f},indent:function(e,t){var n=e.context,i=t&&t.charAt(0),r=n.indent;return"prop"!=n.type||"}"!=i&&")"!=i||(n=n.prev),!n.prev||("}"!=i||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"font_face"!=n.type)&&(")"!=i||"parens"!=n.type&&"media_parens"!=n.type)&&("{"!=i||"at"!=n.type&&"media"!=n.type)||(r=n.indent-g,n=n.prev),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var r=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(r),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"],s=t(a),l=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],u=t(l),c=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],d=t(c),p=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],h=t(p),f=["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","keep-all","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"],g=t(f),m=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],v=t(m),y=r.concat(a).concat(l).concat(c).concat(p).concat(f);
|
|
3284
|
|
-e.registerHelper("hintWords","css",y),e.defineMIME("text/css",{mediaTypes:o,mediaFeatures:s,propertyKeywords:u,nonStandardPropertyKeywords:d,colorKeywords:h,valueKeywords:g,fontProperties:v,tokenHooks:{"<":function(e,t){return e.match("!--")?(t.tokenize=i,i(e,t)):!1},"/":function(e,t){return e.eat("*")?(t.tokenize=n,n(e,t)):!1}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,propertyKeywords:u,nonStandardPropertyKeywords:d,colorKeywords:h,valueKeywords:g,fontProperties:v,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},":":function(e){return e.match(/\s*\{/)?[null,"{"]:!1},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return e.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,propertyKeywords:u,nonStandardPropertyKeywords:d,colorKeywords:h,valueKeywords:g,fontProperties:v,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},"@":function(e){return e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)?!1:(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("htmlmixed",function(t,n){function i(e,t){var n=t.htmlState.tagName;n&&(n=n.toLowerCase());var i=s.token(e,t.htmlState);if("script"==n&&/\btag\b/.test(i)&&">"==e.current()){var r=e.string.slice(Math.max(0,e.pos-100),e.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);r=r?r[1]:"",r&&/[\"\']/.test(r.charAt(0))&&(r=r.slice(1,r.length-1));for(var c=0;c<u.length;++c){var d=u[c];if("string"==typeof d.matches?r==d.matches:d.matches.test(r)){d.mode&&(t.token=o,t.localMode=d.mode,t.localState=d.mode.startState&&d.mode.startState(s.indent(t.htmlState,"")));break}}}else"style"==n&&/\btag\b/.test(i)&&">"==e.current()&&(t.token=a,t.localMode=l,t.localState=l.startState(s.indent(t.htmlState,"")));return i}function r(e,t,n){var i,r=e.current(),o=r.search(t);return o>-1?e.backUp(r.length-o):(i=r.match(/<\/?$/))&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}function o(e,t){return e.match(/^<\/\s*script\s*>/i,!1)?(t.token=i,t.localState=t.localMode=null,null):r(e,/<\/\s*script\s*>/,t.localMode.token(e,t.localState))}function a(e,t){return e.match(/^<\/\s*style\s*>/i,!1)?(t.token=i,t.localState=t.localMode=null,null):r(e,/<\/\s*style\s*>/,l.token(e,t.localState))}var s=e.getMode(t,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),l=e.getMode(t,"css"),u=[],c=n&&n.scriptTypes;if(u.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:e.getMode(t,"javascript")}),c)for(var d=0;d<c.length;++d){var p=c[d];u.push({matches:p.matches,mode:p.mode&&e.getMode(t,p.mode)})}return u.push({matches:/./,mode:e.getMode(t,"text/plain")}),{startState:function(){var e=s.startState();return{token:i,localMode:null,localState:null,htmlState:e}},copyState:function(t){if(t.localState)var n=e.copyState(t.localMode,t.localState);return{token:t.token,localMode:t.localMode,localState:n,htmlState:e.copyState(s,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n){return!t.localMode||/^\s*<\//.test(n)?s.indent(t.htmlState,n):t.localMode.indent?t.localMode.indent(t.localState,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||s}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../meta")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("markdown",function(t,n){function i(n){if(e.findModeByName){var i=e.findModeByName(n);i&&(n=i.mime||i.mimes[0])}var r=e.getMode(t,n);return"null"==r.name?null:r}function r(e,t,n){return t.f=t.inline=n,n(e,t)}function o(e,t,n){return t.f=t.block=n,n(e,t)}function a(e){return e.linkTitle=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,x||e.f!=l||(e.f=h,e.block=s),e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.thisLineHasContent=!1,null}function s(e,t){var o=e.sol(),a=t.list!==!1;t.list!==!1&&t.indentationDiff>=0?(t.indentationDiff<4&&(t.indentation-=t.indentationDiff),t.list=null):t.list!==!1&&t.indentation>0?(t.list=null,t.listDepth=Math.floor(t.indentation/4)):t.list!==!1&&(t.list=!1,t.listDepth=0);var s=null;if(t.indentationDiff>=4)return t.indentation-=4,e.skipToEnd(),_;if(e.eatSpace())return null;if(s=e.match(z))return t.header=s[0].length<=6?s[0].length:6,n.highlightFormatting&&(t.formatting="header"),t.f=t.inline,d(t);if(t.prevLineHasContent&&(s=e.match(V)))return t.header="="==s[0].charAt(0)?1:2,n.highlightFormatting&&(t.formatting="header"),t.f=t.inline,d(t);if(e.eat(">"))return t.indentation++,t.quote=o?1:t.quote+1,n.highlightFormatting&&(t.formatting="quote"),e.eatSpace(),d(t);if("["===e.peek())return r(e,t,v);if(e.match(q,!0))return M;if((!t.prevLineHasContent||a)&&(e.match(H,!1)||e.match(U,!1))){var l=null;return e.match(H,!0)?l="ul":(e.match(U,!0),l="ol"),t.indentation+=4,t.list=!0,t.listDepth++,n.taskLists&&e.match(B,!1)&&(t.taskList=!0),t.f=t.inline,n.highlightFormatting&&(t.formatting=["list","list-"+l]),d(t)}return n.fencedCodeBlocks&&e.match(/^`+"`"+``+"`"+``+"`"+`[ \t]*([\w+#]*)/,!0)?(t.localMode=i(RegExp.$1),t.localMode&&(t.localState=t.localMode.startState()),t.f=t.block=u,n.highlightFormatting&&(t.formatting="code-block"),t.code=!0,d(t)):r(e,t,t.inline)}function l(e,t){var n=k.token(e,t.htmlState);return(x&&null===t.htmlState.tagStart&&!t.htmlState.context||t.md_inside&&e.current().indexOf(">")>-1)&&(t.f=h,t.block=s,t.htmlState=null),n}function u(e,t){return e.sol()&&e.match("`+"`"+``+"`"+``+"`"+`",!1)?(t.localMode=t.localState=null,t.f=t.block=c,null):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),_)}function c(e,t){e.match("`+"`"+``+"`"+``+"`"+`"),t.block=s,t.f=h,n.highlightFormatting&&(t.formatting="code-block"),t.code=!0;var i=d(t);return t.code=!1,i}function d(e){var t=[];if(e.formatting){t.push(P),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var i=0;i<e.formatting.length;i++)t.push(P+"-"+e.formatting[i]),"header"===e.formatting[i]&&t.push(P+"-"+e.formatting[i]+"-"+e.header),"quote"===e.formatting[i]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(P+"-"+e.formatting[i]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref)return t.push(O),t.length?t.join(" "):null;if(e.strong&&t.push(R),e.em&&t.push(L),e.strikethrough&&t.push(F),e.linkText&&t.push(N),e.code&&t.push(_),e.header&&(t.push(S),t.push(S+"-"+e.header)),e.quote&&(t.push(T),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(T+"-"+e.quote):t.push(T+"-"+n.maxBlockquoteDepth)),e.list!==!1){var r=(e.listDepth-1)%3;r?1===r?t.push(E):t.push(D):t.push($)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function p(e,t){return e.match(W,!0)?d(t):void 0}function h(t,i){var r=i.text(t,i);if("undefined"!=typeof r)return r;if(i.list)return i.list=null,d(i);if(i.taskList){var a="x"!==t.match(B,!0)[1];return a?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,d(i)}if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),d(i);var s=t.sol(),u=t.next();if("\\"===u&&(t.next(),n.highlightFormatting)){var c=d(i);return c?c+" formatting-escape":"formatting-escape"}if(i.linkTitle){i.linkTitle=!1;var p=u;"("===u&&(p=")"),p=(p+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var h="^\\s*(?:[^"+p+"\\\\]+|\\\\\\\\|\\\\.)"+p;if(t.match(new RegExp(h),!0))return O}if("`+"`"+`"===u){var m=i.formatting;n.highlightFormatting&&(i.formatting="code");var v=d(i),y=t.pos;t.eatWhile("`+"`"+`");var b=1+t.pos-y;return i.code?b===C?(i.code=!1,v):(i.formatting=m,d(i)):(C=b,i.code=!0,d(i))}if(i.code)return d(i);if("!"===u&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return t.match(/\[[^\]]*\]/),i.inline=i.f=g,I;if("["===u&&t.match(/.*\](\(.*\)| ?\[.*\])/,!1))return i.linkText=!0,n.highlightFormatting&&(i.formatting="link"),d(i);if("]"===u&&i.linkText&&t.match(/\(.*\)| ?\[.*\]/,!1)){n.highlightFormatting&&(i.formatting="link");var c=d(i);return i.linkText=!1,i.inline=i.f=g,c}if("<"===u&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=f,n.highlightFormatting&&(i.formatting="link");var c=d(i);return c?c+=" ":c="",c+A}if("<"===u&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=f,n.highlightFormatting&&(i.formatting="link");var c=d(i);return c?c+=" ":c="",c+j}if("<"===u&&t.match(/^\w/,!1)){if(-1!=t.string.indexOf(">")){var w=t.string.substring(1,t.string.indexOf(">"));/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(w)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(k),o(t,i,l)}if("<"===u&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";var x=!1;if(!n.underscoresBreakWords&&"_"===u&&"_"!==t.peek()&&t.match(/(\w)/,!1)){var S=t.pos-2;if(S>=0){var _=t.string.charAt(S);"_"!==_&&_.match(/(\w)/,!1)&&(x=!0)}}if("*"===u||"_"===u&&!x)if(s&&" "===t.peek());else{if(i.strong===u&&t.eat(u)){n.highlightFormatting&&(i.formatting="strong");var v=d(i);return i.strong=!1,v}if(!i.strong&&t.eat(u))return i.strong=u,n.highlightFormatting&&(i.formatting="strong"),d(i);if(i.em===u){n.highlightFormatting&&(i.formatting="em");var v=d(i);return i.em=!1,v}if(!i.em)return i.em=u,n.highlightFormatting&&(i.formatting="em"),d(i)}else if(" "===u&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return d(i);t.backUp(1)}if(n.strikethrough)if("~"===u&&t.eatWhile(u)){if(i.strikethrough){n.highlightFormatting&&(i.formatting="strikethrough");var v=d(i);return i.strikethrough=!1,v}if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),d(i)}else if(" "===u&&t.match(/^~~/,!0)){if(" "===t.peek())return d(i);t.backUp(2)}return" "===u&&(t.match(/ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),d(i)}function f(e,t){var i=e.next();if(">"===i){t.f=t.inline=h,n.highlightFormatting&&(t.formatting="link");var r=d(t);return r?r+=" ":r="",r+A}return e.match(/^[^>]+/,!0),A}function g(e,t){if(e.eatSpace())return null;var i=e.next();return"("===i||"["===i?(t.f=t.inline=m("("===i?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,d(t)):"error"}function m(e){return function(t,i){var r=t.next();if(r===e){i.f=i.inline=h,n.highlightFormatting&&(i.formatting="link-string");var o=d(i);return i.linkHref=!1,o}return t.match(w(e),!0)&&t.backUp(1),i.linkHref=!0,d(i)}}function v(e,t){return e.match(/^[^\]]*\]:/,!1)?(t.f=y,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,d(t)):r(e,t,h)}function y(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=b,n.highlightFormatting&&(t.formatting="link");var i=d(t);return t.linkText=!1,i}return e.match(/^[^\]]+/,!0),N}function b(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=h,O)}function w(e){return G[e]||(e=(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),G[e]=new RegExp("^(?:[^\\\\]|\\\\.)*?("+e+")")),G[e]}var x=e.modes.hasOwnProperty("xml"),k=e.getMode(t,x?{name:"xml",htmlMode:!0}:"text/plain");void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.underscoresBreakWords&&(n.underscoresBreakWords=!0),void 0===n.fencedCodeBlocks&&(n.fencedCodeBlocks=!1),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1);var C=0,S="header",_="comment",T="quote",$="variable-2",E="variable-3",D="keyword",M="hr",I="tag",P="formatting",A="link",j="link",N="link",O="string",L="em",R="strong",F="strikethrough",q=/^([*\-=_])(?:\s*\1){2,}\s*$/,H=/^[*\-+]\s+/,U=/^[0-9]+\.\s+/,B=/^\[(x| )\](?=\s)/,z=/^#+/,V=/^(?:\={1,}|-{1,})$/,W=/^[^#!\[\]*_\\<>`+"`"+` "'(~]+/,G=[],J={startState:function(){return{f:s,prevLineHasContent:!1,thisLineHasContent:!1,block:s,htmlState:null,indentation:0,inline:h,text:p,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,em:!1,strong:!1,header:0,taskList:!1,list:!1,listDepth:0,quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1}},copyState:function(t){return{f:t.f,prevLineHasContent:t.prevLineHasContent,thisLineHasContent:t.thisLineHasContent,block:t.block,htmlState:t.htmlState&&e.copyState(k,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkTitle:t.linkTitle,em:t.em,strong:t.strong,strikethrough:t.strikethrough,header:t.header,taskList:t.taskList,list:t.list,listDepth:t.listDepth,quote:t.quote,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside}},token:function(e,t){if(t.formatting=!1,e.sol()){var n=!!t.header;if(t.header=0,e.match(/^\s*$/,!0)||n)return t.prevLineHasContent=!1,a(t),n?this.token(e,t):null;t.prevLineHasContent=t.thisLineHasContent,t.thisLineHasContent=!0,t.taskList=!1,t.code=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.f=t.block;var i=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length,r=4*Math.floor((i-t.indentation)/4);r>4&&(r=4);var o=t.indentation+r;if(t.indentationDiff=o-t.indentation,t.indentation=o,i>0)return null}return t.f(e,t)},innerMode:function(e){return e.block==l?{state:e.htmlState,mode:k}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:J}},blankLine:a,getType:d,fold:"markdown"};return J},"xml"),e.defineMIME("text/x-markdown","markdown")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("diff",function(){var e={"+":"positive","-":"negative","@":"meta"};return{token:function(t){var n=t.string.search(/[\t ]+?$/);if(!t.sol()||0===n)return t.skipToEnd(),("error "+(e[t.string.charAt(0)]||"")).replace(/ $/,"");var i=e[t.peek()]||t.skipToEnd();return-1===n?t.skipToEnd():t.pos=n,i}}}),e.defineMIME("text/x-diff","diff")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("properties",function(){return{token:function(e,t){var n=e.sol()||t.afterSection,i=e.eol();if(t.afterSection=!1,n&&(t.nextMultiline?(t.inMultiline=!0,t.nextMultiline=!1):t.position="def"),i&&!t.nextMultiline&&(t.inMultiline=!1,t.position="def"),n)for(;e.eatSpace(););var r=e.next();return!n||"#"!==r&&"!"!==r&&";"!==r?n&&"["===r?(t.afterSection=!0,e.skipTo("]"),e.eat("]"),"header"):"="===r||":"===r?(t.position="quote",null):("\\"===r&&"quote"===t.position&&"u"!==e.next()&&(t.nextMultiline=!0),t.position):(t.position="comment",e.skipToEnd(),"comment")},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}}),e.defineMIME("text/x-properties","properties"),e.defineMIME("text/x-ini","properties")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=e.split(" "),i=0;i<n.length;++i)t[n[i]]=!0;return t}function n(e,t){if(!t.startOfLine)return!1;for(;;){if(!e.skipTo("\\")){e.skipToEnd(),t.tokenize=null;break}if(e.next(),e.eol()){t.tokenize=n;break}}return"meta"}function i(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var n=e.match(/"([^\s\\()]{0,16})\(/);return n?(t.cpp11RawStringDelim=n[1],t.tokenize=o,o(e,t)):!1}return e.match(/(u8|u|U|L)/)?e.match(/["']/,!1)?"string":!1:(e.next(),!1)}function r(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function o(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),i=e.match(new RegExp(".*?\\)"+n+'"'));return i?t.tokenize=null:e.skipToEnd(),"string"}function a(t,n){function i(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}"string"==typeof t&&(t=[t]);var r=[];i(n.keywords),i(n.builtin),i(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var o=0;o<t.length;++o)e.defineMIME(t[o],n)}function s(e,t){for(var n=!1;!e.eol();){if(!n&&e.match('"""')){t.tokenize=null;break}n="\\"!=e.next()&&!n}return"string"}e.defineMode("clike",function(t,n){function i(e,t){var n=e.next();if(v[n]){var i=v[n](e,t);if(i!==!1)return i}if('"'==n||"'"==n)return t.tokenize=r(n),t.tokenize(e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return u=n,null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),"number";if("/"==n){if(e.eat("*"))return t.tokenize=o,o(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(w.test(n))return e.eatWhile(w),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var a=e.current();return h.propertyIsEnumerable(a)?(g.propertyIsEnumerable(a)&&(u="newstatement"),"keyword"):f.propertyIsEnumerable(a)?(g.propertyIsEnumerable(a)&&(u="newstatement"),"builtin"):m.propertyIsEnumerable(a)?"atom":"variable"}function r(e){return function(t,n){for(var i,r=!1,o=!1;null!=(i=t.next());){if(i==e&&!r){o=!0;break}r=!r&&"\\"==i}return(o||!r&&!y)&&(n.tokenize=null),"string"}}function o(e,t){for(var n,i=!1;n=e.next();){if("/"==n&&i){t.tokenize=null;break}i="*"==n}return"comment"}function a(e,t,n,i,r){this.indented=e,this.column=t,this.type=n,this.align=i,this.prev=r}function s(e,t,n){var i=e.indented;return e.context&&"statement"==e.context.type&&(i=e.context.indented),e.context=new a(i,t,n,null,e.context)}function l(e){var t=e.context.type;return(")"==t||"]"==t||"}"==t)&&(e.indented=e.context.indented),e.context=e.context.prev}var u,c=t.indentUnit,d=n.statementIndentUnit||c,p=n.dontAlignCalls,h=n.keywords||{},f=n.builtin||{},g=n.blockKeywords||{},m=n.atoms||{},v=n.hooks||{},y=n.multiLineStrings,b=n.indentStatements!==!1,w=/[+\-*&%=<>!?|\/]/;return{startState:function(e){return{tokenize:null,context:new a((e||0)-c,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;u=null;var r=(t.tokenize||i)(e,t);if("comment"==r||"meta"==r)return r;if(null==n.align&&(n.align=!0),";"!=u&&":"!=u&&","!=u||"statement"!=n.type)if("{"==u)s(t,e.column(),"}");else if("["==u)s(t,e.column(),"]");else if("("==u)s(t,e.column(),")");else if("}"==u){for(;"statement"==n.type;)n=l(t);for("}"==n.type&&(n=l(t));"statement"==n.type;)n=l(t)}else u==n.type?l(t):b&&(("}"==n.type||"top"==n.type)&&";"!=u||"statement"==n.type&&"newstatement"==u)&&s(t,e.column(),"statement");else l(t);return t.startOfLine=!1,r},indent:function(t,n){if(t.tokenize!=i&&null!=t.tokenize)return e.Pass;var r=t.context,o=n&&n.charAt(0);"statement"==r.type&&"}"==o&&(r=r.prev);var a=o==r.type;return"statement"==r.type?r.indented+("{"==o?0:d):!r.align||p&&")"==r.type?")"!=r.type||a?r.indented+(a?0:c):r.indented+d:r.column+(a?0:1)},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});var l="auto if break int case long char register continue return default short do sizeof double static else struct entry switch extern typedef float union for unsigned goto while enum void const signed volatile";a(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:t(l),blockKeywords:t("case do else for if switch while struct"),atoms:t("null"),hooks:{"#":n},modeProps:{fold:["brace","include"]}}),a(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:t(l+" asm dynamic_cast namespace reinterpret_cast try bool explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected wchar_t alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),blockKeywords:t("catch class do else finally for if struct switch try while"),atoms:t("true false null"),hooks:{"#":n,u:i,U:i,L:i,R:i},modeProps:{fold:["brace","include"]}}),a("text/x-java",{name:"clike",keywords:t("abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally float for goto if implements import instanceof int interface long native new package private protected public return short static strictfp super switch synchronized this throw throws transient try void volatile while"),blockKeywords:t("catch class do else finally for if switch try while"),atoms:t("true false null"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"}},modeProps:{fold:["brace","import"]}}),a("text/x-csharp",{name:"clike",keywords:t("abstract as base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),blockKeywords:t("catch class do else finally for foreach if struct switch try while"),builtin:t("Boolean Byte Char DateTime DateTimeOffset Decimal Double Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),atoms:t("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=r,r(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),a("text/x-scala",{name:"clike",keywords:t("abstract case catch class def do else extends false final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try trye type val var while with yield _ : = => <- <: <% >: # @ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:t("catch class do else finally for forSome if match switch try while"),atoms:t("true false null"),indentStatements:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return e.match('""')?(t.tokenize=s,t.tokenize(e,t)):!1}}}),a(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:t("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4 sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadowconst attribute uniform varying break continue discard return for while do if else struct in out inout"),blockKeywords:t("for while do if else struct"),builtin:t("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smootstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:t("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragColor gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),hooks:{"#":n},modeProps:{fold:["brace","include"]}}),a("text/x-nesc",{name:"clike",keywords:t(l+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),blockKeywords:t("case do else for if switch while struct"),atoms:t("null"),hooks:{"#":n},modeProps:{fold:["brace","include"]}}),a("text/x-objectivec",{name:"clike",keywords:t(l+"inline restrict _Bool _Complex _Imaginery BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),atoms:t("YES NO NULL NILL ON OFF"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":n},modeProps:{fold:"brace"}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("yaml",function(){var e=["true","false","on","off","yes","no"],t=new RegExp("\\b(("+e.join(")|(")+"))$","i");return{token:function(e,n){var i=e.peek(),r=n.escaped;if(n.escaped=!1,"#"==i&&(0==e.pos||/\s/.test(e.string.charAt(e.pos-1))))return e.skipToEnd(),"comment";if(e.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(n.literal&&e.indentation()>n.keyCol)return e.skipToEnd(),"string";if(n.literal&&(n.literal=!1),e.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,e.match(/---/))return"def";if(e.match(/\.\.\./))return"def";if(e.match(/\s*-\s+/))return"meta"}if(e.match(/^(\{|\}|\[|\])/))return"{"==i?n.inlinePairs++:"}"==i?n.inlinePairs--:"["==i?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!r&&","==i)return e.next(),"meta";if(n.inlinePairs>0&&!r&&","==i)return n.keyCol=0,n.pair=!1,n.pairStart=!1,e.next(),"meta";if(n.pairStart){if(e.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(e.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==n.inlinePairs&&e.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(n.inlinePairs>0&&e.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(e.match(t))return"keyword"}return!n.pair&&e.match(/^\s*(?:[,\[\]{}&*!|>'"%@`+"`"+`][^\s'":]|[^,\[\]{}#&*!|>'"%@`+"`"+`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=e.indentation(),"atom"):n.pair&&e.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==i,e.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}}),e.defineMIME("text/x-yaml","yaml")}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this;e(this).one("bsTransitionEnd",function(){n=!0});var r=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(r,t),this},e(function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){return e(t.target).is(this)?t.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var n=e(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof t&&r[t].call(n)})}var n='[data-dismiss="alert"]',i=function(t){e(t).on("click",n,this.close)};i.VERSION="3.3.5",i.TRANSITION_DURATION=150,i.prototype.close=function(t){function n(){a.detach().trigger("closed.bs.alert").remove()}var r=e(this),o=r.attr("data-target");o||(o=r.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,""));var a=e(o);t&&t.preventDefault(),a.length||(a=r.closest(".alert")),a.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(a.removeClass("in"),e.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var r=e.fn.alert;e.fn.alert=t,e.fn.alert.Constructor=i,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.button"),o="object"==typeof t&&t;r||i.data("bs.button",r=new n(this,o)),"toggle"==t?r.toggle():t&&r.setState(t)})}var n=function(t,i){this.$element=e(t),this.options=e.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.5",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",o=i.data();t+="Text",null==o.resetText&&i.data("resetText",i[r]()),setTimeout(e.proxy(function(){i[r](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),
|
|
3285
|
|
-this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=e.fn.button;e.fn.button=t,e.fn.button.Constructor=n,e.fn.button.noConflict=function(){return e.fn.button=i,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=e(n.target);i.hasClass("btn")||(i=i.closest(".btn")),t.call(i,"toggle"),e(n.target).is('input[type="radio"]')||e(n.target).is('input[type="checkbox"]')||n.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.carousel"),o=e.extend({},n.DEFAULTS,i.data(),"object"==typeof t&&t),a="string"==typeof t?t:o.slide;r||i.data("bs.carousel",r=new n(this,o)),"number"==typeof t?r.to(t):a?r[a]():o.interval&&r.pause().cycle()})}var n=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};n.VERSION="3.3.5",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},n.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},n.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t),i="prev"==e&&0===n||"next"==e&&n==this.$items.length-1;if(i&&!this.options.wrap)return t;var r="prev"==e?-1:1,o=(n+r)%this.$items.length;return this.$items.eq(o)},n.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));return e>this.$items.length-1||0>e?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){t.to(e)}):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},n.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){return this.sliding?void 0:this.slide("next")},n.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},n.prototype.slide=function(t,i){var r=this.$element.find(".item.active"),o=i||this.getItemForDirection(t,r),a=this.interval,s="next"==t?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var u=o[0],c=e.Event("slide.bs.carousel",{relatedTarget:u,direction:s});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=e(this.$indicators.children()[this.getItemIndex(o)]);d&&d.addClass("active")}var p=e.Event("slid.bs.carousel",{relatedTarget:u,direction:s});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),o[0].offsetWidth,r.addClass(s),o.addClass(s),r.one("bsTransitionEnd",function(){o.removeClass([t,s].join(" ")).addClass("active"),r.removeClass(["active",s].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(p)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(p)),a&&this.cycle(),this}};var i=e.fn.carousel;e.fn.carousel=t,e.fn.carousel.Constructor=n,e.fn.carousel.noConflict=function(){return e.fn.carousel=i,this};var r=function(n){var i,r=e(this),o=e(r.attr("data-target")||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var a=e.extend({},o.data(),r.data()),s=r.attr("data-slide-to");s&&(a.interval=!1),t.call(o,a),s&&o.data("bs.carousel").to(s),n.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var n=e(this);t.call(n,n.data())})})}(jQuery),+function(e){"use strict";function t(t){var n,i=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(i)}function n(t){return this.each(function(){var n=e(this),r=n.data("bs.collapse"),o=e.extend({},i.DEFAULTS,n.data(),"object"==typeof t&&t);!r&&o.toggle&&/show|hide/.test(t)&&(o.toggle=!1),r||n.data("bs.collapse",r=new i(this,o)),"string"==typeof t&&r[t]()})}var i=function(t,n){this.$element=e(t),this.options=e.extend({},i.DEFAULTS,n),this.$trigger=e('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.5",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var e=this.$element.hasClass("width");return e?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(t=r.data("bs.collapse"),t&&t.transitioning))){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(n.call(r,"hide"),t||r.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var l=e.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",e.proxy(s,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[a](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return e.support.transition?void this.$element[n](0).one("bsTransitionEnd",e.proxy(r,this)).emulateTransitionEnd(i.TRANSITION_DURATION):r.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return e(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy(function(n,i){var r=e(i);this.addAriaAndCollapsedClass(t(r),r)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var r=e.fn.collapse;e.fn.collapse=n,e.fn.collapse.Constructor=i,e.fn.collapse.noConflict=function(){return e.fn.collapse=r,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var r=e(this);r.attr("data-target")||i.preventDefault();var o=t(r),a=o.data("bs.collapse"),s=a?"toggle":r.data();n.call(o,s)})}(jQuery),+function(e){"use strict";function t(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&e(n);return i&&i.length?i:t.parent()}function n(n){n&&3===n.which||(e(r).remove(),e(o).each(function(){var i=e(this),r=t(i),o={relatedTarget:this};r.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&e.contains(r[0],n.target)||(r.trigger(n=e.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),r.removeClass("open").trigger("hidden.bs.dropdown",o))))}))}function i(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new a(this)),"string"==typeof t&&i[t].call(n)})}var r=".dropdown-backdrop",o='[data-toggle="dropdown"]',a=function(t){e(t).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.5",a.prototype.toggle=function(i){var r=e(this);if(!r.is(".disabled, :disabled")){var o=t(r),a=o.hasClass("open");if(n(),!a){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",n);var s={relatedTarget:this};if(o.trigger(i=e.Event("show.bs.dropdown",s)),i.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger("shown.bs.dropdown",s)}return!1}},a.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=e(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var r=t(i),a=r.hasClass("open");if(!a&&27!=n.which||a&&27==n.which)return 27==n.which&&r.find(o).trigger("focus"),i.trigger("click");var s=" li:not(.disabled):visible a",l=r.find(".dropdown-menu"+s);if(l.length){var u=l.index(n.target);38==n.which&&u>0&&u--,40==n.which&&u<l.length-1&&u++,~u||(u=0),l.eq(u).trigger("focus")}}}};var s=e.fn.dropdown;e.fn.dropdown=i,e.fn.dropdown.Constructor=a,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",o,a.prototype.toggle).on("keydown.bs.dropdown.data-api",o,a.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",a.prototype.keydown)}(jQuery),+function(e){"use strict";function t(t,i){return this.each(function(){var r=e(this),o=r.data("bs.modal"),a=e.extend({},n.DEFAULTS,r.data(),"object"==typeof t&&t);o||r.data("bs.modal",o=new n(this,a)),"string"==typeof t?o[t](i):a.show&&o.show(i)})}var n=function(t,n){this.options=n,this.$body=e(document.body),this.$element=e(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.5",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},n.prototype.show=function(t){var i=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(t){e(t.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var r=e.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),r&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var o=e.Event("shown.bs.modal",{relatedTarget:t});r?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(o)}))},n.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",e.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?e(window).on("resize.bs.modal",e.proxy(this.handleUpdate,this)):e(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.$body.removeClass("modal-open"),e.resetAdjustments(),e.resetScrollbar(),e.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(t){var i=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=e.support.transition&&r;if(this.$backdrop=e(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",e.proxy(function(e){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){i.removeBackdrop(),t&&t()};e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):a()}else t&&t()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var e=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth<e,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",e+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var i=e.fn.modal;e.fn.modal=t,e.fn.modal.Constructor=n,e.fn.modal.noConflict=function(){return e.fn.modal=i,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=e(this),r=i.attr("href"),o=e(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),a=o.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},o.data(),i.data());i.is("a")&&n.preventDefault(),o.one("show.bs.modal",function(e){e.isDefaultPrevented()||o.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),t.call(o,a,this)})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.tooltip"),o="object"==typeof t&&t;(r||!/destroy|hide/.test(t))&&(r||i.data("bs.tooltip",r=new n(this,o)),"string"==typeof t&&r[t]())})}var n=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",e,t)};n.VERSION="3.3.5",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(t,n,i){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&e(e.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`+"`"+`selector`+"`"+` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var a=r[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},n.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){n[e]!=i&&(t[e]=i)}),t},n.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},n.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),n.isInStateTrue()?void 0:(clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide())},n.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var i=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!i)return;var r=this,o=this.tip(),a=this.getUID(this.type);this.setContent(),o.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,u=l.test(s);u&&(s=s.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),d=o[0].offsetWidth,p=o[0].offsetHeight;if(u){var h=s,f=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+p>f.bottom?"top":"top"==s&&c.top-p<f.top?"bottom":"right"==s&&c.right+d>f.width?"left":"left"==s&&c.left-d<f.left?"right":s,o.removeClass(h).addClass(s)}var g=this.getCalculatedOffset(s,c,d,p);this.applyPlacement(g,s);var m=function(){var e=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==e&&r.leave(r)};e.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",m).emulateTransitionEnd(n.TRANSITION_DURATION):m()}},n.prototype.applyPlacement=function(t,n){var i=this.tip(),r=i[0].offsetWidth,o=i[0].offsetHeight,a=parseInt(i.css("margin-top"),10),s=parseInt(i.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(s)&&(s=0),t.top+=a,t.left+=s,e.offset.setOffset(i[0],e.extend({using:function(e){i.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),i.addClass("in");var l=i[0].offsetWidth,u=i[0].offsetHeight;"top"==n&&u!=o&&(t.top=t.top+o-u);var c=this.getViewportAdjustedDelta(n,t,l,u);c.left?t.left+=c.left:t.top+=c.top;var d=/top|bottom/.test(n),p=d?2*c.left-r+l:2*c.top-o+u,h=d?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(p,i[0][h],d)},n.prototype.replaceArrow=function(e,t,n){this.arrow().css(n?"left":"top",50*(1-e/t)+"%").css(n?"top":"left","")},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},n.prototype.hide=function(t){function i(){"in"!=r.hoverState&&o.detach(),r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),t&&t()}var r=this,o=e(this.$tip),a=e.Event("hide.bs."+this.type);return this.$element.trigger(a),a.isDefaultPrevented()?void 0:(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i(),this.hoverState=null,this)},n.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(t){t=t||this.$element;var n=t[0],i="BODY"==n.tagName,r=n.getBoundingClientRect();null==r.width&&(r=e.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=i?{top:0,left:0}:t.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},s=i?{width:e(window).width(),height:e(window).height()}:null;return e.extend({},r,a,s,o)},n.prototype.getCalculatedOffset=function(e,t,n,i){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-i,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-i/2,left:t.left-n}:{top:t.top+t.height/2-i/2,left:t.left+t.width}},n.prototype.getViewportAdjustedDelta=function(e,t,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(e)){var s=t.top-o-a.scroll,l=t.top+o-a.scroll+i;s<a.top?r.top=a.top-s:l>a.top+a.height&&(r.top=a.top+a.height-l)}else{var u=t.left-o,c=t.left+o+n;u<a.left?r.left=a.left-u:c>a.right&&(r.left=a.left+a.width-c)}return r},n.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},n.prototype.getUID=function(e){do e+=~~(1e6*Math.random());while(document.getElementById(e));return e},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `+"`"+`template`+"`"+` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(t){var n=this;t&&(n=e(t.currentTarget).data("bs."+this.type),n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null})};var i=e.fn.tooltip;e.fn.tooltip=t,e.fn.tooltip.Constructor=n,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=i,this}}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.popover"),o="object"==typeof t&&t;(r||!/destroy|hide/.test(t))&&(r||i.data("bs.popover",r=new n(this,o)),"string"==typeof t&&r[t]())})}var n=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.5",n.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=e.fn.popover;e.fn.popover=t,e.fn.popover.Constructor=n,e.fn.popover.noConflict=function(){return e.fn.popover=i,this}}(jQuery),+function(e){"use strict";function t(n,i){this.$body=e(document.body),this.$scrollElement=e(e(n).is(document.body)?window:n),this.options=e.extend({},t.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=e(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new t(this,o)),"string"==typeof n&&r[n]()})}t.VERSION="3.3.5",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=e(this),r=t.data("target")||t.attr("href"),o=/^#./.test(r)&&e(r);return o&&o.length&&o.is(":visible")&&[[o[n]().top+i,r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),t>=i)return a!=(e=o[o.length-1])&&this.activate(e);if(a&&t<r[0])return this.activeTarget=null,this.clear();for(e=r.length;e--;)a!=o[e]&&t>=r[e]&&(void 0===r[e+1]||t<r[e+1])&&this.activate(o[e])},t.prototype.activate=function(t){this.activeTarget=t,this.clear();var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=e(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},t.prototype.clear=function(){e(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=e.fn.scrollspy;e.fn.scrollspy=n,e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=i,this},e(window).on("load.bs.scrollspy.data-api",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);n.call(t,t.data())})})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.tab");r||i.data("bs.tab",r=new n(this)),"string"==typeof t&&r[t]()})}var n=function(t){this.element=e(t)};n.VERSION="3.3.5",n.TRANSITION_DURATION=150,n.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=n.find(".active:last a"),o=e.Event("hide.bs.tab",{relatedTarget:t[0]}),a=e.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(o),t.trigger(a),!a.isDefaultPrevented()&&!o.isDefaultPrevented()){var s=e(i);this.activate(t.closest("li"),n),this.activate(s,s.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})})}}},n.prototype.activate=function(t,i,r){function o(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var a=i.find("> .active"),s=r&&e.support.transition&&(a.length&&a.hasClass("fade")||!!i.find("> .fade").length);a.length&&s?a.one("bsTransitionEnd",o).emulateTransitionEnd(n.TRANSITION_DURATION):o(),a.removeClass("in")};var i=e.fn.tab;e.fn.tab=t,e.fn.tab.Constructor=n,e.fn.tab.noConflict=function(){return e.fn.tab=i,this};var r=function(n){n.preventDefault(),t.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.affix"),o="object"==typeof t&&t;r||i.data("bs.affix",r=new n(this,o)),"string"==typeof t&&r[t]()})}var n=function(t,i){this.options=e.extend({},n.DEFAULTS,i),this.$target=e(this.options.target).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.5",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(e,t,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return n>r?"top":!1;
|
|
3286
|
|
-if("bottom"==this.affixed)return null!=n?r+this.unpin<=o.top?!1:"bottom":e-i>=r+a?!1:"bottom";var s=null==this.affixed,l=s?r:o.top,u=s?a:t;return null!=n&&n>=r?"top":null!=i&&l+u>=e-i?"bottom":!1},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var e=this.$target.scrollTop(),t=this.$element.offset();return this.pinnedOffset=t.top-e},n.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,a=Math.max(e(document).height(),e(document.body).height());"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var s=this.getState(a,t,r,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var l="affix"+(s?"-"+s:""),u=e.Event(l+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-t-o})}};var i=e.fn.affix;e.fn.affix=t,e.fn.affix.Constructor=n,e.fn.affix.noConflict=function(){return e.fn.affix=i,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var n=e(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),t.call(n,i)})})}(jQuery);var PatternFly=PatternFly||{};!function(e){sidebar=function(){var t=0,n=0,i=0;e(".navbar-pf .navbar-toggle").is(":hidden")&&(t=e(document).height(),n=e(".navbar-pf").outerHeight(),i=t-n),e(".sidebar-pf").parent(".row").children('[class*="col-"]').css({"min-height":i})},e(document).ready(function(){e(".sidebar-pf").length>0&&0==e(".datatable").length&&sidebar()}),e(window).resize(function(){e(".sidebar-pf").length>0&&sidebar()})}(jQuery),function(e){PatternFly.popovers=function(t){var n=e(t);n.popover(),n.filter("[data-close=true]").each(function(t,n){var i=e(n),r=i.attr("data-original-title")+'<button type="button" class="close" aria-hidden="true"><span class="pficon pficon-close"></span></button>';i.attr("data-original-title",r)}),n.on("click",function(t){var n=e(this);$title=n.next(".popover").find(".popover-title"),$title.find(".close").parent(".popover-title").addClass("closable"),$title.find(".close").on("click",function(){n.popover("toggle")}),t.preventDefault()})}}(jQuery),function(e){e.fn.dataTableExt&&(e.extend(!0,e.fn.dataTable.defaults,{bDestroy:!0,bAutoWidth:!1,iDisplayLength:20,sDom:"<'dataTables_header' f i r ><'table-responsive' t ><'dataTables_footer' p >",oLanguage:{sInfo:"Showing <b>_START_</b> to <b>_END_</b> of <b>_TOTAL_</b> Items",sInfoFiltered:"(of <b>_MAX_</b>)",sInfoEmpty:"Showing <b>0</b> Results",sZeroRecords:"<p>Suggestions</p><ul><li>Check the syntax of the search term.</li><li>Check that the correct menu option is chosen (token ID vs. user ID).</li><li>Use wildcards (* to match zero or more characters or ? to match a single character).</li><li>Clear the search field, then click Search to return to the 20 most recent records.</li></ul>",sSearch:""},sPaginationType:"bootstrap_input"}),e.extend(e.fn.dataTableExt.oStdClasses,{sWrapper:"dataTables_wrapper"}),e.fn.dataTableExt.oApi.fnPagingInfo=function(e){return{iStart:e._iDisplayStart,iEnd:e.fnDisplayEnd(),iLength:e._iDisplayLength,iTotal:e.fnRecordsTotal(),iFilteredTotal:e.fnRecordsDisplay(),iPage:-1===e._iDisplayLength?0:Math.ceil(e._iDisplayStart/e._iDisplayLength),iTotalPages:-1===e._iDisplayLength?0:Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength)}},e.extend(e.fn.dataTableExt.oPagination,{bootstrap_input:{fnInit:function(t,n,i){var r=(t.oLanguage.oPaginate,function(e){e.preventDefault(),t.oApi._fnPageChange(t,e.data.action)&&i(t)});e(n).append('<ul class="pagination"><li class="first disabled"><span class="i fa fa-angle-double-left"></span></li><li class="prev disabled"><span class="i fa fa-angle-left"></span></li></ul><div class="pagination-input"><input type="text" class="paginate_input"><span class="paginate_of">of <b>3</b></span></div><ul class="pagination"><li class="next disabled"><span class="i fa fa-angle-right"></span></li><li class="last disabled"><span class="i fa fa-angle-double-right"></span></li></ul>');var o=e("li",n);e(o[0]).bind("click.DT",{action:"first"},r),e(o[1]).bind("click.DT",{action:"previous"},r),e(o[2]).bind("click.DT",{action:"next"},r),e(o[3]).bind("click.DT",{action:"last"},r);var a=e("input",n);e(a).keyup(function(e){if(38==e.which||39==e.which?this.value++:(37==e.which||40==e.which)&&this.value>1&&this.value--,""!=this.value&&!this.value.match(/[^0-9]/)){var n=t._iDisplayLength*(this.value-1);if(n>t.fnRecordsDisplay())return t._iDisplayStart=(Math.ceil((t.fnRecordsDisplay()-1)/t._iDisplayLength)-1)*t._iDisplayLength,void i(t);t._iDisplayStart=n,i(t)}})},fnUpdate:function(t,n){var i,r,o=t.oInstance.fnPagingInfo(),a=t.aanFeatures.p,s=Math.ceil(t.fnRecordsDisplay()/t._iDisplayLength),l=Math.ceil(t._iDisplayStart/t._iDisplayLength)+1;for(i=0,r=a.length;r>i;i++)e(".paginate_input").val(l),e(".paginate_of b").html(s),0===o.iPage?(e("li.first",a[i]).addClass("disabled"),e("li.prev",a[i]).addClass("disabled")):(e("li.first",a[i]).removeClass("disabled"),e("li.prev",a[i]).removeClass("disabled")),o.iPage===o.iTotalPages-1||0===o.iTotalPages?(e("li.next",a[i]).addClass("disabled"),e("li.last",a[i]).addClass("disabled")):(e("li.next",a[i]).removeClass("disabled"),e("li.last",a[i]).removeClass("disabled"))}}}))}(jQuery);`)
|
|
3287
|
|
-
|
|
3288
|
|
-func javaLibs0416b4c7JsBytes() ([]byte, error) {
|
|
3289
|
|
- return _javaLibs0416b4c7Js, nil
|
|
3290
|
|
-}
|
|
3291
|
|
-
|
|
3292
|
|
-func javaLibs0416b4c7Js() (*asset, error) {
|
|
3293
|
|
- bytes, err := javaLibs0416b4c7JsBytes()
|
|
3294
|
|
- if err != nil {
|
|
3295
|
|
- return nil, err
|
|
3296
|
|
- }
|
|
3297
|
|
-
|
|
3298
|
|
- info := bindataFileInfo{name: "java/libs-0416b4c7.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
|
|
3299
|
|
- a := &asset{bytes: bytes, info: info}
|
|
3300
|
|
- return a, nil
|
|
3301
|
|
-}
|
|
3302
|
|
-
|
|
3303
|
3210
|
var _javaLibsA7b6e223Js = []byte(`function aa(e){var t=e.cloneNode;delete e.cloneNode,e.cloneNode=function(e){return e===g&&(e=j),t.call(this,e)}}function ba(e){(e=e.__proto__||e.constructor.prototype)&&e!==Array.prototype&&ca.forEach(function(t){e[t]||(e[t]=Array.prototype[t])})}function v(e,t,n){return da.call(e,t,q.call(arguments,2))}function w(e,t){for(var n=1;n<arguments.length;n++){var i,r=arguments[n];for(i in r)u(r,i)&&!u(e,i)&&(e[i]=r[i])}return e}function x(e,t){if(e==k&&!t)throw new TypeError;return ha&&"string"==typeof e&&e?r.call(e,""):Object(e)}function ja(e){var t=Object.create(DOMException.prototype);throw t.code=DOMException[e],t.message=e+": DOM Exception "+t.code,t}function ka(){return l}function la(e){return e}function Ja(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function Ka(e){try{return e.sentinel2=0,0===Object.getOwnPropertyDescriptor(e,"sentinel2").value}catch(t){}}function _log(e,t){if(_canLog){var n=Array.prototype.slice.apply(arguments,[1]),i=new Date,r=i.getHours()+":"+i.getMinutes()+":"+i.getSeconds()+"."+i.getMilliseconds();n[0]=r+" - "+n[0];try{switch(e){case"info":window.console.info.apply(window.console,n);break;case"warn":window.console.warn.apply(window.console,n);break;default:window.console.log.apply(window.console,n)}}catch(o){window.console||(_canLog=!1)}}}function logMsg(e){Array.prototype.unshift.apply(arguments,["debug"]),_log.apply(this,arguments)}var g=void 0,j=!0,k=null,l=!1,n=window,o,p=Object.prototype,da=Function.prototype.apply,q=Array.prototype.slice,r=String.prototype.split,ea=Array.prototype.splice,s,fa,ga,t=Function.prototype.bind||function(e,t){var n=this,i=q.call(arguments,1);return function(){return da.call(n,e,i.concat(q.call(arguments)))}},u=t.call(Function.prototype.call,p.hasOwnProperty),ha="a"!=Object("a")[0]||!(0 in Object("a")),ia=p.toString,ca="every filter forEach indexOf join lastIndexOf map reduce reduceRight reverse slice some toString".split(" "),y=n.Element&&n.Element.prototype||{},z=t.call(document.__orig__createElement__||document.createElement,document),A=z("p"),B,ma=/\\s+$/g,na=/\\s+/g,C=1,D,oa=/^(\w+)?((?:\.(?:[\w\-]+))+)?$|^#([\w\-]+$)/,pa=/\s*([,>+~ ])\s*/g,qa,E,F,G,I,J,K,ra,sa,ta,ua,L,va,M,N=" \n\f\r \u2028\u2029\ufeff",wa,xa,ya,za,O,Q,Aa,Ba,R,S=n.Date,T,Ca,U,V,W,Da,Ga,X,Y;for(W={},W.names=(W.agent=navigator.userAgent.toLowerCase()).match(/(mozilla|compatible|chrome|webkit|safari|opera|msie|iphone|ipod|ipad)/gi),D=W.names&&W.names.length||0;0<D--;)W[W.names[D]]=j;W.mozilla=W.mozilla&&!W.compatible&&!W.webkit,W.safari=W.safari&&!W.chrome,W.msie=W.msie&&!W.opera,o=W.msie||g,n.browser=W,n.HTMLDocument||(n.HTMLDocument=n.Document),n.Document||(n.Document=n.HTMLDocument),Object.append=w,Object.extend||(Object.extend=function(e,t){for(var n=1;n<arguments.length;n++){var i,r=arguments[n];for(i in r)u(r,i)&&(e[i]=r[i])}return e}),Object.inherit=function(e,t){(e.prototype=Object.create(e.superclass=t.prototype)).constructor=e},Function.prototype.bind||(Function.prototype.bind=function(e,t){function n(){return da.call(i,this instanceof n?this:e,r.concat(q.call(arguments)))}if("function"!=typeof this&&(!o||0!==M.call(this+"").indexOf("function")))throw new TypeError("Function.prototype.bind called on incompatible "+this);var i=this,r=q.call(arguments,1);return i.prototype&&(n.prototype=Object.create(i.prototype)),n});var $="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),Ha=!{toString:k}.propertyIsEnumerable($[0]),Ia=$.length;if(w(Object,{keys:function(e){if("object"!=typeof e&&"function"!=typeof e||e===k)throw new TypeError("Object.keys called on a non-object");var t,n=[];for(t in e)u(e,t)&&n.push(t);if(Ha)for(t=0;Ia>t;t++)u(e,$[t])&&n.push($[t]);return n},getOwnPropertyNames:function(e){return Object.keys(e)},seal:la,freeze:la,preventExtensions:la,isSealed:ka,isFrozen:ka,isExtensible:function(e){if(Object(e)!==e)throw new TypeError;for(var t="";u(e,t);)t+="?";e[t]=j;var n=u(e,t);return delete e[t],n},getPrototypeOf:function(e){return e.__proto__||(e.constructor?e.constructor.prototype:p)},create:function(e,t){var n;if(e===k)n={__proto__:k};else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");n=function(){},n.prototype=e,n=new n,n.__proto__=e}return t&&Object.defineProperties(n,t),n},is:function(e,t){return e===t?0===e?1/e===1/t:j:e!==e&&t!==t},isnt:function(e,t){return!Object.is(e,t)}}),!Object.defineProperty||(ya=Ja({}),za=Ja(A),ya&&za)||(O=Object.defineProperty,Q=Object.defineProperties),(!Object.defineProperty||O)&&(Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||e===k)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof n&&"function"!=typeof n||n===k)throw new TypeError("Property description must be an object: "+n);if(O)try{return O.call(Object,e,t,n)}catch(i){if(-2146823252===i.number){n.enumerable=l;try{return O.call(Object,e,t,n)}catch(r){}}}if(n.value!==g)if(e.__defineGetter__&&(e.__lookupGetter__(t)||e.__lookupSetter__(t))){var o=e.__proto__;e.__proto__=p,delete e[t],e[t]=n.value,e.__proto__=o}else e[t]=n.value;else if(e.__defineGetter__)n.get!==g&&e.__defineGetter__(t,n.get),n.set!==g&&e.__defineSetter__(t,n.set);else{if(!Object.defineProperty.ielt8)throw new TypeError("getters & setters not supported");n.get!==g&&(e["get"+t]=n.get),n.set!==g&&(e["set"+t]=n.set)}return e}),y.ie&&8>o&&(y.ielt8=Object.defineProperty.ielt8=j),(!Object.defineProperties||Q)&&(Object.defineProperties=function(e,t){if(Q)try{return Q.call(Object,e,t)}catch(n){}for(var i in t)u(t,i)&&Object.defineProperty(e,i,t[i]);return e}),!Object.getOwnPropertyDescriptor||(Aa=Ka({}),Ba=Ka(A),Ba&&Aa)||(R=Object.getOwnPropertyDescriptor),(!Object.getOwnPropertyDescriptor||R)&&(Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||e===k)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(R)try{return R.call(Object,e,t)}catch(n){}if(u(e,t)){var i,r,o={enumerable:j,configurable:j};if(e.__defineGetter__){var a=e.__proto__;e.__proto__=p,i=e.__lookupGetter__(t),r=e.__lookupSetter__(t),e.__proto__=a}else Object.defineProperty.ielt8&&(i=e["get"+t],r=e["set"+t]);return i||r?(i&&(o.get=i),r&&(o.set=r),o):(o.value=e[t],o)}}),2!=[1,2].splice(0).length&&(Array.prototype.splice=function(e,t){return e===g&&t===g?[]:ea.apply(this,[e===g?0:e,t===g?this.length-e:t].concat(q.call(arguments,2)))}),ga=function(e){if(e instanceof Array||Array.isArray(e))return e;if(e.k)return e.k();var t,e=x(e,j),n=e.length>>>0;try{t=q.call(e)}catch(i){}if(t&&t.length===n)return t;t=[];for(var r=0;n>r;r++)r in e&&(t[r]=e[r]);return t},w(Array,{isArray:function(e){return"[object Array]"==ia.call(e)},from:ga,of:function(e){return q.call(arguments)}}),w(Array.prototype,{reduce:function(e,t){var n=x(this),i=n.length>>>0,r=0;if(0===i&&arguments.length<=1)throw new TypeError("Array length is 0 and no second argument");for(t===g&&(++r,t=n[0]);i>r;++r)r in n&&(t=v(e,g,t,n[r],r,n));return t},reduceRight:function(e,t){var n=x(this),i=n.length>>>0;if(0===i&&arguments.length<=1)throw new TypeError("Array length is 0 and no second argument");for(--i,t===g&&(--i,t=n[i+1]);i>=0;--i)i in n&&(t=v(e,g,t,n[i],i,n));return t},forEach:function(e,t){for(var n=x(this),i=n.length>>>0,r=-1;++r<i;)r in n&&v(e,t,n[r],r,n)},indexOf:function(e,t){var n=x(this),i=n.length>>>0;if((t=~~t)>i)return-1;for(t=(i+t)%i;i>t&&(!(t in n)||n[t]!==e);t++);return t^i?t:-1},lastIndexOf:function(e,t){var n,i=x(this),r=i.length>>>0;if(!r)return-1;for(n=r-1,t!==g&&(n=Math.min(n,Number.toInteger(t))),n=n>=0?n:r-Math.abs(n);n>=0;n--)if(n in i&&i[n]===e)return n;return-1},every:function(e,t,n){n===g&&(n=j);var i=n;return L(this,function(r,o){i==n&&(i=!!v(e,t,r,o,this))},this),i},some:function(e,t){return va.call(this,e,t,l)},filter:function(e,t){for(var n,i=x(this),r=i.length>>>0,o=[],a=0;r>a;a++)a in i&&(n=i[a],v(e,t,n,a,i)&&o.push(n));return o},map:function(e,t){for(var n=x(this),i=n.length>>>0,r=[],o=0;i>o;o++)o in n&&(r[o]=v(e,t,n[o],o,this));return r},contains:function(e){return!!~this.indexOf(e)}}),!Array.prototype.unique){var La=function(e,t,n){return n.indexOf(e,t+1)<0};Array.prototype.unique=function(){return this.filter(La)}}L=t.call(Function.prototype.call,Array.prototype.forEach),fa=Array.prototype.map,va=Array.prototype.every,String.random||(String.random=function(e){return!e||0>e?"":Array(++e).join(0).replace(/./g,function(){return(0|32*Math.random()).toString(32)})}),(!String.prototype.trim||N.trim())&&(N="["+N+"]",wa=RegExp("^"+N+N+"*"),xa=RegExp(N+N+"*$"),String.prototype.trim=function(){return String(this).replace(wa,"").replace(xa,"")}),M=String.prototype.trim,"0".split(g,0).length&&(String.prototype.split=function(e,t){return e===g&&0===t?[]:r.call(this,e,t)}),s=function(e,t){return!!~this.indexOf(e,t)},w(String.prototype,{repeat:function(e){return Array(++e).join(this+"")},startsWith:function(e,t){return this.lastIndexOf(e,t)===(t||0)},endsWith:function(e,t){return e+="",this.substr(-e.length-(t||0),t)==e},contains:s,toArray:function(){return r.call(this,"")},reverse:function(){return Array.prototype.reverse.call(r.call(this+"","")).join("")}}),w(Number,{isFinite:function(e){return"number"==typeof e&&n.i(e)},isInteger:function(e){return Number.isFinite(e)&&e>=-9007199254740992&&9007199254740992>=e&&Math.floor(e)===e},isNaN:function(e){return Object.is(e,NaN)},toInteger:function(e){return e=+e,Number.isNaN(e)?0:0!==e&&n.i(e)?(0>e?-1:1)*Math.floor(Math.abs(e)):e}}),E=function(e,t){var n=document.createEvent("Events"),t=t||{};return n.initEvent(e,t.bubbles||l,t.cancelable||l),"isTrusted"in n||(n.j=l),n};try{G=Event.prototype,new Event("click")}catch(Ma){n.Event=E,G&&(E.prototype=G)}F=function(e,t){var n,i;try{n=document.createEvent("CustomEvent")}catch(r){n=document.createEvent("Event")}return t=t||{},i=t.detail!==g?t.detail:k,(n.initCustomEvent||(n.detail=i,n.initEvent)).call(n,e,t.bubbles||l,t.cancelable||l,i),"isTrusted"in n||(n.j=l),n};try{I=(n.CustomEvent||Event).prototype,new CustomEvent("magic")}catch(Na){n.CustomEvent=F,(I||G)&&(F.prototype=I||G)}if(G.stopImmediatePropagation||(J=function(e){var t=this.f,n=this.g;if("function"!=typeof t){if(!("handleEvent"in t))return;n=t,t=t.handleEvent}return e.__stopNow?void e.stopPropagation():t.apply(n,arguments)},G.stopImmediatePropagation=function(){this.__stopNow=j}),"addEventListener"in A&&!A.addEventListener.__shim__){D=0;try{B=function(){D++},A.addEventListener("click",B),A.addEventListener("click",B),A.click?A.click():A.dispatchEvent(new E("click"))}catch(Oa){}finally{if(0==D||2==D||J){var Pa=2==D;L([n.HTMLDocument&&n.HTMLDocument.prototype||n.document,n.Window&&n.Window.prototype||n,y],function(e){if(e){var n=e.addEventListener,i=e.removeEventListener;n&&(e.addEventListener=function(e,i,r){var o,a,r=r||l;if(Pa||J){if(a="_e_8vj"+(r?"-":"")+(i.__UUID__||(i.__UUID__=++C))+e,(o=this._)||(o=this._={}),a in o)return;i=J?o[a]=t.call(J,{f:i,g:this}):o[a]=g}return n.call(this,e,i,r)},i&&(e.removeEventListener=function(e,t,n){var r,o,n=n||l;return(Pa||J)&&(r=this._)&&r[o="_e_8vj"+(n?"-":"")+t.__UUID__+e]&&(t=r[o],delete r[o]),i.call(this,e,t,n)}))}})}}}K=function(e,t,n){this.e=e,this.a=t,this.c=n,this.length=0,this.value="",this.b("1")},ra=function(e,t){var n=t||"",i=!!e.length;if(i){for(;e.length>0;)delete e[--e.length];e.value=""}n&&((n=M.call(n))&&r.call(n,na).forEach(sa,e),e.value=t),i&&e.a&&e.a.call(e.c,e.value)},sa=function(e){this[this.length++]=e},w(K.prototype,{b:function(e){var t=this.e.call(this.c);t!=this.value&&ra(this,t),""===e&&ja("SYNTAX_ERR"),s.call(e+""," ")&&ja("INVALID_CHARACTER_ERR")},add:function(e){var t=this.value;this.contains(e)||(this.value=this.value+((t&&!t.match(ma)?" ":"")+e),this[this.length++]=e,this.a&&this.a.call(this.c,this.value))},remove:function(e){this.b(e);var t;for(this.value=this.value.replace(RegExp("((?: +|^)"+e+"(?: +|$))","g"),function(e,t,n,i){return n&&e.length+n<i.length?" ":""}),t=r.call(this.value," "),e=this.length-1;e>0;--e)(this[e]=t[e])||(this.length--,delete this[e]);this.a&&this.a.call(this.c,this.value)},contains:function(e){return this.b(e),s.call(" "+this.value+" "," "+e+" ")},item:function(e){return this.b("1"),this[e]||k},toggle:function(e){var t=thisObj.contains(e);return this[t?"add":"remove"](e),t}}),K.prototype.toString=function(){return this.value||""},ua=function(e){this.className=e},ta=function(){return this.className},n.Utils||(n.Utils={}),n.Utils.Dom||(n.Utils.Dom={}),n.Utils.Dom.DOMStringCollection=K,G.AT_TARGET||(G.AT_TARGET=2,G.BUBBLING_PHASE=3,G.CAPTURING_PHASE=1),Event.AT_TARGET||(Event.AT_TARGET=2,Event.BUBBLING_PHASE=3,Event.CAPTURING_PHASE=1);try{n.getComputedStyle(A)}catch(Qa){n.getComputedStyle=t(function(e,t){return this.call(n,e,t||k)},n.getComputedStyle)}if("classList"in A||Object.defineProperty(y,"classList",{get:function(){if(this.tagName){var e=this._||(this._={});return e._ccl_||(e._ccl_=new K(ta,ua,this)),e._ccl_}}}),"parentElement"in A||Object.defineProperty(y,"parentElement",{get:function(){var e=this.parentNode;return e&&1===e.nodeType?e:k}}),"contains"in A||(n.Node.prototype.contains=function(e){return!!(16&this.compareDocumentPosition(e))}),"insertAdjacentHTML"in A||(n.HTMLElement.prototype.insertAdjacentHTML=function(e,t){var n,i=this.ownerDocument.createElement("_"),r={beforebegin:"before",afterbegin:"prepend",beforeend:"append",afterend:"after"};i.innerHTML=t,(i=i.childNodes)&&i.length&&(n=this[r[e]])&&n.apply(this,i)}),document.importNode&&!document.importNode.shim)try{document.importNode(A)}catch(Ra){var Sa=document.importNode;delete document.importNode,document.importNode=function(e,t){return t===g&&(t=j),Sa.call(this,e,t)}}try{A.cloneNode()}catch(Ta){[Node.prototype,y,Document.prototype,DocumentFragment.prototype].forEach(aa)}A.prepend||(B=function(e){var t,n=k,i=0,r=e.length,e=fa.call(e,function(e){return"string"==typeof e?document.createTextNode(e):e});if(1===r)n=e[0];else for(n=document.createDocumentFragment(),i=0,r=e.length;i<(t=e.length);++i)i-=r-t,n.appendChild(e[i]);return n},y.after=function(){this.parentNode&&this.parentNode.insertBefore(B(arguments),this.nextSibling)},y.before=function(){this.parentNode&&this.parentNode.insertBefore(B(arguments),this)},y.append=function(){this.appendChild(B(arguments))},y.prepend=function(){this.insertBefore(B(arguments),this.firstChild)},y.replace=function(){this.parentNode&&this.parentNode.replaceChild(B(arguments),this)},y.remove=function(){this.parentNode&&this.parentNode.removeChild(this)},"prepend"in document||(document.prepend=function(){y.prepend.apply(this.documentElement,arguments)},document.append=function(){y.append.apply(this.documentElement,arguments)})),y.matchesSelector||(y.matchesSelector=y.webkitMatchesSelector||y.mozMatchesSelector||y.msMatchesSelector||y.oMatchesSelector||function(e,t){if(!e)return l;if("*"===e)return j;var n,i,r,o,a,u,c=0;t?"length"in t?n=t[0]:(n=t,t=g):n=this;do if(u=l,n===document.documentElement?u=":root"===e:n===document.body&&(u="BODY"===e.toUpperCase()),!u){if(e=M.call(e.replace(pa,"$1")),o=e.match(oa))switch(e.charAt(0)){case"#":u=n.id===e.slice(1);break;default:if((u=!(o[1]&&"tagName"in n&&n.tagName.toUpperCase()!==o[1].toUpperCase()))&&o[2])for(r=-1,a=o[2].slice(1).split("."),o=" "+n.className+" ";a[++r]&&u;)u=s.call(o," "+a[r]+" ")}if(!/([,>+~ ])/.test(e)&&(i=n.parentNode)&&i.querySelector&&(u=i.querySelector(e)===n),!u&&(i=n.ownerDocument))for(a=i.querySelectorAll(e),r=-1;!u&&a[++r];)u=a[r]===n}while(u&&t&&(n=t[++c]));return t&&"length"in t?u&&t.length==c:u}),document.documentElement.matchesSelector||(document.documentElement.matchesSelector=y.matchesSelector),"matches"in y||(y.matches=document.documentElement.matches=y.matchesSelector),"find"in document||(qa=/(\:scope)(?=[ >~+])/,document.find=DocumentFragment.prototype.find=function(e,t){t&&("length"in t||(t=[t]))||(t=[this]);var n,i,r=0,o=t.length;do i=t[r],e=e.replace(qa,9==i.nodeType?":root":document_find_scopedreplacer=function(){return"#"+(i.id||(i.id="find"+ ++C))}),n=i.querySelector(e);while(!n&&++r<o);return n||k},document.findAll=DocumentFragment.prototype.findAll=function(e,t){t&&("length"in t||(t=[t]))||(t=[this]);var n,i,r,o,a,s,u=[],c=0,d=t.length,p={};do for(n=t[c],e=e.replace(qa,9==n.nodeType?":root":document_find_scopedreplacer=function(){return"#"+(n.id||(n.id="find"+ ++C))}),i=n.querySelectorAll(e),o=0,a=i.length;a>o;++o)r=i[o],s=l,r=r.__UUID__||(s=j,r.__UUID__=++C),!s&&r in p||(p[r]=g,u.push(i[o]));while(++c<d);return u}),"find"in y||(y.find=y.querySelector,y.findAll=y.querySelectorAll),"labels"in z("input")||Object.defineProperty(y,"labels",{enumerable:j,get:function(){if(s.call(" INPUT BUTTON KEYGEN METER OUTPUT PROGRESS TEXTAREA SELECT "," "+this.nodeName.toUpperCase()+" ")){for(var e=this,t=this.id?ga(document.querySelectorAll("label[for='"+this.id+"']")):[],n=t.length-1;(e=e.parentNode)&&(!e.h||e.h===this);)if("LABEL"===e.nodeName.toUpperCase()){for(;t[n]&&2&t[n].compareDocumentPosition(e);)n--;ea.call(t,n+1,0,e)}return t}}}),"control"in z("label")||(Da=function(e,t){for(var n=0,i=e.length;i>n;n++){var r=e[n],o=t(r);if(o)return o;if(r.childNodes&&r.childNodes.length>0&&(o=Da(r.childNodes,t)))return o}},Object.defineProperty(n.HTMLLabelElement&&n.HTMLLabelElement.prototype||y,"control",{enumerable:j,get:function(){return"LABEL"!==this.nodeName.toUpperCase()?g:this.hasAttribute("for")?document.getElementById(this.htmlFor):Da(this.childNodes,function(e){return s.call(" INPUT BUTTON KEYGEN METER OUTPUT PROGRESS TEXTAREA SELECT "," "+e.nodeName.toUpperCase()+" ")?e:void 0})||k}})),"reversed"in z("ol")||(Ga=function(e){var t,n,i=e.getAttribute("reversed"),r=e._;r||(r=e._={}),"olreversed"in r&&r.olreversed==(i!==k)||(t=e.children,n=e.getAttribute("start"),n!==k&&(n=Number(n),isNaN(n)&&(n=k)),i!==k?(r.olreversed=j,n===k&&(n=t.length),L(t,function(e){e.value=n--})):(r.olreversed=l,t[0]&&(t[0].value=n||0),L(t,function(e){e.removeAttribute("value")})))},Object.defineProperty(n.HTMLOListElement&&n.HTMLOListElement.prototype||y,"reversed",{get:function(){return"OL"!==(this.nodeName||"").toUpperCase()?g:this.getAttribute("reversed")!==k},set:function(e){return"OL"===(this.nodeName||"").toUpperCase()?(this[(e?"set":"remove")+"Attribute"]("reversed",""),Ga(this),e):void 0}}),X=function(){document.removeEventListener("DOMContentLoaded",X,l),X=g,L(document.getElementsByTagName("ol"),Ga)},"complete"==document.readyState?X():document.addEventListener("DOMContentLoaded",X,l)),document.getElementsByClassName&&ba(document.getElementsByClassName("")),document.querySelectorAll&&ba(document.querySelectorAll("#z")),Y=n.XHR=function(e,t){e=w(e||{},Y.d),Object.keys(Y.d).forEach(function(t){"object"==typeof this[t]&&w(e[t],this[t])},Y.d);var n=new XMLHttpRequest,i=e.data||"",r="post"==e.method.toLowerCase(),o=e.uri;"object"==typeof i&&e==Y.d.headers["Content-Type"]&&(i=Object.keys(i).map(function(e){var t=this[e];return"object"==typeof t?Object.keys(t).map(function(t){return e+"="+this[t]},t).join("&"):e+"="+t},i).join("&")),n.onreadystatechange=function(){4===this.readyState&&t.call(this,k,this.response||this.responseText||this.responseXML)},n.onerror=function(e){t.call(this,e)};try{n.open(e.method,o+(r?"":o.indexOf("?")?"&":"?"+i)),e.headers&&Object.keys(e.headers).forEach(function(t){n.setRequestHeader(t,e.headers[t])}),n.send(r&&i||k)}catch(a){t.call(this,a)}return n},Y.d={headers:{"X-Requested-With":"HTTPRequest","Content-Type":"application/x-www-form-urlencoded;charset=utf-8"}},(!S.prototype.toISOString||s.call(new S(-621987552e5).toISOString(),"-000001")||"1969-12-31T23:59:59.999Z"!==new S(-1).toISOString())&&(S.prototype.toISOString=function(){var e,t,n,i;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(i=this.getUTCFullYear(),e=this.getUTCMonth(),i+=~~(e/12),e=[(e%12+12)%12+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],i=(0>i?"-":i>9999?"+":"")+("00000"+Math.abs(i)).slice(i>=0&&9999>=i?-4:-6),t=e.length;t--;)n=e[t],10>n&&(e[t]="0"+n);return i+"-"+e.slice(0,2).join("-")+"T"+e.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"}),S.now||(S.now=function(){return(new S).getTime()});var Ua;if(!(Ua=!S.prototype.toJSON)){var Va;if(!(Va=s.call(new S(-621987552e5).toJSON(),"-000001"))){var Wa;e:{try{Wa=S.prototype.toJSON.call({toISOString:function(){return-1}});break e}catch(Xa){}Wa=g}Va=~Wa}Ua=Va}if(Ua&&(S.prototype.toJSON=function(){return v(this.toISOString,this)}),!S.parse){T=function(e,t,n,i,r,o,a){var s=arguments.length;return this instanceof S?(s=1==s&&String(e)===e?new S(T.parse(e)):s>=7?new S(e,t,n,i,r,o,a):s>=6?new S(e,t,n,i,r,o):s>=5?new S(e,t,n,i,r):s>=4?new S(e,t,n,i):s>=3?new S(e,t,n):s>=2?new S(e,t):s>=1?new S(e):new S,s.constructor=T,s):S.apply(this,arguments)},Ca=RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),U=[0,31,59,90,120,151,181,212,243,273,304,334,365],V=function(e){return Math.ceil(e/4)-Math.ceil(e/100)+Math.ceil(e/400)};for(D in S)T[D]=S[D];T.now=S.now,T.UTC=S.UTC,T.prototype=S.prototype,T.prototype.constructor=T,T.parse=function(e){var t=Ca.exec(e);if(t){var n=Number(t[1]),i=Number(t[2]||1),r=Number(t[3]||1),o=Number(t[4]||0),a=Number(t[5]||0),s=Number(t[6]||0),l=Number(t[7]||0),u=t[8]?0:Number(new Date(1970,0)),c="-"===t[9]?1:-1,d=Number(t[10]||0),t=Number(t[11]||0),p=V(n),h=V(n+1);return(a>0||s>0||l>0?24:25)>o&&60>a&&60>s&&1e3>l&&24>d&&60>t&&i>0&&13>i&&r>0&&r<1+U[i]-U[i-1]+(2===i?h-p:0)&&(n=365*(n-1970)+(i>2?h:p)-V(1970)+U[i-1]+r-1,n=1e3*(60*(60*(24*n+o+d*c)+a+t*c)+s)+l+u,n>=-864e13&&864e13>=n)?n:NaN}return S.parse.apply(this,arguments)},n.Date=T}if((D=n._)&&D.ielt9shims&&(D.ielt9shims.forEach(v),n._=D.orig_),w=D=A=ca=z=E=F=G=I=y=T=ka=g,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="length"in e&&e.length,n=Z.type(e);return"function"===n||Z.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(Z.isFunction(t))return Z.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return Z.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(se.test(t))return Z.filter(t,e,n);t=Z.filter(t,e)}return Z.grep(e,function(e){return W.call(t,e)>=0!==n})}function r(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=fe[e]={};return Z.each(e.match(he)||[],function(e,n){t[n]=!0}),t}function a(){K.removeEventListener("DOMContentLoaded",a,!1),e.removeEventListener("load",a,!1),Z.ready()}function s(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Z.expando+s.uid++}function l(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(we,"-$1").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:be.test(n)?Z.parseJSON(n):n}catch(r){}ye.set(e,t,n)}else n=void 0;return n}function u(){return!0}function c(){return!1}function d(){try{return K.activeElement}catch(e){}}function p(e,t){return Z.nodeName(e,"table")&&Z.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function h(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function f(e){var t=Oe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,i=e.length;i>n;n++)ve.set(e[n],"globalEval",!t||ve.get(t[n],"globalEval"))}function m(e,t){var n,i,r,o,a,s,l,u;if(1===t.nodeType){if(ve.hasData(e)&&(o=ve.access(e),a=ve.set(t,o),u=o.events)){delete a.handle,a.events={};for(r in u)for(n=0,i=u[r].length;i>n;n++)Z.event.add(t,r,u[r][n])}ye.hasData(e)&&(s=ye.access(e),l=Z.extend({},s),ye.set(t,l))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&Z.nodeName(e,t)?Z.merge([e],n):n}function y(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Se.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function b(t,n){var i,r=Z(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(r[0]))?i.display:Z.css(r[0],"display");return r.detach(),o}function w(e){var t=K,n=qe[e];return n||(n=b(e,t),"none"!==n&&n||(Fe=(Fe||Z("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Fe[0].contentDocument,t.write(),t.close(),n=b(e,t),Fe.detach()),qe[e]=n),n}function x(e,t,n){var i,r,o,a,s=e.style;return n=n||Be(e),n&&(a=n.getPropertyValue(t)||n[t]),n&&(""!==a||Z.contains(e.ownerDocument,e)||(a=Z.style(e,t)),Ue.test(a)&&He.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0!==a?a+"":a}function k(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function C(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),i=t,r=Xe.length;r--;)if(t=Xe[r]+n,t in e)return t;return i}function S(e,t,n){var i=Ve.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function _(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=Z.css(e,n+ke[o],!0,r)),i?("content"===n&&(a-=Z.css(e,"padding"+ke[o],!0,r)),"margin"!==n&&(a-=Z.css(e,"border"+ke[o]+"Width",!0,r))):(a+=Z.css(e,"padding"+ke[o],!0,r),"padding"!==n&&(a+=Z.css(e,"border"+ke[o]+"Width",!0,r)));return a}function T(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=Be(e),a="border-box"===Z.css(e,"boxSizing",!1,o);if(0>=r||null==r){if(r=x(e,t,o),(0>r||null==r)&&(r=e.style[t]),Ue.test(r))return r;i=a&&(Y.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+_(e,t,n||(a?"border":"content"),i,o)+"px"}function $(e,t){for(var n,i,r,o=[],a=0,s=e.length;s>a;a++)i=e[a],i.style&&(o[a]=ve.get(i,"olddisplay"),n=i.style.display,t?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&Ce(i)&&(o[a]=ve.access(i,"olddisplay",w(i.nodeName)))):(r=Ce(i),"none"===n&&r||ve.set(i,"olddisplay",r?n:Z.css(i,"display"))));for(a=0;s>a;a++)i=e[a],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[a]||"":"none"));return e}function E(e,t,n,i,r){return new E.prototype.init(e,t,n,i,r)}function D(){return setTimeout(function(){Ye=void 0}),Ye=Z.now()}function M(e,t){var n,i=0,r={height:e};for(t=t?1:0;4>i;i+=2-t)n=ke[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function I(e,t,n){for(var i,r=(nt[t]||[]).concat(nt["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,t,e))return i}function P(e,t,n){var i,r,o,a,s,l,u,c,d=this,p={},h=e.style,f=e.nodeType&&Ce(e),g=ve.get(e,"fxshow");n.queue||(s=Z._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,Z.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],u=Z.css(e,"display"),c="none"===u?ve.get(e,"olddisplay")||w(e.nodeName):u,"inline"===c&&"none"===Z.css(e,"float")&&(h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}));for(i in t)if(r=t[i],Qe.exec(r)){if(delete t[i],o=o||"toggle"===r,r===(f?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;f=!0}p[i]=g&&g[i]||Z.style(e,i)}else u=void 0;if(Z.isEmptyObject(p))"inline"===("none"===u?w(e.nodeName):u)&&(h.display=u);else{g?"hidden"in g&&(f=g.hidden):g=ve.access(e,"fxshow",{}),o&&(g.hidden=!f),f?Z(e).show():d.done(function(){Z(e).hide()}),d.done(function(){var t;ve.remove(e,"fxshow");for(t in p)Z.style(e,t,p[t])});for(i in p)a=I(f?g[i]:0,i,d),i in g||(g[i]=a.start,f&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function A(e,t){var n,i,r,o,a;for(n in e)if(i=Z.camelCase(n),r=t[i],o=e[n],Z.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),a=Z.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function j(e,t,n){var i,r,o=0,a=tt.length,s=Z.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=Ye||D(),n=Math.max(0,u.startTime+u.duration-t),i=n/u.duration||0,o=1-i,a=0,l=u.tweens.length;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:Z.extend({},t),opts:Z.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Ye||D(),duration:n.duration,tweens:[],createTween:function(t,n){var i=Z.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(i),i},stop:function(t){var n=0,i=t?u.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(A(c,u.opts.specialEasing);a>o;o++)if(i=tt[o].call(u,e,c,u.opts))return i;return Z.map(c,I,u),Z.isFunction(u.opts.start)&&u.opts.start.call(e,u),Z.fx.timer(Z.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function N(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(he)||[];if(Z.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function O(e,t,n,i){function r(s){var l;return o[s]=!0,Z.each(e[s]||[],function(e,s){var u=s(t,n,i);return"string"!=typeof u||a||o[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),r(u),!1)}),l}var o={},a=e===bt;return r(t.dataTypes[0])||!o["*"]&&r("*")}function L(e,t){var n,i,r=Z.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&Z.extend(!0,e,i),e}function R(e,t,n){for(var i,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function F(e,t,n,i){var r,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(r in u)if(s=r.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[r]:u[r]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function q(e,t,n,i){var r;if(Z.isArray(t))Z.each(t,function(t,r){n||St.test(e)?i(e,r):q(e+"["+("object"==typeof r?t:"")+"]",r,n,i)});else if(n||"object"!==Z.type(t))i(e,t);else for(r in t)q(e+"["+r+"]",t[r],n,i)}function H(e){return Z.isWindow(e)?e:9===e.nodeType&&e.defaultView}var U=[],B=U.slice,z=U.concat,V=U.push,W=U.indexOf,G={},J=G.toString,X=G.hasOwnProperty,Y={},K=e.document,Q="2.1.4",Z=function(e,t){return new Z.fn.init(e,t)},ee=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,te=/^-ms-/,ne=/-([\da-z])/gi,ie=function(e,t){return t.toUpperCase()};Z.fn=Z.prototype={jquery:Q,constructor:Z,selector:"",length:0,toArray:function(){return B.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:B.call(this)},pushStack:function(e){var t=Z.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return Z.each(this,e,t)},map:function(e){
|
|
3304
|
3211
|
return this.pushStack(Z.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(B.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(null)},push:V,sort:U.sort,splice:U.splice},Z.extend=Z.fn.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||Z.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],i=e[t],a!==i&&(u&&i&&(Z.isPlainObject(i)||(r=Z.isArray(i)))?(r?(r=!1,o=n&&Z.isArray(n)?n:[]):o=n&&Z.isPlainObject(n)?n:{},a[t]=Z.extend(u,o,i)):void 0!==i&&(a[t]=i));return a},Z.extend({expando:"jQuery"+(Q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===Z.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!Z.isArray(e)&&e-parseFloat(e)+1>=0},isPlainObject:function(e){return"object"!==Z.type(e)||e.nodeType||Z.isWindow(e)?!1:e.constructor&&!X.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?G[J.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=Z.trim(e),e&&(1===e.indexOf("use strict")?(t=K.createElement("script"),t.text=e,K.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(te,"ms-").replace(ne,ie)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var r,o=0,a=e.length,s=n(e);if(i){if(s)for(;a>o&&(r=t.apply(e[o],i),r!==!1);o++);else for(o in e)if(r=t.apply(e[o],i),r===!1)break}else if(s)for(;a>o&&(r=t.call(e[o],o,e[o]),r!==!1);o++);else for(o in e)if(r=t.call(e[o],o,e[o]),r===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ee,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?Z.merge(i,"string"==typeof e?[e]:e):V.call(i,e)),i},inArray:function(e,t,n){return null==t?-1:W.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;n>i;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],o=0,a=e.length,s=!n;a>o;o++)i=!t(e[o],o),i!==s&&r.push(e[o]);return r},map:function(e,t,i){var r,o=0,a=e.length,s=n(e),l=[];if(s)for(;a>o;o++)r=t(e[o],o,i),null!=r&&l.push(r);else for(o in e)r=t(e[o],o,i),null!=r&&l.push(r);return z.apply([],l)},guid:1,proxy:function(e,t){var n,i,r;return"string"==typeof t&&(n=e[t],t=e,e=n),Z.isFunction(e)?(i=B.call(arguments,2),r=function(){return e.apply(t||this,i.concat(B.call(arguments)))},r.guid=e.guid=e.guid||Z.guid++,r):void 0},now:Date.now,support:Y}),Z.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){G["[object "+t+"]"]=t.toLowerCase()});var re=function(e){function t(e,t,n,i){var r,o,a,s,l,u,d,h,f,g;if((t?t.ownerDocument||t:q)!==P&&I(t),t=t||P,n=n||[],s=t.nodeType,"string"!=typeof e||!e||1!==s&&9!==s&&11!==s)return n;if(!i&&j){if(11!==s&&(r=ye.exec(e)))if(a=r[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&R(t,o)&&o.id===a)return n.push(o),n}else{if(r[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((a=r[3])&&x.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(a)),n}if(x.qsa&&(!N||!N.test(e))){if(h=d=F,f=t,g=1!==s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(u=_(e),(d=t.getAttribute("id"))?h=d.replace(we,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=u.length;l--;)u[l]=h+p(u[l]);f=be.test(e)&&c(t.parentNode)||t,g=u.join(",")}if(g)try{return Q.apply(n,f.querySelectorAll(g)),n}catch(m){}finally{d||t.removeAttribute("id")}}}return $(e.replace(le,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>k.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[F]=!0,e}function r(e){var t=P.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=e.length;i--;)k.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||G)-(~e.sourceIndex||G);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function p(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function h(e,t,n){var i=t.dir,r=n&&"parentNode"===i,o=U++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o)}:function(t,n,a){var s,l,u=[H,o];if(a){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||r){if(l=t[F]||(t[F]={}),(s=l[i])&&s[0]===H&&s[1]===o)return u[2]=s[2];if(l[i]=u,u[2]=e(t,n,a))return!0}}}function f(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function g(e,n,i){for(var r=0,o=n.length;o>r;r++)t(e,n[r],i);return i}function m(e,t,n,i,r){for(var o,a=[],s=0,l=e.length,u=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,i,r))&&(a.push(o),u&&t.push(s));return a}function v(e,t,n,r,o,a){return r&&!r[F]&&(r=v(r)),o&&!o[F]&&(o=v(o,a)),i(function(i,a,s,l){var u,c,d,p=[],h=[],f=a.length,v=i||g(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?v:m(v,p,e,s,l),b=n?o||(i?e:f||r)?[]:a:y;if(n&&n(y,b,s,l),r)for(u=m(b,h),r(u,[],s,l),c=u.length;c--;)(d=u[c])&&(b[h[c]]=!(y[h[c]]=d));if(i){if(o||e){if(o){for(u=[],c=b.length;c--;)(d=b[c])&&u.push(y[c]=d);o(null,b=[],u,l)}for(c=b.length;c--;)(d=b[c])&&(u=o?ee(i,d):p[c])>-1&&(i[u]=!(a[u]=d))}}else b=m(b===a?b.splice(f,b.length):b),o?o(null,a,b,l):Q.apply(a,b)})}function y(e){for(var t,n,i,r=e.length,o=k.relative[e[0].type],a=o||k.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),u=h(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,i){var r=!o&&(i||n!==E)||((t=n).nodeType?l(e,n,i):u(e,n,i));return t=null,r}];r>s;s++)if(n=k.relative[e[s].type])c=[h(f(c),n)];else{if(n=k.filter[e[s].type].apply(null,e[s].matches),n[F]){for(i=++s;r>i&&!k.relative[e[i].type];i++);return v(s>1&&f(c),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(le,"$1"),n,i>s&&y(e.slice(s,i)),r>i&&y(e=e.slice(i)),r>i&&p(e))}c.push(n)}return f(c)}function b(e,n){var r=n.length>0,o=e.length>0,a=function(i,a,s,l,u){var c,d,p,h=0,f="0",g=i&&[],v=[],y=E,b=i||o&&k.find.TAG("*",u),w=H+=null==y?1:Math.random()||.1,x=b.length;for(u&&(E=a!==P&&a);f!==x&&null!=(c=b[f]);f++){if(o&&c){for(d=0;p=e[d++];)if(p(c,a,s)){l.push(c);break}u&&(H=w)}r&&((c=!p&&c)&&h--,i&&g.push(c))}if(h+=f,r&&f!==h){for(d=0;p=n[d++];)p(g,v,a,s);if(i){if(h>0)for(;f--;)g[f]||v[f]||(v[f]=Y.call(l));v=m(v)}Q.apply(l,v),u&&!i&&v.length>0&&h+n.length>1&&t.uniqueSort(l)}return u&&(H=w,E=y),g};return r?i(a):a}var w,x,k,C,S,_,T,$,E,D,M,I,P,A,j,N,O,L,R,F="sizzle"+1*new Date,q=e.document,H=0,U=0,B=n(),z=n(),V=n(),W=function(e,t){return e===t&&(M=!0),0},G=1<<31,J={}.hasOwnProperty,X=[],Y=X.pop,K=X.push,Q=X.push,Z=X.slice,ee=function(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",re=ie.replace("w","w#"),oe="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp(ne+"+","g"),le=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ue=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),de=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),pe=new RegExp(ae),he=new RegExp("^"+re+"$"),fe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie.replace("w","w*")+")"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},ge=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,be=/[+~]/,we=/'|\\/g,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),ke=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},Ce=function(){I()};try{Q.apply(X=Z.call(q.childNodes),q.childNodes),X[q.childNodes.length].nodeType}catch(Se){Q={apply:X.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}x=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},I=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:q;return i!==P&&9===i.nodeType&&i.documentElement?(P=i,A=i.documentElement,n=i.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),j=!S(i),x.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=r(function(e){return e.appendChild(i.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ve.test(i.getElementsByClassName),x.getById=r(function(e){return A.appendChild(e).id=F,!i.getElementsByName||!i.getElementsByName(F).length}),x.getById?(k.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&j){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},k.filter.ID=function(e){var t=e.replace(xe,ke);return function(e){return e.getAttribute("id")===t}}):(delete k.find.ID,k.filter.ID=function(e){var t=e.replace(xe,ke);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),k.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,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},k.find.CLASS=x.getElementsByClassName&&function(e,t){return j?t.getElementsByClassName(e):void 0},O=[],N=[],(x.qsa=ve.test(i.querySelectorAll))&&(r(function(e){A.appendChild(e).innerHTML="<a id='"+F+"'></a><select id='"+F+"-\f]' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&N.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||N.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+F+"-]").length||N.push("~="),e.querySelectorAll(":checked").length||N.push(":checked"),e.querySelectorAll("a#"+F+"+*").length||N.push(".#.+[+~]")}),r(function(e){var t=i.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&N.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||N.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),N.push(",.*:")})),(x.matchesSelector=ve.test(L=A.matches||A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&r(function(e){x.disconnectedMatch=L.call(e,"div"),L.call(e,"[s!='']:x"),O.push("!=",ae)}),N=N.length&&new RegExp(N.join("|")),O=O.length&&new RegExp(O.join("|")),t=ve.test(A.compareDocumentPosition),R=t||ve.test(A.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},W=t?function(e,t){if(e===t)return M=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===i||e.ownerDocument===q&&R(q,e)?-1:t===i||t.ownerDocument===q&&R(q,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return M=!0,0;var n,r=0,o=e.parentNode,s=t.parentNode,l=[e],u=[t];if(!o||!s)return e===i?-1:t===i?1:o?-1:s?1:D?ee(D,e)-ee(D,t):0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;l[r]===u[r];)r++;return r?a(l[r],u[r]):l[r]===q?-1:u[r]===q?1:0},i):P},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==P&&I(e),n=n.replace(de,"='$1']"),x.matchesSelector&&j&&(!O||!O.test(n))&&(!N||!N.test(n)))try{var i=L.call(e,n);if(i||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return t(n,P,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==P&&I(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==P&&I(e);var n=k.attrHandle[t.toLowerCase()],i=n&&J.call(k.attrHandle,t.toLowerCase())?n(e,t,!j):void 0;return void 0!==i?i:x.attributes||!j?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(M=!x.detectDuplicates,D=!x.sortStable&&e.slice(0),e.sort(W),M){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return D=null,e},C=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=C(t);return n},k=t.selectors={cacheLength:50,createPseudo:i,match:fe,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(xe,ke),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,ke),"~="===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 fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&pe.test(n)&&(t=_(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(xe,ke).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=B[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&B(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(se," ")+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,p,h,f,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=g="only"===e&&!f&&"nextSibling"}return!0}if(f=[a?m.firstChild:m.lastChild],a&&y){for(c=m[F]||(m[F]={}),u=c[e]||[],h=u[0]===H&&u[1],p=u[0]===H&&u[2],d=h&&m.childNodes[h];d=++h&&d&&d[g]||(p=h=0)||f.pop();)if(1===d.nodeType&&++p&&d===t){c[e]=[H,h,p];break}}else if(y&&(u=(t[F]||(t[F]={}))[e])&&u[0]===H)p=u[1];else for(;(d=++h&&d&&d[g]||(p=h=0)||f.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++p||(y&&((d[F]||(d[F]={}))[e]=[H,p]),d!==t)););return p-=r,p===i||p%i===0&&p/i>=0}}},PSEUDO:function(e,n){var r,o=k.pseudos[e]||k.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[F]?o(n):o.length>1?(r=[e,e,"",n],k.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)i=ee(e,r[a]),e[i]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=T(e.replace(le,"$1"));return r[F]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(xe,ke),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:i(function(e){return he.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,ke).toLowerCase(),function(t){var n;do if(n=j?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===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===A},focus:function(e){return e===P.activeElement&&(!P.hasFocus||P.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},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,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!k.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return ge.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:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:u(function(e,t,n){for(var i=0>n?n+t:n;++i<t;)e.push(i);return e})}},k.pseudos.nth=k.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[w]=s(w);for(w in{submit:!0,reset:!0})k.pseudos[w]=l(w);return d.prototype=k.filters=k.pseudos,k.setFilters=new d,_=t.tokenize=function(e,n){var i,r,o,a,s,l,u,c=z[e+" "];if(c)return n?0:c.slice(0);for(s=e,l=[],u=k.preFilter;s;){(!i||(r=ue.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(o=[])),i=!1,(r=ce.exec(s))&&(i=r.shift(),o.push({value:i,type:r[0].replace(le," ")}),s=s.slice(i.length));for(a in k.filter)!(r=fe[a].exec(s))||u[a]&&!(r=u[a](r))||(i=r.shift(),o.push({value:i,type:a,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):z(e,l).slice(0)},T=t.compile=function(e,t){var n,i=[],r=[],o=V[e+" "];if(!o){for(t||(t=_(e)),n=t.length;n--;)o=y(t[n]),o[F]?i.push(o):r.push(o);o=V(e,b(r,i)),o.selector=e}return o},$=t.select=function(e,t,n,i){var r,o,a,s,l,u="function"==typeof e&&e,d=!i&&_(e=u.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&j&&k.relative[o[1].type]){if(t=(k.find.ID(a.matches[0].replace(xe,ke),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=fe.needsContext.test(e)?0:o.length;r--&&(a=o[r],!k.relative[s=a.type]);)if((l=k.find[s])&&(i=l(a.matches[0].replace(xe,ke),be.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(r,1),e=i.length&&p(o),!e)return Q.apply(n,i),n;break}}return(u||T(e,d))(i,t,!j,n,be.test(e)&&c(t.parentNode)||t),n},x.sortStable=F.split("").sort(W).join("")===F,x.detectDuplicates=!!M,I(),x.sortDetached=r(function(e){return 1&e.compareDocumentPosition(P.createElement("div"))}),r(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&&r(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}),r(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var i;return n?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);Z.find=re,Z.expr=re.selectors,Z.expr[":"]=Z.expr.pseudos,Z.unique=re.uniqueSort,Z.text=re.getText,Z.isXMLDoc=re.isXML,Z.contains=re.contains;var oe=Z.expr.match.needsContext,ae=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,se=/^.[^:#\[\.,]*$/;Z.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?Z.find.matchesSelector(i,e)?[i]:[]:Z.find.matches(e,Z.grep(t,function(e){return 1===e.nodeType}))},Z.fn.extend({find:function(e){var t,n=this.length,i=[],r=this;if("string"!=typeof e)return this.pushStack(Z(e).filter(function(){for(t=0;n>t;t++)if(Z.contains(r[t],this))return!0}));for(t=0;n>t;t++)Z.find(e,r[t],i);return i=this.pushStack(n>1?Z.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&oe.test(e)?Z(e):e||[],!1).length}});var le,ue=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ce=Z.fn.init=function(e,t){var n,i;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ue.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||le).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof Z?t[0]:t,Z.merge(this,Z.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:K,!0)),ae.test(n[1])&&Z.isPlainObject(t))for(n in t)Z.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return i=K.getElementById(n[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=K,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):Z.isFunction(e)?"undefined"!=typeof le.ready?le.ready(e):e(Z):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),Z.makeArray(e,this))};ce.prototype=Z.fn,le=Z(K);var de=/^(?:parents|prev(?:Until|All))/,pe={children:!0,contents:!0,next:!0,prev:!0};Z.extend({dir:function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&Z(e).is(n))break;i.push(e)}return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),Z.fn.extend({has:function(e){var t=Z(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(Z.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,i=0,r=this.length,o=[],a=oe.test(e)||"string"!=typeof e?Z(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&Z.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Z.unique(o):o)},index:function(e){return e?"string"==typeof e?W.call(Z(e),this[0]):W.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Z.unique(Z.merge(this.get(),Z(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Z.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Z.dir(e,"parentNode")},parentsUntil:function(e,t,n){return Z.dir(e,"parentNode",n)},next:function(e){return r(e,"nextSibling")},prev:function(e){return r(e,"previousSibling")},nextAll:function(e){return Z.dir(e,"nextSibling")},prevAll:function(e){return Z.dir(e,"previousSibling")},nextUntil:function(e,t,n){return Z.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return Z.dir(e,"previousSibling",n)},siblings:function(e){return Z.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Z.sibling(e.firstChild)},contents:function(e){return e.contentDocument||Z.merge([],e.childNodes)}},function(e,t){Z.fn[e]=function(n,i){var r=Z.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=Z.filter(i,r)),this.length>1&&(pe[e]||Z.unique(r),de.test(e)&&r.reverse()),this.pushStack(r)}});var he=/\S+/g,fe={};Z.Callbacks=function(e){e="string"==typeof e?fe[e]||o(e):Z.extend({},e);var t,n,i,r,a,s,l=[],u=!e.once&&[],c=function(o){for(t=e.memory&&o,n=!0,s=r||0,r=0,a=l.length,i=!0;l&&a>s;s++)if(l[s].apply(o[0],o[1])===!1&&e.stopOnFalse){t=!1;break}i=!1,l&&(u?u.length&&c(u.shift()):t?l=[]:d.disable())},d={add:function(){if(l){var n=l.length;!function o(t){Z.each(t,function(t,n){var i=Z.type(n);"function"===i?e.unique&&d.has(n)||l.push(n):n&&n.length&&"string"!==i&&o(n)})}(arguments),i?a=l.length:t&&(r=n,c(t))}return this},remove:function(){return l&&Z.each(arguments,function(e,t){for(var n;(n=Z.inArray(t,l,n))>-1;)l.splice(n,1),i&&(a>=n&&a--,s>=n&&s--)}),this},has:function(e){return e?Z.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],a=0,this},disable:function(){return l=u=t=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,t||d.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||n&&!u||(t=t||[],t=[e,t.slice?t.slice():t],i?u.push(t):c(t)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!n}};return d},Z.extend({Deferred:function(e){var t=[["resolve","done",Z.Callbacks("once memory"),"resolved"],["reject","fail",Z.Callbacks("once memory"),"rejected"],["notify","progress",Z.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Z.Deferred(function(n){Z.each(t,function(t,o){var a=Z.isFunction(e[t])&&e[t];r[o[1]](function(){var e=a&&a.apply(this,arguments);e&&Z.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?Z.extend(e,i):i}},r={};return i.pipe=i.then,Z.each(t,function(e,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,o=B.call(arguments),a=o.length,s=1!==a||e&&Z.isFunction(e.promise)?a:0,l=1===s?e:Z.Deferred(),u=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?B.call(arguments):r,i===t?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);a>r;r++)o[r]&&Z.isFunction(o[r].promise)?o[r].promise().done(u(r,i,o)).fail(l.reject).progress(u(r,n,t)):--s;return s||l.resolveWith(i,o),l.promise()}});var ge;Z.fn.ready=function(e){return Z.ready.promise().done(e),this},Z.extend({isReady:!1,readyWait:1,holdReady:function(e){e?Z.readyWait++:Z.ready(!0)},ready:function(e){(e===!0?--Z.readyWait:Z.isReady)||(Z.isReady=!0,e!==!0&&--Z.readyWait>0||(ge.resolveWith(K,[Z]),Z.fn.triggerHandler&&(Z(K).triggerHandler("ready"),Z(K).off("ready"))))}}),Z.ready.promise=function(t){return ge||(ge=Z.Deferred(),"complete"===K.readyState?setTimeout(Z.ready):(K.addEventListener("DOMContentLoaded",a,!1),e.addEventListener("load",a,!1))),ge.promise(t)},Z.ready.promise();var me=Z.access=function(e,t,n,i,r,o,a){var s=0,l=e.length,u=null==n;if("object"===Z.type(n)){r=!0;for(s in n)Z.access(e,t,s,n[s],!0,o,a)}else if(void 0!==i&&(r=!0,Z.isFunction(i)||(a=!0),u&&(a?(t.call(e,i),t=null):(u=t,t=function(e,t,n){return u.call(Z(e),n)})),t))for(;l>s;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return r?e:u?t.call(e):l?t(e[0],n):o};Z.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},s.uid=1,s.accepts=Z.acceptData,s.prototype={key:function(e){if(!s.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=s.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(i){t[this.expando]=n,Z.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var i,r=this.key(e),o=this.cache[r];if("string"==typeof t)o[t]=n;else if(Z.isEmptyObject(o))Z.extend(this.cache[r],t);else for(i in t)o[i]=t[i];return o},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var i;return void 0===t||t&&"string"==typeof t&&void 0===n?(i=this.get(e,t),void 0!==i?i:this.get(e,Z.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i,r,o=this.key(e),a=this.cache[o];if(void 0===t)this.cache[o]={};else{Z.isArray(t)?i=t.concat(t.map(Z.camelCase)):(r=Z.camelCase(t),t in a?i=[t,r]:(i=r,i=i in a?[i]:i.match(he)||[])),n=i.length;for(;n--;)delete a[i[n]]}},hasData:function(e){return!Z.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var ve=new s,ye=new s,be=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,we=/([A-Z])/g;Z.extend({hasData:function(e){return ye.hasData(e)||ve.hasData(e)},data:function(e,t,n){return ye.access(e,t,n)},removeData:function(e,t){ye.remove(e,t)},_data:function(e,t,n){return ve.access(e,t,n)},_removeData:function(e,t){ve.remove(e,t)}}),Z.fn.extend({data:function(e,t){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(r=ye.get(o),1===o.nodeType&&!ve.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=Z.camelCase(i.slice(5)),l(o,i,r[i])));ve.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){ye.set(this,e)}):me(this,function(t){var n,i=Z.camelCase(e);if(o&&void 0===t){if(n=ye.get(o,e),void 0!==n)return n;if(n=ye.get(o,i),void 0!==n)return n;if(n=l(o,i,void 0),void 0!==n)return n}else this.each(function(){var n=ye.get(this,i);ye.set(this,i,t),-1!==e.indexOf("-")&&void 0!==n&&ye.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ye.remove(this,e)})}}),Z.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=ve.get(e,t),n&&(!i||Z.isArray(n)?i=ve.access(e,t,Z.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=Z.queue(e,t),i=n.length,r=n.shift(),o=Z._queueHooks(e,t),a=function(){Z.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ve.get(e,n)||ve.access(e,n,{empty:Z.Callbacks("once memory").add(function(){ve.remove(e,[t+"queue",n])})})}}),Z.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?Z.queue(this[0],e):void 0===t?this:this.each(function(){var n=Z.queue(this,e,t);Z._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&Z.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Z.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=Z.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o]);
|
|
3305
|
3212
|
};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=ve.get(o[a],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}});var xe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ke=["Top","Right","Bottom","Left"],Ce=function(e,t){return e=t||e,"none"===Z.css(e,"display")||!Z.contains(e.ownerDocument,e)},Se=/^(?:checkbox|radio)$/i;!function(){var e=K.createDocumentFragment(),t=e.appendChild(K.createElement("div")),n=K.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),Y.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",Y.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var _e="undefined";Y.focusinBubbles="onfocusin"in e;var Te=/^key/,$e=/^(?:mouse|pointer|contextmenu)|click/,Ee=/^(?:focusinfocus|focusoutblur)$/,De=/^([^.]*)(?:\.(.+)|)$/;Z.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,u,c,d,p,h,f,g,m=ve.get(e);if(m)for(n.handler&&(o=n,n=o.handler,r=o.selector),n.guid||(n.guid=Z.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(t){return typeof Z!==_e&&Z.event.triggered!==t.type?Z.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(he)||[""],u=t.length;u--;)s=De.exec(t[u])||[],h=g=s[1],f=(s[2]||"").split(".").sort(),h&&(d=Z.event.special[h]||{},h=(r?d.delegateType:d.bindType)||h,d=Z.event.special[h]||{},c=Z.extend({type:h,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&Z.expr.match.needsContext.test(r),namespace:f.join(".")},o),(p=l[h])||(p=l[h]=[],p.delegateCount=0,d.setup&&d.setup.call(e,i,f,a)!==!1||e.addEventListener&&e.addEventListener(h,a,!1)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,c):p.push(c),Z.event.global[h]=!0)},remove:function(e,t,n,i,r){var o,a,s,l,u,c,d,p,h,f,g,m=ve.hasData(e)&&ve.get(e);if(m&&(l=m.events)){for(t=(t||"").match(he)||[""],u=t.length;u--;)if(s=De.exec(t[u])||[],h=g=s[1],f=(s[2]||"").split(".").sort(),h){for(d=Z.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,p=l[h]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!r&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(e,c));a&&!p.length&&(d.teardown&&d.teardown.call(e,f,m.handle)!==!1||Z.removeEvent(e,h,m.handle),delete l[h])}else for(h in l)Z.event.remove(e,h+t[u],n,i,!0);Z.isEmptyObject(l)&&(delete m.handle,ve.remove(e,"events"))}},trigger:function(t,n,i,r){var o,a,s,l,u,c,d,p=[i||K],h=X.call(t,"type")?t.type:t,f=X.call(t,"namespace")?t.namespace.split("."):[];if(a=s=i=i||K,3!==i.nodeType&&8!==i.nodeType&&!Ee.test(h+Z.event.triggered)&&(h.indexOf(".")>=0&&(f=h.split("."),h=f.shift(),f.sort()),u=h.indexOf(":")<0&&"on"+h,t=t[Z.expando]?t:new Z.Event(h,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=f.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:Z.makeArray(n,[t]),d=Z.event.special[h]||{},r||!d.trigger||d.trigger.apply(i,n)!==!1)){if(!r&&!d.noBubble&&!Z.isWindow(i)){for(l=d.delegateType||h,Ee.test(l+h)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(i.ownerDocument||K)&&p.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=p[o++])&&!t.isPropagationStopped();)t.type=o>1?l:d.bindType||h,c=(ve.get(a,"events")||{})[t.type]&&ve.get(a,"handle"),c&&c.apply(a,n),c=u&&a[u],c&&c.apply&&Z.acceptData(a)&&(t.result=c.apply(a,n),t.result===!1&&t.preventDefault());return t.type=h,r||t.isDefaultPrevented()||d._default&&d._default.apply(p.pop(),n)!==!1||!Z.acceptData(i)||u&&Z.isFunction(i[h])&&!Z.isWindow(i)&&(s=i[u],s&&(i[u]=null),Z.event.triggered=h,i[h](),Z.event.triggered=void 0,s&&(i[u]=s)),t.result}},dispatch:function(e){e=Z.event.fix(e);var t,n,i,r,o,a=[],s=B.call(arguments),l=(ve.get(this,"events")||{})[e.type]||[],u=Z.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(a=Z.event.handlers.call(this,e,l),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,i=((Z.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,s),void 0!==i&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,r,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!==this;l=l.parentNode||this)if(l.disabled!==!0||"click"!==e.type){for(i=[],n=0;s>n;n++)o=t[n],r=o.selector+" ",void 0===i[r]&&(i[r]=o.needsContext?Z(r,this).index(l)>=0:Z.find(r,this,null,[l]).length),i[r]&&i.push(o);i.length&&a.push({elem:l,handlers:i})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget 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 offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,r,o=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||K,i=n.documentElement,r=n.body,e.pageX=t.clientX+(i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[Z.expando])return e;var t,n,i,r=e.type,o=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=$e.test(r)?this.mouseHooks:Te.test(r)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new Z.Event(o),t=i.length;t--;)n=i[t],e[n]=o[n];return e.target||(e.target=K),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==d()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===d()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&Z.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return Z.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var r=Z.extend(new Z.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?Z.event.trigger(r,null,t):Z.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},Z.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},Z.Event=function(e,t){return this instanceof Z.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?u:c):this.type=e,t&&Z.extend(this,t),this.timeStamp=e&&e.timeStamp||Z.now(),void(this[Z.expando]=!0)):new Z.Event(e,t)},Z.Event.prototype={isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=u,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=u,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=u,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},Z.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){Z.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,o=e.handleObj;return(!r||r!==i&&!Z.contains(i,r))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),Y.focusinBubbles||Z.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){Z.event.simulate(t,e.target,Z.event.fix(e),!0)};Z.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=ve.access(i,t);r||i.addEventListener(e,n,!0),ve.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=ve.access(i,t)-1;r?ve.access(i,t,r):(i.removeEventListener(e,n,!0),ve.remove(i,t))}}}),Z.fn.extend({on:function(e,t,n,i,r){var o,a;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(a in e)this.on(a,t,n,e[a],r);return this}if(null==n&&null==i?(i=t,n=t=void 0):null==i&&("string"==typeof t?(i=n,n=void 0):(i=n,n=t,t=void 0)),i===!1)i=c;else if(!i)return this;return 1===r&&(o=i,i=function(e){return Z().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=Z.guid++)),this.each(function(){Z.event.add(this,e,i,n,t)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,Z(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=c),this.each(function(){Z.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){Z.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?Z.event.trigger(e,t,n,!0):void 0}});var Me=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ie=/<([\w:]+)/,Pe=/<|&#?\w+;/,Ae=/<(?:script|style|link)/i,je=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^$|\/(?:java|ecma)script/i,Oe=/^true\/(.*)/,Le=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Re={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Re.optgroup=Re.option,Re.tbody=Re.tfoot=Re.colgroup=Re.caption=Re.thead,Re.th=Re.td,Z.extend({clone:function(e,t,n){var i,r,o,a,s=e.cloneNode(!0),l=Z.contains(e.ownerDocument,e);if(!(Y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Z.isXMLDoc(e)))for(a=v(s),o=v(e),i=0,r=o.length;r>i;i++)y(o[i],a[i]);if(t)if(n)for(o=o||v(e),a=a||v(s),i=0,r=o.length;r>i;i++)m(o[i],a[i]);else m(e,s);return a=v(s,"script"),a.length>0&&g(a,!l&&v(e,"script")),s},buildFragment:function(e,t,n,i){for(var r,o,a,s,l,u,c=t.createDocumentFragment(),d=[],p=0,h=e.length;h>p;p++)if(r=e[p],r||0===r)if("object"===Z.type(r))Z.merge(d,r.nodeType?[r]:r);else if(Pe.test(r)){for(o=o||c.appendChild(t.createElement("div")),a=(Ie.exec(r)||["",""])[1].toLowerCase(),s=Re[a]||Re._default,o.innerHTML=s[1]+r.replace(Me,"<$1></$2>")+s[2],u=s[0];u--;)o=o.lastChild;Z.merge(d,o.childNodes),o=c.firstChild,o.textContent=""}else d.push(t.createTextNode(r));for(c.textContent="",p=0;r=d[p++];)if((!i||-1===Z.inArray(r,i))&&(l=Z.contains(r.ownerDocument,r),o=v(c.appendChild(r),"script"),l&&g(o),n))for(u=0;r=o[u++];)Ne.test(r.type||"")&&n.push(r);return c},cleanData:function(e){for(var t,n,i,r,o=Z.event.special,a=0;void 0!==(n=e[a]);a++){if(Z.acceptData(n)&&(r=n[ve.expando],r&&(t=ve.cache[r]))){if(t.events)for(i in t.events)o[i]?Z.event.remove(n,i):Z.removeEvent(n,i,t.handle);ve.cache[r]&&delete ve.cache[r]}delete ye.cache[n[ye.expando]]}}}),Z.fn.extend({text:function(e){return me(this,function(e){return void 0===e?Z.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?Z.filter(e,this):this,r=0;null!=(n=i[r]);r++)t||1!==n.nodeType||Z.cleanData(v(n)),n.parentNode&&(t&&Z.contains(n.ownerDocument,n)&&g(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Z.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return Z.clone(this,e,t)})},html:function(e){return me(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!Re[(Ie.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Me,"<$1></$2>");try{for(;i>n;n++)t=this[n]||{},1===t.nodeType&&(Z.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,Z.cleanData(v(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=z.apply([],e);var n,i,r,o,a,s,l=0,u=this.length,c=this,d=u-1,p=e[0],g=Z.isFunction(p);if(g||u>1&&"string"==typeof p&&!Y.checkClone&&je.test(p))return this.each(function(n){var i=c.eq(n);g&&(e[0]=p.call(this,n,i.html())),i.domManip(e,t)});if(u&&(n=Z.buildFragment(e,this[0].ownerDocument,!1,this),i=n.firstChild,1===n.childNodes.length&&(n=i),i)){for(r=Z.map(v(n,"script"),h),o=r.length;u>l;l++)a=n,l!==d&&(a=Z.clone(a,!0,!0),o&&Z.merge(r,v(a,"script"))),t.call(this[l],a,l);if(o)for(s=r[r.length-1].ownerDocument,Z.map(r,f),l=0;o>l;l++)a=r[l],Ne.test(a.type||"")&&!ve.access(a,"globalEval")&&Z.contains(s,a)&&(a.src?Z._evalUrl&&Z._evalUrl(a.src):Z.globalEval(a.textContent.replace(Le,"")))}return this}}),Z.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Z.fn[e]=function(e){for(var n,i=[],r=Z(e),o=r.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),Z(r[a])[t](n),V.apply(i,n.get());return this.pushStack(i)}});var Fe,qe={},He=/^margin/,Ue=new RegExp("^("+xe+")(?!px)[a-z%]+$","i"),Be=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):e.getComputedStyle(t,null)};!function(){function t(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",a.innerHTML="",r.appendChild(o);var t=e.getComputedStyle(a,null);n="1%"!==t.top,i="4px"===t.width,r.removeChild(o)}var n,i,r=K.documentElement,o=K.createElement("div"),a=K.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",Y.clearCloneStyle="content-box"===a.style.backgroundClip,o.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",o.appendChild(a),e.getComputedStyle&&Z.extend(Y,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==i&&t(),i},reliableMarginRight:function(){var t,n=a.appendChild(K.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",r.appendChild(o),t=!parseFloat(e.getComputedStyle(n,null).marginRight),r.removeChild(o),a.removeChild(n),t}}))}(),Z.swap=function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return r};var ze=/^(none|table(?!-c[ea]).+)/,Ve=new RegExp("^("+xe+")(.*)$","i"),We=new RegExp("^([+-])=("+xe+")","i"),Ge={position:"absolute",visibility:"hidden",display:"block"},Je={letterSpacing:"0",fontWeight:"400"},Xe=["Webkit","O","Moz","ms"];Z.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=x(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=Z.camelCase(t),l=e.style;return t=Z.cssProps[s]||(Z.cssProps[s]=C(l,s)),a=Z.cssHooks[t]||Z.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(r=a.get(e,!1,i))?r:l[t]:(o=typeof n,"string"===o&&(r=We.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(Z.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||Z.cssNumber[s]||(n+="px"),Y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,i))||(l[t]=n)),void 0)}},css:function(e,t,n,i){var r,o,a,s=Z.camelCase(t);return t=Z.cssProps[s]||(Z.cssProps[s]=C(e.style,s)),a=Z.cssHooks[t]||Z.cssHooks[s],a&&"get"in a&&(r=a.get(e,!0,n)),void 0===r&&(r=x(e,t,i)),"normal"===r&&t in Je&&(r=Je[t]),""===n||n?(o=parseFloat(r),n===!0||Z.isNumeric(o)?o||0:r):r}}),Z.each(["height","width"],function(e,t){Z.cssHooks[t]={get:function(e,n,i){return n?ze.test(Z.css(e,"display"))&&0===e.offsetWidth?Z.swap(e,Ge,function(){return T(e,t,i)}):T(e,t,i):void 0},set:function(e,n,i){var r=i&&Be(e);return S(e,n,i?_(e,t,i,"border-box"===Z.css(e,"boxSizing",!1,r),r):0)}}}),Z.cssHooks.marginRight=k(Y.reliableMarginRight,function(e,t){return t?Z.swap(e,{display:"inline-block"},x,[e,"marginRight"]):void 0}),Z.each({margin:"",padding:"",border:"Width"},function(e,t){Z.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[e+ke[i]+t]=o[i]||o[i-2]||o[0];return r}},He.test(e)||(Z.cssHooks[e+t].set=S)}),Z.fn.extend({css:function(e,t){return me(this,function(e,t,n){var i,r,o={},a=0;if(Z.isArray(t)){for(i=Be(e),r=t.length;r>a;a++)o[t[a]]=Z.css(e,t[a],!1,i);return o}return void 0!==n?Z.style(e,t,n):Z.css(e,t)},e,t,arguments.length>1)},show:function(){return $(this,!0)},hide:function(){return $(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ce(this)?Z(this).show():Z(this).hide()})}}),Z.Tween=E,E.prototype={constructor:E,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(Z.cssNumber[n]?"":"px")},cur:function(){var e=E.propHooks[this.prop];return e&&e.get?e.get(this):E.propHooks._default.get(this)},run:function(e){var t,n=E.propHooks[this.prop];return this.options.duration?this.pos=t=Z.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):E.propHooks._default.set(this),this}},E.prototype.init.prototype=E.prototype,E.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=Z.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){Z.fx.step[e.prop]?Z.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[Z.cssProps[e.prop]]||Z.cssHooks[e.prop])?Z.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},E.propHooks.scrollTop=E.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Z.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Z.fx=E.prototype.init,Z.fx.step={};var Ye,Ke,Qe=/^(?:toggle|show|hide)$/,Ze=new RegExp("^(?:([+-])=|)("+xe+")([a-z%]*)$","i"),et=/queueHooks$/,tt=[P],nt={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),r=Ze.exec(t),o=r&&r[3]||(Z.cssNumber[e]?"":"px"),a=(Z.cssNumber[e]||"px"!==o&&+i)&&Ze.exec(Z.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],r=r||[],a=+i||1;do s=s||".5",a/=s,Z.style(n.elem,e,a+o);while(s!==(s=n.cur()/i)&&1!==s&&--l)}return r&&(a=n.start=+a||+i||0,n.unit=o,n.end=r[1]?a+(r[1]+1)*r[2]:+r[2]),n}]};Z.Animation=Z.extend(j,{tweener:function(e,t){Z.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,r=e.length;r>i;i++)n=e[i],nt[n]=nt[n]||[],nt[n].unshift(t)},prefilter:function(e,t){t?tt.unshift(e):tt.push(e)}}),Z.speed=function(e,t,n){var i=e&&"object"==typeof e?Z.extend({},e):{complete:n||!n&&t||Z.isFunction(e)&&e,duration:e,easing:n&&t||t&&!Z.isFunction(t)&&t};return i.duration=Z.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in Z.fx.speeds?Z.fx.speeds[i.duration]:Z.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){Z.isFunction(i.old)&&i.old.call(this),i.queue&&Z.dequeue(this,i.queue)},i},Z.fn.extend({fadeTo:function(e,t,n,i){return this.filter(Ce).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=Z.isEmptyObject(e),o=Z.speed(t,n,i),a=function(){var t=j(this,Z.extend({},e),o);(r||ve.get(this,"finish"))&&t.stop(!0)};return a.finish=a,r||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=Z.timers,a=ve.get(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&et.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));(t||!n)&&Z.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=ve.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=Z.timers,a=i?i.length:0;for(n.finish=!0,Z.queue(this,e,[]),r&&r.stop&&r.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++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),Z.each(["toggle","show","hide"],function(e,t){var n=Z.fn[t];Z.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(M(t,!0),e,i,r)}}),Z.each({slideDown:M("show"),slideUp:M("hide"),slideToggle:M("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Z.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),Z.timers=[],Z.fx.tick=function(){var e,t=0,n=Z.timers;for(Ye=Z.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||Z.fx.stop(),Ye=void 0},Z.fx.timer=function(e){Z.timers.push(e),e()?Z.fx.start():Z.timers.pop()},Z.fx.interval=13,Z.fx.start=function(){Ke||(Ke=setInterval(Z.fx.tick,Z.fx.interval))},Z.fx.stop=function(){clearInterval(Ke),Ke=null},Z.fx.speeds={slow:600,fast:200,_default:400},Z.fn.delay=function(e,t){return e=Z.fx?Z.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},function(){var e=K.createElement("input"),t=K.createElement("select"),n=t.appendChild(K.createElement("option"));e.type="checkbox",Y.checkOn=""!==e.value,Y.optSelected=n.selected,t.disabled=!0,Y.optDisabled=!n.disabled,e=K.createElement("input"),e.value="t",e.type="radio",Y.radioValue="t"===e.value}();var it,rt,ot=Z.expr.attrHandle;Z.fn.extend({attr:function(e,t){return me(this,Z.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Z.removeAttr(this,e)})}}),Z.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===_e?Z.prop(e,t,n):(1===o&&Z.isXMLDoc(e)||(t=t.toLowerCase(),i=Z.attrHooks[t]||(Z.expr.match.bool.test(t)?rt:it)),void 0===n?i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=Z.find.attr(e,t),null==r?void 0:r):null!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):void Z.removeAttr(e,t))},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(he);if(o&&1===e.nodeType)for(;n=o[r++];)i=Z.propFix[n]||n,Z.expr.match.bool.test(n)&&(e[i]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!Y.radioValue&&"radio"===t&&Z.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),rt={set:function(e,t,n){return t===!1?Z.removeAttr(e,n):e.setAttribute(n,n),n}},Z.each(Z.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ot[t]||Z.find.attr;ot[t]=function(e,t,i){var r,o;return i||(o=ot[t],ot[t]=r,r=null!=n(e,t,i)?t.toLowerCase():null,ot[t]=o),r}});var at=/^(?:input|select|textarea|button)$/i;Z.fn.extend({prop:function(e,t){return me(this,Z.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Z.propFix[e]||e]})}}),Z.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var i,r,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!Z.isXMLDoc(e),o&&(t=Z.propFix[t]||t,r=Z.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||at.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),Y.optSelected||(Z.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),Z.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Z.propFix[this.toLowerCase()]=this});var st=/[\t\r\n\f]/g;Z.fn.extend({addClass:function(e){var t,n,i,r,o,a,s="string"==typeof e&&e,l=0,u=this.length;if(Z.isFunction(e))return this.each(function(t){Z(this).addClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(he)||[];u>l;l++)if(n=this[l],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(st," "):" ")){for(o=0;r=t[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=Z.trim(i),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,i,r,o,a,s=0===arguments.length||"string"==typeof e&&e,l=0,u=this.length;if(Z.isFunction(e))return this.each(function(t){Z(this).removeClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(he)||[];u>l;l++)if(n=this[l],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(st," "):"")){for(o=0;r=t[o++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");a=e?Z.trim(i):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):Z.isFunction(e)?this.each(function(n){Z(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,i=0,r=Z(this),o=e.match(he)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else(n===_e||"boolean"===n)&&(this.className&&ve.set(this,"__className__",this.className),this.className=this.className||e===!1?"":ve.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(st," ").indexOf(t)>=0)return!0;return!1}});var lt=/\r/g;Z.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=Z.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,Z(this).val()):e,null==r?r="":"number"==typeof r?r+="":Z.isArray(r)&&(r=Z.map(r,function(e){return null==e?"":e+""})),t=Z.valHooks[this.type]||Z.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return t=Z.valHooks[r.type]||Z.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(lt,""):null==n?"":n)}}}),Z.extend({valHooks:{option:{get:function(e){var t=Z.find.attr(e,"value");return null!=t?t:Z.trim(Z.text(e))}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type||0>r,a=o?null:[],s=o?r+1:i.length,l=0>r?s:o?r:0;s>l;l++)if(n=i[l],(n.selected||l===r)&&(Y.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!Z.nodeName(n.parentNode,"optgroup"))){if(t=Z(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=Z.makeArray(t),a=r.length;a--;)i=r[a],(i.selected=Z.inArray(i.value,o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),Z.each(["radio","checkbox"],function(){Z.valHooks[this]={set:function(e,t){return Z.isArray(t)?e.checked=Z.inArray(Z(e).val(),t)>=0:void 0}},Y.checkOn||(Z.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),Z.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){Z.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),Z.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},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,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var ut=Z.now(),ct=/\?/;Z.parseJSON=function(e){return JSON.parse(e+"")},Z.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(i){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&Z.error("Invalid XML: "+e),t};var dt=/#.*$/,pt=/([?&])_=[^&]*/,ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,ft=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,gt=/^(?:GET|HEAD)$/,mt=/^\/\//,vt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,yt={},bt={},wt="*/".concat("*"),xt=e.location.href,kt=vt.exec(xt.toLowerCase())||[];Z.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt,type:"GET",isLocal:ft.test(kt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":wt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":Z.parseJSON,"text xml":Z.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?L(L(e,Z.ajaxSettings),t):L(Z.ajaxSettings,e)},ajaxPrefilter:N(yt),ajaxTransport:N(bt),ajax:function(e,t){function n(e,t,n,a){var l,c,v,y,w,k=t;2!==b&&(b=2,s&&clearTimeout(s),i=void 0,o=a||"",x.readyState=e>0?4:0,l=e>=200&&300>e||304===e,n&&(y=R(d,x,n)),y=F(d,y,x,l),l?(d.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(Z.lastModified[r]=w),w=x.getResponseHeader("etag"),w&&(Z.etag[r]=w)),204===e||"HEAD"===d.type?k="nocontent":304===e?k="notmodified":(k=y.state,c=y.data,v=y.error,l=!v)):(v=k,(e||!k)&&(k="error",0>e&&(e=0))),x.status=e,x.statusText=(t||k)+"",l?f.resolveWith(p,[c,k,x]):f.rejectWith(p,[x,k,v]),x.statusCode(m),m=void 0,u&&h.trigger(l?"ajaxSuccess":"ajaxError",[x,d,l?c:v]),g.fireWith(p,[x,k]),u&&(h.trigger("ajaxComplete",[x,d]),--Z.active||Z.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,o,a,s,l,u,c,d=Z.ajaxSetup({},t),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?Z(p):Z.event,f=Z.Deferred(),g=Z.Callbacks("once memory"),m=d.statusCode||{},v={},y={},b=0,w="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!a)for(a={};t=ht.exec(o);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||w;return i&&i.abort(t),n(0,t),this}};if(f.promise(x).complete=g.add,
|
|
...
|
...
|
@@ -9235,7 +9141,6 @@ var _bindata = map[string]func() (*asset, error){
|
|
9235
|
9235
|
"java/img/icons/quartz/quarz.png": javaImgIconsQuartzQuarzPng,
|
|
9236
|
9236
|
"java/img/logo-origin-thin.svg": javaImgLogoOriginThinSvg,
|
|
9237
|
9237
|
"java/index.html": javaIndexHtml,
|
|
9238
|
|
- "java/libs-0416b4c7.js": javaLibs0416b4c7Js,
|
|
9239
|
9238
|
"java/libs-a7b6e223.js": javaLibsA7b6e223Js,
|
|
9240
|
9239
|
"java/style.css": javaStyleCss,
|
|
9241
|
9240
|
}
|
|
...
|
...
|
@@ -9603,8 +9508,6 @@ var _bintree = &bintree{nil, map[string]*bintree{
|
|
9603
|
9603
|
}},
|
|
9604
|
9604
|
"index.html": &bintree{javaIndexHtml, map[string]*bintree{
|
|
9605
|
9605
|
}},
|
|
9606
|
|
- "libs-0416b4c7.js": &bintree{javaLibs0416b4c7Js, map[string]*bintree{
|
|
9607
|
|
- }},
|
|
9608
|
9606
|
"libs-a7b6e223.js": &bintree{javaLibsA7b6e223Js, map[string]*bintree{
|
|
9609
|
9607
|
}},
|
|
9610
|
9608
|
"style.css": &bintree{javaStyleCss, map[string]*bintree{
|