!function(M){var j={};function t(L){if(j[L])return j[L].exports;var N=j[L]={i:L,l:!1,exports:{}};return M[L].call(N.exports,N,N.exports,t),N.l=!0,N.exports}t.m=M,t.c=j,t.d=function(M,j,L){t.o(M,j)||Object.defineProperty(M,j,{enumerable:!0,get:L})},t.r=function(M){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})},t.t=function(M,j){if(1&j&&(M=t(M)),8&j)return M;if(4&j&&"object"==typeof M&&M&&M.__esModule)return M;var L=Object.create(null);if(t.r(L),Object.defineProperty(L,"default",{enumerable:!0,value:M}),2&j&&"string"!=typeof M)for(var N in M)t.d(L,N,function(j){return M[j]}.bind(null,N));return L},t.n=function(M){var j=M&&M.__esModule?function(){return M.default}:function(){return M};return t.d(j,"a",j),j},t.o=function(M,j){return Object.prototype.hasOwnProperty.call(M,j)},t.p="",t(t.s=87)}([function(M,j,t){"use strict";function L(M,j){return{x:M,y:j}}function N(M){return L(M.x,M.y)}t.d(j,"s",(function(){return L})),t.d(j,"c",(function(){return N})),t.d(j,"g",(function(){return i})),t.d(j,"d",(function(){return u})),t.d(j,"f",(function(){return e})),t.d(j,"a",(function(){return I})),t.d(j,"r",(function(){return D})),t.d(j,"e",(function(){return g})),t.d(j,"l",(function(){return a})),t.d(j,"n",(function(){return y})),t.d(j,"m",(function(){return T})),t.d(j,"o",(function(){return A})),t.d(j,"k",(function(){return n})),t.d(j,"j",(function(){return c})),t.d(j,"b",(function(){return o})),t.d(j,"p",(function(){return S})),t.d(j,"h",(function(){return z})),t.d(j,"i",(function(){return r})),t.d(j,"q",(function(){return s}));const i=()=>L(0,0);function u(M,j){return 0==j?i():L(M.x/j,M.y/j)}function e(M){return L(-M.x,-M.y)}function I(...M){let j=0,t=0;for(let L of M)j+=L.x,t+=L.y;return L(j,t)}function D(M,j){return L(M.x-j.x,M.y-j.y)}function g(M,j){return L(M.x*j,M.y*j)}const a=c(3),y=c(5),T=(c(10),c(30)),A=c(50),n=(c(60),c(90),c(130),c(150),c(180));function c(M){return M*Math.PI/180}function o(M,j){let t=Math.atan2(M.y,M.x)-Math.atan2(j.y,j.x);return t>Math.PI?t-=2*Math.PI:t<=-Math.PI&&(t+=2*Math.PI),t}function S(M,j){const t=Math.cos(j),N=Math.sin(j);return L(M.x*t-M.y*N,M.x*N+M.y*t)}function z(M){return Math.sqrt(M.x**2+M.y**2)}function r(M){return u(M,z(M))}function s(M,j){const t=M.x-j.x,L=M.y-j.y;return Math.sqrt(t*t+L*L)}},function(M,j,t){"use strict";t.d(j,"m",(function(){return L})),t.d(j,"l",(function(){return N})),t.d(j,"d",(function(){return i})),t.d(j,"e",(function(){return u})),t.d(j,"h",(function(){return e})),t.d(j,"f",(function(){return I})),t.d(j,"b",(function(){return D})),t.d(j,"i",(function(){return g})),t.d(j,"k",(function(){return a})),t.d(j,"a",(function(){return y})),t.d(j,"n",(function(){return T})),t.d(j,"c",(function(){return A})),t.d(j,"j",(function(){return n})),t.d(j,"g",(function(){return c}));const L=4,N=100,i=1.5,u=5,e=3,I=15,D=7,g=2,a=17,y=9.81,T=1e3,A=80,n=8,c=60},function(M,j,t){"use strict";t.d(j,"a",(function(){return L}));class L{constructor(M,j,t,L=1,N=window.devicePixelRatio||1){this.width=j,this.height=t,this.scale=L,this.dpr=N,this.width*=this.scale,this.height*=this.scale,this.canvas=document.createElement("canvas"),this.canvas.width=this.width*this.dpr,this.canvas.height=this.height*this.dpr;const i=new Image;i.onload=()=>{this.canvas.getContext("2d").drawImage(i,0,0,this.width*this.dpr,this.height*this.dpr)},i.src=M}drawMiddle(M){M.drawImage(this.canvas,-this.width/2,-this.height/2,this.width,this.height)}draw(M){M.drawImage(this.canvas,0,0,this.width,this.height)}}j.b={pointerUp:new L(t(26),12,6),pointerDown:new L(t(27),12,6),bullet:new L(t(28),5,5),plane1:new L(t(29),36,22),plane2:new L(t(30),36,22),pilot:new L(t(31),8,11),puff:new L(t(32),10,8),explosion:[new L(t(33),20,21),new L(t(34),42,40),new L(t(35),86,72),new L(t(36),130,120),new L(t(37),173,137),new L(t(38),100,95),new L(t(39),94,84),new L(t(40),86,78),new L(t(41),76,69)],ground:new L(t(42),192,32),groundObjects:[new L(t(43),36,25),new L(t(44),43,28)],clouds:[new L(t(45),310,100),new L(t(46),169,81),new L(t(47),459,119),new L(t(48),214,111),new L(t(49),272,165),new L(t(50),385,177),new L(t(51),508,148),new L(t(52),187,99),new L(t(53),213,133)],groundhit:[new L(t(54),30,31),new L(t(55),30,31),new L(t(56),30,31),new L(t(57),30,31),new L(t(58),30,31),new L(t(59),30,31),new L(t(60),30,31),new L(t(61),30,31),new L(t(62),30,31),new L(t(63),30,31),new L(t(64),30,31),new L(t(65),30,31)],missile:new L(t(66),17,9),missileFire:[new L(t(67),5,6),new L(t(68),5,5)],barn:new L(t(69),100,42,2),forest:new L(t(70),1367,392,1,1),forest2:new L(t(71),1367,392,1,1),cow:new L(t(25),66,62,.3),cowRunning:[new L(t(72),68,59,.3),new L(t(73),67,62,.3),new L(t(74),68,65,.3),new L(t(75),73,59,.3)],cowDead:new L(t(76),70,40,.3),ui:{targetMark:new L(t(77),16,16),skull:new L(t(78),16,16)},parachute:new L(t(79),53,36),angel:new L(t(80),13,11)}},function(M,j,t){"use strict";t.d(j,"g",(function(){return N})),t.d(j,"h",(function(){return i})),t.d(j,"f",(function(){return u})),t.d(j,"c",(function(){return e})),t.d(j,"e",(function(){return D})),t.d(j,"a",(function(){return g})),t.d(j,"b",(function(){return a})),t.d(j,"d",(function(){return y}));var L=t(0);function N(){return window.performance&&window.performance.now?window.performance.now():Date.now()}function i(M,j){return M-j?M:0}function u(M,j){let t;const L=()=>{M(),t=null};return function(){t||(t=window.setTimeout(L,j))}}function e(M,j,t){if(M.x\n\n \n \n \n \n \n ${j?'':""}\n \n \n \n \n \n \n \n \n \n \n`);return new L.a(t,36,22)}var i=t(13),u=t(1),e=t(0);class I extends i.a{constructor(M){super(N(M),Object(e.s)(0,-1),Object(e.s)(0,-1)),this.lastSmoke=0,this.elevator=0,this.thrust=0,this.landed=!1,this.life=u.h,this.missiles=u.i,this.maxMissiles=u.i,this.ammo=0,this.maxAmmo=0,this.gunReloading=!1,this.missileReloading=!1,this.color="black",this.color=M,this.thrust=0,this.radius=20,this.circles=[{v:Object(e.s)(-12,-9),r:2},{v:Object(e.s)(-8,-9),r:2},{v:Object(e.s)(-5,-9),r:2},{v:Object(e.s)(-10,0),r:5},{v:Object(e.s)(-5,0),r:5},{v:Object(e.s)(0,0),r:4.5},{v:Object(e.s)(0,-5),r:3},{v:Object(e.s)(6,0),r:3.5},{v:Object(e.s)(10,-1),r:3.5},{v:Object(e.s)(15,-2),r:3},{v:Object(e.s)(14,-5),r:4},{v:Object(e.s)(-9,8),r:2.5}]}get player(){return this._player}set player(M){this._player=M,this.team=null==M?void 0:M.team}catapultPilot(){this._player=void 0,this.thrust=0,this.elevator=0,this.sprite=N(this.color,!1)}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return u}));var L=t(13),N=t(2),i=t(0);class u extends L.a{constructor(M){super(N.b.missile,Object(i.s)(-1,0),Object(i.s)(0,-1)),this.source=M,this.elevator=0,this.thrust=0,this.justDeployed=!0,this.radius=8,this.mass=.1,this.circles=[{v:Object(i.s)(-5,0),r:2},{v:Object(i.s)(-2,0),r:2},{v:Object(i.s)(2,0),r:2},{v:Object(i.s)(5,0),r:2}]}}},function(M,j,t){"use strict";t.d(j,"g",(function(){return I})),t.d(j,"f",(function(){return D})),t.d(j,"d",(function(){return g})),t.d(j,"e",(function(){return a})),t.d(j,"a",(function(){return y})),t.d(j,"b",(function(){return T})),t.d(j,"c",(function(){return A}));var L=t(1),N=t(10),i=t(2),u=t(3),e=t(0);function I(M,j){const t=Object(u.g)();if(t-j.lastSmoke>80){j.lastSmoke=t;let L=1;5==j.life&&(L=.05),4==j.life&&(L=.1),3==j.life&&(L=.2),2==j.life&&(L=.4),1==j.life&&(L=.7);const u=new N.f(i.b.puff);u.position=Object(e.c)(j.position),u.velocity=Object(e.a)(j.velocity,Object(e.e)(Object(e.f)(Object(e.i)(j.forward)),20)),u.angle=2*Math.PI*Math.random(),u.scale=1+.5*Math.random(),u.opacity=L+.2*Math.random(),M.particles.add(u)}}function D(M,j){const t=new N.f(i.b.puff);let L=Object(e.r)(j.position,j.previous),u=Object(e.h)(L);for(L=Object(e.i)(L);u>0;)t.position=Object(e.a)(j.previous,Object(e.e)(L,.1),Object(e.e)(j.forward,-10)),t.velocity=Object(e.e)(Object(e.f)(Object(e.i)(j.forward)),10),t.angle=2*Math.PI*Math.random(),t.scale=1+.5*Math.random(),t.scaleRate=.3,t.opacity=.5+.2*Math.random(),t.opacityRate=.1,M.particles.add(t),u-=1}function g(M,j,t=!1){const L=new N.a(i.b.explosion);L.frameDuration=50,L.position=Object(e.s)(j.position.x,t?M.ground:j.position.y),L.velocity=t?Object(e.s)(0,-2):Object(e.e)(j.velocity,.5),M.particles.add(L)}function a(M,j){const t=new N.a(i.b.groundhit);t.frameDuration=50,t.position=Object(e.s)(j.position.x,M.ground-15),M.particles.add(t)}function y(M,j){function t(t=-5,L=1){const i=new N.e;i.position=Object(e.c)(j.position),i.position.x+=j.sprite.width/2,i.velocity=Object(e.p)(Object(e.s)(0,-5),Math.PI/L/2-Math.random()*Math.PI/L),i.color="#d80004",i.size=1+Math.floor(3*Math.random()),M.particles.add(i)}let L=20;for(;L-- >0;)t();const i=setInterval(()=>t(-20,30),300);setTimeout(()=>clearInterval(i),1e4)}function T(M,j){function t(t=-5,L=1){const i=new N.e;i.position=Object(e.c)(j.position),i.position.x+=j.sprite.width/2,i.velocity=Object(e.p)(Object(e.s)(0,-5),Math.PI/L/2-Math.random()*Math.PI/L),i.velocity=Object(e.a)(i.velocity,j.velocity),i.color="#d80004",i.size=1+Math.floor(3*Math.random()),M.particles.add(i)}let L=20;for(;L-- >0;)t()}function A(M,j){const t=new N.c(i.b.angel);t.duration=2*L.n,t.position=Object(e.s)(j.position.x,j.position.y),t.velocity=Object(e.s)(0,-8),M.particles.add(t)}},function(M,j,t){"use strict";function L(M){try{return localStorage.getItem(M)}catch(M){return null}}function N(M,j){try{return localStorage.setItem(M,j)}catch(M){return null}}t.d(j,"a",(function(){return L})),t.d(j,"b",(function(){return N})),t.d(j,"c",(function(){return i}));let i={bullets:0,missiles:0,killed:0,deaths:0,cowKilled:0};try{let M=JSON.parse(L("stats")||"{}");i=Object.assign(Object.assign({},i),M)}finally{}setInterval(()=>{N("stats",JSON.stringify(i))},1e3)},function(M,j,t){"use strict";t.d(j,"b",(function(){return u})),t.d(j,"a",(function(){return e}));var L=t(13),N=t(2),i=t(0);class u extends L.a{constructor(M){super(N.b.pilot,Object(i.s)(0,-1),Object(i.s)(0,-1)),this.plane=M,this.landed=!1,this.color="black",this.mass=.5,this.hasParachute=!0,this.radius=5,this.circles=[{v:Object(i.s)(0,0),r:3},{v:Object(i.s)(0,3),r:2}]}deployParachute(M){this.hasParachute&&!this.landed&&(this.hasParachute=!1,this.parachute=new e(this),this.updateParachute(),M.add(this.parachute))}updateParachute(){this.parachute&&(this.parachute.move(Object(i.a)(this.position,Object(i.s)(this.velocity.x>0?-1:1,-22))),this.parachute.angle=this.velocity.x>0?-i.l:i.l)}}class e extends L.a{constructor(M){super(N.b.parachute,Object(i.s)(0,-1),Object(i.s)(0,-1)),this.load=M,this.radius=25,this.circles=[{v:Object(i.s)(0,-8),r:9},{v:Object(i.s)(-10,-8),r:8},{v:Object(i.s)(10,-8),r:8},{v:Object(i.s)(-20,-5),r:6},{v:Object(i.s)(20,-5),r:6}]}}},function(M,j,t){"use strict";t.d(j,"f",(function(){return e})),t.d(j,"h",(function(){return I})),t.d(j,"g",(function(){return D})),t.d(j,"b",(function(){return g})),t.d(j,"a",(function(){return a})),t.d(j,"d",(function(){return T})),t.d(j,"c",(function(){return A})),t.d(j,"i",(function(){return z})),t.d(j,"e",(function(){return r}));var L=t(1),N=t(2),i=t(7),u=t(3);function e(M,j){j.sort((M,j)=>M.points()-j.points());for(let t=0;t{M.font="bold 22px monospace",M.fillStyle=""+j.color,M.fillText(j.points.toString(),20+t,10)};L(j,10),L(t,60);const i=(j,t=0)=>{j.members.sort((M,j)=>j.points()-M.points());for(let L=0;L{for(let L=0;L{M.classList.add("hide")},7e3),setTimeout(()=>{M.parentElement.removeChild(M)},7300)}function T(M,j,t='
'){const L=document.createElement("div");L.innerHTML=`${M.html()} ${t} ${j.html()}`,Object(u.a)(".log").appendChild(L),y(L),j.team&&j.team==M.team||M==j?M.kills--:M.kills++,j.deaths++,M.isHuman&&i.c.killed++,j.isHuman&&i.c.deaths++}function A(M){const j=document.createElement("div");j.innerHTML=`${g} ${M.html()}`,Object(u.a)(".log").appendChild(j),y(j),M.deaths++,M.isHuman&&i.c.deaths++}let n,c,o,S;function z(M){const j=o.offsetHeight-S.offsetHeight;if(2==M.maxMissiles){let j=[...c.querySelectorAll(".missile")];for(let t=0;tL.f)n.innerText=""+M.ammo;else{let j=[...n.querySelectorAll(".ammo")];for(let t=0;t{n=Object(u.a)(".ammo-capacity"),c=Object(u.a)(".missile-capacity"),o=Object(u.a)(".thrust"),S=Object(u.a)(".thrust-level")})},function(M,j,t){"use strict";t.d(j,"e",(function(){return u})),t.d(j,"f",(function(){return e})),t.d(j,"b",(function(){return I})),t.d(j,"d",(function(){return D})),t.d(j,"a",(function(){return g})),t.d(j,"c",(function(){return a})),t.d(j,"g",(function(){return y}));var L=t(0),N=t(3),i=t(1);class u{constructor(){this.color="#000000",this.size=1,this.position=Object(L.g)(),this.velocity=Object(L.g)()}getX(){return this.position.x}getY(){return this.position.y}}class e extends u{constructor(M){super(),this.sprite=M,this.angle=0,this.opacity=1,this.scale=1,this.scaleRate=.8,this.opacityRate=.3,this.size=0}}class I extends u{constructor(M){super(),this.sprite=M}}class D extends u{constructor(M){super(),this.sprite=M}}class g extends u{constructor(M){super(),this.sprites=M,this.frame=0,this.frameDuration=100,this.size=0,this.timeSinceFrameShown=Object(N.g)()}}class a extends u{constructor(M){super(),this.sprite=M,this.duration=i.n,this.size=0,this.createdAt=Object(N.g)()}}function y(M,j){for(let t of M.particles){const u=Object(L.s)(0,t.size);t.velocity.x+=i.m*u.x*j,t.velocity.y+=i.m*u.y*j,t.position.x+=i.m*t.velocity.x*j,t.position.y+=i.m*t.velocity.y*j,t instanceof e&&(t.angle+=j,t.scale+=i.m*t.scaleRate*j,t.opacity-=i.m*t.opacityRate*j,t.opacity<0&&M.particles.delete(t)),t instanceof g&&Object(N.g)()-t.timeSinceFrameShown>=t.frameDuration&&(t.frame++,t.timeSinceFrameShown=Object(N.g)(),t.frame>=t.sprites.length&&M.particles.delete(t)),t instanceof a&&Object(N.g)()-t.createdAt>=t.duration&&M.particles.delete(t),t.position.x<0&&(t.position.x=M.width),t.position.x>M.width&&(t.position.x=0),t.position.y>M.ground&&M.particles.delete(t)}}},function(M,j,t){"use strict";t.d(j,"b",(function(){return L})),t.d(j,"a",(function(){return I}));var L,N=t(2),i=t(0),u=t(3),e=t(13);!function(M){M[M.Left=0]="Left",M[M.Right=1]="Right"}(L||(L={}));class I extends e.a{constructor(){super(N.b.cow),this.t2=0,this.frame=0,this.running=!1,this.direction=Math.random()>.5?L.Left:L.Right,this.dead=!1,this.landed=!1,this.angle=0,this.radius=10,this.mass=20,this.circles=[{v:Object(i.s)(-5,-1),r:6},{v:Object(i.s)(5,-1),r:6}]}draw(M){const j=Object(u.g)();j-this.t2>100&&(this.frame++,this.t2=j),M.save(),this.direction==L.Left&&M.scale(-1,1),this.dead?N.b.cowDead.drawMiddle(M):this.running?N.b.cowRunning[this.frame%N.b.cowRunning.length].drawMiddle(M):this.sprite.drawMiddle(M),M.restore()}}},function(M,j,t){"use strict";t.d(j,"b",(function(){return u})),t.d(j,"a",(function(){return e}));var L=t(8),N=t(4),i=t(1);class u{constructor(M){this.color=M,this.name="",this.members=[],this.startingPosition=0,this.points=100,this.count=6}}class e{constructor(M,j,t){this.name=M,this.color=j,this.object=t,this.kills=0,this.deaths=0,this.maxAmmo=i.f,this.maxMissiles=i.i,this.number=0,this.isHuman=!1,this.disableAI=()=>{}}join(M){this.team=M,M.members.push(this)}toString(){return this.name}html(){return`${this.name}`}points(){return this.kills}control(M){this.object=M,M.player=this}hasPlane(){if(this.object&&this.object instanceof N.a)return this.object}hasPilot(){if(this.object&&this.object instanceof L.b)return this.object}inGame(){return void 0!==this.object}detach(){this.object=void 0}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return N}));var L=t(0);class N{constructor(M,j=Object(L.s)(1,0),t=Object(L.s)(0,1)){this.sprite=M,this.forward=j,this.normal=t,this.mass=1,this.angle=0,this.radius=1,this.previous=Object(L.g)(),this.position=Object(L.g)(),this.velocity=Object(L.g)(),this.force=Object(L.g)(),this.circles=[],this.timeouts=[],this.intervals=[]}move(M){this.position=M,this.previous=Object(L.c)(M)}getX(M){return this.position.x*M+this.previous.x*(1-M)}getY(M){return this.position.y*M+this.previous.y*(1-M)}setTimeout(M,j){const t=window.setTimeout(M,j);return this.timeouts.push(t),t}timeout(M,j){return this.setTimeout(j,M)}setInterval(M,j){const t=window.setInterval(M,j);return this.intervals.push(t),t}interval(M,j){return this.setInterval(j,M)}destroy(){for(let M of this.timeouts)clearTimeout(M);for(let M of this.intervals)clearInterval(M)}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return y})),t.d(j,"c",(function(){return T})),t.d(j,"d",(function(){return c})),t.d(j,"e",(function(){return o})),t.d(j,"b",(function(){return S}));var L=t(1),N=t(0),i=t(3),u=t(4);var e=t(15),I=t(5),D=t(8),g=t(7),a=t(9);function y(M,j,t){let N=Object(i.f)(()=>{let M=j.hasPlane();M&&Object(a.i)(M)},30),u=!1,e=!1,I=!1,D=!1,y=!1;return setInterval(()=>{let t=j.hasPlane();if(t)u&&(c(M,t),g.c.bullets++,N()),e&&(t.thrust-=2,t.thrust<0&&(t.thrust=0),N()),I&&(t.thrust+=2,t.thrust>L.k&&(t.thrust=L.k),N()),t.elevator=D&&!y?-1:!D&&y?1:0;else{const M=j.hasPilot();M&&(M.landed&&(D&&!y?M.velocity.x=-10:!D&&y&&(M.velocity.x=10)),M.parachute&&(D&&!y?M.velocity.x=-20:!D&&y&&(M.velocity.x=20)),M.landed&&I&&(M.landed=!1,M.velocity.y=-10))}},L.c),document.addEventListener("keydown",L=>{if(t.thrustLevers.up.includes(L.code))I=!0;else if(t.thrustLevers.down.includes(L.code))e=!0;else if(t.elevator.up.includes(L.code))D=!0;else if(t.elevator.down.includes(L.code))y=!0;else if(L.code===t.fire)u=!0;else if(L.code===t.missile){let t=j.hasPlane();t&&(o(M,t),g.c.missiles++,N())}else{if(L.code!==t.catapult)return;if(j.hasPlane())S(M,j);else{let t=j.hasPilot();t&&t.deployParachute(M)}}L.preventDefault()},!0),document.addEventListener("keyup",M=>{if(t.thrustLevers.up.includes(M.code))I=!1;else if(t.thrustLevers.down.includes(M.code))e=!1;else if(t.elevator.up.includes(M.code))D=!1;else if(t.elevator.down.includes(M.code))y=!1;else{if(M.code!==t.fire)return;u=!1}M.preventDefault()},!0),function(M){j=M}}function T(M,j){for(let t of M)t instanceof u.a?A(t,j):t instanceof I.a&&n(t,j)}function A(M,j){const t=Object(N.h)(M.velocity);let i=1-t/(L.l*L.d);t>L.l&&(i=1-1/L.d),M.angle+=i*L.e*M.elevator*j,M.angle<0&&(M.angle+=2*Math.PI),M.angle>2*Math.PI&&(M.angle-=2*Math.PI)}function n(M,j){const t=Object(N.h)(M.velocity);let i=1-t/(L.l*L.d);t>L.l&&(i=1-1/1.5),M.angle+=10*i*M.elevator*j}function c(M,j){if(M.has(j)){if(j.ammo>0){j.ammo--;const t=function(M){const j=new e.a(M);return j.move(Object(N.a)(M.position,Object(N.e)(M.forward,M.radius+5))),j.velocity=Object(N.a)(Object(N.c)(M.velocity),Object(N.e)(M.forward,120)),j}(j);M.add(t)}0!==j.ammo||j.gunReloading||(j.gunReloading=!0,j.setTimeout(()=>{j.ammo=j.maxAmmo,j.gunReloading=!1},3*L.n))}}function o(M,j){if(M.has(j)){if(j.missiles>0){j.missiles--;const t=function(M){const j=new I.a(M);return j.move(Object(N.a)(M.position,Object(N.e)(M.normal,-12))),j.angle=M.angle,j.velocity=Object(N.a)(Object(N.c)(M.velocity),Object(N.e)(M.normal,-20)),j.forward=Object(N.c)(M.forward),j.normal=Object(N.c)(M.normal),j}(j);j.timeout(L.n,()=>t.justDeployed=!1),function(M,j){function t(){var t,L;if(M.has(j))if(void 0!==j.target)if(M.has(j.target)){const t=Object(i.c)(j.position,j.target.position,M),L=Object(N.b)(Object(N.r)(t,j.position),j.forward);j.elevator=Math.sign(L)>0?1:-1,Object(N.a)(j.position,Object(N.e)(j.velocity,4)).y>M.ground&&(j.elevator=Math.sign(j.forward.x)>0?-1:1)}else j.target=void 0,j.elevator=0;else{let i,e=700;for(let I of M)if(I instanceof u.a){if(I===j.source)continue;if(void 0!==(null===(t=I.player)||void 0===t?void 0:t.team)&&void 0!==(null===(L=j.source.player)||void 0===L?void 0:L.team)&&I.player.team===j.source.player.team)continue;const M=Object(N.q)(j.position,I.position);M{clearInterval(M),j.thrust=0},12*L.n)}),500),j.target=void 0}(M,t),M.add(t)}0!==j.missiles||j.missileReloading||(j.missileReloading=!0,j.setTimeout(()=>{j.missiles=j.maxMissiles,j.missileReloading=!1},10*L.n))}}function S(M,j){let t=j.hasPlane();if(t){t.catapultPilot();let L=new D.b(t);L.color=j.color,L.player=j,L.move(Object(N.a)(t.position,Object(N.e)(t.normal,5))),L.velocity=Object(N.a)(t.velocity,Object(N.p)(Object(N.e)(t.normal,20),N.m)),M.add(L),j.control(L)}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return u}));var L=t(13),N=t(2),i=t(0);class u extends L.a{constructor(M){super(N.b.bullet,Object(i.s)(1,0),Object(i.s)(0,1)),this.source=M,this.radius=2.5,this.circles=[{v:Object(i.s)(0,0),r:2.5}]}}},function(M,j,t){"use strict";function L(M,j){const t=j.getContext("2d"),L={offsetX:0,offsetY:0,width:j.width,height:j.height,cameraScale:M};function N(){let M=(window.devicePixelRatio||1)/L.cameraScale,{width:N,height:i}=j.getBoundingClientRect();N*=L.cameraScale,i*=L.cameraScale,j.width=N*M,j.height=i*M,L.width=N,L.height=i,t.scale(M,M)}return N(),window.addEventListener("resize",N,!1),window.addEventListener("orientationchange",N,!1),[L,t]}function N(M,j,t,L){const N=Math.floor(M.width/2),i=Math.floor(M.height/2),u=t.hasPlane()||t.hasPilot();if(!u)return;const e=u.getX(L),I=u.getY(L);e>M.offsetX+M.width-N&&(M.offsetX=e-M.width+N),eM.offsetY+i&&(M.offsetY=I-i),Ij.width&&(M.offsetX=j.width-M.width),M.offsetY+M.height>j.height&&(M.offsetY=j.height-M.height)}t.d(j,"b",(function(){return L})),t.d(j,"a",(function(){return N}))},function(M,j,t){"use strict";t.d(j,"a",(function(){return I}));var L=t(13),N=t(1),i=t(2),u=t(0),e=t(4);class I extends L.a{constructor(M,j){super(i.b.barn,Object(u.s)(1,0),Object(u.s)(0,1)),this.radius=100,this.circles=[{v:Object(u.s)(0,50),r:90}],this.move(Object(u.s)(M,j-this.sprite.height/2+2))}newPlane(M,j){j.waitingForPlane||(j.waitingForPlane=window.setTimeout(()=>{let t=j.player;if(!M.has(j))return;if(!t)return;const L=new e.a(t.color);L.life=N.h,L.ammo=L.maxAmmo=t.maxAmmo,L.missiles=L.maxMissiles=t.maxMissiles,L.landed=!0,L.move(Object(u.s)(j.position.x,M.ground)),j.player=void 0,j.destroy(),M.delete(j),t.control(L),M.add(L)},N.n))}}},function(M,j,t){"use strict";t.d(j,"b",(function(){return a})),t.d(j,"a",(function(){return y}));var L=t(10),N=t(2),i=t(0),u=t(4),e=t(11);function I(M,j){let t;j.setInterval(()=>{t=function(t){let L,N=t;for(let t of M)if(t instanceof u.a){const M=Object(i.q)(j.position,t.position);M{t||(j.running=Math.random()<.1)},1e3+2e3*Math.random()),j.setInterval(()=>{t||(j.direction=Math.random()<.5?e.b.Left:e.b.Right)},1e3+4e3*Math.random())}var D=t(1),g=t(6);function a(M){for(let j=0;j<120;j++){const t=new L.b(N.b.clouds[j%9]);let u=M.height;for(;u>M.height-500;)u=M.height*Math.random();let e=1e3;t.position=Object(i.s)((e+M.width)*Math.random()-e/2,u),M.clouds.push(t)}for(let j=0,t=10;t=0;M--)j();M.onCowKill=t=>{if(t.dead)return;t.destroy(),t.dead=!0;let i=new L.d(N.b.cowDead);i.position=t.position,i.position.y=M.ground-i.sprite.height+2,M.groundObjects.add(i),setTimeout(j,10*D.n),setTimeout(()=>M.groundObjects.delete(i),30*D.n),Object(g.a)(M,t)}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return T})),t.d(j,"b",(function(){return n}));var L=t(1),N=t(14),i=t(15),u=t(17),e=t(5),I=t(8),D=t(4),g=t(3),a=t(0);const y={missileChance:.03};function T(M,j,t={}){let i=Object.assign(Object.assign({},y),t),I=[],T=[];const o=(M,j)=>{let t=window.setTimeout(j,M);return I.push(t),t},S=(M,j)=>{let t=window.setInterval(j,M);return T.push(t),t};let z=!0;const r=M=>{const t=j.hasPlane();t&&z&&(t.elevator=M)},s=Object(g.f)(()=>{const t=j.hasPlane();t&&Object(N.e)(M,t)},1.5*L.n);function x(){j.target=void 0;const M=j.hasPlane();M&&(M.elevator=0)}function w(M){M.velocity.y=-10,M.landed=!1}let l,O;return S(L.c,()=>{var t,L,I;const y=j.hasPilot();if(y){let j;M.ground-y.position.y<300&&y.deployParachute(M);for(let t of M.barns)(!j||Math.abs(j.position.x-y.position.x)>Math.abs(t.position.x-y.position.x))&&(j=t);y.landed&&j&&(y.position.xj.position.x?(y.velocity.x=-10,Math.random()<.02&&w(y)):y.velocity.x=0)}const T=j.hasPlane();if(T){if(1==T.life&&M.barns.size>0){let t,L=1/0;for(let j of M.barns){let M=Object(a.q)(j.position,T.position);Ma.l&&r(Math.sign(L)>0?1:-1),j.target instanceof u.a)return;if(j.target instanceof D.a&&L0||c(t,j.team)||Object(N.d)(M,T)}T.ammo<=3&&Object(N.d)(M,T),j.target instanceof e.a&&0===j.target.thrust&&x()}else x();else{let N=A(M,T,M=>c(M,j.team));if(N){const M=Object(a.b)(Object(a.r)(N.position,T.position),T.forward),t=Object(a.q)(T.position,N.position);(Math.abs(M)0?1:-1)}}}}),S(2*L.n,()=>{const t=j.hasPlane();if(!t)return;let N=S(L.c,()=>{if(void 0!==j.target){let L=A(M,t,M=>c(M,j.team));if(L){const M=Object(a.b)(Object(a.r)(L.position,t.position),t.forward),N=Object(a.q)(t.position,L.position),i=Object(a.q)(t.position,j.target.position);(Math.abs(M)clearInterval(N))}),S(10*L.n,()=>{var t,L,N;if(j.hasPlane()&&(!(null===(L=null===(t=j.team)||void 0===t?void 0:t.leader)||void 0===L?void 0:L.hasPlane())||(null===(N=j.team)||void 0===N?void 0:N.leader)===j)&&void 0===j.target){let t=A(M,j.object,M=>c(M,j.team),M.width);t&&(j.target=t)}}),S(5*L.n,()=>{var t,N,i;if(!j.object)return;let u=j.object;if((void 0===(null===(N=null===(t=j.team)||void 0===t?void 0:t.leader)||void 0===N?void 0:N.object)||(null===(i=j.team)||void 0===i?void 0:i.leader)===j)&&void 0===j.target){let j=Object(a.s)(Math.floor(Math.random()*M.width),Math.floor(Math.random()*(M.ground-100))),t=S(30,()=>{const M=Object(a.b)(Object(a.r)(j,u.position),u.forward);Math.abs(M)>a.l&&r(Math.sign(M)>0?1:-1)});o(2*L.n,()=>{clearInterval(t)})}}),S(30,()=>{const t=j.hasPlane();t&&(Object(a.a)(t.position,Object(a.e)(t.velocity,4)).y>M.ground&&(r(Math.sign(t.forward.x)>0?-1:1),clearTimeout(l),l=o(200,()=>t.elevator=0)),t.position.y>M.ground-30&&(r(Math.sign(t.forward.x)>0?-1:1),clearTimeout(O),O=o(200,()=>t.elevator=0)),t.landed&&(t.elevator=0,t.thrust=L.k,z&&(z=!1,o(L.n,()=>z=!0))),0===t.thrust&&(t.thrust=L.k))}),function(){for(let M of I)clearTimeout(M);for(let M of T)clearInterval(M)}}function A(M,j,t,L=2e3){let N;if(void 0!==j){for(let i of M)if(i!==j&&!(i instanceof e.a&&i.source===j)&&!t(i)&&(i instanceof D.a||i instanceof I.b||i instanceof e.a&&i.target===j&&i.thrust>0)){const M=Object(a.q)(j.position,i.position);MM instanceof i.a)){let u,e=L;for(let L of M){if(L===j)continue;if(N(L))continue;const M=Object(a.q)(j.position,L.position),i=Object(a.b)(Object(a.r)(L.position,j.position),j.forward);M{},this.onCowKill=M=>{},this.width=M.width,this.height=M.height,this.ground=M.ground,this.stratosphere=M.stratosphere}*[Symbol.iterator](){yield*this.barns,yield*this.bodies,yield*this.bullets,yield*this.pilots}add(M){M instanceof L.a?this.bullets.add(M):M instanceof i.b?this.pilots.add(M):M instanceof N.a?this.barns.add(M):this.bodies.add(M)}has(M){return M instanceof L.a?this.bullets.has(M):M instanceof i.b?this.pilots.has(M):M instanceof N.a?this.barns.has(M):this.bodies.has(M)}delete(M){M instanceof L.a?this.bullets.delete(M):M instanceof i.b?this.pilots.delete(M):this.bodies.delete(M),M.destroy()}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return Y}));var L=t(14),N=t(10),i=t(11),u=t(5),e=t(4),I=t(2),D=t(3),g=t(0);function a(M,j,t,L,a){var A;let n=t.stratosphere-j.offsetY;n<0?n=0:(M.fillStyle="#1f4752",M.fillRect(0,0,j.width,n)),M.fillStyle="#9be2fe",M.fillRect(0,n,j.width,j.height),function(M,j,t){if(t.stratosphere>j.offsetY){let L=900;const N=-j.offsetY-L+t.stratosphere+4;M.save(),M.translate(0,N);let i=M.createLinearGradient(0,0,0,L);i.addColorStop(0,"#1f4752"),i.addColorStop(1,"#9be2fe"),M.fillStyle=i,M.fillRect(0,0,j.width,L),M.restore()}}(M,j,t),y(M,j,t,I.b.forest2,1.05,50),y(M,j,t,I.b.forest,1.02,100),function(M,j,t){for(let L of t.groundObjects){const t=L.position.x-j.offsetX,N=L.position.y-j.offsetY;t+L.sprite.width<0||t-L.sprite.width>j.width||(M.save(),M.translate(t,N),L.sprite.draw(M),M.restore())}}(M,j,t),function(M,j,t){const L=t.height-j.offsetY-I.b.ground.height;if(L0;)I.b.ground.draw(M),M.translate(I.b.ground.width-1,0);M.restore()}}(M,j,t),function(M,j,t){for(let L of t.clouds){const t=L.position.x-j.offsetX,N=L.position.y-j.offsetY;t+L.sprite.width<0||t-L.sprite.width>j.width||(M.save(),M.translate(t,N),M.globalAlpha=.8,L.sprite.draw(M),M.restore())}}(M,j,t);for(let N of t){const t=N.getX(L)-j.offsetX,D=N.getY(L)-j.offsetY;if(!(t+N.radius<0||t-N.radius>j.width)){if(M.save(),D+N.radius<0)(N instanceof e.a||N instanceof u.a)&&(M.translate(Math.floor(t),3),I.b.pointerUp.drawMiddle(M));else if(D-N.radius>j.height)(N instanceof e.a||N instanceof u.a)&&(M.translate(Math.floor(t),j.height-3),I.b.pointerDown.drawMiddle(M));else{if(M.translate(t,D),M.rotate(N.angle),N instanceof i.a?N.draw(M):N.sprite.drawMiddle(M),window.showCircles){for(let{v:j,r:t}of N.circles)M.beginPath(),M.fillStyle="rgba(255,45,247,0.5)",M.arc(j.x,j.y,t,0,2*Math.PI),M.fill();M.beginPath(),M.arc(0,0,N.radius,0,2*Math.PI),M.stroke()}if(window.showVectors&&(M.save(),M.rotate(-N.angle),M.beginPath(),M.moveTo(0,0),M.lineTo(20*N.forward.x,20*N.forward.y),M.strokeStyle="blue",M.stroke(),M.beginPath(),M.moveTo(0,0),M.lineTo(20*N.normal.x,20*N.normal.y),M.strokeStyle="green",M.stroke(),M.restore()),N instanceof u.a&&N.thrust>0&&(M.translate(10,0),I.b.missileFire[Math.random()<.5?0:1].drawMiddle(M)),window.showTarget&&N instanceof e.a&&void 0!==(null===(A=N.player)||void 0===A?void 0:A.target)){M.save(),M.rotate(-N.angle);let j=Object(g.r)(N.player.target.position,N.position);j=Object(g.r)(j,Object(g.e)(Object(g.i)(j),N.player.target.radius)),M.strokeStyle="#ff0101",M.lineWidth=2,T(M,0,0,j.x,j.y),M.restore()}if(N instanceof e.a&&void 0!==N.pointTo){M.save(),M.rotate(-N.angle);let j=Object(g.r)(N.pointTo.position,N.position);j=Object(g.r)(j,Object(g.e)(Object(g.i)(j),N.pointTo.radius)),M.strokeStyle="#009a04",M.lineWidth=2,T(M,0,0,j.x,j.y),M.restore()}}M.restore()}}for(let L of t.particles){const t=L.getX()-j.offsetX,i=L.getY()-j.offsetY;M.save(),M.translate(t,i),L instanceof N.f?(M.rotate(L.angle),M.globalAlpha=L.opacity,M.scale(L.scale,L.scale),L.sprite.drawMiddle(M)):L instanceof N.a?L.sprites[L.frame].drawMiddle(M):L instanceof N.b?L.sprite.drawMiddle(M):L instanceof N.c?(M.globalAlpha=1-Math.min(1,Math.abs((Object(D.g)()-L.createdAt)/L.duration)),L.sprite.drawMiddle(M)):(M.fillStyle=L.color,M.fillRect(0,0,L.size,L.size)),M.restore()}a(M)}function y(M,j,t,L,N,i){const u=t.height-j.offsetY-L.height+i;if(u0;)L.draw(M),M.translate(L.width,0);M.restore()}}function T(M,j,t,L,N){M.beginPath();const i=L-j,u=N-t,e=Math.atan2(u,i);M.moveTo(j,t),M.lineTo(L,N),M.lineTo(L-10*Math.cos(e-Math.PI/6),N-10*Math.sin(e-Math.PI/6)),M.moveTo(L,N),M.lineTo(L-10*Math.cos(e+Math.PI/6),N-10*Math.sin(e+Math.PI/6)),M.stroke()}Object.assign(window,{showCircles:!1,showVectors:!1,showTarget:!1});var A=t(6),n=t(15),c=t(8),o=t(7),S=t(9);function z(M,j){const t=Object(g.h)(j.velocity);if(j.landed)t>45&&(j.landed=!1);else if(s(j,M.ground)){const t=j.angle;if(j.velocity.y<40&&(t=j)return!0;return!1}function x(M,j){if(w(M.position,M.radius,j.position,j.radius))for(let{v:t,r:L}of M.circles){t=Object(g.a)(Object(g.p)(t,M.angle),M.position);for(let{v:M,r:N}of j.circles)if(M=Object(g.a)(Object(g.p)(M,j.angle),j.position),w(t,L,M,N))return!0}return!1}function w(M,j,t,L){const N=j+L,i=M.x-t.x,u=M.y-t.y;return N*N>i*i+u*u}var l=t(1);function O(M,j){!function(M){var j;for(let j of M)if(j.position.y+j.radius>=M.ground){if(j instanceof e.a){z(M,j);continue}if(s(j,M.ground)){if(j instanceof n.a){Object(A.e)(M,j),M.delete(j);continue}if(j instanceof u.a){Object(A.d)(M,j,!0),M.delete(j);continue}j instanceof i.a&&(j.landed=!0),j instanceof c.b&&(j.landed=!0,Object(g.h)(j.velocity)>40?(Object(A.e)(M,j),Object(A.c)(M,j),M.onCrash(j),M.delete(j),j.player&&Object(S.c)(j.player)):j.parachute&&(M.delete(j.parachute),j.parachute=void 0)),j instanceof c.a&&M.delete(j)}}for(let j of M.bodies)for(let L of M.bodies)j!==L&&x(j,L)&&(t(j,L)||t(L,j));function t(j,t){var L,N,I,D;if(j instanceof u.a&&t instanceof u.a)return Object(A.d)(M,j),Object(A.d)(M,t),M.delete(j),M.delete(t),!0;if(j instanceof e.a&&t instanceof u.a)return(!t.justDeployed||t.source!==j)&&((!t.justDeployed||void 0===(null===(L=t.source.player)||void 0===L?void 0:L.team)||void 0===(null===(N=j.player)||void 0===N?void 0:N.team)||t.source.player.team!==j.player.team)&&(r(M,j),M.delete(t),t.source.player&&j.player&&Object(S.d)(t.source.player,j.player,S.a),!0));if(j instanceof e.a&&t instanceof i.a)return(null===(I=j.player)||void 0===I?void 0:I.isHuman)&&o.c.cowKilled++,M.onCowKill(t),M.delete(t),!0;if(j instanceof u.a&&t instanceof i.a)return(null===(D=j.source.player)||void 0===D?void 0:D.isHuman)&&o.c.cowKilled++,Object(A.d)(M,t),M.onCowKill(t),M.delete(j),M.delete(t),!0;if(j instanceof c.a){if(t instanceof e.a&&j.load.plane!==t)return M.delete(j),j.load.parachute=void 0,!0;if(t instanceof u.a)return M.delete(j),j.load.parachute=void 0,!0}return!1}let L=[...M.bullets];for(let M=0;M0){let t=2*N*e/(j.mass+M.mass);j.velocity.x-=t*M.mass*i.x,j.velocity.y-=t*M.mass*i.y,M.velocity.x+=t*j.mass*i.x,M.velocity.y+=t*j.mass*i.y}j.position=Object(g.a)(j.position,Object(g.e)(i,j.radius/2)),M.position=Object(g.a)(M.position,Object(g.e)(i,-M.radius/2))}}for(let t of M.bullets){for(let L of M.bodies)x(t,L)&&(L instanceof e.a&&(L.life-=1,0==L.life&&(r(M,L),t.source.player&&L.player&&Object(S.d)(t.source.player,L.player)),M.bullets.delete(t)),L instanceof u.a&&(Object(A.d)(M,L),M.delete(t),M.delete(L)),L instanceof i.a&&((null===(j=t.source.player)||void 0===j?void 0:j.isHuman)&&o.c.cowKilled++,M.onCowKill(L),M.delete(t),M.delete(L)),L instanceof c.a&&(M.delete(L),L.load.parachute=void 0));for(let j of M.pilots)x(t,j)&&(M.onCrash(j),M.delete(t),M.delete(j),Object(A.b)(M,j),Object(A.c)(M,j),t.source.player&&j.player&&Object(S.d)(t.source.player,j.player))}for(let j of M.barns)for(let t of M.pilots)x(j,t)&&j.newPlane(M,t);for(let j of M.pilots)for(let t of M.bodies)x(j,t)&&(t instanceof e.a&&j.plane!==t&&!t.landed&&(M.onCrash(j),M.delete(j),Object(A.b)(M,j),Object(A.c)(M,j),t.player&&j.player&&Object(S.d)(t.player,j.player,S.b)),t instanceof u.a&&(Object(A.d)(M,t),M.onCrash(j),M.delete(j),M.delete(t),Object(A.b)(M,j),Object(A.c)(M,j),t.source.player&&j.player&&Object(S.d)(t.source.player,j.player,S.a)))}(M);for(let t of M){t.forward=Object(g.s)(Math.sin(-t.angle-Math.PI/2),Math.cos(-t.angle-Math.PI/2)),t.normal=Object(g.s)(Math.sin(-t.angle+Math.PI),Math.cos(-t.angle+Math.PI)),t instanceof u.a&&(C(t,M),t.thrust>0&&Object(A.f)(M,t)),t instanceof e.a&&(E(t,M),t.lifeM.width&&(t.previous.x=t.position.x=0)}}function C(M,j){const t=Object(g.h)(M.velocity),L=Object(g.s)(0,M.mass*l.a),N=Object(g.e)(M.forward,M.thrust),i=Object(g.e)(Object(g.i)(Object(g.f)(M.velocity)),2**(t-1.2*l.l));M.force=Object(g.a)(L,N,i)}function E(M,j){const t=Object(g.h)(M.velocity),L=Object(g.b)(M.forward,M.velocity),N=Object(g.s)(0,M.mass*l.a);let i=Object(g.e)(M.forward,M.thrust),u=Object(g.e)(M.normal,t*Object(D.h)(L,Object(g.j)(50))),e=Object(g.e)(Object(g.i)(Object(g.f)(M.velocity)),2**(t-l.l));M.position.y.25&&(n=.25),g=A,I+=n,Object(L.c)(t,n);I>=y;)O(t,y),I-=y;Object(N.g)(t,y);const c=I/y;i(M,c),a(j,M,t,c,u)}(),function(){cancelAnimationFrame(e)}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return i}));var L=t(3);const N=["#f36a20","#dbaf02","#70ba01","#49da9a","#34bbe6","#4380db","#261fe6","#d23be7","#ff0786"];function i(){return Object(L.e)([...N])}},function(M,j,t){var L,N,i={},u=(L=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===N&&(N=L.apply(this,arguments)),N}),e=function(M,j){return j?j.querySelector(M):document.querySelector(M)},I=function(M){var j={};return function(M,t){if("function"==typeof M)return M();if(void 0===j[M]){var L=e.call(this,M,t);if(window.HTMLIFrameElement&&L instanceof window.HTMLIFrameElement)try{L=L.contentDocument.head}catch(M){L=null}j[M]=L}return j[M]}}(),D=null,g=0,a=[],y=t(83);function T(M,j){for(var t=0;t=0&&a.splice(j,1)}function o(M){var j=document.createElement("style");if(void 0===M.attrs.type&&(M.attrs.type="text/css"),void 0===M.attrs.nonce){var L=function(){0;return t.nc}();L&&(M.attrs.nonce=L)}return S(j,M.attrs),n(M,j),j}function S(M,j){Object.keys(j).forEach((function(t){M.setAttribute(t,j[t])}))}function z(M,j){var t,L,N,i;if(j.transform&&M.css){if(!(i="function"==typeof j.transform?j.transform(M.css):j.transform.default(M.css)))return function(){};M.css=i}if(j.singleton){var u=g++;t=D||(D=o(j)),L=x.bind(null,t,u,!1),N=x.bind(null,t,u,!0)}else M.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(t=function(M){var j=document.createElement("link");return void 0===M.attrs.type&&(M.attrs.type="text/css"),M.attrs.rel="stylesheet",S(j,M.attrs),n(M,j),j}(j),L=l.bind(null,t,j),N=function(){c(t),t.href&&URL.revokeObjectURL(t.href)}):(t=o(j),L=w.bind(null,t),N=function(){c(t)});return L(M),function(j){if(j){if(j.css===M.css&&j.media===M.media&&j.sourceMap===M.sourceMap)return;L(M=j)}else N()}}M.exports=function(M,j){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(j=j||{}).attrs="object"==typeof j.attrs?j.attrs:{},j.singleton||"boolean"==typeof j.singleton||(j.singleton=u()),j.insertInto||(j.insertInto="head"),j.insertAt||(j.insertAt="bottom");var t=A(M,j);return T(t,j),function(M){for(var L=[],N=0;N1&&n.c.deaths>1&&n.c.cowKilled>1){if(document.querySelector(".stats").innerHTML=`\n You fired ${n.c.bullets.toLocaleString()} bullets \n and ${n.c.missiles.toLocaleString()} missiles\n and destroyed ${n.c.killed.toLocaleString()} planes,\n and unfortunately died ${n.c.deaths.toLocaleString()} times.
\n Also inadvertently you killed ${n.c.cowKilled.toLocaleString()} cow cows. \n `,n.c.killed>1e3){let M=document.createElement("div");M.innerHTML='\n \n ';let j=document.querySelector(".game-modes");j&&j.appendChild(M)}}let M=document.getElementsByName("nickname")[0];M.value=Object(n.a)("nickname")||"",M.addEventListener("keyup",j=>Object(n.b)("nickname",M.value));let j=location.search.match(/mode=([\w-]+)/);if(j){let M=j[1],t=document.getElementsByName("mode");for(let j=0,L=t.length;j{const t=j.player;if(!t)return;const L=new y.a(t.color);L.life=e.h,L.ammo=L.maxAmmo=t.maxAmmo,L.landed=!0,L.ammo=0,L.move(Object(o.s)(M.width/2+(1200*Math.random()-600),M.ground)),t.control(L),M.add(L)},2e3)},Object(a.b)(M);let j=Object(N.a)();for(let t=0;t{Object(u.a)(j,M,M.players[0],t)},M=>{});return function(){n();for(let j of M.players)j.disableAI()}}();Object(z.a)("#game").addEventListener("submit",M=>{M.preventDefault();let j="death-match",t=document.getElementsByName("mode");for(let M=0,L=t.length;M{const t=j.player;if(!t)return;if(t.inGame())return;const L=new y.a(t.color);L.life=e.h,L.ammo=L.maxAmmo=t.maxAmmo,L.landed=!0,L.move(Object(o.s)(M.width*Math.random(),M.ground)),t.control(L),M.add(L)},2e3))},Object(a.b)(M),Object(a.a)(M);let j=new g.a(M.width/2+110,M.ground);M.add(j);const t=new y.a("#ff0015"),z=new T.a(Object(n.a)("nickname")||"YOU","#ff0015",t);z.isHuman=!0,z.control(t),M.players.push(z),z.maxAmmo=e.f,t.maxAmmo=e.f,t.ammo=e.f,t.landed=!0,t.move(Object(o.s)(M.width/2,M.ground)),M.add(t),Object(D.a)(M,z,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"});let r=Object(N.a)();for(let j=0;j{Object(u.a)(j,M,z,t)},j=>{Object(c.f)(j,M.players)}),Object(c.e)(M)}();break;case"teams":!function(){const M=new S.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-A.b.ground.height,M.players=[],Object(a.b)(M),Object(a.a)(M);const j=new T.b("#fd6a79");j.name="Red",j.startingPosition=12e3;const t=new T.b("#145ece");t.name="Blue",t.startingPosition=2e3;let N=location.search.match(/count=([0-9]+)vs([0-9]+)/);N&&(j.count=parseInt(N[1]),t.count=parseInt(N[2]));let z=new g.a(j.startingPosition,M.ground),r=new g.a(t.startingPosition,M.ground);M.add(z),M.add(r);let s=new y.a("#ff0015"),x=new T.a(Object(n.a)("nickname")||"YOU",s.color,s);x.isHuman=!0,x.join(j),s.player=x,M.players.push(x),x.maxAmmo=e.f,s.maxAmmo=e.f,s.ammo=e.f,s.landed=!0,s.move(Object(o.s)(j.startingPosition-130,M.ground)),M.add(s),Object(D.a)(M,x,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"});let w=!1;M.onCrash=function(j){j.player&&(j.player.detach(),setTimeout(()=>{const t=j.player;if(!t)return;if(t.inGame())return;let L=t.team;if(!L)return;L.points--,L.points<=0&&setTimeout(()=>{w||(w=!0,alert((null==L?void 0:L.name)+" team loses\n\n ¯\\_(ツ)_/¯"),location.href="?mode=teams")},2*e.n);const N=new y.a(t.color);N.life=e.h,N.ammo=N.maxAmmo=t.maxAmmo,N.landed=!0,N.move(Object(o.s)(L.startingPosition,M.ground)),t.control(N),M.add(N)},6e3))};for(let t=1;t{Object(u.a)(j,M,x,t)},M=>{Object(c.h)(M,j,t)}),Object(c.e)(M)}();break;case"duel":!function(){const M=new S.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-A.b.ground.height,M.players=[],M.onCrash=function(j){j.player&&(j.player.detach(),setTimeout(()=>{const t=j.player;if(!t)return;if(t.inGame())return;const L=new y.a(t.color);L.life=e.h,L.ammo=L.maxAmmo=t.maxAmmo,L.landed=!0,L.move(Object(o.s)(M.width*Math.random(),M.ground)),t.control(L),M.add(L)},2e3))},Object(a.b)(M),Object(a.a)(M);let j=new g.a(M.width/2+110,M.ground);M.add(j);const t=new y.a("#ff0015"),N=new T.a(Object(n.a)("nickname")||"YOU","#ff0015",t);N.isHuman=!0,N.control(t),M.players.push(N),N.maxAmmo=e.f,t.maxAmmo=e.f,t.ammo=e.f,t.landed=!0,t.move(Object(o.s)(M.width/2,M.ground)),M.add(t),Object(D.a)(M,N,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"});{const j=i.a.pop()||"no name",t="#145ece",N=new y.a(t),u=new T.a(j,t,N);N.player=u,M.players.push(u),u.maxAmmo=e.f,N.maxAmmo=e.f,N.ammo=e.f,N.landed=!0,N.move(Object(o.s)(M.width*Math.random(),M.ground)),M.add(N),u.disableAI=Object(L.a)(M,u,{missileChance:.3})}const z=document.querySelector("#canvas"),[r,s]=Object(u.b)(1.25,z);Object(I.a)(r,s,M,(j,t)=>{Object(u.a)(j,M,N,t)},j=>{Object(c.f)(j,M.players)}),Object(c.e)(M)}();break;case"survival":!function(){const M=new S.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-A.b.ground.height,M.players=[],Object(a.b)(M),Object(a.a)(M);let j=new g.a(M.width/2+110,M.ground);M.add(j);const t=new URLSearchParams(window.location.search);let z,r=parseInt(t.get("size")||"2"),s=Object(N.a)(),x=new T.b("#ff0015"),w=new y.a(x.color),l=new T.a(Object(n.a)("nickname")||"YOU",x.color,w);l.join(x),l.isHuman=!0,l.control(w),M.players.push(l),w.ammo=w.maxAmmo=l.maxAmmo=100,w.missiles=w.maxMissiles=l.maxMissiles=10,w.landed=!0,w.move(Object(o.s)(M.width/2-100,M.ground)),M.add(w),Object(D.a)(M,l,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"});let O=()=>{z=new T.b(s.pop()||"black");for(let j=0;j{alert(`Good run! But ${r} opponents turned out to be too much for you.\n\n (╯°□°)╯︵ ┻━┻`),location.href="?mode=survival"},3*e.n);else{let M=!0;for(let j of z.members)j.inGame()&&(M=!1);M&&(r++,setTimeout(O,3*e.n))}}},O();const C=document.querySelector("#canvas"),[E,d]=Object(u.b)(1.25,C);Object(I.a)(E,d,M,(j,t)=>{Object(u.a)(j,M,l,t)},M=>{Object(c.g)(M,x,z)}),Object(c.e)(M)}();break;case"swarm":!function(){const M=new S.a({width:15e3,height:4e3,ground:0,stratosphere:50});let j,t;M.ground=M.height-A.b.ground.height,M.players=[],Object(a.b)(M),Object(a.a)(M);const N=new URLSearchParams(window.location.search);j=t=parseInt(N.get("size")||"50");const g=new T.b("#ff0015"),z=new T.b("#145ece");let r=new y.a(g.color),s=new T.a(Object(n.a)("nickname")||"YOU",g.color,r);r.thrust=e.k,s.isHuman=!0,s.join(g),g.leader=s,r.player=s,M.players.push(s),s.maxAmmo=e.f,r.maxAmmo=e.f,r.ammo=e.f,r.move(Object(o.s)(3*M.width/4,M.height/2)),M.add(r);const x=Object(D.a)(M,s,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"}),w=[];let l;M.onCrash=function(M){if(M.player){let j=M.player;if(j.detach(),j.isHuman){let M;for(;M=w.shift();)if(M.hasPlane()){M.disableAI(),x(M),M.isHuman=!0,g.leader=M,s=M;break}}}clearTimeout(l),l=window.setTimeout(()=>{let M=g.members.filter(M=>M.hasPlane()).length,j=z.members.filter(M=>M.hasPlane()).length;0!=M&&0!=j||(0!=M&&0==j&&alert("You won! 🎉"),0==M&&0!=j&&alert("You lose."),0==M&&0==j&&alert("¯\\_(ツ)_/¯"),location.href="?mode=swarm")},5*e.n)};for(let t=1;t{Object(u.a)(j,M,s,t)},M=>{}),Object(c.e)(M)}();break;case"playground":!function(){const M=new S.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-A.b.ground.height,M.players=[],Object(a.b)(M);const j=new y.a("#ff0015"),t=new T.a("YOU","#ff0015",j);M.players.push(t),t.control(j),j.move(Object(o.s)(M.width/2-200,500)),M.add(j),Object(D.a)(M,t,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"}),j.thrust=e.k;{const j=i.a.pop()||"no name",t="#e2e2e2",N=new y.a(t),u=new T.a(j,t,N);M.players.push(u),u.control(N),N.move(Object(o.s)(M.width/2,500)),M.add(N),N.thrust=e.k,setInterval(()=>{N.pointTo=Object(L.b)(M,N,o.o)},100)}const N=document.querySelector("#canvas"),[g,n]=Object(u.b)(1.25,N);Object(I.a)(g,n,M,(j,L)=>{Object(u.a)(j,M,t,L)},M=>{})}()}}(j)})}))}]);