text: (function(t){function e(e){for(var n,r,s=e[0],c=e[1],l=e[2],p=0,d=[];p<s.length;p++)r=s[p],Object.prototype.hasOwnProperty.call(i,r)&&i[r]&&d.push(i[r][0]),i[r]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(t[n]=c[n]);u&&u(e);while(d.length)d.shift()();return o.push.apply(o,l||[]),a()}function a(){for(var t,e=0;e<o.length;e++){for(var a=o[e],n=!0,s=1;s<a.length;s++){var c=a[s];0!==i[c]&&(n=!1)}n&&(o.splice(e--,1),t=r(r.s=a[0]))}return t}var n={},i={app:0},o=[];function r(e){if(n[e])return n[e].exports;var a=n[e]={i:e,l:!1,exports:{}};return t[e].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=t,r.c=n,r.d=function(t,e,a){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},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 a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(a,n,function(e){return t[e]}.bind(null,n));return a},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 s=window["webpackJsonp"]=window["webpackJsonp"]||[],c=s.push.bind(s);s.push=e,s=s.slice();for(var l=0;l<s.length;l++)e(s[l]);var u=c;o.push([0,"chunk-vendors"]),a()})({0:function(t,e,a){t.exports=a("56d7")},"034f":function(t,e,a){"use strict";a("85ec")},"24fa":function(t,e,a){},"56d7":function(t,e,a){"use strict";a.r(e);a("e260"),a("e6cf"),a("cca6"),a("a79d");var n=a("2b0e"),i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"app"}},[a("Navbar"),a("div",{staticStyle:{position:"fixed",left:"50%",bottom:"5%","z-index":"999999",transform:"translate(-50%, 0)"}},[a("b-button",{staticStyle:{"box-shadow":"0px 8px 16px black"},attrs:{block:"",variant:"primary",size:"sm"},on:{click:t.create}},[a("b-icon",{attrs:{stacked:"",icon:"plus",size:"sm"}}),t._v(" Create Batch ")],1)],1),a("b-overlay",{attrs:{show:t.show,"spinner-type":"grow",rounded:"sm",variant:"transparent",blur:"10px"},scopedSlots:t._u([{key:"overlay",fn:function(){return[a("div",{staticClass:"text-center",staticStyle:{top:"50%",color:"#fff","text-shadow":"2px 2px 4px black, inset 1px 1px 2px black"}},[a("b-icon",{attrs:{icon:"stopwatch","font-scale":"5",animation:"fade"}}),a("h3",{attrs:{id:"cancel-label"}},[t._v("Please wait...")]),a("b-icon",{attrs:{icon:"three-dots",animation:"cylon","font-scale":"5"}})],1)]},proxy:!0}])},[a("div",{staticClass:"color-header",attrs:{id:"container1"}},[a("Task",{staticStyle:{width:"auto",margin:"2em","margin-bottom":"0.5em","margin-top":"0.5em"},attrs:{color:t.selected.color[0]}},[a("b-container",{staticClass:"p-3 pt-5"},[a("b-row",{staticClass:"my-1"},[a("b-col",{attrs:{sm:"2"}},[a("label",{attrs:{for:"input-title"}},[t._v("Title")])]),a("b-col",{attrs:{sm:"10"}},[a("b-form-input",{staticStyle:{"box-shadow":"1px 2px 2px black"},attrs:{id:"input-title",state:null,placeholder:"Title"},model:{value:t.selected.title,callback:function(e){t.$set(t.selected,"title",e)},expression:"selected.title"}})],1)],1),a("b-row",{staticClass:"my-1"},[a("b-col",{attrs:{sm:"2"}},[a("label",{attrs:{for:"input-description"}},[t._v("Description:")])]),a("b-col",{attrs:{sm:"10"}},[a("b-form-textarea",{staticStyle:{"box-shadow":"1px 2px 2px black"},attrs:{id:"input-description",placeholder:"Enter description...",rows:"3","max-rows":"8"},model:{value:t.selected.description,callback:function(e){t.$set(t.selected,"description",e)},expression:"selected.description"}})],1)],1),a("b-row",{staticClass:"my-1"},[a("b-col",{attrs:{sm:"2"}},[a("label",{attrs:{for:"input-image"}},[t._v("Image:")])]),a("b-col",{attrs:{sm:"6"}},[a("b-form-input",{staticStyle:{"box-shadow":"1px 2px 2px black"},attrs:{id:"input-image",state:null,placeholder:"Image URL"},model:{value:t.selected.image,callback:function(e){t.$set(t.selected,"image",e)},expression:"selected.image"}})],1),a("b-col",{attrs:{sm:"1"}},[t._v("OR")]),a("b-col",{attrs:{sm:"2"}},[a("b-form-file",{attrs:{name:"imageFile",state:Boolean(t.selected.imageFile),placeholder:"","drop-placeholder":""},model:{value:t.selected.imageFile,callback:function(e){t.$set(t.selected,"imageFile",e)},expression:"selected.imageFile"}})],1)],1),a("b-row",{staticClass:"mx-auto my-0",staticStyle:{width:"200px"}},[a("b-col",{attrs:{sm:"3"}},[a("b-button",{staticStyle:{"box-shadow":"2px 2px 2px black"},on:{click:t.done}},[a("b-icon",{attrs:{stacked:"",icon:"check"}}),t._v(" Done ")],1)],1)],1)],1)],1)],1),a("grid",{attrs:{center:!0,draggable:!0,sortable:!0,items:t.tasks,cellWidth:300,cellHeight:150},on:{change:t.change,remove:t.remove,click:t.click,sort:t.sort},scopedSlots:t._u([{key:"cell",fn:function(t){return[a("Task",{attrs:{color:t.item.color[0],item:t.item,index:t.index,sort:t.sort,"with-button":!0},on:{remove:function(e){return t.remove()}}})]}}])})],1)],1)},o=[],r=(a("7db0"),a("d3b7"),a("e9c4"),a("d81d"),a("a4d3"),a("e01a"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"task",style:t.taskStyle},[t._t("default",(function(){return[t.item?a("div",{staticStyle:{color:"black"}},[a("b-card",{staticClass:"mb-2",style:t.cardStyle,attrs:{title:t.item.title,"img-src":t.item.image,"img-alt":"Image","img-top":"",tag:"article"}},[a("b-card-text",[t._v(" #"+t._s(t.item.index)+":  "+t._s(t.item.description)+" ")])],1)],1):t._e(),t.withButton?a("b-icon",{staticClass:"task-delete-btn",attrs:{icon:"x-circle",scale:"2",variant:"danger"},on:{mousedown:t.remove}}):t._e()]}))],2)}),s=[],c=(a("a9e3"),a("99af"),{name:"Task",props:{index:{type:Number},sort:{type:Number},withButton:{type:Boolean,default:!1},item:{type:Object},color:{type:Object,default:function(){return null}}},computed:{brightness:function(){var t=this.color,e=t.r,a=t.g,n=t.b;return.299*e+.587*a+.114*n},cardStyle:function(){if(this.color){var t=this.color,e=t.r,a=t.g,n=t.b,i="rgba(".concat(e,", ").concat(a,", ").concat(n,", 0.4)");return{border:"2px solid ".concat(i)}}return null},taskStyle:function(){if(this.color){var t=this.color,e=t.r,a=t.g,n=t.b,i="rgba(".concat(e,", ").concat(a,", ").concat(n,", 0.7)"),o="rgba(".concat(e,", ").concat(a,", ").concat(n,", 0.3)");return{"min-width":"250px","background-color":i,"box-shadow":"0px 8px 10px ".concat(o),color:this.brightness>150?"#000":"#fff","font-size":"1.2em"}}return null}},methods:{remove:function(){this.$emit("remove",{index:this.index})}}}),l=c,u=(a("fcc1"),a("2877")),p=Object(u["a"])(l,r,s,!1,null,null,null),d=p.exports,m=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("b-navbar",{staticClass:"px-3",attrs:{toggleable:"lg",type:"dark",variant:"success"}},[a("b-icon",{staticClass:"mx-3",staticStyle:{cursor:"pointer"},attrs:{icon:"menu-button-wide",scale:"1.5",type:"dark",color:"white"}}),a("b-navbar-brand",{staticClass:"mx-3",attrs:{href:"#"}},[t._v("EFX")]),a("b-navbar-toggle",{attrs:{target:"nav-collapse"}},[a("b-icon",{staticClass:"mx-3",staticStyle:{cursor:"pointer"},attrs:{icon:"menu-button-wide",scale:"1.5",type:"dark",color:"white"}})],1),a("b-navbar-nav",{staticClass:"ml-auto",staticStyle:{position:"fixed",left:"45%"}},[t.campaignTitle?a("b-nav-item",[t._v("Campaign Title: "+t._s(t.campaignTitle))]):t._e()],1),a("b-collapse",{attrs:{id:"nav-collapse","is-nav":""}},[a("b-navbar-nav",{staticClass:"ml-auto",staticStyle:{position:"fixed",right:"3%"}},[a("b-form-input",{staticClass:"mr-sm-2",attrs:{size:"sm",placeholder:"Campaign ID"},model:{value:t.campaignId,callback:function(e){t.campaignId=e},expression:"campaignId"}}),a("b-button",{staticClass:"my-0 my-sm-0",attrs:{size:"sm",type:"submit"},on:{click:t.getCampaign}},[t._v("OK")]),a("b-nav-item",{attrs:{href:"#"}},[t._v("Home")]),a("b-nav-item",{attrs:{href:"#"}},[t._v("Code")]),a("b-nav-item",{attrs:{href:"#"}},[a("b-icon",{attrs:{icon:"github",scale:"1.5",type:"dark",color:"white"}})],1)],1)],1)],1)},b=[],f={name:"Navbar",data:function(){return{campaignId:"",campaignTitle:""}},methods:{getCampaign:function(){this.campaignTitle=this.campaignId}}},h=f,g=Object(u["a"])(h,m,b,!1,null,null,null),v=g.exports,x=a("bc3a"),y=a.n(x);function w(t){return y.a.post("http://localhost:80/createBatch",t)}var k=function(t,e){return Math.round(t+Math.random()*e)},_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return Array.apply(null,new Array(t)).map((function(){return{r:k(0,255),g:k(0,255),b:k(0,255)}}))},S={name:"app",components:{Task:d,Navbar:v},data:function(){return{show:!1,tasks:[],selected:{color:_(),image:"",imageFile:null,title:"",description:""}}},methods:{click:function(t){var e=t.items,a=t.index,n=e.find((function(t){return t.index===a}));this.selected=n.item},change:function(){},remove:function(){},sort:function(t){console.log("sort",t.items)},done:function(){this.tasks.push(JSON.parse(JSON.stringify(this.selected))),this.selected={color:_(1),image:"https://www.w3schools.com/css/paris.jpg",title:"",description:"",imageFile:null}},create:function(){var t=this;this.show=!0,w(this.tasks.map((function(t){var e=t.image,a=t.title,n=t.description,i=t.imageFile;return{image:e,title:a,description:n,imageFile:i}}))).then((function(e){console.log(e),t.show=!1}))}}},C=S,O=(a("034f"),Object(u["a"])(C,i,o,!1,null,null,null)),j=O.exports,T=a("d277"),F=a.n(T),I=a("5f5b"),$=a("b1e0");a("f9e3"),a("2dd8"),a("5df9");n["default"].use(F.a),n["default"].use(I["a"]),n["default"].use($["a"]),n["default"].config.productionTip=!1,new n["default"]({render:function(t){return t(j)}}).$mount("#app")},"85ec":function(t,e,a){},fcc1:function(t,e,a){"use strict";a("24fa")}});
  //# sourceMappingURL=app.4081abc1.js.map