分布式调度框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2 lines
596 KiB

webpackJsonp([5],{1023:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n(654)),r=o(n(1103));function o(t){return t&&t.__esModule?t:{default:t}}e.default={name:"definition-details-index",components:{mDefinitionDetails:r.default,mSecondaryMenu:i.default}}},1024:function(t,e,n){"use strict";e.__esModule=!0;var i=l(n(905)),r=l(n(646)),o=l(n(777)),s=l(n(642)),a=n(123);function l(t){return t&&t.__esModule?t:{default:t}}e.default={name:"definition-details",data:function(){return{isLoading:!0,releaseState:""}},mixins:[s.default],props:{},methods:Object.assign({},(0,a.mapMutations)("dag",["resetParams","setIsDetails"]),(0,a.mapActions)("dag",["getProcessList","getResourcesList","getProcessDetails"]),{init:function(){var t=this;this.isLoading=!0,this.resetParams(),Promise.all([this.getProcessDetails(this.$route.params.id),this.getProcessList(),this.getResourcesList()]).then(function(e){var n=e[0];t.setIsDetails("ONLINE"===n.releaseState),t.releaseState=n.releaseState,t.isLoading=!1,o.default.init(t.$root)}).catch(function(){t.isLoading=!1})},_reset:function(){var t=this;this.getProcessDetails(this.$route.params.id).then(function(e){var n=e;t.setIsDetails("ONLINE"===n.releaseState),t.releaseState=n.releaseState})}}),watch:{$route:{deep:!0,handler:function(){this.init()}}},created:function(){this.init()},mounted:function(){},components:{mDag:i.default,mSpin:r.default}}},1103:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1024),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(1104),a=n(27)(r.a,s.a,!1,null,null,null);e.default=a.exports},1104:function(t,e,n){"use strict";var i={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"home-main index-model"},[this.isLoading?this._e():e("m-dag",{attrs:{type:"definition","release-state":this.releaseState}}),this._v(" "),e("m-spin",{attrs:{"is-spin":this.isLoading}})],1)},staticRenderFns:[]};e.a=i},1105:function(t,e,n){"use strict";var i={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"main-layout-box"},[e("m-secondary-menu",{attrs:{type:"projects"}}),this._v(" "),e("m-definition-details")],1)},staticRenderFns:[]};e.a=i},606:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1023),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(1105),a=n(27)(r.a,s.a,!1,null,null,null);e.default=a.exports},639:function(t,e,n){"use strict";e.__esModule=!0,e.default={name:"spin",data:function(){return{}},props:{isSpin:{type:Boolean,default:!0},isLeft:{type:Boolean,default:!0}}}},641:function(t,e,n){"use strict";e.__esModule=!0;var i,r=n(659),o=(i=r)&&i.__esModule?i:{default:i};e.default={name:"secondary-menu",data:function(){return{menuList:(0,o.default)(this.type),index:0,id:this.$route.params.id,isTogHide:!1}},props:{type:String,className:String},watch:{isTogHide:function(t){var e=$(".main-layout-box");t?e.addClass("toggle"):e.removeClass("toggle")}},methods:{_toggleSubMenu:function(t){t.isOpen=!t.isOpen},_toggleMenu:function(){this.isTogHide=!this.isTogHide}},mounted:function(){}}},642:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n(91)),r=o(n(222));function o(t){return t&&t.__esModule?t:{default:t}}e.default={data:function(){return{router:r.default,store:i.default,isDetails:!1}},created:function(){this.isDetails=this.store.state.dag.isDetails},methods:{},computed:{_isDetails:function(){return this.isDetails?"icon-disabled":""}}}},644:function(t,e,n){var i;i=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),i=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),s=i||r||o,a=s&&(i?document.documentMode||6:+(o||r)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),d=/Opera\//.test(t),h=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),f=/PhantomJS/.test(t),m=!o&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),g=/Android/.test(t),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=m||/Mac/.test(e),y=/\bCrOS\b/.test(t),x=/win/i.test(e),_=d&&t.match(/Version\/(\d*\.\d*)/);_&&(_=Number(_[1])),_&&_>=15&&(d=!1,l=!0);var w=b&&(c||d&&(null==_||_<12.11)),C=n||s&&a>=9;function k(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var P,S=function(t,e){var n=t.className,i=k(e).exec(n);if(i){var r=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(r?i[1]+r:"")}};function D(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function L(t,e){return D(t).appendChild(e)}function E(t,e,n,i){var r=document.createElement(t);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var o=0;o<e.length;++o)r.appendChild(e[o]);return r}function T(t,e,n,i){var r=E(t,e,n,i);return r.setAttribute("role","presentation"),r}function M(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do{if(11==e.nodeType&&(e=e.host),e==t)return!0}while(e=e.parentNode)}function I(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function A(t,e){var n=t.className;k(e).test(n)||(t.className+=(n?" ":"")+e)}function j(t,e){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!k(n[i]).test(e)&&(e+=" "+n[i]);return e}P=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var O=function(t){t.select()};function N(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function $(t,e,n){for(var i in e||(e={}),t)!t.hasOwnProperty(i)||!1===n&&e.hasOwnProperty(i)||(e[i]=t[i]);return e}function F(t,e,n,i,r){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var o=i||0,s=r||0;;){var a=t.indexOf("\t",o);if(a<0||a>=e)return s+(e-o);s+=a-o,s+=n-s%n,o=a+1}}m?O=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:s&&(O=function(t){try{t.select()}catch(t){}});var R=function(){this.id=null};function z(t,e){for(var n=0;n<t.length;++n)if(t[n]==e)return n;return-1}R.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var H=30,W={toString:function(){return"CodeMirror.Pass"}},B={scroll:!1},U={origin:"*mouse"},q={origin:"+move"};function G(t,e,n){for(var i=0,r=0;;){var o=t.indexOf("\t",i);-1==o&&(o=t.length);var s=o-i;if(o==t.length||r+s>=e)return i+Math.min(s,e-r);if(r+=o-i,i=o+1,(r+=n-r%n)>=e)return i}}var Y=[""];function V(t){for(;Y.length<=t;)Y.push(X(Y)+" ");return Y[t]}function X(t){return t[t.length-1]}function K(t,e){for(var n=[],i=0;i<t.length;i++)n[i]=e(t[i],i);return n}function J(){}function Z(t,e){var n;return Object.create?n=Object.create(t):(J.prototype=t,n=new J),e&&$(e,n),n}var Q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function tt(t){return/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||Q.test(t))}function et(t,e){return e?!!(e.source.indexOf("\\w")>-1&&tt(t))||e.test(t):tt(t)}function nt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var it=/[\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]/;function rt(t){return t.charCodeAt(0)>=768&&it.test(t)}function ot(t,e,n){for(;(n<0?e>0:e<t.length)&&rt(t.charAt(e));)e+=n;return e}function st(t,e,n){for(var i=e>n?-1:1;;){if(e==n)return e;var r=(e+n)/2,o=i<0?Math.ceil(r):Math.floor(r);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+i}}function at(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(e<o){n=r;break}e-=o}return n.lines[e]}function lt(t,e,n){var i=[],r=e.line;return t.iter(e.line,n.line+1,function(t){var o=t.text;r==n.line&&(o=o.slice(0,n.ch)),r==e.line&&(o=o.slice(e.ch)),i.push(o),++r}),i}function ct(t,e,n){var i=[];return t.iter(e,n,function(t){i.push(t.text)}),i}function ut(t,e){var n=e-t.height;if(n)for(var i=t;i;i=i.parent)i.height+=n}function dt(t){if(null==t.parent)return null;for(var e=t.parent,n=z(e.lines,t),i=e.parent;i;e=i,i=i.parent)for(var r=0;i.children[r]!=e;++r)n+=i.children[r].chunkSize();return n+e.first}function ht(t,e){var n=t.first;t:do{for(var i=0;i<t.children.length;++i){var r=t.children[i],o=r.height;if(e<o){t=r;continue t}e-=o,n+=r.chunkSize()}return n}while(!t.lines);for(var s=0;s<t.lines.length;++s){var a=t.lines[s].height;if(e<a)break;e-=a}return n+s}function pt(t,e){return e>=t.first&&e<t.first+t.size}function ft(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function mt(t,e,n){if(void 0===n&&(n=null),!(this instanceof mt))return new mt(t,e,n);this.line=t,this.ch=e,this.sticky=n}function gt(t,e){return t.line-e.line||t.ch-e.ch}function vt(t,e){return t.sticky==e.sticky&&0==gt(t,e)}function bt(t){return mt(t.line,t.ch)}function yt(t,e){return gt(t,e)<0?e:t}function xt(t,e){return gt(t,e)<0?t:e}function _t(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function wt(t,e){if(e.line<t.first)return mt(t.first,0);var n=t.first+t.size-1;return e.line>n?mt(n,at(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?mt(t.line,e):n<0?mt(t.line,0):t}(e,at(t,e.line).text.length)}function Ct(t,e){for(var n=[],i=0;i<e.length;i++)n[i]=wt(t,e[i]);return n}var kt=!1,Pt=!1;function St(t,e,n){this.marker=t,this.from=e,this.to=n}function Dt(t,e){if(t)for(var n=0;n<t.length;++n){var i=t[n];if(i.marker==e)return i}}function Lt(t,e){for(var n,i=0;i<t.length;++i)t[i]!=e&&(n||(n=[])).push(t[i]);return n}function Et(t,e){if(e.full)return null;var n=pt(t,e.from.line)&&at(t,e.from.line).markedSpans,i=pt(t,e.to.line)&&at(t,e.to.line).markedSpans;if(!n&&!i)return null;var r=e.from.ch,o=e.to.ch,s=0==gt(e.from,e.to),a=function(t,e,n){var i;if(t)for(var r=0;r<t.length;++r){var o=t[r],s=o.marker;if(null==o.from||(s.inclusiveLeft?o.from<=e:o.from<e)||o.from==e&&"bookmark"==s.type&&(!n||!o.marker.insertLeft)){var a=null==o.to||(s.inclusiveRight?o.to>=e:o.to>e);(i||(i=[])).push(new St(s,o.from,a?null:o.to))}}return i}(n,r,s),l=function(t,e,n){var i;if(t)for(var r=0;r<t.length;++r){var o=t[r],s=o.marker;if(null==o.to||(s.inclusiveRight?o.to>=e:o.to>e)||o.from==e&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var a=null==o.from||(s.inclusiveLeft?o.from<=e:o.from<e);(i||(i=[])).push(new St(s,a?null:o.from-e,null==o.to?null:o.to-e))}}return i}(i,o,s),c=1==e.text.length,u=X(e.text).length+(c?r:0);if(a)for(var d=0;d<a.length;++d){var h=a[d];if(null==h.to){var p=Dt(l,h.marker);p?c&&(h.to=null==p.to?null:p.to+u):h.to=r}}if(l)for(var f=0;f<l.length;++f){var m=l[f];if(null!=m.to&&(m.to+=u),null==m.from)Dt(a,m.marker)||(m.from=u,c&&(a||(a=[])).push(m));else m.from+=u,c&&(a||(a=[])).push(m)}a&&(a=Tt(a)),l&&l!=a&&(l=Tt(l));var g=[a];if(!c){var v,b=e.text.length-2;if(b>0&&a)for(var y=0;y<a.length;++y)null==a[y].to&&(v||(v=[])).push(new St(a[y].marker,null,null));for(var x=0;x<b;++x)g.push(v);g.push(l)}return g}function Tt(t){for(var e=0;e<t.length;++e){var n=t[e];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function Mt(t){var e=t.markedSpans;if(e){for(var n=0;n<e.length;++n)e[n].marker.detachLine(t);t.markedSpans=null}}function It(t,e){if(e){for(var n=0;n<e.length;++n)e[n].marker.attachLine(t);t.markedSpans=e}}function At(t){return t.inclusiveLeft?-1:0}function jt(t){return t.inclusiveRight?1:0}function Ot(t,e){var n=t.lines.length-e.lines.length;if(0!=n)return n;var i=t.find(),r=e.find(),o=gt(i.from,r.from)||At(t)-At(e);if(o)return-o;var s=gt(i.to,r.to)||jt(t)-jt(e);return s||e.id-t.id}function Nt(t,e){var n,i=Pt&&t.markedSpans;if(i)for(var r=void 0,o=0;o<i.length;++o)(r=i[o]).marker.collapsed&&null==(e?r.from:r.to)&&(!n||Ot(n,r.marker)<0)&&(n=r.marker);return n}function $t(t){return Nt(t,!0)}function Ft(t){return Nt(t,!1)}function Rt(t,e){var n,i=Pt&&t.markedSpans;if(i)for(var r=0;r<i.length;++r){var o=i[r];o.marker.collapsed&&(null==o.from||o.from<e)&&(null==o.to||o.to>e)&&(!n||Ot(n,o.marker)<0)&&(n=o.marker)}return n}function zt(t,e,n,i,r){var o=at(t,e),s=Pt&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var c=l.marker.find(0),u=gt(c.from,n)||At(l.marker)-At(r),d=gt(c.to,i)||jt(l.marker)-jt(r);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?gt(c.to,n)>=0:gt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?gt(c.from,i)<=0:gt(c.from,i)<0)))return!0}}}function Ht(t){for(var e;e=$t(t);)t=e.find(-1,!0).line;return t}function Wt(t,e){var n=at(t,e),i=Ht(n);return n==i?e:dt(i)}function Bt(t,e){if(e>t.lastLine())return e;var n,i=at(t,e);if(!Ut(t,i))return e;for(;n=Ft(i);)i=n.find(1,!0).line;return dt(i)+1}function Ut(t,e){var n=Pt&&e.markedSpans;if(n)for(var i=void 0,r=0;r<n.length;++r)if((i=n[r]).marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&qt(t,e,i))return!0}}function qt(t,e,n){if(null==n.to){var i=n.marker.find(1,!0);return qt(t,i.line,Dt(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==e.text.length)return!0;for(var r=void 0,o=0;o<e.markedSpans.length;++o)if((r=e.markedSpans[o]).marker.collapsed&&!r.marker.widgetNode&&r.from==n.to&&(null==r.to||r.to!=n.from)&&(r.marker.inclusiveLeft||n.marker.inclusiveRight)&&qt(t,e,r))return!0}function Gt(t){for(var e=0,n=(t=Ht(t)).parent,i=0;i<n.lines.length;++i){var r=n.lines[i];if(r==t)break;e+=r.height}for(var o=n.parent;o;o=(n=o).parent)for(var s=0;s<o.children.length;++s){var a=o.children[s];if(a==n)break;e+=a.height}return e}function Yt(t){if(0==t.height)return 0;for(var e,n=t.text.length,i=t;e=$t(i);){var r=e.find(0,!0);i=r.from.line,n+=r.from.ch-r.to.ch}for(i=t;e=Ft(i);){var o=e.find(0,!0);n-=i.text.length-o.from.ch,n+=(i=o.to.line).text.length-o.to.ch}return n}function Vt(t){var e=t.display,n=t.doc;e.maxLine=at(n,n.first),e.maxLineLength=Yt(e.maxLine),e.maxLineChanged=!0,n.iter(function(t){var n=Yt(t);n>e.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}var Xt=null;function Kt(t,e,n){var i;Xt=null;for(var r=0;r<t.length;++r){var o=t[r];if(o.from<e&&o.to>e)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Xt=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Xt=r)}return null!=i?i:Xt}var Jt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,r=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function a(t,e,n){this.level=t,this.from=e,this.to=n}return function(l,c){var u="ltr"==c?"L":"R";if(0==l.length||"ltr"==c&&!n.test(l))return!1;for(var d,h=l.length,p=[],f=0;f<h;++f)p.push((d=l.charCodeAt(f))<=247?t.charAt(d):1424<=d&&d<=1524?"R":1536<=d&&d<=1785?e.charAt(d-1536):1774<=d&&d<=2220?"r":8192<=d&&d<=8203?"w":8204==d?"b":"L");for(var m=0,g=u;m<h;++m){var v=p[m];"m"==v?p[m]=g:g=v}for(var b=0,y=u;b<h;++b){var x=p[b];"1"==x&&"r"==y?p[b]="n":r.test(x)&&(y=x,"r"==x&&(p[b]="R"))}for(var _=1,w=p[0];_<h-1;++_){var C=p[_];"+"==C&&"1"==w&&"1"==p[_+1]?p[_]="1":","!=C||w!=p[_+1]||"1"!=w&&"n"!=w||(p[_]=w),w=C}for(var k=0;k<h;++k){var P=p[k];if(","==P)p[k]="N";else if("%"==P){var S=void 0;for(S=k+1;S<h&&"%"==p[S];++S);for(var D=k&&"!"==p[k-1]||S<h&&"1"==p[S]?"1":"N",L=k;L<S;++L)p[L]=D;k=S-1}}for(var E=0,T=u;E<h;++E){var M=p[E];"L"==T&&"1"==M?p[E]="L":r.test(M)&&(T=M)}for(var I=0;I<h;++I)if(i.test(p[I])){var A=void 0;for(A=I+1;A<h&&i.test(p[A]);++A);for(var j="L"==(I?p[I-1]:u),O=j==("L"==(A<h?p[A]:u))?j?"L":"R":u,N=I;N<A;++N)p[N]=O;I=A-1}for(var $,F=[],R=0;R<h;)if(o.test(p[R])){var z=R;for(++R;R<h&&o.test(p[R]);++R);F.push(new a(0,z,R))}else{var H=R,W=F.length;for(++R;R<h&&"L"!=p[R];++R);for(var B=H;B<R;)if(s.test(p[B])){H<B&&F.splice(W,0,new a(1,H,B));var U=B;for(++B;B<R&&s.test(p[B]);++B);F.splice(W,0,new a(2,U,B)),H=B}else++B;H<R&&F.splice(W,0,new a(1,H,R))}return"ltr"==c&&(1==F[0].level&&($=l.match(/^\s+/))&&(F[0].from=$[0].length,F.unshift(new a(0,0,$[0].length))),1==X(F).level&&($=l.match(/\s+$/))&&(X(F).to-=$[0].length,F.push(new a(0,h-$[0].length,h)))),"rtl"==c?F.reverse():F}}();function Zt(t,e){var n=t.order;return null==n&&(n=t.order=Jt(t.text,e)),n}var Qt=[],te=function(t,e,n){if(t.addEventListener)t.addEventListener(e,n,!1);else if(t.attachEvent)t.attachEvent("on"+e,n);else{var i=t._handlers||(t._handlers={});i[e]=(i[e]||Qt).concat(n)}};function ee(t,e){return t._handlers&&t._handlers[e]||Qt}function ne(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=z(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function ie(t,e){var n=ee(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r<n.length;++r)n[r].apply(null,i)}function re(t,e,n){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),ie(t,n||e.type,t,e),ue(e)||e.codemirrorIgnore}function oe(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var n=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),i=0;i<e.length;++i)-1==z(n,e[i])&&n.push(e[i])}function se(t,e){return ee(t,e).length>0}function ae(t){t.prototype.on=function(t,e){te(this,t,e)},t.prototype.off=function(t,e){ne(this,t,e)}}function le(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function ce(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function ue(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function de(t){le(t),ce(t)}function he(t){return t.target||t.srcElement}function pe(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),b&&t.ctrlKey&&1==e&&(e=3),e}var fe,me,ge=function(){if(s&&a<9)return!1;var t=E("div");return"draggable"in t||"dragDrop"in t}();function ve(t){if(null==fe){var e=E("span","");L(t,E("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(fe=e.offsetWidth<=1&&e.offsetHeight>2&&!(s&&a<8))}var n=fe?E("span",""):E("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function be(t){if(null!=me)return me;var e=L(t,document.createTextNode("AخA")),n=P(e,0,1).getBoundingClientRect(),i=P(e,1,2).getBoundingClientRect();return D(t),!(!n||n.left==n.right)&&(me=i.right-n.right<3)}var ye,xe=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],i=t.length;e<=i;){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var o=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),e+=s+1):(n.push(o),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},_e=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},we="oncopy"in(ye=E("div"))||(ye.setAttribute("oncopy","return;"),"function"==typeof ye.oncopy),Ce=null;var ke={},Pe={};function Se(t){if("string"==typeof t&&Pe.hasOwnProperty(t))t=Pe[t];else if(t&&"string"==typeof t.name&&Pe.hasOwnProperty(t.name)){var e=Pe[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Se("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Se("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function De(t,e){e=Se(e);var n=ke[e.name];if(!n)return De(t,"text/plain");var i=n(t,e);if(Le.hasOwnProperty(e.name)){var r=Le[e.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)i[s]=e.modeProps[s];return i}var Le={};function Ee(t,e){$(e,Le.hasOwnProperty(t)?Le[t]:Le[t]={})}function Te(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var i in e){var r=e[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function Me(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Ie(t,e,n){return!t.startState||t.startState(e,n)}var Ae=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Ae.prototype.eol=function(){return this.pos>=this.string.length},Ae.prototype.sol=function(){return this.pos==this.lineStart},Ae.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ae.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ae.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},Ae.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},Ae.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Ae.prototype.skipToEnd=function(){this.pos=this.string.length},Ae.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Ae.prototype.backUp=function(t){this.pos-=t},Ae.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Ae.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Ae.prototype.match=function(t,e,n){if("string"!=typeof t){var i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var r=function(t){return n?t.toLowerCase():t};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},Ae.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ae.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Ae.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Ae.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var je=function(t,e){this.state=t,this.lookAhead=e},Oe=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function Ne(t,e,n,i){var r=[t.state.modeGen],o={};qe(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=function(i){n.baseTokens=r;var a=t.state.overlays[i],l=1,c=0;n.state=!0,qe(t,e.text,a.mode,n,function(t,e){for(var n=l;c<t;){var i=r[l];i>t&&r.splice(l,1,t,r[l+1],i),l+=2,c=Math.min(t,i)}if(e)if(a.opaque)r.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;n<l;n+=2){var o=r[n+1];r[n+1]=(o?o+" ":"")+"overlay "+e}},o),n.state=s,n.baseTokens=null,n.baseTokenPos=1},l=0;l<t.state.overlays.length;++l)a(l);return{styles:r,classes:o.bgClass||o.textClass?o:null}}function $e(t,e,n){if(!e.styles||e.styles[0]!=t.state.modeGen){var i=Fe(t,dt(e)),r=e.text.length>t.options.maxHighlightLength&&Te(t.doc.mode,i.state),o=Ne(t,e,i);r&&(i.state=r),e.stateAfter=i.save(!r),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Fe(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new Oe(i,!0,e);var o=function(t,e,n){for(var i,r,o=t.doc,s=n?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>s;--a){if(a<=o.first)return o.first;var l=at(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof je?c.lookAhead:0)<=o.modeFrontier))return a;var u=F(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}(t,e,n),s=o>i.first&&at(i,o-1).stateAfter,a=s?Oe.fromSaved(i,s,o):new Oe(i,Ie(i.mode),o);return i.iter(o,e,function(n){Re(t,n.text,a);var i=a.line;n.stateAfter=i==e-1||i%5==0||i>=r.viewFrom&&i<r.viewTo?a.save():null,a.nextLine()}),n&&(i.modeFrontier=a.line),a}function Re(t,e,n,i){var r=t.doc.mode,o=new Ae(e,t.options.tabSize,n);for(o.start=o.pos=i||0,""==e&&ze(r,n.state);!o.eol();)He(r,o,n.state),o.start=o.pos}function ze(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var n=Me(t,e);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function He(t,e,n,i){for(var r=0;r<10;r++){i&&(i[0]=Me(t,n).mode);var o=t.token(e,n);if(e.pos>e.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}Oe.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},Oe.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},Oe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Oe.fromSaved=function(t,e,n){return e instanceof je?new Oe(t,Te(t.mode,e.state),n,e.lookAhead):new Oe(t,Te(t.mode,e),n)},Oe.prototype.save=function(t){var e=!1!==t?Te(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new je(e,this.maxLookAhead):e};var We=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function Be(t,e,n,i){var r,o,s=t.doc,a=s.mode,l=at(s,(e=wt(s,e)).line),c=Fe(t,e.line,n),u=new Ae(l.text,t.options.tabSize,c);for(i&&(o=[]);(i||u.pos<e.ch)&&!u.eol();)u.start=u.pos,r=He(a,u,c.state),i&&o.push(new We(u,r,Te(s.mode,c.state)));return i?o:new We(u,r,c.state)}function Ue(t,e){if(t)for(;;){var n=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;t=t.slice(0,n.index)+t.slice(n.index+n[0].length);var i=n[1]?"bgClass":"textClass";null==e[i]?e[i]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(e[i])||(e[i]+=" "+n[2])}return t}function qe(t,e,n,i,r,o,s){var a=n.flattenSpans;null==a&&(a=t.options.flattenSpans);var l,c=0,u=null,d=new Ae(e,t.options.tabSize,i),h=t.options.addModeClass&&[null];for(""==e&&Ue(ze(n,i.state),o);!d.eol();){if(d.pos>t.options.maxHighlightLength?(a=!1,s&&Re(t,e,i,d.pos),d.pos=e.length,l=null):l=Ue(He(n,d,i.state,h),o),h){var p=h[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!a||u!=l){for(;c<d.start;)r(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var f=Math.min(d.pos,c+5e3);r(f,u),c=f}}var Ge=function(t,e,n){this.text=t,It(this,e),this.height=n?n(this):1};function Ye(t){t.parent=null,Mt(t)}Ge.prototype.lineNo=function(){return dt(this)},ae(Ge);var Ve={},Xe={};function Ke(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Xe:Ve;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Je(t,e){var n=T("span",null,null,l?"padding-right: .1px":null),i={pre:T("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var o=r?e.rest[r-1]:e.line,s=void 0;i.pos=0,i.addToken=Qe,be(t.display.measure)&&(s=Zt(o,t.doc.direction))&&(i.addToken=tn(i.addToken,s)),i.map=[],nn(o,i,$e(t,o,e!=t.display.externalMeasured&&dt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(i.bgClass=j(o.styleClasses.bgClass,i.bgClass||"")),o.styleClasses.textClass&&(i.textClass=j(o.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(ve(t.display.measure))),0==r?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var a=i.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return ie(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=j(i.pre.className,i.textClass||"")),i}function Ze(t){var e=E("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Qe(t,e,n,i,r,o,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,i="",r=0;r<t.length;r++){var o=t.charAt(r);" "!=o||!n||r!=t.length-1&&32!=t.charCodeAt(r+1)||(o=" "),i+=o,n=" "==o}return i}(e,t.trailingSpace):e,d=t.cm.state.specialChars,h=!1;if(d.test(e)){c=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var f=d.exec(e),m=f?f.index-p:e.length-p;if(m){var g=document.createTextNode(u.slice(p,p+m));s&&a<9?c.appendChild(E("span",[g])):c.appendChild(g),t.map.push(t.pos,t.pos+m,g),t.col+=m,t.pos+=m}if(!f)break;p+=m+1;var v=void 0;if("\t"==f[0]){var b=t.cm.options.tabSize,y=b-t.col%b;(v=c.appendChild(E("span",V(y),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),t.col+=y}else"\r"==f[0]||"\n"==f[0]?((v=c.appendChild(E("span","\r"==f[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",f[0]),t.col+=1):((v=t.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),s&&a<9?c.appendChild(E("span",[v])):c.appendChild(v),t.col+=1);t.map.push(t.pos,t.pos+1,v),t.pos++}}else t.col+=e.length,c=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,c),s&&a<9&&(h=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),n||i||r||h||o){var x=n||"";i&&(x+=i),r&&(x+=r);var _=E("span",[c],x,o);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&_.setAttribute(w,l[w]);return t.content.appendChild(_)}t.content.appendChild(c)}}function tn(t,e){return function(n,i,r,o,s,a,l){r=r?r+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+i.length;;){for(var d=void 0,h=0;h<e.length&&!((d=e[h]).to>c&&d.from<=c);h++);if(d.to>=u)return t(n,i,r,o,s,a,l);t(n,i.slice(0,d.to-c),r,o,null,a,l),o=null,i=i.slice(d.to-c),c=d.to}}}function en(t,e,n,i){var r=!i&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!i&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function nn(t,e,n){var i=t.markedSpans,r=t.text,o=0;if(i)for(var s,a,l,c,u,d,h,p=r.length,f=0,m=1,g="",v=0;;){if(v==f){l=c=u=a="",h=null,d=null,v=1/0;for(var b=[],y=void 0,x=0;x<i.length;++x){var _=i[x],w=_.marker;if("bookmark"==w.type&&_.from==f&&w.widgetNode)b.push(w);else if(_.from<=f&&(null==_.to||_.to>f||w.collapsed&&_.to==f&&_.from==f)){if(null!=_.to&&_.to!=f&&v>_.to&&(v=_.to,c=""),w.className&&(l+=" "+w.className),w.css&&(a=(a?a+";":"")+w.css),w.startStyle&&_.from==f&&(u+=" "+w.startStyle),w.endStyle&&_.to==v&&(y||(y=[])).push(w.endStyle,_.to),w.title&&((h||(h={})).title=w.title),w.attributes)for(var C in w.attributes)(h||(h={}))[C]=w.attributes[C];w.collapsed&&(!d||Ot(d.marker,w)<0)&&(d=_)}else _.from>f&&v>_.from&&(v=_.from)}if(y)for(var k=0;k<y.length;k+=2)y[k+1]==v&&(c+=" "+y[k]);if(!d||d.from==f)for(var P=0;P<b.length;++P)en(e,0,b[P]);if(d&&(d.from||0)==f){if(en(e,(null==d.to?p+1:d.to)-f,d.marker,null==d.from),null==d.to)return;d.to==f&&(d=!1)}}if(f>=p)break;for(var S=Math.min(p,v);;){if(g){var D=f+g.length;if(!d){var L=D>S?g.slice(0,S-f):g;e.addToken(e,L,s?s+l:l,u,f+L.length==v?c:"",a,h)}if(D>=S){g=g.slice(S-f),f=S;break}f=D,u=""}g=r.slice(o,o=n[m++]),s=Ke(n[m++],e.cm.options)}}else for(var E=1;E<n.length;E+=2)e.addToken(e,r.slice(o,o=n[E]),Ke(n[E+1],e.cm.options))}function rn(t,e,n){this.line=e,this.rest=function(t){for(var e,n;e=Ft(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}(e),this.size=this.rest?dt(X(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ut(t,e)}function on(t,e,n){for(var i,r=[],o=e;o<n;o=i){var s=new rn(t.doc,at(t.doc,o),o);i=o+s.size,r.push(s)}return r}var sn=null;var an=null;function ln(t,e){var n=ee(t,e);if(n.length){var i,r=Array.prototype.slice.call(arguments,2);sn?i=sn.delayedCallbacks:an?i=an:(i=an=[],setTimeout(cn,0));for(var o=function(t){i.push(function(){return n[t].apply(null,r)})},s=0;s<n.length;++s)o(s)}}function cn(){var t=an;an=null;for(var e=0;e<t.length;++e)t[e]()}function un(t,e,n,i){for(var r=0;r<e.changes.length;r++){var o=e.changes[r];"text"==o?pn(t,e):"gutter"==o?mn(t,e,n,i):"class"==o?fn(t,e):"widget"==o&&gn(t,e,i)}e.changes=null}function dn(t){return t.node==t.text&&(t.node=E("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),s&&a<8&&(t.node.style.zIndex=2)),t.node}function hn(t,e){var n=t.display.externalMeasured;return n&&n.line==e.line?(t.display.externalMeasured=null,e.measure=n.measure,n.built):Je(t,e)}function pn(t,e){var n=e.text.className,i=hn(t,e);e.text==e.node&&(e.node=i.pre),e.text.parentNode.replaceChild(i.pre,e.text),e.text=i.pre,i.bgClass!=e.bgClass||i.textClass!=e.textClass?(e.bgClass=i.bgClass,e.textClass=i.textClass,fn(t,e)):n&&(e.text.className=n)}function fn(t,e){!function(t,e){var n=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),e.background)n?e.background.className=n:(e.background.parentNode.removeChild(e.background),e.background=null);else if(n){var i=dn(e);e.background=i.insertBefore(E("div",null,n),i.firstChild),t.display.input.setUneditable(e.background)}}(t,e),e.line.wrapClass?dn(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var n=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=n||""}function mn(t,e,n,i){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var r=dn(e);e.gutterBackground=E("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),r.insertBefore(e.gutterBackground,e.text)}var o=e.line.gutterMarkers;if(t.options.lineNumbers||o){var s=dn(e),a=e.gutter=E("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(t.display.input.setUneditable(a),s.insertBefore(a,e.text),e.line.gutterClass&&(a.className+=" "+e.line.gutterClass),!t.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(e.lineNumber=a.appendChild(E("div",ft(t.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<t.options.gutters.length;++l){var c=t.options.gutters[l],u=o.hasOwnProperty(c)&&o[c];u&&a.appendChild(E("div",[u],"CodeMirror-gutter-elt","left: "+i.gutterLeft[c]+"px; width: "+i.gutterWidth[c]+"px"))}}}function gn(t,e,n){e.alignable&&(e.alignable=null);for(var i=e.node.firstChild,r=void 0;i;i=r)r=i.nextSibling,"CodeMirror-linewidget"==i.className&&e.node.removeChild(i);bn(t,e,n)}function vn(t,e,n,i){var r=hn(t,e);return e.text=e.node=r.pre,r.bgClass&&(e.bgClass=r.bgClass),r.textClass&&(e.textClass=r.textClass),fn(t,e),mn(t,e,n,i),bn(t,e,i),e.node}function bn(t,e,n){if(yn(t,e.line,e,n,!0),e.rest)for(var i=0;i<e.rest.length;i++)yn(t,e.rest[i],e,n,!1)}function yn(t,e,n,i,r){if(e.widgets)for(var o=dn(n),s=0,a=e.widgets;s<a.length;++s){var l=a[s],c=E("div",[l.node],"CodeMirror-linewidget");l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),xn(l,c,n,i),t.display.input.setUneditable(c),r&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),ln(l,"redraw")}}function xn(t,e,n,i){if(t.noHScroll){(n.alignable||(n.alignable=[])).push(e);var r=i.wrapperWidth;e.style.left=i.fixedPos+"px",t.coverGutter||(r-=i.gutterTotalWidth,e.style.paddingLeft=i.gutterTotalWidth+"px"),e.style.width=r+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-i.gutterTotalWidth+"px"))}function _n(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!M(document.body,t.node)){var n="position: relative;";t.coverGutter&&(n+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(n+="width: "+e.display.wrapper.clientWidth+"px;"),L(e.display.measure,E("div",[t.node],null,n))}return t.height=t.node.parentNode.offsetHeight}function wn(t,e){for(var n=he(e);n!=t.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==t.sizer&&n!=t.mover)return!0}function Cn(t){return t.lineSpace.offsetTop}function kn(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Pn(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=L(t.measure,E("pre","x")),n=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,i={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(t.cachedPaddingH=i),i}function Sn(t){return H-t.display.nativeBarWidth}function Dn(t){return t.display.scroller.clientWidth-Sn(t)-t.display.barWidth}function Ln(t){return t.display.scroller.clientHeight-Sn(t)-t.display.barHeight}function En(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;i<t.rest.length;i++)if(t.rest[i]==e)return{map:t.measure.maps[i],cache:t.measure.caches[i]};for(var r=0;r<t.rest.length;r++)if(dt(t.rest[r])>n)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Tn(t,e,n,i){return An(t,In(t,e),n,i)}function Mn(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[li(t,e)];var n=t.display.externalMeasured;return n&&e>=n.lineN&&e<n.lineN+n.size?n:void 0}function In(t,e){var n=dt(e),i=Mn(t,n);i&&!i.text?i=null:i&&i.changes&&(un(t,i,n,ii(t)),t.curOp.forceUpdate=!0),i||(i=function(t,e){var n=dt(e=Ht(e)),i=t.display.externalMeasured=new rn(t.doc,e,n);i.lineN=n;var r=i.built=Je(t,i);return i.text=r.pre,L(t.display.lineMeasure,r.pre),i}(t,e));var r=En(i,e,n);return{line:e,view:i,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function An(t,e,n,i,r){e.before&&(n=-1);var o,l=n+(i||"");return e.cache.hasOwnProperty(l)?o=e.cache[l]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(!function(t,e,n){var i=t.options.lineWrapping,r=i&&Dn(t);if(!e.measure.heights||i&&e.measure.width!=r){var o=e.measure.heights=[];if(i){e.measure.width=r;for(var s=e.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],c=s[a+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,i){var r,o=Nn(e.map,n,i),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){for(;c&&rt(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&rt(e.line.text.charAt(o.coverStart+u));)++u;if((r=s&&a<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():$n(P(l,c,u).getClientRects(),i)).left||r.right||0==c)break;u=c,c-=1,d="right"}s&&a<11&&(r=function(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(t){if(null!=Ce)return Ce;var e=L(t,E("span","x")),n=e.getBoundingClientRect(),i=P(e,0,1).getBoundingClientRect();return Ce=Math.abs(n.left-i.left)>1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*i,bottom:e.bottom*i}}(t.display.measure,r))}else{var p;c>0&&(d=i="right"),r=t.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==i?p.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!c&&(!r||!r.left&&!r.right)){var f=l.parentNode.getClientRects()[0];r=f?{left:f.left,right:f.left+ni(t.display),top:f.top,bottom:f.bottom}:On}for(var m=r.top-e.rect.top,g=r.bottom-e.rect.top,v=(m+g)/2,b=e.view.measure.heights,y=0;y<b.length-1&&!(v<b[y]);y++);var x=y?b[y-1]:0,_=b[y],w={left:("right"==d?r.right:r.left)-e.rect.left,right:("left"==d?r.left:r.right)-e.rect.left,top:x,bottom:_};r.left||r.right||(w.bogus=!0);t.options.singleCursorHeightPerLine||(w.rtop=m,w.rbottom=g);return w}(t,e,n,i)).bogus||(e.cache[l]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}var jn,On={left:0,right:0,top:0,bottom:0};function Nn(t,e,n){for(var i,r,o,s,a,l,c=0;c<t.length;c+=3)if(a=t[c],l=t[c+1],e<a?(r=0,o=1,s="left"):e<l?o=(r=e-a)+1:(c==t.length-3||e==l&&t[c+3]>e)&&(r=(o=l-a)-1,e>=l&&(s="right")),null!=r){if(i=t[c+2],a==l&&n==(i.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)i=t[2+(c-=3)],s="left";if("right"==n&&r==l-a)for(;c<t.length-3&&t[c+3]==t[c+4]&&!t[c+5].insertLeft;)i=t[(c+=3)+2],s="right";break}return{node:i,start:r,end:o,collapse:s,coverStart:a,coverEnd:l}}function $n(t,e){var n=On;if("left"==e)for(var i=0;i<t.length&&(n=t[i]).left==n.right;i++);else for(var r=t.length-1;r>=0&&(n=t[r]).left==n.right;r--);return n}function Fn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function Rn(t){t.display.externalMeasure=null,D(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)Fn(t.display.view[e])}function zn(t){Rn(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function Hn(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Wn(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Bn(t){var e=0;if(t.widgets)for(var n=0;n<t.widgets.length;++n)t.widgets[n].above&&(e+=_n(t.widgets[n]));return e}function Un(t,e,n,i,r){if(!r){var o=Bn(e);n.top+=o,n.bottom+=o}if("line"==i)return n;i||(i="local");var s=Gt(e);if("local"==i?s+=Cn(t.display):s-=t.display.viewOffset,"page"==i||"window"==i){var a=t.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==i?0:Wn());var l=a.left+("window"==i?0:Hn());n.left+=l,n.right+=l}return n.top+=s,n.bottom+=s,n}function qn(t,e,n){if("div"==n)return e;var i=e.left,r=e.top;if("page"==n)i-=Hn(),r-=Wn();else if("local"==n||!n){var o=t.display.sizer.getBoundingClientRect();i+=o.left,r+=o.top}var s=t.display.lineSpace.getBoundingClientRect();return{left:i-s.left,top:r-s.top}}function Gn(t,e,n,i,r){return i||(i=at(t.doc,e.line)),Un(t,i,Tn(t,i,e.ch,r),n)}function Yn(t,e,n,i,r,o){function s(e,s){var a=An(t,r,e,s?"right":"left",o);return s?a.left=a.right:a.right=a.left,Un(t,i,a,n)}i=i||at(t.doc,e.line),r||(r=In(t,i));var a=Zt(i,t.doc.direction),l=e.ch,c=e.sticky;if(l>=i.text.length?(l=i.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return s("before"==c?l-1:l,"before"==c);function u(t,e,n){var i=1==a[e].level;return s(n?t-1:t,i!=n)}var d=Kt(a,l,c),h=Xt,p=u(l,d,"before"==c);return null!=h&&(p.other=u(l,h,"before"!=c)),p}function Vn(t,e){var n=0;e=wt(t.doc,e),t.options.lineWrapping||(n=ni(t.display)*e.ch);var i=at(t.doc,e.line),r=Gt(i)+Cn(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function Xn(t,e,n,i,r){var o=mt(t,e,n);return o.xRel=r,i&&(o.outside=!0),o}function Kn(t,e,n){var i=t.doc;if((n+=t.display.viewOffset)<0)return Xn(i.first,0,null,!0,-1);var r=ht(i,n),o=i.first+i.size-1;if(r>o)return Xn(i.first+i.size-1,at(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=at(i,r);;){var a=ti(t,s,r,e,n),l=Rt(s,a.ch+(a.xRel>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==r)return c;s=at(i,r=c.line)}}function Jn(t,e,n,i){i-=Bn(e);var r=e.text.length,o=st(function(e){return An(t,n,e-1).bottom<=i},r,0);return{begin:o,end:r=st(function(e){return An(t,n,e).top>i},o,r)}}function Zn(t,e,n,i){return n||(n=In(t,e)),Jn(t,e,n,Un(t,e,An(t,n,i),"line").top)}function Qn(t,e,n,i){return!(t.bottom<=n)&&(t.top>n||(i?t.left:t.right)>e)}function ti(t,e,n,i,r){r-=Gt(e);var o=In(t,e),s=Bn(e),a=0,l=e.text.length,c=!0,u=Zt(e,t.doc.direction);if(u){var d=(t.options.lineWrapping?function(t,e,n,i,r,o,s){var a=Jn(t,e,i,s),l=a.begin,c=a.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h<r.length;h++){var p=r[h];if(!(p.from>=c||p.to<=l)){var f=1!=p.level,m=An(t,i,f?Math.min(c,p.to)-1:Math.max(l,p.from)).right,g=m<o?o-m+1e9:m-o;(!u||d>g)&&(u=p,d=g)}}u||(u=r[r.length-1]);u.from<l&&(u={from:l,to:u.to,level:u.level});u.to>c&&(u={from:u.from,to:c,level:u.level});return u}:function(t,e,n,i,r,o,s){var a=st(function(a){var l=r[a],c=1!=l.level;return Qn(Yn(t,mt(n,c?l.to:l.from,c?"before":"after"),"line",e,i),o,s,!0)},0,r.length-1),l=r[a];if(a>0){var c=1!=l.level,u=Yn(t,mt(n,c?l.from:l.to,c?"after":"before"),"line",e,i);Qn(u,o,s,!0)&&u.top>s&&(l=r[a-1])}return l})(t,e,n,o,u,i,r);a=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var h,p,f=null,m=null,g=st(function(e){var n=An(t,o,e);return n.top+=s,n.bottom+=s,!!Qn(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(f=e,m=n),!0)},a,l),v=!1;if(m){var b=i-m.left<m.right-i,y=b==c;g=f+(y?0:1),p=y?"after":"before",h=b?m.left:m.right}else{c||g!=l&&g!=a||g++,p=0==g?"after":g==e.text.length?"before":An(t,o,g-(c?1:0)).bottom+s<=r==c?"after":"before";var x=Yn(t,mt(n,g,p),"line",e,o);h=x.left,v=r<x.top||r>=x.bottom}return Xn(n,g=ot(e.text,g,1),p,v,i-h)}function ei(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==jn){jn=E("pre");for(var e=0;e<49;++e)jn.appendChild(document.createTextNode("x")),jn.appendChild(E("br"));jn.appendChild(document.createTextNode("x"))}L(t.measure,jn);var n=jn.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),D(t.measure),n||1}function ni(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=E("span","xxxxxxxxxx"),n=E("pre",[e]);L(t.measure,n);var i=e.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function ii(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,o=e.gutters.firstChild,s=0;o;o=o.nextSibling,++s)n[t.options.gutters[s]]=o.offsetLeft+o.clientLeft+r,i[t.options.gutters[s]]=o.clientWidth;return{fixedPos:ri(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function ri(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function oi(t){var e=ei(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/ni(t.display)-3);return function(r){if(Ut(t.doc,r))return 0;var o=0;if(r.widgets)for(var s=0;s<r.widgets.length;s++)r.widgets[s].height&&(o+=r.widgets[s].height);return n?o+(Math.ceil(r.text.length/i)||1)*e:o+e}}function si(t){var e=t.doc,n=oi(t);e.iter(function(t){var e=n(t);e!=t.height&&ut(t,e)})}function ai(t,e,n,i){var r=t.display;if(!n&&"true"==he(e).getAttribute("cm-not-content"))return null;var o,s,a=r.lineSpace.getBoundingClientRect();try{o=e.clientX-a.left,s=e.clientY-a.top}catch(e){return null}var l,c=Kn(t,o,s);if(i&&1==c.xRel&&(l=at(t.doc,c.line).text).length==c.ch){var u=F(l,l.length,t.options.tabSize)-l.length;c=mt(c.line,Math.max(0,Math.round((o-Pn(t.display).left)/ni(t.display))-u))}return c}function li(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,i=0;i<n.length;i++)if((e-=n[i].size)<0)return i}function ci(t){t.display.input.showSelection(t.display.input.prepareSelection())}function ui(t,e){void 0===e&&(e=!0);for(var n=t.doc,i={},r=i.cursors=document.createDocumentFragment(),o=i.selection=document.createDocumentFragment(),s=0;s<n.sel.ranges.length;s++)if(e||s!=n.sel.primIndex){var a=n.sel.ranges[s];if(!(a.from().line>=t.display.viewTo||a.to().line<t.display.viewFrom)){var l=a.empty();(l||t.options.showCursorWhenSelecting)&&di(t,a.head,r),l||pi(t,a,o)}}return i}function di(t,e,n){var i=Yn(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),r=n.appendChild(E("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)*t.options.cursorHeight+"px",i.other){var o=n.appendChild(E("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 hi(t,e){return t.top-e.top||t.left-e.left}function pi(t,e,n){var i=t.display,r=t.doc,o=document.createDocumentFragment(),s=Pn(t.display),a=s.left,l=Math.max(i.sizerWidth,Dn(t)-i.sizer.offsetLeft)-s.right,c="ltr"==r.direction;function u(t,e,n,i){e<0&&(e=0),e=Math.round(e),i=Math.round(i),o.appendChild(E("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==n?l-t:n)+"px;\n height: "+(i-e)+"px"))}function d(e,n,i){var o,s,d=at(r,e),h=d.text.length;function p(n,i){return Gn(t,mt(e,n),"div",d,i)}function f(e,n,i){var r=Zn(t,d,null,e),o="ltr"==n==("after"==i)?"left":"right";return p("after"==i?r.begin:r.end-(/\s/.test(d.text.charAt(r.end-1))?2:1),o)[o]}var m=Zt(d,r.direction);return function(t,e,n,i){if(!t)return i(e,n,"ltr",0);for(var r=!1,o=0;o<t.length;++o){var s=t[o];(s.from<n&&s.to>e||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr",o),r=!0)}r||i(e,n,"ltr")}(m,n||0,null==i?h:i,function(t,e,r,d){var g="ltr"==r,v=p(t,g?"left":"right"),b=p(e-1,g?"right":"left"),y=null==n&&0==t,x=null==i&&e==h,_=0==d,w=!m||d==m.length-1;if(b.top-v.top<=3){var C=(c?x:y)&&w,k=(c?y:x)&&_?a:(g?v:b).left,P=C?l:(g?b:v).right;u(k,v.top,P-k,v.bottom)}else{var S,D,L,E;g?(S=c&&y&&_?a:v.left,D=c?l:f(t,r,"before"),L=c?a:f(e,r,"after"),E=c&&x&&w?l:b.right):(S=c?f(t,r,"before"):a,D=!c&&y&&_?l:v.right,L=!c&&x&&w?a:b.left,E=c?f(e,r,"after"):l),u(S,v.top,D-S,v.bottom),v.bottom<b.top&&u(a,v.bottom,null,b.top),u(L,b.top,E-L,b.bottom)}(!o||hi(v,o)<0)&&(o=v),hi(b,o)<0&&(o=b),(!s||hi(v,s)<0)&&(s=v),hi(b,s)<0&&(s=b)}),{start:o,end:s}}var h=e.from(),p=e.to();if(h.line==p.line)d(h.line,h.ch,p.ch);else{var f=at(r,h.line),m=at(r,p.line),g=Ht(f)==Ht(m),v=d(h.line,h.ch,g?f.text.length+1:null).end,b=d(p.line,g?0:null,p.ch).start;g&&(v.top<b.top-2?(u(v.right,v.top,null,v.bottom),u(a,b.top,b.left,b.bottom)):u(v.right,v.top,b.left-v.right,v.bottom)),v.bottom<b.top&&u(a,v.bottom,null,b.top)}n.appendChild(o)}function fi(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var n=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function mi(t){t.state.focused||(t.display.input.focus(),vi(t))}function gi(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,bi(t))},100)}function vi(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(ie(t,"focus",t,e),t.state.focused=!0,A(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),fi(t))}function bi(t,e){t.state.delayingBlurEvent||(t.state.focused&&(ie(t,"blur",t,e),t.state.focused=!1,S(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function yi(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i<e.view.length;i++){var r=e.view[i],o=t.options.lineWrapping,l=void 0,c=0;if(!r.hidden){if(s&&a<8){var u=r.node.offsetTop+r.node.offsetHeight;l=u-n,n=u}else{var d=r.node.getBoundingClientRect();l=d.bottom-d.top,!o&&r.text.firstChild&&(c=r.text.firstChild.getBoundingClientRect().right-d.left-1)}var h=r.line.height-l;if((h>.005||h<-.005)&&(ut(r.line,l),xi(r.line),r.rest))for(var p=0;p<r.rest.length;p++)xi(r.rest[p]);if(c>t.display.sizerWidth){var f=Math.ceil(c/ni(t.display));f>t.display.maxLineLength&&(t.display.maxLineLength=f,t.display.maxLine=r.line,t.display.maxLineChanged=!0)}}}}function xi(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var n=t.widgets[e],i=n.node.parentNode;i&&(n.height=i.offsetHeight)}}function _i(t,e,n){var i=n&&null!=n.top?Math.max(0,n.top):t.scroller.scrollTop;i=Math.floor(i-Cn(t));var r=n&&null!=n.bottom?n.bottom:i+t.wrapper.clientHeight,o=ht(e,i),s=ht(e,r);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;a<o?(o=a,s=ht(e,Gt(at(e,a))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=s&&(o=ht(e,Gt(at(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function wi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=ri(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s<n.length;s++)if(!n[s].hidden){t.options.fixedGutter&&(n[s].gutter&&(n[s].gutter.style.left=o),n[s].gutterBackground&&(n[s].gutterBackground.style.left=o));var a=n[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}t.options.fixedGutter&&(e.gutters.style.left=i+r+"px")}}function Ci(t){if(!t.options.lineNumbers)return!1;var e=t.doc,n=ft(t.options,e.first+e.size-1),i=t.display;if(n.length!=i.lineNumChars){var r=i.measure.appendChild(E("div",[E("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=r.firstChild.offsetWidth,s=r.offsetWidth-o;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(o,i.lineGutter.offsetWidth-s)+1,i.lineNumWidth=i.lineNumInnerWidth+s,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",lr(t),!0}return!1}function ki(t,e){var n=t.display,i=ei(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ln(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+kn(n),l=e.top<i,c=e.bottom>a-i;if(e.top<r)s.scrollTop=l?0:e.top;else if(e.bottom>r+o){var u=Math.min(e.top,(c?a:e.bottom)-o);u!=r&&(s.scrollTop=u)}var d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft,h=Dn(t)-(t.options.fixedGutter?n.gutters.offsetWidth:0),p=e.right-e.left>h;return p&&(e.right=e.left+h),e.left<10?s.scrollLeft=0:e.left<d?s.scrollLeft=Math.max(0,e.left-(p?0:10)):e.right>h+d-3&&(s.scrollLeft=e.right+(p?0:10)-h),s}function Pi(t,e){null!=e&&(Li(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Si(t){Li(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Di(t,e,n){null==e&&null==n||Li(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Li(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Ei(t,Vn(t,e.from),Vn(t,e.to),e.margin))}function Ei(t,e,n,i){var r=ki(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-i,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+i});Di(t,r.scrollLeft,r.scrollTop)}function Ti(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||ar(t,{top:e}),Mi(t,e,!0),n&&ar(t),nr(t,100))}function Mi(t,e,n){e=Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Ii(t,e,n,i){e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!i||(t.doc.scrollLeft=e,wi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Ai(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+kn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Sn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var ji=function(t,e,n){this.cm=n;var i=this.vert=E("div",[E("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=E("div",[E("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=r.tabIndex=-1,t(i),t(r),te(i,"scroll",function(){i.clientHeight&&e(i.scrollTop,"vertical")}),te(r,"scroll",function(){r.clientWidth&&e(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,s&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ji.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var r=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:e?i:0}},ji.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ji.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ji.prototype.zeroWidthHack=function(){var t=b&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},ji.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)})},ji.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Oi=function(){};function Ni(t,e){e||(e=Ai(t));var n=t.display.barWidth,i=t.display.barHeight;$i(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&yi(t),$i(t,Ai(t)),n=t.display.barWidth,i=t.display.barHeight}function $i(t,e){var n=t.display,i=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",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&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Oi.prototype.update=function(){return{bottom:0,right:0}},Oi.prototype.setScrollLeft=function(){},Oi.prototype.setScrollTop=function(){},Oi.prototype.clear=function(){};var Fi={native:ji,null:Oi};function Ri(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&S(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Fi[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),te(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?Ii(t,e):Ti(t,e)},t),t.display.scrollbars.addClass&&A(t.display.wrapper,t.display.scrollbars.addClass)}var zi=0;function Hi(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++zi},e=t.curOp,sn?sn.ops.push(e):e.ownsGroup=sn={ops:[e],delayedCallbacks:[]}}function Wi(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n<e.length;n++)e[n].call(null);for(var i=0;i<t.ops.length;i++){var r=t.ops[i];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(n<e.length)}(n)}finally{sn=null,e(n)}}(e,function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;!function(t){for(var e=t.ops,n=0;n<e.length;n++)Bi(e[n]);for(var i=0;i<e.length;i++)(r=e[i]).updatedDisplay=r.mustUpdate&&or(r.cm,r.update);var r;for(var o=0;o<e.length;o++)Ui(e[o]);for(var s=0;s<e.length;s++)qi(e[s]);for(var a=0;a<e.length;a++)Gi(e[a])}(t)})}function Bi(t){var e=t.cm,n=e.display;!function(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=Sn(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=Sn(t)+"px",e.scrollbarsClipped=!0)}(e),t.updateMaxLine&&Vt(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<n.viewFrom||t.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new rr(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Ui(t){var e=t.cm,n=e.display;t.updatedDisplay&&yi(e),t.barMeasure=Ai(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Tn(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Sn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Dn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function qi(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&Ii(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var n=t.focus&&t.focus==I();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,n),(t.updatedDisplay||t.startHeight!=e.doc.height)&&Ni(e,t.barMeasure),t.updatedDisplay&&cr(e,t.barMeasure),t.selectionChanged&&fi(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),n&&mi(t.cm)}function Gi(t){var e=t.cm,n=e.display,i=e.doc;(t.updatedDisplay&&sr(e,t.update),null==n.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=t.scrollTop&&Mi(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&Ii(e,t.scrollLeft,!0,!0),t.scrollToPos)&&function(t,e){if(!re(t,"scrollCursorIntoView")){var n=t.display,i=n.sizer.getBoundingClientRect(),r=null;if(e.top+i.top<0?r=!0:e.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!f){var o=E("div","",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Cn(t.display))+"px;\n height: "+(e.bottom-e.top+Sn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,n,i){var r;null==i&&(i=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?mt(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?mt(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=Yn(t,e),l=n&&n!=e?Yn(t,n):a,c=ki(t,r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i}),u=t.doc.scrollTop,d=t.doc.scrollLeft;if(null!=c.scrollTop&&(Ti(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Ii(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-d)>1&&(s=!0)),!s)break}return r}(e,wt(i,t.scrollToPos.from),wt(i,t.scrollToPos.to),t.scrollToPos.margin));var r=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(r)for(var s=0;s<r.length;++s)r[s].lines.length||ie(r[s],"hide");if(o)for(var a=0;a<o.length;++a)o[a].lines.length&&ie(o[a],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&ie(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function Yi(t,e){if(t.curOp)return e();Hi(t);try{return e()}finally{Wi(t)}}function Vi(t,e){return function(){if(t.curOp)return e.apply(t,arguments);Hi(t);try{return e.apply(t,arguments)}finally{Wi(t)}}}function Xi(t){return function(){if(this.curOp)return t.apply(this,arguments);Hi(this);try{return t.apply(this,arguments)}finally{Wi(this)}}}function Ki(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Hi(e);try{return t.apply(this,arguments)}finally{Wi(e)}}}function Ji(t,e,n,i){null==e&&(e=t.doc.first),null==n&&(n=t.doc.first+t.doc.size),i||(i=0);var r=t.display;if(i&&n<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>e)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Pt&&Wt(t.doc,e)<r.viewTo&&Qi(t);else if(n<=r.viewFrom)Pt&&Bt(t.doc,n+i)>r.viewFrom?Qi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)Qi(t);else if(e<=r.viewFrom){var o=tr(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):Qi(t)}else if(n>=r.viewTo){var s=tr(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):Qi(t)}else{var a=tr(t,e,e,-1),l=tr(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(on(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):Qi(t)}var c=r.externalMeasured;c&&(n<c.lineN?c.lineN+=i:e<c.lineN+c.size&&(r.externalMeasured=null))}function Zi(t,e,n){t.curOp.viewChanged=!0;var i=t.display,r=t.display.externalMeasured;if(r&&e>=r.lineN&&e<r.lineN+r.size&&(i.externalMeasured=null),!(e<i.viewFrom||e>=i.viewTo)){var o=i.view[li(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==z(s,n)&&s.push(n)}}}function Qi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function tr(t,e,n,i){var r,o=li(t,e),s=t.display.view;if(!Pt||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var a=t.display.viewFrom,l=0;l<o;l++)a+=s[l].size;if(a!=e){if(i>0){if(o==s.length-1)return null;r=a+s[o].size-e,o++}else r=a-e;e+=r,n+=r}for(;Wt(t.doc,n)!=n;){if(o==(i<0?0:s.length-1))return null;n+=i*s[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function er(t){for(var e=t.display.view,n=0,i=0;i<e.length;i++){var r=e[i];r.hidden||r.node&&!r.changes||++n}return n}function nr(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,N(ir,t))}function ir(t){var e=t.doc;if(!(e.highlightFrontier>=t.display.viewTo)){var n=+new Date+t.options.workTime,i=Fe(t,e.highlightFrontier),r=[];e.iter(i.line,Math.min(e.first+e.size,t.display.viewTo+500),function(o){if(i.line>=t.display.viewFrom){var s=o.styles,a=o.text.length>t.options.maxHighlightLength?Te(e.mode,i.state):null,l=Ne(t,o,i,!0);a&&(i.state=a),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&h<s.length;++h)d=s[h]!=o.styles[h];d&&r.push(i.line),o.stateAfter=i.save(),i.nextLine()}else o.text.length<=t.options.maxHighlightLength&&Re(t,o.text,i),o.stateAfter=i.line%5==0?i.save():null,i.nextLine();if(+new Date>n)return nr(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&Yi(t,function(){for(var e=0;e<r.length;e++)Zi(t,r[e],"text")})}}var rr=function(t,e,n){var i=t.display;this.viewport=e,this.visible=_i(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=Dn(t),this.force=n,this.dims=ii(t),this.events=[]};function or(t,e){var n=t.display,i=t.doc;if(e.editorIsHidden)return Qi(t),!1;if(!e.force&&e.visible.from>=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==er(t))return!1;Ci(t)&&(Qi(t),e.dims=ii(t));var r=i.first+i.size,o=Math.max(e.visible.from-t.options.viewportMargin,i.first),s=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(i.first,n.viewFrom)),n.viewTo>s&&n.viewTo-s<20&&(s=Math.min(r,n.viewTo)),Pt&&(o=Wt(t.doc,o),s=Bt(t.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=on(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=on(t,e,i.viewFrom).concat(i.view):i.viewFrom<e&&(i.view=i.view.slice(li(t,e))),i.viewFrom=e,i.viewTo<n?i.view=i.view.concat(on(t,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,li(t,n)))),i.viewTo=n}(t,o,s),n.viewOffset=Gt(at(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=er(t);if(!a&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=I();if(!e||!M(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&M(t.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var i=t.display,r=t.options.lineNumbers,o=i.lineDiv,s=o.firstChild;function a(e){var n=e.nextSibling;return l&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=i.view,u=i.viewFrom,d=0;d<c.length;d++){var h=c[d];if(h.hidden);else if(h.node&&h.node.parentNode==o){for(;s!=h.node;)s=a(s);var p=r&&null!=e&&e<=u&&h.lineNumber;h.changes&&(z(h.changes,"gutter")>-1&&(p=!1),un(t,h,u,n)),p&&(D(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(ft(t.options,u)))),s=h.node.nextSibling}else{var f=vn(t,h,u,n);o.insertBefore(f,s)}u+=h.size}for(;s;)s=a(s)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=I()&&(t.activeElt.focus(),t.anchorNode&&M(document.body,t.anchorNode)&&M(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),D(n.cursorDiv),D(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,nr(t,400)),n.updateLineNumbers=null,!0}function sr(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=Dn(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+kn(t.display)-Ln(t),n.top)}),e.visible=_i(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&or(t,e);i=!1){yi(t);var r=Ai(t);ci(t),Ni(t,r),cr(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function ar(t,e){var n=new rr(t,e);if(or(t,n)){yi(t),sr(t,n);var i=Ai(t);ci(t),Ni(t,i),cr(t,i),n.finish()}}function lr(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function cr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Sn(t)+"px"}function ur(t){var e=t.display.gutters,n=t.options.gutters;D(e);for(var i=0;i<n.length;++i){var r=n[i],o=e.appendChild(E("div",null,"CodeMirror-gutter "+r));"CodeMirror-linenumbers"==r&&(t.display.lineGutter=o,o.style.width=(t.display.lineNumWidth||1)+"px")}e.style.display=i?"":"none",lr(t)}function dr(t){var e=z(t.gutters,"CodeMirror-linenumbers");-1==e&&t.lineNumbers?t.gutters=t.gutters.concat(["CodeMirror-linenumbers"]):e>-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}rr.prototype.signal=function(t,e){se(t,e)&&this.events.push(arguments)},rr.prototype.finish=function(){for(var t=0;t<this.events.length;t++)ie.apply(null,this.events[t])};var hr=0,pr=null;function fr(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function mr(t){var e=fr(t);return e.x*=pr,e.y*=pr,e}function gr(t,e){var i=fr(e),r=i.x,o=i.y,s=t.display,a=s.scroller,c=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&c||o&&u){if(o&&b&&l)t:for(var h=e.target,p=s.view;h!=a;h=h.parentNode)for(var f=0;f<p.length;f++)if(p[f].node==h){t.display.currentWheelTarget=h;break t}if(r&&!n&&!d&&null!=pr)return o&&u&&Ti(t,Math.max(0,a.scrollTop+o*pr)),Ii(t,Math.max(0,a.scrollLeft+r*pr)),(!o||o&&u)&&le(e),void(s.wheelStartX=null);if(o&&null!=pr){var m=o*pr,g=t.doc.scrollTop,v=g+s.wrapper.clientHeight;m<0?g=Math.max(0,g+m-50):v=Math.min(t.doc.height,v+m+50),ar(t,{top:g,bottom:v})}hr<20&&(null==s.wheelStartX?(s.wheelStartX=a.scrollLeft,s.wheelStartY=a.scrollTop,s.wheelDX=r,s.wheelDY=o,setTimeout(function(){if(null!=s.wheelStartX){var t=a.scrollLeft-s.wheelStartX,e=a.scrollTop-s.wheelStartY,n=e&&s.wheelDY&&e/s.wheelDY||t&&s.wheelDX&&t/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(pr=(pr*hr+n)/(hr+1),++hr)}},200)):(s.wheelDX+=r,s.wheelDY+=o))}}s?pr=-.53:n?pr=15:u?pr=-.7:h&&(pr=-1/3);var vr=function(t,e){this.ranges=t,this.primIndex=e};vr.prototype.primary=function(){return this.ranges[this.primIndex]},vr.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var e=0;e<this.ranges.length;e++){var n=this.ranges[e],i=t.ranges[e];if(!vt(n.anchor,i.anchor)||!vt(n.head,i.head))return!1}return!0},vr.prototype.deepCopy=function(){for(var t=[],e=0;e<this.ranges.length;e++)t[e]=new br(bt(this.ranges[e].anchor),bt(this.ranges[e].head));return new vr(t,this.primIndex)},vr.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},vr.prototype.contains=function(t,e){e||(e=t);for(var n=0;n<this.ranges.length;n++){var i=this.ranges[n];if(gt(e,i.from())>=0&&gt(t,i.to())<=0)return n}return-1};var br=function(t,e){this.anchor=t,this.head=e};function yr(t,e,n){var i=t&&t.options.selectionsMayTouch,r=e[n];e.sort(function(t,e){return gt(t.from(),e.from())}),n=z(e,r);for(var o=1;o<e.length;o++){var s=e[o],a=e[o-1],l=gt(a.to(),s.from());if(i&&!s.empty()?l>0:l>=0){var c=xt(a.from(),s.from()),u=yt(a.to(),s.to()),d=a.empty()?s.from()==s.head:a.from()==a.head;o<=n&&--n,e.splice(--o,2,new br(d?u:c,d?c:u))}}return new vr(e,n)}function xr(t,e){return new vr([new br(t,e||t)],0)}function _r(t){return t.text?mt(t.from.line+t.text.length-1,X(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function wr(t,e){if(gt(t,e.from)<0)return t;if(gt(t,e.to)<=0)return _r(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=_r(e).ch-e.to.ch),mt(n,i)}function Cr(t,e){for(var n=[],i=0;i<t.sel.ranges.length;i++){var r=t.sel.ranges[i];n.push(new br(wr(r.anchor,e),wr(r.head,e)))}return yr(t.cm,n,t.sel.primIndex)}function kr(t,e,n){return t.line==e.line?mt(n.line,t.ch-e.ch+n.ch):mt(n.line+(t.line-e.line),t.ch)}function Pr(t){t.doc.mode=De(t.options,t.doc.modeOption),Sr(t)}function Sr(t){t.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,nr(t,100),t.state.modeGen++,t.curOp&&Ji(t)}function Dr(t,e){return 0==e.from.ch&&0==e.to.ch&&""==X(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function Lr(t,e,n,i){function r(t){return n?n[t]:null}function o(t,n,r){!function(t,e,n,i){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Mt(t),It(t,n);var r=i?i(t):1;r!=t.height&&ut(t,r)}(t,n,r,i),ln(t,"change",t,e)}function s(t,e){for(var n=[],o=t;o<e;++o)n.push(new Ge(c[o],r(o),i));return n}var a=e.from,l=e.to,c=e.text,u=at(t,a.line),d=at(t,l.line),h=X(c),p=r(c.length-1),f=l.line-a.line;if(e.full)t.insert(0,s(0,c.length)),t.remove(c.length,t.size-c.length);else if(Dr(t,e)){var m=s(0,c.length-1);o(d,d.text,p),f&&t.remove(a.line,f),m.length&&t.insert(a.line,m)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,a.ch)+h+u.text.slice(l.ch),p);else{var g=s(1,c.length-1);g.push(new Ge(h+u.text.slice(l.ch),p,i)),o(u,u.text.slice(0,a.ch)+c[0],r(0)),t.insert(a.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,a.ch)+c[0]+d.text.slice(l.ch),r(0)),t.remove(a.line+1,f);else{o(u,u.text.slice(0,a.ch)+c[0],r(0)),o(d,h+d.text.slice(l.ch),p);var v=s(1,c.length-1);f>1&&t.remove(a.line+1,f-1),t.insert(a.line+1,v)}ln(t,"change",t,e)}function Er(t,e,n){!function t(i,r,o){if(i.linked)for(var s=0;s<i.linked.length;++s){var a=i.linked[s];if(a.doc!=r){var l=o&&a.sharedHist;n&&!l||(e(a.doc,l),t(a.doc,i,l))}}}(t,null,!0)}function Tr(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,si(t),Pr(t),Mr(t),t.options.lineWrapping||Vt(t),t.options.mode=e.modeOption,Ji(t)}function Mr(t){("rtl"==t.doc.direction?A:S)(t.display.lineDiv,"CodeMirror-rtl")}function Ir(t){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=t||1}function Ar(t,e){var n={from:bt(e.from),to:_r(e),text:lt(t,e.from,e.to)};return Fr(t,n,e.from.line,e.to.line+1),Er(t,function(t){return Fr(t,n,e.from.line,e.to.line+1)},!0),n}function jr(t){for(;t.length;){if(!X(t).ranges)break;t.pop()}}function Or(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>a-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(jr(t.done),X(t.done)):t.done.length&&!X(t.done).ranges?X(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),X(t.done)):void 0}(r,r.lastOp==i)))s=X(o.changes),0==gt(e.from,e.to)&&0==gt(e.from,s.to)?s.to=_r(e):o.changes.push(Ar(t,e));else{var l=X(r.done);for(l&&l.ranges||$r(t.sel,r.done),o={changes:[Ar(t,e)],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=e.origin,s||ie(t,"historyAdded")}function Nr(t,e,n,i){var r=t.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||function(t,e,n,i){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,X(r.done),e))?r.done[r.done.length-1]=e:$r(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&jr(r.undone)}function $r(t,e){var n=X(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Fr(t,e,n,i){var r=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,i),function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[o]=n.markedSpans),++o})}function Rr(t){if(!t)return null;for(var e,n=0;n<t.length;++n)t[n].marker.explicitlyCleared?e||(e=t.slice(0,n)):e&&e.push(t[n]);return e?e.length?e:null:t}function zr(t,e){var n=function(t,e){var n=e["spans_"+t.id];if(!n)return null;for(var i=[],r=0;r<e.text.length;++r)i.push(Rr(n[r]));return i}(t,e),i=Et(t,e);if(!n)return i;if(!i)return n;for(var r=0;r<n.length;++r){var o=n[r],s=i[r];if(o&&s)t:for(var a=0;a<s.length;++a){for(var l=s[a],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue t;o.push(l)}else s&&(n[r]=s)}return n}function Hr(t,e,n){for(var i=[],r=0;r<t.length;++r){var o=t[r];if(o.ranges)i.push(n?vr.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];i.push({changes:a});for(var l=0;l<s.length;++l){var c=s[l],u=void 0;if(a.push({from:c.from,to:c.to,text:c.text}),e)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&z(e,Number(u[1]))>-1&&(X(a)[d]=c[d],delete c[d])}}}return i}function Wr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=gt(e,r)<0;o!=gt(n,r)<0?(r=e,e=n):o!=gt(e,n)<0&&(e=n)}return new br(r,e)}return new br(n||e,e)}function Br(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Vr(t,new vr([Wr(t.sel.primary(),e,n,r)],0),i)}function Ur(t,e,n){for(var i=[],r=t.cm&&(t.cm.display.shift||t.extend),o=0;o<t.sel.ranges.length;o++)i[o]=Wr(t.sel.ranges[o],e[o],null,r);Vr(t,yr(t.cm,i,t.sel.primIndex),n)}function qr(t,e,n,i){var r=t.sel.ranges.slice(0);r[e]=n,Vr(t,yr(t.cm,r,t.sel.primIndex),i)}function Gr(t,e,n,i){Vr(t,xr(e,n),i)}function Yr(t,e,n){var i=t.history.done,r=X(i);r&&r.ranges?(i[i.length-1]=e,Xr(t,e,n)):Vr(t,e,n)}function Vr(t,e,n){Xr(t,e,n),Nr(t,t.sel,t.cm?t.cm.curOp.id:NaN,n)}function Xr(t,e,n){(se(t,"beforeSelectionChange")||t.cm&&se(t.cm,"beforeSelectionChange"))&&(e=function(t,e,n){var i={ranges:e.ranges,update:function(e){this.ranges=[];for(var n=0;n<e.length;n++)this.ranges[n]=new br(wt(t,e[n].anchor),wt(t,e[n].head))},origin:n&&n.origin};return ie(t,"beforeSelectionChange",t,i),t.cm&&ie(t.cm,"beforeSelectionChange",t.cm,i),i.ranges!=e.ranges?yr(t.cm,i.ranges,i.ranges.length-1):e}(t,e,n)),Kr(t,Zr(t,e,n&&n.bias||(gt(e.primary().head,t.sel.primary().head)<0?-1:1),!0)),n&&!1===n.scroll||!t.cm||Si(t.cm)}function Kr(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,oe(t.cm)),ln(t,"cursorActivity",t))}function Jr(t){Kr(t,Zr(t,t.sel,null,!1))}function Zr(t,e,n,i){for(var r,o=0;o<e.ranges.length;o++){var s=e.ranges[o],a=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[o],l=to(t,s.anchor,a&&a.anchor,n,i),c=to(t,s.head,a&&a.head,n,i);(r||l!=s.anchor||c!=s.head)&&(r||(r=e.ranges.slice(0,o)),r[o]=new br(l,c))}return r?yr(t.cm,r,e.primIndex):e}function Qr(t,e,n,i,r){var o=at(t,e.line);if(o.markedSpans)for(var s=0;s<o.markedSpans.length;++s){var a=o.markedSpans[s],l=a.marker;if((null==a.from||(l.inclusiveLeft?a.from<=e.ch:a.from<e.ch))&&(null==a.to||(l.inclusiveRight?a.to>=e.ch:a.to>e.ch))){if(r&&(ie(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c=l.find(i<0?1:-1),u=void 0;if((i<0?l.inclusiveRight:l.inclusiveLeft)&&(c=eo(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=gt(c,n))&&(i<0?u<0:u>0))return Qr(t,c,e,i,r)}var d=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(d=eo(t,d,i,d.line==e.line?o:null)),d?Qr(t,d,e,i,r):null}}return e}function to(t,e,n,i,r){var o=i||1,s=Qr(t,e,n,o,r)||!r&&Qr(t,e,n,o,!0)||Qr(t,e,n,-o,r)||!r&&Qr(t,e,n,-o,!0);return s||(t.cantEdit=!0,mt(t.first,0))}function eo(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?wt(t,mt(e.line-1)):null:n>0&&e.ch==(i||at(t,e.line)).text.length?e.line<t.first+t.size-1?mt(e.line+1,0):null:new mt(e.line,e.ch+n)}function no(t){t.setSelection(mt(t.firstLine(),0),mt(t.lastLine()),B)}function io(t,e,n){var i={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return i.canceled=!0}};return n&&(i.update=function(e,n,r,o){e&&(i.from=wt(t,e)),n&&(i.to=wt(t,n)),r&&(i.text=r),void 0!==o&&(i.origin=o)}),ie(t,"beforeChange",t,i),t.cm&&ie(t.cm,"beforeChange",t.cm,i),i.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:i.from,to:i.to,text:i.text,origin:i.origin}}function ro(t,e,n){if(t.cm){if(!t.cm.curOp)return Vi(t.cm,ro)(t,e,n);if(t.cm.state.suppressEdits)return}if(!(se(t,"beforeChange")||t.cm&&se(t.cm,"beforeChange"))||(e=io(t,e,!0))){var i=kt&&!n&&function(t,e,n){var i=null;if(t.iter(e.line,n.line+1,function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var n=t.markedSpans[e].marker;!n.readOnly||i&&-1!=z(i,n)||(i||(i=[])).push(n)}}),!i)return null;for(var r=[{from:e,to:n}],o=0;o<i.length;++o)for(var s=i[o],a=s.find(0),l=0;l<r.length;++l){var c=r[l];if(!(gt(c.to,a.from)<0||gt(c.from,a.to)>0)){var u=[l,1],d=gt(c.from,a.from),h=gt(c.to,a.to);(d<0||!s.inclusiveLeft&&!d)&&u.push({from:c.from,to:a.from}),(h>0||!s.inclusiveRight&&!h)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}(t,e.from,e.to);if(i)for(var r=i.length-1;r>=0;--r)oo(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else oo(t,e)}}function oo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=gt(e.from,e.to)){var n=Cr(t,e);Or(t,e,n,t.cm?t.cm.curOp.id:NaN),lo(t,e,n,Et(t,e));var i=[];Er(t,function(t,n){n||-1!=z(i,t.history)||(po(t.history,e),i.push(t.history)),lo(t,e,null,Et(t,e))})}}function so(t,e,n){var i=t.cm&&t.cm.state.suppressEdits;if(!i||n){for(var r,o=t.history,s=t.sel,a="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c<a.length&&(r=a[c],n?!r.ranges||r.equals(t.sel):r.ranges);c++);if(c!=a.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(r=a.pop()).ranges){if(i)return void a.push(r);break}if($r(r,l),n&&!r.equals(t.sel))return void Vr(t,r,{clearRedo:!1});s=r}var u=[];$r(s,l),l.push({changes:u,generation:o.generation}),o.generation=r.generation||++o.maxGeneration;for(var d=se(t,"beforeChange")||t.cm&&se(t.cm,"beforeChange"),h=function(n){var i=r.changes[n];if(i.origin=e,d&&!io(t,i,!1))return a.length=0,{};u.push(Ar(t,i));var o=n?Cr(t,i):X(a);lo(t,i,o,zr(t,i)),!n&&t.cm&&t.cm.scrollIntoView({from:i.from,to:_r(i)});var s=[];Er(t,function(t,e){e||-1!=z(s,t.history)||(po(t.history,i),s.push(t.history)),lo(t,i,null,zr(t,i))})},p=r.changes.length-1;p>=0;--p){var f=h(p);if(f)return f.v}}}}function ao(t,e){if(0!=e&&(t.first+=e,t.sel=new vr(K(t.sel.ranges,function(t){return new br(mt(t.anchor.line+e,t.anchor.ch),mt(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){Ji(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;i<n.viewTo;i++)Zi(t.cm,i,"gutter")}}function lo(t,e,n,i){if(t.cm&&!t.cm.curOp)return Vi(t.cm,lo)(t,e,n,i);if(e.to.line<t.first)ao(t,e.text.length-1-(e.to.line-e.from.line));else if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var r=e.text.length-1-(t.first-e.from.line);ao(t,r),e={from:mt(t.first,0),to:mt(e.to.line+r,e.to.ch),text:[X(e.text)],origin:e.origin}}var o=t.lastLine();e.to.line>o&&(e={from:e.from,to:mt(o,at(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=lt(t,e.from,e.to),n||(n=Cr(t,e)),t.cm?function(t,e,n){var i=t.doc,r=t.display,o=e.from,s=e.to,a=!1,l=o.line;t.options.lineWrapping||(l=dt(Ht(at(i,o.line))),i.iter(l,s.line+1,function(t){if(t==r.maxLine)return a=!0,!0}));i.sel.contains(e.from,e.to)>-1&&oe(t);Lr(i,e,n,oi(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=Yt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0));(function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var n=t.first,i=e-1;i>n;i--){var r=at(t,i).stateAfter;if(r&&(!(r instanceof je)||i+r.lookAhead<e)){n=i+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,n)}})(i,o.line),nr(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?Ji(t):o.line!=s.line||1!=e.text.length||Dr(t.doc,e)?Ji(t,o.line,s.line+1,c):Zi(t,o.line,"text");var u=se(t,"changes"),d=se(t,"change");if(d||u){var h={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};d&&ln(t,"change",t,h),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(h)}t.display.selForContextMenu=null}(t.cm,e,i):Lr(t,e,i),Xr(t,n,B)}}function co(t,e,n,i,r){var o;i||(i=n),gt(i,n)<0&&(n=(o=[i,n])[0],i=o[1]),"string"==typeof e&&(e=t.splitLines(e)),ro(t,{from:n,to:i,text:e,origin:r})}function uo(t,e,n,i){n<t.line?t.line+=i:e<t.line&&(t.line=e,t.ch=0)}function ho(t,e,n,i){for(var r=0;r<t.length;++r){var o=t[r],s=!0;if(o.ranges){o.copied||((o=t[r]=o.deepCopy()).copied=!0);for(var a=0;a<o.ranges.length;a++)uo(o.ranges[a].anchor,e,n,i),uo(o.ranges[a].head,e,n,i)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=mt(c.from.line+i,c.from.ch),c.to=mt(c.to.line+i,c.to.ch);else if(e<=c.to.line){s=!1;break}}s||(t.splice(0,r+1),r=0)}}}function po(t,e){var n=e.from.line,i=e.to.line,r=e.text.length-(i-n)-1;ho(t.done,n,i,r),ho(t.undone,n,i,r)}function fo(t,e,n,i){var r=e,o=e;return"number"==typeof e?o=at(t,_t(t,e)):r=dt(e),null==r?null:(i(o,r)&&t.cm&&Zi(t.cm,r,n),o)}function mo(t){this.lines=t,this.parent=null;for(var e=0,n=0;n<t.length;++n)t[n].parent=this,e+=t[n].height;this.height=e}function go(t){this.children=t;for(var e=0,n=0,i=0;i<t.length;++i){var r=t[i];e+=r.chunkSize(),n+=r.height,r.parent=this}this.size=e,this.height=n,this.parent=null}br.prototype.from=function(){return xt(this.anchor,this.head)},br.prototype.to=function(){return yt(this.anchor,this.head)},br.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},mo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=t,i=t+e;n<i;++n){var r=this.lines[n];this.height-=r.height,Ye(r),ln(r,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,n){this.height+=n,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var i=0;i<e.length;++i)e[i].parent=this},iterN:function(t,e,n){for(var i=t+e;t<i;++t)if(n(this.lines[t]))return!0}},go.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){this.size-=e;for(var n=0;n<this.children.length;++n){var i=this.children[n],r=i.chunkSize();if(t<r){var o=Math.min(e,r-t),s=i.height;if(i.removeInner(t,o),this.height-=s-i.height,r==o&&(this.children.splice(n--,1),i.parent=null),0==(e-=o))break;t=0}else t-=r}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof mo))){var a=[];this.collapse(a),this.children=[new mo(a)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e<this.children.length;++e)this.children[e].collapse(t)},insertInner:function(t,e,n){this.size+=e.length,this.height+=n;for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(t<=o){if(r.insertInner(t,e,n),r.lines&&r.lines.length>50){for(var s=r.lines.length%25+25,a=s;a<r.lines.length;){var l=new mo(r.lines.slice(a,a+=25));r.height-=l.height,this.children.splice(++i,0,l),l.parent=this}r.lines=r.lines.slice(0,s),this.maybeSpill()}break}t-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=new go(t.children.splice(t.children.length-5,5));if(t.parent){t.size-=e.size,t.height-=e.height;var n=z(t.parent.children,t);t.parent.children.splice(n+1,0,e)}else{var i=new go(t.children);i.parent=t,t.children=[i,e],t=i}e.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(t<o){var s=Math.min(e,o-t);if(r.iterN(t,s,n))return!0;if(0==(e-=s))break;t=0}else t-=o}}};var vo=function(t,e,n){if(n)for(var i in n)n.hasOwnProperty(i)&&(this[i]=n[i]);this.doc=t,this.node=e};function bo(t,e,n){Gt(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&Pi(t,n)}vo.prototype.clear=function(){var t=this.doc.cm,e=this.line.widgets,n=this.line,i=dt(n);if(null!=i&&e){for(var r=0;r<e.length;++r)e[r]==this&&e.splice(r--,1);e.length||(n.widgets=null);var o=_n(this);ut(n,Math.max(0,n.height-o)),t&&(Yi(t,function(){bo(t,n,-o),Zi(t,i,"widget")}),ln(t,"lineWidgetCleared",t,this,i))}},vo.prototype.changed=function(){var t=this,e=this.height,n=this.doc.cm,i=this.line;this.height=null;var r=_n(this)-e;r&&(Ut(this.doc,i)||ut(i,i.height+r),n&&Yi(n,function(){n.curOp.forceUpdate=!0,bo(n,i,r),ln(n,"lineWidgetChanged",n,t,dt(i))}))},ae(vo);var yo=0,xo=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++yo};function _o(t,e,n,i,r){if(i&&i.shared)return function(t,e,n,i,r){(i=$(i)).shared=!1;var o=[_o(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Er(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(_o(t,wt(t,e),wt(t,n),i,r));for(var l=0;l<t.linked.length;++l)if(t.linked[l].isParent)return;s=X(o)}),new wo(o,s)}(t,e,n,i,r);if(t.cm&&!t.cm.curOp)return Vi(t.cm,_o)(t,e,n,i,r);var o=new xo(t,r),s=gt(e,n);if(i&&$(i,o,!1),s>0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=T("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(zt(t,e.line,e,n,o)||e.line!=n.line&&zt(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pt=!0}o.addToHistory&&Or(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var a,l=e.line,c=t.cm;if(t.iter(l,n.line+1,function(t){c&&o.collapsed&&!c.options.lineWrapping&&Ht(t)==c.display.maxLine&&(a=!0),o.collapsed&&l!=e.line&&ut(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new St(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&t.iter(e.line,n.line+1,function(e){Ut(t,e)&&ut(e,0)}),o.clearOnEnter&&te(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(kt=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++yo,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)Ji(c,e.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=e.line;u<=n.line;u++)Zi(c,u,"text");o.atomic&&Jr(c.doc),ln(c,"markerAdded",c,o)}return o}xo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Hi(t),se(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=Dt(s.markedSpans,this);t&&!this.collapsed?Zi(t,dt(s),"text"):t&&(null!=a.to&&(r=dt(s)),null!=a.from&&(i=dt(s))),s.markedSpans=Lt(s.markedSpans,a),null==a.from&&this.collapsed&&!Ut(this.doc,s)&&t&&ut(s,ei(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Ht(this.lines[l]),u=Yt(c);u>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Ji(t,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Jr(t.doc)),t&&ln(t,"markerCleared",t,this,i,r),e&&Wi(t),this.parent&&this.parent.clear()}},xo.prototype.find=function(t,e){var n,i;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r<this.lines.length;++r){var o=this.lines[r],s=Dt(o.markedSpans,this);if(null!=s.from&&(n=mt(e?o:dt(o),s.from),-1==t))return n;if(null!=s.to&&(i=mt(e?o:dt(o),s.to),1==t))return i}return n&&{from:n,to:i}},xo.prototype.changed=function(){var t=this,e=this.find(-1,!0),n=this,i=this.doc.cm;e&&i&&Yi(i,function(){var r=e.line,o=dt(e.line),s=Mn(i,o);if(s&&(Fn(s),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!Ut(n.doc,r)&&null!=n.height){var a=n.height;n.height=null;var l=_n(n)-a;l&&ut(r,r.height+l)}ln(i,"markerChanged",i,t)})},xo.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=z(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},xo.prototype.detachLine=function(t){if(this.lines.splice(z(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},ae(xo);var wo=function(t,e){this.markers=t,this.primary=e;for(var n=0;n<t.length;++n)t[n].parent=this};function Co(t){return t.findMarks(mt(t.first,0),t.clipPos(mt(t.lastLine())),function(t){return t.parent})}function ko(t){for(var e=function(e){var n=t[e],i=[n.primary.doc];Er(n.primary.doc,function(t){return i.push(t)});for(var r=0;r<n.markers.length;r++){var o=n.markers[r];-1==z(i,o.doc)&&(o.parent=null,n.markers.splice(r--,1))}},n=0;n<t.length;n++)e(n)}wo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();ln(this,"clear")}},wo.prototype.find=function(t,e){return this.primary.find(t,e)},ae(wo);var Po=0,So=function(t,e,n,i,r){if(!(this instanceof So))return new So(t,e,n,i,r);null==n&&(n=0),go.call(this,[new mo([new Ge("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=mt(n,0);this.sel=xr(o),this.history=new Ir(null),this.id=++Po,this.modeOption=e,this.lineSep=i,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),Lr(this,{from:o,to:o,text:t}),Vr(this,xr(o),B)};So.prototype=Z(go.prototype,{constructor:So,iter:function(t,e,n){n?this.iterN(t-this.first,e-t,n):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var n=0,i=0;i<e.length;++i)n+=e[i].height;this.insertInner(t-this.first,e,n)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=ct(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:Ki(function(t){var e=mt(this.first,0),n=this.first+this.size-1;ro(this,{from:e,to:mt(n,at(this,n).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&Di(this.cm,0,0),Vr(this,xr(e),B)}),replaceRange:function(t,e,n,i){co(this,t,e=wt(this,e),n=n?wt(this,n):e,i)},getRange:function(t,e,n){var i=lt(this,wt(this,t),wt(this,e));return!1===n?i:i.join(n||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(pt(this,t))return at(this,t)},getLineNumber:function(t){return dt(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=at(this,t)),Ht(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return wt(this,t)},getCursor:function(t){var e=this.sel.primary();return null==t||"head"==t?e.head:"anchor"==t?e.anchor:"end"==t||"to"==t||!1===t?e.to():e.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ki(function(t,e,n){Gr(this,wt(this,"number"==typeof t?mt(t,e||0):t),null,n)}),setSelection:Ki(function(t,e,n){Gr(this,wt(this,t),wt(this,e||t),n)}),extendSelection:Ki(function(t,e,n){Br(this,wt(this,t),e&&wt(this,e),n)}),extendSelections:Ki(function(t,e){Ur(this,Ct(this,t),e)}),extendSelectionsBy:Ki(function(t,e){Ur(this,Ct(this,K(this.sel.ranges,t)),e)}),setSelections:Ki(function(t,e,n){if(t.length){for(var i=[],r=0;r<t.length;r++)i[r]=new br(wt(this,t[r].anchor),wt(this,t[r].head));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),Vr(this,yr(this.cm,i,e),n)}}),addSelection:Ki(function(t,e,n){var i=this.sel.ranges.slice(0);i.push(new br(wt(this,t),wt(this,e||t))),Vr(this,yr(this.cm,i,i.length-1),n)}),getSelection:function(t){for(var e,n=this.sel.ranges,i=0;i<n.length;i++){var r=lt(this,n[i].from(),n[i].to());e=e?e.concat(r):r}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=[],n=this.sel.ranges,i=0;i<n.length;i++){var r=lt(this,n[i].from(),n[i].to());!1!==t&&(r=r.join(t||this.lineSeparator())),e[i]=r}return e},replaceSelection:function(t,e,n){for(var i=[],r=0;r<this.sel.ranges.length;r++)i[r]=t;this.replaceSelections(i,e,n||"+input")},replaceSelections:Ki(function(t,e,n){for(var i=[],r=this.sel,o=0;o<r.ranges.length;o++){var s=r.ranges[o];i[o]={from:s.from(),to:s.to(),text:this.splitLines(t[o]),origin:n}}for(var a=e&&"end"!=e&&function(t,e,n){for(var i=[],r=mt(t.first,0),o=r,s=0;s<e.length;s++){var a=e[s],l=kr(a.from,r,o),c=kr(_r(a),r,o);if(r=a.to,o=c,"around"==n){var u=t.sel.ranges[s],d=gt(u.head,u.anchor)<0;i[s]=new br(d?c:l,d?l:c)}else i[s]=new br(l,l)}return new vr(i,t.sel.primIndex)}(this,i,e),l=i.length-1;l>=0;l--)ro(this,i[l]);a?Yr(this,a):this.cm&&Si(this.cm)}),undo:Ki(function(){so(this,"undo")}),redo:Ki(function(){so(this,"redo")}),undoSelection:Ki(function(){so(this,"undo",!0)}),redoSelection:Ki(function(){so(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,i=0;i<t.done.length;i++)t.done[i].ranges||++e;for(var r=0;r<t.undone.length;r++)t.undone[r].ranges||++n;return{undo:e,redo:n}},clearHistory:function(){this.history=new Ir(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:Hr(this.history.done),undone:Hr(this.history.undone)}},setHistory:function(t){var e=this.history=new Ir(this.history.maxGeneration);e.done=Hr(t.done.slice(0),null,!0),e.undone=Hr(t.undone.slice(0),null,!0)},setGutterMarker:Ki(function(t,e,n){return fo(this,t,"gutter",function(t){var i=t.gutterMarkers||(t.gutterMarkers={});return i[e]=n,!n&&nt(i)&&(t.gutterMarkers=null),!0})}),clearGutter:Ki(function(t){var e=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[t]&&fo(e,n,"gutter",function(){return n.gutterMarkers[t]=null,nt(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(t){var e;if("number"==typeof t){if(!pt(this,t))return null;if(e=t,!(t=at(this,t)))return null}else if(null==(e=dt(t)))return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:Ki(function(t,e,n){return fo(this,t,"gutter"==e?"gutter":"class",function(t){var i="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass";if(t[i]){if(k(n).test(t[i]))return!1;t[i]+=" "+n}else t[i]=n;return!0})}),removeLineClass:Ki(function(t,e,n){return fo(this,t,"gutter"==e?"gutter":"class",function(t){var i="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass",r=t[i];if(!r)return!1;if(null==n)t[i]=null;else{var o=r.match(k(n));if(!o)return!1;var s=o.index+o[0].length;t[i]=r.slice(0,o.index)+(o.index&&s!=r.length?" ":"")+r.slice(s)||null}return!0})}),addLineWidget:Ki(function(t,e,n){return function(t,e,n,i){var r=new vo(t,n,i),o=t.cm;return o&&r.noHScroll&&(o.display.alignWidgets=!0),fo(t,e,"widget",function(e){var n=e.widgets||(e.widgets=[]);if(null==r.insertAt?n.push(r):n.splice(Math.min(n.length-1,Math.max(0,r.insertAt)),0,r),r.line=e,o&&!Ut(t,e)){var i=Gt(e)<t.scrollTop;ut(e,e.height+_n(r)),i&&Pi(o,r.height),o.curOp.forceUpdate=!0}return!0}),o&&ln(o,"lineWidgetAdded",o,r,"number"==typeof e?e:dt(e)),r}(this,t,e,n)}),removeLineWidget:function(t){t.clear()},markText:function(t,e,n){return _o(this,wt(this,t),wt(this,e),n,n&&n.type||"range")},setBookmark:function(t,e){var n={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return _o(this,t=wt(this,t),t,n,"bookmark")},findMarksAt:function(t){var e=[],n=at(this,(t=wt(this,t)).line).markedSpans;if(n)for(var i=0;i<n.length;++i){var r=n[i];(null==r.from||r.from<=t.ch)&&(null==r.to||r.to>=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=wt(this,t),e=wt(this,e);var i=[],r=t.line;return this.iter(t.line,e.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];null!=l.to&&r==t.line&&t.ch>=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r}),i},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var i=0;i<n.length;++i)null!=n[i].from&&t.push(n[i].marker)}),t},posFromIndex:function(t){var e,n=this.first,i=this.lineSeparator().length;return this.iter(function(r){var o=r.text.length+i;if(o>t)return e=t,!0;t-=o,++n}),wt(this,mt(n,e))},indexFromPos:function(t){var e=(t=wt(this,t)).ch;if(t.line<this.first||t.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,t.line,function(t){e+=t.text.length+n}),e},copy:function(t){var e=new So(ct(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t||(t={});var e=this.first,n=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<n&&(n=t.to);var i=new So(ct(this,e,n),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:t.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],function(t,e){for(var n=0;n<e.length;n++){var i=e[n],r=i.find(),o=t.clipPos(r.from),s=t.clipPos(r.to);if(gt(o,s)){var a=_o(t,o,s,i.primary,i.primary.type);i.markers.push(a),a.parent=i}}}(i,Co(this)),i},unlinkDoc:function(t){if(t instanceof Cs&&(t=t.doc),this.linked)for(var e=0;e<this.linked.length;++e){if(this.linked[e].doc==t){this.linked.splice(e,1),t.unlinkDoc(this),ko(Co(this));break}}if(t.history==this.history){var n=[t.id];Er(t,function(t){return n.push(t.id)},!0),t.history=new Ir(null),t.history.done=Hr(this.history.done,n),t.history.undone=Hr(this.history.undone,n)}},iterLinkedDocs:function(t){Er(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):xe(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Ki(function(t){var e;("rtl"!=t&&(t="ltr"),t!=this.direction)&&(this.direction=t,this.iter(function(t){return t.order=null}),this.cm&&Yi(e=this.cm,function(){Mr(e),Ji(e)}))})}),So.prototype.eachLine=So.prototype.iter;var Do=0;function Lo(t){var e=this;if(Eo(e),!re(e,t)&&!wn(e.display,t)){le(t),s&&(Do=+new Date);var n=ai(e,t,!0),i=t.dataTransfer.files;if(n&&!e.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,o=Array(r),a=0,l=function(t,i){if(!e.options.allowDropFileTypes||-1!=z(e.options.allowDropFileTypes,t.type)){var s=new FileReader;s.onload=Vi(e,function(){var t=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(t)&&(t=""),o[i]=t,++a==r){var l={from:n=wt(e.doc,n),to:n,text:e.doc.splitLines(o.join(e.doc.lineSeparator())),origin:"paste"};ro(e.doc,l),Yr(e.doc,xr(n,_r(l)))}}),s.readAsText(t)}},c=0;c<r;++c)l(i[c],c);else{if(e.state.draggingText&&e.doc.sel.contains(n)>-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var u=t.dataTransfer.getData("Text");if(u){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),Xr(e.doc,xr(n,n)),d)for(var h=0;h<d.length;++h)co(e.doc,"",d[h].anchor,d[h].head,"drag");e.replaceSelection(u,"around","paste"),e.display.input.focus()}}catch(t){}}}}function Eo(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function To(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),n=[],i=0;i<e.length;i++){var r=e[i].CodeMirror;r&&n.push(r)}n.length&&n[0].operation(function(){for(var e=0;e<n.length;e++)t(n[e])})}}var Mo=!1;function Io(){var t;Mo||(te(window,"resize",function(){null==t&&(t=setTimeout(function(){t=null,To(Ao)},100))}),te(window,"blur",function(){return To(bi)}),Mo=!0)}function Ao(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}for(var jo={3:"Pause",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",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",145:"ScrollLock",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"},Oo=0;Oo<10;Oo++)jo[Oo+48]=jo[Oo+96]=String(Oo);for(var No=65;No<=90;No++)jo[No]=String.fromCharCode(No);for(var $o=1;$o<=12;$o++)jo[$o+111]=jo[$o+63235]="F"+$o;var Fo={};function Ro(t){var e,n,i,r,o=t.split(/-(?!$)/);t=o[o.length-1];for(var s=0;s<o.length-1;s++){var a=o[s];if(/^(cmd|meta|m)$/i.test(a))r=!0;else if(/^a(lt)?$/i.test(a))e=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error("Unrecognized modifier name: "+a);i=!0}}return e&&(t="Alt-"+t),n&&(t="Ctrl-"+t),r&&(t="Cmd-"+t),i&&(t="Shift-"+t),t}function zo(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete t[n];continue}for(var r=K(n.split(" "),Ro),o=0;o<r.length;o++){var s=void 0,a=void 0;o==r.length-1?(a=r.join(" "),s=i):(a=r.slice(0,o+1).join(" "),s="...");var l=e[a];if(l){if(l!=s)throw new Error("Inconsistent bindings for "+a)}else e[a]=s}delete t[n]}for(var c in e)t[c]=e[c];return t}function Ho(t,e,n,i){var r=(e=qo(e)).call?e.call(t,i):e[t];if(!1===r)return"nothing";if("..."===r)return"multi";if(null!=r&&n(r))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return Ho(t,e.fallthrough,n,i);for(var o=0;o<e.fallthrough.length;o++){var s=Ho(t,e.fallthrough[o],n,i);if(s)return s}}}function Wo(t){var e="string"==typeof t?t:jo[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function Bo(t,e,n){var i=t;return e.altKey&&"Alt"!=i&&(t="Alt-"+t),(w?e.metaKey:e.ctrlKey)&&"Ctrl"!=i&&(t="Ctrl-"+t),(w?e.ctrlKey:e.metaKey)&&"Cmd"!=i&&(t="Cmd-"+t),!n&&e.shiftKey&&"Shift"!=i&&(t="Shift-"+t),t}function Uo(t,e){if(d&&34==t.keyCode&&t.char)return!1;var n=jo[t.keyCode];return null!=n&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(n=t.code),Bo(n,t,e))}function qo(t){return"string"==typeof t?Fo[t]:t}function Go(t,e){for(var n=t.doc.sel.ranges,i=[],r=0;r<n.length;r++){for(var o=e(n[r]);i.length&&gt(o.from,X(i).to)<=0;){var s=i.pop();if(gt(s.from,o.from)<0){o.from=s.from;break}}i.push(o)}Yi(t,function(){for(var e=i.length-1;e>=0;e--)co(t.doc,"",i[e].from,i[e].to,"+delete");Si(t)})}function Yo(t,e,n){var i=ot(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Vo(t,e,n){var i=Yo(t,e.ch,n);return null==i?null:new mt(e.line,i,n<0?"after":"before")}function Xo(t,e,n,i,r){if(t){var o=Zt(n,e.doc.direction);if(o){var s,a=r<0?X(o):o[0],l=r<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var c=In(e,n);s=r<0?n.text.length-1:0;var u=An(e,c,s).top;s=st(function(t){return An(e,c,t).top==u},r<0==(1==a.level)?a.from:a.to-1,s),"before"==l&&(s=Yo(n,s,1))}else s=r<0?a.to:a.from;return new mt(i,s,l)}}return new mt(i,r<0?n.text.length:0,r<0?"before":"after")}Fo.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"},Fo.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"},Fo.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","Ctrl-O":"openLine"},Fo.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"]},Fo.default=b?Fo.macDefault:Fo.pcDefault;var Ko={selectAll:no,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),B)},killLine:function(t){return Go(t,function(e){if(e.empty()){var n=at(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line<t.lastLine()?{from:e.head,to:mt(e.head.line+1,0)}:{from:e.head,to:mt(e.head.line,n)}}return{from:e.from(),to:e.to()}})},deleteLine:function(t){return Go(t,function(e){return{from:mt(e.from().line,0),to:wt(t.doc,mt(e.to().line+1,0))}})},delLineLeft:function(t){return Go(t,function(t){return{from:mt(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(t){return Go(t,function(e){var n=t.charCoords(e.head,"div").top+5;return{from:t.coordsChar({left:0,top:n},"div"),to:e.from()}})},delWrappedLineRight:function(t){return Go(t,function(e){var n=t.charCoords(e.head,"div").top+5,i=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div");return{from:e.from(),to:i}})},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(mt(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(mt(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return Jo(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return Zo(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){return function(t,e){var n=at(t.doc,e),i=function(t){for(var e;e=Ft(t);)t=e.find(1,!0).line;return t}(n);i!=n&&(e=dt(i));return Xo(!0,t,n,e,-1)}(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy(function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div")},q)},goLineLeft:function(t){return t.extendSelectionsBy(function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:n},"div")},q)},goLineLeftSmart:function(t){return t.extendSelectionsBy(function(e){var n=t.cursorCoords(e.head,"div").top+5,i=t.coordsChar({left:0,top:n},"div");return i.ch<t.getLine(i.line).search(/\S/)?Zo(t,e.head):i},q)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"char")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection("\t")},insertSoftTab:function(t){for(var e=[],n=t.listSelections(),i=t.options.tabSize,r=0;r<n.length;r++){var o=n[r].from(),s=F(t.getLine(o.line),o.ch,i);e.push(V(i-s%i))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return Yi(t,function(){for(var e=t.listSelections(),n=[],i=0;i<e.length;i++)if(e[i].empty()){var r=e[i].head,o=at(t.doc,r.line).text;if(o)if(r.ch==o.length&&(r=new mt(r.line,r.ch-1)),r.ch>0)r=new mt(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),mt(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=at(t.doc,r.line-1).text;s&&(r=new mt(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),mt(r.line-1,s.length-1),r,"+transpose"))}n.push(new br(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return Yi(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var i=0;i<e.length;i++)t.indentLine(e[i].from().line,null,!0);Si(t)})},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function Jo(t,e){var n=at(t.doc,e),i=Ht(n);return i!=n&&(e=dt(i)),Xo(!0,t,i,e,1)}function Zo(t,e){var n=Jo(t,e.line),i=at(t.doc,n.line),r=Zt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return mt(n.line,s?0:o,n.sticky)}return n}function Qo(t,e,n){if("string"==typeof e&&!(e=Ko[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=W}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}var ts=new R;function es(t,e,n,i){var r=t.state.keySeq;if(r){if(Wo(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:ts.set(50,function(){t.state.keySeq==r&&(t.state.keySeq=null,t.display.input.reset())}),ns(t,r+" "+e,n,i))return!0}return ns(t,e,n,i)}function ns(t,e,n,i){var r=function(t,e,n){for(var i=0;i<t.state.keyMaps.length;i++){var r=Ho(e,t.state.keyMaps[i],n,t);if(r)return r}return t.options.extraKeys&&Ho(e,t.options.extraKeys,n,t)||Ho(e,t.options.keyMap,n,t)}(t,e,i);return"multi"==r&&(t.state.keySeq=e),"handled"==r&&ln(t,"keyHandled",t,e,n),"handled"!=r&&"multi"!=r||(le(n),fi(t)),!!r}function is(t,e){var n=Uo(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?es(t,"Shift-"+n,e,function(e){return Qo(t,e,!0)})||es(t,n,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return Qo(t,e)}):es(t,n,e,function(e){return Qo(t,e)}))}var rs=null;function os(t){var e=this;if(e.curOp.focus=I(),!re(e,t)){s&&a<11&&27==t.keyCode&&(t.returnValue=!1);var n=t.keyCode;e.display.shift=16==n||t.shiftKey;var i=is(e,t);d&&(rs=i?n:null,!i&&88==n&&!we&&(b?t.metaKey:t.ctrlKey)&&e.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||function(t){var e=t.display.lineDiv;function n(t){18!=t.keyCode&&t.altKey||(S(e,"CodeMirror-crosshair"),ne(document,"keyup",n),ne(document,"mouseover",n))}A(e,"CodeMirror-crosshair"),te(document,"keyup",n),te(document,"mouseover",n)}(e)}}function ss(t){16==t.keyCode&&(this.doc.sel.shift=!1),re(this,t)}function as(t){var e=this;if(!(wn(e.display,t)||re(e,t)||t.ctrlKey&&!t.altKey||b&&t.metaKey)){var n=t.keyCode,i=t.charCode;if(d&&n==rs)return rs=null,void le(t);if(!d||t.which&&!(t.which<10)||!is(e,t)){var r=String.fromCharCode(null==i?n:i);"\b"!=r&&(function(t,e,n){return es(t,"'"+n+"'",e,function(e){return Qo(t,e,!0)})}(e,t,r)||e.display.input.onKeyPress(t))}}}var ls,cs,us=function(t,e,n){this.time=t,this.pos=e,this.button=n};function ds(t){var e=this,n=e.display;if(!(re(e,t)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=t.shiftKey,wn(n,t))l||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));else if(!fs(e,t)){var i=ai(e,t),r=pe(t),o=i?function(t,e){var n=+new Date;return cs&&cs.compare(n,t,e)?(ls=cs=null,"triple"):ls&&ls.compare(n,t,e)?(cs=new us(n,t,e),ls=null,"double"):(ls=new us(n,t,e),cs=null,"single")}(i,r):"single";window.focus(),1==r&&e.state.selectingText&&e.state.selectingText(t),i&&function(t,e,n,i,r){var o="Click";"double"==i?o="Double"+o:"triple"==i&&(o="Triple"+o);return es(t,Bo(o=(1==e?"Left":2==e?"Middle":"Right")+o,r),r,function(e){if("string"==typeof e&&(e=Ko[e]),!e)return!1;var i=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),i=e(t,n)!=W}finally{t.state.suppressEdits=!1}return i})}(e,r,i,o,t)||(1==r?i?function(t,e,n,i){s?setTimeout(N(mi,t),0):t.curOp.focus=I();var r,o=function(t,e,n){var i=t.getOption("configureMouse"),r=i?i(t,e,n):{};if(null==r.unit){var o=y?n.shiftKey&&n.metaKey:n.altKey;r.unit=o?"rectangle":"single"==e?"char":"double"==e?"word":"line"}(null==r.extend||t.doc.extend)&&(r.extend=t.doc.extend||n.shiftKey);null==r.addNew&&(r.addNew=b?n.metaKey:n.ctrlKey);null==r.moveOnDrag&&(r.moveOnDrag=!(b?n.altKey:n.ctrlKey));return r}(t,n,i),c=t.doc.sel;t.options.dragDrop&&ge&&!t.isReadOnly()&&"single"==n&&(r=c.contains(e))>-1&&(gt((r=c.ranges[r]).from(),e)<0||e.xRel>0)&&(gt(r.to(),e)>0||e.xRel<0)?function(t,e,n,i){var r=t.display,o=!1,c=Vi(t,function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,ne(r.wrapper.ownerDocument,"mouseup",c),ne(r.wrapper.ownerDocument,"mousemove",u),ne(r.scroller,"dragstart",d),ne(r.scroller,"drop",c),o||(le(e),i.addNew||Br(t.doc,n,null,null,i.extend),l||s&&9==a?setTimeout(function(){r.wrapper.ownerDocument.body.focus(),r.input.focus()},20):r.input.focus())}),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},d=function(){return o=!0};l&&(r.scroller.draggable=!0);t.state.draggingText=c,c.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop();te(r.wrapper.ownerDocument,"mouseup",c),te(r.wrapper.ownerDocument,"mousemove",u),te(r.scroller,"dragstart",d),te(r.scroller,"drop",c),gi(t),setTimeout(function(){return r.input.focus()},20)}(t,i,e,o):function(t,e,n,i){var r=t.display,o=t.doc;le(e);var s,a,l=o.sel,c=l.ranges;i.addNew&&!i.extend?(a=o.sel.contains(n),s=a>-1?c[a]:new br(n,n)):(s=o.sel.primary(),a=o.sel.primIndex);if("rectangle"==i.unit)i.addNew||(s=new br(n,n)),n=ai(t,e,!0,!0),a=-1;else{var u=hs(t,n,i.unit);s=i.extend?Wr(s,u.anchor,u.head,i.extend):u}i.addNew?-1==a?(a=c.length,Vr(o,yr(t,c.concat([s]),a),{scroll:!1,origin:"*mouse"})):c.length>1&&c[a].empty()&&"char"==i.unit&&!i.extend?(Vr(o,yr(t,c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):qr(o,a,s,U):(a=0,Vr(o,new vr([s],0),U),l=o.sel);var d=n;function h(e){if(0!=gt(d,e))if(d=e,"rectangle"==i.unit){for(var r=[],c=t.options.tabSize,u=F(at(o,n.line).text,n.ch,c),h=F(at(o,e.line).text,e.ch,c),p=Math.min(u,h),f=Math.max(u,h),m=Math.min(n.line,e.line),g=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=g;m++){var v=at(o,m).text,b=G(v,p,c);p==f?r.push(new br(mt(m,b),mt(m,b))):v.length>b&&r.push(new br(mt(m,b),mt(m,G(v,f,c))))}r.length||r.push(new br(n,n)),Vr(o,yr(t,l.ranges.slice(0,a).concat(r),a),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var y,x=s,_=hs(t,e,i.unit),w=x.anchor;gt(_.anchor,w)>0?(y=_.head,w=xt(x.from(),_.anchor)):(y=_.anchor,w=yt(x.to(),_.head));var C=l.ranges.slice(0);C[a]=function(t,e){var n=e.anchor,i=e.head,r=at(t.doc,n.line);if(0==gt(n,i)&&n.sticky==i.sticky)return e;var o=Zt(r);if(!o)return e;var s=Kt(o,n.ch,n.sticky),a=o[s];if(a.from!=n.ch&&a.to!=n.ch)return e;var l,c=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==c||c==o.length)return e;if(i.line!=n.line)l=(i.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=Kt(o,i.ch,i.sticky),d=u-s||(i.ch-n.ch)*(1==a.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=o[c+(l?-1:0)],p=l==(1==h.level),f=p?h.from:h.to,m=p?"after":"before";return n.ch==f&&n.sticky==m?e:new br(new mt(n.line,f,m),i)}(t,new br(wt(o,w),y)),Vr(o,yr(t,C,a),U)}}var p=r.wrapper.getBoundingClientRect(),f=0;function m(e){t.state.selectingText=!1,f=1/0,le(e),r.input.focus(),ne(r.wrapper.ownerDocument,"mousemove",g),ne(r.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=Vi(t,function(e){0!==e.buttons&&pe(e)?function e(n){var s=++f;var a=ai(t,n,!0,"rectangle"==i.unit);if(!a)return;if(0!=gt(a,d)){t.curOp.focus=I(),h(a);var l=_i(r,o);(a.line>=l.to||a.line<l.from)&&setTimeout(Vi(t,function(){f==s&&e(n)}),150)}else{var c=n.clientY<p.top?-20:n.clientY>p.bottom?20:0;c&&setTimeout(Vi(t,function(){f==s&&(r.scroller.scrollTop+=c,e(n))}),50)}}(e):m(e)}),v=Vi(t,m);t.state.selectingText=v,te(r.wrapper.ownerDocument,"mousemove",g),te(r.wrapper.ownerDocument,"mouseup",v)}(t,i,e,o)}(e,i,o,t):he(t)==n.scroller&&le(t):2==r?(i&&Br(e.doc,i),setTimeout(function(){return n.input.focus()},20)):3==r&&(C?e.display.input.onContextMenu(t):gi(e)))}}function hs(t,e,n){if("char"==n)return new br(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new br(mt(e.line,0),wt(t.doc,mt(e.line+1,0)));var i=n(t,e);return new br(i.from,i.to)}function ps(t,e,n,i){var r,o;if(e.touches)r=e.touches[0].clientX,o=e.touches[0].clientY;else try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&le(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!se(t,n))return ue(e);o-=a.top-s.viewOffset;for(var l=0;l<t.options.gutters.length;++l){var c=s.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=r)return ie(t,n,t,ht(t.doc,o),t.options.gutters[l],e),ue(e)}}function fs(t,e){return ps(t,e,"gutterClick",!0)}function ms(t,e){wn(t.display,e)||function(t,e){if(!se(t,"gutterContextMenu"))return!1;return ps(t,e,"gutterContextMenu",!1)}(t,e)||re(t,e,"contextmenu")||C||t.display.input.onContextMenu(e)}function gs(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),zn(t)}us.prototype.compare=function(t,e,n){return this.time+400>t&&0==gt(e,this.pos)&&n==this.button};var vs={toString:function(){return"CodeMirror.Init"}},bs={},ys={};function xs(t){ur(t),Ji(t),wi(t)}function _s(t,e,n){if(!e!=!(n&&n!=vs)){var i=t.display.dragFunctions,r=e?te:ne;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function ws(t){t.options.lineWrapping?(A(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(S(t.display.wrapper,"CodeMirror-wrap"),Vt(t)),si(t),Ji(t),zn(t),setTimeout(function(){return Ni(t)},100)}function Cs(t,e){var i=this;if(!(this instanceof Cs))return new Cs(t,e);this.options=e=e?$(e):{},$(bs,e,!1),dr(e);var r=e.value;"string"==typeof r?r=new So(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var o=new Cs.inputStyles[e.inputStyle](this),c=this.display=new function(t,e,i){var r=this;this.input=i,r.scrollbarFiller=E("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=E("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=T("div",null,"CodeMirror-code"),r.selectionDiv=E("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=E("div",null,"CodeMirror-cursors"),r.measure=E("div",null,"CodeMirror-measure"),r.lineMeasure=E("div",null,"CodeMirror-measure"),r.lineSpace=T("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var o=T("div",[r.lineSpace],"CodeMirror-lines");r.mover=E("div",[o],null,"position: relative"),r.sizer=E("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=E("div",null,null,"position: absolute; height: "+H+"px; width: 1px;"),r.gutters=E("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=E("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=E("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),s&&a<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),l||n&&v||(r.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(r.wrapper):t(r.wrapper)),r.viewFrom=r.viewTo=e.first,r.reportedViewFrom=r.reportedViewTo=e.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,i.init(r)}(t,r,o);for(var u in c.wrapper.CodeMirror=this,ur(this),gs(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ri(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},e.autofocus&&!v&&c.input.focus(),s&&a<11&&setTimeout(function(){return i.display.input.reset(!0)},20),function(t){var e=t.display;te(e.scroller,"mousedown",Vi(t,ds)),te(e.scroller,"dblclick",s&&a<11?Vi(t,function(e){if(!re(t,e)){var n=ai(t,e);if(n&&!fs(t,e)&&!wn(t.display,e)){le(e);var i=t.findWordAt(n);Br(t.doc,i.anchor,i.head)}}}):function(e){return re(t,e)||le(e)});te(e.scroller,"contextmenu",function(e){return ms(t,e)});var n,i={end:0};function r(){e.activeTouch&&(n=setTimeout(function(){return e.activeTouch=null},1e3),(i=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,i=e.top-t.top;return n*n+i*i>400}te(e.scroller,"touchstart",function(r){if(!re(t,r)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(r)&&!fs(t,r)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-i.end<=300?i:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}}),te(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),te(e.scroller,"touchend",function(n){var i=e.activeTouch;if(i&&!wn(e,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var s,a=t.coordsChar(e.activeTouch,"page");s=!i.prev||o(i,i.prev)?new br(a,a):!i.prev.prev||o(i,i.prev.prev)?t.findWordAt(a):new br(mt(a.line,0),wt(t.doc,mt(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),le(n)}r()}),te(e.scroller,"touchcancel",r),te(e.scroller,"scroll",function(){e.scroller.clientHeight&&(Ti(t,e.scroller.scrollTop),Ii(t,e.scroller.scrollLeft,!0),ie(t,"scroll",t))}),te(e.scroller,"mousewheel",function(e){return gr(t,e)}),te(e.scroller,"DOMMouseScroll",function(e){return gr(t,e)}),te(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(e){re(t,e)||de(e)},over:function(e){re(t,e)||(!function(t,e){var n=ai(t,e);if(n){var i=document.createDocumentFragment();di(t,n,i),t.display.dragCursor||(t.display.dragCursor=E("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),L(t.display.dragCursor,i)}}(t,e),de(e))},start:function(e){return function(t,e){if(s&&(!t.state.draggingText||+new Date-Do<100))de(e);else if(!re(t,e)&&!wn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!h)){var n=E("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(t,e)},drop:Vi(t,Lo),leave:function(e){re(t,e)||Eo(t)}};var l=e.input.getField();te(l,"keyup",function(e){return ss.call(t,e)}),te(l,"keydown",Vi(t,os)),te(l,"keypress",Vi(t,as)),te(l,"focus",function(e){return vi(t,e)}),te(l,"blur",function(e){return bi(t,e)})}(this),Io(),Hi(this),this.curOp.forceUpdate=!0,Tr(this,r),e.autofocus&&!v||this.hasFocus()?setTimeout(N(vi,this),20):bi(this),ys)ys.hasOwnProperty(u)&&ys[u](i,e[u],vs);Ci(this),e.finishInit&&e.finishInit(this);for(var p=0;p<ks.length;++p)ks[p](i);Wi(this),l&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(c.lineDiv).textRendering&&(c.lineDiv.style.textRendering="auto")}Cs.defaults=bs,Cs.optionHandlers=ys;var ks=[];function Ps(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=Fe(t,e).state:n="prev");var s=t.options.tabSize,a=at(o,e),l=F(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==W||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?F(at(o,e-1).text,null,s):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(t.options.indentWithTabs)for(var p=Math.floor(c/s);p;--p)h+=s,d+="\t";if(h<c&&(d+=V(c-h)),d!=u)return co(o,d,mt(e,0),mt(e,u.length),"+input"),a.stateAfter=null,!0;for(var f=0;f<o.sel.ranges.length;f++){var m=o.sel.ranges[f];if(m.head.line==e&&m.head.ch<u.length){var g=mt(e,u.length);qr(o,f,new br(g,g));break}}}Cs.defineInitHook=function(t){return ks.push(t)};var Ss=null;function Ds(t){Ss=t}function Ls(t,e,n,i,r){var o=t.doc;t.display.shift=!1,i||(i=o.sel);var s=+new Date-200,a="paste"==r||t.state.pasteIncoming>s,l=xe(e),c=null;if(a&&i.ranges.length>1)if(Ss&&Ss.text.join("\n")==e){if(i.ranges.length%Ss.text.length==0){c=[];for(var u=0;u<Ss.text.length;u++)c.push(o.splitLines(Ss.text[u]))}}else l.length==i.ranges.length&&t.options.pasteLinesPerSelection&&(c=K(l,function(t){return[t]}));for(var d=t.curOp.updateInput,h=i.ranges.length-1;h>=0;h--){var p=i.ranges[h],f=p.from(),m=p.to();p.empty()&&(n&&n>0?f=mt(f.line,f.ch-n):t.state.overwrite&&!a?m=mt(m.line,Math.min(at(o,m.line).text.length,m.ch+X(l).length)):a&&Ss&&Ss.lineWise&&Ss.text.join("\n")==e&&(f=m=mt(f.line,0)));var g={from:f,to:m,text:c?c[h%c.length]:l,origin:r||(a?"paste":t.state.cutIncoming>s?"cut":"+input")};ro(t.doc,g),ln(t,"inputRead",t,g)}e&&!a&&Ts(t,e),Si(t),t.curOp.updateInput<2&&(t.curOp.updateInput=d),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Es(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Yi(e,function(){return Ls(e,n,0,null,"paste")}),!0}function Ts(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=t.getModeAt(r.head),s=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(e.indexOf(o.electricChars.charAt(a))>-1){s=Ps(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(at(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Ps(t,r.head.line,"smart"));s&&ln(t,"electricInput",t,r.head.line)}}}function Ms(t){for(var e=[],n=[],i=0;i<t.doc.sel.ranges.length;i++){var r=t.doc.sel.ranges[i].head.line,o={anchor:mt(r,0),head:mt(r+1,0)};n.push(o),e.push(t.getRange(o.anchor,o.head))}return{text:e,ranges:n}}function Is(t,e,n,i){t.setAttribute("autocorrect",!!n),t.setAttribute("autocapitalize",!!i),t.setAttribute("spellcheck",!!e)}function As(){var t=E("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=E("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?t.style.width="1000px":t.setAttribute("wrap","off"),m&&(t.style.border="1px solid black"),Is(t),e}function js(t,e,n,i,r){var o=e,s=n,a=at(t,e.line);function l(i){var o,s;if(null==(o=r?function(t,e,n,i){var r=Zt(e,t.doc.direction);if(!r)return Vo(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Kt(r,n.ch,n.sticky),s=r[o];if("ltr"==t.doc.direction&&s.level%2==0&&(i>0?s.to>n.ch:s.from<n.ch))return Vo(e,n,i);var a,l=function(t,n){return Yo(e,t instanceof mt?t.ch:t,n)},c=function(n){return t.options.lineWrapping?(a=a||In(t,e),Zn(t,e,a,n)):{begin:0,end:e.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==t.doc.direction||1==s.level){var d=1==s.level==i<0,h=l(n,d?1:-1);if(null!=h&&(d?h<=s.to&&h<=u.end:h>=s.from&&h>=u.begin)){var p=d?"before":"after";return new mt(n.line,h,p)}}var f=function(t,e,i){for(var o=function(t,e){return e?new mt(n.line,l(t,1),"before"):new mt(n.line,t,"after")};t>=0&&t<r.length;t+=e){var s=r[t],a=e>0==(1!=s.level),c=a?i.begin:l(i.end,-1);if(s.from<=c&&c<s.to)return o(c,a);if(c=a?s.from:l(s.to,-1),i.begin<=c&&c<i.end)return o(c,a)}},m=f(o+i,i,u);if(m)return m;var g=i>0?u.end:l(u.begin,-1);return null==g||i>0&&g==e.text.length||!(m=f(i>0?0:r.length-1,i,c(g)))?null:m}(t.cm,a,e,n):Vo(a,e,n))){if(i||(s=e.line+n)<t.first||s>=t.first+t.size||(e=new mt(s,e.ch,e.sticky),!(a=at(t,s))))return!1;e=Xo(r,t.cm,a,e.line,n)}else e=o;return!0}if("char"==i)l();else if("column"==i)l(!0);else if("word"==i||"group"==i)for(var c=null,u="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),h=!0;!(n<0)||l(!h);h=!1){var p=a.text.charAt(e.ch)||"\n",f=et(p,d)?"w":u&&"\n"==p?"n":!u||/\s/.test(p)?null:"p";if(!u||h||f||(f="s"),c&&c!=f){n<0&&(n=1,l(),e.sticky="after");break}if(f&&(c=f),n>0&&!l(!h))break}var m=to(t,e,o,s,!0);return vt(o,m)&&(m.hitSide=!0),m}function Os(t,e,n,i){var r,o,s=t.doc,a=e.left;if("page"==i){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ei(t.display),3);r=(n>0?e.bottom:e.top)+n*c}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(;(o=Kn(t,a,r)).outside;){if(n<0?r<=0:r>=s.height){o.hitSide=!0;break}r+=5*n}return o}var Ns=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function $s(t,e){var n=Mn(t,e.line);if(!n||n.hidden)return null;var i=at(t.doc,e.line),r=En(n,i,e.line),o=Zt(i,t.doc.direction),s="left";o&&(s=Kt(o,e.ch)%2?"right":"left");var a=Nn(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Fs(t,e){return e&&(t.bad=!0),t}function Rs(t,e,n){var i;if(e==t.display.lineDiv){if(!(i=t.display.lineDiv.childNodes[n]))return Fs(t.clipPos(mt(t.display.viewTo-1)),!0);e=null,n=0}else for(i=e;;i=i.parentNode){if(!i||i==t.display.lineDiv)return null;if(i.parentNode&&i.parentNode==t.display.lineDiv)break}for(var r=0;r<t.display.view.length;r++){var o=t.display.view[r];if(o.node==i)return zs(o,e,n)}}function zs(t,e,n){var i=t.text.firstChild,r=!1;if(!e||!M(i,e))return Fs(mt(dt(t.line),0),!0);if(e==i&&(r=!0,e=i.childNodes[n],n=0,!e)){var o=t.rest?X(t.rest):t.line;return Fs(mt(dt(o),o.text.length),r)}var s=3==e.nodeType?e:null,a=e;for(s||1!=e.childNodes.length||3!=e.firstChild.nodeType||(s=e.firstChild,n&&(n=s.nodeValue.length));a.parentNode!=i;)a=a.parentNode;var l=t.measure,c=l.maps;function u(e,n,i){for(var r=-1;r<(c?c.length:0);r++)for(var o=r<0?l.map:c[r],s=0;s<o.length;s+=3){var a=o[s+2];if(a==e||a==n){var u=dt(r<0?t.line:t.rest[r]),d=o[s]+i;return(i<0||a!=e)&&(d=o[s+(i?1:0)]),mt(u,d)}}}var d=u(s,a,n);if(d)return Fs(d,r);for(var h=a.nextSibling,p=s?s.nodeValue.length-n:0;h;h=h.nextSibling){if(d=u(h,h.firstChild,0))return Fs(mt(d.line,d.ch-p),r);p+=h.textContent.length}for(var f=a.previousSibling,m=n;f;f=f.previousSibling){if(d=u(f,f.firstChild,-1))return Fs(mt(d.line,d.ch+m),r);m+=f.textContent.length}}Ns.prototype.init=function(t){var e=this,n=this,i=n.cm,r=n.div=t.lineDiv;function o(t){if(!re(i,t)){if(i.somethingSelected())Ds({lineWise:!1,text:i.getSelections()}),"cut"==t.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var e=Ms(i);Ds({lineWise:!0,text:e.text}),"cut"==t.type&&i.operation(function(){i.setSelections(e.ranges,0,B),i.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var o=Ss.text.join("\n");if(t.clipboardData.setData("Text",o),t.clipboardData.getData("Text")==o)return void t.preventDefault()}var s=As(),a=s.firstChild;i.display.lineSpace.insertBefore(s,i.display.lineSpace.firstChild),a.value=Ss.text.join("\n");var l=document.activeElement;O(a),setTimeout(function(){i.display.lineSpace.removeChild(s),l.focus(),l==r&&n.showPrimarySelection()},50)}}Is(r,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize),te(r,"paste",function(t){re(i,t)||Es(t,i)||a<=11&&setTimeout(Vi(i,function(){return e.updateFromDOM()}),20)}),te(r,"compositionstart",function(t){e.composing={data:t.data,done:!1}}),te(r,"compositionupdate",function(t){e.composing||(e.composing={data:t.data,done:!1})}),te(r,"compositionend",function(t){e.composing&&(t.data!=e.composing.data&&e.readFromDOMSoon(),e.composing.done=!0)}),te(r,"touchstart",function(){return n.forceCompositionEnd()}),te(r,"input",function(){e.composing||e.readFromDOMSoon()}),te(r,"copy",o),te(r,"cut",o)},Ns.prototype.prepareSelection=function(){var t=ui(this.cm,!1);return t.focus=this.cm.state.focused,t},Ns.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ns.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ns.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,i=e.doc.sel.primary(),r=i.from(),o=i.to();if(e.display.viewTo==e.display.viewFrom||r.line>=e.display.viewTo||o.line<e.display.viewFrom)t.removeAllRanges();else{var s=Rs(e,t.anchorNode,t.anchorOffset),a=Rs(e,t.focusNode,t.focusOffset);if(!s||s.bad||!a||a.bad||0!=gt(xt(s,a),r)||0!=gt(yt(s,a),o)){var l=e.display.view,c=r.line>=e.display.viewFrom&&$s(e,r)||{node:l[0].measure.map[2],offset:0},u=o.line<e.display.viewTo&&$s(e,o);if(!u){var d=l[l.length-1].measure,h=d.maps?d.maps[d.maps.length-1]:d.map;u={node:h[h.length-1],offset:h[h.length-2]-h[h.length-3]}}if(c&&u){var p,f=t.rangeCount&&t.getRangeAt(0);try{p=P(c.node,c.offset,u.offset,u.node)}catch(t){}p&&(!n&&e.state.focused?(t.collapse(c.node,c.offset),p.collapsed||(t.removeAllRanges(),t.addRange(p))):(t.removeAllRanges(),t.addRange(p)),f&&null==t.anchorNode?t.addRange(f):n&&this.startGracePeriod()),this.rememberSelection()}else t.removeAllRanges()}}},Ns.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation(function(){return t.cm.curOp.selectionChanged=!0})},20)},Ns.prototype.showMultipleSelections=function(t){L(this.cm.display.cursorDiv,t.cursors),L(this.cm.display.selectionDiv,t.selection)},Ns.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},Ns.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return M(this.div,e)},Ns.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ns.prototype.blur=function(){this.div.blur()},Ns.prototype.getField=function(){return this.div},Ns.prototype.supportsTouch=function(){return!0},Ns.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():Yi(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))})},Ns.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},Ns.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(g&&u&&this.cm.options.gutters.length&&function(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Rs(e,t.anchorNode,t.anchorOffset),i=Rs(e,t.focusNode,t.focusOffset);n&&i&&Yi(e,function(){Vr(e.doc,xr(n,i),B),(n.bad||i.bad)&&(e.curOp.selectionChanged=!0)})}}},Ns.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t,e,n,i=this.cm,r=i.display,o=i.doc.sel.primary(),s=o.from(),a=o.to();if(0==s.ch&&s.line>i.firstLine()&&(s=mt(s.line-1,at(i.doc,s.line-1).length)),a.ch==at(i.doc,a.line).text.length&&a.line<i.lastLine()&&(a=mt(a.line+1,0)),s.line<r.viewFrom||a.line>r.viewTo-1)return!1;s.line==r.viewFrom||0==(t=li(i,s.line))?(e=dt(r.view[0].line),n=r.view[0].node):(e=dt(r.view[t].line),n=r.view[t-1].node.nextSibling);var l,c,u=li(i,a.line);if(u==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=dt(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!n)return!1;for(var d=i.doc.splitLines(function(t,e,n,i,r){var o="",s=!1,a=t.doc.lineSeparator(),l=!1;function c(){s&&(o+=a,l&&(o+=a),s=l=!1)}function u(t){t&&(c(),o+=t)}function d(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,h=e.getAttribute("cm-marker");if(h){var p=t.findMarks(mt(i,0),mt(r+1,0),(g=+h,function(t){return t.id==g}));return void(p.length&&(o=p[0].find(0))&&u(lt(t.doc,o.from,o.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;f&&c();for(var m=0;m<e.childNodes.length;m++)d(e.childNodes[m]);/^(pre|p)$/i.test(e.nodeName)&&(l=!0),f&&(s=!0)}else 3==e.nodeType&&u(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;d(e),e!=n;)e=e.nextSibling,l=!1;return o}(i,n,c,e,l)),h=lt(i.doc,mt(e,0),mt(l,at(i.doc,l).text.length));d.length>1&&h.length>1;)if(X(d)==X(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),e++}for(var p=0,f=0,m=d[0],g=h[0],v=Math.min(m.length,g.length);p<v&&m.charCodeAt(p)==g.charCodeAt(p);)++p;for(var b=X(d),y=X(h),x=Math.min(b.length-(1==d.length?p:0),y.length-(1==h.length?p:0));f<x&&b.charCodeAt(b.length-f-1)==y.charCodeAt(y.length-f-1);)++f;if(1==d.length&&1==h.length&&e==s.line)for(;p&&p>s.ch&&b.charCodeAt(b.length-f-1)==y.charCodeAt(y.length-f-1);)p--,f++;d[d.length-1]=b.slice(0,b.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var _=mt(e,p),w=mt(l,h.length?X(h).length-f:0);return d.length>1||d[0]||gt(_,w)?(co(i.doc,d,_,w,"+input"),!0):void 0},Ns.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ns.prototype.reset=function(){this.forceCompositionEnd()},Ns.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ns.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},Ns.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Yi(this.cm,function(){return Ji(t.cm)})},Ns.prototype.setUneditable=function(t){t.contentEditable="false"},Ns.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Vi(this.cm,Ls)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ns.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ns.prototype.onContextMenu=function(){},Ns.prototype.resetPosition=function(){},Ns.prototype.needsContentAttribute=!0;var Hs=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};Hs.prototype.init=function(t){var e=this,n=this,i=this.cm;this.createField(t);var r=this.textarea;function o(t){if(!re(i,t)){if(i.somethingSelected())Ds({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=Ms(i);Ds({lineWise:!0,text:e.text}),"cut"==t.type?i.setSelections(e.ranges,null,B):(n.prevInput="",r.value=e.text.join("\n"),O(r))}"cut"==t.type&&(i.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),m&&(r.style.width="0px"),te(r,"input",function(){s&&a>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()}),te(r,"paste",function(t){re(i,t)||Es(t,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())}),te(r,"cut",o),te(r,"copy",o),te(t.scroller,"paste",function(e){if(!wn(t,e)&&!re(i,e)){if(!r.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,r.dispatchEvent(o)}}),te(t.lineSpace,"selectstart",function(e){wn(t,e)||le(e)}),te(r,"compositionstart",function(){var t=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}}),te(r,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Hs.prototype.createField=function(t){this.wrapper=As(),this.textarea=this.wrapper.firstChild},Hs.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=ui(t);if(t.options.moveInputWithCursor){var r=Yn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+s.top-o.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+s.left-o.left))}return i},Hs.prototype.showSelection=function(t){var e=this.cm.display;L(e.cursorDiv,t.cursors),L(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Hs.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&O(this.textarea),s&&a>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null))}},Hs.prototype.getField=function(){return this.textarea},Hs.prototype.supportsTouch=function(){return!1},Hs.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||I()!=this.textarea))try{this.textarea.focus()}catch(t){}},Hs.prototype.blur=function(){this.textarea.blur()},Hs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Hs.prototype.receivedFocus=function(){this.slowPoll()},Hs.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Hs.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))})},Hs.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||_e(n)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==i&&!e.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===r||b&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||i||(i=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(i.length,r.length);l<c&&i.charCodeAt(l)==r.charCodeAt(l);)++l;return Yi(e,function(){Ls(e,r.slice(l),i.length-l,null,t.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Hs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Hs.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},Hs.prototype.onContextMenu=function(t){var e=this,n=e.cm,i=n.display,r=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=ai(n,t),c=i.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Vi(n,Vr)(n.doc,xr(o),B);var u,h=r.style.cssText,p=e.wrapper.style.cssText,f=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-f.top-5)+"px; left: "+(t.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(s?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),i.input.focus(),l&&window.scrollTo(null,u),i.input.reset(),n.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=v,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),s&&a>=9&&g(),C){de(t);var m=function(){ne(window,"mouseup",m),setTimeout(v,20)};te(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=r.selectionStart){var t=n.somethingSelected(),o=""+(t?r.value:"");r.value="⇚",r.value=o,e.prevInput=t?"":"",r.selectionStart=1,r.selectionEnd=o.length,i.selForContextMenu=n.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=p,r.style.cssText=h,s&&a<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=r.selectionStart)){(!s||s&&a<9)&&g();var t=0,o=function(){i.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&""==e.prevInput?Vi(n,no)(n):t++<10?i.detectingSelectAll=setTimeout(o,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(o,200)}}},Hs.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Hs.prototype.setUneditable=function(){},Hs.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,i,r,o){t.defaults[n]=i,r&&(e[n]=o?function(t,e,n){n!=vs&&r(t,e,n)}:r)}t.defineOption=n,t.Init=vs,n("value","",function(t,e){return t.setValue(e)},!0),n("mode",null,function(t,e){t.doc.modeOption=e,Pr(t)},!0),n("indentUnit",2,Pr,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(t){Sr(t),zn(t),Ji(t)},!0),n("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],i=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var o=t.text.indexOf(e,r);if(-1==o)break;r=o+e.length,n.push(mt(i,o))}i++});for(var r=n.length-1;r>=0;r--)co(t.doc,e,n[r],mt(n[r].line,n[r].ch+e.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=vs&&t.refresh()}),n("specialCharPlaceholder",Ze,function(t){return t.refresh()},!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),n("autocorrect",!1,function(t,e){return t.getInputField().autocorrect=e},!0),n("autocapitalize",!1,function(t,e){return t.getInputField().autocapitalize=e},!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",function(t){gs(t),xs(t)},!0),n("keyMap","default",function(t,e,n){var i=qo(e),r=n!=vs&&qo(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,ws,!0),n("gutters",[],function(t){dr(t.options),xs(t)},!0),n("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?ri(t.display)+"px":"0",t.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(t){return Ni(t)},!0),n("scrollbarStyle","native",function(t){Ri(t),Ni(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),n("lineNumbers",!1,function(t){dr(t.options),xs(t)},!0),n("firstLineNumber",1,xs,!0),n("lineNumberFormatter",function(t){return t},xs,!0),n("showCursorWhenSelecting",!1,ci,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(t,e){"nocursor"==e&&(bi(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),n("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),n("dragDrop",!0,_s),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,ci,!0),n("singleCursorHeightPerLine",!0,ci,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Sr,!0),n("addModeClass",!1,Sr,!0),n("pollInterval",100),n("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),n("historyEventDelay",1250),n("viewportMargin",10,function(t){return t.refresh()},!0),n("maxHighlightLength",1e4,Sr,!0),n("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),n("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),n("autofocus",null),n("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0),n("phrases",null)}(Cs),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var i=this.options,r=i[t];i[t]==n&&"mode"!=t||(i[t]=n,e.hasOwnProperty(t)&&Vi(this,e[t])(this,n,r),ie(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](qo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;n<e.length;++n)if(e[n]==t||e[n].name==t)return e.splice(n,1),!0},addOverlay:Xi(function(e,n){var i=e.token?e:t.getMode(this.options,e);if(i.startState)throw new Error("Overlays may not be stateful.");!function(t,e,n){for(var i=0,r=n(e);i<t.length&&n(t[i])<=r;)i++;t.splice(i,0,e)}(this.state.overlays,{mode:i,modeSpec:e,opaque:n&&n.opaque,priority:n&&n.priority||0},function(t){return t.priority}),this.state.modeGen++,Ji(this)}),removeOverlay:Xi(function(t){for(var e=this.state.overlays,n=0;n<e.length;++n){var i=e[n].modeSpec;if(i==t||"string"==typeof t&&i.name==t)return e.splice(n,1),this.state.modeGen++,void Ji(this)}}),indentLine:Xi(function(t,e,n){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),pt(this.doc,t)&&Ps(this,t,e,n)}),indentSelection:Xi(function(t){for(var e=this.doc.sel.ranges,n=-1,i=0;i<e.length;i++){var r=e[i];if(r.empty())r.head.line>n&&(Ps(this,r.head.line,t,!0),n=r.head.line,i==this.doc.sel.primIndex&&Si(this));else{var o=r.from(),s=r.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l<n;++l)Ps(this,l,t);var c=this.doc.sel.ranges;0==o.ch&&e.length==c.length&&c[i].from().ch>0&&qr(this.doc,i,new br(o,c[i].to()),B)}}}),getTokenAt:function(t,e){return Be(this,t,e)},getLineTokens:function(t,e){return Be(this,mt(t),e,!0)},getTokenTypeAt:function(t){t=wt(this.doc,t);var e,n=$e(this,at(this.doc,t.line)),i=0,r=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var s=i+r>>1;if((s?n[2*s-1]:0)>=o)r=s;else{if(!(n[2*s+1]<o)){e=n[2*s+2];break}i=s+1}}var a=e?e.indexOf("overlay "):-1;return a<0?e:0==a?null:e.slice(0,a-1)},getModeAt:function(e){var n=this.doc.mode;return n.innerMode?t.innerMode(n,this.getTokenAt(e).state).mode:n},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var i=[];if(!n.hasOwnProperty(e))return i;var r=n[e],o=this.getModeAt(t);if("string"==typeof o[e])r[o[e]]&&i.push(r[o[e]]);else if(o[e])for(var s=0;s<o[e].length;s++){var a=r[o[e][s]];a&&i.push(a)}else o.helperType&&r[o.helperType]?i.push(r[o.helperType]):r[o.name]&&i.push(r[o.name]);for(var l=0;l<r._global.length;l++){var c=r._global[l];c.pred(o,this)&&-1==z(i,c.val)&&i.push(c.val)}return i},getStateAfter:function(t,e){var n=this.doc;return Fe(this,(t=_t(n,null==t?n.first+n.size-1:t))+1,e).state},cursorCoords:function(t,e){var n=this.doc.sel.primary();return Yn(this,null==t?n.head:"object"==typeof t?wt(this.doc,t):t?n.from():n.to(),e||"page")},charCoords:function(t,e){return Gn(this,wt(this.doc,t),e||"page")},coordsChar:function(t,e){return Kn(this,(t=qn(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=qn(this,{top:t,left:0},e||"page").top,ht(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,n){var i,r=!1;if("number"==typeof t){var o=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:t>o&&(t=o,r=!0),i=at(this.doc,t)}else i=t;return Un(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-Gt(i):0)},defaultTextHeight:function(){return ei(this.display)},defaultCharWidth:function(){return ni(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o,s,a,l=this.display,c=(t=Yn(this,wt(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==i)c=t.top;else if("above"==i||"near"==i){var d=Math.max(l.wrapper.clientHeight,this.doc.height),h=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>d)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=d&&(c=t.bottom),u+e.offsetWidth>h&&(u=h-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==r?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?u=0:"middle"==r&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),n&&(o=this,s={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(a=ki(o,s)).scrollTop&&Ti(o,a.scrollTop),null!=a.scrollLeft&&Ii(o,a.scrollLeft))},triggerOnKeyDown:Xi(os),triggerOnKeyPress:Xi(as),triggerOnKeyUp:ss,triggerOnMouseDown:Xi(ds),execCommand:function(t){if(Ko.hasOwnProperty(t))return Ko[t].call(null,this)},triggerElectric:Xi(function(t){Ts(this,t)}),findPosH:function(t,e,n,i){var r=1;e<0&&(r=-1,e=-e);for(var o=wt(this.doc,t),s=0;s<e&&!(o=js(this.doc,o,r,n,i)).hitSide;++s);return o},moveH:Xi(function(t,e){var n=this;this.extendSelectionsBy(function(i){return n.display.shift||n.doc.extend||i.empty()?js(n.doc,i.head,t,e,n.options.rtlMoveVisually):t<0?i.from():i.to()},q)}),deleteH:Xi(function(t,e){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):Go(this,function(n){var r=js(i,n.head,t,e,!1);return t<0?{from:r,to:n.head}:{from:n.head,to:r}})}),findPosV:function(t,e,n,i){var r=1,o=i;e<0&&(r=-1,e=-e);for(var s=wt(this.doc,t),a=0;a<e;++a){var l=Yn(this,s,"div");if(null==o?o=l.left:l.left=o,(s=Os(this,l,r,n)).hitSide)break}return s},moveV:Xi(function(t,e){var n=this,i=this.doc,r=[],o=!this.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy(function(s){if(o)return t<0?s.from():s.to();var a=Yn(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),r.push(a.left);var l=Os(n,a,t,e);return"page"==e&&s==i.sel.primary()&&Pi(n,Gn(n,l,"div").top-a.top),l},q),r.length)for(var s=0;s<i.sel.ranges.length;s++)i.sel.ranges[s].goalColumn=r[s]}),findWordAt:function(t){var e=at(this.doc,t.line).text,n=t.ch,i=t.ch;if(e){var r=this.getHelper(t,"wordChars");"before"!=t.sticky&&i!=e.length||!n?++i:--n;for(var o=e.charAt(n),s=et(o,r)?function(t){return et(t,r)}:/\s/.test(o)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!et(t)};n>0&&s(e.charAt(n-1));)--n;for(;i<e.length&&s(e.charAt(i));)++i}return new br(mt(t.line,n),mt(t.line,i))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?A(this.display.cursorDiv,"CodeMirror-overwrite"):S(this.display.cursorDiv,"CodeMirror-overwrite"),ie(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==I()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Xi(function(t,e){Di(this,t,e)}),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-Sn(this)-this.display.barHeight,width:t.scrollWidth-Sn(this)-this.display.barWidth,clientHeight:Ln(this),clientWidth:Dn(this)}},scrollIntoView:Xi(function(t,e){null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:mt(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line?function(t,e){Li(t),t.curOp.scrollToPos=e}(this,t):Ei(this,t.from,t.to,t.margin)}),setSize:Xi(function(t,e){var n=this,i=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=i(t)),null!=e&&(this.display.wrapper.style.height=i(e)),this.options.lineWrapping&&Rn(this);var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,function(t){if(t.widgets)for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){Zi(n,r,"widget");break}++r}),this.curOp.forceUpdate=!0,ie(this,"refresh",this)}),operation:function(t){return Yi(this,t)},startOperation:function(){return Hi(this)},endOperation:function(){return Wi(this)},refresh:Xi(function(){var t=this.display.cachedTextHeight;Ji(this),this.curOp.forceUpdate=!0,zn(this),Di(this,this.doc.scrollLeft,this.doc.scrollTop),lr(this),(null==t||Math.abs(t-ei(this.display))>.5)&&si(this),ie(this,"refresh",this)}),swapDoc:Xi(function(t){var e=this.doc;return e.cm=null,Tr(this,t),zn(this),this.display.input.reset(),Di(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,e),e}),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ae(t),t.registerHelper=function(e,i,r){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][i]=r},t.registerGlobalHelper=function(e,i,r,o){t.registerHelper(e,i,o),n[e]._global.push({pred:r,val:o})}}(Cs);var Ws="iter insert remove copy getEditor constructor".split(" ");for(var Bs in So.prototype)So.prototype.hasOwnProperty(Bs)&&z(Ws,Bs)<0&&(Cs.prototype[Bs]=function(t){return function(){return t.apply(this.doc,arguments)}}(So.prototype[Bs]));return ae(So),Cs.inputStyles={textarea:Hs,contenteditable:Ns},Cs.defineMode=function(t){Cs.defaults.mode||"null"==t||(Cs.defaults.mode=t),function(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ke[t]=e}.apply(this,arguments)},Cs.defineMIME=function(t,e){Pe[t]=e},Cs.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Cs.defineMIME("text/plain","null"),Cs.defineExtension=function(t,e){Cs.prototype[t]=e},Cs.defineDocExtension=function(t,e){So.prototype[t]=e},Cs.fromTextArea=function(t,e){if((e=e?$(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=I();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function i(){t.value=a.getValue()}var r;if(t.form&&(te(t.form,"submit",i),!e.leaveSubmitMethodAlone)){var o=t.form;r=o.submit;try{var s=o.submit=function(){i(),o.submit=r,o.submit(),o.submit=s}}catch(t){}}e.finishInit=function(e){e.save=i,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,i(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(ne(t.form,"submit",i),"function"==typeof t.form.submit&&(t.form.submit=r))}},t.style.display="none";var a=Cs(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return a},function(t){t.off=ne,t.on=te,t.wheelEventPixels=mr,t.Doc=So,t.splitLines=xe,t.countColumn=F,t.findColumn=G,t.isWordChar=tt,t.Pass=W,t.signal=ie,t.Line=Ge,t.changeEnd=_r,t.scrollbarModel=Fi,t.Pos=mt,t.cmpPos=gt,t.modes=ke,t.mimeModes=Pe,t.resolveMode=Se,t.getMode=De,t.modeExtensions=Le,t.extendMode=Ee,t.copyState=Te,t.startState=Ie,t.innerMode=Me,t.commands=Ko,t.keyMap=Fo,t.keyName=Uo,t.isModifierKey=Wo,t.lookupKey=Ho,t.normalizeKeyMap=zo,t.StringStream=Ae,t.SharedTextMarker=wo,t.TextMarker=xo,t.LineWidget=vo,t.e_preventDefault=le,t.e_stopPropagation=ce,t.e_stop=de,t.addClass=A,t.contains=M,t.rmClass=S,t.keyNames=jo}(Cs),Cs.version="5.45.0",Cs},t.exports=i()},645:function(t,e,n){var i;i=function(){"use strict";var t="millisecond",e="second",n="minute",i="hour",r="day",o="week",s="month",a="quarter",l="year",c=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,u=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},h={s:d,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+d(i,2,"0")+":"+d(r,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(n,s),r=e-i<0,o=t.clone().add(n+(r?-1:1),s);return Number(-(n+(e-i)/(r?i-o:o-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(c){return{M:s,y:l,w:o,d:r,h:i,m:n,s:e,ms:t,Q:a}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},f="en",m={};m[f]=p;var g=function(t){return t instanceof x},v=function(t,e,n){var i;if(!t)return null;if("string"==typeof t)m[t]&&(i=t),e&&(m[t]=e,i=t);else{var r=t.name;m[r]=t,i=r}return n||(f=i),i},b=function(t,e,n){if(g(t))return t.clone();var i=e?"string"==typeof e?{format:e,pl:n}:e:{};return i.date=t,new x(i)},y=h;y.l=v,y.i=g,y.w=function(t,e){return b(t,{locale:e.$L,utc:e.$u})};var x=function(){function d(t){this.$L=this.$L||v(t.locale,null,!0)||f,this.parse(t)}var h=d.prototype;return h.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(y.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(c);if(i)return n?new Date(Date.UTC(i[1],i[2]-1,i[3]||1,i[4]||0,i[5]||0,i[6]||0,i[7]||0)):new Date(i[1],i[2]-1,i[3]||1,i[4]||0,i[5]||0,i[6]||0,i[7]||0)}return new Date(e)}(t),this.init()},h.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},h.$utils=function(){return y},h.isValid=function(){return!("Invalid Date"===this.$d.toString())},h.isSame=function(t,e){var n=b(t);return this.startOf(e)<=n&&n<=this.endOf(e)},h.isAfter=function(t,e){return b(t)<this.startOf(e)},h.isBefore=function(t,e){return this.endOf(e)<b(t)},h.$g=function(t,e,n){return y.u(t)?this[e]:this.set(n,t)},h.year=function(t){return this.$g(t,"$y",l)},h.month=function(t){return this.$g(t,"$M",s)},h.day=function(t){return this.$g(t,"$W",r)},h.date=function(t){return this.$g(t,"$D","date")},h.hour=function(t){return this.$g(t,"$H",i)},h.minute=function(t){return this.$g(t,"$m",n)},h.second=function(t){return this.$g(t,"$s",e)},h.millisecond=function(e){return this.$g(e,"$ms",t)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(t,a){var c=this,u=!!y.u(a)||a,d=y.p(t),h=function(t,e){var n=y.w(c.$u?Date.UTC(c.$y,e,t):new Date(c.$y,e,t),c);return u?n:n.endOf(r)},p=function(t,e){return y.w(c.toDate()[t].apply(c.toDate(),(u?[0,0,0,0]:[23,59,59,999]).slice(e)),c)},f=this.$W,m=this.$M,g=this.$D,v="set"+(this.$u?"UTC":"");switch(d){case l:return u?h(1,0):h(31,11);case s:return u?h(1,m):h(0,m+1);case o:var b=this.$locale().weekStart||0,x=(f<b?f+7:f)-b;return h(u?g-x:g+(6-x),m);case r:case"date":return p(v+"Hours",0);case i:return p(v+"Minutes",1);case n:return p(v+"Seconds",2);case e:return p(v+"Milliseconds",3);default:return this.clone()}},h.endOf=function(t){return this.startOf(t,!1)},h.$set=function(o,a){var c,u=y.p(o),d="set"+(this.$u?"UTC":""),h=(c={},c[r]=d+"Date",c.date=d+"Date",c[s]=d+"Month",c[l]=d+"FullYear",c[i]=d+"Hours",c[n]=d+"Minutes",c[e]=d+"Seconds",c[t]=d+"Milliseconds",c)[u],p=u===r?this.$D+(a-this.$W):a;if(u===s||u===l){var f=this.clone().set("date",1);f.$d[h](p),f.init(),this.$d=f.set("date",Math.min(this.$D,f.daysInMonth())).toDate()}else h&&this.$d[h](p);return this.init(),this},h.set=function(t,e){return this.clone().$set(t,e)},h.get=function(t){return this[y.p(t)]()},h.add=function(t,a){var c,u=this;t=Number(t);var d=y.p(a),h=function(e){var n=new Date(u.$d);return n.setDate(n.getDate()+e*t),y.w(n,u)};if(d===s)return this.set(s,this.$M+t);if(d===l)return this.set(l,this.$y+t);if(d===r)return h(1);if(d===o)return h(7);var p=(c={},c[n]=6e4,c[i]=36e5,c[e]=1e3,c)[d]||1,f=this.valueOf()+t*p;return y.w(f,this)},h.subtract=function(t,e){return this.add(-1*t,e)},h.format=function(t){var e=this;if(!this.isValid())return"Invalid Date";var n=t||"YYYY-MM-DDTHH:mm:ssZ",i=y.z(this),r=this.$locale(),o=r.weekdays,s=r.months,a=function(t,e,n,i){return t&&t[e]||n[e].substr(0,i)},l=function(t){return y.s(e.$H%12||12,t,"0")},c={YY:String(this.$y).slice(-2),YYYY:String(this.$y),M:String(this.$M+1),MM:y.s(this.$M+1,2,"0"),MMM:a(r.monthsShort,this.$M,s,3),MMMM:s[this.$M],D:String(this.$D),DD:y.s(this.$D,2,"0"),d:String(this.$W),dd:a(r.weekdaysMin,this.$W,o,2),ddd:a(r.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(this.$H),HH:y.s(this.$H,2,"0"),h:l(1),hh:l(2),a:this.$H<12?"am":"pm",A:this.$H<12?"AM":"PM",m:String(this.$m),mm:y.s(this.$m,2,"0"),s:String(this.$s),ss:y.s(this.$s,2,"0"),SSS:y.s(this.$ms,3,"0"),Z:i};return n.replace(u,function(t,e){return e||c[t]||i.replace(":","")})},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(t,c,u){var d,h=y.p(c),p=b(t),f=6e4*(p.utcOffset()-this.utcOffset()),m=this-p,g=y.m(this,p);return g=(d={},d[l]=g/12,d[s]=g,d[a]=g/3,d[o]=(m-f)/6048e5,d[r]=(m-f)/864e5,d[i]=m/36e5,d[n]=m/6e4,d[e]=m/1e3,d)[h]||m,u?g:y.a(g)},h.daysInMonth=function(){return this.endOf(s).$D},h.$locale=function(){return m[this.$L]},h.locale=function(t,e){if(!t)return this.$L;var n=this.clone();return n.$L=v(t,e,!0),n},h.clone=function(){return y.w(this.toDate(),this)},h.toDate=function(){return new Date(this.$d)},h.toJSON=function(){return this.toISOString()},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},d}();return b.prototype=x.prototype,b.extend=function(t,e){return t(e,x,b),b},b.locale=v,b.isDayjs=g,b.unix=function(t){return b(1e3*t)},b.en=m[f],b.Ls=m,b},t.exports=i()},646:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(639),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(649);var a=function(t){n(647)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},647:function(t,e,n){var i=n(648);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("3d76622a",i,!0,{})},648:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,"#spin-model{position:fixed;left:20px;top:80px;background:#fff;z-index:99;border-radius:3px}#spin-model .svg-box{width:100px;height:66px;position:absolute;left:50%;top:50%;margin-left:-50px;margin-top:-33px;text-align:center}#spin-model .svg-box .sp1{display:block;font-size:12px;color:#999;padding-top:4px}#spin-model.spin-sp1{width:calc(100% - 40px);height:calc(100% - 100px)}#spin-model.spin-sp2{width:calc(100% - 240px);height:calc(100% - 100px);left:220px}",""])},649:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isSpin?n("div",{class:t.isLeft?"spin-sp2":"spin-sp1",attrs:{id:"spin-model"}},[n("div",{staticClass:"svg-box"},[n("svg",{staticClass:"lds-gears",staticStyle:{background:"none"},attrs:{width:"54px",height:"54px",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"}},[n("g",{attrs:{transform:"translate(50 50)"}},[n("g",{attrs:{transform:"translate(-19 -19) scale(0.6)"}},[n("g",{attrs:{transform:"rotate(107.866)"}},[n("animateTransform",{attrs:{attributeName:"transform",type:"rotate",values:"0;360",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}}),n("path",{attrs:{d:"M37.3496987939662 -7 L47.3496987939662 -7 L47.3496987939662 7 L37.3496987939662 7 A38 38 0 0 1 31.359972760794346 21.46047782418268 L31.359972760794346 21.46047782418268 L38.431040572659825 28.531545636048154 L28.531545636048154 38.431040572659825 L21.46047782418268 31.359972760794346 A38 38 0 0 1 7.0000000000000036 37.3496987939662 L7.0000000000000036 37.3496987939662 L7.000000000000004 47.3496987939662 L-6.999999999999999 47.3496987939662 L-7 37.3496987939662 A38 38 0 0 1 -21.46047782418268 31.35997276079435 L-21.46047782418268 31.35997276079435 L-28.531545636048154 38.431040572659825 L-38.43104057265982 28.531545636048158 L-31.359972760794346 21.460477824182682 A38 38 0 0 1 -37.3496987939662 7.000000000000007 L-37.3496987939662 7.000000000000007 L-47.3496987939662 7.000000000000008 L-47.3496987939662 -6.9999999999999964 L-37.3496987939662 -6.999999999999997 A38 38 0 0 1 -31.35997276079435 -21.460477824182675 L-31.35997276079435 -21.460477824182675 L-38.431040572659825 -28.531545636048147 L-28.53154563604818 -38.4310405726598 L-21.4604778241827 -31.35997276079433 A38 38 0 0 1 -6.999999999999992 -37.3496987939662 L-6.999999999999992 -37.3496987939662 L-6.999999999999994 -47.3496987939662 L6.999999999999977 -47.3496987939662 L6.999999999999979 -37.3496987939662 A38 38 0 0 1 21.460477824182686 -31.359972760794342 L21.460477824182686 -31.359972760794342 L28.531545636048158 -38.43104057265982 L38.4310405726598 -28.53154563604818 L31.35997276079433 -21.4604778241827 A38 38 0 0 1 37.3496987939662 -6.999999999999995 M0 -23A23 23 0 1 0 0 23 A23 23 0 1 0 0 -23",fill:"#0097e0"}})],1)]),t._v(" "),n("g",{attrs:{transform:"translate(19 19) scale(0.6)"}},[n("g",{attrs:{transform:"rotate(229.634)"}},[n("animateTransform",{attrs:{attributeName:"transform",type:"rotate",values:"360;0",keyTimes:"0;1",dur:"1s",begin:"-0.0625s",repeatCount:"indefinite"}}),n("path",{attrs:{d:"M37.3496987939662 -7 L47.3496987939662 -7 L47.3496987939662 7 L37.3496987939662 7 A38 38 0 0 1 31.359972760794346 21.46047782418268 L31.359972760794346 21.46047782418268 L38.431040572659825 28.531545636048154 L28.531545636048154 38.431040572659825 L21.46047782418268 31.359972760794346 A38 38 0 0 1 7.0000000000000036 37.3496987939662 L7.0000000000000036 37.3496987939662 L7.000000000000004 47.3496987939662 L-6.999999999999999 47.3496987939662 L-7 37.3496987939662 A38 38 0 0 1 -21.46047782418268 31.35997276079435 L-21.46047782418268 31.35997276079435 L-28.531545636048154 38.431040572659825 L-38.43104057265982 28.531545636048158 L-31.359972760794346 21.460477824182682 A38 38 0 0 1 -37.3496987939662 7.000000000000007 L-37.3496987939662 7.000000000000007 L-47.3496987939662 7.000000000000008 L-47.3496987939662 -6.9999999999999964 L-37.3496987939662 -6.999999999999997 A38 38 0 0 1 -31.35997276079435 -21.460477824182675 L-31.35997276079435 -21.460477824182675 L-38.431040572659825 -28.531545636048147 L-28.53154563604818 -38.4310405726598 L-21.4604778241827 -31.35997276079433 A38 38 0 0 1 -6.999999999999992 -37.3496987939662 L-6.999999999999992 -37.3496987939662 L-6.999999999999994 -47.3496987939662 L6.999999999999977 -47.3496987939662 L6.999999999999979 -37.3496987939662 A38 38 0 0 1 21.460477824182686 -31.359972760794342 L21.460477824182686 -31.359972760794342 L28.531545636048158 -38.43104057265982 L38.4310405726598 -28.53154563604818 L31.35997276079433 -21.4604778241827 A38 38 0 0 1 37.3496987939662 -6.999999999999995 M0 -23A23 23 0 1 0 0 23 A23 23 0 1 0 0 -23",fill:"#7f8b95"}})],1)])])]),t._v(" "),n("span",{staticClass:"sp1"},[t._v(t._s(t.$t("正在努力加载中...")))])])]):t._e()},staticRenderFns:[]};e.a=i},654:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(641),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(660);var a=function(t){n(655)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},655:function(t,e,n){var i=n(656);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("6a41b246",i,!0,{})},656:function(t,e,n){var i=n(124);(t.exports=n(34)(!1)).push([t.i,".main-layout-box.toggle{padding-left:0}.main-layout-box.toggle>.secondary-menu-model{left:-200px}.secondary-menu-model{position:fixed;left:0;top:0;width:200px;background:#41444c;height:100%;padding-top:80px}.secondary-menu-model .toogle-box{position:absolute;right:-1px;top:calc(50% - 50px)}.secondary-menu-model .toogle-box .tog-close{width:12px;height:102px;background:url("+i(n(657))+") no-repeat;display:inline-block}.secondary-menu-model .toogle-box .tog-open{width:12px;height:102px;background:url("+i(n(658))+") no-repeat;display:inline-block;position:absolute;right:-12px;top:0}.secondary-menu-model .leven-1 .name a{height:40px;line-height:40px;display:block;position:relative;padding-left:12px}.secondary-menu-model .leven-1 .name a>.icon{vertical-align:middle;font-size:15px;width:20px;text-align:center;color:#fff}.secondary-menu-model .leven-1 .name a>span{vertical-align:middle;padding-left:2px;font-size:14px;color:#fff}.secondary-menu-model .leven-1 .name a>.angle{position:absolute;right:12px;top:14px}.secondary-menu-model .leven-1 ul li{height:36px;line-height:36px;cursor:pointer;padding-left:39px;color:#fff}.secondary-menu-model .leven-1 ul li a{font-size:14px}.secondary-menu-model .leven-1 ul li.active{border-right:2px solid #2d8cf0;background:#2c2f39}.secondary-menu-model .leven-1 ul li.active span{font-weight:700;color:#2d8cf0}.secondary-menu-model .leven-1 .router-link-active,.secondary-menu-model .leven-1>.router-link-exact-active{background:#f0f6fb}.secondary-menu-model .leven-1 .router-link-active .name,.secondary-menu-model .leven-1>.router-link-exact-active .name{border-right:2px solid #2d8cf0;background:#2b2e38}.secondary-menu-model .leven-1 .router-link-active .name a span,.secondary-menu-model .leven-1>.router-link-exact-active .name a span{color:#2d8cf0;font-weight:700}.secondary-menu-model .leven-1 .router-link-active .name a .fa,.secondary-menu-model .leven-1>.router-link-exact-active .name a .fa{color:#2d8cf0}",""])},657:function(t,e,n){t.exports=n.p+"images/close.png?02806e641df25c1b4dbff4cb0af3984d"},658:function(t,e,n){t.exports=n.p+"images/open.png?97ec0726c7acab8a2a48282d68cea631"},659:function(t,e,n){"use strict";e.__esModule=!0;var i,r=n(36),o=(i=r)&&i.__esModule?i:{default:i};var s={projects:[{name:""+o.default.$t("项目首页"),id:1,path:"projects-index",isOpen:!0,icon:"fa-home",children:[]},{name:""+o.default.$t("工作流"),id:2,path:"",isOpen:!0,icon:"fa-gear",children:[{name:""+o.default.$t("工作流定义"),path:"definition",id:1},{name:""+o.default.$t("工作流实例"),path:"instance",id:2},{name:""+o.default.$t("任务实例"),path:"task-instance-list",id:3}]}],security:[{name:""+o.default.$t("租户管理"),id:1,path:"tenement-manage",isOpen:!0,icon:"fa-users",children:[]},{name:""+o.default.$t("用户管理"),id:1,path:"users-manage",isOpen:!0,icon:"fa-user-circle",children:[]},{name:""+o.default.$t("告警组管理"),id:1,path:"warning-groups-manage",isOpen:!0,icon:"fa-warning",children:[]},{name:""+o.default.$t("队列管理"),id:1,path:"queue-manage",isOpen:!0,icon:"fa-recycle",children:[]},{name:""+o.default.$t("服务管理"),id:1,path:"",isOpen:!0,icon:"fa-server",children:[{name:"master",path:"servers-master",id:1},{name:"worker",path:"servers-worker",id:2}]}],resource:[{name:""+o.default.$t("文件管理"),id:1,path:"file",isOpen:!0,icon:"fa-files-o",children:[],disabled:!1},{name:""+o.default.$t("UDF管理"),id:1,path:"",isOpen:!0,icon:"fa-file-text",disabled:!1,children:[{name:""+o.default.$t("资源管理"),path:"resource-udf-resource",id:1},{name:""+o.default.$t("函数管理"),path:"resource-udf-function",id:2}]}],user:[{name:""+o.default.$t("用户信息"),id:1,path:"account",isOpen:!0,icon:"fa-user",children:[],disabled:!1},{name:""+o.default.$t("修改密码"),id:1,path:"password",isOpen:!0,icon:"fa-key",children:[],disabled:!1}]};e.default=function(t){return s[t]}},660:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"secondary-menu-model",class:t.className},[n("div",{staticClass:"toogle-box"},[t.isTogHide?t._e():n("a",{staticClass:"tog-close",attrs:{href:"javascript:"},on:{click:t._toggleMenu}}),t._v(" "),t.isTogHide?n("a",{staticClass:"tog-open",attrs:{href:"javascript:"},on:{click:t._toggleMenu}}):t._e()]),t._v(" "),t._l(t.menuList,function(e,i){return n("div",{staticClass:"leven-1"},[e.path?[n("router-link",{attrs:{to:{name:e.path}}},[n("div",{staticClass:"name",on:{click:function(n){return t._toggleSubMenu(e)}}},[n("a",{attrs:{href:"javascript:"}},[n("i",{staticClass:"fa icon",class:e.icon}),t._v(" "),n("span",[t._v(t._s(e.name))]),t._v(" "),e.children.length?n("i",{staticClass:"fa angle",class:e.isOpen?"fa-angle-down":"fa-angle-right"}):t._e()])])])]:t._e(),t._v(" "),e.path?t._e():[n("div",{staticClass:"name",on:{click:function(n){return t._toggleSubMenu(e)}}},[n("a",{attrs:{href:"javascript:"}},[n("i",{staticClass:"fa icon",class:e.icon}),t._v(" "),n("span",[t._v(t._s(e.name))]),t._v(" "),e.children.length?n("i",{staticClass:"fa angle",class:e.isOpen?"fa-angle-down":"fa-angle-right"}):t._e()])])],t._v(" "),e.isOpen&&e.children.length?n("ul",t._l(e.children,function(e,i){return n("router-link",{attrs:{to:{name:e.path},tag:"li","active-class":"active"}},[n("span",[t._v(t._s(e.name))])])}),1):t._e()],2)})],2)},staticRenderFns:[]};e.a=i},661:function(t,e,n){"use strict";e.__esModule=!0,e.formatDate=void 0;var i,r=n(645),o=(i=r)&&i.__esModule?i:{default:i};e.formatDate=function(t,e){return e=e||"YYYY-MM-DD HH:mm:ss",(0,o.default)(t).format(e)}},675:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(776),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(925);var a=function(t){n(923)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},676:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(781),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(939);var a=function(t){n(937)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},682:function(t,e,n){"use strict";e.__esModule=!0;var i,r=n(644),o=(i=r)&&i.__esModule?i:{default:i};n(724),n(725),n(726),n(727),n(728),n(683),n(729),n(730),n(731),n(732),n(733),e.default=function(t,e){return o.default.fromTextArea(document.getElementById(t),Object.assign({lineNumbers:!0,theme:"mdn-like",readOnly:!0},{},e))}},683:function(t,e,n){(function(t){"use strict";function e(t){for(var e;null!=(e=t.next());)if("`"==e&&!t.eat("`"))return"variable-2";return t.backUp(t.current().length-1),t.eatWhile(/\w/)?"variable-2":null}function n(t){return t.eat("@")&&(t.match(/^session\./),t.match(/^local\./),t.match(/^global\./)),t.eat("'")?(t.match(/^.*'/),"variable-2"):t.eat('"')?(t.match(/^.*"/),"variable-2"):t.eat("`")?(t.match(/^.*`/),"variable-2"):t.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function i(t){return t.eat("N")?"atom":t.match(/^[a-zA-Z.#!?]/)?"variable-2":null}t.defineMode("sql",function(e,n){var i=n.client||{},a=n.atoms||{false:!0,true:!0,null:!0},l=n.builtin||o(s),c=n.keywords||o(r),u=n.operatorChars||/^[*+\-%<>!=&|~^\/]/,d=n.support||{},h=n.hooks||{},p=n.dateSQL||{date:!0,time:!0,timestamp:!0},f=!1!==n.backslashStringEscapes,m=n.brackets||/^[\{}\(\)\[\]]/,g=n.punctuation||/^[;.,:]/;function v(t,e){var n,r=t.next();if(h[r]){var o=h[r](t,e);if(!1!==o)return o}if(d.hexNumber&&("0"==r&&t.match(/^[xX][0-9a-fA-F]+/)||("x"==r||"X"==r)&&t.match(/^'[0-9a-fA-F]+'/)))return"number";if(d.binaryNumber&&(("b"==r||"B"==r)&&t.match(/^'[01]+'/)||"0"==r&&t.match(/^b[01]+/)))return"number";if(r.charCodeAt(0)>47&&r.charCodeAt(0)<58)return t.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),d.decimallessFloat&&t.match(/^\.(?!\.)/),"number";if("?"==r&&(t.eatSpace()||t.eol()||t.eat(";")))return"variable-3";if("'"==r||'"'==r&&d.doubleQuote)return e.tokenize=(n=r,function(t,e){for(var i,r=!1;null!=(i=t.next());){if(i==n&&!r){e.tokenize=v;break}r=f&&!r&&"\\"==i}return"string"}),e.tokenize(t,e);if((d.nCharCast&&("n"==r||"N"==r)||d.charsetCast&&"_"==r&&t.match(/[a-z][a-z0-9]*/i))&&("'"==t.peek()||'"'==t.peek()))return"keyword";if(d.commentSlashSlash&&"/"==r&&t.eat("/"))return t.skipToEnd(),"comment";if(d.commentHash&&"#"==r||"-"==r&&t.eat("-")&&(!d.commentSpaceRequired||t.eat(" ")))return t.skipToEnd(),"comment";if("/"==r&&t.eat("*"))return e.tokenize=function t(e){return function(n,i){var r=n.match(/^.*?(\/\*|\*\/)/);return r?"/*"==r[1]?i.tokenize=t(e+1):i.tokenize=e>1?t(e-1):v:n.skipToEnd(),"comment"}}(1),e.tokenize(t,e);if("."!=r){if(u.test(r))return t.eatWhile(u),"operator";if(m.test(r))return"bracket";if(g.test(r))return t.eatWhile(g),"punctuation";if("{"==r&&(t.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||t.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";t.eatWhile(/^[_\w\d]/);var s=t.current().toLowerCase();return p.hasOwnProperty(s)&&(t.match(/^( )+'[^']*'/)||t.match(/^( )+"[^"]*"/))?"number":a.hasOwnProperty(s)?"atom":l.hasOwnProperty(s)?"builtin":c.hasOwnProperty(s)?"keyword":i.hasOwnProperty(s)?"string-2":null}return d.zerolessFloat&&t.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":t.match(/^\.+/)?null:d.ODBCdotTable&&t.match(/^[\w\d_]+/)?"variable-2":void 0}function b(t,e,n){e.context={prev:e.context,indent:t.indentation(),col:t.column(),type:n}}return{startState:function(){return{tokenize:v,context:null}},token:function(t,e){if(t.sol()&&e.context&&null==e.context.align&&(e.context.align=!1),e.tokenize==v&&t.eatSpace())return null;var n=e.tokenize(t,e);if("comment"==n)return n;e.context&&null==e.context.align&&(e.context.align=!0);var i=t.current();return"("==i?b(t,e,")"):"["==i?b(t,e,"]"):e.context&&e.context.type==i&&function(t){t.indent=t.context.indent,t.context=t.context.prev}(e),n},indent:function(n,i){var r=n.context;if(!r)return t.Pass;var o=i.charAt(0)==r.type;return r.align?r.col+(o?0:1):r.indent+(o?0:e.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:d.commentSlashSlash?"//":d.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}});var r="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function o(t){for(var e={},n=t.split(" "),i=0;i<n.length;++i)e[n[i]]=!0;return e}var s="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";t.defineMIME("text/x-sql",{name:"sql",keywords:o(r+"begin"),builtin:o(s),atoms:o("false true null unknown"),dateSQL:o("date time timestamp"),support:o("ODBCdotTable doubleQuote binaryNumber hexNumber")}),t.defineMIME("text/x-mssql",{name:"sql",client:o("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:o(r+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:o("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:o("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:o("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":n}}),t.defineMIME("text/x-mysql",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(r+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":n,"`":e,"\\":i}}),t.defineMIME("text/x-mariadb",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(r+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":n,"`":e,"\\":i}}),t.defineMIME("text/x-sqlite",{name:"sql",client:o("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:o(r+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:o("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:o("date time timestamp datetime"),support:o("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":n,":":n,"?":n,$:n,'"':function(t){for(var e;null!=(e=t.next());)if('"'==e&&!t.eat('"'))return"variable-2";return t.backUp(t.current().length-1),t.eatWhile(/\w/)?"variable-2":null},"`":e}}),t.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:o("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:o("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:o("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:o("commentSlashSlash decimallessFloat"),hooks:{}}),t.defineMIME("text/x-plsql",{name:"sql",client:o("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:o("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:o("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:o("date time timestamp"),support:o("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),t.defineMIME("text/x-hive",{name:"sql",keywords:o("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:o("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:o("date timestamp"),support:o("ODBCdotTable doubleQuote binaryNumber hexNumber")}),t.defineMIME("text/x-pgsql",{name:"sql",client:o("source"),keywords:o(r+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:o("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:o("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),t.defineMIME("text/x-gql",{name:"sql",keywords:o("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:o("false true"),builtin:o("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),t.defineMIME("text/x-gpsql",{name:"sql",client:o("source"),keywords:o("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:o("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),t.defineMIME("text/x-sparksql",{name:"sql",keywords:o("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases datata dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:o("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:o("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable doubleQuote zerolessFloat")}),t.defineMIME("text/x-esper",{name:"sql",client:o("source"),keywords:o("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:o("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:o("time"),support:o("decimallessFloat zerolessFloat binaryNumber hexNumber")})})(n(644))},684:function(t,e,n){"use strict";e.__esModule=!0,e.fuzzyQuery=e.isEmial=e.warningTypeList=void 0;var i,r=n(36),o=(i=r)&&i.__esModule?i:{default:i};var s=[{id:"NONE",code:""+o.default.$t("都不发")},{id:"SUCCESS",code:""+o.default.$t("成功发")},{id:"FAILURE",code:""+o.default.$t("失败发")},{id:"ALL",code:""+o.default.$t("成功或失败都发")}];e.warningTypeList=s,e.isEmial=function(t){return/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/.test(t)},e.fuzzyQuery=function(t,e){for(var n=t.length,i=[],r=new RegExp(e),o=0;o<n;o++)t[o].match(r)&&i.push(t[o]);return i}},685:function(t,e,n){"use strict";e.__esModule=!0;var i=a(n(28)),r=a(n(36)),o=a(n(738)),s=n(684);function a(t){return t&&t.__esModule?t:{default:t}}e.default={name:"email",data:function(){return{tagModel:!1,email:"",activeIndex:null,emailList:[],index:0,emailWidth:100,isCn:!1}},props:{activeList:Array,repeatData:Array},model:{prop:"activeList",event:"valueEvent"},methods:{_manualEmail:function(){var t,e=this,n=this.email;(0,s.isEmial)(n)?(t=n,i.default.some(i.default.cloneDeep(e.repeatData).concat(i.default.cloneDeep(e.activeList)),function(e){return e===t})?this.$message.warning(""+r.default.$t("邮箱已存在!收件人和抄送人不能重复")):(this.emailWidth=0,this.activeList.push(n),this.email="",this._handlerEmailWitch())):this.$message.warning(""+r.default.$t("邮箱输入不合法"))},_handlerEmail:function(t){if(t){var e=i.default.cloneDeep(this.repeatData).concat(i.default.cloneDeep(this.activeList)).concat(o.default),n=(0,s.fuzzyQuery)(e,t);this.emailList=i.default.uniqWith(n.length&&n,i.default.isEqual),this.isEmail=!!n.length,this.emailList.length&&(this.index=1)}else this.emailList=[],this.isEmail=!1},_emailEnter:function(){this.emailList.length?this._selectEmail(this.index):this._manualEmail()},_emailDelete:function(){this.isCn||(this.emailWidth=0,i.default.isInteger(this.activeIndex)?(this.activeList.pop(),this.activeIndex=null):this.email||(this.activeIndex=this.activeList.length-1),this._handlerEmailWitch())},_del:function(t){this.emailWidth=0,this.activeList.splice(t,1),this._handlerEmailWitch()},_emailKeyup:function(t){var e,n=this.emailList.length;1!==n?n&&(this.index="up"===t?0===(e=this.index)||1===e?n:e-1:function(t){return 0===t||t===n?1:t+1}(this.index)):this.index=1},_selectEmail:function(t){var e=this,n=this.emailList[t-1];this.isEmail=!1,this.email="",i.default.filter(i.default.cloneDeep(this.repeatData).concat(i.default.cloneDeep(this.activeList)),function(t){return t===n}).length?this.$message.warning(""+r.default.$t("邮箱已存在!收件人和抄送人不能重复")):(this.emailWidth=0,this.activeList.push(n),this._handlerEmailWitch(),this.activeIndex=null,setTimeout(function(){e.$refs.emailInput.focus()},100))},_handlerEmailWitch:function(){var t=this;setTimeout(function(){t.emailWidth=parseInt(688-$(t.$refs.emailInput).position().left-20),t.emailWidth<80&&(t.emailWidth=200)},100)},_emailTab:function(){var t=this;this._emailEnter(),setTimeout(function(){t.$refs.emailInput.focus()},100)}},watch:{email:function(t){this._handlerEmail(t),this.activeIndex=null},activeList:function(t){this.$emit("valueEvent",t)}},created:function(){},mounted:function(){var t=this;setTimeout(function(){t._handlerEmailWitch()},500),$(".email-input").on("input",function(){$(this).prop("comStart")||(this.isCn=!1)}).on("compositionstart",function(){$(t).prop("comStart",!0),t.activeIndex=null,t.isCn=!0}).on("compositionend",function(){$(t).prop("comStart",!1),t.activeIndex=null,t.isCn=!1})}}},686:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n(28)),r=o(n(642));function o(t){return t&&t.__esModule?t:{default:t}}e.default={name:"priority",data:function(){return{priorityList:[{code:"HIGHEST",unicode:"&#xe632;",color:"#ff0000"},{code:"HIGH",unicode:"&#xe632;",color:"#ff0000"},{code:"MEDIUM",unicode:"&#xe632;",color:"#EA7D24"},{code:"LOW",unicode:"&#xeef8;",color:"#2A8734"},{code:"LOWEST",unicode:"&#xeef8;",color:"#2A8734"}]}},props:{value:{type:String,default:"MEDIUM"}},mixins:[r.default],model:{prop:"value",event:"priorityEvent"},methods:{_rtUnicode:function(t){var e=i.default.find(this.priorityList,["code",t]);return'<i class="iconfont" style="color:'+e.color+'">'+e.unicode+"</i>"},_onChange:function(t){this.value=t.value,this.$emit("priorityEvent",t.value)}},created:function(){},mounted:function(){},components:{}}},698:function(t,e,n){"use strict";e.__esModule=!0,e.rtBantpl=e.allNodesId=e.setSvgColor=e.isNameExDag=e.tasksAll=e.rtTasksTpl=e.saveTargetarr=e.rtTargetarrArr=void 0;var i=a(n(28)),r=a(n(71)),o=a(n(36)),s=a(n(91));function a(t){return t&&t.__esModule?t:{default:t}}var l=function(){return'<i class="iconfont" data-toggle="tooltip" data-html="true" data-container="body" data-placement="left" title="'+o.default.$t("禁止执行")+'">&#xe63e;</i>'},c=function(){var t=[];return(0,r.default)("#canvas .w").each(function(e,n){var i=(0,r.default)(n);t.push({id:i.attr("id"),name:i.find(".name-p").text(),targetarr:i.attr("data-targetarr")||"",x:parseInt(i.css("left"),10),y:parseInt(i.css("top"),10)})}),t};e.rtTargetarrArr=function(t){var e=(0,r.default)("#"+t).attr("data-targetarr");return e?e.split(","):[]},e.saveTargetarr=function(t,e){var n=(0,r.default)("#"+e),i=n.attr("data-targetarr")?n.attr("data-targetarr")+","+t:""+t;n.attr("data-targetarr",i)},e.rtTasksTpl=function(t){var e=t.id,n=t.name,i=t.x,r=t.y,o=t.targetarr,s=t.isAttachment,a=t.taskType,c=t.runFlag,u="";return u+='<div class="w jtk-draggable jtk-droppable jtk-endpoint-anchor jtk-connected '+(s?"jtk-ep":"")+'" data-targetarr="'+(o||"")+'" data-tasks-type="'+a+'" id="'+e+'" style="left: '+i+"px; top: "+r+'px;">',u+="<div>",u+='<div class="state-p"></div>',u+='<div class="icos icos-'+a+'"></div>',u+='<span class="name-p">'+n+"</span>",u+="</div>",u+='<div class="ep"></div>',u+='<div class="ban-p">',"FORBIDDEN"===c&&(u+=l()),u+="</div>",u+="</div>"},e.tasksAll=c,e.isNameExDag=function(t,e){return"dom"===e?-1!==i.default.findIndex(c(),function(e){return e.name===t}):-1!==i.default.findIndex(s.default.state.dag.tasks,function(e){return e.name===t})},e.setSvgColor=function(t,e){(0,r.default)(".jtk-connector").each(function(t,e){i.default.map((0,r.default)(e)[0].childNodes,function(t){(0,r.default)(t).attr("fill","#555").attr("stroke","#555").attr("stroke-width",2)})}),i.default.map((0,r.default)(t.canvas)[0].childNodes,function(t,n){(0,r.default)(t).attr("fill",e).attr("stroke",e),(0,r.default)(t).attr("class")&&(0,r.default)(t).attr("stroke-width",2)})},e.allNodesId=function(){var t=[];return(0,r.default)(".w").each(function(e,n){var i=(0,r.default)(n),o=i.find(".name-p").text();o&&t.push({id:i.attr("id"),name:o})}),t},e.rtBantpl=l},699:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(782),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(942);var a=function(t){n(940)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},700:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(686),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(742);var a=function(t){n(740)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},701:function(t,e,n){"use strict";e.__esModule=!0,e.downloadFile=void 0;var i,r=n(36),o=(i=r)&&i.__esModule?i:{default:i};e.downloadFile=function(t,e){var n={url:t,obj:e};if(n.url){var i,r;$('<form action="'+n.url+'" method="get">'+(i=n.obj,r="",Object.keys(i).forEach(function(t){r+="<input type='hidden' name = '"+t+"' value='"+i[t]+"'>"}),r)+"</form>").appendTo("body").submit().remove()}else(void 0).$message.warning(""+o.default.$t("无下载url无法下载"))}},702:function(t,e,n){"use strict";e.__esModule=!0;var i=c(n(28)),r=c(n(645)),o=c(n(734)),s=c(n(91)),a=n(684),l=c(n(700));function c(t){return t&&t.__esModule?t:{default:t}}e.default={name:"start-process",data:function(){return{store:s.default,processDefinitionId:0,failureStrategy:"CONTINUE",warningTypeList:a.warningTypeList,warningType:{},notifyGroupList:[],warningGroupId:{},scheduleTime:"",spinnerLoading:!1,execType:!1,taskDependType:"TASK_POST",receivers:[],receiversCc:[],runMode:"RUN_MODE_SERIAL",processInstancePriority:"MEDIUM"}},props:{item:Object,startNodeList:{type:String,default:""},sourceType:String},methods:{_datepicker:function(t){this.scheduleTime=t},_start:function(){var t=this;this.spinnerLoading=!0;var e={processDefinitionId:this.item.id,scheduleTime:this.scheduleTime.length&&this.scheduleTime.join(",")||"",failureStrategy:this.failureStrategy,warningType:this.warningType.id,warningGroupId:i.default.isEmpty(this.warningGroupId)?0:this.warningGroupId.id,execType:this.execType?"COMPLEMENT_DATA":null,startNodeList:this.startNodeList,taskDependType:this.taskDependType,runMode:this.runMode,processInstancePriority:this.processInstancePriority,receivers:this.receivers.join(",")||"",receiversCc:this.receiversCc.join(",")||""};"contextmenu"===this.sourceType&&(e.taskDependType=this.taskDependType),this.store.dispatch("dag/processStart",e).then(function(e){t.$message.success(e.msg),t.$emit("onUpdate"),setTimeout(function(){t.spinnerLoading=!1,t.close()},500)}).catch(function(e){t.$message.error(e.msg||""),t.spinnerLoading=!1})},_getNotifyGroupList:function(){var t=this;return new Promise(function(e,n){var r=i.default.cloneDeep(t.store.state.dag.notifyGroupListS)||[];r.length?(t.notifyGroupList=r,e()):t.store.dispatch("dag/getNotifyGroupList").then(function(n){t.notifyGroupList=n,e()})})},_getReceiver:function(){var t=this;this.store.dispatch("dag/getReceiver",{processDefinitionId:this.item.id}).then(function(e){t.receivers=e.receivers&&e.receivers.split(",")||[],t.receiversCc=e.receiversCc&&e.receiversCc.split(",")||[]})},ok:function(){this._start()},close:function(){this.$emit("close")}},watch:{execType:function(t){this.scheduleTime=t?[(0,r.default)().format("YYYY-MM-DD 00:00:00"),(0,r.default)().format("YYYY-MM-DD 00:00:00")]:""}},created:function(){this.warningType=this.warningTypeList[0],this._getReceiver()},mounted:function(){var t=this;this._getNotifyGroupList().then(function(){t.$nextTick(function(){t.warningGroupId={id:0}})})},computed:{},components:{mEmail:o.default,mPriority:l.default}}},721:function(t,e,n){(function(){void 0===Math.sgn&&(Math.sgn=function(t){return 0==t?0:t>0?1:-1});var t=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},n=function(t,e){return t.x*e.x+t.y*e.y},i=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r=function(t,e){return{x:t.x*e,y:t.y*e}},o=Math.pow(2,-65),s=function(e,n){for(var r=[],o=a(e,n),s=n.length-1,c=l(o,2*s-1,r,0),u=t(e,n[0]),d=i(u),p=0,f=0;f<c;f++){u=t(e,h(n,s,r[f],null,null));var m=i(u);m<d&&(d=m,p=r[f])}return u=t(e,n[s]),(m=i(u))<d&&(d=m,p=1),{location:p,distance:d}},a=function(e,i){for(var o=i.length-1,s=2*o-1,a=[],l=[],c=[],u=[],d=[[1,.6,.3,.1],[.4,.6,.6,.4],[.1,.3,.6,1]],h=0;h<=o;h++)a[h]=t(i[h],e);for(h=0;h<=o-1;h++)l[h]=t(i[h+1],i[h]),l[h]=r(l[h],3);for(var p=0;p<=o-1;p++)for(var f=0;f<=o;f++)c[p]||(c[p]=[]),c[p][f]=n(l[p],a[f]);for(h=0;h<=s;h++)u[h]||(u[h]=[]),u[h].y=0,u[h].x=parseFloat(h)/s;for(var m=o,g=o-1,v=0;v<=m+g;v++){var b=Math.max(0,v-g),y=Math.min(v,m);for(h=b;h<=y;h++){var x=v-h;u[h+x].y+=c[x][h]*d[x][h]}}return u},l=function(t,e,n,i){var r,o,s=[],a=[],p=[],f=[];switch(c(t,e)){case 0:return 0;case 1:if(i>=64)return n[0]=(t[0].x+t[e].x)/2,1;if(u(t,e))return n[0]=d(t,e),1}h(t,e,.5,s,a),r=l(s,e,p,i+1),o=l(a,e,f,i+1);for(var m=0;m<r;m++)n[m]=p[m];for(m=0;m<o;m++)n[m+r]=f[m];return r+o},c=function(t,e){var n,i,r=0;n=i=Math.sgn(t[0].y);for(var o=1;o<=e;o++)(n=Math.sgn(t[o].y))!=i&&r++,i=n;return r},u=function(t,e){var n,i,r,s,a,l,c,u,d;s=t[0].y-t[e].y,a=t[e].x-t[0].x,l=t[0].x*t[e].y-t[e].x*t[0].y,u=d=0;for(var h=1;h<e;h++){var p=s*t[h].x+a*t[h].y+l;p>u?u=p:p<d&&(d=p)}return 0,1,0,n=(1*(l-u)-0*(c=a))*(1/(0*c-1*s)),i=(1*(l-d)-0*(c=a))*(1/(0*c-1*s)),r=Math.min(n,i),Math.max(n,i)-r<o?1:0},d=function(t,e){var n=t[e].x-t[0].x,i=t[e].y-t[0].y,r=t[0].x-0;return 0+1*((n*(t[0].y-0)-i*r)*(1/(0*n-1*i)))},h=function(t,e,n,i,r){for(var o=[[]],s=0;s<=e;s++)o[0][s]=t[s];for(var a=1;a<=e;a++)for(s=0;s<=e-a;s++)o[a]||(o[a]=[]),o[a][s]||(o[a][s]={}),o[a][s].x=(1-n)*o[a-1][s].x+n*o[a-1][s+1].x,o[a][s].y=(1-n)*o[a-1][s].y+n*o[a-1][s+1].y;if(null!=i)for(s=0;s<=e;s++)i[s]=o[s][0];if(null!=r)for(s=0;s<=e;s++)r[s]=o[e-s][s];return o[e][0]},p={},f=function(t,e){for(var n=function(t){var e=p[t];if(!e){var n=function(t){return function(e){return t}},i=function(){return function(t){return t}},r=function(){return function(t){return 1-t}},o=function(t){return function(e){for(var n=1,i=0;i<t.length;i++)n*=t[i](e);return n}};(e=[]).push(new function(){return function(e){return Math.pow(e,t)}});for(var s=1;s<t;s++){for(var a=[new n(t)],l=0;l<t-s;l++)a.push(new i);for(l=0;l<s;l++)a.push(new r);e.push(new o(a))}e.push(new function(){return function(e){return Math.pow(1-e,t)}}),p[t]=e}return e}(t.length-1),i=0,r=0,o=0;o<t.length;o++)i+=t[o].x*n[o](e),r+=t[o].y*n[o](e);return{x:i,y:r}},m=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},g=function(t){return t[0].x===t[1].x&&t[0].y===t[1].y},v=function(t,e,n){if(g(t))return{point:t[0],location:e};for(var i=f(t,e),r=0,o=e,s=n>0?1:-1,a=null;r<Math.abs(n);)a=f(t,o+=.005*s),r+=m(a,i),i=a;return{point:a,location:o}},b=function(t,e){var n=f(t,e),i=f(t.slice(0,t.length-1),e),r=i.y-n.y,o=i.x-n.x;return 0===r?1/0:Math.atan(r/o)},y=function(t,e,n,i,r){var o=i-e,s=t-n,a=t*(e-i)+e*(n-t),l=function(t){return[x(t,"x"),x(t,"y")]}(r),c=[o*l[0][0]+s*l[1][0],o*l[0][1]+s*l[1][1],o*l[0][2]+s*l[1][2],o*l[0][3]+s*l[1][3]+a],u=function(t,e,n,i){var r,o,s=e/t,a=n/t,l=i/t,c=(3*a-Math.pow(s,2))/9,u=(9*s*a-27*l-2*Math.pow(s,3))/54,d=Math.pow(c,3)+Math.pow(u,2),h=[];if(d>=0)r=_(u+Math.sqrt(d))*Math.pow(Math.abs(u+Math.sqrt(d)),1/3),o=_(u-Math.sqrt(d))*Math.pow(Math.abs(u-Math.sqrt(d)),1/3),h[0]=-s/3+(r+o),h[1]=-s/3-(r+o)/2,h[2]=-s/3-(r+o)/2,0!==Math.abs(Math.sqrt(3)*(r-o)/2)&&(h[1]=-1,h[2]=-1);else{var p=Math.acos(u/Math.sqrt(-Math.pow(c,3)));h[0]=2*Math.sqrt(-c)*Math.cos(p/3)-s/3,h[1]=2*Math.sqrt(-c)*Math.cos((p+2*Math.PI)/3)-s/3,h[2]=2*Math.sqrt(-c)*Math.cos((p+4*Math.PI)/3)-s/3}for(var f=0;f<3;f++)(h[f]<0||h[f]>1)&&(h[f]=-1);return h}.apply(null,c),d=[];if(null!=u)for(var h=0;h<3;h++){var p,f=u[h],m=Math.pow(f,2),g=Math.pow(f,3),v=[l[0][0]*g+l[0][1]*m+l[0][2]*f+l[0][3],l[1][0]*g+l[1][1]*m+l[1][2]*f+l[1][3]];p=n-t!=0?(v[0]-t)/(n-t):(v[1]-e)/(i-e),f>=0&&f<=1&&p>=0&&p<=1&&d.push(v)}return d};function x(t,e){return[-t[0][e]+3*t[1][e]+-3*t[2][e]+t[3][e],3*t[0][e]-6*t[1][e]+3*t[2][e],-3*t[0][e]+3*t[1][e],t[0][e]]}function _(t){return t<0?-1:t>0?1:0}var w=this.jsBezier={distanceFromCurve:s,gradientAtPoint:b,gradientAtPointAlongCurveFrom:function(t,e,n){var i=v(t,e,n);return i.location>1&&(i.location=1),i.location<0&&(i.location=0),b(t,i.location)},nearestPointOnCurve:function(t,e){var n=s(t,e);return{point:h(e,e.length-1,n.location,null,null),location:n.location}},pointOnCurve:f,pointAlongCurveFrom:function(t,e,n){return v(t,e,n).point},perpendicularToCurveAt:function(t,e,n,i){var r=v(t,e,i=null==i?0:i),o=b(t,r.location),s=Math.atan(-1/o),a=n/2*Math.sin(s),l=n/2*Math.cos(s);return[{x:r.point.x+l,y:r.point.y+a},{x:r.point.x-l,y:r.point.y-a}]},locationAlongCurveFrom:function(t,e,n){return v(t,e,n).location},getLength:function(t){if(g(t))return 0;for(var e=f(t,0),n=0,i=0,r=null;i<1;)r=f(t,i+=.005),n+=m(r,e),e=r;return n},lineIntersection:y,boxIntersection:function(t,e,n,i,r){var o=[];return o.push.apply(o,y(t,e,t+n,e,r)),o.push.apply(o,y(t+n,e,t+n,e+i,r)),o.push.apply(o,y(t+n,e+i,t,e+i,r)),o.push.apply(o,y(t,e+i,t,e,r)),o},boundingBoxIntersection:function(t,e){var n=[];return n.push.apply(n,y(t.x,t.y,t.x+t.w,t.y,e)),n.push.apply(n,y(t.x+t.w,t.y,t.x+t.w,t.y+t.h,e)),n.push.apply(n,y(t.x+t.w,t.y+t.h,t.x,t.y+t.h,e)),n.push.apply(n,y(t.x,t.y+t.h,t.x,t.y,e)),n},version:"0.9.0"};e.jsBezier=w}).call("undefined"!=typeof window?window:this),function(){"use strict";var t=this.Biltong={version:"0.4.0"};e.Biltong=t;var n=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=function(t,e,i){return i(t=n(t)?t:[t.x,t.y],e=n(e)?e:[e.x,e.y])},r=t.gradient=function(t,e){return i(t,e,function(t,e){return e[0]==t[0]?e[1]>t[1]?1/0:-1/0:e[1]==t[1]?e[0]>t[0]?0:-0:(e[1]-t[1])/(e[0]-t[0])})},o=(t.normal=function(t,e){return-1/r(t,e)},t.lineLength=function(t,e){return i(t,e,function(t,e){return Math.sqrt(Math.pow(e[1]-t[1],2)+Math.pow(e[0]-t[0],2))})},t.quadrant=function(t,e){return i(t,e,function(t,e){return e[0]>t[0]?e[1]>t[1]?2:1:e[0]==t[0]?e[1]>t[1]?2:1:e[1]>t[1]?3:4})}),s=(t.theta=function(t,e){return i(t,e,function(t,e){var n=r(t,e),i=Math.atan(n),s=o(t,e);return 4!=s&&3!=s||(i+=Math.PI),i<0&&(i+=2*Math.PI),i})},t.intersects=function(t,e){var n=t.x,i=t.x+t.w,r=t.y,o=t.y+t.h,s=e.x,a=e.x+e.w,l=e.y,c=e.y+e.h;return n<=s&&s<=i&&r<=l&&l<=o||n<=a&&a<=i&&r<=l&&l<=o||n<=s&&s<=i&&r<=c&&c<=o||n<=a&&s<=i&&r<=c&&c<=o||s<=n&&n<=a&&l<=r&&r<=c||s<=i&&i<=a&&l<=r&&r<=c||s<=n&&n<=a&&l<=o&&o<=c||s<=i&&n<=a&&l<=o&&o<=c},t.encloses=function(t,e,n){var i=t.x,r=t.x+t.w,o=t.y,s=t.y+t.h,a=e.x,l=e.x+e.w,c=e.y,u=e.y+e.h,d=function(t,e,i,r){return n?t<=e&&i>=r:t<e&&i>r};return d(i,a,r,l)&&d(o,c,s,u)},[null,[1,-1],[1,1],[-1,1],[-1,-1]]),a=[null,[-1,-1],[-1,1],[1,1],[1,-1]];t.pointOnLine=function(t,e,n){var i=r(t,e),l=o(t,e),c=n>0?s[l]:a[l],u=Math.atan(i),d=Math.abs(n*Math.sin(u))*c[1],h=Math.abs(n*Math.cos(u))*c[0];return{x:t.x+h,y:t.y+d}},t.perpendicularLineTo=function(t,e,n){var i=r(t,e),o=Math.atan(-1/i),s=n/2*Math.sin(o),a=n/2*Math.cos(o);return[{x:e.x+a,y:e.y+s},{x:e.x-a,y:e.y-s}]}}.call("undefined"!=typeof window?window:this),function(){"use strict";function t(t,e,n,i,r,o,s,a){return function(){var t=[];return Array.prototype.push.apply(t,arguments),t.item=function(t){return this[t]},t}(function(t,e,n,i,r,o,s,a){return new Touch({target:e,identifier:D(),pageX:n,pageY:i,screenX:r,screenY:o,clientX:s||r,clientY:a||o})}.apply(null,arguments))}var n=function(t,e,n){for(var i=(n=n||t.parentNode).querySelectorAll(e),r=0;r<i.length;r++)if(i[r]===t)return!0;return!1},i=function(t){return"string"==typeof t||t.constructor===String?document.getElementById(t):t},r=function(t){return t.srcElement||t.target},o=function(t,e,n,i){if(i){if(void 0!==t.path&&t.path.indexOf)return{path:t.path,end:t.path.indexOf(n)};var r={path:[],end:-1},o=function(t){r.path.push(t),t===n?r.end=r.path.length-1:null!=t.parentNode&&o(t.parentNode)};return o(e),r}return{path:[e],end:1}},s=function(t,e){for(var n=0,i=t.length;n<i&&t[n]!=e;n++);n<t.length&&t.splice(n,1)},a=1,l=function(t,e,n){var i=a++;return t.__ta=t.__ta||{},t.__ta[e]=t.__ta[e]||{},t.__ta[e][i]=n,n.__tauid=i,i},c=function(t,e,i,s){if(null==t)return i;var a=t.split(","),l=function(s){l.__tauid=i.__tauid;var c=r(s),u=c,d=o(s,c,e,null!=t);if(-1!=d.end)for(var h=0;h<d.end;h++){u=d.path[h];for(var p=0;p<a.length;p++)n(u,a[p],e)&&i.apply(u,arguments)}};return u(i,s,l),l},u=function(t,e,n){t.__taExtra=t.__taExtra||[],t.__taExtra.push([e,n])},d=function(t,e,n,i){if(f&&g[e]){var r=c(i,t,n,g[e]);k(t,g[e],r,n)}"focus"===e&&null==t.getAttribute("tabindex")&&t.setAttribute("tabindex","1"),k(t,e,c(i,t,n,e),n)},h={tap:{touches:1,taps:1},dbltap:{touches:1,taps:2},contextmenu:{touches:2,taps:1}},p=function(t,e,n,i){for(var r in n.__tamee[t])n.__tamee[t].hasOwnProperty(r)&&n.__tamee[t][r].apply(i,[e])},f="ontouchstart"in document.documentElement,m="onmousedown"in document.documentElement,g={mousedown:"touchstart",mouseup:"touchend",mousemove:"touchmove"},v=function(){var t=-1;if("Microsoft Internet Explorer"==navigator.appName){var e=navigator.userAgent;null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))}return t}(),b=v>-1&&v<9,y=function(t,e){if(null==t)return[0,0];var n=w(t),i=_(n,0);return[i[e+"X"],i[e+"Y"]]},x=function(t){return null==t?[0,0]:b?[t.clientX+document.documentElement.scrollLeft,t.clientY+document.documentElement.scrollTop]:y(t,"page")},_=function(t,e){return t.item?t.item(e):t[e]},w=function(t){return t.touches&&t.touches.length>0?t.touches:t.changedTouches&&t.changedTouches.length>0?t.changedTouches:t.targetTouches&&t.targetTouches.length>0?t.targetTouches:[t]},C=function(t){return w(t).length},k=function(t,e,n,i){if(l(t,e,n),i.__tauid=n.__tauid,t.addEventListener)t.addEventListener(e,n,!1);else if(t.attachEvent){var r=e+n.__tauid;t["e"+r]=n,t[r]=function(){t["e"+r]&&t["e"+r](window.event)},t.attachEvent("on"+e,t[r])}},P=function(t,e,n){null!=n&&S(t,function(){var r=i(this);if(function(t,e,n){if(t.__ta&&t.__ta[e]&&delete t.__ta[e][n.__tauid],n.__taExtra){for(var i=0;i<n.__taExtra.length;i++)P(t,n.__taExtra[i][0],n.__taExtra[i][1]);n.__taExtra.length=0}n.__taUnstore&&n.__taUnstore()}(r,e,n),null!=n.__tauid)if(r.removeEventListener)r.removeEventListener(e,n,!1),f&&g[e]&&r.removeEventListener(g[e],n,!1);else if(this.detachEvent){var o=e+n.__tauid;r[o]&&r.detachEvent("on"+e,r[o]),r[o]=null,r["e"+o]=null}n.__taTouchProxy&&P(t,n.__taTouchProxy[1],n.__taTouchProxy[0])})},S=function(t,e){if(null!=t){t="undefined"!=typeof Window&&"unknown"!=typeof t.top&&t==t.top?[t]:"string"!=typeof t&&null==t.tagName&&null!=t.length?t:"string"==typeof t?document.querySelectorAll(t):[t];for(var n=0;n<t.length;n++)e.apply(t[n])}},D=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})};this.Mottle=function(e){var a=(e=e||{}).clickThreshold||250,u=e.dblClickThreshold||450,v=new function(){var t=[];return function(e,i,o,s){if(!e.__tamee){e.__tamee={over:!1,mouseenter:[],mouseexit:[]};var a=function(i){var o=r(i);(null==s&&o==e&&!e.__tamee.over||n(o,s,e)&&(null==o.__tamee||!o.__tamee.over))&&(p("mouseenter",i,e,o),o.__tamee=o.__tamee||{},o.__tamee.over=!0,t.push(o))},u=function(i){for(var o=r(i),s=0;s<t.length;s++)o!=t[s]||n(i.relatedTarget||i.toElement,"*",o)||(o.__tamee.over=!1,t.splice(s,1),p("mouseexit",i,e,o))};k(e,"mouseover",c(s,e,a,"mouseover"),a),k(e,"mouseout",c(s,e,u,"mouseout"),u)}o.__taUnstore=function(){delete e.__tamee[i][o.__tauid]},l(e,i,o),e.__tamee[i][o.__tauid]=o}},b=new function(t,e){return function(i,a,l,c){if("contextmenu"==a&&m)d(i,a,l,c);else{if(null==i.__taTapHandler){var u=i.__taTapHandler={tap:[],dbltap:[],contextmenu:[],down:!1,taps:0,downSelectors:[]},p=function(){u.down=!1},f=function(){u.taps=0};d(i,"mousedown",function(s){for(var a=r(s),l=o(s,a,i,null!=c),d=!1,h=0;h<l.end;h++){if(d)return;a=l.path[h];for(var m=0;m<u.downSelectors.length;m++)if(null==u.downSelectors[m]||n(a,u.downSelectors[m],i)){u.down=!0,setTimeout(p,t),setTimeout(f,e),d=!0;break}}}),d(i,"mouseup",function(t){if(u.down){var e,s,a=r(t);u.taps++;var l=C(t);for(var c in h)if(h.hasOwnProperty(c)){var d=h[c];if(d.touches===l&&(1===d.taps||d.taps===u.taps))for(var p=0;p<u[c].length;p++){s=o(t,a,i,null!=u[c][p][1]);for(var f=0;f<s.end;f++)if(e=s.path[f],null==u[c][p][1]||n(e,u[c][p][1],i)){u[c][p][0].apply(e,[t]);break}}}}})}i.__taTapHandler.downSelectors.push(c),i.__taTapHandler[a].push([l,c]),l.__taUnstore=function(){s(i.__taTapHandler[a],l)}}}}(a,u),_=e.smartClicks,w=function(t,e,n,o){null!=n&&S(t,function(){var t=i(this);_&&"click"===e?function(t,e,n,i){null==t.__taSmartClicks&&(d(t,"mousedown",function(e){t.__tad=x(e)},i),d(t,"mouseup",function(e){t.__tau=x(e)},i),d(t,"click",function(e){if(t.__tad&&t.__tau&&t.__tad[0]===t.__tau[0]&&t.__tad[1]===t.__tau[1])for(var n=0;n<t.__taSmartClicks.length;n++)t.__taSmartClicks[n].apply(r(e),[e])},i),t.__taSmartClicks=[]);t.__taSmartClicks.push(n),n.__taUnstore=function(){s(t.__taSmartClicks,n)}}(t,0,n,o):"tap"===e||"dbltap"===e||"contextmenu"===e?b(t,e,n,o):"mouseenter"===e||"mouseexit"==e?v(t,e,n,o):d(t,e,n,o)})};this.remove=function(t){return S(t,function(){var t=i(this);if(t.__ta)for(var e in t.__ta)if(t.__ta.hasOwnProperty(e))for(var n in t.__ta[e])t.__ta[e].hasOwnProperty(n)&&P(t,e,t.__ta[e][n]);t.parentNode&&t.parentNode.removeChild(t)}),this},this.on=function(t,e,n,i){var r=arguments[0],o=4==arguments.length?arguments[2]:null,s=arguments[1],a=arguments[arguments.length-1];return w(r,s,a,o),this},this.off=function(t,e,n){return P(t,e,n),this},this.trigger=function(e,n,r,o){var s=m&&("undefined"==typeof MouseEvent||null==r||r.constructor===MouseEvent),a=f&&!m&&g[n]?g[n]:n,l=!(f&&!m&&g[n]),c=x(r),u=y(r,"screen"),d=function(t){return y(t,"client")}(r);return S(e,function(){var e,h=i(this);r=r||{screenX:u[0],screenY:u[1],clientX:d[0],clientY:d[1]};var p=function(t){o&&(t.payload=o)},m={TouchEvent:function(e){var n=t(window,h,0,c[0],c[1],u[0],u[1],d[0],d[1]);(e.initTouchEvent||e.initEvent)(a,!0,!0,window,null,u[0],u[1],d[0],d[1],!1,!1,!1,!1,n,n,n,1,0)},MouseEvents:function(t){t.initMouseEvent(a,!0,!0,window,0,u[0],u[1],d[0],d[1],!1,!1,!1,!1,1,h)}};if(document.createEvent){var v=!l&&!s&&f&&g[n]?"TouchEvent":"MouseEvents";e=document.createEvent(v),m[v](e),p(e),h.dispatchEvent(e)}else document.createEventObject&&((e=document.createEventObject()).eventType=e.eventName=a,e.screenX=u[0],e.screenY=u[1],e.clientX=d[0],e.clientY=d[1],p(e),h.fireEvent("on"+a,e))}),this}},this.Mottle.consume=function(t,e){t.stopPropagation?t.stopPropagation():t.returnValue=!1,!e&&t.preventDefault&&t.preventDefault()},this.Mottle.pageLocation=x,this.Mottle.setForceTouchEvents=function(t){f=t},this.Mottle.setForceMouseEvents=function(t){m=t},this.Mottle.version="0.8.0",e.Mottle=this.Mottle}.call("undefined"==typeof window?this:window),function(){"use strict";var t=function(t,e,n){return-1===t.indexOf(e)&&(n?t.unshift(e):t.push(e),!0)},n=function(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)},i=function(t){return null!=t&&("string"==typeof t||t.constructor===String)},r=function(t,e,n){for(var i=(n=n||t.parentNode).querySelectorAll(e),r=0;r<i.length;r++)if(i[r]===t)return!0;return!1},o=function(){var t=-1;if("Microsoft Internet Explorer"===navigator.appName){var e=navigator.userAgent;null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))}return t}(),s=o>-1&&o<9,a=9===o,l=function(t){if(s)return[t.clientX+document.documentElement.scrollLeft,t.clientY+document.documentElement.scrollTop];var e=u(t),n=c(e,0);return a?[n.pageX||n.clientX,n.pageY||n.clientY]:[n.pageX,n.pageY]},c=function(t,e){return t.item?t.item(e):t[e]},u=function(t){return t.touches&&t.touches.length>0?t.touches:t.changedTouches&&t.changedTouches.length>0?t.changedTouches:t.targetTouches&&t.targetTouches.length>0?t.targetTouches:[t]},d={draggable:"katavorio-draggable",droppable:"katavorio-droppable",drag:"katavorio-drag",selected:"katavorio-drag-selected",active:"katavorio-drag-active",hover:"katavorio-drag-hover",noSelect:"katavorio-drag-no-select",ghostProxy:"katavorio-ghost-proxy",clonedDrag:"katavorio-clone-drag"},h=["stop","start","drag","drop","over","out","beforeStart"],p=function(){},f=function(){return!0},m=function(t,e,n){for(var i=0;i<t.length;i++)t[i]!=n&&e(t[i])},g=function(t,e,n,i){m(t,function(t){t.setActive(e),e&&t.updatePosition(),n&&t.setHover(i,e)})},v=function(t,e){if(null!=t){t=i(t)||null!=t.tagName||null==t.length?[t]:t;for(var n=0;n<t.length;n++)e.apply(t[n],[t[n]])}},b=function(t){t.stopPropagation?(t.stopPropagation(),t.preventDefault()):t.returnValue=!1},y=function(t,e,n,i){this.params=e||{},this.el=t,this.params.addClass(this.el,this._class),this.uuid=k();var r=!0;return this.setEnabled=function(t){r=t},this.isEnabled=function(){return r},this.toggleEnabled=function(){r=!r},this.setScope=function(t){this.scopes=t?t.split(/\s+/):[i]},this.addScope=function(t){var e={};for(var n in v(this.scopes,function(t){e[t]=!0}),v(t?t.split(/\s+/):[],function(t){e[t]=!0}),this.scopes=[],e)this.scopes.push(n)},this.removeScope=function(t){var e={};for(var n in v(this.scopes,function(t){e[t]=!0}),v(t?t.split(/\s+/):[],function(t){delete e[t]}),this.scopes=[],e)this.scopes.push(n)},this.toggleScope=function(t){var e={};for(var n in v(this.scopes,function(t){e[t]=!0}),v(t?t.split(/\s+/):[],function(t){e[t]?delete e[t]:e[t]=!0}),this.scopes=[],e)this.scopes.push(n)},this.setScope(e.scope),this.k=e.katavorio,e.katavorio},x=function(){return!0},_=function(){return!1},w=function(t,e,n,o){this._class=n.draggable;var s=y.apply(this,arguments);this.rightButtonCanDrag=this.params.rightButtonCanDrag;var a,c=[0,0],u=null,h=null,p=[0,0],m=!1,v=[0,0],w=!1!==this.params.consumeStartEvent,C=this.el,S=this.params.clone,D=(this.params.scroll,!1!==e.multipleDrop),L=!1,E=!0===e.ghostProxy?x:e.ghostProxy&&"function"==typeof e.ghostProxy?e.ghostProxy:_,T=e.selector,M=null,I=e.snapThreshold,A=function(t,e,n,i,r){var o=e*Math.floor(t[0]/e),s=o+e,a=Math.abs(t[0]-o)<=i?o:Math.abs(s-t[0])<=i?s:t[0],l=n*Math.floor(t[1]/n),c=l+n;return[a,Math.abs(t[1]-l)<=r?l:Math.abs(c-t[1])<=r?c:t[1]]};this.posses=[],this.posseRoles={},this.toGrid=function(t){if(null==this.params.grid)return t;var e=this.params.grid?this.params.grid[0]/2:I||5,n=this.params.grid?this.params.grid[1]/2:I||5;return A(t,this.params.grid[0],this.params.grid[1],e,n)},this.snap=function(t,e){if(null!=C){t=t||(this.params.grid?this.params.grid[0]:10),e=e||(this.params.grid?this.params.grid[1]:10);var n=this.params.getPosition(C),i=this.params.grid?this.params.grid[0]/2:I,r=this.params.grid?this.params.grid[1]/2:I;this.params.setPosition(C,A(n,t,e,i,r))}},this.setUseGhostProxy=function(t){E=t?x:_};var j,O=function(t){return!1===e.allowNegative?[Math.max(0,t[0]),Math.max(0,t[1])]:t},N=function(t){a="function"==typeof t?t:t?function(t,e,n,i){return O([Math.max(0,Math.min(n.w-i[0],t[0])),Math.max(0,Math.min(n.h-i[1],t[1]))])}.bind(this):function(t){return O(t)}}.bind(this);N("function"==typeof this.params.constrain?this.params.constrain:this.params.constrain||this.params.containment),this.setConstrain=function(t){N(t)},this.setRevert=function(t){j=t};var $={},F=this.setFilter=function(e,n){if(e){var o="function"==typeof(s=e)?(s._katavorioId=k(),s._katavorioId):s;$[o]=[function(n){var o,s=n.srcElement||n.target;return i(e)?o=r(s,e,t):"function"==typeof e&&(o=e(n,t)),o},!1!==n]}var s};this.addFilter=F,this.removeFilter=function(t){var e="function"==typeof t?t._katavorioId:t;delete $[e]};this.clearAllFilters=function(){$={}},this.canDrag=this.params.canDrag||f;var R,z=[],H=[];this.downListener=function(t){var e,i,o,a,h,p,f,m,g;if((this.rightButtonCanDrag||3!==t.which&&2!==t.button)&&this.isEnabled()&&this.canDrag())if(function(t){for(var e in $){var n=$[e],i=n[0](t);if(n[1]&&(i=!i),!i)return!1}return!0}(t)&&function(t,e,n){var i=t.srcElement||t.target;return!r(i,n.getInputFilterSelector(),e)}(t,this.el,this.k)){if(T){if(null==(M=function(t,e,n){if(r(e,n,t))return e;for(var i=e.parentNode;null!=i&&i!==t;){if(r(i,n,t))return i;i=i.parentNode}}(this.el,t.target||t.srcElement,T)))return}else M=this.el;if(S)if(C=M.cloneNode(!0),this.params.addClass(C,d.clonedDrag),C.setAttribute("id",null),C.style.position="absolute",null!=this.params.parent){var y=this.params.getPosition(this.el);C.style.left=y[0]+"px",C.style.top=y[1]+"px",this.params.parent.appendChild(C)}else{var x=(e=M.getBoundingClientRect(),i=document.body,o=document.documentElement,a=window.pageYOffset||o.scrollTop||i.scrollTop,h=window.pageXOffset||o.scrollLeft||i.scrollLeft,p=o.clientTop||i.clientTop||0,f=o.clientLeft||i.clientLeft||0,m=e.top+a-p,g=e.left+h-f,{top:Math.round(m),left:Math.round(g)});C.style.left=x.left+"px",C.style.top=x.top+"px",document.body.appendChild(C)}else C=M;w&&b(t),c=l(t),C&&C.parentNode&&(v=[C.parentNode.scrollLeft,C.parentNode.scrollTop]),this.params.bind(document,"mousemove",this.moveListener),this.params.bind(document,"mouseup",this.upListener),s.markSelection(this),s.markPosses(this),this.params.addClass(document.body,n.noSelect),U("beforeStart",{el:this.el,pos:u,e:t,drag:this})}else this.params.consumeFilteredEvents&&b(t)}.bind(this),this.moveListener=function(t){if(c){if(!m)if(!1!==U("start",{el:this.el,pos:u,e:t,drag:this})){if(!c)return;this.mark(!0),m=!0}else this.abort();if(c){H.length=0;var e=l(t),n=e[0]-c[0],i=e[1]-c[1],r=this.params.ignoreZoom?1:s.getZoom();C&&C.parentNode&&(n+=C.parentNode.scrollLeft-v[0],i+=C.parentNode.scrollTop-v[1]),n/=r,i/=r,this.moveBy(n,i,t),s.updateSelection(n,i,this),s.updatePosses(n,i,this)}}}.bind(this),this.upListener=function(t){c&&(c=null,this.params.unbind(document,"mousemove",this.moveListener),this.params.unbind(document,"mouseup",this.upListener),this.params.removeClass(document.body,n.noSelect),this.unmark(t),s.unmarkSelection(this,t),s.unmarkPosses(this,t),this.stop(t),s.notifyPosseDragStop(this,t),m=!1,S&&(C&&C.parentNode&&C.parentNode.removeChild(C),C=null),H.length=0,j&&!0===j(this.el,this.params.getPosition(this.el))&&(this.params.setPosition(this.el,u),U("revert",this.el)))}.bind(this),this.getFilters=function(){return $},this.abort=function(){null!=c&&this.upListener()},this.getDragElement=function(t){return t?M||this.el:C||this.el};var W={start:[],drag:[],stop:[],over:[],out:[],beforeStart:[],revert:[]};e.events.start&&W.start.push(e.events.start),e.events.beforeStart&&W.beforeStart.push(e.events.beforeStart),e.events.stop&&W.stop.push(e.events.stop),e.events.drag&&W.drag.push(e.events.drag),e.events.revert&&W.revert.push(e.events.revert),this.on=function(t,e){W[t]&&W[t].push(e)},this.off=function(t,e){if(W[t]){for(var n=[],i=0;i<W[t].length;i++)W[t][i]!==e&&n.push(W[t][i]);W[t]=n}};var B,U=function(t,e){var n=null;if(W[t])for(var i=0;i<W[t].length;i++)try{var r=W[t][i](e);null!=r&&(n=r)}catch(t){}return n};this.notifyStart=function(t){U("start",{el:this.el,pos:this.params.getPosition(C),e:t,drag:this})},this.stop=function(t,e){if(e||m){var n=[],i=s.getSelection(),r=this.params.getPosition(C);if(i.length>1)for(var o=0;o<i.length;o++){var a=this.params.getPosition(i[o].el);n.push([i[o].el,{left:a[0],top:a[1]},i[o]])}else n.push([C,{left:r[0],top:r[1]},this]);U("stop",{el:C,pos:B||r,finalPos:r,e:t,drag:this,selection:n})}},this.mark=function(t){var e;u=this.params.getPosition(C),h=this.params.getPosition(C,!0),p=[h[0]-u[0],h[1]-u[1]],this.size=this.params.getSize(C),z=s.getMatchingDroppables(this),g(z,!0,!1,this),this.params.addClass(C,this.params.dragClass||n.drag),e=this.params.getConstrainingRectangle?this.params.getConstrainingRectangle(C):this.params.getSize(C.parentNode),R={w:e[0],h:e[1]},t&&s.notifySelectionDragStart(this)},this.unmark=function(t,i){if(g(z,!1,!0,this),L&&E(M)?(B=[C.offsetLeft,C.offsetTop],M.parentNode.removeChild(C),C=M):B=null,this.params.removeClass(C,this.params.dragClass||n.drag),z.length=0,L=!1,!i){H.length>0&&B&&e.setPosition(M,B),H.sort(P);for(var r=0;r<H.length;r++){if(!0===H[r].drop(this,t))break}}},this.moveBy=function(t,n,i){H.length=0;var r=this.toGrid([u[0]+t,u[1]+n]),o=a(r,C,R,this.size);if(E(this.el))if(r[0]!==o[0]||r[1]!==o[1]){if(!L){var s=M.cloneNode(!0);e.addClass(s,d.ghostProxy),M.parentNode.appendChild(s),C=s,L=!0}o=r}else L&&(M.parentNode.removeChild(C),C=M,L=!1);var l={x:o[0],y:o[1],w:this.size[0],h:this.size[1]},c={x:l.x+p[0],y:l.y+p[1],w:l.w,h:l.h},h=null;this.params.setPosition(C,o);for(var f=0;f<z.length;f++){var m={x:z[f].pagePosition[0],y:z[f].pagePosition[1],w:z[f].size[0],h:z[f].size[1]};this.params.intersects(c,m)&&(D||null==h||h===z[f].el)&&z[f].canDrop(this)?(h||(h=z[f].el),H.push(z[f]),z[f].setHover(this,!0,i)):z[f].isHover()&&z[f].setHover(this,!1,i)}U("drag",{el:this.el,pos:o,e:i,drag:this})},this.destroy=function(){this.params.unbind(this.el,"mousedown",this.downListener),this.params.unbind(document,"mousemove",this.moveListener),this.params.unbind(document,"mouseup",this.upListener),this.downListener=null,this.upListener=null,this.moveListener=null},this.params.bind(this.el,"mousedown",this.downListener),this.params.handle?F(this.params.handle,!1):F(this.params.filter,this.params.filterExclude)},C=function(t,e,n,i){this._class=n.droppable,this.params=e||{},this.rank=e.rank||0,this._activeClass=this.params.activeClass||n.active,this._hoverClass=this.params.hoverClass||n.hover,y.apply(this,arguments);var r=!1;this.allowLoopback=!1!==this.params.allowLoopback,this.setActive=function(t){this.params[t?"addClass":"removeClass"](this.el,this._activeClass)},this.updatePosition=function(){this.position=this.params.getPosition(this.el),this.pagePosition=this.params.getPosition(this.el,!0),this.size=this.params.getSize(this.el)},this.canDrop=this.params.canDrop||function(t){return!0},this.isHover=function(){return r},this.setHover=function(t,e,n){(e||null==this.el._katavorioDragHover||this.el._katavorioDragHover===t.el._katavorio)&&(this.params[e?"addClass":"removeClass"](this.el,this._hoverClass),this.el._katavorioDragHover=e?t.el._katavorio:null,r!==e&&this.params.events[e?"over":"out"]({el:this.el,e:n,drag:t,drop:this}),r=e)},this.drop=function(t,e){return this.params.events.drop({drag:t,e:e,drop:this})},this.destroy=function(){this._class=null,this._activeClass=null,this._hoverClass=null,r=null}},k=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})},P=function(t,e){return t.rank<e.rank?1:t.rank>e.rank?-1:0},S=function(t){return null==t?null:null==(t="string"==typeof t||t.constructor===String?document.getElementById(t):t)?null:(t._katavorio=t._katavorio||k(),t)};this.Katavorio=function(e){var r=[],o={};this._dragsByScope={},this._dropsByScope={};var s=1,a=function(t,e){v(t,function(t){for(var n=0;n<t.scopes.length;n++)e[t.scopes[n]]=e[t.scopes[n]]||[],e[t.scopes[n]].push(t)})},l=function(t,n){var i=0;return v(t,function(t){for(var r=0;r<t.scopes.length;r++)if(n[t.scopes[r]]){var o=e.indexOf(n[t.scopes[r]],t);-1!==o&&(n[t.scopes[r]].splice(o,1),i++)}}),i>0},c=(this.getMatchingDroppables=function(t){for(var e=[],n={},i=0;i<t.scopes.length;i++){var r=this._dropsByScope[t.scopes[i]];if(r)for(var o=0;o<r.length;o++)!r[o].canDrop(t)||n[r[o].uuid]||!r[o].allowLoopback&&r[o].el===t.el||(n[r[o].uuid]=!0,e.push(r[o]))}return e.sort(P),e},function(t){t=t||{};var n,i={events:{}};for(n in e)i[n]=e[n];for(n in t)i[n]=t[n];for(n=0;n<h.length;n++)i.events[h[n]]=t[h[n]]||p;return i.katavorio=this,i}.bind(this)),u=function(t,e){for(var n=0;n<h.length;n++)e[h[n]]&&t.on(h[n],e[h[n]])}.bind(this),f={},g=e.css||{},b=e.scope||"katavorio-drag-scope";for(var y in d)f[y]=d[y];for(var y in g)f[y]=g[y];var x=e.inputFilterSelector||"input,textarea,select,button,option";this.getInputFilterSelector=function(){return x},this.setInputFilterSelector=function(t){return x=t,this},this.draggable=function(t,n){var i=[];return v(t,function(t){if(null!=(t=S(t)))if(null==t._katavorioDrag){var r=c(n);t._katavorioDrag=new w(t,r,f,b),a(t._katavorioDrag,this._dragsByScope),i.push(t._katavorioDrag),e.addClass(t,f.draggable)}else u(t._katavorioDrag,n)}.bind(this)),i},this.droppable=function(t,n){var i=[];return v(t,function(t){if(null!=(t=S(t))){var r=new C(t,c(n),f,b);t._katavorioDrop=t._katavorioDrop||[],t._katavorioDrop.push(r),a(r,this._dropsByScope),i.push(r),e.addClass(t,f.droppable)}}.bind(this)),i},this.select=function(t){return v(t,function(){var t=S(this);t&&t._katavorioDrag&&(o[t._katavorio]||(r.push(t._katavorioDrag),o[t._katavorio]=[t,r.length-1],e.addClass(t,f.selected)))}),this},this.deselect=function(t){return v(t,function(){var t=S(this);if(t&&t._katavorio&&o[t._katavorio]){for(var n=[],i=0;i<r.length;i++)r[i].el!==t&&n.push(r[i]);r=n,delete o[t._katavorio],e.removeClass(t,f.selected)}}),this},this.deselectAll=function(){for(var t in o){var n=o[t];e.removeClass(n[0],f.selected)}r.length=0,o={}},this.markSelection=function(t){m(r,function(t){t.mark()},t)},this.markPosses=function(t){t.posses&&v(t.posses,function(e){t.posseRoles[e]&&E[e]&&m(E[e].members,function(t){t.mark()},t)})},this.unmarkSelection=function(t,e){m(r,function(t){t.unmark(e)},t)},this.unmarkPosses=function(t,e){t.posses&&v(t.posses,function(n){t.posseRoles[n]&&E[n]&&m(E[n].members,function(t){t.unmark(e,!0)},t)})},this.getSelection=function(){return r.slice(0)},this.updateSelection=function(t,e,n){m(r,function(n){n.moveBy(t,e)},n)};var _=function(t,e){e.posses&&v(e.posses,function(n){e.posseRoles[n]&&E[n]&&m(E[n].members,function(e){t(e)},e)})};this.updatePosses=function(t,e,n){_(function(n){n.moveBy(t,e)},n)},this.notifyPosseDragStop=function(t,e){_(function(t){t.stop(e,!0)},t)},this.notifySelectionDragStop=function(t,e){m(r,function(t){t.stop(e,!0)},t)},this.notifySelectionDragStart=function(t,e){m(r,function(t){t.notifyStart(e)},t)},this.setZoom=function(t){s=t},this.getZoom=function(){return s};var k=function(t,e,n,i){v(t,function(t){l(t,n),t[i](e),a(t,n)})};v(["set","add","remove","toggle"],function(t){this[t+"Scope"]=function(e,n){k(e._katavorioDrag,n,this._dragsByScope,t+"Scope"),k(e._katavorioDrop,n,this._dropsByScope,t+"Scope")}.bind(this),this[t+"DragScope"]=function(e,n){k(e.constructor===w?e:e._katavorioDrag,n,this._dragsByScope,t+"Scope")}.bind(this),this[t+"DropScope"]=function(e,n){k(e.constructor===C?e:e._katavorioDrop,n,this._dropsByScope,t+"Scope")}.bind(this)}.bind(this)),this.snapToGrid=function(t,e){for(var n in this._dragsByScope)m(this._dragsByScope[n],function(n){n.snap(t,e)})},this.getDragsForScope=function(t){return this._dragsByScope[t]},this.getDropsForScope=function(t){return this._dropsByScope[t]};var D=function(t,e,n){if((t=S(t))[e]){var i=r.indexOf(t[e]);i>=0&&r.splice(i,1),l(t[e],n)&&v(t[e],function(t){t.destroy()}),delete t[e]}},L=function(t,e,n,i){(t=S(t))[e]&&t[e].off(n,i)};this.elementRemoved=function(t){this.destroyDraggable(t),this.destroyDroppable(t)},this.destroyDraggable=function(t,e,n){1===arguments.length?D(t,"_katavorioDrag",this._dragsByScope):L(t,"_katavorioDrag",e,n)},this.destroyDroppable=function(t,e,n){1===arguments.length?D(t,"_katavorioDrop",this._dropsByScope):L(t,"_katavorioDrop",e,n)},this.reset=function(){this._dragsByScope={},this._dropsByScope={},r=[],o={},E={}};var E={},T=function(e,n,r){var o,s=i(n)?n:n.id,a=!!i(n)||!1!==n.active,l=E[s]||(o={name:s,members:[]},E[s]=o,o);return v(e,function(e){if(e._katavorioDrag){if(r&&null!=e._katavorioDrag.posseRoles[l.name])return;t(l.members,e._katavorioDrag),t(e._katavorioDrag.posses,l.name),e._katavorioDrag.posseRoles[l.name]=a}}),l};this.addToPosse=function(t,e){for(var n=[],i=1;i<arguments.length;i++)n.push(T(t,arguments[i]));return 1===n.length?n[0]:n},this.setPosse=function(t,e){for(var n=[],i=1;i<arguments.length;i++)n.push(T(t,arguments[i],!0).name);return v(t,function(t){if(t._katavorioDrag){var e=function(t,e){for(var n=[],i=0;i<t.length;i++)-1===e.indexOf(t[i])&&n.push(t[i]);return n}(t._katavorioDrag.posses,n);Array.prototype.push.apply([],t._katavorioDrag.posses);for(var i=0;i<e.length;i++)this.removeFromPosse(t,e[i])}}.bind(this)),1===n.length?n[0]:n},this.removeFromPosse=function(t,e){if(arguments.length<2)throw new TypeError("No posse id provided for remove operation");for(var i=1;i<arguments.length;i++)e=arguments[i],v(t,function(t){if(t._katavorioDrag&&t._katavorioDrag.posses){var i=t._katavorioDrag;v(e,function(t){n(E[t].members,i),n(i.posses,t),delete i.posseRoles[t]})}})},this.removeFromAllPosses=function(t){v(t,function(t){if(t._katavorioDrag&&t._katavorioDrag.posses){var e=t._katavorioDrag;v(e.posses,function(t){n(E[t].members,e)}),e.posses.length=0,e.posseRoles={}}})},this.setPosseState=function(t,e,n){var i=E[e];i&&v(t,function(t){t._katavorioDrag&&t._katavorioDrag.posses&&(t._katavorioDrag.posseRoles[i.name]=n)})}},this.Katavorio.version="1.0.0",e.Katavorio=this.Katavorio}.call("undefined"!=typeof window?window:this),function(){this.jsPlumbUtil=this.jsPlumbUtil||{};var t=this.jsPlumbUtil;function n(t){return"[object Array]"===Object.prototype.toString.call(t)}function i(t){return"string"==typeof t}function r(t){return"boolean"==typeof t}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return"[object Date]"===Object.prototype.toString.call(t)}function a(t){return"[object Function]"===Object.prototype.toString.call(t)}function l(t){if(i(t))return""+t;if(r(t))return!!t;if(s(t))return new Date(t.getTime());if(a(t))return t;if(n(t)){for(var e=[],c=0;c<t.length;c++)e.push(l(t[c]));return e}if(o(t)){var u={};for(var d in t)u[d]=l(t[d]);return u}return t}function c(t,e,s,a){var c,u,d={},h={};for(s=s||[],a=a||[],u=0;u<s.length;u++)d[s[u]]=!0;for(u=0;u<a.length;u++)h[a[u]]=!0;var p=l(t);for(u in e)if(null==p[u]||h[u])p[u]=e[u];else if(i(e[u])||r(e[u]))d[u]?((c=[]).push.apply(c,n(p[u])?p[u]:[p[u]]),c.push.apply(c,r(e[u])?e[u]:[e[u]]),p[u]=c):p[u]=e[u];else if(n(e[u]))c=[],n(p[u])&&c.push.apply(c,p[u]),c.push.apply(c,e[u]),p[u]=c;else if(o(e[u]))for(var f in o(p[u])||(p[u]={}),e[u])p[u][f]=e[u][f];return p}function u(t,e){if(t)for(var n=0;n<t.length;n++)if(e(t[n]))return n;return-1}function d(t,e){var n=t.indexOf(e);return n>-1&&t.splice(n,1),-1!==n}function h(t,e,n,i){var r=t[e];return null==r&&(r=[],t[e]=r),r[i?"unshift":"push"](n),r}function p(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}function f(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(t.logEnabled&&"undefined"!=typeof console)try{arguments[arguments.length-1]}catch(t){}}e.jsPlumbUtil=t,t.isArray=n,t.isNumber=function(t){return"[object Number]"===Object.prototype.toString.call(t)},t.isString=i,t.isBoolean=r,t.isNull=function(t){return null==t},t.isObject=o,t.isDate=s,t.isFunction=a,t.isNamedFunction=function(t){return a(t)&&null!=t.name&&t.name.length>0},t.isEmpty=function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},t.clone=l,t.merge=c,t.replace=function(t,e,n){if(null!=t){var i=t;return e.replace(/([^\.])+/g,function(t,e,r,o){var s=t.match(/([^\[0-9]+){1}(\[)([0-9+])/),a=function(){return i[s[1]]||(i[s[1]]=[],i[s[1]])};if(r+t.length>=o.length)s?a()[s[3]]=n:i[t]=n;else if(s){var l=a();i=l[s[3]]||(l[s[3]]={},l[s[3]])}else i=i[t]||(i[t]={},i[t]);return""}),t}},t.functionChain=function(t,e,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===e)return r}return t},t.populate=function(t,e,r,s){var l=function(t){if(null!=t){if(i(t))return function(t){var n=t.match(/(\${.*?})/g);if(null!=n)for(var i=0;i<n.length;i++){var r=e[n[i].substring(2,n[i].length-1)]||"";null!=r&&(t=t.replace(n[i],r))}return t}(t);if(!a(t)||s||null!=r&&0!==(t.name||"").indexOf(r)){if(n(t)){for(var c=[],u=0;u<t.length;u++)c.push(l(t[u]));return c}if(o(t)){var d={};for(var h in t)d[h]=l(t[h]);return d}return t}return t(e)}};return l(t)},t.findWithFunction=u,t.removeWithFunction=function(t,e){var n=u(t,e);return n>-1&&t.splice(n,1),-1!==n},t.remove=d,t.addWithFunction=function(t,e,n){-1===u(t,n)&&t.push(e)},t.addToList=h,t.suggest=function(t,e,n){return-1===t.indexOf(e)&&(n?t.unshift(e):t.push(e),!0)},t.extend=function(t,e,i){var r;e=n(e)?e:[e];var o=function(e){for(var n=e.__proto__;null!=n;)if(null!=n.prototype){for(var i in n.prototype)n.prototype.hasOwnProperty(i)&&!t.prototype.hasOwnProperty(i)&&(t.prototype[i]=n.prototype[i]);n=n.prototype.__proto__}else n=null};for(r=0;r<e.length;r++){for(var s in e[r].prototype)e[r].prototype.hasOwnProperty(s)&&!t.prototype.hasOwnProperty(s)&&(t.prototype[s]=e[r].prototype[s]);o(e[r])}var a=function(t,n){return function(){for(r=0;r<e.length;r++)e[r].prototype[t]&&e[r].prototype[t].apply(this,arguments);return n.apply(this,arguments)}},l=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++)l(arguments[r]);return t},t.uuid=p,t.fastTrim=function(t){if(null==t)return null;for(var e=t.replace(/^\s\s*/,""),n=/\s/,i=e.length;n.test(e.charAt(--i)););return e.slice(0,i+1)},t.each=function(t,e){t=null==t.length||"string"==typeof t?[t]:t;for(var n=0;n<t.length;n++)e(t[n])},t.map=function(t,e){for(var n=[],i=0;i<t.length;i++)n.push(e(t[i]));return n},t.mergeWithParents=function(t,e,n){n=n||"parent";var i=function(t){return t?e[t]:null},r=function(t){return t?i(t[n]):null},o=function(t,e){if(null==t)return e;var n=c(t,e);return o(r(t),n)},s=function(t){if(null==t)return{};if("string"==typeof t)return i(t);if(t.length){for(var e=!1,n=0,r=void 0;!e&&n<t.length;)(r=s(t[n]))?e=!0:n++;return r}},a=s(t);return a?o(r(a),a):{}},t.logEnabled=!0,t.log=f,t.wrap=function(t,e,n){return function(){var i=null;try{null!=e&&(i=e.apply(this,arguments))}catch(t){f("jsPlumb function failed : "+t)}if(null!=t&&(null==n||i!==n))try{i=t.apply(this,arguments)}catch(t){f("wrapped function failed : "+t)}return i}};var m=function(){return function(){var t=this;this._listeners={},this.eventsSuspended=!1,this.tick=!1,this.eventsToDieOn={ready:!0},this.queue=[],this.bind=function(e,n,i){var r=function(e){h(t._listeners,e,n,i),n.__jsPlumb=n.__jsPlumb||{},n.__jsPlumb[p()]=e};if("string"==typeof e)r(e);else if(null!=e.length)for(var o=0;o<e.length;o++)r(e[o]);return t},this.fire=function(t,e,n){if(this.tick)this.queue.unshift(arguments);else{if(this.tick=!0,!this.eventsSuspended&&this._listeners[t]){var i=this._listeners[t].length,r=0,o=!1,s=null;if(!this.shouldFireEvent||this.shouldFireEvent(t,e,n))for(;!o&&r<i&&!1!==s;){if(this.eventsToDieOn[t])this._listeners[t][r].apply(this,[e,n]);else try{s=this._listeners[t][r].apply(this,[e,n])}catch(e){f("jsPlumb: fire failed for event "+t+" : "+e)}r++,null!=this._listeners&&null!=this._listeners[t]||(o=!0)}}this.tick=!1,this._drain()}return this},this._drain=function(){var e=t.queue.pop();e&&t.fire.apply(t,e)},this.unbind=function(t,e){if(0===arguments.length)this._listeners={};else if(1===arguments.length){if("string"==typeof t)delete this._listeners[t];else if(t.__jsPlumb){var n=void 0;for(var i in t.__jsPlumb)n=t.__jsPlumb[i],d(this._listeners[n]||[],t)}}else 2===arguments.length&&d(this._listeners[t]||[],e);return this},this.getListener=function(e){return t._listeners[e]},this.setSuspendEvents=function(e){t.eventsSuspended=e},this.isSuspendEvents=function(){return t.eventsSuspended},this.silently=function(e){t.setSuspendEvents(!0);try{e()}catch(t){f("Cannot execute silent function "+t)}t.setSuspendEvents(!1)},this.cleanupListeners=function(){for(var e in t._listeners)t._listeners[e]=null}}}();t.EventGenerator=m}.call("undefined"!=typeof window?window:this),function(){"use strict";this.jsPlumbUtil.matchesSelector=function(t,e,n){for(var i=(n=n||t.parentNode).querySelectorAll(e),r=0;r<i.length;r++)if(i[r]===t)return!0;return!1},this.jsPlumbUtil.consume=function(t,e){t.stopPropagation?t.stopPropagation():t.returnValue=!1,!e&&t.preventDefault&&t.preventDefault()},this.jsPlumbUtil.sizeElement=function(t,e,n,i,r){t&&(t.style.height=r+"px",t.height=r,t.style.width=i+"px",t.width=i,t.style.left=e+"px",t.style.top=n+"px")}}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this,n=t.jsPlumbUtil,i=function(){return""+(new Date).getTime()},r=function(t){if(t._jsPlumb.paintStyle&&t._jsPlumb.hoverPaintStyle){var e={};p.extend(e,t._jsPlumb.paintStyle),p.extend(e,t._jsPlumb.hoverPaintStyle),delete t._jsPlumb.hoverPaintStyle,e.gradient&&t._jsPlumb.paintStyle.fill&&delete e.gradient,t._jsPlumb.hoverPaintStyle=e}},o=["tap","dbltap","click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu"],s=function(t){return null==t?null:t.split(" ")},a=function(t,e,n){for(var i in e)t[i]=n},l=function(t,e,i){if(t.getDefaultType){var r=t.getTypeDescriptor(),o={},s=t.getDefaultType(),l=n.merge({},s);a(o,s,"__default");for(var c=0,u=t._jsPlumb.types.length;c<u;c++){var d=t._jsPlumb.types[c];if("__default"!==d){var h=t._jsPlumb.instance.getType(d,r);null!=h&&(l=n.merge(l,h,["cssClass"],["connector"]),a(o,h,d))}}e&&(l=n.populate(l,e,"_")),t.applyType(l,i,o),i||t.repaint()}},c=t.jsPlumbUIComponent=function(t){n.EventGenerator.apply(this,arguments);var e=arguments,i=this.idPrefix+(new Date).getTime();this._jsPlumb={instance:t._jsPlumb,parameters:t.parameters||{},paintStyle:null,hoverPaintStyle:null,paintStyleInUse:null,hover:!1,beforeDetach:t.beforeDetach,beforeDrop:t.beforeDrop,overlayPlacements:[],hoverClass:t.hoverClass||t._jsPlumb.Defaults.HoverClass,types:[],typeCache:{}},this.cacheTypeItem=function(t,e,n){this._jsPlumb.typeCache[n]=this._jsPlumb.typeCache[n]||{},this._jsPlumb.typeCache[n][t]=e},this.getCachedTypeItem=function(t,e){return this._jsPlumb.typeCache[e]?this._jsPlumb.typeCache[e][t]:null},this.getId=function(){return i};var r=t.overlays||[],o={};if(this.defaultOverlayKeys){for(var s=0;s<this.defaultOverlayKeys.length;s++)Array.prototype.push.apply(r,this._jsPlumb.instance.Defaults[this.defaultOverlayKeys[s]]||[]);for(s=0;s<r.length;s++){var a=p.convertToFullOverlaySpec(r[s]);o[a[1].id]=a}}var l={overlays:o,parameters:t.parameters||{},scope:t.scope||this._jsPlumb.instance.getDefaultScope()};if(this.getDefaultType=function(){return l},this.appendToDefaultType=function(t){for(var e in t)l[e]=t[e]},t.events)for(var c in t.events)this.bind(c,t.events[c]);this.clone=function(){var t=Object.create(this.constructor.prototype);return this.constructor.apply(t,e),t}.bind(this),this.isDetachAllowed=function(t){var e=!0;if(this._jsPlumb.beforeDetach)try{e=this._jsPlumb.beforeDetach(t)}catch(t){n.log("jsPlumb: beforeDetach callback failed",t)}return e},this.isDropAllowed=function(t,e,i,r,o,s,a){var l=this._jsPlumb.instance.checkCondition("beforeDrop",{sourceId:t,targetId:e,scope:i,connection:r,dropEndpoint:o,source:s,target:a});if(this._jsPlumb.beforeDrop)try{l=this._jsPlumb.beforeDrop({sourceId:t,targetId:e,scope:i,connection:r,dropEndpoint:o,source:s,target:a})}catch(t){n.log("jsPlumb: beforeDrop callback failed",t)}return l};var u=[];this.setListenerComponent=function(t){for(var e=0;e<u.length;e++)u[e][3]=t}},u=function(t,e){var n=t._jsPlumb.types[e],i=t._jsPlumb.instance.getType(n,t.getTypeDescriptor());null!=i&&i.cssClass&&t.canvas&&t._jsPlumb.instance.removeClass(t.canvas,i.cssClass)};n.extend(t.jsPlumbUIComponent,n.EventGenerator,{getParameter:function(t){return this._jsPlumb.parameters[t]},setParameter:function(t,e){this._jsPlumb.parameters[t]=e},getParameters:function(){return this._jsPlumb.parameters},setParameters:function(t){this._jsPlumb.parameters=t},getClass:function(){return p.getClass(this.canvas)},hasClass:function(t){return p.hasClass(this.canvas,t)},addClass:function(t){p.addClass(this.canvas,t)},removeClass:function(t){p.removeClass(this.canvas,t)},updateClasses:function(t,e){p.updateClasses(this.canvas,t,e)},setType:function(t,e,n){this.clearTypes(),this._jsPlumb.types=s(t)||[],l(this,e,n)},getType:function(){return this._jsPlumb.types},reapplyTypes:function(t,e){l(this,t,e)},hasType:function(t){return-1!==this._jsPlumb.types.indexOf(t)},addType:function(t,e,n){var i=s(t),r=!1;if(null!=i){for(var o=0,a=i.length;o<a;o++)this.hasType(i[o])||(this._jsPlumb.types.push(i[o]),r=!0);r&&l(this,e,n)}},removeType:function(t,e,n){var i=s(t),r=!1,o=function(t){var e=this._jsPlumb.types.indexOf(t);return-1!==e&&(u(this,e),this._jsPlumb.types.splice(e,1),!0)}.bind(this);if(null!=i){for(var a=0,c=i.length;a<c;a++)r=o(i[a])||r;r&&l(this,e,n)}},clearTypes:function(t,e){for(var n=this._jsPlumb.types.length,i=0;i<n;i++)u(this,0),this._jsPlumb.types.splice(0,1);l(this,t,e)},toggleType:function(t,e,n){var i=s(t);if(null!=i){for(var r=0,o=i.length;r<o;r++){var a=this._jsPlumb.types.indexOf(i[r]);-1!==a?(u(this,a),this._jsPlumb.types.splice(a,1)):this._jsPlumb.types.push(i[r])}l(this,e,n)}},applyType:function(t,e){if(this.setPaintStyle(t.paintStyle,e),this.setHoverPaintStyle(t.hoverPaintStyle,e),t.parameters)for(var n in t.parameters)this.setParameter(n,t.parameters[n]);this._jsPlumb.paintStyleInUse=this.getPaintStyle()},setPaintStyle:function(t,e){this._jsPlumb.paintStyle=t,this._jsPlumb.paintStyleInUse=this._jsPlumb.paintStyle,r(this),e||this.repaint()},getPaintStyle:function(){return this._jsPlumb.paintStyle},setHoverPaintStyle:function(t,e){this._jsPlumb.hoverPaintStyle=t,r(this),e||this.repaint()},getHoverPaintStyle:function(){return this._jsPlumb.hoverPaintStyle},destroy:function(t){(t||null==this.typeId)&&(this.cleanupListeners(),this.clone=null,this._jsPlumb=null)},isHover:function(){return this._jsPlumb.hover},setHover:function(t,e,n){if(this._jsPlumb&&!this._jsPlumb.instance.currentlyDragging&&!this._jsPlumb.instance.isHoverSuspended()){this._jsPlumb.hover=t;var r=t?"addClass":"removeClass";null!=this.canvas&&(null!=this._jsPlumb.instance.hoverClass&&this._jsPlumb.instance[r](this.canvas,this._jsPlumb.instance.hoverClass),null!=this._jsPlumb.hoverClass&&this._jsPlumb.instance[r](this.canvas,this._jsPlumb.hoverClass)),null!=this._jsPlumb.hoverPaintStyle&&(this._jsPlumb.paintStyleInUse=t?this._jsPlumb.hoverPaintStyle:this._jsPlumb.paintStyle,this._jsPlumb.instance.isSuspendDrawing()||(n=n||i(),this.repaint({timestamp:n,recalc:!1}))),this.getAttachedElements&&!e&&function(t,e,n,i){var r=t.getAttachedElements();if(r)for(var o=0,s=r.length;o<s;o++)i&&i===r[o]||r[o].setHover(e,!0,n)}(this,t,i(),this)}}});var d=0,h=t.jsPlumbInstance=function(e){this.version="2.9.0",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:{fill:"#456"},EndpointStyles:[null,null],EndpointHoverStyle:null,EndpointHoverStyles:[null,null],HoverPaintStyle:null,LabelStyle:{color:"black"},LogEnabled:!1,Overlays:[],MaxConnections:1,PaintStyle:{"stroke-width":4,stroke:"#456"},ReattachConnections:!1,RenderMode:"svg",Scope:"jsPlumb_DefaultScope"},e&&p.extend(this.Defaults,e),this.logEnabled=this.Defaults.LogEnabled,this._connectionTypes={},this._endpointTypes={},n.EventGenerator.apply(this);var r=this,s=function(){var t=d+1;return d++,t}(),a=r.bind,l={},u=1,h=function(t){if(null==t)return null;if(3===t.nodeType||8===t.nodeType)return{el:t,text:!0};var e=r.getElement(t);return{el:e,id:n.isString(t)&&null==e?t:H(e)}};for(var f in this.getInstanceIndex=function(){return s},this.setZoom=function(t,e){return u=t,r.fire("zoom",u),e&&r.repaintEverything(),!0},this.getZoom=function(){return u},this.Defaults)l[f]=this.Defaults[f];var m,g=[];this.unbindContainer=function(){if(null!=m&&g.length>0)for(var t=0;t<g.length;t++)r.off(m,g[t][0],g[t][1])},this.setContainer=function(t){this.unbindContainer(),t=this.getElement(t),this.select().each(function(e){e.moveParent(t)}),this.selectEndpoints().each(function(e){e.moveParent(t)});var e=m;m=t,g.length=0;for(var n={endpointclick:"endpointClick",endpointdblclick:"endpointDblClick"},i=function(t,e,i){var o=e.srcElement||e.target,s=(o&&o.parentNode?o.parentNode._jsPlumb:null)||(o?o._jsPlumb:null)||(o&&o.parentNode&&o.parentNode.parentNode?o.parentNode.parentNode._jsPlumb:null);if(s){s.fire(t,s,e);var a=i&&n[i+t]||t;r.fire(a,s.component||s,e)}},s=function(t,e,n){g.push([t,n]),r.on(m,t,e,n)},a=function(t){s(t,".jtk-connector",function(e){i(t,e)}),s(t,".jtk-endpoint",function(e){i(t,e,"endpoint")}),s(t,".jtk-overlay",function(e){i(t,e)})},l=0;l<o.length;l++)a(o[l]);for(var c in w){var u=w[c].el;u.parentNode===e&&(e.removeChild(u),m.appendChild(u))}},this.getContainer=function(){return m},this.bind=function(t,e){"ready"===t&&b?e():a.apply(r,[t,e])},r.importDefaults=function(t){for(var e in t)r.Defaults[e]=t[e];return t.Container&&r.setContainer(t.Container),r},r.restoreDefaults=function(){return r.Defaults=p.extend({},l),r};var v=null,b=!1,y=[],x={},_={},w={},C={},k={},P=!1,S=[],D=!1,L=null,E=this.Defaults.Scope,T=1,M=function(){return""+T++},I=function(t,e){m?m.appendChild(t):e?this.getElement(e).appendChild(t):this.appendToRoot(t)}.bind(this),A=function(t,e,n,o){if(!D){var s,a=H(t),l=r.getDragManager();l&&(s=l.getElementsForDraggable(a)),null==n&&(n=i());var c=nt({elId:a,offset:e,recalc:!1,timestamp:n});if(s&&c&&c.o)for(var u in s)nt({elId:s[u].id,offset:{left:c.o.left+s[u].offset.left,top:c.o.top+s[u].offset.top},recalc:!1,timestamp:n});if(r.anchorManager.redraw(a,e,n,null,o),s)for(var d in s)r.anchorManager.redraw(s[d].id,e,n,s[d].offset,o,!0)}},j=function(t){return _[t]},O=function(t,e){var i=p.extend({},t);if(e&&p.extend(i,e),i.source&&(i.source.endpoint?i.sourceEndpoint=i.source:i.source=r.getElement(i.source)),i.target&&(i.target.endpoint?i.targetEndpoint=i.target:i.target=r.getElement(i.target)),t.uuids&&(i.sourceEndpoint=j(t.uuids[0]),i.targetEndpoint=j(t.uuids[1])),i.sourceEndpoint&&i.sourceEndpoint.isFull())n.log(r,"could not add connection; source endpoint is full");else if(i.targetEndpoint&&i.targetEndpoint.isFull())n.log(r,"could not add connection; target endpoint is full");else{if(!i.type&&i.sourceEndpoint&&(i.type=i.sourceEndpoint.connectionType),i.sourceEndpoint&&i.sourceEndpoint.connectorOverlays){i.overlays=i.overlays||[];for(var o=0,s=i.sourceEndpoint.connectorOverlays.length;o<s;o++)i.overlays.push(i.sourceEndpoint.connectorOverlays[o])}i.sourceEndpoint&&i.sourceEndpoint.scope&&(i.scope=i.sourceEndpoint.scope),!i["pointer-events"]&&i.sourceEndpoint&&i.sourceEndpoint.connectorPointerEvents&&(i["pointer-events"]=i.sourceEndpoint.connectorPointerEvents);var a=function(t,e,n){return r.addEndpoint(t,function(t,e){var n=p.extend({},t);for(var i in e)e[i]&&(n[i]=e[i]);return n}(e,{anchor:i.anchors?i.anchors[n]:i.anchor,endpoint:i.endpoints?i.endpoints[n]:i.endpoint,paintStyle:i.endpointStyles?i.endpointStyles[n]:i.endpointStyle,hoverPaintStyle:i.endpointHoverStyles?i.endpointHoverStyles[n]:i.endpointHoverStyle}))},l=function(t,e,n,r){if(i[t]&&!i[t].endpoint&&!i[t+"Endpoint"]&&!i.newConnection){var o=n[H(i[t])];if(o=o?o[r]:null){if(!o.enabled)return!1;var s=null!=o.endpoint&&o.endpoint._jsPlumb?o.endpoint:a(i[t],o.def,e);if(s.isFull())return!1;i[t+"Endpoint"]=s,!i.scope&&o.def.scope&&(i.scope=o.def.scope),o.uniqueEndpoint?o.endpoint?s.finalEndpoint=o.endpoint:(o.endpoint=s,s.setDeleteOnEmpty(!1)):s.setDeleteOnEmpty(!0),0===e&&o.def.connectorOverlays&&(i.overlays=i.overlays||[],Array.prototype.push.apply(i.overlays,o.def.connectorOverlays))}}};if(!1!==l("source",0,this.sourceEndpointDefinitions,i.type||"default")&&!1!==l("target",1,this.targetEndpointDefinitions,i.type||"default"))return i.sourceEndpoint&&i.targetEndpoint&&(function(t,e){for(var n=t.scope.split(/\s/),i=e.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}(i.sourceEndpoint,i.targetEndpoint)||(i=null)),i}}.bind(r),N=function(t){var e=r.Defaults.ConnectionType||r.getDefaultConnectionType();t._jsPlumb=r,t.newConnection=N,t.newEndpoint=F,t.endpointsByUUID=_,t.endpointsByElement=x,t.finaliseConnection=$,t.id="con_"+M();var n=new e(t);return n.isDetachable()&&(n.endpoints[0].initDraggable("_jsPlumbSource"),n.endpoints[1].initDraggable("_jsPlumbTarget")),n},$=r.finaliseConnection=function(t,e,n,i){if(e=e||{},t.suspendedEndpoint||y.push(t),t.pending=null,t.endpoints[0].isTemporarySource=!1,!1!==i&&r.anchorManager.newConnection(t),A(t.source),!e.doNotFireConnectionEvent&&!1!==e.fireEvent){var o={connection:t,source:t.source,target:t.target,sourceId:t.sourceId,targetId:t.targetId,sourceEndpoint:t.endpoints[0],targetEndpoint:t.endpoints[1]};r.fire("connection",o,n)}},F=function(t,e){var n=r.Defaults.EndpointType||p.Endpoint,i=p.extend({},t);i._jsPlumb=r,i.newConnection=N,i.newEndpoint=F,i.endpointsByUUID=_,i.endpointsByElement=x,i.fireDetachEvent=U,i.elementId=e||H(i.source);var o=new n(i);return o.id="ep_"+M(),et(i.elementId,i.source),p.headless||r.getDragManager().endpointAdded(i.source,e),o},R=function(t,e,n){var i=x[t];if(i&&i.length)for(var r=0,o=i.length;r<o;r++){for(var s=0,a=i[r].connections.length;s<a;s++){if(e(i[r].connections[s]))return}n&&n(i[r])}},z=function(t,e,n){e="block"===e;var i=null;n&&(i=function(t){t.setVisible(e,!0,!0)});var r=h(t);R(r.id,function(t){if(e&&n){var i=t.sourceId===r.id?1:0;t.endpoints[i].isVisible()&&t.setVisible(!0)}else t.setVisible(e)},i)},H=function(t,e,i){if(n.isString(t))return t;if(null==t)return null;var o=r.getAttribute(t,"id");return o&&"undefined"!==o||(2===arguments.length&&void 0!==arguments[1]?o=e:(1===arguments.length||3===arguments.length&&!arguments[2])&&(o="jsPlumb_"+s+"_"+M()),i||r.setAttribute(t,"id",o)),o};this.setConnectionBeingDragged=function(t){P=t},this.isConnectionBeingDragged=function(){return P},this.getManagedElements=function(){return w},this.connectorClass="jtk-connector",this.connectorOutlineClass="jtk-connector-outline",this.connectedClass="jtk-connected",this.hoverClass="jtk-hover",this.endpointClass="jtk-endpoint",this.endpointConnectedClass="jtk-endpoint-connected",this.endpointFullClass="jtk-endpoint-full",this.endpointDropAllowedClass="jtk-endpoint-drop-allowed",this.endpointDropForbiddenClass="jtk-endpoint-drop-forbidden",this.overlayClass="jtk-overlay",this.draggingClass="jtk-dragging",this.elementDraggingClass="jtk-element-dragging",this.sourceElementDraggingClass="jtk-source-element-dragging",this.targetElementDraggingClass="jtk-target-element-dragging",this.endpointAnchorClassPrefix="jtk-endpoint-anchor",this.hoverSourceClass="jtk-source-hover",this.hoverTargetClass="jtk-target-hover",this.dragSelectClass="jtk-drag-select",this.Anchors={},this.Connectors={svg:{}},this.Endpoints={svg:{}},this.Overlays={svg:{}},this.ConnectorRenderers={},this.SVG="svg",this.addEndpoint=function(t,e,i){i=i||{};var o=p.extend({},i);p.extend(o,e),o.endpoint=o.endpoint||r.Defaults.Endpoint,o.paintStyle=o.paintStyle||r.Defaults.EndpointStyle;for(var s=[],a=n.isArray(t)||null!=t.length&&!n.isString(t)?t:[t],l=0,c=a.length;l<c;l++){o.source=r.getElement(a[l]),tt(o.source);var u=H(o.source),d=F(o,u),h=et(u,o.source).info.o;n.addToList(x,u,d),D||d.paint({anchorLoc:d.anchor.compute({xy:[h.left,h.top],wh:S[u],element:d,timestamp:L}),timestamp:L}),s.push(d)}return 1===s.length?s[0]:s},this.addEndpoints=function(t,e,i){for(var o=[],s=0,a=e.length;s<a;s++){var l=r.addEndpoint(t,e[s],i);n.isArray(l)?Array.prototype.push.apply(o,l):o.push(l)}return o},this.animate=function(t,e,i){if(!this.animationSupported)return!1;i=i||{};var o=r.getElement(t),s=H(o),a=p.animEvents.step,l=p.animEvents.complete;i[a]=n.wrap(i[a],function(){r.revalidate(s)}),i[l]=n.wrap(i[l],function(){r.revalidate(s)}),r.doAnimate(o,e,i)},this.checkCondition=function(t,e){var i=r.getListener(t),o=!0;if(i&&i.length>0){var s=Array.prototype.slice.call(arguments,1);try{for(var a=0,l=i.length;a<l;a++)o=o&&i[a].apply(i[a],s)}catch(e){n.log(r,"cannot check condition ["+t+"]"+e)}}return o},this.connect=function(t,e){var i,r=O(t,e);if(r){if(null==r.source&&null==r.sourceEndpoint)return void n.log("Cannot establish connection - source does not exist");if(null==r.target&&null==r.targetEndpoint)return void n.log("Cannot establish connection - target does not exist");tt(r.source),i=N(r),$(i,r)}return i};var W=[{el:"source",elId:"sourceId",epDefs:"sourceEndpointDefinitions"},{el:"target",elId:"targetId",epDefs:"targetEndpointDefinitions"}],B=function(t,e,n,i){var r,o,s,a=W[n],l=t[a.elId],c=(t[a.el],t.endpoints[n]),u={index:n,originalSourceId:0===n?l:t.sourceId,newSourceId:t.sourceId,originalTargetId:1===n?l:t.targetId,newTargetId:t.targetId,connection:t};if(e.constructor===p.Endpoint)(r=e).addConnection(t),e=r.element;else if(o=H(e),s=this[a.epDefs][o],o===t[a.elId])r=null;else if(s)for(var d in s){if(!s[d].enabled)return;r=null!=s[d].endpoint&&s[d].endpoint._jsPlumb?s[d].endpoint:this.addEndpoint(e,s[d].def),s[d].uniqueEndpoint&&(s[d].endpoint=r),r.addConnection(t)}else r=t.makeEndpoint(0===n,e,o);return null!=r&&(c.detachFromConnection(t),t.endpoints[n]=r,t[a.el]=r.element,t[a.elId]=r.elementId,u[0===n?"newSourceId":"newTargetId"]=r.elementId,q(u),i||t.repaint()),u.element=e,u}.bind(this);this.setSource=function(t,e,n){var i=B(t,e,0,n);this.anchorManager.sourceChanged(i.originalSourceId,i.newSourceId,t,i.el)},this.setTarget=function(t,e,n){var i=B(t,e,1,n);this.anchorManager.updateOtherEndpoint(i.originalSourceId,i.originalTargetId,i.newTargetId,t)},this.deleteEndpoint=function(t,e,n){var i="string"==typeof t?_[t]:t;return i&&r.deleteObject({endpoint:i,dontUpdateHover:e,deleteAttachedObjects:n}),r},this.deleteEveryEndpoint=function(){var t=r.setSuspendDrawing(!0);for(var e in x){var n=x[e];if(n&&n.length)for(var i=0,o=n.length;i<o;i++)r.deleteEndpoint(n[i],!0)}x={},w={},_={},C={},k={},r.anchorManager.reset();var s=r.getDragManager();return s&&s.reset(),t||r.setSuspendDrawing(!1),r};var U=function(t,e,n){var i=r.Defaults.ConnectionType||r.getDefaultConnectionType(),o=t.constructor===i?{connection:t,source:t.source,target:t.target,sourceId:t.sourceId,targetId:t.targetId,sourceEndpoint:t.endpoints[0],targetEndpoint:t.endpoints[1]}:t;e&&r.fire("connectionDetached",o,n),r.fire("internal.connectionDetached",o,n),r.anchorManager.connectionDetached(o)},q=r.fireMoveEvent=function(t,e){r.fire("connectionMoved",t,e)};this.unregisterEndpoint=function(t){for(var e in t._jsPlumb.uuid&&(_[t._jsPlumb.uuid]=null),r.anchorManager.deleteEndpoint(t),x){var n=x[e];if(n){for(var i=[],o=0,s=n.length;o<s;o++)n[o]!==t&&i.push(n[o]);x[e]=i}x[e].length<1&&delete x[e]}};this.deleteConnection=function(t,e){return!(null==t||!(e=e||{}).force&&!n.functionChain(!0,!1,[[t.endpoints[0],"isDetachAllowed",[t]],[t.endpoints[1],"isDetachAllowed",[t]],[t,"isDetachAllowed",[t]],[r,"checkCondition",["beforeDetach",t]]]))&&(t.setHover(!1),U(t,!t.pending&&!1!==e.fireEvent,e.originalEvent),t.endpoints[0].detachFromConnection(t),t.endpoints[1].detachFromConnection(t),n.removeWithFunction(y,function(e){return t.id===e.id}),t.cleanup(),t.destroy(),!0)},this.deleteEveryConnection=function(t){t=t||{};var e=y.length,n=0;return r.batch(function(){for(var i=0;i<e;i++)n+=r.deleteConnection(y[0],t)?1:0}),n},this.deleteConnectionsForElement=function(t,e){e=e||{},t=r.getElement(t);var n=H(t),i=x[n];if(i&&i.length)for(var o=0,s=i.length;o<s;o++)i[o].deleteEveryConnection(e);return r},this.deleteObject=function(t){var e={endpoints:{},connections:{},endpointCount:0,connectionCount:0},i=!1!==t.deleteAttachedObjects,o=function(n){null!=n&&null==e.connections[n.id]&&(t.dontUpdateHover||null==n._jsPlumb||n.setHover(!1),e.connections[n.id]=n,e.connectionCount++)};for(var s in t.connection?o(t.connection):function(n){if(null!=n&&null==e.endpoints[n.id]&&(t.dontUpdateHover||null==n._jsPlumb||n.setHover(!1),e.endpoints[n.id]=n,e.endpointCount++,i))for(var r=0;r<n.connections.length;r++){var s=n.connections[r];o(s)}}(t.endpoint),e.connections){var a=e.connections[s];if(a._jsPlumb){n.removeWithFunction(y,function(t){return a.id===t.id}),U(a,!1!==t.fireEvent&&!a.pending,t.originalEvent);var l=null==t.deleteAttachedObjects?null:!t.deleteAttachedObjects;a.endpoints[0].detachFromConnection(a,null,l),a.endpoints[1].detachFromConnection(a,null,l),a.cleanup(!0),a.destroy(!0)}}for(var c in e.endpoints){var u=e.endpoints[c];u._jsPlumb&&(r.unregisterEndpoint(u),u.cleanup(!0),u.destroy(!0))}return e};var G=function(t,e,n){return function(){return function(t,e,n,i){for(var r=0,o=t.length;r<o;r++)t[r][e].apply(t[r],n);return i(t)}(t,e,arguments,n)}},Y=function(t,e){return function(){return function(t,e,n){for(var i=[],r=0,o=t.length;r<o;r++)i.push([t[r][e].apply(t[r],n),t[r]]);return i}(t,e,arguments)}},V=function(t,e){var n=[];if(t)if("string"==typeof t){if("*"===t)return t;n.push(t)}else if(e)n=t;else if(t.length)for(var i=0,r=t.length;i<r;i++)n.push(h(t[i]).id);else n.push(h(t).id);return n},X=function(t,e,n){return"*"===t||(t.length>0?-1!==t.indexOf(e):!n)};this.getConnections=function(t,e){t?t.constructor===String&&(t={scope:t}):t={};for(var n=t.scope||r.getDefaultScope(),i=V(n,!0),o=V(t.source),s=V(t.target),a=!e&&i.length>1?{}:[],l=function(t,n){if(!e&&i.length>1){var r=a[t];null==r&&(r=a[t]=[]),r.push(n)}else a.push(n)},c=0,u=y.length;c<u;c++){var d=y[c],h=d.proxies&&d.proxies[0]?d.proxies[0].originalEp.elementId:d.sourceId,p=d.proxies&&d.proxies[1]?d.proxies[1].originalEp.elementId:d.targetId;X(i,d.scope)&&X(o,h)&&X(s,p)&&l(d.scope,d)}return a};var K=function(t,e){var n,i,r={length:t.length,each:function(t,e){return function(n){for(var i=0,r=t.length;i<r;i++)n(t[i]);return e(t)}}(t,e),get:function(t){return function(e){return t[e]}}(t)},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"],s=["getLabel","getOverlay","isHover","getParameter","getParameters","getPaintStyle","getHoverPaintStyle","isVisible","hasType","getType","isSuspendEvents"];for(n=0,i=o.length;n<i;n++)r[o[n]]=G(t,o[n],e);for(n=0,i=s.length;n<i;n++)r[s[n]]=Y(t,s[n]);return r},J=function(t){var e=K(t,J);return p.extend(e,{setDetachable:G(t,"setDetachable",J),setReattach:G(t,"setReattach",J),setConnector:G(t,"setConnector",J),delete:function(){for(var e=0,n=t.length;e<n;e++)r.deleteConnection(t[e])},isDetachable:Y(t,"isDetachable"),isReattach:Y(t,"isReattach")})},Z=function(t){var e=K(t,Z);return p.extend(e,{setEnabled:G(t,"setEnabled",Z),setAnchor:G(t,"setAnchor",Z),isEnabled:Y(t,"isEnabled"),deleteEveryConnection:function(){for(var e=0,n=t.length;e<n;e++)t[e].deleteEveryConnection()},delete:function(){for(var e=0,n=t.length;e<n;e++)r.deleteEndpoint(t[e])}})};this.select=function(t){return(t=t||{}).scope=t.scope||"*",J(t.connections||r.getConnections(t,!0))},this.selectEndpoints=function(t){(t=t||{}).scope=t.scope||"*";var e=!t.element&&!t.source&&!t.target,n=e?"*":V(t.element),i=e?"*":V(t.source),r=e?"*":V(t.target),o=V(t.scope,!0),s=[];for(var a in x){var l=X(n,a,!0),c=X(i,a,!0),u="*"!==i,d=X(r,a,!0),h="*"!==r;if(l||c||d)t:for(var p=0,f=x[a].length;p<f;p++){var m=x[a][p];if(X(o,m.scope,!0)){var g=u&&i.length>0&&!m.isSource,v=h&&r.length>0&&!m.isTarget;if(g||v)continue t;s.push(m)}}}return Z(s)},this.getAllConnections=function(){return y},this.getDefaultScope=function(){return E},this.getEndpoint=j,this.getEndpoints=function(t){return x[h(t).id]||[]},this.getDefaultEndpointType=function(){return p.Endpoint},this.getDefaultConnectionType=function(){return p.Connection},this.getId=H,this.draw=A,this.info=h,this.appendElement=I;var Q=!1;this.isHoverSuspended=function(){return Q},this.setHoverSuspended=function(t){Q=t},this.hide=function(t,e){return z(t,"none",e),r},this.idstamp=M;var tt=function(t){if(!m&&t){var e=r.getElement(t);e.offsetParent&&r.setContainer(e.offsetParent)}},et=r.manage=function(t,e,n){return w[t]||(w[t]={el:e,endpoints:[],connections:[]},w[t].info=nt({elId:t,timestamp:L}),r.addClass(e,"jtk-managed"),n||r.fire("manageElement",{id:t,info:w[t].info,el:e})),w[t]},nt=(r.unmanage=function(t){w[t]&&(r.removeClass(w[t].el,"jtk-managed"),delete w[t],r.fire("unmanageElement",t))},function(t){var e,n=t.timestamp,i=t.recalc,o=t.offset,s=t.elId;return D&&!n&&(n=L),!i&&n&&n===k[s]?{o:t.offset||C[s],s:S[s]}:(i||!o&&null==C[s]?null!=(e=w[s]?w[s].el:null)&&(S[s]=r.getSize(e),C[s]=r.getOffset(e),k[s]=n):(C[s]=o||C[s],null==S[s]&&null!=(e=w[s].el)&&(S[s]=r.getSize(e)),k[s]=n),C[s]&&!C[s].right&&(C[s].right=C[s].left+S[s][0],C[s].bottom=C[s].top+S[s][1],C[s].width=S[s][0],C[s].height=S[s][1],C[s].centerx=C[s].left+C[s].width/2,C[s].centery=C[s].top+C[s].height/2),{o:C[s],s:S[s]})});this.updateOffset=nt,this.init=function(){b||(r.Defaults.Container&&r.setContainer(r.Defaults.Container),r.anchorManager=new t.jsPlumb.AnchorManager({jsPlumbInstance:r}),b=!0,r.fire("ready",r))}.bind(this),this.log=v,this.jsPlumbUIComponent=c,this.makeAnchor=function(){var e,i=function(e,n){if(t.jsPlumb.Anchors[e])return new t.jsPlumb.Anchors[e](n);if(!r.Defaults.DoNotThrowErrors)throw{msg:"jsPlumb: unknown anchor type '"+e+"'"}};if(0===arguments.length)return null;var o=arguments[0],s=arguments[1],a=(arguments[2],null);if(o.compute&&o.getOrientation)return o;if("string"==typeof o)a=i(arguments[0],{elementId:s,jsPlumbInstance:r});else if(n.isArray(o))if(n.isArray(o[0])||n.isString(o[0]))2===o.length&&n.isObject(o[1])?n.isString(o[0])?(e=t.jsPlumb.extend({elementId:s,jsPlumbInstance:r},o[1]),a=i(o[0],e)):(e=t.jsPlumb.extend({elementId:s,jsPlumbInstance:r,anchors:o[0]},o[1]),a=new t.jsPlumb.DynamicAnchor(e)):a=new p.DynamicAnchor({anchors:o,selector:null,elementId:s,jsPlumbInstance:r});else{var l={x:o[0],y:o[1],orientation:o.length>=4?[o[2],o[3]]:[0,0],offsets:o.length>=6?[o[4],o[5]]:[0,0],elementId:s,jsPlumbInstance:r,cssClass:7===o.length?o[6]:null};(a=new t.jsPlumb.Anchor(l)).clone=function(){return new t.jsPlumb.Anchor(l)}}return a.id||(a.id="anchor_"+M()),a},this.makeAnchors=function(e,i,o){for(var s=[],a=0,l=e.length;a<l;a++)"string"==typeof e[a]?s.push(t.jsPlumb.Anchors[e[a]]({elementId:i,jsPlumbInstance:o})):n.isArray(e[a])&&s.push(r.makeAnchor(e[a],i,o));return s},this.makeDynamicAnchor=function(e,n){return new t.jsPlumb.DynamicAnchor({anchors:e,selector:n,elementId:null,jsPlumbInstance:r})},this.targetEndpointDefinitions={},this.sourceEndpointDefinitions={};var it=function(e,i,o,s,a){var l=new c(i),u=i._jsPlumb.EndpointDropHandler({jsPlumb:r,enabled:function(){return e.def.enabled},isFull:function(){var t=r.select({target:e.id}).length;return e.def.maxConnections>0&&t>=e.def.maxConnections},element:e.el,elementId:e.id,isSource:s,isTarget:a,addClass:function(t){r.addClass(e.el,t)},removeClass:function(t){r.removeClass(e.el,t)},onDrop:function(t){t.endpoints[0].anchor.unlock()},isDropAllowed:function(){return l.isDropAllowed.apply(l,arguments)},isRedrop:function(t){return null!=t.suspendedElement&&null!=t.suspendedEndpoint&&t.suspendedEndpoint.element===e.el},getEndpoint:function(n){var o=e.def.endpoint;if(null==o||null==o._jsPlumb){var s=r.deriveEndpointAndAnchorSpec(n.getType().join(" "),!0),a=s.endpoints?t.jsPlumb.extend(i,{endpoint:e.def.def.endpoint||s.endpoints[1]}):i;s.anchors&&(a=t.jsPlumb.extend(a,{anchor:e.def.def.anchor||s.anchors[1]})),(o=r.addEndpoint(e.el,a))._mtNew=!0}if(i.uniqueEndpoint&&(e.def.endpoint=o),o.setDeleteOnEmpty(!0),n.isDetachable()&&o.initDraggable(),null!=o.anchor.positionFinder){var l=r.getUIPosition(arguments,r.getZoom()),c=r.getOffset(e.el),u=r.getSize(e.el),d=null==l?[0,0]:o.anchor.positionFinder(l,c,u,o.anchor.constructorParams);o.anchor.x=d[0],o.anchor.y=d[1]}return o},maybeCleanup:function(t){t._mtNew&&0===t.connections.length?r.deleteObject({endpoint:t}):delete t._mtNew}}),d=t.jsPlumb.dragEvents.drop;return o.scope=o.scope||i.scope||r.Defaults.Scope,o[d]=n.wrap(o[d],u,!0),o.rank=i.rank||0,a&&(o[t.jsPlumb.dragEvents.over]=function(){return!0}),!1===i.allowLoopback&&(o.canDrop=function(t){return t.getDragElement()._jsPlumbRelatedElement!==e.el}),r.initDroppable(e.el,o,"internal"),u};this.makeTarget=function(e,n,i){var o=t.jsPlumb.extend({_jsPlumb:this},i);t.jsPlumb.extend(o,n);for(var s=o.maxConnections||-1,a=function(e){var n=h(e),i=n.id,a=t.jsPlumb.extend({},o.dropOptions||{}),l=o.connectionType||"default";this.targetEndpointDefinitions[i]=this.targetEndpointDefinitions[i]||{},tt(i),n.el._isJsPlumbGroup&&null==a.rank&&(a.rank=-1);var c={def:t.jsPlumb.extend({},o),uniqueEndpoint:o.uniqueEndpoint,maxConnections:s,enabled:!0};o.createEndpoint&&(c.uniqueEndpoint=!0,c.endpoint=r.addEndpoint(e,c.def),c.endpoint.setDeleteOnEmpty(!1)),n.def=c,this.targetEndpointDefinitions[i][l]=c,it(n,o,a,!0===o.isSource,!0),n.el._katavorioDrop[n.el._katavorioDrop.length-1].targetDef=c}.bind(this),l=e.length&&e.constructor!==String?e:[e],c=0,u=l.length;c<u;c++)a(l[c]);return this},this.unmakeTarget=function(t,e){var n=h(t);return r.destroyDroppable(n.el,"internal"),e||delete this.targetEndpointDefinitions[n.id],this},this.makeSource=function(e,i,o){var s=t.jsPlumb.extend({_jsPlumb:this},o);t.jsPlumb.extend(s,i);var a=s.connectionType||"default",l=r.deriveEndpointAndAnchorSpec(a);s.endpoint=s.endpoint||l.endpoints[0],s.anchor=s.anchor||l.anchors[0];for(var c=s.maxConnections||-1,d=s.onMaxConnections,p=function(i){var o=i.id,l=this.getElement(i.el);this.sourceEndpointDefinitions[o]=this.sourceEndpointDefinitions[o]||{},tt(o);var h={def:t.jsPlumb.extend({},s),uniqueEndpoint:s.uniqueEndpoint,maxConnections:c,enabled:!0};s.createEndpoint&&(h.uniqueEndpoint=!0,h.endpoint=r.addEndpoint(e,h.def),h.endpoint.setDeleteOnEmpty(!1)),this.sourceEndpointDefinitions[o][a]=h,i.def=h;var p=t.jsPlumb.dragEvents.stop,f=t.jsPlumb.dragEvents.drag,m=t.jsPlumb.extend({},s.dragOptions||{}),g=m.drag,v=m.stop,b=null,y=!1;m.scope=m.scope||s.scope,m[f]=n.wrap(m[f],function(){g&&g.apply(this,arguments),y=!1}),m[p]=n.wrap(m[p],function(){if(v&&v.apply(this,arguments),this.currentlyDragging=!1,null!=b._jsPlumb){var t=s.anchor||this.Defaults.Anchor,e=b.anchor,n=b.connections[0],i=this.makeAnchor(t,o,this),a=b.element;if(null!=i.positionFinder){var l=r.getOffset(a),c=this.getSize(a),u={left:l.left+e.x*c[0],top:l.top+e.y*c[1]},d=i.positionFinder(u,l,c,i.constructorParams);i.x=d[0],i.y=d[1]}b.setAnchor(i,!0),b.repaint(),this.repaint(b.elementId),null!=n&&this.repaint(n.targetId)}}.bind(this));var x=function(e){if(3!==e.which&&2!==e.button){var h=this.sourceEndpointDefinitions[o][a];if(h.enabled){if(o=this.getId(this.getElement(i.el)),s.filter)if(!1===(n.isString(s.filter)?function(t,e,n,i,r){for(var o=t.target||t.srcElement,s=!1,a=i.getSelector(e,n),l=0;l<a.length;l++)if(a[l]===o){s=!0;break}return r?!s:s}(e,i.el,s.filter,this,s.filterExclude):s.filter(e,i.el)))return;var p=this.select({source:o}).length;if(h.maxConnections>=0&&p>=h.maxConnections)return d&&d({element:i.el,maxConnections:c},e),!1;var f=t.jsPlumb.getPositionOnElement(e,l,u),g={};t.jsPlumb.extend(g,s),g.isTemporarySource=!0,g.anchor=[f[0],f[1],0,0],g.dragOptions=m,h.def.scope&&(g.scope=h.def.scope),b=this.addEndpoint(o,g),y=!0,b.setDeleteOnEmpty(!0),h.uniqueEndpoint&&(h.endpoint?b.finalEndpoint=h.endpoint:(h.endpoint=b,b.setDeleteOnEmpty(!1)));var v=function(){r.off(b.canvas,"mouseup",v),r.off(i.el,"mouseup",v),y&&(y=!1,r.deleteEndpoint(b))};r.on(b.canvas,"mouseup",v),r.on(i.el,"mouseup",v);var x={};if(h.def.extract)for(var _ in h.def.extract){var w=(e.srcElement||e.target).getAttribute(_);w&&(x[h.def.extract[_]]=w)}r.trigger(b.canvas,"mousedown",e,x),n.consume(e)}}}.bind(this);this.on(i.el,"mousedown",x),h.trigger=x,s.filter&&(n.isString(s.filter)||n.isFunction(s.filter))&&r.setDragFilter(i.el,s.filter);var _=t.jsPlumb.extend({},s.dropOptions||{});it(i,s,_,!0,!0===s.isTarget)}.bind(this),f=e.length&&e.constructor!==String?e:[e],m=0,g=f.length;m<g;m++)p(h(f[m]));return this},this.unmakeSource=function(t,e,n){var i=h(t);r.destroyDroppable(i.el,"internal");var o=this.sourceEndpointDefinitions[i.id];if(o)for(var s in o)if(null==e||e===s){var a=o[s].trigger;a&&r.off(i.el,"mousedown",a),n||delete this.sourceEndpointDefinitions[i.id][s]}return this},this.unmakeEverySource=function(){for(var t in this.sourceEndpointDefinitions)r.unmakeSource(t,null,!0);return this.sourceEndpointDefinitions={},this};var rt=function(t,e,i){e=n.isArray(e)?e:[e];var r=H(t);i=i||"default";for(var o=0;o<e.length;o++){var s=this[e[o]][r];if(s&&s[i])return s[i].def.scope||this.Defaults.Scope}}.bind(this),ot=function(t,e,i,r){i=n.isArray(i)?i:[i];var o=H(t);r=r||"default";for(var s=0;s<i.length;s++){var a=this[i[s]][o];a&&a[r]&&(a[r].def.scope=e)}}.bind(this);this.getScope=function(t,e){return rt(t,["sourceEndpointDefinitions","targetEndpointDefinitions"])},this.getSourceScope=function(t){return rt(t,"sourceEndpointDefinitions")},this.getTargetScope=function(t){return rt(t,"targetEndpointDefinitions")},this.setScope=function(t,e,n){this.setSourceScope(t,e,n),this.setTargetScope(t,e,n)},this.setSourceScope=function(t,e,n){ot(t,e,"sourceEndpointDefinitions",n),this.setDragScope(t,e)},this.setTargetScope=function(t,e,n){ot(t,e,"targetEndpointDefinitions",n),this.setDropScope(t,e)},this.unmakeEveryTarget=function(){for(var t in this.targetEndpointDefinitions)r.unmakeTarget(t,!0);return this.targetEndpointDefinitions={},this};var st=function(t,e,i,o,s){var a,l,c,u="source"===t?this.sourceEndpointDefinitions:this.targetEndpointDefinitions;if(s=s||"default",e.length&&!n.isString(e)){a=[];for(var d=0,p=e.length;d<p;d++)u[(l=h(e[d])).id]&&u[l.id][s]&&(a[d]=u[l.id][s].enabled,c=o?!a[d]:i,u[l.id][s].enabled=c,r[c?"removeClass":"addClass"](l.el,"jtk-"+t+"-disabled"))}else{var f=(l=h(e)).id;u[f]&&u[f][s]&&(a=u[f][s].enabled,c=o?!a:i,u[f][s].enabled=c,r[c?"removeClass":"addClass"](l.el,"jtk-"+t+"-disabled"))}return a}.bind(this),at=function(t,e){return n.isString(t)||!t.length?e.apply(this,[t]):t.length?e.apply(this,[t[0]]):void 0}.bind(this);this.toggleSourceEnabled=function(t,e){return st("source",t,null,!0,e),this.isSourceEnabled(t,e)},this.setSourceEnabled=function(t,e,n){return st("source",t,e,null,n)},this.isSource=function(t,e){return e=e||"default",at(t,function(t){var n=this.sourceEndpointDefinitions[h(t).id];return null!=n&&null!=n[e]}.bind(this))},this.isSourceEnabled=function(t,e){return e=e||"default",at(t,function(t){var n=this.sourceEndpointDefinitions[h(t).id];return n&&n[e]&&!0===n[e].enabled}.bind(this))},this.toggleTargetEnabled=function(t,e){return st("target",t,null,!0,e),this.isTargetEnabled(t,e)},this.isTarget=function(t,e){return e=e||"default",at(t,function(t){var n=this.targetEndpointDefinitions[h(t).id];return null!=n&&null!=n[e]}.bind(this))},this.isTargetEnabled=function(t,e){return e=e||"default",at(t,function(t){var n=this.targetEndpointDefinitions[h(t).id];return n&&n[e]&&!0===n[e].enabled}.bind(this))},this.setTargetEnabled=function(t,e,n){return st("target",t,e,null,n)},this.ready=function(t){r.bind("ready",t)};var lt=function(t,e){if("object"==typeof t&&t.length)for(var n=0,i=t.length;n<i;n++)e(t[n]);else e(t);return r};this.repaint=function(t,e,n){return lt(t,function(t){A(t,e,n)})},this.revalidate=function(t,e,n){return lt(t,function(t){var i=n?t:r.getId(t);r.updateOffset({elId:i,recalc:!0,timestamp:e});var o=r.getDragManager();o&&o.updateOffsets(i),r.repaint(t)})},this.repaintEverything=function(){var t,e=i();for(t in x)r.updateOffset({elId:t,recalc:!0,timestamp:e});for(t in x)A(t,null,e);return this},this.removeAllEndpoints=function(t,e,n){n=n||[];var i=function(t){var o,s,a=h(t),l=x[a.id];if(l)for(n.push(a),o=0,s=l.length;o<s;o++)r.deleteEndpoint(l[o],!1);if(delete x[a.id],e&&a.el&&3!==a.el.nodeType&&8!==a.el.nodeType)for(o=0,s=a.el.childNodes.length;o<s;o++)i(a.el.childNodes[o])};return i(t),this};var ct=function(t,e){r.removeAllEndpoints(t.id,!0,e);for(var n=r.getDragManager(),i=function(t){n&&n.elementRemoved(t.id),r.anchorManager.clearFor(t.id),r.anchorManager.removeFloatingConnection(t.id),r.isSource(t.el)&&r.unmakeSource(t.el),r.isTarget(t.el)&&r.unmakeTarget(t.el),r.destroyDraggable(t.el),r.destroyDroppable(t.el),delete r.floatingConnections[t.id],delete w[t.id],delete C[t.id],t.el&&(r.removeElement(t.el),t.el._jsPlumb=null)},o=1;o<e.length;o++)i(e[o]);i(t)};this.remove=function(t,e){var n=h(t),i=[];return n.text?n.el.parentNode.removeChild(n.el):n.id&&r.batch(function(){ct(n,i)},!0===e),r},this.empty=function(t,e){var n=[],i=function(t,e){var r=h(t);if(r.text)r.el.parentNode.removeChild(r.el);else if(r.el){for(;r.el.childNodes.length>0;)i(r.el.childNodes[0]);e||ct(r,n)}};return r.batch(function(){i(t,!0)},!1===e),r},this.reset=function(t){r.silently(function(){Q=!1,r.removeAllGroups(),r.removeGroupManager(),r.deleteEveryEndpoint(),t||r.unbind(),this.targetEndpointDefinitions={},this.sourceEndpointDefinitions={},y.length=0,this.doReset&&this.doReset()}.bind(this))};var ut=function(t){t.canvas&&t.canvas.parentNode&&t.canvas.parentNode.removeChild(t.canvas),t.cleanup(),t.destroy()};this.clear=function(){r.select().each(ut),r.selectEndpoints().each(ut),x={},_={}},this.setDefaultScope=function(t){return E=t,r},this.deriveEndpointAndAnchorSpec=function(t,e){for(var n=((e?"":"default ")+t).split(/[\s]/),i=null,o=null,s=null,a=null,l=0;l<n.length;l++){var c=r.getType(n[l],"connection");c&&(c.endpoints&&(i=c.endpoints),c.endpoint&&(o=c.endpoint),c.anchors&&(a=c.anchors),c.anchor&&(s=c.anchor))}return{endpoints:i||[o,o],anchors:a||[s,s]}},this.setId=function(t,e,i){var r;n.isString(t)?r=t:(t=this.getElement(t),r=this.getId(t));var o=this.getConnections({source:r,scope:"*"},!0),s=this.getConnections({target:r,scope:"*"},!0);e=""+e,i?t=this.getElement(e):(t=this.getElement(r),this.setAttribute(t,"id",e)),x[e]=x[r]||[];for(var a=0,l=x[e].length;a<l;a++)x[e][a].setElementId(e),x[e][a].setReferenceElement(t);delete x[r],this.sourceEndpointDefinitions[e]=this.sourceEndpointDefinitions[r],delete this.sourceEndpointDefinitions[r],this.targetEndpointDefinitions[e]=this.targetEndpointDefinitions[r],delete this.targetEndpointDefinitions[r],this.anchorManager.changeId(r,e);var c=this.getDragManager();c&&c.changeId(r,e),w[e]=w[r],delete w[r];var u=function(n,i,r){for(var o=0,s=n.length;o<s;o++)n[o].endpoints[i].setElementId(e),n[o].endpoints[i].setReferenceElement(t),n[o][r+"Id"]=e,n[o][r]=t};u(o,0,"source"),u(s,1,"target"),this.repaint(e)},this.setDebugLog=function(t){v=t},this.setSuspendDrawing=function(t,e){var n=D;return D=t,L=t?(new Date).getTime():null,e&&this.repaintEverything(),n},this.isSuspendDrawing=function(){return D},this.getSuspendedAt=function(){return L},this.batch=function(t,e){var i=this.isSuspendDrawing();i||this.setSuspendDrawing(!0);try{t()}catch(t){n.log("Function run while suspended failed",t)}i||this.setSuspendDrawing(!1,!e)},this.doWhileSuspended=this.batch,this.getCachedData=function(t){var e=C[t];return e?{o:e,s:S[t]}:nt({elId:t})},this.timestamp=i,this.show=function(t,e){return z(t,"block",e),r},this.toggleVisible=function(t,e){var n=null;e&&(n=function(t){var e=t.isVisible();t.setVisible(!e)}),R(t,function(t){var e=t.isVisible();t.setVisible(!e)},n)},this.addListener=this.bind;var dt=[];this.registerFloatingConnection=function(t,e,i){dt[t.id]=e,n.addToList(x,t.id,i)},this.getFloatingConnectionFor=function(t){return dt[t]}};n.extend(t.jsPlumbInstance,n.EventGenerator,{setAttribute:function(t,e,n){this.setAttribute(t,e,n)},getAttribute:function(e,n){return this.getAttribute(t.jsPlumb.getElement(e),n)},convertToFullOverlaySpec:function(t){return n.isString(t)&&(t=[t,{}]),t[1].id=t[1].id||n.uuid(),t},registerConnectionType:function(e,n){if(this._connectionTypes[e]=t.jsPlumb.extend({},n),n.overlays){for(var i={},r=0;r<n.overlays.length;r++){var o=this.convertToFullOverlaySpec(n.overlays[r]);i[o[1].id]=o}this._connectionTypes[e].overlays=i}},registerConnectionTypes:function(t){for(var e in t)this.registerConnectionType(e,t[e])},registerEndpointType:function(e,n){if(this._endpointTypes[e]=t.jsPlumb.extend({},n),n.overlays){for(var i={},r=0;r<n.overlays.length;r++){var o=this.convertToFullOverlaySpec(n.overlays[r]);i[o[1].id]=o}this._endpointTypes[e].overlays=i}},registerEndpointTypes:function(t){for(var e in t)this.registerEndpointType(e,t[e])},getType:function(t,e){return"connection"===e?this._connectionTypes[t]:this._endpointTypes[t]},setIdChanged:function(t,e){this.setId(t,e,!0)},setParent:function(t,e){var n=this.getElement(t),i=this.getId(n),r=this.getElement(e),o=this.getId(r),s=this.getDragManager();n.parentNode.removeChild(n),r.appendChild(n),s&&s.setParent(n,i,r,o)},extend:function(t,e,n){var i;if(n)for(i=0;i<n.length;i++)t[n[i]]=e[n[i]];else for(i in e)t[i]=e[i];return t},floatingConnections:{},getFloatingAnchorIndex:function(t){return t.endpoints[0].isFloating()?0:t.endpoints[1].isFloating()?1:-1}});var p=new h;t.jsPlumb=p,p.getInstance=function(t,e){var n=new h(t);if(e)for(var i in e)n[i]=e[i];return n.init(),n},p.each=function(t,e){if(null!=t)if("string"==typeof t)e(p.getElement(t));else if(null!=t.length)for(var n=0;n<t.length;n++)e(p.getElement(t[n]));else e(t)},e.jsPlumb=p}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this,e=t.jsPlumb,n=t.jsPlumbUtil;e.OverlayCapableJsPlumbUIComponent=function(e){t.jsPlumbUIComponent.apply(this,arguments),this._jsPlumb.overlays={},this._jsPlumb.overlayPositions={},e.label&&(this.getDefaultType().overlays.__label=["Label",{label:e.label,location:e.labelLocation||this.defaultLabelLocation||.5,labelStyle:e.labelStyle||this._jsPlumb.instance.Defaults.LabelStyle,id:"__label"}]),this.setListenerComponent=function(t){if(this._jsPlumb)for(var e in this._jsPlumb.overlays)this._jsPlumb.overlays[e].setListenerComponent(t)}},e.OverlayCapableJsPlumbUIComponent.applyType=function(t,e){if(e.overlays){var n,i={};for(n in e.overlays){var r=t._jsPlumb.overlays[e.overlays[n][1].id];if(r)r.updateFrom(e.overlays[n][1]),i[e.overlays[n][1].id]=!0;else{var o=t.getCachedTypeItem("overlay",e.overlays[n][1].id);null!=o?(o.reattach(t._jsPlumb.instance,t),o.setVisible(!0),o.updateFrom(e.overlays[n][1]),t._jsPlumb.overlays[o.id]=o):o=t.addOverlay(e.overlays[n],!0),i[o.id]=!0}}for(n in t._jsPlumb.overlays)null==i[t._jsPlumb.overlays[n].id]&&t.removeOverlay(t._jsPlumb.overlays[n].id,!0)}},n.extend(e.OverlayCapableJsPlumbUIComponent,t.jsPlumbUIComponent,{setHover:function(t,e){if(this._jsPlumb&&!this._jsPlumb.instance.isConnectionBeingDragged())for(var n in this._jsPlumb.overlays)this._jsPlumb.overlays[n][t?"addClass":"removeClass"](this._jsPlumb.instance.hoverClass)},addOverlay:function(t,i){var r=function(t,i){var r=null;if(n.isArray(i)){var o=i[0],s=e.extend({component:t,_jsPlumb:t._jsPlumb.instance},i[1]);3===i.length&&e.extend(s,i[2]),r=new(e.Overlays[t._jsPlumb.instance.getRenderMode()][o])(s)}else r=i.constructor===String?new(e.Overlays[t._jsPlumb.instance.getRenderMode()][i])({component:t,_jsPlumb:t._jsPlumb.instance}):i;return r.id=r.id||n.uuid(),t.cacheTypeItem("overlay",r,r.id),t._jsPlumb.overlays[r.id]=r,r}(this,t);return i||this.repaint(),r},getOverlay:function(t){return this._jsPlumb.overlays[t]},getOverlays:function(){return this._jsPlumb.overlays},hideOverlay:function(t){var e=this.getOverlay(t);e&&e.hide()},hideOverlays:function(){for(var t in this._jsPlumb.overlays)this._jsPlumb.overlays[t].hide()},showOverlay:function(t){var e=this.getOverlay(t);e&&e.show()},showOverlays:function(){for(var t in this._jsPlumb.overlays)this._jsPlumb.overlays[t].show()},removeAllOverlays:function(t){for(var e in this._jsPlumb.overlays)this._jsPlumb.overlays[e].cleanup&&this._jsPlumb.overlays[e].cleanup();this._jsPlumb.overlays={},this._jsPlumb.overlayPositions=null,this._jsPlumb.overlayPlacements={},t||this.repaint()},removeOverlay:function(t,e){var n=this._jsPlumb.overlays[t];n&&(n.setVisible(!1),!e&&n.cleanup&&n.cleanup(),delete this._jsPlumb.overlays[t],this._jsPlumb.overlayPositions&&delete this._jsPlumb.overlayPositions[t],this._jsPlumb.overlayPlacements&&delete this._jsPlumb.overlayPlacements[t])},removeOverlays:function(){for(var t=0,e=arguments.length;t<e;t++)this.removeOverlay(arguments[t])},moveParent:function(t){if(this.bgCanvas&&(this.bgCanvas.parentNode.removeChild(this.bgCanvas),t.appendChild(this.bgCanvas)),this.canvas&&this.canvas.parentNode)for(var e in this.canvas.parentNode.removeChild(this.canvas),t.appendChild(this.canvas),this._jsPlumb.overlays)if(this._jsPlumb.overlays[e].isAppendedAtTopLevel){var n=this._jsPlumb.overlays[e].getElement();n.parentNode.removeChild(n),t.appendChild(n)}},getLabel:function(){var t=this.getOverlay("__label");return null!=t?t.getLabel():null},getLabelOverlay:function(){return this.getOverlay("__label")},setLabel:function(t){var n=this.getOverlay("__label");n?t.constructor===String||t.constructor===Function?n.setLabel(t):(t.label&&n.setLabel(t.label),t.location&&n.setLocation(t.location)):(n=function(t,n){var i={cssClass:n.cssClass,labelStyle:t.labelStyle,id:"__label",component:t,_jsPlumb:t._jsPlumb.instance},r=e.extend(i,n);return new(e.Overlays[t._jsPlumb.instance.getRenderMode()].Label)(r)}(this,t.constructor===String||t.constructor===Function?{label:t}:t),this._jsPlumb.overlays.__label=n);this._jsPlumb.instance.isSuspendDrawing()||this.repaint()},cleanup:function(t){for(var e in this._jsPlumb.overlays)this._jsPlumb.overlays[e].cleanup(t),this._jsPlumb.overlays[e].destroy(t);t&&(this._jsPlumb.overlays={},this._jsPlumb.overlayPositions=null)},setVisible:function(t){this[t?"showOverlays":"hideOverlays"]()},setAbsoluteOverlayPosition:function(t,e){this._jsPlumb.overlayPositions[t.id]=e},getAbsoluteOverlayPosition:function(t){return this._jsPlumb.overlayPositions?this._jsPlumb.overlayPositions[t.id]:null},_clazzManip:function(t,e,n){if(!n)for(var i in this._jsPlumb.overlays)this._jsPlumb.overlays[i][t+"Class"](e)},addClass:function(t,e){this._clazzManip("add",t,e)},removeClass:function(t,e){this._clazzManip("remove",t,e)}})}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this.jsPlumb,e=this.jsPlumbUtil,n=["connectorStyle","connectorHoverStyle","connectorOverlays","connector","connectionType","connectorClass","connectorHoverClass"];t.Endpoint=function(i){var r=i._jsPlumb,o=i.newConnection,s=i.newEndpoint;this.idPrefix="_jsplumb_e_",this.defaultLabelLocation=[.5,.5],this.defaultOverlayKeys=["Overlays","EndpointOverlays"],t.OverlayCapableJsPlumbUIComponent.apply(this,arguments),this.appendToDefaultType({connectionType:i.connectionType,maxConnections:null==i.maxConnections?this._jsPlumb.instance.Defaults.MaxConnections:i.maxConnections,paintStyle:i.endpointStyle||i.paintStyle||i.style||this._jsPlumb.instance.Defaults.EndpointStyle||t.Defaults.EndpointStyle,hoverPaintStyle:i.endpointHoverStyle||i.hoverPaintStyle||this._jsPlumb.instance.Defaults.EndpointHoverStyle||t.Defaults.EndpointHoverStyle,connectorStyle:i.connectorStyle,connectorHoverStyle:i.connectorHoverStyle,connectorClass:i.connectorClass,connectorHoverClass:i.connectorHoverClass,connectorOverlays:i.connectorOverlays,connector:i.connector,connectorTooltip:i.connectorTooltip}),this._jsPlumb.enabled=!(!1===i.enabled),this._jsPlumb.visible=!0,this.element=t.getElement(i.source),this._jsPlumb.uuid=i.uuid,this._jsPlumb.floatingEndpoint=null;this._jsPlumb.uuid&&(i.endpointsByUUID[this._jsPlumb.uuid]=this),this.elementId=i.elementId,this.dragProxy=i.dragProxy,this._jsPlumb.connectionCost=i.connectionCost,this._jsPlumb.connectionsDirected=i.connectionsDirected,this._jsPlumb.currentAnchorClass="",this._jsPlumb.events={};var a=!0===i.deleteOnEmpty;this.setDeleteOnEmpty=function(t){a=t};var l=function(){var e=r.endpointAnchorClassPrefix+"-"+this._jsPlumb.currentAnchorClass;this._jsPlumb.currentAnchorClass=this.anchor.getCssClass();var n=r.endpointAnchorClassPrefix+(this._jsPlumb.currentAnchorClass?"-"+this._jsPlumb.currentAnchorClass:"");this.removeClass(e),this.addClass(n),t.updateClasses(this.element,n,e)}.bind(this);this.prepareAnchor=function(t){var e=this._jsPlumb.instance.makeAnchor(t,this.elementId,r);return e.bind("anchorChanged",function(t){this.fire("anchorChanged",{endpoint:this,anchor:t}),l()}.bind(this)),e},this.setPreparedAnchor=function(t,e){return this._jsPlumb.instance.continuousAnchorFactory.clear(this.elementId),this.anchor=t,l(),e||this._jsPlumb.instance.repaint(this.elementId),this},this.setAnchor=function(t,e){var n=this.prepareAnchor(t);return this.setPreparedAnchor(n,e),this};var c=function(t){if(this.connections.length>0)for(var e=0;e<this.connections.length;e++)this.connections[e].setHover(t,!1);else this.setHover(t)}.bind(this);this.bind("mouseover",function(){c(!0)}),this.bind("mouseout",function(){c(!1)}),i._transient||this._jsPlumb.instance.anchorManager.add(this,this.elementId),this.prepareEndpoint=function(n,o){var s,a=function(e,n){var i=r.getRenderMode();if(t.Endpoints[i][e])return new t.Endpoints[i][e](n);if(!r.Defaults.DoNotThrowErrors)throw{msg:"jsPlumb: unknown endpoint type '"+e+"'"}},l={_jsPlumb:this._jsPlumb.instance,cssClass:i.cssClass,container:i.container,tooltip:i.tooltip,connectorTooltip:i.connectorTooltip,endpoint:this};return e.isString(n)?s=a(n,l):e.isArray(n)?(l=e.merge(n[1],l),s=a(n[0],l)):s=n.clone(),s.clone=function(){return e.isString(n)?a(n,l):e.isArray(n)?(l=e.merge(n[1],l),a(n[0],l)):void 0}.bind(this),s.typeId=o,s},this.setEndpoint=function(t,e){var n=this.prepareEndpoint(t);this.setPreparedEndpoint(n,!0)},this.setPreparedEndpoint=function(t,e){null!=this.endpoint&&(this.endpoint.cleanup(),this.endpoint.destroy()),this.endpoint=t,this.type=this.endpoint.type,this.canvas=this.endpoint.canvas},t.extend(this,i,n),this.isSource=i.isSource||!1,this.isTemporarySource=i.isTemporarySource||!1,this.isTarget=i.isTarget||!1,this.connections=i.connections||[],this.connectorPointerEvents=i["connector-pointer-events"],this.scope=i.scope||r.getDefaultScope(),this.timestamp=null,this.reattachConnections=i.reattach||r.Defaults.ReattachConnections,this.connectionsDetachable=r.Defaults.ConnectionsDetachable,!1!==i.connectionsDetachable&&!1!==i.detachable||(this.connectionsDetachable=!1),this.dragAllowedWhenFull=!1!==i.dragAllowedWhenFull,i.onMaxConnections&&this.bind("maxConnections",i.onMaxConnections),this.addConnection=function(t){this.connections.push(t),this[(this.connections.length>0?"add":"remove")+"Class"](r.endpointConnectedClass),this[(this.isFull()?"add":"remove")+"Class"](r.endpointFullClass)},this.detachFromConnection=function(t,e,n){(e=null==e?this.connections.indexOf(t):e)>=0&&(this.connections.splice(e,1),this[(this.connections.length>0?"add":"remove")+"Class"](r.endpointConnectedClass),this[(this.isFull()?"add":"remove")+"Class"](r.endpointFullClass)),!n&&a&&0===this.connections.length&&r.deleteObject({endpoint:this,fireEvent:!1,deleteAttachedObjects:!0!==n})},this.deleteEveryConnection=function(t){for(var e=this.connections.length,n=0;n<e;n++)r.deleteConnection(this.connections[0],t)},this.detachFrom=function(t,e,n){for(var i=[],o=0;o<this.connections.length;o++)this.connections[o].endpoints[1]!==t&&this.connections[o].endpoints[0]!==t||i.push(this.connections[o]);for(var s=0,a=i.length;s<a;s++)r.deleteConnection(i[0]);return this},this.getElement=function(){return this.element},this.setElement=function(n){var o=this._jsPlumb.instance.getId(n),s=this.elementId;return e.removeWithFunction(i.endpointsByElement[this.elementId],function(t){return t.id===this.id}.bind(this)),this.element=t.getElement(n),this.elementId=r.getId(this.element),r.anchorManager.rehomeEndpoint(this,s,this.element),r.dragManager.endpointAdded(this.element),e.addToList(i.endpointsByElement,o,this),this},this.makeInPlaceCopy=function(){var t=this.anchor.getCurrentLocation({element:this}),e=this.anchor.getOrientation(this),n=this.anchor.getCssClass(),r={bind:function(){},compute:function(){return[t[0],t[1]]},getCurrentLocation:function(){return[t[0],t[1]]},getOrientation:function(){return e},getCssClass:function(){return n}};return s({dropOptions:i.dropOptions,anchor:r,source:this.element,paintStyle:this.getPaintStyle(),endpoint:i.hideOnDrag?"Blank":this.endpoint,_transient:!0,scope:this.scope,reference:this})},this.connectorSelector=function(){return this.connections[0]},this.setStyle=this.setPaintStyle,this.paint=function(t){var e=(t=t||{}).timestamp,n=!(!1===t.recalc);if(!e||this.timestamp!==e){var i=r.updateOffset({elId:this.elementId,timestamp:e}),o=t.offset?t.offset.o:i.o;if(null!=o){var s=t.anchorPoint,a=t.connectorPaintStyle;if(null==s){var l=t.dimensions||i.s,c={xy:[o.left,o.top],wh:l,element:this,timestamp:e};if(n&&this.anchor.isDynamic&&this.connections.length>0){var u=function(t,e){var n=0;if(null!=e)for(var i=0;i<t.connections.length;i++)if(t.connections[i].sourceId===e||t.connections[i].targetId===e){n=i;break}return t.connections[n]}(this,t.elementWithPrecedence),d=u.endpoints[0]===this?1:0,h=0===d?u.sourceId:u.targetId,p=r.getCachedData(h),f=p.o,m=p.s;c.index=0===d?1:0,c.connection=u,c.txy=[f.left,f.top],c.twh=m,c.tElement=u.endpoints[d]}else this.connections.length>0&&(c.connection=this.connections[0]);s=this.anchor.compute(c)}for(var g in this.endpoint.compute(s,this.anchor.getOrientation(this),this._jsPlumb.paintStyleInUse,a||this.paintStyleInUse),this.endpoint.paint(this._jsPlumb.paintStyleInUse,this.anchor),this.timestamp=e,this._jsPlumb.overlays)if(this._jsPlumb.overlays.hasOwnProperty(g)){var v=this._jsPlumb.overlays[g];v.isVisible()&&(this._jsPlumb.overlayPlacements[g]=v.draw(this.endpoint,this._jsPlumb.paintStyleInUse),v.paint(this._jsPlumb.overlayPlacements[g]))}}}},this.getTypeDescriptor=function(){return"endpoint"},this.isVisible=function(){return this._jsPlumb.visible},this.repaint=this.paint;var u=!1;this.initDraggable=function(){if(!u&&t.isDragSupported(this.element)){var n,a={id:null,element:null},l=null,c=!1,d=null,h=function(t,e,n){var i=!1;return{drag:function(){if(i)return i=!1,!0;if(e.element){var r=n.getUIPosition(arguments,n.getZoom());null!=r&&n.setPosition(e.element,r),n.repaint(e.element,r),t.paint({anchorPoint:t.anchor.getCurrentLocation({element:t})})}},stopDrag:function(){i=!0}}}(this,a,r),p=i.dragOptions||{},f=t.dragEvents.start,m=t.dragEvents.stop,g=t.dragEvents.drag,v=t.dragEvents.beforeStart,b=function(e){l=this.connectorSelector();var u=!0;this.isEnabled()||(u=!1),null!=l||this.isSource||this.isTemporarySource||(u=!1),!this.isSource||!this.isFull()||null!=l&&this.dragAllowedWhenFull||(u=!1),null==l||l.isDetachable(this)||(this.isFull()?u=!1:l=null);var p=r.checkCondition(null==l?"beforeDrag":"beforeStartDetach",{endpoint:this,source:this.element,sourceId:this.elementId,connection:l});if(!1===p?u=!1:"object"==typeof p?t.extend(p,n||{}):p=n||{},!1===u)return r.stopDrag&&r.stopDrag(this.canvas),h.stopDrag(),!1;for(var f=0;f<this.connections.length;f++)this.connections[f].setHover(!1);this.addClass("endpointDrag"),r.setConnectionBeingDragged(!0),l&&!this.isFull()&&this.isSource&&(l=null),r.updateOffset({elId:this.elementId});var m=this._jsPlumb.instance.getOffset(this.canvas),g=this.canvas,v=this._jsPlumb.instance.getSize(this.canvas);!function(t,e,n,i){var r=e.createElement("div",{position:"absolute"});e.appendElement(r);var o=e.getId(r);e.setPosition(r,n),r.style.width=i[0]+"px",r.style.height=i[1]+"px",e.manage(o,r,!0),t.id=o,t.element=r}(a,r,m,v),r.setAttributes(this.canvas,{dragId:a.id,elId:this.elementId});var b=this.dragProxy||this.endpoint;if(null==this.dragProxy&&null!=this.connectionType){var y=this._jsPlumb.instance.deriveEndpointAndAnchorSpec(this.connectionType);y.endpoints[1]&&(b=y.endpoints[1])}var x=this._jsPlumb.instance.makeAnchor("Center");x.isFloating=!0,this._jsPlumb.floatingEndpoint=function(e,n,i,r,o,s,a,l){return a({paintStyle:e,endpoint:i,anchor:new t.FloatingAnchor({reference:n,referenceCanvas:r,jsPlumbInstance:s}),source:o,scope:l})}(this.getPaintStyle(),x,b,this.canvas,a.element,r,s,this.scope);var _=this._jsPlumb.floatingEndpoint.anchor;if(null==l)this.setHover(!1,!1),(l=o({sourceEndpoint:this,targetEndpoint:this._jsPlumb.floatingEndpoint,source:this.element,target:a.element,anchors:[this.anchor,this._jsPlumb.floatingEndpoint.anchor],paintStyle:i.connectorStyle,hoverPaintStyle:i.connectorHoverStyle,connector:i.connector,overlays:i.connectorOverlays,type:this.connectionType,cssClass:this.connectorClass,hoverClass:this.connectorHoverClass,scope:i.scope,data:p})).pending=!0,l.addClass(r.draggingClass),this._jsPlumb.floatingEndpoint.addClass(r.draggingClass),this._jsPlumb.floatingEndpoint.anchor=_,r.fire("connectionDrag",l),r.anchorManager.newConnection(l);else{c=!0,l.setHover(!1);var w=l.endpoints[0].id===this.id?0:1;this.detachFromConnection(l,null,!0);var C=r.getDragScope(g);r.setAttribute(this.canvas,"originalScope",C),r.fire("connectionDrag",l),0===w?(d=[l.source,l.sourceId,g,C],r.anchorManager.sourceChanged(l.endpoints[w].elementId,a.id,l,a.element)):(d=[l.target,l.targetId,g,C],l.target=a.element,l.targetId=a.id,r.anchorManager.updateOtherEndpoint(l.sourceId,l.endpoints[w].elementId,l.targetId,l)),l.suspendedEndpoint=l.endpoints[w],l.suspendedElement=l.endpoints[w].getElement(),l.suspendedElementId=l.endpoints[w].elementId,l.suspendedElementType=0===w?"source":"target",l.suspendedEndpoint.setHover(!1),this._jsPlumb.floatingEndpoint.referenceEndpoint=l.suspendedEndpoint,l.endpoints[w]=this._jsPlumb.floatingEndpoint,l.addClass(r.draggingClass),this._jsPlumb.floatingEndpoint.addClass(r.draggingClass)}r.registerFloatingConnection(a,l,this._jsPlumb.floatingEndpoint),r.currentlyDragging=!0}.bind(this),y=function(){if(r.setConnectionBeingDragged(!1),l&&null!=l.endpoints){var t=r.getDropEvent(arguments),e=r.getFloatingAnchorIndex(l);if(l.endpoints[0===e?1:0].anchor.unlock(),l.removeClass(r.draggingClass),this._jsPlumb&&(l.deleteConnectionNow||l.endpoints[e]===this._jsPlumb.floatingEndpoint)&&c&&l.suspendedEndpoint){0===e?(l.floatingElement=l.source,l.floatingId=l.sourceId,l.floatingEndpoint=l.endpoints[0],l.floatingIndex=0,l.source=d[0],l.sourceId=d[1]):(l.floatingElement=l.target,l.floatingId=l.targetId,l.floatingEndpoint=l.endpoints[1],l.floatingIndex=1,l.target=d[0],l.targetId=d[1]);var n=this._jsPlumb.floatingEndpoint;r.setDragScope(d[2],d[3]),l.endpoints[e]=l.suspendedEndpoint,l.isReattach()||l._forceReattach||l._forceDetach||!r.deleteConnection(l,{originalEvent:t})?(l.setHover(!1),l._forceDetach=null,l._forceReattach=null,this._jsPlumb.floatingEndpoint.detachFromConnection(l),l.suspendedEndpoint.addConnection(l),1===e?r.anchorManager.updateOtherEndpoint(l.sourceId,l.floatingId,l.targetId,l):r.anchorManager.sourceChanged(l.floatingId,l.sourceId,l,l.source),r.repaint(d[1])):r.deleteObject({endpoint:n})}this.deleteAfterDragStop?r.deleteObject({endpoint:this}):this._jsPlumb&&this.paint({recalc:!1}),r.fire("connectionDragStop",l,t),l.pending&&r.fire("connectionAborted",l,t),r.currentlyDragging=!1,l.suspendedElement=null,l.suspendedEndpoint=null,l=null}a&&a.element&&r.remove(a.element,!1,!1),this._jsPlumb&&(this.canvas.style.visibility="visible",this.anchor.unlock(),this._jsPlumb.floatingEndpoint=null)}.bind(this);(p=t.extend({},p)).scope=this.scope||p.scope,p[v]=e.wrap(p[v],function(t){n=t.e.payload||{}},!1),p[f]=e.wrap(p[f],b,!1),p[g]=e.wrap(p[g],h.drag),p[m]=e.wrap(p[m],y),p.multipleDrop=!1,p.canDrag=function(){return this.isSource||this.isTemporarySource||this.connections.length>0&&!1!==this.connectionsDetachable}.bind(this),r.initDraggable(this.canvas,p,"internal"),this.canvas._jsPlumbRelatedElement=this.element,u=!0}};var d=i.endpoint||this._jsPlumb.instance.Defaults.Endpoint||t.Defaults.Endpoint;this.setEndpoint(d,!0);var h=i.anchor?i.anchor:i.anchors?i.anchors:r.Defaults.Anchor||"Top";this.setAnchor(h,!0);var p=["default",i.type||""].join(" ");this.addType(p,i.data,!0),this.canvas=this.endpoint.canvas,this.canvas._jsPlumb=this,this.initDraggable();var f=function(n,o,s,a){if(t.isDropSupported(this.element)){var l=i.dropOptions||r.Defaults.DropOptions||t.Defaults.DropOptions;(l=t.extend({},l)).scope=l.scope||this.scope;var c=t.dragEvents.drop,u=t.dragEvents.over,d=t.dragEvents.out,h=this,p=r.EndpointDropHandler({getEndpoint:function(){return h},jsPlumb:r,enabled:function(){return null==s||s.isEnabled()},isFull:function(){return s.isFull()},element:this.element,elementId:this.elementId,isSource:this.isSource,isTarget:this.isTarget,addClass:function(t){h.addClass(t)},removeClass:function(t){h.removeClass(t)},isDropAllowed:function(){return h.isDropAllowed.apply(h,arguments)},reference:a,isRedrop:function(t,e){return t.suspendedEndpoint&&e.reference&&t.suspendedEndpoint.id===e.reference.id}});l[c]=e.wrap(l[c],p,!0),l[u]=e.wrap(l[u],function(){var e=t.getDragObject(arguments),n=r.getAttribute(t.getElement(e),"dragId"),i=r.getFloatingConnectionFor(n);if(null!=i){var o=r.getFloatingAnchorIndex(i);if(this.isTarget&&0!==o||i.suspendedEndpoint&&this.referenceEndpoint&&this.referenceEndpoint.id===i.suspendedEndpoint.id){var s=r.checkCondition("checkDropAllowed",{sourceEndpoint:i.endpoints[o],targetEndpoint:this,connection:i});this[(s?"add":"remove")+"Class"](r.endpointDropAllowedClass),this[(s?"remove":"add")+"Class"](r.endpointDropForbiddenClass),i.endpoints[o].anchor.over(this.anchor,this)}}}.bind(this)),l[d]=e.wrap(l[d],function(){var e=t.getDragObject(arguments),n=null==e?null:r.getAttribute(t.getElement(e),"dragId"),i=n?r.getFloatingConnectionFor(n):null;if(null!=i){var o=r.getFloatingAnchorIndex(i);(this.isTarget&&0!==o||i.suspendedEndpoint&&this.referenceEndpoint&&this.referenceEndpoint.id===i.suspendedEndpoint.id)&&(this.removeClass(r.endpointDropAllowedClass),this.removeClass(r.endpointDropForbiddenClass),i.endpoints[o].anchor.out())}}.bind(this)),r.initDroppable(n,l,"internal",o)}}.bind(this);return this.anchor.isFloating||f(this.canvas,!(i._transient||this.anchor.isFloating),this,i.reference),this},e.extend(t.Endpoint,t.OverlayCapableJsPlumbUIComponent,{setVisible:function(t,e,n){if(this._jsPlumb.visible=t,this.canvas&&(this.canvas.style.display=t?"block":"none"),this[t?"showOverlays":"hideOverlays"](),!e)for(var i=0;i<this.connections.length;i++)if(this.connections[i].setVisible(t),!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(t,!0,!0)}},getAttachedElements:function(){return this.connections},applyType:function(e,i){this.setPaintStyle(e.endpointStyle||e.paintStyle,i),this.setHoverPaintStyle(e.endpointHoverStyle||e.hoverPaintStyle,i),null!=e.maxConnections&&(this._jsPlumb.maxConnections=e.maxConnections),e.scope&&(this.scope=e.scope),t.extend(this,e,n),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(t){this._jsPlumb.enabled=t},cleanup:function(){var e=this._jsPlumb.instance.endpointAnchorClassPrefix+(this._jsPlumb.currentAnchorClass?"-"+this._jsPlumb.currentAnchorClass:"");t.removeClass(this.element,e),this.anchor=null,this.endpoint.cleanup(!0),this.endpoint.destroy(),this.endpoint=null,this._jsPlumb.instance.destroyDraggable(this.canvas,"internal"),this._jsPlumb.instance.destroyDroppable(this.canvas,"internal")},setHover:function(t){this.endpoint&&this._jsPlumb&&!this._jsPlumb.instance.isConnectionBeingDragged()&&this.endpoint.setHover(t)},isFull:function(){return 0===this._jsPlumb.maxConnections||!(this.isFloating()||this._jsPlumb.maxConnections<0||this.connections.length<this._jsPlumb.maxConnections)},isFloating:function(){return null!=this.anchor&&this.anchor.isFloating},isConnectedTo:function(t){var e=!1;if(t)for(var n=0;n<this.connections.length;n++)if(this.connections[n].endpoints[1]===t||this.connections[n].endpoints[0]===t){e=!0;break}return e},getConnectionCost:function(){return this._jsPlumb.connectionCost},setConnectionCost:function(t){this._jsPlumb.connectionCost=t},areConnectionsDirected:function(){return this._jsPlumb.connectionsDirected},setConnectionsDirected:function(t){this._jsPlumb.connectionsDirected=t},setElementId:function(t){this.elementId=t,this.anchor.elementId=t},setReferenceElement:function(e){this.element=t.getElement(e)},setDragAllowedWhenFull:function(t){this.dragAllowedWhenFull=t},equals:function(t){return this.anchor.equals(t.anchor)},getUuid:function(){return this._jsPlumb.uuid},computeAnchor:function(t){return this.anchor.compute(t)}}),this.jsPlumbInstance.prototype.EndpointDropHandler=function(t){return function(n){var i=t.jsPlumb;t.removeClass(i.endpointDropAllowedClass),t.removeClass(i.endpointDropForbiddenClass);var r=i.getDropEvent(arguments),o=i.getDragObject(arguments),s=i.getAttribute(o,"dragId"),a=(i.getAttribute(o,"elId"),i.getAttribute(o,"originalScope")),l=i.getFloatingConnectionFor(s);if(null!=l){var c=null!=l.suspendedEndpoint;if(!c||null!=l.suspendedEndpoint._jsPlumb){var u=t.getEndpoint(l);if(null!=u){if(t.isRedrop(l,t))return l._forceReattach=!0,l.setHover(!1),void(t.maybeCleanup&&t.maybeCleanup(u));var d=i.getFloatingAnchorIndex(l);if(0===d&&!t.isSource||1===d&&!t.isTarget)t.maybeCleanup&&t.maybeCleanup(u);else{t.onDrop&&t.onDrop(l),a&&i.setDragScope(o,a);var h=t.isFull(n);if(h&&u.fire("maxConnections",{endpoint:this,connection:l,maxConnections:u._jsPlumb.maxConnections},r),!h&&t.enabled()){var p=!0;0===d?(l.floatingElement=l.source,l.floatingId=l.sourceId,l.floatingEndpoint=l.endpoints[0],l.floatingIndex=0,l.source=t.element,l.sourceId=t.elementId):(l.floatingElement=l.target,l.floatingId=l.targetId,l.floatingEndpoint=l.endpoints[1],l.floatingIndex=1,l.target=t.element,l.targetId=t.elementId),c&&l.suspendedEndpoint.id!==u.id&&(l.isDetachAllowed(l)&&l.endpoints[d].isDetachAllowed(l)&&l.suspendedEndpoint.isDetachAllowed(l)&&i.checkCondition("beforeDetach",l)||(p=!1));var f=function(n){l.endpoints[d].detachFromConnection(l),l.suspendedEndpoint&&l.suspendedEndpoint.detachFromConnection(l),l.endpoints[d]=u,u.addConnection(l);var o=u.getParameters();for(var s in o)l.setParameter(s,o[s]);if(c){var a=l.suspendedEndpoint.elementId;i.fireMoveEvent({index:d,originalSourceId:0===d?a:l.sourceId,newSourceId:0===d?u.elementId:l.sourceId,originalTargetId:1===d?a:l.targetId,newTargetId:1===d?u.elementId:l.targetId,originalSourceEndpoint:0===d?l.suspendedEndpoint:l.endpoints[0],newSourceEndpoint:0===d?u:l.endpoints[0],originalTargetEndpoint:1===d?l.suspendedEndpoint:l.endpoints[1],newTargetEndpoint:1===d?u:l.endpoints[1],connection:l},r)}else o.draggable&&i.initDraggable(this.element,t.dragOptions,"internal",i);(1===d?i.anchorManager.updateOtherEndpoint(l.sourceId,l.floatingId,l.targetId,l):i.anchorManager.sourceChanged(l.floatingId,l.sourceId,l,l.source),l.endpoints[0].finalEndpoint)&&(l.endpoints[0].detachFromConnection(l),l.endpoints[0]=l.endpoints[0].finalEndpoint,l.endpoints[0].addConnection(l));e.isObject(n)&&l.mergeData(n),i.finaliseConnection(l,null,r,!1),l.setHover(!1),i.revalidate(l.endpoints[0].element)}.bind(this);if(p=p&&t.isDropAllowed(l.sourceId,l.targetId,l.scope,l,u))return f(p),!0;l.suspendedEndpoint&&(l.endpoints[d]=l.suspendedEndpoint,l.setHover(!1),l._forceDetach=!0,0===d?(l.source=l.suspendedEndpoint.element,l.sourceId=l.suspendedEndpoint.elementId):(l.target=l.suspendedEndpoint.element,l.targetId=l.suspendedEndpoint.elementId),l.suspendedEndpoint.addConnection(l),1===d?i.anchorManager.updateOtherEndpoint(l.sourceId,l.floatingId,l.targetId,l):i.anchorManager.sourceChanged(l.floatingId,l.sourceId,l,l.source),i.repaint(l.sourceId),l._forceDetach=!1)}t.maybeCleanup&&t.maybeCleanup(u),i.currentlyDragging=!1}}}}}}}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this,e=t.jsPlumb,n=t.jsPlumbUtil,i=function(t,i,r,o,s){if(e.Connectors[i]=e.Connectors[i]||{},null==e.Connectors[i][r]){if(null==e.Connectors[r]){if(t.Defaults.DoNotThrowErrors)return null;throw new TypeError("jsPlumb: unknown connector type '"+r+"'")}e.Connectors[i][r]=function(){e.Connectors[r].apply(this,arguments),e.ConnectorRenderers[i].apply(this,arguments)},n.extend(e.Connectors[i][r],[e.Connectors[r],e.ConnectorRenderers[i]])}return new e.Connectors[i][r](o,s)},r=function(t,e,n){return t?n.makeAnchor(t,e,n):null},o=function(t,e,i,r){null!=e&&(e._jsPlumbConnections=e._jsPlumbConnections||{},r?delete e._jsPlumbConnections[t.id]:e._jsPlumbConnections[t.id]=!0,n.isEmpty(e._jsPlumbConnections)?i.removeClass(e,i.connectedClass):i.addClass(e,i.connectedClass))};e.Connection=function(t){var i=t.newEndpoint;this.id=t.id,this.connector=null,this.idPrefix="_jsplumb_c_",this.defaultLabelLocation=.5,this.defaultOverlayKeys=["Overlays","ConnectionOverlays"],this.previousConnection=t.previousConnection,this.source=e.getElement(t.source),this.target=e.getElement(t.target),e.OverlayCapableJsPlumbUIComponent.apply(this,arguments),t.sourceEndpoint?(this.source=t.sourceEndpoint.getElement(),this.sourceId=t.sourceEndpoint.elementId):this.sourceId=this._jsPlumb.instance.getId(this.source),t.targetEndpoint?(this.target=t.targetEndpoint.getElement(),this.targetId=t.targetEndpoint.elementId):this.targetId=this._jsPlumb.instance.getId(this.target),this.scope=t.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.params={cssClass:t.cssClass,container:t.container,"pointer-events":t["pointer-events"],editorParams:t.editorParams,overlays:t.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(e,n,o,s){return o=o||this._jsPlumb.instance.getId(n),this.prepareEndpoint(r,i,this,s,e?0:1,t,n,o)},t.type&&(t.endpoints=t.endpoints||this._jsPlumb.instance.deriveEndpointAndAnchorSpec(t.type).endpoints);var o=this.makeEndpoint(!0,this.source,this.sourceId,t.sourceEndpoint),s=this.makeEndpoint(!1,this.target,this.targetId,t.targetEndpoint);o&&n.addToList(t.endpointsByElement,this.sourceId,o),s&&n.addToList(t.endpointsByElement,this.targetId,s),this.scope||(this.scope=this.endpoints[0].scope),null!=t.deleteEndpointsOnEmpty&&(this.endpoints[0].setDeleteOnEmpty(t.deleteEndpointsOnEmpty),this.endpoints[1].setDeleteOnEmpty(t.deleteEndpointsOnEmpty));var a=r.Defaults.ConnectionsDetachable;!1===t.detachable&&(a=!1),!1===this.endpoints[0].connectionsDetachable&&(a=!1),!1===this.endpoints[1].connectionsDetachable&&(a=!1);var l=t.reattach||this.endpoints[0].reattachConnections||this.endpoints[1].reattachConnections||r.Defaults.ReattachConnections;this.appendToDefaultType({detachable:a,reattach:l,paintStyle:this.endpoints[0].connectorStyle||this.endpoints[1].connectorStyle||t.paintStyle||r.Defaults.PaintStyle||e.Defaults.PaintStyle,hoverPaintStyle:this.endpoints[0].connectorHoverStyle||this.endpoints[1].connectorHoverStyle||t.hoverPaintStyle||r.Defaults.HoverPaintStyle||e.Defaults.HoverPaintStyle});var c=r.getSuspendedAt();if(!r.isSuspendDrawing()){var u=r.getCachedData(this.sourceId),d=u.o,h=u.s,p=r.getCachedData(this.targetId),f=p.o,m=p.s,g=c||r.timestamp(),v=this.endpoints[0].anchor.compute({xy:[d.left,d.top],wh:h,element:this.endpoints[0],elementId:this.endpoints[0].elementId,txy:[f.left,f.top],twh:m,tElement:this.endpoints[1],timestamp:g});this.endpoints[0].paint({anchorLoc:v,timestamp:g}),v=this.endpoints[1].anchor.compute({xy:[f.left,f.top],wh:m,element:this.endpoints[1],elementId:this.endpoints[1].elementId,txy:[d.left,d.top],twh:h,tElement:this.endpoints[0],timestamp:g}),this.endpoints[1].paint({anchorLoc:v,timestamp:g})}this.getTypeDescriptor=function(){return"connection"},this.getAttachedElements=function(){return this.endpoints},this.isDetachable=function(t){return!1!==this._jsPlumb.detachable&&(null!=t?!0===t.connectionsDetachable:!0===this._jsPlumb.detachable)},this.setDetachable=function(t){this._jsPlumb.detachable=!0===t},this.isReattach=function(){return!0===this._jsPlumb.reattach||!0===this.endpoints[0].reattachConnections||!0===this.endpoints[1].reattachConnections},this.setReattach=function(t){this._jsPlumb.reattach=!0===t},this._jsPlumb.cost=t.cost||this.endpoints[0].getConnectionCost(),this._jsPlumb.directed=t.directed,null==t.directed&&(this._jsPlumb.directed=this.endpoints[0].areConnectionsDirected());var b=e.extend({},this.endpoints[1].getParameters());e.extend(b,this.endpoints[0].getParameters()),e.extend(b,this.getParameters()),this.setParameters(b),this.setConnector(this.endpoints[0].connector||this.endpoints[1].connector||t.connector||r.Defaults.Connector||e.Defaults.Connector,!0);var y=null!=t.data&&n.isObject(t.data)?t.data:{};this.getData=function(){return y},this.setData=function(t){y=t||{}},this.mergeData=function(t){y=e.extend(y,t)};var x=["default",this.endpoints[0].connectionType,this.endpoints[1].connectionType,t.type].join(" ");/[^\s]/.test(x)&&this.addType(x,t.data,!0),this.updateConnectedClass()},n.extend(e.Connection,e.OverlayCapableJsPlumbUIComponent,{applyType:function(t,n,i){var r=null;null!=t.connector&&(null==(r=this.getCachedTypeItem("connector",i.connector))&&(r=this.prepareConnector(t.connector,i.connector),this.cacheTypeItem("connector",r,i.connector)),this.setPreparedConnector(r)),null!=t.detachable&&this.setDetachable(t.detachable),null!=t.reattach&&this.setReattach(t.reattach),t.scope&&(this.scope=t.scope),null!=t.cssClass&&this.canvas&&this._jsPlumb.instance.addClass(this.canvas,t.cssClass);var o=null;t.anchor?null==(o=this.getCachedTypeItem("anchors",i.anchor))&&(o=[this._jsPlumb.instance.makeAnchor(t.anchor),this._jsPlumb.instance.makeAnchor(t.anchor)],this.cacheTypeItem("anchors",o,i.anchor)):t.anchors&&null==(o=this.getCachedTypeItem("anchors",i.anchors))&&(o=[this._jsPlumb.instance.makeAnchor(t.anchors[0]),this._jsPlumb.instance.makeAnchor(t.anchors[1])],this.cacheTypeItem("anchors",o,i.anchors)),null!=o&&(this.endpoints[0].anchor=o[0],this.endpoints[1].anchor=o[1],this.endpoints[1].anchor.isDynamic&&this._jsPlumb.instance.repaint(this.endpoints[1].elementId)),e.OverlayCapableJsPlumbUIComponent.applyType(this,t)},addClass:function(t,e){e&&(this.endpoints[0].addClass(t),this.endpoints[1].addClass(t),this.suspendedEndpoint&&this.suspendedEndpoint.addClass(t)),this.connector&&this.connector.addClass(t)},removeClass:function(t,e){e&&(this.endpoints[0].removeClass(t),this.endpoints[1].removeClass(t),this.suspendedEndpoint&&this.suspendedEndpoint.removeClass(t)),this.connector&&this.connector.removeClass(t)},isVisible:function(){return this._jsPlumb.visible},setVisible:function(t){this._jsPlumb.visible=t,this.connector&&this.connector.setVisible(t),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(t){this._jsPlumb&&(o(this,this.source,this._jsPlumb.instance,t),o(this,this.target,this._jsPlumb.instance,t))},setHover:function(e){this.connector&&this._jsPlumb&&!this._jsPlumb.instance.isConnectionBeingDragged()&&(this.connector.setHover(e),t.jsPlumb[e?"addClass":"removeClass"](this.source,this._jsPlumb.instance.hoverSourceClass),t.jsPlumb[e?"addClass":"removeClass"](this.target,this._jsPlumb.instance.hoverTargetClass))},getUuids:function(){return[this.endpoints[0].getUuid(),this.endpoints[1].getUuid()]},getCost:function(){return this._jsPlumb?this._jsPlumb.cost:-1/0},setCost:function(t){this._jsPlumb.cost=t},isDirected:function(){return this._jsPlumb.directed},getConnector:function(){return this.connector},prepareConnector:function(t,e){var r,o={_jsPlumb:this._jsPlumb.instance,cssClass:this._jsPlumb.params.cssClass,container:this._jsPlumb.params.container,"pointer-events":this._jsPlumb.params["pointer-events"]},s=this._jsPlumb.instance.getRenderMode();return n.isString(t)?r=i(this._jsPlumb.instance,s,t,o,this):n.isArray(t)&&(r=1===t.length?i(this._jsPlumb.instance,s,t[0],o,this):i(this._jsPlumb.instance,s,t[0],n.merge(t[1],o),this)),null!=e&&(r.typeId=e),r},setPreparedConnector:function(t,e,n,i){if(this.connector!==t){var r,o="";if(null!=this.connector&&(o=(r=this.connector).getClass(),this.connector.cleanup(),this.connector.destroy()),this.connector=t,i&&this.cacheTypeItem("connector",t,i),this.canvas=this.connector.canvas,this.bgCanvas=this.connector.bgCanvas,this.addClass(o),this.canvas&&(this.canvas._jsPlumb=this),this.bgCanvas&&(this.bgCanvas._jsPlumb=this),null!=r)for(var s=this.getOverlays(),a=0;a<s.length;a++)s[a].transfer&&s[a].transfer(this.connector);n||this.setListenerComponent(this.connector),e||this.repaint()}},setConnector:function(t,e,n,i){var r=this.prepareConnector(t,i);this.setPreparedConnector(r,e,n,i)},paint:function(t){if(!this._jsPlumb.instance.isSuspendDrawing()&&this._jsPlumb.visible){var e=(t=t||{}).timestamp,n=this.targetId,i=this.sourceId;if(null==e||e!==this._jsPlumb.lastPaintedAt){var r=this._jsPlumb.instance.updateOffset({elId:i}).o,o=this._jsPlumb.instance.updateOffset({elId:n}).o,s=this.endpoints[0],a=this.endpoints[1],l=s.anchor.getCurrentLocation({xy:[r.left,r.top],wh:[r.width,r.height],element:s,timestamp:e}),c=a.anchor.getCurrentLocation({xy:[o.left,o.top],wh:[o.width,o.height],element:a,timestamp:e});this.connector.resetBounds(),this.connector.compute({sourcePos:l,targetPos:c,sourceOrientation:s.anchor.getOrientation(s),targetOrientation:a.anchor.getOrientation(a),sourceEndpoint:this.endpoints[0],targetEndpoint:this.endpoints[1],"stroke-width":this._jsPlumb.paintStyleInUse.strokeWidth,sourceInfo:r,targetInfo:o});var u={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};for(var d in this._jsPlumb.overlays)if(this._jsPlumb.overlays.hasOwnProperty(d)){var h=this._jsPlumb.overlays[d];h.isVisible()&&(this._jsPlumb.overlayPlacements[d]=h.draw(this.connector,this._jsPlumb.paintStyleInUse,this.getAbsoluteOverlayPosition(h)),u.minX=Math.min(u.minX,this._jsPlumb.overlayPlacements[d].minX),u.maxX=Math.max(u.maxX,this._jsPlumb.overlayPlacements[d].maxX),u.minY=Math.min(u.minY,this._jsPlumb.overlayPlacements[d].minY),u.maxY=Math.max(u.maxY,this._jsPlumb.overlayPlacements[d].maxY))}var p=parseFloat(this._jsPlumb.paintStyleInUse.strokeWidth||1)/2,f=parseFloat(this._jsPlumb.paintStyleInUse.strokeWidth||0),m={xmin:Math.min(this.connector.bounds.minX-(p+f),u.minX),ymin:Math.min(this.connector.bounds.minY-(p+f),u.minY),xmax:Math.max(this.connector.bounds.maxX+(p+f),u.maxX),ymax:Math.max(this.connector.bounds.maxY+(p+f),u.maxY)};for(var g in this.connector.paint(this._jsPlumb.paintStyleInUse,null,m),this._jsPlumb.overlays)if(this._jsPlumb.overlays.hasOwnProperty(g)){var v=this._jsPlumb.overlays[g];v.isVisible()&&v.paint(this._jsPlumb.overlayPlacements[g],m)}}this._jsPlumb.lastPaintedAt=e}},repaint:function(t){var e=jsPlumb.extend(t||{},{});e.elId=this.sourceId,this.paint(e)},prepareEndpoint:function(t,n,i,o,s,a,l,c){var u;if(o)i.endpoints[s]=o,o.addConnection(i);else{a.endpoints||(a.endpoints=[null,null]);var d=a.endpoints[s]||a.endpoint||t.Defaults.Endpoints[s]||e.Defaults.Endpoints[s]||t.Defaults.Endpoint||e.Defaults.Endpoint;a.endpointStyles||(a.endpointStyles=[null,null]),a.endpointHoverStyles||(a.endpointHoverStyles=[null,null]);var h=a.endpointStyles[s]||a.endpointStyle||t.Defaults.EndpointStyles[s]||e.Defaults.EndpointStyles[s]||t.Defaults.EndpointStyle||e.Defaults.EndpointStyle;null==h.fill&&null!=a.paintStyle&&(h.fill=a.paintStyle.stroke),null==h.outlineStroke&&null!=a.paintStyle&&(h.outlineStroke=a.paintStyle.outlineStroke),null==h.outlineWidth&&null!=a.paintStyle&&(h.outlineWidth=a.paintStyle.outlineWidth);var p=a.endpointHoverStyles[s]||a.endpointHoverStyle||t.Defaults.EndpointHoverStyles[s]||e.Defaults.EndpointHoverStyles[s]||t.Defaults.EndpointHoverStyle||e.Defaults.EndpointHoverStyle;null!=a.hoverPaintStyle&&(null==p&&(p={}),null==p.fill&&(p.fill=a.hoverPaintStyle.stroke));var f=a.anchors?a.anchors[s]:a.anchor?a.anchor:r(t.Defaults.Anchors[s],c,t)||r(e.Defaults.Anchors[s],c,t)||r(t.Defaults.Anchor,c,t)||r(e.Defaults.Anchor,c,t);u=n({paintStyle:h,hoverPaintStyle:p,endpoint:d,connections:[i],uuid:a.uuids?a.uuids[s]:null,anchor:f,source:l,scope:a.scope,reattach:a.reattach||t.Defaults.ReattachConnections,detachable:a.detachable||t.Defaults.ConnectionsDetachable}),null==o&&u.setDeleteOnEmpty(!0),i.endpoints[s]=u,!1===a.drawEndpoints&&u.setVisible(!1,!0,!0)}return u}})}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this.jsPlumbUtil,e=this.jsPlumb;e.AnchorManager=function(n){var i={},r={},o={},s={},a=this,l={},c=n.jsPlumbInstance,u={},d=function(t){return function(e,n){return!1===(t?e[0][0]<n[0][0]:e[0][0]>n[0][0])?-1:1}},h={top:function(t,e){return t[0]>e[0]?1:-1},right:d(!0),bottom:d(!0),left:function(t,e){return(t[0][0]<0?-Math.PI-t[0][0]:Math.PI-t[0][0])>(e[0][0]<0?-Math.PI-e[0][0]:Math.PI-e[0][0])?1:-1}},p=function(t,e){var n=c.getCachedData(t),i=n.s,s=n.o,a=function(e,n,i,s,a,l,c){if(s.length>0)for(var u=function(t,e,n,i,r,o,s){for(var a=[],l=e[r?0:1]/(i.length+1),c=0;c<i.length;c++){var u=(c+1)*l,d=o*e[r?1:0];s&&(u=e[r?0:1]-u);var h=r?u:d,p=n[0]+h,f=h/e[0],m=r?d:u,g=n[1]+m,v=m/e[1];a.push([p,g,f,v,i[c][1],i[c][2]])}return a}(0,n,i,(v=h[e],s.sort(v)),a,l,"right"===e||"top"===e),d=function(t,e){r[t.id]=[e[0],e[1],e[2],e[3]],o[t.id]=c},p=0;p<u.length;p++){var f=u[p][4],m=f.endpoints[0].elementId===t,g=f.endpoints[1].elementId===t;m&&d(f.endpoints[0],u[p]),g&&d(f.endpoints[1],u[p])}var v};a("bottom",i,[s.left,s.top],e.bottom,!0,1,[0,1]),a("top",i,[s.left,s.top],e.top,!0,0,[0,-1]),a("left",i,[s.left,s.top],e.left,!1,0,[-1,0]),a("right",i,[s.left,s.top],e.right,!1,1,[1,0])};this.reset=function(){i={},s={},l={}},this.addFloatingConnection=function(t,e){u[t]=e},this.removeFloatingConnection=function(t){delete u[t]},this.newConnection=function(n){var i=n.sourceId,r=n.targetId,o=n.endpoints,a=!0,l=function(l,c,u,d,h){i===r&&u.isContinuous&&(n._jsPlumb.instance.removeElement(o[1].canvas),a=!1),t.addToList(s,d,[h,c,u.constructor===e.DynamicAnchor])};l(0,o[0],o[0].anchor,r,n),a&&l(0,o[1],o[1].anchor,i,n)};var f=function(e){!function(e,n){if(e){var i=function(t){return t[4]===n};t.removeWithFunction(e.top,i),t.removeWithFunction(e.left,i),t.removeWithFunction(e.bottom,i),t.removeWithFunction(e.right,i)}}(l[e.elementId],e.id)};this.connectionDetached=function(e,n){var i=e.connection||e,r=e.sourceId,o=e.targetId,l=i.endpoints,c=function(e,n,i,r,o){t.removeWithFunction(s[r],function(t){return t[0].id===o.id})};c(0,l[1],l[1].anchor,r,i),c(0,l[0],l[0].anchor,o,i),i.floatingId&&(c(i.floatingIndex,i.floatingEndpoint,i.floatingEndpoint.anchor,i.floatingId,i),f(i.floatingEndpoint)),f(i.endpoints[0]),f(i.endpoints[1]),n||(a.redraw(i.sourceId),i.targetId!==i.sourceId&&a.redraw(i.targetId))},this.add=function(e,n){t.addToList(i,n,e)},this.changeId=function(t,e){s[e]=s[t],i[e]=i[t],delete s[t],delete i[t]},this.getConnectionsFor=function(t){return s[t]||[]},this.getEndpointsFor=function(t){return i[t]||[]},this.deleteEndpoint=function(e){t.removeWithFunction(i[e.elementId],function(t){return t.id===e.id}),f(e)},this.clearFor=function(t){delete i[t],i[t]=[]};var m=function(e,i,r,o,s,a,l,c,u,d,h,p){var f,m,g=-1,v=o.endpoints[l],b=v.id,y=[1,0][l],x=[[i,r],o,s,a,b],_=e[u],w=v._continuousAnchorEdge?e[v._continuousAnchorEdge]:null;if(w){var C=t.findWithFunction(w,function(t){return t[4]===b});if(-1!==C)for(w.splice(C,1),f=0;f<w.length;f++)m=w[f][1],t.addWithFunction(h,m,function(t){return t.id===m.id}),t.addWithFunction(p,w[f][1].endpoints[l],function(t){return t.id===m.endpoints[l].id}),t.addWithFunction(p,w[f][1].endpoints[y],function(t){return t.id===m.endpoints[y].id})}for(f=0;f<_.length;f++)m=_[f][1],1===n.idx&&_[f][3]===a&&-1===g&&(g=f),t.addWithFunction(h,m,function(t){return t.id===m.id}),t.addWithFunction(p,_[f][1].endpoints[l],function(t){return t.id===m.endpoints[l].id}),t.addWithFunction(p,_[f][1].endpoints[y],function(t){return t.id===m.endpoints[y].id});var k=c?-1!==g?g:0:_.length;_.splice(k,0,x),v._continuousAnchorEdge=u};this.updateOtherEndpoint=function(n,i,r,o){var a=t.findWithFunction(s[n],function(t){return t[0].id===o.id}),l=t.findWithFunction(s[i],function(t){return t[0].id===o.id});-1!==a&&(s[n][a][0]=o,s[n][a][1]=o.endpoints[1],s[n][a][2]=o.endpoints[1].anchor.constructor===e.DynamicAnchor),l>-1&&(s[i].splice(l,1),t.addToList(s,r,[o,o.endpoints[0],o.endpoints[0].anchor.constructor===e.DynamicAnchor])),o.updateConnectedClass()},this.sourceChanged=function(n,i,r,o){if(n!==i){r.sourceId=i,r.source=o,t.removeWithFunction(s[n],function(t){return t[0].id===r.id});var a=t.findWithFunction(s[r.targetId],function(t){return t[0].id===r.id});a>-1&&(s[r.targetId][a][0]=r,s[r.targetId][a][1]=r.endpoints[0],s[r.targetId][a][2]=r.endpoints[0].anchor.constructor===e.DynamicAnchor),t.addToList(s,i,[r,r.endpoints[1],r.endpoints[1].anchor.constructor===e.DynamicAnchor]),r.endpoints[1].anchor.isContinuous&&(r.source===r.target?r._jsPlumb.instance.removeElement(r.endpoints[1].canvas):null==r.endpoints[1].canvas.parentNode&&r._jsPlumb.instance.appendElement(r.endpoints[1].canvas)),r.updateConnectedClass()}},this.rehomeEndpoint=function(t,e,n){var r=i[e]||[],o=c.getId(n);if(o!==e){var s=r.indexOf(t);if(s>-1){var l=r.splice(s,1)[0];a.add(l,o)}}for(var u=0;u<t.connections.length;u++)t.connections[u].sourceId===e?a.sourceChanged(e,t.elementId,t.connections[u],t.element):t.connections[u].targetId===e&&(t.connections[u].targetId=t.elementId,t.connections[u].target=t.element,a.updateOtherEndpoint(t.connections[u].sourceId,e,t.elementId,t.connections[u]))},this.redraw=function(n,r,o,a,d,h){if(!c.isSuspendDrawing()){var f=i[n]||[],g=s[n]||[],v=[],b=[],y=[];o=o||c.timestamp(),a=a||{left:0,top:0},r&&(r={left:r.left+a.left,top:r.top+a.top});for(var x=c.updateOffset({elId:n,offset:r,recalc:!1,timestamp:o}),_={},w=0;w<g.length;w++){var C=g[w][0],k=C.sourceId,P=C.targetId,S=C.endpoints[0].anchor.isContinuous,D=C.endpoints[1].anchor.isContinuous;if(S||D){var L=k+"_"+P,E=_[L],T=C.sourceId===n?1:0;S&&!l[k]&&(l[k]={top:[],right:[],bottom:[],left:[]}),D&&!l[P]&&(l[P]={top:[],right:[],bottom:[],left:[]}),n!==P&&c.updateOffset({elId:P,timestamp:o}),n!==k&&c.updateOffset({elId:k,timestamp:o});var M=c.getCachedData(P),I=c.getCachedData(k);P===k&&(S||D)?(m(l[k],-Math.PI/2,0,C,!1,P,0,!1,"top",0,v,b),m(l[P],-Math.PI/2,0,C,!1,k,1,!1,"top",0,v,b)):(E||(E=this.calculateOrientation(k,P,I.o,M.o,C.endpoints[0].anchor,C.endpoints[1].anchor,C),_[L]=E),S&&m(l[k],E.theta,0,C,!1,P,0,!1,E.a[0],0,v,b),D&&m(l[P],E.theta2,-1,C,!0,k,1,!0,E.a[1],0,v,b)),S&&t.addWithFunction(y,k,function(t){return t===k}),D&&t.addWithFunction(y,P,function(t){return t===P}),t.addWithFunction(v,C,function(t){return t.id===C.id}),(S&&0===T||D&&1===T)&&t.addWithFunction(b,C.endpoints[T],function(t){return t.id===C.endpoints[T].id})}}for(w=0;w<f.length;w++)0===f[w].connections.length&&f[w].anchor.isContinuous&&(l[n]||(l[n]={top:[],right:[],bottom:[],left:[]}),m(l[n],-Math.PI/2,0,{endpoints:[f[w],f[w]],paint:function(){}},!1,n,0,!1,f[w].anchor.getDefaultFace(),0,v,b),t.addWithFunction(y,n,function(t){return t===n}));for(w=0;w<y.length;w++)p(y[w],l[y[w]]);for(w=0;w<f.length;w++)f[w].paint({timestamp:o,offset:x,dimensions:x.s,recalc:!0!==h});for(w=0;w<b.length;w++){var A=c.getCachedData(b[w].elementId);b[w].paint({timestamp:null,offset:A,dimensions:A.s})}for(w=0;w<g.length;w++){var j=g[w][1];if(j.anchor.constructor===e.DynamicAnchor){j.paint({elementWithPrecedence:n,timestamp:o}),t.addWithFunction(v,g[w][0],function(t){return t.id===g[w][0].id});for(var O=0;O<j.connections.length;O++)j.connections[O]!==g[w][0]&&t.addWithFunction(v,j.connections[O],function(t){return t.id===j.connections[O].id})}else t.addWithFunction(v,g[w][0],function(t){return t.id===g[w][0].id})}var N=u[n];for(N&&N.paint({timestamp:o,recalc:!1,elId:n}),w=0;w<v.length;w++)v[w].paint({elId:n,timestamp:null,recalc:!1,clearEdits:d})}};c.continuousAnchorFactory={get:function(e){return new 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=!(!1===e.clockwise),s={},a={top:"bottom",right:"left",left:"right",bottom:"top"},l={top:"right",right:"bottom",left:"top",bottom:"left"},c={top:"left",right:"top",left:"bottom",bottom:"right"},u=i?l:c,d=i?c:l,h=e.cssClass||"",p=null,f=null,m=["left","right"],g=["top","bottom"],v=null,b=0;b<n.length;b++)s[n[b]]=!0;this.getDefaultFace=function(){return 0===n.length?"top":n[0]},this.isRelocatable=function(){return!0},this.isSnapOnRelocate=function(){return!0},this.verifyEdge=function(t){return s[t]?t:s[a[t]]?a[t]:s[u[t]]?u[t]:s[d[t]]?d[t]:t},this.isEdgeSupported=function(t){return null==v?null==f?!0===s[t]:f===t:-1!==v.indexOf(t)},this.setCurrentFace=function(t,e){p=t,e&&null!=f&&(f=p)},this.getCurrentFace=function(){return p},this.getSupportedFaces=function(){var t=[];for(var e in s)s[e]&&t.push(e);return t},this.lock=function(){f=p},this.unlock=function(){f=null},this.isLocked=function(){return null!=f},this.lockCurrentAxis=function(){null!=p&&(v="left"===p||"right"===p?m:g)},this.unlockCurrentAxis=function(){v=null},this.compute=function(t){return r[t.element.id]||[0,0]},this.getCurrentLocation=function(t){return r[t.element.id]||[0,0]},this.getOrientation=function(t){return o[t.id]||[0,0]},this.getCssClass=function(){return h}}(e)},clear:function(t){delete r[t]}}},e.AnchorManager.prototype.calculateOrientation=function(t,e,n,i,r,o){var s=["left","top","right","bottom"];if(t===e)return{orientation:"identity",a:["top","top"]};var a=Math.atan2(i.centery-n.centery,i.centerx-n.centerx),l=Math.atan2(n.centery-i.centery,n.centerx-i.centerx),c=[],u={};!function(t,e){for(var n=0;n<t.length;n++)u[t[n]]={left:[e[n].left,e[n].centery],right:[e[n].right,e[n].centery],top:[e[n].centerx,e[n].top],bottom:[e[n].centerx,e[n].bottom]}}(["source","target"],[n,i]);for(var d=0;d<s.length;d++)for(var h=0;h<s.length;h++)c.push({source:s[d],target:s[h],dist:Biltong.lineLength(u.source[s[d]],u.target[s[h]])});c.sort(function(t,e){return t.dist<e.dist?-1:t.dist>e.dist?1:0});for(var p=c[0].source,f=c[0].target,m=0;m<c.length&&(p=!r.isContinuous||r.isEdgeSupported(c[m].source)?c[m].source:null,f=!o.isContinuous||o.isEdgeSupported(c[m].target)?c[m].target:null,null==p||null==f);m++);return r.isContinuous&&r.setCurrentFace(p),o.isContinuous&&o.setCurrentFace(f),{a:[p,f],theta:a,theta2:l}},e.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;var n=!1!==e.relocatable;this.isRelocatable=function(){return n},this.setRelocatable=function(t){n=t};var i=!1!==e.snapOnRelocate;this.isSnapOnRelocate=function(){return i};var r=!1;this.lock=function(){r=!0},this.unlock=function(){r=!1},this.isLocked=function(){return r},t.EventGenerator.apply(this),this.compute=function(t){var e=t.xy,n=t.wh,i=t.timestamp;return t.clearUserDefinedLocation&&(this.userDefinedLocation=null),i&&i===this.timestamp?this.lastReturnValue:(null!=this.userDefinedLocation?this.lastReturnValue=this.userDefinedLocation:this.lastReturnValue=[e[0]+this.x*n[0]+this.offsets[0],e[1]+this.y*n[1]+this.offsets[1],this.x,this.y],this.timestamp=i,this.lastReturnValue)},this.getCurrentLocation=function(t){return t=t||{},null==this.lastReturnValue||null!=t.timestamp&&this.timestamp!==t.timestamp?this.compute(t):this.lastReturnValue},this.setPosition=function(t,e,n,i,o){r&&!o||(this.x=t,this.y=e,this.orientation=[n,i],this.lastReturnValue=null)}},t.extend(e.Anchor,t.EventGenerator,{equals:function(t){if(!t)return!1;var e=t.getOrientation(),n=this.getOrientation();return this.x===t.x&&this.y===t.y&&this.offsets[0]===t.offsets[0]&&this.offsets[1]===t.offsets[1]&&n[0]===e[0]&&n[1]===e[1]},getUserDefinedLocation:function(){return this.userDefinedLocation},setUserDefinedLocation:function(t){this.userDefinedLocation=t},clearUserDefinedLocation:function(){this.userDefinedLocation=null},getOrientation:function(){return this.orientation},getCssClass:function(){return this.cssClass}}),e.FloatingAnchor=function(t){e.Anchor.apply(this,arguments);var n=t.reference,i=t.referenceCanvas,r=e.getSize(i),o=null,s=null;this.orientation=null,this.x=0,this.y=0,this.isFloating=!0,this.compute=function(t){var e=t.xy,n=[e[0]+r[0]/2,e[1]+r[1]/2];return s=n,n},this.getOrientation=function(t){if(o)return o;var e=n.getOrientation(t);return[0*Math.abs(e[0])*-1,0*Math.abs(e[1])*-1]},this.over=function(t,e){o=t.getOrientation(e)},this.out=function(){o=null},this.getCurrentLocation=function(t){return null==s?this.compute(t):s}},t.extend(e.FloatingAnchor,e.Anchor);e.DynamicAnchor=function(t){e.Anchor.apply(this,arguments),this.isDynamic=!0,this.anchors=[],this.elementId=t.elementId,this.jsPlumbInstance=t.jsPlumbInstance;for(var n=0;n<t.anchors.length;n++)this.anchors[n]=(i=t.anchors[n],r=this.jsPlumbInstance,o=this.elementId,i.constructor===e.Anchor?i:r.makeAnchor(i,o,r));var i,r,o;this.getAnchors=function(){return this.anchors};var s=this.anchors.length>0?this.anchors[0]:null,a=s,l=this,c=function(t,e,n,i,r){var o=i[0]+t.x*r[0],s=i[1]+t.y*r[1],a=i[0]+r[0]/2,l=i[1]+r[1]/2;return Math.sqrt(Math.pow(e-o,2)+Math.pow(n-s,2))+Math.sqrt(Math.pow(a-o,2)+Math.pow(l-s,2))},u=t.selector||function(t,e,n,i,r){for(var o=n[0]+i[0]/2,s=n[1]+i[1]/2,a=-1,l=1/0,u=0;u<r.length;u++){var d=c(r[u],o,s,t,e);d<l&&(a=u+0,l=d)}return r[a]};this.compute=function(t){var e=t.xy,n=t.wh,i=t.txy,r=t.twh;this.timestamp=t.timestamp;var o=l.getUserDefinedLocation();return null!=o?o:this.isLocked()||null==i||null==r?s.compute(t):(t.timestamp=null,s=u(e,n,i,r,this.anchors),this.x=s.x,this.y=s.y,s!==a&&this.fire("anchorChanged",s),a=s,s.compute(t))},this.getCurrentLocation=function(t){return this.getUserDefinedLocation()||(null!=s?s.getCurrentLocation(t):null)},this.getOrientation=function(t){return null!=s?s.getOrientation(t):[0,0]},this.over=function(t,e){null!=s&&s.over(t,e)},this.out=function(){null!=s&&s.out()},this.setAnchor=function(t){s=t},this.getCssClass=function(){return s&&s.getCssClass()||""},this.setAnchorCoordinates=function(t){var e=jsPlumbUtil.findWithFunction(this.anchors,function(e){return e.x===t[0]&&e.y===t[1]});return-1!==e&&(this.setAnchor(this.anchors[e]),!0)}},t.extend(e.DynamicAnchor,e.Anchor);var n=function(t,n,i,r,o,s){e.Anchors[o]=function(e){var a=e.jsPlumbInstance.makeAnchor([t,n,i,r,0,0],e.elementId,e.jsPlumbInstance);return a.type=o,s&&s(a,e),a}};n(.5,0,0,-1,"TopCenter"),n(.5,1,0,1,"BottomCenter"),n(0,.5,-1,0,"LeftMiddle"),n(1,.5,1,0,"RightMiddle"),n(.5,0,0,-1,"Top"),n(.5,1,0,1,"Bottom"),n(0,.5,-1,0,"Left"),n(1,.5,1,0,"Right"),n(.5,.5,0,0,"Center"),n(1,0,0,-1,"TopRight"),n(1,1,0,1,"BottomRight"),n(0,0,0,-1,"TopLeft"),n(0,1,0,1,"BottomLeft"),e.Defaults.DynamicAnchors=function(t){return t.jsPlumbInstance.makeAnchors(["TopCenter","RightMiddle","BottomCenter","LeftMiddle"],t.elementId,t.jsPlumbInstance)},e.Anchors.AutoDefault=function(t){var n=t.jsPlumbInstance.makeDynamicAnchor(e.Defaults.DynamicAnchors(t));return n.type="AutoDefault",n};var i=function(t,n){e.Anchors[t]=function(e){var i=e.jsPlumbInstance.makeAnchor(["Continuous",{faces:n}],e.elementId,e.jsPlumbInstance);return i.type=t,i}};e.Anchors.Continuous=function(t){return t.jsPlumbInstance.continuousAnchorFactory.get(t)},i("ContinuousLeft",["left"]),i("ContinuousTop",["top"]),i("ContinuousBottom",["bottom"]),i("ContinuousRight",["right"]),n(0,0,0,0,"Assign",function(t,e){var n=e.position||"Fixed";t.positionFinder=n.constructor===String?e.jsPlumbInstance.AnchorPositionFinders[n]:n,t.constructorParams=e}),this.jsPlumbInstance.prototype.AnchorPositionFinders={Fixed:function(t,e,n){return[(t.left-e.left)/n[0],(t.top-e.top)/n[1]]},Grid:function(t,e,n,i){var r=t.left-e.left,o=t.top-e.top,s=n[0]/i.grid[0],a=n[1]/i.grid[1],l=Math.floor(r/s),c=Math.floor(o/a);return[(l*s+s/2)/n[0],(c*a+a/2)/n[1]]}},e.Anchors.Perimeter=function(t){var e=(t=t||{}).anchorCount||60,n=t.shape;if(!n)throw new Error("no shape supplied to Perimeter Anchor type");var i=function(){for(var t=2*Math.PI/e,n=0,i=[],r=0;r<e;r++){var o=.5+.5*Math.sin(n),s=.5+.5*Math.cos(n);i.push([o,s,0,0]),n+=t}return i},r=function(t){for(var n=e/t.length,i=[],r=function(t,r,o,s,a){for(var l=(o-t)/(n=e*a),c=(s-r)/n,u=0;u<n;u++)i.push([t+l*u,r+c*u,0,0])},o=0;o<t.length;o++)r.apply(null,t[o]);return i},o=function(t){for(var e=[],n=0;n<t.length;n++)e.push([t[n][0],t[n][1],t[n][2],t[n][3],1/t.length]);return r(e)},s=function(){return o([[0,0,1,0],[1,0,1,1],[1,1,0,1],[0,1,0,0]])},a={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:s,Square:s,Triangle:function(){return o([[.5,0,1,1],[1,1,0,1],[0,1,.5,0]])},Path:function(t){for(var e=t.points,n=[],i=0,o=0;o<e.length-1;o++){var s=Math.sqrt(Math.pow(e[o][2]-e[o][0])+Math.pow(e[o][3]-e[o][1]));i+=s,n.push([e[o][0],e[o][1],e[o+1][0],e[o+1][1],s])}for(var a=0;a<n.length;a++)n[a][4]=n[a][4]/i;return r(n)}};if(!a[n])throw new Error("Shape ["+n+"] is unknown by Perimeter Anchor type");var l=a[n](t);t.rotation&&(l=function(t,e){for(var n=[],i=e/180*Math.PI,r=0;r<t.length;r++){var o=t[r][0]-.5,s=t[r][1]-.5;n.push([o*Math.cos(i)-s*Math.sin(i)+.5,o*Math.sin(i)+s*Math.cos(i)+.5,t[r][2],t[r][3]])}return n}(l,t.rotation));var c=t.jsPlumbInstance.makeDynamicAnchor(l);return c.type="Perimeter",c}}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this,e=t.jsPlumb,n=t.jsPlumbUtil,i=t.Biltong;e.Segments={AbstractSegment:function(t){this.params=t,this.findClosestPointOnPath=function(t,e){return{d:1/0,x:null,y:null,l:null}},this.getBounds=function(){return{minX:Math.min(t.x1,t.x2),minY:Math.min(t.y1,t.y2),maxX:Math.max(t.x1,t.x2),maxY:Math.max(t.y1,t.y2)}},this.lineIntersection=function(t,e,n,i){return[]},this.boxIntersection=function(t,e,n,i){var r=[];return r.push.apply(r,this.lineIntersection(t,e,t+n,e)),r.push.apply(r,this.lineIntersection(t+n,e,t+n,e+i)),r.push.apply(r,this.lineIntersection(t+n,e+i,t,e+i)),r.push.apply(r,this.lineIntersection(t,e+i,t,e)),r},this.boundingBoxIntersection=function(t){return this.boxIntersection(t.x,t.y,t.w,t.y)}},Straight:function(t){var n,r,o,s,a,l,c;e.Segments.AbstractSegment.apply(this,arguments);this.type="Straight",this.getLength=function(){return n},this.getGradient=function(){return r},this.getCoordinates=function(){return{x1:s,y1:l,x2:a,y2:c}},this.setCoordinates=function(t){s=t.x1,l=t.y1,a=t.x2,c=t.y2,n=Math.sqrt(Math.pow(a-s,2)+Math.pow(c-l,2)),r=i.gradient({x:s,y:l},{x:a,y:c}),o=-1/r},this.setCoordinates({x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}),this.getBounds=function(){return{minX:Math.min(s,a),minY:Math.min(l,c),maxX:Math.max(s,a),maxY:Math.max(l,c)}},this.pointOnPath=function(t,e){if(0!==t||e){if(1!==t||e){var r=e?t>0?t:n+t:t*n;return i.pointOnLine({x:s,y:l},{x:a,y:c},r)}return{x:a,y:c}}return{x:s,y:l}},this.gradientAtPoint=function(t){return r},this.pointAlongPathFrom=function(t,e,n){var r=this.pointOnPath(t,n),o=e<=0?{x:s,y:l}:{x:a,y:c};return e<=0&&Math.abs(e)>1&&(e*=-1),i.pointOnLine(r,o,e)};var u=function(t,e,n){return n>=Math.min(t,e)&&n<=Math.max(t,e)},d=function(t,e,n){return Math.abs(n-t)<Math.abs(n-e)?t:e};this.findClosestPointOnPath=function(t,e){var h={d:1/0,x:null,y:null,l:null,x1:s,x2:a,y1:l,y2:c};if(0===r)h.y=l,h.x=u(s,a,t)?t:d(s,a,t);else if(r===1/0||r===-1/0)h.x=s,h.y=u(l,c,e)?e:d(l,c,e);else{var p=l-r*s,f=(e-o*t-p)/(r-o),m=r*f+p;h.x=u(s,a,f)?f:d(s,a,f),h.y=u(l,c,m)?m:d(l,c,m)}var g=i.lineLength([h.x,h.y],[s,l]);return h.d=i.lineLength([t,e],[h.x,h.y]),h.l=g/n,h};var h=function(t,e,n){return n>e?e<=t&&t<=n:e>=t&&t>=n};this.lineIntersection=function(t,e,n,o){var u=Math.abs(i.gradient({x:t,y:e},{x:n,y:o})),d=Math.abs(r),p=d===1/0?s:l-d*s,f=[],m=u===1/0?t:e-u*t;if(u!==d)if(u===1/0&&0===d)h(t,s,a)&&h(l,e,o)&&(f=[t,l]);else if(0===u&&d===1/0)h(e,l,c)&&h(s,t,n)&&(f=[s,e]);else{var g,v;u===1/0?h(g=t,s,a)&&h(v=d*t+p,e,o)&&(f=[g,v]):0===u?h(v=e,l,c)&&h(g=(e-p)/d,t,n)&&(f=[g,v]):(v=d*(g=(m-p)/(d-u))+p,h(g,s,a)&&h(v,l,c)&&(f=[g,v]))}return f},this.boxIntersection=function(t,e,n,i){var r=[];return r.push.apply(r,this.lineIntersection(t,e,t+n,e)),r.push.apply(r,this.lineIntersection(t+n,e,t+n,e+i)),r.push.apply(r,this.lineIntersection(t+n,e+i,t,e+i)),r.push.apply(r,this.lineIntersection(t,e+i,t,e)),r},this.boundingBoxIntersection=function(t){return this.boxIntersection(t.x,t.y,t.w,t.h)}},Arc:function(t){e.Segments.AbstractSegment.apply(this,arguments);var n=function(e,n){return i.theta([t.cx,t.cy],[e,n])},r=2*Math.PI;this.radius=t.r,this.anticlockwise=t.ac,this.type="Arc",t.startAngle&&t.endAngle?(this.startAngle=t.startAngle,this.endAngle=t.endAngle,this.x1=t.cx+this.radius*Math.cos(t.startAngle),this.y1=t.cy+this.radius*Math.sin(t.startAngle),this.x2=t.cx+this.radius*Math.cos(t.endAngle),this.y2=t.cy+this.radius*Math.sin(t.endAngle)):(this.startAngle=n(t.x1,t.y1),this.endAngle=n(t.x2,t.y2),this.x1=t.x1,this.y1=t.y1,this.x2=t.x2,this.y2=t.y2),this.endAngle<0&&(this.endAngle+=r),this.startAngle<0&&(this.startAngle+=r);var o=this.endAngle<this.startAngle?this.endAngle+r:this.endAngle;this.sweep=Math.abs(o-this.startAngle),this.anticlockwise&&(this.sweep=r-this.sweep);var s=2*Math.PI*this.radius,a=this.sweep/r,l=s*a;this.getLength=function(){return l},this.getBounds=function(){return{minX:t.cx-t.r,maxX:t.cx+t.r,minY:t.cy-t.r,maxY:t.cy+t.r}};var c=function(t){var e=Math.floor(t),n=Math.ceil(t);return t-e<1e-10?e:n-t<1e-10?n:t};this.pointOnPath=function(e,n){if(0===e)return{x:this.x1,y:this.y1,theta:this.startAngle};if(1===e)return{x:this.x2,y:this.y2,theta:this.endAngle};n&&(e/=l);var i=function(t,e){if(t.anticlockwise){var n=t.startAngle<t.endAngle?t.startAngle+r:t.startAngle;return n-Math.abs(n-t.endAngle)*e}var i=t.endAngle<t.startAngle?t.endAngle+r:t.endAngle,o=Math.abs(i-t.startAngle);return t.startAngle+o*e}(this,e),o=t.cx+t.r*Math.cos(i),s=t.cy+t.r*Math.sin(i);return{x:c(o),y:c(s),theta:i}},this.gradientAtPoint=function(e,n){var r=this.pointOnPath(e,n),o=i.normal([t.cx,t.cy],[r.x,r.y]);return this.anticlockwise||o!==1/0&&o!==-1/0||(o*=-1),o},this.pointAlongPathFrom=function(e,n,i){var r=this.pointOnPath(e,i),o=n/s*2*Math.PI,a=this.anticlockwise?-1:1,l=r.theta+a*o;return{x:t.cx+this.radius*Math.cos(l),y:t.cy+this.radius*Math.sin(l)}}},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}];e.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(e,n,i){return i&&(n=t.jsBezier.locationAlongCurveFrom(e,n>0?0:1,n)),n};this.pointOnPath=function(e,n){return e=i(this.curve,e,n),t.jsBezier.pointOnCurve(this.curve,e)},this.gradientAtPoint=function(e,n){return e=i(this.curve,e,n),t.jsBezier.gradientAtPoint(this.curve,e)},this.pointAlongPathFrom=function(e,n,r){return e=i(this.curve,e,r),t.jsBezier.pointAlongCurveFrom(this.curve,e,n)},this.getLength=function(){return t.jsBezier.getLength(this.curve)},this.getBounds=function(){return this.bounds},this.findClosestPointOnPath=function(e,n){var i=t.jsBezier.nearestPointOnCurve({x:e,y:n},this.curve);return{d:Math.sqrt(Math.pow(i.point.x-e,2)+Math.pow(i.point.y-n,2)),x:i.point.x,y:i.point.y,l:i.location,s:this}},this.lineIntersection=function(e,n,i,r){return t.jsBezier.lineIntersection(e,n,i,r,this.curve)}}},e.SegmentRenderer={getPath:function(t,e){return{Straight:function(e){var n=t.getCoordinates();return(e?"M "+n.x1+" "+n.y1+" ":"")+"L "+n.x2+" "+n.y2},Bezier:function(e){var n=t.params;return(e?"M "+n.x2+" "+n.y2+" ":"")+"C "+n.cp2x+" "+n.cp2y+" "+n.cp1x+" "+n.cp1y+" "+n.x1+" "+n.y1},Arc:function(e){var n=t.params,i=t.sweep>Math.PI?1:0,r=t.anticlockwise?0:1;return(e?"M"+t.x1+" "+t.y1+" ":"")+"A "+t.radius+" "+n.r+" 0 "+i+","+r+" "+t.x2+" "+t.y2}}[t.type](e)}};var r=function(){this.resetBounds=function(){this.bounds={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}},this.resetBounds()};e.Connectors.AbstractConnector=function(t){r.apply(this,arguments);var o=[],s=0,a=[],l=[],c=t.stub||0,u=n.isArray(c)?c[0]:c,d=n.isArray(c)?c[1]:c,h=t.gap||0,p=n.isArray(h)?h[0]:h,f=n.isArray(h)?h[1]:h,m=null,g=null;this.getPathData=function(){for(var t="",n=0;n<o.length;n++)t+=e.SegmentRenderer.getPath(o[n],0===n),t+=" ";return t},this.findSegmentForPoint=function(t,e){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(t,e);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},this.lineIntersection=function(t,e,n,i){for(var r=[],s=0;s<o.length;s++)r.push.apply(r,o[s].lineIntersection(t,e,n,i));return r},this.boxIntersection=function(t,e,n,i){for(var r=[],s=0;s<o.length;s++)r.push.apply(r,o[s].boxIntersection(t,e,n,i));return r},this.boundingBoxIntersection=function(t){for(var e=[],n=0;n<o.length;n++)e.push.apply(e,o[n].boundingBoxIntersection(t));return e};var v=function(t,e){e&&(t=t>0?t/s:(s+t)/s);for(var n=a.length-1,i=1,r=0;r<a.length;r++)if(a[r][1]>=t){n=r,i=1===t?1:0===t?0:(t-a[r][0])/l[r];break}return{segment:o[n],proportion:i,index:n}};this.setSegments=function(t){m=[],s=0;for(var e=0;e<t.length;e++)m.push(t[e]),s+=t[e].getLength()},this.getLength=function(){return s};var b=function(t){this.strokeWidth=t.strokeWidth;var e=i.quadrant(t.sourcePos,t.targetPos),n=t.targetPos[0]<t.sourcePos[0],r=t.targetPos[1]<t.sourcePos[1],o=t.strokeWidth||1,s=t.sourceEndpoint.anchor.getOrientation(t.sourceEndpoint),a=t.targetEndpoint.anchor.getOrientation(t.targetEndpoint),l=n?t.targetPos[0]:t.sourcePos[0],c=r?t.targetPos[1]:t.sourcePos[1],h=Math.abs(t.targetPos[0]-t.sourcePos[0]),m=Math.abs(t.targetPos[1]-t.sourcePos[1]);if(0===s[0]&&0===s[1]||0===a[0]&&0===a[1]){var g=h>m?0:1,v=[1,0][g];a=[],(s=[])[g]=t.sourcePos[g]>t.targetPos[g]?-1:1,a[g]=t.sourcePos[g]>t.targetPos[g]?1:-1,s[v]=0,a[v]=0}var b=n?h+p*s[0]:p*s[0],y=r?m+p*s[1]:p*s[1],x=n?f*a[0]:h+f*a[0],_=r?f*a[1]:m+f*a[1],w=s[0]*a[0]+s[1]*a[1],C={sx:b,sy:y,tx:x,ty:_,lw:o,xSpan:Math.abs(x-b),ySpan:Math.abs(_-y),mx:(b+x)/2,my:(y+_)/2,so:s,to:a,x:l,y:c,w:h,h:m,segment:e,startStubX:b+s[0]*u,startStubY:y+s[1]*u,endStubX:x+a[0]*d,endStubY:_+a[1]*d,isXGreaterThanStubTimes2:Math.abs(b-x)>u+d,isYGreaterThanStubTimes2:Math.abs(y-_)>u+d,opposite:-1===w,perpendicular:0===w,orthogonal:1===w,sourceAxis:0===s[0]?"y":"x",points:[l,c,h,m,b,y,x,_],stubs:[u,d]};return C.anchorOrientation=C.opposite?"opposite":C.orthogonal?"orthogonal":"perpendicular",C};this.getSegments=function(){return o},this.updateBounds=function(t){var e=t.getBounds();this.bounds.minX=Math.min(this.bounds.minX,e.minX),this.bounds.maxX=Math.max(this.bounds.maxX,e.maxX),this.bounds.minY=Math.min(this.bounds.minY,e.minY),this.bounds.maxY=Math.max(this.bounds.maxY,e.maxY)};return this.pointOnPath=function(t,e){var n=v(t,e);return n.segment&&n.segment.pointOnPath(n.proportion,!1)||[0,0]},this.gradientAtPoint=function(t,e){var n=v(t,e);return n.segment&&n.segment.gradientAtPoint(n.proportion,!1)||0},this.pointAlongPathFrom=function(t,e,n){var i=v(t,n);return i.segment&&i.segment.pointAlongPathFrom(i.proportion,e,!1)||[0,0]},this.compute=function(t){g=b.call(this,t),s=o.length=a.length=l.length=0,this._compute(g,t),this.x=g.points[0],this.y=g.points[1],this.w=g.points[2],this.h=g.points[3],this.segment=g.segment,function(){for(var t=0,e=0;e<o.length;e++){var n=o[e].getLength();l[e]=n/s,a[e]=[t,t+=n/s]}}()},{addSegment:function(t,n,i){if(i.x1!==i.x2||i.y1!==i.y2){var r=new e.Segments[n](i);o.push(r),s+=r.getLength(),t.updateBounds(r)}},prepareCompute:b,sourceStub:u,targetStub:d,maxStub:Math.max(u,d),sourceGap:p,targetGap:f,maxGap:Math.max(p,f)}},n.extend(e.Connectors.AbstractConnector,r),e.Endpoints.AbstractEndpoint=function(t){return r.apply(this,arguments),{compute:this.compute=function(t,e,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},cssClass:t.cssClass}},n.extend(e.Endpoints.AbstractEndpoint,r),e.Endpoints.Dot=function(t){this.type="Dot";e.Endpoints.AbstractEndpoint.apply(this,arguments);t=t||{},this.radius=t.radius||10,this.defaultOffset=.5*this.radius,this.defaultInnerRadius=this.radius/3,this._compute=function(t,e,n,i){this.radius=n.radius||this.radius;var r=t[0]-this.radius,o=t[1]-this.radius,s=2*this.radius,a=2*this.radius;if(n.stroke){var l=n.strokeWidth||1;r-=l,o-=l,s+=2*l,a+=2*l}return[r,o,s,a,this.radius]}},n.extend(e.Endpoints.Dot,e.Endpoints.AbstractEndpoint),e.Endpoints.Rectangle=function(t){this.type="Rectangle";e.Endpoints.AbstractEndpoint.apply(this,arguments);t=t||{},this.width=t.width||20,this.height=t.height||20,this._compute=function(t,e,n,i){var r=n.width||this.width,o=n.height||this.height;return[t[0]-r/2,t[1]-o/2,r,o]}},n.extend(e.Endpoints.Rectangle,e.Endpoints.AbstractEndpoint);var o=function(t){e.jsPlumbUIComponent.apply(this,arguments),this._jsPlumb.displayElements=[]};n.extend(o,e.jsPlumbUIComponent,{getDisplayElements:function(){return this._jsPlumb.displayElements},appendDisplayElement:function(t){this._jsPlumb.displayElements.push(t)}}),e.Endpoints.Image=function(i){this.type="Image",o.apply(this,arguments),e.Endpoints.AbstractEndpoint.apply(this,arguments);var r=i.onload,s=i.src||i.url,a=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(t,e){var n=t.constructor===String?t:t.src;r=e,this._jsPlumb.img.src=n,null!=this.canvas&&this.canvas.setAttribute("src",this._jsPlumb.img.src)}.bind(this),this._jsPlumb.endpoint.setImage(s,r),this._compute=function(t,e,n,i){return this.anchorPoint=t,this._jsPlumb.ready?[t[0]-this._jsPlumb.widthToUse/2,t[1]-this._jsPlumb.heightToUse/2,this._jsPlumb.widthToUse,this._jsPlumb.heightToUse]:[0,0,0,0]},this.canvas=e.createElement("img",{position:"absolute",margin:0,padding:0,outline:0},this._jsPlumb.instance.endpointClass+a),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(t,e,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(e,n){null!=this._jsPlumb&&(this._jsPlumb.ready?this.actuallyPaint(e,n):t.setTimeout(function(){this.paint(e,n)}.bind(this),200))}},n.extend(e.Endpoints.Image,[o,e.Endpoints.AbstractEndpoint],{cleanup:function(t){t&&(this._jsPlumb.deleted=!0,this.canvas&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null)}}),e.Endpoints.Blank=function(t){e.Endpoints.AbstractEndpoint.apply(this,arguments);this.type="Blank",o.apply(this,arguments),this._compute=function(t,e,n,i){return[t[0],t[1],10,0]};var i=t.cssClass?" "+t.cssClass:"";this.canvas=e.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(t,e){n.sizeElement(this.canvas,this.x,this.y,this.w,this.h)}},n.extend(e.Endpoints.Blank,[e.Endpoints.AbstractEndpoint,o],{cleanup:function(){this.canvas&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)}}),e.Endpoints.Triangle=function(t){this.type="Triangle",e.Endpoints.AbstractEndpoint.apply(this,arguments);var n=this;(t=t||{}).width=t.width||55,t.height=t.height||55,this.width=t.width,this.height=t.height,this._compute=function(t,e,i,r){var o=i.width||n.width,s=i.height||n.height;return[t[0]-o/2,t[1]-s/2,o,s]}};var s=e.Overlays.AbstractOverlay=function(t){this.visible=!0,this.isAppendedAtTopLevel=!0,this.component=t.component,this.loc=null==t.location?.5:t.location,this.endpointLoc=null==t.endpointLocation?[.5,.5]:t.endpointLocation,this.visible=!1!==t.visible};s.prototype={cleanup:function(t){t&&(this.component=null,this.canvas=null,this.endpointLoc=null)},reattach:function(t,e){},setVisible:function(t){this.visible=t,this.component.repaint()},isVisible:function(){return this.visible},hide:function(){this.setVisible(!1)},show:function(){this.setVisible(!0)},incrementLocation:function(t){this.loc+=t,this.component.repaint()},setLocation:function(t){this.loc=t,this.component.repaint()},getLocation:function(){return this.loc},updateFrom:function(){}},e.Overlays.Arrow=function(t){this.type="Arrow",s.apply(this,arguments),this.isAppendedAtTopLevel=!1,t=t||{};var r=this;this.length=t.length||20,this.width=t.width||20,this.id=t.id;var o=(t.direction||1)<0?-1:1,a=t.paintStyle||{"stroke-width":1},l=t.foldback||.623;this.computeMaxSize=function(){return 1.5*r.width},this.elementCreated=function(n,i){if(this.path=n,t.events)for(var r in t.events)e.on(n,r,t.events[r])},this.draw=function(t,e){var r,s,c,u;if(t.pointAlongPathFrom){if(n.isString(this.loc)||this.loc>1||this.loc<0){var d=parseInt(this.loc,10),h=this.loc<0?1:0;r=t.pointAlongPathFrom(h,d,!1),s=t.pointAlongPathFrom(h,d-o*this.length/2,!1),c=i.pointOnLine(r,s,this.length)}else if(1===this.loc){if(r=t.pointOnPath(this.loc),s=t.pointAlongPathFrom(this.loc,-this.length),c=i.pointOnLine(r,s,this.length),-1===o){var p=c;c=r,r=p}}else if(0===this.loc){if(c=t.pointOnPath(this.loc),s=t.pointAlongPathFrom(this.loc,this.length),r=i.pointOnLine(c,s,this.length),-1===o){var f=c;c=r,r=f}}else r=t.pointAlongPathFrom(this.loc,o*this.length/2),s=t.pointOnPath(this.loc),c=i.pointOnLine(r,s,this.length);var m={hxy:r,tail:u=i.perpendicularLineTo(r,c,this.width),cxy:i.pointOnLine(r,c,l*this.length)},g=a.stroke||e.stroke,v=a.fill||e.stroke;return{component:t,d:m,"stroke-width":a.strokeWidth||e.strokeWidth,stroke:g,fill:v,minX:Math.min(r.x,u[0].x,u[1].x),maxX:Math.max(r.x,u[0].x,u[1].x),minY:Math.min(r.y,u[0].y,u[1].y),maxY:Math.max(r.y,u[0].y,u[1].y)}}return{component:t,minX:0,maxX:0,minY:0,maxY:0}}},n.extend(e.Overlays.Arrow,s,{updateFrom:function(t){this.length=t.length||this.length,this.width=t.width||this.width,this.direction=null!=t.direction?t.direction:this.direction,this.foldback=t.foldback||this.foldback},cleanup:function(){this.path&&this.canvas&&this.canvas.removeChild(this.path)}}),e.Overlays.PlainArrow=function(t){t=t||{};var n=e.extend(t,{foldback:1});e.Overlays.Arrow.call(this,n),this.type="PlainArrow"},n.extend(e.Overlays.PlainArrow,e.Overlays.Arrow),e.Overlays.Diamond=function(t){var n=(t=t||{}).length||40,i=e.extend(t,{length:n/2,foldback:2});e.Overlays.Arrow.call(this,i),this.type="Diamond"},n.extend(e.Overlays.Diamond,e.Overlays.Arrow);var a=function(t,e){return(null==t._jsPlumb.cachedDimensions||e)&&(t._jsPlumb.cachedDimensions=t.getDimensions()),t._jsPlumb.cachedDimensions},l=function(t){e.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=t.id,this._jsPlumb.div=null,this._jsPlumb.initialised=!1,this._jsPlumb.component=t.component,this._jsPlumb.cachedDimensions=null,this._jsPlumb.create=t.create,this._jsPlumb.initiallyInvisible=!1===t.visible,this.getElement=function(){if(null==this._jsPlumb.div){var n=this._jsPlumb.div=e.getElement(this._jsPlumb.create(this._jsPlumb.component));n.style.position="absolute",jsPlumb.addClass(n,this._jsPlumb.instance.overlayClass+" "+(this.cssClass?this.cssClass:t.cssClass?t.cssClass:"")),this._jsPlumb.instance.appendElement(n),this._jsPlumb.instance.getId(n),this.canvas=n;var i="translate(-50%, -50%)";n.style.webkitTransform=i,n.style.mozTransform=i,n.style.msTransform=i,n.style.oTransform=i,n.style.transform=i,n._jsPlumb=this,!1===t.visible&&(n.style.display="none")}return this._jsPlumb.div},this.draw=function(t,e,i){var r=a(this);if(null!=r&&2===r.length){var o={x:0,y:0};if(i)o={x:i[0],y:i[1]};else if(t.pointOnPath){var s=this.loc,l=!1;(n.isString(this.loc)||this.loc<0||this.loc>1)&&(s=parseInt(this.loc,10),l=!0),o=t.pointOnPath(s,l)}else{var c=this.loc.constructor===Array?this.loc:this.endpointLoc;o={x:c[0]*t.w,y:c[1]*t.h}}var u=o.x-r[0]/2,d=o.y-r[1]/2;return{component:t,d:{minx:u,miny:d,td:r,cxy:o},minX:u,maxX:u+r[0],minY:d,maxY:d+r[1]}}return{minX:0,maxX:0,minY:0,maxY:0}}};n.extend(l,[e.jsPlumbUIComponent,s],{getDimensions:function(){return[1,1]},setVisible:function(t){this._jsPlumb.div&&(this._jsPlumb.div.style.display=t?"block":"none",t&&this._jsPlumb.initiallyInvisible&&(a(this,!0),this.component.repaint(),this._jsPlumb.initiallyInvisible=!1))},clearCachedDimensions:function(){this._jsPlumb.cachedDimensions=null},cleanup:function(t){t?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(t,e){null!=this._jsPlumb.div&&t.getContainer().appendChild(this._jsPlumb.div),this.detached=!1},computeMaxSize:function(){var t=a(this);return Math.max(t[0],t[1])},paint:function(t,e){this._jsPlumb.initialised||(this.getElement(),t.component.appendDisplayElement(this._jsPlumb.div),this._jsPlumb.initialised=!0,this.detached&&this._jsPlumb.div.parentNode.removeChild(this._jsPlumb.div)),this._jsPlumb.div.style.left=t.component.x+t.d.minx+"px",this._jsPlumb.div.style.top=t.component.y+t.d.miny+"px"}}),e.Overlays.Custom=function(t){this.type="Custom",l.apply(this,arguments)},n.extend(e.Overlays.Custom,l),e.Overlays.GuideLines=function(){var t=this;t.length=50,t.strokeWidth=5,this.type="GuideLines",s.apply(this,arguments),e.jsPlumbUIComponent.apply(this,arguments),this.draw=function(e,n){var r=e.pointAlongPathFrom(t.loc,t.length/2),o=e.pointOnPath(t.loc),s=i.pointOnLine(r,o,t.length),a=i.perpendicularLineTo(r,s,40),l=i.perpendicularLineTo(s,r,20);return{connector:e,head:r,tail:s,headLine:l,tailLine:a,minX:Math.min(r.x,s.x,l[0].x,l[1].x),minY:Math.min(r.y,s.y,l[0].y,l[1].y),maxX:Math.max(r.x,s.x,l[0].x,l[1].x),maxY:Math.max(r.y,s.y,l[0].y,l[1].y)}}},e.Overlays.Label=function(t){this.labelStyle=t.labelStyle;this.cssClass=null!=this.labelStyle?this.labelStyle.cssClass:null;var n=e.extend({create:function(){return e.createElement("div")}},t);if(e.Overlays.Custom.call(this,n),this.type="Label",this.label=t.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.fill&&(i.style.background=this.labelStyle.fill),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(e.Overlays.Label,e.Overlays.Custom,{cleanup:function(t){t&&(this.div=null,this.label=null,this.labelText=null,this.cssClass=null,this.labelStyle=null)},getLabel:function(){return this.label},setLabel:function(t){this.label=t,this.labelText=null,this.clearCachedDimensions(),this.update(),this.component.repaint()},getDimensions:function(){return this.update(),l.prototype.getDimensions.apply(this,arguments)},update:function(){if("function"==typeof this.label){var t=this.label(this);this.getElement().innerHTML=t.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(t){null!=t.label&&this.setLabel(t.label)}})}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this,e=t.jsPlumbUtil,n=t.jsPlumbInstance,i="stop",r="revert",o="_jsPlumbGroup",s="show",a="hide",l=function(t){var n={},i={},r={},l=this;function c(e,n){for(var i=e.getMembers(),r=0;r<i.length;r++)t[n?s:a](i[r],!0)}t.bind("connection",function(t){null!=t.source[o]&&null!=t.target[o]&&t.source[o]===t.target[o]?(i[t.connection.id]=t.source[o],r[t.connection.id]=t.source[o]):(null!=t.source[o]&&(e.suggest(t.source[o].connections.source,t.connection),i[t.connection.id]=t.source[o]),null!=t.target[o]&&(e.suggest(t.target[o].connections.target,t.connection),r[t.connection.id]=t.target[o]))}),t.bind("internal.connectionDetached",function(t){!function(t){delete t.proxies;var n,o=i[t.id];null!=o&&(n=function(e){return e.id===t.id},e.removeWithFunction(o.connections.source,n),e.removeWithFunction(o.connections.target,n),delete i[t.id]),null!=(o=r[t.id])&&(n=function(e){return e.id===t.id},e.removeWithFunction(o.connections.source,n),e.removeWithFunction(o.connections.target,n),delete r[t.id])}(t.connection)}),t.bind("connectionMoved",function(t){var e=(0===t.index?i:r)[t.connection.id];if(e){var n=e.connections[0===t.index?"source":"target"],o=n.indexOf(t.connection);-1!==o&&n.splice(o,1)}}),this.addGroup=function(e){t.addClass(e.getEl(),"jtk-group-expanded"),n[e.id]=e,e.manager=this,h(e),t.fire("group:add",{group:e})},this.addToGroup=function(e,n,i){if(e=this.getGroup(e)){var r=e.getEl();if(n._isJsPlumbGroup)return;var o=n._jsPlumbGroup;if(o!==e){var s=t.getOffset(n,!0),a=e.collapsed?t.getOffset(r,!0):t.getOffset(e.getDragArea(),!0);null!=o&&(o.remove(n,!1,i,!1,e),l.updateConnectionsForGroup(o)),e.add(n,i);var c=function(t,n){var i=0===n?1:0;t.each(function(t){t.setVisible(!1),t.endpoints[i].element._jsPlumbGroup===e?(t.endpoints[i].setVisible(!1),l.expandConnection(t,i,e)):(t.endpoints[n].setVisible(!1),l.collapseConnection(t,n,e))})};e.collapsed&&(c(t.select({source:n}),0),c(t.select({target:n}),1));var u=t.getId(n);t.dragManager.setParent(n,u,r,t.getId(r),s);var d={left:s.left-a.left,top:s.top-a.top};if(t.setPosition(n,d),t.dragManager.revalidateParent(n,u,s),l.updateConnectionsForGroup(e),t.revalidate(u),!i){var h={group:e,el:n};o&&(h.sourceGroup=o),t.fire("group:addMember",h)}}}},this.removeFromGroup=function(t,e,n){(t=this.getGroup(t))&&t.remove(e,null,n)},this.getGroup=function(t){var i=t;if(e.isString(t)&&null==(i=n[t]))throw new TypeError("No such group ["+t+"]");return i},this.getGroups=function(){var t=[];for(var e in n)t.push(n[e]);return t},this.removeGroup=function(e,i,r,o){e=this.getGroup(e),this.expandGroup(e,!0);var s=e[i?"removeAll":"orphanAll"](r,o);return t.remove(e.getEl()),delete n[e.id],delete t._groups[e.id],t.fire("group:remove",{group:e}),s},this.removeAllGroups=function(t,e,i){for(var r in n)this.removeGroup(n[r],t,e,i)};var u=this.collapseConnection=function(e,n,i){var r,s=i.getEl(),a=t.getId(s),l=e.endpoints[n].elementId,c=e.endpoints[0===n?1:0].element;c[o]&&!c[o].shouldProxy()&&c[o].collapsed||(e.proxies=e.proxies||[],(r=e.proxies[n]?e.proxies[n].ep:t.addEndpoint(s,{endpoint:i.getEndpoint(e,n),anchor:i.getAnchor(e,n),parameters:{isProxyEndpoint:!0}})).setDeleteOnEmpty(!0),e.proxies[n]={ep:r,originalEp:e.endpoints[n]},0===n?t.anchorManager.sourceChanged(l,a,e,s):(t.anchorManager.updateOtherEndpoint(e.endpoints[0].elementId,l,a,e),e.target=s,e.targetId=a),e.proxies[n].originalEp.detachFromConnection(e,null,!0),r.connections=[e],e.endpoints[n]=r,e.setVisible(!0))};this.collapseGroup=function(e){if(null!=(e=this.getGroup(e))&&!e.collapsed){var n=e.getEl();if(c(e,!1),e.shouldProxy()){var i=function(t,n){for(var i=0;i<t.length;i++){var r=t[i];u(r,n,e)}};i(e.connections.source,0),i(e.connections.target,1)}e.collapsed=!0,t.removeClass(n,"jtk-group-expanded"),t.addClass(n,"jtk-group-collapsed"),t.revalidate(n),t.fire("group:collapse",{group:e})}};var d=this.expandConnection=function(e,n,i){if(null!=e.proxies&&null!=e.proxies[n]){var r=t.getId(i.getEl()),o=e.proxies[n].originalEp.element,s=e.proxies[n].originalEp.elementId;e.endpoints[n]=e.proxies[n].originalEp,0===n?t.anchorManager.sourceChanged(r,s,e,o):(t.anchorManager.updateOtherEndpoint(e.endpoints[0].elementId,r,s,e),e.target=o,e.targetId=s),e.proxies[n].ep.detachFromConnection(e,null),e.proxies[n].originalEp.addConnection(e),delete e.proxies[n]}};function h(e){var n=e.getMembers(),o=t.getConnections({source:n,scope:"*"},!0),s=t.getConnections({target:n,scope:"*"},!0),a={};e.connections.source.length=0,e.connections.target.length=0;var l=function(t){for(var n=0;n<t.length;n++)a[t[n].id]||(a[t[n].id]=!0,t[n].source._jsPlumbGroup===e?(t[n].target._jsPlumbGroup!==e&&e.connections.source.push(t[n]),i[t[n].id]=e):t[n].target._jsPlumbGroup===e&&(e.connections.target.push(t[n]),r[t[n].id]=e))};l(o),l(s)}this.expandGroup=function(e,n){if(null!=(e=this.getGroup(e))&&e.collapsed){var i=e.getEl();if(c(e,!0),e.shouldProxy()){var r=function(t,n){for(var i=0;i<t.length;i++){var r=t[i];d(r,n,e)}};r(e.connections.source,0),r(e.connections.target,1)}e.collapsed=!1,t.addClass(i,"jtk-group-expanded"),t.removeClass(i,"jtk-group-collapsed"),t.revalidate(i),this.repaintGroup(e),n||t.fire("group:expand",{group:e})}},this.repaintGroup=function(e){for(var n=(e=this.getGroup(e)).getMembers(),i=0;i<n.length;i++)t.revalidate(n[i])},this.updateConnectionsForGroup=h,this.refreshAllGroups=function(){for(var e in n)h(n[e]),t.dragManager.updateOffsets(t.getId(n[e].getEl()))}};n.prototype.addGroup=function(n){var s=this;if(s._groups=s._groups||{},null!=s._groups[n.id])throw new TypeError("cannot create Group ["+n.id+"]; a Group with that ID exists");if(null!=n.el[o])throw new TypeError("cannot create Group ["+n.id+"]; the given element is already a Group");var a=new function(n,s){var a=this,l=s.el;this.getEl=function(){return l},this.id=s.id||e.uuid(),l._isJsPlumbGroup=!0;var c=this.getDragArea=function(){var t=n.getSelector(l,"[jtk-group-content]");return t&&t.length>0?t[0]:l},u=!0===s.ghost,d=u||!0===s.constrain,h=!1!==s.revert,p=!0===s.orphan,f=!0===s.prune,m=!0===s.dropOverride,g=!1!==s.proxied,v=[];if(this.connections={source:[],target:[],internal:[]},this.getAnchor=function(t,e){return s.anchor||"Continuous"},this.getEndpoint=function(t,e){return s.endpoint||["Dot",{radius:10}]},this.collapsed=!1,!1!==s.draggable){var b={stop:function(t){n.fire("groupDragStop",jsPlumb.extend(t,{group:a}))},scope:"_jsPlumbGroupDrag"};s.dragOptions&&t.jsPlumb.extend(b,s.dragOptions),n.draggable(s.el,b)}!1!==s.droppable&&n.droppable(s.el,{drop:function(t){var e=t.drag.el;if(!e._isJsPlumbGroup){var i=e._jsPlumbGroup;if(i!==a){if(null!=i&&i.overrideDrop(e,a))return;n.getGroupManager().addToGroup(a,e,!1)}}}});var y=function(t,e){for(var n=null==t.nodeType?t:[t],i=0;i<n.length;i++)e(n[i])};function x(t,e){var i=function(t){return t.offsetParent}(t),r=n.getSize(i),o=n.getSize(t),s=e[0],a=s+o[0],l=e[1],c=l+o[1];return a>0&&s<r[0]&&c>0&&l<r[1]}function _(t){var e=n.getId(t),i=n.getOffset(t);return t.parentNode.removeChild(t),n.getContainer().appendChild(t),n.setPosition(t,i),delete t._jsPlumbGroup,k(t),n.dragManager.clearParent(t,e),[e,i]}function w(t){var e=null;if(!x(t.el,t.pos)){var i=t.el._jsPlumbGroup;f?n.remove(t.el):e=_(t.el),i.remove(t.el)}return e}function C(t){var e=n.getId(t);n.revalidate(t),n.dragManager.revalidateParent(t,e)}function k(t){t._katavorioDrag&&((f||p)&&t._katavorioDrag.off(i,w),f||p||!h||(t._katavorioDrag.off(r,C),t._katavorioDrag.setRevert(null)))}function P(t){t._katavorioDrag&&((f||p)&&t._katavorioDrag.on(i,w),d&&t._katavorioDrag.setConstrain(!0),u&&t._katavorioDrag.setUseGhostProxy(!0),f||p||!h||(t._katavorioDrag.on(r,C),t._katavorioDrag.setRevert(function(t,e){return!x(t,e)})))}this.overrideDrop=function(t,e){return m&&(h||f||p)},this.add=function(t,e){var i=c();y(t,function(t){if(null!=t._jsPlumbGroup){if(t._jsPlumbGroup===a)return;t._jsPlumbGroup.remove(t,!0,e,!1)}t._jsPlumbGroup=a,v.push(t),n.isAlreadyDraggable(t)&&P(t),t.parentNode!==i&&i.appendChild(t)}),n.getGroupManager().updateConnectionsForGroup(a)},this.remove=function(t,i,r,o,s){y(t,function(t){if(delete t._jsPlumbGroup,e.removeWithFunction(v,function(e){return e===t}),i)try{a.getDragArea().removeChild(t)}catch(t){jsPlumbUtil.log("Could not remove element from Group "+t)}if(k(t),!r){var o={group:a,el:t};s&&(o.targetGroup=s),n.fire("group:removeMember",o)}}),o||n.getGroupManager().updateConnectionsForGroup(a)},this.removeAll=function(t,e){for(var i=0,r=v.length;i<r;i++){var o=v[0];a.remove(o,t,e,!0),n.remove(o,!0)}v.length=0,n.getGroupManager().updateConnectionsForGroup(a)},this.orphanAll=function(){for(var t={},e=0;e<v.length;e++){var n=_(v[e]);t[n[0]]=n[1]}return v.length=0,t},this.getMembers=function(){return v},l[o]=this,n.bind("elementDraggable",function(t){t.el._jsPlumbGroup===this&&P(t.el)}.bind(this)),this.shouldProxy=function(){return g},n.getGroupManager().addGroup(this)}(s,n);return s._groups[a.id]=a,n.collapsed&&this.collapseGroup(a),a},n.prototype.addToGroup=function(t,e,n){var i=function(e){var i=this.getId(e);this.manage(i,e),this.getGroupManager().addToGroup(t,e,n)}.bind(this);if(Array.isArray(e))for(var r=0;r<e.length;r++)i(e[r]);else i(e)},n.prototype.removeFromGroup=function(t,e,n){this.getGroupManager().removeFromGroup(t,e,n)},n.prototype.removeGroup=function(t,e,n,i){return this.getGroupManager().removeGroup(t,e,n,i)},n.prototype.removeAllGroups=function(t,e,n){this.getGroupManager().removeAllGroups(t,e,n)},n.prototype.getGroup=function(t){return this.getGroupManager().getGroup(t)},n.prototype.getGroups=function(){return this.getGroupManager().getGroups()},n.prototype.expandGroup=function(t){this.getGroupManager().expandGroup(t)},n.prototype.collapseGroup=function(t){this.getGroupManager().collapseGroup(t)},n.prototype.repaintGroup=function(t){this.getGroupManager().repaintGroup(t)},n.prototype.toggleGroup=function(t){null!=(t=this.getGroupManager().getGroup(t))&&this.getGroupManager()[t.collapsed?"expandGroup":"collapseGroup"](t)},n.prototype.getGroupManager=function(){var t=this._groupManager;return null==t&&(t=this._groupManager=new l(this)),t},n.prototype.removeGroupManager=function(){delete this._groupManager},n.prototype.getGroupFor=function(t){if(t=this.getElement(t))return t[o]}}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this.jsPlumb,e=this.jsPlumbUtil;t.Connectors.Flowchart=function(e){this.type="Flowchart",(e=e||{}).stub=null==e.stub?30:e.stub;var n,i=t.Connectors.AbstractConnector.apply(this,arguments),r=null==e.midpoint?.5:e.midpoint,o=!0===e.alwaysRespectStubs,s=null,a=null,l=null!=e.cornerRadius?e.cornerRadius:0,c=(e.loopbackRadius,function(t){return t<0?-1:0===t?0:1}),u=function(t){return[c(t[2]-t[0]),c(t[3]-t[1])]},d=function(t,e,n,i){if(s!==e||a!==n){var r=null==s?i.sx:s,o=null==a?i.sy:a,l=r===e?"v":"h";s=e,a=n,t.push([r,o,e,n,l])}},h=function(t){return Math.sqrt(Math.pow(t[0]-t[2],2)+Math.pow(t[1]-t[3],2))},p=function(t){var e=[];return e.push.apply(e,t),e};this._compute=function(t,e){n=[],s=null,a=null;var c=function(){return[t.startStubX,t.startStubY,t.endStubX,t.endStubY]},f={perpendicular:c,orthogonal:c,opposite:function(e){var n=t,i="x"===e?0:1;return!o&&{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)}}[e]()?{x:[(t.sx+t.tx)/2,t.startStubY,(t.sx+t.tx)/2,t.endStubY],y:[t.startStubX,(t.sy+t.ty)/2,t.endStubX,(t.sy+t.ty)/2]}[e]:[t.startStubX,t.startStubY,t.endStubX,t.endStubY]}}[t.anchorOrientation](t.sourceAxis),m="x"===t.sourceAxis?0:1,g="x"===t.sourceAxis?1:0,v=f[m],b=f[g],y=f[m+2],x=f[g+2];d(n,f[0],f[1],t);var _=t.startStubX+(t.endStubX-t.startStubX)*r,w=t.startStubY+(t.endStubY-t.startStubY)*r,C={x:[0,1],y:[1,0]},k={perpendicular:function(e){var n=t,i={x:[[n.startStubX,n.endStubX],null,[n.endStubX,n.startStubX]],y:[[n.startStubY,n.endStubY],null,[n.endStubY,n.startStubY]]},r={x:[[_,n.startStubY],[_,n.endStubY]],y:[[n.startStubX,w],[n.endStubX,w]]},o={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]]},a={x:[[n.startStubX,w],[n.endStubX,w],[n.endStubX,n.endStubY]],y:[[_,n.startStubY],[_,n.endStubY],[n.endStubX,n.endStubY]]},l={x:[n.startStubY,n.endStubY],y:[n.startStubX,n.endStubX]},c=C[e][0],u=C[e][1],d=n.so[c]+1,h=n.to[u]+1,p=-1===n.to[u]&&l[e][1]<l[e][0]||1===n.to[u]&&l[e][1]>l[e][0],f=i[e][d][0],m=i[e][d][1],g={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]]]}[e][d][h];return n.segment===g[3]||n.segment===g[2]&&p?r[e]:n.segment===g[2]&&m<f?o[e]:n.segment===g[2]&&m>=f||n.segment===g[1]&&!p?a[e]:n.segment===g[0]||n.segment===g[1]&&p?s[e]:void 0},orthogonal:function(e,n,i,r,o){var s=t,a={x:-1===s.so[0]?Math.min(n,r):Math.max(n,r),y:-1===s.so[1]?Math.min(n,r):Math.max(n,r)}[e];return{x:[[a,i],[a,o],[r,o]],y:[[i,a],[o,a],[o,r]]}[e]},opposite:function(n,r,o,s){var a=t,l={x:"y",y:"x"}[n],c={x:"height",y:"width"}[n],u=a["is"+n.toUpperCase()+"GreaterThanStubTimes2"];if(e.sourceEndpoint.elementId===e.targetEndpoint.elementId){var d=o+(1-e.sourceEndpoint.anchor[l])*e.sourceInfo[c]+i.maxStub;return{x:[[r,d],[s,d]],y:[[d,r],[d,s]]}[n]}return!u||1===a.so[m]&&r>s||-1===a.so[m]&&r<s?{x:[[r,w],[s,w]],y:[[_,r],[_,s]]}[n]:1===a.so[m]&&r<s||-1===a.so[m]&&r>s?{x:[[_,a.sy],[_,a.ty]],y:[[a.sx,w],[a.tx,w]]}[n]:void 0}}[t.anchorOrientation](t.sourceAxis,v,b,y,x);if(k)for(var P=0;P<k.length;P++)d(n,k[P][0],k[P][1],t);d(n,f[2],f[3],t),d(n,t.tx,t.ty,t),function(t,e,n){for(var r,o,s,a=null,c=0;c<e.length-1;c++){if(a=a||p(e[c]),r=p(e[c+1]),o=u(a),s=u(r),l>0&&a[4]!==r[4]){var d=Math.min(h(a),h(r)),f=Math.min(l,d/2);a[2]-=o[0]*f,a[3]-=o[1]*f,r[0]+=s[0]*f,r[1]+=s[1]*f;var m=o[1]===s[0]&&1===s[0]||o[1]===s[0]&&0===s[0]&&o[0]!==s[1]||o[1]===s[0]&&-1===s[0],g=(r[1]>a[3]?1:-1)==(r[0]>a[2]?1:-1),v=g&&m||!g&&!m?r[0]:a[2],b=g&&m||!g&&!m?a[3]:r[1];i.addSegment(t,"Straight",{x1:a[0],y1:a[1],x2:a[2],y2:a[3]}),i.addSegment(t,"Arc",{r:f,x1:a[2],y1:a[3],x2:r[0],y2:r[1],cx:v,cy:b,ac:m})}else{var y=a[2]===a[0]?0:a[2]>a[0]?n.lw/2:-n.lw/2,x=a[3]===a[1]?0:a[3]>a[1]?n.lw/2:-n.lw/2;i.addSegment(t,"Straight",{x1:a[0]-y,y1:a[1]-x,x2:a[2]+y,y2:a[3]+x})}a=r}null!=r&&i.addSegment(t,"Straight",{x1:r[0],y1:r[1],x2:r[2],y2:r[3]})}(this,n,t)}},e.extend(t.Connectors.Flowchart,t.Connectors.AbstractConnector)}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this.jsPlumb,e=this.jsPlumbUtil;t.Connectors.AbstractBezierConnector=function(e){var n,i=!1!==(e=e||{}).showLoopback,r=(e.curviness,e.margin||5),o=(e.proximityLimit,e.orientation&&"clockwise"===e.orientation),s=e.loopbackRadius||25;return this._compute=function(t,e){var a=e.sourcePos,l=e.targetPos,c=Math.abs(a[0]-l[0]),u=Math.abs(a[1]-l[1]);if(i&&e.sourceEndpoint.elementId===e.targetEndpoint.elementId){!0;var d=e.sourcePos[0],h=e.sourcePos[1]-r,p=d,f=h-s,m=p-s,g=f-s;c=2*s,u=2*s,t.points[0]=m,t.points[1]=g,t.points[2]=c,t.points[3]=u,n.addSegment(this,"Arc",{loopback:!0,x1:d-m+4,y1:h-g,startAngle:0,endAngle:2*Math.PI,r:s,ac:!o,x2:d-m-4,y2:h-g,cx:p-m,cy:f-g})}else!1,this._computeBezier(t,e,a,l,c,u)},n=t.Connectors.AbstractConnector.apply(this,arguments)},e.extend(t.Connectors.AbstractBezierConnector,t.Connectors.AbstractConnector);var n=function(e){e=e||{},this.type="Bezier";var n=t.Connectors.AbstractBezierConnector.apply(this,arguments),i=e.curviness||150;this.getCurviness=function(){return i},this._findControlPoint=function(t,e,n,r,o,s,a){var l=[];return s[0]!==a[0]||s[1]===a[1]?(0===a[0]?l.push(n[0]<e[0]?t[0]+10:t[0]-10):l.push(t[0]+i*a[0]),0===a[1]?l.push(n[1]<e[1]?t[1]+10:t[1]-10):l.push(t[1]+i*s[1])):(0===s[0]?l.push(e[0]<n[0]?t[0]+10:t[0]-10):l.push(t[0]-i*s[0]),0===s[1]?l.push(e[1]<n[1]?t[1]+10:t[1]-10):l.push(t[1]+i*a[1])),l},this._computeBezier=function(t,e,i,r,o,s){var a,l,c=i[0]<r[0]?o:0,u=i[1]<r[1]?s:0,d=i[0]<r[0]?0:o,h=i[1]<r[1]?0:s;a=this._findControlPoint([c,u],i,r,e.sourceEndpoint,e.targetEndpoint,t.so,t.to),l=this._findControlPoint([d,h],r,i,e.targetEndpoint,e.sourceEndpoint,t.to,t.so),n.addSegment(this,"Bezier",{x1:c,y1:u,x2:d,y2:h,cp1x:a[0],cp1y:a[1],cp2x:l[0],cp2y:l[1]})}};t.Connectors.Bezier=n,e.extend(n,t.Connectors.AbstractBezierConnector)}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this.jsPlumb,e=this.jsPlumbUtil,n=function(e){e=e||{},this.type="StateMachine";var n,i=t.Connectors.AbstractBezierConnector.apply(this,arguments),r=e.curviness||10,o=e.margin||5,s=e.proximityLimit||80;e.orientation&&e.orientation;this._computeBezier=function(t,e,a,l,c,u){var d=e.sourcePos[0]<e.targetPos[0]?0:c,h=e.sourcePos[1]<e.targetPos[1]?0:u,p=e.sourcePos[0]<e.targetPos[0]?c:0,f=e.sourcePos[1]<e.targetPos[1]?u:0;0===e.sourcePos[2]&&(d-=o),1===e.sourcePos[2]&&(d+=o),0===e.sourcePos[3]&&(h-=o),1===e.sourcePos[3]&&(h+=o),0===e.targetPos[2]&&(p-=o),1===e.targetPos[2]&&(p+=o),0===e.targetPos[3]&&(f-=o),1===e.targetPos[3]&&(f+=o);var m,g,v,b,y,x,_,w,C=(d+p)/2,k=(h+f)/2,P=(x=h,w=f,(y=d)<=(_=p)&&w<=x?1:y<=_&&x<=w?2:_<=y&&w>=x?3:4),S=Math.sqrt(Math.pow(p-d,2)+Math.pow(f-h,2));m=(n=function(t,e,n,i,r,o,s,a,l){return a<=l?[t,e]:1===n?i[3]<=0&&r[3]>=1?[t+(i[2]<.5?-1*o:o),e]:i[2]>=1&&r[2]<=0?[t,e+(i[3]<.5?-1*s:s)]:[t+-1*o,e+-1*s]:2===n?i[3]>=1&&r[3]<=0?[t+(i[2]<.5?-1*o:o),e]:i[2]>=1&&r[2]<=0?[t,e+(i[3]<.5?-1*s:s)]:[t+o,e+-1*s]:3===n?i[3]>=1&&r[3]<=0?[t+(i[2]<.5?-1*o:o),e]:i[2]<=0&&r[2]>=1?[t,e+(i[3]<.5?-1*s:s)]:[t+-1*o,e+-1*s]:4===n?i[3]<=0&&r[3]>=1?[t+(i[2]<.5?-1*o:o),e]:i[2]<=0&&r[2]>=1?[t,e+(i[3]<.5?-1*s:s)]:[t+o,e+-1*s]:void 0}(C,k,P,e.sourcePos,e.targetPos,r,r,S,s))[0],g=n[0],v=n[1],b=n[1],i.addSegment(this,"Bezier",{x1:p,y1:f,x2:d,y2:h,cp1x:m,cp1y:v,cp2x:g,cp2y:b})}};t.Connectors.StateMachine=n,e.extend(n,t.Connectors.AbstractBezierConnector)}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this.jsPlumb,e=this.jsPlumbUtil,n=function(e){this.type="Straight";var n=t.Connectors.AbstractConnector.apply(this,arguments);this._compute=function(t,e){n.addSegment(this,"Straight",{x1:t.sx,y1:t.sy,x2:t.startStubX,y2:t.startStubY}),n.addSegment(this,"Straight",{x1:t.startStubX,y1:t.startStubY,x2:t.endStubX,y2:t.endStubY}),n.addSegment(this,"Straight",{x1:t.endStubX,y1:t.endStubY,x2:t.tx,y2:t.ty})}};t.Connectors.Straight=n,e.extend(n,t.Connectors.AbstractConnector)}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this.jsPlumb,e=this.jsPlumbUtil,n={"stroke-linejoin":"stroke-linejoin","stroke-dashoffset":"stroke-dashoffset","stroke-linecap":"stroke-linecap"},i="http://www.w3.org/2000/svg",r=function(t,e){for(var n in e)t.setAttribute(n,""+e[n])},o=function(e,n){return(n=n||{}).version="1.1",n.xmlns=i,t.createElementNS(i,e,null,null,n)},s=function(t){return"position:absolute;left:"+t[0]+"px;top:"+t[1]+"px"},a=function(t){for(var e=t.querySelectorAll(" defs,linearGradient,radialGradient"),n=0;n<e.length;n++)e[n].parentNode.removeChild(e[n])},l=function(t,e,i,r,s){if(e.setAttribute("fill",i.fill?i.fill:"none"),e.setAttribute("stroke",i.stroke?i.stroke:"none"),i.gradient?function(t,e,n,i,r){var s,l="jsplumb_gradient_"+r._jsPlumb.instance.idstamp();a(t),s=n.gradient.offset?o("radialGradient",{id:l}):o("linearGradient",{id:l,gradientUnits:"userSpaceOnUse"});var c=o("defs");t.appendChild(c),c.appendChild(s);for(var u=0;u<n.gradient.stops.length;u++){var d=1===r.segment||2===r.segment?u:n.gradient.stops.length-1-u,h=n.gradient.stops[d][1],p=o("stop",{offset:Math.floor(100*n.gradient.stops[u][0])+"%","stop-color":h});s.appendChild(p)}var f=n.stroke?"stroke":"fill";e.setAttribute(f,"url(#"+l+")")}(t,e,i,0,s):(a(t),e.setAttribute("style","")),i.strokeWidth&&e.setAttribute("stroke-width",i.strokeWidth),i.dashstyle&&i.strokeWidth&&!i["stroke-dasharray"]){var l=-1===i.dashstyle.indexOf(",")?" ":",",c="";i.dashstyle.split(l).forEach(function(t){c+=Math.floor(t*i.strokeWidth)+l}),e.setAttribute("stroke-dasharray",c)}else i["stroke-dasharray"]&&e.setAttribute("stroke-dasharray",i["stroke-dasharray"]);for(var u in n)i[u]&&e.setAttribute(n[u],i[u])},c=function(t,e,n){t.childNodes.length>n?t.insertBefore(e,t.childNodes[n]):t.appendChild(e)};e.svg={node:o,attr:r,pos:s};var u=function(n){var i=n.pointerEventsSpec||"all",a={};t.jsPlumbUIComponent.apply(this,n.originalArgs),this.canvas=null,this.path=null,this.svg=null,this.bgCanvas=null;var l=n.cssClass+" "+(n.originalArgs[0].cssClass||""),c={style:"",width:0,height:0,"pointer-events":i,position:"absolute"};this.svg=o("svg",c),n.useDivWrapper?(this.canvas=t.createElement("div",{position:"absolute"}),e.sizeElement(this.canvas,0,0,1,1),this.canvas.className=l):(r(this.svg,{class:l}),this.canvas=this.svg),n._jsPlumb.appendElement(this.canvas,n.originalArgs[0].parent),n.useDivWrapper&&this.canvas.appendChild(this.svg);var u=[this.canvas];return this.getDisplayElements=function(){return u},this.appendDisplayElement=function(t){u.push(t)},this.paint=function(t,i,o){if(null!=t){var l,c=[this.x,this.y],u=[this.w,this.h];null!=o&&(o.xmin<0&&(c[0]+=o.xmin),o.ymin<0&&(c[1]+=o.ymin),u[0]=o.xmax+(o.xmin<0?-o.xmin:0),u[1]=o.ymax+(o.ymin<0?-o.ymin:0)),n.useDivWrapper?(e.sizeElement(this.canvas,c[0],c[1],u[0],u[1]),c[0]=0,c[1]=0,l=s([0,0])):l=s([c[0],c[1]]),a.paint.apply(this,arguments),r(this.svg,{style:l,width:u[0]||0,height:u[1]||0})}},{renderer:a}};e.extend(u,t.jsPlumbUIComponent,{cleanup:function(t){t||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(t){var e=t.getContainer();this.canvas&&null==this.canvas.parentNode&&e.appendChild(this.canvas),this.bgCanvas&&null==this.bgCanvas.parentNode&&e.appendChild(this.bgCanvas)},setVisible:function(t){this.canvas&&(this.canvas.style.display=t?"block":"none")}}),t.ConnectorRenderers.svg=function(e){var n=this;u.apply(this,[{cssClass:e._jsPlumb.connectorClass,originalArgs:arguments,pointerEventsSpec:"none",_jsPlumb:e._jsPlumb}]).renderer.paint=function(i,s,a){var u=n.getSegments(),d=[0,0];if(a.xmin<0&&(d[0]=-a.xmin),a.ymin<0&&(d[1]=-a.ymin),u.length>0){var h={d:n.getPathData(),transform:"translate("+d[0]+","+d[1]+")","pointer-events":e["pointer-events"]||"visibleStroke"},p=null;n.x,n.y,n.w,n.h;if(i.outlineStroke){var f=i.outlineWidth||1,m=i.strokeWidth+2*f;delete(p=t.extend({},i)).gradient,p.stroke=i.outlineStroke,p.strokeWidth=m,null==n.bgPath?(n.bgPath=o("path",h),t.addClass(n.bgPath,t.connectorOutlineClass),c(n.svg,n.bgPath,0)):r(n.bgPath,h),l(n.svg,n.bgPath,p,0,n)}null==n.path?(n.path=o("path",h),c(n.svg,n.path,i.outlineStroke?1:0)):r(n.path,h),l(n.svg,n.path,i,0,n)}}},e.extend(t.ConnectorRenderers.svg,u);var d=t.SvgEndpoint=function(e){u.apply(this,[{cssClass:e._jsPlumb.endpointClass,originalArgs:arguments,pointerEventsSpec:"all",useDivWrapper:!0,_jsPlumb:e._jsPlumb}]).renderer.paint=function(e){var n=t.extend({},e);n.outlineStroke&&(n.stroke=n.outlineStroke),null==this.node?(this.node=this.makeNode(n),this.svg.appendChild(this.node)):null!=this.updateNode&&this.updateNode(this.node),l(this.svg,this.node,n,(this.x,this.y,this.w,this.h),this),s(this.node,(this.x,this.y))}.bind(this)};e.extend(d,u),t.Endpoints.svg.Dot=function(){t.Endpoints.Dot.apply(this,arguments),d.apply(this,arguments),this.makeNode=function(t){return o("circle",{cx:this.w/2,cy:this.h/2,r:this.radius})},this.updateNode=function(t){r(t,{cx:this.w/2,cy:this.h/2,r:this.radius})}},e.extend(t.Endpoints.svg.Dot,[t.Endpoints.Dot,d]),t.Endpoints.svg.Rectangle=function(){t.Endpoints.Rectangle.apply(this,arguments),d.apply(this,arguments),this.makeNode=function(t){return o("rect",{width:this.w,height:this.h})},this.updateNode=function(t){r(t,{width:this.w,height:this.h})}},e.extend(t.Endpoints.svg.Rectangle,[t.Endpoints.Rectangle,d]),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 h=function(e,n){e.apply(this,n),t.jsPlumbUIComponent.apply(this,n),this.isAppendedAtTopLevel=!1;this.path=null,this.paint=function(t,e){if(t.component.svg&&e){null==this.path&&(this.path=o("path",{"pointer-events":"all"}),t.component.svg.appendChild(this.path),this.elementCreated&&this.elementCreated(this.path,t.component),this.canvas=t.component.svg);var s=n&&1===n.length&&n[0].cssClass||"",a=[0,0];e.xmin<0&&(a[0]=-e.xmin),e.ymin<0&&(a[1]=-e.ymin),r(this.path,{d:i(t.d),class:s,stroke:t.stroke?t.stroke:null,fill:t.fill?t.fill:null,transform:"translate("+a[0]+","+a[1]+")"})}};var i=function(t){return isNaN(t.cxy.x)||isNaN(t.cxy.y)?"":"M"+t.hxy.x+","+t.hxy.y+" L"+t.tail[0].x+","+t.tail[0].y+" L"+t.cxy.x+","+t.cxy.y+" L"+t.tail[1].x+","+t.tail[1].y+" L"+t.hxy.x+","+t.hxy.y};this.transfer=function(t){t.canvas&&this.path&&this.path.parentNode&&(this.path.parentNode.removeChild(this.path),t.canvas.appendChild(this.path))}};e.extend(h,[t.jsPlumbUIComponent,t.Overlays.AbstractOverlay],{cleanup:function(t){null!=this.path&&(t?this._jsPlumb.instance.removeElement(this.path):this.path.parentNode&&this.path.parentNode.removeChild(this.path))},reattach:function(t,e){this.path&&e.canvas&&e.canvas.appendChild(this.path)},setVisible:function(t){null!=this.path&&(this.path.style.display=t?"block":"none")}}),t.Overlays.svg.Arrow=function(){h.apply(this,[t.Overlays.Arrow,arguments])},e.extend(t.Overlays.svg.Arrow,[t.Overlays.Arrow,h]),t.Overlays.svg.PlainArrow=function(){h.apply(this,[t.Overlays.PlainArrow,arguments])},e.extend(t.Overlays.svg.PlainArrow,[t.Overlays.PlainArrow,h]),t.Overlays.svg.Diamond=function(){h.apply(this,[t.Overlays.Diamond,arguments])},e.extend(t.Overlays.svg.Diamond,[t.Overlays.Diamond,h]),t.Overlays.svg.GuideLines=function(){var e,n,i=null,s=this;t.Overlays.GuideLines.apply(this,arguments),this.paint=function(t,l){null==i&&(i=o("path"),t.connector.svg.appendChild(i),s.attachListeners(i,t.connector),s.attachListeners(i,s),e=o("path"),t.connector.svg.appendChild(e),s.attachListeners(e,t.connector),s.attachListeners(e,s),n=o("path"),t.connector.svg.appendChild(n),s.attachListeners(n,t.connector),s.attachListeners(n,s));var c=[0,0];l.xmin<0&&(c[0]=-l.xmin),l.ymin<0&&(c[1]=-l.ymin),r(i,{d:a(t.head,t.tail),stroke:"red",fill:null,transform:"translate("+c[0]+","+c[1]+")"}),r(e,{d:a(t.tailLine[0],t.tailLine[1]),stroke:"blue",fill:null,transform:"translate("+c[0]+","+c[1]+")"}),r(n,{d:a(t.headLine[0],t.headLine[1]),stroke:"green",fill:null,transform:"translate("+c[0]+","+c[1]+")"})};var a=function(t,e){return"M "+t.x+","+t.y+" L"+e.x+","+e.y}},e.extend(t.Overlays.svg.GuideLines,t.Overlays.GuideLines)}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this,e=t.jsPlumb,n=t.jsPlumbUtil,i=t.Katavorio,r=t.Biltong,o=function(t,n){var o="_katavorio_"+(n=n||"main"),s=t[o],a=t.getEventManager();return s||((s=new i({bind:a.on,unbind:a.off,getSize:e.getSize,getConstrainingRectangle:function(t){return[t.parentNode.scrollWidth,t.parentNode.scrollHeight]},getPosition:function(e,n){var i=t.getOffset(e,n,e._katavorioDrag?e.offsetParent:null);return[i.left,i.top]},setPosition:function(t,e){t.style.left=e[0]+"px",t.style.top=e[1]+"px"},addClass:e.addClass,removeClass:e.removeClass,intersects:r.intersects,indexOf:function(t,e){return t.indexOf(e)},scope:t.getDefaultScope(),css:{noSelect:t.dragSelectClass,droppable:"jtk-droppable",draggable:"jtk-draggable",drag:"jtk-drag",selected:"jtk-drag-selected",active:"jtk-drag-active",hover:"jtk-drag-hover",ghostProxy:"jtk-ghost-proxy"}})).setZoom(t.getZoom()),t[o]=s,t.bind("zoom",s.setZoom)),s},s=function(t,e){if(null==e)return[0,0];var n=d(e),i=u(n,0);return[i[t+"X"],i[t+"Y"]]},a=s.bind(this,"page"),l=s.bind(this,"screen"),c=s.bind(this,"client"),u=function(t,e){return t.item?t.item(e):t[e]},d=function(t){return t.touches&&t.touches.length>0?t.touches:t.changedTouches&&t.changedTouches.length>0?t.changedTouches:t.targetTouches&&t.targetTouches.length>0?t.targetTouches:[t]},h=function(t,e,i){e=n.fastTrim(e),void 0!==t.className.baseVal?t.className.baseVal=e:t.className=e;try{var r=t.classList;if(null!=r){for(;r.length>0;)r.remove(r.item(0));for(var o=0;o<i.length;o++)i[o]&&r.add(i[o])}}catch(t){n.log("JSPLUMB: cannot set class list",t)}},p=function(t){return void 0===t.className.baseVal?t.className:t.className.baseVal},f=function(t,e,i){e=null==e?[]:n.isArray(e)?e:e.split(/\s+/),i=null==i?[]:n.isArray(i)?i:i.split(/\s+/);var r=p(t).split(/\s+/),o=function(t,e){for(var n=0;n<e.length;n++)if(t)-1===r.indexOf(e[n])&&r.push(e[n]);else{var i=r.indexOf(e[n]);-1!==i&&r.splice(i,1)}};o(!0,e),o(!1,i),h(t,r.join(" "),r)};t.jsPlumb.extend(t.jsPlumbInstance.prototype,{headless:!1,pageLocation:a,screenLocation:l,clientLocation:c,getDragManager:function(){return null==this.dragManager&&(this.dragManager=new function(t){var e={},n=[],i={},r={},o={};this.register=function(s){var a,l=t.getId(s);e[l]||(e[l]=s,n.push(s),i[l]={});var c=function(e){if(e)for(var n=0;n<e.childNodes.length;n++)if(3!==e.childNodes[n].nodeType&&8!==e.childNodes[n].nodeType){var u=jsPlumb.getElement(e.childNodes[n]),d=t.getId(e.childNodes[n],null,!0);if(d&&r[d]&&r[d]>0){a||(a=t.getOffset(s));var h=t.getOffset(u);i[l][d]={id:d,offset:{left:h.left-a.left,top:h.top-a.top}},o[d]=l}c(e.childNodes[n])}};c(s)},this.updateOffsets=function(e,n){if(null!=e){n=n||{};var r,s=jsPlumb.getElement(e),a=t.getId(s),l=i[a];if(l)for(var c in l)if(l.hasOwnProperty(c)){var u=jsPlumb.getElement(c),d=n[c]||t.getOffset(u);if(null==u.offsetParent&&null!=i[a][c])continue;r||(r=t.getOffset(s)),i[a][c]={id:c,offset:{left:d.left-r.left,top:d.top-r.top}},o[c]=a}}},this.endpointAdded=function(n,s){s=s||t.getId(n);var a=document.body,l=n.parentNode;for(r[s]=r[s]?r[s]+1:1;null!=l&&l!==a;){var c=t.getId(l,null,!0);if(c&&e[c]){var u=t.getOffset(l);if(null==i[c][s]){var d=t.getOffset(n);i[c][s]={id:s,offset:{left:d.left-u.left,top:d.top-u.top}},o[s]=c}break}l=l.parentNode}},this.endpointDeleted=function(t){if(r[t.elementId]&&(r[t.elementId]--,r[t.elementId]<=0))for(var e in i)i.hasOwnProperty(e)&&i[e]&&(delete i[e][t.elementId],delete o[t.elementId])},this.changeId=function(t,e){i[e]=i[t],i[t]={},o[e]=o[t],o[t]=null},this.getElementsForDraggable=function(t){return i[t]},this.elementRemoved=function(t){var e=o[t];e&&(delete i[e][t],delete o[t])},this.reset=function(){e={},n=[],i={},r={}},this.dragEnded=function(e){if(null!=e.offsetParent){var n=t.getId(e),i=o[n];i&&this.updateOffsets(i)}},this.setParent=function(e,n,r,s,a){var l=o[n];i[s]||(i[s]={});var c=t.getOffset(r),u=a||t.getOffset(e);l&&i[l]&&delete i[l][n],i[s][n]={id:n,offset:{left:u.left-c.left,top:u.top-c.top}},o[n]=s},this.clearParent=function(t,e){var n=o[e];n&&(delete i[n][e],delete o[e])},this.revalidateParent=function(e,n,i){var r=o[n];if(r){var s={};s[n]=i,this.updateOffsets(r,s),t.revalidate(r)}},this.getDragAncestor=function(e){var n=jsPlumb.getElement(e),i=t.getId(n),r=o[i];return r?jsPlumb.getElement(r):null}}(this)),this.dragManager},recalculateOffsets:function(t){this.getDragManager().updateOffsets(t)},createElement:function(t,e,n,i){return this.createElementNS(null,t,e,n,i)},createElementNS:function(t,e,n,i,r){var o,s=null==t?document.createElement(e):document.createElementNS(t,e);for(o in n=n||{})s.style[o]=n[o];for(o in i&&(s.className=i),r=r||{})s.setAttribute(o,""+r[o]);return s},getAttribute:function(t,e){return null!=t.getAttribute?t.getAttribute(e):null},setAttribute:function(t,e,n){null!=t.setAttribute&&t.setAttribute(e,n)},setAttributes:function(t,e){for(var n in e)e.hasOwnProperty(n)&&t.setAttribute(n,e[n])},appendToRoot:function(t){document.body.appendChild(t)},getRenderModes:function(){return["svg"]},getClass:p,addClass:function(t,e){jsPlumb.each(t,function(t){f(t,e)})},hasClass:function(t,e){return(t=jsPlumb.getElement(t)).classList?t.classList.contains(e):-1!==p(t).indexOf(e)},removeClass:function(t,e){jsPlumb.each(t,function(t){f(t,null,e)})},toggleClass:function(t,e){jsPlumb.hasClass(t,e)?jsPlumb.removeClass(t,e):jsPlumb.addClass(t,e)},updateClasses:function(t,e,n){jsPlumb.each(t,function(t){f(t,e,n)})},setClass:function(t,e){null!=e&&jsPlumb.each(t,function(t){h(t,e,e.split(/\s+/))})},setPosition:function(t,e){t.style.left=e.left+"px",t.style.top=e.top+"px"},getPosition:function(t){var e=function(e){var n=t.style[e];return n?n.substring(0,n.length-2):0};return{left:e("left"),top:e("top")}},getStyle:function(t,e){return void 0!==window.getComputedStyle?getComputedStyle(t,null).getPropertyValue(e):t.currentStyle[e]},getSelector:function(t,e){return 1===arguments.length?null!=t.nodeType?t:document.querySelectorAll(t):t.querySelectorAll(e)},getOffset:function(t,e,n){t=jsPlumb.getElement(t),n=n||this.getContainer();for(var i={left:t.offsetLeft,top:t.offsetTop},r=e||null!=n&&t!==n&&t.offsetParent!==n?t.offsetParent:null,o=function(t){null!=t&&t!==document.body&&(t.scrollTop>0||t.scrollLeft>0)&&(i.left-=t.scrollLeft,i.top-=t.scrollTop)}.bind(this);null!=r;)i.left+=r.offsetLeft,i.top+=r.offsetTop,o(r),r=e?r.offsetParent:r.offsetParent===n?null:r.offsetParent;if(null!=n&&!e&&(n.scrollTop>0||n.scrollLeft>0)){var s=null!=t.offsetParent?this.getStyle(t.offsetParent,"position"):"static",a=this.getStyle(t,"position");"absolute"!==a&&"fixed"!==a&&"absolute"!==s&&"fixed"!==s&&(i.left-=n.scrollLeft,i.top-=n.scrollTop)}return i},getPositionOnElement:function(t,e,n){var i=void 0!==e.getBoundingClientRect?e.getBoundingClientRect():{left:0,top:0,width:0,height:0},r=document.body,o=document.documentElement,s=window.pageYOffset||o.scrollTop||r.scrollTop,a=window.pageXOffset||o.scrollLeft||r.scrollLeft,l=o.clientTop||r.clientTop||0,c=o.clientLeft||r.clientLeft||0,u=i.top+s-l+0*n,d=i.left+a-c+0*n,h=jsPlumb.pageLocation(t),p=i.width||e.offsetWidth*n,f=i.height||e.offsetHeight*n;return[(h[0]-d)/p,(h[1]-u)/f]},getAbsolutePosition:function(t){var e=function(e){var n=t.style[e];if(n)return parseFloat(n.substring(0,n.length-2))};return[e("left"),e("top")]},setAbsolutePosition:function(t,e,n,i){n?this.animate(t,{left:"+="+(e[0]-n[0]),top:"+="+(e[1]-n[1])},i):(t.style.left=e[0]+"px",t.style.top=e[1]+"px")},getSize:function(t){return[t.offsetWidth,t.offsetHeight]},getWidth:function(t){return t.offsetWidth},getHeight:function(t){return t.offsetHeight},getRenderMode:function(){return"svg"},draggable:function(t,e){var i;return t=n.isArray(t)||null!=t.length&&!n.isString(t)?t:[t],Array.prototype.slice.call(t).forEach(function(t){(i=this.info(t)).el&&this._initDraggableIfNecessary(i.el,!0,e,i.id,!0)}.bind(this)),this},initDraggable:function(t,e,n){o(this,n).draggable(t,e),t._jsPlumbDragOptions=e},destroyDraggable:function(t,e){o(this,e).destroyDraggable(t),delete t._jsPlumbDragOptions},unbindDraggable:function(t,e,n,i){o(this,i).destroyDraggable(t,e,n)},setDraggable:function(t,e){return jsPlumb.each(t,function(t){this.isDragSupported(t)&&(this._draggableStates[this.getAttribute(t,"id")]=e,this.setElementDraggable(t,e))}.bind(this))},_draggableStates:{},toggleDraggable:function(t){var e;return jsPlumb.each(t,function(t){var n=this.getAttribute(t,"id");return e=!(e=null!=this._draggableStates[n]&&this._draggableStates[n]),this._draggableStates[n]=e,this.setDraggable(t,e),e}.bind(this)),e},_initDraggableIfNecessary:function(t,e,i,r,o){if(!jsPlumb.headless&&(null!=e&&e&&jsPlumb.isDragSupported(t,this))){var s=i||this.Defaults.DragOptions;if(s=jsPlumb.extend({},s),jsPlumb.isAlreadyDraggable(t,this))i.force&&this.initDraggable(t,s);else{var a=jsPlumb.dragEvents.drag,l=jsPlumb.dragEvents.stop,c=jsPlumb.dragEvents.start;this.manage(r,t),s[c]=n.wrap(s[c],function(t){var e=t.el._jsPlumbDragOptions,n=!0;return e.canDrag&&(n=e.canDrag()),n&&(this.setHoverSuspended(!0),this.select({source:t.el}).addClass(this.elementDraggingClass+" "+this.sourceElementDraggingClass,!0),this.select({target:t.el}).addClass(this.elementDraggingClass+" "+this.targetElementDraggingClass,!0),this.setConnectionBeingDragged(!0)),n}.bind(this)),s[a]=n.wrap(s[a],function(t){var e=this.getUIPosition(arguments,this.getZoom());if(null!=e){var n=t.el._jsPlumbDragOptions;this.draw(t.el,e,null,!0),n._dragging&&this.addClass(t.el,"jtk-dragged"),n._dragging=!0}}.bind(this)),s[l]=n.wrap(s[l],function(t){for(var e,n=t.selection,i=function(t){null!=t[1]&&(e=this.getUIPosition([{el:t[2].el,pos:[t[1].left,t[1].top]}]),this.draw(t[2].el,e)),delete t[0]._jsPlumbDragOptions._dragging,this.removeClass(t[0],"jtk-dragged"),this.select({source:t[2].el}).removeClass(this.elementDraggingClass+" "+this.sourceElementDraggingClass,!0),this.select({target:t[2].el}).removeClass(this.elementDraggingClass+" "+this.targetElementDraggingClass,!0),this.getDragManager().dragEnded(t[2].el)}.bind(this),r=0;r<n.length;r++)i(n[r]);this.setHoverSuspended(!1),this.setConnectionBeingDragged(!1)}.bind(this));var u=this.getId(t);this._draggableStates[u]=!0;var d=this._draggableStates[u];s.disabled=null!=d&&!d,this.initDraggable(t,s),this.getDragManager().register(t),o&&this.fire("elementDraggable",{el:t,options:s})}}},animationSupported:!0,getElement:function(t){return null==t?null:"string"==typeof(t="string"==typeof t?t:null!=t.length&&null==t.enctype?t[0]:t)?document.getElementById(t):t},removeElement:function(t){o(this).elementRemoved(t),this.getEventManager().remove(t)},doAnimate:function(t,i,r){r=r||{};var o=this.getOffset(t),s=function(t,e){var i=function(i){if(null!=e[i]){if(n.isString(e[i])){var r=e[i].match(/-=/)?-1:1,o=e[i].substring(2);return t[i]+r*o}return e[i]}return t[i]};return[i("left"),i("top")]}(o,i),a=s[0]-o.left,l=s[1]-o.top,c=r.duration||250,u=c/15,d=15/c*a,h=15/c*l,p=0,f=setInterval(function(){e.setPosition(t,{left:o.left+d*(p+1),top:o.top+h*(p+1)}),null!=r.step&&r.step(p,Math.ceil(u)),++p>=u&&(window.clearInterval(f),null!=r.complete&&r.complete())},15)},destroyDroppable:function(t,e){o(this,e).destroyDroppable(t)},unbindDroppable:function(t,e,n,i){o(this,i).destroyDroppable(t,e,n)},droppable:function(t,e){var i;return t=n.isArray(t)||null!=t.length&&!n.isString(t)?t:[t],(e=e||{}).allowLoopback=!1,Array.prototype.slice.call(t).forEach(function(t){(i=this.info(t)).el&&this.initDroppable(i.el,e)}.bind(this)),this},initDroppable:function(t,e,n){o(this,n).droppable(t,e)},isAlreadyDraggable:function(t){return null!=t._katavorioDrag},isDragSupported:function(t,e){return!0},isDropSupported:function(t,e){return!0},isElementDraggable:function(t){return(t=e.getElement(t))._katavorioDrag&&t._katavorioDrag.isEnabled()},getDragObject:function(t){return t[0].drag.getDragElement()},getDragScope:function(t){return t._katavorioDrag&&t._katavorioDrag.scopes.join(" ")||""},getDropEvent:function(t){return t[0].e},getUIPosition:function(t,e){var n=t[0].el;if(null==n.offsetParent)return null;var i=t[0].finalPos||t[0].pos,r={left:i[0],top:i[1]};if(n._katavorioDrag&&n.offsetParent!==this.getContainer()){var o=this.getOffset(n.offsetParent);r.left+=o.left,r.top+=o.top}return r},setDragFilter:function(t,e,n){t._katavorioDrag&&t._katavorioDrag.setFilter(e,n)},setElementDraggable:function(t,n){(t=e.getElement(t))._katavorioDrag&&t._katavorioDrag.setEnabled(n)},setDragScope:function(t,e){t._katavorioDrag&&t._katavorioDrag.k.setDragScope(t,e)},setDropScope:function(t,e){t._katavorioDrop&&t._katavorioDrop.length>0&&t._katavorioDrop[0].k.setDropScope(t,e)},addToPosse:function(t,n){var i=Array.prototype.slice.call(arguments,1),r=o(this);e.each(t,function(t){(t=[e.getElement(t)]).push.apply(t,i),r.addToPosse.apply(r,t)})},setPosse:function(t,n){var i=Array.prototype.slice.call(arguments,1),r=o(this);e.each(t,function(t){(t=[e.getElement(t)]).push.apply(t,i),r.setPosse.apply(r,t)})},removeFromPosse:function(t,n){var i=Array.prototype.slice.call(arguments,1),r=o(this);e.each(t,function(t){(t=[e.getElement(t)]).push.apply(t,i),r.removeFromPosse.apply(r,t)})},removeFromAllPosses:function(t){var n=o(this);e.each(t,function(t){n.removeFromAllPosses(e.getElement(t))})},setPosseState:function(t,n,i){var r=o(this);e.each(t,function(t){r.setPosseState(e.getElement(t),n,i)})},dragEvents:{start:"start",stop:"stop",drag:"drag",step:"step",over:"over",out:"out",drop:"drop",complete:"complete",beforeStart:"beforeStart"},animEvents:{step:"step",complete:"complete"},stopDrag:function(t){t._katavorioDrag&&t._katavorioDrag.abort()},addToDragSelection:function(t){o(this).select(t)},removeFromDragSelection:function(t){o(this).deselect(t)},clearDragSelection:function(){o(this).deselectAll()},trigger:function(t,e,n,i){this.getEventManager().trigger(t,e,n,i)},doReset:function(){for(var t in this)0===t.indexOf("_katavorio_")&&this[t].reset()},getEventManager:function(){return(n=(e=this)._mottle)||(n=e._mottle=new t.Mottle),n;var e,n},on:function(t,e,n){return this.getEventManager().on.apply(this,arguments),this},off:function(t,e,n){return this.getEventManager().off.apply(this,arguments),this}});var m,g;m=e.init,(g=function(){/complete|loaded|interactive/.test(document.readyState)&&void 0!==document.body&&null!=document.body?m():setTimeout(g,9)})()}.call("undefined"!=typeof window?window:this)},722:function(t,e,n){"use strict";e.__esModule=!0,e.sqlTypeList=e.directList=e.typeList=e.dateValueList=e.cycleList=void 0;var i,r=n(36),o=(i=r)&&i.__esModule?i:{default:i};var s=[{value:"month",label:""+o.default.$t("月")},{value:"week",label:""+o.default.$t("周")},{value:"day",label:""+o.default.$t("日")},{value:"hour",label:""+o.default.$t("时")}],a={hour:[{value:"last1Hour",label:""+o.default.$t("前1小时")},{value:"last2Hours",label:""+o.default.$t("前2小时")},{value:"last3Hours",label:""+o.default.$t("前3小时")}],day:[{value:"last1Days",label:""+o.default.$t("昨天")},{value:"last2Days",label:""+o.default.$t("前两天")},{value:"last3Days",label:""+o.default.$t("前三天")},{value:"last7Days",label:""+o.default.$t("前七天")}],week:[{value:"lastWeek",label:""+o.default.$t("上周")},{value:"lastMonday",label:""+o.default.$t("上周一")},{value:"lastTuesday",label:""+o.default.$t("上周二")},{value:"lastWednesday",label:""+o.default.$t("上周三")},{value:"lastThursday",label:""+o.default.$t("上周四")},{value:"lastFriday",label:""+o.default.$t("上周五")},{value:"lastSaturday",label:""+o.default.$t("上周六")},{value:"lastSunday",label:""+o.default.$t("上周日")}],month:[{value:"lastMonth",label:""+o.default.$t("上月")},{value:"lastMonthBegin",label:""+o.default.$t("上月初")},{value:"lastMonthEnd",label:""+o.default.$t("上月末")}]},l=[{id:0,code:""+o.default.$t("查询")},{id:1,code:""+o.default.$t("非查询")}];e.cycleList=s,e.dateValueList=a,e.typeList=[{id:1,code:"VARCHAR",disabled:!1},{id:2,code:"INTEGER",disabled:!1},{id:3,code:"LONG",disabled:!1},{id:4,code:"FLOAT",disabled:!1},{id:5,code:"DOUBLE",disabled:!1},{id:6,code:"DATE",disabled:!1},{id:7,code:"TIME",disabled:!1},{id:8,code:"TIMESTAMP",disabled:!1},{id:9,code:"BOOLEAN",disabled:!1}],e.directList=[{id:1,code:"IN",disabled:!1},{id:2,code:"OUT",disabled:!1}],e.sqlTypeList=l},723:function(t,e,n){"use strict";e.__esModule=!0;var i=l(n(28)),r=l(n(36)),o=l(n(91)),s=l(n(222)),a=n(701);function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return $("body").find(".tooltip.fade.top.in").remove(),$(".textarea-ft").css({height:$(".content-log-box").height()-t+"px"})},u="";e.default={name:"log",data:function(){return{store:o.default,router:s.default,isLog:!1,stateId:$("#"+this.item.id).attr("data-state-id")||null,isScreen:!1,loadingIndex:0,isData:!0,loading:!1}},props:{item:{type:Object,default:{}},source:{type:String,default:"from"},logId:Number},methods:{_refreshLog:function(){var t=this;this.loading=!0,this.store.dispatch("dag/getLog",this._rtParam).then(function(e){setTimeout(function(){t.loading=!1,e.data?t.$message.success(""+r.default.$t("更新日志成功")):t.$message.warning(""+r.default.$t("暂无更多日志"))},1500),c().html("").text(e.data||""+r.default.$t("暂无日志"))}).catch(function(e){t.$message.error(e.msg||""),t.loading=!1})},_ckLog:function(){var t=this;this.isLog=!0,this.store.dispatch("dag/getLog",this._rtParam).then(function(e){t.$message.destroy(),e.data?(t.isData=!0,u=e.data,c().html("").text(u||""+r.default.$t("暂无日志")),setTimeout(function(){$("#textarea").scrollTop(2)},800)):(t.isData=!1,setTimeout(function(){t.$message.warning(""+r.default.$t("暂无更多日志"))},1e3),c().html("").text(u||""+r.default.$t("暂无日志")))}).catch(function(e){t.$message.error(e.msg||""),t.$message.destroy()})},_screenOpen:function(){this.isScreen=!0;var t=$(".log-box"),e=$(window).width()-40,n=$(window).height()-40;t.css({width:e,height:n,marginLeft:"-"+parseInt(e/2)+"px",marginTop:"-"+parseInt(n/2)+"px"}),t.find(".content").animate({scrollTop:0},0),c().html("").text(u)},_screenClose:function(){this.isScreen=!1;var t=$(".log-box");t.attr("style",""),t.find(".content").animate({scrollTop:0},0),c().html("").text(u)},_downloadLog:function(){(0,a.downloadFile)("/escheduler/log/download-log",{taskInstId:this.stateId||this.logId})},_onUp:i.default.debounce(function(){this.loadingIndex=this.loadingIndex-1,this._ckLog()},1e3,{leading:!1,trailing:!0}),_onDown:i.default.debounce(function(){this.loadingIndex=this.loadingIndex+1,this._ckLog()},1e3,{leading:!1,trailing:!0}),_onTextareaScroll:function(){var t=this;$("#textarea-log").scroll(function(){var e=$(this);e.scrollTop()+e.height()===e.height()&&t.loadingIndex>0&&(t.$message.loading({content:""+r.default.$t("正在努力请求日志中..."),duration:0,closable:!1}),t._onUp()),e.get(0).scrollHeight===e.height()+e.scrollTop()&&t.isData&&(t.$message.loading({content:""+r.default.$t("正在努力请求日志中..."),duration:0,closable:!1}),t._onDown())})},close:function(){$("body").find(".tooltip.fade.top.in").remove(),this.isScreen=!1,this.isLog=!1,u="",this.$emit("close")}},watch:{},created:function(){"list"===this.source&&(this.$message.loading({content:""+r.default.$t("正在努力请求日志中..."),duration:0,closable:!1}),this._ckLog())},mounted:function(){this._onTextareaScroll()},updated:function(){},computed:{_rtParam:function(){return{taskInstId:this.stateId||this.logId,skipLineNum:parseInt(""+(this.loadingIndex?this.loadingIndex+"0000":0)),limit:parseInt((this.loadingIndex?this.loadingIndex+1:1)+"0000")}}},components:{}}},724:function(t,e){},725:function(t,e,n){(function(t){"use strict";var e="CodeMirror-hint",n="CodeMirror-hint-active";function i(t,e){this.cm=t,this.options=e,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;t.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}t.showHint=function(t,e,n){if(!e)return t.showHint(n);n&&n.async&&(e.async=!0);var i={hint:e};if(n)for(var r in n)i[r]=n[r];return t.showHint(i)},t.defineExtension("showHint",function(e){e=function(t,e,n){var i=t.options.hintOptions,r={};for(var o in u)r[o]=u[o];if(i)for(var o in i)void 0!==i[o]&&(r[o]=i[o]);if(n)for(var o in n)void 0!==n[o]&&(r[o]=n[o]);r.hint.resolve&&(r.hint=r.hint.resolve(t,e));return r}(this,this.getCursor("start"),e);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!e.hint.supportsSelection)return;for(var r=0;r<n.length;r++)if(n[r].head.line!=n[r].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var o=this.state.completionActive=new i(this,e);o.options.hint&&(t.signal(this,"startCompletion",this),o.update(!0))}}),t.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});var r=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},o=window.cancelAnimationFrame||clearTimeout;function s(t){return"string"==typeof t?t:t.text}function a(t,e){for(;e&&e!=t;){if("LI"===e.nodeName.toUpperCase()&&e.parentNode==t)return e;e=e.parentNode}}function l(i,r){this.completion=i,this.data=r,this.picked=!1;var o=this,l=i.cm,c=l.getInputField().ownerDocument,u=c.defaultView||c.parentWindow,d=this.hints=c.createElement("ul"),h=i.cm.options.theme;d.className="CodeMirror-hints "+h,this.selectedHint=r.selectedHint||0;for(var p=r.list,f=0;f<p.length;++f){var m=d.appendChild(c.createElement("li")),g=p[f],v=e+(f!=this.selectedHint?"":" "+n);null!=g.className&&(v=g.className+" "+v),m.className=v,g.render?g.render(m,r,g):m.appendChild(c.createTextNode(g.displayText||s(g))),m.hintId=f}var b=l.cursorCoords(i.options.alignWithWord?r.from:null),y=b.left,x=b.bottom,_=!0;d.style.left=y+"px",d.style.top=x+"px";var w=u.innerWidth||Math.max(c.body.offsetWidth,c.documentElement.offsetWidth),C=u.innerHeight||Math.max(c.body.offsetHeight,c.documentElement.offsetHeight);(i.options.container||c.body).appendChild(d);var k=d.getBoundingClientRect(),P=k.bottom-C,S=d.scrollHeight>d.clientHeight+1,D=l.getScrollInfo();if(P>0){var L=k.bottom-k.top;if(b.top-(b.bottom-k.top)-L>0)d.style.top=(x=b.top-L)+"px",_=!1;else if(L>C){d.style.height=C-5+"px",d.style.top=(x=b.bottom-k.top)+"px";var E=l.getCursor();r.from.ch!=E.ch&&(b=l.cursorCoords(E),d.style.left=(y=b.left)+"px",k=d.getBoundingClientRect())}}var T,M=k.right-w;if(M>0&&(k.right-k.left>w&&(d.style.width=w-5+"px",M-=k.right-k.left-w),d.style.left=(y=b.left-M)+"px"),S)for(var I=d.firstChild;I;I=I.nextSibling)I.style.paddingRight=l.display.nativeBarWidth+"px";(l.addKeyMap(this.keyMap=function(t,e){var n={Up:function(){e.moveFocus(-1)},Down:function(){e.moveFocus(1)},PageUp:function(){e.moveFocus(1-e.menuSize(),!0)},PageDown:function(){e.moveFocus(e.menuSize()-1,!0)},Home:function(){e.setFocus(0)},End:function(){e.setFocus(e.length-1)},Enter:e.pick,Tab:e.pick,Esc:e.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){e.moveFocus(-1)},n["Ctrl-N"]=function(){e.moveFocus(1)});var i=t.options.customKeys,r=i?{}:n;function o(t,i){var o;o="string"!=typeof i?function(t){return i(t,e)}:n.hasOwnProperty(i)?n[i]:i,r[t]=o}if(i)for(var s in i)i.hasOwnProperty(s)&&o(s,i[s]);var a=t.options.extraKeys;if(a)for(var s in a)a.hasOwnProperty(s)&&o(s,a[s]);return r}(i,{moveFocus:function(t,e){o.changeActive(o.selectedHint+t,e)},setFocus:function(t){o.changeActive(t)},menuSize:function(){return o.screenAmount()},length:p.length,close:function(){i.close()},pick:function(){o.pick()},data:r})),i.options.closeOnUnfocus)&&(l.on("blur",this.onBlur=function(){T=setTimeout(function(){i.close()},100)}),l.on("focus",this.onFocus=function(){clearTimeout(T)}));return l.on("scroll",this.onScroll=function(){var t=l.getScrollInfo(),e=l.getWrapperElement().getBoundingClientRect(),n=x+D.top-t.top,r=n-(u.pageYOffset||(c.documentElement||c.body).scrollTop);if(_||(r+=d.offsetHeight),r<=e.top||r>=e.bottom)return i.close();d.style.top=n+"px",d.style.left=y+D.left-t.left+"px"}),t.on(d,"dblclick",function(t){var e=a(d,t.target||t.srcElement);e&&null!=e.hintId&&(o.changeActive(e.hintId),o.pick())}),t.on(d,"click",function(t){var e=a(d,t.target||t.srcElement);e&&null!=e.hintId&&(o.changeActive(e.hintId),i.options.completeOnSingleClick&&o.pick())}),t.on(d,"mousedown",function(){setTimeout(function(){l.focus()},20)}),t.signal(r,"select",p[this.selectedHint],d.childNodes[this.selectedHint]),!0}function c(t,e,n,i){if(t.async)t(e,i,n);else{var r=t(e,n);r&&r.then?r.then(i):i(r)}}i.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&t.signal(this.data,"close"),this.widget&&this.widget.close(),t.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(e,n){var i=e.list[n];i.hint?i.hint(this.cm,e,i):this.cm.replaceRange(s(i),i.from||e.from,i.to||e.to,"complete"),t.signal(e,"pick",i),this.close()},cursorActivity:function(){this.debounce&&(o(this.debounce),this.debounce=0);var t=this.cm.getCursor(),e=this.cm.getLine(t.line);if(t.line!=this.startPos.line||e.length-t.ch!=this.startLen-this.startPos.ch||t.ch<this.startPos.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(e.charAt(t.ch-1)))this.close();else{var n=this;this.debounce=r(function(){n.update()}),this.widget&&this.widget.disable()}},update:function(t){if(null!=this.tick){var e=this,n=++this.tick;c(this.options.hint,this.cm,this.options,function(i){e.tick==n&&e.finishUpdate(i,t)})}},finishUpdate:function(e,n){this.data&&t.signal(this.data,"update");var i=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=e,e&&e.list.length&&(i&&1==e.list.length?this.pick(e,0):(this.widget=new l(this,e),t.signal(e,"shown")))}},l.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(e,i){if(e>=this.data.list.length?e=i?this.data.list.length-1:0:e<0&&(e=i?0:this.data.list.length-1),this.selectedHint!=e){var r=this.hints.childNodes[this.selectedHint];r&&(r.className=r.className.replace(" "+n,"")),(r=this.hints.childNodes[this.selectedHint=e]).className+=" "+n,r.offsetTop<this.hints.scrollTop?this.hints.scrollTop=r.offsetTop-3:r.offsetTop+r.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=r.offsetTop+r.offsetHeight-this.hints.clientHeight+3),t.signal(this.data,"select",this.data.list[this.selectedHint],r)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},t.registerHelper("hint","auto",{resolve:function(e,n){var i,r=e.getHelpers(n,"hint");if(r.length){var o=function(t,e,n){var i=function(t,e){if(!t.somethingSelected())return e;for(var n=[],i=0;i<e.length;i++)e[i].supportsSelection&&n.push(e[i]);return n}(t,r);!function r(o){if(o==i.length)return e(null);c(i[o],t,n,function(t){t&&t.list.length>0?e(t):r(o+1)})}(0)};return o.async=!0,o.supportsSelection=!0,o}return(i=e.getHelper(e.getCursor(),"hintWords"))?function(e){return t.hint.fromList(e,{words:i})}:t.hint.anyword?function(e,n){return t.hint.anyword(e,n)}:function(){}}}),t.registerHelper("hint","fromList",function(e,n){var i,r=e.getCursor(),o=e.getTokenAt(r),s=t.Pos(r.line,o.start),a=r;o.start<r.ch&&/\w/.test(o.string.charAt(r.ch-o.start-1))?i=o.string.substr(0,r.ch-o.start):(i="",s=r);for(var l=[],c=0;c<n.words.length;c++){var u=n.words[c];u.slice(0,i.length)==i&&l.push(u)}if(l.length)return{list:l,from:s,to:a}}),t.commands.autocomplete=t.showHint;var u={hint:t.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};t.defineOption("hintOptions",null)})(n(644))},726:function(t,e,n){(function(t){"use strict";var e,n,i,r,o={QUERY_DIV:";",ALIAS_KEYWORD:"AS"},s=t.Pos,a=t.cmpPos;function l(t){return"[object Array]"==Object.prototype.toString.call(t)}function c(t){return"string"==typeof t?t:t.text}function u(t,e){return l(e)&&(e={columns:e}),e.text||(e.text=t),e}function d(t){return e[t.toUpperCase()]}function h(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function p(t,e){var n=t.length,i=c(e).substr(0,n);return t.toUpperCase()===i.toUpperCase()}function f(t,e,n,i){if(l(n))for(var r=0;r<n.length;r++)p(e,n[r])&&t.push(i(n[r]));else for(var o in n)if(n.hasOwnProperty(o)){var s=n[o];p(e,s=s&&!0!==s?s.displayText?{text:s.text,displayText:s.displayText}:s.text:o)&&t.push(i(s))}}function m(t){"."==t.charAt(0)&&(t=t.substr(1));for(var e=t.split(r+r),n=0;n<e.length;n++)e[n]=e[n].replace(new RegExp(r,"g"),"");return e.join(r)}function g(t){for(var e=c(t).split("."),n=0;n<e.length;n++)e[n]=r+e[n].replace(new RegExp(r,"g"),r+r)+r;var i=e.join(".");return"string"==typeof t?i:((t=h(t)).text=i,t)}function v(t,e){for(var n=t.split(/\s+/),i=0;i<n.length;i++)n[i]&&e(n[i].replace(/[,;]/g,""))}function b(t,e){for(var n=e.doc,i=n.getValue(),r=t.toUpperCase(),l="",c="",u=[],h={start:s(0,0),end:s(e.lastLine(),e.getLineHandle(e.lastLine()).length)},p=i.indexOf(o.QUERY_DIV);-1!=p;)u.push(n.posFromIndex(p)),p=i.indexOf(o.QUERY_DIV,p+1);u.unshift(s(0,0)),u.push(s(e.lastLine(),e.getLineHandle(e.lastLine()).text.length));for(var f=null,m=e.getCursor(),g=0;g<u.length;g++){if((null==f||a(m,f)>0)&&a(m,u[g])<=0){h={start:f,end:u[g]};break}f=u[g]}if(h.start){var b=n.getRange(h.start,h.end,!1);for(g=0;g<b.length;g++){if(v(b[g],function(t){var e=t.toUpperCase();e===r&&d(l)&&(c=l),e!==o.ALIAS_KEYWORD&&(l=t)}),c)break}}return c}t.registerHelper("hint","sql",function(o,a){e=function(t){var e={};if(l(t))for(var n=t.length-1;n>=0;n--){var i=t[n];e[c(i).toUpperCase()]=u(c(i),i)}else if(t)for(var r in t)e[r.toUpperCase()]=u(r,t[r]);return e}(a&&a.tables);var p=a&&a.defaultTable,v=a&&a.disableKeywords;n=p&&d(p),i=function(e){var n=e.doc.modeOption;return"sql"===n&&(n="text/x-sql"),t.resolveMode(n).keywords}(o),r=function(e){var n=e.doc.modeOption;return"sql"===n&&(n="text/x-sql"),t.resolveMode(n).identifierQuote||"`"}(o),p&&!n&&(n=b(p,o)),(n=n||[]).columns&&(n=n.columns);var y,x,_,w=o.getCursor(),C=[],k=o.getTokenAt(w);if(k.end>w.ch&&(k.end=w.ch,k.string=k.string.slice(0,w.ch-k.start)),k.string.match(/^[.`"\w@]\w*$/)?(_=k.string,y=k.start,x=k.end):(y=x=w.ch,_=""),"."==_.charAt(0)||_.charAt(0)==r)y=function(t,i,o,a){for(var l=!1,c=[],u=i.start,p=!0;p;)p="."==i.string.charAt(0),l=l||i.string.charAt(0)==r,u=i.start,c.unshift(m(i.string)),"."==(i=a.getTokenAt(s(t.line,i.start))).string&&(p=!0,i=a.getTokenAt(s(t.line,i.start)));var v=c.join(".");f(o,v,e,function(t){return l?g(t):t}),f(o,v,n,function(t){return l?g(t):t}),v=c.pop();var y=c.join("."),x=!1,_=y;if(!d(y)){var w=y;(y=b(y,a))!==w&&(x=!0)}var C=d(y);return C&&C.columns&&(C=C.columns),C&&f(o,v,C,function(t){var e=y;return 1==x&&(e=_),"string"==typeof t?t=e+"."+t:(t=h(t)).text=e+"."+t.text,l?g(t):t}),u}(w,k,C,o);else{var P=function(t,e){return"object"==typeof t?t.className=e:t={text:t,className:e},t};f(C,_,n,function(t){return P(t,"CodeMirror-hint-table CodeMirror-hint-default-table")}),f(C,_,e,function(t){return P(t,"CodeMirror-hint-table")}),v||f(C,_,i,function(t){return P(t.toUpperCase(),"CodeMirror-hint-keyword")})}return{list:C,from:s(w.line,y),to:s(w.line,x)}})})(n(644),n(683))},727:function(t,e,n){(function(t){"use strict";var e=t.Pos;function n(t,e,n){return n?t.indexOf(e)>=0:0==t.lastIndexOf(e,0)}t.registerHelper("hint","xml",function(i,r){var o=r&&r.schemaInfo,s=r&&r.quoteChar||'"',a=r&&r.matchInMiddle;if(o){var l=i.getCursor(),c=i.getTokenAt(l);c.end>l.ch&&(c.end=l.ch,c.string=c.string.slice(0,l.ch-c.start));var u=t.innerMode(i.getMode(),c.state);if("xml"==u.mode.name){var d,h,p=[],f=!1,m=/\btag\b/.test(c.type)&&!/>$/.test(c.string),g=m&&/^\w/.test(c.string);if(g){var v=i.getLine(l.line).slice(Math.max(0,c.start-2),c.start),b=/<\/$/.test(v)?"close":/<$/.test(v)?"open":null;b&&(h=c.start-("close"==b?2:1))}else m&&"<"==c.string?b="open":m&&"</"==c.string&&(b="close");if(!m&&!u.state.tagName||b){g&&(d=c.string),f=b;var y=u.state.context,x=y&&o[y.tagName],_=y?x&&x.children:o["!top"];if(_&&"close"!=b)for(var w=0;w<_.length;++w)d&&!n(_[w],d,a)||p.push("<"+_[w]);else if("close"!=b)for(var C in o)!o.hasOwnProperty(C)||"!top"==C||"!attrs"==C||d&&!n(C,d,a)||p.push("<"+C);y&&(!d||"close"==b&&n(y.tagName,d,a))&&p.push("</"+y.tagName+">")}else{var k=(x=o[u.state.tagName])&&x.attrs,P=o["!attrs"];if(!k&&!P)return;if(k){if(P){var S={};for(var D in P)P.hasOwnProperty(D)&&(S[D]=P[D]);for(var D in k)k.hasOwnProperty(D)&&(S[D]=k[D]);k=S}}else k=P;if("string"==c.type||"="==c.string){var L,E=(v=i.getRange(e(l.line,Math.max(0,l.ch-60)),e(l.line,"string"==c.type?c.start:c.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!E||!k.hasOwnProperty(E[1])||!(L=k[E[1]]))return;if("function"==typeof L&&(L=L.call(this,i)),"string"==c.type){d=c.string;var T=0;/['"]/.test(c.string.charAt(0))&&(s=c.string.charAt(0),d=c.string.slice(1),T++);var M=c.string.length;/['"]/.test(c.string.charAt(M-1))&&(s=c.string.charAt(M-1),d=c.string.substr(T,M-2)),f=!0}for(w=0;w<L.length;++w)d&&!n(L[w],d,a)||p.push(s+L[w]+s)}else for(var I in"attribute"==c.type&&(d=c.string,f=!0),k)!k.hasOwnProperty(I)||d&&!n(I,d,a)||p.push(I)}return{list:p,from:f?e(l.line,null==h?c.start:h):l,to:f?e(l.line,c.end):l}}}})})(n(644))},728:function(t,e,n){(function(t){"use strict";function e(t){return new RegExp("^(("+t.join(")|(")+"))\\b")}var n=e(["and","or","not","is"]),i=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],r=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function o(t){return t.scopes[t.scopes.length-1]}t.registerHelper("hintWords","python",i.concat(r)),t.defineMode("python",function(s,a){for(var l="error",c=a.delimiters||a.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,u=[a.singleOperators,a.doubleOperators,a.doubleDelimiters,a.tripleDelimiters,a.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@])/],d=0;d<u.length;d++)u[d]||u.splice(d--,1);var h=a.hangingIndent||s.indentUnit,p=i,f=r;void 0!=a.extra_keywords&&(p=p.concat(a.extra_keywords)),void 0!=a.extra_builtins&&(f=f.concat(a.extra_builtins));var m=!(a.version&&Number(a.version)<3);if(m){var g=a.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;p=p.concat(["nonlocal","False","True","None","async","await"]),f=f.concat(["ascii","bytes","exec","print"]);var v=new RegExp("^(([rbuf]|(br)|(fr))?('{3}|\"{3}|['\"]))","i")}else{g=a.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;p=p.concat(["exec","print"]),f=f.concat(["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"]);v=new RegExp("^(([rubf]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}var b=e(p),y=e(f);function x(t,e){var n=t.sol()&&"\\"!=e.lastToken;if(n&&(e.indent=t.indentation()),n&&"py"==o(e).type){var i=o(e).offset;if(t.eatSpace()){var r=t.indentation();return r>i?w(e):r<i&&C(t,e)&&"#"!=t.peek()&&(e.errorToken=!0),null}var s=_(t,e);return i>0&&C(t,e)&&(s+=" "+l),s}return _(t,e)}function _(t,e){if(t.eatSpace())return null;if(t.match(/^#.*/))return"comment";if(t.match(/^[0-9\.]/,!1)){var i=!1;if(t.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),t.match(/^[\d_]+\.\d*/)&&(i=!0),t.match(/^\.\d+/)&&(i=!0),i)return t.eat(/J/i),"number";var r=!1;if(t.match(/^0x[0-9a-f_]+/i)&&(r=!0),t.match(/^0b[01_]+/i)&&(r=!0),t.match(/^0o[0-7_]+/i)&&(r=!0),t.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(t.eat(/J/i),r=!0),t.match(/^0(?![\dx])/i)&&(r=!0),r)return t.eat(/L/i),"number"}if(t.match(v))return-1!==t.current().toLowerCase().indexOf("f")?(e.tokenize=function(t,e){for(;"rubf".indexOf(t.charAt(0).toLowerCase())>=0;)t=t.substr(1);var n=1==t.length,i="string";function r(t){return function(e,n){var i=_(e,n);return"punctuation"==i&&("{"==e.current()?n.tokenize=r(t+1):"}"==e.current()&&(n.tokenize=t>1?r(t-1):o)),i}}function o(o,s){for(;!o.eol();)if(o.eatWhile(/[^'"\{\}\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return i}else{if(o.match(t))return s.tokenize=e,i;if(o.match("{{"))return i;if(o.match("{",!1))return s.tokenize=r(0),o.current()?i:s.tokenize(o,s);if(o.match("}}"))return i;if(o.match("}"))return l;o.eat(/['"]/)}if(n){if(a.singleLineStringErrors)return l;s.tokenize=e}return i}return o.isString=!0,o}(t.current(),e.tokenize),e.tokenize(t,e)):(e.tokenize=function(t,e){for(;"rubf".indexOf(t.charAt(0).toLowerCase())>=0;)t=t.substr(1);var n=1==t.length,i="string";function r(r,o){for(;!r.eol();)if(r.eatWhile(/[^'"\\]/),r.eat("\\")){if(r.next(),n&&r.eol())return i}else{if(r.match(t))return o.tokenize=e,i;r.eat(/['"]/)}if(n){if(a.singleLineStringErrors)return l;o.tokenize=e}return i}return r.isString=!0,r}(t.current(),e.tokenize),e.tokenize(t,e));for(var o=0;o<u.length;o++)if(t.match(u[o]))return"operator";return t.match(c)?"punctuation":"."==e.lastToken&&t.match(g)?"property":t.match(b)||t.match(n)?"keyword":t.match(y)?"builtin":t.match(/^(self|cls)\b/)?"variable-2":t.match(g)?"def"==e.lastToken||"class"==e.lastToken?"def":"variable":(t.next(),l)}function w(t){for(;"py"!=o(t).type;)t.scopes.pop();t.scopes.push({offset:o(t).offset+s.indentUnit,type:"py",align:null})}function C(t,e){for(var n=t.indentation();e.scopes.length>1&&o(e).offset>n;){if("py"!=o(e).type)return!0;e.scopes.pop()}return o(e).offset!=n}function k(t,e){t.sol()&&(e.beginningOfLine=!0);var n=e.tokenize(t,e),i=t.current();if(e.beginningOfLine&&"@"==i)return t.match(g,!1)?"meta":m?"operator":l;if(/\S/.test(i)&&(e.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=e.lastToken||(n="meta"),"pass"!=i&&"return"!=i||(e.dedent+=1),"lambda"==i&&(e.lambda=!0),":"!=i||e.lambda||"py"!=o(e).type||w(e),1==i.length&&!/string|comment/.test(n)){var r="[({".indexOf(i);if(-1!=r&&function(t,e,n){var i=t.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:t.column()+1;e.scopes.push({offset:e.indent+h,type:n,align:i})}(t,e,"])}".slice(r,r+1)),-1!=(r="])}".indexOf(i))){if(o(e).type!=i)return l;e.indent=e.scopes.pop().offset-h}}return e.dedent>0&&t.eol()&&"py"==o(e).type&&(e.scopes.length>1&&e.scopes.pop(),e.dedent-=1),n}return{startState:function(t){return{tokenize:x,scopes:[{offset:t||0,type:"py",align:null}],indent:t||0,lastToken:null,lambda:!1,dedent:0}},token:function(t,e){var n=e.errorToken;n&&(e.errorToken=!1);var i=k(t,e);return i&&"comment"!=i&&(e.lastToken="keyword"==i||"punctuation"==i?t.current():i),"punctuation"==i&&(i=null),t.eol()&&e.lambda&&(e.lambda=!1),n?i+" "+l:i},indent:function(e,n){if(e.tokenize!=x)return e.tokenize.isString?t.Pass:0;var i=o(e),r=i.type==n.charAt(0);return null!=i.align?i.align-(r?1:0):i.offset-(r?h:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"}}),t.defineMIME("text/x-python","python");var s;t.defineMIME("text/x-cython",{name:"python",extra_keywords:(s="by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE",s.split(" "))})})(n(644))},729:function(t,e,n){(function(t){"use strict";var e={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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",function(i,r){var o,s,a=i.indentUnit,l={},c=r.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in r)l[u]=r[u];function d(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();return"<"==i?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(p("atom","]]>")):null:t.match("--")?n(p("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,i){for(var r;null!=(r=n.next());){if("<"==r)return i.tokenize=t(e+1),i.tokenize(n,i);if(">"==r){if(1==e){i.tokenize=d;break}return i.tokenize=t(e-1),i.tokenize(n,i)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=p("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",e.tokenize=h,"tag bracket"):"&"==i?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function h(t,e){var n,i,r=t.next();if(">"==r||"/"==r&&t.eat(">"))return e.tokenize=d,o=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return o="equals",null;if("<"==r){e.tokenize=d,e.state=g,e.tagName=e.tagStart=null;var s=e.tokenize(t,e);return s?s+" tag error":"tag error"}return/[\'\"]/.test(r)?(e.tokenize=(n=r,(i=function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=h;break}return"string"}).isInAttribute=!0,i),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=d;break}n.next()}return t}}function f(t){t.context&&(t.context=t.context.prev)}function m(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;f(t)}}function g(t,e,n){return"openTag"==t?(n.tagStart=e.column(),v):"closeTag"==t?b:g}function v(t,e,n){return"word"==t?(n.tagName=e.current(),s="tag",_):l.allowMissingTagName&&"endTag"==t?(s="tag bracket",_(t,e,n)):(s="error",v)}function b(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==i||!1===l.matchClosing?(s="tag",y):(s="tag error",x)}return l.allowMissingTagName&&"endTag"==t?(s="tag bracket",y(t,e,n)):(s="error",x)}function y(t,e,n){return"endTag"!=t?(s="error",y):(f(n),g)}function x(t,e,n){return s="error",y(t,0,n)}function _(t,e,n){if("word"==t)return s="attribute",w;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(i)?m(n,i):(m(n,i),n.context=new function(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}(n,i,r==n.indented)),g}return s="error",_}function w(t,e,n){return"equals"==t?C:(l.allowMissing||(s="error"),_(t,0,n))}function C(t,e,n){return"string"==t?k:"word"==t&&l.allowUnquoted?(s="string",_):(s="error",_(t,0,n))}function k(t,e,n){return"string"==t?k:_(t,0,n)}return d.isInText=!0,{startState:function(t){var e={tokenize:d,state:g,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;o=null;var n=e.tokenize(t,e);return(n||o)&&"comment"!=n&&(s=null,e.state=e.state(o||n,t,e),s&&(n="error"==s?n+" error":s)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=h&&e.tokenize!=d)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;r;){if(r.tagName==o[2]){r=r.prev;break}if(!l.implicitlyClosed.hasOwnProperty(r.tagName))break;r=r.prev}else if(o)for(;r;){var s=l.contextGrabbers[r.tagName];if(!s||!s.hasOwnProperty(o[2]))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+a:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==C&&(t.state=_)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})(n(644))},730:function(t,e,n){(function(t){"use strict";var e={addition:"positive",attributes:"attribute",bold:"strong",cite:"keyword",code:"atom",definitionList:"number",deletion:"negative",div:"punctuation",em:"em",footnote:"variable",footCite:"qualifier",header:"header",html:"comment",image:"string",italic:"em",link:"link",linkDefinition:"link",list1:"variable-2",list2:"variable-3",list3:"keyword",notextile:"string-2",pre:"operator",p:"property",quote:"bracket",span:"quote",specialChar:"tag",strong:"strong",sub:"builtin",sup:"builtin",table:"variable-3",tableHeading:"operator"};function n(t,n,o){if("_"===o)return t.eat("_")?i(t,n,"italic",/__/,2):i(t,n,"em",/_/,1);if("*"===o)return t.eat("*")?i(t,n,"bold",/\*\*/,2):i(t,n,"strong",/\*/,1);if("["===o)return t.match(/\d+\]/)&&(n.footCite=!0),r(n);if("("===o&&t.match(/^(r|tm|c)\)/))return s(n,e.specialChar);if("<"===o&&t.match(/(\w+)[^>]+>[^<]+<\/\1>/))return s(n,e.html);if("?"===o&&t.eat("?"))return i(t,n,"cite",/\?\?/,2);if("="===o&&t.eat("="))return i(t,n,"notextile",/==/,2);if("-"===o&&!t.eat("-"))return i(t,n,"deletion",/-/,1);if("+"===o)return i(t,n,"addition",/\+/,1);if("~"===o)return i(t,n,"sub",/~/,1);if("^"===o)return i(t,n,"sup",/\^/,1);if("%"===o)return i(t,n,"span",/%/,1);if("@"===o)return i(t,n,"code",/@/,1);if("!"===o){var a=i(t,n,"image",/(?:\([^\)]+\))?!/,1);return t.match(/^:\S+/),a}return r(n)}function i(t,e,n,i,o){var s=t.pos>o?t.string.charAt(t.pos-o-1):null,a=t.peek();if(e[n]){if((!a||/\W/.test(a))&&s&&/\S/.test(s)){var l=r(e);return e[n]=!1,l}}else(!s||/\W/.test(s))&&a&&/\S/.test(a)&&t.match(new RegExp("^.*\\S"+i.source+"(?:\\W|$)"),!1)&&(e[n]=!0,e.mode=u.attributes);return r(e)}function r(t){var n=o(t);if(n)return n;var i=[];return t.layoutType&&i.push(e[t.layoutType]),i=i.concat(function(t){for(var n=[],i=1;i<arguments.length;++i)t[arguments[i]]&&n.push(e[arguments[i]]);return n}(t,"addition","bold","cite","code","deletion","em","footCite","image","italic","link","span","strong","sub","sup","table","tableHeading")),"header"===t.layoutType&&i.push(e.header+"-"+t.header),i.length?i.join(" "):null}function o(t){var n=t.layoutType;switch(n){case"notextile":case"code":case"pre":return e[n];default:return t.notextile?e.notextile+(n?" "+e[n]:""):null}}function s(t,e){var n=o(t);if(n)return n;var i=r(t);return e?i?i+" "+e:e:i}function a(t){var e=t.spanningLayout,n=t.layoutType;for(var i in t)t.hasOwnProperty(i)&&delete t[i];t.mode=u.newLayout,e&&(t.layoutType=n,t.spanningLayout=!0)}var l={cache:{},single:{bc:"bc",bq:"bq",definitionList:/- .*?:=+/,definitionListEnd:/.*=:\s*$/,div:"div",drawTable:/\|.*\|/,foot:/fn\d+/,header:/h[1-6]/,html:/\s*<(?:\/)?(\w+)(?:[^>]+)?>(?:[^<]+<\/\1>)?/,link:/[^"]+":\S/,linkDefinition:/\[[^\s\]]+\]\S+/,list:/(?:#+|\*+)/,notextile:"notextile",para:"p",pre:"pre",table:"table",tableCellAttributes:/[\/\\]\d+/,tableHeading:/\|_\./,tableText:/[^"_\*\[\(\?\+~\^%@|-]+/,text:/[^!"_=\*\[\(<\?\+~\^%@-]+/},attributes:{align:/(?:<>|<|>|=)/,selector:/\([^\(][^\)]+\)/,lang:/\[[^\[\]]+\]/,pad:/(?:\(+|\)+){1,2}/,css:/\{[^\}]+\}/},createRe:function(t){switch(t){case"drawTable":return l.makeRe("^",l.single.drawTable,"$");case"html":return l.makeRe("^",l.single.html,"(?:",l.single.html,")*","$");case"linkDefinition":return l.makeRe("^",l.single.linkDefinition,"$");case"listLayout":return l.makeRe("^",l.single.list,c("allAttributes"),"*\\s+");case"tableCellAttributes":return l.makeRe("^",l.choiceRe(l.single.tableCellAttributes,c("allAttributes")),"+\\.");case"type":return l.makeRe("^",c("allTypes"));case"typeLayout":return l.makeRe("^",c("allTypes"),c("allAttributes"),"*\\.\\.?","(\\s+|$)");case"attributes":return l.makeRe("^",c("allAttributes"),"+");case"allTypes":return l.choiceRe(l.single.div,l.single.foot,l.single.header,l.single.bc,l.single.bq,l.single.notextile,l.single.pre,l.single.table,l.single.para);case"allAttributes":return l.choiceRe(l.attributes.selector,l.attributes.css,l.attributes.lang,l.attributes.align,l.attributes.pad);default:return l.makeRe("^",l.single[t])}},makeRe:function(){for(var t="",e=0;e<arguments.length;++e){var n=arguments[e];t+="string"==typeof n?n:n.source}return new RegExp(t)},choiceRe:function(){for(var t=[arguments[0]],e=1;e<arguments.length;++e)t[2*e-1]="|",t[2*e]=arguments[e];return t.unshift("(?:"),t.push(")"),l.makeRe.apply(null,t)}};function c(t){return l.cache[t]||(l.cache[t]=l.createRe(t))}var u={newLayout:function(t,e){return t.match(c("typeLayout"),!1)?(e.spanningLayout=!1,(e.mode=u.blockType)(t,e)):(o(e)||(t.match(c("listLayout"),!1)?n=u.list:t.match(c("drawTable"),!1)?n=u.table:t.match(c("linkDefinition"),!1)?n=u.linkDefinition:t.match(c("definitionList"))?n=u.definitionList:t.match(c("html"),!1)&&(n=u.html)),(e.mode=n||u.text)(t,e));var n},blockType:function(t,e){var n,i;return e.layoutType=null,(n=t.match(c("type")))?((n=(i=n[0]).match(c("header")))?(e.layoutType="header",e.header=parseInt(n[0][1])):i.match(c("bq"))?e.layoutType="quote":i.match(c("bc"))?e.layoutType="code":i.match(c("foot"))?e.layoutType="footnote":i.match(c("notextile"))?e.layoutType="notextile":i.match(c("pre"))?e.layoutType="pre":i.match(c("div"))?e.layoutType="div":i.match(c("table"))&&(e.layoutType="table"),e.mode=u.attributes,r(e)):(e.mode=u.text)(t,e)},text:function(t,e){if(t.match(c("text")))return r(e);var i=t.next();return'"'===i?(e.mode=u.link)(t,e):n(t,e,i)},attributes:function(t,n){return n.mode=u.layoutLength,t.match(c("attributes"))?s(n,e.attributes):r(n)},layoutLength:function(t,e){return t.eat(".")&&t.eat(".")&&(e.spanningLayout=!0),e.mode=u.text,r(e)},list:function(t,e){var n=t.match(c("list"));e.listDepth=n[0].length;var i=(e.listDepth-1)%3;return e.layoutType=i?1===i?"list2":"list3":"list1",e.mode=u.attributes,r(e)},link:function(t,n){return n.mode=u.text,t.match(c("link"))?(t.match(/\S+/),s(n,e.link)):r(n)},linkDefinition:function(t,n){return t.skipToEnd(),s(n,e.linkDefinition)},definitionList:function(t,e){return t.match(c("definitionList")),e.layoutType="definitionList",t.match(/\s*$/)?e.spanningLayout=!0:e.mode=u.attributes,r(e)},html:function(t,n){return t.skipToEnd(),s(n,e.html)},table:function(t,e){return e.layoutType="table",(e.mode=u.tableCell)(t,e)},tableCell:function(t,e){return t.match(c("tableHeading"))?e.tableHeading=!0:t.eat("|"),e.mode=u.tableCellAttributes,r(e)},tableCellAttributes:function(t,n){return n.mode=u.tableText,t.match(c("tableCellAttributes"))?s(n,e.attributes):r(n)},tableText:function(t,e){return t.match(c("tableText"))?r(e):"|"===t.peek()?(e.mode=u.tableCell,r(e)):n(t,e,t.next())}};t.defineMode("textile",function(){return{startState:function(){return{mode:u.newLayout}},token:function(t,e){return t.sol()&&function(t,e){e.mode=u.newLayout,e.tableHeading=!1,"definitionList"===e.layoutType&&e.spanningLayout&&t.match(c("definitionListEnd"),!1)&&(e.spanningLayout=!1)}(t,e),e.mode(t,e)},blankLine:a}}),t.defineMIME("text/x-textile","textile")})(n(644))},731:function(t,e,n){(function(t){"use strict";t.defineMode("shell",function(){var e={};function n(t,n){for(var i=0;i<n.length;i++)e[n[i]]=t}var i=["true","false"],r=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],o=["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","nl","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"];function s(t,e){var n="("==t?")":"{"==t?"}":t;return function(i,r){for(var o,u=!1;null!=(o=i.next());){if(o===n&&!u){r.tokens.shift();break}if("$"===o&&!u&&"'"!==t&&i.peek()!=n){u=!0,i.backUp(1),r.tokens.unshift(l);break}if(!u&&t!==n&&o===t)return r.tokens.unshift(s(t,e)),c(i,r);if(!u&&/['"]/.test(o)&&!/['"]/.test(t)){r.tokens.unshift(a(o,"string")),i.backUp(1);break}u=!u&&"\\"===o}return e}}function a(t,e){return function(n,i){return i.tokens[0]=s(t,e),n.next(),c(n,i)}}t.registerHelper("hintWords","shell",i.concat(r,o)),n("atom",i),n("keyword",r),n("builtin",o);var l=function(t,e){e.tokens.length>1&&t.eat("$");var n=t.next();return/['"({]/.test(n)?(e.tokens[0]=s(n,"("==n?"quote":"{"==n?"def":"string"),c(t,e)):(/\d/.test(n)||t.eatWhile(/\w/),e.tokens.shift(),"def")};function c(t,n){return(n.tokens[0]||function(t,n){if(t.eatSpace())return null;var i=t.sol(),r=t.next();if("\\"===r)return t.next(),null;if("'"===r||'"'===r||"`"===r)return n.tokens.unshift(s(r,"`"===r?"quote":"string")),c(t,n);if("#"===r)return i&&t.eat("!")?(t.skipToEnd(),"meta"):(t.skipToEnd(),"comment");if("$"===r)return n.tokens.unshift(l),c(t,n);if("+"===r||"="===r)return"operator";if("-"===r)return t.eat("-"),t.eatWhile(/\w/),"attribute";if(/\d/.test(r)&&(t.eatWhile(/\d/),t.eol()||!/\w/.test(t.peek())))return"number";t.eatWhile(/[\w-]/);var o=t.current();return"="===t.peek()&&/\w+/.test(o)?"def":e.hasOwnProperty(o)?e[o]:null})(t,n)}return{startState:function(){return{tokens:[]}},token:function(t,e){return c(t,e)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),t.defineMIME("text/x-sh","shell"),t.defineMIME("application/x-sh","shell")})(n(644))},732:function(t,e){},733:function(t,e){},734:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(685),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(739);var a=function(t){n(736)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},736:function(t,e,n){var i=n(737);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("76c18d50",i,!0,{})},737:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".email-model{width:688px}.email-model .input-element{min-height:32px;padding:1px 8px}.email-model .input-element .tag-wrapper{display:inline-block;height:22px;margin:3px 8px 3px 0;padding:0 10px;background:#ebf8ff;border-radius:2px;cursor:default}.email-model .input-element .tag-wrapper.active{background:#e2eff9}.email-model .input-element .tag-wrapper .tag-text{margin-right:8px;font-size:12px;line-height:22px;color:#666;cursor:text}.email-model .input-element .tag-wrapper .remove-tag{font-size:12px;-webkit-transform:scale(.8);-ms-transform:scale(.8);transform:scale(.8);color:#666;cursor:pointer}.email-model .input-element .tag-wrapper .remove-tag:hover{color:#000}.email-model .input-element .label-wrapper{margin-left:-6px}.email-model .input-element .label-wrapper input{height:29px;line-height:29px;border:0;padding-left:4px}.email-list-model{margin:-10px -13px}.email-list-model .ans-scroller{width:230px;overflow-y:scroll}.email-list-model .ans-scroller .default-option-class{width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-list-model .ans-option .default-option-class.active{background:#ebf8ff}",""])},738:function(t,e,n){"use strict";e.__esModule=!0,e.default=["test@analysys.com.cn"]},739:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"ans-input email-model"},[n("div",{staticClass:"clearfix input-element"},[t._l(t.activeList,function(e,i){return n("span",{staticClass:"tag-wrapper",class:t.activeIndex===i?"active":""},[n("span",{staticClass:"tag-text"},[t._v(t._s(e))]),t._v(" "),n("i",{staticClass:"remove-tag ans-icon-close",on:{click:function(e){return t._del(i)}}})])}),t._v(" "),n("x-poptip",{attrs:{placement:"bottom-start","append-to-body":!0,"visible-arrow":!1,trigger:"manual"},model:{value:t.isEmail,callback:function(e){t.isEmail=e},expression:"isEmail"}},[n("div",{staticClass:"email-list-model"},[n("div",{staticClass:"ans-scroller",staticStyle:{"max-height":"300px"}},[n("div",{staticClass:"scroll-area-wrapper scroll-transition"},[n("ul",{staticClass:"dropdown-container"},t._l(t.emailList,function(e,i){return n("li",{staticClass:"ans-option",on:{click:function(e){return t._selectEmail(i+1)}}},[n("span",{staticClass:"default-option-class",class:t.index===i+1?"active":""},[t._v(t._s(e))])])}),0)])])]),t._v(" "),n("span",{staticClass:"label-wrapper",attrs:{slot:"reference"},slot:"reference"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"}],ref:"emailInput",staticClass:"email-input",style:{width:t.emailWidth+"px"},attrs:{type:"text",placeholder:t.$t("请输入邮箱")},domProps:{value:t.email},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:t._emailTab(e)},keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:t._emailDelete(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t._emailEnter(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:t._emailKeyup("up")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:t._emailKeyup("down")}],input:function(e){e.target.composing||(t.email=e.target.value)}}})])])],2)])},staticRenderFns:[]};e.a=i},740:function(t,e,n){var i=n(741);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("d5e83532",i,!0,{})},741:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".priority-model .ans-option-listp>span{font-weight:400}.priority-model .ans-option-listp>span>.iconfont{padding-right:2px}.priority-model .ans-input .input-element{cursor:pointer;height:32px;line-height:30px;position:relative;font-weight:400}.priority-model .ans-input .input-element .ans-icon-arrow-down{position:absolute;right:8px;top:0;font-size:12px;color:#888;cursor:pointer}.priority-model .ans-input .input-element span{vertical-align:middle}.priority-model .ans-input .input-element span.label-p{margin-top:-4px;display:inline-block}",""])},742:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"priority-model"},[n("x-select",{staticStyle:{width:"130px"},attrs:{disabled:t.isDetails},on:{"on-change":t._onChange},scopedSlots:t._u([{key:"trigger",fn:function(e){var i=e.selectedModel;return n("div",{staticClass:"ans-input"},[n("div",{staticClass:"input-element",class:t.isDetails?"disabled":""},[n("span",{domProps:{innerHTML:t._s(t._rtUnicode(i?i.label:"MEDIUM"))}}),t._v(" "),n("span",{staticClass:"label-p"},[t._v(t._s(i?i.label:"MEDIUM"))]),t._v(" "),n("i",{staticClass:"ans-icon-arrow-down"})])])}}]),model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},[t._v(" "),t._l(t.priorityList,function(e){return n("x-option",{key:e.code,attrs:{value:e.code,label:e.code}},[n("li",{staticClass:"ans-option ans-option-listp"},[n("span",{staticClass:"default-option-class"},[n("i",{staticClass:"iconfont",style:{color:e.color},domProps:{innerHTML:t._s(e.unicode)}}),t._v("\n "+t._s(e.code)+"\n ")])])])})],2)],1)},staticRenderFns:[]};e.a=i},773:function(t,e,n){"use strict";e.__esModule=!0;var i=m(n(28)),r=m(n(917)),o=m(n(920)),s=m(n(36)),a=n(721),l=n(698),c=n(225),u=m(n(931)),d=n(661),h=n(125),p=m(n(642)),f=n(123);function m(t){return t&&t.__esModule?t:{default:t}}var g=void 0;e.default={name:"dag-chart",data:function(){return{tasksTypeList:c.tasksType,toolOperList:(0,c.toolOper)(this),dagBarId:null,toolOperCode:"",spinnerLoading:!1,urlParam:{id:this.$route.params.id||null},isRtTasks:!1,isRefresh:!1,isLoading:!1,taskId:null}},mixins:[p.default],props:{type:String,releaseState:String},methods:Object.assign({},(0,f.mapActions)("dag",["saveDAGchart","updateInstance","updateDefinition","getTaskState"]),(0,f.mapMutations)("dag",["addTasks","resetParams","setIsEditDag","setName"]),{init:function(){var t=this;this.tasks.length?(r.default.backfill(),"instance"===this.type&&(this._getTaskState(!1).then(function(t){}),this.setIntervalP=setInterval(function(){t._getTaskState(!0).then(function(t){})},9e4))):r.default.create()},_getTaskState:function(t){var e=this;return new Promise(function(n,r){e.getTaskState(e.urlParam.id).then(function(r){var o=r.list,a=r.processInstanceState,c=r.taskList,u=(0,l.allNodesId)();o.forEach(function(t){u.forEach(function(e){if(e.name===t.name){var n=$("#"+e.id),r=n.find(".state-p");n.attr("data-state-id",t.stateId),n.attr("data-dependent-result",t.dependentResult||""),r.html(""),r.append('<b class="iconfont '+(t.isSpin?"fa fa-spin":"")+'" style="color:'+t.color+'" data-toggle="tooltip" data-html="true" data-container="body">'+t.icoUnicode+"</b>"),r.find("b").attr("title",(o=e,a=t.desc,l=i.default.filter(c,function(t){return t.name===o.name})[0],'<div style="text-align: left">'+s.default.$t("名称")+":"+l.name+"</br>"+s.default.$t("状态")+":"+a+"</br>"+s.default.$t("类型")+":"+l.taskType+"</br>"+s.default.$t("host")+":"+(l.host||"-")+"</br>"+s.default.$t("重试次数")+":"+l.retryTimes+"</br>"+s.default.$t("提交时间")+":"+(0,d.formatDate)(l.submitTime)+"</br>"+s.default.$t("开始时间")+":"+(0,d.formatDate)(l.startTime)+"</br>"+s.default.$t("结束时间")+":"+(l.endTime?(0,d.formatDate)(l.endTime):"-")+"</br></div>"))}var o,a,l})}),"PAUSE"!==a&&"STOP"!==a&&"FAILURE"!==a&&"SUCCESS"!==e.state||t&&(0,h.findComponentDownward)(e.$root,e.type+"-details")._reset(),n()})})},_getDagId:function(t){this.isDetails||(this.dagBarId=t)},_ckOperation:function(t){var e=!0,n="";t.disable&&(this.toolOperCode===t.code?(this.toolOperCode="",n=t.code,e=!1):(this.toolOperCode=t.code,n=this.toolOperCode,e=!0),r.default.toolbarEvent({item:t,code:n,is:e}))},_operationClass:function(t){return t.disable?this.toolOperCode===t.code?"active":"":"disable"},_save:function(t){var e=this;return new Promise(function(n,i){e.spinnerLoading=!0,r.default.saveStore().then(function(r){e.urlParam.id?e["instance"===e.type?"updateInstance":"updateDefinition"](e.urlParam.id).then(function(t){e.$message.success(t.msg),e.spinnerLoading=!1,n()}).catch(function(t){e.$message.error(t.msg||""),e.spinnerLoading=!1,i(t)}):e.saveDAGchart().then(function(i){e.$message.success(i.msg),e.spinnerLoading=!1,"affirm"!==t&&e.$router.push({name:"projects-definition-list"}),n()}).catch(function(t){e.$message.error(t.msg||""),e.setName(""),e.spinnerLoading=!1,i(t)})})})},_udpTopFloorPop:function(){var t=this;return new Promise(function(e,n){var i=t.$modal.dialog({closable:!1,showMask:!0,escClose:!0,className:"v-modal-custom",transitionName:"opacityp",render:function(t){return t(o.default,{on:{onUdp:function(){i.remove(),e()},close:function(){i.remove()}}})}})})},_saveChart:function(){var t=this;this.tasks.length?this._udpTopFloorPop().then(function(){return t._save()}):this.$message.warning(""+s.default.$t("未创建节点保存失败"))},_rtNodesDag:function(){var t=this.$route.query.subProcessIds.split(","),e=t.slice(0,t.length-1),n=t[t.length-1],i={};n!==t[0]&&(i={subProcessIds:e.join(",")});var r=this.$route.name.split("-");this.$router.push({path:"/"+r[0]+"/"+r[1]+"/list/"+n,query:i})},_subProcessHandle:function(t){var e=[],n=this.$route.query.subProcessIds;if(n){var i=n.split(",");i.push(this.urlParam.id),e=i}else e.push(this.urlParam.id);var r=this.$route.name.split("-");this.$router.push({path:"/"+r[0]+"/"+r[1]+"/list/"+t,query:{subProcessIds:e.join(",")}})},_refresh:function(){var t=this;this.isRefresh=!0,this._getTaskState(!1).then(function(e){setTimeout(function(){t.isRefresh=!1,t.$message.success(""+s.default.$t("刷新状态成功"))},2200)})},_toggleView:function(){(0,h.findComponentDownward)(this.$root,"assist-dag-index")._toggleView()},_createNodes:function(t){var e=t.id,n=t.type,i=this;g&&g.remove();var r=function(t){t.$destroy(),g.remove()};this.taskId=e,g=this.$drawer({closable:!1,direction:"right",escClose:!0,render:function(t){return t(u.default,{on:{addTaskInfo:function(t){var e=t.item,n=t.fromThis;i.addTasks(e),setTimeout(function(){r(n)},100)},close:function(t){var n=t.flag,i=t.fromThis;n&&a.jsPlumb.remove(e),r(i)},onSubProcess:function(t){var e=t.subProcessId,n=t.fromThis;r(n),i._subProcessHandle(e)}},props:{id:e,taskType:n||i.dagBarId,self:i}})}})}}),watch:{tasks:{deep:!0,handler:function(){this.setIsEditDag(!0)}}},created:function(){this.setIsEditDag(!1),this.$route.query.subProcessIds&&(this.isRtTasks=!0),r.default.init({dag:this,instance:a.jsPlumb.getInstance({Endpoint:["Dot",{radius:1,cssClass:"dot-style"}],Connector:"Straight",PaintStyle:{lineWidth:2,stroke:"#456"},ConnectionOverlays:[["Arrow",{location:1,id:"arrow",length:12,foldback:.8}]],Container:"canvas"})})},mounted:function(){this.init()},beforeDestroy:function(){this.resetParams(),clearInterval(this.setIntervalP)},destroyed:function(){},computed:Object.assign({},(0,f.mapState)("dag",["tasks","locations","connects","isEditDag","name"])),components:{}}},774:function(t,e,n){"use strict";e.__esModule=!0;var i=m(n(29)),r=m(n(71)),o=m(n(28)),s=m(n(36)),a=n(721),l=m(n(918)),c=m(n(91)),u=m(n(222)),d=m(n(126)),h=n(125),p=n(698),f=m(n(798));function m(t){return t&&t.__esModule?t:{default:t}}var g=function(){this.dag={},this.selectedElement={},this.config={isDrag:!0,isAttachment:!1,isNewNodes:!0,isDblclick:!0,isContextmenu:!0,isClick:!1}};g.prototype.init=function(t){var e=this,n=t.dag,i=t.instance;this.dag=n,this.JspInstance=i,this.JspInstance.registerConnectionType("basic",{anchor:"Continuous",connector:"Straight"}),this.setConfig({isDrag:!c.default.state.dag.isDetails,isAttachment:!1,isNewNodes:!1!==d.default.getAuth()&&!c.default.state.dag.isDetails,isDblclick:!0,isContextmenu:!0,isClick:!1}),this.JspInstance.bind("click",function(t){e.config.isClick&&e.connectClick(t)}),this.config.isNewNodes&&l.default.init()},g.prototype.setConfig=function(t){this.config=Object.assign(this.config,{},t)},g.prototype.tasksEvent=function(t){var e=this,n=(0,r.default)("#"+t);n.on("contextmenu",function(t){return e.tasksContextmenu(t),!1}),n.find(".icos").bind("dblclick",function(t){e.tasksDblclick(t)}),n.on("click",function(t){e.tasksClick(t)})},g.prototype.draggable=function(){if(this.config.isNewNodes){var t=void 0,e=this;(0,r.default)(".toolbar-btn .roundedRect").draggable({scope:"plant",helper:"clone",containment:(0,r.default)(".dag-model"),stop:function(n,i){e.tasksEvent(t),(0,r.default)("#"+t).html()&&(0,h.findComponentDownward)(e.dag.$root,"dag-chart")._createNodes({id:t})},drag:function(){(0,r.default)("body").find(".tooltip.fade.top.in").remove()}}),(0,r.default)("#canvas").droppable({scope:"plant",drop:function(n,i){var o="tasks-"+Math.ceil(1e5*Math.random()),s=parseInt(i.offset.left-(0,r.default)(this).offset().left),l=parseInt(i.offset.top-(0,r.default)(this).offset().top)-10;l<25&&(l=25),(0,r.default)("#canvas").append((0,p.rtTasksTpl)({id:o,name:o,x:s,y:l,isAttachment:e.config.isAttachment,taskType:(0,h.findComponentDownward)(e.dag.$root,"dag-chart").dagBarId}));var c=a.jsPlumb.getSelector(".statemachine-demo .w");e.JspInstance.batch(function(){e.initNode(c[c.length-1])}),t=o}})}},g.prototype.jsonHandle=function(t){var e=this,n=t.largeJson,i=t.locations;o.default.map(n,function(t){(0,r.default)("#canvas").append((0,p.rtTasksTpl)({id:t.id,name:t.name,x:i[t.id].x,y:i[t.id].y,targetarr:i[t.id].targetarr,isAttachment:e.config.isAttachment,taskType:t.type,runFlag:t.runFlag})),(0,r.default)("#"+t.id).on("contextmenu",function(t){return e.tasksContextmenu(t),!1}),(0,r.default)("#"+t.id).find(".icos").bind("dblclick",function(t){e.tasksDblclick(t)}),(0,r.default)("#"+t.id).bind("click",function(t){e.tasksClick(t)})})},g.prototype.initNode=function(t){this.config.isDrag&&this.JspInstance.draggable(t,{containment:"dag-container"}),this.JspInstance.makeSource(t,{filter:".ep",anchor:"Continuous",connectorStyle:{stroke:"#555",strokeWidth:2,outlineStroke:"transparent",outlineWidth:4},extract:{action:"the-action"},maxConnections:-1}),this.JspInstance.makeTarget(t,{dropOptions:{hoverClass:"dragHover"},anchor:"Continuous",allowLoopback:!1}),this.JspInstance.fire("jsPlumbDemoNodeAdded",t)},g.prototype.tasksContextmenu=function(t){var e=this;if(this.config.isContextmenu){var n="projects-definition-details"===u.default.history.current.name&&"NOT_RELEASE"!==this.dag.releaseState,o=c.default.state.dag.isDetails,a=['<a href="javascript:" id="startRunning" class="'+(n?"":"disbled")+'"><i class="iconfont">&#xe60b;</i><span>'+s.default.$t("开始运行")+"</span></a>",'<a href="javascript:" id="editNodes" class="'+(o?"disbled":"")+'"><i class="iconfont">&#xe601;</i><span>'+s.default.$t("编辑节点")+"</span></a>",'<a href="javascript:" id="copyNodes" class="'+(o?"disbled":"")+'"><i class="iconfont">&#xe61e;</i><span>'+s.default.$t("复制节点")+"</span></a>",'<a href="javascript:" id="removeNodes" class="'+(o?"disbled":"")+'"><i class="iconfont">&#xe611;</i><span>'+s.default.$t("删除节点")+"</span></a>"],l=t,d=l.currentTarget.id,p=(0,r.default)("#contextmenu"),m=(0,r.default)("#"+d).find(".name-p").text(),g=l.pageX+document.body.scrollLeft-5,v=l.pageY+document.body.scrollTop-5;p.css({left:g,top:v,visibility:"visible"}),p.html("").append(function(){return a.splice(",")}),n&&(0,r.default)("#startRunning").on("click",function(){var t=u.default.history.current.params.id;c.default.dispatch("dag/getStartCheck",{processDefinitionId:t}).then(function(e){var n=i.default.$modal.dialog({closable:!1,showMask:!0,escClose:!0,className:"v-modal-custom",transitionName:"opacityp",render:function(e){return e(f.default,{on:{onUpdate:function(){n.remove()},close:function(){n.remove()}},props:{item:{id:t},startNodeList:m,sourceType:"contextmenu"}})}})}).catch(function(t){i.default.$message.error(t.msg||"")})}),o||((0,r.default)("#editNodes").click(function(t){(0,h.findComponentDownward)(e.dag.$root,"dag-chart")._createNodes({id:d,type:(0,r.default)("#"+d).attr("data-tasks-type")})}),(0,r.default)("#removeNodes").click(function(t){e.removeNodes(d)}),(0,r.default)("#copyNodes").click(function(t){e.copyNodes(d)}))}},g.prototype.tasksDblclick=function(t){if(this.config.isDblclick){var e=(0,r.default)(t.currentTarget.offsetParent).attr("id");(0,h.findComponentDownward)(this.dag.$root,"dag-chart")._createNodes({id:e,type:(0,r.default)("#"+e).attr("data-tasks-type")})}},g.prototype.tasksClick=function(t){var e=void 0,n=this,i=(0,r.default)("body");if(this.config.isClick){var o=this.selectedElement.connect;(0,r.default)(".w").removeClass("jtk-tasks-active"),(0,r.default)(t.currentTarget).addClass("jtk-tasks-active"),o&&((0,p.setSvgColor)(o,"#555"),this.selectedElement.connect=null),this.selectedElement.id=(0,r.default)(t.currentTarget).attr("id"),i.unbind("copy").unbind("paste"),e=n.selectedElement.id,i.bind({copy:function(){e=n.selectedElement.id},paste:function(){e&&n.copyNodes(e)}})}},g.prototype.removePaste=function(){(0,r.default)("body").unbind("copy").unbind("paste"),this.selectedElement.id=null,(0,r.default)(".w").removeClass("jtk-tasks-active")},g.prototype.connectClick=function(t){(0,p.setSvgColor)(t,"#0097e0");var e=this.selectedElement.id;e&&((0,r.default)("#"+e).removeClass("jtk-tasks-active"),this.selectedElement.id=null),this.selectedElement.connect=t},g.prototype.handleEventPointer=function(t){var e=(0,r.default)(".w");this.setConfig({isClick:t,isAttachment:!1}),e.removeClass("jtk-ep"),t||(e.removeClass("jtk-tasks-active"),this.selectedElement={},o.default.map((0,r.default)("#canvas svg"),function(t){(0,r.default)(t).attr("class")&&o.default.map((0,r.default)(t).find("path"),function(t){(0,r.default)(t).attr("fill","#555"),(0,r.default)(t).attr("stroke","#555")})}))},g.prototype.handleEventLine=function(t){var e=(0,r.default)(".w");this.setConfig({isAttachment:t}),t?e.addClass("jtk-ep"):e.removeClass("jtk-ep")},g.prototype.handleEventRemove=function(){var t=this.selectedElement.id||null,e=this.selectedElement.connect||null;t?this.removeNodes(this.selectedElement.id):this.removeConnect(e),c.default.commit("dag/setIsEditDag",!0)},g.prototype.removeNodes=function(t){o.default.map((0,p.tasksAll)(),function(e){var n=e.targetarr.split(",");if(n.length){var i=o.default.filter(n,function(e){return e!==t});(0,r.default)("#"+e.id).attr("data-targetarr",i.toString())}}),this.JspInstance.remove(t)},g.prototype.removeConnect=function(t){if(t){var e=t.targetId,n=t.sourceId,i=(0,p.rtTargetarrArr)(e);i.length&&(i=o.default.filter(i,function(t){return t!==n}),(0,r.default)("#"+e).attr("data-targetarr",i.toString())),this.JspInstance.deleteConnection(t),this.selectedElement={}}},g.prototype.copyNodes=function(t){var e,n=this,i=o.default.cloneDeep(o.default.find(c.default.state.dag.tasks,function(e){return e.id===t})),s=c.default.state.dag.locations[t];if(s){var l=""+((0,h.uuid)()+(0,h.uuid)()),u=i.id.length>8?i.id.substr(0,7):i.id,d=i.name.length>8?i.name.substr(0,7):i.name,f=(u||"")+"-"+l,m=(d||"")+"-"+l,g=s.x+100,v=s.y+40;(0,r.default)("#canvas").append((0,p.rtTasksTpl)({id:f,name:m,x:g,y:v,isAttachment:this.config.isAttachment,taskType:i.type}));var b=a.jsPlumb.getSelector(".statemachine-demo .w");i=Object.assign(i,{id:f,name:m}),c.default.commit("dag/addTasks",i),c.default.commit("dag/setLocations",((e={})[f]={name:m,targetarr:"",x:g,y:v},e)),this.JspInstance.batch(function(){n.initNode(b[b.length-1]),n.tasksEvent(f)})}},g.prototype.handleEventScreen=function(t){var e=t.item,n=!0;t.is?(e.icon="&#xe660;",n=!0):(e.icon="&#xe6e0;",n=!1);var i=(0,r.default)(".main-layout-model");n?i.addClass("dag-screen"):i.removeClass("dag-screen")},g.prototype.saveStore=function(){var t=this;return new Promise(function(e,n){var i=[],s={},a=[];o.default.map(o.default.cloneDeep(c.default.state.dag.tasks),function(t){if(function(t){return!!o.default.filter((0,p.tasksAll)(),function(e){return e.id===t}).length}(t.id)){var e=[],n=(0,r.default)("#"+t.id),i=n.attr("data-targetarr")?n.attr("data-targetarr").split(","):[];i.length&&o.default.map(i,function(t){e.push((0,r.default)("#"+t).find(".name-p").text())});var s=o.default.assign(t,{preTasks:e});"SUB_PROCESS"===t.type&&(s=o.default.omit(s,["maxRetryTimes","retryInterval"])),a.push(s)}}),o.default.map(t.JspInstance.getConnections(),function(t){i.push({endPointSourceId:t.sourceId,endPointTargetId:t.targetId})}),o.default.map((0,p.tasksAll)(),function(t){s[t.id]={name:t.name,targetarr:t.targetarr,x:t.x,y:t.y}}),c.default.commit("dag/setTasks",a),c.default.commit("dag/setLocations",s),c.default.commit("dag/setConnects",i),e({connects:i,tasks:a,locations:s})})},g.prototype.handleEvent=function(){this.JspInstance.bind("beforeDrop",function(t){var e=t.sourceId,n=t.targetId,i=void 0;return-1===o.default.findIndex((0,p.rtTargetarrArr)(n),function(t){return t===e})&&(!function t(e,n){for(var r in e)if(e[r]===n)i=n;else{var o=(0,p.rtTargetarrArr)(e[r]);if(!o.length)return t(n);t(o,n)}return i}((0,p.rtTargetarrArr)(e),n)&&((0,p.saveTargetarr)(e,n),c.default.commit("dag/setIsEditDag",!0),!0))})},g.prototype.jspBackfill=function(t){var e=this,n=t.connects,i=t.locations,r=t.largeJson;this.jsonHandle({largeJson:r,locations:i});var s=a.jsPlumb.getSelector(".statemachine-demo .w");this.JspInstance.batch(function(){for(var t=0;t<s.length;t++)e.initNode(s[t]);o.default.map(n,function(t){var n=t.endPointSourceId.split("-"),i=t.endPointTargetId.split("-");4===n.length&&4===i.length?(n=n[0]+"-"+n[1]+"-"+n[2],i=i[0]+"-"+i[1]+"-"+i[2]):(n=t.endPointSourceId,i=t.endPointTargetId),e.JspInstance.connect({source:n,target:i,type:"basic",paintStyle:{strokeWidth:2,stroke:"#555"}})})}),a.jsPlumb.fire("jsPlumbDemoLoaded",this.JspInstance),this.handleEvent(),this.draggable()},e.default=new g},775:function(t,e,n){"use strict";e.__esModule=!0;var i=l(n(28)),r=l(n(36)),o=l(n(675)),s=l(n(642)),a=l(n(777));function l(t){return t&&t.__esModule?t:{default:t}}e.default={name:"udp",data:function(){return{name:"",desc:"",udpList:[],syncDefine:!0}},mixins:[s.default],props:{},methods:{_onLocalParams:function(t){this.udpList=t},ok:function(){var t=this;if(this.name){var e=function(){t.$refs.refLocalParams._verifProp()&&(t.store.commit("dag/setGlobalParams",i.default.cloneDeep(t.udpList)),t.store.commit("dag/setName",i.default.cloneDeep(t.name)),t.store.commit("dag/setDesc",i.default.cloneDeep(t.desc)),t.store.commit("dag/setSyncDefine",t.syncDefine),a.default.setIsPop(!1),t.$emit("onUdp"))};this.store.state.dag.name?e():this.store.dispatch("dag/verifDAGName",this.name).then(function(t){e()}).catch(function(e){t.$message.error(e.msg||"")})}else this.$message.warning(""+r.default.$t("DAG图名称不能为空"))},close:function(){this.$emit("close")}},watch:{},created:function(){this.udpList=this.store.state.dag.globalParams,this.name=this.store.state.dag.name,this.desc=this.store.state.dag.desc,this.syncDefine=this.store.state.dag.syncDefine},mounted:function(){},components:{mLocalParams:o.default}}},776:function(t,e,n){"use strict";e.__esModule=!0;var i=a(n(28)),r=a(n(36)),o=n(722),s=a(n(642));function a(t){return t&&t.__esModule?t:{default:t}}e.default={name:"user-def-params",data:function(){return{directList:o.directList,typeList:o.typeList,localParamsList:[],localParamsIndex:null}},mixins:[s.default],props:{udpList:Array,hide:{type:Boolean,default:!0}},methods:{_getIndex:function(t){this.localParamsIndex=t},_handleDirectChanged:function(){this._verifProp("value")},_handleTypeChanged:function(){this._verifProp("value")},_removeUdp:function(t){this.localParamsList.splice(t,1),this._verifProp("value")},_addUdp:function(){this.localParamsList.push({prop:"",direct:"IN",type:"VARCHAR",value:""})},_handleValue:function(){this._verifProp("value")},_verifProp:function(t){var e=[],n=!0;return i.default.map(this.localParamsList,function(t){e.push(t.prop),t.prop||(n=!1)}),n?i.default.cloneDeep(i.default.uniqWith(e,i.default.isEqual)).length!==e.length?(t||this.$message.warning(""+r.default.$t("prop中有重复")),!1):(this.$emit("on-local-params",i.default.cloneDeep(this.localParamsList)),!0):(t||this.$message.warning(""+r.default.$t("prop不能为空")),!1)}},watch:{udpList:function(){this.localParamsList=this.udpList}},created:function(){this.localParamsList=this.udpList},mounted:function(){},components:{}}},777:function(t,e,n){"use strict";e.__esModule=!0;var i=l(n(29)),r=l(n(926)),o=l(n(91)),s=l(n(222)),a=n(125);function l(t){return t&&t.__esModule?t:{default:t}}var c={},u={},d="",h=!0;s.default.beforeEach(function(t,e,n){"projects-definition-details"===e.name||"projects-instance-details"===e.name||"definition-create"===e.name?c.paramVerification(e.name)?n():c.isPop(function(){n()}):n()}),c.init=function(t){h=!0,u=t,d=s.default.history.current.name},c.paramVerification=function(t){if(!h)return!0;var e=o.default.state.dag,n=!1;return"definition-create"===d?e.tasks.length?(e.name||o.default.commit("dag/setName",""+(0,a.uuid)("dag_")+((0,a.uuid)()+(0,a.uuid)())),n=!1):n=!0:n="projects-instance-details"===t||!e.isEditDag,n},c.isPop=function(t){i.default.$modal.dialog({closable:!1,showMask:!0,escClose:!0,className:"v-modal-custom",transitionName:"opacityp",render:function(e){return e(r.default,{on:{ok:function(){(0,a.findComponentDownward)(u,"dag-chart")._save("affirm").then(function(){t(),i.default.$modal.destroy()}).catch(function(){t(),i.default.$modal.destroy()})},close:function(){t(),i.default.$modal.destroy()}},props:{}})}})},c.setIsPop=function(t){h=t},e.default=c},778:function(t,e,n){"use strict";e.__esModule=!0;var i,r=n(223),o=(i=r)&&i.__esModule?i:{default:i};e.default={name:"affirm",methods:{_ok:function(){this.$emit("ok")},_close:function(){this.$emit("close")}},components:{mPopup:o.default}}},779:function(t,e,n){"use strict";e.__esModule=!0;var i=_(n(28)),r=_(n(803)),o=_(n(934)),s=_(n(944)),a=_(n(36)),l=_(n(953)),c=_(n(955)),u=_(n(959)),d=n(698),h=_(n(774)),p=_(n(961)),f=_(n(965)),m=_(n(973)),g=_(n(975)),v=_(n(977)),b=_(n(979)),y=_(n(642)),x=_(n(700));function _(t){return t&&t.__esModule?t:{default:t}}e.default={name:"form-model",data:function(){return{spinnerLoading:!1,name:"",desc:"",backfillItem:{},resourcesList:[],dependence:{},params:{},runFlag:"NORMAL",isContentBox:!1,maxRetryTimes:"0",retryInterval:"1",timeout:{},taskInstancePriority:"MEDIUM"}},directives:{clickoutside:b.default},mixins:[y.default],props:{id:Number,taskType:String,self:Object},methods:{_onDependent:function(t){this.dependence=Object.assign(this.dependence,{},t)},_onTimeout:function(t){this.timeout=Object.assign(this.timeout,{},t)},_handleClose:function(){this.close()},_seeHistory:function(){this.self.$router.push({name:"task-instance-list",query:{processInstanceId:this.self.$route.params.id,taskName:this.backfillItem.name}}),this.$modal.destroy()},_goSubProcess:function(){var t=this;if(i.default.isEmpty(this.backfillItem))this.$message.warning(""+a.default.$t("新创建子工作流还未执行,不能进入子工作流"));else if("projects-instance-details"===this.router.history.current.name){var e=$("#"+this.id).attr("data-state-id")||null;if(!e)return void this.$message.warning(""+a.default.$t("该任务还未执行,不能进入子工作流"));this.store.dispatch("dag/getSubProcessId",{taskId:e}).then(function(e){t.$emit("onSubProcess",{subProcessId:e.data.subProcessInstanceId,fromThis:t})}).catch(function(e){t.$message.error(e.msg||"")})}else this.$emit("onSubProcess",{subProcessId:this.backfillItem.params.processDefinitionId,fromThis:this})},_onParams:function(t){this.params=Object.assign(this.params,{},t)},_verifName:function(){return i.default.trim(this.name)?this.name===this.backfillItem.name||(!(0,d.isNameExDag)(this.name,i.default.isEmpty(this.backfillItem)?"dom":"backfill")||(this.$message.warning(""+a.default.$t("名称已存在请重新输入")),!1)):(this.$message.warning(""+a.default.$t("请输入名称(必填)")),!1)},_verification:function(){this._verifName()&&this.$refs.timeout._verification()&&this.$refs[this.taskType]._verification()&&($("#"+this.id).find("span").text(this.name),this.$emit("addTaskInfo",{item:{type:this.taskType,id:this.id,name:this.name,params:this.params,desc:this.desc,runFlag:this.runFlag,dependence:this.dependence,maxRetryTimes:this.maxRetryTimes,retryInterval:this.retryInterval,timeout:this.timeout,taskInstancePriority:this.taskInstancePriority},fromThis:this}))},_onSetProcessName:function(t){this.name=t},ok:function(){this._verification()},close:function(){var t=!1;this.backfillItem.name||(t=!0),this.isContentBox=!1,this.$emit("close",{flag:t,fromThis:this})}},watch:{runFlag:function(t){var e=$("#"+this.id).find(".ban-p");e.html(""),"FORBIDDEN"===t&&e.append((0,d.rtBantpl)())}},created:function(){var t=this;h.default.removePaste();var e=this.store.state.dag.tasks,n={};e.length&&(e.forEach(function(e){e.id===t.id&&(n=e,t.backfillItem=e)}),i.default.isEmpty(n)||(this.name=n.name,this.taskInstancePriority=n.taskInstancePriority,this.runFlag=n.runFlag||"NORMAL",this.desc=n.desc,this.maxRetryTimes=n.maxRetryTimes,this.retryInterval=n.retryInterval)),this.isContentBox=!0},mounted:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},computed:{_isGoSubProcess:function(){return"SUB_PROCESS"===this.taskType&&this.name}},components:{mMr:o.default,mShell:l.default,mSubProcess:m.default,mProcedure:p.default,mSql:s.default,mLog:r.default,mSpark:c.default,mPython:u.default,mDependent:f.default,mSelectInput:g.default,mTimeoutAlarm:v.default,mPriority:x.default}}},780:function(t,e,n){"use strict";e.__esModule=!0;var i=c(n(28)),r=c(n(36)),o=c(n(676)),s=c(n(699)),a=c(n(675)),l=c(n(642));function c(t){return t&&t.__esModule?t:{default:t}}e.default={name:"mr",data:function(){return{mainClass:"",mainJar:null,mainJarList:[],resourceList:[],localParams:[],mainArgs:"",others:"",programType:"JAVA",programTypeList:[{code:"JAVA"},{code:"PYTHON"}]}},props:{backfillItem:Object},mixins:[l.default],methods:{_onLocalParams:function(t){this.localParams=t},_onResourcesData:function(t){this.resourceList=t},_verification:function(){return"PYTHON"===this.programType||this.mainClass?this.mainJar?!!this.$refs.refResources._verifResources()&&(!!this.$refs.refLocalParams._verifProp()&&(this.$emit("on-params",{mainClass:this.mainClass,mainJar:{res:this.mainJar},resourceList:this.resourceList,localParams:this.localParams,mainArgs:this.mainArgs,others:this.others,programType:this.programType}),!0)):(this.$message.warning(""+r.default.$t("请选择主jar包")),!1):(this.$message.warning(""+r.default.$t("请填写主函数的class")),!1)},_getResourcesList:function(){var t=this;return new Promise(function(e,n){t.mainJarList=i.default.map(i.default.cloneDeep(t.store.state.dag.resourcesListS),function(t){return{id:t.id,code:t.alias,disabled:(e=t.alias,"jar"!==e.substring(e.lastIndexOf(".")+1,e.length))};var e}),e()})}},watch:{programType:function(t){"PYTHON"===t&&(this.mainClass="")}},created:function(){var t=this;this._getResourcesList().then(function(){var e=t.backfillItem;if(!i.default.isEmpty(e)){t.mainClass=e.params.mainClass||"",t.mainJar=e.params.mainJar.res||"",t.mainArgs=e.params.mainArgs||"",t.others=e.params.others,t.programType=e.params.programType||"JAVA";var n=e.params.resourceList||[];n.length&&(t.resourceList=n);var r=e.params.localParams||[];r.length&&(t.localParams=r)}})},mounted:function(){},components:{mLocalParams:a.default,mListBox:o.default,mResources:s.default}}},781:function(t,e,n){"use strict";e.__esModule=!0,e.default={name:"list-box"}},782:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n(28)),r=o(n(642));function o(t){return t&&t.__esModule?t:{default:t}}e.default={name:"resourceList",data:function(){return{resList:[],value:[]}},mixins:[r.default],props:{resourceList:Array},methods:{_verifResources:function(){return this.$emit("on-resourcesData",i.default.map(this.value,function(t){return{res:t}})),!0}},watch:{resourceList:function(t){this.value=i.default.map(i.default.cloneDeep(t),function(t){return t.res})}},created:function(){this.resList=i.default.map(i.default.cloneDeep(this.store.state.dag.resourcesListS),function(t){return{code:t.alias}}),this.resourceList.length&&(this.value=i.default.map(i.default.cloneDeep(this.resourceList),function(t){return t.res}))},mounted:function(){},components:{}}},783:function(t,e,n){"use strict";e.__esModule=!0;var i=h(n(28)),r=h(n(36)),o=h(n(945)),s=h(n(676)),a=h(n(949)),l=h(n(786)),c=h(n(675)),u=h(n(642)),d=h(n(682));function h(t){return t&&t.__esModule?t:{default:t}}var p=void 0;e.default={name:"sql",data:function(){return{type:"",datasource:"",rtDatasource:"",sql:"",localParams:[],udfs:"",sqlType:0,showType:["TABLE"],connParams:""}},mixins:[u.default],props:{backfillItem:Object},methods:{_onSqlType:function(t){this.sqlType=t},_onUdfsData:function(t){this.udfs=t},_onUdpData:function(t){this.localParams=t},_onDsData:function(t){this.type=t.type,this.rtDatasource=t.datasource},_verification:function(){var t,e=this;return p.getValue()?!!this.$refs.refDs._verifDatasource()&&(!("HIVE"===this.type&&!this.$refs.refUdfs._verifUdfs())&&(!!this.$refs.refLocalParams._verifProp()&&(this.$emit("on-params",{type:this.type,datasource:this.rtDatasource,sql:p.getValue(),udfs:this.udfs,sqlType:this.sqlType,showType:(t=e.showType,2===t.length&&"ATTACHMENT"===t[0]?[t[1],t[0]].join(","):t.join(",")),localParams:this.localParams,connParams:this.connParams}),!0))):(this.$message.warning(""+r.default.$t("请输入sql语句(必填)")),!1)},_handlerEditor:function(){return p=(0,d.default)("code-sql-mirror",{mode:"sql",readOnly:this.isDetails}),this.keypress=function(){p.getOption("readOnly")||p.showHint({completeSingle:!1})},p.on("keypress",this.keypress),p.setValue(this.sql),p}},watch:{sqlType:function(t){t&&(this.showType=[])},type:function(t){"HIVE"!==t&&(this.connParams="")}},created:function(){var t=this.backfillItem;i.default.isEmpty(t)||(this.type=t.params.type||"",this.datasource=t.params.datasource||"",this.sql=t.params.sql||"",this.udfs=t.params.udfs||"",this.sqlType=t.params.sqlType,this.connParams=t.params.connParams||"",this.localParams=t.params.localParams||[],this.showType=t.params.showType.split(",")||[])},mounted:function(){var t=this;setTimeout(function(){t._handlerEditor()},200)},destroyed:function(){p&&(p.toTextArea(),p.off($(".code-sql-mirror"),"keypress",this.keypress))},computed:{},components:{mListBox:s.default,mDatasource:l.default,mLocalParams:c.default,mUdfs:o.default,mSqlType:a.default}}},784:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n(28)),r=o(n(642));function o(t){return t&&t.__esModule?t:{default:t}}e.default={name:"udfs",data:function(){return{udfsStr:[],udfsList:[]}},mixins:[r.default],props:{udfs:String,type:String},methods:{_verifUdfs:function(){return this.$emit("on-udfsData",i.default.map(this.udfsStr,function(t){return t.id}).join(",")),!0},_getUdfList:function(){var t=this;this.udfsList=[],this.store.dispatch("dag/getUdfList",{type:this.type}).then(function(e){t.udfsList=i.default.map(e.data,function(t){return{id:t.id,code:t.funcName}});var n=i.default.cloneDeep(t.udfs.split(","));if(n.length){var r=[];i.default.map(n,function(e){i.default.map(t.udfsList,function(t){parseInt(e)===t.id&&r.push(t)})}),t.$nextTick(function(){t.udfsStr=r})}})}},watch:{type:function(t){this.udfs="","HIVE"===t?this._getUdfList():this.udfsList=[]}},created:function(){this._getUdfList()},mounted:function(){}}},785:function(t,e,n){"use strict";e.__esModule=!0;var i=s(n(28)),r=n(722),o=s(n(642));function s(t){return t&&t.__esModule?t:{default:t}}e.default={name:"sql-type",data:function(){return{sqlTypeList:r.sqlTypeList,sqlTypeId:{}}},mixins:[o.default],props:{sqlType:Number},methods:{_handleSqlTypeChanged:function(t){this.$emit("on-sqlType",t.value.id)}},watch:{},created:function(){var t=this;this.$nextTick(function(){null!==t.sqlType?t.sqlTypeId=i.default.filter(t.sqlTypeList,function(e){return e.id===t.sqlType})[0]:t.sqlTypeId=t.sqlTypeList[0]})},mounted:function(){}}},786:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(787),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(951),a=n(27)(r.a,s.a,!1,null,null,null);e.default=a.exports},787:function(t,e,n){"use strict";e.__esModule=!0;var i=s(n(28)),r=s(n(36)),o=s(n(642));function s(t){return t&&t.__esModule?t:{default:t}}e.default={name:"datasource",data:function(){return{type:"",typeList:[],datasource:{},datasourceList:[]}},mixins:[o.default],props:{data:Object,supportType:Array},methods:{_verifDatasource:function(){return this.datasource?(this.$emit("on-dsData",{type:this.type,datasource:this.datasource.id}),!0):(this.$message.warning(""+r.default.$t("请选择数据源")),!1)},_getDatasourceData:function(){var t=this;return new Promise(function(e,n){t.store.dispatch("dag/getDatasourceList",t.type).then(function(n){t.datasourceList=i.default.map(n.data,function(t){return{id:t.id,code:t.name,disabled:!1}}),e()})})},_handleTypeChanged:function(t){var e=this,n=t.value;this.type=n,this._getDatasourceData().then(function(t){e.datasource=e.datasourceList.length&&e.datasourceList[0]||{},e.$emit("on-dsData",{type:e.type,datasource:e.datasource.id})})}},watch:{},created:function(){var t=this,e=this.supportType||[];if(this.typeList=i.default.cloneDeep(this.store.state.dag.dsTypeListS),e.length){this.typeList=i.default.filter(this.typeList,function(t){return n=t.code,!!i.default.filter(e,function(t){return t===n}).length;var n})}this.type=i.default.cloneDeep(this.data.type)||this.typeList[0].code,this._getDatasourceData().then(function(e){i.default.isEmpty(t.data)?t.$nextTick(function(){t.datasource=t.datasourceList[0]}):t.$nextTick(function(){t.datasource=i.default.filter(t.datasourceList,function(e){return e.id===t.data.datasource})[0]}),t.$emit("on-dsData",{type:t.type})})},mounted:function(){},components:{}}},788:function(t,e,n){"use strict";e.__esModule=!0;var i=u(n(28)),r=u(n(36)),o=u(n(676)),s=u(n(699)),a=u(n(675)),l=u(n(642)),c=u(n(682));function u(t){return t&&t.__esModule?t:{default:t}}var d=void 0;e.default={name:"shell",data:function(){return{rawScript:"",localParams:[],resourceList:[]}},mixins:[l.default],props:{backfillItem:Object},methods:{_onLocalParams:function(t){this.localParams=t},_onResourcesData:function(t){this.resourceList=t},_verification:function(){return d.getValue()?!!this.$refs.refResources._verifResources()&&(!!this.$refs.refLocalParams._verifProp()&&(this.$emit("on-params",{resourceList:this.resourceList,localParams:this.localParams,rawScript:d.getValue()}),!0)):(this.$message.warning(""+r.default.$t("请输入rawScript(必填)")),!1)},_handlerEditor:function(){return d=(0,c.default)("code-shell-mirror",{mode:"shell",readOnly:this.isDetails}),this.keypress=function(){d.getOption("readOnly")||d.showHint({completeSingle:!1})},d.on("keypress",this.keypress),d.setValue(this.rawScript),d}},watch:{},created:function(){var t=this.backfillItem;if(!i.default.isEmpty(t)){this.rawScript=t.params.rawScript;var e=t.params.resourceList||[];e.length&&(this.resourceList=e);var n=t.params.localParams||[];n.length&&(this.localParams=n)}},mounted:function(){var t=this;setTimeout(function(){t._handlerEditor()},200)},destroyed:function(){d&&(d.toTextArea(),d.off($(".code-shell-mirror"),"keypress",this.keypress))},components:{mLocalParams:a.default,mListBox:o.default,mResources:s.default}}},789:function(t,e,n){"use strict";e.__esModule=!0;var i=c(n(28)),r=c(n(36)),o=c(n(675)),s=c(n(676)),a=c(n(699)),l=c(n(642));function c(t){return t&&t.__esModule?t:{default:t}}e.default={name:"spark",data:function(){return{mainClass:"",mainJar:null,mainJarList:[],deployMode:"cluster",resourceList:[],localParams:[],driverCores:1,driverMemory:"512M",numExecutors:2,executorMemory:"2G",executorCores:2,mainArgs:"",others:"",programType:"SCALA",programTypeList:[{code:"JAVA"},{code:"SCALA"},{code:"PYTHON"}]}},props:{backfillItem:Object},mixins:[l.default],methods:{_onLocalParams:function(t){this.localParams=t},_onResourcesData:function(t){this.resourceList=t},_verification:function(){return"PYTHON"===this.programType||this.mainClass?this.mainJar?this.numExecutors?Number.isInteger(parseInt(this.numExecutors))?this.executorMemory&&this.executorMemory?i.default.isNumber(parseInt(this.executorMemory))?this.executorCores?Number.isInteger(parseInt(this.executorCores))?!!this.$refs.refResources._verifResources()&&(!!this.$refs.refLocalParams._verifProp()&&(this.$emit("on-params",{mainClass:this.mainClass,mainJar:{res:this.mainJar},deployMode:this.deployMode,resourceList:this.resourceList,localParams:this.localParams,driverCores:this.driverCores,driverMemory:this.driverMemory,numExecutors:this.numExecutors,executorMemory:this.executorMemory,executorCores:this.executorCores,mainArgs:this.mainArgs,others:this.others,programType:this.programType}),!0)):(this.$message.warning(""+r.default.$t("内核数为正整数")),!1):(this.$message.warning(""+r.default.$t("请填写Executor内核数")),!1):(this.$message.warning(""+r.default.$t("内存数为数字")),!1):(this.$message.warning(""+r.default.$t("请填写Executor内存数")),!1):(this.$message.warning(""+r.default.$t("Executor数量为正整数")),!1):(this.$message.warning(""+r.default.$t("请填写Executor数量")),!1):(this.$message.warning(""+r.default.$t("请选择主jar包")),!1):(this.$message.warning(""+r.default.$t("请填写主函数的class")),!1)},_getResourcesList:function(){var t=this;return new Promise(function(e,n){t.mainJarList=i.default.map(i.default.cloneDeep(t.store.state.dag.resourcesListS),function(t){return{id:t.id,code:t.alias,disabled:(e=t.alias,"jar"!==e.substring(e.lastIndexOf(".")+1,e.length))};var e}),e()})}},watch:{programType:function(t){"PYTHON"===t&&(this.mainClass="")}},created:function(){var t=this;this._getResourcesList().then(function(){var e=t.backfillItem;if(!i.default.isEmpty(e)){t.mainClass=e.params.mainClass||"",t.mainJar=e.params.mainJar.res||"",t.deployMode=e.params.deployMode||"",t.driverCores=e.params.driverCores||1,t.driverMemory=e.params.driverMemory||"512M",t.numExecutors=e.params.numExecutors||2,t.executorMemory=e.params.executorMemory||"2G",t.executorCores=e.params.executorCores||2,t.mainArgs=e.params.mainArgs||"",t.others=e.params.others,t.programType=e.params.programType||"SCALA";var n=e.params.resourceList||[];n.length&&(t.resourceList=n);var r=e.params.localParams||[];r.length&&(t.localParams=r)}})},mounted:function(){},components:{mLocalParams:o.default,mListBox:s.default,mResources:a.default}}},790:function(t,e,n){"use strict";e.__esModule=!0;var i=u(n(28)),r=u(n(36)),o=u(n(676)),s=u(n(699)),a=u(n(675)),l=u(n(642)),c=u(n(682));function u(t){return t&&t.__esModule?t:{default:t}}var d=void 0;e.default={name:"python",data:function(){return{rawScript:"",localParams:[],resourceList:[]}},mixins:[l.default],props:{backfillItem:Object},methods:{_onLocalParams:function(t){this.localParams=t},_onResourcesData:function(t){this.resourceList=t},_verification:function(){return d.getValue()?!!this.$refs.refResources._verifResources()&&(!!this.$refs.refLocalParams._verifProp()&&(this.$emit("on-params",{resourceList:this.resourceList,localParams:this.localParams,rawScript:d.getValue()}),!0)):(this.$message.warning(""+r.default.$t("请输入rawScript(必填)")),!1)},_handlerEditor:function(){return d=(0,c.default)("code-python-mirror",{mode:"python",readOnly:this.isDetails}),this.keypress=function(){d.getOption("readOnly")||d.showHint({completeSingle:!1})},d.on("keypress",this.keypress),d.setValue(this.rawScript),d}},watch:{},created:function(){var t=this.backfillItem;if(!i.default.isEmpty(t)){this.rawScript=t.params.rawScript;var e=t.params.resourceList||[];e.length&&(this.resourceList=e);var n=t.params.localParams||[];n.length&&(this.localParams=n)}},mounted:function(){var t=this;setTimeout(function(){t._handlerEditor()},200)},destroyed:function(){d.toTextArea(),d.off($(".code-python-mirror"),"keypress",this.keypress)},components:{mLocalParams:a.default,mListBox:o.default,mResources:s.default}}},791:function(t,e,n){"use strict";e.__esModule=!0;var i=c(n(28)),r=c(n(36)),o=c(n(676)),s=c(n(786)),a=c(n(675)),l=c(n(642));function c(t){return t&&t.__esModule?t:{default:t}}e.default={name:"procedure",data:function(){return{method:"",localParams:[],type:"",datasource:""}},mixins:[l.default],props:{backfillItem:Object},methods:{_onDsData:function(t){this.type=t.type,this.datasource=t.datasource},_onLocalParams:function(t){},_verification:function(){return!!this.$refs.refDs._verifDatasource()&&(this.method?!!this.$refs.refLocalParams._verifProp()&&(this.$emit("on-params",{type:this.type,datasource:this.datasource,method:this.method,localParams:this.localParams}),!0):(this.$message.warning(""+r.default.$t("请输入方法")),!1))}},watch:{},created:function(){var t=this.backfillItem;if(!i.default.isEmpty(t)){this.name=t.name,this.desc=t.desc,this.type=t.params.type||"",this.datasource=t.params.datasource||"",this.method=t.params.method||"";var e=t.params.localParams||[];e.length&&(this.localParams=e)}},mounted:function(){},components:{mListBox:o.default,mDatasource:s.default,mLocalParams:a.default}}},792:function(t,e,n){"use strict";e.__esModule=!0;var i=a(n(28)),r=a(n(676)),o=a(n(968)),s=a(n(642));function a(t){return t&&t.__esModule?t:{default:t}}e.default={name:"dependence",data:function(){return{relation:"AND",dependTaskList:[],isLoading:!1}},mixins:[s.default],props:{backfillItem:Object},methods:{_addDep:function(){this.isLoading||(this.isLoading=!0,this.dependTaskList.push({dependItemList:[],relation:"AND"}))},_deleteDep:function(t){this.dependTaskList.splice(t,1),$("body").find(".tooltip.fade.top.in").remove()},_onDeleteAll:function(t){this._deleteDep(t)},_setGlobalRelation:function(){this.relation="AND"===this.relation?"OR":"AND"},_setRelation:function(t){this.dependTaskList[t].relation="AND"===this.dependTaskList[t].relation?"OR":"AND"},_verification:function(){return this.$emit("on-dependent",{relation:this.relation,dependTaskList:i.default.map(this.dependTaskList,function(t){return{relation:t.relation,dependItemList:i.default.map(t.dependItemList,function(t){return i.default.omit(t,["depTasksList","state","dateValueList"])})}})}),!0}},watch:{dependTaskList:function(){var t=this;setTimeout(function(){t.isLoading=!1},600)}},beforeCreate:function(){},created:function(){var t=this.backfillItem,e=$("#"+t.id).data("dependent-result")||{};if(!i.default.isEmpty(t)){this.relation=i.default.cloneDeep(t.dependence.relation)||"AND",this.dependTaskList=i.default.cloneDeep(t.dependence.dependTaskList)||[];var n=this.isDetails?"WAITING":"";i.default.map(this.dependTaskList,function(t){return i.default.map(t.dependItemList,function(t){return t.state=e[t.definitionId+"-"+t.depTasks+"-"+t.cycle+"-"+t.dateValue]||n})})}},mounted:function(){},destroyed:function(){},computed:{},components:{mListBox:r.default,mDependItemList:o.default}}},793:function(t,e,n){"use strict";e.__esModule=!0;var i=s(n(28)),r=n(722),o=s(n(642));function s(t){return t&&t.__esModule?t:{default:t}}e.default={name:"dep-list",data:function(){return{list:[],definitionList:[],cycleList:r.cycleList,isInstance:!1,itemIndex:null}},mixins:[o.default],props:{dependItemList:Array,index:Number},model:{prop:"dependItemList",event:"dependItemListEvent"},methods:{_add:function(){var t=this;this.isLoading=!0;var e=i.default.filter(this.definitionList,function(e){return n=e.value,!i.default.some(t.dependItemList,{definitionId:n});var n}),n=e[0]&&e[0].value||null||this.definitionList[0].value;this._getDependItemList(n).then(function(e){t.$nextTick(function(){t.$emit("dependItemListEvent",i.default.concat(t.dependItemList,t._rtNewParams(n,e)))})}),this._removeTip()},_remove:function(t){this.dependItemList.splice(t,1),this._removeTip(),this.dependItemList.length||this.$emit("on-delete-all",{index:this.index})},_getProcessList:function(){var t=this;return new Promise(function(e,n){t.definitionList=i.default.map(i.default.cloneDeep(t.store.state.dag.processListS),function(t){return{value:t.id,label:t.name}}),e()})},_getDependItemList:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise(function(r,o){n?e.store.dispatch("dag/getProcessTasksList",{processDefinitionId:t}).then(function(t){r(["ALL"].concat(i.default.map(t,function(t){return t.name})))}):e.store.dispatch("dag/getTaskListDefIdAll",{processDefinitionIdList:t}).then(function(t){r(t)})})},_onChangeDefinitionId:function(t){var e=this,n=t.value;this._getDependItemList(n).then(function(t){var i=e.dependItemList[e.itemIndex];i.depTasks="ALL",e.$set(e.dependItemList,e.itemIndex,e._rtOldParams(n,t,i))})},_onChangeCycle:function(t){var e=t.value,n=i.default.cloneDeep(r.dateValueList[e]);this.$set(this.dependItemList[this.itemIndex],"dateValue",n[0].value),this.$set(this.dependItemList[this.itemIndex],"dateValueList",n)},_rtNewParams:function(t,e){return{definitionId:t,depTasks:"ALL",depTasksList:e,cycle:"day",dateValue:"last1Days",dateValueList:i.default.cloneDeep(r.dateValueList.day),state:""}},_rtOldParams:function(t,e,n){return{definitionId:t,depTasks:n.depTasks||"ALL",depTasksList:e,cycle:n.cycle,dateValue:n.dateValue,dateValueList:i.default.cloneDeep(r.dateValueList[n.cycle]),state:n.state}},_removeTip:function(){$("body").find(".tooltip.fade.top.in").remove()}},watch:{},beforeCreate:function(){},created:function(){var t=this;this.isInstance="projects-instance-details"===this.router.history.current.name,this._getProcessList().then(function(){if(t.dependItemList.length){var e=i.default.map(t.dependItemList,function(t){return t.definitionId}).join(",");t._getDependItemList(e,!1).then(function(e){i.default.map(t.dependItemList,function(n,r){t.$set(t.dependItemList,r,t._rtOldParams(n.definitionId,["ALL"].concat(i.default.map(e[n.definitionId]||[],function(t){return t.name})),n))})})}else{var n=t.definitionList[0].value;t._getDependItemList(n).then(function(e){t.$emit("dependItemListEvent",i.default.concat(t.dependItemList,t._rtNewParams(n,e)))})}})},mounted:function(){},components:{}}},794:function(t,e,n){"use strict";e.__esModule=!0;var i=s(n(28)),r=s(n(36)),o=s(n(642));function s(t){return t&&t.__esModule?t:{default:t}}e.default={name:"sub_process",data:function(){return{processDefinitionList:[],wdiCurr:null}},mixins:[o.default],props:{backfillItem:Object},methods:{_verification:function(){return this.wdiCurr?(this.$emit("on-params",{processDefinitionId:this.wdiCurr}),!0):(this.$message.warning(""+r.default.$t("请选择子工作流")),!1)},_handleWdiChanged:function(t){this.$emit("on-set-process-name",this._handleName(t.value))},_handleName:function(t){return i.default.filter(this.processDefinitionList,function(e){return t===e.id})[0].code}},watch:{},created:function(){var t,e=i.default.cloneDeep(this.store.state.dag.processListS),n=this.router.history.current.params.id||null;this.processDefinitionList=(t=i.default.map(e,function(t){return{id:t.id,code:t.name,disabled:!1}}),i.default.filter(t,function(t){return+t.id!=+n}));var r=this.backfillItem;i.default.isEmpty(r)?this.processDefinitionList.length&&(this.wdiCurr=this.processDefinitionList[0].id,this.$emit("on-set-process-name",this._handleName(this.wdiCurr))):this.wdiCurr=r.params.processDefinitionId},mounted:function(){}}},795:function(t,e,n){"use strict";e.__esModule=!0;var i=s(n(28)),r=s(n(36)),o=s(n(642));function s(t){return t&&t.__esModule?t:{default:t}}e.default={name:"select-input",data:function(){return{isIconState:!1,isInput:!0}},mixins:[o.default],props:{value:String,list:Array},model:{prop:"value",event:"valueEvent"},methods:{_onChange:function(t){this.$emit("valueEvent",+t.value),this._setIconState(+t.value)},_setIconState:function(t){this.isIconState=i.default.includes(this.list,parseInt(t))},_ckIcon:function(){var t=this;this.isDetails||(this.isInput=!1,this.$emit("valueEvent",+this.list[0]),this.isIconState=!0,setTimeout(function(){t.isInput=!0},1))},_onBlur:function(){var t=$(this.$refs.input.$el).find("input")[0].value;this._validation(t)&&(this.$emit("valueEvent",t),this._setIconState(t))},_validation:function(t){return"0"===t||(!!/(^[0-9]*[1-9][0-9]*$)/.test(t)||(this.$message.warning(""+r.default.$t("请输入正整数")),this._ckIcon(),!1))}},watch:{},created:function(){this._setIconState(this.value)},mounted:function(){},components:{}}},796:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n(28)),r=o(n(642));function o(t){return t&&t.__esModule?t:{default:t}}e.default={name:"timeout-alarm",data:function(){return{enable:!1,strategy:[],interval:null}},mixins:[r.default],props:{backfillItem:Object},methods:{_onSwitch:function(t){this.strategy=t?["WARN"]:[],this.interval=t?30:null},_verification:function(){var t,e=this;return this.enable&&!this.strategy.length?(this.$message.warning(""+this.$t("超时策略必须选一个")),!1):!this.enable||parseInt(this.interval)||i.default.isInteger(this.interval)?(this.$emit("on-timeout",{strategy:(t=e.strategy,2===t.length&&"FAILED"===t[0]?[t[1],t[0]].join(","):t.join(",")),interval:parseInt(this.interval),enable:this.enable}),!0):(this.$message.warning(""+this.$t("超时时长必须为正整数")),!1)}},watch:{},created:function(){var t=this.backfillItem;!i.default.isEmpty(t)&&t.timeout&&(this.enable=t.timeout.enable||!1,this.strategy=i.default.split(t.timeout.strategy,",")||["WARN"],this.interval=t.timeout.interval||null)},mounted:function(){},components:{}}},798:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(702),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(801);var a=function(t){n(799)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},799:function(t,e,n){var i=n(800);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("57207148",i,!0,{})},800:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".start-process-model{width:860px;min-height:300px;background:#fff;border-radius:3px}.start-process-model .title-box{margin-bottom:18px}.start-process-model .title-box span{padding-left:30px;font-size:16px;padding-top:29px;display:block}.start-process-model .list{margin-bottom:14px}.start-process-model .list .text{width:140px;float:left;text-align:right;line-height:32px;padding-right:8px}.start-process-model .list .cont{width:350px;float:left}.start-process-model .list .cont .add-email-model{padding:20px}.start-process-model .submit{text-align:right;padding-right:30px;padding-top:10px;padding-bottom:30px}",""])},801:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"start-process-model"},[n("div",{staticClass:"title-box"},[n("span",[t._v(t._s(t.$t("启动前请先设置参数")))])]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("失败策略"))+"\n ")]),t._v(" "),n("div",{staticClass:"cont"},[n("x-radio-group",{staticStyle:{"margin-top":"7px"},model:{value:t.failureStrategy,callback:function(e){t.failureStrategy=e},expression:"failureStrategy"}},[n("x-radio",{attrs:{label:"CONTINUE"}},[t._v(t._s(t.$t("继续")))]),t._v(" "),n("x-radio",{attrs:{label:"END"}},[t._v(t._s(t.$t("结束")))])],1)],1)]),t._v(" "),"contextmenu"===t.sourceType?n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("节点执行"))+"\n ")]),t._v(" "),n("div",{staticClass:"cont"},[n("x-radio-group",{model:{value:t.taskDependType,callback:function(e){t.taskDependType=e},expression:"taskDependType"}},[n("x-radio",{attrs:{label:"TASK_POST"}},[t._v(t._s(t.$t("向后执行")))]),t._v(" "),n("x-radio",{attrs:{label:"TASK_PRE"}},[t._v(t._s(t.$t("向前执行")))]),t._v(" "),n("x-radio",{attrs:{label:"TASK_ONLY"}},[t._v(t._s(t.$t("仅执行当前节点")))])],1)],1)]):t._e(),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("通知策略"))+"\n ")]),t._v(" "),n("div",{staticClass:"cont"},[n("x-select",{staticStyle:{width:"200px"},model:{value:t.warningType,callback:function(e){t.warningType=e},expression:"warningType"}},t._l(t.warningTypeList,function(t){return n("x-option",{key:t.id,attrs:{value:t,label:t.code}})}),1)],1)]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("流程优先级"))+"\n ")]),t._v(" "),n("div",{staticClass:"cont"},[n("m-priority",{model:{value:t.processInstancePriority,callback:function(e){t.processInstancePriority=e},expression:"processInstancePriority"}})],1)]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("通知组"))+"\n ")]),t._v(" "),n("div",{staticClass:"cont"},[n("x-select",{staticStyle:{width:"200px"},attrs:{disabled:!t.notifyGroupList.length},scopedSlots:t._u([{key:"trigger",fn:function(e){var i=e.selectedModel;return n("x-input",{staticStyle:{width:"200px"},attrs:{readonly:"",placeholder:t.$t("请选择通知组"),value:i?i.label:""},on:{"on-click-icon":function(e){e.stopPropagation(),t.warningGroupId={}}}},[n("i",{directives:[{name:"show",rawName:"v-show",value:t.warningGroupId.id,expression:"warningGroupId.id"}],staticClass:"fa fa-times-circle",staticStyle:{"font-size":"15px",cursor:"pointer"},attrs:{slot:"suffix"},slot:"suffix"}),t._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:!t.warningGroupId.id,expression:"!warningGroupId.id"}],staticClass:"ans-icon-arrow-down",staticStyle:{"font-size":"12px"},attrs:{slot:"suffix"},slot:"suffix"})])}}]),model:{value:t.warningGroupId,callback:function(e){t.warningGroupId=e},expression:"warningGroupId"}},[t._v(" "),t._l(t.notifyGroupList,function(t){return n("x-option",{key:t.id,attrs:{value:t,label:t.code}})})],2)],1)]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("收件人"))+"\n ")]),t._v(" "),n("div",{staticClass:"cont"},[n("m-email",{attrs:{"repeat-data":t.receiversCc},model:{value:t.receivers,callback:function(e){t.receivers=e},expression:"receivers"}})],1)]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("抄送人"))+"\n ")]),t._v(" "),n("div",{staticClass:"cont"},[n("m-email",{attrs:{"repeat-data":t.receivers},model:{value:t.receiversCc,callback:function(e){t.receiversCc=e},expression:"receiversCc"}})],1)]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("补数"))+"\n ")]),t._v(" "),n("div",{staticClass:"cont"},[n("div",{staticStyle:{"padding-top":"6px"}},[n("x-checkbox",{model:{value:t.execType,callback:function(e){t.execType=e},expression:"execType"}},[t._v(t._s(t.$t("是否补数")))])],1)])]),t._v(" "),t.execType?[n("div",{staticClass:"clearfix list",staticStyle:{margin:"-6px 0 16px 0"}},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("执行方式"))+"\n ")]),t._v(" "),n("div",{staticClass:"cont"},[n("x-radio-group",{staticStyle:{"margin-top":"7px"},model:{value:t.runMode,callback:function(e){t.runMode=e},expression:"runMode"}},[n("x-radio",{attrs:{label:"RUN_MODE_SERIAL"}},[t._v(t._s(t.$t("串行执行")))]),t._v(" "),n("x-radio",{attrs:{label:"RUN_MODE_PARALLEL"}},[t._v(t._s(t.$t("并行执行")))])],1)],1)]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("时间"))+"\n ")]),t._v(" "),n("div",{staticClass:"cont"},[n("x-datepicker",{staticStyle:{width:"360px"},attrs:{"panel-num":2,placement:"bottom-start",value:t.scheduleTime,type:"daterange",placeholder:t.$t("选择日期区间"),format:"YYYY-MM-DD HH:mm:ss"},on:{"on-change":t._datepicker}})],1)])]:t._e(),t._v(" "),n("div",{staticClass:"submit"},[n("x-button",{attrs:{type:"text"},on:{click:function(e){return t.close()}}},[t._v(" "+t._s(t.$t("取消"))+" ")]),t._v(" "),n("x-button",{directives:[{name:"ps",rawName:"v-ps",value:["GENERAL_USER"],expression:"['GENERAL_USER']"}],attrs:{type:"primary",shape:"circle",loading:t.spinnerLoading},on:{click:function(e){return t.ok()}}},[t._v(t._s(t.spinnerLoading?"Loading...":t.$t("启动"))+" ")])],1)],2)},staticRenderFns:[]};e.a=i},803:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(723),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(806);var a=function(t){n(804)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},804:function(t,e,n){var i=n(805);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("2edcb0af",i,!0,{})},805:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,'.log-pop{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.4);z-index:10}.log-pop .log-box{width:660px;height:520px;background:#fff;border-radius:3px;position:absolute;left:50%;top:50%;margin-left:-340px;margin-top:-250px}.log-pop .log-box .title{height:50px;border-bottom:1px solid #dcdedc}.log-pop .log-box .title span{font-size:16px;color:#333;padding-left:20px;display:inline-block;padding-top:16px}.log-pop .log-box .title .full-screen{position:absolute;right:20px;top:12px}.log-pop .log-box .title .full-screen a{color:#0097e0;font-size:12px;margin-left:10px}.log-pop .log-box .title .full-screen a i{vertical-align:middle}.log-pop .log-box .title .full-screen .clock>i{font-size:20px;vertical-align:middle;transform:scale(1)}.log-pop .log-box .title .full-screen .refresh-log>i{font-size:24px;vertical-align:middle;transform:scale(1)}.log-pop .log-box .title .full-screen .refresh-log.active>i{-webkit-transition-property:-webkit-transform;-webkit-transition-duration:1s;-moz-transition-property:-moz-transform;-moz-transition-duration:1s;-webkit-animation:rotateloading .4s linear infinite;-moz-animation:rotateloading .4s linear infinite;-o-animation:rotateloading .4s linear infinite;animation:rotateloading .4s linear infinite;transform:scale(.4);color:#999}.log-pop .log-box .content{height:calc(100% - 100px);background:#002a35;padding:6px 2px}.log-pop .log-box .content .content-log-box{width:100%;height:100%;word-break:break-all}.log-pop .log-box .content .content-log-box textarea{background:none;color:#9cabaf;border:0;font-family:"Microsoft Yahei,Arial,Hiragino Sans GB,tahoma,SimSun,sans-serif";font-weight:700;resize:none;line-height:1.6;padding:6px}.log-pop .log-box .operation{text-align:right;height:50px;line-height:44px;border-top:1px solid #dcdedc;padding-right:20px;background:#fff;position:relative}',""])},806:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"log-model"},[t.stateId&&"SUB_PROCESS"!==t.item.type?n("span",[t._t("history"),t._v(" "),n("span",{on:{click:t._ckLog}},[t._t("log")],2)],2):t._e(),t._v(" "),n("transition",{attrs:{name:"fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isLog||"list"===t.source,expression:"isLog || source === 'list'"}],staticClass:"log-pop"},[n("div",{staticClass:"log-box"},[n("div",{staticClass:"title"},[n("span",[t._v(t._s(t.$t("查看日志")))]),t._v(" "),n("div",{staticClass:"full-screen"},[n("a",{attrs:{href:"javascript:","data-container":"body","data-toggle":"tooltip",title:t.$t("下载日志")},on:{click:t._downloadLog}},[n("i",{staticClass:"iconfont",staticStyle:{"font-size":"20px"}},[t._v("")])]),t._v(" "),n("a",{staticClass:"refresh-log",class:t.loading?"active":"",attrs:{href:"javascript:","data-container":"body","data-toggle":"tooltip",title:t.$t("刷新日志")},on:{click:function(e){!t.loading&&t._refreshLog()}}},[n("i",{staticClass:"fa iconfont"},[t._v("")])]),t._v(" "),n("a",{directives:[{name:"show",rawName:"v-show",value:!t.isScreen,expression:"!isScreen"}],attrs:{href:"javascript:","data-container":"body","data-toggle":"tooltip",title:t.$t("进入全屏")},on:{click:t._screenOpen}},[n("i",{staticClass:"iconfont"},[t._v("")])]),t._v(" "),n("a",{directives:[{name:"show",rawName:"v-show",value:t.isScreen,expression:"isScreen"}],attrs:{href:"javascript:","data-container":"body","data-toggle":"tooltip",title:t.$t("取消全屏")},on:{click:t._screenClose}},[n("i",{staticClass:"iconfont"},[t._v("")])])])]),t._v(" "),n("div",{staticClass:"content"},[n("div",{staticClass:"content-log-box"},[n("textarea",{staticClass:"textarea-ft",staticStyle:{width:"100%"},attrs:{id:"textarea-log",spellcheck:"false"}})])]),t._v(" "),n("div",{staticClass:"operation"},[n("x-button",{attrs:{type:"primary",shape:"circle"},on:{click:t.close}},[t._v(" "+t._s(t.$t("关闭"))+" ")])],1)])])])],1)},staticRenderFns:[]};e.a=i},905:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(773),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(981);var a=function(t){n(906)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},906:function(t,e,n){var i=n(907);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("4e643ae0",i,!0,{})},907:function(t,e,n){var i=n(124);(t.exports=n(34)(!1)).push([t.i,".dag-model{background:url("+i(n(908))+");height:calc(100vh - 100px)}.dag-model ::selection{background:transparent}.dag-model ::-moz-selection{background:transparent}.dag-model ::-webkit-selection{background:transparent}.dag-model .jsplumb-connector{z-index:1}.dag-model .endpoint-tasks{margin-top:22px}.dag-model .draggable>span{text-align:center;display:block;margin-top:-4px;padding:0 4px;width:200px;margin-left:-81px;position:absolute;left:0;bottom:-12px}.dag-model .draggable .fa{position:absolute;right:-8px;top:-8px;z-index:2}.dag-model .draggable .fa,.dag-model .draggable .icos{display:inline-block;cursor:pointer}.dag-model .draggable.active-tasks span{color:#0296df}.dag-model .icos{width:32px;height:32px;margin:2px;border-radius:3px;position:relative;z-index:9}.dag-model .icos-SHELL{background:url("+i(n(909))+") no-repeat 50% 50%}.dag-model .icos-SUB_PROCESS{background:url("+i(n(910))+") no-repeat 50% 50%}.dag-model .icos-PROCEDURE{background:url("+i(n(911))+") no-repeat 50% 50%}.dag-model .icos-SQL{background:url("+i(n(912))+") no-repeat 50% 50%}.dag-model .icos-SPARK{background:url("+i(n(913))+") no-repeat 50% 50%}.dag-model .icos-MR{background:url("+i(n(914))+") no-repeat 50% 50%}.dag-model .icos-PYTHON{background:url("+i(n(915))+") no-repeat 50% 50%}.dag-model .icos-DEPENDENT{background:url("+i(n(916))+") no-repeat 50% 50%}.dag-model .toolbar{width:60px;height:100%;background:#f2f3f7;float:left;border-radius:0 0 0 3px}.dag-model .toolbar .title{height:40px;line-height:40px;background:#40434c;text-align:center;border-radius:3px 0 0 0}.dag-model .toolbar .title span{font-size:14px;color:#fff;font-weight:700}.dag-model .toolbar .toolbar-btn{overflow:hidden;padding:11px 11px 0}.dag-model .toolbar .toolbar-btn .bar-box{width:36px;height:36px;float:left;margin-bottom:11px;border-radius:3px}.dag-model .toolbar .toolbar-btn .bar-box .disabled .icos{opacity:.6;-webkit-filter:grayscale(100%);-moz-filter:grayscale(100%);-ms-filter:grayscale(100%);-o-filter:grayscale(100%);filter:grayscale(100%);filter:gray}.dag-model .toolbar .toolbar-btn .bar-box:nth-child(odd){margin-right:6px}.dag-model .toolbar .toolbar-btn .bar-box.active{background:#e1e2e3}.dag-model .dag-contect{float:left;width:calc(100% - 60px);height:100%}.dag-model .dag-contect .dag-toolbar{height:40px;background:#f2f3f7;position:relative;border-radius:0 3px 0 0}.dag-model .dag-contect .dag-toolbar .assist-btn{position:absolute;left:10px;top:8px}.dag-model .dag-contect .dag-toolbar .assist-btn>.name{padding-left:6px;vertical-align:middle}.dag-model .dag-contect .dag-toolbar .save-btn{position:absolute;right:8px;top:6px}.dag-model .dag-contect .dag-toolbar .save-btn .operation{overflow:hidden;display:inline-block;margin-right:10px}.dag-model .dag-contect .dag-toolbar .save-btn .operation a{float:left;width:28px;height:28px;text-align:center;line-height:28px;margin-left:6px;border-radius:3px;vertical-align:middle}.dag-model .dag-contect .dag-toolbar .save-btn .operation a i{color:#333}.dag-model .dag-contect .dag-toolbar .save-btn .operation a.active{background:#e1e2e3}.dag-model .dag-contect .dag-toolbar .save-btn .operation a.active i{color:#2d8cf0}.dag-model .dag-contect .dag-toolbar .save-btn .operation a.disable i{color:#bbb}.dag-model .dag-contect .dag-container{height:calc(100% - 40px);overflow-x:auto}.dag-model .dag-contect .dag-container::-webkit-scrollbar{width:9px}.dag-model .tools-model{height:60px;background:#f4f5f4;border-radius:3px 3px 0 0}.v-modal-custom-log{z-index:101}svg path:hover{cursor:pointer}#chart-container .ui-selected span,#chart-container .ui-selecting span{color:#0296df}.contextmenu{position:fixed;width:90px;background:#fff;border-radius:3px;box-shadow:0 2px 4px 1px rgba(0,0,0,.1);padding:4px 0;visibility:hidden}.contextmenu a{height:30px;line-height:28px;display:block}.contextmenu a i{font-size:16px;vertical-align:middle;margin-left:10px}.contextmenu a span{vertical-align:middle;font-size:12px;color:#666;padding-left:2px}.contextmenu a:hover{background:#f6faff}.contextmenu a#startRunning i{color:#35cd75}.contextmenu a#editNodes i{color:#0097e0}.contextmenu a#removeNodes i{color:#f04d4e}.contextmenu a#copyNodes i{color:#fabc05}.contextmenu a.disbled i,.contextmenu a.disbled span{color:#aaa!important}.jtk-demo{width:8000px;height:5000px;position:relative}.jtk-demo svg:not(:root){z-index:11}.jtk-demo-canvas{height:100%}.jtk-bootstrap{min-height:100vh;display:flex;flex-direction:column}.jtk-bootstrap .jtk-page-container{display:flex;width:100vw;justify-content:center;flex:1}.jtk-bootstrap .jtk-container{width:60%;max-width:800px}.jtk-bootstrap-wide .jtk-container{width:80%;max-width:1187px}.jtk-demo-main{position:relative;margin-top:98px}.jtk-demo-main .description{font-size:13px;margin-top:25px;padding:13px;margin-bottom:22px;background-color:#f4f5ef}.jtk-demo-main .description li{list-style-type:disc!important}.jtk-demo-canvas{display:flex}.canvas-wide{padding-top:10px;margin-left:0;-ms-transition:all .1s ease-out;-moz-transition:all .1s ease-out;-webkit-transition:all .1s ease-out;-o-transition:all .1s ease-out}.jtk-demo-dataset{text-align:left;max-height:600px;overflow:auto}.demo-title{float:left;font-size:18px}.controls{top:25px;color:#fff;margin-right:10px;position:absolute;left:25px;z-index:1}.controls i{background-color:#3e7e9c;border-radius:4px;cursor:pointer;margin-right:0;padding:4px}.w{position:absolute;z-index:4;font-size:11px;-webkit-transition:background-color .25s ease-in;-moz-transition:background-color .25s ease-in;transition:background-color .25s ease-in;border:7px solid transparent;border-bottom:30px solid transparent}.w .icos{width:50px;height:50px;box-shadow:2px 2px 19px #e0e0e0;-o-box-shadow:2px 2px 19px #e0e0e0;-webkit-box-shadow:2px 2px 19px #e0e0e0;-moz-box-shadow:2px 2px 19px #e0e0e0;-moz-border-radius:8px;border-radius:8px;opacity:.8;cursor:move;background-color:#fff}.w .name-p{position:absolute;left:50%;bottom:-24px;width:200px;text-align:center;margin-left:-100px}.w .ban-p{position:absolute;left:-4px;top:36px;z-index:21}.w .ban-p i{font-size:18px;color:red;cursor:pointer}.w .state-p{width:20px;height:20px;position:absolute;top:-20px;left:18px;text-align:center;cursor:pointer}.w .state-p b{font-weight:400}.aLabel{-webkit-transition:background-color .25s ease-in;-moz-transition:background-color .25s ease-in;transition:background-color .25s ease-in}.aLabel.jtk-hover .icos,.jtk-source-hover .icos,.jtk-target-hover .icos{background-color:#333;color:#333}.aLabel.jtk-hover .icos,.jtk-source-hover .icos,.jtk-target-hover .icos,.jtk-tasks-active .icos{-ms-transition:all .6s ease-out;-moz-transition:all .6s ease-out;-webkit-transition:all .6s ease-out;-o-transition:all .6s ease-out}.jtk-tasks-active .icos{background-color:#2db7f5;color:#0097e0}.aLabel{background-color:#fff;opacity:.8;padding:.3em;border-radius:.5em;border:1px solid #346789;cursor:pointer}.jtk-ep .ep{display:block}.ep{position:absolute;top:-4%;right:-1px;width:1em;height:1em;z-index:12;background-color:orange;cursor:pointer;box-shadow:0 0 2px #000;-webkit-transition:-webkit-box-shadow .25s ease-in;-moz-transition:-moz-box-shadow .25s ease-in;transition:box-shadow .25s ease-in;border-radius:100%;display:none}.ep:hover{box-shadow:0 0 6px #000}.statemachine-demo .jtk-endpoint{z-index:3}#canvas .dot-style{opacity:0}.from-mirror{width:100%;position:relative;z-index:0}.from-mirror .CodeMirror{height:auto;min-height:72px}.from-mirror .CodeMirror-scroll{height:auto;min-height:72px;overflow-y:hidden;overflow-x:auto}.ans-drawer.ans-drawer-right{width:628px;left:auto}",""])},908:function(t,e,n){t.exports=n.p+"images/dag_bg.png?6a0c3839385c7d50f21acf06989addf4"},909:function(t,e,n){t.exports=n.p+"images/toolbar_SHELL.png?249b36a2f0687b942c0dc26e85bf5c5d"},910:function(t,e,n){t.exports=n.p+"images/toolbar_SUB_PROCESS.png?a5d6b24489e0142c643821cb30f0fa16"},911:function(t,e,n){t.exports=n.p+"images/toolbar_PROCEDURE.png?9418236aaa8d10bda2ba72ff70b4cd94"},912:function(t,e,n){t.exports=n.p+"images/toolbar_SQL.png?ffd333b2d8f16967463a90dc431ce604"},913:function(t,e,n){t.exports=n.p+"images/toolbar_SPARK.png?4fb1f1c7acb1fcbe5ffd39bf99cf2453"},914:function(t,e,n){t.exports=n.p+"images/toolbar_MR.png?835bcf5a478ab55c8fe7510ad6c4ee7e"},915:function(t,e,n){t.exports=n.p+"images/toolbar_PYTHON.png?b2f3d6aa01059c43b4d6dff6a37f8bc4"},916:function(t,e,n){t.exports=n.p+"images/toolbar_DEPENDENT.png?392311ad751588b7dd0e5f842d217254"},917:function(t,e,n){"use strict";e.__esModule=!0;var i=l(n(28)),r=n(721),o=l(n(774)),s=l(n(919)),a=l(n(91));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){this.dag={},this.instance={}};c.prototype.init=function(t){var e=t.dag,n=t.instance;this.dag=e,this.instance=n},c.prototype.setConfig=function(t){o.default.setConfig(t)},c.prototype.create=function(){var t=this;r.jsPlumb.ready(function(){o.default.init({dag:t.dag,instance:t.instance}),o.default.handleEvent(),o.default.draggable()})},c.prototype.toolbarEvent=function(t){var e=t.item,n=t.code,i=t.is;switch(n){case"pointer":o.default.handleEventPointer(i);break;case"line":o.default.handleEventLine(i);break;case"remove":o.default.handleEventRemove();break;case"screen":o.default.handleEventScreen({item:e,is:i});break;case"download":s.default.download({dagThis:this.dag})}},c.prototype.backfill=function(){var t=this;r.jsPlumb.ready(function(){o.default.init({dag:t.dag,instance:t.instance}),o.default.jspBackfill({connects:i.default.cloneDeep(a.default.state.dag.connects),locations:i.default.cloneDeep(a.default.state.dag.locations),largeJson:i.default.cloneDeep(a.default.state.dag.tasks)})})},c.prototype.saveStore=function(){return o.default.saveStore()},e.default=new c},918:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n(71)),r=o(n(597));function o(t){return t&&t.__esModule?t:{default:t}}var s=function(){this.element={},this.zoom={},this.scale=1};s.prototype.init=function(){var t=this,e=(0,i.default)("#canvas");this.element=r.default.select("#canvas"),this.zoom=r.default.behavior.zoom().scaleExtent([.5,2]).on("zoom",function(){t.scale=r.default.event.scale,e.css("transform","translate("+r.default.event.translate[0]+"px,"+r.default.event.translate[1]+"px) scale("+t.scale+")"),e.css("transform-origin","0 0")}),this.element.call(this.zoom).on("dblclick.zoom",null)},e.default=new s},919:function(t,e,n){"use strict";e.__esModule=!0;var i=l(n(28)),r=l(n(598)),o=n(698),s=l(n(599)),a=n(125);function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){this.dag={}};c.prototype.maxVal=function(){return new Promise(function(t,e){var n=(0,o.tasksAll)(),r=$(".dag-container"),s=parseInt(i.default.maxBy(n,"y").y+60),a=parseInt(i.default.maxBy(n,"x").x+100);t({width:a>600?a:r.width(),height:(s>500?s:r.height())+100})})},c.prototype.download=function(t){var e=this,n=t.dagThis;this.dag=n,this.maxVal().then(function(t){var n=t.width,i=t.height,o=$("#canvas"),l=[],c=[];o.find("svg").each(function(t,e){var n=e.parentNode,i=e.outerHTML.trim(),o=document.createElement("canvas");(0,r.default)(o,i),e.style.position&&(o.style.position+=e.style.position,o.style.left+=e.style.left,o.style.top+=e.style.top),l.push({parent:n,child:e}),n.removeChild(e),c.push({parent:n,child:o}),n.appendChild(o)});var u=document.createElement("canvas");u.width=1*n,u.height=1*i;var d=u.getContext("2d");d.scale(1,1);var h=o.get(0).getBoundingClientRect();d.translate(-h.left,-h.top),(0,s.default)(o[0],{dpi:2*window.devicePixelRatio,scale:1,width:n,canvas:u,heigth:i,useCORS:!0}).then(function(t){var n=e.dag.name+".png",i=t.toDataURL("image/png",1);setTimeout(function(){var t=$("<a>").attr("href",i).attr("download",n).appendTo("body");t[0].click(),t.remove()},100),setTimeout(function(){(0,a.findComponentDownward)(e.dag.$root,e.dag.type+"-details").init()},500)})})},e.default=new c},920:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(775),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(930);var a=function(t){n(921)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},921:function(t,e,n){var i=n(922);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("943b2760",i,!0,{})},922:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".udp-model{width:616px;min-height:326px;background:#fff;border-radius:3px;padding:20px 0;position:relative}.udp-model .contpi-boxt{max-height:600px;overflow-y:scroll;padding:0 20px}.udp-model .title{line-height:36px;padding-bottom:10px}.udp-model .title span{font-size:16px;color:#333}.udp-model .bottom{position:absolute;bottom:0;left:0;width:100%;text-align:right;height:56px;line-height:56px;border-top:1px solid #dcdedc;background:#fff}.udp-model .bottom .submit{padding-right:20px;margin-top:-4px}.udp-model .bottom .lint-pt{position:absolute;left:20px;top:-2px}.udp-model .bottom .lint-pt>label{font-weight:400}.udp-model .content{padding-bottom:50px}",""])},923:function(t,e,n){var i=n(924);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("65e782c4",i,!0,{})},924:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".user-def-params-model .select-listpp{margin-bottom:6px}.user-def-params-model .select-listpp .lt-add{padding-left:4px}.user-def-params-model .select-listpp .lt-add a .iconfont{font-size:18px;vertical-align:middle;margin-bottom:-2px;display:inline-block}.user-def-params-model .add a .iconfont{font-size:18px;vertical-align:middle;display:inline-block;margin-top:1px}",""])},925:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"user-def-params-model"},[t._l(t.localParamsList,function(e,i){return n("div",{key:e.id,staticClass:"select-listpp",on:{click:function(e){return t._getIndex(i)}}},[n("x-input",{staticStyle:{width:"164px"},attrs:{disabled:t.isDetails,type:"text",placeholder:t.$t("prop(必填)"),maxlength:"64"},on:{"on-blur":function(e){return t._verifProp()}},model:{value:t.localParamsList[i].prop,callback:function(e){t.$set(t.localParamsList[i],"prop",e)},expression:"localParamsList[$index].prop"}}),t._v(" "),n("x-select",{staticStyle:{width:"80px"},attrs:{disabled:t.isDetails||!t.hide},on:{change:t._handleDirectChanged},model:{value:t.localParamsList[i].direct,callback:function(e){t.$set(t.localParamsList[i],"direct",e)},expression:"localParamsList[$index].direct"}},t._l(t.directList,function(t){return n("x-option",{key:t.code,attrs:{value:t.code,label:t.code}})}),1),t._v(" "),n("x-select",{staticStyle:{width:"118px"},attrs:{disabled:t.isDetails||!t.hide},on:{change:t._handleTypeChanged},model:{value:t.localParamsList[i].type,callback:function(e){t.$set(t.localParamsList[i],"type",e)},expression:"localParamsList[$index].type"}},t._l(t.typeList,function(t){return n("x-option",{key:t.code,attrs:{value:t.code,label:t.code}})}),1),t._v(" "),n("x-input",{staticStyle:{width:"150px",position:"relative","margin-bottom":"-2px"},attrs:{disabled:t.isDetails,type:"text",placeholder:t.$t("value(选填)"),maxlength:"64"},on:{"on-blur":function(e){return t._handleValue()}},model:{value:t.localParamsList[i].value,callback:function(e){t.$set(t.localParamsList[i],"value",e)},expression:"localParamsList[$index].value"}}),t._v(" "),n("span",{staticClass:"lt-add"},[n("a",{staticStyle:{color:"red"},attrs:{href:"javascript:"},on:{click:function(e){!t.isDetails&&t._removeUdp(i)}}},[n("i",{staticClass:"iconfont",class:t._isDetails,attrs:{"data-toggle":"tooltip",title:t.$t("删除")}},[t._v("")])])]),t._v(" "),i===t.localParamsList.length-1?n("span",{staticClass:"add"},[n("a",{attrs:{href:"javascript:"},on:{click:function(e){!t.isDetails&&t._addUdp()}}},[n("i",{staticClass:"iconfont",class:t._isDetails,attrs:{"data-toggle":"tooltip",title:t.$t("添加")}},[t._v("")])])]):t._e()],1)}),t._v(" "),t.localParamsList.length?t._e():n("span",{staticClass:"add"},[n("a",{attrs:{href:"javascript:"},on:{click:function(e){!t.isDetails&&t._addUdp()}}},[n("i",{staticClass:"iconfont",class:t._isDetails,attrs:{"data-toggle":"tooltip",title:t.$t("添加")}},[t._v("")])])])],2)},staticRenderFns:[]};e.a=i},926:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(778),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(929);var a=function(t){n(927)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},927:function(t,e,n){var i=n(928);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("6b10ab61",i,!0,{})},928:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".affirm-model .popup-model .top-p{height:50px}.affirm-model .popup-model .content-p{min-height:0;min-width:250px}",""])},929:function(t,e,n){"use strict";var i={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"affirm-model"},[e("m-popup",{attrs:{"ok-text":this.$t("确认保存"),nameText:this.$t("是否保存DAG图")},on:{close:this._close,ok:this._ok}})],1)},staticRenderFns:[]};e.a=i},930:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"udp-model"},[n("div",{staticClass:"scrollbar contpi-boxt"},[n("div",{staticClass:"title"},[n("span",[t._v(t._s(t.$t("设置DAG图名称")))])]),t._v(" "),n("div",[n("x-input",{attrs:{type:"text",disabled:"projects-instance-details"===t.router.history.current.name,placeholder:t.$t("请输入name(必填)")},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}})],1),t._v(" "),"projects-instance-details"!==t.router.history.current.name?[n("div",{staticStyle:{"padding-top":"12px"}},[n("x-input",{attrs:{type:"textarea",autosize:{minRows:2},placeholder:t.$t("请输入desc(选填)"),autocomplete:"off"},model:{value:t.desc,callback:function(e){t.desc=e},expression:"desc"}})],1)]:t._e(),t._v(" "),n("div",{staticClass:"title",staticStyle:{"padding-top":"6px"}},[n("span",[t._v(t._s(t.$t("设置全局")))])]),t._v(" "),n("div",{staticClass:"content"},[n("div",[n("m-local-params",{ref:"refLocalParams",attrs:{"udp-list":t.udpList,hide:!1},on:{"on-local-params":t._onLocalParams}})],1)])],2),t._v(" "),n("div",{staticClass:"bottom"},[n("div",{staticClass:"submit"},["projects-instance-details"===t.router.history.current.name?[n("div",{staticClass:"lint-pt"},[n("x-checkbox",{model:{value:t.syncDefine,callback:function(e){t.syncDefine=e},expression:"syncDefine"}},[t._v(t._s(t.$t("是否更新流程定义")))])],1)]:t._e(),t._v(" "),n("x-button",{attrs:{type:"text"},on:{click:function(e){return t.close()}}},[t._v(" "+t._s(t.$t("取消"))+" ")]),t._v(" "),n("x-button",{directives:[{name:"ps",rawName:"v-ps",value:["GENERAL_USER"],expression:"['GENERAL_USER']"}],attrs:{type:"primary",shape:"circle"},on:{click:function(e){return t.ok()}}},[t._v(t._s(t.$t("添加")))])],2)])])},staticRenderFns:[]};e.a=i},931:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(779),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(980);var a=function(t){n(932)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},932:function(t,e,n){var i=n(933);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("12da3a93",i,!0,{})},933:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".form-model-model{width:720px;position:relative}.form-model-model .title-box{height:61px;border-bottom:1px solid #dcdedc;position:relative}.form-model-model .title-box .name{position:absolute;left:24px;top:18px;font-size:16px}.form-model-model .title-box .go-subtask{position:absolute;right:30px;top:17px}.form-model-model .title-box .go-subtask a{font-size:14px;color:#0097e0;margin-left:10px}.form-model-model .title-box .go-subtask a i.iconfont{font-size:18px;vertical-align:middle}.form-model-model .title-box .go-subtask a em{color:#333;font-style:normal;vertical-align:middle;padding-left:2px}.form-model-model .title-box .go-subtask a:hover em{text-decoration:underline}.form-model-model .bottom-box{position:absolute;bottom:0;left:0;width:100%;text-align:right;height:60px;line-height:60px;border-top:1px solid #dcdedc;background:#fff}.form-model-model .bottom-box .submit{padding-right:20px;position:relative;z-index:9}.form-model-model .content-box{overflow-y:scroll;height:calc(100vh - 61px);padding-bottom:60px}.from-model{padding-top:26px}.from-model>div{clear:both}.from-model .list{position:relative;margin-bottom:10px}.from-model .list .text-box{width:110px;float:left;text-align:right;margin-right:10px}.from-model .list .text-box>span{font-size:14px;color:#777;display:inline-block;padding-top:6px}.from-model .list .cont-box{width:580px;float:left}.from-model .list .cont-box .label-box{width:100%}.from-model .list .cont-box .text-b{font-size:14px;color:#777;display:inline-block;padding:0 6px 0 20px}.from-model .list .add{line-height:32px}.from-model .list .add a{color:#0097e0}.from-model .list .list-t{width:50%;float:left}",""])},934:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(780),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(943);var a=function(t){n(935)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},935:function(t,e,n){var i=n(936);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("0e2ba7fa",i,!0,{})},936:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".spark-model .list-box-4p .list{margin-bottom:14px}.spark-model .list-box-4p .list .sp1{float:left;width:112px;text-align:right;margin-right:10px;font-size:14px;color:#777;display:inline-block;padding-top:6px}.spark-model .list-box-4p .list .sp2{float:left;margin-right:4px}",""])},937:function(t,e,n){var i=n(938);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("5fa6a761",i,!0,{})},938:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".cont-box .label-box .ans-radio-group{margin-top:7px}.v-checkbox-wrapper.v-checkbox-wrapper-disabled{color:#999}.v-checkbox-wrapper.v-checkbox-wrapper-disabled .v-checkbox .v-checkbox-inner{border-color:#dddee1;background:#f7f7f7;color:#bbbec4}.v-checkbox-wrapper.v-checkbox-wrapper-disabled .v-checkbox .v-checkbox-inner:after{border:2px solid #ddd;border-top:0;border-left:0}",""])},939:function(t,e,n){"use strict";var i={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"clearfix list"},[e("div",{staticClass:"text-box"},[e("span",[this._t("text")],2)]),this._v(" "),e("div",{staticClass:"cont-box"},[e("div",{staticClass:"label-box"},[this._t("content")],2)])])},staticRenderFns:[]};e.a=i},940:function(t,e,n){var i=n(941);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("5e8391b0",i,!0,{})},941:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".resource-list-model .select-listpp{margin-bottom:6px}.resource-list-model .select-listpp .lt-add{padding-left:4px}.resource-list-model .select-listpp .lt-add a .iconfont{font-size:18px;vertical-align:middle;margin-bottom:-2px;display:inline-block}.resource-list-model>.add a .iconfont{font-size:18px;vertical-align:middle;display:inline-block;margin-top:1px}",""])},942:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"resource-list-model"},[n("x-select",{staticStyle:{width:"100%"},attrs:{multiple:"",filterable:"",disabled:t.isDetails,placeholder:t.$t("请选择资源")},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t._l(t.resList,function(t){return n("x-option",{key:t.code,attrs:{value:t.code,label:t.code}})}),1)],1)},staticRenderFns:[]};e.a=i},943:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"spark-model"},[n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("程序类型")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-select",{staticStyle:{width:"100px"},attrs:{disabled:t.isDetails},model:{value:t.programType,callback:function(e){t.programType=e},expression:"programType"}},t._l(t.programTypeList,function(t){return n("x-option",{key:t.code,attrs:{value:t.code,label:t.code}})}),1)],1)]),t._v(" "),"PYTHON"!==t.programType?n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("主函数的class")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("请输入mainClass"),autocomplete:"off"},model:{value:t.mainClass,callback:function(e){t.mainClass=e},expression:"mainClass"}})],1)]):t._e(),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("主jar包")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("请选择主jar包"),filterable:"",disabled:t.isDetails},model:{value:t.mainJar,callback:function(e){t.mainJar=e},expression:"mainJar"}},t._l(t.mainJarList,function(t){return n("x-option",{key:t.code,attrs:{value:t.code,label:t.code}})}),1)],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("命令行参数")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{autosize:{minRows:2},disabled:t.isDetails,type:"textarea",placeholder:t.$t("请输入命令行参数"),autocomplete:"off"},model:{value:t.mainArgs,callback:function(e){t.mainArgs=e},expression:"mainArgs"}})],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("其他参数")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{disabled:t.isDetails,autosize:{minRows:2},type:"textarea",placeholder:t.$t("请输入其他参数"),autocomplete:"off"},model:{value:t.others,callback:function(e){t.others=e},expression:"others"}})],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("资源")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-resources",{ref:"refResources",attrs:{"resource-list":t.resourceList},on:{"on-resourcesData":t._onResourcesData}})],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("自定义参数")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-local-params",{ref:"refLocalParams",attrs:{"udp-list":t.localParams,hide:!1},on:{"on-local-params":t._onLocalParams}})],1)])],1)},staticRenderFns:[]};e.a=i},944:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(783),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(952),a=n(27)(r.a,s.a,!1,null,null,null);e.default=a.exports},945:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(784),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(948);var a=function(t){n(946)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},946:function(t,e,n){var i=n(947);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("323d7c56",i,!0,{})},947:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".udfs-model .add-udfs{color:#0097e0}.udfs-model .t-list{margin-bottom:14px}.udfs-model .t-list .v-btn{width:208px}.udfs-model .t-list .delect-btn{display:inline-block;width:54px!important;vertical-align:middle;background:red;border-color:red}.udfs-model .t-list .delect-btn span{vertical-align:middle!important}",""])},948:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"udfs-model"},[n("x-select",{staticStyle:{width:"100%"},attrs:{multiple:"",disabled:t.isDetails},model:{value:t.udfsStr,callback:function(e){t.udfsStr=e},expression:"udfsStr"}},t._l(t.udfsList,function(t){return n("x-option",{key:t.id,attrs:{value:t,label:t.code}})}),1)],1)},staticRenderFns:[]};e.a=i},949:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(785),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(950),a=n(27)(r.a,s.a,!1,null,null,null);e.default=a.exports},950:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"sql-type-model"},[n("x-select",{staticStyle:{width:"90px"},attrs:{disabled:t.isDetails},on:{"on-change":t._handleSqlTypeChanged},model:{value:t.sqlTypeId,callback:function(e){t.sqlTypeId=e},expression:"sqlTypeId"}},t._l(t.sqlTypeList,function(t){return n("x-option",{key:t.id,attrs:{value:t,label:t.code}})}),1)],1)},staticRenderFns:[]};e.a=i},951:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"datasource-model"},[n("div",{staticClass:"select-listpp"},[n("x-select",{staticStyle:{width:"160px"},attrs:{disabled:t.isDetails},on:{"on-change":t._handleTypeChanged},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},t._l(t.typeList,function(t){return n("x-option",{key:t.code,attrs:{value:t.code,label:t.code}})}),1),t._v(" "),n("x-select",{staticStyle:{width:"288px"},attrs:{placeholder:t.$t("请选择数据源"),disabled:t.isDetails},model:{value:t.datasource,callback:function(e){t.datasource=e},expression:"datasource"}},t._l(t.datasourceList,function(t){return n("x-option",{key:t.id,attrs:{value:t,label:t.code}})}),1)],1)])},staticRenderFns:[]};e.a=i},952:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"sql-model"},[n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("数据源")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-datasource",{ref:"refDs",attrs:{data:{type:t.type,datasource:t.datasource}},on:{"on-dsData":t._onDsData}})],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("sql类型")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("div",{staticStyle:{display:"inline-block"}},[n("m-sql-type",{attrs:{"sql-type":t.sqlType},on:{"on-sqlType":t._onSqlType}})],1),t._v(" "),t.sqlType?t._e():n("div",{staticStyle:{display:"inline-block","padding-left":"10px","margin-top":"2px"}},[n("x-checkbox-group",{model:{value:t.showType,callback:function(e){t.showType=e},expression:"showType"}},[n("x-checkbox",{attrs:{label:"TABLE",disabled:t.isDetails}},[t._v(t._s(t.$t("表格")))]),t._v(" "),n("x-checkbox",{attrs:{label:"ATTACHMENT",disabled:t.isDetails}},[t._v(t._s(t.$t("附件")))])],1)],1)])]),t._v(" "),n("m-list-box",{directives:[{name:"show",rawName:"v-show",value:"HIVE"===t.type,expression:"type === 'HIVE'"}]},[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("sql参数")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("请输入格式为")+" key1=value1;key2=value2...",autocomplete:"off"},model:{value:t.connParams,callback:function(e){t.connParams=e},expression:"connParams"}})],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("sql语句")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("div",{staticClass:"from-mirror"},[n("textarea",{staticStyle:{opacity:"0"},attrs:{id:"code-sql-mirror",name:"code-sql-mirror"}})])])]),t._v(" "),"HIVE"===t.type?n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("UDF函数")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-udfs",{ref:"refUdfs",attrs:{udfs:t.udfs,type:t.type},on:{"on-udfsData":t._onUdfsData}})],1)]):t._e(),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("自定义参数")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-local-params",{ref:"refLocalParams",attrs:{"udp-list":t.localParams},on:{"on-udpData":t._onUdpData}})],1)])],1)},staticRenderFns:[]};e.a=i},953:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(788),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(954),a=n(27)(r.a,s.a,!1,null,null,null);e.default=a.exports},954:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"shell-model"},[n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("脚本")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("div",{staticClass:"from-mirror"},[n("textarea",{staticStyle:{opacity:"0"},attrs:{id:"code-shell-mirror",name:"code-shell-mirror"}})])])]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("资源")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-resources",{ref:"refResources",attrs:{"resource-list":t.resourceList},on:{"on-resourcesData":t._onResourcesData}})],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("自定义参数")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-local-params",{ref:"refLocalParams",attrs:{"udp-list":t.localParams,hide:!1},on:{"on-local-params":t._onLocalParams}})],1)])],1)},staticRenderFns:[]};e.a=i},955:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(789),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(958);var a=function(t){n(956)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},956:function(t,e,n){var i=n(957);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("0c78d5d0",i,!0,{})},957:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".spark-model .list-box-4p .list{margin-bottom:14px}.spark-model .list-box-4p .list .sp1{float:left;width:112px;text-align:right;margin-right:10px;font-size:14px;color:#777;display:inline-block;padding-top:6px}.spark-model .list-box-4p .list .sp2{float:left;margin-right:4px}.spark-model .list-box-4p .list .sp3{width:176px}",""])},958:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"spark-model"},[n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("程序类型")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-select",{staticStyle:{width:"130px"},attrs:{disabled:t.isDetails},model:{value:t.programType,callback:function(e){t.programType=e},expression:"programType"}},t._l(t.programTypeList,function(t){return n("x-option",{key:t.code,attrs:{value:t.code,label:t.code}})}),1)],1)]),t._v(" "),"PYTHON"!==t.programType?n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("主函数的class")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("请输入mainClass"),autocomplete:"off"},model:{value:t.mainClass,callback:function(e){t.mainClass=e},expression:"mainClass"}})],1)]):t._e(),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("主jar包")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("请选择主jar包"),filterable:"",disabled:t.isDetails},model:{value:t.mainJar,callback:function(e){t.mainJar=e},expression:"mainJar"}},t._l(t.mainJarList,function(t){return n("x-option",{key:t.code,attrs:{value:t.code,label:t.code}})}),1)],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("部署方式")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-radio-group",{model:{value:t.deployMode,callback:function(e){t.deployMode=e},expression:"deployMode"}},[n("x-radio",{attrs:{label:"cluster",disabled:t.isDetails}}),t._v(" "),n("x-radio",{attrs:{label:"client",disabled:t.isDetails}}),t._v(" "),n("x-radio",{attrs:{label:"local",disabled:t.isDetails}})],1)],1)]),t._v(" "),n("div",{staticClass:"list-box-4p"},[n("div",{staticClass:"clearfix list"},[n("span",{staticClass:"sp1"},[t._v(t._s(t.$t("Driver内核数")))]),t._v(" "),n("span",{staticClass:"sp2"},[n("x-input",{staticStyle:{width:"200px"},attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("请输入Driver内核数"),autocomplete:"off"},model:{value:t.driverCores,callback:function(e){t.driverCores=e},expression:"driverCores"}})],1),t._v(" "),n("span",{staticClass:"sp1 sp3"},[t._v(t._s(t.$t("Driver内存数")))]),t._v(" "),n("span",{staticClass:"sp2"},[n("x-input",{staticStyle:{width:"186px"},attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("请输入Driver内存数"),autocomplete:"off"},model:{value:t.driverMemory,callback:function(e){t.driverMemory=e},expression:"driverMemory"}})],1)]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("span",{staticClass:"sp1"},[t._v(t._s(t.$t("Executor数量")))]),t._v(" "),n("span",{staticClass:"sp2"},[n("x-input",{staticStyle:{width:"200px"},attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("请输入Executor数量"),autocomplete:"off"},model:{value:t.numExecutors,callback:function(e){t.numExecutors=e},expression:"numExecutors"}})],1),t._v(" "),n("span",{staticClass:"sp1 sp3"},[t._v(t._s(t.$t("Executor内存数")))]),t._v(" "),n("span",{staticClass:"sp2"},[n("x-input",{staticStyle:{width:"186px"},attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("请输入Executor内存数"),autocomplete:"off"},model:{value:t.executorMemory,callback:function(e){t.executorMemory=e},expression:"executorMemory"}})],1)]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("span",{staticClass:"sp1"},[t._v(t._s(t.$t("Executor内核数")))]),t._v(" "),n("span",{staticClass:"sp2"},[n("x-input",{staticStyle:{width:"200px"},attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("请输入Executor内核数"),autocomplete:"off"},model:{value:t.executorCores,callback:function(e){t.executorCores=e},expression:"executorCores"}})],1)])]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("命令行参数")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{autosize:{minRows:2},disabled:t.isDetails,type:"textarea",placeholder:t.$t("请输入命令行参数"),autocomplete:"off"},model:{value:t.mainArgs,callback:function(e){t.mainArgs=e},expression:"mainArgs"}})],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("其他参数")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{disabled:t.isDetails,autosize:{minRows:2},type:"textarea",placeholder:t.$t("请输入其他参数")},model:{value:t.others,callback:function(e){t.others=e},expression:"others"}})],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("资源")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-resources",{ref:"refResources",attrs:{"resource-list":t.resourceList},on:{"on-resourcesData":t._onResourcesData}})],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("自定义参数")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-local-params",{ref:"refLocalParams",attrs:{"udp-list":t.localParams,hide:!1},on:{"on-local-params":t._onLocalParams}})],1)])],1)},staticRenderFns:[]};e.a=i},959:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(790),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(960),a=n(27)(r.a,s.a,!1,null,null,null);e.default=a.exports},960:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"shell-model"},[n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("脚本")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("div",{staticClass:"from-mirror"},[n("textarea",{staticStyle:{opacity:"0"},attrs:{id:"code-python-mirror",name:"code-python-mirror"}})])])]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("资源")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-resources",{ref:"refResources",attrs:{"resource-list":t.resourceList},on:{"on-resourcesData":t._onResourcesData}})],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("自定义参数")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-local-params",{ref:"refLocalParams",attrs:{"udp-list":t.localParams,hide:!1},on:{"on-local-params":t._onLocalParams}})],1)])],1)},staticRenderFns:[]};e.a=i},961:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(791),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(964);var a=function(t){n(962)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},962:function(t,e,n){var i=n(963);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("2f56b82a",i,!0,{})},963:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,"",""])},964:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"procedure-model"},[n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("数据源")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-datasource",{ref:"refDs",attrs:{supportType:["MYSQL","POSTGRESQL"],data:{type:t.type,datasource:t.datasource}},on:{"on-dsData":t._onDsData}})],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("方法")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{type:"input",disabled:t.isDetails,placeholder:t.$t("请输入method(选填)"),autocomplete:"off"},model:{value:t.method,callback:function(e){t.method=e},expression:"method"}})],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("自定义参数")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-local-params",{ref:"refLocalParams",attrs:{"udp-list":t.localParams},on:{"on-local-params":t._onLocalParams}})],1)])],1)},staticRenderFns:[]};e.a=i},965:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(792),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(972);var a=function(t){n(966)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},966:function(t,e,n){var i=n(967);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("cd1033ee",i,!0,{})},967:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".dependence-model{margin-top:-10px}.dependence-model .dep-opt{margin-bottom:10px;padding-top:3px;line-height:24px}.dependence-model .dep-opt .add-dep{color:#0097e0;margin-right:10px}.dependence-model .dep-opt .add-dep i{font-size:18px;vertical-align:middle}.dependence-model .dep-list{margin-bottom:16px;position:relative;border-left:1px solid #eee;padding-left:16px;margin-left:-16px;transition:all .2s ease-out;padding-bottom:20px}.dependence-model .dep-list:hover{border-left:1px solid #0097e0;transition:all .2s ease-out}.dependence-model .dep-list:hover .dep-line-pie{transition:all .2s ease-out;border:1px solid #0097e0;background:#0097e0;color:#fff}.dependence-model .dep-list .dep-line-pie{transition:all .2s ease-out;position:absolute;width:20px;height:20px;border:1px solid #e2e2e2;text-align:center;top:50%;margin-top:-20px;z-index:1;left:-10px;border-radius:10px;background:#fff;font-size:12px;cursor:pointer}.dependence-model .dep-list .dep-line-pie::selection{background:transparent}.dependence-model .dep-list .dep-line-pie::-moz-selection{background:transparent}.dependence-model .dep-list .dep-line-pie::-webkit-selection{background:transparent}.dependence-model .dep-list .dep-delete{position:absolute;bottom:-6px;left:14px;font-size:18px;color:red;cursor:pointer}.dependence-model .dep-box{border-left:4px solid #eee;margin-left:-46px;padding-left:42px;position:relative}.dependence-model .dep-box .dep-relation{position:absolute;width:20px;height:20px;border:1px solid #e2e2e2;text-align:center;top:50%;margin-top:-10px;z-index:1;left:-12px;border-radius:10px;background:#fff;font-size:12px;cursor:pointer}.dependence-model .dep-box .dep-relation::selection{background:transparent}.dependence-model .dep-box .dep-relation::-moz-selection{background:transparent}.dependence-model .dep-box .dep-relation::-webkit-selection{background:transparent}",""])},968:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(793),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(971);var a=function(t){n(969)},l=n(27)(r.a,s.a,!1,a,null,null);e.default=l.exports},969:function(t,e,n){var i=n(970);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("3fb67eba",i,!0,{})},970:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".dep-list-model{position:relative;min-height:32px}.dep-list-model .list{margin-bottom:6px}.dep-list-model .list .operation{padding-left:4px}.dep-list-model .list .operation a i{font-size:18px;vertical-align:middle}.dep-list-model .list .operation .delete{color:red}.dep-list-model .list .operation .add{color:#0097e0}.dep-list-model .instance-state{display:inline-block;width:24px}.dep-list-model .instance-state .iconfont{font-size:20px;vertical-align:middle;cursor:pointer;margin-left:6px}.dep-list-model .instance-state .iconfont.icon-SUCCESS{color:#3c0}.dep-list-model .instance-state .iconfont.icon-WAITING{color:#888}.dep-list-model .instance-state .iconfont.icon-FAILED{color:#f31322}",""])},971:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dep-list-model"},t._l(t.dependItemList,function(e,i){return n("div",{staticClass:"list",on:{click:function(e){t.itemIndex=i}}},[n("x-select",{style:{width:t.isInstance?"140px":"162px"},attrs:{filterable:"",disabled:t.isDetails},on:{"on-change":t._onChangeDefinitionId},model:{value:e.definitionId,callback:function(n){t.$set(e,"definitionId",n)},expression:"el.definitionId"}},t._l(t.definitionList,function(t){return n("x-option",{key:t.value,attrs:{value:t.value,label:t.label}})}),1),t._v(" "),n("x-select",{style:{width:t.isInstance?"144px":"156px"},attrs:{filterable:"",disabled:t.isDetails},model:{value:e.depTasks,callback:function(n){t.$set(e,"depTasks",n)},expression:"el.depTasks"}},t._l(e.depTasksList||[],function(t){return n("x-option",{key:t,attrs:{value:t,label:t}})}),1),t._v(" "),n("x-select",{staticStyle:{width:"80px"},attrs:{disabled:t.isDetails},on:{"on-change":t._onChangeCycle},model:{value:e.cycle,callback:function(n){t.$set(e,"cycle",n)},expression:"el.cycle"}},t._l(t.cycleList,function(t){return n("x-option",{key:t.value,attrs:{value:t.value,label:t.label}})}),1),t._v(" "),n("x-select",{staticStyle:{width:"116px"},attrs:{disabled:t.isDetails},model:{value:e.dateValue,callback:function(n){t.$set(e,"dateValue",n)},expression:"el.dateValue"}},t._l(e.dateValueList||[],function(t){return n("x-option",{key:t.value,attrs:{value:t.value,label:t.label}})}),1),t._v(" "),t.isInstance?[n("span",{staticClass:"instance-state"},["SUCCESS"===e.state?n("i",{staticClass:"iconfont",class:"icon-"+e.state,attrs:{"data-toggle":"tooltip","data-container":"body",title:t.$t("成功")}},[t._v("")]):t._e(),t._v(" "),"WAITING"===e.state?n("i",{staticClass:"iconfont",class:"icon-"+e.state,attrs:{"data-toggle":"tooltip","data-container":"body",title:t.$t("等待")}},[t._v("")]):t._e(),t._v(" "),"FAILED"===e.state?n("i",{staticClass:"iconfont",class:"icon-"+e.state,attrs:{"data-toggle":"tooltip","data-container":"body",title:t.$t("失败")}},[t._v("")]):t._e()])]:t._e(),t._v(" "),n("span",{staticClass:"operation"},[n("a",{staticClass:"delete",attrs:{href:"javascript:"},on:{click:function(e){!t.isDetails&&t._remove(i)}}},[n("i",{staticClass:"iconfont",class:t._isDetails,attrs:{"data-toggle":"tooltip","data-container":"body",title:t.$t("删除")}},[t._v("")])]),t._v(" "),i===t.dependItemList.length-1?n("a",{staticClass:"add",attrs:{href:"javascript:"},on:{click:function(e){!t.isDetails&&t._add()}}},[n("i",{staticClass:"iconfont",class:t._isDetails,attrs:{"data-toggle":"tooltip","data-container":"body",title:t.$t("添加")}},[t._v("")])]):t._e()])],2)}),0)},staticRenderFns:[]};e.a=i},972:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dependence-model"},[n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("添加依赖")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("div",{staticClass:"dep-opt"},[n("a",{staticClass:"add-dep",attrs:{href:"javascript:"},on:{click:function(e){!t.isDetails&&t._addDep()}}},[t.isLoading?t._e():n("i",{staticClass:"iconfont",class:t._isDetails,attrs:{"data-toggle":"tooltip",title:t.$t("添加")}},[t._v("\n \n ")]),t._v(" "),t.isLoading?n("i",{staticClass:"iconfont fa fa-spin",attrs:{"data-toggle":"tooltip",title:t.$t("添加")}},[t._v("\n \n ")]):t._e()])]),t._v(" "),n("div",{staticClass:"dep-box"},[t.dependTaskList.length?n("span",{staticClass:"dep-relation",on:{click:function(e){!t.isDetails&&t._setGlobalRelation()}}},[t._v("\n "+t._s("AND"===t.relation?t.$t("且"):t.$t("或"))+"\n ")]):t._e(),t._v(" "),t._l(t.dependTaskList,function(e,i){return n("div",{staticClass:"dep-list"},[e.dependItemList.length?n("span",{staticClass:"dep-line-pie",on:{click:function(e){!t.isDetails&&t._setRelation(i)}}},[t._v("\n "+t._s("AND"===e.relation?t.$t("且"):t.$t("或"))+"\n ")]):t._e(),t._v(" "),n("i",{staticClass:"iconfont dep-delete",class:t._isDetails,attrs:{"data-toggle":"tooltip","data-container":"body",title:t.$t("删除")},on:{click:function(e){!t.isDetails&&t._deleteDep(i)}}},[t._v("\n \n ")]),t._v(" "),n("m-depend-item-list",{attrs:{index:i},on:{"on-delete-all":t._onDeleteAll},model:{value:e.dependItemList,callback:function(n){t.$set(e,"dependItemList",n)},expression:"el.dependItemList"}})],1)})],2)])])],1)},staticRenderFns:[]};e.a=i},973:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(794),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(974),a=n(27)(r.a,s.a,!1,null,null,null);e.default=a.exports},974:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"sub_process-model"},[n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text-box"},[n("span",[t._v(t._s(t.$t("子节点")))])]),t._v(" "),n("div",{staticClass:"cont-box"},[n("div",{staticClass:"label-box"},[n("x-select",{staticStyle:{width:"100%"},attrs:{filterable:"",disabled:t.isDetails},on:{"on-change":t._handleWdiChanged},model:{value:t.wdiCurr,callback:function(e){t.wdiCurr=e},expression:"wdiCurr"}},t._l(t.processDefinitionList,function(t){return n("x-option",{key:t.code,attrs:{value:t.id,label:t.code}})}),1)],1)])])])},staticRenderFns:[]};e.a=i},975:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(795),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(976),a=n(27)(r.a,s.a,!1,null,null,null);e.default=a.exports},976:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("x-select",{staticStyle:{width:"170px"},attrs:{disabled:t.isDetails},on:{"on-change":t._onChange},scopedSlots:t._u([{key:"trigger",fn:function(e){var i=e.selectedModel;return t.isInput?n("x-input",{ref:"input",staticStyle:{width:"100%"},attrs:{disabled:t.isDetails,maxlength:"4",placeholder:t.$t("请选择"),value:null===i?"0":i.value},on:{"on-blur":t._onBlur,"on-click-icon":function(e){return e.stopPropagation(),t._ckIcon(e)}}},[n("i",{directives:[{name:"show",rawName:"v-show",value:!t.isIconState,expression:"!isIconState"}],staticClass:"fa fa-times-circle",staticStyle:{"font-size":"15px",cursor:"pointer"},attrs:{slot:"suffix"},slot:"suffix"}),t._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:t.isIconState,expression:"isIconState"}],staticClass:"ans-icon-arrow-down",staticStyle:{"font-size":"12px"},attrs:{slot:"suffix"},slot:"suffix"})]):t._e()}}],null,!0),model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},[t._v(" "),t._l(t.list,function(t){return n("x-option",{key:t,attrs:{value:t,label:t}})})],2)},staticRenderFns:[]};e.a=i},977:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(796),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var s=n(978),a=n(27)(r.a,s.a,!1,null,null,null);e.default=a.exports},978:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"timeout-alarm-model"},[n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text-box"},[n("span",[t._v(t._s(t.$t("任务超时告警")))])]),t._v(" "),n("div",{staticClass:"cont-box"},[n("label",{staticClass:"label-box"},[n("div",{staticStyle:{"padding-top":"5px"}},[n("x-switch",{attrs:{disabled:t.isDetails},on:{"on-click":t._onSwitch},model:{value:t.enable,callback:function(e){t.enable=e},expression:"enable"}})],1)])])]),t._v(" "),t.enable?n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text-box"},[n("span",[t._v(t._s(t.$t("超时策略")))])]),t._v(" "),n("div",{staticClass:"cont-box"},[n("label",{staticClass:"label-box"},[n("div",{staticStyle:{"padding-top":"6px"}},[n("x-checkbox-group",{model:{value:t.strategy,callback:function(e){t.strategy=e},expression:"strategy"}},[n("x-checkbox",{attrs:{label:"WARN",disabled:t.isDetails}},[t._v(t._s(t.$t("超时告警")))]),t._v(" "),n("x-checkbox",{attrs:{label:"FAILED",disabled:t.isDetails}},[t._v(t._s(t.$t("超时失败")))])],1)],1)])])]):t._e(),t._v(" "),t.enable?n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text-box"},[n("span",[t._v(t._s(t.$t("超时时长")))])]),t._v(" "),n("div",{staticClass:"cont-box"},[n("label",{staticClass:"label-box"},[n("x-input",{staticStyle:{width:"128px"},attrs:{disabled:t.isDetails},model:{value:t.interval,callback:function(e){t.interval=e},expression:"interval"}},[n("span",{attrs:{slot:"append"},slot:"append"},[t._v(t._s(t.$t("分")))])])],1)])]):t._e()])},staticRenderFns:[]};e.a=i},979:function(t,e,n){"use strict";e.__esModule=!0;e.default={bind:function(t,e,n){var i=function(i){if(!n.context||t.contains(i.target))return!1;e.expression?n.context[t["@@clickoutsideContext"].methodName](i):t["@@clickoutsideContext"].bindingFn(i)};t["@@clickoutsideContext"]={documentHandler:i,methodName:e.expression,bindingFn:e.value},setTimeout(function(){document.addEventListener("click",i)},0)},update:function(t,e){t["@@clickoutsideContext"].methodName=e.expression,t["@@clickoutsideContext"].bindingFn=e.value},unbind:function(t){document.removeEventListener("click",t["@@clickoutsideContext"].documentHandler)}}},980:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t._handleClose,expression:"_handleClose"}],staticClass:"form-model-model"},[n("div",{staticClass:"title-box"},[n("span",{staticClass:"name"},[t._v(t._s(t.$t("当前节点设置")))]),t._v(" "),n("span",{staticClass:"go-subtask"},[n("m-log",{attrs:{item:t.backfillItem}},[n("template",{slot:"history"},[n("a",{attrs:{href:"javascript:"},on:{click:t._seeHistory}},[n("i",{staticClass:"iconfont"},[t._v("")]),n("em",[t._v(t._s(t.$t("查看历史")))])])]),t._v(" "),n("template",{slot:"log"},[n("a",{attrs:{href:"javascript:"}},[n("i",{staticClass:"iconfont"},[t._v("")]),n("em",[t._v(t._s(t.$t("查看日志")))])])])],2),t._v(" "),t._isGoSubProcess?n("a",{attrs:{href:"javascript:"},on:{click:t._goSubProcess}},[n("i",{staticClass:"iconfont"},[t._v("")]),n("em",[t._v(t._s(t.$t("进入该子节点")))])]):t._e()],1)]),t._v(" "),t.isContentBox?n("div",{staticClass:"content-box"},[n("div",{staticClass:"from-model"},[n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text-box"},[n("span",[t._v(t._s(t.$t("节点名称")))])]),t._v(" "),n("div",{staticClass:"cont-box"},[n("label",{staticClass:"label-box"},[n("x-input",{attrs:{type:"text",disabled:t.isDetails,placeholder:t.$t("请输入name(必填)"),maxlength:"100",autocomplete:"off"},on:{"on-blur":function(e){return t._verifName()}},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}})],1)])]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text-box"},[n("span",[t._v(t._s(t.$t("运行标志")))])]),t._v(" "),n("div",{staticClass:"cont-box"},[n("label",{staticClass:"label-box"},[n("x-radio-group",{model:{value:t.runFlag,callback:function(e){t.runFlag=e},expression:"runFlag"}},[n("x-radio",{attrs:{label:"NORMAL",disabled:t.isDetails}},[t._v(t._s(t.$t("正常")))]),t._v(" "),n("x-radio",{attrs:{label:"FORBIDDEN",disabled:t.isDetails}},[t._v(t._s(t.$t("禁止执行")))])],1)],1)])]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text-box"},[n("span",[t._v(t._s(t.$t("描述")))])]),t._v(" "),n("div",{staticClass:"cont-box"},[n("label",{staticClass:"label-box"},[n("x-input",{attrs:{resize:"",autosize:{minRows:2},type:"textarea",disabled:t.isDetails,placeholder:t.$t("请输入desc"),autocomplete:"off"},model:{value:t.desc,callback:function(e){t.desc=e},expression:"desc"}})],1)])]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text-box"},[n("span",[t._v(t._s(t.$t("任务优先级")))])]),t._v(" "),n("div",{staticClass:"cont-box"},[n("label",{staticClass:"label-box"},[n("m-priority",{staticStyle:{width:"180px"},model:{value:t.taskInstancePriority,callback:function(e){t.taskInstancePriority=e},expression:"taskInstancePriority"}})],1)])]),t._v(" "),"SUB_PROCESS"!==t.taskType?n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text-box"},[n("span",[t._v(t._s(t.$t("失败重试次数")))])]),t._v(" "),n("div",{staticClass:"cont-box"},[n("m-select-input",{attrs:{list:[0,1,2,3,4]},model:{value:t.maxRetryTimes,callback:function(e){t.maxRetryTimes=e},expression:"maxRetryTimes"}}),t._v(" "),n("span",[t._v("("+t._s(t.$t("次"))+")")]),t._v(" "),n("span",{staticClass:"text-b"},[t._v(t._s(t.$t("失败重试间隔")))]),t._v(" "),n("m-select-input",{attrs:{list:[1,10,30,60,120]},model:{value:t.retryInterval,callback:function(e){t.retryInterval=e},expression:"retryInterval"}}),t._v(" "),n("span",[t._v("("+t._s(t.$t("分"))+")")])],1)]):t._e(),t._v(" "),n("m-timeout-alarm",{ref:"timeout",attrs:{"backfill-item":t.backfillItem},on:{"on-timeout":t._onTimeout}}),t._v(" "),"SHELL"===t.taskType?n("m-shell",{ref:"SHELL",attrs:{"backfill-item":t.backfillItem},on:{"on-params":t._onParams}}):t._e(),t._v(" "),"SUB_PROCESS"===t.taskType?n("m-sub-process",{ref:"SUB_PROCESS",attrs:{"backfill-item":t.backfillItem},on:{"on-params":t._onParams,"on-set-process-name":t._onSetProcessName}}):t._e(),t._v(" "),"PROCEDURE"===t.taskType?n("m-procedure",{ref:"PROCEDURE",attrs:{"backfill-item":t.backfillItem},on:{"on-params":t._onParams}}):t._e(),t._v(" "),"SQL"===t.taskType?n("m-sql",{ref:"SQL",attrs:{"backfill-item":t.backfillItem},on:{"on-params":t._onParams}}):t._e(),t._v(" "),"SPARK"===t.taskType?n("m-spark",{ref:"SPARK",attrs:{"backfill-item":t.backfillItem},on:{"on-params":t._onParams}}):t._e(),t._v(" "),"MR"===t.taskType?n("m-mr",{ref:"MR",attrs:{"backfill-item":t.backfillItem},on:{"on-params":t._onParams}}):t._e(),t._v(" "),"PYTHON"===t.taskType?n("m-python",{ref:"PYTHON",attrs:{"backfill-item":t.backfillItem},on:{"on-params":t._onParams}}):t._e(),t._v(" "),"DEPENDENT"===t.taskType?n("m-dependent",{ref:"DEPENDENT",attrs:{"backfill-item":t.backfillItem},on:{"on-dependent":t._onDependent}}):t._e()],1)]):t._e(),t._v(" "),n("div",{staticClass:"bottom-box"},[n("div",{staticClass:"submit",staticStyle:{background:"#fff"}},[n("x-button",{attrs:{type:"text"},on:{click:function(e){return t.close()}}},[t._v(" "+t._s(t.$t("取消"))+" ")]),t._v(" "),n("x-button",{directives:[{name:"ps",rawName:"v-ps",value:["GENERAL_USER"],expression:"['GENERAL_USER']"}],attrs:{type:"primary",shape:"circle",loading:t.spinnerLoading,disabled:t.isDetails},on:{click:function(e){return t.ok()}}},[t._v(t._s(t.spinnerLoading?"Loading...":t.$t("确认添加"))+" ")])],1)])])},staticRenderFns:[]};e.a=i},981:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"clearfix dag-model"},[n("div",{staticClass:"toolbar"},[n("div",{staticClass:"title"},[n("span",[t._v(t._s(t.$t("工具栏")))])]),t._v(" "),n("div",{staticClass:"toolbar-btn"},t._l(t.tasksTypeList,function(e,i){return n("div",{staticClass:"bar-box roundedRect jtk-draggable jtk-droppable jtk-endpoint-anchor jtk-connected",class:i===t.dagBarId?"active":"",attrs:{id:i},on:{mousedown:function(e){return t._getDagId(i)}}},[n("div",{class:t._isDetails,attrs:{"data-toggle":"tooltip",title:e.desc}},[n("div",{staticClass:"icos",class:"icos-"+i})])])}),0)]),t._v(" "),n("div",{staticClass:"dag-contect"},[n("div",{staticClass:"dag-toolbar"},[n("div",{staticClass:"assist-btn"},[n("x-button",{staticStyle:{"vertical-align":"middle"},attrs:{"data-toggle":"tooltip",title:t.$t("查看变量"),"data-container":"body",type:"primary",size:"xsmall",disabled:"projects-instance-details"!==t.$route.name,icon:"fa fa-code"},on:{click:t._toggleView}}),t._v(" "),n("span",{staticClass:"name"},[t._v(t._s(t.name))])],1),t._v(" "),n("div",{staticClass:"save-btn"},[n("div",{staticClass:"operation",staticStyle:{"vertical-align":"middle"}},t._l(t.toolOperList,function(e,i){return n("a",{class:t._operationClass(e),attrs:{href:"javascript:",id:e.code},on:{click:function(n){return t._ckOperation(e,n)}}},[n("i",{staticClass:"iconfont",attrs:{"data-toggle":"tooltip",title:e.desc},domProps:{innerHTML:t._s(e.icon)}})])}),0),t._v(" "),"instance"===t.type?n("x-button",{staticStyle:{"vertical-align":"middle"},attrs:{"data-toggle":"tooltip",title:t.$t("刷新DAG状态"),"data-container":"body",icon:"fa fa-refresh",type:"primary",loading:t.isRefresh,size:"xsmall"},on:{click:function(e){!t.isRefresh&&t._refresh()}}}):t._e(),t._v(" "),t.isRtTasks?n("x-button",{staticStyle:{"vertical-align":"middle"},attrs:{type:"primary",size:"xsmall",icon:"fa fa-reply"},on:{click:t._rtNodesDag}},[t._v("\n "+t._s(t.$t("返回上一节点"))+"\n ")]):t._e(),t._v(" "),n("x-button",{directives:[{name:"ps",rawName:"v-ps",value:["GENERAL_USER"],expression:"['GENERAL_USER']"}],staticStyle:{"vertical-align":"middle"},attrs:{type:"primary",size:"xsmall",loading:t.spinnerLoading,icon:"fa fa-save",disabled:t.isDetails},on:{click:t._saveChart}},[t._v("\n "+t._s(t.spinnerLoading?"Loading...":t.$t("保存"))+"\n ")])],1)]),t._v(" "),t._m(0)])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"scrollbar dag-container"},[e("div",{staticClass:"jtk-demo",attrs:{id:"jtk-demo"}},[e("div",{staticClass:"jtk-demo-canvas canvas-wide statemachine-demo jtk-surface jtk-surface-nopan jtk-draggable",attrs:{id:"canvas"}})])])}]};e.a=i}});
//# sourceMappingURL=5.995cbec.js.map