|
|
webpackJsonp([18],{1000: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("Add dependency")))]),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("Add")}},[t._v("\n \n ")]),t._v(" "),t.isLoading?n("i",{staticClass:"iconfont fa fa-spin",attrs:{"data-toggle":"tooltip",title:t.$t("Add")}},[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("and"):t.$t("or"))+"\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("and"):t.$t("or"))+"\n ")]):t._e(),t._v(" "),n("i",{staticClass:"iconfont dep-delete",class:t._isDetails,attrs:{"data-toggle":"tooltip","data-container":"body",title:t.$t("delete")},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},1001:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(914),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(1002),a=n(29)(r.a,s.a,!1,null,null,null);e.default=a.exports},1002: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("Child Node")))])]),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},1003:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(915),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(1004),a=n(29)(r.a,s.a,!1,null,null,null);e.default=a.exports},1004: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:"157px"},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("Please choose"),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},1005:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(916),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(1006),a=n(29)(r.a,s.a,!1,null,null,null);e.default=a.exports},1006: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("Timeout alarm")))])]),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("Timeout strategy")))])]),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("Timeout alarm")))]),t._v(" "),n("x-checkbox",{attrs:{label:"FAILED",disabled:t.isDetails}},[t._v(t._s(t.$t("Timeout failure")))])],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("Timeout period")))])]),t._v(" "),n("div",{staticClass:"cont-box"},[n("label",{staticClass:"label-box"},[n("x-input",{staticStyle:{width:"128px"},attrs:{disabled:t.isDetails,maxlength:"9"},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("Minute")))])])],1)])]):t._e()])},staticRenderFns:[]};e.a=i},1007: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)}}},1008: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("Current node settings")))]),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("View history")))])])]),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("View log")))])])])],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("Enter this child node")))])]):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("Node name")))])]),t._v(" "),n("div",{staticClass:"cont-box"},[n("label",{staticClass:"label-box"},[n("x-input",{attrs:{type:"text",disabled:t.isDetails,placeholder:t.$t("Please enter name(required)"),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("Run flag")))])]),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("Normal")))]),t._v(" "),n("x-radio",{attrs:{label:"FORBIDDEN",disabled:t.isDetails}},[t._v(t._s(t.$t("Prohibition execution")))])],1)],1)])]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text-box"},[n("span",[t._v(t._s(t.$t("Description")))])]),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("Please enter description"),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("Task priority")))])]),t._v(" "),n("div",{staticClass:"cont-box"},[n("span",{staticClass:"label-box",staticStyle:{width:"193px",display:"inline-block"}},[n("m-priority",{model:{value:t.taskInstancePriority,callback:function(e){t.taskInstancePriority=e},expression:"taskInstancePriority"}})],1),t._v(" "),n("span",{staticClass:"text-b"},[t._v(t._s(t.$t("Worker group")))]),t._v(" "),n("m-worker-groups",{model:{value:t.workerGroupId,callback:function(e){t.workerGroupId=e},expression:"workerGroupId"}})],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("Number of failed retries")))])]),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("Times"))+")")]),t._v(" "),n("span",{staticClass:"text-b"},[t._v(t._s(t.$t("Failed retry interval")))]),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("Minute"))+")")])],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:{"create-node-id":t.id,"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("Cancel"))+" ")]),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("Confirm add"))+" ")])],1)])])},staticRenderFns:[]};e.a=i},1009: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("Toolbar")))])]),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("View variables"),"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("Refresh DAG status"),"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("Return_1"))+"\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("Save"))+"\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},1086:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n(1169)),r=o(n(742));function o(t){return t&&t.__esModule?t:{default:t}}e.default={name:"definition-create-index",components:{mCreateDag:i.default,mSecondaryMenu:r.default}}},1087:function(t,e,n){"use strict";e.__esModule=!0;var i=l(n(933)),r=n(123),o=l(n(701)),s=l(n(897)),a=l(n(677));function l(t){return t&&t.__esModule?t:{default:t}}e.default={name:"create-index",data:function(){return{isLoading:!0}},mixins:[a.default],props:{},methods:Object.assign({},(0,r.mapMutations)("dag",["resetParams"]),(0,r.mapActions)("dag",["getProcessList","getResourcesList"]),(0,r.mapActions)("security",["getWorkerGroupsAll"]),{init:function(){var t=this;this.isLoading=!0,this.resetParams(),Promise.all([this.getProcessList(),this.getResourcesList(),this.getWorkerGroupsAll()]).then(function(e){t.isLoading=!1,s.default.init(t.$root)}).catch(function(){t.isLoading=!1})}}),watch:{$route:{deep:!0,handler:function(){this.init()}}},created:function(){this.init()},mounted:function(){},components:{mDag:i.default,mSpin:o.default}}},1169:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1087),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(1170),a=n(29)(r.a,s.a,!1,null,null,null);e.default=a.exports},1170: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"),this._v(" "),e("m-spin",{attrs:{"is-spin":this.isLoading}})],1)},staticRenderFns:[]};e.a=i},1171:function(t,e,n){"use strict";var i={render:function(){var t=this.$createElement;return(this._self._c||t)("m-create-dag")},staticRenderFns:[]};e.a=i},616:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1086),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(1171),a=n(29)(r.a,s.a,!1,null,null,null);e.default=a.exports},664: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}}}},677:function(t,e,n){"use strict";e.__esModule=!0;var i=s(n(92)),r=s(n(222)),o=s(n(124));function s(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=!o.default.getAuth()||this.store.state.dag.isDetails},computed:{_isDetails:function(){return this.isDetails?"icon-disabled":""}}}},701:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(664),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(704);var a=function(t){n(702)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},702:function(t,e,n){var i=n(703);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("058996ed",i,!0,{})},703: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}",""])},704: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("Loading...")))])])]):t._e()},staticRenderFns:[]};e.a=i},705:function(t,e,n){"use strict";e.__esModule=!0;var i,r=n(747),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(){}}},706: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 L(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function E(t,e){return L(t).appendChild(e)}function D(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=D(t,e,n,i);return r.setAttribute("role","presentation"),r}function I(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 M(){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},G={origin:"*mouse"},U={origin:"+move"};function q(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 Q(t,e){var n;return Object.create?n=Object.create(t):(J.prototype=t,n=new J),e&&$(e,n),n}var Z=/[\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()||Z.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 Lt(t,e){if(t)for(var n=0;n<t.length;++n){var i=t[n];if(i.marker==e)return i}}function Et(t,e){for(var n,i=0;i<t.length;++i)t[i]!=e&&(n||(n=[])).push(t[i]);return n}function Dt(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=Lt(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)Lt(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 It(t){var e=t.markedSpans;if(e){for(var n=0;n<e.length;++n)e[n].marker.detachLine(t);t.markedSpans=null}}function Mt(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(!Gt(t,i))return e;for(;n=Ft(i);)i=n.find(1,!0).line;return dt(i)+1}function Gt(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&&Ut(t,e,i))return!0}}function Ut(t,e,n){if(null==n.to){var i=n.marker.find(1,!0);return Ut(t,i.line,Lt(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)&&Ut(t,e,r))return!0}function qt(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 L=k&&"!"==p[k-1]||S<h&&"1"==p[S]?"1":"N",E=k;E<S;++E)p[E]=L;k=S-1}}for(var D=0,T=u;D<h;++D){var I=p[D];"L"==T&&"1"==I?p[D]="L":r.test(I)&&(T=I)}for(var M=0;M<h;++M)if(i.test(p[M])){var A=void 0;for(A=M+1;A<h&&i.test(p[A]);++A);for(var j="L"==(M?p[M-1]:u),O=j==("L"==(A<h?p[A]:u))?j?"L":"R":u,N=M;N<A;++N)p[N]=O;M=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 G=B;for(++B;B<R&&s.test(p[B]);++B);F.splice(W,0,new a(2,G,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 Qt(t,e){var n=t.order;return null==n&&(n=t.order=Jt(t.text,e)),n}var Zt=[],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]||Zt).concat(n)}};function ee(t,e){return t._handlers&&t._handlers[e]||Zt}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=D("div");return"draggable"in t||"dragDrop"in t}();function ve(t){if(null==fe){var e=D("span","");E(t,D("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(fe=e.offsetWidth<=1&&e.offsetHeight>2&&!(s&&a<8))}var n=fe?D("span",""):D("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=E(t,document.createTextNode("AخA")),n=P(e,0,1).getBoundingClientRect(),i=P(e,1,2).getBoundingClientRect();return L(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=D("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=Q(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 Le(t,e){e=Se(e);var n=ke[e.name];if(!n)return Le(t,"text/plain");var i=n(t,e);if(Ee.hasOwnProperty(e.name)){var r=Ee[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 Ee={};function De(t,e){$(e,Ee.hasOwnProperty(t)?Ee[t]:Ee[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 Ie(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 Me(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={};Ue(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,Ue(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,Me(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=Ie(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]=Ie(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 Ge(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 Ue(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&&Ge(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=Ge(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 qe=function(t,e,n){this.text=t,Mt(this,e),this.height=n?n(this):1};function Ye(t){t.parent=null,It(t)}qe.prototype.lineNo=function(){return dt(this)},ae(qe);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=Ze,be(t.display.measure)&&(s=Qt(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 Qe(t){var e=D("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Ze(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(D("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(D("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(D("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(D("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 _=D("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 L=f+g.length;if(!d){var E=L>S?g.slice(0,S-f):g;e.addToken(e,E,s?s+l:l,u,f+E.length==v?c:"",a,h)}if(L>=S){g=g.slice(S-f),f=S;break}f=L,u=""}g=r.slice(o,o=n[m++]),s=Ke(n[m++],e.cm.options)}}else for(var D=1;D<n.length;D+=2)e.addToken(e,r.slice(o,o=n[D]),Ke(n[D+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=Gt(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=D("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(D("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=D("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=D("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(D("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(D("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=D("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(!I(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;"),E(e.display.measure,D("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=E(t.measure,D("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 Ln(t){return t.display.scroller.clientWidth-Sn(t)-t.display.barWidth}function En(t){return t.display.scroller.clientHeight-Sn(t)-t.display.barHeight}function Dn(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,Mn(t,e),n,i)}function In(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 Mn(t,e){var n=dt(e),i=In(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,E(t.display.lineMeasure,r.pre),i}(t,e));var r=Dn(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&&Ln(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=E(t,D("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,L(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 Gn(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=qt(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 Un(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 qn(t,e,n,i,r){return i||(i=at(t.doc,e.line)),Gn(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,Gn(t,i,a,n)}i=i||at(t.doc,e.line),r||(r=Mn(t,i));var a=Qt(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=qt(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 Qn(t,e,n,i){return n||(n=Mn(t,e)),Jn(t,e,n,Gn(t,e,An(t,n,i),"line").top)}function Zn(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-=qt(e);var o=Mn(t,e),s=Bn(e),a=0,l=e.text.length,c=!0,u=Qt(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 Zn(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);Zn(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,!!Zn(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=D("pre");for(var e=0;e<49;++e)jn.appendChild(document.createTextNode("x")),jn.appendChild(D("br"));jn.appendChild(document.createTextNode("x"))}E(t.measure,jn);var n=jn.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),L(t.measure),n||1}function ni(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=D("span","xxxxxxxxxx"),n=D("pre",[e]);E(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(Gt(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(D("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(D("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,Ln(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(D("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 qn(t,mt(e,n),"div",d,i)}function f(e,n,i){var r=Qn(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=Qt(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,L,E,D;g?(S=c&&y&&_?a:v.left,L=c?l:f(t,r,"before"),E=c?a:f(e,r,"after"),D=c&&x&&w?l:b.right):(S=c?f(t,r,"before"):a,L=!c&&y&&_?l:v.right,E=!c&&x&&w?a:b.left,D=c?f(e,r,"after"):l),u(S,v.top,L-S,v.bottom),v.bottom<b.top&&u(a,v.bottom,null,b.top),u(E,b.top,D-E,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,qt(at(e,a))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=s&&(o=ht(e,qt(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(D("div",[D("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=En(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=Ln(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&&(Ei(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Si(t){Ei(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Li(t,e,n){null==e&&null==n||Ei(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Ei(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Di(t,Vn(t,e.from),Vn(t,e.to),e.margin))}function Di(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});Li(t,r.scrollLeft,r.scrollTop)}function Ti(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||ar(t,{top:e}),Ii(t,e,!0),n&&ar(t),nr(t,100))}function Ii(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 Mi(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=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=D("div",[D("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?Mi(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++)Gi(e[o]);for(var s=0;s<e.length;s++)Ui(e[s]);for(var a=0;a<e.length;a++)qi(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 Gi(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-Ln(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&Mi(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var n=t.focus&&t.focus==M();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 qi(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&&Ii(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&Mi(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=D("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&&(Mi(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&&Zi(t);else if(n<=r.viewFrom)Pt&&Bt(t.doc,n+i)>r.viewFrom?Zi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)Zi(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):Zi(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):Zi(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):Zi(t)}var c=r.externalMeasured;c&&(n<c.lineN?c.lineN+=i:e<c.lineN+c.size&&(r.externalMeasured=null))}function Qi(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 Zi(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++)Qi(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=Ln(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 Zi(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)&&(Zi(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=qt(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=M();if(!e||!I(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&I(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&&(L(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!=M()&&(t.activeElt.focus(),t.anchorNode&&I(document.body,t.anchorNode)&&I(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),L(n.cursorDiv),L(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!=Ln(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+kn(t.display)-En(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;L(e);for(var i=0;i<n.length;++i){var r=n[i],o=e.appendChild(D("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)),Mi(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&>(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=Le(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 Lr(t,e){return 0==e.from.ch&&0==e.to.ch&&""==X(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function Er(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),It(t),Mt(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 qe(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(Lr(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 qe(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 Dr(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),Ir(t),t.options.lineWrapping||Vt(t),t.options.mode=e.modeOption,Ji(t)}function Ir(t){("rtl"==t.doc.direction?A:S)(t.display.lineDiv,"CodeMirror-rtl")}function Mr(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),Dr(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=Dt(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 Gr(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 Ur(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 qr(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,Qr(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,Qr(t,t.sel,null,!1))}function Qr(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 Zr(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 Zr(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?Zr(t,d,e,i,r):null}}return e}function to(t,e,n,i,r){var o=i||1,s=Zr(t,e,n,o,r)||!r&&Zr(t,e,n,o,!0)||Zr(t,e,n,-o,r)||!r&&Zr(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,Dt(t,e));var i=[];Dr(t,function(t,n){n||-1!=z(i,t.history)||(po(t.history,e),i.push(t.history)),lo(t,e,null,Dt(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=[];Dr(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++)Qi(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);Er(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||Lr(t.doc,e)?Ji(t,o.line,s.line+1,c):Qi(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):Er(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&&Qi(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){qt(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),Qi(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&&(Gt(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 Dr(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){Gt(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++)Qi(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=Lt(s.markedSpans,this);t&&!this.collapsed?Qi(t,dt(s),"text"):t&&(null!=a.to&&(r=dt(s)),null!=a.from&&(i=dt(s))),s.markedSpans=Et(s.markedSpans,a),null==a.from&&this.collapsed&&!Gt(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=Lt(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=In(i,o);if(s&&(Fn(s),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!Gt(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];Dr(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 qe("",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 Mr(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)),Er(this,{from:o,to:o,text:t}),Vr(this,xr(o),B)};So.prototype=Q(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&&Li(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){qr(this,wt(this,"number"==typeof t?mt(t,e||0):t),null,n)}),setSelection:Ki(function(t,e,n){qr(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){Gr(this,Ct(this,t),e)}),extendSelectionsBy:Ki(function(t,e){Gr(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 Mr(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 Mr(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&&!Gt(t,e)){var i=qt(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];Dr(t,function(t){return n.push(t.id)},!0),t.history=new Mr(null),t.history.done=Hr(this.history.done,n),t.history.undone=Hr(this.history.undone,n)}},iterLinkedDocs:function(t){Dr(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(){Ir(e),Ji(e)}))})}),So.prototype.eachLine=So.prototype.iter;var Lo=0;function Eo(t){var e=this;if(Do(e),!re(e,t)&&!wn(e.display,t)){le(t),s&&(Lo=+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 Do(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 Io=!1;function Mo(){var t;Io||(te(window,"resize",function(){null==t&&(t=setTimeout(function(){t=null,To(Ao)},100))}),te(window,"blur",function(){return To(bi)}),Io=!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=Uo(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 Go(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 Uo(t){return"string"==typeof t?Fo[t]:t}function qo(t,e){for(var n=t.doc.sel.ranges,i=[],r=0;r<n.length;r++){for(var o=e(n[r]);i.length&>(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=Qt(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=Mn(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 qo(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 qo(t,function(e){return{from:mt(e.from().line,0),to:wt(t.doc,mt(e.to().line+1,0))}})},delLineLeft:function(t){return qo(t,function(t){return{from:mt(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(t){return qo(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 qo(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 Qo(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")},U)},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")},U)},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/)?Qo(t,e.head):i},U)},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 Qo(t,e){var n=Jo(t,e.line),i=at(t.doc,n.line),r=Qt(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 Zo(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=Go(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?es(t,"Shift-"+n,e,function(e){return Zo(t,e,!0)})||es(t,n,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return Zo(t,e)}):es(t,n,e,function(e){return Zo(t,e)}))}var rs=null;function os(t){var e=this;if(e.curOp.focus=M(),!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 Zo(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=M();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):Ur(o,a,s,G):(a=0,Vr(o,new vr([s],0),G),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=q(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,q(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=Qt(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),G)}}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=M(),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=D("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=D("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=T("div",null,"CodeMirror-code"),r.selectionDiv=D("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=D("div",null,"CodeMirror-cursors"),r.measure=D("div",null,"CodeMirror-measure"),r.lineMeasure=D("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=D("div",[o],null,"position: relative"),r.sizer=D("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=D("div",null,null,"position: absolute; height: "+H+"px; width: 1px;"),r.gutters=D("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=D("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=D("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),Mi(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=D("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),E(t.display.dragCursor,i)}}(t,e),de(e))},start:function(e){return function(t,e){if(s&&(!t.state.draggingText||+new Date-Lo<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=D("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,Eo),leave:function(e){re(t,e)||Do(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),Mo(),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);Ur(o,f,new br(g,g));break}}}Cs.defineInitHook=function(t){return ks.push(t)};var Ss=null;function Ls(t){Ss=t}function Es(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 Ds(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Yi(e,function(){return Es(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 Is(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 Ms(t,e,n,i){t.setAttribute("autocorrect",!!n),t.setAttribute("autocapitalize",!!i),t.setAttribute("spellcheck",!!e)}function As(){var t=D("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=D("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"),Ms(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=Qt(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||Mn(t,e),Qn(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=In(t,e.line);if(!n||n.hidden)return null;var i=at(t.doc,e.line),r=Dn(n,i,e.line),o=Qt(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||!I(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())Ls({lineWise:!1,text:i.getSelections()}),"cut"==t.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var e=Is(i);Ls({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)}}Ms(r,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize),te(r,"paste",function(t){re(i,t)||Ds(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){E(this.cm.display.cursorDiv,t.cursors),E(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 I(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,Es)(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())Ls({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=Is(i);Ls({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)||Ds(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;E(e.cursorDiv,t.cursors),E(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||M()!=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(){Es(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",Qe,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=Uo(e),r=n!=vs&&Uo(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"](Uo(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&&Ur(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 qn(this,wt(this.doc,t),e||"page")},coordsChar:function(t,e){return Kn(this,(t=Un(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=Un(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 Gn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-qt(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&&Mi(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()},U)}),deleteH:Xi(function(t,e){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):qo(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,qn(n,l,"div").top-a.top),l},U),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()==M()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Xi(function(t,e){Li(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:En(this),clientWidth:Ln(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){Ei(t),t.curOp.scrollToPos=e}(this,t):Di(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){Qi(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),Li(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(),Li(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=M();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=q,t.isWordChar=tt,t.Pass=W,t.signal=ie,t.Line=qe,t.changeEnd=_r,t.scrollbarModel=Fi,t.Pos=mt,t.cmpPos=gt,t.modes=ke,t.mimeModes=Pe,t.resolveMode=Se,t.getMode=Le,t.modeExtensions=Ee,t.extendMode=De,t.copyState=Te,t.startState=Me,t.innerMode=Ie,t.commands=Ko,t.keyMap=Fo,t.keyName=Go,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=I,t.rmClass=S,t.keyNames=jo}(Cs),Cs.version="5.45.0",Cs},t.exports=i()},742:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(705),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(749);var a=function(t){n(743)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},743:function(t,e,n){var i=n(744);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("018f4828",i,!0,{})},744:function(t,e,n){var i=n(125);(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(745))+") no-repeat;display:inline-block}.secondary-menu-model .toogle-box .tog-open{width:12px;height:102px;background:url("+i(n(746))+") 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:10px}.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}",""])},745:function(t,e,n){t.exports=n.p+"images/close.png?02806e641df25c1b4dbff4cb0af3984d"},746:function(t,e,n){t.exports=n.p+"images/open.png?97ec0726c7acab8a2a48282d68cea631"},747:function(t,e,n){"use strict";e.__esModule=!0;var i=s(n(36)),r=s(n(748)),o=s(n(124));function s(t){return t&&t.__esModule?t:{default:t}}var a={projects:[{name:""+i.default.$t("Project Home"),id:0,path:"projects-index",isOpen:!0,disabled:!0,icon:"fa-home",children:[]},{name:""+i.default.$t("Process"),id:1,path:"",isOpen:!0,disabled:!0,icon:"fa-gear",children:[{name:""+i.default.$t("Process definition"),path:"definition",id:0,disabled:!0},{name:""+i.default.$t("Process Instance"),path:"instance",id:1,disabled:!0},{name:""+i.default.$t("Task Instance"),path:"task-instance",id:2,disabled:!0},{name:""+i.default.$t("Task record"),path:"task-record",id:3,disabled:r.default.recordSwitch},{name:""+i.default.$t("History task record"),path:"history-task-record",id:4,disabled:r.default.recordSwitch}]}],security:[{name:""+i.default.$t("Tenant Manage"),id:0,path:"tenement-manage",isOpen:!0,disabled:!0,icon:"fa-users",children:[]},{name:""+i.default.$t("User Manage"),id:1,path:"users-manage",isOpen:!0,disabled:!0,icon:"fa-user-circle",children:[]},{name:""+i.default.$t("Warning group manage"),id:2,path:"warning-groups-manage",isOpen:!0,disabled:!0,icon:"fa-warning",children:[]},{name:""+i.default.$t("Queue manage"),id:3,path:"queue-manage",isOpen:!0,disabled:!0,icon:"fa-recycle",children:[]},{name:""+i.default.$t("Worker group manage"),id:4,path:"worker-groups-manage",isOpen:!0,disabled:!0,icon:"fa-address-book",children:[]},{name:""+i.default.$t("Token manage"),id:2,path:"token-manage",isOpen:!0,icon:"fa-file-text",children:[],disabled:!0}],resource:[{name:""+i.default.$t("File Manage"),id:0,path:"file",isOpen:!0,icon:"fa-files-o",children:[],disabled:!0},{name:""+i.default.$t("UDF manage"),id:1,path:"",isOpen:!0,icon:"fa-file-text",disabled:!0,children:[{name:""+i.default.$t("Resource manage"),path:"resource-udf-resource",id:0,disabled:!0},{name:""+i.default.$t("Function manage"),path:"resource-udf-function",id:1,disabled:!0}]}],user:[{name:""+i.default.$t("User Information"),id:0,path:"account",isOpen:!0,icon:"fa-user",children:[],disabled:!0},{name:""+i.default.$t("Edit password"),id:1,path:"password",isOpen:!0,icon:"fa-key",children:[],disabled:!0},{name:""+i.default.$t("Token manage"),id:2,path:"token",isOpen:!0,icon:"fa-file-text",children:[],disabled:o.default.getAuth()}],monitor:[{name:""+i.default.$t("Servers manage"),id:0,path:"",isOpen:!0,disabled:!0,icon:"fa-server",children:[{name:"Master",path:"servers-master",id:0,disabled:!0},{name:"Worker",path:"servers-worker",id:1,disabled:!0},{name:"Zookeeper",path:"servers-zookeeper",id:4,disabled:!0},{name:"Mysql",path:"servers-mysql",id:6,disabled:!0}]}]};e.default=function(t){return a[t]}},748:function(t,e,n){"use strict";e.__esModule=!0,e.default={recordSwitch:!0}},749: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.disabled?n("div",[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[e.disabled?n("router-link",{attrs:{to:{name:e.path},tag:"li","active-class":"active"}},[n("span",[t._v(t._s(e.name))])]):t._e()]})],2):t._e()],2):t._e()])})],2)},staticRenderFns:[]};e.a=i},849:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(896),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(953);var a=function(t){n(951)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},850:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(901),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(967);var a=function(t){n(965)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},851:function(t,e,n){"use strict";e.__esModule=!0;var i,r=n(706),o=(i=r)&&i.__esModule?i:{default:i};n(869),n(870),n(871),n(872),n(873),n(852),n(874),n(875),n(876),n(877),n(878),e.default=function(t,e){return o.default.fromTextArea(document.getElementById(t),Object.assign({lineNumbers:!0,theme:"mdn-like",readOnly:!0},{},e))}},852: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(706))},853: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("none_1")},{id:"SUCCESS",code:""+o.default.$t("success_1")},{id:"FAILURE",code:""+o.default.$t("failure_1")},{id:"ALL",code:""+o.default.$t("All_1")}];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}},854:function(t,e,n){"use strict";e.__esModule=!0;var i=a(n(30)),r=a(n(36)),o=a(n(883)),s=n(853);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,disabled:{type:Boolean,default:!1}},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("Mailbox already exists! Recipients and copyers cannot repeat")):(this.emailWidth=0,this.activeList.push(n),this.email="",this._handlerEmailWitch())):this.$message.warning(""+r.default.$t("Mailbox input is illegal"))},_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("Mailbox already exists! Recipients and copyers cannot repeat")):(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($(".email-model").width()-$(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})}}},855:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n(30)),r=o(n(677));function o(t){return t&&t.__esModule?t:{default:t}}e.default={name:"priority",data:function(){return{priorityList:[{code:"HIGHEST",unicode:"",color:"#ff0000"},{code:"HIGH",unicode:"",color:"#ff0000"},{code:"MEDIUM",unicode:"",color:"#EA7D24"},{code:"LOW",unicode:"",color:"#2A8734"},{code:"LOWEST",unicode:"",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:{}}},856:function(t,e,n){"use strict";e.__esModule=!0;var i,r=n(677),o=(i=r)&&i.__esModule?i:{default:i};e.default={name:"form-worker-group",data:function(){return{workerGroupsList:[]}},mixins:[o.default],props:{value:{type:Number,default:-1}},model:{prop:"value",event:"workerGroupsEvent"},methods:{_onChange:function(t){this.value=t.value,this.$emit("workerGroupsEvent",t.value)}},watch:{},created:function(){var t=this,e=this.store.state.security.workerGroupsListAll||[];e.length?this.workerGroupsList=e:this.store.dispatch("security/getWorkerGroupsAll").then(function(e){t.$nextTick(function(){t.workerGroupsList=e})})}}},857: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(30)),r=a(n(71)),o=a(n(36)),s=a(n(92));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("Prohibition execution")+'"></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},858:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(902),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(970);var a=function(t){n(968)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},860:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(854),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(884);var a=function(t){n(881)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},861:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(855),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(887);var a=function(t){n(885)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},862:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(856),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(888),a=n(29)(r.a,s.a,!1,null,null,null);e.default=a.exports},863: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("Unable to download without proper url"))}},865:function(t,e,n){"use strict";e.__esModule=!0;var i=u(n(30)),r=u(n(228)),o=u(n(860)),s=u(n(92)),a=n(853),l=u(n(861)),c=u(n(862));function u(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",workerGroupId:-1}},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(",")||"",workerGroupId:this.workerGroupId};"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,mWorkerGroups:c.default}}},866: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:L(),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])}},L=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,L=(this.params.scroll,!1!==e.multipleDrop),E=!1,D=!0===e.ghostProxy?x:e.ghostProxy&&"function"==typeof e.ghostProxy?e.ghostProxy:_,T=e.selector,I=null,M=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:M||5,n=this.params.grid?this.params.grid[1]/2:M||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:M,r=this.params.grid?this.params.grid[1]/2:M;this.params.setPosition(C,A(n,t,e,i,r))}},this.setUseGhostProxy=function(t){D=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==(I=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 I=this.el;if(S)if(C=I.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=I.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=I;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),G("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!==G("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),G("revert",this.el)))}.bind(this),this.getFilters=function(){return $},this.abort=function(){null!=c&&this.upListener()},this.getDragElement=function(t){return t?I||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,G=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){G("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]);G("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),E&&D(I)?(B=[C.offsetLeft,C.offsetTop],I.parentNode.removeChild(C),C=I):B=null,this.params.removeClass(C,this.params.dragClass||n.drag),z.length=0,E=!1,!i){H.length>0&&B&&e.setPosition(I,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(D(this.el))if(r[0]!==o[0]||r[1]!==o[1]){if(!E){var s=I.cloneNode(!0);e.addClass(s,d.ghostProxy),I.parentNode.appendChild(s),C=s,E=!0}o=r}else E&&(I.parentNode.removeChild(C),C=I,E=!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)&&(L||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)}G("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]&&D[e]&&m(D[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]&&D[n]&&m(D[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]&&D[n]&&m(D[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 L=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]}},E=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?L(t,"_katavorioDrag",this._dragsByScope):E(t,"_katavorioDrag",e,n)},this.destroyDroppable=function(t,e,n){1===arguments.length?L(t,"_katavorioDrop",this._dropsByScope):E(t,"_katavorioDrop",e,n)},this.reset=function(){this._dragsByScope={},this._dropsByScope={},r=[],o={},D={}};var D={},T=function(e,n,r){var o,s=i(n)?n:n.id,a=!!i(n)||!1!==n.active,l=D[s]||(o={name:s,members:[]},D[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(D[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(D[t].members,e)}),e.posses.length=0,e.posseRoles={}}})},this.setPosseState=function(t,e,n){var i=D[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=[],L=!1,E=null,D=this.Defaults.Scope,T=1,I=function(){return""+T++},M=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(!L){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_"+I();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=G,i.elementId=e||H(i.source);var o=new n(i);return o.id="ep_"+I(),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+"_"+I()),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),L||d.paint({anchorLoc:d.anchor.compute({xy:[h.left,h.top],wh:S[u],element:d,timestamp:E}),timestamp:E}),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,U(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 G=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)},U=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),G(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}),G(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 q=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]]=q(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:q(t,"setDetachable",J),setReattach:q(t,"setReattach",J),setConnector:q(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")})},Q=function(t){var e=K(t,Q);return p.extend(e,{setEnabled:q(t,"setEnabled",Q),setAnchor:q(t,"setAnchor",Q),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 Q(s)},this.getAllConnections=function(){return y},this.getDefaultScope=function(){return D},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=M;var Z=!1;this.isHoverSuspended=function(){return Z},this.setHoverSuspended=function(t){Z=t},this.hide=function(t,e){return z(t,"none",e),r},this.idstamp=I;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:E}),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 L&&!n&&(n=E),!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_"+I()),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(){Z=!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 D=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=L;return L=t,E=t?(new Date).getTime():null,e&&this.repaintEverything(),n},this.isSuspendDrawing=function(){return L},this.getSuspendedAt=function(){return E},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,L=C.endpoints[1].anchor.isContinuous;if(S||L){var E=k+"_"+P,D=_[E],T=C.sourceId===n?1:0;S&&!l[k]&&(l[k]={top:[],right:[],bottom:[],left:[]}),L&&!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 I=c.getCachedData(P),M=c.getCachedData(k);P===k&&(S||L)?(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)):(D||(D=this.calculateOrientation(k,P,M.o,I.o,C.endpoints[0].anchor,C.endpoints[1].anchor,C),_[E]=D),S&&m(l[k],D.theta,0,C,!1,P,0,!1,D.a[0],0,v,b),L&&m(l[P],D.theta2,-1,C,!0,k,1,!0,D.a[1],0,v,b)),S&&t.addWithFunction(y,k,function(t){return t===k}),L&&t.addWithFunction(y,P,function(t){return t===P}),t.addWithFunction(v,C,function(t){return t.id===C.id}),(S&&0===T||L&&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)},867: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("month")},{value:"week",label:""+o.default.$t("week")},{value:"day",label:""+o.default.$t("day")},{value:"hour",label:""+o.default.$t("hour")}],a={hour:[{value:"last1Hour",label:""+o.default.$t("Last1Hour")},{value:"last2Hours",label:""+o.default.$t("Last2Hours")},{value:"last3Hours",label:""+o.default.$t("Last3Hours")}],day:[{value:"last1Days",label:""+o.default.$t("Last1Days")},{value:"last2Days",label:""+o.default.$t("Last2Days")},{value:"last3Days",label:""+o.default.$t("Last3Days")},{value:"last7Days",label:""+o.default.$t("Last7Days")}],week:[{value:"lastWeek",label:""+o.default.$t("LastWeek")},{value:"lastMonday",label:""+o.default.$t("LastMonday")},{value:"lastTuesday",label:""+o.default.$t("LastTuesday")},{value:"lastWednesday",label:""+o.default.$t("LastWednesday")},{value:"lastThursday",label:""+o.default.$t("LastThursday")},{value:"lastFriday",label:""+o.default.$t("LastFriday")},{value:"lastSaturday",label:""+o.default.$t("LastSaturday")},{value:"lastSunday",label:""+o.default.$t("LastSunday")}],month:[{value:"lastMonth",label:""+o.default.$t("LastMonth")},{value:"lastMonthBegin",label:""+o.default.$t("LastMonthBegin")},{value:"lastMonthEnd",label:""+o.default.$t("LastMonthEnd")}]},l=[{id:0,code:""+o.default.$t("Query")},{id:1,code:""+o.default.$t("Non Query")}];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},868:function(t,e,n){"use strict";e.__esModule=!0;var i=l(n(30)),r=l(n(36)),o=l(n(92)),s=l(n(222)),a=n(863);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("Update log success")):t.$message.warning(""+r.default.$t("No more logs"))},1500),c().html("").text(e.data||""+r.default.$t("No log"))}).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("No log")),setTimeout(function(){$("#textarea").scrollTop(2)},800)):(t.isData=!1,setTimeout(function(){t.$message.warning(""+r.default.$t("No more logs"))},1e3),c().html("").text(u||""+r.default.$t("No log")))}).catch(function(e){t.$message.destroy(),t.$message.error(e.msg||"")})},_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("Loading Log..."),duration:0,closable:!1}),t._onUp()),e.get(0).scrollHeight===e.height()+e.scrollTop()&&t.isData&&(t.$message.loading({content:""+r.default.$t("Loading Log..."),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("Loading Log..."),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:{}}},869:function(t,e){},870: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,L=l.getScrollInfo();if(P>0){var E=k.bottom-k.top;if(b.top-(b.bottom-k.top)-E>0)d.style.top=(x=b.top-E)+"px",_=!1;else if(E>C){d.style.height=C-5+"px",d.style.top=(x=b.bottom-k.top)+"px";var D=l.getCursor();r.from.ch!=D.ch&&(b=l.cursorCoords(D),d.style.left=(y=b.left)+"px",k=d.getBoundingClientRect())}}var T,I=k.right-w;if(I>0&&(k.right-k.left>w&&(d.style.width=w-5+"px",I-=k.right-k.left-w),d.style.left=(y=b.left-I)+"px"),S)for(var M=d.firstChild;M;M=M.nextSibling)M.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+L.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+L.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(706))},871: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(706),n(852))},872: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 L in P)P.hasOwnProperty(L)&&(S[L]=P[L]);for(var L in k)k.hasOwnProperty(L)&&(S[L]=k[L]);k=S}}else k=P;if("string"==c.type||"="==c.string){var E,D=(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(!D||!k.hasOwnProperty(D[1])||!(E=k[D[1]]))return;if("function"==typeof E&&(E=E.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 I=c.string.length;/['"]/.test(c.string.charAt(I-1))&&(s=c.string.charAt(I-1),d=c.string.substr(T,I-2)),f=!0}for(w=0;w<E.length;++w)d&&!n(E[w],d,a)||p.push(s+E[w]+s)}else for(var M in"attribute"==c.type&&(d=c.string,f=!0),k)!k.hasOwnProperty(M)||d&&!n(M,d,a)||p.push(M)}return{list:p,from:f?e(l.line,null==h?c.start:h):l,to:f?e(l.line,c.end):l}}}})})(n(706))},873: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(706))},874: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(706))},875: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(706))},876: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(706))},877:function(t,e){},878:function(t,e){},881:function(t,e,n){var i=n(882);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("3e1a73c7",i,!0,{})},882:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".email-model{width:100%}.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-model .input-element.disabled .tag-wrapper{background:#d9d9d9}.email-model .input-element.disabled .email-input{background:none}.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}",""])},883:function(t,e,n){"use strict";e.__esModule=!0,e.default=["test@analysys.com.cn"]},884: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",class:t.disabled?"disabled":""},[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(" "),t.disabled?t._e():n("i",{staticClass:"remove-tag ans-icon-close",on:{click:function(e){return e.stopPropagation(),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 e.stopPropagation(),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",disabled:t.disabled,placeholder:t.$t("Please enter email")},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},885:function(t,e,n){var i=n(886);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("0d88a9d3",i,!0,{})},886:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".priority-model{display:inline-block}.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}",""])},887: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},888: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:"180px"},attrs:{disabled:t.isDetails},on:{"on-change":t._onChange},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t._l(t.workerGroupsList,function(t){return n("x-option",{key:t.id,attrs:{value:t.id,label:t.name}})}),1)},staticRenderFns:[]};e.a=i},893:function(t,e,n){"use strict";e.__esModule=!0;var i=m(n(30)),r=m(n(945)),o=m(n(948)),s=m(n(36)),a=n(866),l=n(857),c=n(225),u=m(n(959)),d=n(229),h=n(126),p=m(n(677)),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("Name")+":"+l.name+"</br>"+s.default.$t("State")+":"+a+"</br>"+s.default.$t("type")+":"+l.taskType+"</br>"+s.default.$t("host")+":"+(l.host||"-")+"</br>"+s.default.$t("Retry Count")+":"+l.retryTimes+"</br>"+s.default.$t("Submit Time")+":"+(0,d.formatDate)(l.submitTime)+"</br>"+s.default.$t("Start Time")+":"+(0,d.formatDate)(l.startTime)+"</br>"+s.default.$t("End Time")+":"+(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("Failed to create node to save"))},_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("Refresh status succeeded"))},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(t){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:{}}},894:function(t,e,n){"use strict";e.__esModule=!0;var i=m(n(24)),r=m(n(71)),o=m(n(30)),s=m(n(36)),a=n(866),l=m(n(946)),c=m(n(92)),u=m(n(222)),d=m(n(124)),h=n(126),p=n(857),f=m(n(917));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"></i><span>'+s.default.$t("Start")+"</span></a>",'<a href="javascript:" id="editNodes" class="'+(o?"disbled":"")+'"><i class="iconfont"></i><span>'+s.default.$t("Edit")+"</span></a>",'<a href="javascript:" id="copyNodes" class="'+(o?"disbled":"")+'"><i class="iconfont"></i><span>'+s.default.$t("Copy")+"</span></a>",'<a href="javascript:" id="removeNodes" class="'+(o?"disbled":"")+'"><i class="iconfont"></i><span>'+s.default.$t("Delete")+"</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="",n=!0):(e.icon="",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)e[r]===n?i=n:t((0,p.rtTargetarrArr)(e[r]),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},895:function(t,e,n){"use strict";e.__esModule=!0;var i=l(n(30)),r=l(n(36)),o=l(n(849)),s=l(n(677)),a=l(n(897));function l(t){return t&&t.__esModule?t:{default:t}}e.default={name:"udp",data:function(){return{name:"",desc:"",udpList:[],syncDefine:!0,timeout:0,checkedTimeout:!0}},mixins:[s.default],props:{},methods:{_onLocalParams:function(t){this.udpList=t},_verifTimeout:function(){return!!/^[1-9]\d*$/.test(this.timeout)||(this.$message.warning(""+r.default.$t("Please enter a positive integer greater than 0")),!1)},ok:function(){var t=this;if(this.name){var e=function(){t.$refs.refLocalParams._verifProp()&&(t.checkedTimeout&&!t._verifTimeout()||(t.store.commit("dag/setGlobalParams",i.default.cloneDeep(t.udpList)),t.store.commit("dag/setName",i.default.cloneDeep(t.name)),t.store.commit("dag/setTimeout",i.default.cloneDeep(t.timeout)),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 graph name cannot be empty"))},close:function(){this.$emit("close")}},watch:{checkedTimeout:function(t){t||(this.timeout=0,this.store.commit("dag/setTimeout",i.default.cloneDeep(this.timeout)))}},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,this.timeout=this.store.state.dag.timeout||0,this.checkedTimeout=0!==this.timeout},mounted:function(){},components:{mLocalParams:o.default}}},896:function(t,e,n){"use strict";e.__esModule=!0;var i=a(n(30)),r=a(n(36)),o=n(867),s=a(n(677));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 is repeat")),!1):(this.$emit("on-local-params",i.default.cloneDeep(this.localParamsList)),!0):(t||this.$message.warning(""+r.default.$t("prop is empty")),!1)}},watch:{udpList:function(){this.localParamsList=this.udpList}},created:function(){this.localParamsList=this.udpList},computed:{inputStyle:function(){return"width:"+(this.hide?160:262)+"px"}},mounted:function(){},components:{}}},897:function(t,e,n){"use strict";e.__esModule=!0;var i=l(n(24)),r=l(n(954)),o=l(n(92)),s=l(n(222)),a=n(126);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},898: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}}},899:function(t,e,n){"use strict";e.__esModule=!0;var i=w(n(30)),r=w(n(921)),o=w(n(962)),s=w(n(972)),a=w(n(36)),l=w(n(981)),c=w(n(983)),u=w(n(987)),d=w(n(894)),h=w(n(989)),p=w(n(993)),f=w(n(1001)),m=w(n(1003)),g=w(n(1005)),v=w(n(862)),b=w(n(1007)),y=w(n(677)),x=n(857),_=w(n(861));function w(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",workerGroupId:-1}},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",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("The newly created sub-Process has not yet been executed and cannot enter the sub-Process"));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("The task has not been executed and cannot enter the sub-Process"));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,x.isNameExDag)(this.name,i.default.isEmpty(this.backfillItem)?"dom":"backfill")||(this.$message.warning(""+a.default.$t("Name already exists")),!1)):(this.$message.warning(""+a.default.$t("Please enter name (required)")),!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,workerGroupId:this.workerGroupId},fromThis:this}),this._setRunFlag())},_onSetProcessName:function(t){this.name=t},_setRunFlag:function(){var t=$("#"+this.id).find(".ban-p");t.html(""),"FORBIDDEN"===this.runFlag&&t.append((0,x.rtBantpl)())},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:{},created:function(){var t=this;d.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.workerGroupId=n.workerGroupId)),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:f.default,mProcedure:h.default,mSql:s.default,mLog:r.default,mSpark:c.default,mPython:u.default,mDependent:p.default,mSelectInput:m.default,mTimeoutAlarm:g.default,mPriority:_.default,mWorkerGroups:v.default}}},900:function(t,e,n){"use strict";e.__esModule=!0;var i=c(n(30)),r=c(n(36)),o=c(n(850)),s=c(n(858)),a=c(n(849)),l=c(n(677));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("Please enter main jar package")),!1):(this.$message.warning(""+r.default.$t("Please enter main 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}}},901:function(t,e,n){"use strict";e.__esModule=!0,e.default={name:"list-box"}},902:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n(30)),r=o(n(677));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:{}}},903:function(t,e,n){"use strict";e.__esModule=!0;var i=p(n(30)),r=p(n(36)),o=p(n(973)),s=p(n(850)),a=p(n(977)),l=p(n(906)),c=p(n(849)),u=p(n(677)),d=p(n(860)),h=p(n(851));function p(t){return t&&t.__esModule?t:{default:t}}var f=void 0;e.default={name:"sql",data:function(){return{type:"",datasource:"",rtDatasource:"",sql:"",localParams:[],udfs:"",sqlType:0,showType:["TABLE"],connParams:"",receivers:[],receiversCc:[]}},mixins:[u.default],props:{backfillItem:Object,createNodeId:Number},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 f.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:f.getValue(),udfs:this.udfs,sqlType:this.sqlType,receivers:this.receivers.join(","),receiversCc:this.receiversCc.join(","),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("Please enter a SQL Statement(required)")),!1)},_handlerEditor:function(){return f=(0,h.default)("code-sql-mirror",{mode:"sql",readOnly:this.isDetails}),this.keypress=function(){f.getOption("readOnly")||f.showHint({completeSingle:!1})},f.on("keypress",this.keypress),f.setValue(this.sql),f},_getReceiver:function(){var t=this,e={},n=this.router.history.current;"projects-definition-details"===n.name?e.processDefinitionId=n.params.id:e.processInstanceId=n.params.id,this.store.dispatch("dag/getReceiver",e).then(function(e){t.receivers=e.receivers&&e.receivers.split(",")||[],t.receiversCc=e.receiversCc&&e.receiversCc.split(",")||[]})}},watch:{sqlType:function(t){t&&(this.showType=[]),0!==t&&(this.receivers=[],this.receiversCc=[])},type:function(t){"HIVE"!==t&&(this.connParams="")},showType:function(t){t.length||(this.receivers=[],this.receiversCc=[])}},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(",")||[],this.receivers=t.params.receivers&&t.params.receivers.split(",")||[],this.receiversCc=t.params.receiversCc&&t.params.receiversCc.split(",")||[]),i.default.some(this.store.state.dag.tasks,{id:this.createNodeId})||"definition-create"===this.router.history.current.name||this._getReceiver()},mounted:function(){var t=this;setTimeout(function(){t._handlerEditor()},200)},destroyed:function(){f&&(f.toTextArea(),f.off($(".code-sql-mirror"),"keypress",this.keypress))},computed:{},components:{mListBox:s.default,mDatasource:l.default,mLocalParams:c.default,mUdfs:o.default,mSqlType:a.default,mEmail:d.default}}},904:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n(30)),r=o(n(677));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(){}}},905:function(t,e,n){"use strict";e.__esModule=!0;var i=s(n(30)),r=n(867),o=s(n(677));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(){}}},906:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(907),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(979),a=n(29)(r.a,s.a,!1,null,null,null);e.default=a.exports},907:function(t,e,n){"use strict";e.__esModule=!0;var i=s(n(30)),r=s(n(36)),o=s(n(677));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("Please select the datasource")),!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:{}}},908:function(t,e,n){"use strict";e.__esModule=!0;var i=u(n(30)),r=u(n(36)),o=u(n(850)),s=u(n(858)),a=u(n(849)),l=u(n(677)),c=u(n(851));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("Please enter script(required)")),!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}}},909:function(t,e,n){"use strict";e.__esModule=!0;var i=c(n(30)),r=c(n(36)),o=c(n(849)),s=c(n(850)),a=c(n(858)),l=c(n(677));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("Core number should be positive integer")),!1):(this.$message.warning(""+r.default.$t("Please enter ExecutorPlease enter Executor core number")),!1):(this.$message.warning(""+r.default.$t("Memory should be a positive integer")),!1):(this.$message.warning(""+r.default.$t("Please enter the Executor memory")),!1):(this.$message.warning(""+r.default.$t("The number of Executors should be a positive integer")),!1):(this.$message.warning(""+r.default.$t("Please enter the number of Executor")),!1):(this.$message.warning(""+r.default.$t("Please enter main jar package")),!1):(this.$message.warning(""+r.default.$t("Please enter main 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}}},910:function(t,e,n){"use strict";e.__esModule=!0;var i=u(n(30)),r=u(n(36)),o=u(n(850)),s=u(n(858)),a=u(n(849)),l=u(n(677)),c=u(n(851));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("Please enter script(required)")),!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}}},911:function(t,e,n){"use strict";e.__esModule=!0;var i=c(n(30)),r=c(n(36)),o=c(n(850)),s=c(n(906)),a=c(n(849)),l=c(n(677));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("Please enter method")),!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}}},912:function(t,e,n){"use strict";e.__esModule=!0;var i=a(n(30)),r=a(n(850)),o=a(n(996)),s=a(n(677));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}}},913:function(t,e,n){"use strict";e.__esModule=!0;var i=s(n(30)),r=n(867),o=s(n(677));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:{}}},914:function(t,e,n){"use strict";e.__esModule=!0;var i=s(n(30)),r=s(n(36)),o=s(n(677));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("Please select a sub-Process")),!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(){}}},915:function(t,e,n){"use strict";e.__esModule=!0;var i=s(n(30)),r=s(n(36)),o=s(n(677));function s(t){return t&&t.__esModule?t:{default:t}}e.default={name:"form-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("Please enter a positive integer")),this._ckIcon(),!1))}},watch:{},created:function(){this._setIconState(this.value)},mounted:function(){},components:{}}},916:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n(30)),r=o(n(677));function o(t){return t&&t.__esModule?t:{default:t}}e.default={name:"form-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("Timeout strategy must be selected")),!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("Timeout must be a positive integer")),!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:{}}},917:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(865),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(920);var a=function(t){n(918)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},918:function(t,e,n){var i=n(919);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("57286c9c",i,!0,{})},919: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}",""])},920: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("Please set the parameters before starting")))])]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("Failure Strategy"))+"\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("Continue")))]),t._v(" "),n("x-radio",{attrs:{label:"END"}},[t._v(t._s(t.$t("End")))])],1)],1)]),t._v(" "),"contextmenu"===t.sourceType?n("div",{staticClass:"clearfix list",staticStyle:{"margin-top":"-8px"}},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("Node execution"))+"\n ")]),t._v(" "),n("div",{staticClass:"cont",staticStyle:{"padding-top":"6px"}},[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("Backward execution")))]),t._v(" "),n("x-radio",{attrs:{label:"TASK_PRE"}},[t._v(t._s(t.$t("Forward execution")))]),t._v(" "),n("x-radio",{attrs:{label:"TASK_ONLY"}},[t._v(t._s(t.$t("Execute only the current node")))])],1)],1)]):t._e(),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("Notification strategy"))+"\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("Process priority"))+"\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 Worker分组\n ")]),t._v(" "),n("div",{staticClass:"cont"},[n("m-worker-groups",{model:{value:t.workerGroupId,callback:function(e){t.workerGroupId=e},expression:"workerGroupId"}})],1)]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("Notification group"))+"\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("Please select a notification group"),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("Recipient"))+"\n ")]),t._v(" "),n("div",{staticClass:"cont",staticStyle:{width:"688px"}},[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("Cc"))+"\n ")]),t._v(" "),n("div",{staticClass:"cont",staticStyle:{width:"688px"}},[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("Complement Data"))+"\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("Whether it is a complement process?")))])],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("Mode of execution"))+"\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("Serial execution")))]),t._v(" "),n("x-radio",{attrs:{label:"RUN_MODE_PARALLEL"}},[t._v(t._s(t.$t("Parallel execution")))])],1)],1)]),t._v(" "),n("div",{staticClass:"clearfix list"},[n("div",{staticClass:"text"},[t._v("\n "+t._s(t.$t("Date"))+"\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("Select date range"),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("Cancel"))+" ")]),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("Start"))+" ")])],1)],2)},staticRenderFns:[]};e.a=i},921:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(868),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(924);var a=function(t){n(922)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},922:function(t,e,n){var i=n(923);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("ef2f9a7e",i,!0,{})},923: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}',""])},924: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("View log")))]),t._v(" "),n("div",{staticClass:"full-screen"},[n("a",{attrs:{href:"javascript:","data-container":"body","data-toggle":"tooltip",title:t.$t("Download Log")},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("Refresh Log")},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("Enter full screen")},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("Cancel full screen")},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("Close"))+" ")])],1)])])])],1)},staticRenderFns:[]};e.a=i},933:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(893),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(1009);var a=function(t){n(934)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},934:function(t,e,n){var i=n(935);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("9f6d19e2",i,!0,{})},935:function(t,e,n){var i=n(125);(t.exports=n(34)(!1)).push([t.i,".dag-model{background:url("+i(n(936))+");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(937))+") no-repeat 50% 50%}.dag-model .icos-SUB_PROCESS{background:url("+i(n(938))+") no-repeat 50% 50%}.dag-model .icos-PROCEDURE{background:url("+i(n(939))+") no-repeat 50% 50%}.dag-model .icos-SQL{background:url("+i(n(940))+") no-repeat 50% 50%}.dag-model .icos-SPARK{background:url("+i(n(941))+") no-repeat 50% 50%}.dag-model .icos-MR{background:url("+i(n(942))+") no-repeat 50% 50%}.dag-model .icos-PYTHON{background:url("+i(n(943))+") no-repeat 50% 50%}.dag-model .icos-DEPENDENT{background:url("+i(n(944))+") 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%;top:58px;width:200px;text-align:center;margin-left:-100px;word-break:break-all}.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}",""])},936:function(t,e,n){t.exports=n.p+"images/dag_bg.png?6a0c3839385c7d50f21acf06989addf4"},937:function(t,e,n){t.exports=n.p+"images/toolbar_SHELL.png?249b36a2f0687b942c0dc26e85bf5c5d"},938:function(t,e,n){t.exports=n.p+"images/toolbar_SUB_PROCESS.png?a5d6b24489e0142c643821cb30f0fa16"},939:function(t,e,n){t.exports=n.p+"images/toolbar_PROCEDURE.png?9418236aaa8d10bda2ba72ff70b4cd94"},940:function(t,e,n){t.exports=n.p+"images/toolbar_SQL.png?ffd333b2d8f16967463a90dc431ce604"},941:function(t,e,n){t.exports=n.p+"images/toolbar_SPARK.png?4fb1f1c7acb1fcbe5ffd39bf99cf2453"},942:function(t,e,n){t.exports=n.p+"images/toolbar_MR.png?835bcf5a478ab55c8fe7510ad6c4ee7e"},943:function(t,e,n){t.exports=n.p+"images/toolbar_PYTHON.png?b2f3d6aa01059c43b4d6dff6a37f8bc4"},944:function(t,e,n){t.exports=n.p+"images/toolbar_DEPENDENT.png?392311ad751588b7dd0e5f842d217254"},945:function(t,e,n){"use strict";e.__esModule=!0;var i=l(n(30)),r=n(866),o=l(n(894)),s=l(n(947)),a=l(n(92));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},946:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n(71)),r=o(n(605));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},947:function(t,e,n){"use strict";e.__esModule=!0;var i=l(n(30)),r=l(n(607)),o=n(857),s=l(n(608)),a=n(126);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},948:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(895),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(949)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},949:function(t,e,n){var i=n(950);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("745214d8",i,!0,{})},950:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,".udp-model{width:624px;min-height:420px;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}.udp-model .content .user-def-params-model .add a{color:#0097e0}",""])},951:function(t,e,n){var i=n(952);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("9a785be0",i,!0,{})},952: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{color:#000}.user-def-params-model .add a .iconfont{font-size:18px;vertical-align:middle;display:inline-block;margin-top:1px}.user-def-params-model .add-dp a{color:#0097e0}.user-def-params-model .add-dp a .iconfont{font-size:18px;vertical-align:middle;display:inline-block;margin-top:2px}",""])},953: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",{style:t.inputStyle,attrs:{disabled:t.isDetails,type:"text",placeholder:t.$t("prop(required)"),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(" "),t.hide?[n("x-select",{staticStyle:{width:"80px"},attrs:{disabled:t.isDetails},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},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._e(),t._v(" "),n("x-input",{style:t.inputStyle,attrs:{disabled:t.isDetails,type:"text",placeholder:t.$t("value(optional)"),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("delete")}},[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("Add")}},[t._v("")])])]):t._e()],2)}),t._v(" "),t.localParamsList.length?t._e():n("span",{staticClass:"add-dp"},[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("Add")}},[t._v("")])])])],2)},staticRenderFns:[]};e.a=i},954:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(898),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(957);var a=function(t){n(955)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},955:function(t,e,n){var i=n(956);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("06dba67e",i,!0,{})},956: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}",""])},957: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("Save"),nameText:this.$t("Whether to save the DAG graph")},on:{close:this._close,ok:this._ok}})],1)},staticRenderFns:[]};e.a=i},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:"udp-model"},[n("div",{staticClass:"scrollbar contpi-boxt"},[n("div",{staticClass:"title"},[n("span",[t._v(t._s(t.$t("Set the DAG diagram name")))])]),t._v(" "),n("div",[n("x-input",{attrs:{type:"text",disabled:"projects-instance-details"===t.router.history.current.name,placeholder:t.$t("Please enter name(required)")},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("Please enter description(optional)"),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._v(" "),n("span",{staticStyle:{"padding-left":"6px"}},[n("x-switch",{model:{value:t.checkedTimeout,callback:function(e){t.checkedTimeout=e},expression:"checkedTimeout"}})],1)]),t._v(" "),t.checkedTimeout?n("div",{staticClass:"content",staticStyle:{"padding-bottom":"10px"}},[n("span",[n("x-input",{staticStyle:{width:"160px"},attrs:{maxlength:"9"},model:{value:t.timeout,callback:function(e){t.timeout=e},expression:"timeout"}},[n("span",{attrs:{slot:"append"},slot:"append"},[t._v(t._s(t.$t("Minute")))])])],1)]):t._e(),t._v(" "),n("div",{staticClass:"title",staticStyle:{"padding-top":"6px"}},[n("span",[t._v(t._s(t.$t("Set global")))])]),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("Whether to update the process definition")))])],1)]:t._e(),t._v(" "),n("x-button",{attrs:{type:"text"},on:{click:function(e){return t.close()}}},[t._v(" "+t._s(t.$t("Cancel"))+" ")]),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("Add")))])],2)])])},staticRenderFns:[]};e.a=i},959:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(899),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(1008);var a=function(t){n(960)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},960:function(t,e,n){var i=n(961);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("c08da99c",i,!0,{})},961: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:112px;float:left;text-align:right;margin-right:8px}.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}",""])},962:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(900),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(963)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},963:function(t,e,n){var i=n(964);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("7128f412",i,!0,{})},964: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}",""])},965:function(t,e,n){var i=n(966);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("5fa6a761",i,!0,{})},966: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}",""])},967: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},968:function(t,e,n){var i=n(969);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("5678eb12",i,!0,{})},969: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}",""])},970: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("Please select resources")},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},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:"spark-model"},[n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("Program Type")))]),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("Main class")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("Please enter main class"),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("Main jar package")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("Please enter main jar package"),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("Command-line parameters")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{autosize:{minRows:2},disabled:t.isDetails,type:"textarea",placeholder:t.$t("Please enter Command-line parameters"),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("Other parameters")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{disabled:t.isDetails,autosize:{minRows:2},type:"textarea",placeholder:t.$t("Please enter other parameters"),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("Resources")))]),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("Custom Parameters")))]),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},972:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(903),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),a=n(29)(r.a,s.a,!1,null,null,null);e.default=a.exports},973:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(904),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);var a=function(t){n(974)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},974:function(t,e,n){var i=n(975);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("323d7c56",i,!0,{})},975: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}",""])},976: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},977:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(905),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(29)(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:"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},979: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("Please select the datasource"),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},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",{staticClass:"sql-model"},[n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("Datasource")))]),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 Type")))]),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("Table")))]),t._v(" "),n("x-checkbox",{attrs:{label:"ATTACHMENT",disabled:t.isDetails}},[t._v(t._s(t.$t("Attachment")))])],1)],1)])]),t._v(" "),!t.sqlType&&t.showType.length?[n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("Recipient")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-email",{attrs:{disabled:t.isDetails,"repeat-data":t.receiversCc},model:{value:t.receivers,callback:function(e){t.receivers=e},expression:"receivers"}})],1)]),t._v(" "),n("m-list-box",[n("div",{attrs:{slot:"text"},slot:"text"},[t._v(t._s(t.$t("Cc")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-email",{attrs:{disabled:t.isDetails,"repeat-data":t.receivers},model:{value:t.receiversCc,callback:function(e){t.receiversCc=e},expression:"receiversCc"}})],1)])]:t._e(),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 Parameter")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("Please enter format")+" 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 Statement")))]),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 Function")))]),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("Custom Parameters")))]),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)])],2)},staticRenderFns:[]};e.a=i},981:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(908),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(982),a=n(29)(r.a,s.a,!1,null,null,null);e.default=a.exports},982: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("Script")))]),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("Resources")))]),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("Custom Parameters")))]),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},983:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(909),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(986);var a=function(t){n(984)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},984:function(t,e,n){var i=n(985);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("4ce40ee2",i,!0,{})},985: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}",""])},986: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("Program Type")))]),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("Main class")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("Please enter main class"),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("Main jar package")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("Please enter main jar package"),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("Deploy Mode")))]),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 core number")))]),t._v(" "),n("span",{staticClass:"sp2"},[n("x-input",{staticStyle:{width:"200px"},attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("Please enter driver core number"),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 memory use")))]),t._v(" "),n("span",{staticClass:"sp2"},[n("x-input",{staticStyle:{width:"186px"},attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("Please enter driver memory use"),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("Number of Executors")))]),t._v(" "),n("span",{staticClass:"sp2"},[n("x-input",{staticStyle:{width:"200px"},attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("Please enter the number of 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 memory")))]),t._v(" "),n("span",{staticClass:"sp2"},[n("x-input",{staticStyle:{width:"186px"},attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("Please enter the Executor memory"),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 core number")))]),t._v(" "),n("span",{staticClass:"sp2"},[n("x-input",{staticStyle:{width:"200px"},attrs:{disabled:t.isDetails,type:"input",placeholder:t.$t("Please enter Executor core number"),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("Command-line parameters")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{autosize:{minRows:2},disabled:t.isDetails,type:"textarea",placeholder:t.$t("Please enter Command-line parameters"),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("Other parameters")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{disabled:t.isDetails,autosize:{minRows:2},type:"textarea",placeholder:t.$t("Please enter other parameters")},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("Resources")))]),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("Custom Parameters")))]),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},987:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(910),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(988),a=n(29)(r.a,s.a,!1,null,null,null);e.default=a.exports},988: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("Script")))]),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("Resources")))]),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("Custom Parameters")))]),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},989:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(911),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(992);var a=function(t){n(990)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},990:function(t,e,n){var i=n(991);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("41b5373b",i,!0,{})},991:function(t,e,n){(t.exports=n(34)(!1)).push([t.i,"",""])},992: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("Datasource")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("m-datasource",{ref:"refDs",attrs:{supportType:["MYSQL","POSTGRESQL","CLICKHOUSE","ORACLE","SQLSERVER"],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("methods")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("x-input",{attrs:{type:"input",disabled:t.isDetails,placeholder:t.$t("Please enter method(optional)"),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("Custom Parameters")))]),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},993:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(912),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(1e3);var a=function(t){n(994)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},994:function(t,e,n){var i=n(995);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("cb5e4b98",i,!0,{})},995: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}",""])},996:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(913),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(999);var a=function(t){n(997)},l=n(29)(r.a,s.a,!1,a,null,null);e.default=l.exports},997:function(t,e,n){var i=n(998);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("81597204",i,!0,{})},998: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}",""])},999: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("success")}},[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("waiting")}},[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("failed")}},[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("delete")}},[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("Add")}},[t._v("")])]):t._e()])],2)}),0)},staticRenderFns:[]};e.a=i}}); |