(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[1],{"28fe":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("q-page",{staticClass:"level"},[n("canvas",{ref:"screen",staticClass:"screen"})])},r=[],s=(n("ac4d"),n("8a81"),n("1c4c"),n("7f7f"),n("6b54"),n("ac6a"),n("cadf"),n("06db"),n("5df3"),n("f400"),n("fc74")),o=n.n(s),a=n("59a1"),l=n.n(a),c=n("4db1"),u=n.n(c),h=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;o()(this,t),this.x=e,this.y=n}return l()(t,[{key:"distance",value:function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)}},{key:"equals",value:function(t){return t.x==this.x&&t.y==this.y}}]),t}();function f(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=d(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,s=!0,o=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){o=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(o)throw r}}}}function d(t,e){if(t){if("string"===typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(t,e):void 0}}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:new h,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new h(1,1);o()(this,t),this.points=[e,n],this.a=n.y-e.y,this.b=e.x-n.x,this.c=e.y*n.x-e.x*n.y}return l()(t,[{key:"p1",value:function(){return this.points[0]}},{key:"p2",value:function(){return this.points[1]}},{key:"add",value:function(t){this.contains(t)||this.points.push(t)}},{key:"contains",value:function(t){var e,n=f(this.points);try{for(n.s();!(e=n.n()).done;){var i=e.value;if(i.equals(t))return!0}}catch(r){n.e(r)}finally{n.f()}return!1}},{key:"distance",value:function(t){var e=Math.abs(this.a*t.x+this.b*t.y+this.c),n=Math.sqrt(this.a*this.a+this.b*this.b);return e/n}},{key:"nearestPoint",value:function(t){var e=this.a*this.a+this.b*this.b,n=(this.b*(this.b*t.x-this.a*t.y)-this.a*this.c)/e,i=(this.a*(-this.b*t.x+this.a*t.y)-this.b*this.c)/e;return new h(n,i)}}]),t}();function p(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=m(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,s=!0,o=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){o=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(o)throw r}}}}function m(t,e){if(t){if("string"===typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,s=!0,o=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){o=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(o)throw r}}}}function x(t,e){if(t){if("string"===typeof t)return w(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(t,e):void 0}}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0){var u,h=k(n);try{for(h.s();!(u=h.n()).done;){var f,d=u.value,v=k(t.lines);try{for(v.s();!(f=v.n()).done;){var y=f.value;if(y.contains(d)&&y.contains(s))return!1}}catch(p){v.e(p)}finally{v.f()}}}catch(p){h.e(p)}finally{h.f()}}n.push(o)}else if(a>1)return!1}return!0}},{key:"antiLineDetermination",value:function(t){if(0===t.points.length)return!0;var e,n=k(t.lines);try{for(n.s();!(e=n.n()).done;){var i,r=e.value,s=k(t.points);try{for(s.s();!(i=s.n()).done;){var o=i.value;if(!r.contains(o)){var a,l=0,c=k(r.points);try{for(c.s();!(a=c.n()).done;){var u,h=a.value,f=!1,d=k(t.lines);try{for(d.s();!(u=d.n()).done;){var v=u.value;if(v!==r&&v.contains(o)&&v.contains(h)){f=!0;break}}}catch(y){d.e(y)}finally{d.f()}f||(l+=1)}}catch(y){c.e(y)}finally{c.f()}if(1!==l)return!1}}}catch(y){s.e(y)}finally{s.f()}}}catch(y){n.e(y)}finally{n.f()}return!0}},{key:"lineDetermination",value:function(t){if(0===t.points.length)return!0;if(0===t.lines.length)return!1;for(var e=0;e=e}},{key:"lineExistence",value:function(t,e){return t.points.length>=e}},{key:"strictPointExistence",value:function(t,e){return t.points.length===e}},{key:"strictLineExistence",value:function(t,e){return t.points.length===e}},{key:"nonCollinearity",value:function(t){var e,n=k(t.lines);try{for(n.s();!(e=n.n()).done;){var i,r=e.value,s=k(t.points);try{for(s.s();!(i=s.n()).done;){var o=i.value;if(!r.contains(o))return!0}}catch(a){s.e(a)}finally{s.f()}}}catch(a){n.e(a)}finally{n.f()}return!1}},{key:"allLinesIntersect",value:function(t){if(0===t.lines.length)return!0;if(0===t.points.length)return!1;for(var e=0;e1)return!1}}catch(y){c.e(y)}finally{c.f()}if(1!==l)return!1}}}catch(y){s.e(y)}finally{s.f()}}}catch(y){n.e(y)}finally{n.f()}return!0}}]),t}();n("6c7b");function q(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=P(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,s=!0,o=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){o=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(o)throw r}}}}function P(t,e){if(t){if("string"===typeof t)return C(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(t,e):void 0}}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:"#e4f03d",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;this.context=t,this.context.strokeStyle=e,this.context.fillStyle=e,this.context.lineWidth=n,this.context.beginPath()}},{key:"end",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.context&&(t&&this.context.stroke(),e&&this.context.fill()),this.context=null}},{key:"renderPoint",value:function(t,e){this.context&&(this.context.moveTo(t.x+e,t.y),this.context.ellipse(t.x,t.y,e,e,0,0,2*Math.PI))}},{key:"renderPoints",value:function(t,e){if(this.context){var n,i=q(t);try{for(i.s();!(n=i.n()).done;){var r=n.value;this.context.moveTo(r.x,r.y),this.context.ellipse(r.x,r.y,e,e,0,0,2*Math.PI)}}catch(s){i.e(s)}finally{i.f()}}}},{key:"renderLines",value:function(t){if(this.context){var e,n=q(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;this.context.moveTo(i.p1().x,i.p1().y),this.context.lineTo(i.p2().x,i.p2().y)}}catch(r){n.e(r)}finally{n.f()}}}}]),t}(),I=function(){function t(){o()(this,t),this.backgroundColor="#f2c037",this.pointColor="#000000",this.lineColor="#000000",this.screen=new A}return l()(t,[{key:"render",value:function(t,e){this.screen.begin(t,this.backgroundColor),t.fillRect(0,0,t.canvas.width,t.canvas.height),this.screen.end(),this.screen.begin(t,this.lineColor,2),this.screen.renderLines(e.lines),this.screen.end(!0,!1),this.screen.begin(t,this.pointColor,2),this.screen.renderPoints(e.points,4),this.screen.end(!0,!0),e.selected&&(this.screen.begin(t,"#F33838",2),this.screen.renderPoint(e.selected,4),this.screen.end(!0,!0)),e.highlighted&&(this.screen.begin(t,"#F37138",3),this.screen.renderPoint(e.highlighted,6),this.screen.end(!0,!1))}}]),t}();function _(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=L(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,s=!0,o=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){o=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(o)throw r}}}}function L(t,e){if(t){if("string"===typeof t)return T(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(t,e):void 0}}function T(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n