Files
PhotonVision/Main/target/classes/web/js/app.10bc1021.js
2019-09-11 20:28:56 +03:00

2 lines
25 KiB
JavaScript

(function(t){function e(e){for(var s,r,o=e[0],l=e[1],u=e[2],p=0,m=[];p<o.length;p++)r=o[p],a[r]&&m.push(a[r][0]),a[r]=0;for(s in l)Object.prototype.hasOwnProperty.call(l,s)&&(t[s]=l[s]);c&&c(e);while(m.length)m.shift()();return i.push.apply(i,u||[]),n()}function n(){for(var t,e=0;e<i.length;e++){for(var n=i[e],s=!0,o=1;o<n.length;o++){var l=n[o];0!==a[l]&&(s=!1)}s&&(i.splice(e--,1),t=r(r.s=n[0]))}return t}var s={},a={app:0},i=[];function r(e){if(s[e])return s[e].exports;var n=s[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=s,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)r.d(n,s,function(e){return t[e]}.bind(null,s));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],l=o.push.bind(o);o.push=e,o=o.slice();for(var u=0;u<o.length;u++)e(o[u]);var c=l;i.push([0,"chunk-vendors"]),n()})({0:function(t,e,n){t.exports=n("56d7")},"034f":function(t,e,n){"use strict";var s=n("64a9"),a=n.n(s);a.a},"0821":function(t,e,n){"use strict";var s=n("5d25"),a=n.n(s);a.a},"27d1":function(t,e,n){"use strict";var s=n("ad29"),a=n.n(s);a.a},"28ef":function(t,e,n){},"2ecb":function(t,e,n){},3406:function(t,e,n){},"42e8":function(t,e,n){},"51b3":function(t,e,n){"use strict";var s=n("3406"),a=n.n(s);a.a},"53f3":function(t,e,n){},"56d7":function(t,e,n){"use strict";n.r(e);n("cadf"),n("551c"),n("f751"),n("097d");var s=n("2b0e"),a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("div",{staticClass:"layout"},[n("Layout",{style:{minHeight:"100vh"}},[n("Layout",[n("Sider",{attrs:{id:"main-nav",collapsible:"","collapsed-width":78},on:{"on-collapse":t.onCollapse},model:{value:t.isCollapsed,callback:function(e){t.isCollapsed=e},expression:"isCollapsed"}},[n("Menu",{ref:"menu",class:t.menuitemClasses,attrs:{"active-name":t.activeName,"open-names":t.openedNames,theme:"dark",width:"auto"},on:{"on-open-change":t.onOpenChange}},[n("Submenu",{attrs:{name:"/vision"}},[n("template",{slot:"title"},[n("Icon",{attrs:{type:"ios-videocam"}}),t.isCollapsed?t._e():n("span",[t._v("Vision")])],1),n("MenuItem",{attrs:{name:"/vision/input",to:"/vision/input"}},[t._v("Input")]),n("MenuItem",{attrs:{name:"/vision/threshold",to:"/vision/threshold"}},[t._v("Threshold")]),n("MenuItem",{attrs:{name:"/vision/contours",to:"/vision/contours"}},[t._v("Contours")]),n("MenuItem",{attrs:{name:"/vision/output",to:"/vision/output"}},[t._v("Output")])],2),n("Submenu",{attrs:{name:"/settings"}},[n("template",{slot:"title"},[n("Icon",{attrs:{type:"ios-settings"}}),t.isCollapsed?t._e():n("span",[t._v("Settings")])],1),n("MenuItem",{attrs:{name:"/settings/system",to:"/settings/system"}},[t._v("System")]),n("MenuItem",{attrs:{name:"/settings/camera",to:"/settings/camera"}},[t._v("Cameras")])],2)],1)],1),n("router-view")],1)],1)],1)])},i=[],r=(n("28a5"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Row",{attrs:{type:"flex",justify:"start",align:"middle",gutter:1}},[n("Col",{attrs:{span:"4"}},[n("h4",[t._v(t._s(t.title.charAt(0).toUpperCase()+t.title.slice(1))+" :")])]),n("Col",{attrs:{span:"12"}},[n("i-select",{attrs:{size:"small",disabled:t.isDisabled},on:{"on-change":t.handleInput,"on-query-change":function(e){return t.$emit("change")}},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t._l(t.list,function(e){return n("i-option",{key:e,attrs:{value:e}},[t._v(t._s(e))])}),1)],1)],1)}),o=[],l=n("bd86"),u={name:"ch-select",props:{title:String,list:Array,Xkey:String,isDisabled:Boolean},data:function(){return{}},methods:{handleInput:function(){this.$socket.sendObj(Object(l["a"])({},this.Xkey,this.value))}},computed:{value:{get:function(){return this.$store.state[this.Xkey]},set:function(t){this.$store.commit(this.Xkey,t)}}}},c=u,p=(n("b75c"),n("2877")),m=Object(p["a"])(c,r,o,!1,null,null,null),h=m.exports,d={name:"app",components:{chselect:h},data:function(){return{isCollapsed:!1,openedNames:["/"+this.$route.path.split("/")[1]],activeName:this.$route.path}},methods:{onOpenChange:function(t){this.isCollapsed=!1,console.info("App currentRoute:",this.$router.currentRoute)},onCollapse:function(){this.isCollapsed?this.openedNames=[""]:(this.activeName=this.$refs.menu.currentActiveName,this.openedNames=["/"+this.activeName.split("/")[1]]),this.$nextTick(function(){this.$refs.menu.updateOpened(),this.$refs.menu.updateActiveName()})}},computed:{menuitemClasses:function(){return["menu-item",this.isCollapsed?"collapsed-menu":""]}},created:function(){var t=this;this.$options.sockets.onmessage=function(e){try{var n=JSON.parse(e.data);for(var s in n)n.hasOwnProperty(s)&&(t.$store.state[s]=n[s]),console.log(e.data)}catch(a){console.log("error"+e.data)}}}},f=d,g=(n("034f"),Object(p["a"])(f,a,i,!1,null,null,null)),v=g.exports,y=n("8c4f"),_=n("e069"),b=n.n(_),k=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Layout",{attrs:{id:"main-layout"}},[n("Header",{attrs:{id:"main-header"}},[n("Row",{attrs:{type:"flex",justify:"start",align:"middle",gutter:10}},[n("Col",{attrs:{span:"12"}},[n("chselect",{attrs:{title:"camera",list:t.cameraList,Xkey:"curr_camera"}})],1),n("Col",{attrs:{span:"12"}},[n("chselect",{attrs:{title:"pipline",list:t.pipelineList,Xkey:"curr_pipeline"}})],1)],1)],1),n("Content",{attrs:{id:"main-content"}},[n("row",{attrs:{type:"flex",justify:"start",align:"top",gutter:5}},[n("Col",{attrs:{span:"12"}},[n("router-view")],1),n("Col",{attrs:{span:"12"}},[n("Tabs",{attrs:{animated:!1},on:{"on-click":t.handleImage},model:{value:t.isBinary,callback:function(e){t.isBinary=e},expression:"isBinary"}},[n("TabPane",{attrs:{label:"Normal"}}),n("TabPane",{attrs:{label:"Threshold"}})],1),n("img",{staticClass:"imageSize",attrs:{src:t.steamAdress}}),n("h4",{staticClass:"pointText"},[t._v(t._s(t.point))])],1)],1)],1)],1)},C=[],x={name:"Vision",components:{chselect:h},data:function(){return{}},methods:{handleImage:function(){this.$socket.sendObj({is_binary:this.isBinary})}},computed:{cameraList:{get:function(){return this.$store.state.cameraList}},pipelineList:{get:function(){return this.$store.state.pipelineList}},steamAdress:{get:function(){return"http://"+location.hostname+":"+this.$store.state.port+"/stream.mjpg"}},isBinary:{get:function(){return this.$store.state.is_binary},set:function(t){this.$store.commit("is_binary",t)}},point:{get:function(){var t=this.$store.state.point;return"Pitch: "+parseFloat(t["pitch"]).toFixed(2)+" Yaw: "+parseFloat(t["yaw"]).toFixed(2)+" FPS: "+parseFloat(t["fps"]).toFixed(2)}}}},$=x,w=(n("51b3"),Object(p["a"])($,k,C,!1,null,null,null)),S=w.exports,O=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Layout",{attrs:{id:"main-layout"}},[n("Content",{attrs:{id:"main-content"}},[n("router-view")],1)],1)},j=[],I={name:"Settings",data:function(){return{}},methods:{}},X=I,L=Object(p["a"])(X,O,j,!1,null,"033196b2",null),N=L.exports,A=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"InputTab"}},[n("chslider",{staticClass:"spacing",attrs:{title:"exposure",Xkey:"exposure"}}),n("chslider",{staticClass:"spacing",attrs:{title:"Brightness",Xkey:"brightness"}}),n("chselect",{staticClass:"spacing",attrs:{title:"Orientation",Xkey:"orientation",list:["Normal","Inverted"]}})],1)},T=[],P=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("row",{attrs:{type:"flex",justify:"start",align:"middle",gutter:1}},[n("Col",{attrs:{span:"4"}},[n("h4",[t._v(t._s(t.title.charAt(0).toUpperCase()+t.title.slice(1))+" :")])]),n("Col",{staticStyle:{"text-align":"left"},attrs:{span:"4"}},[n("InputNumber",{staticStyle:{"align-self":"flex-start"},attrs:{size:"small"},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1),n("Col",{attrs:{span:"14"}},[n("Slider",{on:{"on-input":t.handleInput},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)],1)},B=[],F={name:"ch-slider",props:{title:String,Xkey:String},data:function(){return{}},methods:{handleInput:function(){this.$socket.sendObj(Object(l["a"])({},this.Xkey,this.value))}},computed:{value:{get:function(){return this.$store.state[this.Xkey]},set:function(t){this.$store.commit(this.Xkey,t)}}}},z=F,R=(n("c012"),Object(p["a"])(z,P,B,!1,null,null,null)),V=R.exports,E=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Row",{attrs:{type:"flex",justify:"start",align:"middle",gutter:1}},[n("Col",{attrs:{span:"4"}},[n("h4",[t._v(t._s(t.title.charAt(0).toUpperCase()+t.title.slice(1))+" :")])]),n("Col",{attrs:{span:"4"}},[n("i-select",{attrs:{size:"small"},on:{"on-change":t.handleInput},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t._l(t.list,function(e,s){return n("i-option",{key:s,attrs:{value:s}},[t._v(t._s(e))])}),1)],1)],1)},M=[],D={name:"ch-select",props:{title:String,list:Array,Xkey:String},data:function(){return{}},methods:{handleInput:function(){this.$socket.sendObj(Object(l["a"])({},this.Xkey,this.value))}},computed:{value:{get:function(){return this.$store.state[this.Xkey]},set:function(t){this.$store.commit(this.Xkey,t)}}}},H=D,U=(n("b4d3"),Object(p["a"])(H,E,M,!1,null,null,null)),J=U.exports,G={name:"InputTab",data:function(){return{}},components:{chslider:V,chselect:h,chIndexSelect:J},methods:{},computed:{resolutionList:{get:function(){return this.$store.state.resolutionList}}}},Q=G,q=(n("27d1"),Object(p["a"])(Q,A,T,!1,null,"285b7205",null)),W=q.exports,Y=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"Threshold"}},[n("chrange",{staticClass:"spacing",attrs:{title:"Hue",Xkey:"hue",maximum:180}}),n("chrange",{staticClass:"spacing",attrs:{title:"Saturation",Xkey:"saturation",maximum:255}}),n("chrange",{staticClass:"spacing",attrs:{title:"Value",Xkey:"value",maximum:255}}),n("chswitch",{staticClass:"spacing",attrs:{title:"Erode",Xkey:"erode"}}),n("chswitch",{staticClass:"spacing",attrs:{title:"Dilate",Xkey:"dilate"}})],1)},K=[],Z=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("row",{attrs:{type:"flex",justify:"start",align:"middle",gutter:1}},[n("Col",{attrs:{span:"4"}},[n("h4",[t._v(t._s(t.title.charAt(0).toUpperCase()+t.title.slice(1))+" :")])]),n("Col",{staticStyle:{"text-align":"left"},attrs:{span:"4"}},[n("InputNumber",{staticStyle:{"align-self":"flex-start"},attrs:{size:"small",step:t.steps},model:{value:t.value[0],callback:function(e){t.$set(t.value,0,e)},expression:"value[0]"}})],1),n("Col",{attrs:{span:"10"}},[n("Slider",{attrs:{range:"",step:t.steps,max:t.maximum},on:{"on-input":t.handleInput},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1),n("Col",{staticStyle:{"text-align":"right"},attrs:{span:"4"}},[n("InputNumber",{staticStyle:{"align-self":"flex-end"},attrs:{size:"small",step:t.steps,max:t.maximum},model:{value:t.value[1],callback:function(e){t.$set(t.value,1,e)},expression:"value[1]"}})],1)],1)},tt=[],et=(n("c5f6"),{name:"ch-range",props:{title:String,Xkey:String,steps:Number,maximum:Number},data:function(){return{}},methods:{handleInput:function(){this.$socket.sendObj(Object(l["a"])({},this.Xkey,this.value))}},computed:{value:{get:function(){return this.$store.state[this.Xkey]},set:function(t){this.$store.commit(this.Xkey,t)}}}}),nt=et,st=(n("c577"),Object(p["a"])(nt,Z,tt,!1,null,null,null)),at=st.exports,it=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Row",{attrs:{type:"flex",justify:"start",align:"middle",gutter:1}},[n("Col",{attrs:{span:"4"}},[n("h4",[t._v(t._s(t.title.charAt(0).toUpperCase()+t.title.slice(1))+" :")])]),n("Col",{staticStyle:{"text-align":"left"},attrs:{span:"4"}},[n("i-switch",{staticStyle:{"align-self":"flex-start"},on:{"on-change":t.handleInput},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)],1)},rt=[],ot={name:"ch-switch",props:{title:String,Xkey:String},methods:{handleInput:function(){this.$socket.sendObj(Object(l["a"])({},this.Xkey,this.value))}},computed:{value:{get:function(){return this.$store.state[this.Xkey]},set:function(t){this.$store.commit(this.Xkey,t)}}},data:function(){return{}}},lt=ot,ut=Object(p["a"])(lt,it,rt,!1,null,"182635d8",null),ct=ut.exports,pt={name:"Threshold",data:function(){return{}},components:{chrange:at,chselect:h,chswitch:ct},methods:{}},mt=pt,ht=(n("f202"),Object(p["a"])(mt,Y,K,!1,null,"267dfb50",null)),dt=ht.exports,ft=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"SystemTab"}},[n("div",[n("row",{attrs:{type:"flex",justify:"start",align:"middle",gutter:10}},[n("Col",{attrs:{span:"6"}},[n("h4",[t._v("Team Number:")])]),n("col",{attrs:{span:"4"}}),n("InputNumber",{attrs:{min:0,size:"small"},model:{value:t.team_number,callback:function(e){t.team_number=e},expression:"team_number"}})],1)],1),n("Divider",{staticClass:"divdiv",attrs:{orientation:"left"}},[t._v("Networking")]),n("div",[n("RadioGroup",{staticStyle:{display:"flex"},model:{value:t.connection_type,callback:function(e){t.connection_type=e},expression:"connection_type"}},[n("Radio",{attrs:{label:"DHCP"}}),n("Radio",{attrs:{label:"Static"}})],1),n("div",{staticClass:"ipSettings"},[n("row",{staticClass:"spacing",attrs:{type:"flex",justify:"start",align:"middle"}},[n("Col",{attrs:{span:"4"}},[n("h4",[t._v("IP:")])]),n("Col",{attrs:{span:"10"}},[n("Input",{attrs:{size:"small",disabled:t.isConnection},model:{value:t.ip,callback:function(e){t.ip=e},expression:"ip"}})],1)],1),n("row",{staticClass:"spacing",attrs:{type:"flex",justify:"start",align:"middle"}},[n("Col",{attrs:{span:"4"}},[n("h4",[t._v("Netmask:")])]),n("Col",{attrs:{span:"10"}},[n("Input",{attrs:{size:"small",disabled:t.isConnection},model:{value:t.netmask,callback:function(e){t.netmask=e},expression:"netmask"}})],1)],1),n("row",{staticClass:"spacing",attrs:{type:"flex",justify:"start",align:"middle"}},[n("Col",{attrs:{span:"4"}},[n("h4",[t._v("Gateway:")])]),n("Col",{attrs:{span:"10"}},[n("Input",{attrs:{size:"small",disabled:t.isConnection},model:{value:t.gateway,callback:function(e){t.gateway=e},expression:"gateway"}})],1)],1),n("row",{staticClass:"spacing",attrs:{type:"flex",justify:"start",align:"middle"}},[n("Col",{attrs:{span:"4"}},[n("h4",[t._v("Hostname:")])]),n("Col",{attrs:{span:"10"}},[n("Input",{attrs:{size:"small"},model:{value:t.hostname,callback:function(e){t.hostname=e},expression:"hostname"}},[n("span",{attrs:{slot:"prepend"},slot:"prepend"},[t._v("http://Chameleon-Vision-")]),n("span",{attrs:{slot:"append"},slot:"append"},[t._v(".local")])])],1)],1)],1),n("Divider",{staticClass:"divdiv",attrs:{orientation:"left"}}),n("row",{staticStyle:{"margin-top":"20px"},attrs:{type:"flex",justify:"start",align:"middle"}},[n("Button",{attrs:{type:"primary",size:"small"},on:{click:t.socketSendAll}},[t._v("Save Changes and Restart")])],1)],1)],1)},gt=[],vt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"InputNumber"}},[n("row",{attrs:{type:"flex",justify:"start",align:"middle",gutter:10}},[n("Col",{attrs:{span:"6"}},[n("h4",[t._v(t._s(t.title))])]),n("col",{attrs:{span:"4"}}),n("InputNumber",{attrs:{min:0,size:"small"},on:{"on-change":t.handleInput},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)],1)},yt=[],_t={name:"ch-InputNumber",props:{title:String,Xkey:String},data:function(){return{}},methods:{handleInput:function(){this.$socket.sendObj(Object(l["a"])({},this.Xkey,this.value))}},computed:{value:{get:function(){return this.$store.state[this.Xkey]},set:function(t){this.$store.commit(this.Xkey,t)}}}},bt=_t,kt=Object(p["a"])(bt,vt,yt,!1,null,"672703df",null),Ct=kt.exports,xt={name:"SystemTab",data:function(){return{lan:0}},components:{chInputNumber:Ct,chSelect:h},methods:{socketSendAll:function(){this.$socket.sendObj({change_general_settings_values:{team_number:this.team_number,connection_type:this.connection_type,ip:this.ip,netmask:this.netmask,gateway:this.gateway,hostname:this.hostname}})}},computed:{team_number:{get:function(){return this.$store.state.team_number},set:function(t){this.$store.commit("team_number",t)}},connection_type:{get:function(){return this.$store.state.connection_type},set:function(t){this.$store.commit("connection_type",t)}},ip:{get:function(){return this.$store.state.ip},set:function(t){this.$store.commit("ip",t)}},netmask:{get:function(){return this.$store.state.netmask},set:function(t){this.$store.commit("netmask",t)}},gateway:{get:function(){return this.$store.state.gateway},set:function(t){this.$store.commit("gateway",t)}},hostname:{get:function(){return this.$store.state.hostname},set:function(t){this.$store.commit("hostname",t)}},isConnection:function(){return"DHCP"==this.connection_type}}},$t=xt,wt=(n("0821"),Object(p["a"])($t,ft,gt,!1,null,null,null)),St=wt.exports,Ot=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"spacing",attrs:{id:"cameraTab"}},[n("chselect",{attrs:{title:"select camera",list:t.cameraList,Xkey:"curr_camera"}}),n("Row",{staticClass:"spacing",attrs:{type:"flex",justify:"start",align:"middle",gutter:1}},[n("Col",{attrs:{span:"4"}},[n("h4",[t._v("Resolution:")])]),n("Col",{attrs:{span:"4"}},[n("i-select",{attrs:{size:"small"},model:{value:t.resolution,callback:function(e){t.resolution=e},expression:"resolution"}},t._l(t.resolutionList,function(e,s){return n("i-option",{key:s,attrs:{value:s}},[t._v(t._s(e))])}),1)],1)],1),n("Row",{staticClass:"spacing",attrs:{type:"flex",justify:"start",align:"middle",gutter:1}},[n("Col",{attrs:{span:"4"}},[n("h4",[t._v("Diagonal FOV:")])]),n("Col",{attrs:{span:"4"}},[n("InputNumber",{attrs:{min:0,size:"small"},model:{value:t.FOV,callback:function(e){t.FOV=e},expression:"FOV"}})],1)],1),n("Button",{staticClass:"buttonClass spacing",attrs:{type:"primary",size:"small"},on:{click:t.socketSendAll}},[t._v("Save settings to current camera")]),n("h4",{staticClass:"spacing"},[t._v("Please Restart the computer Manually after saving all cameras")])],1)},jt=[],It={name:"cameraTab",components:{chselect:h,chIndexSelect:J},data:function(){return{}},methods:{socketSendAll:function(){this.$socket.sendObj({resolution:this.resolution}),this.$socket.sendObj({FOV:this.FOV})}},computed:{cameraList:{get:function(){return this.$store.state.cameraList}},resolutionList:{get:function(){return this.$store.state.resolutionList}},resolution:{get:function(){return this.$store.state.resolution},set:function(t){this.$store.commit("resolution",t)}},FOV:{get:function(){return this.$store.state.FOV},set:function(t){this.$store.commit("FOV",t)}}}},Xt=It,Lt=(n("5f92"),Object(p["a"])(Xt,Ot,jt,!1,null,"4d25b2ea",null)),Nt=Lt.exports,At=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"ContourTab"}},[n("chrange",{staticClass:"spacing",attrs:{title:"Area",Xkey:"area"}}),n("chrange",{staticClass:"spacing",attrs:{title:"Ratio (W/H)",Xkey:"ratio",steps:.1}}),n("chrange",{staticClass:"spacing",attrs:{title:"Extent",Xkey:"extent"}}),n("chselect",{staticClass:"spacing",attrs:{title:"Target Group",Xkey:"target_group",list:["Single","Dual","Triple","Quadruple","Quintuple"]}}),n("chselect",{staticClass:"spacing",attrs:{title:"Target Intersaction",Xkey:"target_intersection",list:["Up","Down","Left","Right","Parallel"],isDisabled:t.isSingle}})],1)},Tt=[],Pt={name:"ContourTab",components:{chslider:V,chselect:h,chrange:at},methods:{},data:function(){return{}},computed:{isSingle:function(){return"Single"==this.$store.state.target_group}},watch:{}},Bt=Pt,Ft=(n("982f"),Object(p["a"])(Bt,At,Tt,!1,null,"90fe5fa0",null)),zt=Ft.exports,Rt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"OutputTab"}},[n("chselect",{staticClass:"spacing",attrs:{title:"Sort Mode",Xkey:"sort_mode",list:["Largest","Smallest","Highest","Lowest","Rightmost","Leftmost","Closest"]}}),n("Row",{staticClass:"spacing",attrs:{type:"flex",justify:"start",align:"middle",gutter:10}},[n("col"),n("Button",{attrs:{type:"primary",size:"small"},on:{click:t.takePointA}},[t._v("Take Point A")]),n("col",{staticStyle:{"margin-left":"10px"}}),n("Button",{attrs:{type:"primary",size:"small"},on:{click:t.takePointB}},[t._v("Take Point B")])],1),n("Row",{staticClass:"spacing",attrs:{type:"flex",align:"middle",gutter:10}},[n("col"),n("Button",{attrs:{type:"warning",size:"small"},on:{click:t.clearPoints}},[t._v("Clear All Points")])],1)],1)},Vt=[],Et={name:"OutputTab",components:{chslider:V,chselect:h,chrange:at},methods:{takePointA:function(){this.pointA=this.raw_point,this.calcSlope()},takePointB:function(){this.pointB=this.raw_point,this.calcSlope()},calcSlope:function(){if(void 0!==this.pointA&&void 0!==this.pointB){var t=(this.pointB[1]-this.pointA[1])/(this.pointB[0]-this.pointA[0]),e=this.pointA[1]-t*this.pointA[0];!1===isNaN(t)&&!1===isNaN(e)?this.sendSlope(t,e):this.$Message.error("Point A and B are to close apart"),this.pointA=void 0,this.pointB=void 0}},clearPoints:function(){this.sendSlope(1,0),this.pointA=void 0,this.pointB=void 0},sendSlope:function(t,e){this.$socket.sendObj({M:t}),this.$socket.sendObj({B:e})}},computed:{raw_point:{get:function(){return this.$store.state.raw_point}}},data:function(){return{pointA:void 0,pointB:void 0}}},Mt=Et,Dt=(n("9080"),Object(p["a"])(Mt,Rt,Vt,!1,null,"1abc7610",null)),Ht=Dt.exports,Ut=[{path:"/",redirect:"/vision/input"},{path:"/vision",component:S,children:[{path:"input",component:W},{path:"threshold",component:dt},{path:"contours",component:zt},{path:"output",component:Ht}]},{path:"/settings",component:N,children:[{path:"system",component:St},{path:"camera",component:Nt}]}],Jt=new y["a"]({routes:Ut}),Gt=Jt,Qt=(n("9819"),n("b408")),qt=n.n(Qt),Wt=n("69c5"),Yt=n.n(Wt),Kt=n("2f62");s["default"].use(Kt["a"]);var Zt=function(t){return function(e,n){e[t]=n}},te=new Kt["a"].Store({state:{curr_camera:"",curr_pipeline:"",cameraList:[],pipelineList:[],exposure:54,brightness:0,orientation:0,resolution:0,resolutionList:[],FOV:0,hue:[0,10],saturation:[0,10],value:[0,10],erode:!1,dilate:!1,area:[0,100],ratio:[0,20],extent:[0,100],sort_mode:"Largest",target_group:"Single",target_intersection:"Up",team_number:0,connection_type:"DHCP",ip:"",gateway:"",netmask:"",hostname:"",port:1181,is_binary:0,raw_point:[],point:{}},mutations:{curr_camera:function(t,e){t["curr_camera"]=e,t["pipeline"]="0"},curr_pipeline:Zt("curr_pipeline"),brightness:Zt("brightness"),exposure:Zt("exposure"),orientation:Zt("orientation"),resolution:Zt("resolution"),hue:Zt("hue"),saturation:Zt("saturation"),value:Zt("value"),erode:Zt("erode"),dilate:Zt("dilate"),area:Zt("area"),ratio:Zt("ratio"),extent:Zt("extent"),team_number:Zt("team_number"),connection_type:Zt("connection_type"),ip:Zt("ip"),netmask:Zt("netmask"),gateway:Zt("gateway"),hostname:Zt("hostname"),is_binary:Zt("is_binary"),cameraList:Zt("cameraList"),pipelineList:Zt("piplineList"),sort_mode:Zt("sort_mode"),target_group:Zt("target_group"),target_intersection:Zt("target_intersection"),FOV:Zt("FOV"),port:Zt("port"),raw_point:Zt("raw_point"),point:Zt("point")},getters:{curr_camera:function(t){return t.curr_camera},curr_pipeline:function(t){return t.curr_pipeline},brightness:function(t){return t.brightness},exposure:function(t){return t.exposure},orientation:function(t){return t.orientation},resolution:function(t){return t.resolution},hue:function(t){return t.hue},saturation:function(t){return t.saturation},value:function(t){return t.value},erode:function(t){return t.dilate},dilate:function(t){return t.dilate},area:function(t){return t.area},ratio:function(t){return t.ratio},extent:function(t){return t.extent},team_number:function(t){return t.teamValue},connection_type:function(t){return t.connectionType},ip:function(t){return t.ip},netmask:function(t){return t.netmask},gateway:function(t){return t.gateway},hostname:function(t){return t.hostName},is_binary:function(t){return t.is_binary},cameraList:function(t){return t.cameraList},pipelineList:function(t){return t.pipelineList},sort_mode:function(t){return t.sort_mode},target_group:function(t){return t.target_group},target_intersection:function(t){return t.target_intersection},FOV:function(t){return t.FOV},port:function(t){return t.port},raw_point:function(t){return t.raw_point},point:function(t){return t.point}}});s["default"].use(y["a"]),s["default"].use(b.a,{locale:Yt.a}),s["default"].use(qt.a,"ws://"+location.hostname+":8888/websocket",{format:"JSON"}),s["default"].config.productionTip=!1,new s["default"]({router:Gt,store:te,render:function(t){return t(v)}}).$mount("#app")},"5d25":function(t,e,n){},"5f92":function(t,e,n){"use strict";var s=n("42e8"),a=n.n(s);a.a},"64a9":function(t,e,n){},"675f":function(t,e,n){},"87d0":function(t,e,n){},9080:function(t,e,n){"use strict";var s=n("2ecb"),a=n.n(s);a.a},9819:function(t,e,n){},"982f":function(t,e,n){"use strict";var s=n("28ef"),a=n.n(s);a.a},ad29:function(t,e,n){},b4d3:function(t,e,n){"use strict";var s=n("53f3"),a=n.n(s);a.a},b75c:function(t,e,n){"use strict";var s=n("675f"),a=n.n(s);a.a},c012:function(t,e,n){"use strict";var s=n("87d0"),a=n.n(s);a.a},c577:function(t,e,n){"use strict";var s=n("f5ad"),a=n.n(s);a.a},e951:function(t,e,n){},f202:function(t,e,n){"use strict";var s=n("e951"),a=n.n(s);a.a},f5ad:function(t,e,n){}});
//# sourceMappingURL=app.10bc1021.js.map