From 32f7473b420b701084f1387f21fc867a30220183 Mon Sep 17 00:00:00 2001 From: Tetragramm Date: Sun, 3 Nov 2024 18:59:44 -0600 Subject: [PATCH] Fix bug with radiator cooling on push-pull engines. --- PlaneBuilder/Hangar/hangar.js | 2 +- PlaneBuilder/plane_builder.js | 2 +- PlaneBuilder/src/impl/Engine.ts | 2 +- Test/Hangar/hangar.js | 2 +- Test/plane_builder.js | 2 +- Test/src/impl/Engine.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PlaneBuilder/Hangar/hangar.js b/PlaneBuilder/Hangar/hangar.js index d67133f..0db28de 100644 --- a/PlaneBuilder/Hangar/hangar.js +++ b/PlaneBuilder/Hangar/hangar.js @@ -1 +1 @@ -(()=>{"use strict";var t,e,s={},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}};return s[t](r,r.exports,a),r.exports}e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,a.t=function(s,i){if(1&i&&(s=this(s)),8&i)return s;if("object"==typeof s&&s){if(4&i&&s.__esModule)return s;if(16&i&&"function"==typeof s.then)return s}var r=Object.create(null);a.r(r);var n={};t=t||[null,e({}),e([]),e(e)];for(var o=2&i&&s;"object"==typeof o&&!~t.indexOf(o);o=e(o))Object.getOwnPropertyNames(o).forEach((t=>n[t]=()=>s[t]));return n.default=()=>s,a.d(r,n),r},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};class r{static IsNullOrWhiteSpace(t){try{return null==t||"undefined"==t||t.toString().replace(/\s/g,"").length<1}catch(t){return console.log(t),!1}}static Join(t,...e){try{const s=e[0];if(Array.isArray(s)||s instanceof Array){let e=r.Empty;for(let i=0;i{e+=i[s]+t})),e=e.slice(0,e.length-t.length),e}const i=e;return r.join(t,...i)}catch(t){return console.log(t),r.Empty}}static Format(t,...e){try{return t.match(r.regexNumber)?r.format(r.regexNumber,t,e):t.match(r.regexObject)?r.format(r.regexObject,t,e,!0):t}catch(t){return console.log(t),r.Empty}}static format(t,e,s,i=!1){return e.replace(t,(function(t,e){const a=t.split(":");let n;return a.length>1&&(e=a[0].replace("{",""),t=a[1].replace("}","")),n=i?s[0][e]:s[e],null==n||null==n||t.match(/{\d+}/)?n:(n=r.parsePattern(t,n),void 0!==n&&null!=n?n:r.Empty)}))}static parsePattern(t,e){switch(t){case"L":return e.toLocaleLowerCase();case"U":return e.toLocaleUpperCase();case"d":if("string"==typeof e)return r.getDisplayDateFromString(e);if(e instanceof Date)return r.Format("{0:00}.{1:00}.{2:0000}",e.getDate(),e.getMonth(),e.getFullYear());break;case"s":if("string"==typeof e)return r.getSortableDateFromString(e);if(e instanceof Date)return r.Format("{0:0000}-{1:00}-{2:00}",e.getFullYear(),e.getMonth(),e.getDate());break;case"n":{"string"!=typeof e&&(e=e.toString());const t=e.replace(/,/g,".");if(isNaN(parseFloat(t))||t.length<=3)break;const s=t.split(/[^0-9]+/g);let i=s;s.length>1&&(i=[r.join("",...s.splice(0,s.length-1)),s[s.length-1]]);const a=i[0],n=a.length%3;let o=n>0?a.substring(0,n):r.Empty;const l=a.substring(n).match(/.{3}/g);return o=o+"."+r.Join(".",l),o+(i.length>1?","+i[1]:"")}case"x":return this.decimalToHexString(e);case"X":return this.decimalToHexString(e,!0)}return"number"!=typeof e&&isNaN(e)||isNaN(+t)||r.IsNullOrWhiteSpace(e)?e:r.formatNumber(e,t)}static decimalToHexString(t,e=!1){const s=parseFloat(t).toString(16);return e?s.toLocaleUpperCase():s}static getDisplayDateFromString(t){const e=t.split("-");if(e.length<=1)return t;let s=e[e.length-1];const i=e[e.length-2],a=e[e.length-3];return s=s.split("T")[0],s=s.split(" ")[0],`${s}.${i}.${a}`}static getSortableDateFromString(t){const e=t.replace(",","").split(".");if(e.length<=1)return t;const s=e[e.length-1].split(" ");let i=r.Empty;s.length>1&&(i=s[s.length-1]);let a=`${e[e.length-1].split(" ")[0]}-${e[e.length-2]}-${e[e.length-3]}`;return!r.IsNullOrWhiteSpace(i)&&i.length>1?a+=`T${i}`:a+="T00:00:00",a}static formatNumber(t,e){const s=e.length,i=t.toString();if(s<=i.length)return i;let a=s-i.length;return a+=1,new Array(a).join("0")+i}static join(t,...e){let s=r.Empty;for(let i=0;i Benefits(-)":"Penalties(+)
Benefits(-)","Used Burnt Out":"Burnt Out","Used Burnt Out Description":"Engines are at -1 Reliability","Used Ragged":"Ragged","Used Ragged Description":"Reduce your Max Speed by 10%","Used Hefty":"Hefty","Used Hefty Description":"Increase your Stall Speeds by 20%","Used Sticky Guns":"Sticky Guns","Used Sticky Guns Description":"Increase the chance of guns jamming by 1","Used Weak":"Weak","Used Weak Description":"Cut the plane\'s Toughness in half","Used Fragile":"Fragile","Used Fragile Description":"Reduce your Max Strain by 20%","Used Leaky":"Leaky","Used Leaky Description":"Reduce your Fuel by 20%","Used Sluggish":"Sluggish","Used Sluggish Description":"Reduce your Handling by 5","Weapons Section Title":"Weapons","Weapons Number of Weapon Sets":"Number of Weapon Sets:","Weapons Number of Weapon Braces":"Number of Weapon Braces:","Weapons Weapon Set":"Weapon Set","Weapons Weapons":"Weapons","Weapons Weapon Stats":"Weapon Stats","Weapons Type":"Weapon Type","Weapons Number of Mounts":"Number of Mounts","Weapons Ammunition":"Ammunition","Weapons Action":"Action","Weapons Projectile":"Projectile","Weapons Belt Fed":"Belt Fed","Weapons Stat Mounting":"Mounting","Weapons Stat Jam":"Jam","Weapons Stat Hits":"Hits","Weapons Stat Damage":"Damage","Weapons Stat Shots":"Shots","Weapons Stat Charges":"Charges per Shot","Weapons Wing Mount":"Wing Mount","Weapons Accessible":"Accessible","Weapons Free Accessible":"Free Accessible","Weapons Covered":"Covered","Weapons # Weapons at Mount":"Weapons at Mount","Weapons Synchronization":"Synchronization","Weapons Mount":"Weapon Mount","Weapons Braces":"Weapon Braces","Weapons Braces Warning":"These mounts give an observer +1 to make a Personal Attack with a loose weapon they are carrying in their hands.","Wings Section Title":"Wings","Wings Wing Stagger":"Wing Stagger:","Wings Closed Wing":"Closed Wing:","Wings Swept Wing":"Swept Wings:","Wings Wing Type":"Wing Type","Wings Wing Options":"Wing Options","Wings Wing Stats":"Wing Stats","Wings Full Wings":"Full Wings","Wings Miniature Wings":"Miniature Wings","Wings Sesquiplane":"Sesquiplane","Wings No Wing":"None","Wings Area":"Area","Wings Span":"Span","Wings Gull":"Gull","Wings Dihedral":"Dihedral","Wings Anhedral":"Anhedral","Aircraft Button Save":"Save","Aircraft Button Load":"Load","Aircraft Button Copy As Link":"Copy As Link","Aircraft Button Save Dashboard":"Save Dashboard","Aircraft Button Interactive Dashboard":"Interactive Dashboard","Aircraft Button Save NPC":"Save NPC","Aircraft Button Save Catalog":"Save Catalog","Aircraft Button Default Aircraft":"Default Aircraft","Aircraft Stats Section Title":"Total Sum of Stats","Aircraft Derived Section Title":"Aircraft Derived Statistics","Seat #":"Seat #{0}","Seats #":"Seats # {0}","Seat Location":"Choose Seat","Radiators #":"Radiators # {0}","Crew Pilot":"Pilot","Crew Bombadier":"Bombardier","Crew Co-Pilot":"Co-Pilot","Crew Gunner":"Gunner","Crew Aircrew":"Aircrew","Diesel":"Diesel Engine","Diesel Warning":"Engine won\'t catch fire.","Cargo Tiny":"A small locker for personal stuff.","Cargo Small":"Will fit a trunk, barrel, or crate.","Cargo Medium":"Will fit a small vehicle like a motorcycle, car, or zeppelin engine.","Cargo Large":"Will fit a scout or fighter aircraft with the wings taken off.","Cargo Huge":"Will fit just about anything you can imagine.","Alter Select Part":"Select Part","Alter Quantity":"Quantity","Alter Part Name":"Part Name","Alter Part Special Rules":"Special Rules","Frame Count":"Frame Count","Frame Count Warning":"This plane appears to have unused frame sections. Check to see if this is intentional.","Altitude Section Title":"Altitude Effects","Altitude Altitude":"Altitude","Rarity":"Rarity","Rarity Custom":"Custom","Rarity Common":"Common","Rarity Rare":"Rare","Rarity Legendary":"Legendary","Boost Warning":"Boost is 0 for some loads. The plane cannot accelerate to take off.","Insufficient Charge":"Insufficient Charge","Insufficient Charge Warning":"This aircraft has electrical systems with nothing to power them.","Low Mass Warning":"This aircraft is very low mass. If it is a custom airplane, be careful not to make it overpowered.","Low Drag Warning":"This aircraft is very low drag. If it is a custom airplane, be careful not to make it overpowered.","Connectivity Warning":"Can move between positions without Wingwalking.","Passenger Connectivity Warning":"Can reach the cockpit without Wingwalking.","Rotor Thickness":"Rotor Thickness"}}');var o=a.t(n,2);const l=new class{constructor(){this.lang="en"}LoadLanguages(t){this.languages=t}GetLanguages(){const t=[];for(const e of this.languages.languages)t.push(e);return t}SetCurrentLanguage(t){this.languages[t]&&(this.lang=t)}e(t){return this.languages[this.lang][t]?this.languages[this.lang][t]:this.languages.en[t]?this.languages.en[t]:(console.error("Failed to find "+t),"!"+t+"!")}};function h(t,...e){return r.Format(l.e(t),...e)}var c;l.LoadLanguages(o),function(t){t[t.WHITE=0]="WHITE",t[t.YELLOW=1]="YELLOW",t[t.RED=2]="RED"}(c||(c={}));class u{constructor(t){this.liftbleed=0,this.wetmass=0,this.mass=0,this.drag=0,this.control=0,this.cost=0,this.reqsections=0,this.visibility=0,this.flightstress=0,this.escape=0,this.pitchstab=0,this.latstab=0,this.cooling=0,this.reliability=0,this.power=0,this.fuelconsumption=0,this.maxstrain=0,this.structure=0,this.pitchspeed=0,this.pitchboost=0,this.wingarea=0,this.toughness=0,this.upkeep=0,this.crashsafety=0,this.bomb_mass=0,this.fuel=0,this.charge=0,this.warnings=[],this.era=[],t&&this.fromJSON(t,0)}toJSON(){return{liftbleed:this.liftbleed,wetmass:this.wetmass,mass:this.mass,drag:this.drag,control:this.control,cost:this.cost,reqsections:this.reqsections,visibility:this.visibility,flightstress:this.flightstress,escape:this.escape,pitchstab:this.pitchstab,latstab:this.latstab,cooling:this.cooling,reliability:this.reliability,power:this.power,fuelconsumption:this.fuelconsumption,maxstrain:this.maxstrain,structure:this.structure,pitchboost:this.pitchboost,pitchspeed:this.pitchspeed,wingarea:this.wingarea,toughness:this.toughness,upkeep:this.upkeep,crashsafety:this.crashsafety,bomb_mass:this.bomb_mass,fuel:this.fuel,charge:this.charge,warnings:this.warnings,eras:this.era}}fromJSON(t,e){if(t.liftbleed&&(this.liftbleed=t.liftbleed),t.wetmass&&(this.wetmass=t.wetmass),t.mass&&(this.mass=t.mass),t.drag&&(this.drag=t.drag),t.control&&(this.control=t.control),t.cost&&(this.cost=t.cost),t.reqsections&&(this.reqsections=t.reqsections),t.visibility&&(this.visibility=t.visibility),t.flightstress&&(this.flightstress=t.flightstress),t.escape&&(this.escape=t.escape),t.pitchstab&&(this.pitchstab=t.pitchstab),t.latstab&&(this.latstab=t.latstab),t.cooling&&(this.cooling=t.cooling),t.reliability&&(this.reliability=t.reliability),t.power&&(this.power=t.power),t.fuelconsumption&&(this.fuelconsumption=t.fuelconsumption),t.maxstrain&&(this.maxstrain=t.maxstrain),t.structure&&(this.structure=t.structure),t.pitchspeed&&(this.pitchspeed=t.pitchspeed),t.pitchboost&&(this.pitchboost=t.pitchboost),t.wingarea&&(this.wingarea=t.wingarea),t.toughness&&(this.toughness=t.toughness),t.upkeep&&(this.upkeep=t.upkeep),t.crashsafety&&(this.crashsafety=t.crashsafety),t.bomb_mass&&(this.bomb_mass=t.bomb_mass),t.fuel&&(this.fuel=t.fuel),t.charge&&(this.charge=t.charge),t.warning&&this.warnings.push({source:h(t.name),warning:h(t.warning),color:c.WHITE}),t.warnings){const e=t.warnings,s=[];for(const t of e)s.push({source:t.source,warning:t.warning});this.warnings=this.MergeWarnings(s)}if(t.era&&this.era.push({name:h(t.name),era:h(t.era)}),t.eras){const e=t.eras,s=[];for(const t of e)s.push({name:t.name,era:t.era});this.era=this.MergeEra(s)}}serialize(t){t.PushNum(this.liftbleed),t.PushNum(this.wetmass),t.PushNum(this.mass),t.PushNum(this.drag),t.PushNum(this.control),t.PushNum(this.cost),t.PushNum(this.reqsections),t.PushNum(this.visibility),t.PushNum(this.flightstress),t.PushNum(this.escape),t.PushNum(this.pitchstab),t.PushNum(this.latstab),t.PushNum(this.cooling),t.PushNum(this.reliability),t.PushNum(this.power),t.PushNum(this.fuelconsumption),t.PushNum(this.maxstrain),t.PushNum(this.structure),t.PushFloat(this.pitchboost),t.PushFloat(this.pitchspeed),t.PushNum(this.wingarea),t.PushNum(this.toughness),t.PushNum(this.upkeep),t.PushNum(this.crashsafety),t.PushNum(this.bomb_mass),t.PushNum(this.fuel),t.PushNum(this.charge),t.PushNum(this.warnings.length);for(const e of this.warnings)t.PushString(e.source),t.PushString(e.warning);t.PushNum(this.era.length);for(const e of this.era)t.PushString(e.name),t.PushString(e.era)}deserialize(t){if(this.liftbleed=t.GetNum(),this.wetmass=t.GetNum(),this.mass=t.GetNum(),this.drag=t.GetNum(),this.control=t.GetNum(),this.cost=t.GetNum(),this.reqsections=t.GetNum(),this.visibility=t.GetNum(),this.flightstress=t.GetNum(),this.escape=t.GetNum(),this.pitchstab=t.GetNum(),this.latstab=t.GetNum(),this.cooling=t.GetNum(),this.reliability=t.GetNum(),this.power=t.GetNum(),this.fuelconsumption=t.GetNum(),this.maxstrain=t.GetNum(),this.structure=t.GetNum(),this.pitchboost=t.GetFloat(),this.pitchspeed=t.GetFloat(),this.wingarea=t.GetNum(),this.toughness=t.GetNum(),this.upkeep=t.GetNum(),this.crashsafety=t.GetNum(),this.bomb_mass=t.GetNum(),this.fuel=t.GetNum(),this.charge=t.GetNum(),t.version>12.25){const e=t.GetNum();this.warnings=[];for(let s=0;s1e-6&&(e.warnings=this.warnings,e.era=this.era),e}Equal(t){return this.liftbleed==t.liftbleed&&this.wetmass==t.wetmass&&this.mass==t.mass&&this.drag==t.drag&&this.control==t.control&&this.cost==t.cost&&this.reqsections==t.reqsections&&this.visibility==t.visibility&&this.flightstress==t.flightstress&&this.escape==t.escape&&this.pitchstab==t.pitchstab&&this.latstab==t.latstab&&this.cooling==t.cooling&&this.reliability==t.reliability&&this.power==t.power&&this.fuelconsumption==t.fuelconsumption&&this.maxstrain==t.maxstrain&&this.structure==t.structure&&this.pitchspeed==t.pitchspeed&&this.pitchboost==t.pitchboost&&this.wingarea==t.wingarea&&this.toughness==t.toughness&&this.upkeep==t.upkeep&&this.crashsafety==t.crashsafety&&this.bomb_mass==t.bomb_mass&&this.fuel==t.fuel&&this.charge==t.charge}rtz(t){return t>0?Math.floor(1e-6+t):Math.ceil(-1e-6+t)}Round(){this.liftbleed=this.rtz(this.liftbleed),this.wetmass=this.rtz(this.wetmass),this.mass=this.rtz(this.mass),this.drag=this.rtz(this.drag),this.control=this.rtz(this.control),this.cost=this.rtz(this.cost),this.reqsections=this.rtz(this.reqsections),this.visibility=this.rtz(this.visibility),this.flightstress=this.rtz(this.flightstress),this.escape=this.rtz(this.escape),this.pitchstab=this.rtz(this.pitchstab),this.latstab=this.rtz(this.latstab),this.cooling=this.rtz(this.cooling),this.reliability=this.rtz(this.reliability),this.power=this.rtz(this.power),this.fuelconsumption=this.rtz(this.fuelconsumption),this.maxstrain=this.rtz(this.maxstrain),this.structure=this.rtz(this.structure),this.wingarea=this.rtz(this.wingarea),this.toughness=this.rtz(this.toughness),this.upkeep=this.rtz(this.upkeep),this.crashsafety=this.rtz(this.crashsafety),this.bomb_mass=this.rtz(this.bomb_mass),this.fuel=this.rtz(this.fuel),this.charge=this.rtz(this.charge)}Clone(){return this.Add(new u)}}const _=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return 6}},p=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return-1}},m=t=>{switch(t){case 0:return"Pioneer";case 1:return"WWI";case 2:return"Roaring 20s";case 3:return"Coming Storm";case 4:return"WWII";case 5:return"Last Hurrah";case 6:case-1:return"Himmilgard"}},g=t=>{var e="";for(let s=0;s0){const s=t.length-1;2==t[s].length&&t[s][0]!=t[s][1]?e+=t[s][0].toString()+"("+t[s][1].toString()+")":e+=t[s][0].toString()}return e};class f{constructor(t){this.array=new ArrayBuffer(51200),this.view=new DataView(this.array),this.offset=0}Check(){if(this.offset>=this.array.byteLength)throw"Serialization Way too long."}PushNum(t){this.view.setInt16(this.offset,t,!1),this.offset+=2,this.Check()}PushBool(t){t?this.view.setUint8(this.offset,1):this.view.setUint8(this.offset,0),this.offset+=1,this.Check()}PushString(t){var e=(new TextEncoder).encode(t);this.PushNum(e.length);for(let t=0;t=this.array.byteLength)throw"Deserialization Failed"}GetNum(){this.Check();const t=this.view.getInt16(this.offset,!1);return this.offset+=2,t}GetBool(){this.Check();const t=this.view.getUint8(this.offset);return this.offset+=1,t>0}GetString(){this.Check();const t=this.GetNum(),e=new Uint8Array(this.view.buffer,this.offset,t);let s;return this.offset+=t,s=this.version<12.65?"windows-1252":"utf-8",new TextDecoder(s).decode(e)}GetNumArr(t){this.Check();const e=this.GetNum(),s=[];for(let t=0;t0&&(r*=1.4),Math.floor(1e-6+r)}VerifyValues(){for(this.engine_displacement=Math.max(.01,this.engine_displacement),this.engine_displacement=Math.min(150,this.engine_displacement),this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.cool_sel=Math.max(0,Math.min(this.CoolingTable.length-1,this.cool_sel)),this.num_cyl_per_row=Math.floor(Math.max(1,this.num_cyl_per_row)),this.num_rows=Math.floor(Math.max(1,this.num_rows)),this.compression_ratio=Math.max(.01,this.compression_ratio),this.compression_ratio=Math.min(25,this.compression_ratio),this.rpm_boost=Math.max(.1,this.rpm_boost),this.rpm_boost=Math.min(2,this.rpm_boost),this.material_fudge=Math.max(.1,this.material_fudge),this.material_fudge=Math.min(2,this.material_fudge),this.quality_fudge=Math.max(.1,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge);this.material_fudge-1+(this.quality_fudge-1)<-.9;)this.material_fudge+=.1,this.quality_fudge+=.1;this.min_IAF=10*Math.round(1e-6+this.min_IAF/10),this.compressor_count=Math.floor(1e-6+this.compressor_count),this.compressor_count=Math.min(5,this.compressor_count),this.compressor_type==S.NONE?(this.compressor_count=0,this.min_IAF=0):this.compressor_type==S.ALTITUDE_THROTTLE?(this.compressor_count=1,this.min_IAF=0,this.upg_sel[0]=!1,this.upg_sel[1]=!1,this.upg_sel[2]=!1):(this.min_IAF=Math.max(0,this.min_IAF),this.compressor_count=Math.max(1,this.compressor_count))}EngineStats(){const t=new I;switch(t.name=this.name,this.VerifyValues(),t.stats.power=this.CalcPower(),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=Math.floor(-1.999999+this.era_sel+10*(this.quality_fudge+this.material_fudge-2)),t.stats.cooling=this.CalcCooling(),t.oiltank=this.IsRotary(),t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=this.CalcFuelConsumption(),t.altitude=this.CalcAltitude(),t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(m(this.era_sel))}),this.compressor_type){case S.NONE:break;case S.ALTITUDE_THROTTLE:t.stats.cost+=3,t.altitude=49,t.stats.warnings.push({source:h("Altitude Throttle"),warning:h("Altitude Throttle Warning"),color:c.WHITE});break;case S.SUPERCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.fuelconsumption=Math.floor(1e-6+1.25*t.stats.fuelconsumption),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=29+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e;break}case S.TURBOCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10*2,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=49+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e,t.stats.reqsections+=1;break}}return(this.compressor_type==S.ALTITUDE_THROTTLE||this.upg_sel[1])&&t.stats.warnings.push({source:h("War Emergency Power"),warning:h("War Emergency Power Warning"),color:c.WHITE}),t.stats.fuelconsumption=Math.max(1,t.stats.fuelconsumption),t.rarity=this.rarity,t}EngineInputs(){const t=new A;t.engine_type=w.PROPELLER,t.RPM_boost=this.rpm_boost,t.compression=this.compression_ratio,t.compressor_count=this.compressor_count,t.compressor_type=this.compressor_type,t.cyl_per_row=this.num_cyl_per_row,t.displacement=this.engine_displacement,t.era_sel=this.era_sel,t.material_fudge=this.material_fudge,t.min_IdealAlt=this.min_IAF,t.name=this.name,t.quality_fudge=this.quality_fudge,t.rows=this.num_rows,t.type=this.cool_sel;for(let e=0;e2&&(this.afterburner=!1)}EngineInputs(){const t=new A;return t.name=this.name,t.engine_type=w.TURBOMACHINERY,t.era_sel=this.era_sel,t.type=this.type_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.upgrades[0]=this.afterburner,t.rarity=this.rarity,t}GetPitchSpeed(){return this.bypass_ratio>=8?1:this.bypass_ratio>=3.5?1.1:this.bypass_ratio>=1?1.2:1.3}EngineStats(){const t=new I;this.VerifyValues();const e=this.CalcStages();return this.kN=e.thrust,this.tsfc=e.fuel/e.thrust,t.name=this.name,t.stats.power=Math.round(1e3*e.thrust/89),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.fuelconsumption=Math.round(200*e.fuel/1e3),t.rumble=0,t.stats.cost=this.CalcCost(),t.overspeed=100,t.altitude=59,8==this.era_sel?t.stats.era.push({name:t.name,era:h(m(-1))}):t.stats.era.push({name:t.name,era:h(m(5))}),t.stats.pitchspeed=this.GetPitchSpeed(),t.rarity=this.rarity,t}}class v{constructor(){this.EraTable=[{name:"Pioneer",draw:3,drawfactor:.4,massfactor:.4,reliability:-1,costfactor:.4,overspeed:20},{name:"WWI",draw:1,drawfactor:.4,massfactor:1/3,reliability:0,costfactor:1/2.25,overspeed:25},{name:"Roaring 20s",draw:1,drawfactor:2/7,massfactor:2/7,reliability:1,costfactor:.5,overspeed:30},{name:"Coming Storm",draw:0,drawfactor:2/7,massfactor:1/4,reliability:2,costfactor:1/1.9,overspeed:35},{name:"WWII",draw:0,drawfactor:1/4,massfactor:.2,reliability:3,costfactor:1/1.8,overspeed:40},{name:"Last Hurrah",draw:0,drawfactor:.2,massfactor:1/6,reliability:4,costfactor:1/1.75,overspeed:45}],this.Winding=[{name:"Aluminum",drawmod:1.1,mass:-2,drag:1,costfactor:1,reliabilty:0},{name:"Copper",drawmod:1,mass:0,drag:0,costfactor:1,reliabilty:0},{name:"Silver",drawmod:.95,mass:1,drag:0,costfactor:1.1,reliabilty:0},{name:"Electrum",drawmod:.9,mass:2,drag:0,costfactor:1.3,reliabilty:1},{name:"Platinum",drawmod:.75,mass:3,drag:0,costfactor:2,reliabilty:2},{name:"Screamer Sinew",drawmod:.9,mass:0,drag:1,costfactor:1.75,reliabilty:4},{name:"Lightning Sprite Ephemera",drawmod:.5,mass:-2,drag:-2,costfactor:2,reliabilty:-3}],this.name="Default",this.era_sel=0,this.winding_sel=0,this.power=1,this.chonk=1,this.quality_fudge=1}EraMass(){const t=this.EraTable[this.era_sel];return Math.floor(1e-6+t.massfactor*this.power)}CalcMass(){const t=this.Winding[this.winding_sel];return Math.max(0,Math.floor(1e-6+this.EraMass()+t.mass))}CalcDrag(){const t=this.power/10,e=this.Winding[this.winding_sel].drag;return Math.max(1,Math.floor(1.000001+t+this.chonk+e))}CalcOverspeed(){const t=this.chonk/2,e=7.5*(this.quality_fudge-1);return Math.ceil(-1e-6+this.EraTable[this.era_sel].overspeed-t+e)}CalcDraw(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.draw+Math.ceil(this.power*t.drawfactor-1e-6);return Math.ceil(s*e.drawmod-1e-6)}CalcReliability(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=this.power/10,i=5*(this.quality_fudge-1);return Math.trunc(1e-6+t.reliability+this.chonk-s+i)+e.reliabilty}CalcTorque(){const t=1+this.EraMass()/10+this.chonk/4;return Math.max(1,Math.floor(1e-6+t))}CalcCost(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.costfactor*this.power,i=Math.ceil(s*Math.max(.5,this.quality_fudge)-1e-6);return Math.ceil(i*e.costfactor-1e-6)}VerifyValues(){this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.winding_sel=Math.max(0,Math.min(this.Winding.length-1,this.winding_sel)),this.power=Math.max(1,this.power),this.power=Math.floor(1e-6+this.power),this.chonk=Math.floor(1e-6+this.chonk),this.chonk=Math.max(-10,this.chonk),this.chonk=Math.min(10,this.chonk),this.quality_fudge=Math.max(.5,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge)}EngineStats(){var t=new I;return t.name=this.name,this.VerifyValues(),t.stats.power=this.power,t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.cooling=0,t.oiltank=!1,t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=0,t.stats.charge=-this.CalcDraw(),t.altitude=100,t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(m(this.era_sel))}),t}EngineInputs(){var t=new A;return t.engine_type=w.ELECTRIC,t.name=this.name,t.power=this.power,t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.material_fudge=this.chonk,t.quality_fudge=this.quality_fudge,t}}!function(t){t[t.PROPELLER=0]="PROPELLER",t[t.PULSEJET=1]="PULSEJET",t[t.TURBOMACHINERY=2]="TURBOMACHINERY",t[t.ELECTRIC=3]="ELECTRIC"}(w||(w={})),function(t){t[t.CUSTOM=0]="CUSTOM",t[t.COMMON=1]="COMMON",t[t.RARE=2]="RARE",t[t.LEGENDARY=3]="LEGENDARY"}(C||(C={}));class A{constructor(t){this.name="Default",this.engine_type=w.PROPELLER,this.type=0,this.era_sel=0,this.rarity=C.CUSTOM,this.displacement=0,this.compression=0,this.cyl_per_row=0,this.rows=0,this.RPM_boost=0,this.material_fudge=0,this.quality_fudge=0,this.compressor_type=0,this.compressor_count=0,this.min_IdealAlt=0,this.upgrades=[...Array(4).fill(!1)],this.power=0,this.quality_cost=0,this.quality_rely=0,this.starter=!1,this.flow_adjustment=0,this.diameter=0,this.compression_ratio=0,this.bypass_ratio=0,this.winding_sel=0,t&&this.fromJSON(t)}toJSON(){switch(this.engine_type){case w.PROPELLER:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,displacement:this.displacement,compression:this.compression,cyl_per_row:this.cyl_per_row,rows:this.rows,RPM_boost:this.RPM_boost,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge,compressor_type:this.compressor_type,compressor_count:this.compressor_count,min_IAF:this.min_IdealAlt,upgrades:this.upgrades,rarity:this.rarity};case w.PULSEJET:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,power:this.power,quality_cost:this.quality_cost,quality_rely:this.quality_rely,starter:this.starter,rarity:this.rarity};case w.TURBOMACHINERY:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,flow_adjustment:this.flow_adjustment,diameter:this.diameter,compression_ratio:this.compression_ratio,bypass_ratio:this.bypass_ratio,upgrades:this.upgrades,rarity:this.rarity};case w.ELECTRIC:return{name:this.name,engine_type:this.engine_type,power:this.power,era_sel:this.era_sel,winding_sel:this.winding_sel,diameter:this.diameter,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge};default:throw"EngineInputs.toJSON: Oh dear, you have a new engine type."}}fromJSON(t){switch(this.name=t.name,this.engine_type=t.engine_type,this.type=t.type,this.era_sel=t.era_sel,this.engine_type){case w.PROPELLER:this.displacement=t.displacement,this.compression=t.compression,this.cyl_per_row=t.cyl_per_row,this.rows=t.rows,this.RPM_boost=t.RPM_boost,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge,this.compressor_type=t.compressor_type,this.compressor_count=t.compressor_count,this.min_IdealAlt=t.min_IAF,this.upgrades=b(t.upgrades,this.upgrades.length);break;case w.PULSEJET:this.power=t.power,this.quality_cost=t.quality_cost,this.quality_rely=t.quality_rely,this.starter=t.starter;break;case w.TURBOMACHINERY:this.flow_adjustment=t.flow_adjustment,this.diameter=t.diameter,this.compression_ratio=t.compression_ratio,this.bypass_ratio=t.bypass_ratio,this.upgrades=t.upgrades;break;case w.ELECTRIC:this.power=t.power,this.winding_sel=t.winding_sel,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge;break;default:throw"EngineInputs.fromJSON: Oh dear, you have a new engine type."}t.rarity?this.rarity=t.rarity:this.rarity=C.CUSTOM}serialize(t){switch(t.PushString(this.name),t.PushNum(this.engine_type),t.PushNum(this.type),t.PushNum(this.era_sel),this.engine_type){case w.PROPELLER:t.PushFloat(this.displacement),t.PushFloat(this.compression),t.PushNum(this.cyl_per_row),t.PushNum(this.rows),t.PushFloat(this.RPM_boost),t.PushFloat(this.material_fudge),t.PushFloat(this.quality_fudge),t.PushNum(this.compressor_type),t.PushNum(this.compressor_count),t.PushNum(this.min_IdealAlt),t.PushBoolArr(this.upgrades);break;case w.PULSEJET:t.PushNum(this.power),t.PushFloat(this.quality_cost),t.PushFloat(this.quality_rely),t.PushBool(this.starter);break;case w.TURBOMACHINERY:t.PushFloat(this.flow_adjustment),t.PushFloat(this.diameter),t.PushFloat(this.compression_ratio),t.PushFloat(this.bypass_ratio),t.PushBoolArr(this.upgrades);break;case w.ELECTRIC:t.PushNum(this.power),t.PushNum(this.winding_sel),t.PushNum(this.material_fudge),t.PushFloat(this.quality_fudge);break;default:throw"EngineInputs.serialize: Oh dear, you have a new engine type."}t.PushNum(this.rarity)}deserialize(t){switch(this.name=t.GetString(),this.engine_type=t.GetNum(),this.type=t.GetNum(),this.era_sel=t.GetNum(),this.engine_type){case w.PROPELLER:this.displacement=t.GetFloat(),this.compression=t.GetFloat(),this.cyl_per_row=t.GetNum(),this.rows=t.GetNum(),this.RPM_boost=t.GetFloat(),this.material_fudge=t.GetFloat(),this.quality_fudge=t.GetFloat(),this.compressor_type=t.GetNum(),this.compressor_count=t.GetNum(),this.min_IdealAlt=t.GetNum(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case w.PULSEJET:this.power=t.GetNum(),this.quality_cost=t.GetFloat(),this.quality_rely=t.GetFloat(),this.starter=t.GetBool();break;case w.TURBOMACHINERY:this.flow_adjustment=t.GetFloat(),this.diameter=t.GetFloat(),this.compression_ratio=t.GetFloat(),this.bypass_ratio=t.GetFloat(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case w.ELECTRIC:this.power=t.GetNum(),this.winding_sel=t.GetNum(),this.material_fudge=t.GetNum(),this.quality_fudge=t.GetFloat();break;default:throw"EngineInputs.deserialize: Oh dear, you have a new engine type."}t.version>12.35?this.rarity=t.GetNum():this.rarity=C.CUSTOM}PartStats(){switch(this.engine_type){case w.PROPELLER:{const t=new G;return t.name=this.name,t.cool_sel=this.type,t.era_sel=this.era_sel,t.engine_displacement=this.displacement,t.compression_ratio=this.compression,t.num_cyl_per_row=this.cyl_per_row,t.num_rows=this.rows,t.rpm_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IAF=this.min_IdealAlt,t.upg_sel=this.upgrades,t.rarity=this.rarity,t.EngineStats()}case w.PULSEJET:{const t=new M;t.valve_sel=this.type,t.era_sel=this.era_sel,t.desired_power=this.power,t.build_quality=this.quality_cost,t.overall_quality=this.quality_rely,t.starter=this.starter,t.rarity=this.rarity;const e=t.EngineStats();return this.name=e.name,e}case w.TURBOMACHINERY:{const t=new R;return t.type_sel=this.type,t.era_sel=this.era_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.afterburner=this.upgrades[0],t.name=this.name,t.rarity=this.rarity,t.EngineStats()}case w.ELECTRIC:{const t=new v;return t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.power=this.power,t.chonk=this.material_fudge,t.quality_fudge=this.quality_fudge,t.name=this.name,t.EngineStats()}default:throw"EngineInputs.PartStats: Oh dear, you have a new engine type."}}Equal(t){return this.name==t.name}Clone(){const t=new A;t.name=this.name,t.engine_type=this.engine_type,t.type=this.type,t.era_sel=this.era_sel,t.displacement=this.displacement,t.compression=this.compression,t.cyl_per_row=this.cyl_per_row,t.rows=this.rows,t.RPM_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IdealAlt=this.min_IdealAlt,t.power=this.power,t.quality_cost=this.quality_cost,t.quality_rely=this.quality_rely,t.starter=this.starter;for(let e=0;e12.35&&(this.rarity=t.GetNum()),this.stats.deserialize(t)}Clone(){const t=new I;return t.fromJSON(JSON.parse(JSON.stringify(this.toJSON()))),t}Equal(t){return this.stats.Equal(t.stats)&&this.overspeed==t.overspeed&&this.altitude==t.altitude&&this.torque==t.torque&&this.rumble==t.rumble&&this.oiltank==t.oiltank&&this.pulsejet==t.pulsejet&&this.rarity==t.rarity}Verify(){this.oiltank&&(this.stats.cooling=0),this.PulseJetCheck()}PulseJetCheck(){this.pulsejet?(this.stats.cooling=0,this.overspeed=100,this.altitude=3,this.torque=0):this.rumble=0}}const E=JSON.parse('{"l":[{"name":"Custom","engines":[{"name":"Bentley BR.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Renault V8 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":7,"compression":4,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.4,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Early-WWI","engines":[{"name":"Aeromarine K-6 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.36,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 80hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.27,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 6 cylinder 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Argus As II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":10.353,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.8,"compression":4.85,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Benz Bz.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.4,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 7Z 95hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.88,"compression":4.3,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9Bf 140hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.46,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 14 Double Lambda 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 70hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.75,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Omega 50hp","engine_type":0,"type":2,"era_sel":0,"displacement":7.7,"compression":4,"cyl_per_row":7,"rows":1,"RPM_boost":1.49,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome monosoupape 9B 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9C 90hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.89,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"RAF 1a 90hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.88,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.9,"material_fudge":1.3,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Late-WWI","engines":[{"name":"Bentley BR.2 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 11EB 200hp","engine_type":0,"type":2,"era_sel":1,"displacement":21.49,"compression":5.1,"cyl_per_row":11,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 16X 420hp","engine_type":0,"type":0,"era_sel":1,"displacement":32.53333333,"compression":5,"cyl_per_row":4,"rows":4,"RPM_boost":0.87,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8F 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.98,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIav 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'18","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle III 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle VIII 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 110hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Dyak 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.800000002,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.III 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.6,"compression":5,"cyl_per_row":11,"rows":1,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Mid-WWI","engines":[{"name":"Argus As III 190hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.9,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Beardmore 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.635,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bz.IV 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.6,"compression":4.9,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9B 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Cosmos Mercury","engine_type":0,"type":1,"era_sel":1,"displacement":19.6,"compression":5.3,"cyl_per_row":7,"rows":2,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss K-12 375hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.33,"material_fudge":0.8,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss OXX-6","engine_type":0,"type":0,"era_sel":1,"displacement":9.3,"compression":4.92,"cyl_per_row":2,"rows":4,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Fiat A.12 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9B Monosoupape 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9N Monosoupape 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":5.1,"cyl_per_row":9,"rows":1,"RPM_boost":1.05,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Aa 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Ab 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8B 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Bc 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Ja 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Jb 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Liberty L-12 400hp","engine_type":0,"type":0,"era_sel":2,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.64,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Lorraine 12Da 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":24.4,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIa 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIaü 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IVa 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Falcon III 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 80hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Arab 208hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.76,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Maori II 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":12.27,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.3,"material_fudge":1.7,"quality_fudge":0.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.II 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Pre-WWI","engines":[{"name":"Mercedes E4F 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Coming Storm","engines":[{"name":"Allison V-1710-85 1200hp","engine_type":0,"type":0,"era_sel":3,"displacement":28,"compression":6.65,"cyl_per_row":2,"rows":6,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bristol Pegasus XVIII 835hp","engine_type":0,"type":1,"era_sel":2,"displacement":28.7,"compression":6.25,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1.2,"quality_fudge":0.8,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Daimler-Benz 601ARJ 1775hp","engine_type":0,"type":0,"era_sel":3,"displacement":33.93,"compression":6.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.84,"material_fudge":0.6,"quality_fudge":0.7,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,true,false]}]},{"name":"Roaring 20s","engines":[{"name":"Argus As 5 1500hp","engine_type":0,"type":0,"era_sel":2,"displacement":94.1,"compression":5.6,"cyl_per_row":6,"rows":4,"RPM_boost":0.638,"material_fudge":0.4,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bréguet Quadrimoteur Type B H-32 970hp","engine_type":0,"type":0,"era_sel":2,"displacement":48.64,"compression":5,"cyl_per_row":4,"rows":8,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'20","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion XI 580hp","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":6,"cyl_per_row":4,"rows":3,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"WWII","engines":[{"name":"Klimov M-105PF 1230hp","engine_type":0,"type":0,"era_sel":3,"displacement":35.101,"compression":7,"cyl_per_row":2,"rows":6,"RPM_boost":0.55,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls Royce Merlin 46 930hp","engine_type":0,"type":0,"era_sel":3,"displacement":27,"compression":5.55,"cyl_per_row":2,"rows":6,"RPM_boost":0.98,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,true,true,false]}]},{"name":"ACDQ","engines":[{"name":"2A-Series 4-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":16,"compression":4.5,"cyl_per_row":1,"rows":2,"RPM_boost":0.5,"material_fudge":0.8,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"F-Series 6-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":17,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.07,"material_fudge":0.7,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"G-Series 9-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":16,"compression":4.7,"cyl_per_row":9,"rows":1,"RPM_boost":1.04,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hartmann H.IIc Straight-6 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":12,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hornet R-3 Boxer 6-Cylinder","engine_type":0,"type":0,"era_sel":1,"displacement":10,"compression":5,"cyl_per_row":2,"rows":3,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Maclean-King Tiger MK.1 V-12 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":17,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ogre-Z Beta V-6","engine_type":0,"type":0,"era_sel":0,"displacement":11,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Pulsejet PV-12 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":12,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-20 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":20,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-8 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":8,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Seguin Σ110 Sigma 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":1,"displacement":14,"compression":4.5,"cyl_per_row":7,"rows":1,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"SuperPegasus 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":13.5,"compression":5,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"TurboGoblin 8-Cylinder Semi-Radial","engine_type":0,"type":4,"era_sel":0,"displacement":13,"compression":5.5,"cyl_per_row":8,"rows":1,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Himmilgard Pulsejet","engines":[{"name":"Pulsejet PV-5 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":5,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-6 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":6,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-7 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":7,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-8 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":8,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-9 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":9,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-10 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":10,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-11 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":11,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-12 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":12,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-13 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":13,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-14 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":14,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-15 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":15,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1}]},{"name":"Himmilgard Liquid Radial","engines":[{"name":"Einsort MM 140hp","engine_type":0,"type":5,"era_sel":1,"displacement":14.72,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Einsort MR 150hp","engine_type":0,"type":5,"era_sel":1,"displacement":15.46,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Gernsback Motor 0005","engine_type":0,"type":5,"era_sel":1,"displacement":12,"compression":6,"cyl_per_row":5,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Liquid Cooled","engines":[{"name":"Meier Bärenjunge 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.5,"compression":5.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.86,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F1166 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 Über 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2000 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Brandt Krieger I 370hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Brandt Kurier XVI 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Fleischmann F10 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fleischmann F10ü 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.75,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fokker Fungizidherstellung Typ 247 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.3,"compression":4.8,"cyl_per_row":1,"rows":6,"RPM_boost":0.85,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Ochs 2 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.84,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Windhund 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Nationales Motorbüro Arbeiter XVII 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,true],"rarity":2},{"name":"Nationales Motorbüro D-1140 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.4,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760tgl 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.4,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-840 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.4,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.05,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro Kurier XXI 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XII 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"SAM Kurier XX 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter I 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.15,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter III 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter V 350hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.75,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Schrankhut RD.300V 230hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":6.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.51,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Wollsteinkraft Verteidiger C 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Wollsteinkraft Verteidiger H 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Wollsteinkraft Wagehals C 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F4398 490hp","engine_type":0,"type":0,"era_sel":1,"displacement":44.3,"compression":4.7,"cyl_per_row":3,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Patriot 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Turbolader-Patriot 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"Meier Bär 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Meier Eisbär 500hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XIII 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":1,"min_IAF":10,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter IV 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":2},{"name":"Sonnenmotor EGH3 220hp","engine_type":0,"type":0,"era_sel":0,"displacement":20,"compression":5,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":50,"upgrades":[false,false,false,true],"rarity":3},{"name":"Wollsteinkraft Wagehals T 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Kurier L 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.99,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Bertha F2080 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.4,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2080 Über 270hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.8,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Contrarotary","engines":[{"name":"Nationales Motorbüro R-1860 160hp","engine_type":0,"type":3,"era_sel":1,"displacement":18.6,"compression":6,"cyl_per_row":11,"rows":1,"RPM_boost":0.65,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro R-1190 110hp","engine_type":0,"type":3,"era_sel":1,"displacement":11.9,"compression":6,"cyl_per_row":9,"rows":1,"RPM_boost":0.67,"material_fudge":1.2,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Air Cooled","engines":[{"name":"Braun UL 90hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun ULK 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.2,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs X 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.1,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun UX 150hp","engine_type":0,"type":1,"era_sel":1,"displacement":13.2,"compression":4.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.23,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Scholz Luchs III 30hp","engine_type":0,"type":1,"era_sel":1,"displacement":3.1,"compression":4.5,"cyl_per_row":3,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs VI 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Breitbusch Libelle \'320hp\'","engine_type":0,"type":1,"era_sel":1,"displacement":22.78,"compression":4.42,"cyl_per_row":9,"rows":1,"RPM_boost":1.31,"material_fudge":1.1,"quality_fudge":0.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Rosevear Ankou B 180hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.9,"compression":5.17,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":1.4,"quality_fudge":0.9,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Semi-Radial","engines":[{"name":"SLW Sigvird 180hp","engine_type":0,"type":4,"era_sel":1,"displacement":11,"compression":6,"cyl_per_row":4,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Rotary","engines":[{"name":"Modded Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Robur Herausforderer 180hp","engine_type":0,"type":2,"era_sel":1,"displacement":18,"compression":5.5,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":40,"upgrades":[false,false,true,true],"rarity":3},{"name":"Rhona Motorbau Z11 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z11tgl 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber B.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber G.IX 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber O.VII 50hp","engine_type":0,"type":2,"era_sel":1,"displacement":8,"compression":4.85,"cyl_per_row":7,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber L.VII 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber TG.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber T.IX 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.3 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Schreiber L.XIV 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1}]}]}');class N{constructor(t){this.constant=!1,this.name=t,this.list=[];const e=window.localStorage.getItem("engines."+this.name);null!=e&&this.fromJSON(JSON.parse(e));const s=window.localStorage.getItem("engines_names");let i=[];s&&(i=JSON.parse(s));let a=!1;for(const e of i)if(e==t){a=!0;break}a||i.push(t),window.localStorage.setItem("engines_names",JSON.stringify(i))}toJSON(){const t=[];for(const e of this.list)t.push(e.toJSON());return{name:this.name,engines:t}}fromJSON(t,e=!1){t.name&&(this.name=t.name),e&&(this.list=[]);for(const s of t.engines)try{this.push(new A(s),e)}catch(t){console.error(t)}}deserializeEngine(t){if(this.constant)throw"Engine List is Constant";const e=new A;return e.deserialize(t),this.push(e)}push(t,e=!1){if(this.constant)throw"Engine List is Constant";if(e)this.remove(t);else for(let e=0;e(""+t.name).localeCompare(e.name))),window.localStorage.setItem("engines."+this.name,JSON.stringify(this.toJSON())),this.find(t)}get(t){return t<0||t>=this.length?new A:this.list[t]}get_name(t){const e=this.find_name(t);return this.get(e)}get_stats(t){return t<0||t>=this.length?new I:this.list[t].PartStats()}get_stats_name(t){const e=this.find_name(t);return this.get_stats(e)}find(t){for(let e=0;e=0&&this.list.splice(e,1),window.localStorage.setItem("engines."+this.name,JSON.stringify(this.toJSON()))}remove_name(t){if(this.constant)throw"Engine List is Constant";const e=this.find_name(t);e>=0&&this.list.splice(e,1),window.localStorage.setItem("engines."+this.name,JSON.stringify(this.toJSON()))}get length(){return this.list.length}SetConstant(){this.constant=!0}}const T=new Map([["Custom",new N("Custom")]]);function x(){return T}function W(t){const e=x();for(const s of e.keys())if("Custom"!=s&&e.get(s).find_name(t)>=0)return s;return e.get("Custom").find_name(t)>=0?"Custom":""}var k,O,F,q,L,B;function H(t){return t==k.ORNITHOPTER_BASIC||t==k.ORNITHOPTER_FLUTTER||t==k.ORNITHOPTER_BUZZER}!function(t){t[t.AIRPLANE=0]="AIRPLANE",t[t.HELICOPTER=1]="HELICOPTER",t[t.AUTOGYRO=2]="AUTOGYRO",t[t.ORNITHOPTER_BASIC=3]="ORNITHOPTER_BASIC",t[t.ORNITHOPTER_FLUTTER=4]="ORNITHOPTER_FLUTTER",t[t.ORNITHOPTER_BUZZER=5]="ORNITHOPTER_BUZZER"}(k||(k={}));class D{FormatEquipment(t,e,s){return Math.abs(s)>.5?t.push({source:h(e),charge:s.toString()}):s>0&&s<1e-6&&t.push({source:h(e),charge:"-"}),t}}function z(t,e){for(let s=0;s0&&t.push({name:s.name,stats:s.stats.toJSON(),qty:s.qty});return window.localStorage.setItem("CustomParts",JSON.stringify(e)),{part_list:t}}fromJSON(t,e){for(const t of this.custom_parts)t.qty=0;for(const e of t.part_list){const t=this.custom_parts.findIndex((t=>t.name==e.name));-1==t?this.custom_parts.push({name:e.name,stats:new u(e.stats),qty:e.qty}):this.custom_parts[t].qty=e.qty}}serialize(t){const e=[];for(const t of this.custom_parts)t.qty>0&&e.push({name:t.name,stats:t.stats,qty:t.qty});t.PushNum(e.length);for(const s of e)t.PushString(s.name),s.stats.serialize(t),t.PushNum(s.qty)}deserialize(t){for(const t of this.custom_parts)t.qty=0;const e=t.GetNum();for(let i=0;it.name==e));-1==s?(s=this.custom_parts.length,this.custom_parts.push({name:e,stats:i,qty:a})):this.custom_parts[s].qty=a}}IsDefault(){for(const t of this.custom_parts)if(t.qty>0)return!1;return!0}ClearAll(){for(const t of this.custom_parts)t.qty=0}AddPart(t,e){var s=0;if(s+=Math.abs(e.drag),s+=Math.abs(e.mass),s+=Math.abs(e.wetmass),s+=Math.abs(e.bomb_mass),s+=Math.abs(e.cost),s+=Math.abs(e.upkeep),s+=Math.abs(e.liftbleed),s+=Math.abs(e.wingarea),s+=Math.abs(e.control),s+=Math.abs(e.pitchstab),s+=Math.abs(e.latstab),s+=Math.abs(e.maxstrain),s+=Math.abs(e.structure),s+=Math.abs(e.toughness),s+=Math.abs(e.power),s+=Math.abs(e.fuelconsumption),s+=Math.abs(e.fuel),s+=Math.abs(e.charge),s+=Math.abs(e.crashsafety),s+=Math.abs(e.visibility),s+=Math.abs(e.escape),s+=Math.abs(e.reliability),0==(s+=Math.abs(e.warnings.length)))return;const i=this.custom_parts.findIndex((e=>e.name==t));-1!=i?this.custom_parts[i].stats=e:this.custom_parts.push({name:t,stats:e,qty:0}),this.custom_parts.sort(((t,e)=>t.name.localeCompare(e.name))),this.CalculateStats()}RemovePart(t){const e=this.custom_parts.findIndex((e=>e.name==t));-1!=e&&this.custom_parts.splice(e,1),this.CalculateStats()}GetParts(){return this.custom_parts}SetUsedPart(t,e){this.custom_parts[t].qty=e,this.CalculateStats()}PartStats(){var t=new u;for(const e of this.custom_parts)if(e.qty>0){let s=e.stats.Clone();s=s.Multiply(e.qty),t=t.Add(s)}return t}GetElectrics(){var t=[];for(const e of this.custom_parts)e.qty>0&&(t=this.FormatEquipment(t,e.name,e.stats.charge));return{storage:0,equipment:t}}SetCalculateStats(t){this.CalculateStats=t}}class j extends D{constructor(t){super(),this.selected=0,this.vals=[];for(const e of t.options){const t={name:e.name,maxbomb:e.maxbomb,cant_lift:e.cant_lift,stats:new u(e)};this.vals.push(t)}}toJSON(){return{selected:this.selected}}fromJSON(t,e){this.selected=t.selected,e<10.35&&this.selected>2&&this.selected++}serialize(t){t.PushNum(this.selected)}deserialize(t){this.selected=t.GetNum()}GetSelected(){return this.selected}GetSelectedText(){return this.vals[this.selected].name}SetSelected(t){this.selected=t,this.CalculateStats()}GetEraOptions(){return this.vals}GetLiftBleed(){return this.vals[this.selected].stats.liftbleed}GetMaxBomb(){return this.vals[this.selected].maxbomb}GetCantLift(){return this.vals[this.selected].cant_lift}PartStats(){var t=new u;return t.Add(this.vals[this.selected].stats)}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class J extends D{constructor(t,e,s,i){super(),this.stats=new u,this.types=t,this.upgrades=e,this.safety=s,this.gunsights=i,this.selected_type=0,this.selected_upgrades=[...Array(this.upgrades.length).fill(!1)],this.selected_safety=[...Array(this.safety.length).fill(!1)],this.selected_gunsights=[...Array(this.gunsights.length).fill(!1)],this.total_stress=[0,0],this.total_escape=0,this.total_visibility=0,this.seat_index=0,this.bombsight=0,this.is_armed=!1}toJSON(){return{type:this.selected_type,upgrades:this.selected_upgrades,safety:this.selected_safety,sights:this.selected_gunsights,bombsight:this.bombsight}}fromJSON(t,e){this.selected_type=t.type,this.selected_upgrades=b(t.upgrades,this.selected_upgrades.length),this.selected_safety=b(t.safety,this.selected_safety.length),this.selected_gunsights=b(t.sights,this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),e>10.35&&(this.bombsight=t.bombsight)}serialize(t){t.PushNum(this.selected_type),t.PushBoolArr(this.selected_upgrades),t.PushBoolArr(this.selected_safety),t.PushBoolArr(this.selected_gunsights),t.PushNum(this.bombsight)}deserialize(t){this.selected_type=t.GetNum(),this.selected_upgrades=t.GetBoolArr(this.selected_upgrades.length),this.selected_safety=t.GetBoolArr(this.selected_safety.length),this.selected_gunsights=t.GetBoolArr(this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),t.version>10.35&&(this.bombsight=t.GetNum())}GetTypeList(){return this.types}GetUpgradeList(){return this.upgrades}GetSafetyList(){return this.safety}GetGunsightList(){return this.gunsights}GetType(){return this.selected_type}SetType(t){if(t>=this.types.length)throw"Selected type is not in range of actual types.";this.selected_type=t,this.CalculateStats()}GetSelectedUpgrades(){return this.selected_upgrades}SetUpgrade(t,e){if(t>=this.upgrades.length)throw"Selected type is not in range of actual upgrades.";this.selected_upgrades[t]=e,this.CalculateStats()}GetSelectedSafety(){return this.selected_safety}CanSafety(){const t=Array(this.safety.length).fill(!0);return t[5]=!this.types[this.selected_type].exposed,t}SetSafety(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual safties.";this.selected_safety[t]=e,this.CalculateStats()}GetSelectedGunsights(){return this.selected_gunsights}SetGunsight(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual gunsights.";this.selected_gunsights[t]=e,this.CalculateStats()}GetVisibility(){return this.types[this.selected_type].stats.visibility<-10?-1/0:this.total_visibility}GetFlightStress(){return this.total_stress}GetEscape(){return this.total_escape}GetCrash(){return this.total_crash}GetAttack(){var t=0;for(let e=0;e0&&(t=t-t%3+1),this.bombsight=t,this.CalculateStats()}SetHasRotary(t){this.has_rotary=t}IsElectrics(){return 0!=this.stats.charge}IsCopilot(){return this.selected_upgrades[0]}SetArmed(t){this.is_armed=t}GetName(){return this.IsPrimary()?"Crew Pilot":this.bombsight>0?"Crew Bombadier":this.IsCopilot()?"Crew Co-Pilot":this.is_armed?"Crew Gunner":"Crew Aircrew"}PartStats(){let t=new u;t.reqsections=1,t=t.Add(this.types[this.selected_type].stats);for(let e=0;e0&&(t.cost+=Math.floor(2.000001+(this.bombsight-4)/3),t.warnings.push({source:h("Bombsight"),warning:h("Bombsight Warning 1")+this.bombsight.toString()+h("Bombsight Warning 2"),color:c.WHITE}),this.IsCopilot()&&t.warnings.push({source:h("Bombadier Controls"),warning:h("Bombadier Controls Warning"),color:c.WHITE})),this.stats=t.Clone(),this.selected_upgrades[0]?(t.flightstress=this.upgrades[0].stats.flightstress,this.stats.flightstress-=t.flightstress):t.flightstress=0,t}CrewUpdate(t,e,s,i,a,r){this.total_escape=this.stats.escape+t;let n=this.stats.flightstress,o=this.stats.flightstress;(this.IsPrimary()||this.selected_upgrades[0])&&(n+=e,o+=e-2*i),n=Math.max(0,n),o=Math.max(0,o),n+=s,o+=s,this.IsOpen()&&this.has_rotary&&(n+=1,o+=1),n=Math.max(0,n),o=Math.max(0,o),this.total_stress=[n,o],this.total_visibility=this.stats.visibility+a,this.total_crash=this.stats.crashsafety+r}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){var t=[];for(let e=0;et;)this.positions.pop();var e=null;for(this.positions.length>0&&(e=JSON.stringify(this.positions[this.positions.length-1].toJSON()));this.positions.length0}GetConnected(){return this.connected}SetConnected(t){this.connected=t,this.CalculateStats()}PartStats(){const t=new u;return t.reqsections=2*Math.ceil((this.seats+2*this.beds)/5-1e-6),this.seats+this.beds>0&&this.connected&&(t.mass=1,t.warnings.push({source:h("Passengers Section Title"),warning:h("Passenger Connectivity Warning"),color:c.WHITE})),t.bomb_mass+=this.seats+this.beds,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),this.seats+this.beds>0&&t.warnings.push({source:h("Passengers Section Title"),warning:h("Passengers Count",this.seats,this.beds),color:c.WHITE}),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class Z extends D{constructor(t,e){super();const s=x();if(this.elist_idx="Custom",this.etype_stats=s.get(this.elist_idx).get_stats(0),this.etype_inputs=s.get(this.elist_idx).get(0),this.cooling_count=this.etype_stats.stats.cooling,this.radiator_index=-1,this.cooling_count>0&&(this.radiator_index=0),this.num_radiators=0,this.mount_list=t,this.mount_sel=0,this.intake_fan=!1,this.use_pp=!1,this.torque_to_struct=!1,this.cowl_list=e,this.cowl_sel=0,this.use_ds=!1,this.outboard_prop=!1,this.gp_count=0,this.gpr_count=0,this.total_reliability=0,this.is_generator=!1,this.has_alternator=!1,s.get(this.elist_idx).length<=0)throw"No Engine Stats Found. Should be at least one."}toJSON(){return{selected_stats:this.etype_stats.toJSON(),selected_inputs:this.etype_inputs.toJSON(),cooling_count:this.cooling_count,radiator_index:this.radiator_index,selected_mount:this.mount_sel,use_pushpull:this.use_pp,pp_torque_to_struct:this.torque_to_struct,use_driveshafts:this.use_ds,geared_propeller_ratio:this.gp_count,geared_propeller_reliability:this.gpr_count,cowl_sel:this.cowl_sel,is_generator:this.is_generator,has_alternator:this.has_alternator,intake_fan:this.intake_fan,outboard_prop:this.outboard_prop}}oldJSON(t,e){const s=t.selected_stats;if(this.etype_stats.fromJSON(s,e),this.etype_inputs=new A,this.etype_stats.pulsejet&&s.input_pj){this.etype_inputs=new A,this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=w.PULSEJET;const t=s.input_pj;this.etype_inputs.type=t.type,this.etype_inputs.power=t.power,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.quality_cost=t.quality_cost,this.etype_inputs.quality_rely=t.quality_rely,this.etype_inputs.starter=t.starter}else if(s.input_eb){this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=w.PROPELLER;const t=s.input_eb;this.etype_inputs.displacement=t.displacement,this.etype_inputs.compression=t.compression,this.etype_inputs.type=t.type,this.etype_inputs.cyl_per_row=t.cyl_per_row,this.etype_inputs.rows=t.rows,this.etype_inputs.RPM_boost=t.RPM_boost,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.material_fudge=t.material_fudge,this.etype_inputs.quality_fudge=t.quality_fudge,this.etype_inputs.upgrades=t.upgrades,6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.compressor_type,this.etype_inputs.compressor_count=t.compressor_count,this.etype_inputs.min_IdealAlt=t.min_IAF)}else this.etype_stats.altitude=10*this.etype_stats.altitude-1;return this.etype_inputs}fromJSON(t,e){const s=x();let i="";if(e>10.55){this.etype_stats.fromJSON(t.selected_stats,e);const a=new A(t.selected_inputs);i=W(this.etype_stats.name),""==i&&(i="Custom","Default"!=a.name&&s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name)}else{const a=this.oldJSON(t,e);"Default"!=a.name&&(i=W(this.etype_stats.name),""==i&&(i="Custom",s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name))}this.elist_idx=i,this.cooling_count=t.cooling_count,this.radiator_index=t.radiator_index,this.mount_sel=t.selected_mount,this.use_pp=t.use_pushpull,this.torque_to_struct=t.pp_torque_to_struct,this.use_ds=t.use_driveshafts,this.gp_count=t.geared_propeller_ratio,this.gpr_count=t.geared_propeller_reliability,this.cowl_sel=t.cowl_sel,this.is_generator=t.is_generator,this.has_alternator=t.has_alternator,this.intake_fan=t.intake_fan,this.outboard_prop=e>=12.15&&t.outboard_prop}serialize(t){this.etype_stats.serialize(t),this.etype_inputs.serialize(t),t.PushNum(this.cooling_count),t.PushNum(this.radiator_index),t.PushNum(this.mount_sel),t.PushBool(this.use_pp),t.PushBool(this.torque_to_struct),t.PushBool(this.use_ds),t.PushNum(this.gp_count),t.PushNum(this.gpr_count),t.PushNum(this.cowl_sel),t.PushBool(this.is_generator),t.PushBool(this.has_alternator),t.PushBool(this.intake_fan),t.PushBool(this.outboard_prop)}oldDeserialize(t){return this.etype_stats.name=t.GetString(),this.etype_stats.overspeed=t.GetNum(),this.etype_stats.altitude=t.GetNum(),this.etype_stats.torque=t.GetNum(),this.etype_stats.rumble=t.GetNum(),this.etype_stats.oiltank=t.GetBool(),this.etype_stats.pulsejet=t.GetBool(),this.etype_inputs=new A,t.version>10.45?(this.etype_inputs.name=this.etype_stats.name,this.etype_stats.pulsejet?(this.etype_inputs.engine_type=w.PULSEJET,this.etype_inputs.power=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.quality_cost=t.GetNum(),this.etype_inputs.quality_rely=t.GetNum(),this.etype_inputs.starter=t.GetBool()):(this.etype_inputs.displacement=t.GetNum(),this.etype_inputs.compression=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.cyl_per_row=t.GetNum(),this.etype_inputs.rows=t.GetNum(),this.etype_inputs.RPM_boost=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.material_fudge=t.GetNum(),this.etype_inputs.quality_fudge=t.GetNum(),this.etype_inputs.upgrades=t.GetBoolArr(0),6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.GetNum(),this.etype_inputs.compressor_count=t.GetNum(),this.etype_inputs.min_IdealAlt=t.GetNum()))):this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_stats.stats.deserialize(t),this.etype_inputs}deserialize(t){const e=x();var s="";if(t.version>10.55){this.etype_stats.deserialize(t);const i=new A;i.deserialize(t),""==(s=W(this.etype_stats.name))&&(s="Custom","Default"!=i.name&&e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name)}else{const i=this.oldDeserialize(t);"Default"!=i.name&&(""==(s=W(this.etype_stats.name))&&(s="Custom",e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name))}this.cooling_count=t.GetNum(),this.radiator_index=t.GetNum(),this.mount_sel=t.GetNum(),this.use_pp=t.GetBool(),this.torque_to_struct=t.GetBool(),this.use_ds=t.GetBool(),this.gp_count=t.GetNum(),this.gpr_count=t.GetNum(),this.cowl_sel=t.GetNum(),this.is_generator=t.GetBool(),this.has_alternator=t.GetBool(),this.intake_fan=t.GetBool(),t.version>=12.15?this.outboard_prop=t.GetBool():this.outboard_prop=!1,this.elist_idx=s}GetMinAltitude(){return this.etype_inputs.min_IdealAlt}GetMaxAltitude(){return this.GetMinAltitude()+this.etype_stats.altitude}GetMinIAF(){return Math.floor(1e-6+this.GetMinAltitude()/10)}GetMaxIAF(){return Math.floor(1e-6+this.GetMaxAltitude()/10)}CanSelectIndex(){const t=x().get(this.elist_idx),e=[...Array(t.length).fill(!0)];if(this.is_internal)for(let s=0;s0}WarnCoolingReliability(){return this.cooling_count=t&&(this.radiator_index=t-1),this.radiator_index<0&&t>0&&(this.radiator_index=0)}GetNumRadiators(){return this.num_radiators}SetRadiator(t){this.radiator_index=t,this.CalculateStats()}GetRadiator(){return this.radiator_index}CanIntakeFan(){return this.IsAirCooled()}SetIntakeFan(t){this.intake_fan=t,this.CalculateStats()}GetIntakeFan(){return this.intake_fan}CanOutboardProp(){return this.use_ds&&(this.IsTractor()||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}GetOutboardProp(){return this.outboard_prop}SetOutboardProp(t){t&&this.use_ds?this.outboard_prop=!0:this.outboard_prop=!1,this.CalculateStats()}SetSelectedList(t){t!=this.elist_idx&&(this.elist_idx=t,this.SetSelectedIndex(0))}GetSelectedList(){return this.elist_idx}GetListOfEngines(){return x().get(this.elist_idx)}RequiresExtendedDriveshafts(){return!this.is_internal&&this.mount_list[this.mount_sel].reqED}SetTailMods(t,e,s){!this.mount_list[this.mount_sel].reqTail||t||e||this.GetGenerator()||(this.use_ds=!0),!this.mount_list[this.mount_sel].reqED||this.GetGenerator()||s&&(t||e)||(this.use_ds=!0)}CanMountIndex(){var t=[...Array(this.mount_list.length).fill(!0)];if(this.is_internal)for(let e=0;e=this.mount_list.length)throw"Index outside of mount_list range.";this.mount_sel=t,this.mount_list[this.mount_sel].reqED?this.SetUseExtendedDriveshaft(!0):this.CalculateStats()}GetMountIndex(){return this.GetIsPulsejet()?-1:this.mount_sel}CanUsePushPull(){return!(this.is_generator||this.GetIsJet()||this.is_internal||this.mount_list[this.mount_sel].helicopter)}SetUsePushPull(t){this.use_pp=t,t?(this.cooling_count*=2,"fuselage"==this.mount_list[this.mount_sel].mount_type&&(this.mount_sel=8)):(this.cooling_count=Math.floor(1e-6+this.cooling_count/2),"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(this.mount_sel=0)),this.CalculateStats()}GetUsePushPull(){return this.use_pp}GetMountList(){return this.mount_list}CanUseExtendedDriveshaft(){return!(0==this.GetNumPropellers()||this.is_internal||this.GetGenerator()||this.mount_list[this.mount_sel].helicopter)}SetUseExtendedDriveshaft(t){this.GetGenerator()||this.is_internal?this.use_ds=!1:this.use_ds=t,this.CalculateStats()}GetUseExtendedDriveshaft(){return this.use_ds}CanUseGears(){return!(0==this.GetNumPropellers()||this.GetGenerator())}SetGearCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gp_count=t,this.SetGearReliability(this.gpr_count)}GetGearCount(){return this.gp_count}SetGearReliability(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gpr_count=Math.min(t,this.gp_count),this.CalculateStats()}GetGearReliability(){return this.gpr_count}SetTorqueToStruct(t){this.torque_to_struct=t,this.use_pp||(this.torque_to_struct=!1),this.CalculateStats()}GetTorqueToStruct(){return this.torque_to_struct}CanTorqueToStruct(){return this.use_pp&&this.etype_stats.torque>0&&"pod"!=this.mount_list[this.mount_sel].mount_type}UpdateReliability(t){this.total_reliability=this.etype_stats.stats.reliability,this.total_reliability-=this.gp_count-this.gpr_count,this.total_reliability+=this.cowl_list[this.cowl_sel].stats.reliability,this.NeedCooling()&&(this.total_reliability-=this.GetMaxCooling()-this.cooling_count),this.GetIntakeFan()&&(this.total_reliability+=6),this.total_reliability+=t}GetReliability(){return this.use_pp?this.outboard_prop?this.total_reliability.toString()+"/"+(this.total_reliability-2).toString():this.total_reliability.toString()+"/"+this.total_reliability.toString():this.outboard_prop?(this.total_reliability-2).toString():this.total_reliability.toString()}GetOverspeed(){return this.is_generator?1e3:this.etype_stats.overspeed+Math.floor(1e-6+this.gp_count*this.etype_stats.overspeed/2)}GetIsPulsejet(){return this.etype_stats.pulsejet}GetIsJet(){return this.GetIsPulsejet()||this.GetIsTurbine()&&!this.GetIsTurboprop()}PulseJetCheck(){this.GetIsPulsejet()&&(this.use_pp=!1,this.use_ds=!1,this.gp_count=0,this.gpr_count=0,this.cooling_count=0,this.has_alternator=!1,this.is_generator=!1,this.cowl_sel=0,this.radiator_index=-1)}GetIsTurbine(){return this.etype_inputs.engine_type==w.TURBOMACHINERY}GetIsTurboprop(){return this.etype_inputs.engine_type==w.TURBOMACHINERY&&3==this.etype_inputs.type}TurbineCheck(){this.GetIsTurbine()&&(0==this.GetNumPropellers()&&(this.use_ds=!1,this.gp_count=0,this.gpr_count=0),this.cooling_count=0,this.cowl_sel=0,this.radiator_index=-1)}GetNumPropellers(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.GetGenerator())||this.GetIsTurboprop()||this.is_internal?this.use_pp?2:1:0}GetIsTractorNacelle(){return this.GetNumPropellers()>0&&!this.GetUsePushPull()&&.8==this.mount_list[this.mount_sel].powerfactor&&!this.is_internal}IsLiquidCooled(){return this.NeedCooling()}IsRotary(){return this.etype_stats.oiltank}IsContraRotary(){return!this.GetIsPulsejet()&&!this.GetIsTurbine()&&""!=this.elist_idx&&3==this.etype_inputs.type}IsAirCooled(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.IsLiquidCooled()||this.IsRotary())}GetCowlList(){return this.cowl_list}GetCowl(){return this.cowl_sel}GetCowlEnabled(){const t=[];for(const e of this.cowl_list)this.GetIsPulsejet()||this.GetIsTurbine()?t.push(e.air&&e.rotary&&e.liquid):this.IsLiquidCooled()?t.push(e.liquid):this.IsRotary()?t.push(e.rotary):t.push(e.air);return t}GetHasOilTank(){return this.etype_stats.oiltank}GetHasOilCooler(){return this.etype_stats.stats.cooling>0}GetHasOilPan(){return this.IsAirCooled()}VerifyCowl(t){const e=this.GetCowlEnabled();e[t]&&(this.cowl_sel=t),e[this.cowl_sel]||(this.cowl_sel=0)}SetCowl(t){this.VerifyCowl(t),this.CalculateStats()}GetGeneratorEnabled(){return!(this.GetIsPulsejet()||this.use_pp||this.GetIsElectric())}GetGenerator(){return this.is_generator}SetGenerator(t){this.GetGeneratorEnabled()?this.is_generator=t:this.is_generator=!1,this.is_generator&&(this.gp_count=0,this.gpr_count=0,this.use_ds=!1,this.use_pp=!1),this.CalculateStats()}GetIsElectric(){return this.etype_inputs.engine_type==w.ELECTRIC}GetAlternatorEnabled(){return!(this.GetIsPulsejet()||this.is_generator||this.GetIsElectric())}GetAlternator(){return this.has_alternator}SetAlternator(t){this.GetAlternatorEnabled()?this.has_alternator=t:this.has_alternator=!1,this.CalculateStats()}GetRumble(){return this.etype_stats.rumble}IsTractor(){return!(this.is_internal||this.GetGenerator()||"Tractor"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetTractorSpinner(){return{has:this.IsTractor()&&!(this.outboard_prop&&!this.use_pp),spinner:this.GetSpinner()}}IsPusher(){return!(this.is_internal||this.GetGenerator()||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetPusherSpinner(){return{has:this.IsPusher()&&!this.outboard_prop,spinner:this.GetSpinner()}}GetSpinner(){if(this.gp_count>0&&!this.GetGenerator()){if(this.use_ds&&("Center-Mounted Tractor"==this.mount_list[this.mount_sel].name||"Center-Mounted Pusher"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name))return[!0,!0];if(!this.etype_stats.oiltank)return[!0,!1]}return[!1,!1]}IsElectrics(){return this.has_alternator||this.GetGenerator()}GetEngineHeight(){return this.GetGenerator()?5:"Pod"==this.mount_list[this.mount_sel].name||this.etype_stats.pulsejet||this.is_internal||this.outboard_prop?2:"Nacelle (Offset)"==this.mount_list[this.mount_sel].name?1:"Nacelle (Inside)"==this.mount_list[this.mount_sel].name||"Channel Tractor"==this.mount_list[this.mount_sel].name||"Wing Pod"==this.mount_list[this.mount_sel].name?0:-1}IsTractorRotary(){return!this.GetGenerator()&&this.IsRotary()&&("Tractor"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}IsDiesel(){return this.etype_inputs.upgrades[3]}SetCalculateStats(t){this.CalculateStats=t}SetInternal(t){this.is_internal=t,t&&(this.use_ds=!1)}VerifyMount(){if(this.GetIsTurbine()&&!this.GetIsTurboprop())for(;!this.mount_list[this.mount_sel].turbine;)this.mount_sel++;else if(this.GetIsPulsejet()){if("fuselage"==this.mount_list[this.mount_sel].mount_type)for(let t=0;t0&&t.era.push({name:"Propeller Gearing",era:"WWI"}),this.gpr_count>0&&t.era.push({name:"Reliable Gearing",era:"Roaring 20s"}),this.use_ds&&(t.mass+=1),t=t.Add(this.cowl_list[this.cowl_sel].stats),t.mass+=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].mpd),t.drag=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].ed),this.use_pp&&(t.power*=2,t.mass*=2,t.cooling*=2,t.fuelconsumption*=2,t.cost*=2,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.upkeep*=2,t.reqsections*=2,t.charge*=2,t.power=Math.floor(1e-6+this.mount_list[this.mount_sel].powerfactor*t.power)),"No Cowling"==this.cowl_list[this.cowl_sel].name||"Sealed Cowl"==this.cowl_list[this.cowl_sel].name||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name||(t.cost+=2),this.IsAirCooled()&&this.intake_fan?(t.mass+=3,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.cost+=4,t.era.push({name:"Air Cooling Fan",era:"WWII"})):this.intake_fan=!1,this.GetHasOilCooler()&&(t.drag+=Math.floor(t.power/15)),this.GetIsPulsejet()||(t=t.Add(this.mount_list[this.mount_sel].stats),t.maxstrain-=Math.floor(1e-6+this.mount_list[this.mount_sel].strainfactor*this.etype_stats.stats.mass),t.drag+=Math.floor(1e-6+this.mount_list[this.mount_sel].dragfactor*this.etype_stats.stats.mass)),this.is_generator?(t.charge=Math.floor(1e-6+2*t.power/10)+2,t.power=0,t.visibility=2):this.has_alternator&&(t.charge=Math.floor(1e-6+t.power/10)+1,t.mass+=1,t.cost+=2,this.use_pp&&"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(t.mass+=1,t.cost+=2)),this.outboard_prop&&(t.drag+=3,this.use_pp&&(t.escape+=2)),this.is_first_pulsejet&&(t.cost+=5),t.pitchspeed=0,t.reliability=0,t}GetElectrics(){return{storage:0,equipment:[]}}}class X extends D{constructor(t,e,s){super(),this.need_cool=0,this.idx_type=1,this.idx_mount=1,this.idx_coolant=0,this.metal_area=0,this.engine_count=0,this.type_list=t,this.mount_list=e,this.coolant_list=s,this.harden_cool=!1}toJSON(){return{type:this.idx_type,mount:this.idx_mount,coolant:this.idx_coolant,harden_cool:this.harden_cool}}fromJSON(t,e){this.idx_type=t.type,this.idx_mount=t.mount,this.idx_coolant=t.coolant,e>10.85&&(this.harden_cool=t.harden_cool)}serialize(t){t.PushNum(this.idx_type),t.PushNum(this.idx_mount),t.PushNum(this.idx_coolant),t.PushBool(this.harden_cool)}derserialize(t){this.idx_type=t.GetNum(),this.idx_mount=t.GetNum(),this.idx_coolant=t.GetNum(),t.version>10.85&&(this.harden_cool=t.GetBool())}GetTypeList(){return this.type_list}GetMountList(){return this.mount_list}GetCoolantList(){return this.coolant_list}CanType(){const t=[...Array(this.type_list.length).fill(!0)];for(let e=0;et;)this.engines.pop();var e=null;for(this.engines.length>0&&(e=JSON.stringify(this.engines[this.engines.length-1].toJSON()));this.engines.lengtht;)this.radiators.pop();for(;this.radiators.length0&&!this.NeedCooling()&&this.SetNumberOfRadiators(0),this.radiators.length}NeedCooling(){let t=!1;for(const e of this.engines)t=t||e.NeedCooling();return t}UpdateReliability(t){for(const e of this.engines){let s=new u;e.GetRadiator()=0&&(s=this.radiators[e.GetRadiator()].PartStats()),e.UpdateReliability(t.reliability+s.reliability)}}SetAsymmetry(t){this.is_asymmetric=t,this.CalculateStats()}GetAsymmetry(){return this.is_asymmetric}GetNumPropellers(){var t=0;for(const e of this.engines)t+=e.GetNumPropellers();return t}GetOverspeed(){let t=100;for(const e of this.engines)t=Math.min(t,e.GetOverspeed());return t}GetRumble(){var t=0;for(const e of this.engines)t+=e.GetRumble();return t}GetMaxRumble(){var t=0;for(const e of this.engines)t=Math.max(t,e.GetRumble());return t}GetTractorSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetTractorSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}GetPusherSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetPusherSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}IsElectrics(){for(const t of this.engines)if(t.IsElectrics())return!0;return!1}HaveParasol(t){for(const e of this.radiators)e.SetParasol(t)}SetMetalArea(t){for(const e of this.radiators)e.SetMetalArea(t)}SetTailMods(t,e,s){for(const i of this.engines)i.SetTailMods(t,e,s)}GetEngineHeight(){var t=2;for(const e of this.engines)t=Math.min(t,e.GetEngineHeight());return t}HasTractorRotary(){for(const t of this.engines)if(t.IsTractorRotary())return!0;return!1}SetInternal(t){for(const e of this.engines)e.SetInternal(t);if(t)for(const t of this.radiators)t.SetMetalArea(0),t.SetParasol(!1)}HasPulsejet(){for(const t of this.engines)if(t.GetIsPulsejet())return!0;return!1}HasTurbineNoProp(){for(const t of this.engines)if(t.GetIsTurbine()&&0==t.GetNumPropellers())return!0;return!1}HasDiesel(){for(const t of this.engines)if(t.IsDiesel())return!0;return!1}GetEngineTypes(){var t=[];for(const e of this.engines)e.GetNumPropellers()>0?t.push({type:P.PROPELLER,num:e.GetNumPropellers()}):e.GetIsPulsejet()?t.push({type:P.PULSEJET,num:0}):e.GetIsTurbine()&&t.push({type:P.TURBINE,num:e.GetCurrentStats().stats.pitchspeed});return t}GetIsFlammable(){for(const t of this.radiators)if(t.GetIsFlammable())return!0;return!1}PartStats(){var t=new u;const e=new Array(this.GetNumberOfRadiators()).fill(null).map((()=>({cool:0,count:0})));var s=0,i=100,a=!1,n=2;for(let r of this.engines){!a&&r.GetIsPulsejet()?(a=!0,r.SetFirstPulsejet(!0)):r.SetFirstPulsejet(!1);const o=r.PartStats();n=Math.min(n,o.visibility),t=t.Add(o),r.NeedCooling()&&(e[r.GetRadiator()].cool+=r.GetCooling(),e[r.GetRadiator()].count+=1),s+=r.GetCurrentStats().stats.cost,o.pitchspeed>0&&(i=Math.min(i,o.pitchspeed))}t.visibility=n,i<100&&(t.pitchspeed=i),t.upkeep=Math.floor(1e-6+Math.min(t.upkeep,s));let o=new u;const l=new Map;for(let t=0;t0?t.warnings.push({source:h("Rotary"),warning:h("Rotary Right Warning"),color:c.WHITE}):_<0&&t.warnings.push({source:h("Rotary"),warning:h("Rotary Left Warning"),color:c.WHITE}),t.reliability=0,t}SetCalculateStats(t){this.CalculateStats=t}GetHasTractorNacelles(){let t=0;for(const e of this.engines)e.GetIsTractorNacelle()&&t++;return t>1}GetElectrics(){let t={storage:0,equipment:[]};for(let e=0;e10.25&&(this.sel_skin=t.sel_skin),this.interal_bracing_count=this.CountInternalBracing()}serialize(t){t.PushNum(this.section_list.length);for(let e=0;e10.25&&(this.sel_skin=t.GetNum()),this.interal_bracing_count=this.CountInternalBracing()}DuplicateSection(t,e=1){const s=this.section_list[t];for(let i=0;ithis.CountSections()+this.tail_section_list.length)for(let t=this.section_list.length-1;t>=0;t--)if(this.section_list[t].internal_bracing){this.interal_bracing_count--,this.section_list.splice(t,1);break}e&&this.CalculateStats()}}SetRequiredSections(t){if(this.required_sections=t,this.required_sections>this.CountSections()&&(0==this.section_list.length&&this.section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),this.required_sections-this.CountSections()>0))for(let t=this.section_list.length-1;t>=0;t--)if(!this.section_list[t].internal_bracing)return void this.DuplicateSection(t,this.required_sections-this.CountSections())}SetRequiredTailSections(t){for(t>this.tail_section_list.length&&(0==this.tail_section_list.length&&this.tail_section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),t-this.tail_section_list.length>0&&this.DuplicateTailSection(this.tail_section_list.length-1,t-this.tail_section_list.length));t0&&!this.section_list[t].internal_bracing;t--);this.DeleteSection(t,!1)}this.CalculateStats()}CountSections(){return this.section_list.length-this.interal_bracing_count}GetNumFrames(){return this.CountSections()+this.tail_section_list.length}CountInternalBracing(){var t=0;for(const e of this.section_list)e.internal_bracing&&t++;return t}BaseType(){const t=[...Array(this.frame_list.length).fill(0)];for(const e of this.section_list)e.internal_bracing||t[e.frame]++;for(const e of this.tail_section_list)e.internal_bracing||t[e.frame]++;var e=0,s=0;for(let i=t.length-1;i>=0;i--)t[i]>s&&(s=t[i],e=i);return e}GetFrameList(){return this.frame_list}GetSkinList(){return this.skin_list}GetSectionList(){return this.section_list}SetFrame(t,e){this.section_list[t].frame=e,this.frame_list[e].geodesic||(this.section_list[t].geodesic=!1),this.CalculateStats()}SetGeodesic(t,e){this.frame_list[this.section_list[t].frame].geodesic&&(this.section_list[t].geodesic=e,this.CalculateStats())}SetMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].monocoque=e,this.CalculateStats())}SetLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].lifting_body=e,this.CalculateStats())}SetInternalBracing(t,e){e&&!this.section_list[t].internal_bracing&&this.PossibleInternalBracing(!0)&&this.CountSections()>this.required_sections?(this.section_list[t].internal_bracing=!0,this.section_list[t].monocoque=!1,this.section_list[t].lifting_body=!1,this.interal_bracing_count++,this.CalculateStats()):e||(this.section_list[t].internal_bracing=!1,this.interal_bracing_count--,this.CalculateStats())}PossibleInternalBracing(t=!1){var e=this.CountSections();return this.farman||(e+=this.tail_section_list.length),t&&(e-=1),this.interal_bracing_count+1<=e}PossibleGeodesic(t){return this.frame_list[this.section_list[t].frame].geodesic&&!this.section_list[t].monocoque}PossibleMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].lifting_body}PossibleLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].monocoque}PossibleTailGeodesic(t){return this.frame_list[this.tail_section_list[t].frame].geodesic&&!this.tail_section_list[t].monocoque}PossibleTailMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].lifting_body}PossibleTailLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].monocoque}PossibleRemoveSections(){return this.CountSections()>this.required_sections}GetFarmanOrBoom(){return this.farman||this.boom}SectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),t.internal_bracing||(e.drag+=4,t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}TailSectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),e.drag+=4,this.farman||(t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}CountMainLiftingBody(){var t=0;for(const e of this.section_list)e.lifting_body&&t++;return t}CountTailLiftingBody(){var t=0;for(const e of this.tail_section_list)e.lifting_body&&t++;return t}CountLiftingBody(){return this.CountMainLiftingBody()+this.CountTailLiftingBody()}SetIsTandem(t){this.is_tandem!=t&&(this.is_tandem=t,this.SetTailType(this.sel_tail))}SetTailType(t){0==this.tail_list[t].stats.reqsections&&this.is_tandem&&t++,this.sel_tail=t,this.SetRequiredTailSections(this.tail_list[t].stats.reqsections)}GetTailType(){return this.sel_tail}GetTailList(){return this.tail_list}GetTailSectionList(){return this.tail_section_list}SetUseFarman(t){if(this.farman=t,t&&this.boom&&(this.boom=!1),this.farman)for(const t of this.tail_section_list)t.monocoque=!1,t.lifting_body=!1;this.CalculateStats()}GetUseFarman(){return this.farman}SetUseBoom(t){this.boom=t,t&&this.farman&&(this.farman=!1),this.CalculateStats()}GetUseBoom(){return this.boom}SetTailFrame(t,e){this.tail_section_list[t].frame=e,this.frame_list[e].geodesic||(this.tail_section_list[t].geodesic=!1),this.CalculateStats()}SetTailGeodesic(t,e){this.frame_list[this.tail_section_list[t].frame].geodesic&&(this.tail_section_list[t].geodesic=e,this.CalculateStats())}SetTailMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].monocoque=e,this.CalculateStats())}SetTailLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].lifting_body=e,this.CalculateStats())}SetHasTractorNacelles(t){this.has_tractor_nacelles=t}GetHasTractorNacelles(){return this.has_tractor_nacelles}CanFlyingWing(){for(const t of this.section_list)if(t.lifting_body)return!0;for(const t of this.tail_section_list)if(t.lifting_body)return!0;return!1}GetFlyingWing(){return this.flying_wing}SetFlyingWing(t){t&&this.CanFlyingWing()?this.flying_wing=!0:this.flying_wing=!1,this.CalculateStats()}GetIsTailless(){return 0==this.tail_section_list.length}SetAllFrame(t){for(const e of this.section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);for(const e of this.tail_section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);this.CalculateStats()}SetAllSkin(t){this.sel_skin=t;for(const e of this.section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);for(const e of this.tail_section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);this.CalculateStats()}GetArmor(){return"Dragon Skin"==this.skin_list[this.sel_skin].name?5:0}GetIsFlammable(){return!!this.skin_list[this.sel_skin].flammable}GetSkin(){return this.sel_skin}CanCutout(){let t=this.section_list.length*this.skin_list[this.sel_skin].stats.visibility;return this.farman?t+=this.tail_section_list.length:t+=this.tail_section_list.length*this.skin_list[this.sel_skin].stats.visibility,t<3}SetCalculateStats(t){this.CalculateStats=t}PartStats(){this.CanFlyingWing()||(this.flying_wing=!1);var t=new u;const e=this.BaseType();t.structure=this.frame_list[e].basestruct,t.cost=this.frame_list[e].basecost;var s=this.skin_list[this.sel_skin].monocoque_structure<0;for(const e of this.section_list)t=t.Add(this.SectionStats(e)),s=s&&(e.internal_bracing||e.monocoque);var i=new u;for(const t of this.tail_section_list)i=i.Add(this.TailSectionStats(t)),this.farman||(s=s&&(t.internal_bracing||t.monocoque));s&&(t.structure+=30),t=t.Add(this.tail_list[this.sel_tail].stats),this.boom&&(i.maxstrain-=i.mass,this.has_tractor_nacelles||(i.drag=Math.floor(1e-6+1.5*i.drag))),this.farman?(t.drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor,t.visibility+=this.tail_section_list.length,i.mass=Math.floor(1e-6+.5*i.mass),t=t.Add(i)):((t=t.Add(i)).drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor);const a=this.CountLiftingBody();return t.cost+=a,this.flying_wing?t.liftbleed+=5:t.drag+=a,this.PossibleRemoveSections()&&this.CountMainLiftingBody()11.15)this.wing_list=t.wing_list,this.mini_wing_list=t.mini_wing_list;else{const e=t.wing_list;this.wing_list=this.OldtoNew(e);const s=t.mini_wing_list;this.mini_wing_list=this.OldtoNew(s)}this.wing_stagger=t.wing_stagger,this.is_swept=t.is_swept,this.is_closed=t.is_closed}OldtoNew(t){const e=[];for(const s of t)e.push({surface:s.surface,area:s.area,span:s.span,anhedral:s.anhedral,dihedral:s.dihedral,gull:!1,deck:s.deck});return e}serialize(t){t.PushNum(this.wing_list.length);for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.wing_list.push(e)}const s=t.GetNum();this.mini_wing_list=[];for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.mini_wing_list.push(e)}this.wing_stagger=t.GetNum(),this.is_swept=t.GetBool(),this.is_closed=t.GetBool()}SetRotorSpan(t){this.rotor_span=t}GetWingList(){return this.wing_list}GetMiniWingList(){return this.mini_wing_list}GetSkinList(){return this.skin_list}GetStaggerList(){return this.stagger_list}GetDeckList(){return this.deck_list}DeckCountFull(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.wing_list)t[e.deck]++;return t}DeckCountMini(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.mini_wing_list)t[e.deck]++;return t}CanStagger(){const t=[...Array(this.stagger_list.length).fill(!1)];if(this.acft_type==k.ORNITHOPTER_FLUTTER)this.wing_list.length>1?t[1]=!0:t[0]=!0;else{if(this.wing_list.length>1)for(let e=1;e1?this.wing_stagger=1:this.wing_stagger=0)}SetStagger(t){for(this.wing_stagger=t;this.stagger_list[t].wing_count=0;e--){const s=this.wing_list[e];t[s.deck]>1&&this.deck_list[s.deck].limited&&(t[s.deck]--,this.wing_list.splice(e,1))}}this.CalculateStats()}GetStagger(){return this.wing_list.length>0?this.wing_stagger:-1}CanAddFullWing(t){if(t>=this.deck_list.length&&console.log("Deck out of Bounds"),!this.stagger_list[this.wing_stagger].inline){if(t==O.SHOULDER&&this.HasPolishWing())return!1;if(this.DeckCountFull()[t]==O.SHOULDER&&this.deck_list[t].limited)return!1}return 0==this.DeckCountMini()[t]}CanAddMiniWing(t){const e=this.DeckCountFull(),s=this.DeckCountMini();return 0==e[t]&&0==s[t]}CanMoveFullWing(t,e){const s=this.wing_list[t];this.wing_list.splice(t,1);const i=this.CanAddFullWing(e);return this.wing_list.splice(t,0,s),i}CanMoveMiniWing(t,e){const s=this.mini_wing_list[t];this.mini_wing_list.splice(t,1);const i=this.CanAddMiniWing(e);return this.mini_wing_list.splice(t,0,s),i}GetWingHeight(){let t=0;for(const e of this.wing_list)t=Math.max(t,4-e.deck);return t}CanClosed(){return this.wing_list.length>1}SetClosed(t){this.wing_list.length>0?this.is_closed=t:this.is_closed=!1,this.CalculateStats()}GetClosed(){return this.is_closed}CanSwept(){return this.wing_list.length>0}SetSwept(t){this.wing_list.length>0?this.is_swept=t:this.is_swept=!1,this.CalculateStats()}GetSwept(){return this.is_swept}GetTandem(){return this.stagger_list[this.wing_stagger].inline&&this.wing_list.length>1}GetMonoplane(){return 1==this.wing_list.length}GetStaggered(){return 0!=this.stagger_list[this.wing_stagger].stats.liftbleed}SetFullWing(t,e){this.wing_list.length!=t&&this.wing_list.splice(t,1),e.area!=e.area&&(e.area=3),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,3),e.span=Math.max(e.span,1),this.CanAddFullWing(e.deck)&&this.wing_list.splice(t,0,e)),this.wing_list.length>1&&0==this.wing_stagger?this.wing_stagger=4:this.wing_list.length<=1&&(this.wing_stagger=0),e.dihedral=Math.floor(1e-6+e.dihedral),e.anhedral=Math.floor(1e-6+e.anhedral),e.dihedral=Math.max(0,Math.min(e.dihedral,e.span-1)),e.anhedral=Math.max(0,Math.min(e.anhedral,e.span-1-e.dihedral)),this.CalculateStats()}SetMiniWing(t,e){this.mini_wing_list.length!=t&&this.mini_wing_list.splice(t,1),e.area!=e.area&&(e.area=2),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,1),e.area=Math.min(e.area,2),e.span=Math.max(e.span,1),this.CanAddMiniWing(e.deck)&&this.mini_wing_list.splice(t,0,e)),this.CalculateStats()}HasNonGullDeck(t){for(const e of this.wing_list)if(e.deck==t&&!e.gull)return!0;return!1}CanGull(t){if(t==O.PARASOL){if(!this.GetTandem()&&this.HasNonGullDeck(O.SHOULDER))return!1}else{if(t==O.SHOULDER)return!1;if(!this.GetTandem()&&this.HasNonGullDeck(t-1))return!1}return!0}IsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}NeedHStab(){return this.stagger_list[this.wing_stagger].hstab}NeedTail(){return this.NeedHStab()||!this.is_swept}GetSpan(){let t=0;for(const e of this.wing_list){const s=e.span;t=Math.max(t,s)}for(const e of this.mini_wing_list){const s=e.span;t=Math.max(t,s)}return t}GetArea(){let t=0;for(const e of this.wing_list)t+=e.area;for(const e of this.mini_wing_list)t+=e.area;return t}GetParasol(){for(const t of this.wing_list)if(t.deck==O.PARASOL)return!0;for(const t of this.mini_wing_list)if(t.deck==O.PARASOL)return!0;return!1}GetMetalArea(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].metal&&(t+=e.area);for(const e of this.mini_wing_list)this.skin_list[e.surface].metal&&(t+=e.area);return t}GetWingDrag(){let t=0;const e=this.DeckCountFull();let s=0,i=0;for(const a of this.wing_list){const r=a.span;let n=a.area;s=Math.max(s,r),a.gull&&(n=Math.floor(1e-6+1.1*n));let o=Math.max(1,6*n*n/(r*r));o=Math.max(1,o*this.skin_list[a.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&e[a.deck]>1&&(o=Math.floor(1e-6+.75*o),o=Math.max(1,o)),o=Math.floor(1e-6+o),s==r&&(i=i),t+=o}for(const e of this.mini_wing_list){const s=e.span;let i=Math.max(1,6*e.area*e.area/(s*s));i=Math.max(1,i*this.skin_list[e.surface].dragfactor),i=Math.floor(1e-6+i),t+=i}const a=this.GetIsSesquiplane();return(a.is||this.GetMonoplane())&&-1!=a.deck&&(t-=Math.floor(1e-6+(1-this.long_list[a.deck].dragfactor)*i)),t}GetIsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}SetAircraftMass(t){this.plane_mass=t}GetPaperMass(){let t=0;for(const e of this.wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}for(const e of this.mini_wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}return Math.max(-Math.floor(1e-6+.25*this.plane_mass),t)}GetIsSesquiplane(){let t=0,e=-1,s=0,i=1e100,a=0;for(const r of this.wing_list)r.area>t?(t=r.area,e=r.deck,s=r.span):r.area==t&&(e=-1),i>r.area&&(i=r.area,a=r.span);let r=t>=2*i;return r=r&&!this.GetMonoplane()&&!this.GetTandem(),r?{is:r,deck:e,super_small:.75*s>=a}:{is:!1,deck:e,super_small:!1}}HasPolishWing(){for(const t of this.wing_list)if(t.deck==O.PARASOL&&1==t.gull)return!0;return!1}HasInvertedGull(){let t=-1;for(const e of this.wing_list)e.gull&&e.deck>O.SHOULDER&&(t=Math.max(t,e.deck));return t}CanCutout(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].transparent&&(t+=1);return t<3}PartStats(){this.CanClosed()||(this.is_closed=!1),this.CanSwept()||(this.is_swept=!1);var t=new u;let e=!1;const s=this.DeckCountFull();let i=!1,a=this.rotor_span,r=0,n=0;for(let i of this.wing_list){this.CanGull(i.deck)||(i.gull=!1),a=Math.max(a,i.span),e?(t.control+=3,t.liftbleed+=5,t.visibility-=1):e=!0;let o=new u;o=o.Add(this.skin_list[i.surface].stats.Multiply(i.area)),o.wingarea=i.area,o.maxstrain+=Math.min(0,-(2*i.span+i.area-10)),this.acft_type==k.ORNITHOPTER_BUZZER&&(o.maxstrain+=Math.min(0,-(2*i.span+i.area-10))),o.maxstrain*=this.skin_list[i.surface].strainfactor,this.skin_list[i.surface].transparent&&n<3&&(o.visibility+=1,n+=1);const l=i.span;let h=i.area;i.gull&&(h=Math.floor(1e-6+1.1*h));const c=Math.max(1,6*h*h/(l*l));o.drag=o.drag+c,o.drag=Math.max(1,o.drag*this.skin_list[i.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&s[i.deck]>1&&(o.drag=Math.floor(1e-6+.75*o.drag),o.drag=Math.max(1,o.drag)),t=t.Add(this.deck_list[i.deck].stats),o.latstab+=i.dihedral-i.anhedral,o.liftbleed+=i.dihedral+i.anhedral,o.Round(),a==i.span&&(r=o.drag),o.mass<0&&(o.mass=0),t=t.Add(o)}for(const e of this.mini_wing_list){a=Math.max(a,e.span),t.control+=1,i?t.liftbleed+=1:i=!0;const s=this.skin_list[e.surface].stats.Multiply(e.area);s.wingarea=e.area,s.maxstrain+=Math.min(0,-(2*e.span+e.area-10)),s.maxstrain*=this.skin_list[e.surface].strainfactor;const r=e.span;s.drag=Math.max(1,s.drag+6*e.area*e.area/(r*r)),s.drag=Math.max(1,s.drag*this.skin_list[e.surface].dragfactor),s.latstab+=e.dihedral-e.anhedral,s.liftbleed+=e.dihedral+e.anhedral,s.Round(),s.mass<0&&(s.mass=0),t=t.Add(s)}t.control+=8-a,t.latstab+=Math.min(0,a-8);const o=this.GetIsSesquiplane();if((o.is||this.GetMonoplane())&&-1!=o.deck&&((t=t.Add(this.long_list[o.deck].stats)).drag-=Math.floor(1e-6+(1-this.long_list[o.deck].dragfactor)*r)),o.is&&(t.liftbleed-=2,t.control+=2),this.stagger_list[this.wing_stagger].inline)for(const e of s)e>1&&(t.liftbleed+=3*(e-1));switch(this.HasPolishWing()&&(t.visibility+=1,t.maxstrain+=10),this.HasInvertedGull()){case 1:case 2:case 3:break;case 4:t.maxstrain+=10,t.crashsafety+=1}if((this.HasInvertedGull()>0||this.HasPolishWing())&&t.era.push({name:"Gull Wing",era:"Coming Storm"}),this.is_swept&&(t.liftbleed+=5,t.latstab--),this.is_closed){const e=Math.floor(1e-6+this.wing_list.length/2);t.mass+=1*e,t.control-=5*e,t.maxstrain+=20*e}return this.wing_list.length>1&&(t=t.Add(this.stagger_list[this.wing_stagger].stats)),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){const t={storage:0,equipment:[]};let e=0,s="";for(const t of this.wing_list){const i=this.skin_list[t.surface];0!=i.stats.charge&&(s=h(i.name),e+=i.stats.charge*t.area,e=Math.floor(1e-6+e))}return 0!=e&&t.equipment.push({source:s,charge:e.toString()}),t}}class et extends D{constructor(t){super(),this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.is_heli=!1,this.hstab_sel=0,this.hstab_count=1,this.hstab_list=[];for(const e of t.hstab)this.hstab_list.push({name:e.name,is_canard:e.is_canard,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail});this.vstab_sel=0,this.vstab_count=1,this.vstab_list=[];for(const e of t.vstab)this.vstab_list.push({name:e.name,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail})}toJSON(){return{hstab_sel:this.hstab_sel,hstab_count:this.hstab_count,vstab_sel:this.vstab_sel,vstab_count:this.vstab_count}}fromJSON(t,e){this.hstab_sel=t.hstab_sel,this.hstab_count=t.hstab_count,this.vstab_sel=t.vstab_sel,this.vstab_count=t.vstab_count}serialize(t){t.PushNum(this.hstab_sel),t.PushNum(this.hstab_count),t.PushNum(this.vstab_sel),t.PushNum(this.vstab_count)}deserialize(t){this.hstab_sel=t.GetNum(),this.hstab_count=t.GetNum(),this.vstab_sel=t.GetNum(),this.vstab_count=t.GetNum()}IsDefault(){return 0==this.hstab_sel&&1==this.hstab_count&&0==this.vstab_sel&&1==this.vstab_count}GetHStabList(){return this.hstab_list}GetVStabList(){return this.vstab_list}GetHStabType(){return this.hstab_sel}SetHStabType(t){("The Wings"!=this.hstab_list[t].name||this.is_tandem||this.is_swept)&&(this.hstab_list[t].is_vtail?this.SetVTail():this.hstab_list[this.hstab_sel].is_vtail&&(this.vstab_sel=0,this.vstab_count=1),this.hstab_sel=t,this.SetHStabCount(this.hstab_count))}GetHValidList(){var t=[];if(this.is_heli)t=Array(this.hstab_list.length).fill(!1),this.have_tail?t[0]=!0:t[1]=!0;else for(const e of this.hstab_list)"The Wings"!=e.name&&"Outboard"!=e.name||this.is_tandem||this.is_swept?e.is_tail&&!this.have_tail?t.push(!1):t.push(!0):t.push(!1);return t}GetIsVTail(){return this.hstab_list[this.hstab_sel].is_vtail}SetVTail(){for(let t=0;t=0?this.hstab_list[this.hstab_sel].increment:1}GetVStabCount(){return this.vstab_count}SetVStabCount(t){if((t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.vstab_count=t,0!=this.vstab_list[this.vstab_sel].increment)for(;this.vstab_count%this.vstab_list[this.vstab_sel].increment!=0;)this.vstab_count++;else this.vstab_count=0;this.CalculateStats()}GetVStabIncrement(){return this.vstab_sel>=0?this.vstab_list[this.vstab_sel].increment:1}SetEngineCount(t){this.engine_count=t}GetIsTandem(){return this.is_tandem}SetIsTandem(t){this.is_tandem=t}SetIsSwept(t){this.is_swept=t}CanVOutboard(){return this.is_swept||this.is_tandem||this.hstab_list[this.hstab_sel].is_canard&&this.hstab_count>0}GetVOutboard(){return"Outboard"==this.vstab_list[this.vstab_sel].name}GetCanard(){return this.hstab_list[this.hstab_sel].is_canard}SetLiftingArea(t){this.lifting_area=t}SetHaveTail(t){if(this.have_tail=t,!t){this.GetHValidList()[this.hstab_sel]||(this.hstab_sel=2);const t=this.GetVValidList();t[this.vstab_sel]||(t[1]||(this.hstab_sel=2),this.vstab_sel=1,this.vstab_count%2!=0&&this.vstab_count++)}this.is_heli&&(this.have_tail?this.hstab_sel=0:this.hstab_sel=1,this.hstab_count=1)}SetHelicopter(t){this.is_heli=t,t&&(this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.lifting_area=0,this.engine_count=0,this.hstab_sel=0,this.hstab_count=1,this.vstab_sel=0,this.vstab_count=1)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=this.GetHValidList();t[this.hstab_sel]||(this.hstab_sel=0,t[this.hstab_sel]||(this.hstab_sel=0,this.hstab_count=0));const e=this.GetVValidList();e[this.vstab_sel]||(this.vstab_sel=0,e[this.vstab_sel]||(this.vstab_sel=0,this.vstab_count=0));var s=new u;if(this.hstab_count>0){s=s.Add(this.hstab_list[this.hstab_sel].stats);var i=0;this.is_heli?(i=Math.floor(1e-6+this.wing_drag/8*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/4*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(1,i))}else(this.hstab_sel<0||0!=this.hstab_list[this.hstab_sel].increment)&&(s.pitchstab-=Math.floor(1e-6+this.lifting_area/2),s.liftbleed+=5);if(this.vstab_count>0?(s=s.Add(this.vstab_list[this.vstab_sel].stats),i=0,this.is_heli?(i=Math.floor(1e-6+this.wing_drag/16*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/8*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(1,i))):(this.vstab_sel<0||0!=this.vstab_list[this.vstab_sel].increment||0==this.vstab_list[this.vstab_sel].increment&&0==this.hstab_count)&&(s.latstab-=this.lifting_area),s.drag+=2*(Math.max(0,this.hstab_count-1)+Math.max(0,this.vstab_count-1)),this.vstab_sel>=0&&0!=this.vstab_list[this.vstab_sel].increment){var a=Math.max(0,this.hstab_count-1);const t=Math.min(this.engine_count-1,this.vstab_count-1);a+=Math.max(0,this.vstab_count-1-t),s.control+=3*t+a}else{const t=Math.max(0,Math.min(this.engine_count-1,this.hstab_count-1));a=Math.max(0,this.hstab_count-1-t),s.control+=3*t+a}return s}GetElectrics(){return{storage:0,equipment:[]}}}class st extends D{constructor(t){super(),this.span=0,this.is_cantilever=0,this.wing_area=0,this.mp=0,this.is_boom=!1,this.acft_type=k.AIRPLANE,this.aileron_sel=0,this.aileron_list=[];for(const e of t.ailerons)this.aileron_list.push({name:e.name,warping:e.warping,stats:new u(e)});this.rudder_sel=0,this.rudder_list=[];for(const e of t.rudders)this.rudder_list.push({name:e.name,stats:new u(e)});this.elevator_sel=0,this.elevator_list=[];for(const e of t.elevators)this.elevator_list.push({name:e.name,stats:new u(e)});this.flaps_sel=0,this.flaps_list=[];for(const e of t.flaps)this.flaps_list.push({name:e.name,costfactor:e.costfactor,stats:new u(e)});this.slats_sel=0,this.slats_list=[];for(const e of t.slats)this.slats_list.push({name:e.name,stats:new u(e)});this.drag_list=[];for(const e of t.drag_inducers)this.drag_list.push({name:e.name,stats:new u(e)});this.drag_sel=[...Array(this.drag_list.length).fill(!1)]}toJSON(){return{aileron_sel:this.aileron_sel,rudder_sel:this.rudder_sel,elevator_sel:this.elevator_sel,flaps_sel:this.flaps_sel,slats_sel:this.slats_sel,drag_sel:this.drag_sel}}fromJSON(t,e){this.aileron_sel=t.aileron_sel,this.rudder_sel=t.rudder_sel,this.elevator_sel=t.elevator_sel,this.flaps_sel=t.flaps_sel,this.slats_sel=t.slats_sel,this.drag_sel=b(t.drag_sel,this.drag_sel.length)}serialize(t){t.PushNum(this.aileron_sel),t.PushNum(this.rudder_sel),t.PushNum(this.elevator_sel),t.PushNum(this.flaps_sel),t.PushNum(this.slats_sel),t.PushBoolArr(this.drag_sel)}deserialize(t){this.aileron_sel=t.GetNum(),this.rudder_sel=t.GetNum(),this.elevator_sel=t.GetNum(),this.flaps_sel=t.GetNum(),this.slats_sel=t.GetNum(),this.drag_sel=t.GetBoolArr(this.drag_sel.length)}IsDefault(){return 0==this.aileron_sel&&0==this.rudder_sel&&0==this.elevator_sel&&0==this.flaps_sel&&0==this.slats_sel&&0==this.drag_sel.reduce(((t,e)=>t||e),!1)}GetAileronList(){return this.aileron_list}CanAileron(){const t=[];if(H(this.acft_type))for(const e of this.aileron_list)t.push(e.warping);else for(const e of this.aileron_list)e.warping&&0==this.wing_area?t.push(!1):t.push(!0);return t}GetAileron(){return this.aileron_sel}SetAileron(t){this.aileron_sel=t,this.CalculateStats()}GetRudderList(){return this.rudder_list}CanRudder(){return this.can_rudder}SetCanRudder(t){this.can_rudder=t,t||(this.rudder_sel=0)}GetRudder(){return this.rudder_sel}SetRudder(t){this.rudder_sel=t,this.CalculateStats()}GetElevatorList(){return this.elevator_list}CanElevator(){return this.can_elevator}SetCanElevator(t){this.can_elevator=t,t||(this.elevator_sel=0)}GetElevator(){return this.elevator_sel}SetElevator(t){this.elevator_sel=t,this.CalculateStats()}GetFlapsList(){return this.flaps_list}GetFlaps(){return this.flaps_sel}SetFlaps(t){this.flaps_sel=t,this.CalculateStats()}GetFlapCost(t){return t&&(this.mp=t),this.flaps_list[this.flaps_sel].costfactor>0?Math.max(1,Math.floor(1e-6+this.flaps_list[this.flaps_sel].costfactor*this.mp)):0}GetSlatsList(){return this.slats_list}GetSlats(){return this.slats_sel}SetSlats(t){this.slats_sel=t,this.CalculateStats()}GetDragList(){return this.drag_list}GetDrag(){return this.drag_sel}SetDrag(t,e){this.drag_sel[t]=e,this.CalculateStats()}SetNumCantilever(t){this.is_cantilever=t}SetSpan(t){this.span=t}SetWingArea(t){this.wing_area=t}SetAcftType(t){if(this.acft_type=t,this.acft_type==k.HELICOPTER){this.aileron_sel=0,this.rudder_sel=0,this.elevator_sel=0,this.flaps_sel=0,this.slats_sel=0;for(let t=0;tt)),this.is_cantilever=0}}SetBoomTail(t){this.is_boom=t}SetIsVTail(t){t&&(this.rudder_sel=this.elevator_sel)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;this.aileron_list[this.aileron_sel].warping&&0==this.wing_area&&(this.aileron_sel=0),t=t.Add(this.aileron_list[this.aileron_sel].stats),this.aileron_list[this.aileron_sel].warping&&(t.maxstrain-=this.span,this.is_cantilever&&(t.cost+=2*this.is_cantilever,t.era.push({name:h("Cantilever Wing Warping"),era:"Last Hurrah"})),this.is_boom&&(t.pitchstab-=2,t.latstab-=2,t.warnings.push({source:h("Wing Warping"),warning:h("Wing Warping Warning"),color:c.WHITE}))),t=(t=(t=(t=t.Add(this.rudder_list[this.rudder_sel].stats)).Add(this.elevator_list[this.elevator_sel].stats)).Add(this.flaps_list[this.flaps_sel].stats)).Add(this.slats_list[this.slats_sel].stats);for(let e=0;e10.25&&t.wing_blades,e<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}serialize(t){t.PushNumArr(this.ext_wood_count),t.PushNumArr(this.ext_steel_count),t.PushNumArr(this.cant_count),t.PushBool(this.wires),t.PushNum(this.cabane_sel),t.PushBool(this.wing_blades)}deserialize(t){this.ext_wood_count=t.GetNumArr(this.ext_wood_count.length),this.ext_steel_count=t.GetNumArr(this.ext_steel_count.length),this.cant_count=t.GetNumArr(this.cant_count.length),this.wires=t.GetBool(),this.cabane_sel=t.GetNum(),t.version>10.25?this.wing_blades=t.GetBool():this.wing_blades=!1,t.version<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}GetExternalList(){return this.ext_wood_list}GetCantileverList(){return this.cant_list}CanExternalWood(){const t=[...Array(this.ext_wood_list.length).fill(this.can_external)];for(let e=0;e0}SetCantileverCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.ImplSCC(t,e),this.CalculateStats()}ImplSCC(t,e){var s=e-this.cant_count[t];if(this.cant_list[t].limited&&e>0){var i=this.TotalStructure();for(let t=0;tthis.acft_structure)for(let t=this.cant_list.length-1;t>=0;t--)s=s||this.ImplSCC(t,this.cant_count[t]);s&&this.CalculateStats()}TotalStructure(){var t=this.ext_cabane_list[this.cabane_sel].stats.structure,e=!1;for(let s=0;s0||this.ext_steel_count[s]>0)&&(e=!0);return e&&(t+=5),this.acft_structure+t}GetCantileverType(){const t=this.cant_count[0]+this.cant_count[4];return this.cant_count[1]+this.cant_count[2]+this.cant_count[3]>0?2:t>0?1:0}GetCabaneList(){return this.ext_cabane_list}GetCabane(){return this.cabane_sel}SetCabane(t){this.cabane_sel=t,this.CalculateStats()}SetCantLift(t){this.cant_lift=t}CanWingBlade(){for(const t of this.ext_wood_count)if(t>0)return!1;for(const t of this.ext_steel_count)if(t>0)return!1;return 0==this.cabane_sel&&this.cant_count[2]>0}GetWingBlade(){return this.wing_blades}SetWingBlade(t){this.wing_blades=t,this.CalculateStats()}SetAircraftType(t){this.acft_type=t,t==k.HELICOPTER&&(this.can_external=!1,this.is_monoplane=!1,this.is_tandem=!1,this.is_staggered=!1),t==k.ORNITHOPTER_BUZZER&&(this.can_external=!1);const e=this.CanExternalWood();for(let t=0;t0){a=a||this.ext_wood_list[r].first;let i=this.ext_wood_list[r].stats;i=i.Multiply(this.ext_wood_count[r]),t=t.Add(i),this.ext_wood_list[r].config?s+=e*this.ext_wood_list[r].tension*this.ext_wood_count[r]:s+=this.ext_wood_list[r].tension*this.ext_wood_count[r]}for(let r=0;r0){a=a||this.ext_wood_list[r].first;let i=this.ext_steel_list[r].stats.Clone();i=i.Multiply(this.ext_steel_count[r]),t=t.Add(i),this.ext_steel_list[r].config?s+=e*this.ext_steel_list[r].tension*this.ext_steel_count[r]:s+=this.ext_steel_list[r].tension*this.ext_steel_count[r]}this.acft_type==k.ORNITHOPTER_BASIC&&(t.maxstrain=Math.floor(1e-6+.5*t.maxstrain)),a&&(t.structure+=5,t.maxstrain+=10,s+=10);const r=this.ext_cabane_list[this.cabane_sel].stats.Clone();t=t.Add(r),s+=e*this.ext_cabane_list[this.cabane_sel].tension,this.cabane_sel>0&&(i+=1),this.wires&&(t.maxstrain+=Math.floor(1e-6+s),t.drag+=3*i);var n=!1;for(let e=0;e0){n=!0;let s=this.cant_list[e].stats;s=s.Multiply(this.cant_count[e]),s.maxstrain,t=t.Add(s)}return this.CanWingBlade()?this.wing_blades&&(t.mass*=2,t.warnings.push({source:h("Wing Blades"),warning:h("Wing Blades Warning"),color:c.WHITE})):this.wing_blades=!1,n&&(t.cost+=5,t.liftbleed-=this.cant_lift),t}GetElectrics(){return{storage:0,equipment:[]}}}class at extends D{constructor(t){super(),this.tank_stats=[],this.tank_count=[];for(const e of t.tanks)this.tank_stats.push({name:e.name,stats:new u(e),internal:e.internal,cantilever:e.cantilever}),this.tank_count.push(0);this.self_sealing=!1,this.is_cantilever=!1,this.wing_area=-1}toJSON(){return{tank_count:this.tank_count,self_sealing:this.self_sealing,fire_extinguisher:this.fire_extinguisher}}fromJSON(t,e){this.tank_count=y(t.tank_count,this.tank_count.length),this.self_sealing=t.self_sealing,this.fire_extinguisher=t.fire_extinguisher,this.wing_area=-1}serialize(t){t.PushNumArr(this.tank_count),t.PushBool(this.self_sealing),t.PushBool(this.fire_extinguisher)}deserialize(t){this.tank_count=t.GetNumArr(this.tank_count.length),this.self_sealing=t.GetBool(),this.fire_extinguisher=t.GetBool(),this.wing_area=-1}GetTankList(){return this.tank_stats}GetTankEnabled(){const t=[];for(const e of this.tank_stats)!this.is_cantilever&&e.cantilever?t.push(!1):t.push(!0);return t}GetTankCount(){return this.tank_count}SetTankCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.tank_count[t]=e,this.VerifyOK(),this.CalculateStats()}SetCantilever(t){this.is_cantilever&&!t&&(this.is_cantilever=t,this.VerifyOK()&&this.CalculateStats()),this.is_cantilever=t}SetArea(t){this.wing_area>t&&(this.wing_area=t,this.VerifyOK()&&this.CalculateStats()),this.wing_area=t}VerifyOK(){if(-1!=this.wing_area){var t=0;for(let e=0;e0;for(;s>0;)for(let t=this.tank_count.length-1;t>=0;t--)if(this.tank_stats[t].cantilever){this.tank_count[t]--,s--;break}for(let t=0;t0}GetSelfSealing(){return this.self_sealing}SetSelfSealing(t){this.self_sealing=t,this.CalculateStats()}GetExtinguisher(){return this.fire_extinguisher}SetExtinguisher(t){this.fire_extinguisher=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u,e=0;for(let s=0;s0&&(t.wetmass+=5-t.wetmass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class rt extends D{constructor(){super(),this.bomb_count=0,this.rocket_count=0,this.internal_bay_count=0,this.internal_bay_1=!1,this.internal_bay_2=!1}toJSON(){return{bomb_count:this.bomb_count,rocket_count:this.rocket_count,bay_count:this.internal_bay_count,bay1:this.internal_bay_1,bay2:this.internal_bay_2}}fromJSON(t,e){this.bomb_count=t.bomb_count,this.internal_bay_count=t.bay_count,this.internal_bay_1=t.bay1,this.internal_bay_2=t.bay2,e>10.75&&(this.rocket_count=t.rocket_count)}serialize(t){t.PushNum(this.bomb_count),t.PushNum(this.internal_bay_count),t.PushBool(this.internal_bay_1),t.PushBool(this.internal_bay_2),t.PushNum(this.rocket_count)}deserialize(t){this.bomb_count=t.GetNum(),this.internal_bay_count=t.GetNum(),this.internal_bay_1=t.GetBool(),this.internal_bay_2=t.GetBool(),t.version>10.75&&(this.rocket_count=t.GetNum())}GetRocketCount(){return this.rocket_count}GetBombCount(){return this.bomb_count}GetInternalBombCount(){var t=10*this.internal_bay_count;return this.bomb_count>0&&this.internal_bay_count>0&&this.internal_bay_1&&(t*=2,this.internal_bay_2&&(t*=2)),t}GetMaxBombSize(){var t=0;const e=this.GetInternalBombCount();return this.bomb_count>0&&this.internal_bay_count>0&&(t=this.internal_bay_1?this.internal_bay_2?Math.floor(1e-6+e):Math.floor(1e-6+e/2):Math.floor(1e-6+e/4)),t}SetRocketCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.rocket_count=t,this.LimitMass(),this.CalculateStats()}SetBombCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.bomb_count=t,this.LimitMass(),this.CalculateStats()}GetBayCount(){return this.internal_bay_count}GetBay1(){return this.internal_bay_1}GetBay2(){return this.internal_bay_2}SetBayCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.internal_bay_count=t,this.CalculateStats()}SetUseBays(t,e){this.internal_bay_1=t,this.internal_bay_2=e,!this.internal_bay_1&&this.internal_bay_2&&(this.internal_bay_1=!0,this.internal_bay_2=!1),this.CalculateStats()}LimitMass(){var t=!1;const e=Math.min(this.GetInternalBombCount(),Math.floor(1e-6+3*this.acft_struct*this.maxbomb));var s,i,a=0,r=0;s=this.bomb_count>e?e:this.bomb_count,i=this.rocket_count+s>e?e-s:this.rocket_count,a=this.bomb_count-s,r=this.rocket_count-i;const n=Math.floor(1e-6+this.acft_struct*this.maxbomb-(s+i)/3)*this.gull_factor;for(;a+r>n;)r>0?r--:a--;let o=Math.max(0,s+a);this.bomb_count>o&&(t=!0,this.bomb_count=o);let l=Math.max(0,i+r);return this.rocket_count>l&&(t=!0,this.rocket_count=l),t}GetExternalMass(){const t=this.bomb_count+this.rocket_count;return Math.max(0,t-this.GetInternalBombCount())}SetAcftParameters(t,e,s){switch(this.acft_struct=t,this.maxbomb=e,s){case 2:case 3:this.gull_factor=1.1;break;case 4:this.gull_factor=1.2;break;default:this.gull_factor=1}this.LimitMass()&&this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u,e=this.GetExternalMass();if(t.reqsections+=this.internal_bay_count,this.internal_bay_count>0){const e=t.reqsections;this.internal_bay_1&&(t.reqsections+=e,this.internal_bay_2&&(t.reqsections+=e))}const s=Math.ceil(e/5-1e-6);return t.mass+=s,t.drag+=s,t.bomb_mass=this.bomb_count+this.rocket_count,t.reqsections=Math.ceil(-1e-6+t.reqsections),t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class nt extends D{constructor(t){super(),this.cargo_list=[];for(const e of t.spaces)this.cargo_list.push({name:e.name,stats:new u(e)});this.cargo_sel=0}toJSON(){return{space_sel:this.cargo_sel}}fromJSON(t,e){this.cargo_sel=t.space_sel}serialize(t){t.PushNum(this.cargo_sel)}deserialize(t){this.cargo_sel=t.GetNum()}GetSpaceList(){return this.cargo_list}GetSpace(){return this.cargo_sel}SetSpace(t){this.cargo_sel=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;return(t=t.Add(this.cargo_list[this.cargo_sel].stats)).bomb_mass+=3*t.reqsections,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class ot extends D{constructor(t){super(),this.gear_list=[],this.gear_sel=0,this.retract=!1;for(const e of t.gear)this.gear_list.push({name:e.name,stats:new u(e),DpLMP:e.DpLMP,SpLMP:e.SpLMP,can_retract:e.can_retract});this.extra_list=[];for(const e of t.extras)this.extra_list.push({name:e.name,stats:new u(e),MpLMP:e.MpLMP});this.extra_sel=[...Array(this.extra_list.length).fill(!1)]}toJSON(){return{gear_sel:this.gear_sel,retract:this.retract,extra_sel:this.extra_sel}}fromJSON(t,e){this.gear_sel=t.gear_sel,this.retract=t.retract,this.extra_sel=b(t.extra_sel,this.extra_sel.length)}serialize(t){t.PushNum(this.gear_sel),t.PushBool(this.retract),t.PushBoolArr(this.extra_sel)}deserialize(t){this.gear_sel=t.GetNum(),this.retract=t.GetBool(),this.extra_sel=t.GetBoolArr(this.extra_sel.length)}IsDefault(){return 0==this.gear_sel&&0==this.retract&&0==this.extra_sel.reduce(((t,e)=>t||e),!1)}GetGearName(){return this.retract&&"Boat Hull"==this.gear_list[this.gear_sel].name?h("Retractable Gear + Boat Hull"):this.retract?h("Retractable ")+h(this.gear_list[this.gear_sel].name):h(this.gear_list[this.gear_sel].name)}GetGearList(){return this.gear_list}CanGear(){const t=[...Array(this.gear_list.length).fill(!0)];for(let e=0;e=2||0==t&&e>=3}SetGull(t){this.gull_deck=t}SetCalculateStats(t){this.CalculateStats=t}IsVital(){return!0}PartStats(){var t=new u;this.CanGear()[this.gear_sel]||(this.gear_sel=0),this.CanRetract()||(this.retract=!1);var e=this.loadedMass;for(let s=0;s=0;i--)s+=t[i],t[i]=s-e;return t}SetArmourCoverage(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.armour_coverage[t]=1!=t?e:e-this.skin_armour,this.NormalizeCoverage(),this.CalculateStats()}NormalizeCoverage(){var t=-8+Math.min(0,-Math.floor(1e-6+(this.vital_parts-8)/2));t+=this.skin_armour;for(let e=this.armour_coverage.length-1;e>=0;e--)this.armour_coverage[e]=Math.max(0,Math.min(Math.abs(t),this.armour_coverage[e])),t+=this.armour_coverage[e]}GetElectricalList(){return this.electric_list}GetElectricalCount(){return this.electrical_count}SetElectricalCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),e=Math.min(e,50),this.electrical_count[t]=e,this.CalculateStats()}GetRadioList(){return this.radio_list}GetRadioSel(){return this.radio_sel}SetRadioSel(t){this.radio_sel=t,this.CalculateStats()}GetReconList(){return this.recon_list}GetReconSel(){return this.recon_sel}SetReconSel(t,e){((e=Math.trunc(e))!=e||e<0)&&(e=0),this.recon_sel[t]=e,this.CalculateStats()}GetVisibilityList(){return this.visi_list}GetCanVisibility(){return this.can_visi}GetVisibilitySel(){return this.visi_sel}SetVisibilitySel(t,e){this.visi_sel[t]=e,this.CalculateStats()}GetClimateList(){return this.clim_list}GetClimateSel(){return this.clim_sel}GetClimateEnable(){const t=[];for(const e of this.clim_list)!this.acft_rad&&e.req_radiator?t.push(!1):t.push(!0);return t}SetClimateSel(t,e){this.clim_sel[t]=e,this.CalculateStats()}GetAutopilotList(){return this.auto_list}GetAutopilotSel(){return this.auto_sel}SetAutopilotSel(t){this.auto_sel=t,this.CalculateStats()}GetControlList(){return this.cont_list}GetControlSel(){return this.cont_sel}SetControlSel(t){this.cont_sel=t,this.CalculateStats()}SetAcftRadiator(t){this.acft_rad=t}IsElectrics(){for(const t of this.electrical_count)if(t>0)return!0;for(let t=0;t0&&(""!=e&&(e+=", "),e+=r.toString()+"/"+(11-s[a]).toString()+"+")}""!=e&&t.warnings.push({source:h("Armour"),warning:e,color:c.WHITE});for(let e=0;e0){let s=this.electric_list[e].stats.Clone();s=s.Multiply(this.electrical_count[e]),t=t.Add(s)}t=t.Add(this.radio_list[this.radio_sel].stats);for(let e=0;e0){let s=this.recon_list[e].stats.Clone();s=s.Multiply(this.recon_sel[e]),t=t.Add(s)}for(let e=0;e0&&(t+=i.storage*a,i.cp10s>0?e.push({source:h(i.name),charge:r.Format("{0}"+h("Derived Per 10 Speed"),Math.floor(1e-6+a*i.cp10s))}):0!=i.stats.charge&&e.push({source:h(i.name),charge:(a*i.stats.charge).toString()}))}const s=this.radio_list[this.radio_sel];e=this.FormatEquipment(e,s.name,s.stats.charge);for(let t=0;t0&&(e=this.FormatEquipment(e,s.name,i*s.stats.charge))}for(let t=0;t0){let e=Math.min(t,this.drag);e=Math.max(e,0),this.drag-=e,t-=e,e=Math.min(t,this.reliability),e=Math.max(e,0),this.reliability-=e,t-=e,e=Math.min(t,this.maxstrain),e=Math.max(e,0),this.maxstrain-=e,t-=e,e=Math.min(t,this.toughness),e=Math.max(e,0),this.toughness-=e,t-=e,e=Math.min(t,this.mass),e=Math.max(e,0),this.mass-=e,t-=e,e=Math.min(t,this.escape),e=Math.max(e,0),this.escape-=e,t-=e,e=Math.min(t,this.bleed),e=Math.max(e,0),this.bleed-=e,t-=e,e=Math.min(t,this.cost),e=Math.max(e,0),this.cost-=e,t-=e}}GetFreeDots(){return this.free_dots}SetFreeDots(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,0),this.free_dots=t,this.ReduceDots(),this.CalculateStats()}GetCost(){return this.cost}SetCost(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.cost=t,this.ReduceDots(),this.CalculateStats()}GetBleed(){return this.bleed}SetBleed(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.bleed=t,this.ReduceDots(),this.CalculateStats()}GetEscape(){return this.escape}SetEscape(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.escape=t,this.ReduceDots(),this.CalculateStats()}GetMass(){return this.mass}SetMass(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.mass=t,this.ReduceDots(),this.CalculateStats()}GetToughness(){return this.toughness}SetToughness(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.toughness=t,this.ReduceDots(),this.CalculateStats()}GetMaxStrain(){return this.maxstrain}SetMaxStrain(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.maxstrain=t,this.ReduceDots(),this.CalculateStats()}GetReliabiilty(){return this.reliability}SetReliability(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.reliability=t,this.ReduceDots(),this.CalculateStats()}GetDrag(){return this.drag}SetDrag(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.drag=t,this.ReduceDots(),this.CalculateStats()}SetAcftStats(t){this.acft_stats=t}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u;return t.cost=Math.floor(1e-6+-this.cost*this.acft_stats.cost/10),t.liftbleed=Math.floor(1e-6+3*-this.bleed),t.escape=this.escape,t.visibility=this.escape,t.mass=Math.floor(1e-6+-this.mass*this.acft_stats.mass/10),t.toughness=Math.floor(1e-6+this.toughness*this.acft_stats.toughness/4),t.reliability=2*this.reliability,t.drag=Math.floor(1e-6+-this.drag*this.acft_stats.drag/10),t}GetElectrics(){return{storage:0,equipment:[]}}}!function(t){t[t.NONE=-1]="NONE",t[t.INTERRUPT=0]="INTERRUPT",t[t.SYNCH=1]="SYNCH",t[t.SPINNER=2]="SPINNER",t[t.DEFLECT=3]="DEFLECT",t[t.NO_INTERFERENCE=4]="NO_INTERFERENCE",t[t.ENUM_MAX=5]="ENUM_MAX"}(F||(F={})),(B=q||(q={}))[B.BULLETS=0]="BULLETS",B[B.HEATRAY=1]="HEATRAY",B[B.PNEUMATIC=2]="PNEUMATIC",B[B.ENUM_MAX=3]="ENUM_MAX",B[B.GYROJETS=4]="GYROJETS",function(t){t[t.STANDARD=0]="STANDARD",t[t.MECHANICAL=1]="MECHANICAL",t[t.GAST=2]="GAST",t[t.ROTARY=3]="ROTARY",t[t.ENUM_MAX=4]="ENUM_MAX"}(L||(L={}));class ct extends D{constructor(t,e,s,i=!1){super(),this.weapon_type=t,this.fixed=i,this.wing=!0,this.covered=!1,this.accessible=!1,this.free_accessible=!1,this.synchronization=i?F.NONE:F.INTERRUPT,this.w_count=1,this.repeating=!1,this.wing_reinforcement=!1}toJSON(){return{fixed:this.fixed,wing:this.wing,covered:this.covered,accessible:this.accessible,free_accessible:this.free_accessible,synchronization:this.synchronization,w_count:this.w_count}}fromJSON(t,e){this.fixed=t.fixed,this.wing=t.wing,this.covered=t.covered,this.accessible=t.accessible,this.free_accessible=t.free_accessible,this.synchronization=t.synchronization,this.w_count=t.w_count,e<10.95&&(this.repeating=t.repeating)}serialize(t){t.PushBool(this.fixed),t.PushBool(this.wing),t.PushBool(this.covered),t.PushBool(this.accessible),t.PushBool(this.free_accessible),t.PushNum(this.synchronization),t.PushNum(this.w_count)}deserialize(t){this.fixed=t.GetBool(),this.wing=t.GetBool(),this.covered=t.GetBool(),this.accessible=t.GetBool(),this.free_accessible=t.GetBool(),this.synchronization=t.GetNum(),this.w_count=t.GetNum(),t.version<10.95&&(this.repeating=t.GetBool())}SetWeaponType(t,e,s){this.weapon_type=t,this.action=e,16==this.weapon_type.size&&(this.w_count=1),this.SetCount(this.w_count,!1)}GetFixed(){return this.fixed}SetFixed(t){t!=this.fixed&&(t?this.fixed=!0:(this.fixed=!1,this.synchronization=F.NONE))}SetCanWing(t){this.canwing=t,this.wing&&!t&&(this.wing=!1)}GetWing(){return this.wing}CanWing(){return this.weapon_type.size<=16&&this.canwing}SetWing(t){t&&this.CanWing()?(this.wing=!0,this.free_accessible=!1,this.synchronization=F.NONE):this.wing=!1,this.CalculateStats()}CanCovered(){return this.wing?this.has_cantilever&&!(16==this.weapon_type.size&&!this.fixed):!(this.GetArty()&&!this.fixed)}GetCovered(){return this.covered}SetCovered(t){this.covered=t,this.CalculateStats()}GetAccessible(){return this.accessible||this.free_accessible}SetAccessible(t){t&&this.free_accessible&&(t=!1),this.accessible=t,this.CalculateStats()}GetFreeAccessible(){return this.free_accessible}SetFreeAccessible(t){t&&!this.wing&&this.can_free_accessible?(this.free_accessible=!0,this.accessible=!1):this.free_accessible=!1,this.CalculateStats()}CanSynchronization(){const t=[];for(let e=-1;e16;)t-=1;this.w_count=t,e&&this.CalculateStats()}CanRepeating(){return!this.weapon_type.rapid||this.weapon_type.reload>0}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:this.repeating=!1,this.CalculateStats()}ResolveSynch(){const t=this.synchronization;if(this.synchronization=F.ENUM_MAX,this.CanSynch(t))this.action==L.MECHANICAL&&t!=F.SPINNER?this.synchronization=F.SYNCH:this.synchronization=t;else{for(let t=-1;t8||16==this.weapon_type.size)&&(t.reqsections+=1),this.accessible&&(t.cost+=Math.max(1,Math.floor(1e-6+this.w_count/2))),!this.fixed)if(e<=2);else if(e<=4)t.cost+=1;else if(e<=8)t.mass+=1,t.cost+=3;else{if(!(e<=16))throw"Weapon size screwup in Turret size cost.";t.mass+=2,t.cost+=5}return this.synchronization==F.INTERRUPT?(t.cost+=2*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=2*this.w_count),t.era.push({name:h("Interruptor Gear"),era:h("WWI")})):this.synchronization==F.SYNCH&&this.action!=L.MECHANICAL?(t.cost+=3*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=3*this.w_count),t.era.push({name:h("Synchronization Gear"),era:h("Roaring 20s")})):this.synchronization==F.DEFLECT?(t.cost+=1,t.warnings.push({source:h(this.weapon_type.name),warning:h("Deflector Plate Warning"),color:c.WHITE})):this.synchronization!=F.NO_INTERFERENCE||this.IsLightningArc()||t.warnings.push({source:h(this.weapon_type.name)+" "+h("No Interference"),warning:h("No Interference Warning"),color:c.YELLOW}),this.wing_reinforcement&&(t.mass+=2),t.Round(),t}GetElectrics(){return{storage:0,equipment:[]}}}class ut extends D{constructor(t,e){super(),this.weapon_list=t,this.wl_permute=e,this.directions=[...Array(6).fill(!1)],this.directions[0]=!0,this.fixed=!0,this.ammo=1,this.weapon_type=0,this.raw_weapon_type=0,this.weapons=[],this.action_sel=L.STANDARD,this.projectile_sel=q.BULLETS,this.has_propeller=!0,this.sticky_guns=0,this.repeating=!1,this.seat=0,this.final_weapon={name:"",abrv:"",era:"",size:0,stats:new u,damage:0,hits:0,ammo:0,ap:0,jam:"",reload:0,rapid:!1,synched:!1,shells:!1,can_action:!1,can_projectile:!1,deflection:0},this.MakeFinalWeapon(),this.SWC(1)}toJSON(){const t=[];for(const e of this.weapons)t.push(e.toJSON());return{weapon_type:this.raw_weapon_type,fixed:this.fixed,directions:this.directions,weapons:t,ammo:this.ammo,action:this.action_sel,projectile:this.projectile_sel,repeating:this.repeating,seat:this.seat}}fromJSON(t,e){this.raw_weapon_type=t.weapon_type,this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.fixed,this.directions=b(t.directions,this.directions.length),this.weapons=[],this.ammo=t.ammo,null==this.ammo&&(this.ammo=1),e<10.25?(this.action_sel=L.STANDARD,this.projectile_sel=q.BULLETS):(this.action_sel=t.action,this.projectile_sel=t.projectile),e<11.75&&(this.projectile_sel==q.PNEUMATIC?this.projectile_sel=q.BULLETS:this.projectile_sel==q.ENUM_MAX&&(this.projectile_sel=q.PNEUMATIC)),this.MakeFinalWeapon();for(const s of t.weapons){const t=new ct(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),t.fromJSON(s,e),this.weapons.push(t)}if(e<10.95){this.repeating=!1;for(const t of this.weapons)this.repeating=this.repeating||t.GetRepeating()}else this.repeating=t.repeating;this.seat=e>11.65?t.seat:0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}serialize(t){t.PushNum(this.raw_weapon_type),t.PushBool(this.fixed),t.PushBoolArr(this.directions),t.PushNum(this.ammo),t.PushNum(this.weapons.length);for(const e of this.weapons)e.serialize(t);t.PushNum(this.action_sel),t.PushNum(this.projectile_sel),t.PushBool(this.repeating),t.PushNum(this.seat)}deserialize(t){this.raw_weapon_type=t.GetNum(),this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.GetBool(),this.directions=t.GetBoolArr(this.directions.length),this.ammo=t.GetNum();const e=t.GetNum();this.weapons=[],this.MakeFinalWeapon();for(let s=0;s11.65?this.seat=t.GetNum():this.seat=0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}GetWeaponSelected(){return this.weapon_type}MakeFinalWeapon(){const t=this.weapon_type;if(this.final_weapon.can_action=this.weapon_list[t].can_action,this.final_weapon.can_projectile=this.weapon_list[t].can_projectile,this.final_weapon.ammo=this.weapon_list[t].ammo,this.final_weapon.ap=this.weapon_list[t].ap,this.final_weapon.damage=this.weapon_list[t].damage,this.final_weapon.era=this.weapon_list[t].era,this.final_weapon.name=this.weapon_list[t].name,this.final_weapon.abrv=this.weapon_list[t].abrv,this.final_weapon.reload=this.weapon_list[t].reload,this.final_weapon.shells=this.weapon_list[t].shells,this.final_weapon.size=this.weapon_list[t].size,this.final_weapon.stats=this.weapon_list[t].stats.Clone(),this.final_weapon.deflection=this.weapon_list[t].deflection,this.final_weapon.jam=this.weapon_list[t].jam,this.final_weapon.stats.era=[],this.final_weapon.stats.era.push({name:this.weapon_list[t].name,era:this.weapon_list[t].era}),0==this.weapon_list[t].hits&&(this.action_sel==L.MECHANICAL&&(this.action_sel=L.STANDARD),this.projectile_sel!=q.GYROJETS&&this.projectile_sel!=q.HEATRAY||(this.projectile_sel=q.BULLETS)),this.action_sel==L.STANDARD)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.synched=this.weapon_list[t].synched;else if(this.action_sel==L.MECHANICAL)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.stats.warnings.push({source:h("Mechanical Action"),warning:h("Mechanical Action Warning"),color:c.WHITE}),this.final_weapon.jam="0/0",this.final_weapon.rapid=!0,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!0,this.final_weapon.stats.era.push({name:h("Mechanical Action"),era:h("WWI")});else if(this.action_sel==L.GAST)this.final_weapon.hits=2*this.weapon_list[t].hits,this.final_weapon.ammo=this.weapon_list[t].ammo/2,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!1,this.final_weapon.stats.era.push({name:h("Gast Principle"),era:h("WWI")});else if(this.action_sel==L.ROTARY){this.final_weapon.stats.mass+=this.weapon_list[t].stats.mass,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.size+=this.weapon_list[t].size,this.final_weapon.size=Math.min(16,this.final_weapon.size),this.final_weapon.hits=3*this.weapon_list[t].hits,this.final_weapon.deflection-=1,this.final_weapon.synched=!1;const e=this.final_weapon.jam.split("/");e[0]="9999",e[1]=(parseInt(e[1])+1).toString(),this.final_weapon.jam=e.join("/"),this.final_weapon.stats.era.push({name:h("Rotary_Gun"),era:h("WWI")})}if(this.repeating&&0!=this.final_weapon.reload&&(this.final_weapon.reload=0,this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost))),this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=q.HEATRAY||(this.projectile_sel=q.BULLETS),this.action_sel!=L.GAST&&this.action_sel!=L.ROTARY&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=q.PNEUMATIC||(this.projectile_sel=q.BULLETS),this.projectile_sel==q.HEATRAY)this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.shells=!1,this.final_weapon.ammo=0,this.final_weapon.deflection=0,this.final_weapon.ap=Math.max(0,this.final_weapon.ap-1),this.final_weapon.stats.warnings.push({source:h("Heat Ray"),warning:h("Heat Ray Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Heat Ray"),era:h("Himmilgard")});else if(this.projectile_sel==q.GYROJETS)this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost)),this.final_weapon.shells=!1,this.final_weapon.damage-=1,this.final_weapon.stats.warnings.push({source:h("Gyrojets"),warning:h("Gyrojets Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Gyrojets"),era:h("Roaring 20s")});else if(this.projectile_sel==q.PNEUMATIC){if(this.final_weapon.ammo*=2,this.final_weapon.shells=!1,this.final_weapon.rapid){const t=this.final_weapon.jam.split("/");t[1]="9999",this.final_weapon.jam=t.join("/"),this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 1"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Pneumatic"),era:h("Pioneer")})}this.final_weapon.hits>0&&this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 2"),color:c.WHITE})}0!=this.final_weapon.deflection&&this.final_weapon.stats.warnings.push({source:h(this.final_weapon.name),warning:h("Deflection Warning",this.final_weapon.deflection),color:c.WHITE})}SetWeaponSelected(t){const e=this.IsLightningArc();if(this.weapon_type=t,this.raw_weapon_type=this.wl_permute.findIndex((e=>e==t)),16==this.weapon_list[t].size)for(;this.weapons.length>1;)this.weapons.pop();this.weapon_list[t].can_action&&this.GetCanAction()[this.action_sel]||(this.action_sel=L.STANDARD),this.weapon_list[t].can_projectile&&this.GetCanProjectile()[this.projectile_sel]||(this.projectile_sel=q.BULLETS),this.weapon_list[t].rapid?this.repeating=!1:this.repeating||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD),this.CanRepeating()||(this.repeating=!1),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);if(this.IsLightningArc()){this.SetFixed(!0),this.directions[0]=!0;for(let t=1;t0)&&this.weapon_list[this.weapon_type].ammo>0&&"Precision Rifle"!=this.weapon_list[this.weapon_type].name}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:(this.repeating=!1,this.weapon_list[this.weapon_type].rapid||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD)),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);this.CalculateStats()}GetFixed(){return this.fixed}SetFixed(t){if(this.IsLightningArc()&&(t=!0),this.fixed!=t){this.fixed=t;for(const t of this.weapons)t.SetFixed(this.fixed);if(t){let t=!1;for(let e=0;ethis.weapons.length;){const t=new ct(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),this.weapons.push(t)}for(;t1||this.weapons[0].GetCount()>1}SetAmmo(t){(t!=t||t<1)&&(t=1),t=Math.floor(1e-6+t),this.ammo=t,this.CalculateStats()}SetHavePropeller(t){this.has_propeller&&!t&&this.action_sel==L.MECHANICAL&&(this.has_propeller=t,this.SetAction(L.STANDARD)),this.has_propeller=t}SetCanWing(t){for(const e of this.weapons)e.SetCanWing(t)}GetAction(){return this.action_sel}GetCanAction(){return[!0,this.has_propeller&&this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].hits>0&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].rapid]}SetAction(t){if(this.final_weapon.can_action){this.action_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.action_sel=L.STANDARD;this.CalculateStats()}GetCanProjectile(){return[!0,this.final_weapon.can_projectile&&this.action_sel!=L.MECHANICAL&&this.action_sel!=L.GAST&&this.weapon_list[this.weapon_type].hits>0,this.final_weapon.can_projectile&&this.action_sel!=L.ROTARY&&this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL]}GetProjectile(){return this.projectile_sel}SetProjectile(t){if(this.final_weapon.can_projectile){this.projectile_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.projectile_sel=q.BULLETS;this.CalculateStats()}GetFinalWeapon(){return this.final_weapon}SetStickyGuns(t){this.sticky_guns=t}GetHRCharges(){if(this.IsLightningArc())return[3];let t=0;for(const e of this.weapons)t+=e.GetCount();if(this.final_weapon.hits>0){let e=this.weapon_list[this.weapon_type].stats.cost;return this.action_sel==L.ROTARY&&(e*=2),this.final_weapon.rapid?[t*e,Math.max(t*e+1,Math.floor(1e-6+1.5*t*e))]:[t*e]}return"Scattergun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(1.875001),Math.floor(3.125001)]:[Math.floor(1.875001)]:"Punt Gun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(3.750001),Math.floor(6.250001)]:[Math.floor(3.750001)]:void 0}GetShots(){return Math.max(1,Math.floor(1e-6+this.final_weapon.ammo*this.ammo))}IsLightningArc(){return"Lightning Arc"==this.final_weapon.name}GetReload(){return this.final_weapon.reload}GetWingWeight(){let t=0;for(const e of this.weapons)e.GetWing()&&(t+=e.PartStats().mass);return t}GetDirectionCount(){let t=0;for(const e of this.directions)e&&t++;return t}SetSeat(t){this.seat=t,this.CalculateStats()}GetSeat(){return this.seat}GetIsFullyAccessible(){for(const t of this.weapons)if(!t.GetAccessible())return!1;return!0}GetIsPartlyAccessible(){for(const t of this.weapons)if(t.GetAccessible())return!0;return!1}SetCalculateStats(t){this.CalculateStats=t;for(const e of this.weapons)e.SetCalculateStats(t)}PartStats(){var t=new u;let e=this.GetDirectionCount(),s=0;for(const i of this.weapons)i.has_cantilever=this.has_cantilever,i.SetTurret(e>2),t=t.Add(i.PartStats()),s+=i.GetCount(),this.fixed||(2==e?t.cost+=1:3==e||4==e?t.cost+=2:5==e?t.cost+=3:6==e&&(t.cost+=4));return(this.projectile_sel==q.HEATRAY||this.IsLightningArc())&&(this.ammo=1),t.mass+=(this.ammo-1)*s,t}GetElectrics(){return{storage:0,equipment:[]}}}const _t=JSON.parse('{"A":[{"name":"Submachine Gun","abrv":"SMG","era":"WWI","cost":1,"mass":1,"drag":0,"damage":1,"hits":4,"ap":0,"ammo":10,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"0/1","reload":2,"size":1,"can_action":true,"can_projectile":true,"deflection":0,"warning":"SMG Warning"},{"name":"Scattergun","abrv":"SG","era":"Pioneer","cost":2,"mass":2,"drag":2,"damage":0.5,"hits":0,"ap":0,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Scattergun Warning","size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Machine Gun","abrv":"LMG","era":"WWI","cost":2,"mass":2,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"1/2","reload":2,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Machine Gun","abrv":"MG","era":"WWI","cost":2,"mass":3,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":10,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"1/2","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Balloon Gun","abrv":"BMG","era":"WWI","cost":3,"mass":3,"drag":1,"damage":2,"hits":4,"ap":0,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":-2},{"name":"Enhanced Machine Gun","abrv":"EMG","era":"Coming Storm","cost":3,"mass":2,"drag":1,"damage":2,"hits":5,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"0/0","reload":0,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Enhanced Heavy Machine Gun","abrv":"EHMG","era":"Coming Storm","cost":5,"mass":3,"drag":2,"damage":4,"hits":5,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Punt Gun","abrv":"PG","era":"Pioneer","cost":4,"mass":4,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Punt Gun Warning","size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Repeating Cannon","abrv":"LRC","era":"WWI","cost":4,"mass":4,"drag":3,"damage":8,"hits":3,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"2/5","reload":2,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Heavy Cannon","abrv":"HC","era":"WWI","cost":6,"mass":5,"drag":2,"damage":16,"hits":1,"ap":2,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Light Machine Cannon","abrv":"LMC","era":"Coming Storm","cost":8,"mass":4,"drag":3,"damage":8,"hits":4,"ap":4,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Machine Cannon","abrv":"HMC","era":"WWII","cost":12,"mass":5,"drag":4,"damage":12,"hits":3,"ap":4,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Fliergerflammenwerfer","abrv":"FFW","era":"WWI","cost":5,"mass":1,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0/0","reload":0,"warning":"Fliergerflammenwerfer Warning","size":8,"can_action":false,"can_projectile":false,"deflection":0},{"name":"Recoilless Cannon","abrv":"RC","era":"WWI","cost":5,"mass":8,"drag":3,"damage":30,"hits":1,"ap":3,"ammo":3,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":-5},{"name":"Autocannon","abrv":"AC","era":"WWII","cost":15,"mass":8,"drag":5,"damage":24,"hits":2,"ap":5,"ammo":2,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Battle Cannon","abrv":"BC","era":"WWII","cost":15,"mass":40,"drag":8,"damage":24,"hits":2,"ap":5,"ammo":1,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Precision Rifle","abrv":"PR","era":"WWI","mass":1,"drag":1,"cost":2,"damage":5,"hits":10,"ap":2,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":2,"can_action":false,"can_projectile":false,"warning":"Precision Rifle Warning","deflection":0},{"name":"Lightning Arc","abrv":"LA","era":"Himmilgard","cost":8,"mass":5,"drag":3,"damage":0,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0","reload":0,"size":16,"can_action":false,"can_projectile":false,"warning":"Lightning Arc Warning","deflection":0},{"name":"Harpoon Launcher","abrv":"HL","era":"Himmilgard","cost":3,"mass":3,"drag":2,"damage":4,"hits":1,"ap":1,"ammo":2,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":0,"reload":1,"size":4,"can_action":false,"can_projectile":false,"warning":"Harpoon Launcher Warning","deflection":0},{"name":"Heavy Machine Gun","abrv":"HMG","era":"WWI","cost":4,"mass":4,"drag":2,"damage":4,"hits":4,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Repeating Cannon","abrv":"HRC","era":"WWI","cost":10,"mass":6,"drag":4,"damage":16,"hits":2,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"4/6","reload":2,"size":16,"can_action":true,"can_projectile":true,"deflection":-3}]}');class pt extends D{constructor(){super(),this.direction_list=["Forward","Rearward","Up","Down","Left","Right"],this.synchronization_list=["None","Interruptor Gear","Synchronization Gear","Spinner Gun","Deflector Plate","No Interference"],this.action_list=[{name:"Standard Action"},{name:"Mechanical Action"},{name:"Gast Principle"},{name:"Rotary_Gun"}],this.projectile_list=[{name:"Standard"},{name:"Heat Ray"},{name:"Pneumatic"}],this.weapon_list=[];for(const t of _t.A){const e={name:t.name,abrv:t.abrv,era:t.era,size:t.size,stats:new u(t),damage:t.damage,hits:t.hits,ammo:t.ammo,ap:t.ap,jam:t.jam.toString(),reload:t.reload,rapid:t.rapid,synched:t.synched,shells:t.shells,can_action:t.can_action,can_projectile:t.can_projectile,deflection:t.deflection};this.weapon_list.push(e)}const t=(t,e)=>{const s=(t,e)=>tt(this.weapon_list[e],this.weapon_list[s])));const e=[];for(let t=0;te==t)));this.wl_permute=e,this.weapon_list=this.weapon_list.sort(t),this.weapon_sets=[],this.brace_count=0,this.isheli=!1}toJSON(){const t=[];for(const e of this.weapon_sets)t.push(e.toJSON());return{weapon_systems:t,brace_count:this.brace_count}}fromJSON(t,e){this.weapon_sets=[];const s=t.weapon_systems;for(const t of s){const s=new ut(this.weapon_list,this.wl_permute);s.SetCalculateStats(this.CalculateStats),s.fromJSON(t,e),this.weapon_sets.push(s)}e>10.35&&(this.brace_count=t.brace_count)}serialize(t){t.PushNum(this.weapon_sets.length);for(const e of this.weapon_sets)e.serialize(t);t.PushNum(this.brace_count)}deserialize(t){this.weapon_sets=[];const e=t.GetNum();for(let s=0;s10.35&&(this.brace_count=t.GetNum())}GetWeaponList(){return this.weapon_list}GetDirectionList(){return this.direction_list}GetSynchronizationList(){return this.synchronization_list}SetWeaponSetCount(t){for((t!=t||t<1)&&(t=0),t=Math.floor(1e-6+t);t>this.weapon_sets.length;){const t=new ut(this.weapon_list,this.wl_permute);t.SetCalculateStats(this.CalculateStats),this.weapon_sets.push(t)}for(;t=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER)return void e[t].SetSynchronization(F.INTERRUPT)}}RemoveOneArtyTractorSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(F.NO_INTERFERENCE)}}RemoveOnePusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER)return void e[t].SetSynchronization(F.INTERRUPT)}}RemoveOneArtyPusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(F.NO_INTERFERENCE)}}CanTractorSpinner(){return this.CountTractorSpinner()+this.CountArtyTractorSpinner()this.tractor_arty_spinner_count;)this.RemoveOneArtyTractorSpinner();for(;this.CountTractorSpinner()>this.tractor_spinner_count;)this.RemoveOneTractorSpinner();for(;this.CountArtyPusherSpinner()>this.pusher_arty_spinner_count;)this.RemoveOneArtyPusherSpinner();for(;this.CountPusherSpinner()>this.pusher_spinner_count;)this.RemoveOnePusherSpinner();var e=0,s=0;0==this.cant_type?(e=4,s=2):1==this.cant_type?(e=8,s=4):(e=16,s=8);const i=[];for(const t of this.weapon_sets)for(const e of t.GetWeapons()){e.wing_reinforcement=!1;const s={total:0,count:0,sz:0,w:e};e.GetWing()&&(s.count=e.GetCount(),s.sz=this.weapon_list[t.GetWeaponSelected()].size,s.total=s.count*s.sz,i.push(s))}i.sort((function(t,e){return t.total-e.total}));for(const t of i)e>=0&&(s0,t=t.Add(e.PartStats());return t.cost+=this.brace_count/3,this.brace_count>0&&t.warnings.push({source:h("Weapons Braces"),warning:h("Weapons Braces Warning"),color:c.WHITE}),t.control-=Math.floor(1e-6+this.GetWingWeight()/5),t}GetElectrics(){const t={storage:0,equipment:[]};for(let e=0;e11.55&&(this.blade_idx=t.blade_idx),e<12.45&&(this.rotor_span=0),this.rotor_thickness=e<12.55?0:t.rotor_thickness,this.dryMP=-1}serialize(t){t.PushNum(this.type),t.PushNum(this.rotor_count),t.PushNum(this.rotor_span),t.PushNum(this.cant_idx),t.PushNum(this.stagger_sel),t.PushBool(this.accessory),t.PushNum(this.blade_idx),t.PushNum(this.rotor_thickness)}deserialise(t){this.type=t.GetNum(),this.rotor_count=t.GetNum(),this.rotor_span=t.GetNum(),this.cant_idx=t.GetNum(),t.version<12.35?(t.GetBool(),this.stagger_sel=0):this.stagger_sel=t.GetNum(),this.accessory=t.GetBool(),t.version>11.55&&(this.blade_idx=t.GetNum()),t.version<12.45&&(this.rotor_span=0),t.version<12.55?this.rotor_thickness=0:this.rotor_thickness=t.GetNum(),this.dryMP=-1}SetCantileverList(t){this.cant_list=t}GetCantileverList(){return this.cant_list}SetCantilever(t){this.cant_idx=t,this.CalculateStats()}GetCantilever(){return this.cant_idx}SetRotorThickness(t){t<0&&(t=0),this.rotor_thickness=Math.floor(1e-6+t),this.CalculateStats()}GetRotorThickness(){return this.rotor_thickness}SetType(t){this.type!=t&&(this.accessory=!1,this.cant_idx=0,this.stagger_sel=0,this.rotor_count=1,this.type=t,this.rotor_span=0)}CanRotorCount(){return this.type==k.HELICOPTER}SetRotorCount(t){t<1&&(t=1),t>=2&&t%2==1&&(t==this.rotor_count+1?t+=1:t-=1),this.rotor_count=t,this.rotor_count<2&&(this.stagger_sel=0),this.CalculateStats()}GetRotorCount(){return this.rotor_count}CanRotorSpan(){return this.type==k.HELICOPTER}SetRotorSpan(t){this.rotor_span=Math.floor(1e-6+t),this.CalculateStats()}GetRotorSpan(){return this.rotor_span}CanTandem(){return this.type==k.HELICOPTER&&this.rotor_count>1}SetBladeCount(t){this.blade_idx=t,this.CalculateStats()}SetWingArea(t){this.wing_area=t}GetSizingSpan(){return this.sizing_span}SetMP(t){t!=this.dryMP&&(this.dryMP=t,this.CalculateStats())}GetRotorStrain(){const t=this.GetRotorArea();return this.rotor_count*Math.max(1,2*(this.sizing_span+this.rotor_span)+t-10)}GetRotorArea(){return Math.PI/9*(this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span)}GetIdealRotorArea(){return Math.PI/9*this.sizing_span*this.sizing_span}GetRotorDrag(){if(this.type==k.HELICOPTER||this.type==k.AUTOGYRO){const t=this.GetRotorArea();return 1==this.rotor_count?Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))):Math.floor(1e-6+.75*this.rotor_count*Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))))}return 0}GetType(){return this.type}GetAccessory(){return this.accessory}SetAccessory(t){this.accessory=t,this.CalculateStats()}SetEngineCount(t){this.engine_count=t}GetTailRotor(){return this.type==k.HELICOPTER&&this.rotor_count<2}GetBladeList(){return this.blade_list}GetRotorBleed(){return this.type==k.HELICOPTER?this.blade_list[this.blade_idx].rotor_bleed:0}GetPowerFactor(){return this.stagger_list[this.stagger_sel].powerfactor}GetBladeCountIdx(){return this.blade_idx}GetStaggerList(){return this.stagger_list}GetStagger(){return this.stagger_sel}SetStagger(t){t!=this.stagger_sel&&(this.stagger_sel=t,this.CalculateStats())}CanStagger(){const t=[];for(let e=0;e=2&&3==this.stagger_list[e].count?t.push(!0):t.push(!1);return t}VerifySizes(){this.type==k.AIRPLANE?(this.rotor_count=0,this.rotor_span=0,this.stagger_sel=0):this.type==k.AUTOGYRO?(this.rotor_count=1,this.sizing_span=Math.ceil(-1e-6+Math.sqrt(.6*this.wing_area/(Math.PI/8))),this.rotor_span=Math.max(this.rotor_span,2-this.sizing_span),this.stagger_sel=0):this.type==k.HELICOPTER&&(this.rotor_count=Math.max(1,this.rotor_count),this.rotor_count>1&&this.rotor_count%2==1&&(this.rotor_count=this.rotor_count-1),-1!=this.dryMP?(1==this.rotor_count?this.sizing_span=Math.ceil(5*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6):this.sizing_span=Math.ceil(4*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6),this.sizing_span=Math.min(100,this.sizing_span),this.rotor_span=Math.max(this.rotor_span,-Math.floor(1e-6+this.sizing_span/2))):this.sizing_span=10)}VerifyStagger(){if(this.rotor_count>2&&this.stagger_list[this.stagger_sel].count<=2){for(let t=0;t0&&(1==t.GetReload()?e.push(h("Weapon Tag Manual")):e.push(h("Weapon Tag Reload",t.GetReload()))),s.rapid&&e.push(h("Weapon Tag Rapid Fire")),s.shells&&e.push(h("Weapon Tag Shells")),s.ap>0&&e.push(h("Weapon Tag AP",s.ap)),t.GetIsFullyAccessible()?e.push(h("Weapon Tag Fully Accessible")):t.GetIsPartlyAccessible()?e.push(h("Weapon Tag Partly Accessible")):e.push(h("Weapon Tag Inaccessible")),s.deflection&&e.push(h("Weapon Tag Awkward",s.deflection)),e}function bt(t,e,s){var i="";const a=t.GetDirection(),n=[];for(let t=0;t{this.CalculateStats()})),this.cockpits.SetCalculateStats((()=>{this.CalculateStats()})),this.passengers.SetCalculateStats((()=>{this.CalculateStats()})),this.engines.SetCalculateStats((()=>{this.CalculateStats()})),this.propeller.SetCalculateStats((()=>{this.CalculateStats()})),this.frames.SetCalculateStats((()=>{this.CalculateStats()})),this.wings.SetCalculateStats((()=>{this.CalculateStats()})),this.stabilizers.SetCalculateStats((()=>{this.CalculateStats()})),this.controlsurfaces.SetCalculateStats((()=>{this.CalculateStats()})),this.reinforcements.SetCalculateStats((()=>{this.CalculateStats()})),this.fuel.SetCalculateStats((()=>{this.CalculateStats()})),this.munitions.SetCalculateStats((()=>{this.CalculateStats()})),this.cargo.SetCalculateStats((()=>{this.CalculateStats()})),this.gear.SetCalculateStats((()=>{this.CalculateStats()})),this.accessories.SetCalculateStats((()=>{this.CalculateStats()})),this.optimization.SetCalculateStats((()=>{this.CalculateStats()})),this.weapons.SetCalculateStats((()=>{this.CalculateStats()})),this.used.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCalculateStats((()=>{this.CalculateStats()})),this.alter.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCantileverList(this.reinforcements.GetCantileverList()),this.cockpits.SetNumberOfCockpits(1),this.engines.SetNumberOfEngines(1),this.frames.SetTailType(1),this.use_storage=e,this.updated_stats=!1,this.freeze_calculation=!1,this.aircraft_type=k.AIRPLANE,this.Reset()}InteractiveDash(){const t=this.GetStats(),e=this.GetDerivedStats(),s=this.VitalComponentList();for(var i=!1;s.length>10;)s.pop(),i=!0;for(i&&(s.pop(),s.push("And More. See Plane Builder for full list."));s.length<10;)s.push("");const a=this.GetAccessories().GetEffectiveCoverage();var r="";for(let t=0;t0&&(r+=""!=r?", ":h("Armour")+" ",r+=e.toString()+"/+"+(11-a[t]).toString())}const n=[],o=this.GetMunitions().GetBombCount(),l=this.GetMunitions().GetRocketCount();var c=this.GetMunitions().GetInternalBombCount();if((o>0||l>0)&&n.push("Current load here."),o>0){const t=Math.min(o,c),e=Math.max(0,o-t);if(t>0&&n.push(h(" Bomb Mass Internally.",t)),e>0&&n.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.GetMunitions().GetMaxBombSize());n.push(h("Largest Internal Bomb",e.toString()))}c-=t}if(l>0){const t=Math.min(l,c),e=Math.max(0,l-t);t>0&&n.push(h(" Rocket Mass Internally.",t)),e>0&&n.push(h(" Rocket Mass Externally.",e))}for(;n.length<5;)n.push("");let u="";for(const e of t.warnings)u+=e.source+": "+e.warning+"\n";const _={altitude:0,airspeed:0,fuel:e.FuelUses,dropoff:e.Dropoff,visibility:this.GetCockpits().GetCockpit(0).GetVisibility(),energy_loss:e.EnergyLoss,turn_bleed:e.TurnBleed,stability:e.Stabiilty,stress:this.GetCockpits().GetCockpit(0).GetFlightStress()[0],plane_escape:this.GetCockpits().GetCockpit(0).GetEscape(),crash:this.GetCockpits().GetCockpit(0).GetCrash(),max_toughness:e.Toughness,current_toughness:e.Toughness,max_strain:e.MaxStrain,current_strain:e.MaxStrain,g_force:0,kills:0,full_load_boost:e.BoostFullwBombs,full_load_handling:e.HandlingFullwBombs,full_load_climb:e.RateOfClimbwBombs,full_load_stall:e.StallSpeedFullwBombs,full_load_speed:e.MaxSpeedwBombs,half_fuel_bombs_boost:Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),half_fuel_bombs_handling:Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),half_fuel_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),half_fuel_bombs_stall:Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),half_fuel_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),full_fuel_no_bombs_boost:e.BoostFull,full_fuel_no_bombs_handling:e.HandlingFull,full_fuel_no_bombs_climb:e.RateOfClimbFull,full_fuel_no_bombs_stall:e.StallSpeedFull,full_fuel_no_bombs_speed:Math.floor(1e-6+e.MaxSpeedFull),half_fuel_no_bombs_boost:Math.floor((e.BoostFull+e.BoostEmpty)/2),half_fuel_no_bombs_handling:Math.floor((e.HandlingFull+e.HandlingEmpty)/2),half_fuel_no_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),half_fuel_no_bombs_stall:Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),half_fuel_no_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),empty_boost:0,empty_handling:e.HandlingEmpty,empty_climb:0,empty_stall:e.StallSpeedEmpty,empty_speed:0,vital_part_1:s[0],vital_part_2:s[1],vital_part_3:s[2],vital_part_4:s[3],vital_part_5:s[4],vital_part_6:s[5],vital_part_7:s[6],vital_part_8:s[7],vital_part_9:s[8],vital_part_10:s[9],armor:r,max_bomb_load:n[0],ordinance_1:n[1],ordinance_2:n[2],ordinance_3:n[3],ordinance_4:n[4],notes:u,full_load_selected:!0,half_fuel_bombs_selected:!1,full_fuel_no_bombs_selected:!1,half_fuel_no_bombs_selected:!1,empty_selected:!1,engines:this.InteractiveEngines(),weapons:this.InteractiveWeapons()};return JSON.stringify(_)}InteractiveEngines(){const t=[];for(let e=0;e0&&t.starter&&n.push(h("Starter"))}else{s.IsRotary()&&s.IsTractor()?n.push(h("Turns Right")):s.IsRotary()&&s.IsPusher()&&n.push(h("Turns Left"));const t=x().get(s.GetSelectedList()).get_name(a.name);t.upgrades[1]?n.push(h("War Emergency Power")):t.compressor_count>0&&1==t.compressor_type&&n.push(h("War Emergency Power from altitudes 0-9"))}if(i.notes=r.Join(", ",n),s.GetUsePushPull()){const e=i.reliability.split("/");i.reliability=e[0].toString(),t.push(JSON.stringify(i)),i.reliability=e[0].toString(),t.push(JSON.stringify(i))}else t.push(JSON.stringify(i))}return t}InteractiveWeapons(){const t=[];for(const s of this.GetWeapons().GetWeaponSets()){const i=this.GetWeapons().GetWeaponList(),a=s.GetHits(),n=[];"PR"==i[s.GetWeaponSelected()].abrv?(n.push(5),n.push(5),n.push(5),n.push(5)):(n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[0])),n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[1])),n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[2])),n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[3])));const o=s.GetFinalWeapon(),l=[],c={type:dt(s,i),ammo:s.GetShots(),ap:o.ap,jam:s.GetJam(),knife_hits:a[0],close_hits:a[1],long_hits:a[2],extreme_hits:a[3],knife_damage:n[0],close_damage:n[1],long_damage:n[2],extreme_damage:n[3],tags:""},u=this.GetWeapons().GetDirectionList();s.IsPlural()&&(c.type=s.GetWeaponCount().toString()+"x "+c.type);const _=s.GetDirection();var e="";e+="[";for(let t=0;t11.05?(this.aircraft_type=t.aircraft_type,this.rotor.SetType(t.aircraft_type)):(this.aircraft_type=k.AIRPLANE,this.rotor.SetType(k.AIRPLANE)),this.era.fromJSON(t.era,s),this.cockpits.fromJSON(t.cockpits,s),this.passengers.fromJSON(t.passengers,s),this.engines.fromJSON(t.engines,s),this.propeller.fromJSON(t.propeller,s),this.frames.fromJSON(t.frames,s),this.wings.fromJSON(t.wings,s),this.stabilizers.fromJSON(t.stabilizers,s),this.controlsurfaces.fromJSON(t.controlsurfaces,s),this.reinforcements.fromJSON(t.reinforcements,s),this.fuel.fromJSON(t.fuel,s),this.munitions.fromJSON(t.munitions,s),this.cargo.fromJSON(t.cargo,s),this.gear.fromJSON(t.gear,s),this.accessories.fromJSON(t.accessories,s),this.optimization.fromJSON(t.optimization,s),this.weapons.fromJSON(t.weapons,s),s>10.65&&this.used.fromJSON(t.used,s),s>11.05&&this.rotor.fromJSON(t.rotor,s),s>12.25?this.alter.fromJSON(t.alter,s):this.alter.ClearAll(),this.freeze_calculation=!1,!0}serialize(t){t.PushString(this.version),t.PushString(this.name),this.era.serialize(t),this.cockpits.serialize(t),this.passengers.serialize(t),this.engines.serialize(t),this.propeller.serialize(t),this.frames.serialize(t),this.wings.serialize(t),this.stabilizers.serialize(t),this.controlsurfaces.serialize(t),this.reinforcements.serialize(t),this.fuel.serialize(t),this.munitions.serialize(t),this.cargo.serialize(t),this.gear.serialize(t),this.accessories.serialize(t),this.optimization.serialize(t),this.weapons.serialize(t),this.used.serialize(t),this.rotor.serialize(t),t.PushNum(this.aircraft_type),this.alter.serialize(t)}deserialize(t){this.freeze_calculation=!0,t.version=parseFloat(t.GetString()),this.name=t.GetString(),this.era.deserialize(t),this.cockpits.deserialize(t),this.passengers.deserialize(t),this.engines.deserialize(t),this.propeller.deserialize(t),this.frames.deserialize(t),this.wings.deserialize(t),this.stabilizers.deserialize(t),this.controlsurfaces.deserialize(t),this.reinforcements.deserialize(t),this.fuel.deserialize(t),this.munitions.deserialize(t),this.cargo.deserialize(t),this.gear.deserialize(t),this.accessories.deserialize(t),this.optimization.deserialize(t),this.weapons.deserialize(t),t.version>10.65&&this.used.deserialize(t),t.version>11.05&&t.GetRemaining()>0?(this.rotor.deserialise(t),this.aircraft_type=t.GetNum(),this.rotor.SetType(this.aircraft_type)):(this.aircraft_type=k.AIRPLANE,this.rotor.SetType(k.AIRPLANE)),t.version>12.25?this.alter.deserialize(t):this.alter.ClearAll(),this.freeze_calculation=!1}SetType(t){this.aircraft_type=t,this.rotor.SetType(t),this.CalculateStats()}SetDisplayCallback(t){this.DisplayCallback=t}CalculateStats(){if(this.freeze_calculation)return;this.recurrent_calculation_depth=this.recurrent_calculation_depth+1,this.updated_stats=!1;let t=new u;if(t=t.Add(this.era.PartStats()),t=t.Add(this.cockpits.PartStats()),t=t.Add(this.passengers.PartStats()),this.engines.SetTailMods(this.frames.GetFarmanOrBoom(),this.wings.GetSwept()&&this.stabilizers.GetVOutboard(),this.stabilizers.GetCanard()),this.engines.SetInternal(this.aircraft_type==k.HELICOPTER||H(this.aircraft_type)),this.engines.SetMetalArea(this.wings.GetMetalArea()),this.engines.HaveParasol(this.wings.GetParasol()),t=t.Add(this.engines.PartStats()),this.propeller.SetEngineTypes(this.engines.GetEngineTypes()),this.propeller.SetAcftType(this.aircraft_type),t=t.Add(this.propeller.PartStats()),t=t.Add(this.fuel.PartStats()),t=t.Add(this.munitions.PartStats()),this.weapons.SetNumberOfCockpits(this.cockpits.GetNumberOfCockpits()),this.weapons.SetTractorInfo(this.engines.GetTractorSpinner()),this.weapons.SetPusherInfo(this.engines.GetPusherSpinner()),this.weapons.cant_type=this.reinforcements.GetCantileverType(),this.weapons.SetHavePropeller(this.engines.GetNumPropellers()>0),this.weapons.SetCanWing(!H(this.aircraft_type)),t=t.Add(this.weapons.PartStats()),t=t.Add(this.cargo.PartStats()),this.wings.SetAcftType(this.aircraft_type),this.aircraft_type==k.AUTOGYRO?this.wings.SetRotorSpan(this.rotor.GetRotorSpan()):this.wings.SetRotorSpan(0),t=t.Add(this.wings.PartStats()),this.rotor.SetWingArea(t.wingarea),this.aircraft_type==k.AUTOGYRO&&(this.rotor.SetEngineCount(this.engines.GetNumberOfEngines()),t=t.Add(this.rotor.PartStats())),this.controlsurfaces.SetWingArea(t.wingarea),this.controlsurfaces.SetBoomTail(this.frames.GetUseBoom()),this.controlsurfaces.SetSpan(this.wings.GetSpan()),this.controlsurfaces.SetAcftType(this.aircraft_type),this.controlsurfaces.SetCanElevator(this.stabilizers.GetHStabCount()>0),this.controlsurfaces.SetCanRudder(this.stabilizers.GetVStabCount()>0),this.controlsurfaces.SetIsVTail(this.stabilizers.GetIsVTail()),this.aircraft_type==k.AIRPLANE?this.controlsurfaces.SetNumCantilever(this.reinforcements.GetTotalCantilevers()):this.controlsurfaces.SetNumCantilever(0),t=t.Add(this.controlsurfaces.PartStats()),this.reinforcements.SetMonoplane(this.wings.GetMonoplane()),this.reinforcements.SetTandem(this.wings.GetTandem()),this.reinforcements.SetStaggered(this.wings.GetStaggered()),this.reinforcements.SetCanUseExternal(this.wings.GetArea()>0),this.reinforcements.SetSesquiplane(this.wings.GetIsSesquiplane()),this.reinforcements.SetAircraftType(this.aircraft_type),this.reinforcements.SetCantLift(this.era.GetCantLift()),t=t.Add(this.reinforcements.PartStats()),this.rotor.GetTailRotor()&&(t.power=Math.floor(1e-6+.9*t.power)),this.accessories.SetAcftRadiator(this.engines.GetNumberOfRadiators()>0),this.accessories.SetSkinArmor(this.frames.GetArmor()),this.accessories.SetCanCutouts(this.wings.CanCutout(),this.frames.CanCutout()),t=t.Add(this.accessories.PartStats()),this.frames.SetRequiredSections(t.reqsections),this.frames.SetHasTractorNacelles(this.engines.GetHasTractorNacelles()),this.frames.SetIsTandem(this.wings.GetTandem()),t=t.Add(this.frames.PartStats()),this.stabilizers.SetEngineCount(this.engines.GetNumberOfEngines()),this.stabilizers.SetIsTandem(this.wings.GetTandem()),this.stabilizers.SetIsSwept(this.wings.GetSwept()),this.stabilizers.SetHaveTail(!this.frames.GetIsTailless()),this.stabilizers.SetHelicopter(!1),this.stabilizers.SetLiftingArea(t.wingarea),this.stabilizers.wing_drag=this.wings.GetWingDrag()+this.rotor.GetRotorDrag(),t=t.Add(this.stabilizers.PartStats()),this.wings.SetAircraftMass(t.mass),t.mass+=this.wings.GetPaperMass(),t.mass=Math.max(1,t.mass),this.gear.SetGull(this.wings.HasInvertedGull()),this.gear.SetLoadedMass(t.mass+t.wetmass),this.gear.CanBoat(this.engines.GetEngineHeight(),this.wings.GetWingHeight()),t=t.Add(this.gear.PartStats()),t.toughness+=Math.floor(1e-6+t.structure/5),this.optimization.SetAcftStats(t),t=t.Add(this.optimization.PartStats()),this.cockpits.SetHasRotary(this.engines.HasTractorRotary()),t=t.Add(this.alter.PartStats()),t.Round(),!this.updated_stats){this.updated_stats=!0,this.stats=t;const e=this.GetDerivedStats();this.stats.cost+=this.controlsurfaces.GetFlapCost(e.DryMP),t.reliability-=this.used.burnt_out,this.weapons.SetStickyGuns(this.used.sticky_guns),this.cockpits.SetArmed(this.weapons.GetArmedSeats()),this.cockpits.UpdateCrewStats(this.stats.escape,e.ControlStress,e.RumbleStress,this.stats.visibility,this.stats.crashsafety);let s=0;for(const t of this.cockpits.GetStressList())s=Math.max(s,t[0]-t[1]);0!=s&&-1==this.stats.warnings.findIndex((t=>t.source==h("Co-Pilot Controls")))&&this.stats.warnings.push({source:h("Co-Pilot Controls"),warning:h("Co-Pilot Warning",s),color:c.WHITE}),H(this.aircraft_type)&&(t.upkeep+=1),this.aircraft_type==k.ORNITHOPTER_BUZZER&&(t.reliability-=2),this.engines.UpdateReliability(t),this.reinforcements.SetAcftStructure(t.structure),this.fuel.SetArea(this.wings.GetArea()),this.fuel.SetCantilever(this.reinforcements.GetIsCantilever()),this.accessories.SetVitalParts(this.VitalComponentList().length),this.munitions.SetAcftParameters(t.structure,this.era.GetMaxBomb(),this.wings.HasInvertedGull()),this.stats.cost=Math.max(1,this.stats.cost),this.stats.liftbleed=Math.max(1,this.stats.liftbleed),10*this.engines.GetRumble()>t.structure&&(this.stats.power=0,this.stats.warnings.push({source:h("Stat Rumble"),warning:h("Rumble Warning"),color:c.RED})),this.use_storage&&window.localStorage.setItem("aircraft",JSON.stringify(this))}this.recurrent_calculation_depth=this.recurrent_calculation_depth-1,this.DisplayCallback&&!this.freeze_calculation&&0==this.recurrent_calculation_depth&&this.DisplayCallback()}GetDerivedStats(){let t=Math.floor(1e-6+this.stats.mass/5);t=Math.max(t,1);let e=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass)/5);e=Math.max(e,1);let s=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass+this.stats.bomb_mass)/5);s=Math.max(s,1);let i=Math.floor(1e-6+(this.stats.drag+t)/5);i=Math.max(i,1);const a=i;let r=Math.floor(1e-6+(this.stats.drag+this.munitions.GetExternalMass()+t)/5);r=Math.max(r,1);let n=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*i))),o=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*a))),l=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*r)));this.stats.mass<15&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Mass")))&&this.stats.warnings.push({source:h("Stat Mass"),warning:h("Low Mass Warning"),color:c.YELLOW}),this.stats.drag+t<35&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Drag")))&&this.stats.warnings.push({source:h("Stat Drag"),warning:h("Low Drag Warning"),color:c.YELLOW});let u=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*t/Math.max(1,this.stats.wingarea))),_=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*e/Math.max(1,this.stats.wingarea))),p=Math.max(Math.floor(1e-6+this.stats.liftbleed*s/Math.max(1,this.stats.wingarea)));var m=this.engines.GetOverspeed();const g=Math.floor(1e-6+this.stats.power/t),f=Math.floor(1e-6+this.stats.power/e),d=Math.floor(1e-6+this.stats.power/s);0==d&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Boost")))&&this.stats.warnings.push({source:h("Derived Boost"),warning:h("Boost Warning"),color:c.RED});const y=Math.floor(1e-6+this.stats.pitchboost*n);n=Math.floor(1e-6+n*(1-.1*this.used.ragged)),o=Math.floor(1e-6+o*(1-.1*this.used.ragged)),l=Math.floor(1e-6+l*(1-.1*this.used.ragged));let b=this.stats.pitchstab+this.stats.latstab;this.stats.pitchstab>0&&this.stats.latstab>0?b+=2:this.stats.pitchstab<0&&this.stats.latstab<0&&(b-=2);let S=100+this.stats.control-t;b>10||b<-10?(S=-1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Stability")))&&this.stats.warnings.push({source:h("Derived Stability"),warning:h("Stability Warning"),color:c.RED})):10==b?S-=4:b>6?S-=3:b>3?S-=2:b>0?S-=1:0==b?S+=0:b>-4?S+=1:b>-7?S+=2:b>-10?S+=3:-10==b&&(S+=4);let w=S+t-e,C=S+t-s;S=Math.floor(1e-6+S-5*this.used.sluggish),w=Math.floor(1e-6+w-5*this.used.sluggish),C=Math.floor(1e-6+C-5*this.used.sluggish);let P=Math.min(this.stats.maxstrain-t,this.stats.structure);this.optimization.final_ms=Math.floor(1e-6+1.5*this.optimization.GetMaxStrain()*P/10),P+=this.optimization.final_ms,P=Math.floor(1e-6+P*(1-.2*this.used.fragile)),P<10&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Max Strain")))&&this.stats.warnings.push({source:h("Stat Max Strain"),warning:h("Max Strain Warning"),color:c.RED});let G=this.stats.toughness;G=Math.floor(1e-6+G*(1-.5*this.used.weak));const M=this.stats.structure;let R=Math.ceil(i/this.propeller.GetEnergy()-1e-6),v=R+1;R=Math.min(R,10),v=Math.min(v,10);let A=Math.ceil(Math.floor(1e-6+(u+_)/2)/this.propeller.GetTurn()-1e-6);this.aircraft_type==k.HELICOPTER&&(A=Math.max(1,Math.floor(1e-6+t/2))+this.rotor.GetRotorBleed(),R=Math.max(1,Math.floor(1e-6+i/7)),u=0,_=0,p=0,n=Math.min(37,n),o=Math.min(37,o),l=Math.min(37,l)),A=Math.max(A,1);let I=A+1;I=Math.max(I,1),u=Math.max(1,Math.floor(1e-6+u*(1+.2*this.used.hefty))),_=Math.max(1,Math.floor(1e-6+_*(1+.2*this.used.hefty))),p=Math.max(1,Math.floor(1e-6+p*(1+.2*this.used.hefty))),(l<=p||o<=_)&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stall Speed")))&&this.stats.warnings.push({source:h("Stall Speed"),warning:h("Stall Speed Warning"),color:c.RED});let E=Math.floor(1e-6+this.stats.fuel/this.stats.fuelconsumption);E=Math.floor(1e-6+E*(1-.2*this.used.leaky)),isFinite(E)||(E=0),E<6&&0!=this.stats.fuelconsumption&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Fuel Uses")))&&this.stats.warnings.push({source:h("Derived Fuel Uses"),warning:h("Fuel Uses Warning"),color:c.YELLOW});let N=1;(b>3||b<-3)&&N++;let T=0;N+=Math.min(this.accessories.GetMaxMassStress(),Math.floor(1e-6+t/10));const x=this.accessories.GetMaxTotalStress();N=Math.min(x,N),this.engines.GetMaxRumble()>0&&(T+=Math.max(1,.5*this.engines.GetRumble()),T=Math.floor(1e-6+T),T=Math.min(3,T)),0==x&&(T=0);let W=Math.max(1,Math.floor(1e-6+this.stats.power/t*(23/this.stats.pitchspeed)/i)),O=Math.max(1,Math.floor(1e-6+this.stats.power/e*(23/this.stats.pitchspeed)/a)),F=Math.max(1,Math.floor(1e-6+this.stats.power/s*(23/this.stats.pitchspeed)/r));return isFinite(W)||(W=0,O=0,F=0),H(this.aircraft_type)&&(S+=5,w+=5,C+=5,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Stall")))&&this.stats.warnings.push({source:h("Ornithopter Stall"),warning:h("Ornithopter Stall Warning"),color:c.WHITE}),m=P),this.aircraft_type==k.ORNITHOPTER_FLUTTER&&(S+=5,w+=5,C+=5,m=1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Flutterer Attack")))&&this.stats.warnings.push({source:h("Ornithopter Flutterer Attack"),warning:h("Ornithopter Flutterer Attack Warning"),color:c.WHITE})),this.aircraft_type==k.ORNITHOPTER_BUZZER&&(-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Boost")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Boost"),warning:h("Ornithopter Buzzer Boost Warning"),color:c.WHITE}),-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Stall")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Stall"),warning:h("Ornithopter Buzzer Stall Warning"),color:c.WHITE})),{DryMP:t,WetMP:e,WetMPwBombs:s,DPEmpty:i,DPFull:a,DPwBombs:r,MaxSpeedEmpty:n,MaxSpeedFull:o,MaxSpeedwBombs:l,StallSpeedEmpty:u,StallSpeedFull:_,StallSpeedFullwBombs:p,Overspeed:m,BoostEmpty:g,BoostFull:f,BoostFullwBombs:d,Dropoff:y,Stabiilty:b,HandlingEmpty:S,HandlingFull:w,HandlingFullwBombs:C,MaxStrain:P,Toughness:G,Structure:M,EnergyLoss:R,EnergyLosswBombs:v,TurnBleed:A,TurnBleedwBombs:I,FuelUses:E,ControlStress:N,RumbleStress:T,RateOfClimbFull:O,RateOfClimbEmpty:W,RateOfClimbwBombs:F}}VitalComponentList(){const t=this.GetDerivedStats(),e=[];e.push(h("Vital Part Controls"));for(let t=0;t0&&e.push(h("Vital Part Fuel Tanks"));for(let t=0;t{let s=parseInt(t.charge);"-"==t.charge&&(s=0);let i=parseInt(e.charge);return"-"==e.charge&&(i=0),isNaN(s)&&isNaN(i)?0:isNaN(s)?-1:isNaN(i)?1:i-s})),t=z(this.engines.GetElectrics(),t),t=z(t,this.weapons.GetElectrics());let e=!1;for(const s of t.equipment){const t=parseInt(s.charge);!isNaN(t)&&t>0&&(s.charge="+"+s.charge,e=!0)}return t.equipment.length>0&&t.storage<=0&&!e&&-1==this.stats.warnings.findIndex((t=>t.source==h("Insufficient Charge")))&&this.stats.warnings.push({source:h("Insufficient Charge"),warning:h("Insufficient Charge Warning"),color:c.RED}),t}}function wt(t,e,s){const i=new Blob([t],{type:s}),a=document.createElement("a"),r=URL.createObjectURL(i);a.href=r,a.download=e,document.body.appendChild(a),a.click(),setTimeout((function(){document.body.removeChild(a),window.URL.revokeObjectURL(r)}),0)}function Ct(t,e){const s=document.createElement("TH");return s.innerHTML=e,t.appendChild(s),s}function Pt(t,e,s){const i=document.createElement("LABEL");i.style.marginLeft="0.25em",i.style.marginRight="0.5em",i.textContent=t,i.classList.add("flex-item"),s.div1.appendChild(i);const a=document.createElement("LABEL");return a.style.marginLeft="0.25em",a.style.marginRight="0.5em",a.textContent=e,a.classList.add("flex-item"),s.div2.appendChild(a),[i,a]}function Gt(t){const e=document.createElement("TR");return t.append(e),e}function Mt(t){t.classList.toggle("changed_b",!1),t.classList.toggle("changed_g",!1),t.classList.toggle("changed_n",!1),t.offsetHeight,t.classList.toggle("changed_n")}function Rt(t){const e=new Uint8Array(t.length);for(let s=0;s0;)this.version_cell.removeChild(this.version_cell.children[0]);this.version_cell.className="tooltip";const i=document.createElement("DIV");i.className="tooltiptext";let a=document.createElement("P");a.textContent=h("Derived Problematic Parts"),i.appendChild(a);const n=p(t.GetEra().GetSelectedText());var o=0;for(let t of e.era){const e=p(t.era);if(e>n){o+=e-n;let s=document.createElement("P");s.textContent=t.name+": "+t.era,i.appendChild(s)}}if(0==o){let t=document.createElement("P");t.textContent=h("None"),i.appendChild(t)}const l=document.createElement("P");for(l.textContent=h(t.GetEra().GetSelectedText()),l.className=0==o?"green":o>2?"red":"yellow",this.version_cell.appendChild(l),this.version_cell.appendChild(i),this.cost_cell.textContent=e.cost.toString()+"þ ",t.GetUsed().IsDefault()||(this.cost_cell.textContent+=" ("+Math.floor(1e-6+e.cost/2).toString()+"þ "+h("Price Word Used")+")"),this.upkeep_cell.textContent=e.upkeep.toString()+"þ",this.ts_empty.textContent=(0).toString(),this.ss_empty.textContent=s.StallSpeedEmpty.toString(),this.hand_empty.textContent=s.HandlingEmpty.toString(),this.boost_empty.textContent=(0).toString(),this.roc_empty.textContent=(0).toString(),this.ts_half.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedFull)/2).toString(),this.ss_half.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFull)/2).toString(),this.hand_half.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFull)/2).toString(),this.boost_half.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFull)/2).toString(),this.roc_half.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbFull)/2).toString(),this.ts_full.textContent=Math.floor(1e-6+s.MaxSpeedFull).toString(),this.ss_full.textContent=s.StallSpeedFull.toString(),this.hand_full.textContent=s.HandlingFull.toString(),this.boost_full.textContent=s.BoostFull.toString(),this.roc_full.textContent=s.RateOfClimbFull.toString(),e.bomb_mass>0||this.show_bombs?(this.bomb_row1.hidden=!1,this.bomb_row2.hidden=!1,this.bomb_row2.appendChild(this.vital_components),this.vital_components.rowSpan=5,this.ts_halfwB.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedwBombs)/2).toString(),this.ss_halfwB.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFullwBombs)/2).toString(),this.hand_halfwB.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFullwBombs)/2).toString(),this.boost_halfwB.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFullwBombs)/2).toString(),this.roc_halfwB.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbwBombs)/2).toString(),this.ts_fullwB.textContent=Math.floor(1e-6+s.MaxSpeedwBombs).toString(),this.ss_fullwB.textContent=s.StallSpeedFullwBombs.toString(),this.hand_fullwB.textContent=s.HandlingFullwBombs.toString(),this.boost_fullwB.textContent=s.BoostFullwBombs.toString(),this.roc_fullwB.textContent=s.RateOfClimbwBombs.toString(),this.turnbleed_label.textContent=h("Derived Turn Bleed wB"),this.turnbleed_cell.textContent=r.Format("{0} ({1})",s.TurnBleed,s.TurnBleedwBombs)):(this.bomb_row1.hidden=!0,this.bomb_row2.hidden=!0,this.full_row.appendChild(this.vital_components),this.vital_components.rowSpan=3,this.turnbleed_label.textContent=h("Derived Turn Bleed"),this.turnbleed_cell.textContent=r.Format("{0}",s.TurnBleed)),this.dropoff_cell.textContent=s.Dropoff.toString(),this.overspeed_cell.textContent=s.Overspeed.toString(),this.maxfuel_cell.textContent=(Math.floor(1e-6+10*s.FuelUses)/10).toString(),t.GetIsFlammable()?this.flammable_cell.textContent=h("Yes"):this.flammable_cell.textContent=h("No"),this.stability_cell.textContent=s.Stabiilty.toString(),this.eloss_cell.textContent=s.EnergyLoss.toString(),this.landing_cell.textContent=t.GetGearName(),this.maxalt_cell.textContent=t.GetMinAltitude().toString()+"-"+t.GetMaxAltitude().toString(),this.reliability_cell.textContent=r.Join(", ",t.GetReliabilityList()),this.toughness_cell.textContent=s.Toughness.toString(),this.mxstrain_cell.textContent=s.MaxStrain.toString(),this.escape_cell.textContent=r.Join(", ",t.GetEscapeList()),this.crashsafety_cell.textContent=e.crashsafety.toString(),this.crew_cell.textContent=t.GetCockpits().GetNumberOfCockpits().toString()+"/"+(t.GetPassengers().GetSeats()+t.GetPassengers().GetBeds()).toString(),this.flightstress_cell.textContent=g(t.GetStressList()),this.visibility_cell.textContent=r.Join(", ",t.GetVisibilityList()),this.attack_cell.textContent=r.Join(", ",t.GetAttackList()),this.communications_cell.textContent=t.GetCommunicationName();this.electric_cell.childElementCount>0;)this.electric_cell.removeChild(this.electric_cell.firstChild);const u=t.GetElectrics(),_=function(t){const e={div0:document.createElement("DIV"),div1:document.createElement("DIV"),div2:document.createElement("DIV")};return e.div0.classList.add("flex-container-o"),e.div1.classList.add("flex-container-i"),e.div2.classList.add("flex-container-i"),e.div0.appendChild(e.div1),e.div0.appendChild(e.div2),t.appendChild(e.div0),e}(this.electric_cell);u.storage>0&&Pt(h("Derived Battery"),u.storage.toString(),_);for(let t of u.equipment)Pt(t.source,t.charge,_);var m="";const f=t.VitalComponentList();for(let t of f)m+=t+"
";this.vital_components.innerHTML=m;const d=t.GetWeapons().GetWeaponList(),y=t.GetWeapons().GetDirectionList(),b=t.GetMunitions().GetBombCount(),S=t.GetMunitions().GetRocketCount();var w=t.GetMunitions().GetInternalBombCount(),C="";if(b>0){const e=Math.min(b,w),s=Math.max(0,b-e);e>0&&(C+=h(" Bomb Mass Internally.",e)),s>0&&(C+=h(" Bomb Mass Externally.",s)),e>0&&(C+=h("Largest Internal Bomb",Math.min(e,t.GetMunitions().GetMaxBombSize()).toString())),w-=e,C+="
"}if(S>0){const t=Math.min(S,w),e=Math.max(0,S-t);t>0&&(C+=h(" Rocket Mass Internally.",t)),e>0&&(C+=h(" Rocket Mass Externally.",e)),C+="
"}for(let e of t.GetWeapons().GetWeaponSets())C+=bt(e,d,y),C+="
";this.weapon_cell.innerHTML=C,e.warnings.sort(((t,e)=>t.color-e.color));var P="";for(let t of e.warnings){switch(t.color){case c.RED:P+='
';break;case c.YELLOW:P+='
';break;case c.WHITE:default:P+='
'}P+=t.source+": "+t.warning+"
"}this.warning_cell.innerHTML=P;var G="";const M=t.GetWings().GetWingList().length;if(1==M){const e=t.GetWings().GetWingList()[0].deck;e>>8,s[2*t+1]=i%256}return s},decompressFromUint8Array:function(e){if(null==e)return r.decompress(e);var s=new Array(e.length/2);for(let t=0,i=s.length;t>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=n[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++),n[h]=_++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(o,c)){if(c.charCodeAt(0)<256){for(i=0;i>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=n[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++)}for(a=2,i=0;i>=1;for(;;){if(g<<=1,f==e-1){m.push(s(g));break}f++}return m.join("")},decompress:function(t){return null==t?"":""==t?null:r._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,s,i){var a,r,n,o,l,h,c,u=[],_=4,p=4,m=3,g="",f=[],d={val:i(0),position:s,index:1};for(a=0;a<3;a+=1)u[a]=a;for(n=0,l=Math.pow(2,2),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;switch(n){case 0:for(n=0,l=Math.pow(2,8),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;c=t(n);break;case 1:for(n=0,l=Math.pow(2,16),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;c=t(n);break;case 2:return""}for(u[3]=c,r=c,f.push(c);;){if(d.index>e)return"";for(n=0,l=Math.pow(2,m),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;switch(c=n){case 0:for(n=0,l=Math.pow(2,8),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;u[p++]=t(n),c=p-1,_--;break;case 1:for(n=0,l=Math.pow(2,16),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;u[p++]=t(n),c=p-1,_--;break;case 2:return f.join("")}if(0==_&&(_=Math.pow(2,m),m++),u[c])g=u[c];else{if(c!==p)return null;g=r+r.charAt(0)}f.push(g),u[p++]=r+g.charAt(0),r=g,0==--_&&(_=Math.pow(2,m),m++)}}};return r}();class It{constructor(){this.errorMissingSeparator="Missing separator option.",this.errorEmpty="JSON is empty.",this.errorEmptyHeader="Could not detect header. Ensure first row contains your column headers.",this.errorNotAnArray="Your JSON must be an array or an object.",this.errorItemNotAnObject="Item in array is not an object: {0}"}flattenArray(t,e=[]){function s(t,e){let s=t.slice(0);if(!Array.isArray(e))return s;for(let t=0;te==t));return-1==s&&(e.push(t),s=e.length-1,Jt(e)),s}function Ut(t){var e=new f;t.serialize(e);var s=function(t){let e="";const s=new Uint8Array(t),i=s.byteLength;for(let t=0;te==t.name));return-1==r?(a.names.push(t.name),a.acft.push(i),r=a.names.length-1):a.acft[r]=i,jt(a),r}function jt(t){window.localStorage.setItem("hangar."+qt,JSON.stringify(t)),Vt(t)}function Jt(t){window.localStorage.setItem("hangar_names",JSON.stringify(t)),Yt(t)}function Vt(t){for(;Ft.lastChild;)Ft.removeChild(Ft.lastChild);for(let e=0;e'+o.innerHTML,r.appendChild(l)}}else{var h=r.insertCell();h.colSpan=2,h.appendChild(kt),kt.value=Nt.name;var c=document.createElement("HR");c.className="dashed",h.appendChild(c),h.appendChild(Ot),h.appendChild(document.createElement("BR")),h.appendChild(Ft)}}}(document.getElementById("table_builder"),document.getElementById("table_hangar"),document.getElementById("table_comp"))}window.addEventListener("DOMContentLoaded",(()=>{var t=new URLSearchParams(location.search).get("lang");t?l.SetCurrentLanguage(t):window.localStorage.language&&l.SetCurrentLanguage(window.localStorage.language),function(t){for(const t of E.l)if(T.has(t.name)||T.set(t.name,new N(t.name)),"Custom"!=t.name){T.get(t.name).fromJSON(t,!0),T.get(t.name).SetConstant();for(let e=0;e{qt=Ot.options[Ot.selectedIndex].text,Vt(Ht())},Yt(Bt()),(Ft=document.createElement("SELECT")).onchange=()=>{Dt(Ft.selectedIndex)},Vt(Ht()),kt=document.createElement("INPUT");var t=document.getElementById("btn_load");t.onclick=()=>{Nt.fromJSON(JSON.parse(JSON.stringify(xt.toJSON()))),Nt.CalculateStats(),Tt.UpdateDisplay(Nt,Nt.GetStats(),Nt.GetDerivedStats()),window.localStorage.setItem("aircraft",JSON.stringify(Nt.toJSON())),Zt(),Mt(t.parentElement)};var e=document.getElementById("btn_save");e.onclick=()=>{Nt.name=kt.value,Ut(Nt),Mt(e.parentElement)};var s=document.getElementById("btn_json");s.multiple=!1,s.accept="application/JSON",s.onchange=t=>{!function(t){if(0!=t.files.length){var e=t.files[0],s=new FileReader;s.onloadend=()=>{try{var t=JSON.parse(s.result),e=new St(Lt,!1);e.fromJSON(t)&&Dt(Ut(e))}catch(t){console.error(t,t.stack)}},s.readAsText(e),t.value=""}}(s),Mt(s.parentElement)};var i=document.getElementById("btn_remove");i.onclick=()=>{var t,e,s;t=xt.name,e=Ht(),-1!=(s=e.names.findIndex((e=>e==t)))&&(e.names.splice(s,1),e.acft.splice(s,1)),jt(e),Dt(Math.min(e.names.length-1,s)),Mt(i.parentElement)};var a=document.getElementById("btn_save_h");a.onclick=()=>{wt(JSON.stringify(Ht()),qt+".json","json"),Mt(a.parentElement)};var n=document.getElementById("btn_json_h");n.setAttribute("type","file"),n.multiple=!1,n.accept="application/JSON",n.onchange=t=>{if(0!=n.files.length){Mt(n.parentElement);var e=n.files[0],s=new FileReader;s.onloadend=()=>{try{var t,i=e.name.substr(0,e.name.length-5);if(i=(i=i.trim()).replace(/\s+/g," "),(t=JSON.parse(s.result)).names.length!=t.acft.length)throw"Bad";zt(i),window.localStorage.setItem("hangar."+i,s.result),qt=i,Yt(Bt()),Vt(Ht())}catch{(a=n.parentElement).classList.toggle("changed_b",!1),a.classList.toggle("changed_g",!1),a.classList.toggle("changed_n",!1),a.offsetHeight,a.classList.toggle("changed_b")}var a},s.readAsText(e),n.value=""}};var o=document.getElementById("lbl_create_list"),l=document.getElementById("btn_create_list");o.onclick=()=>{var t=l.value;""!=(t=(t=t.trim()).replace(/\s+/g," "))&&(Ot.selectedIndex=zt(t),qt=t,Vt(Ht()),Mt(o.parentElement)),l.value=""};var h=document.getElementById("btn_delete_list");h.onclick=()=>{var t,e,s;t=qt,e=Bt(),-1!=(s=e.findIndex((e=>e==t)))&&(e.splice(s,1),window.localStorage.removeItem("hangar."+t)),Jt(e),qt="Default",Yt(Bt()),Vt(Ht()),Dt(0),Mt(h.parentElement)},document.getElementById("btn_to_csv").onclick=()=>{var t=Ht(),e=[],s=JSON.stringify(xt.toJSON());for(let s of t.acft){try{var i=Rt(At.decompressFromEncodedURIComponent(s)),a=new d(i);xt.deserialize(a),xt.CalculateStats()}catch(t){console.log("Compressed Query Parameter Failed."),console.log(t),xt.Reset()}let t=xt.GetStats(),n=xt.GetDerivedStats(),o=Object.entries(n);o.splice(0,0,["name",xt.name]),o.splice(1,0,["cost",t.cost]),o.splice(2,0,["upkeep",t.upkeep]),o.splice(3,0,["bomb_mass",t.bomb_mass]),o.splice(4,0,["escape",r.Join("/",xt.GetEscapeList())]),o.splice(5,0,["crash",r.Join("/",xt.GetCrashList())]),o.splice(6,0,["stress",g(xt.GetStressList())]);let l=Object.fromEntries(o);e.push(l)}xt.fromJSON(JSON.parse(s)),wt((new It).convert(e,{separator:",",flatten:!0,output_csvjson_variant:!1}),qt+".csv","csv")}}(),function(){let t=window.localStorage.getItem("aircraft");if(Nt=new St(Lt,!1),t){console.log("Used Saved Data");try{Nt.fromJSON(JSON.parse(t)),Nt.CalculateStats()}catch{console.log("Saved Data Failed."),Nt.Reset()}}(Tt=new vt(document.getElementById("table_builder"))).SetShowBombs(!0),Tt.UpdateDisplay(Nt,Nt.GetStats(),Nt.GetDerivedStats()),xt=new St(Lt,!1),(Wt=new vt(document.getElementById("table_hangar"))).SetShowBombs(!0)}(),Dt(0)}))})(); \ No newline at end of file +(()=>{"use strict";var t,e,s={},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}};return s[t](r,r.exports,a),r.exports}e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,a.t=function(s,i){if(1&i&&(s=this(s)),8&i)return s;if("object"==typeof s&&s){if(4&i&&s.__esModule)return s;if(16&i&&"function"==typeof s.then)return s}var r=Object.create(null);a.r(r);var n={};t=t||[null,e({}),e([]),e(e)];for(var o=2&i&&s;"object"==typeof o&&!~t.indexOf(o);o=e(o))Object.getOwnPropertyNames(o).forEach((t=>n[t]=()=>s[t]));return n.default=()=>s,a.d(r,n),r},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};class r{static IsNullOrWhiteSpace(t){try{return null==t||"undefined"==t||t.toString().replace(/\s/g,"").length<1}catch(t){return console.log(t),!1}}static Join(t,...e){try{const s=e[0];if(Array.isArray(s)||s instanceof Array){let e=r.Empty;for(let i=0;i{e+=i[s]+t})),e=e.slice(0,e.length-t.length),e}const i=e;return r.join(t,...i)}catch(t){return console.log(t),r.Empty}}static Format(t,...e){try{return t.match(r.regexNumber)?r.format(r.regexNumber,t,e):t.match(r.regexObject)?r.format(r.regexObject,t,e,!0):t}catch(t){return console.log(t),r.Empty}}static format(t,e,s,i=!1){return e.replace(t,(function(t,e){const a=t.split(":");let n;return a.length>1&&(e=a[0].replace("{",""),t=a[1].replace("}","")),n=i?s[0][e]:s[e],null==n||null==n||t.match(/{\d+}/)?n:(n=r.parsePattern(t,n),void 0!==n&&null!=n?n:r.Empty)}))}static parsePattern(t,e){switch(t){case"L":return e.toLocaleLowerCase();case"U":return e.toLocaleUpperCase();case"d":if("string"==typeof e)return r.getDisplayDateFromString(e);if(e instanceof Date)return r.Format("{0:00}.{1:00}.{2:0000}",e.getDate(),e.getMonth(),e.getFullYear());break;case"s":if("string"==typeof e)return r.getSortableDateFromString(e);if(e instanceof Date)return r.Format("{0:0000}-{1:00}-{2:00}",e.getFullYear(),e.getMonth(),e.getDate());break;case"n":{"string"!=typeof e&&(e=e.toString());const t=e.replace(/,/g,".");if(isNaN(parseFloat(t))||t.length<=3)break;const s=t.split(/[^0-9]+/g);let i=s;s.length>1&&(i=[r.join("",...s.splice(0,s.length-1)),s[s.length-1]]);const a=i[0],n=a.length%3;let o=n>0?a.substring(0,n):r.Empty;const l=a.substring(n).match(/.{3}/g);return o=o+"."+r.Join(".",l),o+(i.length>1?","+i[1]:"")}case"x":return this.decimalToHexString(e);case"X":return this.decimalToHexString(e,!0)}return"number"!=typeof e&&isNaN(e)||isNaN(+t)||r.IsNullOrWhiteSpace(e)?e:r.formatNumber(e,t)}static decimalToHexString(t,e=!1){const s=parseFloat(t).toString(16);return e?s.toLocaleUpperCase():s}static getDisplayDateFromString(t){const e=t.split("-");if(e.length<=1)return t;let s=e[e.length-1];const i=e[e.length-2],a=e[e.length-3];return s=s.split("T")[0],s=s.split(" ")[0],`${s}.${i}.${a}`}static getSortableDateFromString(t){const e=t.replace(",","").split(".");if(e.length<=1)return t;const s=e[e.length-1].split(" ");let i=r.Empty;s.length>1&&(i=s[s.length-1]);let a=`${e[e.length-1].split(" ")[0]}-${e[e.length-2]}-${e[e.length-3]}`;return!r.IsNullOrWhiteSpace(i)&&i.length>1?a+=`T${i}`:a+="T00:00:00",a}static formatNumber(t,e){const s=e.length,i=t.toString();if(s<=i.length)return i;let a=s-i.length;return a+=1,new Array(a).join("0")+i}static join(t,...e){let s=r.Empty;for(let i=0;i Benefits(-)":"Penalties(+)
Benefits(-)","Used Burnt Out":"Burnt Out","Used Burnt Out Description":"Engines are at -1 Reliability","Used Ragged":"Ragged","Used Ragged Description":"Reduce your Max Speed by 10%","Used Hefty":"Hefty","Used Hefty Description":"Increase your Stall Speeds by 20%","Used Sticky Guns":"Sticky Guns","Used Sticky Guns Description":"Increase the chance of guns jamming by 1","Used Weak":"Weak","Used Weak Description":"Cut the plane\'s Toughness in half","Used Fragile":"Fragile","Used Fragile Description":"Reduce your Max Strain by 20%","Used Leaky":"Leaky","Used Leaky Description":"Reduce your Fuel by 20%","Used Sluggish":"Sluggish","Used Sluggish Description":"Reduce your Handling by 5","Weapons Section Title":"Weapons","Weapons Number of Weapon Sets":"Number of Weapon Sets:","Weapons Number of Weapon Braces":"Number of Weapon Braces:","Weapons Weapon Set":"Weapon Set","Weapons Weapons":"Weapons","Weapons Weapon Stats":"Weapon Stats","Weapons Type":"Weapon Type","Weapons Number of Mounts":"Number of Mounts","Weapons Ammunition":"Ammunition","Weapons Action":"Action","Weapons Projectile":"Projectile","Weapons Belt Fed":"Belt Fed","Weapons Stat Mounting":"Mounting","Weapons Stat Jam":"Jam","Weapons Stat Hits":"Hits","Weapons Stat Damage":"Damage","Weapons Stat Shots":"Shots","Weapons Stat Charges":"Charges per Shot","Weapons Wing Mount":"Wing Mount","Weapons Accessible":"Accessible","Weapons Free Accessible":"Free Accessible","Weapons Covered":"Covered","Weapons # Weapons at Mount":"Weapons at Mount","Weapons Synchronization":"Synchronization","Weapons Mount":"Weapon Mount","Weapons Braces":"Weapon Braces","Weapons Braces Warning":"These mounts give an observer +1 to make a Personal Attack with a loose weapon they are carrying in their hands.","Wings Section Title":"Wings","Wings Wing Stagger":"Wing Stagger:","Wings Closed Wing":"Closed Wing:","Wings Swept Wing":"Swept Wings:","Wings Wing Type":"Wing Type","Wings Wing Options":"Wing Options","Wings Wing Stats":"Wing Stats","Wings Full Wings":"Full Wings","Wings Miniature Wings":"Miniature Wings","Wings Sesquiplane":"Sesquiplane","Wings No Wing":"None","Wings Area":"Area","Wings Span":"Span","Wings Gull":"Gull","Wings Dihedral":"Dihedral","Wings Anhedral":"Anhedral","Aircraft Button Save":"Save","Aircraft Button Load":"Load","Aircraft Button Copy As Link":"Copy As Link","Aircraft Button Save Dashboard":"Save Dashboard","Aircraft Button Interactive Dashboard":"Interactive Dashboard","Aircraft Button Save NPC":"Save NPC","Aircraft Button Save Catalog":"Save Catalog","Aircraft Button Default Aircraft":"Default Aircraft","Aircraft Stats Section Title":"Total Sum of Stats","Aircraft Derived Section Title":"Aircraft Derived Statistics","Seat #":"Seat #{0}","Seats #":"Seats # {0}","Seat Location":"Choose Seat","Radiators #":"Radiators # {0}","Crew Pilot":"Pilot","Crew Bombadier":"Bombardier","Crew Co-Pilot":"Co-Pilot","Crew Gunner":"Gunner","Crew Aircrew":"Aircrew","Diesel":"Diesel Engine","Diesel Warning":"Engine won\'t catch fire.","Cargo Tiny":"A small locker for personal stuff.","Cargo Small":"Will fit a trunk, barrel, or crate.","Cargo Medium":"Will fit a small vehicle like a motorcycle, car, or zeppelin engine.","Cargo Large":"Will fit a scout or fighter aircraft with the wings taken off.","Cargo Huge":"Will fit just about anything you can imagine.","Alter Select Part":"Select Part","Alter Quantity":"Quantity","Alter Part Name":"Part Name","Alter Part Special Rules":"Special Rules","Frame Count":"Frame Count","Frame Count Warning":"This plane appears to have unused frame sections. Check to see if this is intentional.","Altitude Section Title":"Altitude Effects","Altitude Altitude":"Altitude","Rarity":"Rarity","Rarity Custom":"Custom","Rarity Common":"Common","Rarity Rare":"Rare","Rarity Legendary":"Legendary","Boost Warning":"Boost is 0 for some loads. The plane cannot accelerate to take off.","Insufficient Charge":"Insufficient Charge","Insufficient Charge Warning":"This aircraft has electrical systems with nothing to power them.","Low Mass Warning":"This aircraft is very low mass. If it is a custom airplane, be careful not to make it overpowered.","Low Drag Warning":"This aircraft is very low drag. If it is a custom airplane, be careful not to make it overpowered.","Connectivity Warning":"Can move between positions without Wingwalking.","Passenger Connectivity Warning":"Can reach the cockpit without Wingwalking.","Rotor Thickness":"Rotor Thickness"}}');var o=a.t(n,2);const l=new class{constructor(){this.lang="en"}LoadLanguages(t){this.languages=t}GetLanguages(){const t=[];for(const e of this.languages.languages)t.push(e);return t}SetCurrentLanguage(t){this.languages[t]&&(this.lang=t)}e(t){return this.languages[this.lang][t]?this.languages[this.lang][t]:this.languages.en[t]?this.languages.en[t]:(console.error("Failed to find "+t),"!"+t+"!")}};function h(t,...e){return r.Format(l.e(t),...e)}var c;l.LoadLanguages(o),function(t){t[t.WHITE=0]="WHITE",t[t.YELLOW=1]="YELLOW",t[t.RED=2]="RED"}(c||(c={}));class u{constructor(t){this.liftbleed=0,this.wetmass=0,this.mass=0,this.drag=0,this.control=0,this.cost=0,this.reqsections=0,this.visibility=0,this.flightstress=0,this.escape=0,this.pitchstab=0,this.latstab=0,this.cooling=0,this.reliability=0,this.power=0,this.fuelconsumption=0,this.maxstrain=0,this.structure=0,this.pitchspeed=0,this.pitchboost=0,this.wingarea=0,this.toughness=0,this.upkeep=0,this.crashsafety=0,this.bomb_mass=0,this.fuel=0,this.charge=0,this.warnings=[],this.era=[],t&&this.fromJSON(t,0)}toJSON(){return{liftbleed:this.liftbleed,wetmass:this.wetmass,mass:this.mass,drag:this.drag,control:this.control,cost:this.cost,reqsections:this.reqsections,visibility:this.visibility,flightstress:this.flightstress,escape:this.escape,pitchstab:this.pitchstab,latstab:this.latstab,cooling:this.cooling,reliability:this.reliability,power:this.power,fuelconsumption:this.fuelconsumption,maxstrain:this.maxstrain,structure:this.structure,pitchboost:this.pitchboost,pitchspeed:this.pitchspeed,wingarea:this.wingarea,toughness:this.toughness,upkeep:this.upkeep,crashsafety:this.crashsafety,bomb_mass:this.bomb_mass,fuel:this.fuel,charge:this.charge,warnings:this.warnings,eras:this.era}}fromJSON(t,e){if(t.liftbleed&&(this.liftbleed=t.liftbleed),t.wetmass&&(this.wetmass=t.wetmass),t.mass&&(this.mass=t.mass),t.drag&&(this.drag=t.drag),t.control&&(this.control=t.control),t.cost&&(this.cost=t.cost),t.reqsections&&(this.reqsections=t.reqsections),t.visibility&&(this.visibility=t.visibility),t.flightstress&&(this.flightstress=t.flightstress),t.escape&&(this.escape=t.escape),t.pitchstab&&(this.pitchstab=t.pitchstab),t.latstab&&(this.latstab=t.latstab),t.cooling&&(this.cooling=t.cooling),t.reliability&&(this.reliability=t.reliability),t.power&&(this.power=t.power),t.fuelconsumption&&(this.fuelconsumption=t.fuelconsumption),t.maxstrain&&(this.maxstrain=t.maxstrain),t.structure&&(this.structure=t.structure),t.pitchspeed&&(this.pitchspeed=t.pitchspeed),t.pitchboost&&(this.pitchboost=t.pitchboost),t.wingarea&&(this.wingarea=t.wingarea),t.toughness&&(this.toughness=t.toughness),t.upkeep&&(this.upkeep=t.upkeep),t.crashsafety&&(this.crashsafety=t.crashsafety),t.bomb_mass&&(this.bomb_mass=t.bomb_mass),t.fuel&&(this.fuel=t.fuel),t.charge&&(this.charge=t.charge),t.warning&&this.warnings.push({source:h(t.name),warning:h(t.warning),color:c.WHITE}),t.warnings){const e=t.warnings,s=[];for(const t of e)s.push({source:t.source,warning:t.warning});this.warnings=this.MergeWarnings(s)}if(t.era&&this.era.push({name:h(t.name),era:h(t.era)}),t.eras){const e=t.eras,s=[];for(const t of e)s.push({name:t.name,era:t.era});this.era=this.MergeEra(s)}}serialize(t){t.PushNum(this.liftbleed),t.PushNum(this.wetmass),t.PushNum(this.mass),t.PushNum(this.drag),t.PushNum(this.control),t.PushNum(this.cost),t.PushNum(this.reqsections),t.PushNum(this.visibility),t.PushNum(this.flightstress),t.PushNum(this.escape),t.PushNum(this.pitchstab),t.PushNum(this.latstab),t.PushNum(this.cooling),t.PushNum(this.reliability),t.PushNum(this.power),t.PushNum(this.fuelconsumption),t.PushNum(this.maxstrain),t.PushNum(this.structure),t.PushFloat(this.pitchboost),t.PushFloat(this.pitchspeed),t.PushNum(this.wingarea),t.PushNum(this.toughness),t.PushNum(this.upkeep),t.PushNum(this.crashsafety),t.PushNum(this.bomb_mass),t.PushNum(this.fuel),t.PushNum(this.charge),t.PushNum(this.warnings.length);for(const e of this.warnings)t.PushString(e.source),t.PushString(e.warning);t.PushNum(this.era.length);for(const e of this.era)t.PushString(e.name),t.PushString(e.era)}deserialize(t){if(this.liftbleed=t.GetNum(),this.wetmass=t.GetNum(),this.mass=t.GetNum(),this.drag=t.GetNum(),this.control=t.GetNum(),this.cost=t.GetNum(),this.reqsections=t.GetNum(),this.visibility=t.GetNum(),this.flightstress=t.GetNum(),this.escape=t.GetNum(),this.pitchstab=t.GetNum(),this.latstab=t.GetNum(),this.cooling=t.GetNum(),this.reliability=t.GetNum(),this.power=t.GetNum(),this.fuelconsumption=t.GetNum(),this.maxstrain=t.GetNum(),this.structure=t.GetNum(),this.pitchboost=t.GetFloat(),this.pitchspeed=t.GetFloat(),this.wingarea=t.GetNum(),this.toughness=t.GetNum(),this.upkeep=t.GetNum(),this.crashsafety=t.GetNum(),this.bomb_mass=t.GetNum(),this.fuel=t.GetNum(),this.charge=t.GetNum(),t.version>12.25){const e=t.GetNum();this.warnings=[];for(let s=0;s1e-6&&(e.warnings=this.warnings,e.era=this.era),e}Equal(t){return this.liftbleed==t.liftbleed&&this.wetmass==t.wetmass&&this.mass==t.mass&&this.drag==t.drag&&this.control==t.control&&this.cost==t.cost&&this.reqsections==t.reqsections&&this.visibility==t.visibility&&this.flightstress==t.flightstress&&this.escape==t.escape&&this.pitchstab==t.pitchstab&&this.latstab==t.latstab&&this.cooling==t.cooling&&this.reliability==t.reliability&&this.power==t.power&&this.fuelconsumption==t.fuelconsumption&&this.maxstrain==t.maxstrain&&this.structure==t.structure&&this.pitchspeed==t.pitchspeed&&this.pitchboost==t.pitchboost&&this.wingarea==t.wingarea&&this.toughness==t.toughness&&this.upkeep==t.upkeep&&this.crashsafety==t.crashsafety&&this.bomb_mass==t.bomb_mass&&this.fuel==t.fuel&&this.charge==t.charge}rtz(t){return t>0?Math.floor(1e-6+t):Math.ceil(-1e-6+t)}Round(){this.liftbleed=this.rtz(this.liftbleed),this.wetmass=this.rtz(this.wetmass),this.mass=this.rtz(this.mass),this.drag=this.rtz(this.drag),this.control=this.rtz(this.control),this.cost=this.rtz(this.cost),this.reqsections=this.rtz(this.reqsections),this.visibility=this.rtz(this.visibility),this.flightstress=this.rtz(this.flightstress),this.escape=this.rtz(this.escape),this.pitchstab=this.rtz(this.pitchstab),this.latstab=this.rtz(this.latstab),this.cooling=this.rtz(this.cooling),this.reliability=this.rtz(this.reliability),this.power=this.rtz(this.power),this.fuelconsumption=this.rtz(this.fuelconsumption),this.maxstrain=this.rtz(this.maxstrain),this.structure=this.rtz(this.structure),this.wingarea=this.rtz(this.wingarea),this.toughness=this.rtz(this.toughness),this.upkeep=this.rtz(this.upkeep),this.crashsafety=this.rtz(this.crashsafety),this.bomb_mass=this.rtz(this.bomb_mass),this.fuel=this.rtz(this.fuel),this.charge=this.rtz(this.charge)}Clone(){return this.Add(new u)}}const _=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return 6}},p=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return-1}},m=t=>{switch(t){case 0:return"Pioneer";case 1:return"WWI";case 2:return"Roaring 20s";case 3:return"Coming Storm";case 4:return"WWII";case 5:return"Last Hurrah";case 6:case-1:return"Himmilgard"}},g=t=>{var e="";for(let s=0;s0){const s=t.length-1;2==t[s].length&&t[s][0]!=t[s][1]?e+=t[s][0].toString()+"("+t[s][1].toString()+")":e+=t[s][0].toString()}return e};class f{constructor(t){this.array=new ArrayBuffer(51200),this.view=new DataView(this.array),this.offset=0}Check(){if(this.offset>=this.array.byteLength)throw"Serialization Way too long."}PushNum(t){this.view.setInt16(this.offset,t,!1),this.offset+=2,this.Check()}PushBool(t){t?this.view.setUint8(this.offset,1):this.view.setUint8(this.offset,0),this.offset+=1,this.Check()}PushString(t){var e=(new TextEncoder).encode(t);this.PushNum(e.length);for(let t=0;t=this.array.byteLength)throw"Deserialization Failed"}GetNum(){this.Check();const t=this.view.getInt16(this.offset,!1);return this.offset+=2,t}GetBool(){this.Check();const t=this.view.getUint8(this.offset);return this.offset+=1,t>0}GetString(){this.Check();const t=this.GetNum(),e=new Uint8Array(this.view.buffer,this.offset,t);let s;return this.offset+=t,s=this.version<12.65?"windows-1252":"utf-8",new TextDecoder(s).decode(e)}GetNumArr(t){this.Check();const e=this.GetNum(),s=[];for(let t=0;t0&&(r*=1.4),Math.floor(1e-6+r)}VerifyValues(){for(this.engine_displacement=Math.max(.01,this.engine_displacement),this.engine_displacement=Math.min(150,this.engine_displacement),this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.cool_sel=Math.max(0,Math.min(this.CoolingTable.length-1,this.cool_sel)),this.num_cyl_per_row=Math.floor(Math.max(1,this.num_cyl_per_row)),this.num_rows=Math.floor(Math.max(1,this.num_rows)),this.compression_ratio=Math.max(.01,this.compression_ratio),this.compression_ratio=Math.min(25,this.compression_ratio),this.rpm_boost=Math.max(.1,this.rpm_boost),this.rpm_boost=Math.min(2,this.rpm_boost),this.material_fudge=Math.max(.1,this.material_fudge),this.material_fudge=Math.min(2,this.material_fudge),this.quality_fudge=Math.max(.1,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge);this.material_fudge-1+(this.quality_fudge-1)<-.9;)this.material_fudge+=.1,this.quality_fudge+=.1;this.min_IAF=10*Math.round(1e-6+this.min_IAF/10),this.compressor_count=Math.floor(1e-6+this.compressor_count),this.compressor_count=Math.min(5,this.compressor_count),this.compressor_type==S.NONE?(this.compressor_count=0,this.min_IAF=0):this.compressor_type==S.ALTITUDE_THROTTLE?(this.compressor_count=1,this.min_IAF=0,this.upg_sel[0]=!1,this.upg_sel[1]=!1,this.upg_sel[2]=!1):(this.min_IAF=Math.max(0,this.min_IAF),this.compressor_count=Math.max(1,this.compressor_count))}EngineStats(){const t=new I;switch(t.name=this.name,this.VerifyValues(),t.stats.power=this.CalcPower(),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=Math.floor(-1.999999+this.era_sel+10*(this.quality_fudge+this.material_fudge-2)),t.stats.cooling=this.CalcCooling(),t.oiltank=this.IsRotary(),t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=this.CalcFuelConsumption(),t.altitude=this.CalcAltitude(),t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(m(this.era_sel))}),this.compressor_type){case S.NONE:break;case S.ALTITUDE_THROTTLE:t.stats.cost+=3,t.altitude=49,t.stats.warnings.push({source:h("Altitude Throttle"),warning:h("Altitude Throttle Warning"),color:c.WHITE});break;case S.SUPERCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.fuelconsumption=Math.floor(1e-6+1.25*t.stats.fuelconsumption),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=29+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e;break}case S.TURBOCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10*2,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=49+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e,t.stats.reqsections+=1;break}}return(this.compressor_type==S.ALTITUDE_THROTTLE||this.upg_sel[1])&&t.stats.warnings.push({source:h("War Emergency Power"),warning:h("War Emergency Power Warning"),color:c.WHITE}),t.stats.fuelconsumption=Math.max(1,t.stats.fuelconsumption),t.rarity=this.rarity,t}EngineInputs(){const t=new A;t.engine_type=w.PROPELLER,t.RPM_boost=this.rpm_boost,t.compression=this.compression_ratio,t.compressor_count=this.compressor_count,t.compressor_type=this.compressor_type,t.cyl_per_row=this.num_cyl_per_row,t.displacement=this.engine_displacement,t.era_sel=this.era_sel,t.material_fudge=this.material_fudge,t.min_IdealAlt=this.min_IAF,t.name=this.name,t.quality_fudge=this.quality_fudge,t.rows=this.num_rows,t.type=this.cool_sel;for(let e=0;e2&&(this.afterburner=!1)}EngineInputs(){const t=new A;return t.name=this.name,t.engine_type=w.TURBOMACHINERY,t.era_sel=this.era_sel,t.type=this.type_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.upgrades[0]=this.afterburner,t.rarity=this.rarity,t}GetPitchSpeed(){return this.bypass_ratio>=8?1:this.bypass_ratio>=3.5?1.1:this.bypass_ratio>=1?1.2:1.3}EngineStats(){const t=new I;this.VerifyValues();const e=this.CalcStages();return this.kN=e.thrust,this.tsfc=e.fuel/e.thrust,t.name=this.name,t.stats.power=Math.round(1e3*e.thrust/89),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.fuelconsumption=Math.round(200*e.fuel/1e3),t.rumble=0,t.stats.cost=this.CalcCost(),t.overspeed=100,t.altitude=59,8==this.era_sel?t.stats.era.push({name:t.name,era:h(m(-1))}):t.stats.era.push({name:t.name,era:h(m(5))}),t.stats.pitchspeed=this.GetPitchSpeed(),t.rarity=this.rarity,t}}class v{constructor(){this.EraTable=[{name:"Pioneer",draw:3,drawfactor:.4,massfactor:.4,reliability:-1,costfactor:.4,overspeed:20},{name:"WWI",draw:1,drawfactor:.4,massfactor:1/3,reliability:0,costfactor:1/2.25,overspeed:25},{name:"Roaring 20s",draw:1,drawfactor:2/7,massfactor:2/7,reliability:1,costfactor:.5,overspeed:30},{name:"Coming Storm",draw:0,drawfactor:2/7,massfactor:1/4,reliability:2,costfactor:1/1.9,overspeed:35},{name:"WWII",draw:0,drawfactor:1/4,massfactor:.2,reliability:3,costfactor:1/1.8,overspeed:40},{name:"Last Hurrah",draw:0,drawfactor:.2,massfactor:1/6,reliability:4,costfactor:1/1.75,overspeed:45}],this.Winding=[{name:"Aluminum",drawmod:1.1,mass:-2,drag:1,costfactor:1,reliabilty:0},{name:"Copper",drawmod:1,mass:0,drag:0,costfactor:1,reliabilty:0},{name:"Silver",drawmod:.95,mass:1,drag:0,costfactor:1.1,reliabilty:0},{name:"Electrum",drawmod:.9,mass:2,drag:0,costfactor:1.3,reliabilty:1},{name:"Platinum",drawmod:.75,mass:3,drag:0,costfactor:2,reliabilty:2},{name:"Screamer Sinew",drawmod:.9,mass:0,drag:1,costfactor:1.75,reliabilty:4},{name:"Lightning Sprite Ephemera",drawmod:.5,mass:-2,drag:-2,costfactor:2,reliabilty:-3}],this.name="Default",this.era_sel=0,this.winding_sel=0,this.power=1,this.chonk=1,this.quality_fudge=1}EraMass(){const t=this.EraTable[this.era_sel];return Math.floor(1e-6+t.massfactor*this.power)}CalcMass(){const t=this.Winding[this.winding_sel];return Math.max(0,Math.floor(1e-6+this.EraMass()+t.mass))}CalcDrag(){const t=this.power/10,e=this.Winding[this.winding_sel].drag;return Math.max(1,Math.floor(1.000001+t+this.chonk+e))}CalcOverspeed(){const t=this.chonk/2,e=7.5*(this.quality_fudge-1);return Math.ceil(-1e-6+this.EraTable[this.era_sel].overspeed-t+e)}CalcDraw(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.draw+Math.ceil(this.power*t.drawfactor-1e-6);return Math.ceil(s*e.drawmod-1e-6)}CalcReliability(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=this.power/10,i=5*(this.quality_fudge-1);return Math.trunc(1e-6+t.reliability+this.chonk-s+i)+e.reliabilty}CalcTorque(){const t=1+this.EraMass()/10+this.chonk/4;return Math.max(1,Math.floor(1e-6+t))}CalcCost(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.costfactor*this.power,i=Math.ceil(s*Math.max(.5,this.quality_fudge)-1e-6);return Math.ceil(i*e.costfactor-1e-6)}VerifyValues(){this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.winding_sel=Math.max(0,Math.min(this.Winding.length-1,this.winding_sel)),this.power=Math.max(1,this.power),this.power=Math.floor(1e-6+this.power),this.chonk=Math.floor(1e-6+this.chonk),this.chonk=Math.max(-10,this.chonk),this.chonk=Math.min(10,this.chonk),this.quality_fudge=Math.max(.5,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge)}EngineStats(){var t=new I;return t.name=this.name,this.VerifyValues(),t.stats.power=this.power,t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.cooling=0,t.oiltank=!1,t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=0,t.stats.charge=-this.CalcDraw(),t.altitude=100,t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(m(this.era_sel))}),t}EngineInputs(){var t=new A;return t.engine_type=w.ELECTRIC,t.name=this.name,t.power=this.power,t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.material_fudge=this.chonk,t.quality_fudge=this.quality_fudge,t}}!function(t){t[t.PROPELLER=0]="PROPELLER",t[t.PULSEJET=1]="PULSEJET",t[t.TURBOMACHINERY=2]="TURBOMACHINERY",t[t.ELECTRIC=3]="ELECTRIC"}(w||(w={})),function(t){t[t.CUSTOM=0]="CUSTOM",t[t.COMMON=1]="COMMON",t[t.RARE=2]="RARE",t[t.LEGENDARY=3]="LEGENDARY"}(C||(C={}));class A{constructor(t){this.name="Default",this.engine_type=w.PROPELLER,this.type=0,this.era_sel=0,this.rarity=C.CUSTOM,this.displacement=0,this.compression=0,this.cyl_per_row=0,this.rows=0,this.RPM_boost=0,this.material_fudge=0,this.quality_fudge=0,this.compressor_type=0,this.compressor_count=0,this.min_IdealAlt=0,this.upgrades=[...Array(4).fill(!1)],this.power=0,this.quality_cost=0,this.quality_rely=0,this.starter=!1,this.flow_adjustment=0,this.diameter=0,this.compression_ratio=0,this.bypass_ratio=0,this.winding_sel=0,t&&this.fromJSON(t)}toJSON(){switch(this.engine_type){case w.PROPELLER:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,displacement:this.displacement,compression:this.compression,cyl_per_row:this.cyl_per_row,rows:this.rows,RPM_boost:this.RPM_boost,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge,compressor_type:this.compressor_type,compressor_count:this.compressor_count,min_IAF:this.min_IdealAlt,upgrades:this.upgrades,rarity:this.rarity};case w.PULSEJET:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,power:this.power,quality_cost:this.quality_cost,quality_rely:this.quality_rely,starter:this.starter,rarity:this.rarity};case w.TURBOMACHINERY:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,flow_adjustment:this.flow_adjustment,diameter:this.diameter,compression_ratio:this.compression_ratio,bypass_ratio:this.bypass_ratio,upgrades:this.upgrades,rarity:this.rarity};case w.ELECTRIC:return{name:this.name,engine_type:this.engine_type,power:this.power,era_sel:this.era_sel,winding_sel:this.winding_sel,diameter:this.diameter,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge};default:throw"EngineInputs.toJSON: Oh dear, you have a new engine type."}}fromJSON(t){switch(this.name=t.name,this.engine_type=t.engine_type,this.type=t.type,this.era_sel=t.era_sel,this.engine_type){case w.PROPELLER:this.displacement=t.displacement,this.compression=t.compression,this.cyl_per_row=t.cyl_per_row,this.rows=t.rows,this.RPM_boost=t.RPM_boost,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge,this.compressor_type=t.compressor_type,this.compressor_count=t.compressor_count,this.min_IdealAlt=t.min_IAF,this.upgrades=b(t.upgrades,this.upgrades.length);break;case w.PULSEJET:this.power=t.power,this.quality_cost=t.quality_cost,this.quality_rely=t.quality_rely,this.starter=t.starter;break;case w.TURBOMACHINERY:this.flow_adjustment=t.flow_adjustment,this.diameter=t.diameter,this.compression_ratio=t.compression_ratio,this.bypass_ratio=t.bypass_ratio,this.upgrades=t.upgrades;break;case w.ELECTRIC:this.power=t.power,this.winding_sel=t.winding_sel,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge;break;default:throw"EngineInputs.fromJSON: Oh dear, you have a new engine type."}t.rarity?this.rarity=t.rarity:this.rarity=C.CUSTOM}serialize(t){switch(t.PushString(this.name),t.PushNum(this.engine_type),t.PushNum(this.type),t.PushNum(this.era_sel),this.engine_type){case w.PROPELLER:t.PushFloat(this.displacement),t.PushFloat(this.compression),t.PushNum(this.cyl_per_row),t.PushNum(this.rows),t.PushFloat(this.RPM_boost),t.PushFloat(this.material_fudge),t.PushFloat(this.quality_fudge),t.PushNum(this.compressor_type),t.PushNum(this.compressor_count),t.PushNum(this.min_IdealAlt),t.PushBoolArr(this.upgrades);break;case w.PULSEJET:t.PushNum(this.power),t.PushFloat(this.quality_cost),t.PushFloat(this.quality_rely),t.PushBool(this.starter);break;case w.TURBOMACHINERY:t.PushFloat(this.flow_adjustment),t.PushFloat(this.diameter),t.PushFloat(this.compression_ratio),t.PushFloat(this.bypass_ratio),t.PushBoolArr(this.upgrades);break;case w.ELECTRIC:t.PushNum(this.power),t.PushNum(this.winding_sel),t.PushNum(this.material_fudge),t.PushFloat(this.quality_fudge);break;default:throw"EngineInputs.serialize: Oh dear, you have a new engine type."}t.PushNum(this.rarity)}deserialize(t){switch(this.name=t.GetString(),this.engine_type=t.GetNum(),this.type=t.GetNum(),this.era_sel=t.GetNum(),this.engine_type){case w.PROPELLER:this.displacement=t.GetFloat(),this.compression=t.GetFloat(),this.cyl_per_row=t.GetNum(),this.rows=t.GetNum(),this.RPM_boost=t.GetFloat(),this.material_fudge=t.GetFloat(),this.quality_fudge=t.GetFloat(),this.compressor_type=t.GetNum(),this.compressor_count=t.GetNum(),this.min_IdealAlt=t.GetNum(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case w.PULSEJET:this.power=t.GetNum(),this.quality_cost=t.GetFloat(),this.quality_rely=t.GetFloat(),this.starter=t.GetBool();break;case w.TURBOMACHINERY:this.flow_adjustment=t.GetFloat(),this.diameter=t.GetFloat(),this.compression_ratio=t.GetFloat(),this.bypass_ratio=t.GetFloat(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case w.ELECTRIC:this.power=t.GetNum(),this.winding_sel=t.GetNum(),this.material_fudge=t.GetNum(),this.quality_fudge=t.GetFloat();break;default:throw"EngineInputs.deserialize: Oh dear, you have a new engine type."}t.version>12.35?this.rarity=t.GetNum():this.rarity=C.CUSTOM}PartStats(){switch(this.engine_type){case w.PROPELLER:{const t=new G;return t.name=this.name,t.cool_sel=this.type,t.era_sel=this.era_sel,t.engine_displacement=this.displacement,t.compression_ratio=this.compression,t.num_cyl_per_row=this.cyl_per_row,t.num_rows=this.rows,t.rpm_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IAF=this.min_IdealAlt,t.upg_sel=this.upgrades,t.rarity=this.rarity,t.EngineStats()}case w.PULSEJET:{const t=new M;t.valve_sel=this.type,t.era_sel=this.era_sel,t.desired_power=this.power,t.build_quality=this.quality_cost,t.overall_quality=this.quality_rely,t.starter=this.starter,t.rarity=this.rarity;const e=t.EngineStats();return this.name=e.name,e}case w.TURBOMACHINERY:{const t=new R;return t.type_sel=this.type,t.era_sel=this.era_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.afterburner=this.upgrades[0],t.name=this.name,t.rarity=this.rarity,t.EngineStats()}case w.ELECTRIC:{const t=new v;return t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.power=this.power,t.chonk=this.material_fudge,t.quality_fudge=this.quality_fudge,t.name=this.name,t.EngineStats()}default:throw"EngineInputs.PartStats: Oh dear, you have a new engine type."}}Equal(t){return this.name==t.name}Clone(){const t=new A;t.name=this.name,t.engine_type=this.engine_type,t.type=this.type,t.era_sel=this.era_sel,t.displacement=this.displacement,t.compression=this.compression,t.cyl_per_row=this.cyl_per_row,t.rows=this.rows,t.RPM_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IdealAlt=this.min_IdealAlt,t.power=this.power,t.quality_cost=this.quality_cost,t.quality_rely=this.quality_rely,t.starter=this.starter;for(let e=0;e12.35&&(this.rarity=t.GetNum()),this.stats.deserialize(t)}Clone(){const t=new I;return t.fromJSON(JSON.parse(JSON.stringify(this.toJSON()))),t}Equal(t){return this.stats.Equal(t.stats)&&this.overspeed==t.overspeed&&this.altitude==t.altitude&&this.torque==t.torque&&this.rumble==t.rumble&&this.oiltank==t.oiltank&&this.pulsejet==t.pulsejet&&this.rarity==t.rarity}Verify(){this.oiltank&&(this.stats.cooling=0),this.PulseJetCheck()}PulseJetCheck(){this.pulsejet?(this.stats.cooling=0,this.overspeed=100,this.altitude=3,this.torque=0):this.rumble=0}}const E=JSON.parse('{"l":[{"name":"Custom","engines":[{"name":"Bentley BR.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Renault V8 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":7,"compression":4,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.4,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Early-WWI","engines":[{"name":"Aeromarine K-6 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.36,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 80hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.27,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 6 cylinder 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Argus As II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":10.353,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.8,"compression":4.85,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Benz Bz.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.4,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 7Z 95hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.88,"compression":4.3,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9Bf 140hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.46,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 14 Double Lambda 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 70hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.75,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Omega 50hp","engine_type":0,"type":2,"era_sel":0,"displacement":7.7,"compression":4,"cyl_per_row":7,"rows":1,"RPM_boost":1.49,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome monosoupape 9B 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9C 90hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.89,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"RAF 1a 90hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.88,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.9,"material_fudge":1.3,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Late-WWI","engines":[{"name":"Bentley BR.2 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 11EB 200hp","engine_type":0,"type":2,"era_sel":1,"displacement":21.49,"compression":5.1,"cyl_per_row":11,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 16X 420hp","engine_type":0,"type":0,"era_sel":1,"displacement":32.53333333,"compression":5,"cyl_per_row":4,"rows":4,"RPM_boost":0.87,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8F 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.98,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIav 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'18","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle III 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle VIII 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 110hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Dyak 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.800000002,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.III 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.6,"compression":5,"cyl_per_row":11,"rows":1,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Mid-WWI","engines":[{"name":"Argus As III 190hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.9,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Beardmore 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.635,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bz.IV 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.6,"compression":4.9,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9B 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Cosmos Mercury","engine_type":0,"type":1,"era_sel":1,"displacement":19.6,"compression":5.3,"cyl_per_row":7,"rows":2,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss K-12 375hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.33,"material_fudge":0.8,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss OXX-6","engine_type":0,"type":0,"era_sel":1,"displacement":9.3,"compression":4.92,"cyl_per_row":2,"rows":4,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Fiat A.12 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9B Monosoupape 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9N Monosoupape 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":5.1,"cyl_per_row":9,"rows":1,"RPM_boost":1.05,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Aa 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Ab 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8B 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Bc 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Ja 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Jb 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Liberty L-12 400hp","engine_type":0,"type":0,"era_sel":2,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.64,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Lorraine 12Da 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":24.4,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIa 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIaü 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IVa 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Falcon III 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 80hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Arab 208hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.76,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Maori II 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":12.27,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.3,"material_fudge":1.7,"quality_fudge":0.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.II 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Pre-WWI","engines":[{"name":"Mercedes E4F 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Coming Storm","engines":[{"name":"Allison V-1710-85 1200hp","engine_type":0,"type":0,"era_sel":3,"displacement":28,"compression":6.65,"cyl_per_row":2,"rows":6,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bristol Pegasus XVIII 835hp","engine_type":0,"type":1,"era_sel":2,"displacement":28.7,"compression":6.25,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1.2,"quality_fudge":0.8,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Daimler-Benz 601ARJ 1775hp","engine_type":0,"type":0,"era_sel":3,"displacement":33.93,"compression":6.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.84,"material_fudge":0.6,"quality_fudge":0.7,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,true,false]}]},{"name":"Roaring 20s","engines":[{"name":"Argus As 5 1500hp","engine_type":0,"type":0,"era_sel":2,"displacement":94.1,"compression":5.6,"cyl_per_row":6,"rows":4,"RPM_boost":0.638,"material_fudge":0.4,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bréguet Quadrimoteur Type B H-32 970hp","engine_type":0,"type":0,"era_sel":2,"displacement":48.64,"compression":5,"cyl_per_row":4,"rows":8,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'20","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion XI 580hp","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":6,"cyl_per_row":4,"rows":3,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"WWII","engines":[{"name":"Klimov M-105PF 1230hp","engine_type":0,"type":0,"era_sel":3,"displacement":35.101,"compression":7,"cyl_per_row":2,"rows":6,"RPM_boost":0.55,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls Royce Merlin 46 930hp","engine_type":0,"type":0,"era_sel":3,"displacement":27,"compression":5.55,"cyl_per_row":2,"rows":6,"RPM_boost":0.98,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,true,true,false]}]},{"name":"ACDQ","engines":[{"name":"2A-Series 4-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":16,"compression":4.5,"cyl_per_row":1,"rows":2,"RPM_boost":0.5,"material_fudge":0.8,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"F-Series 6-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":17,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.07,"material_fudge":0.7,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"G-Series 9-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":16,"compression":4.7,"cyl_per_row":9,"rows":1,"RPM_boost":1.04,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hartmann H.IIc Straight-6 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":12,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hornet R-3 Boxer 6-Cylinder","engine_type":0,"type":0,"era_sel":1,"displacement":10,"compression":5,"cyl_per_row":2,"rows":3,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Maclean-King Tiger MK.1 V-12 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":17,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ogre-Z Beta V-6","engine_type":0,"type":0,"era_sel":0,"displacement":11,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Pulsejet PV-12 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":12,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-20 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":20,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-8 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":8,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Seguin Σ110 Sigma 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":1,"displacement":14,"compression":4.5,"cyl_per_row":7,"rows":1,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"SuperPegasus 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":13.5,"compression":5,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"TurboGoblin 8-Cylinder Semi-Radial","engine_type":0,"type":4,"era_sel":0,"displacement":13,"compression":5.5,"cyl_per_row":8,"rows":1,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Himmilgard Pulsejet","engines":[{"name":"Pulsejet PV-5 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":5,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-6 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":6,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-7 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":7,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-8 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":8,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-9 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":9,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-10 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":10,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-11 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":11,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-12 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":12,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-13 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":13,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-14 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":14,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-15 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":15,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1}]},{"name":"Himmilgard Liquid Radial","engines":[{"name":"Einsort MM 140hp","engine_type":0,"type":5,"era_sel":1,"displacement":14.72,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Einsort MR 150hp","engine_type":0,"type":5,"era_sel":1,"displacement":15.46,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Gernsback Motor 0005","engine_type":0,"type":5,"era_sel":1,"displacement":12,"compression":6,"cyl_per_row":5,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Liquid Cooled","engines":[{"name":"Meier Bärenjunge 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.5,"compression":5.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.86,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F1166 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 Über 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2000 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Brandt Krieger I 370hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Brandt Kurier XVI 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Fleischmann F10 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fleischmann F10ü 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.75,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fokker Fungizidherstellung Typ 247 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.3,"compression":4.8,"cyl_per_row":1,"rows":6,"RPM_boost":0.85,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Ochs 2 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.84,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Windhund 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Nationales Motorbüro Arbeiter XVII 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,true],"rarity":2},{"name":"Nationales Motorbüro D-1140 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.4,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760tgl 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.4,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-840 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.4,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.05,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro Kurier XXI 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XII 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"SAM Kurier XX 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter I 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.15,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter III 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter V 350hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.75,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Schrankhut RD.300V 230hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":6.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.51,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Wollsteinkraft Verteidiger C 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Wollsteinkraft Verteidiger H 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Wollsteinkraft Wagehals C 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F4398 490hp","engine_type":0,"type":0,"era_sel":1,"displacement":44.3,"compression":4.7,"cyl_per_row":3,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Patriot 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Turbolader-Patriot 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"Meier Bär 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Meier Eisbär 500hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XIII 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":1,"min_IAF":10,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter IV 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":2},{"name":"Sonnenmotor EGH3 220hp","engine_type":0,"type":0,"era_sel":0,"displacement":20,"compression":5,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":50,"upgrades":[false,false,false,true],"rarity":3},{"name":"Wollsteinkraft Wagehals T 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Kurier L 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.99,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Bertha F2080 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.4,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2080 Über 270hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.8,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Contrarotary","engines":[{"name":"Nationales Motorbüro R-1860 160hp","engine_type":0,"type":3,"era_sel":1,"displacement":18.6,"compression":6,"cyl_per_row":11,"rows":1,"RPM_boost":0.65,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro R-1190 110hp","engine_type":0,"type":3,"era_sel":1,"displacement":11.9,"compression":6,"cyl_per_row":9,"rows":1,"RPM_boost":0.67,"material_fudge":1.2,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Air Cooled","engines":[{"name":"Braun UL 90hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun ULK 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.2,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs X 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.1,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun UX 150hp","engine_type":0,"type":1,"era_sel":1,"displacement":13.2,"compression":4.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.23,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Scholz Luchs III 30hp","engine_type":0,"type":1,"era_sel":1,"displacement":3.1,"compression":4.5,"cyl_per_row":3,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs VI 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Breitbusch Libelle \'320hp\'","engine_type":0,"type":1,"era_sel":1,"displacement":22.78,"compression":4.42,"cyl_per_row":9,"rows":1,"RPM_boost":1.31,"material_fudge":1.1,"quality_fudge":0.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Rosevear Ankou B 180hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.9,"compression":5.17,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":1.4,"quality_fudge":0.9,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Semi-Radial","engines":[{"name":"SLW Sigvird 180hp","engine_type":0,"type":4,"era_sel":1,"displacement":11,"compression":6,"cyl_per_row":4,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Rotary","engines":[{"name":"Modded Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Robur Herausforderer 180hp","engine_type":0,"type":2,"era_sel":1,"displacement":18,"compression":5.5,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":40,"upgrades":[false,false,true,true],"rarity":3},{"name":"Rhona Motorbau Z11 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z11tgl 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber B.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber G.IX 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber O.VII 50hp","engine_type":0,"type":2,"era_sel":1,"displacement":8,"compression":4.85,"cyl_per_row":7,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber L.VII 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber TG.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber T.IX 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.3 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Schreiber L.XIV 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1}]}]}');class N{constructor(t){this.constant=!1,this.name=t,this.list=[];const e=window.localStorage.getItem("engines."+this.name);null!=e&&this.fromJSON(JSON.parse(e));const s=window.localStorage.getItem("engines_names");let i=[];s&&(i=JSON.parse(s));let a=!1;for(const e of i)if(e==t){a=!0;break}a||i.push(t),window.localStorage.setItem("engines_names",JSON.stringify(i))}toJSON(){const t=[];for(const e of this.list)t.push(e.toJSON());return{name:this.name,engines:t}}fromJSON(t,e=!1){t.name&&(this.name=t.name),e&&(this.list=[]);for(const s of t.engines)try{this.push(new A(s),e)}catch(t){console.error(t)}}deserializeEngine(t){if(this.constant)throw"Engine List is Constant";const e=new A;return e.deserialize(t),this.push(e)}push(t,e=!1){if(this.constant)throw"Engine List is Constant";if(e)this.remove(t);else for(let e=0;e(""+t.name).localeCompare(e.name))),window.localStorage.setItem("engines."+this.name,JSON.stringify(this.toJSON())),this.find(t)}get(t){return t<0||t>=this.length?new A:this.list[t]}get_name(t){const e=this.find_name(t);return this.get(e)}get_stats(t){return t<0||t>=this.length?new I:this.list[t].PartStats()}get_stats_name(t){const e=this.find_name(t);return this.get_stats(e)}find(t){for(let e=0;e=0&&this.list.splice(e,1),window.localStorage.setItem("engines."+this.name,JSON.stringify(this.toJSON()))}remove_name(t){if(this.constant)throw"Engine List is Constant";const e=this.find_name(t);e>=0&&this.list.splice(e,1),window.localStorage.setItem("engines."+this.name,JSON.stringify(this.toJSON()))}get length(){return this.list.length}SetConstant(){this.constant=!0}}const T=new Map([["Custom",new N("Custom")]]);function x(){return T}function W(t){const e=x();for(const s of e.keys())if("Custom"!=s&&e.get(s).find_name(t)>=0)return s;return e.get("Custom").find_name(t)>=0?"Custom":""}var k,O,F,q,L,B;function H(t){return t==k.ORNITHOPTER_BASIC||t==k.ORNITHOPTER_FLUTTER||t==k.ORNITHOPTER_BUZZER}!function(t){t[t.AIRPLANE=0]="AIRPLANE",t[t.HELICOPTER=1]="HELICOPTER",t[t.AUTOGYRO=2]="AUTOGYRO",t[t.ORNITHOPTER_BASIC=3]="ORNITHOPTER_BASIC",t[t.ORNITHOPTER_FLUTTER=4]="ORNITHOPTER_FLUTTER",t[t.ORNITHOPTER_BUZZER=5]="ORNITHOPTER_BUZZER"}(k||(k={}));class D{FormatEquipment(t,e,s){return Math.abs(s)>.5?t.push({source:h(e),charge:s.toString()}):s>0&&s<1e-6&&t.push({source:h(e),charge:"-"}),t}}function z(t,e){for(let s=0;s0&&t.push({name:s.name,stats:s.stats.toJSON(),qty:s.qty});return window.localStorage.setItem("CustomParts",JSON.stringify(e)),{part_list:t}}fromJSON(t,e){for(const t of this.custom_parts)t.qty=0;for(const e of t.part_list){const t=this.custom_parts.findIndex((t=>t.name==e.name));-1==t?this.custom_parts.push({name:e.name,stats:new u(e.stats),qty:e.qty}):this.custom_parts[t].qty=e.qty}}serialize(t){const e=[];for(const t of this.custom_parts)t.qty>0&&e.push({name:t.name,stats:t.stats,qty:t.qty});t.PushNum(e.length);for(const s of e)t.PushString(s.name),s.stats.serialize(t),t.PushNum(s.qty)}deserialize(t){for(const t of this.custom_parts)t.qty=0;const e=t.GetNum();for(let i=0;it.name==e));-1==s?(s=this.custom_parts.length,this.custom_parts.push({name:e,stats:i,qty:a})):this.custom_parts[s].qty=a}}IsDefault(){for(const t of this.custom_parts)if(t.qty>0)return!1;return!0}ClearAll(){for(const t of this.custom_parts)t.qty=0}AddPart(t,e){var s=0;if(s+=Math.abs(e.drag),s+=Math.abs(e.mass),s+=Math.abs(e.wetmass),s+=Math.abs(e.bomb_mass),s+=Math.abs(e.cost),s+=Math.abs(e.upkeep),s+=Math.abs(e.liftbleed),s+=Math.abs(e.wingarea),s+=Math.abs(e.control),s+=Math.abs(e.pitchstab),s+=Math.abs(e.latstab),s+=Math.abs(e.maxstrain),s+=Math.abs(e.structure),s+=Math.abs(e.toughness),s+=Math.abs(e.power),s+=Math.abs(e.fuelconsumption),s+=Math.abs(e.fuel),s+=Math.abs(e.charge),s+=Math.abs(e.crashsafety),s+=Math.abs(e.visibility),s+=Math.abs(e.escape),s+=Math.abs(e.reliability),0==(s+=Math.abs(e.warnings.length)))return;const i=this.custom_parts.findIndex((e=>e.name==t));-1!=i?this.custom_parts[i].stats=e:this.custom_parts.push({name:t,stats:e,qty:0}),this.custom_parts.sort(((t,e)=>t.name.localeCompare(e.name))),this.CalculateStats()}RemovePart(t){const e=this.custom_parts.findIndex((e=>e.name==t));-1!=e&&this.custom_parts.splice(e,1),this.CalculateStats()}GetParts(){return this.custom_parts}SetUsedPart(t,e){this.custom_parts[t].qty=e,this.CalculateStats()}PartStats(){var t=new u;for(const e of this.custom_parts)if(e.qty>0){let s=e.stats.Clone();s=s.Multiply(e.qty),t=t.Add(s)}return t}GetElectrics(){var t=[];for(const e of this.custom_parts)e.qty>0&&(t=this.FormatEquipment(t,e.name,e.stats.charge));return{storage:0,equipment:t}}SetCalculateStats(t){this.CalculateStats=t}}class j extends D{constructor(t){super(),this.selected=0,this.vals=[];for(const e of t.options){const t={name:e.name,maxbomb:e.maxbomb,cant_lift:e.cant_lift,stats:new u(e)};this.vals.push(t)}}toJSON(){return{selected:this.selected}}fromJSON(t,e){this.selected=t.selected,e<10.35&&this.selected>2&&this.selected++}serialize(t){t.PushNum(this.selected)}deserialize(t){this.selected=t.GetNum()}GetSelected(){return this.selected}GetSelectedText(){return this.vals[this.selected].name}SetSelected(t){this.selected=t,this.CalculateStats()}GetEraOptions(){return this.vals}GetLiftBleed(){return this.vals[this.selected].stats.liftbleed}GetMaxBomb(){return this.vals[this.selected].maxbomb}GetCantLift(){return this.vals[this.selected].cant_lift}PartStats(){var t=new u;return t.Add(this.vals[this.selected].stats)}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class J extends D{constructor(t,e,s,i){super(),this.stats=new u,this.types=t,this.upgrades=e,this.safety=s,this.gunsights=i,this.selected_type=0,this.selected_upgrades=[...Array(this.upgrades.length).fill(!1)],this.selected_safety=[...Array(this.safety.length).fill(!1)],this.selected_gunsights=[...Array(this.gunsights.length).fill(!1)],this.total_stress=[0,0],this.total_escape=0,this.total_visibility=0,this.seat_index=0,this.bombsight=0,this.is_armed=!1}toJSON(){return{type:this.selected_type,upgrades:this.selected_upgrades,safety:this.selected_safety,sights:this.selected_gunsights,bombsight:this.bombsight}}fromJSON(t,e){this.selected_type=t.type,this.selected_upgrades=b(t.upgrades,this.selected_upgrades.length),this.selected_safety=b(t.safety,this.selected_safety.length),this.selected_gunsights=b(t.sights,this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),e>10.35&&(this.bombsight=t.bombsight)}serialize(t){t.PushNum(this.selected_type),t.PushBoolArr(this.selected_upgrades),t.PushBoolArr(this.selected_safety),t.PushBoolArr(this.selected_gunsights),t.PushNum(this.bombsight)}deserialize(t){this.selected_type=t.GetNum(),this.selected_upgrades=t.GetBoolArr(this.selected_upgrades.length),this.selected_safety=t.GetBoolArr(this.selected_safety.length),this.selected_gunsights=t.GetBoolArr(this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),t.version>10.35&&(this.bombsight=t.GetNum())}GetTypeList(){return this.types}GetUpgradeList(){return this.upgrades}GetSafetyList(){return this.safety}GetGunsightList(){return this.gunsights}GetType(){return this.selected_type}SetType(t){if(t>=this.types.length)throw"Selected type is not in range of actual types.";this.selected_type=t,this.CalculateStats()}GetSelectedUpgrades(){return this.selected_upgrades}SetUpgrade(t,e){if(t>=this.upgrades.length)throw"Selected type is not in range of actual upgrades.";this.selected_upgrades[t]=e,this.CalculateStats()}GetSelectedSafety(){return this.selected_safety}CanSafety(){const t=Array(this.safety.length).fill(!0);return t[5]=!this.types[this.selected_type].exposed,t}SetSafety(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual safties.";this.selected_safety[t]=e,this.CalculateStats()}GetSelectedGunsights(){return this.selected_gunsights}SetGunsight(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual gunsights.";this.selected_gunsights[t]=e,this.CalculateStats()}GetVisibility(){return this.types[this.selected_type].stats.visibility<-10?-1/0:this.total_visibility}GetFlightStress(){return this.total_stress}GetEscape(){return this.total_escape}GetCrash(){return this.total_crash}GetAttack(){var t=0;for(let e=0;e0&&(t=t-t%3+1),this.bombsight=t,this.CalculateStats()}SetHasRotary(t){this.has_rotary=t}IsElectrics(){return 0!=this.stats.charge}IsCopilot(){return this.selected_upgrades[0]}SetArmed(t){this.is_armed=t}GetName(){return this.IsPrimary()?"Crew Pilot":this.bombsight>0?"Crew Bombadier":this.IsCopilot()?"Crew Co-Pilot":this.is_armed?"Crew Gunner":"Crew Aircrew"}PartStats(){let t=new u;t.reqsections=1,t=t.Add(this.types[this.selected_type].stats);for(let e=0;e0&&(t.cost+=Math.floor(2.000001+(this.bombsight-4)/3),t.warnings.push({source:h("Bombsight"),warning:h("Bombsight Warning 1")+this.bombsight.toString()+h("Bombsight Warning 2"),color:c.WHITE}),this.IsCopilot()&&t.warnings.push({source:h("Bombadier Controls"),warning:h("Bombadier Controls Warning"),color:c.WHITE})),this.stats=t.Clone(),this.selected_upgrades[0]?(t.flightstress=this.upgrades[0].stats.flightstress,this.stats.flightstress-=t.flightstress):t.flightstress=0,t}CrewUpdate(t,e,s,i,a,r){this.total_escape=this.stats.escape+t;let n=this.stats.flightstress,o=this.stats.flightstress;(this.IsPrimary()||this.selected_upgrades[0])&&(n+=e,o+=e-2*i),n=Math.max(0,n),o=Math.max(0,o),n+=s,o+=s,this.IsOpen()&&this.has_rotary&&(n+=1,o+=1),n=Math.max(0,n),o=Math.max(0,o),this.total_stress=[n,o],this.total_visibility=this.stats.visibility+a,this.total_crash=this.stats.crashsafety+r}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){var t=[];for(let e=0;et;)this.positions.pop();var e=null;for(this.positions.length>0&&(e=JSON.stringify(this.positions[this.positions.length-1].toJSON()));this.positions.length0}GetConnected(){return this.connected}SetConnected(t){this.connected=t,this.CalculateStats()}PartStats(){const t=new u;return t.reqsections=2*Math.ceil((this.seats+2*this.beds)/5-1e-6),this.seats+this.beds>0&&this.connected&&(t.mass=1,t.warnings.push({source:h("Passengers Section Title"),warning:h("Passenger Connectivity Warning"),color:c.WHITE})),t.bomb_mass+=this.seats+this.beds,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),this.seats+this.beds>0&&t.warnings.push({source:h("Passengers Section Title"),warning:h("Passengers Count",this.seats,this.beds),color:c.WHITE}),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class Z extends D{constructor(t,e){super();const s=x();if(this.elist_idx="Custom",this.etype_stats=s.get(this.elist_idx).get_stats(0),this.etype_inputs=s.get(this.elist_idx).get(0),this.cooling_count=this.etype_stats.stats.cooling,this.radiator_index=-1,this.cooling_count>0&&(this.radiator_index=0),this.num_radiators=0,this.mount_list=t,this.mount_sel=0,this.intake_fan=!1,this.use_pp=!1,this.torque_to_struct=!1,this.cowl_list=e,this.cowl_sel=0,this.use_ds=!1,this.outboard_prop=!1,this.gp_count=0,this.gpr_count=0,this.total_reliability=0,this.is_generator=!1,this.has_alternator=!1,s.get(this.elist_idx).length<=0)throw"No Engine Stats Found. Should be at least one."}toJSON(){return{selected_stats:this.etype_stats.toJSON(),selected_inputs:this.etype_inputs.toJSON(),cooling_count:this.cooling_count,radiator_index:this.radiator_index,selected_mount:this.mount_sel,use_pushpull:this.use_pp,pp_torque_to_struct:this.torque_to_struct,use_driveshafts:this.use_ds,geared_propeller_ratio:this.gp_count,geared_propeller_reliability:this.gpr_count,cowl_sel:this.cowl_sel,is_generator:this.is_generator,has_alternator:this.has_alternator,intake_fan:this.intake_fan,outboard_prop:this.outboard_prop}}oldJSON(t,e){const s=t.selected_stats;if(this.etype_stats.fromJSON(s,e),this.etype_inputs=new A,this.etype_stats.pulsejet&&s.input_pj){this.etype_inputs=new A,this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=w.PULSEJET;const t=s.input_pj;this.etype_inputs.type=t.type,this.etype_inputs.power=t.power,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.quality_cost=t.quality_cost,this.etype_inputs.quality_rely=t.quality_rely,this.etype_inputs.starter=t.starter}else if(s.input_eb){this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=w.PROPELLER;const t=s.input_eb;this.etype_inputs.displacement=t.displacement,this.etype_inputs.compression=t.compression,this.etype_inputs.type=t.type,this.etype_inputs.cyl_per_row=t.cyl_per_row,this.etype_inputs.rows=t.rows,this.etype_inputs.RPM_boost=t.RPM_boost,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.material_fudge=t.material_fudge,this.etype_inputs.quality_fudge=t.quality_fudge,this.etype_inputs.upgrades=t.upgrades,6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.compressor_type,this.etype_inputs.compressor_count=t.compressor_count,this.etype_inputs.min_IdealAlt=t.min_IAF)}else this.etype_stats.altitude=10*this.etype_stats.altitude-1;return this.etype_inputs}fromJSON(t,e){const s=x();let i="";if(e>10.55){this.etype_stats.fromJSON(t.selected_stats,e);const a=new A(t.selected_inputs);i=W(this.etype_stats.name),""==i&&(i="Custom","Default"!=a.name&&s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name)}else{const a=this.oldJSON(t,e);"Default"!=a.name&&(i=W(this.etype_stats.name),""==i&&(i="Custom",s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name))}this.elist_idx=i,this.cooling_count=t.cooling_count,this.radiator_index=t.radiator_index,this.mount_sel=t.selected_mount,this.use_pp=t.use_pushpull,this.torque_to_struct=t.pp_torque_to_struct,this.use_ds=t.use_driveshafts,this.gp_count=t.geared_propeller_ratio,this.gpr_count=t.geared_propeller_reliability,this.cowl_sel=t.cowl_sel,this.is_generator=t.is_generator,this.has_alternator=t.has_alternator,this.intake_fan=t.intake_fan,this.outboard_prop=e>=12.15&&t.outboard_prop}serialize(t){this.etype_stats.serialize(t),this.etype_inputs.serialize(t),t.PushNum(this.cooling_count),t.PushNum(this.radiator_index),t.PushNum(this.mount_sel),t.PushBool(this.use_pp),t.PushBool(this.torque_to_struct),t.PushBool(this.use_ds),t.PushNum(this.gp_count),t.PushNum(this.gpr_count),t.PushNum(this.cowl_sel),t.PushBool(this.is_generator),t.PushBool(this.has_alternator),t.PushBool(this.intake_fan),t.PushBool(this.outboard_prop)}oldDeserialize(t){return this.etype_stats.name=t.GetString(),this.etype_stats.overspeed=t.GetNum(),this.etype_stats.altitude=t.GetNum(),this.etype_stats.torque=t.GetNum(),this.etype_stats.rumble=t.GetNum(),this.etype_stats.oiltank=t.GetBool(),this.etype_stats.pulsejet=t.GetBool(),this.etype_inputs=new A,t.version>10.45?(this.etype_inputs.name=this.etype_stats.name,this.etype_stats.pulsejet?(this.etype_inputs.engine_type=w.PULSEJET,this.etype_inputs.power=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.quality_cost=t.GetNum(),this.etype_inputs.quality_rely=t.GetNum(),this.etype_inputs.starter=t.GetBool()):(this.etype_inputs.displacement=t.GetNum(),this.etype_inputs.compression=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.cyl_per_row=t.GetNum(),this.etype_inputs.rows=t.GetNum(),this.etype_inputs.RPM_boost=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.material_fudge=t.GetNum(),this.etype_inputs.quality_fudge=t.GetNum(),this.etype_inputs.upgrades=t.GetBoolArr(0),6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.GetNum(),this.etype_inputs.compressor_count=t.GetNum(),this.etype_inputs.min_IdealAlt=t.GetNum()))):this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_stats.stats.deserialize(t),this.etype_inputs}deserialize(t){const e=x();var s="";if(t.version>10.55){this.etype_stats.deserialize(t);const i=new A;i.deserialize(t),""==(s=W(this.etype_stats.name))&&(s="Custom","Default"!=i.name&&e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name)}else{const i=this.oldDeserialize(t);"Default"!=i.name&&(""==(s=W(this.etype_stats.name))&&(s="Custom",e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name))}this.cooling_count=t.GetNum(),this.radiator_index=t.GetNum(),this.mount_sel=t.GetNum(),this.use_pp=t.GetBool(),this.torque_to_struct=t.GetBool(),this.use_ds=t.GetBool(),this.gp_count=t.GetNum(),this.gpr_count=t.GetNum(),this.cowl_sel=t.GetNum(),this.is_generator=t.GetBool(),this.has_alternator=t.GetBool(),this.intake_fan=t.GetBool(),t.version>=12.15?this.outboard_prop=t.GetBool():this.outboard_prop=!1,this.elist_idx=s}GetMinAltitude(){return this.etype_inputs.min_IdealAlt}GetMaxAltitude(){return this.GetMinAltitude()+this.etype_stats.altitude}GetMinIAF(){return Math.floor(1e-6+this.GetMinAltitude()/10)}GetMaxIAF(){return Math.floor(1e-6+this.GetMaxAltitude()/10)}CanSelectIndex(){const t=x().get(this.elist_idx),e=[...Array(t.length).fill(!0)];if(this.is_internal)for(let s=0;s0}WarnCoolingReliability(){return this.cooling_count=t&&(this.radiator_index=t-1),this.radiator_index<0&&t>0&&(this.radiator_index=0)}GetNumRadiators(){return this.num_radiators}SetRadiator(t){this.radiator_index=t,this.CalculateStats()}GetRadiator(){return this.radiator_index}CanIntakeFan(){return this.IsAirCooled()}SetIntakeFan(t){this.intake_fan=t,this.CalculateStats()}GetIntakeFan(){return this.intake_fan}CanOutboardProp(){return this.use_ds&&(this.IsTractor()||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}GetOutboardProp(){return this.outboard_prop}SetOutboardProp(t){t&&this.use_ds?this.outboard_prop=!0:this.outboard_prop=!1,this.CalculateStats()}SetSelectedList(t){t!=this.elist_idx&&(this.elist_idx=t,this.SetSelectedIndex(0))}GetSelectedList(){return this.elist_idx}GetListOfEngines(){return x().get(this.elist_idx)}RequiresExtendedDriveshafts(){return!this.is_internal&&this.mount_list[this.mount_sel].reqED}SetTailMods(t,e,s){!this.mount_list[this.mount_sel].reqTail||t||e||this.GetGenerator()||(this.use_ds=!0),!this.mount_list[this.mount_sel].reqED||this.GetGenerator()||s&&(t||e)||(this.use_ds=!0)}CanMountIndex(){var t=[...Array(this.mount_list.length).fill(!0)];if(this.is_internal)for(let e=0;e=this.mount_list.length)throw"Index outside of mount_list range.";this.mount_sel=t,this.mount_list[this.mount_sel].reqED?this.SetUseExtendedDriveshaft(!0):this.CalculateStats()}GetMountIndex(){return this.GetIsPulsejet()?-1:this.mount_sel}CanUsePushPull(){return!(this.is_generator||this.GetIsJet()||this.is_internal||this.mount_list[this.mount_sel].helicopter)}SetUsePushPull(t){this.use_pp=t,t?(this.cooling_count*=2,"fuselage"==this.mount_list[this.mount_sel].mount_type&&(this.mount_sel=8)):(this.cooling_count=Math.floor(1e-6+this.cooling_count/2),"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(this.mount_sel=0)),this.CalculateStats()}GetUsePushPull(){return this.use_pp}GetMountList(){return this.mount_list}CanUseExtendedDriveshaft(){return!(0==this.GetNumPropellers()||this.is_internal||this.GetGenerator()||this.mount_list[this.mount_sel].helicopter)}SetUseExtendedDriveshaft(t){this.GetGenerator()||this.is_internal?this.use_ds=!1:this.use_ds=t,this.CalculateStats()}GetUseExtendedDriveshaft(){return this.use_ds}CanUseGears(){return!(0==this.GetNumPropellers()||this.GetGenerator())}SetGearCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gp_count=t,this.SetGearReliability(this.gpr_count)}GetGearCount(){return this.gp_count}SetGearReliability(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gpr_count=Math.min(t,this.gp_count),this.CalculateStats()}GetGearReliability(){return this.gpr_count}SetTorqueToStruct(t){this.torque_to_struct=t,this.use_pp||(this.torque_to_struct=!1),this.CalculateStats()}GetTorqueToStruct(){return this.torque_to_struct}CanTorqueToStruct(){return this.use_pp&&this.etype_stats.torque>0&&"pod"!=this.mount_list[this.mount_sel].mount_type}UpdateReliability(t){this.total_reliability=this.etype_stats.stats.reliability,this.total_reliability-=this.gp_count-this.gpr_count,this.total_reliability+=this.cowl_list[this.cowl_sel].stats.reliability,this.NeedCooling()&&(this.total_reliability-=this.GetMaxCooling()-this.cooling_count),this.GetIntakeFan()&&(this.total_reliability+=6),this.total_reliability+=t}GetReliability(){return this.use_pp?this.outboard_prop?this.total_reliability.toString()+"/"+(this.total_reliability-2).toString():this.total_reliability.toString()+"/"+this.total_reliability.toString():this.outboard_prop?(this.total_reliability-2).toString():this.total_reliability.toString()}GetOverspeed(){return this.is_generator?1e3:this.etype_stats.overspeed+Math.floor(1e-6+this.gp_count*this.etype_stats.overspeed/2)}GetIsPulsejet(){return this.etype_stats.pulsejet}GetIsJet(){return this.GetIsPulsejet()||this.GetIsTurbine()&&!this.GetIsTurboprop()}PulseJetCheck(){this.GetIsPulsejet()&&(this.use_pp=!1,this.use_ds=!1,this.gp_count=0,this.gpr_count=0,this.cooling_count=0,this.has_alternator=!1,this.is_generator=!1,this.cowl_sel=0,this.radiator_index=-1)}GetIsTurbine(){return this.etype_inputs.engine_type==w.TURBOMACHINERY}GetIsTurboprop(){return this.etype_inputs.engine_type==w.TURBOMACHINERY&&3==this.etype_inputs.type}TurbineCheck(){this.GetIsTurbine()&&(0==this.GetNumPropellers()&&(this.use_ds=!1,this.gp_count=0,this.gpr_count=0),this.cooling_count=0,this.cowl_sel=0,this.radiator_index=-1)}GetNumPropellers(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.GetGenerator())||this.GetIsTurboprop()||this.is_internal?this.use_pp?2:1:0}GetIsTractorNacelle(){return this.GetNumPropellers()>0&&!this.GetUsePushPull()&&.8==this.mount_list[this.mount_sel].powerfactor&&!this.is_internal}IsLiquidCooled(){return this.NeedCooling()}IsRotary(){return this.etype_stats.oiltank}IsContraRotary(){return!this.GetIsPulsejet()&&!this.GetIsTurbine()&&""!=this.elist_idx&&3==this.etype_inputs.type}IsAirCooled(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.IsLiquidCooled()||this.IsRotary())}GetCowlList(){return this.cowl_list}GetCowl(){return this.cowl_sel}GetCowlEnabled(){const t=[];for(const e of this.cowl_list)this.GetIsPulsejet()||this.GetIsTurbine()?t.push(e.air&&e.rotary&&e.liquid):this.IsLiquidCooled()?t.push(e.liquid):this.IsRotary()?t.push(e.rotary):t.push(e.air);return t}GetHasOilTank(){return this.etype_stats.oiltank}GetHasOilCooler(){return this.etype_stats.stats.cooling>0}GetHasOilPan(){return this.IsAirCooled()}VerifyCowl(t){const e=this.GetCowlEnabled();e[t]&&(this.cowl_sel=t),e[this.cowl_sel]||(this.cowl_sel=0)}SetCowl(t){this.VerifyCowl(t),this.CalculateStats()}GetGeneratorEnabled(){return!(this.GetIsPulsejet()||this.use_pp||this.GetIsElectric())}GetGenerator(){return this.is_generator}SetGenerator(t){this.GetGeneratorEnabled()?this.is_generator=t:this.is_generator=!1,this.is_generator&&(this.gp_count=0,this.gpr_count=0,this.use_ds=!1,this.use_pp=!1),this.CalculateStats()}GetIsElectric(){return this.etype_inputs.engine_type==w.ELECTRIC}GetAlternatorEnabled(){return!(this.GetIsPulsejet()||this.is_generator||this.GetIsElectric())}GetAlternator(){return this.has_alternator}SetAlternator(t){this.GetAlternatorEnabled()?this.has_alternator=t:this.has_alternator=!1,this.CalculateStats()}GetRumble(){return this.etype_stats.rumble}IsTractor(){return!(this.is_internal||this.GetGenerator()||"Tractor"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetTractorSpinner(){return{has:this.IsTractor()&&!(this.outboard_prop&&!this.use_pp),spinner:this.GetSpinner()}}IsPusher(){return!(this.is_internal||this.GetGenerator()||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetPusherSpinner(){return{has:this.IsPusher()&&!this.outboard_prop,spinner:this.GetSpinner()}}GetSpinner(){if(this.gp_count>0&&!this.GetGenerator()){if(this.use_ds&&("Center-Mounted Tractor"==this.mount_list[this.mount_sel].name||"Center-Mounted Pusher"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name))return[!0,!0];if(!this.etype_stats.oiltank)return[!0,!1]}return[!1,!1]}IsElectrics(){return this.has_alternator||this.GetGenerator()}GetEngineHeight(){return this.GetGenerator()?5:"Pod"==this.mount_list[this.mount_sel].name||this.etype_stats.pulsejet||this.is_internal||this.outboard_prop?2:"Nacelle (Offset)"==this.mount_list[this.mount_sel].name?1:"Nacelle (Inside)"==this.mount_list[this.mount_sel].name||"Channel Tractor"==this.mount_list[this.mount_sel].name||"Wing Pod"==this.mount_list[this.mount_sel].name?0:-1}IsTractorRotary(){return!this.GetGenerator()&&this.IsRotary()&&("Tractor"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}IsDiesel(){return this.etype_inputs.upgrades[3]}SetCalculateStats(t){this.CalculateStats=t}SetInternal(t){this.is_internal=t,t&&(this.use_ds=!1)}VerifyMount(){if(this.GetIsTurbine()&&!this.GetIsTurboprop())for(;!this.mount_list[this.mount_sel].turbine;)this.mount_sel++;else if(this.GetIsPulsejet()){if("fuselage"==this.mount_list[this.mount_sel].mount_type)for(let t=0;t0&&t.era.push({name:"Propeller Gearing",era:"WWI"}),this.gpr_count>0&&t.era.push({name:"Reliable Gearing",era:"Roaring 20s"}),this.use_ds&&(t.mass+=1),t=t.Add(this.cowl_list[this.cowl_sel].stats),t.mass+=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].mpd),t.drag=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].ed),this.use_pp&&(t.power*=2,t.mass*=2,t.cooling*=2,t.fuelconsumption*=2,t.cost*=2,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.upkeep*=2,t.reqsections*=2,t.charge*=2,t.power=Math.floor(1e-6+this.mount_list[this.mount_sel].powerfactor*t.power)),"No Cowling"==this.cowl_list[this.cowl_sel].name||"Sealed Cowl"==this.cowl_list[this.cowl_sel].name||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name||(t.cost+=2),this.IsAirCooled()&&this.intake_fan?(t.mass+=3,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.cost+=4,t.era.push({name:"Air Cooling Fan",era:"WWII"})):this.intake_fan=!1,this.GetHasOilCooler()&&(t.drag+=Math.floor(t.power/15)),this.GetIsPulsejet()||(t=t.Add(this.mount_list[this.mount_sel].stats),t.maxstrain-=Math.floor(1e-6+this.mount_list[this.mount_sel].strainfactor*this.etype_stats.stats.mass),t.drag+=Math.floor(1e-6+this.mount_list[this.mount_sel].dragfactor*this.etype_stats.stats.mass)),this.is_generator?(t.charge=Math.floor(1e-6+2*t.power/10)+2,t.power=0,t.visibility=2):this.has_alternator&&(t.charge=Math.floor(1e-6+t.power/10)+1,t.mass+=1,t.cost+=2,this.use_pp&&"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(t.mass+=1,t.cost+=2)),this.outboard_prop&&(t.drag+=3,this.use_pp&&(t.escape+=2)),this.is_first_pulsejet&&(t.cost+=5),t.pitchspeed=0,t.reliability=0,t}GetElectrics(){return{storage:0,equipment:[]}}}class X extends D{constructor(t,e,s){super(),this.need_cool=0,this.idx_type=1,this.idx_mount=1,this.idx_coolant=0,this.metal_area=0,this.engine_count=0,this.type_list=t,this.mount_list=e,this.coolant_list=s,this.harden_cool=!1}toJSON(){return{type:this.idx_type,mount:this.idx_mount,coolant:this.idx_coolant,harden_cool:this.harden_cool}}fromJSON(t,e){this.idx_type=t.type,this.idx_mount=t.mount,this.idx_coolant=t.coolant,e>10.85&&(this.harden_cool=t.harden_cool)}serialize(t){t.PushNum(this.idx_type),t.PushNum(this.idx_mount),t.PushNum(this.idx_coolant),t.PushBool(this.harden_cool)}derserialize(t){this.idx_type=t.GetNum(),this.idx_mount=t.GetNum(),this.idx_coolant=t.GetNum(),t.version>10.85&&(this.harden_cool=t.GetBool())}GetTypeList(){return this.type_list}GetMountList(){return this.mount_list}GetCoolantList(){return this.coolant_list}CanType(){const t=[...Array(this.type_list.length).fill(!0)];for(let e=0;et;)this.engines.pop();var e=null;for(this.engines.length>0&&(e=JSON.stringify(this.engines[this.engines.length-1].toJSON()));this.engines.lengtht;)this.radiators.pop();for(;this.radiators.length0&&!this.NeedCooling()&&this.SetNumberOfRadiators(0),this.radiators.length}NeedCooling(){let t=!1;for(const e of this.engines)t=t||e.NeedCooling();return t}UpdateReliability(t){for(const e of this.engines){let s=new u;e.GetRadiator()=0&&(s=this.radiators[e.GetRadiator()].PartStats()),e.UpdateReliability(t.reliability+s.reliability)}}SetAsymmetry(t){this.is_asymmetric=t,this.CalculateStats()}GetAsymmetry(){return this.is_asymmetric}GetNumPropellers(){var t=0;for(const e of this.engines)t+=e.GetNumPropellers();return t}GetOverspeed(){let t=100;for(const e of this.engines)t=Math.min(t,e.GetOverspeed());return t}GetRumble(){var t=0;for(const e of this.engines)t+=e.GetRumble();return t}GetMaxRumble(){var t=0;for(const e of this.engines)t=Math.max(t,e.GetRumble());return t}GetTractorSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetTractorSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}GetPusherSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetPusherSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}IsElectrics(){for(const t of this.engines)if(t.IsElectrics())return!0;return!1}HaveParasol(t){for(const e of this.radiators)e.SetParasol(t)}SetMetalArea(t){for(const e of this.radiators)e.SetMetalArea(t)}SetTailMods(t,e,s){for(const i of this.engines)i.SetTailMods(t,e,s)}GetEngineHeight(){var t=2;for(const e of this.engines)t=Math.min(t,e.GetEngineHeight());return t}HasTractorRotary(){for(const t of this.engines)if(t.IsTractorRotary())return!0;return!1}SetInternal(t){for(const e of this.engines)e.SetInternal(t);if(t)for(const t of this.radiators)t.SetMetalArea(0),t.SetParasol(!1)}HasPulsejet(){for(const t of this.engines)if(t.GetIsPulsejet())return!0;return!1}HasTurbineNoProp(){for(const t of this.engines)if(t.GetIsTurbine()&&0==t.GetNumPropellers())return!0;return!1}HasDiesel(){for(const t of this.engines)if(t.IsDiesel())return!0;return!1}GetEngineTypes(){var t=[];for(const e of this.engines)e.GetNumPropellers()>0?t.push({type:P.PROPELLER,num:e.GetNumPropellers()}):e.GetIsPulsejet()?t.push({type:P.PULSEJET,num:0}):e.GetIsTurbine()&&t.push({type:P.TURBINE,num:e.GetCurrentStats().stats.pitchspeed});return t}GetIsFlammable(){for(const t of this.radiators)if(t.GetIsFlammable())return!0;return!1}PartStats(){var t=new u;const e=new Array(this.GetNumberOfRadiators()).fill(null).map((()=>({cool:0,count:0})));var s=0,i=100,a=!1,n=2;for(let r of this.engines){!a&&r.GetIsPulsejet()?(a=!0,r.SetFirstPulsejet(!0)):r.SetFirstPulsejet(!1);const o=r.PartStats();n=Math.min(n,o.visibility),t=t.Add(o),r.NeedCooling()&&(e[r.GetRadiator()].cool+=r.GetCooling(),e[r.GetRadiator()].count+=1),s+=r.GetCurrentStats().stats.cost,o.pitchspeed>0&&(i=Math.min(i,o.pitchspeed))}t.visibility=n,i<100&&(t.pitchspeed=i),t.upkeep=Math.floor(1e-6+Math.min(t.upkeep,s));let o=new u;const l=new Map;for(let t=0;t0?t.warnings.push({source:h("Rotary"),warning:h("Rotary Right Warning"),color:c.WHITE}):_<0&&t.warnings.push({source:h("Rotary"),warning:h("Rotary Left Warning"),color:c.WHITE}),t.reliability=0,t}SetCalculateStats(t){this.CalculateStats=t}GetHasTractorNacelles(){let t=0;for(const e of this.engines)e.GetIsTractorNacelle()&&t++;return t>1}GetElectrics(){let t={storage:0,equipment:[]};for(let e=0;e10.25&&(this.sel_skin=t.sel_skin),this.interal_bracing_count=this.CountInternalBracing()}serialize(t){t.PushNum(this.section_list.length);for(let e=0;e10.25&&(this.sel_skin=t.GetNum()),this.interal_bracing_count=this.CountInternalBracing()}DuplicateSection(t,e=1){const s=this.section_list[t];for(let i=0;ithis.CountSections()+this.tail_section_list.length)for(let t=this.section_list.length-1;t>=0;t--)if(this.section_list[t].internal_bracing){this.interal_bracing_count--,this.section_list.splice(t,1);break}e&&this.CalculateStats()}}SetRequiredSections(t){if(this.required_sections=t,this.required_sections>this.CountSections()&&(0==this.section_list.length&&this.section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),this.required_sections-this.CountSections()>0))for(let t=this.section_list.length-1;t>=0;t--)if(!this.section_list[t].internal_bracing)return void this.DuplicateSection(t,this.required_sections-this.CountSections())}SetRequiredTailSections(t){for(t>this.tail_section_list.length&&(0==this.tail_section_list.length&&this.tail_section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),t-this.tail_section_list.length>0&&this.DuplicateTailSection(this.tail_section_list.length-1,t-this.tail_section_list.length));t0&&!this.section_list[t].internal_bracing;t--);this.DeleteSection(t,!1)}this.CalculateStats()}CountSections(){return this.section_list.length-this.interal_bracing_count}GetNumFrames(){return this.CountSections()+this.tail_section_list.length}CountInternalBracing(){var t=0;for(const e of this.section_list)e.internal_bracing&&t++;return t}BaseType(){const t=[...Array(this.frame_list.length).fill(0)];for(const e of this.section_list)e.internal_bracing||t[e.frame]++;for(const e of this.tail_section_list)e.internal_bracing||t[e.frame]++;var e=0,s=0;for(let i=t.length-1;i>=0;i--)t[i]>s&&(s=t[i],e=i);return e}GetFrameList(){return this.frame_list}GetSkinList(){return this.skin_list}GetSectionList(){return this.section_list}SetFrame(t,e){this.section_list[t].frame=e,this.frame_list[e].geodesic||(this.section_list[t].geodesic=!1),this.CalculateStats()}SetGeodesic(t,e){this.frame_list[this.section_list[t].frame].geodesic&&(this.section_list[t].geodesic=e,this.CalculateStats())}SetMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].monocoque=e,this.CalculateStats())}SetLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].lifting_body=e,this.CalculateStats())}SetInternalBracing(t,e){e&&!this.section_list[t].internal_bracing&&this.PossibleInternalBracing(!0)&&this.CountSections()>this.required_sections?(this.section_list[t].internal_bracing=!0,this.section_list[t].monocoque=!1,this.section_list[t].lifting_body=!1,this.interal_bracing_count++,this.CalculateStats()):e||(this.section_list[t].internal_bracing=!1,this.interal_bracing_count--,this.CalculateStats())}PossibleInternalBracing(t=!1){var e=this.CountSections();return this.farman||(e+=this.tail_section_list.length),t&&(e-=1),this.interal_bracing_count+1<=e}PossibleGeodesic(t){return this.frame_list[this.section_list[t].frame].geodesic&&!this.section_list[t].monocoque}PossibleMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].lifting_body}PossibleLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].monocoque}PossibleTailGeodesic(t){return this.frame_list[this.tail_section_list[t].frame].geodesic&&!this.tail_section_list[t].monocoque}PossibleTailMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].lifting_body}PossibleTailLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].monocoque}PossibleRemoveSections(){return this.CountSections()>this.required_sections}GetFarmanOrBoom(){return this.farman||this.boom}SectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),t.internal_bracing||(e.drag+=4,t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}TailSectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),e.drag+=4,this.farman||(t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}CountMainLiftingBody(){var t=0;for(const e of this.section_list)e.lifting_body&&t++;return t}CountTailLiftingBody(){var t=0;for(const e of this.tail_section_list)e.lifting_body&&t++;return t}CountLiftingBody(){return this.CountMainLiftingBody()+this.CountTailLiftingBody()}SetIsTandem(t){this.is_tandem!=t&&(this.is_tandem=t,this.SetTailType(this.sel_tail))}SetTailType(t){0==this.tail_list[t].stats.reqsections&&this.is_tandem&&t++,this.sel_tail=t,this.SetRequiredTailSections(this.tail_list[t].stats.reqsections)}GetTailType(){return this.sel_tail}GetTailList(){return this.tail_list}GetTailSectionList(){return this.tail_section_list}SetUseFarman(t){if(this.farman=t,t&&this.boom&&(this.boom=!1),this.farman)for(const t of this.tail_section_list)t.monocoque=!1,t.lifting_body=!1;this.CalculateStats()}GetUseFarman(){return this.farman}SetUseBoom(t){this.boom=t,t&&this.farman&&(this.farman=!1),this.CalculateStats()}GetUseBoom(){return this.boom}SetTailFrame(t,e){this.tail_section_list[t].frame=e,this.frame_list[e].geodesic||(this.tail_section_list[t].geodesic=!1),this.CalculateStats()}SetTailGeodesic(t,e){this.frame_list[this.tail_section_list[t].frame].geodesic&&(this.tail_section_list[t].geodesic=e,this.CalculateStats())}SetTailMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].monocoque=e,this.CalculateStats())}SetTailLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].lifting_body=e,this.CalculateStats())}SetHasTractorNacelles(t){this.has_tractor_nacelles=t}GetHasTractorNacelles(){return this.has_tractor_nacelles}CanFlyingWing(){for(const t of this.section_list)if(t.lifting_body)return!0;for(const t of this.tail_section_list)if(t.lifting_body)return!0;return!1}GetFlyingWing(){return this.flying_wing}SetFlyingWing(t){t&&this.CanFlyingWing()?this.flying_wing=!0:this.flying_wing=!1,this.CalculateStats()}GetIsTailless(){return 0==this.tail_section_list.length}SetAllFrame(t){for(const e of this.section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);for(const e of this.tail_section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);this.CalculateStats()}SetAllSkin(t){this.sel_skin=t;for(const e of this.section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);for(const e of this.tail_section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);this.CalculateStats()}GetArmor(){return"Dragon Skin"==this.skin_list[this.sel_skin].name?5:0}GetIsFlammable(){return!!this.skin_list[this.sel_skin].flammable}GetSkin(){return this.sel_skin}CanCutout(){let t=this.section_list.length*this.skin_list[this.sel_skin].stats.visibility;return this.farman?t+=this.tail_section_list.length:t+=this.tail_section_list.length*this.skin_list[this.sel_skin].stats.visibility,t<3}SetCalculateStats(t){this.CalculateStats=t}PartStats(){this.CanFlyingWing()||(this.flying_wing=!1);var t=new u;const e=this.BaseType();t.structure=this.frame_list[e].basestruct,t.cost=this.frame_list[e].basecost;var s=this.skin_list[this.sel_skin].monocoque_structure<0;for(const e of this.section_list)t=t.Add(this.SectionStats(e)),s=s&&(e.internal_bracing||e.monocoque);var i=new u;for(const t of this.tail_section_list)i=i.Add(this.TailSectionStats(t)),this.farman||(s=s&&(t.internal_bracing||t.monocoque));s&&(t.structure+=30),t=t.Add(this.tail_list[this.sel_tail].stats),this.boom&&(i.maxstrain-=i.mass,this.has_tractor_nacelles||(i.drag=Math.floor(1e-6+1.5*i.drag))),this.farman?(t.drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor,t.visibility+=this.tail_section_list.length,i.mass=Math.floor(1e-6+.5*i.mass),t=t.Add(i)):((t=t.Add(i)).drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor);const a=this.CountLiftingBody();return t.cost+=a,this.flying_wing?t.liftbleed+=5:t.drag+=a,this.PossibleRemoveSections()&&this.CountMainLiftingBody()11.15)this.wing_list=t.wing_list,this.mini_wing_list=t.mini_wing_list;else{const e=t.wing_list;this.wing_list=this.OldtoNew(e);const s=t.mini_wing_list;this.mini_wing_list=this.OldtoNew(s)}this.wing_stagger=t.wing_stagger,this.is_swept=t.is_swept,this.is_closed=t.is_closed}OldtoNew(t){const e=[];for(const s of t)e.push({surface:s.surface,area:s.area,span:s.span,anhedral:s.anhedral,dihedral:s.dihedral,gull:!1,deck:s.deck});return e}serialize(t){t.PushNum(this.wing_list.length);for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.wing_list.push(e)}const s=t.GetNum();this.mini_wing_list=[];for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.mini_wing_list.push(e)}this.wing_stagger=t.GetNum(),this.is_swept=t.GetBool(),this.is_closed=t.GetBool()}SetRotorSpan(t){this.rotor_span=t}GetWingList(){return this.wing_list}GetMiniWingList(){return this.mini_wing_list}GetSkinList(){return this.skin_list}GetStaggerList(){return this.stagger_list}GetDeckList(){return this.deck_list}DeckCountFull(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.wing_list)t[e.deck]++;return t}DeckCountMini(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.mini_wing_list)t[e.deck]++;return t}CanStagger(){const t=[...Array(this.stagger_list.length).fill(!1)];if(this.acft_type==k.ORNITHOPTER_FLUTTER)this.wing_list.length>1?t[1]=!0:t[0]=!0;else{if(this.wing_list.length>1)for(let e=1;e1?this.wing_stagger=1:this.wing_stagger=0)}SetStagger(t){for(this.wing_stagger=t;this.stagger_list[t].wing_count=0;e--){const s=this.wing_list[e];t[s.deck]>1&&this.deck_list[s.deck].limited&&(t[s.deck]--,this.wing_list.splice(e,1))}}this.CalculateStats()}GetStagger(){return this.wing_list.length>0?this.wing_stagger:-1}CanAddFullWing(t){if(t>=this.deck_list.length&&console.log("Deck out of Bounds"),!this.stagger_list[this.wing_stagger].inline){if(t==O.SHOULDER&&this.HasPolishWing())return!1;if(this.DeckCountFull()[t]==O.SHOULDER&&this.deck_list[t].limited)return!1}return 0==this.DeckCountMini()[t]}CanAddMiniWing(t){const e=this.DeckCountFull(),s=this.DeckCountMini();return 0==e[t]&&0==s[t]}CanMoveFullWing(t,e){const s=this.wing_list[t];this.wing_list.splice(t,1);const i=this.CanAddFullWing(e);return this.wing_list.splice(t,0,s),i}CanMoveMiniWing(t,e){const s=this.mini_wing_list[t];this.mini_wing_list.splice(t,1);const i=this.CanAddMiniWing(e);return this.mini_wing_list.splice(t,0,s),i}GetWingHeight(){let t=0;for(const e of this.wing_list)t=Math.max(t,4-e.deck);return t}CanClosed(){return this.wing_list.length>1}SetClosed(t){this.wing_list.length>0?this.is_closed=t:this.is_closed=!1,this.CalculateStats()}GetClosed(){return this.is_closed}CanSwept(){return this.wing_list.length>0}SetSwept(t){this.wing_list.length>0?this.is_swept=t:this.is_swept=!1,this.CalculateStats()}GetSwept(){return this.is_swept}GetTandem(){return this.stagger_list[this.wing_stagger].inline&&this.wing_list.length>1}GetMonoplane(){return 1==this.wing_list.length}GetStaggered(){return 0!=this.stagger_list[this.wing_stagger].stats.liftbleed}SetFullWing(t,e){this.wing_list.length!=t&&this.wing_list.splice(t,1),e.area!=e.area&&(e.area=3),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,3),e.span=Math.max(e.span,1),this.CanAddFullWing(e.deck)&&this.wing_list.splice(t,0,e)),this.wing_list.length>1&&0==this.wing_stagger?this.wing_stagger=4:this.wing_list.length<=1&&(this.wing_stagger=0),e.dihedral=Math.floor(1e-6+e.dihedral),e.anhedral=Math.floor(1e-6+e.anhedral),e.dihedral=Math.max(0,Math.min(e.dihedral,e.span-1)),e.anhedral=Math.max(0,Math.min(e.anhedral,e.span-1-e.dihedral)),this.CalculateStats()}SetMiniWing(t,e){this.mini_wing_list.length!=t&&this.mini_wing_list.splice(t,1),e.area!=e.area&&(e.area=2),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,1),e.area=Math.min(e.area,2),e.span=Math.max(e.span,1),this.CanAddMiniWing(e.deck)&&this.mini_wing_list.splice(t,0,e)),this.CalculateStats()}HasNonGullDeck(t){for(const e of this.wing_list)if(e.deck==t&&!e.gull)return!0;return!1}CanGull(t){if(t==O.PARASOL){if(!this.GetTandem()&&this.HasNonGullDeck(O.SHOULDER))return!1}else{if(t==O.SHOULDER)return!1;if(!this.GetTandem()&&this.HasNonGullDeck(t-1))return!1}return!0}IsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}NeedHStab(){return this.stagger_list[this.wing_stagger].hstab}NeedTail(){return this.NeedHStab()||!this.is_swept}GetSpan(){let t=0;for(const e of this.wing_list){const s=e.span;t=Math.max(t,s)}for(const e of this.mini_wing_list){const s=e.span;t=Math.max(t,s)}return t}GetArea(){let t=0;for(const e of this.wing_list)t+=e.area;for(const e of this.mini_wing_list)t+=e.area;return t}GetParasol(){for(const t of this.wing_list)if(t.deck==O.PARASOL)return!0;for(const t of this.mini_wing_list)if(t.deck==O.PARASOL)return!0;return!1}GetMetalArea(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].metal&&(t+=e.area);for(const e of this.mini_wing_list)this.skin_list[e.surface].metal&&(t+=e.area);return t}GetWingDrag(){let t=0;const e=this.DeckCountFull();let s=0,i=0;for(const a of this.wing_list){const r=a.span;let n=a.area;s=Math.max(s,r),a.gull&&(n=Math.floor(1e-6+1.1*n));let o=Math.max(1,6*n*n/(r*r));o=Math.max(1,o*this.skin_list[a.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&e[a.deck]>1&&(o=Math.floor(1e-6+.75*o),o=Math.max(1,o)),o=Math.floor(1e-6+o),s==r&&(i=i),t+=o}for(const e of this.mini_wing_list){const s=e.span;let i=Math.max(1,6*e.area*e.area/(s*s));i=Math.max(1,i*this.skin_list[e.surface].dragfactor),i=Math.floor(1e-6+i),t+=i}const a=this.GetIsSesquiplane();return(a.is||this.GetMonoplane())&&-1!=a.deck&&(t-=Math.floor(1e-6+(1-this.long_list[a.deck].dragfactor)*i)),t}GetIsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}SetAircraftMass(t){this.plane_mass=t}GetPaperMass(){let t=0;for(const e of this.wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}for(const e of this.mini_wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}return Math.max(-Math.floor(1e-6+.25*this.plane_mass),t)}GetIsSesquiplane(){let t=0,e=-1,s=0,i=1e100,a=0;for(const r of this.wing_list)r.area>t?(t=r.area,e=r.deck,s=r.span):r.area==t&&(e=-1),i>r.area&&(i=r.area,a=r.span);let r=t>=2*i;return r=r&&!this.GetMonoplane()&&!this.GetTandem(),r?{is:r,deck:e,super_small:.75*s>=a}:{is:!1,deck:e,super_small:!1}}HasPolishWing(){for(const t of this.wing_list)if(t.deck==O.PARASOL&&1==t.gull)return!0;return!1}HasInvertedGull(){let t=-1;for(const e of this.wing_list)e.gull&&e.deck>O.SHOULDER&&(t=Math.max(t,e.deck));return t}CanCutout(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].transparent&&(t+=1);return t<3}PartStats(){this.CanClosed()||(this.is_closed=!1),this.CanSwept()||(this.is_swept=!1);var t=new u;let e=!1;const s=this.DeckCountFull();let i=!1,a=this.rotor_span,r=0,n=0;for(let i of this.wing_list){this.CanGull(i.deck)||(i.gull=!1),a=Math.max(a,i.span),e?(t.control+=3,t.liftbleed+=5,t.visibility-=1):e=!0;let o=new u;o=o.Add(this.skin_list[i.surface].stats.Multiply(i.area)),o.wingarea=i.area,o.maxstrain+=Math.min(0,-(2*i.span+i.area-10)),this.acft_type==k.ORNITHOPTER_BUZZER&&(o.maxstrain+=Math.min(0,-(2*i.span+i.area-10))),o.maxstrain*=this.skin_list[i.surface].strainfactor,this.skin_list[i.surface].transparent&&n<3&&(o.visibility+=1,n+=1);const l=i.span;let h=i.area;i.gull&&(h=Math.floor(1e-6+1.1*h));const c=Math.max(1,6*h*h/(l*l));o.drag=o.drag+c,o.drag=Math.max(1,o.drag*this.skin_list[i.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&s[i.deck]>1&&(o.drag=Math.floor(1e-6+.75*o.drag),o.drag=Math.max(1,o.drag)),t=t.Add(this.deck_list[i.deck].stats),o.latstab+=i.dihedral-i.anhedral,o.liftbleed+=i.dihedral+i.anhedral,o.Round(),a==i.span&&(r=o.drag),o.mass<0&&(o.mass=0),t=t.Add(o)}for(const e of this.mini_wing_list){a=Math.max(a,e.span),t.control+=1,i?t.liftbleed+=1:i=!0;const s=this.skin_list[e.surface].stats.Multiply(e.area);s.wingarea=e.area,s.maxstrain+=Math.min(0,-(2*e.span+e.area-10)),s.maxstrain*=this.skin_list[e.surface].strainfactor;const r=e.span;s.drag=Math.max(1,s.drag+6*e.area*e.area/(r*r)),s.drag=Math.max(1,s.drag*this.skin_list[e.surface].dragfactor),s.latstab+=e.dihedral-e.anhedral,s.liftbleed+=e.dihedral+e.anhedral,s.Round(),s.mass<0&&(s.mass=0),t=t.Add(s)}t.control+=8-a,t.latstab+=Math.min(0,a-8);const o=this.GetIsSesquiplane();if((o.is||this.GetMonoplane())&&-1!=o.deck&&((t=t.Add(this.long_list[o.deck].stats)).drag-=Math.floor(1e-6+(1-this.long_list[o.deck].dragfactor)*r)),o.is&&(t.liftbleed-=2,t.control+=2),this.stagger_list[this.wing_stagger].inline)for(const e of s)e>1&&(t.liftbleed+=3*(e-1));switch(this.HasPolishWing()&&(t.visibility+=1,t.maxstrain+=10),this.HasInvertedGull()){case 1:case 2:case 3:break;case 4:t.maxstrain+=10,t.crashsafety+=1}if((this.HasInvertedGull()>0||this.HasPolishWing())&&t.era.push({name:"Gull Wing",era:"Coming Storm"}),this.is_swept&&(t.liftbleed+=5,t.latstab--),this.is_closed){const e=Math.floor(1e-6+this.wing_list.length/2);t.mass+=1*e,t.control-=5*e,t.maxstrain+=20*e}return this.wing_list.length>1&&(t=t.Add(this.stagger_list[this.wing_stagger].stats)),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){const t={storage:0,equipment:[]};let e=0,s="";for(const t of this.wing_list){const i=this.skin_list[t.surface];0!=i.stats.charge&&(s=h(i.name),e+=i.stats.charge*t.area,e=Math.floor(1e-6+e))}return 0!=e&&t.equipment.push({source:s,charge:e.toString()}),t}}class et extends D{constructor(t){super(),this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.is_heli=!1,this.hstab_sel=0,this.hstab_count=1,this.hstab_list=[];for(const e of t.hstab)this.hstab_list.push({name:e.name,is_canard:e.is_canard,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail});this.vstab_sel=0,this.vstab_count=1,this.vstab_list=[];for(const e of t.vstab)this.vstab_list.push({name:e.name,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail})}toJSON(){return{hstab_sel:this.hstab_sel,hstab_count:this.hstab_count,vstab_sel:this.vstab_sel,vstab_count:this.vstab_count}}fromJSON(t,e){this.hstab_sel=t.hstab_sel,this.hstab_count=t.hstab_count,this.vstab_sel=t.vstab_sel,this.vstab_count=t.vstab_count}serialize(t){t.PushNum(this.hstab_sel),t.PushNum(this.hstab_count),t.PushNum(this.vstab_sel),t.PushNum(this.vstab_count)}deserialize(t){this.hstab_sel=t.GetNum(),this.hstab_count=t.GetNum(),this.vstab_sel=t.GetNum(),this.vstab_count=t.GetNum()}IsDefault(){return 0==this.hstab_sel&&1==this.hstab_count&&0==this.vstab_sel&&1==this.vstab_count}GetHStabList(){return this.hstab_list}GetVStabList(){return this.vstab_list}GetHStabType(){return this.hstab_sel}SetHStabType(t){("The Wings"!=this.hstab_list[t].name||this.is_tandem||this.is_swept)&&(this.hstab_list[t].is_vtail?this.SetVTail():this.hstab_list[this.hstab_sel].is_vtail&&(this.vstab_sel=0,this.vstab_count=1),this.hstab_sel=t,this.SetHStabCount(this.hstab_count))}GetHValidList(){var t=[];if(this.is_heli)t=Array(this.hstab_list.length).fill(!1),this.have_tail?t[0]=!0:t[1]=!0;else for(const e of this.hstab_list)"The Wings"!=e.name&&"Outboard"!=e.name||this.is_tandem||this.is_swept?e.is_tail&&!this.have_tail?t.push(!1):t.push(!0):t.push(!1);return t}GetIsVTail(){return this.hstab_list[this.hstab_sel].is_vtail}SetVTail(){for(let t=0;t=0?this.hstab_list[this.hstab_sel].increment:1}GetVStabCount(){return this.vstab_count}SetVStabCount(t){if((t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.vstab_count=t,0!=this.vstab_list[this.vstab_sel].increment)for(;this.vstab_count%this.vstab_list[this.vstab_sel].increment!=0;)this.vstab_count++;else this.vstab_count=0;this.CalculateStats()}GetVStabIncrement(){return this.vstab_sel>=0?this.vstab_list[this.vstab_sel].increment:1}SetEngineCount(t){this.engine_count=t}GetIsTandem(){return this.is_tandem}SetIsTandem(t){this.is_tandem=t}SetIsSwept(t){this.is_swept=t}CanVOutboard(){return this.is_swept||this.is_tandem||this.hstab_list[this.hstab_sel].is_canard&&this.hstab_count>0}GetVOutboard(){return"Outboard"==this.vstab_list[this.vstab_sel].name}GetCanard(){return this.hstab_list[this.hstab_sel].is_canard}SetLiftingArea(t){this.lifting_area=t}SetHaveTail(t){if(this.have_tail=t,!t){this.GetHValidList()[this.hstab_sel]||(this.hstab_sel=2);const t=this.GetVValidList();t[this.vstab_sel]||(t[1]||(this.hstab_sel=2),this.vstab_sel=1,this.vstab_count%2!=0&&this.vstab_count++)}this.is_heli&&(this.have_tail?this.hstab_sel=0:this.hstab_sel=1,this.hstab_count=1)}SetHelicopter(t){this.is_heli=t,t&&(this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.lifting_area=0,this.engine_count=0,this.hstab_sel=0,this.hstab_count=1,this.vstab_sel=0,this.vstab_count=1)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=this.GetHValidList();t[this.hstab_sel]||(this.hstab_sel=0,t[this.hstab_sel]||(this.hstab_sel=0,this.hstab_count=0));const e=this.GetVValidList();e[this.vstab_sel]||(this.vstab_sel=0,e[this.vstab_sel]||(this.vstab_sel=0,this.vstab_count=0));var s=new u;if(this.hstab_count>0){s=s.Add(this.hstab_list[this.hstab_sel].stats);var i=0;this.is_heli?(i=Math.floor(1e-6+this.wing_drag/8*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/4*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(1,i))}else(this.hstab_sel<0||0!=this.hstab_list[this.hstab_sel].increment)&&(s.pitchstab-=Math.floor(1e-6+this.lifting_area/2),s.liftbleed+=5);if(this.vstab_count>0?(s=s.Add(this.vstab_list[this.vstab_sel].stats),i=0,this.is_heli?(i=Math.floor(1e-6+this.wing_drag/16*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/8*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(1,i))):(this.vstab_sel<0||0!=this.vstab_list[this.vstab_sel].increment||0==this.vstab_list[this.vstab_sel].increment&&0==this.hstab_count)&&(s.latstab-=this.lifting_area),s.drag+=2*(Math.max(0,this.hstab_count-1)+Math.max(0,this.vstab_count-1)),this.vstab_sel>=0&&0!=this.vstab_list[this.vstab_sel].increment){var a=Math.max(0,this.hstab_count-1);const t=Math.min(this.engine_count-1,this.vstab_count-1);a+=Math.max(0,this.vstab_count-1-t),s.control+=3*t+a}else{const t=Math.max(0,Math.min(this.engine_count-1,this.hstab_count-1));a=Math.max(0,this.hstab_count-1-t),s.control+=3*t+a}return s}GetElectrics(){return{storage:0,equipment:[]}}}class st extends D{constructor(t){super(),this.span=0,this.is_cantilever=0,this.wing_area=0,this.mp=0,this.is_boom=!1,this.acft_type=k.AIRPLANE,this.aileron_sel=0,this.aileron_list=[];for(const e of t.ailerons)this.aileron_list.push({name:e.name,warping:e.warping,stats:new u(e)});this.rudder_sel=0,this.rudder_list=[];for(const e of t.rudders)this.rudder_list.push({name:e.name,stats:new u(e)});this.elevator_sel=0,this.elevator_list=[];for(const e of t.elevators)this.elevator_list.push({name:e.name,stats:new u(e)});this.flaps_sel=0,this.flaps_list=[];for(const e of t.flaps)this.flaps_list.push({name:e.name,costfactor:e.costfactor,stats:new u(e)});this.slats_sel=0,this.slats_list=[];for(const e of t.slats)this.slats_list.push({name:e.name,stats:new u(e)});this.drag_list=[];for(const e of t.drag_inducers)this.drag_list.push({name:e.name,stats:new u(e)});this.drag_sel=[...Array(this.drag_list.length).fill(!1)]}toJSON(){return{aileron_sel:this.aileron_sel,rudder_sel:this.rudder_sel,elevator_sel:this.elevator_sel,flaps_sel:this.flaps_sel,slats_sel:this.slats_sel,drag_sel:this.drag_sel}}fromJSON(t,e){this.aileron_sel=t.aileron_sel,this.rudder_sel=t.rudder_sel,this.elevator_sel=t.elevator_sel,this.flaps_sel=t.flaps_sel,this.slats_sel=t.slats_sel,this.drag_sel=b(t.drag_sel,this.drag_sel.length)}serialize(t){t.PushNum(this.aileron_sel),t.PushNum(this.rudder_sel),t.PushNum(this.elevator_sel),t.PushNum(this.flaps_sel),t.PushNum(this.slats_sel),t.PushBoolArr(this.drag_sel)}deserialize(t){this.aileron_sel=t.GetNum(),this.rudder_sel=t.GetNum(),this.elevator_sel=t.GetNum(),this.flaps_sel=t.GetNum(),this.slats_sel=t.GetNum(),this.drag_sel=t.GetBoolArr(this.drag_sel.length)}IsDefault(){return 0==this.aileron_sel&&0==this.rudder_sel&&0==this.elevator_sel&&0==this.flaps_sel&&0==this.slats_sel&&0==this.drag_sel.reduce(((t,e)=>t||e),!1)}GetAileronList(){return this.aileron_list}CanAileron(){const t=[];if(H(this.acft_type))for(const e of this.aileron_list)t.push(e.warping);else for(const e of this.aileron_list)e.warping&&0==this.wing_area?t.push(!1):t.push(!0);return t}GetAileron(){return this.aileron_sel}SetAileron(t){this.aileron_sel=t,this.CalculateStats()}GetRudderList(){return this.rudder_list}CanRudder(){return this.can_rudder}SetCanRudder(t){this.can_rudder=t,t||(this.rudder_sel=0)}GetRudder(){return this.rudder_sel}SetRudder(t){this.rudder_sel=t,this.CalculateStats()}GetElevatorList(){return this.elevator_list}CanElevator(){return this.can_elevator}SetCanElevator(t){this.can_elevator=t,t||(this.elevator_sel=0)}GetElevator(){return this.elevator_sel}SetElevator(t){this.elevator_sel=t,this.CalculateStats()}GetFlapsList(){return this.flaps_list}GetFlaps(){return this.flaps_sel}SetFlaps(t){this.flaps_sel=t,this.CalculateStats()}GetFlapCost(t){return t&&(this.mp=t),this.flaps_list[this.flaps_sel].costfactor>0?Math.max(1,Math.floor(1e-6+this.flaps_list[this.flaps_sel].costfactor*this.mp)):0}GetSlatsList(){return this.slats_list}GetSlats(){return this.slats_sel}SetSlats(t){this.slats_sel=t,this.CalculateStats()}GetDragList(){return this.drag_list}GetDrag(){return this.drag_sel}SetDrag(t,e){this.drag_sel[t]=e,this.CalculateStats()}SetNumCantilever(t){this.is_cantilever=t}SetSpan(t){this.span=t}SetWingArea(t){this.wing_area=t}SetAcftType(t){if(this.acft_type=t,this.acft_type==k.HELICOPTER){this.aileron_sel=0,this.rudder_sel=0,this.elevator_sel=0,this.flaps_sel=0,this.slats_sel=0;for(let t=0;tt)),this.is_cantilever=0}}SetBoomTail(t){this.is_boom=t}SetIsVTail(t){t&&(this.rudder_sel=this.elevator_sel)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;this.aileron_list[this.aileron_sel].warping&&0==this.wing_area&&(this.aileron_sel=0),t=t.Add(this.aileron_list[this.aileron_sel].stats),this.aileron_list[this.aileron_sel].warping&&(t.maxstrain-=this.span,this.is_cantilever&&(t.cost+=2*this.is_cantilever,t.era.push({name:h("Cantilever Wing Warping"),era:"Last Hurrah"})),this.is_boom&&(t.pitchstab-=2,t.latstab-=2,t.warnings.push({source:h("Wing Warping"),warning:h("Wing Warping Warning"),color:c.WHITE}))),t=(t=(t=(t=t.Add(this.rudder_list[this.rudder_sel].stats)).Add(this.elevator_list[this.elevator_sel].stats)).Add(this.flaps_list[this.flaps_sel].stats)).Add(this.slats_list[this.slats_sel].stats);for(let e=0;e10.25&&t.wing_blades,e<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}serialize(t){t.PushNumArr(this.ext_wood_count),t.PushNumArr(this.ext_steel_count),t.PushNumArr(this.cant_count),t.PushBool(this.wires),t.PushNum(this.cabane_sel),t.PushBool(this.wing_blades)}deserialize(t){this.ext_wood_count=t.GetNumArr(this.ext_wood_count.length),this.ext_steel_count=t.GetNumArr(this.ext_steel_count.length),this.cant_count=t.GetNumArr(this.cant_count.length),this.wires=t.GetBool(),this.cabane_sel=t.GetNum(),t.version>10.25?this.wing_blades=t.GetBool():this.wing_blades=!1,t.version<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}GetExternalList(){return this.ext_wood_list}GetCantileverList(){return this.cant_list}CanExternalWood(){const t=[...Array(this.ext_wood_list.length).fill(this.can_external)];for(let e=0;e0}SetCantileverCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.ImplSCC(t,e),this.CalculateStats()}ImplSCC(t,e){var s=e-this.cant_count[t];if(this.cant_list[t].limited&&e>0){var i=this.TotalStructure();for(let t=0;tthis.acft_structure)for(let t=this.cant_list.length-1;t>=0;t--)s=s||this.ImplSCC(t,this.cant_count[t]);s&&this.CalculateStats()}TotalStructure(){var t=this.ext_cabane_list[this.cabane_sel].stats.structure,e=!1;for(let s=0;s0||this.ext_steel_count[s]>0)&&(e=!0);return e&&(t+=5),this.acft_structure+t}GetCantileverType(){const t=this.cant_count[0]+this.cant_count[4];return this.cant_count[1]+this.cant_count[2]+this.cant_count[3]>0?2:t>0?1:0}GetCabaneList(){return this.ext_cabane_list}GetCabane(){return this.cabane_sel}SetCabane(t){this.cabane_sel=t,this.CalculateStats()}SetCantLift(t){this.cant_lift=t}CanWingBlade(){for(const t of this.ext_wood_count)if(t>0)return!1;for(const t of this.ext_steel_count)if(t>0)return!1;return 0==this.cabane_sel&&this.cant_count[2]>0}GetWingBlade(){return this.wing_blades}SetWingBlade(t){this.wing_blades=t,this.CalculateStats()}SetAircraftType(t){this.acft_type=t,t==k.HELICOPTER&&(this.can_external=!1,this.is_monoplane=!1,this.is_tandem=!1,this.is_staggered=!1),t==k.ORNITHOPTER_BUZZER&&(this.can_external=!1);const e=this.CanExternalWood();for(let t=0;t0){a=a||this.ext_wood_list[r].first;let i=this.ext_wood_list[r].stats;i=i.Multiply(this.ext_wood_count[r]),t=t.Add(i),this.ext_wood_list[r].config?s+=e*this.ext_wood_list[r].tension*this.ext_wood_count[r]:s+=this.ext_wood_list[r].tension*this.ext_wood_count[r]}for(let r=0;r0){a=a||this.ext_wood_list[r].first;let i=this.ext_steel_list[r].stats.Clone();i=i.Multiply(this.ext_steel_count[r]),t=t.Add(i),this.ext_steel_list[r].config?s+=e*this.ext_steel_list[r].tension*this.ext_steel_count[r]:s+=this.ext_steel_list[r].tension*this.ext_steel_count[r]}this.acft_type==k.ORNITHOPTER_BASIC&&(t.maxstrain=Math.floor(1e-6+.5*t.maxstrain)),a&&(t.structure+=5,t.maxstrain+=10,s+=10);const r=this.ext_cabane_list[this.cabane_sel].stats.Clone();t=t.Add(r),s+=e*this.ext_cabane_list[this.cabane_sel].tension,this.cabane_sel>0&&(i+=1),this.wires&&(t.maxstrain+=Math.floor(1e-6+s),t.drag+=3*i);var n=!1;for(let e=0;e0){n=!0;let s=this.cant_list[e].stats;s=s.Multiply(this.cant_count[e]),s.maxstrain,t=t.Add(s)}return this.CanWingBlade()?this.wing_blades&&(t.mass*=2,t.warnings.push({source:h("Wing Blades"),warning:h("Wing Blades Warning"),color:c.WHITE})):this.wing_blades=!1,n&&(t.cost+=5,t.liftbleed-=this.cant_lift),t}GetElectrics(){return{storage:0,equipment:[]}}}class at extends D{constructor(t){super(),this.tank_stats=[],this.tank_count=[];for(const e of t.tanks)this.tank_stats.push({name:e.name,stats:new u(e),internal:e.internal,cantilever:e.cantilever}),this.tank_count.push(0);this.self_sealing=!1,this.is_cantilever=!1,this.wing_area=-1}toJSON(){return{tank_count:this.tank_count,self_sealing:this.self_sealing,fire_extinguisher:this.fire_extinguisher}}fromJSON(t,e){this.tank_count=y(t.tank_count,this.tank_count.length),this.self_sealing=t.self_sealing,this.fire_extinguisher=t.fire_extinguisher,this.wing_area=-1}serialize(t){t.PushNumArr(this.tank_count),t.PushBool(this.self_sealing),t.PushBool(this.fire_extinguisher)}deserialize(t){this.tank_count=t.GetNumArr(this.tank_count.length),this.self_sealing=t.GetBool(),this.fire_extinguisher=t.GetBool(),this.wing_area=-1}GetTankList(){return this.tank_stats}GetTankEnabled(){const t=[];for(const e of this.tank_stats)!this.is_cantilever&&e.cantilever?t.push(!1):t.push(!0);return t}GetTankCount(){return this.tank_count}SetTankCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.tank_count[t]=e,this.VerifyOK(),this.CalculateStats()}SetCantilever(t){this.is_cantilever&&!t&&(this.is_cantilever=t,this.VerifyOK()&&this.CalculateStats()),this.is_cantilever=t}SetArea(t){this.wing_area>t&&(this.wing_area=t,this.VerifyOK()&&this.CalculateStats()),this.wing_area=t}VerifyOK(){if(-1!=this.wing_area){var t=0;for(let e=0;e0;for(;s>0;)for(let t=this.tank_count.length-1;t>=0;t--)if(this.tank_stats[t].cantilever){this.tank_count[t]--,s--;break}for(let t=0;t0}GetSelfSealing(){return this.self_sealing}SetSelfSealing(t){this.self_sealing=t,this.CalculateStats()}GetExtinguisher(){return this.fire_extinguisher}SetExtinguisher(t){this.fire_extinguisher=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u,e=0;for(let s=0;s0&&(t.wetmass+=5-t.wetmass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class rt extends D{constructor(){super(),this.bomb_count=0,this.rocket_count=0,this.internal_bay_count=0,this.internal_bay_1=!1,this.internal_bay_2=!1}toJSON(){return{bomb_count:this.bomb_count,rocket_count:this.rocket_count,bay_count:this.internal_bay_count,bay1:this.internal_bay_1,bay2:this.internal_bay_2}}fromJSON(t,e){this.bomb_count=t.bomb_count,this.internal_bay_count=t.bay_count,this.internal_bay_1=t.bay1,this.internal_bay_2=t.bay2,e>10.75&&(this.rocket_count=t.rocket_count)}serialize(t){t.PushNum(this.bomb_count),t.PushNum(this.internal_bay_count),t.PushBool(this.internal_bay_1),t.PushBool(this.internal_bay_2),t.PushNum(this.rocket_count)}deserialize(t){this.bomb_count=t.GetNum(),this.internal_bay_count=t.GetNum(),this.internal_bay_1=t.GetBool(),this.internal_bay_2=t.GetBool(),t.version>10.75&&(this.rocket_count=t.GetNum())}GetRocketCount(){return this.rocket_count}GetBombCount(){return this.bomb_count}GetInternalBombCount(){var t=10*this.internal_bay_count;return this.bomb_count>0&&this.internal_bay_count>0&&this.internal_bay_1&&(t*=2,this.internal_bay_2&&(t*=2)),t}GetMaxBombSize(){var t=0;const e=this.GetInternalBombCount();return this.bomb_count>0&&this.internal_bay_count>0&&(t=this.internal_bay_1?this.internal_bay_2?Math.floor(1e-6+e):Math.floor(1e-6+e/2):Math.floor(1e-6+e/4)),t}SetRocketCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.rocket_count=t,this.LimitMass(),this.CalculateStats()}SetBombCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.bomb_count=t,this.LimitMass(),this.CalculateStats()}GetBayCount(){return this.internal_bay_count}GetBay1(){return this.internal_bay_1}GetBay2(){return this.internal_bay_2}SetBayCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.internal_bay_count=t,this.CalculateStats()}SetUseBays(t,e){this.internal_bay_1=t,this.internal_bay_2=e,!this.internal_bay_1&&this.internal_bay_2&&(this.internal_bay_1=!0,this.internal_bay_2=!1),this.CalculateStats()}LimitMass(){var t=!1;const e=Math.min(this.GetInternalBombCount(),Math.floor(1e-6+3*this.acft_struct*this.maxbomb));var s,i,a=0,r=0;s=this.bomb_count>e?e:this.bomb_count,i=this.rocket_count+s>e?e-s:this.rocket_count,a=this.bomb_count-s,r=this.rocket_count-i;const n=Math.floor(1e-6+this.acft_struct*this.maxbomb-(s+i)/3)*this.gull_factor;for(;a+r>n;)r>0?r--:a--;let o=Math.max(0,s+a);this.bomb_count>o&&(t=!0,this.bomb_count=o);let l=Math.max(0,i+r);return this.rocket_count>l&&(t=!0,this.rocket_count=l),t}GetExternalMass(){const t=this.bomb_count+this.rocket_count;return Math.max(0,t-this.GetInternalBombCount())}SetAcftParameters(t,e,s){switch(this.acft_struct=t,this.maxbomb=e,s){case 2:case 3:this.gull_factor=1.1;break;case 4:this.gull_factor=1.2;break;default:this.gull_factor=1}this.LimitMass()&&this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u,e=this.GetExternalMass();if(t.reqsections+=this.internal_bay_count,this.internal_bay_count>0){const e=t.reqsections;this.internal_bay_1&&(t.reqsections+=e,this.internal_bay_2&&(t.reqsections+=e))}const s=Math.ceil(e/5-1e-6);return t.mass+=s,t.drag+=s,t.bomb_mass=this.bomb_count+this.rocket_count,t.reqsections=Math.ceil(-1e-6+t.reqsections),t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class nt extends D{constructor(t){super(),this.cargo_list=[];for(const e of t.spaces)this.cargo_list.push({name:e.name,stats:new u(e)});this.cargo_sel=0}toJSON(){return{space_sel:this.cargo_sel}}fromJSON(t,e){this.cargo_sel=t.space_sel}serialize(t){t.PushNum(this.cargo_sel)}deserialize(t){this.cargo_sel=t.GetNum()}GetSpaceList(){return this.cargo_list}GetSpace(){return this.cargo_sel}SetSpace(t){this.cargo_sel=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;return(t=t.Add(this.cargo_list[this.cargo_sel].stats)).bomb_mass+=3*t.reqsections,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class ot extends D{constructor(t){super(),this.gear_list=[],this.gear_sel=0,this.retract=!1;for(const e of t.gear)this.gear_list.push({name:e.name,stats:new u(e),DpLMP:e.DpLMP,SpLMP:e.SpLMP,can_retract:e.can_retract});this.extra_list=[];for(const e of t.extras)this.extra_list.push({name:e.name,stats:new u(e),MpLMP:e.MpLMP});this.extra_sel=[...Array(this.extra_list.length).fill(!1)]}toJSON(){return{gear_sel:this.gear_sel,retract:this.retract,extra_sel:this.extra_sel}}fromJSON(t,e){this.gear_sel=t.gear_sel,this.retract=t.retract,this.extra_sel=b(t.extra_sel,this.extra_sel.length)}serialize(t){t.PushNum(this.gear_sel),t.PushBool(this.retract),t.PushBoolArr(this.extra_sel)}deserialize(t){this.gear_sel=t.GetNum(),this.retract=t.GetBool(),this.extra_sel=t.GetBoolArr(this.extra_sel.length)}IsDefault(){return 0==this.gear_sel&&0==this.retract&&0==this.extra_sel.reduce(((t,e)=>t||e),!1)}GetGearName(){return this.retract&&"Boat Hull"==this.gear_list[this.gear_sel].name?h("Retractable Gear + Boat Hull"):this.retract?h("Retractable ")+h(this.gear_list[this.gear_sel].name):h(this.gear_list[this.gear_sel].name)}GetGearList(){return this.gear_list}CanGear(){const t=[...Array(this.gear_list.length).fill(!0)];for(let e=0;e=2||0==t&&e>=3}SetGull(t){this.gull_deck=t}SetCalculateStats(t){this.CalculateStats=t}IsVital(){return!0}PartStats(){var t=new u;this.CanGear()[this.gear_sel]||(this.gear_sel=0),this.CanRetract()||(this.retract=!1);var e=this.loadedMass;for(let s=0;s=0;i--)s+=t[i],t[i]=s-e;return t}SetArmourCoverage(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.armour_coverage[t]=1!=t?e:e-this.skin_armour,this.NormalizeCoverage(),this.CalculateStats()}NormalizeCoverage(){var t=-8+Math.min(0,-Math.floor(1e-6+(this.vital_parts-8)/2));t+=this.skin_armour;for(let e=this.armour_coverage.length-1;e>=0;e--)this.armour_coverage[e]=Math.max(0,Math.min(Math.abs(t),this.armour_coverage[e])),t+=this.armour_coverage[e]}GetElectricalList(){return this.electric_list}GetElectricalCount(){return this.electrical_count}SetElectricalCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),e=Math.min(e,50),this.electrical_count[t]=e,this.CalculateStats()}GetRadioList(){return this.radio_list}GetRadioSel(){return this.radio_sel}SetRadioSel(t){this.radio_sel=t,this.CalculateStats()}GetReconList(){return this.recon_list}GetReconSel(){return this.recon_sel}SetReconSel(t,e){((e=Math.trunc(e))!=e||e<0)&&(e=0),this.recon_sel[t]=e,this.CalculateStats()}GetVisibilityList(){return this.visi_list}GetCanVisibility(){return this.can_visi}GetVisibilitySel(){return this.visi_sel}SetVisibilitySel(t,e){this.visi_sel[t]=e,this.CalculateStats()}GetClimateList(){return this.clim_list}GetClimateSel(){return this.clim_sel}GetClimateEnable(){const t=[];for(const e of this.clim_list)!this.acft_rad&&e.req_radiator?t.push(!1):t.push(!0);return t}SetClimateSel(t,e){this.clim_sel[t]=e,this.CalculateStats()}GetAutopilotList(){return this.auto_list}GetAutopilotSel(){return this.auto_sel}SetAutopilotSel(t){this.auto_sel=t,this.CalculateStats()}GetControlList(){return this.cont_list}GetControlSel(){return this.cont_sel}SetControlSel(t){this.cont_sel=t,this.CalculateStats()}SetAcftRadiator(t){this.acft_rad=t}IsElectrics(){for(const t of this.electrical_count)if(t>0)return!0;for(let t=0;t0&&(""!=e&&(e+=", "),e+=r.toString()+"/"+(11-s[a]).toString()+"+")}""!=e&&t.warnings.push({source:h("Armour"),warning:e,color:c.WHITE});for(let e=0;e0){let s=this.electric_list[e].stats.Clone();s=s.Multiply(this.electrical_count[e]),t=t.Add(s)}t=t.Add(this.radio_list[this.radio_sel].stats);for(let e=0;e0){let s=this.recon_list[e].stats.Clone();s=s.Multiply(this.recon_sel[e]),t=t.Add(s)}for(let e=0;e0&&(t+=i.storage*a,i.cp10s>0?e.push({source:h(i.name),charge:r.Format("{0}"+h("Derived Per 10 Speed"),Math.floor(1e-6+a*i.cp10s))}):0!=i.stats.charge&&e.push({source:h(i.name),charge:(a*i.stats.charge).toString()}))}const s=this.radio_list[this.radio_sel];e=this.FormatEquipment(e,s.name,s.stats.charge);for(let t=0;t0&&(e=this.FormatEquipment(e,s.name,i*s.stats.charge))}for(let t=0;t0){let e=Math.min(t,this.drag);e=Math.max(e,0),this.drag-=e,t-=e,e=Math.min(t,this.reliability),e=Math.max(e,0),this.reliability-=e,t-=e,e=Math.min(t,this.maxstrain),e=Math.max(e,0),this.maxstrain-=e,t-=e,e=Math.min(t,this.toughness),e=Math.max(e,0),this.toughness-=e,t-=e,e=Math.min(t,this.mass),e=Math.max(e,0),this.mass-=e,t-=e,e=Math.min(t,this.escape),e=Math.max(e,0),this.escape-=e,t-=e,e=Math.min(t,this.bleed),e=Math.max(e,0),this.bleed-=e,t-=e,e=Math.min(t,this.cost),e=Math.max(e,0),this.cost-=e,t-=e}}GetFreeDots(){return this.free_dots}SetFreeDots(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,0),this.free_dots=t,this.ReduceDots(),this.CalculateStats()}GetCost(){return this.cost}SetCost(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.cost=t,this.ReduceDots(),this.CalculateStats()}GetBleed(){return this.bleed}SetBleed(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.bleed=t,this.ReduceDots(),this.CalculateStats()}GetEscape(){return this.escape}SetEscape(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.escape=t,this.ReduceDots(),this.CalculateStats()}GetMass(){return this.mass}SetMass(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.mass=t,this.ReduceDots(),this.CalculateStats()}GetToughness(){return this.toughness}SetToughness(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.toughness=t,this.ReduceDots(),this.CalculateStats()}GetMaxStrain(){return this.maxstrain}SetMaxStrain(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.maxstrain=t,this.ReduceDots(),this.CalculateStats()}GetReliabiilty(){return this.reliability}SetReliability(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.reliability=t,this.ReduceDots(),this.CalculateStats()}GetDrag(){return this.drag}SetDrag(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.drag=t,this.ReduceDots(),this.CalculateStats()}SetAcftStats(t){this.acft_stats=t}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u;return t.cost=Math.floor(1e-6+-this.cost*this.acft_stats.cost/10),t.liftbleed=Math.floor(1e-6+3*-this.bleed),t.escape=this.escape,t.visibility=this.escape,t.mass=Math.floor(1e-6+-this.mass*this.acft_stats.mass/10),t.toughness=Math.floor(1e-6+this.toughness*this.acft_stats.toughness/4),t.reliability=2*this.reliability,t.drag=Math.floor(1e-6+-this.drag*this.acft_stats.drag/10),t}GetElectrics(){return{storage:0,equipment:[]}}}!function(t){t[t.NONE=-1]="NONE",t[t.INTERRUPT=0]="INTERRUPT",t[t.SYNCH=1]="SYNCH",t[t.SPINNER=2]="SPINNER",t[t.DEFLECT=3]="DEFLECT",t[t.NO_INTERFERENCE=4]="NO_INTERFERENCE",t[t.ENUM_MAX=5]="ENUM_MAX"}(F||(F={})),(B=q||(q={}))[B.BULLETS=0]="BULLETS",B[B.HEATRAY=1]="HEATRAY",B[B.PNEUMATIC=2]="PNEUMATIC",B[B.ENUM_MAX=3]="ENUM_MAX",B[B.GYROJETS=4]="GYROJETS",function(t){t[t.STANDARD=0]="STANDARD",t[t.MECHANICAL=1]="MECHANICAL",t[t.GAST=2]="GAST",t[t.ROTARY=3]="ROTARY",t[t.ENUM_MAX=4]="ENUM_MAX"}(L||(L={}));class ct extends D{constructor(t,e,s,i=!1){super(),this.weapon_type=t,this.fixed=i,this.wing=!0,this.covered=!1,this.accessible=!1,this.free_accessible=!1,this.synchronization=i?F.NONE:F.INTERRUPT,this.w_count=1,this.repeating=!1,this.wing_reinforcement=!1}toJSON(){return{fixed:this.fixed,wing:this.wing,covered:this.covered,accessible:this.accessible,free_accessible:this.free_accessible,synchronization:this.synchronization,w_count:this.w_count}}fromJSON(t,e){this.fixed=t.fixed,this.wing=t.wing,this.covered=t.covered,this.accessible=t.accessible,this.free_accessible=t.free_accessible,this.synchronization=t.synchronization,this.w_count=t.w_count,e<10.95&&(this.repeating=t.repeating)}serialize(t){t.PushBool(this.fixed),t.PushBool(this.wing),t.PushBool(this.covered),t.PushBool(this.accessible),t.PushBool(this.free_accessible),t.PushNum(this.synchronization),t.PushNum(this.w_count)}deserialize(t){this.fixed=t.GetBool(),this.wing=t.GetBool(),this.covered=t.GetBool(),this.accessible=t.GetBool(),this.free_accessible=t.GetBool(),this.synchronization=t.GetNum(),this.w_count=t.GetNum(),t.version<10.95&&(this.repeating=t.GetBool())}SetWeaponType(t,e,s){this.weapon_type=t,this.action=e,16==this.weapon_type.size&&(this.w_count=1),this.SetCount(this.w_count,!1)}GetFixed(){return this.fixed}SetFixed(t){t!=this.fixed&&(t?this.fixed=!0:(this.fixed=!1,this.synchronization=F.NONE))}SetCanWing(t){this.canwing=t,this.wing&&!t&&(this.wing=!1)}GetWing(){return this.wing}CanWing(){return this.weapon_type.size<=16&&this.canwing}SetWing(t){t&&this.CanWing()?(this.wing=!0,this.free_accessible=!1,this.synchronization=F.NONE):this.wing=!1,this.CalculateStats()}CanCovered(){return this.wing?this.has_cantilever&&!(16==this.weapon_type.size&&!this.fixed):!(this.GetArty()&&!this.fixed)}GetCovered(){return this.covered}SetCovered(t){this.covered=t,this.CalculateStats()}GetAccessible(){return this.accessible||this.free_accessible}SetAccessible(t){t&&this.free_accessible&&(t=!1),this.accessible=t,this.CalculateStats()}GetFreeAccessible(){return this.free_accessible}SetFreeAccessible(t){t&&!this.wing&&this.can_free_accessible?(this.free_accessible=!0,this.accessible=!1):this.free_accessible=!1,this.CalculateStats()}CanSynchronization(){const t=[];for(let e=-1;e16;)t-=1;this.w_count=t,e&&this.CalculateStats()}CanRepeating(){return!this.weapon_type.rapid||this.weapon_type.reload>0}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:this.repeating=!1,this.CalculateStats()}ResolveSynch(){const t=this.synchronization;if(this.synchronization=F.ENUM_MAX,this.CanSynch(t))this.action==L.MECHANICAL&&t!=F.SPINNER?this.synchronization=F.SYNCH:this.synchronization=t;else{for(let t=-1;t8||16==this.weapon_type.size)&&(t.reqsections+=1),this.accessible&&(t.cost+=Math.max(1,Math.floor(1e-6+this.w_count/2))),!this.fixed)if(e<=2);else if(e<=4)t.cost+=1;else if(e<=8)t.mass+=1,t.cost+=3;else{if(!(e<=16))throw"Weapon size screwup in Turret size cost.";t.mass+=2,t.cost+=5}return this.synchronization==F.INTERRUPT?(t.cost+=2*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=2*this.w_count),t.era.push({name:h("Interruptor Gear"),era:h("WWI")})):this.synchronization==F.SYNCH&&this.action!=L.MECHANICAL?(t.cost+=3*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=3*this.w_count),t.era.push({name:h("Synchronization Gear"),era:h("Roaring 20s")})):this.synchronization==F.DEFLECT?(t.cost+=1,t.warnings.push({source:h(this.weapon_type.name),warning:h("Deflector Plate Warning"),color:c.WHITE})):this.synchronization!=F.NO_INTERFERENCE||this.IsLightningArc()||t.warnings.push({source:h(this.weapon_type.name)+" "+h("No Interference"),warning:h("No Interference Warning"),color:c.YELLOW}),this.wing_reinforcement&&(t.mass+=2),t.Round(),t}GetElectrics(){return{storage:0,equipment:[]}}}class ut extends D{constructor(t,e){super(),this.weapon_list=t,this.wl_permute=e,this.directions=[...Array(6).fill(!1)],this.directions[0]=!0,this.fixed=!0,this.ammo=1,this.weapon_type=0,this.raw_weapon_type=0,this.weapons=[],this.action_sel=L.STANDARD,this.projectile_sel=q.BULLETS,this.has_propeller=!0,this.sticky_guns=0,this.repeating=!1,this.seat=0,this.final_weapon={name:"",abrv:"",era:"",size:0,stats:new u,damage:0,hits:0,ammo:0,ap:0,jam:"",reload:0,rapid:!1,synched:!1,shells:!1,can_action:!1,can_projectile:!1,deflection:0},this.MakeFinalWeapon(),this.SWC(1)}toJSON(){const t=[];for(const e of this.weapons)t.push(e.toJSON());return{weapon_type:this.raw_weapon_type,fixed:this.fixed,directions:this.directions,weapons:t,ammo:this.ammo,action:this.action_sel,projectile:this.projectile_sel,repeating:this.repeating,seat:this.seat}}fromJSON(t,e){this.raw_weapon_type=t.weapon_type,this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.fixed,this.directions=b(t.directions,this.directions.length),this.weapons=[],this.ammo=t.ammo,null==this.ammo&&(this.ammo=1),e<10.25?(this.action_sel=L.STANDARD,this.projectile_sel=q.BULLETS):(this.action_sel=t.action,this.projectile_sel=t.projectile),e<11.75&&(this.projectile_sel==q.PNEUMATIC?this.projectile_sel=q.BULLETS:this.projectile_sel==q.ENUM_MAX&&(this.projectile_sel=q.PNEUMATIC)),this.MakeFinalWeapon();for(const s of t.weapons){const t=new ct(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),t.fromJSON(s,e),this.weapons.push(t)}if(e<10.95){this.repeating=!1;for(const t of this.weapons)this.repeating=this.repeating||t.GetRepeating()}else this.repeating=t.repeating;this.seat=e>11.65?t.seat:0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}serialize(t){t.PushNum(this.raw_weapon_type),t.PushBool(this.fixed),t.PushBoolArr(this.directions),t.PushNum(this.ammo),t.PushNum(this.weapons.length);for(const e of this.weapons)e.serialize(t);t.PushNum(this.action_sel),t.PushNum(this.projectile_sel),t.PushBool(this.repeating),t.PushNum(this.seat)}deserialize(t){this.raw_weapon_type=t.GetNum(),this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.GetBool(),this.directions=t.GetBoolArr(this.directions.length),this.ammo=t.GetNum();const e=t.GetNum();this.weapons=[],this.MakeFinalWeapon();for(let s=0;s11.65?this.seat=t.GetNum():this.seat=0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}GetWeaponSelected(){return this.weapon_type}MakeFinalWeapon(){const t=this.weapon_type;if(this.final_weapon.can_action=this.weapon_list[t].can_action,this.final_weapon.can_projectile=this.weapon_list[t].can_projectile,this.final_weapon.ammo=this.weapon_list[t].ammo,this.final_weapon.ap=this.weapon_list[t].ap,this.final_weapon.damage=this.weapon_list[t].damage,this.final_weapon.era=this.weapon_list[t].era,this.final_weapon.name=this.weapon_list[t].name,this.final_weapon.abrv=this.weapon_list[t].abrv,this.final_weapon.reload=this.weapon_list[t].reload,this.final_weapon.shells=this.weapon_list[t].shells,this.final_weapon.size=this.weapon_list[t].size,this.final_weapon.stats=this.weapon_list[t].stats.Clone(),this.final_weapon.deflection=this.weapon_list[t].deflection,this.final_weapon.jam=this.weapon_list[t].jam,this.final_weapon.stats.era=[],this.final_weapon.stats.era.push({name:this.weapon_list[t].name,era:this.weapon_list[t].era}),0==this.weapon_list[t].hits&&(this.action_sel==L.MECHANICAL&&(this.action_sel=L.STANDARD),this.projectile_sel!=q.GYROJETS&&this.projectile_sel!=q.HEATRAY||(this.projectile_sel=q.BULLETS)),this.action_sel==L.STANDARD)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.synched=this.weapon_list[t].synched;else if(this.action_sel==L.MECHANICAL)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.stats.warnings.push({source:h("Mechanical Action"),warning:h("Mechanical Action Warning"),color:c.WHITE}),this.final_weapon.jam="0/0",this.final_weapon.rapid=!0,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!0,this.final_weapon.stats.era.push({name:h("Mechanical Action"),era:h("WWI")});else if(this.action_sel==L.GAST)this.final_weapon.hits=2*this.weapon_list[t].hits,this.final_weapon.ammo=this.weapon_list[t].ammo/2,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!1,this.final_weapon.stats.era.push({name:h("Gast Principle"),era:h("WWI")});else if(this.action_sel==L.ROTARY){this.final_weapon.stats.mass+=this.weapon_list[t].stats.mass,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.size+=this.weapon_list[t].size,this.final_weapon.size=Math.min(16,this.final_weapon.size),this.final_weapon.hits=3*this.weapon_list[t].hits,this.final_weapon.deflection-=1,this.final_weapon.synched=!1;const e=this.final_weapon.jam.split("/");e[0]="9999",e[1]=(parseInt(e[1])+1).toString(),this.final_weapon.jam=e.join("/"),this.final_weapon.stats.era.push({name:h("Rotary_Gun"),era:h("WWI")})}if(this.repeating&&0!=this.final_weapon.reload&&(this.final_weapon.reload=0,this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost))),this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=q.HEATRAY||(this.projectile_sel=q.BULLETS),this.action_sel!=L.GAST&&this.action_sel!=L.ROTARY&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=q.PNEUMATIC||(this.projectile_sel=q.BULLETS),this.projectile_sel==q.HEATRAY)this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.shells=!1,this.final_weapon.ammo=0,this.final_weapon.deflection=0,this.final_weapon.ap=Math.max(0,this.final_weapon.ap-1),this.final_weapon.stats.warnings.push({source:h("Heat Ray"),warning:h("Heat Ray Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Heat Ray"),era:h("Himmilgard")});else if(this.projectile_sel==q.GYROJETS)this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost)),this.final_weapon.shells=!1,this.final_weapon.damage-=1,this.final_weapon.stats.warnings.push({source:h("Gyrojets"),warning:h("Gyrojets Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Gyrojets"),era:h("Roaring 20s")});else if(this.projectile_sel==q.PNEUMATIC){if(this.final_weapon.ammo*=2,this.final_weapon.shells=!1,this.final_weapon.rapid){const t=this.final_weapon.jam.split("/");t[1]="9999",this.final_weapon.jam=t.join("/"),this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 1"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Pneumatic"),era:h("Pioneer")})}this.final_weapon.hits>0&&this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 2"),color:c.WHITE})}0!=this.final_weapon.deflection&&this.final_weapon.stats.warnings.push({source:h(this.final_weapon.name),warning:h("Deflection Warning",this.final_weapon.deflection),color:c.WHITE})}SetWeaponSelected(t){const e=this.IsLightningArc();if(this.weapon_type=t,this.raw_weapon_type=this.wl_permute.findIndex((e=>e==t)),16==this.weapon_list[t].size)for(;this.weapons.length>1;)this.weapons.pop();this.weapon_list[t].can_action&&this.GetCanAction()[this.action_sel]||(this.action_sel=L.STANDARD),this.weapon_list[t].can_projectile&&this.GetCanProjectile()[this.projectile_sel]||(this.projectile_sel=q.BULLETS),this.weapon_list[t].rapid?this.repeating=!1:this.repeating||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD),this.CanRepeating()||(this.repeating=!1),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);if(this.IsLightningArc()){this.SetFixed(!0),this.directions[0]=!0;for(let t=1;t0)&&this.weapon_list[this.weapon_type].ammo>0&&"Precision Rifle"!=this.weapon_list[this.weapon_type].name}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:(this.repeating=!1,this.weapon_list[this.weapon_type].rapid||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD)),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);this.CalculateStats()}GetFixed(){return this.fixed}SetFixed(t){if(this.IsLightningArc()&&(t=!0),this.fixed!=t){this.fixed=t;for(const t of this.weapons)t.SetFixed(this.fixed);if(t){let t=!1;for(let e=0;ethis.weapons.length;){const t=new ct(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),this.weapons.push(t)}for(;t1||this.weapons[0].GetCount()>1}SetAmmo(t){(t!=t||t<1)&&(t=1),t=Math.floor(1e-6+t),this.ammo=t,this.CalculateStats()}SetHavePropeller(t){this.has_propeller&&!t&&this.action_sel==L.MECHANICAL&&(this.has_propeller=t,this.SetAction(L.STANDARD)),this.has_propeller=t}SetCanWing(t){for(const e of this.weapons)e.SetCanWing(t)}GetAction(){return this.action_sel}GetCanAction(){return[!0,this.has_propeller&&this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].hits>0&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].rapid]}SetAction(t){if(this.final_weapon.can_action){this.action_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.action_sel=L.STANDARD;this.CalculateStats()}GetCanProjectile(){return[!0,this.final_weapon.can_projectile&&this.action_sel!=L.MECHANICAL&&this.action_sel!=L.GAST&&this.weapon_list[this.weapon_type].hits>0,this.final_weapon.can_projectile&&this.action_sel!=L.ROTARY&&this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL]}GetProjectile(){return this.projectile_sel}SetProjectile(t){if(this.final_weapon.can_projectile){this.projectile_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.projectile_sel=q.BULLETS;this.CalculateStats()}GetFinalWeapon(){return this.final_weapon}SetStickyGuns(t){this.sticky_guns=t}GetHRCharges(){if(this.IsLightningArc())return[3];let t=0;for(const e of this.weapons)t+=e.GetCount();if(this.final_weapon.hits>0){let e=this.weapon_list[this.weapon_type].stats.cost;return this.action_sel==L.ROTARY&&(e*=2),this.final_weapon.rapid?[t*e,Math.max(t*e+1,Math.floor(1e-6+1.5*t*e))]:[t*e]}return"Scattergun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(1.875001),Math.floor(3.125001)]:[Math.floor(1.875001)]:"Punt Gun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(3.750001),Math.floor(6.250001)]:[Math.floor(3.750001)]:void 0}GetShots(){return Math.max(1,Math.floor(1e-6+this.final_weapon.ammo*this.ammo))}IsLightningArc(){return"Lightning Arc"==this.final_weapon.name}GetReload(){return this.final_weapon.reload}GetWingWeight(){let t=0;for(const e of this.weapons)e.GetWing()&&(t+=e.PartStats().mass);return t}GetDirectionCount(){let t=0;for(const e of this.directions)e&&t++;return t}SetSeat(t){this.seat=t,this.CalculateStats()}GetSeat(){return this.seat}GetIsFullyAccessible(){for(const t of this.weapons)if(!t.GetAccessible())return!1;return!0}GetIsPartlyAccessible(){for(const t of this.weapons)if(t.GetAccessible())return!0;return!1}SetCalculateStats(t){this.CalculateStats=t;for(const e of this.weapons)e.SetCalculateStats(t)}PartStats(){var t=new u;let e=this.GetDirectionCount(),s=0;for(const i of this.weapons)i.has_cantilever=this.has_cantilever,i.SetTurret(e>2),t=t.Add(i.PartStats()),s+=i.GetCount(),this.fixed||(2==e?t.cost+=1:3==e||4==e?t.cost+=2:5==e?t.cost+=3:6==e&&(t.cost+=4));return(this.projectile_sel==q.HEATRAY||this.IsLightningArc())&&(this.ammo=1),t.mass+=(this.ammo-1)*s,t}GetElectrics(){return{storage:0,equipment:[]}}}const _t=JSON.parse('{"A":[{"name":"Submachine Gun","abrv":"SMG","era":"WWI","cost":1,"mass":1,"drag":0,"damage":1,"hits":4,"ap":0,"ammo":10,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"0/1","reload":2,"size":1,"can_action":true,"can_projectile":true,"deflection":0,"warning":"SMG Warning"},{"name":"Scattergun","abrv":"SG","era":"Pioneer","cost":2,"mass":2,"drag":2,"damage":0.5,"hits":0,"ap":0,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Scattergun Warning","size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Machine Gun","abrv":"LMG","era":"WWI","cost":2,"mass":2,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"1/2","reload":2,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Machine Gun","abrv":"MG","era":"WWI","cost":2,"mass":3,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":10,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"1/2","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Balloon Gun","abrv":"BMG","era":"WWI","cost":3,"mass":3,"drag":1,"damage":2,"hits":4,"ap":0,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":-2},{"name":"Enhanced Machine Gun","abrv":"EMG","era":"Coming Storm","cost":3,"mass":2,"drag":1,"damage":2,"hits":5,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"0/0","reload":0,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Enhanced Heavy Machine Gun","abrv":"EHMG","era":"Coming Storm","cost":5,"mass":3,"drag":2,"damage":4,"hits":5,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Punt Gun","abrv":"PG","era":"Pioneer","cost":4,"mass":4,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Punt Gun Warning","size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Repeating Cannon","abrv":"LRC","era":"WWI","cost":4,"mass":4,"drag":3,"damage":8,"hits":3,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"2/5","reload":2,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Heavy Cannon","abrv":"HC","era":"WWI","cost":6,"mass":5,"drag":2,"damage":16,"hits":1,"ap":2,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Light Machine Cannon","abrv":"LMC","era":"Coming Storm","cost":8,"mass":4,"drag":3,"damage":8,"hits":4,"ap":4,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Machine Cannon","abrv":"HMC","era":"WWII","cost":12,"mass":5,"drag":4,"damage":12,"hits":3,"ap":4,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Fliergerflammenwerfer","abrv":"FFW","era":"WWI","cost":5,"mass":1,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0/0","reload":0,"warning":"Fliergerflammenwerfer Warning","size":8,"can_action":false,"can_projectile":false,"deflection":0},{"name":"Recoilless Cannon","abrv":"RC","era":"WWI","cost":5,"mass":8,"drag":3,"damage":30,"hits":1,"ap":3,"ammo":3,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":-5},{"name":"Autocannon","abrv":"AC","era":"WWII","cost":15,"mass":8,"drag":5,"damage":24,"hits":2,"ap":5,"ammo":2,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Battle Cannon","abrv":"BC","era":"WWII","cost":15,"mass":40,"drag":8,"damage":24,"hits":2,"ap":5,"ammo":1,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Precision Rifle","abrv":"PR","era":"WWI","mass":1,"drag":1,"cost":2,"damage":5,"hits":10,"ap":2,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":2,"can_action":false,"can_projectile":false,"warning":"Precision Rifle Warning","deflection":0},{"name":"Lightning Arc","abrv":"LA","era":"Himmilgard","cost":8,"mass":5,"drag":3,"damage":0,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0","reload":0,"size":16,"can_action":false,"can_projectile":false,"warning":"Lightning Arc Warning","deflection":0},{"name":"Harpoon Launcher","abrv":"HL","era":"Himmilgard","cost":3,"mass":3,"drag":2,"damage":4,"hits":1,"ap":1,"ammo":2,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":0,"reload":1,"size":4,"can_action":false,"can_projectile":false,"warning":"Harpoon Launcher Warning","deflection":0},{"name":"Heavy Machine Gun","abrv":"HMG","era":"WWI","cost":4,"mass":4,"drag":2,"damage":4,"hits":4,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Repeating Cannon","abrv":"HRC","era":"WWI","cost":10,"mass":6,"drag":4,"damage":16,"hits":2,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"4/6","reload":2,"size":16,"can_action":true,"can_projectile":true,"deflection":-3}]}');class pt extends D{constructor(){super(),this.direction_list=["Forward","Rearward","Up","Down","Left","Right"],this.synchronization_list=["None","Interruptor Gear","Synchronization Gear","Spinner Gun","Deflector Plate","No Interference"],this.action_list=[{name:"Standard Action"},{name:"Mechanical Action"},{name:"Gast Principle"},{name:"Rotary_Gun"}],this.projectile_list=[{name:"Standard"},{name:"Heat Ray"},{name:"Pneumatic"}],this.weapon_list=[];for(const t of _t.A){const e={name:t.name,abrv:t.abrv,era:t.era,size:t.size,stats:new u(t),damage:t.damage,hits:t.hits,ammo:t.ammo,ap:t.ap,jam:t.jam.toString(),reload:t.reload,rapid:t.rapid,synched:t.synched,shells:t.shells,can_action:t.can_action,can_projectile:t.can_projectile,deflection:t.deflection};this.weapon_list.push(e)}const t=(t,e)=>{const s=(t,e)=>tt(this.weapon_list[e],this.weapon_list[s])));const e=[];for(let t=0;te==t)));this.wl_permute=e,this.weapon_list=this.weapon_list.sort(t),this.weapon_sets=[],this.brace_count=0,this.isheli=!1}toJSON(){const t=[];for(const e of this.weapon_sets)t.push(e.toJSON());return{weapon_systems:t,brace_count:this.brace_count}}fromJSON(t,e){this.weapon_sets=[];const s=t.weapon_systems;for(const t of s){const s=new ut(this.weapon_list,this.wl_permute);s.SetCalculateStats(this.CalculateStats),s.fromJSON(t,e),this.weapon_sets.push(s)}e>10.35&&(this.brace_count=t.brace_count)}serialize(t){t.PushNum(this.weapon_sets.length);for(const e of this.weapon_sets)e.serialize(t);t.PushNum(this.brace_count)}deserialize(t){this.weapon_sets=[];const e=t.GetNum();for(let s=0;s10.35&&(this.brace_count=t.GetNum())}GetWeaponList(){return this.weapon_list}GetDirectionList(){return this.direction_list}GetSynchronizationList(){return this.synchronization_list}SetWeaponSetCount(t){for((t!=t||t<1)&&(t=0),t=Math.floor(1e-6+t);t>this.weapon_sets.length;){const t=new ut(this.weapon_list,this.wl_permute);t.SetCalculateStats(this.CalculateStats),this.weapon_sets.push(t)}for(;t=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER)return void e[t].SetSynchronization(F.INTERRUPT)}}RemoveOneArtyTractorSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(F.NO_INTERFERENCE)}}RemoveOnePusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER)return void e[t].SetSynchronization(F.INTERRUPT)}}RemoveOneArtyPusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(F.NO_INTERFERENCE)}}CanTractorSpinner(){return this.CountTractorSpinner()+this.CountArtyTractorSpinner()this.tractor_arty_spinner_count;)this.RemoveOneArtyTractorSpinner();for(;this.CountTractorSpinner()>this.tractor_spinner_count;)this.RemoveOneTractorSpinner();for(;this.CountArtyPusherSpinner()>this.pusher_arty_spinner_count;)this.RemoveOneArtyPusherSpinner();for(;this.CountPusherSpinner()>this.pusher_spinner_count;)this.RemoveOnePusherSpinner();var e=0,s=0;0==this.cant_type?(e=4,s=2):1==this.cant_type?(e=8,s=4):(e=16,s=8);const i=[];for(const t of this.weapon_sets)for(const e of t.GetWeapons()){e.wing_reinforcement=!1;const s={total:0,count:0,sz:0,w:e};e.GetWing()&&(s.count=e.GetCount(),s.sz=this.weapon_list[t.GetWeaponSelected()].size,s.total=s.count*s.sz,i.push(s))}i.sort((function(t,e){return t.total-e.total}));for(const t of i)e>=0&&(s0,t=t.Add(e.PartStats());return t.cost+=this.brace_count/3,this.brace_count>0&&t.warnings.push({source:h("Weapons Braces"),warning:h("Weapons Braces Warning"),color:c.WHITE}),t.control-=Math.floor(1e-6+this.GetWingWeight()/5),t}GetElectrics(){const t={storage:0,equipment:[]};for(let e=0;e11.55&&(this.blade_idx=t.blade_idx),e<12.45&&(this.rotor_span=0),this.rotor_thickness=e<12.55?0:t.rotor_thickness,this.dryMP=-1}serialize(t){t.PushNum(this.type),t.PushNum(this.rotor_count),t.PushNum(this.rotor_span),t.PushNum(this.cant_idx),t.PushNum(this.stagger_sel),t.PushBool(this.accessory),t.PushNum(this.blade_idx),t.PushNum(this.rotor_thickness)}deserialise(t){this.type=t.GetNum(),this.rotor_count=t.GetNum(),this.rotor_span=t.GetNum(),this.cant_idx=t.GetNum(),t.version<12.35?(t.GetBool(),this.stagger_sel=0):this.stagger_sel=t.GetNum(),this.accessory=t.GetBool(),t.version>11.55&&(this.blade_idx=t.GetNum()),t.version<12.45&&(this.rotor_span=0),t.version<12.55?this.rotor_thickness=0:this.rotor_thickness=t.GetNum(),this.dryMP=-1}SetCantileverList(t){this.cant_list=t}GetCantileverList(){return this.cant_list}SetCantilever(t){this.cant_idx=t,this.CalculateStats()}GetCantilever(){return this.cant_idx}SetRotorThickness(t){t<0&&(t=0),this.rotor_thickness=Math.floor(1e-6+t),this.CalculateStats()}GetRotorThickness(){return this.rotor_thickness}SetType(t){this.type!=t&&(this.accessory=!1,this.cant_idx=0,this.stagger_sel=0,this.rotor_count=1,this.type=t,this.rotor_span=0)}CanRotorCount(){return this.type==k.HELICOPTER}SetRotorCount(t){t<1&&(t=1),t>=2&&t%2==1&&(t==this.rotor_count+1?t+=1:t-=1),this.rotor_count=t,this.rotor_count<2&&(this.stagger_sel=0),this.CalculateStats()}GetRotorCount(){return this.rotor_count}CanRotorSpan(){return this.type==k.HELICOPTER}SetRotorSpan(t){this.rotor_span=Math.floor(1e-6+t),this.CalculateStats()}GetRotorSpan(){return this.rotor_span}CanTandem(){return this.type==k.HELICOPTER&&this.rotor_count>1}SetBladeCount(t){this.blade_idx=t,this.CalculateStats()}SetWingArea(t){this.wing_area=t}GetSizingSpan(){return this.sizing_span}SetMP(t){t!=this.dryMP&&(this.dryMP=t,this.CalculateStats())}GetRotorStrain(){const t=this.GetRotorArea();return this.rotor_count*Math.max(1,2*(this.sizing_span+this.rotor_span)+t-10)}GetRotorArea(){return Math.PI/9*(this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span)}GetIdealRotorArea(){return Math.PI/9*this.sizing_span*this.sizing_span}GetRotorDrag(){if(this.type==k.HELICOPTER||this.type==k.AUTOGYRO){const t=this.GetRotorArea();return 1==this.rotor_count?Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))):Math.floor(1e-6+.75*this.rotor_count*Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))))}return 0}GetType(){return this.type}GetAccessory(){return this.accessory}SetAccessory(t){this.accessory=t,this.CalculateStats()}SetEngineCount(t){this.engine_count=t}GetTailRotor(){return this.type==k.HELICOPTER&&this.rotor_count<2}GetBladeList(){return this.blade_list}GetRotorBleed(){return this.type==k.HELICOPTER?this.blade_list[this.blade_idx].rotor_bleed:0}GetPowerFactor(){return this.stagger_list[this.stagger_sel].powerfactor}GetBladeCountIdx(){return this.blade_idx}GetStaggerList(){return this.stagger_list}GetStagger(){return this.stagger_sel}SetStagger(t){t!=this.stagger_sel&&(this.stagger_sel=t,this.CalculateStats())}CanStagger(){const t=[];for(let e=0;e=2&&3==this.stagger_list[e].count?t.push(!0):t.push(!1);return t}VerifySizes(){this.type==k.AIRPLANE?(this.rotor_count=0,this.rotor_span=0,this.stagger_sel=0):this.type==k.AUTOGYRO?(this.rotor_count=1,this.sizing_span=Math.ceil(-1e-6+Math.sqrt(.6*this.wing_area/(Math.PI/8))),this.rotor_span=Math.max(this.rotor_span,2-this.sizing_span),this.stagger_sel=0):this.type==k.HELICOPTER&&(this.rotor_count=Math.max(1,this.rotor_count),this.rotor_count>1&&this.rotor_count%2==1&&(this.rotor_count=this.rotor_count-1),-1!=this.dryMP?(1==this.rotor_count?this.sizing_span=Math.ceil(5*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6):this.sizing_span=Math.ceil(4*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6),this.sizing_span=Math.min(100,this.sizing_span),this.rotor_span=Math.max(this.rotor_span,-Math.floor(1e-6+this.sizing_span/2))):this.sizing_span=10)}VerifyStagger(){if(this.rotor_count>2&&this.stagger_list[this.stagger_sel].count<=2){for(let t=0;t0&&(1==t.GetReload()?e.push(h("Weapon Tag Manual")):e.push(h("Weapon Tag Reload",t.GetReload()))),s.rapid&&e.push(h("Weapon Tag Rapid Fire")),s.shells&&e.push(h("Weapon Tag Shells")),s.ap>0&&e.push(h("Weapon Tag AP",s.ap)),t.GetIsFullyAccessible()?e.push(h("Weapon Tag Fully Accessible")):t.GetIsPartlyAccessible()?e.push(h("Weapon Tag Partly Accessible")):e.push(h("Weapon Tag Inaccessible")),s.deflection&&e.push(h("Weapon Tag Awkward",s.deflection)),e}function bt(t,e,s){var i="";const a=t.GetDirection(),n=[];for(let t=0;t{this.CalculateStats()})),this.cockpits.SetCalculateStats((()=>{this.CalculateStats()})),this.passengers.SetCalculateStats((()=>{this.CalculateStats()})),this.engines.SetCalculateStats((()=>{this.CalculateStats()})),this.propeller.SetCalculateStats((()=>{this.CalculateStats()})),this.frames.SetCalculateStats((()=>{this.CalculateStats()})),this.wings.SetCalculateStats((()=>{this.CalculateStats()})),this.stabilizers.SetCalculateStats((()=>{this.CalculateStats()})),this.controlsurfaces.SetCalculateStats((()=>{this.CalculateStats()})),this.reinforcements.SetCalculateStats((()=>{this.CalculateStats()})),this.fuel.SetCalculateStats((()=>{this.CalculateStats()})),this.munitions.SetCalculateStats((()=>{this.CalculateStats()})),this.cargo.SetCalculateStats((()=>{this.CalculateStats()})),this.gear.SetCalculateStats((()=>{this.CalculateStats()})),this.accessories.SetCalculateStats((()=>{this.CalculateStats()})),this.optimization.SetCalculateStats((()=>{this.CalculateStats()})),this.weapons.SetCalculateStats((()=>{this.CalculateStats()})),this.used.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCalculateStats((()=>{this.CalculateStats()})),this.alter.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCantileverList(this.reinforcements.GetCantileverList()),this.cockpits.SetNumberOfCockpits(1),this.engines.SetNumberOfEngines(1),this.frames.SetTailType(1),this.use_storage=e,this.updated_stats=!1,this.freeze_calculation=!1,this.aircraft_type=k.AIRPLANE,this.Reset()}InteractiveDash(){const t=this.GetStats(),e=this.GetDerivedStats(),s=this.VitalComponentList();for(var i=!1;s.length>10;)s.pop(),i=!0;for(i&&(s.pop(),s.push("And More. See Plane Builder for full list."));s.length<10;)s.push("");const a=this.GetAccessories().GetEffectiveCoverage();var r="";for(let t=0;t0&&(r+=""!=r?", ":h("Armour")+" ",r+=e.toString()+"/+"+(11-a[t]).toString())}const n=[],o=this.GetMunitions().GetBombCount(),l=this.GetMunitions().GetRocketCount();var c=this.GetMunitions().GetInternalBombCount();if((o>0||l>0)&&n.push("Current load here."),o>0){const t=Math.min(o,c),e=Math.max(0,o-t);if(t>0&&n.push(h(" Bomb Mass Internally.",t)),e>0&&n.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.GetMunitions().GetMaxBombSize());n.push(h("Largest Internal Bomb",e.toString()))}c-=t}if(l>0){const t=Math.min(l,c),e=Math.max(0,l-t);t>0&&n.push(h(" Rocket Mass Internally.",t)),e>0&&n.push(h(" Rocket Mass Externally.",e))}for(;n.length<5;)n.push("");let u="";for(const e of t.warnings)u+=e.source+": "+e.warning+"\n";const _={altitude:0,airspeed:0,fuel:e.FuelUses,dropoff:e.Dropoff,visibility:this.GetCockpits().GetCockpit(0).GetVisibility(),energy_loss:e.EnergyLoss,turn_bleed:e.TurnBleed,stability:e.Stabiilty,stress:this.GetCockpits().GetCockpit(0).GetFlightStress()[0],plane_escape:this.GetCockpits().GetCockpit(0).GetEscape(),crash:this.GetCockpits().GetCockpit(0).GetCrash(),max_toughness:e.Toughness,current_toughness:e.Toughness,max_strain:e.MaxStrain,current_strain:e.MaxStrain,g_force:0,kills:0,full_load_boost:e.BoostFullwBombs,full_load_handling:e.HandlingFullwBombs,full_load_climb:e.RateOfClimbwBombs,full_load_stall:e.StallSpeedFullwBombs,full_load_speed:e.MaxSpeedwBombs,half_fuel_bombs_boost:Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),half_fuel_bombs_handling:Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),half_fuel_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),half_fuel_bombs_stall:Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),half_fuel_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),full_fuel_no_bombs_boost:e.BoostFull,full_fuel_no_bombs_handling:e.HandlingFull,full_fuel_no_bombs_climb:e.RateOfClimbFull,full_fuel_no_bombs_stall:e.StallSpeedFull,full_fuel_no_bombs_speed:Math.floor(1e-6+e.MaxSpeedFull),half_fuel_no_bombs_boost:Math.floor((e.BoostFull+e.BoostEmpty)/2),half_fuel_no_bombs_handling:Math.floor((e.HandlingFull+e.HandlingEmpty)/2),half_fuel_no_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),half_fuel_no_bombs_stall:Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),half_fuel_no_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),empty_boost:0,empty_handling:e.HandlingEmpty,empty_climb:0,empty_stall:e.StallSpeedEmpty,empty_speed:0,vital_part_1:s[0],vital_part_2:s[1],vital_part_3:s[2],vital_part_4:s[3],vital_part_5:s[4],vital_part_6:s[5],vital_part_7:s[6],vital_part_8:s[7],vital_part_9:s[8],vital_part_10:s[9],armor:r,max_bomb_load:n[0],ordinance_1:n[1],ordinance_2:n[2],ordinance_3:n[3],ordinance_4:n[4],notes:u,full_load_selected:!0,half_fuel_bombs_selected:!1,full_fuel_no_bombs_selected:!1,half_fuel_no_bombs_selected:!1,empty_selected:!1,engines:this.InteractiveEngines(),weapons:this.InteractiveWeapons()};return JSON.stringify(_)}InteractiveEngines(){const t=[];for(let e=0;e0&&t.starter&&n.push(h("Starter"))}else{s.IsRotary()&&s.IsTractor()?n.push(h("Turns Right")):s.IsRotary()&&s.IsPusher()&&n.push(h("Turns Left"));const t=x().get(s.GetSelectedList()).get_name(a.name);t.upgrades[1]?n.push(h("War Emergency Power")):t.compressor_count>0&&1==t.compressor_type&&n.push(h("War Emergency Power from altitudes 0-9"))}if(i.notes=r.Join(", ",n),s.GetUsePushPull()){const e=i.reliability.split("/");i.reliability=e[0].toString(),t.push(JSON.stringify(i)),i.reliability=e[0].toString(),t.push(JSON.stringify(i))}else t.push(JSON.stringify(i))}return t}InteractiveWeapons(){const t=[];for(const s of this.GetWeapons().GetWeaponSets()){const i=this.GetWeapons().GetWeaponList(),a=s.GetHits(),n=[];"PR"==i[s.GetWeaponSelected()].abrv?(n.push(5),n.push(5),n.push(5),n.push(5)):(n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[0])),n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[1])),n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[2])),n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[3])));const o=s.GetFinalWeapon(),l=[],c={type:dt(s,i),ammo:s.GetShots(),ap:o.ap,jam:s.GetJam(),knife_hits:a[0],close_hits:a[1],long_hits:a[2],extreme_hits:a[3],knife_damage:n[0],close_damage:n[1],long_damage:n[2],extreme_damage:n[3],tags:""},u=this.GetWeapons().GetDirectionList();s.IsPlural()&&(c.type=s.GetWeaponCount().toString()+"x "+c.type);const _=s.GetDirection();var e="";e+="[";for(let t=0;t11.05?(this.aircraft_type=t.aircraft_type,this.rotor.SetType(t.aircraft_type)):(this.aircraft_type=k.AIRPLANE,this.rotor.SetType(k.AIRPLANE)),this.era.fromJSON(t.era,s),this.cockpits.fromJSON(t.cockpits,s),this.passengers.fromJSON(t.passengers,s),this.engines.fromJSON(t.engines,s),this.propeller.fromJSON(t.propeller,s),this.frames.fromJSON(t.frames,s),this.wings.fromJSON(t.wings,s),this.stabilizers.fromJSON(t.stabilizers,s),this.controlsurfaces.fromJSON(t.controlsurfaces,s),this.reinforcements.fromJSON(t.reinforcements,s),this.fuel.fromJSON(t.fuel,s),this.munitions.fromJSON(t.munitions,s),this.cargo.fromJSON(t.cargo,s),this.gear.fromJSON(t.gear,s),this.accessories.fromJSON(t.accessories,s),this.optimization.fromJSON(t.optimization,s),this.weapons.fromJSON(t.weapons,s),s>10.65&&this.used.fromJSON(t.used,s),s>11.05&&this.rotor.fromJSON(t.rotor,s),s>12.25?this.alter.fromJSON(t.alter,s):this.alter.ClearAll(),this.freeze_calculation=!1,!0}serialize(t){t.PushString(this.version),t.PushString(this.name),this.era.serialize(t),this.cockpits.serialize(t),this.passengers.serialize(t),this.engines.serialize(t),this.propeller.serialize(t),this.frames.serialize(t),this.wings.serialize(t),this.stabilizers.serialize(t),this.controlsurfaces.serialize(t),this.reinforcements.serialize(t),this.fuel.serialize(t),this.munitions.serialize(t),this.cargo.serialize(t),this.gear.serialize(t),this.accessories.serialize(t),this.optimization.serialize(t),this.weapons.serialize(t),this.used.serialize(t),this.rotor.serialize(t),t.PushNum(this.aircraft_type),this.alter.serialize(t)}deserialize(t){this.freeze_calculation=!0,t.version=parseFloat(t.GetString()),this.name=t.GetString(),this.era.deserialize(t),this.cockpits.deserialize(t),this.passengers.deserialize(t),this.engines.deserialize(t),this.propeller.deserialize(t),this.frames.deserialize(t),this.wings.deserialize(t),this.stabilizers.deserialize(t),this.controlsurfaces.deserialize(t),this.reinforcements.deserialize(t),this.fuel.deserialize(t),this.munitions.deserialize(t),this.cargo.deserialize(t),this.gear.deserialize(t),this.accessories.deserialize(t),this.optimization.deserialize(t),this.weapons.deserialize(t),t.version>10.65&&this.used.deserialize(t),t.version>11.05&&t.GetRemaining()>0?(this.rotor.deserialise(t),this.aircraft_type=t.GetNum(),this.rotor.SetType(this.aircraft_type)):(this.aircraft_type=k.AIRPLANE,this.rotor.SetType(k.AIRPLANE)),t.version>12.25?this.alter.deserialize(t):this.alter.ClearAll(),this.freeze_calculation=!1}SetType(t){this.aircraft_type=t,this.rotor.SetType(t),this.CalculateStats()}SetDisplayCallback(t){this.DisplayCallback=t}CalculateStats(){if(this.freeze_calculation)return;this.recurrent_calculation_depth=this.recurrent_calculation_depth+1,this.updated_stats=!1;let t=new u;if(t=t.Add(this.era.PartStats()),t=t.Add(this.cockpits.PartStats()),t=t.Add(this.passengers.PartStats()),this.engines.SetTailMods(this.frames.GetFarmanOrBoom(),this.wings.GetSwept()&&this.stabilizers.GetVOutboard(),this.stabilizers.GetCanard()),this.engines.SetInternal(this.aircraft_type==k.HELICOPTER||H(this.aircraft_type)),this.engines.SetMetalArea(this.wings.GetMetalArea()),this.engines.HaveParasol(this.wings.GetParasol()),t=t.Add(this.engines.PartStats()),this.propeller.SetEngineTypes(this.engines.GetEngineTypes()),this.propeller.SetAcftType(this.aircraft_type),t=t.Add(this.propeller.PartStats()),t=t.Add(this.fuel.PartStats()),t=t.Add(this.munitions.PartStats()),this.weapons.SetNumberOfCockpits(this.cockpits.GetNumberOfCockpits()),this.weapons.SetTractorInfo(this.engines.GetTractorSpinner()),this.weapons.SetPusherInfo(this.engines.GetPusherSpinner()),this.weapons.cant_type=this.reinforcements.GetCantileverType(),this.weapons.SetHavePropeller(this.engines.GetNumPropellers()>0),this.weapons.SetCanWing(!H(this.aircraft_type)),t=t.Add(this.weapons.PartStats()),t=t.Add(this.cargo.PartStats()),this.wings.SetAcftType(this.aircraft_type),this.aircraft_type==k.AUTOGYRO?this.wings.SetRotorSpan(this.rotor.GetRotorSpan()):this.wings.SetRotorSpan(0),t=t.Add(this.wings.PartStats()),this.rotor.SetWingArea(t.wingarea),this.aircraft_type==k.AUTOGYRO&&(this.rotor.SetEngineCount(this.engines.GetNumberOfEngines()),t=t.Add(this.rotor.PartStats())),this.controlsurfaces.SetWingArea(t.wingarea),this.controlsurfaces.SetBoomTail(this.frames.GetUseBoom()),this.controlsurfaces.SetSpan(this.wings.GetSpan()),this.controlsurfaces.SetAcftType(this.aircraft_type),this.controlsurfaces.SetCanElevator(this.stabilizers.GetHStabCount()>0),this.controlsurfaces.SetCanRudder(this.stabilizers.GetVStabCount()>0),this.controlsurfaces.SetIsVTail(this.stabilizers.GetIsVTail()),this.aircraft_type==k.AIRPLANE?this.controlsurfaces.SetNumCantilever(this.reinforcements.GetTotalCantilevers()):this.controlsurfaces.SetNumCantilever(0),t=t.Add(this.controlsurfaces.PartStats()),this.reinforcements.SetMonoplane(this.wings.GetMonoplane()),this.reinforcements.SetTandem(this.wings.GetTandem()),this.reinforcements.SetStaggered(this.wings.GetStaggered()),this.reinforcements.SetCanUseExternal(this.wings.GetArea()>0),this.reinforcements.SetSesquiplane(this.wings.GetIsSesquiplane()),this.reinforcements.SetAircraftType(this.aircraft_type),this.reinforcements.SetCantLift(this.era.GetCantLift()),t=t.Add(this.reinforcements.PartStats()),this.rotor.GetTailRotor()&&(t.power=Math.floor(1e-6+.9*t.power)),this.accessories.SetAcftRadiator(this.engines.GetNumberOfRadiators()>0),this.accessories.SetSkinArmor(this.frames.GetArmor()),this.accessories.SetCanCutouts(this.wings.CanCutout(),this.frames.CanCutout()),t=t.Add(this.accessories.PartStats()),this.frames.SetRequiredSections(t.reqsections),this.frames.SetHasTractorNacelles(this.engines.GetHasTractorNacelles()),this.frames.SetIsTandem(this.wings.GetTandem()),t=t.Add(this.frames.PartStats()),this.stabilizers.SetEngineCount(this.engines.GetNumberOfEngines()),this.stabilizers.SetIsTandem(this.wings.GetTandem()),this.stabilizers.SetIsSwept(this.wings.GetSwept()),this.stabilizers.SetHaveTail(!this.frames.GetIsTailless()),this.stabilizers.SetHelicopter(!1),this.stabilizers.SetLiftingArea(t.wingarea),this.stabilizers.wing_drag=this.wings.GetWingDrag()+this.rotor.GetRotorDrag(),t=t.Add(this.stabilizers.PartStats()),this.wings.SetAircraftMass(t.mass),t.mass+=this.wings.GetPaperMass(),t.mass=Math.max(1,t.mass),this.gear.SetGull(this.wings.HasInvertedGull()),this.gear.SetLoadedMass(t.mass+t.wetmass),this.gear.CanBoat(this.engines.GetEngineHeight(),this.wings.GetWingHeight()),t=t.Add(this.gear.PartStats()),t.toughness+=Math.floor(1e-6+t.structure/5),this.optimization.SetAcftStats(t),t=t.Add(this.optimization.PartStats()),this.cockpits.SetHasRotary(this.engines.HasTractorRotary()),t=t.Add(this.alter.PartStats()),t.Round(),!this.updated_stats){this.updated_stats=!0,this.stats=t;const e=this.GetDerivedStats();this.stats.cost+=this.controlsurfaces.GetFlapCost(e.DryMP),t.reliability-=this.used.burnt_out,this.weapons.SetStickyGuns(this.used.sticky_guns),this.cockpits.SetArmed(this.weapons.GetArmedSeats()),this.cockpits.UpdateCrewStats(this.stats.escape,e.ControlStress,e.RumbleStress,this.stats.visibility,this.stats.crashsafety);let s=0;for(const t of this.cockpits.GetStressList())s=Math.max(s,t[0]-t[1]);0!=s&&-1==this.stats.warnings.findIndex((t=>t.source==h("Co-Pilot Controls")))&&this.stats.warnings.push({source:h("Co-Pilot Controls"),warning:h("Co-Pilot Warning",s),color:c.WHITE}),H(this.aircraft_type)&&(t.upkeep+=1),this.aircraft_type==k.ORNITHOPTER_BUZZER&&(t.reliability-=2),this.engines.UpdateReliability(t),this.reinforcements.SetAcftStructure(t.structure),this.fuel.SetArea(this.wings.GetArea()),this.fuel.SetCantilever(this.reinforcements.GetIsCantilever()),this.accessories.SetVitalParts(this.VitalComponentList().length),this.munitions.SetAcftParameters(t.structure,this.era.GetMaxBomb(),this.wings.HasInvertedGull()),this.stats.cost=Math.max(1,this.stats.cost),this.stats.liftbleed=Math.max(1,this.stats.liftbleed),10*this.engines.GetRumble()>t.structure&&(this.stats.power=0,this.stats.warnings.push({source:h("Stat Rumble"),warning:h("Rumble Warning"),color:c.RED})),this.use_storage&&window.localStorage.setItem("aircraft",JSON.stringify(this))}this.recurrent_calculation_depth=this.recurrent_calculation_depth-1,this.DisplayCallback&&!this.freeze_calculation&&0==this.recurrent_calculation_depth&&this.DisplayCallback()}GetDerivedStats(){let t=Math.floor(1e-6+this.stats.mass/5);t=Math.max(t,1);let e=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass)/5);e=Math.max(e,1);let s=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass+this.stats.bomb_mass)/5);s=Math.max(s,1);let i=Math.floor(1e-6+(this.stats.drag+t)/5);i=Math.max(i,1);const a=i;let r=Math.floor(1e-6+(this.stats.drag+this.munitions.GetExternalMass()+t)/5);r=Math.max(r,1);let n=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*i))),o=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*a))),l=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*r)));this.stats.mass<15&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Mass")))&&this.stats.warnings.push({source:h("Stat Mass"),warning:h("Low Mass Warning"),color:c.YELLOW}),this.stats.drag+t<35&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Drag")))&&this.stats.warnings.push({source:h("Stat Drag"),warning:h("Low Drag Warning"),color:c.YELLOW});let u=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*t/Math.max(1,this.stats.wingarea))),_=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*e/Math.max(1,this.stats.wingarea))),p=Math.max(Math.floor(1e-6+this.stats.liftbleed*s/Math.max(1,this.stats.wingarea)));var m=this.engines.GetOverspeed();const g=Math.floor(1e-6+this.stats.power/t),f=Math.floor(1e-6+this.stats.power/e),d=Math.floor(1e-6+this.stats.power/s);0==d&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Boost")))&&this.stats.warnings.push({source:h("Derived Boost"),warning:h("Boost Warning"),color:c.RED});const y=Math.floor(1e-6+this.stats.pitchboost*n);n=Math.floor(1e-6+n*(1-.1*this.used.ragged)),o=Math.floor(1e-6+o*(1-.1*this.used.ragged)),l=Math.floor(1e-6+l*(1-.1*this.used.ragged));let b=this.stats.pitchstab+this.stats.latstab;this.stats.pitchstab>0&&this.stats.latstab>0?b+=2:this.stats.pitchstab<0&&this.stats.latstab<0&&(b-=2);let S=100+this.stats.control-t;b>10||b<-10?(S=-1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Stability")))&&this.stats.warnings.push({source:h("Derived Stability"),warning:h("Stability Warning"),color:c.RED})):10==b?S-=4:b>6?S-=3:b>3?S-=2:b>0?S-=1:0==b?S+=0:b>-4?S+=1:b>-7?S+=2:b>-10?S+=3:-10==b&&(S+=4);let w=S+t-e,C=S+t-s;S=Math.floor(1e-6+S-5*this.used.sluggish),w=Math.floor(1e-6+w-5*this.used.sluggish),C=Math.floor(1e-6+C-5*this.used.sluggish);let P=Math.min(this.stats.maxstrain-t,this.stats.structure);this.optimization.final_ms=Math.floor(1e-6+1.5*this.optimization.GetMaxStrain()*P/10),P+=this.optimization.final_ms,P=Math.floor(1e-6+P*(1-.2*this.used.fragile)),P<10&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Max Strain")))&&this.stats.warnings.push({source:h("Stat Max Strain"),warning:h("Max Strain Warning"),color:c.RED});let G=this.stats.toughness;G=Math.floor(1e-6+G*(1-.5*this.used.weak));const M=this.stats.structure;let R=Math.ceil(i/this.propeller.GetEnergy()-1e-6),v=R+1;R=Math.min(R,10),v=Math.min(v,10);let A=Math.ceil(Math.floor(1e-6+(u+_)/2)/this.propeller.GetTurn()-1e-6);this.aircraft_type==k.HELICOPTER&&(A=Math.max(1,Math.floor(1e-6+t/2))+this.rotor.GetRotorBleed(),R=Math.max(1,Math.floor(1e-6+i/7)),u=0,_=0,p=0,n=Math.min(37,n),o=Math.min(37,o),l=Math.min(37,l)),A=Math.max(A,1);let I=A+1;I=Math.max(I,1),u=Math.max(1,Math.floor(1e-6+u*(1+.2*this.used.hefty))),_=Math.max(1,Math.floor(1e-6+_*(1+.2*this.used.hefty))),p=Math.max(1,Math.floor(1e-6+p*(1+.2*this.used.hefty))),(l<=p||o<=_)&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stall Speed")))&&this.stats.warnings.push({source:h("Stall Speed"),warning:h("Stall Speed Warning"),color:c.RED});let E=Math.floor(1e-6+this.stats.fuel/this.stats.fuelconsumption);E=Math.floor(1e-6+E*(1-.2*this.used.leaky)),isFinite(E)||(E=0),E<6&&0!=this.stats.fuelconsumption&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Fuel Uses")))&&this.stats.warnings.push({source:h("Derived Fuel Uses"),warning:h("Fuel Uses Warning"),color:c.YELLOW});let N=1;(b>3||b<-3)&&N++;let T=0;N+=Math.min(this.accessories.GetMaxMassStress(),Math.floor(1e-6+t/10));const x=this.accessories.GetMaxTotalStress();N=Math.min(x,N),this.engines.GetMaxRumble()>0&&(T+=Math.max(1,.5*this.engines.GetRumble()),T=Math.floor(1e-6+T),T=Math.min(3,T)),0==x&&(T=0);let W=Math.max(1,Math.floor(1e-6+this.stats.power/t*(23/this.stats.pitchspeed)/i)),O=Math.max(1,Math.floor(1e-6+this.stats.power/e*(23/this.stats.pitchspeed)/a)),F=Math.max(1,Math.floor(1e-6+this.stats.power/s*(23/this.stats.pitchspeed)/r));return isFinite(W)||(W=0,O=0,F=0),H(this.aircraft_type)&&(S+=5,w+=5,C+=5,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Stall")))&&this.stats.warnings.push({source:h("Ornithopter Stall"),warning:h("Ornithopter Stall Warning"),color:c.WHITE}),m=P),this.aircraft_type==k.ORNITHOPTER_FLUTTER&&(S+=5,w+=5,C+=5,m=1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Flutterer Attack")))&&this.stats.warnings.push({source:h("Ornithopter Flutterer Attack"),warning:h("Ornithopter Flutterer Attack Warning"),color:c.WHITE})),this.aircraft_type==k.ORNITHOPTER_BUZZER&&(-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Boost")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Boost"),warning:h("Ornithopter Buzzer Boost Warning"),color:c.WHITE}),-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Stall")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Stall"),warning:h("Ornithopter Buzzer Stall Warning"),color:c.WHITE})),{DryMP:t,WetMP:e,WetMPwBombs:s,DPEmpty:i,DPFull:a,DPwBombs:r,MaxSpeedEmpty:n,MaxSpeedFull:o,MaxSpeedwBombs:l,StallSpeedEmpty:u,StallSpeedFull:_,StallSpeedFullwBombs:p,Overspeed:m,BoostEmpty:g,BoostFull:f,BoostFullwBombs:d,Dropoff:y,Stabiilty:b,HandlingEmpty:S,HandlingFull:w,HandlingFullwBombs:C,MaxStrain:P,Toughness:G,Structure:M,EnergyLoss:R,EnergyLosswBombs:v,TurnBleed:A,TurnBleedwBombs:I,FuelUses:E,ControlStress:N,RumbleStress:T,RateOfClimbFull:O,RateOfClimbEmpty:W,RateOfClimbwBombs:F}}VitalComponentList(){const t=this.GetDerivedStats(),e=[];e.push(h("Vital Part Controls"));for(let t=0;t0&&e.push(h("Vital Part Fuel Tanks"));for(let t=0;t{let s=parseInt(t.charge);"-"==t.charge&&(s=0);let i=parseInt(e.charge);return"-"==e.charge&&(i=0),isNaN(s)&&isNaN(i)?0:isNaN(s)?-1:isNaN(i)?1:i-s})),t=z(this.engines.GetElectrics(),t),t=z(t,this.weapons.GetElectrics());let e=!1;for(const s of t.equipment){const t=parseInt(s.charge);!isNaN(t)&&t>0&&(s.charge="+"+s.charge,e=!0)}return t.equipment.length>0&&t.storage<=0&&!e&&-1==this.stats.warnings.findIndex((t=>t.source==h("Insufficient Charge")))&&this.stats.warnings.push({source:h("Insufficient Charge"),warning:h("Insufficient Charge Warning"),color:c.RED}),t}}function wt(t,e,s){const i=new Blob([t],{type:s}),a=document.createElement("a"),r=URL.createObjectURL(i);a.href=r,a.download=e,document.body.appendChild(a),a.click(),setTimeout((function(){document.body.removeChild(a),window.URL.revokeObjectURL(r)}),0)}function Ct(t,e){const s=document.createElement("TH");return s.innerHTML=e,t.appendChild(s),s}function Pt(t,e,s){const i=document.createElement("LABEL");i.style.marginLeft="0.25em",i.style.marginRight="0.5em",i.textContent=t,i.classList.add("flex-item"),s.div1.appendChild(i);const a=document.createElement("LABEL");return a.style.marginLeft="0.25em",a.style.marginRight="0.5em",a.textContent=e,a.classList.add("flex-item"),s.div2.appendChild(a),[i,a]}function Gt(t){const e=document.createElement("TR");return t.append(e),e}function Mt(t){t.classList.toggle("changed_b",!1),t.classList.toggle("changed_g",!1),t.classList.toggle("changed_n",!1),t.offsetHeight,t.classList.toggle("changed_n")}function Rt(t){const e=new Uint8Array(t.length);for(let s=0;s0;)this.version_cell.removeChild(this.version_cell.children[0]);this.version_cell.className="tooltip";const i=document.createElement("DIV");i.className="tooltiptext";let a=document.createElement("P");a.textContent=h("Derived Problematic Parts"),i.appendChild(a);const n=p(t.GetEra().GetSelectedText());var o=0;for(let t of e.era){const e=p(t.era);if(e>n){o+=e-n;let s=document.createElement("P");s.textContent=t.name+": "+t.era,i.appendChild(s)}}if(0==o){let t=document.createElement("P");t.textContent=h("None"),i.appendChild(t)}const l=document.createElement("P");for(l.textContent=h(t.GetEra().GetSelectedText()),l.className=0==o?"green":o>2?"red":"yellow",this.version_cell.appendChild(l),this.version_cell.appendChild(i),this.cost_cell.textContent=e.cost.toString()+"þ ",t.GetUsed().IsDefault()||(this.cost_cell.textContent+=" ("+Math.floor(1e-6+e.cost/2).toString()+"þ "+h("Price Word Used")+")"),this.upkeep_cell.textContent=e.upkeep.toString()+"þ",this.ts_empty.textContent=(0).toString(),this.ss_empty.textContent=s.StallSpeedEmpty.toString(),this.hand_empty.textContent=s.HandlingEmpty.toString(),this.boost_empty.textContent=(0).toString(),this.roc_empty.textContent=(0).toString(),this.ts_half.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedFull)/2).toString(),this.ss_half.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFull)/2).toString(),this.hand_half.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFull)/2).toString(),this.boost_half.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFull)/2).toString(),this.roc_half.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbFull)/2).toString(),this.ts_full.textContent=Math.floor(1e-6+s.MaxSpeedFull).toString(),this.ss_full.textContent=s.StallSpeedFull.toString(),this.hand_full.textContent=s.HandlingFull.toString(),this.boost_full.textContent=s.BoostFull.toString(),this.roc_full.textContent=s.RateOfClimbFull.toString(),e.bomb_mass>0||this.show_bombs?(this.bomb_row1.hidden=!1,this.bomb_row2.hidden=!1,this.bomb_row2.appendChild(this.vital_components),this.vital_components.rowSpan=5,this.ts_halfwB.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedwBombs)/2).toString(),this.ss_halfwB.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFullwBombs)/2).toString(),this.hand_halfwB.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFullwBombs)/2).toString(),this.boost_halfwB.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFullwBombs)/2).toString(),this.roc_halfwB.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbwBombs)/2).toString(),this.ts_fullwB.textContent=Math.floor(1e-6+s.MaxSpeedwBombs).toString(),this.ss_fullwB.textContent=s.StallSpeedFullwBombs.toString(),this.hand_fullwB.textContent=s.HandlingFullwBombs.toString(),this.boost_fullwB.textContent=s.BoostFullwBombs.toString(),this.roc_fullwB.textContent=s.RateOfClimbwBombs.toString(),this.turnbleed_label.textContent=h("Derived Turn Bleed wB"),this.turnbleed_cell.textContent=r.Format("{0} ({1})",s.TurnBleed,s.TurnBleedwBombs)):(this.bomb_row1.hidden=!0,this.bomb_row2.hidden=!0,this.full_row.appendChild(this.vital_components),this.vital_components.rowSpan=3,this.turnbleed_label.textContent=h("Derived Turn Bleed"),this.turnbleed_cell.textContent=r.Format("{0}",s.TurnBleed)),this.dropoff_cell.textContent=s.Dropoff.toString(),this.overspeed_cell.textContent=s.Overspeed.toString(),this.maxfuel_cell.textContent=(Math.floor(1e-6+10*s.FuelUses)/10).toString(),t.GetIsFlammable()?this.flammable_cell.textContent=h("Yes"):this.flammable_cell.textContent=h("No"),this.stability_cell.textContent=s.Stabiilty.toString(),this.eloss_cell.textContent=s.EnergyLoss.toString(),this.landing_cell.textContent=t.GetGearName(),this.maxalt_cell.textContent=t.GetMinAltitude().toString()+"-"+t.GetMaxAltitude().toString(),this.reliability_cell.textContent=r.Join(", ",t.GetReliabilityList()),this.toughness_cell.textContent=s.Toughness.toString(),this.mxstrain_cell.textContent=s.MaxStrain.toString(),this.escape_cell.textContent=r.Join(", ",t.GetEscapeList()),this.crashsafety_cell.textContent=e.crashsafety.toString(),this.crew_cell.textContent=t.GetCockpits().GetNumberOfCockpits().toString()+"/"+(t.GetPassengers().GetSeats()+t.GetPassengers().GetBeds()).toString(),this.flightstress_cell.textContent=g(t.GetStressList()),this.visibility_cell.textContent=r.Join(", ",t.GetVisibilityList()),this.attack_cell.textContent=r.Join(", ",t.GetAttackList()),this.communications_cell.textContent=t.GetCommunicationName();this.electric_cell.childElementCount>0;)this.electric_cell.removeChild(this.electric_cell.firstChild);const u=t.GetElectrics(),_=function(t){const e={div0:document.createElement("DIV"),div1:document.createElement("DIV"),div2:document.createElement("DIV")};return e.div0.classList.add("flex-container-o"),e.div1.classList.add("flex-container-i"),e.div2.classList.add("flex-container-i"),e.div0.appendChild(e.div1),e.div0.appendChild(e.div2),t.appendChild(e.div0),e}(this.electric_cell);u.storage>0&&Pt(h("Derived Battery"),u.storage.toString(),_);for(let t of u.equipment)Pt(t.source,t.charge,_);var m="";const f=t.VitalComponentList();for(let t of f)m+=t+"
";this.vital_components.innerHTML=m;const d=t.GetWeapons().GetWeaponList(),y=t.GetWeapons().GetDirectionList(),b=t.GetMunitions().GetBombCount(),S=t.GetMunitions().GetRocketCount();var w=t.GetMunitions().GetInternalBombCount(),C="";if(b>0){const e=Math.min(b,w),s=Math.max(0,b-e);e>0&&(C+=h(" Bomb Mass Internally.",e)),s>0&&(C+=h(" Bomb Mass Externally.",s)),e>0&&(C+=h("Largest Internal Bomb",Math.min(e,t.GetMunitions().GetMaxBombSize()).toString())),w-=e,C+="
"}if(S>0){const t=Math.min(S,w),e=Math.max(0,S-t);t>0&&(C+=h(" Rocket Mass Internally.",t)),e>0&&(C+=h(" Rocket Mass Externally.",e)),C+="
"}for(let e of t.GetWeapons().GetWeaponSets())C+=bt(e,d,y),C+="
";this.weapon_cell.innerHTML=C,e.warnings.sort(((t,e)=>t.color-e.color));var P="";for(let t of e.warnings){switch(t.color){case c.RED:P+='
';break;case c.YELLOW:P+='
';break;case c.WHITE:default:P+='
'}P+=t.source+": "+t.warning+"
"}this.warning_cell.innerHTML=P;var G="";const M=t.GetWings().GetWingList().length;if(1==M){const e=t.GetWings().GetWingList()[0].deck;e>>8,s[2*t+1]=i%256}return s},decompressFromUint8Array:function(e){if(null==e)return r.decompress(e);var s=new Array(e.length/2);for(let t=0,i=s.length;t>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=n[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++),n[h]=_++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(o,c)){if(c.charCodeAt(0)<256){for(i=0;i>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=n[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++)}for(a=2,i=0;i>=1;for(;;){if(g<<=1,f==e-1){m.push(s(g));break}f++}return m.join("")},decompress:function(t){return null==t?"":""==t?null:r._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,s,i){var a,r,n,o,l,h,c,u=[],_=4,p=4,m=3,g="",f=[],d={val:i(0),position:s,index:1};for(a=0;a<3;a+=1)u[a]=a;for(n=0,l=Math.pow(2,2),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;switch(n){case 0:for(n=0,l=Math.pow(2,8),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;c=t(n);break;case 1:for(n=0,l=Math.pow(2,16),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;c=t(n);break;case 2:return""}for(u[3]=c,r=c,f.push(c);;){if(d.index>e)return"";for(n=0,l=Math.pow(2,m),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;switch(c=n){case 0:for(n=0,l=Math.pow(2,8),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;u[p++]=t(n),c=p-1,_--;break;case 1:for(n=0,l=Math.pow(2,16),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;u[p++]=t(n),c=p-1,_--;break;case 2:return f.join("")}if(0==_&&(_=Math.pow(2,m),m++),u[c])g=u[c];else{if(c!==p)return null;g=r+r.charAt(0)}f.push(g),u[p++]=r+g.charAt(0),r=g,0==--_&&(_=Math.pow(2,m),m++)}}};return r}();class It{constructor(){this.errorMissingSeparator="Missing separator option.",this.errorEmpty="JSON is empty.",this.errorEmptyHeader="Could not detect header. Ensure first row contains your column headers.",this.errorNotAnArray="Your JSON must be an array or an object.",this.errorItemNotAnObject="Item in array is not an object: {0}"}flattenArray(t,e=[]){function s(t,e){let s=t.slice(0);if(!Array.isArray(e))return s;for(let t=0;te==t));return-1==s&&(e.push(t),s=e.length-1,Jt(e)),s}function Ut(t){var e=new f;t.serialize(e);var s=function(t){let e="";const s=new Uint8Array(t),i=s.byteLength;for(let t=0;te==t.name));return-1==r?(a.names.push(t.name),a.acft.push(i),r=a.names.length-1):a.acft[r]=i,jt(a),r}function jt(t){window.localStorage.setItem("hangar."+qt,JSON.stringify(t)),Vt(t)}function Jt(t){window.localStorage.setItem("hangar_names",JSON.stringify(t)),Yt(t)}function Vt(t){for(;Ft.lastChild;)Ft.removeChild(Ft.lastChild);for(let e=0;e'+o.innerHTML,r.appendChild(l)}}else{var h=r.insertCell();h.colSpan=2,h.appendChild(kt),kt.value=Nt.name;var c=document.createElement("HR");c.className="dashed",h.appendChild(c),h.appendChild(Ot),h.appendChild(document.createElement("BR")),h.appendChild(Ft)}}}(document.getElementById("table_builder"),document.getElementById("table_hangar"),document.getElementById("table_comp"))}window.addEventListener("DOMContentLoaded",(()=>{var t=new URLSearchParams(location.search).get("lang");t?l.SetCurrentLanguage(t):window.localStorage.language&&l.SetCurrentLanguage(window.localStorage.language),function(t){for(const t of E.l)if(T.has(t.name)||T.set(t.name,new N(t.name)),"Custom"!=t.name){T.get(t.name).fromJSON(t,!0),T.get(t.name).SetConstant();for(let e=0;e{qt=Ot.options[Ot.selectedIndex].text,Vt(Ht())},Yt(Bt()),(Ft=document.createElement("SELECT")).onchange=()=>{Dt(Ft.selectedIndex)},Vt(Ht()),kt=document.createElement("INPUT");var t=document.getElementById("btn_load");t.onclick=()=>{Nt.fromJSON(JSON.parse(JSON.stringify(xt.toJSON()))),Nt.CalculateStats(),Tt.UpdateDisplay(Nt,Nt.GetStats(),Nt.GetDerivedStats()),window.localStorage.setItem("aircraft",JSON.stringify(Nt.toJSON())),Zt(),Mt(t.parentElement)};var e=document.getElementById("btn_save");e.onclick=()=>{Nt.name=kt.value,Ut(Nt),Mt(e.parentElement)};var s=document.getElementById("btn_json");s.multiple=!1,s.accept="application/JSON",s.onchange=t=>{!function(t){if(0!=t.files.length){var e=t.files[0],s=new FileReader;s.onloadend=()=>{try{var t=JSON.parse(s.result),e=new St(Lt,!1);e.fromJSON(t)&&Dt(Ut(e))}catch(t){console.error(t,t.stack)}},s.readAsText(e),t.value=""}}(s),Mt(s.parentElement)};var i=document.getElementById("btn_remove");i.onclick=()=>{var t,e,s;t=xt.name,e=Ht(),-1!=(s=e.names.findIndex((e=>e==t)))&&(e.names.splice(s,1),e.acft.splice(s,1)),jt(e),Dt(Math.min(e.names.length-1,s)),Mt(i.parentElement)};var a=document.getElementById("btn_save_h");a.onclick=()=>{wt(JSON.stringify(Ht()),qt+".json","json"),Mt(a.parentElement)};var n=document.getElementById("btn_json_h");n.setAttribute("type","file"),n.multiple=!1,n.accept="application/JSON",n.onchange=t=>{if(0!=n.files.length){Mt(n.parentElement);var e=n.files[0],s=new FileReader;s.onloadend=()=>{try{var t,i=e.name.substr(0,e.name.length-5);if(i=(i=i.trim()).replace(/\s+/g," "),(t=JSON.parse(s.result)).names.length!=t.acft.length)throw"Bad";zt(i),window.localStorage.setItem("hangar."+i,s.result),qt=i,Yt(Bt()),Vt(Ht())}catch{(a=n.parentElement).classList.toggle("changed_b",!1),a.classList.toggle("changed_g",!1),a.classList.toggle("changed_n",!1),a.offsetHeight,a.classList.toggle("changed_b")}var a},s.readAsText(e),n.value=""}};var o=document.getElementById("lbl_create_list"),l=document.getElementById("btn_create_list");o.onclick=()=>{var t=l.value;""!=(t=(t=t.trim()).replace(/\s+/g," "))&&(Ot.selectedIndex=zt(t),qt=t,Vt(Ht()),Mt(o.parentElement)),l.value=""};var h=document.getElementById("btn_delete_list");h.onclick=()=>{var t,e,s;t=qt,e=Bt(),-1!=(s=e.findIndex((e=>e==t)))&&(e.splice(s,1),window.localStorage.removeItem("hangar."+t)),Jt(e),qt="Default",Yt(Bt()),Vt(Ht()),Dt(0),Mt(h.parentElement)},document.getElementById("btn_to_csv").onclick=()=>{var t=Ht(),e=[],s=JSON.stringify(xt.toJSON());for(let s of t.acft){try{var i=Rt(At.decompressFromEncodedURIComponent(s)),a=new d(i);xt.deserialize(a),xt.CalculateStats()}catch(t){console.log("Compressed Query Parameter Failed."),console.log(t),xt.Reset()}let t=xt.GetStats(),n=xt.GetDerivedStats(),o=Object.entries(n);o.splice(0,0,["name",xt.name]),o.splice(1,0,["cost",t.cost]),o.splice(2,0,["upkeep",t.upkeep]),o.splice(3,0,["bomb_mass",t.bomb_mass]),o.splice(4,0,["escape",r.Join("/",xt.GetEscapeList())]),o.splice(5,0,["crash",r.Join("/",xt.GetCrashList())]),o.splice(6,0,["stress",g(xt.GetStressList())]);let l=Object.fromEntries(o);e.push(l)}xt.fromJSON(JSON.parse(s)),wt((new It).convert(e,{separator:",",flatten:!0,output_csvjson_variant:!1}),qt+".csv","csv")}}(),function(){let t=window.localStorage.getItem("aircraft");if(Nt=new St(Lt,!1),t){console.log("Used Saved Data");try{Nt.fromJSON(JSON.parse(t)),Nt.CalculateStats()}catch{console.log("Saved Data Failed."),Nt.Reset()}}(Tt=new vt(document.getElementById("table_builder"))).SetShowBombs(!0),Tt.UpdateDisplay(Nt,Nt.GetStats(),Nt.GetDerivedStats()),xt=new St(Lt,!1),(Wt=new vt(document.getElementById("table_hangar"))).SetShowBombs(!0)}(),Dt(0)}))})(); \ No newline at end of file diff --git a/PlaneBuilder/plane_builder.js b/PlaneBuilder/plane_builder.js index 7907ff8..ce5f698 100644 --- a/PlaneBuilder/plane_builder.js +++ b/PlaneBuilder/plane_builder.js @@ -1 +1 @@ -(()=>{"use strict";var t,e,s={},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={exports:{}};return s[t](n,n.exports,a),n.exports}e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,a.t=function(s,i){if(1&i&&(s=this(s)),8&i)return s;if("object"==typeof s&&s){if(4&i&&s.__esModule)return s;if(16&i&&"function"==typeof s.then)return s}var n=Object.create(null);a.r(n);var r={};t=t||[null,e({}),e([]),e(e)];for(var o=2&i&&s;"object"==typeof o&&!~t.indexOf(o);o=e(o))Object.getOwnPropertyNames(o).forEach((t=>r[t]=()=>s[t]));return r.default=()=>s,a.d(n,r),n},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};class n{static IsNullOrWhiteSpace(t){try{return null==t||"undefined"==t||t.toString().replace(/\s/g,"").length<1}catch(t){return console.log(t),!1}}static Join(t,...e){try{const s=e[0];if(Array.isArray(s)||s instanceof Array){let e=n.Empty;for(let i=0;i{e+=i[s]+t})),e=e.slice(0,e.length-t.length),e}const i=e;return n.join(t,...i)}catch(t){return console.log(t),n.Empty}}static Format(t,...e){try{return t.match(n.regexNumber)?n.format(n.regexNumber,t,e):t.match(n.regexObject)?n.format(n.regexObject,t,e,!0):t}catch(t){return console.log(t),n.Empty}}static format(t,e,s,i=!1){return e.replace(t,(function(t,e){const a=t.split(":");let r;return a.length>1&&(e=a[0].replace("{",""),t=a[1].replace("}","")),r=i?s[0][e]:s[e],null==r||null==r||t.match(/{\d+}/)?r:(r=n.parsePattern(t,r),void 0!==r&&null!=r?r:n.Empty)}))}static parsePattern(t,e){switch(t){case"L":return e.toLocaleLowerCase();case"U":return e.toLocaleUpperCase();case"d":if("string"==typeof e)return n.getDisplayDateFromString(e);if(e instanceof Date)return n.Format("{0:00}.{1:00}.{2:0000}",e.getDate(),e.getMonth(),e.getFullYear());break;case"s":if("string"==typeof e)return n.getSortableDateFromString(e);if(e instanceof Date)return n.Format("{0:0000}-{1:00}-{2:00}",e.getFullYear(),e.getMonth(),e.getDate());break;case"n":{"string"!=typeof e&&(e=e.toString());const t=e.replace(/,/g,".");if(isNaN(parseFloat(t))||t.length<=3)break;const s=t.split(/[^0-9]+/g);let i=s;s.length>1&&(i=[n.join("",...s.splice(0,s.length-1)),s[s.length-1]]);const a=i[0],r=a.length%3;let o=r>0?a.substring(0,r):n.Empty;const l=a.substring(r).match(/.{3}/g);return o=o+"."+n.Join(".",l),o+(i.length>1?","+i[1]:"")}case"x":return this.decimalToHexString(e);case"X":return this.decimalToHexString(e,!0)}return"number"!=typeof e&&isNaN(e)||isNaN(+t)||n.IsNullOrWhiteSpace(e)?e:n.formatNumber(e,t)}static decimalToHexString(t,e=!1){const s=parseFloat(t).toString(16);return e?s.toLocaleUpperCase():s}static getDisplayDateFromString(t){const e=t.split("-");if(e.length<=1)return t;let s=e[e.length-1];const i=e[e.length-2],a=e[e.length-3];return s=s.split("T")[0],s=s.split(" ")[0],`${s}.${i}.${a}`}static getSortableDateFromString(t){const e=t.replace(",","").split(".");if(e.length<=1)return t;const s=e[e.length-1].split(" ");let i=n.Empty;s.length>1&&(i=s[s.length-1]);let a=`${e[e.length-1].split(" ")[0]}-${e[e.length-2]}-${e[e.length-3]}`;return!n.IsNullOrWhiteSpace(i)&&i.length>1?a+=`T${i}`:a+="T00:00:00",a}static formatNumber(t,e){const s=e.length,i=t.toString();if(s<=i.length)return i;let a=s-i.length;return a+=1,new Array(a).join("0")+i}static join(t,...e){let s=n.Empty;for(let i=0;i Benefits(-)":"Penalties(+)
Benefits(-)","Used Burnt Out":"Burnt Out","Used Burnt Out Description":"Engines are at -1 Reliability","Used Ragged":"Ragged","Used Ragged Description":"Reduce your Max Speed by 10%","Used Hefty":"Hefty","Used Hefty Description":"Increase your Stall Speeds by 20%","Used Sticky Guns":"Sticky Guns","Used Sticky Guns Description":"Increase the chance of guns jamming by 1","Used Weak":"Weak","Used Weak Description":"Cut the plane\'s Toughness in half","Used Fragile":"Fragile","Used Fragile Description":"Reduce your Max Strain by 20%","Used Leaky":"Leaky","Used Leaky Description":"Reduce your Fuel by 20%","Used Sluggish":"Sluggish","Used Sluggish Description":"Reduce your Handling by 5","Weapons Section Title":"Weapons","Weapons Number of Weapon Sets":"Number of Weapon Sets:","Weapons Number of Weapon Braces":"Number of Weapon Braces:","Weapons Weapon Set":"Weapon Set","Weapons Weapons":"Weapons","Weapons Weapon Stats":"Weapon Stats","Weapons Type":"Weapon Type","Weapons Number of Mounts":"Number of Mounts","Weapons Ammunition":"Ammunition","Weapons Action":"Action","Weapons Projectile":"Projectile","Weapons Belt Fed":"Belt Fed","Weapons Stat Mounting":"Mounting","Weapons Stat Jam":"Jam","Weapons Stat Hits":"Hits","Weapons Stat Damage":"Damage","Weapons Stat Shots":"Shots","Weapons Stat Charges":"Charges per Shot","Weapons Wing Mount":"Wing Mount","Weapons Accessible":"Accessible","Weapons Free Accessible":"Free Accessible","Weapons Covered":"Covered","Weapons # Weapons at Mount":"Weapons at Mount","Weapons Synchronization":"Synchronization","Weapons Mount":"Weapon Mount","Weapons Braces":"Weapon Braces","Weapons Braces Warning":"These mounts give an observer +1 to make a Personal Attack with a loose weapon they are carrying in their hands.","Wings Section Title":"Wings","Wings Wing Stagger":"Wing Stagger:","Wings Closed Wing":"Closed Wing:","Wings Swept Wing":"Swept Wings:","Wings Wing Type":"Wing Type","Wings Wing Options":"Wing Options","Wings Wing Stats":"Wing Stats","Wings Full Wings":"Full Wings","Wings Miniature Wings":"Miniature Wings","Wings Sesquiplane":"Sesquiplane","Wings No Wing":"None","Wings Area":"Area","Wings Span":"Span","Wings Gull":"Gull","Wings Dihedral":"Dihedral","Wings Anhedral":"Anhedral","Aircraft Button Save":"Save","Aircraft Button Load":"Load","Aircraft Button Copy As Link":"Copy As Link","Aircraft Button Save Dashboard":"Save Dashboard","Aircraft Button Interactive Dashboard":"Interactive Dashboard","Aircraft Button Save NPC":"Save NPC","Aircraft Button Save Catalog":"Save Catalog","Aircraft Button Default Aircraft":"Default Aircraft","Aircraft Stats Section Title":"Total Sum of Stats","Aircraft Derived Section Title":"Aircraft Derived Statistics","Seat #":"Seat #{0}","Seats #":"Seats # {0}","Seat Location":"Choose Seat","Radiators #":"Radiators # {0}","Crew Pilot":"Pilot","Crew Bombadier":"Bombardier","Crew Co-Pilot":"Co-Pilot","Crew Gunner":"Gunner","Crew Aircrew":"Aircrew","Diesel":"Diesel Engine","Diesel Warning":"Engine won\'t catch fire.","Cargo Tiny":"A small locker for personal stuff.","Cargo Small":"Will fit a trunk, barrel, or crate.","Cargo Medium":"Will fit a small vehicle like a motorcycle, car, or zeppelin engine.","Cargo Large":"Will fit a scout or fighter aircraft with the wings taken off.","Cargo Huge":"Will fit just about anything you can imagine.","Alter Select Part":"Select Part","Alter Quantity":"Quantity","Alter Part Name":"Part Name","Alter Part Special Rules":"Special Rules","Frame Count":"Frame Count","Frame Count Warning":"This plane appears to have unused frame sections. Check to see if this is intentional.","Altitude Section Title":"Altitude Effects","Altitude Altitude":"Altitude","Rarity":"Rarity","Rarity Custom":"Custom","Rarity Common":"Common","Rarity Rare":"Rare","Rarity Legendary":"Legendary","Boost Warning":"Boost is 0 for some loads. The plane cannot accelerate to take off.","Insufficient Charge":"Insufficient Charge","Insufficient Charge Warning":"This aircraft has electrical systems with nothing to power them.","Low Mass Warning":"This aircraft is very low mass. If it is a custom airplane, be careful not to make it overpowered.","Low Drag Warning":"This aircraft is very low drag. If it is a custom airplane, be careful not to make it overpowered.","Connectivity Warning":"Can move between positions without Wingwalking.","Passenger Connectivity Warning":"Can reach the cockpit without Wingwalking.","Rotor Thickness":"Rotor Thickness"}}');var o=a.t(r,2);const l=new class{constructor(){this.lang="en"}LoadLanguages(t){this.languages=t}GetLanguages(){const t=[];for(const e of this.languages.languages)t.push(e);return t}SetCurrentLanguage(t){this.languages[t]&&(this.lang=t)}e(t){return this.languages[this.lang][t]?this.languages[this.lang][t]:this.languages.en[t]?this.languages.en[t]:(console.error("Failed to find "+t),"!"+t+"!")}};function h(t,...e){return n.Format(l.e(t),...e)}var c;l.LoadLanguages(o),function(t){t[t.WHITE=0]="WHITE",t[t.YELLOW=1]="YELLOW",t[t.RED=2]="RED"}(c||(c={}));class u{constructor(t){this.liftbleed=0,this.wetmass=0,this.mass=0,this.drag=0,this.control=0,this.cost=0,this.reqsections=0,this.visibility=0,this.flightstress=0,this.escape=0,this.pitchstab=0,this.latstab=0,this.cooling=0,this.reliability=0,this.power=0,this.fuelconsumption=0,this.maxstrain=0,this.structure=0,this.pitchspeed=0,this.pitchboost=0,this.wingarea=0,this.toughness=0,this.upkeep=0,this.crashsafety=0,this.bomb_mass=0,this.fuel=0,this.charge=0,this.warnings=[],this.era=[],t&&this.fromJSON(t,0)}toJSON(){return{liftbleed:this.liftbleed,wetmass:this.wetmass,mass:this.mass,drag:this.drag,control:this.control,cost:this.cost,reqsections:this.reqsections,visibility:this.visibility,flightstress:this.flightstress,escape:this.escape,pitchstab:this.pitchstab,latstab:this.latstab,cooling:this.cooling,reliability:this.reliability,power:this.power,fuelconsumption:this.fuelconsumption,maxstrain:this.maxstrain,structure:this.structure,pitchboost:this.pitchboost,pitchspeed:this.pitchspeed,wingarea:this.wingarea,toughness:this.toughness,upkeep:this.upkeep,crashsafety:this.crashsafety,bomb_mass:this.bomb_mass,fuel:this.fuel,charge:this.charge,warnings:this.warnings,eras:this.era}}fromJSON(t,e){if(t.liftbleed&&(this.liftbleed=t.liftbleed),t.wetmass&&(this.wetmass=t.wetmass),t.mass&&(this.mass=t.mass),t.drag&&(this.drag=t.drag),t.control&&(this.control=t.control),t.cost&&(this.cost=t.cost),t.reqsections&&(this.reqsections=t.reqsections),t.visibility&&(this.visibility=t.visibility),t.flightstress&&(this.flightstress=t.flightstress),t.escape&&(this.escape=t.escape),t.pitchstab&&(this.pitchstab=t.pitchstab),t.latstab&&(this.latstab=t.latstab),t.cooling&&(this.cooling=t.cooling),t.reliability&&(this.reliability=t.reliability),t.power&&(this.power=t.power),t.fuelconsumption&&(this.fuelconsumption=t.fuelconsumption),t.maxstrain&&(this.maxstrain=t.maxstrain),t.structure&&(this.structure=t.structure),t.pitchspeed&&(this.pitchspeed=t.pitchspeed),t.pitchboost&&(this.pitchboost=t.pitchboost),t.wingarea&&(this.wingarea=t.wingarea),t.toughness&&(this.toughness=t.toughness),t.upkeep&&(this.upkeep=t.upkeep),t.crashsafety&&(this.crashsafety=t.crashsafety),t.bomb_mass&&(this.bomb_mass=t.bomb_mass),t.fuel&&(this.fuel=t.fuel),t.charge&&(this.charge=t.charge),t.warning&&this.warnings.push({source:h(t.name),warning:h(t.warning),color:c.WHITE}),t.warnings){const e=t.warnings,s=[];for(const t of e)s.push({source:t.source,warning:t.warning});this.warnings=this.MergeWarnings(s)}if(t.era&&this.era.push({name:h(t.name),era:h(t.era)}),t.eras){const e=t.eras,s=[];for(const t of e)s.push({name:t.name,era:t.era});this.era=this.MergeEra(s)}}serialize(t){t.PushNum(this.liftbleed),t.PushNum(this.wetmass),t.PushNum(this.mass),t.PushNum(this.drag),t.PushNum(this.control),t.PushNum(this.cost),t.PushNum(this.reqsections),t.PushNum(this.visibility),t.PushNum(this.flightstress),t.PushNum(this.escape),t.PushNum(this.pitchstab),t.PushNum(this.latstab),t.PushNum(this.cooling),t.PushNum(this.reliability),t.PushNum(this.power),t.PushNum(this.fuelconsumption),t.PushNum(this.maxstrain),t.PushNum(this.structure),t.PushFloat(this.pitchboost),t.PushFloat(this.pitchspeed),t.PushNum(this.wingarea),t.PushNum(this.toughness),t.PushNum(this.upkeep),t.PushNum(this.crashsafety),t.PushNum(this.bomb_mass),t.PushNum(this.fuel),t.PushNum(this.charge),t.PushNum(this.warnings.length);for(const e of this.warnings)t.PushString(e.source),t.PushString(e.warning);t.PushNum(this.era.length);for(const e of this.era)t.PushString(e.name),t.PushString(e.era)}deserialize(t){if(this.liftbleed=t.GetNum(),this.wetmass=t.GetNum(),this.mass=t.GetNum(),this.drag=t.GetNum(),this.control=t.GetNum(),this.cost=t.GetNum(),this.reqsections=t.GetNum(),this.visibility=t.GetNum(),this.flightstress=t.GetNum(),this.escape=t.GetNum(),this.pitchstab=t.GetNum(),this.latstab=t.GetNum(),this.cooling=t.GetNum(),this.reliability=t.GetNum(),this.power=t.GetNum(),this.fuelconsumption=t.GetNum(),this.maxstrain=t.GetNum(),this.structure=t.GetNum(),this.pitchboost=t.GetFloat(),this.pitchspeed=t.GetFloat(),this.wingarea=t.GetNum(),this.toughness=t.GetNum(),this.upkeep=t.GetNum(),this.crashsafety=t.GetNum(),this.bomb_mass=t.GetNum(),this.fuel=t.GetNum(),this.charge=t.GetNum(),t.version>12.25){const e=t.GetNum();this.warnings=[];for(let s=0;s1e-6&&(e.warnings=this.warnings,e.era=this.era),e}Equal(t){return this.liftbleed==t.liftbleed&&this.wetmass==t.wetmass&&this.mass==t.mass&&this.drag==t.drag&&this.control==t.control&&this.cost==t.cost&&this.reqsections==t.reqsections&&this.visibility==t.visibility&&this.flightstress==t.flightstress&&this.escape==t.escape&&this.pitchstab==t.pitchstab&&this.latstab==t.latstab&&this.cooling==t.cooling&&this.reliability==t.reliability&&this.power==t.power&&this.fuelconsumption==t.fuelconsumption&&this.maxstrain==t.maxstrain&&this.structure==t.structure&&this.pitchspeed==t.pitchspeed&&this.pitchboost==t.pitchboost&&this.wingarea==t.wingarea&&this.toughness==t.toughness&&this.upkeep==t.upkeep&&this.crashsafety==t.crashsafety&&this.bomb_mass==t.bomb_mass&&this.fuel==t.fuel&&this.charge==t.charge}rtz(t){return t>0?Math.floor(1e-6+t):Math.ceil(-1e-6+t)}Round(){this.liftbleed=this.rtz(this.liftbleed),this.wetmass=this.rtz(this.wetmass),this.mass=this.rtz(this.mass),this.drag=this.rtz(this.drag),this.control=this.rtz(this.control),this.cost=this.rtz(this.cost),this.reqsections=this.rtz(this.reqsections),this.visibility=this.rtz(this.visibility),this.flightstress=this.rtz(this.flightstress),this.escape=this.rtz(this.escape),this.pitchstab=this.rtz(this.pitchstab),this.latstab=this.rtz(this.latstab),this.cooling=this.rtz(this.cooling),this.reliability=this.rtz(this.reliability),this.power=this.rtz(this.power),this.fuelconsumption=this.rtz(this.fuelconsumption),this.maxstrain=this.rtz(this.maxstrain),this.structure=this.rtz(this.structure),this.wingarea=this.rtz(this.wingarea),this.toughness=this.rtz(this.toughness),this.upkeep=this.rtz(this.upkeep),this.crashsafety=this.rtz(this.crashsafety),this.bomb_mass=this.rtz(this.bomb_mass),this.fuel=this.rtz(this.fuel),this.charge=this.rtz(this.charge)}Clone(){return this.Add(new u)}}const m=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return 6}},p=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return-1}},d=t=>{switch(t){case 0:return"Pioneer";case 1:return"WWI";case 2:return"Roaring 20s";case 3:return"Coming Storm";case 4:return"WWII";case 5:return"Last Hurrah";case 6:case-1:return"Himmilgard"}},g=t=>{var e="";for(let s=0;s0){const s=t.length-1;2==t[s].length&&t[s][0]!=t[s][1]?e+=t[s][0].toString()+"("+t[s][1].toString()+")":e+=t[s][0].toString()}return e};class _{constructor(t){this.array=new ArrayBuffer(51200),this.view=new DataView(this.array),this.offset=0}Check(){if(this.offset>=this.array.byteLength)throw"Serialization Way too long."}PushNum(t){this.view.setInt16(this.offset,t,!1),this.offset+=2,this.Check()}PushBool(t){t?this.view.setUint8(this.offset,1):this.view.setUint8(this.offset,0),this.offset+=1,this.Check()}PushString(t){var e=(new TextEncoder).encode(t);this.PushNum(e.length);for(let t=0;t=this.array.byteLength)throw"Deserialization Failed"}GetNum(){this.Check();const t=this.view.getInt16(this.offset,!1);return this.offset+=2,t}GetBool(){this.Check();const t=this.view.getUint8(this.offset);return this.offset+=1,t>0}GetString(){this.Check();const t=this.GetNum(),e=new Uint8Array(this.view.buffer,this.offset,t);let s;return this.offset+=t,s=this.version<12.65?"windows-1252":"utf-8",new TextDecoder(s).decode(e)}GetNumArr(t){this.Check();const e=this.GetNum(),s=[];for(let t=0;t0&&(n*=1.4),Math.floor(1e-6+n)}VerifyValues(){for(this.engine_displacement=Math.max(.01,this.engine_displacement),this.engine_displacement=Math.min(150,this.engine_displacement),this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.cool_sel=Math.max(0,Math.min(this.CoolingTable.length-1,this.cool_sel)),this.num_cyl_per_row=Math.floor(Math.max(1,this.num_cyl_per_row)),this.num_rows=Math.floor(Math.max(1,this.num_rows)),this.compression_ratio=Math.max(.01,this.compression_ratio),this.compression_ratio=Math.min(25,this.compression_ratio),this.rpm_boost=Math.max(.1,this.rpm_boost),this.rpm_boost=Math.min(2,this.rpm_boost),this.material_fudge=Math.max(.1,this.material_fudge),this.material_fudge=Math.min(2,this.material_fudge),this.quality_fudge=Math.max(.1,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge);this.material_fudge-1+(this.quality_fudge-1)<-.9;)this.material_fudge+=.1,this.quality_fudge+=.1;this.min_IAF=10*Math.round(1e-6+this.min_IAF/10),this.compressor_count=Math.floor(1e-6+this.compressor_count),this.compressor_count=Math.min(5,this.compressor_count),this.compressor_type==S.NONE?(this.compressor_count=0,this.min_IAF=0):this.compressor_type==S.ALTITUDE_THROTTLE?(this.compressor_count=1,this.min_IAF=0,this.upg_sel[0]=!1,this.upg_sel[1]=!1,this.upg_sel[2]=!1):(this.min_IAF=Math.max(0,this.min_IAF),this.compressor_count=Math.max(1,this.compressor_count))}EngineStats(){const t=new F;switch(t.name=this.name,this.VerifyValues(),t.stats.power=this.CalcPower(),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=Math.floor(-1.999999+this.era_sel+10*(this.quality_fudge+this.material_fudge-2)),t.stats.cooling=this.CalcCooling(),t.oiltank=this.IsRotary(),t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=this.CalcFuelConsumption(),t.altitude=this.CalcAltitude(),t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(d(this.era_sel))}),this.compressor_type){case S.NONE:break;case S.ALTITUDE_THROTTLE:t.stats.cost+=3,t.altitude=49,t.stats.warnings.push({source:h("Altitude Throttle"),warning:h("Altitude Throttle Warning"),color:c.WHITE});break;case S.SUPERCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.fuelconsumption=Math.floor(1e-6+1.25*t.stats.fuelconsumption),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=29+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e;break}case S.TURBOCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10*2,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=49+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e,t.stats.reqsections+=1;break}}return(this.compressor_type==S.ALTITUDE_THROTTLE||this.upg_sel[1])&&t.stats.warnings.push({source:h("War Emergency Power"),warning:h("War Emergency Power Warning"),color:c.WHITE}),t.stats.fuelconsumption=Math.max(1,t.stats.fuelconsumption),t.rarity=this.rarity,t}EngineInputs(){const t=new G;t.engine_type=y.PROPELLER,t.RPM_boost=this.rpm_boost,t.compression=this.compression_ratio,t.compressor_count=this.compressor_count,t.compressor_type=this.compressor_type,t.cyl_per_row=this.num_cyl_per_row,t.displacement=this.engine_displacement,t.era_sel=this.era_sel,t.material_fudge=this.material_fudge,t.min_IdealAlt=this.min_IAF,t.name=this.name,t.quality_fudge=this.quality_fudge,t.rows=this.num_rows,t.type=this.cool_sel;for(let e=0;e2&&(this.afterburner=!1)}EngineInputs(){const t=new G;return t.name=this.name,t.engine_type=y.TURBOMACHINERY,t.era_sel=this.era_sel,t.type=this.type_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.upgrades[0]=this.afterburner,t.rarity=this.rarity,t}GetPitchSpeed(){return this.bypass_ratio>=8?1:this.bypass_ratio>=3.5?1.1:this.bypass_ratio>=1?1.2:1.3}EngineStats(){const t=new F;this.VerifyValues();const e=this.CalcStages();return this.kN=e.thrust,this.tsfc=e.fuel/e.thrust,t.name=this.name,t.stats.power=Math.round(1e3*e.thrust/89),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.fuelconsumption=Math.round(200*e.fuel/1e3),t.rumble=0,t.stats.cost=this.CalcCost(),t.overspeed=100,t.altitude=59,8==this.era_sel?t.stats.era.push({name:t.name,era:h(d(-1))}):t.stats.era.push({name:t.name,era:h(d(5))}),t.stats.pitchspeed=this.GetPitchSpeed(),t.rarity=this.rarity,t}}class P{constructor(){this.EraTable=[{name:"Pioneer",draw:3,drawfactor:.4,massfactor:.4,reliability:-1,costfactor:.4,overspeed:20},{name:"WWI",draw:1,drawfactor:.4,massfactor:1/3,reliability:0,costfactor:1/2.25,overspeed:25},{name:"Roaring 20s",draw:1,drawfactor:2/7,massfactor:2/7,reliability:1,costfactor:.5,overspeed:30},{name:"Coming Storm",draw:0,drawfactor:2/7,massfactor:1/4,reliability:2,costfactor:1/1.9,overspeed:35},{name:"WWII",draw:0,drawfactor:1/4,massfactor:.2,reliability:3,costfactor:1/1.8,overspeed:40},{name:"Last Hurrah",draw:0,drawfactor:.2,massfactor:1/6,reliability:4,costfactor:1/1.75,overspeed:45}],this.Winding=[{name:"Aluminum",drawmod:1.1,mass:-2,drag:1,costfactor:1,reliabilty:0},{name:"Copper",drawmod:1,mass:0,drag:0,costfactor:1,reliabilty:0},{name:"Silver",drawmod:.95,mass:1,drag:0,costfactor:1.1,reliabilty:0},{name:"Electrum",drawmod:.9,mass:2,drag:0,costfactor:1.3,reliabilty:1},{name:"Platinum",drawmod:.75,mass:3,drag:0,costfactor:2,reliabilty:2},{name:"Screamer Sinew",drawmod:.9,mass:0,drag:1,costfactor:1.75,reliabilty:4},{name:"Lightning Sprite Ephemera",drawmod:.5,mass:-2,drag:-2,costfactor:2,reliabilty:-3}],this.name="Default",this.era_sel=0,this.winding_sel=0,this.power=1,this.chonk=1,this.quality_fudge=1}EraMass(){const t=this.EraTable[this.era_sel];return Math.floor(1e-6+t.massfactor*this.power)}CalcMass(){const t=this.Winding[this.winding_sel];return Math.max(0,Math.floor(1e-6+this.EraMass()+t.mass))}CalcDrag(){const t=this.power/10,e=this.Winding[this.winding_sel].drag;return Math.max(1,Math.floor(1.000001+t+this.chonk+e))}CalcOverspeed(){const t=this.chonk/2,e=7.5*(this.quality_fudge-1);return Math.ceil(-1e-6+this.EraTable[this.era_sel].overspeed-t+e)}CalcDraw(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.draw+Math.ceil(this.power*t.drawfactor-1e-6);return Math.ceil(s*e.drawmod-1e-6)}CalcReliability(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=this.power/10,i=5*(this.quality_fudge-1);return Math.trunc(1e-6+t.reliability+this.chonk-s+i)+e.reliabilty}CalcTorque(){const t=1+this.EraMass()/10+this.chonk/4;return Math.max(1,Math.floor(1e-6+t))}CalcCost(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.costfactor*this.power,i=Math.ceil(s*Math.max(.5,this.quality_fudge)-1e-6);return Math.ceil(i*e.costfactor-1e-6)}VerifyValues(){this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.winding_sel=Math.max(0,Math.min(this.Winding.length-1,this.winding_sel)),this.power=Math.max(1,this.power),this.power=Math.floor(1e-6+this.power),this.chonk=Math.floor(1e-6+this.chonk),this.chonk=Math.max(-10,this.chonk),this.chonk=Math.min(10,this.chonk),this.quality_fudge=Math.max(.5,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge)}EngineStats(){var t=new F;return t.name=this.name,this.VerifyValues(),t.stats.power=this.power,t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.cooling=0,t.oiltank=!1,t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=0,t.stats.charge=-this.CalcDraw(),t.altitude=100,t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(d(this.era_sel))}),t}EngineInputs(){var t=new G;return t.engine_type=y.ELECTRIC,t.name=this.name,t.power=this.power,t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.material_fudge=this.chonk,t.quality_fudge=this.quality_fudge,t}}!function(t){t[t.PROPELLER=0]="PROPELLER",t[t.PULSEJET=1]="PULSEJET",t[t.TURBOMACHINERY=2]="TURBOMACHINERY",t[t.ELECTRIC=3]="ELECTRIC"}(y||(y={})),function(t){t[t.CUSTOM=0]="CUSTOM",t[t.COMMON=1]="COMMON",t[t.RARE=2]="RARE",t[t.LEGENDARY=3]="LEGENDARY"}(w||(w={}));class G{constructor(t){this.name="Default",this.engine_type=y.PROPELLER,this.type=0,this.era_sel=0,this.rarity=w.CUSTOM,this.displacement=0,this.compression=0,this.cyl_per_row=0,this.rows=0,this.RPM_boost=0,this.material_fudge=0,this.quality_fudge=0,this.compressor_type=0,this.compressor_count=0,this.min_IdealAlt=0,this.upgrades=[...Array(4).fill(!1)],this.power=0,this.quality_cost=0,this.quality_rely=0,this.starter=!1,this.flow_adjustment=0,this.diameter=0,this.compression_ratio=0,this.bypass_ratio=0,this.winding_sel=0,t&&this.fromJSON(t)}toJSON(){switch(this.engine_type){case y.PROPELLER:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,displacement:this.displacement,compression:this.compression,cyl_per_row:this.cyl_per_row,rows:this.rows,RPM_boost:this.RPM_boost,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge,compressor_type:this.compressor_type,compressor_count:this.compressor_count,min_IAF:this.min_IdealAlt,upgrades:this.upgrades,rarity:this.rarity};case y.PULSEJET:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,power:this.power,quality_cost:this.quality_cost,quality_rely:this.quality_rely,starter:this.starter,rarity:this.rarity};case y.TURBOMACHINERY:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,flow_adjustment:this.flow_adjustment,diameter:this.diameter,compression_ratio:this.compression_ratio,bypass_ratio:this.bypass_ratio,upgrades:this.upgrades,rarity:this.rarity};case y.ELECTRIC:return{name:this.name,engine_type:this.engine_type,power:this.power,era_sel:this.era_sel,winding_sel:this.winding_sel,diameter:this.diameter,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge};default:throw"EngineInputs.toJSON: Oh dear, you have a new engine type."}}fromJSON(t){switch(this.name=t.name,this.engine_type=t.engine_type,this.type=t.type,this.era_sel=t.era_sel,this.engine_type){case y.PROPELLER:this.displacement=t.displacement,this.compression=t.compression,this.cyl_per_row=t.cyl_per_row,this.rows=t.rows,this.RPM_boost=t.RPM_boost,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge,this.compressor_type=t.compressor_type,this.compressor_count=t.compressor_count,this.min_IdealAlt=t.min_IAF,this.upgrades=b(t.upgrades,this.upgrades.length);break;case y.PULSEJET:this.power=t.power,this.quality_cost=t.quality_cost,this.quality_rely=t.quality_rely,this.starter=t.starter;break;case y.TURBOMACHINERY:this.flow_adjustment=t.flow_adjustment,this.diameter=t.diameter,this.compression_ratio=t.compression_ratio,this.bypass_ratio=t.bypass_ratio,this.upgrades=t.upgrades;break;case y.ELECTRIC:this.power=t.power,this.winding_sel=t.winding_sel,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge;break;default:throw"EngineInputs.fromJSON: Oh dear, you have a new engine type."}t.rarity?this.rarity=t.rarity:this.rarity=w.CUSTOM}serialize(t){switch(t.PushString(this.name),t.PushNum(this.engine_type),t.PushNum(this.type),t.PushNum(this.era_sel),this.engine_type){case y.PROPELLER:t.PushFloat(this.displacement),t.PushFloat(this.compression),t.PushNum(this.cyl_per_row),t.PushNum(this.rows),t.PushFloat(this.RPM_boost),t.PushFloat(this.material_fudge),t.PushFloat(this.quality_fudge),t.PushNum(this.compressor_type),t.PushNum(this.compressor_count),t.PushNum(this.min_IdealAlt),t.PushBoolArr(this.upgrades);break;case y.PULSEJET:t.PushNum(this.power),t.PushFloat(this.quality_cost),t.PushFloat(this.quality_rely),t.PushBool(this.starter);break;case y.TURBOMACHINERY:t.PushFloat(this.flow_adjustment),t.PushFloat(this.diameter),t.PushFloat(this.compression_ratio),t.PushFloat(this.bypass_ratio),t.PushBoolArr(this.upgrades);break;case y.ELECTRIC:t.PushNum(this.power),t.PushNum(this.winding_sel),t.PushNum(this.material_fudge),t.PushFloat(this.quality_fudge);break;default:throw"EngineInputs.serialize: Oh dear, you have a new engine type."}t.PushNum(this.rarity)}deserialize(t){switch(this.name=t.GetString(),this.engine_type=t.GetNum(),this.type=t.GetNum(),this.era_sel=t.GetNum(),this.engine_type){case y.PROPELLER:this.displacement=t.GetFloat(),this.compression=t.GetFloat(),this.cyl_per_row=t.GetNum(),this.rows=t.GetNum(),this.RPM_boost=t.GetFloat(),this.material_fudge=t.GetFloat(),this.quality_fudge=t.GetFloat(),this.compressor_type=t.GetNum(),this.compressor_count=t.GetNum(),this.min_IdealAlt=t.GetNum(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case y.PULSEJET:this.power=t.GetNum(),this.quality_cost=t.GetFloat(),this.quality_rely=t.GetFloat(),this.starter=t.GetBool();break;case y.TURBOMACHINERY:this.flow_adjustment=t.GetFloat(),this.diameter=t.GetFloat(),this.compression_ratio=t.GetFloat(),this.bypass_ratio=t.GetFloat(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case y.ELECTRIC:this.power=t.GetNum(),this.winding_sel=t.GetNum(),this.material_fudge=t.GetNum(),this.quality_fudge=t.GetFloat();break;default:throw"EngineInputs.deserialize: Oh dear, you have a new engine type."}t.version>12.35?this.rarity=t.GetNum():this.rarity=w.CUSTOM}PartStats(){switch(this.engine_type){case y.PROPELLER:{const t=new B;return t.name=this.name,t.cool_sel=this.type,t.era_sel=this.era_sel,t.engine_displacement=this.displacement,t.compression_ratio=this.compression,t.num_cyl_per_row=this.cyl_per_row,t.num_rows=this.rows,t.rpm_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IAF=this.min_IdealAlt,t.upg_sel=this.upgrades,t.rarity=this.rarity,t.EngineStats()}case y.PULSEJET:{const t=new E;t.valve_sel=this.type,t.era_sel=this.era_sel,t.desired_power=this.power,t.build_quality=this.quality_cost,t.overall_quality=this.quality_rely,t.starter=this.starter,t.rarity=this.rarity;const e=t.EngineStats();return this.name=e.name,e}case y.TURBOMACHINERY:{const t=new M;return t.type_sel=this.type,t.era_sel=this.era_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.afterburner=this.upgrades[0],t.name=this.name,t.rarity=this.rarity,t.EngineStats()}case y.ELECTRIC:{const t=new P;return t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.power=this.power,t.chonk=this.material_fudge,t.quality_fudge=this.quality_fudge,t.name=this.name,t.EngineStats()}default:throw"EngineInputs.PartStats: Oh dear, you have a new engine type."}}Equal(t){return this.name==t.name}Clone(){const t=new G;t.name=this.name,t.engine_type=this.engine_type,t.type=this.type,t.era_sel=this.era_sel,t.displacement=this.displacement,t.compression=this.compression,t.cyl_per_row=this.cyl_per_row,t.rows=this.rows,t.RPM_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IdealAlt=this.min_IdealAlt,t.power=this.power,t.quality_cost=this.quality_cost,t.quality_rely=this.quality_rely,t.starter=this.starter;for(let e=0;e12.35&&(this.rarity=t.GetNum()),this.stats.deserialize(t)}Clone(){const t=new F;return t.fromJSON(JSON.parse(JSON.stringify(this.toJSON()))),t}Equal(t){return this.stats.Equal(t.stats)&&this.overspeed==t.overspeed&&this.altitude==t.altitude&&this.torque==t.torque&&this.rumble==t.rumble&&this.oiltank==t.oiltank&&this.pulsejet==t.pulsejet&&this.rarity==t.rarity}Verify(){this.oiltank&&(this.stats.cooling=0),this.PulseJetCheck()}PulseJetCheck(){this.pulsejet?(this.stats.cooling=0,this.overspeed=100,this.altitude=3,this.torque=0):this.rumble=0}}const R=JSON.parse('{"l":[{"name":"Custom","engines":[{"name":"Bentley BR.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Renault V8 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":7,"compression":4,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.4,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Early-WWI","engines":[{"name":"Aeromarine K-6 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.36,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 80hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.27,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 6 cylinder 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Argus As II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":10.353,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.8,"compression":4.85,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Benz Bz.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.4,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 7Z 95hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.88,"compression":4.3,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9Bf 140hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.46,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 14 Double Lambda 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 70hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.75,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Omega 50hp","engine_type":0,"type":2,"era_sel":0,"displacement":7.7,"compression":4,"cyl_per_row":7,"rows":1,"RPM_boost":1.49,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome monosoupape 9B 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9C 90hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.89,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"RAF 1a 90hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.88,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.9,"material_fudge":1.3,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Late-WWI","engines":[{"name":"Bentley BR.2 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 11EB 200hp","engine_type":0,"type":2,"era_sel":1,"displacement":21.49,"compression":5.1,"cyl_per_row":11,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 16X 420hp","engine_type":0,"type":0,"era_sel":1,"displacement":32.53333333,"compression":5,"cyl_per_row":4,"rows":4,"RPM_boost":0.87,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8F 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.98,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIav 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'18","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle III 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle VIII 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 110hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Dyak 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.800000002,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.III 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.6,"compression":5,"cyl_per_row":11,"rows":1,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Mid-WWI","engines":[{"name":"Argus As III 190hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.9,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Beardmore 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.635,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bz.IV 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.6,"compression":4.9,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9B 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Cosmos Mercury","engine_type":0,"type":1,"era_sel":1,"displacement":19.6,"compression":5.3,"cyl_per_row":7,"rows":2,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss K-12 375hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.33,"material_fudge":0.8,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss OXX-6","engine_type":0,"type":0,"era_sel":1,"displacement":9.3,"compression":4.92,"cyl_per_row":2,"rows":4,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Fiat A.12 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9B Monosoupape 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9N Monosoupape 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":5.1,"cyl_per_row":9,"rows":1,"RPM_boost":1.05,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Aa 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Ab 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8B 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Bc 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Ja 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Jb 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Liberty L-12 400hp","engine_type":0,"type":0,"era_sel":2,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.64,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Lorraine 12Da 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":24.4,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIa 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIaü 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IVa 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Falcon III 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 80hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Arab 208hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.76,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Maori II 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":12.27,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.3,"material_fudge":1.7,"quality_fudge":0.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.II 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Pre-WWI","engines":[{"name":"Mercedes E4F 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Coming Storm","engines":[{"name":"Allison V-1710-85 1200hp","engine_type":0,"type":0,"era_sel":3,"displacement":28,"compression":6.65,"cyl_per_row":2,"rows":6,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bristol Pegasus XVIII 835hp","engine_type":0,"type":1,"era_sel":2,"displacement":28.7,"compression":6.25,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1.2,"quality_fudge":0.8,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Daimler-Benz 601ARJ 1775hp","engine_type":0,"type":0,"era_sel":3,"displacement":33.93,"compression":6.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.84,"material_fudge":0.6,"quality_fudge":0.7,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,true,false]}]},{"name":"Roaring 20s","engines":[{"name":"Argus As 5 1500hp","engine_type":0,"type":0,"era_sel":2,"displacement":94.1,"compression":5.6,"cyl_per_row":6,"rows":4,"RPM_boost":0.638,"material_fudge":0.4,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bréguet Quadrimoteur Type B H-32 970hp","engine_type":0,"type":0,"era_sel":2,"displacement":48.64,"compression":5,"cyl_per_row":4,"rows":8,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'20","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion XI 580hp","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":6,"cyl_per_row":4,"rows":3,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"WWII","engines":[{"name":"Klimov M-105PF 1230hp","engine_type":0,"type":0,"era_sel":3,"displacement":35.101,"compression":7,"cyl_per_row":2,"rows":6,"RPM_boost":0.55,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls Royce Merlin 46 930hp","engine_type":0,"type":0,"era_sel":3,"displacement":27,"compression":5.55,"cyl_per_row":2,"rows":6,"RPM_boost":0.98,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,true,true,false]}]},{"name":"ACDQ","engines":[{"name":"2A-Series 4-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":16,"compression":4.5,"cyl_per_row":1,"rows":2,"RPM_boost":0.5,"material_fudge":0.8,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"F-Series 6-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":17,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.07,"material_fudge":0.7,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"G-Series 9-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":16,"compression":4.7,"cyl_per_row":9,"rows":1,"RPM_boost":1.04,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hartmann H.IIc Straight-6 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":12,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hornet R-3 Boxer 6-Cylinder","engine_type":0,"type":0,"era_sel":1,"displacement":10,"compression":5,"cyl_per_row":2,"rows":3,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Maclean-King Tiger MK.1 V-12 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":17,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ogre-Z Beta V-6","engine_type":0,"type":0,"era_sel":0,"displacement":11,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Pulsejet PV-12 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":12,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-20 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":20,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-8 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":8,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Seguin Σ110 Sigma 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":1,"displacement":14,"compression":4.5,"cyl_per_row":7,"rows":1,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"SuperPegasus 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":13.5,"compression":5,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"TurboGoblin 8-Cylinder Semi-Radial","engine_type":0,"type":4,"era_sel":0,"displacement":13,"compression":5.5,"cyl_per_row":8,"rows":1,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Himmilgard Pulsejet","engines":[{"name":"Pulsejet PV-5 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":5,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-6 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":6,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-7 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":7,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-8 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":8,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-9 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":9,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-10 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":10,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-11 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":11,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-12 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":12,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-13 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":13,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-14 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":14,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-15 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":15,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1}]},{"name":"Himmilgard Liquid Radial","engines":[{"name":"Einsort MM 140hp","engine_type":0,"type":5,"era_sel":1,"displacement":14.72,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Einsort MR 150hp","engine_type":0,"type":5,"era_sel":1,"displacement":15.46,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Gernsback Motor 0005","engine_type":0,"type":5,"era_sel":1,"displacement":12,"compression":6,"cyl_per_row":5,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Liquid Cooled","engines":[{"name":"Meier Bärenjunge 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.5,"compression":5.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.86,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F1166 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 Über 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2000 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Brandt Krieger I 370hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Brandt Kurier XVI 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Fleischmann F10 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fleischmann F10ü 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.75,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fokker Fungizidherstellung Typ 247 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.3,"compression":4.8,"cyl_per_row":1,"rows":6,"RPM_boost":0.85,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Ochs 2 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.84,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Windhund 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Nationales Motorbüro Arbeiter XVII 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,true],"rarity":2},{"name":"Nationales Motorbüro D-1140 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.4,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760tgl 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.4,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-840 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.4,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.05,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro Kurier XXI 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XII 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"SAM Kurier XX 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter I 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.15,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter III 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter V 350hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.75,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Schrankhut RD.300V 230hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":6.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.51,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Wollsteinkraft Verteidiger C 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Wollsteinkraft Verteidiger H 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Wollsteinkraft Wagehals C 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F4398 490hp","engine_type":0,"type":0,"era_sel":1,"displacement":44.3,"compression":4.7,"cyl_per_row":3,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Patriot 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Turbolader-Patriot 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"Meier Bär 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Meier Eisbär 500hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XIII 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":1,"min_IAF":10,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter IV 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":2},{"name":"Sonnenmotor EGH3 220hp","engine_type":0,"type":0,"era_sel":0,"displacement":20,"compression":5,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":50,"upgrades":[false,false,false,true],"rarity":3},{"name":"Wollsteinkraft Wagehals T 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Kurier L 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.99,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Bertha F2080 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.4,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2080 Über 270hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.8,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Contrarotary","engines":[{"name":"Nationales Motorbüro R-1860 160hp","engine_type":0,"type":3,"era_sel":1,"displacement":18.6,"compression":6,"cyl_per_row":11,"rows":1,"RPM_boost":0.65,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro R-1190 110hp","engine_type":0,"type":3,"era_sel":1,"displacement":11.9,"compression":6,"cyl_per_row":9,"rows":1,"RPM_boost":0.67,"material_fudge":1.2,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Air Cooled","engines":[{"name":"Braun UL 90hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun ULK 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.2,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs X 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.1,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun UX 150hp","engine_type":0,"type":1,"era_sel":1,"displacement":13.2,"compression":4.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.23,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Scholz Luchs III 30hp","engine_type":0,"type":1,"era_sel":1,"displacement":3.1,"compression":4.5,"cyl_per_row":3,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs VI 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Breitbusch Libelle \'320hp\'","engine_type":0,"type":1,"era_sel":1,"displacement":22.78,"compression":4.42,"cyl_per_row":9,"rows":1,"RPM_boost":1.31,"material_fudge":1.1,"quality_fudge":0.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Rosevear Ankou B 180hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.9,"compression":5.17,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":1.4,"quality_fudge":0.9,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Semi-Radial","engines":[{"name":"SLW Sigvird 180hp","engine_type":0,"type":4,"era_sel":1,"displacement":11,"compression":6,"cyl_per_row":4,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Rotary","engines":[{"name":"Modded Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Robur Herausforderer 180hp","engine_type":0,"type":2,"era_sel":1,"displacement":18,"compression":5.5,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":40,"upgrades":[false,false,true,true],"rarity":3},{"name":"Rhona Motorbau Z11 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z11tgl 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber B.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber G.IX 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber O.VII 50hp","engine_type":0,"type":2,"era_sel":1,"displacement":8,"compression":4.85,"cyl_per_row":7,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber L.VII 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber TG.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber T.IX 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.3 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Schreiber L.XIV 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1}]}]}');class x{constructor(t){this.constant=!1,this.name=t,this.list=[];const e=window.localStorage.getItem("engines."+this.name);null!=e&&this.fromJSON(JSON.parse(e));const s=window.localStorage.getItem("engines_names");let i=[];s&&(i=JSON.parse(s));let a=!1;for(const e of i)if(e==t){a=!0;break}a||i.push(t),window.localStorage.setItem("engines_names",JSON.stringify(i))}toJSON(){const t=[];for(const e of this.list)t.push(e.toJSON());return{name:this.name,engines:t}}fromJSON(t,e=!1){t.name&&(this.name=t.name),e&&(this.list=[]);for(const s of t.engines)try{this.push(new G(s),e)}catch(t){console.error(t)}}deserializeEngine(t){if(this.constant)throw"Engine List is Constant";const e=new G;return e.deserialize(t),this.push(e)}push(t,e=!1){if(this.constant)throw"Engine List is Constant";if(e)this.remove(t);else for(let e=0;e(""+t.name).localeCompare(e.name))),window.localStorage.setItem("engines."+this.name,JSON.stringify(this.toJSON())),this.find(t)}get(t){return t<0||t>=this.length?new G:this.list[t]}get_name(t){const e=this.find_name(t);return this.get(e)}get_stats(t){return t<0||t>=this.length?new F:this.list[t].PartStats()}get_stats_name(t){const e=this.find_name(t);return this.get_stats(e)}find(t){for(let e=0;e=0&&this.list.splice(e,1),window.localStorage.setItem("engines."+this.name,JSON.stringify(this.toJSON()))}remove_name(t){if(this.constant)throw"Engine List is Constant";const e=this.find_name(t);e>=0&&this.list.splice(e,1),window.localStorage.setItem("engines."+this.name,JSON.stringify(this.toJSON()))}get length(){return this.list.length}SetConstant(){this.constant=!0}}const I=new Map([["Custom",new x("Custom")]]);function T(){return I}function v(t){const e=T();for(const s of e.keys())if("Custom"!=s&&e.get(s).find_name(t)>=0)return s;return e.get("Custom").find_name(t)>=0?"Custom":""}var N,D,O,k,L;function W(t){return t==N.ORNITHOPTER_BASIC||t==N.ORNITHOPTER_FLUTTER||t==N.ORNITHOPTER_BUZZER}!function(t){t[t.AIRPLANE=0]="AIRPLANE",t[t.HELICOPTER=1]="HELICOPTER",t[t.AUTOGYRO=2]="AUTOGYRO",t[t.ORNITHOPTER_BASIC=3]="ORNITHOPTER_BASIC",t[t.ORNITHOPTER_FLUTTER=4]="ORNITHOPTER_FLUTTER",t[t.ORNITHOPTER_BUZZER=5]="ORNITHOPTER_BUZZER"}(N||(N={}));class H{FormatEquipment(t,e,s){return Math.abs(s)>.5?t.push({source:h(e),charge:s.toString()}):s>0&&s<1e-6&&t.push({source:h(e),charge:"-"}),t}}function q(t,e){for(let s=0;s0&&t.push({name:s.name,stats:s.stats.toJSON(),qty:s.qty});return window.localStorage.setItem("CustomParts",JSON.stringify(e)),{part_list:t}}fromJSON(t,e){for(const t of this.custom_parts)t.qty=0;for(const e of t.part_list){const t=this.custom_parts.findIndex((t=>t.name==e.name));-1==t?this.custom_parts.push({name:e.name,stats:new u(e.stats),qty:e.qty}):this.custom_parts[t].qty=e.qty}}serialize(t){const e=[];for(const t of this.custom_parts)t.qty>0&&e.push({name:t.name,stats:t.stats,qty:t.qty});t.PushNum(e.length);for(const s of e)t.PushString(s.name),s.stats.serialize(t),t.PushNum(s.qty)}deserialize(t){for(const t of this.custom_parts)t.qty=0;const e=t.GetNum();for(let i=0;it.name==e));-1==s?(s=this.custom_parts.length,this.custom_parts.push({name:e,stats:i,qty:a})):this.custom_parts[s].qty=a}}IsDefault(){for(const t of this.custom_parts)if(t.qty>0)return!1;return!0}ClearAll(){for(const t of this.custom_parts)t.qty=0}AddPart(t,e){var s=0;if(s+=Math.abs(e.drag),s+=Math.abs(e.mass),s+=Math.abs(e.wetmass),s+=Math.abs(e.bomb_mass),s+=Math.abs(e.cost),s+=Math.abs(e.upkeep),s+=Math.abs(e.liftbleed),s+=Math.abs(e.wingarea),s+=Math.abs(e.control),s+=Math.abs(e.pitchstab),s+=Math.abs(e.latstab),s+=Math.abs(e.maxstrain),s+=Math.abs(e.structure),s+=Math.abs(e.toughness),s+=Math.abs(e.power),s+=Math.abs(e.fuelconsumption),s+=Math.abs(e.fuel),s+=Math.abs(e.charge),s+=Math.abs(e.crashsafety),s+=Math.abs(e.visibility),s+=Math.abs(e.escape),s+=Math.abs(e.reliability),0==(s+=Math.abs(e.warnings.length)))return;const i=this.custom_parts.findIndex((e=>e.name==t));-1!=i?this.custom_parts[i].stats=e:this.custom_parts.push({name:t,stats:e,qty:0}),this.custom_parts.sort(((t,e)=>t.name.localeCompare(e.name))),this.CalculateStats()}RemovePart(t){const e=this.custom_parts.findIndex((e=>e.name==t));-1!=e&&this.custom_parts.splice(e,1),this.CalculateStats()}GetParts(){return this.custom_parts}SetUsedPart(t,e){this.custom_parts[t].qty=e,this.CalculateStats()}PartStats(){var t=new u;for(const e of this.custom_parts)if(e.qty>0){let s=e.stats.Clone();s=s.Multiply(e.qty),t=t.Add(s)}return t}GetElectrics(){var t=[];for(const e of this.custom_parts)e.qty>0&&(t=this.FormatEquipment(t,e.name,e.stats.charge));return{storage:0,equipment:t}}SetCalculateStats(t){this.CalculateStats=t}}class z extends H{constructor(t){super(),this.selected=0,this.vals=[];for(const e of t.options){const t={name:e.name,maxbomb:e.maxbomb,cant_lift:e.cant_lift,stats:new u(e)};this.vals.push(t)}}toJSON(){return{selected:this.selected}}fromJSON(t,e){this.selected=t.selected,e<10.35&&this.selected>2&&this.selected++}serialize(t){t.PushNum(this.selected)}deserialize(t){this.selected=t.GetNum()}GetSelected(){return this.selected}GetSelectedText(){return this.vals[this.selected].name}SetSelected(t){this.selected=t,this.CalculateStats()}GetEraOptions(){return this.vals}GetLiftBleed(){return this.vals[this.selected].stats.liftbleed}GetMaxBomb(){return this.vals[this.selected].maxbomb}GetCantLift(){return this.vals[this.selected].cant_lift}PartStats(){var t=new u;return t.Add(this.vals[this.selected].stats)}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class J extends H{constructor(t,e,s,i){super(),this.stats=new u,this.types=t,this.upgrades=e,this.safety=s,this.gunsights=i,this.selected_type=0,this.selected_upgrades=[...Array(this.upgrades.length).fill(!1)],this.selected_safety=[...Array(this.safety.length).fill(!1)],this.selected_gunsights=[...Array(this.gunsights.length).fill(!1)],this.total_stress=[0,0],this.total_escape=0,this.total_visibility=0,this.seat_index=0,this.bombsight=0,this.is_armed=!1}toJSON(){return{type:this.selected_type,upgrades:this.selected_upgrades,safety:this.selected_safety,sights:this.selected_gunsights,bombsight:this.bombsight}}fromJSON(t,e){this.selected_type=t.type,this.selected_upgrades=b(t.upgrades,this.selected_upgrades.length),this.selected_safety=b(t.safety,this.selected_safety.length),this.selected_gunsights=b(t.sights,this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),e>10.35&&(this.bombsight=t.bombsight)}serialize(t){t.PushNum(this.selected_type),t.PushBoolArr(this.selected_upgrades),t.PushBoolArr(this.selected_safety),t.PushBoolArr(this.selected_gunsights),t.PushNum(this.bombsight)}deserialize(t){this.selected_type=t.GetNum(),this.selected_upgrades=t.GetBoolArr(this.selected_upgrades.length),this.selected_safety=t.GetBoolArr(this.selected_safety.length),this.selected_gunsights=t.GetBoolArr(this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),t.version>10.35&&(this.bombsight=t.GetNum())}GetTypeList(){return this.types}GetUpgradeList(){return this.upgrades}GetSafetyList(){return this.safety}GetGunsightList(){return this.gunsights}GetType(){return this.selected_type}SetType(t){if(t>=this.types.length)throw"Selected type is not in range of actual types.";this.selected_type=t,this.CalculateStats()}GetSelectedUpgrades(){return this.selected_upgrades}SetUpgrade(t,e){if(t>=this.upgrades.length)throw"Selected type is not in range of actual upgrades.";this.selected_upgrades[t]=e,this.CalculateStats()}GetSelectedSafety(){return this.selected_safety}CanSafety(){const t=Array(this.safety.length).fill(!0);return t[5]=!this.types[this.selected_type].exposed,t}SetSafety(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual safties.";this.selected_safety[t]=e,this.CalculateStats()}GetSelectedGunsights(){return this.selected_gunsights}SetGunsight(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual gunsights.";this.selected_gunsights[t]=e,this.CalculateStats()}GetVisibility(){return this.types[this.selected_type].stats.visibility<-10?-1/0:this.total_visibility}GetFlightStress(){return this.total_stress}GetEscape(){return this.total_escape}GetCrash(){return this.total_crash}GetAttack(){var t=0;for(let e=0;e0&&(t=t-t%3+1),this.bombsight=t,this.CalculateStats()}SetHasRotary(t){this.has_rotary=t}IsElectrics(){return 0!=this.stats.charge}IsCopilot(){return this.selected_upgrades[0]}SetArmed(t){this.is_armed=t}GetName(){return this.IsPrimary()?"Crew Pilot":this.bombsight>0?"Crew Bombadier":this.IsCopilot()?"Crew Co-Pilot":this.is_armed?"Crew Gunner":"Crew Aircrew"}PartStats(){let t=new u;t.reqsections=1,t=t.Add(this.types[this.selected_type].stats);for(let e=0;e0&&(t.cost+=Math.floor(2.000001+(this.bombsight-4)/3),t.warnings.push({source:h("Bombsight"),warning:h("Bombsight Warning 1")+this.bombsight.toString()+h("Bombsight Warning 2"),color:c.WHITE}),this.IsCopilot()&&t.warnings.push({source:h("Bombadier Controls"),warning:h("Bombadier Controls Warning"),color:c.WHITE})),this.stats=t.Clone(),this.selected_upgrades[0]?(t.flightstress=this.upgrades[0].stats.flightstress,this.stats.flightstress-=t.flightstress):t.flightstress=0,t}CrewUpdate(t,e,s,i,a,n){this.total_escape=this.stats.escape+t;let r=this.stats.flightstress,o=this.stats.flightstress;(this.IsPrimary()||this.selected_upgrades[0])&&(r+=e,o+=e-2*i),r=Math.max(0,r),o=Math.max(0,o),r+=s,o+=s,this.IsOpen()&&this.has_rotary&&(r+=1,o+=1),r=Math.max(0,r),o=Math.max(0,o),this.total_stress=[r,o],this.total_visibility=this.stats.visibility+a,this.total_crash=this.stats.crashsafety+n}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){var t=[];for(let e=0;et;)this.positions.pop();var e=null;for(this.positions.length>0&&(e=JSON.stringify(this.positions[this.positions.length-1].toJSON()));this.positions.length0}GetConnected(){return this.connected}SetConnected(t){this.connected=t,this.CalculateStats()}PartStats(){const t=new u;return t.reqsections=2*Math.ceil((this.seats+2*this.beds)/5-1e-6),this.seats+this.beds>0&&this.connected&&(t.mass=1,t.warnings.push({source:h("Passengers Section Title"),warning:h("Passenger Connectivity Warning"),color:c.WHITE})),t.bomb_mass+=this.seats+this.beds,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),this.seats+this.beds>0&&t.warnings.push({source:h("Passengers Section Title"),warning:h("Passengers Count",this.seats,this.beds),color:c.WHITE}),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class Q extends H{constructor(t,e){super();const s=T();if(this.elist_idx="Custom",this.etype_stats=s.get(this.elist_idx).get_stats(0),this.etype_inputs=s.get(this.elist_idx).get(0),this.cooling_count=this.etype_stats.stats.cooling,this.radiator_index=-1,this.cooling_count>0&&(this.radiator_index=0),this.num_radiators=0,this.mount_list=t,this.mount_sel=0,this.intake_fan=!1,this.use_pp=!1,this.torque_to_struct=!1,this.cowl_list=e,this.cowl_sel=0,this.use_ds=!1,this.outboard_prop=!1,this.gp_count=0,this.gpr_count=0,this.total_reliability=0,this.is_generator=!1,this.has_alternator=!1,s.get(this.elist_idx).length<=0)throw"No Engine Stats Found. Should be at least one."}toJSON(){return{selected_stats:this.etype_stats.toJSON(),selected_inputs:this.etype_inputs.toJSON(),cooling_count:this.cooling_count,radiator_index:this.radiator_index,selected_mount:this.mount_sel,use_pushpull:this.use_pp,pp_torque_to_struct:this.torque_to_struct,use_driveshafts:this.use_ds,geared_propeller_ratio:this.gp_count,geared_propeller_reliability:this.gpr_count,cowl_sel:this.cowl_sel,is_generator:this.is_generator,has_alternator:this.has_alternator,intake_fan:this.intake_fan,outboard_prop:this.outboard_prop}}oldJSON(t,e){const s=t.selected_stats;if(this.etype_stats.fromJSON(s,e),this.etype_inputs=new G,this.etype_stats.pulsejet&&s.input_pj){this.etype_inputs=new G,this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=y.PULSEJET;const t=s.input_pj;this.etype_inputs.type=t.type,this.etype_inputs.power=t.power,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.quality_cost=t.quality_cost,this.etype_inputs.quality_rely=t.quality_rely,this.etype_inputs.starter=t.starter}else if(s.input_eb){this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=y.PROPELLER;const t=s.input_eb;this.etype_inputs.displacement=t.displacement,this.etype_inputs.compression=t.compression,this.etype_inputs.type=t.type,this.etype_inputs.cyl_per_row=t.cyl_per_row,this.etype_inputs.rows=t.rows,this.etype_inputs.RPM_boost=t.RPM_boost,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.material_fudge=t.material_fudge,this.etype_inputs.quality_fudge=t.quality_fudge,this.etype_inputs.upgrades=t.upgrades,6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.compressor_type,this.etype_inputs.compressor_count=t.compressor_count,this.etype_inputs.min_IdealAlt=t.min_IAF)}else this.etype_stats.altitude=10*this.etype_stats.altitude-1;return this.etype_inputs}fromJSON(t,e){const s=T();let i="";if(e>10.55){this.etype_stats.fromJSON(t.selected_stats,e);const a=new G(t.selected_inputs);i=v(this.etype_stats.name),""==i&&(i="Custom","Default"!=a.name&&s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name)}else{const a=this.oldJSON(t,e);"Default"!=a.name&&(i=v(this.etype_stats.name),""==i&&(i="Custom",s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name))}this.elist_idx=i,this.cooling_count=t.cooling_count,this.radiator_index=t.radiator_index,this.mount_sel=t.selected_mount,this.use_pp=t.use_pushpull,this.torque_to_struct=t.pp_torque_to_struct,this.use_ds=t.use_driveshafts,this.gp_count=t.geared_propeller_ratio,this.gpr_count=t.geared_propeller_reliability,this.cowl_sel=t.cowl_sel,this.is_generator=t.is_generator,this.has_alternator=t.has_alternator,this.intake_fan=t.intake_fan,this.outboard_prop=e>=12.15&&t.outboard_prop}serialize(t){this.etype_stats.serialize(t),this.etype_inputs.serialize(t),t.PushNum(this.cooling_count),t.PushNum(this.radiator_index),t.PushNum(this.mount_sel),t.PushBool(this.use_pp),t.PushBool(this.torque_to_struct),t.PushBool(this.use_ds),t.PushNum(this.gp_count),t.PushNum(this.gpr_count),t.PushNum(this.cowl_sel),t.PushBool(this.is_generator),t.PushBool(this.has_alternator),t.PushBool(this.intake_fan),t.PushBool(this.outboard_prop)}oldDeserialize(t){return this.etype_stats.name=t.GetString(),this.etype_stats.overspeed=t.GetNum(),this.etype_stats.altitude=t.GetNum(),this.etype_stats.torque=t.GetNum(),this.etype_stats.rumble=t.GetNum(),this.etype_stats.oiltank=t.GetBool(),this.etype_stats.pulsejet=t.GetBool(),this.etype_inputs=new G,t.version>10.45?(this.etype_inputs.name=this.etype_stats.name,this.etype_stats.pulsejet?(this.etype_inputs.engine_type=y.PULSEJET,this.etype_inputs.power=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.quality_cost=t.GetNum(),this.etype_inputs.quality_rely=t.GetNum(),this.etype_inputs.starter=t.GetBool()):(this.etype_inputs.displacement=t.GetNum(),this.etype_inputs.compression=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.cyl_per_row=t.GetNum(),this.etype_inputs.rows=t.GetNum(),this.etype_inputs.RPM_boost=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.material_fudge=t.GetNum(),this.etype_inputs.quality_fudge=t.GetNum(),this.etype_inputs.upgrades=t.GetBoolArr(0),6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.GetNum(),this.etype_inputs.compressor_count=t.GetNum(),this.etype_inputs.min_IdealAlt=t.GetNum()))):this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_stats.stats.deserialize(t),this.etype_inputs}deserialize(t){const e=T();var s="";if(t.version>10.55){this.etype_stats.deserialize(t);const i=new G;i.deserialize(t),""==(s=v(this.etype_stats.name))&&(s="Custom","Default"!=i.name&&e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name)}else{const i=this.oldDeserialize(t);"Default"!=i.name&&(""==(s=v(this.etype_stats.name))&&(s="Custom",e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name))}this.cooling_count=t.GetNum(),this.radiator_index=t.GetNum(),this.mount_sel=t.GetNum(),this.use_pp=t.GetBool(),this.torque_to_struct=t.GetBool(),this.use_ds=t.GetBool(),this.gp_count=t.GetNum(),this.gpr_count=t.GetNum(),this.cowl_sel=t.GetNum(),this.is_generator=t.GetBool(),this.has_alternator=t.GetBool(),this.intake_fan=t.GetBool(),t.version>=12.15?this.outboard_prop=t.GetBool():this.outboard_prop=!1,this.elist_idx=s}GetMinAltitude(){return this.etype_inputs.min_IdealAlt}GetMaxAltitude(){return this.GetMinAltitude()+this.etype_stats.altitude}GetMinIAF(){return Math.floor(1e-6+this.GetMinAltitude()/10)}GetMaxIAF(){return Math.floor(1e-6+this.GetMaxAltitude()/10)}CanSelectIndex(){const t=T().get(this.elist_idx),e=[...Array(t.length).fill(!0)];if(this.is_internal)for(let s=0;s0}WarnCoolingReliability(){return this.cooling_count=t&&(this.radiator_index=t-1),this.radiator_index<0&&t>0&&(this.radiator_index=0)}GetNumRadiators(){return this.num_radiators}SetRadiator(t){this.radiator_index=t,this.CalculateStats()}GetRadiator(){return this.radiator_index}CanIntakeFan(){return this.IsAirCooled()}SetIntakeFan(t){this.intake_fan=t,this.CalculateStats()}GetIntakeFan(){return this.intake_fan}CanOutboardProp(){return this.use_ds&&(this.IsTractor()||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}GetOutboardProp(){return this.outboard_prop}SetOutboardProp(t){t&&this.use_ds?this.outboard_prop=!0:this.outboard_prop=!1,this.CalculateStats()}SetSelectedList(t){t!=this.elist_idx&&(this.elist_idx=t,this.SetSelectedIndex(0))}GetSelectedList(){return this.elist_idx}GetListOfEngines(){return T().get(this.elist_idx)}RequiresExtendedDriveshafts(){return!this.is_internal&&this.mount_list[this.mount_sel].reqED}SetTailMods(t,e,s){!this.mount_list[this.mount_sel].reqTail||t||e||this.GetGenerator()||(this.use_ds=!0),!this.mount_list[this.mount_sel].reqED||this.GetGenerator()||s&&(t||e)||(this.use_ds=!0)}CanMountIndex(){var t=[...Array(this.mount_list.length).fill(!0)];if(this.is_internal)for(let e=0;e=this.mount_list.length)throw"Index outside of mount_list range.";this.mount_sel=t,this.mount_list[this.mount_sel].reqED?this.SetUseExtendedDriveshaft(!0):this.CalculateStats()}GetMountIndex(){return this.GetIsPulsejet()?-1:this.mount_sel}CanUsePushPull(){return!(this.is_generator||this.GetIsJet()||this.is_internal||this.mount_list[this.mount_sel].helicopter)}SetUsePushPull(t){this.use_pp=t,t?(this.cooling_count*=2,"fuselage"==this.mount_list[this.mount_sel].mount_type&&(this.mount_sel=8)):(this.cooling_count=Math.floor(1e-6+this.cooling_count/2),"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(this.mount_sel=0)),this.CalculateStats()}GetUsePushPull(){return this.use_pp}GetMountList(){return this.mount_list}CanUseExtendedDriveshaft(){return!(0==this.GetNumPropellers()||this.is_internal||this.GetGenerator()||this.mount_list[this.mount_sel].helicopter)}SetUseExtendedDriveshaft(t){this.GetGenerator()||this.is_internal?this.use_ds=!1:this.use_ds=t,this.CalculateStats()}GetUseExtendedDriveshaft(){return this.use_ds}CanUseGears(){return!(0==this.GetNumPropellers()||this.GetGenerator())}SetGearCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gp_count=t,this.SetGearReliability(this.gpr_count)}GetGearCount(){return this.gp_count}SetGearReliability(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gpr_count=Math.min(t,this.gp_count),this.CalculateStats()}GetGearReliability(){return this.gpr_count}SetTorqueToStruct(t){this.torque_to_struct=t,this.use_pp||(this.torque_to_struct=!1),this.CalculateStats()}GetTorqueToStruct(){return this.torque_to_struct}CanTorqueToStruct(){return this.use_pp&&this.etype_stats.torque>0&&"pod"!=this.mount_list[this.mount_sel].mount_type}UpdateReliability(t){this.total_reliability=this.etype_stats.stats.reliability,this.total_reliability-=this.gp_count-this.gpr_count,this.total_reliability+=this.cowl_list[this.cowl_sel].stats.reliability,this.NeedCooling()&&(this.total_reliability-=this.GetMaxCooling()-this.cooling_count),this.GetIntakeFan()&&(this.total_reliability+=6),this.total_reliability+=t}GetReliability(){return this.use_pp?this.outboard_prop?this.total_reliability.toString()+"/"+(this.total_reliability-2).toString():this.total_reliability.toString()+"/"+this.total_reliability.toString():this.outboard_prop?(this.total_reliability-2).toString():this.total_reliability.toString()}GetOverspeed(){return this.is_generator?1e3:this.etype_stats.overspeed+Math.floor(1e-6+this.gp_count*this.etype_stats.overspeed/2)}GetIsPulsejet(){return this.etype_stats.pulsejet}GetIsJet(){return this.GetIsPulsejet()||this.GetIsTurbine()&&!this.GetIsTurboprop()}PulseJetCheck(){this.GetIsPulsejet()&&(this.use_pp=!1,this.use_ds=!1,this.gp_count=0,this.gpr_count=0,this.cooling_count=0,this.has_alternator=!1,this.is_generator=!1,this.cowl_sel=0,this.radiator_index=-1)}GetIsTurbine(){return this.etype_inputs.engine_type==y.TURBOMACHINERY}GetIsTurboprop(){return this.etype_inputs.engine_type==y.TURBOMACHINERY&&3==this.etype_inputs.type}TurbineCheck(){this.GetIsTurbine()&&(0==this.GetNumPropellers()&&(this.use_ds=!1,this.gp_count=0,this.gpr_count=0),this.cooling_count=0,this.cowl_sel=0,this.radiator_index=-1)}GetNumPropellers(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.GetGenerator())||this.GetIsTurboprop()||this.is_internal?this.use_pp?2:1:0}GetIsTractorNacelle(){return this.GetNumPropellers()>0&&!this.GetUsePushPull()&&.8==this.mount_list[this.mount_sel].powerfactor&&!this.is_internal}IsLiquidCooled(){return this.NeedCooling()}IsRotary(){return this.etype_stats.oiltank}IsContraRotary(){return!this.GetIsPulsejet()&&!this.GetIsTurbine()&&""!=this.elist_idx&&3==this.etype_inputs.type}IsAirCooled(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.IsLiquidCooled()||this.IsRotary())}GetCowlList(){return this.cowl_list}GetCowl(){return this.cowl_sel}GetCowlEnabled(){const t=[];for(const e of this.cowl_list)this.GetIsPulsejet()||this.GetIsTurbine()?t.push(e.air&&e.rotary&&e.liquid):this.IsLiquidCooled()?t.push(e.liquid):this.IsRotary()?t.push(e.rotary):t.push(e.air);return t}GetHasOilTank(){return this.etype_stats.oiltank}GetHasOilCooler(){return this.etype_stats.stats.cooling>0}GetHasOilPan(){return this.IsAirCooled()}VerifyCowl(t){const e=this.GetCowlEnabled();e[t]&&(this.cowl_sel=t),e[this.cowl_sel]||(this.cowl_sel=0)}SetCowl(t){this.VerifyCowl(t),this.CalculateStats()}GetGeneratorEnabled(){return!(this.GetIsPulsejet()||this.use_pp||this.GetIsElectric())}GetGenerator(){return this.is_generator}SetGenerator(t){this.GetGeneratorEnabled()?this.is_generator=t:this.is_generator=!1,this.is_generator&&(this.gp_count=0,this.gpr_count=0,this.use_ds=!1,this.use_pp=!1),this.CalculateStats()}GetIsElectric(){return this.etype_inputs.engine_type==y.ELECTRIC}GetAlternatorEnabled(){return!(this.GetIsPulsejet()||this.is_generator||this.GetIsElectric())}GetAlternator(){return this.has_alternator}SetAlternator(t){this.GetAlternatorEnabled()?this.has_alternator=t:this.has_alternator=!1,this.CalculateStats()}GetRumble(){return this.etype_stats.rumble}IsTractor(){return!(this.is_internal||this.GetGenerator()||"Tractor"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetTractorSpinner(){return{has:this.IsTractor()&&!(this.outboard_prop&&!this.use_pp),spinner:this.GetSpinner()}}IsPusher(){return!(this.is_internal||this.GetGenerator()||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetPusherSpinner(){return{has:this.IsPusher()&&!this.outboard_prop,spinner:this.GetSpinner()}}GetSpinner(){if(this.gp_count>0&&!this.GetGenerator()){if(this.use_ds&&("Center-Mounted Tractor"==this.mount_list[this.mount_sel].name||"Center-Mounted Pusher"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name))return[!0,!0];if(!this.etype_stats.oiltank)return[!0,!1]}return[!1,!1]}IsElectrics(){return this.has_alternator||this.GetGenerator()}GetEngineHeight(){return this.GetGenerator()?5:"Pod"==this.mount_list[this.mount_sel].name||this.etype_stats.pulsejet||this.is_internal||this.outboard_prop?2:"Nacelle (Offset)"==this.mount_list[this.mount_sel].name?1:"Nacelle (Inside)"==this.mount_list[this.mount_sel].name||"Channel Tractor"==this.mount_list[this.mount_sel].name||"Wing Pod"==this.mount_list[this.mount_sel].name?0:-1}IsTractorRotary(){return!this.GetGenerator()&&this.IsRotary()&&("Tractor"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}IsDiesel(){return this.etype_inputs.upgrades[3]}SetCalculateStats(t){this.CalculateStats=t}SetInternal(t){this.is_internal=t,t&&(this.use_ds=!1)}VerifyMount(){if(this.GetIsTurbine()&&!this.GetIsTurboprop())for(;!this.mount_list[this.mount_sel].turbine;)this.mount_sel++;else if(this.GetIsPulsejet()){if("fuselage"==this.mount_list[this.mount_sel].mount_type)for(let t=0;t0&&t.era.push({name:"Propeller Gearing",era:"WWI"}),this.gpr_count>0&&t.era.push({name:"Reliable Gearing",era:"Roaring 20s"}),this.use_ds&&(t.mass+=1),t=t.Add(this.cowl_list[this.cowl_sel].stats),t.mass+=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].mpd),t.drag=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].ed),this.use_pp&&(t.power*=2,t.mass*=2,t.cooling*=2,t.fuelconsumption*=2,t.cost*=2,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.upkeep*=2,t.reqsections*=2,t.charge*=2,t.power=Math.floor(1e-6+this.mount_list[this.mount_sel].powerfactor*t.power)),"No Cowling"==this.cowl_list[this.cowl_sel].name||"Sealed Cowl"==this.cowl_list[this.cowl_sel].name||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name||(t.cost+=2),this.IsAirCooled()&&this.intake_fan?(t.mass+=3,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.cost+=4,t.era.push({name:"Air Cooling Fan",era:"WWII"})):this.intake_fan=!1,this.GetHasOilCooler()&&(t.drag+=Math.floor(t.power/15)),this.GetIsPulsejet()||(t=t.Add(this.mount_list[this.mount_sel].stats),t.maxstrain-=Math.floor(1e-6+this.mount_list[this.mount_sel].strainfactor*this.etype_stats.stats.mass),t.drag+=Math.floor(1e-6+this.mount_list[this.mount_sel].dragfactor*this.etype_stats.stats.mass)),this.is_generator?(t.charge=Math.floor(1e-6+2*t.power/10)+2,t.power=0,t.visibility=2):this.has_alternator&&(t.charge=Math.floor(1e-6+t.power/10)+1,t.mass+=1,t.cost+=2,this.use_pp&&"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(t.mass+=1,t.cost+=2)),this.outboard_prop&&(t.drag+=3,this.use_pp&&(t.escape+=2)),this.is_first_pulsejet&&(t.cost+=5),t.pitchspeed=0,t.reliability=0,t}GetElectrics(){return{storage:0,equipment:[]}}}class V extends H{constructor(t,e,s){super(),this.need_cool=0,this.idx_type=1,this.idx_mount=1,this.idx_coolant=0,this.metal_area=0,this.engine_count=0,this.type_list=t,this.mount_list=e,this.coolant_list=s,this.harden_cool=!1}toJSON(){return{type:this.idx_type,mount:this.idx_mount,coolant:this.idx_coolant,harden_cool:this.harden_cool}}fromJSON(t,e){this.idx_type=t.type,this.idx_mount=t.mount,this.idx_coolant=t.coolant,e>10.85&&(this.harden_cool=t.harden_cool)}serialize(t){t.PushNum(this.idx_type),t.PushNum(this.idx_mount),t.PushNum(this.idx_coolant),t.PushBool(this.harden_cool)}derserialize(t){this.idx_type=t.GetNum(),this.idx_mount=t.GetNum(),this.idx_coolant=t.GetNum(),t.version>10.85&&(this.harden_cool=t.GetBool())}GetTypeList(){return this.type_list}GetMountList(){return this.mount_list}GetCoolantList(){return this.coolant_list}CanType(){const t=[...Array(this.type_list.length).fill(!0)];for(let e=0;et;)this.engines.pop();var e=null;for(this.engines.length>0&&(e=JSON.stringify(this.engines[this.engines.length-1].toJSON()));this.engines.lengtht;)this.radiators.pop();for(;this.radiators.length0&&!this.NeedCooling()&&this.SetNumberOfRadiators(0),this.radiators.length}NeedCooling(){let t=!1;for(const e of this.engines)t=t||e.NeedCooling();return t}UpdateReliability(t){for(const e of this.engines){let s=new u;e.GetRadiator()=0&&(s=this.radiators[e.GetRadiator()].PartStats()),e.UpdateReliability(t.reliability+s.reliability)}}SetAsymmetry(t){this.is_asymmetric=t,this.CalculateStats()}GetAsymmetry(){return this.is_asymmetric}GetNumPropellers(){var t=0;for(const e of this.engines)t+=e.GetNumPropellers();return t}GetOverspeed(){let t=100;for(const e of this.engines)t=Math.min(t,e.GetOverspeed());return t}GetRumble(){var t=0;for(const e of this.engines)t+=e.GetRumble();return t}GetMaxRumble(){var t=0;for(const e of this.engines)t=Math.max(t,e.GetRumble());return t}GetTractorSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetTractorSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}GetPusherSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetPusherSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}IsElectrics(){for(const t of this.engines)if(t.IsElectrics())return!0;return!1}HaveParasol(t){for(const e of this.radiators)e.SetParasol(t)}SetMetalArea(t){for(const e of this.radiators)e.SetMetalArea(t)}SetTailMods(t,e,s){for(const i of this.engines)i.SetTailMods(t,e,s)}GetEngineHeight(){var t=2;for(const e of this.engines)t=Math.min(t,e.GetEngineHeight());return t}HasTractorRotary(){for(const t of this.engines)if(t.IsTractorRotary())return!0;return!1}SetInternal(t){for(const e of this.engines)e.SetInternal(t);if(t)for(const t of this.radiators)t.SetMetalArea(0),t.SetParasol(!1)}HasPulsejet(){for(const t of this.engines)if(t.GetIsPulsejet())return!0;return!1}HasTurbineNoProp(){for(const t of this.engines)if(t.GetIsTurbine()&&0==t.GetNumPropellers())return!0;return!1}HasDiesel(){for(const t of this.engines)if(t.IsDiesel())return!0;return!1}GetEngineTypes(){var t=[];for(const e of this.engines)e.GetNumPropellers()>0?t.push({type:C.PROPELLER,num:e.GetNumPropellers()}):e.GetIsPulsejet()?t.push({type:C.PULSEJET,num:0}):e.GetIsTurbine()&&t.push({type:C.TURBINE,num:e.GetCurrentStats().stats.pitchspeed});return t}GetIsFlammable(){for(const t of this.radiators)if(t.GetIsFlammable())return!0;return!1}PartStats(){var t=new u;const e=new Array(this.GetNumberOfRadiators()).fill(null).map((()=>({cool:0,count:0})));var s=0,i=100,a=!1,r=2;for(let n of this.engines){!a&&n.GetIsPulsejet()?(a=!0,n.SetFirstPulsejet(!0)):n.SetFirstPulsejet(!1);const o=n.PartStats();r=Math.min(r,o.visibility),t=t.Add(o),n.NeedCooling()&&(e[n.GetRadiator()].cool+=n.GetCooling(),e[n.GetRadiator()].count+=1),s+=n.GetCurrentStats().stats.cost,o.pitchspeed>0&&(i=Math.min(i,o.pitchspeed))}t.visibility=r,i<100&&(t.pitchspeed=i),t.upkeep=Math.floor(1e-6+Math.min(t.upkeep,s));let o=new u;const l=new Map;for(let t=0;t0?t.warnings.push({source:h("Rotary"),warning:h("Rotary Right Warning"),color:c.WHITE}):m<0&&t.warnings.push({source:h("Rotary"),warning:h("Rotary Left Warning"),color:c.WHITE}),t.reliability=0,t}SetCalculateStats(t){this.CalculateStats=t}GetHasTractorNacelles(){let t=0;for(const e of this.engines)e.GetIsTractorNacelle()&&t++;return t>1}GetElectrics(){let t={storage:0,equipment:[]};for(let e=0;e10.25&&(this.sel_skin=t.sel_skin),this.interal_bracing_count=this.CountInternalBracing()}serialize(t){t.PushNum(this.section_list.length);for(let e=0;e10.25&&(this.sel_skin=t.GetNum()),this.interal_bracing_count=this.CountInternalBracing()}DuplicateSection(t,e=1){const s=this.section_list[t];for(let i=0;ithis.CountSections()+this.tail_section_list.length)for(let t=this.section_list.length-1;t>=0;t--)if(this.section_list[t].internal_bracing){this.interal_bracing_count--,this.section_list.splice(t,1);break}e&&this.CalculateStats()}}SetRequiredSections(t){if(this.required_sections=t,this.required_sections>this.CountSections()&&(0==this.section_list.length&&this.section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),this.required_sections-this.CountSections()>0))for(let t=this.section_list.length-1;t>=0;t--)if(!this.section_list[t].internal_bracing)return void this.DuplicateSection(t,this.required_sections-this.CountSections())}SetRequiredTailSections(t){for(t>this.tail_section_list.length&&(0==this.tail_section_list.length&&this.tail_section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),t-this.tail_section_list.length>0&&this.DuplicateTailSection(this.tail_section_list.length-1,t-this.tail_section_list.length));t0&&!this.section_list[t].internal_bracing;t--);this.DeleteSection(t,!1)}this.CalculateStats()}CountSections(){return this.section_list.length-this.interal_bracing_count}GetNumFrames(){return this.CountSections()+this.tail_section_list.length}CountInternalBracing(){var t=0;for(const e of this.section_list)e.internal_bracing&&t++;return t}BaseType(){const t=[...Array(this.frame_list.length).fill(0)];for(const e of this.section_list)e.internal_bracing||t[e.frame]++;for(const e of this.tail_section_list)e.internal_bracing||t[e.frame]++;var e=0,s=0;for(let i=t.length-1;i>=0;i--)t[i]>s&&(s=t[i],e=i);return e}GetFrameList(){return this.frame_list}GetSkinList(){return this.skin_list}GetSectionList(){return this.section_list}SetFrame(t,e){this.section_list[t].frame=e,this.frame_list[e].geodesic||(this.section_list[t].geodesic=!1),this.CalculateStats()}SetGeodesic(t,e){this.frame_list[this.section_list[t].frame].geodesic&&(this.section_list[t].geodesic=e,this.CalculateStats())}SetMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].monocoque=e,this.CalculateStats())}SetLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].lifting_body=e,this.CalculateStats())}SetInternalBracing(t,e){e&&!this.section_list[t].internal_bracing&&this.PossibleInternalBracing(!0)&&this.CountSections()>this.required_sections?(this.section_list[t].internal_bracing=!0,this.section_list[t].monocoque=!1,this.section_list[t].lifting_body=!1,this.interal_bracing_count++,this.CalculateStats()):e||(this.section_list[t].internal_bracing=!1,this.interal_bracing_count--,this.CalculateStats())}PossibleInternalBracing(t=!1){var e=this.CountSections();return this.farman||(e+=this.tail_section_list.length),t&&(e-=1),this.interal_bracing_count+1<=e}PossibleGeodesic(t){return this.frame_list[this.section_list[t].frame].geodesic&&!this.section_list[t].monocoque}PossibleMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].lifting_body}PossibleLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].monocoque}PossibleTailGeodesic(t){return this.frame_list[this.tail_section_list[t].frame].geodesic&&!this.tail_section_list[t].monocoque}PossibleTailMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].lifting_body}PossibleTailLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].monocoque}PossibleRemoveSections(){return this.CountSections()>this.required_sections}GetFarmanOrBoom(){return this.farman||this.boom}SectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),t.internal_bracing||(e.drag+=4,t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}TailSectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),e.drag+=4,this.farman||(t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}CountMainLiftingBody(){var t=0;for(const e of this.section_list)e.lifting_body&&t++;return t}CountTailLiftingBody(){var t=0;for(const e of this.tail_section_list)e.lifting_body&&t++;return t}CountLiftingBody(){return this.CountMainLiftingBody()+this.CountTailLiftingBody()}SetIsTandem(t){this.is_tandem!=t&&(this.is_tandem=t,this.SetTailType(this.sel_tail))}SetTailType(t){0==this.tail_list[t].stats.reqsections&&this.is_tandem&&t++,this.sel_tail=t,this.SetRequiredTailSections(this.tail_list[t].stats.reqsections)}GetTailType(){return this.sel_tail}GetTailList(){return this.tail_list}GetTailSectionList(){return this.tail_section_list}SetUseFarman(t){if(this.farman=t,t&&this.boom&&(this.boom=!1),this.farman)for(const t of this.tail_section_list)t.monocoque=!1,t.lifting_body=!1;this.CalculateStats()}GetUseFarman(){return this.farman}SetUseBoom(t){this.boom=t,t&&this.farman&&(this.farman=!1),this.CalculateStats()}GetUseBoom(){return this.boom}SetTailFrame(t,e){this.tail_section_list[t].frame=e,this.frame_list[e].geodesic||(this.tail_section_list[t].geodesic=!1),this.CalculateStats()}SetTailGeodesic(t,e){this.frame_list[this.tail_section_list[t].frame].geodesic&&(this.tail_section_list[t].geodesic=e,this.CalculateStats())}SetTailMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].monocoque=e,this.CalculateStats())}SetTailLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].lifting_body=e,this.CalculateStats())}SetHasTractorNacelles(t){this.has_tractor_nacelles=t}GetHasTractorNacelles(){return this.has_tractor_nacelles}CanFlyingWing(){for(const t of this.section_list)if(t.lifting_body)return!0;for(const t of this.tail_section_list)if(t.lifting_body)return!0;return!1}GetFlyingWing(){return this.flying_wing}SetFlyingWing(t){t&&this.CanFlyingWing()?this.flying_wing=!0:this.flying_wing=!1,this.CalculateStats()}GetIsTailless(){return 0==this.tail_section_list.length}SetAllFrame(t){for(const e of this.section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);for(const e of this.tail_section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);this.CalculateStats()}SetAllSkin(t){this.sel_skin=t;for(const e of this.section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);for(const e of this.tail_section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);this.CalculateStats()}GetArmor(){return"Dragon Skin"==this.skin_list[this.sel_skin].name?5:0}GetIsFlammable(){return!!this.skin_list[this.sel_skin].flammable}GetSkin(){return this.sel_skin}CanCutout(){let t=this.section_list.length*this.skin_list[this.sel_skin].stats.visibility;return this.farman?t+=this.tail_section_list.length:t+=this.tail_section_list.length*this.skin_list[this.sel_skin].stats.visibility,t<3}SetCalculateStats(t){this.CalculateStats=t}PartStats(){this.CanFlyingWing()||(this.flying_wing=!1);var t=new u;const e=this.BaseType();t.structure=this.frame_list[e].basestruct,t.cost=this.frame_list[e].basecost;var s=this.skin_list[this.sel_skin].monocoque_structure<0;for(const e of this.section_list)t=t.Add(this.SectionStats(e)),s=s&&(e.internal_bracing||e.monocoque);var i=new u;for(const t of this.tail_section_list)i=i.Add(this.TailSectionStats(t)),this.farman||(s=s&&(t.internal_bracing||t.monocoque));s&&(t.structure+=30),t=t.Add(this.tail_list[this.sel_tail].stats),this.boom&&(i.maxstrain-=i.mass,this.has_tractor_nacelles||(i.drag=Math.floor(1e-6+1.5*i.drag))),this.farman?(t.drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor,t.visibility+=this.tail_section_list.length,i.mass=Math.floor(1e-6+.5*i.mass),t=t.Add(i)):((t=t.Add(i)).drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor);const a=this.CountLiftingBody();return t.cost+=a,this.flying_wing?t.liftbleed+=5:t.drag+=a,this.PossibleRemoveSections()&&this.CountMainLiftingBody()11.15)this.wing_list=t.wing_list,this.mini_wing_list=t.mini_wing_list;else{const e=t.wing_list;this.wing_list=this.OldtoNew(e);const s=t.mini_wing_list;this.mini_wing_list=this.OldtoNew(s)}this.wing_stagger=t.wing_stagger,this.is_swept=t.is_swept,this.is_closed=t.is_closed}OldtoNew(t){const e=[];for(const s of t)e.push({surface:s.surface,area:s.area,span:s.span,anhedral:s.anhedral,dihedral:s.dihedral,gull:!1,deck:s.deck});return e}serialize(t){t.PushNum(this.wing_list.length);for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.wing_list.push(e)}const s=t.GetNum();this.mini_wing_list=[];for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.mini_wing_list.push(e)}this.wing_stagger=t.GetNum(),this.is_swept=t.GetBool(),this.is_closed=t.GetBool()}SetRotorSpan(t){this.rotor_span=t}GetWingList(){return this.wing_list}GetMiniWingList(){return this.mini_wing_list}GetSkinList(){return this.skin_list}GetStaggerList(){return this.stagger_list}GetDeckList(){return this.deck_list}DeckCountFull(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.wing_list)t[e.deck]++;return t}DeckCountMini(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.mini_wing_list)t[e.deck]++;return t}CanStagger(){const t=[...Array(this.stagger_list.length).fill(!1)];if(this.acft_type==N.ORNITHOPTER_FLUTTER)this.wing_list.length>1?t[1]=!0:t[0]=!0;else{if(this.wing_list.length>1)for(let e=1;e1?this.wing_stagger=1:this.wing_stagger=0)}SetStagger(t){for(this.wing_stagger=t;this.stagger_list[t].wing_count=0;e--){const s=this.wing_list[e];t[s.deck]>1&&this.deck_list[s.deck].limited&&(t[s.deck]--,this.wing_list.splice(e,1))}}this.CalculateStats()}GetStagger(){return this.wing_list.length>0?this.wing_stagger:-1}CanAddFullWing(t){if(t>=this.deck_list.length&&console.log("Deck out of Bounds"),!this.stagger_list[this.wing_stagger].inline){if(t==D.SHOULDER&&this.HasPolishWing())return!1;if(this.DeckCountFull()[t]==D.SHOULDER&&this.deck_list[t].limited)return!1}return 0==this.DeckCountMini()[t]}CanAddMiniWing(t){const e=this.DeckCountFull(),s=this.DeckCountMini();return 0==e[t]&&0==s[t]}CanMoveFullWing(t,e){const s=this.wing_list[t];this.wing_list.splice(t,1);const i=this.CanAddFullWing(e);return this.wing_list.splice(t,0,s),i}CanMoveMiniWing(t,e){const s=this.mini_wing_list[t];this.mini_wing_list.splice(t,1);const i=this.CanAddMiniWing(e);return this.mini_wing_list.splice(t,0,s),i}GetWingHeight(){let t=0;for(const e of this.wing_list)t=Math.max(t,4-e.deck);return t}CanClosed(){return this.wing_list.length>1}SetClosed(t){this.wing_list.length>0?this.is_closed=t:this.is_closed=!1,this.CalculateStats()}GetClosed(){return this.is_closed}CanSwept(){return this.wing_list.length>0}SetSwept(t){this.wing_list.length>0?this.is_swept=t:this.is_swept=!1,this.CalculateStats()}GetSwept(){return this.is_swept}GetTandem(){return this.stagger_list[this.wing_stagger].inline&&this.wing_list.length>1}GetMonoplane(){return 1==this.wing_list.length}GetStaggered(){return 0!=this.stagger_list[this.wing_stagger].stats.liftbleed}SetFullWing(t,e){this.wing_list.length!=t&&this.wing_list.splice(t,1),e.area!=e.area&&(e.area=3),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,3),e.span=Math.max(e.span,1),this.CanAddFullWing(e.deck)&&this.wing_list.splice(t,0,e)),this.wing_list.length>1&&0==this.wing_stagger?this.wing_stagger=4:this.wing_list.length<=1&&(this.wing_stagger=0),e.dihedral=Math.floor(1e-6+e.dihedral),e.anhedral=Math.floor(1e-6+e.anhedral),e.dihedral=Math.max(0,Math.min(e.dihedral,e.span-1)),e.anhedral=Math.max(0,Math.min(e.anhedral,e.span-1-e.dihedral)),this.CalculateStats()}SetMiniWing(t,e){this.mini_wing_list.length!=t&&this.mini_wing_list.splice(t,1),e.area!=e.area&&(e.area=2),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,1),e.area=Math.min(e.area,2),e.span=Math.max(e.span,1),this.CanAddMiniWing(e.deck)&&this.mini_wing_list.splice(t,0,e)),this.CalculateStats()}HasNonGullDeck(t){for(const e of this.wing_list)if(e.deck==t&&!e.gull)return!0;return!1}CanGull(t){if(t==D.PARASOL){if(!this.GetTandem()&&this.HasNonGullDeck(D.SHOULDER))return!1}else{if(t==D.SHOULDER)return!1;if(!this.GetTandem()&&this.HasNonGullDeck(t-1))return!1}return!0}IsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}NeedHStab(){return this.stagger_list[this.wing_stagger].hstab}NeedTail(){return this.NeedHStab()||!this.is_swept}GetSpan(){let t=0;for(const e of this.wing_list){const s=e.span;t=Math.max(t,s)}for(const e of this.mini_wing_list){const s=e.span;t=Math.max(t,s)}return t}GetArea(){let t=0;for(const e of this.wing_list)t+=e.area;for(const e of this.mini_wing_list)t+=e.area;return t}GetParasol(){for(const t of this.wing_list)if(t.deck==D.PARASOL)return!0;for(const t of this.mini_wing_list)if(t.deck==D.PARASOL)return!0;return!1}GetMetalArea(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].metal&&(t+=e.area);for(const e of this.mini_wing_list)this.skin_list[e.surface].metal&&(t+=e.area);return t}GetWingDrag(){let t=0;const e=this.DeckCountFull();let s=0,i=0;for(const a of this.wing_list){const n=a.span;let r=a.area;s=Math.max(s,n),a.gull&&(r=Math.floor(1e-6+1.1*r));let o=Math.max(1,6*r*r/(n*n));o=Math.max(1,o*this.skin_list[a.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&e[a.deck]>1&&(o=Math.floor(1e-6+.75*o),o=Math.max(1,o)),o=Math.floor(1e-6+o),s==n&&(i=i),t+=o}for(const e of this.mini_wing_list){const s=e.span;let i=Math.max(1,6*e.area*e.area/(s*s));i=Math.max(1,i*this.skin_list[e.surface].dragfactor),i=Math.floor(1e-6+i),t+=i}const a=this.GetIsSesquiplane();return(a.is||this.GetMonoplane())&&-1!=a.deck&&(t-=Math.floor(1e-6+(1-this.long_list[a.deck].dragfactor)*i)),t}GetIsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}SetAircraftMass(t){this.plane_mass=t}GetPaperMass(){let t=0;for(const e of this.wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}for(const e of this.mini_wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}return Math.max(-Math.floor(1e-6+.25*this.plane_mass),t)}GetIsSesquiplane(){let t=0,e=-1,s=0,i=1e100,a=0;for(const n of this.wing_list)n.area>t?(t=n.area,e=n.deck,s=n.span):n.area==t&&(e=-1),i>n.area&&(i=n.area,a=n.span);let n=t>=2*i;return n=n&&!this.GetMonoplane()&&!this.GetTandem(),n?{is:n,deck:e,super_small:.75*s>=a}:{is:!1,deck:e,super_small:!1}}HasPolishWing(){for(const t of this.wing_list)if(t.deck==D.PARASOL&&1==t.gull)return!0;return!1}HasInvertedGull(){let t=-1;for(const e of this.wing_list)e.gull&&e.deck>D.SHOULDER&&(t=Math.max(t,e.deck));return t}CanCutout(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].transparent&&(t+=1);return t<3}PartStats(){this.CanClosed()||(this.is_closed=!1),this.CanSwept()||(this.is_swept=!1);var t=new u;let e=!1;const s=this.DeckCountFull();let i=!1,a=this.rotor_span,n=0,r=0;for(let i of this.wing_list){this.CanGull(i.deck)||(i.gull=!1),a=Math.max(a,i.span),e?(t.control+=3,t.liftbleed+=5,t.visibility-=1):e=!0;let o=new u;o=o.Add(this.skin_list[i.surface].stats.Multiply(i.area)),o.wingarea=i.area,o.maxstrain+=Math.min(0,-(2*i.span+i.area-10)),this.acft_type==N.ORNITHOPTER_BUZZER&&(o.maxstrain+=Math.min(0,-(2*i.span+i.area-10))),o.maxstrain*=this.skin_list[i.surface].strainfactor,this.skin_list[i.surface].transparent&&r<3&&(o.visibility+=1,r+=1);const l=i.span;let h=i.area;i.gull&&(h=Math.floor(1e-6+1.1*h));const c=Math.max(1,6*h*h/(l*l));o.drag=o.drag+c,o.drag=Math.max(1,o.drag*this.skin_list[i.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&s[i.deck]>1&&(o.drag=Math.floor(1e-6+.75*o.drag),o.drag=Math.max(1,o.drag)),t=t.Add(this.deck_list[i.deck].stats),o.latstab+=i.dihedral-i.anhedral,o.liftbleed+=i.dihedral+i.anhedral,o.Round(),a==i.span&&(n=o.drag),o.mass<0&&(o.mass=0),t=t.Add(o)}for(const e of this.mini_wing_list){a=Math.max(a,e.span),t.control+=1,i?t.liftbleed+=1:i=!0;const s=this.skin_list[e.surface].stats.Multiply(e.area);s.wingarea=e.area,s.maxstrain+=Math.min(0,-(2*e.span+e.area-10)),s.maxstrain*=this.skin_list[e.surface].strainfactor;const n=e.span;s.drag=Math.max(1,s.drag+6*e.area*e.area/(n*n)),s.drag=Math.max(1,s.drag*this.skin_list[e.surface].dragfactor),s.latstab+=e.dihedral-e.anhedral,s.liftbleed+=e.dihedral+e.anhedral,s.Round(),s.mass<0&&(s.mass=0),t=t.Add(s)}t.control+=8-a,t.latstab+=Math.min(0,a-8);const o=this.GetIsSesquiplane();if((o.is||this.GetMonoplane())&&-1!=o.deck&&((t=t.Add(this.long_list[o.deck].stats)).drag-=Math.floor(1e-6+(1-this.long_list[o.deck].dragfactor)*n)),o.is&&(t.liftbleed-=2,t.control+=2),this.stagger_list[this.wing_stagger].inline)for(const e of s)e>1&&(t.liftbleed+=3*(e-1));switch(this.HasPolishWing()&&(t.visibility+=1,t.maxstrain+=10),this.HasInvertedGull()){case 1:case 2:case 3:break;case 4:t.maxstrain+=10,t.crashsafety+=1}if((this.HasInvertedGull()>0||this.HasPolishWing())&&t.era.push({name:"Gull Wing",era:"Coming Storm"}),this.is_swept&&(t.liftbleed+=5,t.latstab--),this.is_closed){const e=Math.floor(1e-6+this.wing_list.length/2);t.mass+=1*e,t.control-=5*e,t.maxstrain+=20*e}return this.wing_list.length>1&&(t=t.Add(this.stagger_list[this.wing_stagger].stats)),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){const t={storage:0,equipment:[]};let e=0,s="";for(const t of this.wing_list){const i=this.skin_list[t.surface];0!=i.stats.charge&&(s=h(i.name),e+=i.stats.charge*t.area,e=Math.floor(1e-6+e))}return 0!=e&&t.equipment.push({source:s,charge:e.toString()}),t}}class tt extends H{constructor(t){super(),this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.is_heli=!1,this.hstab_sel=0,this.hstab_count=1,this.hstab_list=[];for(const e of t.hstab)this.hstab_list.push({name:e.name,is_canard:e.is_canard,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail});this.vstab_sel=0,this.vstab_count=1,this.vstab_list=[];for(const e of t.vstab)this.vstab_list.push({name:e.name,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail})}toJSON(){return{hstab_sel:this.hstab_sel,hstab_count:this.hstab_count,vstab_sel:this.vstab_sel,vstab_count:this.vstab_count}}fromJSON(t,e){this.hstab_sel=t.hstab_sel,this.hstab_count=t.hstab_count,this.vstab_sel=t.vstab_sel,this.vstab_count=t.vstab_count}serialize(t){t.PushNum(this.hstab_sel),t.PushNum(this.hstab_count),t.PushNum(this.vstab_sel),t.PushNum(this.vstab_count)}deserialize(t){this.hstab_sel=t.GetNum(),this.hstab_count=t.GetNum(),this.vstab_sel=t.GetNum(),this.vstab_count=t.GetNum()}IsDefault(){return 0==this.hstab_sel&&1==this.hstab_count&&0==this.vstab_sel&&1==this.vstab_count}GetHStabList(){return this.hstab_list}GetVStabList(){return this.vstab_list}GetHStabType(){return this.hstab_sel}SetHStabType(t){("The Wings"!=this.hstab_list[t].name||this.is_tandem||this.is_swept)&&(this.hstab_list[t].is_vtail?this.SetVTail():this.hstab_list[this.hstab_sel].is_vtail&&(this.vstab_sel=0,this.vstab_count=1),this.hstab_sel=t,this.SetHStabCount(this.hstab_count))}GetHValidList(){var t=[];if(this.is_heli)t=Array(this.hstab_list.length).fill(!1),this.have_tail?t[0]=!0:t[1]=!0;else for(const e of this.hstab_list)"The Wings"!=e.name&&"Outboard"!=e.name||this.is_tandem||this.is_swept?e.is_tail&&!this.have_tail?t.push(!1):t.push(!0):t.push(!1);return t}GetIsVTail(){return this.hstab_list[this.hstab_sel].is_vtail}SetVTail(){for(let t=0;t=0?this.hstab_list[this.hstab_sel].increment:1}GetVStabCount(){return this.vstab_count}SetVStabCount(t){if((t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.vstab_count=t,0!=this.vstab_list[this.vstab_sel].increment)for(;this.vstab_count%this.vstab_list[this.vstab_sel].increment!=0;)this.vstab_count++;else this.vstab_count=0;this.CalculateStats()}GetVStabIncrement(){return this.vstab_sel>=0?this.vstab_list[this.vstab_sel].increment:1}SetEngineCount(t){this.engine_count=t}GetIsTandem(){return this.is_tandem}SetIsTandem(t){this.is_tandem=t}SetIsSwept(t){this.is_swept=t}CanVOutboard(){return this.is_swept||this.is_tandem||this.hstab_list[this.hstab_sel].is_canard&&this.hstab_count>0}GetVOutboard(){return"Outboard"==this.vstab_list[this.vstab_sel].name}GetCanard(){return this.hstab_list[this.hstab_sel].is_canard}SetLiftingArea(t){this.lifting_area=t}SetHaveTail(t){if(this.have_tail=t,!t){this.GetHValidList()[this.hstab_sel]||(this.hstab_sel=2);const t=this.GetVValidList();t[this.vstab_sel]||(t[1]||(this.hstab_sel=2),this.vstab_sel=1,this.vstab_count%2!=0&&this.vstab_count++)}this.is_heli&&(this.have_tail?this.hstab_sel=0:this.hstab_sel=1,this.hstab_count=1)}SetHelicopter(t){this.is_heli=t,t&&(this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.lifting_area=0,this.engine_count=0,this.hstab_sel=0,this.hstab_count=1,this.vstab_sel=0,this.vstab_count=1)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=this.GetHValidList();t[this.hstab_sel]||(this.hstab_sel=0,t[this.hstab_sel]||(this.hstab_sel=0,this.hstab_count=0));const e=this.GetVValidList();e[this.vstab_sel]||(this.vstab_sel=0,e[this.vstab_sel]||(this.vstab_sel=0,this.vstab_count=0));var s=new u;if(this.hstab_count>0){s=s.Add(this.hstab_list[this.hstab_sel].stats);var i=0;this.is_heli?(i=Math.floor(1e-6+this.wing_drag/8*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/4*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(1,i))}else(this.hstab_sel<0||0!=this.hstab_list[this.hstab_sel].increment)&&(s.pitchstab-=Math.floor(1e-6+this.lifting_area/2),s.liftbleed+=5);if(this.vstab_count>0?(s=s.Add(this.vstab_list[this.vstab_sel].stats),i=0,this.is_heli?(i=Math.floor(1e-6+this.wing_drag/16*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/8*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(1,i))):(this.vstab_sel<0||0!=this.vstab_list[this.vstab_sel].increment||0==this.vstab_list[this.vstab_sel].increment&&0==this.hstab_count)&&(s.latstab-=this.lifting_area),s.drag+=2*(Math.max(0,this.hstab_count-1)+Math.max(0,this.vstab_count-1)),this.vstab_sel>=0&&0!=this.vstab_list[this.vstab_sel].increment){var a=Math.max(0,this.hstab_count-1);const t=Math.min(this.engine_count-1,this.vstab_count-1);a+=Math.max(0,this.vstab_count-1-t),s.control+=3*t+a}else{const t=Math.max(0,Math.min(this.engine_count-1,this.hstab_count-1));a=Math.max(0,this.hstab_count-1-t),s.control+=3*t+a}return s}GetElectrics(){return{storage:0,equipment:[]}}}class et extends H{constructor(t){super(),this.span=0,this.is_cantilever=0,this.wing_area=0,this.mp=0,this.is_boom=!1,this.acft_type=N.AIRPLANE,this.aileron_sel=0,this.aileron_list=[];for(const e of t.ailerons)this.aileron_list.push({name:e.name,warping:e.warping,stats:new u(e)});this.rudder_sel=0,this.rudder_list=[];for(const e of t.rudders)this.rudder_list.push({name:e.name,stats:new u(e)});this.elevator_sel=0,this.elevator_list=[];for(const e of t.elevators)this.elevator_list.push({name:e.name,stats:new u(e)});this.flaps_sel=0,this.flaps_list=[];for(const e of t.flaps)this.flaps_list.push({name:e.name,costfactor:e.costfactor,stats:new u(e)});this.slats_sel=0,this.slats_list=[];for(const e of t.slats)this.slats_list.push({name:e.name,stats:new u(e)});this.drag_list=[];for(const e of t.drag_inducers)this.drag_list.push({name:e.name,stats:new u(e)});this.drag_sel=[...Array(this.drag_list.length).fill(!1)]}toJSON(){return{aileron_sel:this.aileron_sel,rudder_sel:this.rudder_sel,elevator_sel:this.elevator_sel,flaps_sel:this.flaps_sel,slats_sel:this.slats_sel,drag_sel:this.drag_sel}}fromJSON(t,e){this.aileron_sel=t.aileron_sel,this.rudder_sel=t.rudder_sel,this.elevator_sel=t.elevator_sel,this.flaps_sel=t.flaps_sel,this.slats_sel=t.slats_sel,this.drag_sel=b(t.drag_sel,this.drag_sel.length)}serialize(t){t.PushNum(this.aileron_sel),t.PushNum(this.rudder_sel),t.PushNum(this.elevator_sel),t.PushNum(this.flaps_sel),t.PushNum(this.slats_sel),t.PushBoolArr(this.drag_sel)}deserialize(t){this.aileron_sel=t.GetNum(),this.rudder_sel=t.GetNum(),this.elevator_sel=t.GetNum(),this.flaps_sel=t.GetNum(),this.slats_sel=t.GetNum(),this.drag_sel=t.GetBoolArr(this.drag_sel.length)}IsDefault(){return 0==this.aileron_sel&&0==this.rudder_sel&&0==this.elevator_sel&&0==this.flaps_sel&&0==this.slats_sel&&0==this.drag_sel.reduce(((t,e)=>t||e),!1)}GetAileronList(){return this.aileron_list}CanAileron(){const t=[];if(W(this.acft_type))for(const e of this.aileron_list)t.push(e.warping);else for(const e of this.aileron_list)e.warping&&0==this.wing_area?t.push(!1):t.push(!0);return t}GetAileron(){return this.aileron_sel}SetAileron(t){this.aileron_sel=t,this.CalculateStats()}GetRudderList(){return this.rudder_list}CanRudder(){return this.can_rudder}SetCanRudder(t){this.can_rudder=t,t||(this.rudder_sel=0)}GetRudder(){return this.rudder_sel}SetRudder(t){this.rudder_sel=t,this.CalculateStats()}GetElevatorList(){return this.elevator_list}CanElevator(){return this.can_elevator}SetCanElevator(t){this.can_elevator=t,t||(this.elevator_sel=0)}GetElevator(){return this.elevator_sel}SetElevator(t){this.elevator_sel=t,this.CalculateStats()}GetFlapsList(){return this.flaps_list}GetFlaps(){return this.flaps_sel}SetFlaps(t){this.flaps_sel=t,this.CalculateStats()}GetFlapCost(t){return t&&(this.mp=t),this.flaps_list[this.flaps_sel].costfactor>0?Math.max(1,Math.floor(1e-6+this.flaps_list[this.flaps_sel].costfactor*this.mp)):0}GetSlatsList(){return this.slats_list}GetSlats(){return this.slats_sel}SetSlats(t){this.slats_sel=t,this.CalculateStats()}GetDragList(){return this.drag_list}GetDrag(){return this.drag_sel}SetDrag(t,e){this.drag_sel[t]=e,this.CalculateStats()}SetNumCantilever(t){this.is_cantilever=t}SetSpan(t){this.span=t}SetWingArea(t){this.wing_area=t}SetAcftType(t){if(this.acft_type=t,this.acft_type==N.HELICOPTER){this.aileron_sel=0,this.rudder_sel=0,this.elevator_sel=0,this.flaps_sel=0,this.slats_sel=0;for(let t=0;tt)),this.is_cantilever=0}}SetBoomTail(t){this.is_boom=t}SetIsVTail(t){t&&(this.rudder_sel=this.elevator_sel)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;this.aileron_list[this.aileron_sel].warping&&0==this.wing_area&&(this.aileron_sel=0),t=t.Add(this.aileron_list[this.aileron_sel].stats),this.aileron_list[this.aileron_sel].warping&&(t.maxstrain-=this.span,this.is_cantilever&&(t.cost+=2*this.is_cantilever,t.era.push({name:h("Cantilever Wing Warping"),era:"Last Hurrah"})),this.is_boom&&(t.pitchstab-=2,t.latstab-=2,t.warnings.push({source:h("Wing Warping"),warning:h("Wing Warping Warning"),color:c.WHITE}))),t=(t=(t=(t=t.Add(this.rudder_list[this.rudder_sel].stats)).Add(this.elevator_list[this.elevator_sel].stats)).Add(this.flaps_list[this.flaps_sel].stats)).Add(this.slats_list[this.slats_sel].stats);for(let e=0;e10.25&&t.wing_blades,e<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}serialize(t){t.PushNumArr(this.ext_wood_count),t.PushNumArr(this.ext_steel_count),t.PushNumArr(this.cant_count),t.PushBool(this.wires),t.PushNum(this.cabane_sel),t.PushBool(this.wing_blades)}deserialize(t){this.ext_wood_count=t.GetNumArr(this.ext_wood_count.length),this.ext_steel_count=t.GetNumArr(this.ext_steel_count.length),this.cant_count=t.GetNumArr(this.cant_count.length),this.wires=t.GetBool(),this.cabane_sel=t.GetNum(),t.version>10.25?this.wing_blades=t.GetBool():this.wing_blades=!1,t.version<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}GetExternalList(){return this.ext_wood_list}GetCantileverList(){return this.cant_list}CanExternalWood(){const t=[...Array(this.ext_wood_list.length).fill(this.can_external)];for(let e=0;e0}SetCantileverCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.ImplSCC(t,e),this.CalculateStats()}ImplSCC(t,e){var s=e-this.cant_count[t];if(this.cant_list[t].limited&&e>0){var i=this.TotalStructure();for(let t=0;tthis.acft_structure)for(let t=this.cant_list.length-1;t>=0;t--)s=s||this.ImplSCC(t,this.cant_count[t]);s&&this.CalculateStats()}TotalStructure(){var t=this.ext_cabane_list[this.cabane_sel].stats.structure,e=!1;for(let s=0;s0||this.ext_steel_count[s]>0)&&(e=!0);return e&&(t+=5),this.acft_structure+t}GetCantileverType(){const t=this.cant_count[0]+this.cant_count[4];return this.cant_count[1]+this.cant_count[2]+this.cant_count[3]>0?2:t>0?1:0}GetCabaneList(){return this.ext_cabane_list}GetCabane(){return this.cabane_sel}SetCabane(t){this.cabane_sel=t,this.CalculateStats()}SetCantLift(t){this.cant_lift=t}CanWingBlade(){for(const t of this.ext_wood_count)if(t>0)return!1;for(const t of this.ext_steel_count)if(t>0)return!1;return 0==this.cabane_sel&&this.cant_count[2]>0}GetWingBlade(){return this.wing_blades}SetWingBlade(t){this.wing_blades=t,this.CalculateStats()}SetAircraftType(t){this.acft_type=t,t==N.HELICOPTER&&(this.can_external=!1,this.is_monoplane=!1,this.is_tandem=!1,this.is_staggered=!1),t==N.ORNITHOPTER_BUZZER&&(this.can_external=!1);const e=this.CanExternalWood();for(let t=0;t0){a=a||this.ext_wood_list[n].first;let i=this.ext_wood_list[n].stats;i=i.Multiply(this.ext_wood_count[n]),t=t.Add(i),this.ext_wood_list[n].config?s+=e*this.ext_wood_list[n].tension*this.ext_wood_count[n]:s+=this.ext_wood_list[n].tension*this.ext_wood_count[n]}for(let n=0;n0){a=a||this.ext_wood_list[n].first;let i=this.ext_steel_list[n].stats.Clone();i=i.Multiply(this.ext_steel_count[n]),t=t.Add(i),this.ext_steel_list[n].config?s+=e*this.ext_steel_list[n].tension*this.ext_steel_count[n]:s+=this.ext_steel_list[n].tension*this.ext_steel_count[n]}this.acft_type==N.ORNITHOPTER_BASIC&&(t.maxstrain=Math.floor(1e-6+.5*t.maxstrain)),a&&(t.structure+=5,t.maxstrain+=10,s+=10);const n=this.ext_cabane_list[this.cabane_sel].stats.Clone();t=t.Add(n),s+=e*this.ext_cabane_list[this.cabane_sel].tension,this.cabane_sel>0&&(i+=1),this.wires&&(t.maxstrain+=Math.floor(1e-6+s),t.drag+=3*i);var r=!1;for(let e=0;e0){r=!0;let s=this.cant_list[e].stats;s=s.Multiply(this.cant_count[e]),s.maxstrain,t=t.Add(s)}return this.CanWingBlade()?this.wing_blades&&(t.mass*=2,t.warnings.push({source:h("Wing Blades"),warning:h("Wing Blades Warning"),color:c.WHITE})):this.wing_blades=!1,r&&(t.cost+=5,t.liftbleed-=this.cant_lift),t}GetElectrics(){return{storage:0,equipment:[]}}}class it extends H{constructor(t){super(),this.tank_stats=[],this.tank_count=[];for(const e of t.tanks)this.tank_stats.push({name:e.name,stats:new u(e),internal:e.internal,cantilever:e.cantilever}),this.tank_count.push(0);this.self_sealing=!1,this.is_cantilever=!1,this.wing_area=-1}toJSON(){return{tank_count:this.tank_count,self_sealing:this.self_sealing,fire_extinguisher:this.fire_extinguisher}}fromJSON(t,e){this.tank_count=A(t.tank_count,this.tank_count.length),this.self_sealing=t.self_sealing,this.fire_extinguisher=t.fire_extinguisher,this.wing_area=-1}serialize(t){t.PushNumArr(this.tank_count),t.PushBool(this.self_sealing),t.PushBool(this.fire_extinguisher)}deserialize(t){this.tank_count=t.GetNumArr(this.tank_count.length),this.self_sealing=t.GetBool(),this.fire_extinguisher=t.GetBool(),this.wing_area=-1}GetTankList(){return this.tank_stats}GetTankEnabled(){const t=[];for(const e of this.tank_stats)!this.is_cantilever&&e.cantilever?t.push(!1):t.push(!0);return t}GetTankCount(){return this.tank_count}SetTankCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.tank_count[t]=e,this.VerifyOK(),this.CalculateStats()}SetCantilever(t){this.is_cantilever&&!t&&(this.is_cantilever=t,this.VerifyOK()&&this.CalculateStats()),this.is_cantilever=t}SetArea(t){this.wing_area>t&&(this.wing_area=t,this.VerifyOK()&&this.CalculateStats()),this.wing_area=t}VerifyOK(){if(-1!=this.wing_area){var t=0;for(let e=0;e0;for(;s>0;)for(let t=this.tank_count.length-1;t>=0;t--)if(this.tank_stats[t].cantilever){this.tank_count[t]--,s--;break}for(let t=0;t0}GetSelfSealing(){return this.self_sealing}SetSelfSealing(t){this.self_sealing=t,this.CalculateStats()}GetExtinguisher(){return this.fire_extinguisher}SetExtinguisher(t){this.fire_extinguisher=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u,e=0;for(let s=0;s0&&(t.wetmass+=5-t.wetmass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class at extends H{constructor(){super(),this.bomb_count=0,this.rocket_count=0,this.internal_bay_count=0,this.internal_bay_1=!1,this.internal_bay_2=!1}toJSON(){return{bomb_count:this.bomb_count,rocket_count:this.rocket_count,bay_count:this.internal_bay_count,bay1:this.internal_bay_1,bay2:this.internal_bay_2}}fromJSON(t,e){this.bomb_count=t.bomb_count,this.internal_bay_count=t.bay_count,this.internal_bay_1=t.bay1,this.internal_bay_2=t.bay2,e>10.75&&(this.rocket_count=t.rocket_count)}serialize(t){t.PushNum(this.bomb_count),t.PushNum(this.internal_bay_count),t.PushBool(this.internal_bay_1),t.PushBool(this.internal_bay_2),t.PushNum(this.rocket_count)}deserialize(t){this.bomb_count=t.GetNum(),this.internal_bay_count=t.GetNum(),this.internal_bay_1=t.GetBool(),this.internal_bay_2=t.GetBool(),t.version>10.75&&(this.rocket_count=t.GetNum())}GetRocketCount(){return this.rocket_count}GetBombCount(){return this.bomb_count}GetInternalBombCount(){var t=10*this.internal_bay_count;return this.bomb_count>0&&this.internal_bay_count>0&&this.internal_bay_1&&(t*=2,this.internal_bay_2&&(t*=2)),t}GetMaxBombSize(){var t=0;const e=this.GetInternalBombCount();return this.bomb_count>0&&this.internal_bay_count>0&&(t=this.internal_bay_1?this.internal_bay_2?Math.floor(1e-6+e):Math.floor(1e-6+e/2):Math.floor(1e-6+e/4)),t}SetRocketCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.rocket_count=t,this.LimitMass(),this.CalculateStats()}SetBombCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.bomb_count=t,this.LimitMass(),this.CalculateStats()}GetBayCount(){return this.internal_bay_count}GetBay1(){return this.internal_bay_1}GetBay2(){return this.internal_bay_2}SetBayCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.internal_bay_count=t,this.CalculateStats()}SetUseBays(t,e){this.internal_bay_1=t,this.internal_bay_2=e,!this.internal_bay_1&&this.internal_bay_2&&(this.internal_bay_1=!0,this.internal_bay_2=!1),this.CalculateStats()}LimitMass(){var t=!1;const e=Math.min(this.GetInternalBombCount(),Math.floor(1e-6+3*this.acft_struct*this.maxbomb));var s,i,a=0,n=0;s=this.bomb_count>e?e:this.bomb_count,i=this.rocket_count+s>e?e-s:this.rocket_count,a=this.bomb_count-s,n=this.rocket_count-i;const r=Math.floor(1e-6+this.acft_struct*this.maxbomb-(s+i)/3)*this.gull_factor;for(;a+n>r;)n>0?n--:a--;let o=Math.max(0,s+a);this.bomb_count>o&&(t=!0,this.bomb_count=o);let l=Math.max(0,i+n);return this.rocket_count>l&&(t=!0,this.rocket_count=l),t}GetExternalMass(){const t=this.bomb_count+this.rocket_count;return Math.max(0,t-this.GetInternalBombCount())}SetAcftParameters(t,e,s){switch(this.acft_struct=t,this.maxbomb=e,s){case 2:case 3:this.gull_factor=1.1;break;case 4:this.gull_factor=1.2;break;default:this.gull_factor=1}this.LimitMass()&&this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u,e=this.GetExternalMass();if(t.reqsections+=this.internal_bay_count,this.internal_bay_count>0){const e=t.reqsections;this.internal_bay_1&&(t.reqsections+=e,this.internal_bay_2&&(t.reqsections+=e))}const s=Math.ceil(e/5-1e-6);return t.mass+=s,t.drag+=s,t.bomb_mass=this.bomb_count+this.rocket_count,t.reqsections=Math.ceil(-1e-6+t.reqsections),t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class nt extends H{constructor(t){super(),this.cargo_list=[];for(const e of t.spaces)this.cargo_list.push({name:e.name,stats:new u(e)});this.cargo_sel=0}toJSON(){return{space_sel:this.cargo_sel}}fromJSON(t,e){this.cargo_sel=t.space_sel}serialize(t){t.PushNum(this.cargo_sel)}deserialize(t){this.cargo_sel=t.GetNum()}GetSpaceList(){return this.cargo_list}GetSpace(){return this.cargo_sel}SetSpace(t){this.cargo_sel=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;return(t=t.Add(this.cargo_list[this.cargo_sel].stats)).bomb_mass+=3*t.reqsections,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class rt extends H{constructor(t){super(),this.gear_list=[],this.gear_sel=0,this.retract=!1;for(const e of t.gear)this.gear_list.push({name:e.name,stats:new u(e),DpLMP:e.DpLMP,SpLMP:e.SpLMP,can_retract:e.can_retract});this.extra_list=[];for(const e of t.extras)this.extra_list.push({name:e.name,stats:new u(e),MpLMP:e.MpLMP});this.extra_sel=[...Array(this.extra_list.length).fill(!1)]}toJSON(){return{gear_sel:this.gear_sel,retract:this.retract,extra_sel:this.extra_sel}}fromJSON(t,e){this.gear_sel=t.gear_sel,this.retract=t.retract,this.extra_sel=b(t.extra_sel,this.extra_sel.length)}serialize(t){t.PushNum(this.gear_sel),t.PushBool(this.retract),t.PushBoolArr(this.extra_sel)}deserialize(t){this.gear_sel=t.GetNum(),this.retract=t.GetBool(),this.extra_sel=t.GetBoolArr(this.extra_sel.length)}IsDefault(){return 0==this.gear_sel&&0==this.retract&&0==this.extra_sel.reduce(((t,e)=>t||e),!1)}GetGearName(){return this.retract&&"Boat Hull"==this.gear_list[this.gear_sel].name?h("Retractable Gear + Boat Hull"):this.retract?h("Retractable ")+h(this.gear_list[this.gear_sel].name):h(this.gear_list[this.gear_sel].name)}GetGearList(){return this.gear_list}CanGear(){const t=[...Array(this.gear_list.length).fill(!0)];for(let e=0;e=2||0==t&&e>=3}SetGull(t){this.gull_deck=t}SetCalculateStats(t){this.CalculateStats=t}IsVital(){return!0}PartStats(){var t=new u;this.CanGear()[this.gear_sel]||(this.gear_sel=0),this.CanRetract()||(this.retract=!1);var e=this.loadedMass;for(let s=0;s=0;i--)s+=t[i],t[i]=s-e;return t}SetArmourCoverage(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.armour_coverage[t]=1!=t?e:e-this.skin_armour,this.NormalizeCoverage(),this.CalculateStats()}NormalizeCoverage(){var t=-8+Math.min(0,-Math.floor(1e-6+(this.vital_parts-8)/2));t+=this.skin_armour;for(let e=this.armour_coverage.length-1;e>=0;e--)this.armour_coverage[e]=Math.max(0,Math.min(Math.abs(t),this.armour_coverage[e])),t+=this.armour_coverage[e]}GetElectricalList(){return this.electric_list}GetElectricalCount(){return this.electrical_count}SetElectricalCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),e=Math.min(e,50),this.electrical_count[t]=e,this.CalculateStats()}GetRadioList(){return this.radio_list}GetRadioSel(){return this.radio_sel}SetRadioSel(t){this.radio_sel=t,this.CalculateStats()}GetReconList(){return this.recon_list}GetReconSel(){return this.recon_sel}SetReconSel(t,e){((e=Math.trunc(e))!=e||e<0)&&(e=0),this.recon_sel[t]=e,this.CalculateStats()}GetVisibilityList(){return this.visi_list}GetCanVisibility(){return this.can_visi}GetVisibilitySel(){return this.visi_sel}SetVisibilitySel(t,e){this.visi_sel[t]=e,this.CalculateStats()}GetClimateList(){return this.clim_list}GetClimateSel(){return this.clim_sel}GetClimateEnable(){const t=[];for(const e of this.clim_list)!this.acft_rad&&e.req_radiator?t.push(!1):t.push(!0);return t}SetClimateSel(t,e){this.clim_sel[t]=e,this.CalculateStats()}GetAutopilotList(){return this.auto_list}GetAutopilotSel(){return this.auto_sel}SetAutopilotSel(t){this.auto_sel=t,this.CalculateStats()}GetControlList(){return this.cont_list}GetControlSel(){return this.cont_sel}SetControlSel(t){this.cont_sel=t,this.CalculateStats()}SetAcftRadiator(t){this.acft_rad=t}IsElectrics(){for(const t of this.electrical_count)if(t>0)return!0;for(let t=0;t0&&(""!=e&&(e+=", "),e+=n.toString()+"/"+(11-s[a]).toString()+"+")}""!=e&&t.warnings.push({source:h("Armour"),warning:e,color:c.WHITE});for(let e=0;e0){let s=this.electric_list[e].stats.Clone();s=s.Multiply(this.electrical_count[e]),t=t.Add(s)}t=t.Add(this.radio_list[this.radio_sel].stats);for(let e=0;e0){let s=this.recon_list[e].stats.Clone();s=s.Multiply(this.recon_sel[e]),t=t.Add(s)}for(let e=0;e0&&(t+=i.storage*a,i.cp10s>0?e.push({source:h(i.name),charge:n.Format("{0}"+h("Derived Per 10 Speed"),Math.floor(1e-6+a*i.cp10s))}):0!=i.stats.charge&&e.push({source:h(i.name),charge:(a*i.stats.charge).toString()}))}const s=this.radio_list[this.radio_sel];e=this.FormatEquipment(e,s.name,s.stats.charge);for(let t=0;t0&&(e=this.FormatEquipment(e,s.name,i*s.stats.charge))}for(let t=0;t0){let e=Math.min(t,this.drag);e=Math.max(e,0),this.drag-=e,t-=e,e=Math.min(t,this.reliability),e=Math.max(e,0),this.reliability-=e,t-=e,e=Math.min(t,this.maxstrain),e=Math.max(e,0),this.maxstrain-=e,t-=e,e=Math.min(t,this.toughness),e=Math.max(e,0),this.toughness-=e,t-=e,e=Math.min(t,this.mass),e=Math.max(e,0),this.mass-=e,t-=e,e=Math.min(t,this.escape),e=Math.max(e,0),this.escape-=e,t-=e,e=Math.min(t,this.bleed),e=Math.max(e,0),this.bleed-=e,t-=e,e=Math.min(t,this.cost),e=Math.max(e,0),this.cost-=e,t-=e}}GetFreeDots(){return this.free_dots}SetFreeDots(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,0),this.free_dots=t,this.ReduceDots(),this.CalculateStats()}GetCost(){return this.cost}SetCost(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.cost=t,this.ReduceDots(),this.CalculateStats()}GetBleed(){return this.bleed}SetBleed(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.bleed=t,this.ReduceDots(),this.CalculateStats()}GetEscape(){return this.escape}SetEscape(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.escape=t,this.ReduceDots(),this.CalculateStats()}GetMass(){return this.mass}SetMass(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.mass=t,this.ReduceDots(),this.CalculateStats()}GetToughness(){return this.toughness}SetToughness(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.toughness=t,this.ReduceDots(),this.CalculateStats()}GetMaxStrain(){return this.maxstrain}SetMaxStrain(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.maxstrain=t,this.ReduceDots(),this.CalculateStats()}GetReliabiilty(){return this.reliability}SetReliability(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.reliability=t,this.ReduceDots(),this.CalculateStats()}GetDrag(){return this.drag}SetDrag(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.drag=t,this.ReduceDots(),this.CalculateStats()}SetAcftStats(t){this.acft_stats=t}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u;return t.cost=Math.floor(1e-6+-this.cost*this.acft_stats.cost/10),t.liftbleed=Math.floor(1e-6+3*-this.bleed),t.escape=this.escape,t.visibility=this.escape,t.mass=Math.floor(1e-6+-this.mass*this.acft_stats.mass/10),t.toughness=Math.floor(1e-6+this.toughness*this.acft_stats.toughness/4),t.reliability=2*this.reliability,t.drag=Math.floor(1e-6+-this.drag*this.acft_stats.drag/10),t}GetElectrics(){return{storage:0,equipment:[]}}}!function(t){t[t.NONE=-1]="NONE",t[t.INTERRUPT=0]="INTERRUPT",t[t.SYNCH=1]="SYNCH",t[t.SPINNER=2]="SPINNER",t[t.DEFLECT=3]="DEFLECT",t[t.NO_INTERFERENCE=4]="NO_INTERFERENCE",t[t.ENUM_MAX=5]="ENUM_MAX"}(O||(O={})),function(t){t[t.BULLETS=0]="BULLETS",t[t.HEATRAY=1]="HEATRAY",t[t.PNEUMATIC=2]="PNEUMATIC",t[t.ENUM_MAX=3]="ENUM_MAX",t[t.GYROJETS=4]="GYROJETS"}(k||(k={})),function(t){t[t.STANDARD=0]="STANDARD",t[t.MECHANICAL=1]="MECHANICAL",t[t.GAST=2]="GAST",t[t.ROTARY=3]="ROTARY",t[t.ENUM_MAX=4]="ENUM_MAX"}(L||(L={}));class ht extends H{constructor(t,e,s,i=!1){super(),this.weapon_type=t,this.fixed=i,this.wing=!0,this.covered=!1,this.accessible=!1,this.free_accessible=!1,this.synchronization=i?O.NONE:O.INTERRUPT,this.w_count=1,this.repeating=!1,this.wing_reinforcement=!1}toJSON(){return{fixed:this.fixed,wing:this.wing,covered:this.covered,accessible:this.accessible,free_accessible:this.free_accessible,synchronization:this.synchronization,w_count:this.w_count}}fromJSON(t,e){this.fixed=t.fixed,this.wing=t.wing,this.covered=t.covered,this.accessible=t.accessible,this.free_accessible=t.free_accessible,this.synchronization=t.synchronization,this.w_count=t.w_count,e<10.95&&(this.repeating=t.repeating)}serialize(t){t.PushBool(this.fixed),t.PushBool(this.wing),t.PushBool(this.covered),t.PushBool(this.accessible),t.PushBool(this.free_accessible),t.PushNum(this.synchronization),t.PushNum(this.w_count)}deserialize(t){this.fixed=t.GetBool(),this.wing=t.GetBool(),this.covered=t.GetBool(),this.accessible=t.GetBool(),this.free_accessible=t.GetBool(),this.synchronization=t.GetNum(),this.w_count=t.GetNum(),t.version<10.95&&(this.repeating=t.GetBool())}SetWeaponType(t,e,s){this.weapon_type=t,this.action=e,16==this.weapon_type.size&&(this.w_count=1),this.SetCount(this.w_count,!1)}GetFixed(){return this.fixed}SetFixed(t){t!=this.fixed&&(t?this.fixed=!0:(this.fixed=!1,this.synchronization=O.NONE))}SetCanWing(t){this.canwing=t,this.wing&&!t&&(this.wing=!1)}GetWing(){return this.wing}CanWing(){return this.weapon_type.size<=16&&this.canwing}SetWing(t){t&&this.CanWing()?(this.wing=!0,this.free_accessible=!1,this.synchronization=O.NONE):this.wing=!1,this.CalculateStats()}CanCovered(){return this.wing?this.has_cantilever&&!(16==this.weapon_type.size&&!this.fixed):!(this.GetArty()&&!this.fixed)}GetCovered(){return this.covered}SetCovered(t){this.covered=t,this.CalculateStats()}GetAccessible(){return this.accessible||this.free_accessible}SetAccessible(t){t&&this.free_accessible&&(t=!1),this.accessible=t,this.CalculateStats()}GetFreeAccessible(){return this.free_accessible}SetFreeAccessible(t){t&&!this.wing&&this.can_free_accessible?(this.free_accessible=!0,this.accessible=!1):this.free_accessible=!1,this.CalculateStats()}CanSynchronization(){const t=[];for(let e=-1;e16;)t-=1;this.w_count=t,e&&this.CalculateStats()}CanRepeating(){return!this.weapon_type.rapid||this.weapon_type.reload>0}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:this.repeating=!1,this.CalculateStats()}ResolveSynch(){const t=this.synchronization;if(this.synchronization=O.ENUM_MAX,this.CanSynch(t))this.action==L.MECHANICAL&&t!=O.SPINNER?this.synchronization=O.SYNCH:this.synchronization=t;else{for(let t=-1;t8||16==this.weapon_type.size)&&(t.reqsections+=1),this.accessible&&(t.cost+=Math.max(1,Math.floor(1e-6+this.w_count/2))),!this.fixed)if(e<=2);else if(e<=4)t.cost+=1;else if(e<=8)t.mass+=1,t.cost+=3;else{if(!(e<=16))throw"Weapon size screwup in Turret size cost.";t.mass+=2,t.cost+=5}return this.synchronization==O.INTERRUPT?(t.cost+=2*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=2*this.w_count),t.era.push({name:h("Interruptor Gear"),era:h("WWI")})):this.synchronization==O.SYNCH&&this.action!=L.MECHANICAL?(t.cost+=3*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=3*this.w_count),t.era.push({name:h("Synchronization Gear"),era:h("Roaring 20s")})):this.synchronization==O.DEFLECT?(t.cost+=1,t.warnings.push({source:h(this.weapon_type.name),warning:h("Deflector Plate Warning"),color:c.WHITE})):this.synchronization!=O.NO_INTERFERENCE||this.IsLightningArc()||t.warnings.push({source:h(this.weapon_type.name)+" "+h("No Interference"),warning:h("No Interference Warning"),color:c.YELLOW}),this.wing_reinforcement&&(t.mass+=2),t.Round(),t}GetElectrics(){return{storage:0,equipment:[]}}}class ct extends H{constructor(t,e){super(),this.weapon_list=t,this.wl_permute=e,this.directions=[...Array(6).fill(!1)],this.directions[0]=!0,this.fixed=!0,this.ammo=1,this.weapon_type=0,this.raw_weapon_type=0,this.weapons=[],this.action_sel=L.STANDARD,this.projectile_sel=k.BULLETS,this.has_propeller=!0,this.sticky_guns=0,this.repeating=!1,this.seat=0,this.final_weapon={name:"",abrv:"",era:"",size:0,stats:new u,damage:0,hits:0,ammo:0,ap:0,jam:"",reload:0,rapid:!1,synched:!1,shells:!1,can_action:!1,can_projectile:!1,deflection:0},this.MakeFinalWeapon(),this.SWC(1)}toJSON(){const t=[];for(const e of this.weapons)t.push(e.toJSON());return{weapon_type:this.raw_weapon_type,fixed:this.fixed,directions:this.directions,weapons:t,ammo:this.ammo,action:this.action_sel,projectile:this.projectile_sel,repeating:this.repeating,seat:this.seat}}fromJSON(t,e){this.raw_weapon_type=t.weapon_type,this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.fixed,this.directions=b(t.directions,this.directions.length),this.weapons=[],this.ammo=t.ammo,null==this.ammo&&(this.ammo=1),e<10.25?(this.action_sel=L.STANDARD,this.projectile_sel=k.BULLETS):(this.action_sel=t.action,this.projectile_sel=t.projectile),e<11.75&&(this.projectile_sel==k.PNEUMATIC?this.projectile_sel=k.BULLETS:this.projectile_sel==k.ENUM_MAX&&(this.projectile_sel=k.PNEUMATIC)),this.MakeFinalWeapon();for(const s of t.weapons){const t=new ht(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),t.fromJSON(s,e),this.weapons.push(t)}if(e<10.95){this.repeating=!1;for(const t of this.weapons)this.repeating=this.repeating||t.GetRepeating()}else this.repeating=t.repeating;this.seat=e>11.65?t.seat:0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}serialize(t){t.PushNum(this.raw_weapon_type),t.PushBool(this.fixed),t.PushBoolArr(this.directions),t.PushNum(this.ammo),t.PushNum(this.weapons.length);for(const e of this.weapons)e.serialize(t);t.PushNum(this.action_sel),t.PushNum(this.projectile_sel),t.PushBool(this.repeating),t.PushNum(this.seat)}deserialize(t){this.raw_weapon_type=t.GetNum(),this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.GetBool(),this.directions=t.GetBoolArr(this.directions.length),this.ammo=t.GetNum();const e=t.GetNum();this.weapons=[],this.MakeFinalWeapon();for(let s=0;s11.65?this.seat=t.GetNum():this.seat=0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}GetWeaponSelected(){return this.weapon_type}MakeFinalWeapon(){const t=this.weapon_type;if(this.final_weapon.can_action=this.weapon_list[t].can_action,this.final_weapon.can_projectile=this.weapon_list[t].can_projectile,this.final_weapon.ammo=this.weapon_list[t].ammo,this.final_weapon.ap=this.weapon_list[t].ap,this.final_weapon.damage=this.weapon_list[t].damage,this.final_weapon.era=this.weapon_list[t].era,this.final_weapon.name=this.weapon_list[t].name,this.final_weapon.abrv=this.weapon_list[t].abrv,this.final_weapon.reload=this.weapon_list[t].reload,this.final_weapon.shells=this.weapon_list[t].shells,this.final_weapon.size=this.weapon_list[t].size,this.final_weapon.stats=this.weapon_list[t].stats.Clone(),this.final_weapon.deflection=this.weapon_list[t].deflection,this.final_weapon.jam=this.weapon_list[t].jam,this.final_weapon.stats.era=[],this.final_weapon.stats.era.push({name:this.weapon_list[t].name,era:this.weapon_list[t].era}),0==this.weapon_list[t].hits&&(this.action_sel==L.MECHANICAL&&(this.action_sel=L.STANDARD),this.projectile_sel!=k.GYROJETS&&this.projectile_sel!=k.HEATRAY||(this.projectile_sel=k.BULLETS)),this.action_sel==L.STANDARD)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.synched=this.weapon_list[t].synched;else if(this.action_sel==L.MECHANICAL)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.stats.warnings.push({source:h("Mechanical Action"),warning:h("Mechanical Action Warning"),color:c.WHITE}),this.final_weapon.jam="0/0",this.final_weapon.rapid=!0,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!0,this.final_weapon.stats.era.push({name:h("Mechanical Action"),era:h("WWI")});else if(this.action_sel==L.GAST)this.final_weapon.hits=2*this.weapon_list[t].hits,this.final_weapon.ammo=this.weapon_list[t].ammo/2,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!1,this.final_weapon.stats.era.push({name:h("Gast Principle"),era:h("WWI")});else if(this.action_sel==L.ROTARY){this.final_weapon.stats.mass+=this.weapon_list[t].stats.mass,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.size+=this.weapon_list[t].size,this.final_weapon.size=Math.min(16,this.final_weapon.size),this.final_weapon.hits=3*this.weapon_list[t].hits,this.final_weapon.deflection-=1,this.final_weapon.synched=!1;const e=this.final_weapon.jam.split("/");e[0]="9999",e[1]=(parseInt(e[1])+1).toString(),this.final_weapon.jam=e.join("/"),this.final_weapon.stats.era.push({name:h("Rotary_Gun"),era:h("WWI")})}if(this.repeating&&0!=this.final_weapon.reload&&(this.final_weapon.reload=0,this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost))),this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=k.HEATRAY||(this.projectile_sel=k.BULLETS),this.action_sel!=L.GAST&&this.action_sel!=L.ROTARY&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=k.PNEUMATIC||(this.projectile_sel=k.BULLETS),this.projectile_sel==k.HEATRAY)this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.shells=!1,this.final_weapon.ammo=0,this.final_weapon.deflection=0,this.final_weapon.ap=Math.max(0,this.final_weapon.ap-1),this.final_weapon.stats.warnings.push({source:h("Heat Ray"),warning:h("Heat Ray Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Heat Ray"),era:h("Himmilgard")});else if(this.projectile_sel==k.GYROJETS)this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost)),this.final_weapon.shells=!1,this.final_weapon.damage-=1,this.final_weapon.stats.warnings.push({source:h("Gyrojets"),warning:h("Gyrojets Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Gyrojets"),era:h("Roaring 20s")});else if(this.projectile_sel==k.PNEUMATIC){if(this.final_weapon.ammo*=2,this.final_weapon.shells=!1,this.final_weapon.rapid){const t=this.final_weapon.jam.split("/");t[1]="9999",this.final_weapon.jam=t.join("/"),this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 1"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Pneumatic"),era:h("Pioneer")})}this.final_weapon.hits>0&&this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 2"),color:c.WHITE})}0!=this.final_weapon.deflection&&this.final_weapon.stats.warnings.push({source:h(this.final_weapon.name),warning:h("Deflection Warning",this.final_weapon.deflection),color:c.WHITE})}SetWeaponSelected(t){const e=this.IsLightningArc();if(this.weapon_type=t,this.raw_weapon_type=this.wl_permute.findIndex((e=>e==t)),16==this.weapon_list[t].size)for(;this.weapons.length>1;)this.weapons.pop();this.weapon_list[t].can_action&&this.GetCanAction()[this.action_sel]||(this.action_sel=L.STANDARD),this.weapon_list[t].can_projectile&&this.GetCanProjectile()[this.projectile_sel]||(this.projectile_sel=k.BULLETS),this.weapon_list[t].rapid?this.repeating=!1:this.repeating||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD),this.CanRepeating()||(this.repeating=!1),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);if(this.IsLightningArc()){this.SetFixed(!0),this.directions[0]=!0;for(let t=1;t0)&&this.weapon_list[this.weapon_type].ammo>0&&"Precision Rifle"!=this.weapon_list[this.weapon_type].name}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:(this.repeating=!1,this.weapon_list[this.weapon_type].rapid||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD)),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);this.CalculateStats()}GetFixed(){return this.fixed}SetFixed(t){if(this.IsLightningArc()&&(t=!0),this.fixed!=t){this.fixed=t;for(const t of this.weapons)t.SetFixed(this.fixed);if(t){let t=!1;for(let e=0;ethis.weapons.length;){const t=new ht(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),this.weapons.push(t)}for(;t1||this.weapons[0].GetCount()>1}SetAmmo(t){(t!=t||t<1)&&(t=1),t=Math.floor(1e-6+t),this.ammo=t,this.CalculateStats()}SetHavePropeller(t){this.has_propeller&&!t&&this.action_sel==L.MECHANICAL&&(this.has_propeller=t,this.SetAction(L.STANDARD)),this.has_propeller=t}SetCanWing(t){for(const e of this.weapons)e.SetCanWing(t)}GetAction(){return this.action_sel}GetCanAction(){return[!0,this.has_propeller&&this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].hits>0&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].rapid]}SetAction(t){if(this.final_weapon.can_action){this.action_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.action_sel=L.STANDARD;this.CalculateStats()}GetCanProjectile(){return[!0,this.final_weapon.can_projectile&&this.action_sel!=L.MECHANICAL&&this.action_sel!=L.GAST&&this.weapon_list[this.weapon_type].hits>0,this.final_weapon.can_projectile&&this.action_sel!=L.ROTARY&&this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL]}GetProjectile(){return this.projectile_sel}SetProjectile(t){if(this.final_weapon.can_projectile){this.projectile_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.projectile_sel=k.BULLETS;this.CalculateStats()}GetFinalWeapon(){return this.final_weapon}SetStickyGuns(t){this.sticky_guns=t}GetHRCharges(){if(this.IsLightningArc())return[3];let t=0;for(const e of this.weapons)t+=e.GetCount();if(this.final_weapon.hits>0){let e=this.weapon_list[this.weapon_type].stats.cost;return this.action_sel==L.ROTARY&&(e*=2),this.final_weapon.rapid?[t*e,Math.max(t*e+1,Math.floor(1e-6+1.5*t*e))]:[t*e]}return"Scattergun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(1.875001),Math.floor(3.125001)]:[Math.floor(1.875001)]:"Punt Gun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(3.750001),Math.floor(6.250001)]:[Math.floor(3.750001)]:void 0}GetShots(){return Math.max(1,Math.floor(1e-6+this.final_weapon.ammo*this.ammo))}IsLightningArc(){return"Lightning Arc"==this.final_weapon.name}GetReload(){return this.final_weapon.reload}GetWingWeight(){let t=0;for(const e of this.weapons)e.GetWing()&&(t+=e.PartStats().mass);return t}GetDirectionCount(){let t=0;for(const e of this.directions)e&&t++;return t}SetSeat(t){this.seat=t,this.CalculateStats()}GetSeat(){return this.seat}GetIsFullyAccessible(){for(const t of this.weapons)if(!t.GetAccessible())return!1;return!0}GetIsPartlyAccessible(){for(const t of this.weapons)if(t.GetAccessible())return!0;return!1}SetCalculateStats(t){this.CalculateStats=t;for(const e of this.weapons)e.SetCalculateStats(t)}PartStats(){var t=new u;let e=this.GetDirectionCount(),s=0;for(const i of this.weapons)i.has_cantilever=this.has_cantilever,i.SetTurret(e>2),t=t.Add(i.PartStats()),s+=i.GetCount(),this.fixed||(2==e?t.cost+=1:3==e||4==e?t.cost+=2:5==e?t.cost+=3:6==e&&(t.cost+=4));return(this.projectile_sel==k.HEATRAY||this.IsLightningArc())&&(this.ammo=1),t.mass+=(this.ammo-1)*s,t}GetElectrics(){return{storage:0,equipment:[]}}}const ut=JSON.parse('{"A":[{"name":"Submachine Gun","abrv":"SMG","era":"WWI","cost":1,"mass":1,"drag":0,"damage":1,"hits":4,"ap":0,"ammo":10,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"0/1","reload":2,"size":1,"can_action":true,"can_projectile":true,"deflection":0,"warning":"SMG Warning"},{"name":"Scattergun","abrv":"SG","era":"Pioneer","cost":2,"mass":2,"drag":2,"damage":0.5,"hits":0,"ap":0,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Scattergun Warning","size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Machine Gun","abrv":"LMG","era":"WWI","cost":2,"mass":2,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"1/2","reload":2,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Machine Gun","abrv":"MG","era":"WWI","cost":2,"mass":3,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":10,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"1/2","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Balloon Gun","abrv":"BMG","era":"WWI","cost":3,"mass":3,"drag":1,"damage":2,"hits":4,"ap":0,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":-2},{"name":"Enhanced Machine Gun","abrv":"EMG","era":"Coming Storm","cost":3,"mass":2,"drag":1,"damage":2,"hits":5,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"0/0","reload":0,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Enhanced Heavy Machine Gun","abrv":"EHMG","era":"Coming Storm","cost":5,"mass":3,"drag":2,"damage":4,"hits":5,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Punt Gun","abrv":"PG","era":"Pioneer","cost":4,"mass":4,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Punt Gun Warning","size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Repeating Cannon","abrv":"LRC","era":"WWI","cost":4,"mass":4,"drag":3,"damage":8,"hits":3,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"2/5","reload":2,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Heavy Cannon","abrv":"HC","era":"WWI","cost":6,"mass":5,"drag":2,"damage":16,"hits":1,"ap":2,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Light Machine Cannon","abrv":"LMC","era":"Coming Storm","cost":8,"mass":4,"drag":3,"damage":8,"hits":4,"ap":4,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Machine Cannon","abrv":"HMC","era":"WWII","cost":12,"mass":5,"drag":4,"damage":12,"hits":3,"ap":4,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Fliergerflammenwerfer","abrv":"FFW","era":"WWI","cost":5,"mass":1,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0/0","reload":0,"warning":"Fliergerflammenwerfer Warning","size":8,"can_action":false,"can_projectile":false,"deflection":0},{"name":"Recoilless Cannon","abrv":"RC","era":"WWI","cost":5,"mass":8,"drag":3,"damage":30,"hits":1,"ap":3,"ammo":3,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":-5},{"name":"Autocannon","abrv":"AC","era":"WWII","cost":15,"mass":8,"drag":5,"damage":24,"hits":2,"ap":5,"ammo":2,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Battle Cannon","abrv":"BC","era":"WWII","cost":15,"mass":40,"drag":8,"damage":24,"hits":2,"ap":5,"ammo":1,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Precision Rifle","abrv":"PR","era":"WWI","mass":1,"drag":1,"cost":2,"damage":5,"hits":10,"ap":2,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":2,"can_action":false,"can_projectile":false,"warning":"Precision Rifle Warning","deflection":0},{"name":"Lightning Arc","abrv":"LA","era":"Himmilgard","cost":8,"mass":5,"drag":3,"damage":0,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0","reload":0,"size":16,"can_action":false,"can_projectile":false,"warning":"Lightning Arc Warning","deflection":0},{"name":"Harpoon Launcher","abrv":"HL","era":"Himmilgard","cost":3,"mass":3,"drag":2,"damage":4,"hits":1,"ap":1,"ammo":2,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":0,"reload":1,"size":4,"can_action":false,"can_projectile":false,"warning":"Harpoon Launcher Warning","deflection":0},{"name":"Heavy Machine Gun","abrv":"HMG","era":"WWI","cost":4,"mass":4,"drag":2,"damage":4,"hits":4,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Repeating Cannon","abrv":"HRC","era":"WWI","cost":10,"mass":6,"drag":4,"damage":16,"hits":2,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"4/6","reload":2,"size":16,"can_action":true,"can_projectile":true,"deflection":-3}]}');class mt extends H{constructor(){super(),this.direction_list=["Forward","Rearward","Up","Down","Left","Right"],this.synchronization_list=["None","Interruptor Gear","Synchronization Gear","Spinner Gun","Deflector Plate","No Interference"],this.action_list=[{name:"Standard Action"},{name:"Mechanical Action"},{name:"Gast Principle"},{name:"Rotary_Gun"}],this.projectile_list=[{name:"Standard"},{name:"Heat Ray"},{name:"Pneumatic"}],this.weapon_list=[];for(const t of ut.A){const e={name:t.name,abrv:t.abrv,era:t.era,size:t.size,stats:new u(t),damage:t.damage,hits:t.hits,ammo:t.ammo,ap:t.ap,jam:t.jam.toString(),reload:t.reload,rapid:t.rapid,synched:t.synched,shells:t.shells,can_action:t.can_action,can_projectile:t.can_projectile,deflection:t.deflection};this.weapon_list.push(e)}const t=(t,e)=>{const s=(t,e)=>tt(this.weapon_list[e],this.weapon_list[s])));const e=[];for(let t=0;te==t)));this.wl_permute=e,this.weapon_list=this.weapon_list.sort(t),this.weapon_sets=[],this.brace_count=0,this.isheli=!1}toJSON(){const t=[];for(const e of this.weapon_sets)t.push(e.toJSON());return{weapon_systems:t,brace_count:this.brace_count}}fromJSON(t,e){this.weapon_sets=[];const s=t.weapon_systems;for(const t of s){const s=new ct(this.weapon_list,this.wl_permute);s.SetCalculateStats(this.CalculateStats),s.fromJSON(t,e),this.weapon_sets.push(s)}e>10.35&&(this.brace_count=t.brace_count)}serialize(t){t.PushNum(this.weapon_sets.length);for(const e of this.weapon_sets)e.serialize(t);t.PushNum(this.brace_count)}deserialize(t){this.weapon_sets=[];const e=t.GetNum();for(let s=0;s10.35&&(this.brace_count=t.GetNum())}GetWeaponList(){return this.weapon_list}GetDirectionList(){return this.direction_list}GetSynchronizationList(){return this.synchronization_list}SetWeaponSetCount(t){for((t!=t||t<1)&&(t=0),t=Math.floor(1e-6+t);t>this.weapon_sets.length;){const t=new ct(this.weapon_list,this.wl_permute);t.SetCalculateStats(this.CalculateStats),this.weapon_sets.push(t)}for(;t=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER)return void e[t].SetSynchronization(O.INTERRUPT)}}RemoveOneArtyTractorSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(O.NO_INTERFERENCE)}}RemoveOnePusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER)return void e[t].SetSynchronization(O.INTERRUPT)}}RemoveOneArtyPusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(O.NO_INTERFERENCE)}}CanTractorSpinner(){return this.CountTractorSpinner()+this.CountArtyTractorSpinner()this.tractor_arty_spinner_count;)this.RemoveOneArtyTractorSpinner();for(;this.CountTractorSpinner()>this.tractor_spinner_count;)this.RemoveOneTractorSpinner();for(;this.CountArtyPusherSpinner()>this.pusher_arty_spinner_count;)this.RemoveOneArtyPusherSpinner();for(;this.CountPusherSpinner()>this.pusher_spinner_count;)this.RemoveOnePusherSpinner();var e=0,s=0;0==this.cant_type?(e=4,s=2):1==this.cant_type?(e=8,s=4):(e=16,s=8);const i=[];for(const t of this.weapon_sets)for(const e of t.GetWeapons()){e.wing_reinforcement=!1;const s={total:0,count:0,sz:0,w:e};e.GetWing()&&(s.count=e.GetCount(),s.sz=this.weapon_list[t.GetWeaponSelected()].size,s.total=s.count*s.sz,i.push(s))}i.sort((function(t,e){return t.total-e.total}));for(const t of i)e>=0&&(s0,t=t.Add(e.PartStats());return t.cost+=this.brace_count/3,this.brace_count>0&&t.warnings.push({source:h("Weapons Braces"),warning:h("Weapons Braces Warning"),color:c.WHITE}),t.control-=Math.floor(1e-6+this.GetWingWeight()/5),t}GetElectrics(){const t={storage:0,equipment:[]};for(let e=0;e11.55&&(this.blade_idx=t.blade_idx),e<12.45&&(this.rotor_span=0),this.rotor_thickness=e<12.55?0:t.rotor_thickness,this.dryMP=-1}serialize(t){t.PushNum(this.type),t.PushNum(this.rotor_count),t.PushNum(this.rotor_span),t.PushNum(this.cant_idx),t.PushNum(this.stagger_sel),t.PushBool(this.accessory),t.PushNum(this.blade_idx),t.PushNum(this.rotor_thickness)}deserialise(t){this.type=t.GetNum(),this.rotor_count=t.GetNum(),this.rotor_span=t.GetNum(),this.cant_idx=t.GetNum(),t.version<12.35?(t.GetBool(),this.stagger_sel=0):this.stagger_sel=t.GetNum(),this.accessory=t.GetBool(),t.version>11.55&&(this.blade_idx=t.GetNum()),t.version<12.45&&(this.rotor_span=0),t.version<12.55?this.rotor_thickness=0:this.rotor_thickness=t.GetNum(),this.dryMP=-1}SetCantileverList(t){this.cant_list=t}GetCantileverList(){return this.cant_list}SetCantilever(t){this.cant_idx=t,this.CalculateStats()}GetCantilever(){return this.cant_idx}SetRotorThickness(t){t<0&&(t=0),this.rotor_thickness=Math.floor(1e-6+t),this.CalculateStats()}GetRotorThickness(){return this.rotor_thickness}SetType(t){this.type!=t&&(this.accessory=!1,this.cant_idx=0,this.stagger_sel=0,this.rotor_count=1,this.type=t,this.rotor_span=0)}CanRotorCount(){return this.type==N.HELICOPTER}SetRotorCount(t){t<1&&(t=1),t>=2&&t%2==1&&(t==this.rotor_count+1?t+=1:t-=1),this.rotor_count=t,this.rotor_count<2&&(this.stagger_sel=0),this.CalculateStats()}GetRotorCount(){return this.rotor_count}CanRotorSpan(){return this.type==N.HELICOPTER}SetRotorSpan(t){this.rotor_span=Math.floor(1e-6+t),this.CalculateStats()}GetRotorSpan(){return this.rotor_span}CanTandem(){return this.type==N.HELICOPTER&&this.rotor_count>1}SetBladeCount(t){this.blade_idx=t,this.CalculateStats()}SetWingArea(t){this.wing_area=t}GetSizingSpan(){return this.sizing_span}SetMP(t){t!=this.dryMP&&(this.dryMP=t,this.CalculateStats())}GetRotorStrain(){const t=this.GetRotorArea();return this.rotor_count*Math.max(1,2*(this.sizing_span+this.rotor_span)+t-10)}GetRotorArea(){return Math.PI/9*(this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span)}GetIdealRotorArea(){return Math.PI/9*this.sizing_span*this.sizing_span}GetRotorDrag(){if(this.type==N.HELICOPTER||this.type==N.AUTOGYRO){const t=this.GetRotorArea();return 1==this.rotor_count?Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))):Math.floor(1e-6+.75*this.rotor_count*Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))))}return 0}GetType(){return this.type}GetAccessory(){return this.accessory}SetAccessory(t){this.accessory=t,this.CalculateStats()}SetEngineCount(t){this.engine_count=t}GetTailRotor(){return this.type==N.HELICOPTER&&this.rotor_count<2}GetBladeList(){return this.blade_list}GetRotorBleed(){return this.type==N.HELICOPTER?this.blade_list[this.blade_idx].rotor_bleed:0}GetPowerFactor(){return this.stagger_list[this.stagger_sel].powerfactor}GetBladeCountIdx(){return this.blade_idx}GetStaggerList(){return this.stagger_list}GetStagger(){return this.stagger_sel}SetStagger(t){t!=this.stagger_sel&&(this.stagger_sel=t,this.CalculateStats())}CanStagger(){const t=[];for(let e=0;e=2&&3==this.stagger_list[e].count?t.push(!0):t.push(!1);return t}VerifySizes(){this.type==N.AIRPLANE?(this.rotor_count=0,this.rotor_span=0,this.stagger_sel=0):this.type==N.AUTOGYRO?(this.rotor_count=1,this.sizing_span=Math.ceil(-1e-6+Math.sqrt(.6*this.wing_area/(Math.PI/8))),this.rotor_span=Math.max(this.rotor_span,2-this.sizing_span),this.stagger_sel=0):this.type==N.HELICOPTER&&(this.rotor_count=Math.max(1,this.rotor_count),this.rotor_count>1&&this.rotor_count%2==1&&(this.rotor_count=this.rotor_count-1),-1!=this.dryMP?(1==this.rotor_count?this.sizing_span=Math.ceil(5*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6):this.sizing_span=Math.ceil(4*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6),this.sizing_span=Math.min(100,this.sizing_span),this.rotor_span=Math.max(this.rotor_span,-Math.floor(1e-6+this.sizing_span/2))):this.sizing_span=10)}VerifyStagger(){if(this.rotor_count>2&&this.stagger_list[this.stagger_sel].count<=2){for(let t=0;t{var s=document.getElementById(t);s.classList.toggle("active",e);var i=s.nextElementSibling;(i=i.nextElementSibling).style.maxHeight=e?"inherit":"0px"};class kt{}class Lt extends kt{constructor(t){super(),this.weap=t,document.getElementById("lbl_weapons").textContent=h("Weapons Section Title"),document.getElementById("lbl_num_wsets").textContent=h("Weapons Number of Weapon Sets"),this.inp_w_count=document.getElementById("num_wsets"),this.inp_w_count.onchange=()=>{this.weap.SetWeaponSetCount(this.inp_w_count.valueAsNumber)},document.getElementById("lbl_num_wbraces").textContent=h("Weapons Number of Weapon Braces"),this.inp_w_brace=document.getElementById("num_wbraces"),this.inp_w_brace.onchange=()=>{this.weap.SetBraceCount(this.inp_w_brace.valueAsNumber)},this.tbl=document.getElementById("table_weapons"),this.wrow=[]}CreateWSetRow(){const t=document.createDocumentFragment(),e=this.tbl.insertRow(),s=function(t,e){const s=document.createElement("TD");return s.innerHTML="",t.appendChild(s),s}(e),i=document.createElement("SPAN");St(e,h("Weapons Weapons")),St(e,h("Weapons Weapon Stats"));const a=xt(t),n=a.insertCell(),r={plus:document.createElement("BUTTON"),minus:document.createElement("BUTTON"),type:document.createElement("SELECT"),dirs:[],count:document.createElement("INPUT"),action:document.createElement("SELECT"),projectile:document.createElement("SELECT"),fixed:document.createElement("INPUT"),wcell:null,weaps:[],ammo:document.createElement("INPUT"),stats:{mass:null,drag:null,cost:null,sect:null,mounting:null,jams:null,hits:null,damg:null,shots:null,shots_header:null},repeating:document.createElement("INPUT"),seat:document.createElement("SELECT")},o=this.weap.GetWeaponList();for(const t of o){const e=document.createElement("OPTION");e.text=h(t.name)+" ("+h(t.era)+")",r.type.add(e)}r.type.required=!0;const l=this.weap.GetSeatList();for(const t of l){const e=document.createElement("OPTION");e.text=t,r.seat.add(e)}const c=this.weap.GetActionList();for(const t of c){const e=document.createElement("OPTION");e.text=h(t.name),r.action.add(e)}r.action.required=!0;const u=this.weap.GetProjectileList();for(const t of u){const e=document.createElement("OPTION");e.text=h(t.name),r.projectile.add(e)}r.projectile.required=!0,r.plus.textContent="+",r.minus.textContent="-";const m=bt(n);i.appendChild(r.minus),i.appendChild(r.plus);const p=St(i,h("Weapons Weapon Set"));p.style.border="none",p.style.width="100%",p.style.padding="0",i.style.display="inline-flex",i.style.width="100%",s.appendChild(i),Bt(h("Weapons Type"),r.type,m),Bt(h("Seat Location"),r.seat,m);const d=bt(m.div1),g=bt(m.div2);wt(h("Weapons Number of Mounts"),r.count,d),wt(h("Weapons Ammunition"),r.ammo,g),Bt(h("Weapons Action"),r.action,d),Bt(h("Weapons Projectile"),r.projectile,g),Pt(h("Weapons Belt Fed"),r.repeating,d),Rt(g),Pt(h("Fixed"),r.fixed,d),Rt(g);const _=this.weap.GetDirectionList();for(let t=0;t<_.length;t+=2){const e=h(_[t]);var f=document.createElement("INPUT");Pt(e,f,d),r.dirs.push(f),Pt(h(_[t+1]),f=document.createElement("INPUT"),g),r.dirs.push(f)}r.wcell=a.insertCell();const A=a.insertCell();A.classList.toggle("inner_table");const b=document.createElement("TABLE");b.classList.toggle("inner_table"),A.appendChild(b);const S=b.insertRow();St(S,h("Stat Mass")),St(S,h("Stat Drag")),St(S,h("Stat Cost"));const y=b.insertRow();r.stats.mass=y.insertCell(),r.stats.drag=y.insertCell(),r.stats.cost=y.insertCell();const w=b.insertRow();St(w,h("Stat Required Sections")),St(w,h("Weapons Stat Mounting")),St(w,h("Weapons Stat Jam"));const C=b.insertRow();r.stats.sect=C.insertCell(),r.stats.mounting=C.insertCell(),r.stats.jams=C.insertCell();const B=b.insertRow();St(B,h("Weapons Stat Hits")),St(B,h("Weapons Stat Damage")),r.stats.shots_header=St(B,h("Weapons Stat Shots"));const E=b.insertRow();return r.stats.hits=E.insertCell(),r.stats.damg=E.insertCell(),r.stats.shots=E.insertCell(),this.tbl.appendChild(t),r}CreateWRow(t){const e={span:document.createElement("SPAN"),wing:document.createElement("INPUT"),covered:document.createElement("INPUT"),accessible:document.createElement("INPUT"),free_access:document.createElement("INPUT"),synch:document.createElement("SELECT"),count:document.createElement("INPUT")};Et(h("Weapons Wing Mount"),e.wing,e.span,!1),Et(h("Weapons Accessible"),e.accessible,e.span,!1),Et(h("Weapons Free Accessible"),e.free_access,e.span,!1),Et(h("Weapons Covered"),e.covered,e.span,!0),yt(h("Weapons # Weapons at Mount"),e.count,e.span,!1),function(t,e,s,i=!0){const a=document.createElement("SPAN"),n=document.createElement("LABEL");e.id=At(),n.htmlFor=e.id,n.style.marginLeft="0.25em",n.style.marginRight="0.5em",n.textContent=t,a.appendChild(n),a.appendChild(e),s.appendChild(a),i&&s.appendChild(document.createElement("BR"))}(h("Weapons Synchronization"),e.synch,e.span,!1),e.span.appendChild(document.createElement("HR"));const s=this.weap.GetSynchronizationList();for(const t of s){const s=document.createElement("OPTION");s.text=h(t),e.synch.add(s)}return t.appendChild(e.span),e}UpdateWSet(t,e){e.type.selectedIndex=t.GetWeaponSelected(),e.type.onchange=()=>{t.SetWeaponSelected(e.type.selectedIndex)};const s=this.weap.GetSeatList();if(e.seat.options.length!=s.length){for(;e.seat.options.length>0;)e.seat.options.remove(e.seat.options.length-1);for(const t of s){const s=document.createElement("OPTION");s.text=t,e.seat.add(s)}}e.seat.selectedIndex=t.GetSeat(),e.seat.onchange=()=>{t.SetSeat(e.seat.selectedIndex)},e.count.valueAsNumber=t.GetMountingCount(),e.count.onchange=()=>{t.SetMountingCount(e.count.valueAsNumber)},e.action.selectedIndex=t.GetAction();const i=t.GetCanAction();i[3]=!1;for(let t=0;t{t.SetAction(e.action.selectedIndex)},e.projectile.selectedIndex=t.GetProjectile();const a=t.GetCanProjectile();for(let t=0;t{t.SetProjectile(e.projectile.selectedIndex)},e.repeating.checked=t.GetRepeating(),e.repeating.onchange=()=>{t.SetRepeating(e.repeating.checked)},e.repeating.disabled=!t.CanRepeating(),e.fixed.checked=t.GetFixed(),e.fixed.onchange=()=>{t.SetFixed(e.fixed.checked)};const r=t.GetDirection(),o=t.CanDirection();for(let s=0;s{t.SetDirection(s,e.dirs[s].checked)},e.dirs[s].disabled=!o[s];e.ammo.valueAsNumber=t.GetAmmo(),e.ammo.onchange=()=>{t.SetAmmo(e.ammo.valueAsNumber)};const l=t.GetWeapons();for(;e.weaps.lengthl.length;){const t=e.weaps.pop();e.wcell.removeChild(t.span)}for(let t=0;t{l[t].SetWing(e.weaps[t].wing.checked)},e.weaps[t].wing.disabled=!l[t].CanWing(),e.weaps[t].covered.checked=l[t].GetCovered(),e.weaps[t].covered.onchange=()=>{l[t].SetCovered(e.weaps[t].covered.checked)},e.weaps[t].covered.disabled=!l[t].CanCovered(),e.weaps[t].accessible.checked=l[t].GetAccessible(),e.weaps[t].accessible.onchange=()=>{l[t].SetAccessible(e.weaps[t].accessible.checked)},e.weaps[t].free_access.checked=l[t].GetFreeAccessible(),e.weaps[t].free_access.onchange=()=>{l[t].SetFreeAccessible(e.weaps[t].free_access.checked)},e.weaps[t].free_access.disabled=!(l[t].can_free_accessible||l[t].GetFreeAccessible()),e.weaps[t].count.valueAsNumber=l[t].GetCount(),e.weaps[t].count.onchange=()=>{l[t].SetCount(e.weaps[t].count.valueAsNumber)},e.weaps[t].synch.selectedIndex=l[t].GetSynchronization()+1,e.weaps[t].synch.onchange=()=>{l[t].SetSynchronization(e.weaps[t].synch.selectedIndex-1)},e.weaps[t].synch.disabled=!l[t].can_synchronize;const s=l[t].CanSynchronization();for(let i=0;ithis.wrow.length;)this.wrow.push(this.CreateWSetRow());for(;t.length{this.weap.DuplicateSet(e)},this.wrow[e].minus.onclick=()=>{this.weap.RemoveSet(e)},this.UpdateWSet(t[e],this.wrow[e])}UpdateDisplay(){this.UpdateWSets(),this.inp_w_count.valueAsNumber=this.weap.GetWeaponSets().length,this.inp_w_brace.valueAsNumber=this.weap.GetBraceCount()}}function Wt(t,e){const s=t.GetDirection();let i=0;for(const t of s)t&&i++;let a="";return 1==i&&t.GetFixed()?a+=h("Fixed")+" ":a+=i<=2?h("Flexible")+" ":h("Turreted")+" ",t.GetAction()==L.MECHANICAL?a+=h("Weapon Tag Mechanical Action")+" ":t.GetAction()==L.GAST?a+=h("Weapon Tag Gast Principle")+" ":t.GetAction()==L.ROTARY&&(a+=h("Weapon Tag Rotary")+" "),t.GetProjectile()==k.HEATRAY?a+=h("Weapon Tag Heat Ray")+" ":t.GetProjectile()==k.GYROJETS?a+=h("Weapon Tag Gyrojet")+" ":t.GetProjectile()==k.PNEUMATIC&&(a+=h("Weapon Tag Pneumatic")+" "),a+=e[t.GetWeaponSelected()].abrv,a}function Ht(t){const e=[h("Weapon Tag Jam",t.GetJam())],s=t.GetFinalWeapon();return t.GetReload()>0&&(1==t.GetReload()?e.push(h("Weapon Tag Manual")):e.push(h("Weapon Tag Reload",t.GetReload()))),s.rapid&&e.push(h("Weapon Tag Rapid Fire")),s.shells&&e.push(h("Weapon Tag Shells")),s.ap>0&&e.push(h("Weapon Tag AP",s.ap)),t.GetIsFullyAccessible()?e.push(h("Weapon Tag Fully Accessible")):t.GetIsPartlyAccessible()?e.push(h("Weapon Tag Partly Accessible")):e.push(h("Weapon Tag Inaccessible")),s.deflection&&e.push(h("Weapon Tag Awkward",s.deflection)),e}function qt(t,e,s){var i="";const a=t.GetDirection(),r=[];for(let t=0;t{this.CalculateStats()})),this.cockpits.SetCalculateStats((()=>{this.CalculateStats()})),this.passengers.SetCalculateStats((()=>{this.CalculateStats()})),this.engines.SetCalculateStats((()=>{this.CalculateStats()})),this.propeller.SetCalculateStats((()=>{this.CalculateStats()})),this.frames.SetCalculateStats((()=>{this.CalculateStats()})),this.wings.SetCalculateStats((()=>{this.CalculateStats()})),this.stabilizers.SetCalculateStats((()=>{this.CalculateStats()})),this.controlsurfaces.SetCalculateStats((()=>{this.CalculateStats()})),this.reinforcements.SetCalculateStats((()=>{this.CalculateStats()})),this.fuel.SetCalculateStats((()=>{this.CalculateStats()})),this.munitions.SetCalculateStats((()=>{this.CalculateStats()})),this.cargo.SetCalculateStats((()=>{this.CalculateStats()})),this.gear.SetCalculateStats((()=>{this.CalculateStats()})),this.accessories.SetCalculateStats((()=>{this.CalculateStats()})),this.optimization.SetCalculateStats((()=>{this.CalculateStats()})),this.weapons.SetCalculateStats((()=>{this.CalculateStats()})),this.used.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCalculateStats((()=>{this.CalculateStats()})),this.alter.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCantileverList(this.reinforcements.GetCantileverList()),this.cockpits.SetNumberOfCockpits(1),this.engines.SetNumberOfEngines(1),this.frames.SetTailType(1),this.use_storage=e,this.updated_stats=!1,this.freeze_calculation=!1,this.aircraft_type=N.AIRPLANE,this.Reset()}InteractiveDash(){const t=this.GetStats(),e=this.GetDerivedStats(),s=this.VitalComponentList();for(var i=!1;s.length>10;)s.pop(),i=!0;for(i&&(s.pop(),s.push("And More. See Plane Builder for full list."));s.length<10;)s.push("");const a=this.GetAccessories().GetEffectiveCoverage();var n="";for(let t=0;t0&&(n+=""!=n?", ":h("Armour")+" ",n+=e.toString()+"/+"+(11-a[t]).toString())}const r=[],o=this.GetMunitions().GetBombCount(),l=this.GetMunitions().GetRocketCount();var c=this.GetMunitions().GetInternalBombCount();if((o>0||l>0)&&r.push("Current load here."),o>0){const t=Math.min(o,c),e=Math.max(0,o-t);if(t>0&&r.push(h(" Bomb Mass Internally.",t)),e>0&&r.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.GetMunitions().GetMaxBombSize());r.push(h("Largest Internal Bomb",e.toString()))}c-=t}if(l>0){const t=Math.min(l,c),e=Math.max(0,l-t);t>0&&r.push(h(" Rocket Mass Internally.",t)),e>0&&r.push(h(" Rocket Mass Externally.",e))}for(;r.length<5;)r.push("");let u="";for(const e of t.warnings)u+=e.source+": "+e.warning+"\n";const m={altitude:0,airspeed:0,fuel:e.FuelUses,dropoff:e.Dropoff,visibility:this.GetCockpits().GetCockpit(0).GetVisibility(),energy_loss:e.EnergyLoss,turn_bleed:e.TurnBleed,stability:e.Stabiilty,stress:this.GetCockpits().GetCockpit(0).GetFlightStress()[0],plane_escape:this.GetCockpits().GetCockpit(0).GetEscape(),crash:this.GetCockpits().GetCockpit(0).GetCrash(),max_toughness:e.Toughness,current_toughness:e.Toughness,max_strain:e.MaxStrain,current_strain:e.MaxStrain,g_force:0,kills:0,full_load_boost:e.BoostFullwBombs,full_load_handling:e.HandlingFullwBombs,full_load_climb:e.RateOfClimbwBombs,full_load_stall:e.StallSpeedFullwBombs,full_load_speed:e.MaxSpeedwBombs,half_fuel_bombs_boost:Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),half_fuel_bombs_handling:Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),half_fuel_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),half_fuel_bombs_stall:Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),half_fuel_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),full_fuel_no_bombs_boost:e.BoostFull,full_fuel_no_bombs_handling:e.HandlingFull,full_fuel_no_bombs_climb:e.RateOfClimbFull,full_fuel_no_bombs_stall:e.StallSpeedFull,full_fuel_no_bombs_speed:Math.floor(1e-6+e.MaxSpeedFull),half_fuel_no_bombs_boost:Math.floor((e.BoostFull+e.BoostEmpty)/2),half_fuel_no_bombs_handling:Math.floor((e.HandlingFull+e.HandlingEmpty)/2),half_fuel_no_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),half_fuel_no_bombs_stall:Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),half_fuel_no_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),empty_boost:0,empty_handling:e.HandlingEmpty,empty_climb:0,empty_stall:e.StallSpeedEmpty,empty_speed:0,vital_part_1:s[0],vital_part_2:s[1],vital_part_3:s[2],vital_part_4:s[3],vital_part_5:s[4],vital_part_6:s[5],vital_part_7:s[6],vital_part_8:s[7],vital_part_9:s[8],vital_part_10:s[9],armor:n,max_bomb_load:r[0],ordinance_1:r[1],ordinance_2:r[2],ordinance_3:r[3],ordinance_4:r[4],notes:u,full_load_selected:!0,half_fuel_bombs_selected:!1,full_fuel_no_bombs_selected:!1,half_fuel_no_bombs_selected:!1,empty_selected:!1,engines:this.InteractiveEngines(),weapons:this.InteractiveWeapons()};return JSON.stringify(m)}InteractiveEngines(){const t=[];for(let e=0;e0&&t.starter&&r.push(h("Starter"))}else{s.IsRotary()&&s.IsTractor()?r.push(h("Turns Right")):s.IsRotary()&&s.IsPusher()&&r.push(h("Turns Left"));const t=T().get(s.GetSelectedList()).get_name(a.name);t.upgrades[1]?r.push(h("War Emergency Power")):t.compressor_count>0&&1==t.compressor_type&&r.push(h("War Emergency Power from altitudes 0-9"))}if(i.notes=n.Join(", ",r),s.GetUsePushPull()){const e=i.reliability.split("/");i.reliability=e[0].toString(),t.push(JSON.stringify(i)),i.reliability=e[0].toString(),t.push(JSON.stringify(i))}else t.push(JSON.stringify(i))}return t}InteractiveWeapons(){const t=[];for(const s of this.GetWeapons().GetWeaponSets()){const i=this.GetWeapons().GetWeaponList(),a=s.GetHits(),r=[];"PR"==i[s.GetWeaponSelected()].abrv?(r.push(5),r.push(5),r.push(5),r.push(5)):(r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[0])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[1])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[2])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[3])));const o=s.GetFinalWeapon(),l=[],c={type:Wt(s,i),ammo:s.GetShots(),ap:o.ap,jam:s.GetJam(),knife_hits:a[0],close_hits:a[1],long_hits:a[2],extreme_hits:a[3],knife_damage:r[0],close_damage:r[1],long_damage:r[2],extreme_damage:r[3],tags:""},u=this.GetWeapons().GetDirectionList();s.IsPlural()&&(c.type=s.GetWeaponCount().toString()+"x "+c.type);const m=s.GetDirection();var e="";e+="[";for(let t=0;t11.05?(this.aircraft_type=t.aircraft_type,this.rotor.SetType(t.aircraft_type)):(this.aircraft_type=N.AIRPLANE,this.rotor.SetType(N.AIRPLANE)),this.era.fromJSON(t.era,s),this.cockpits.fromJSON(t.cockpits,s),this.passengers.fromJSON(t.passengers,s),this.engines.fromJSON(t.engines,s),this.propeller.fromJSON(t.propeller,s),this.frames.fromJSON(t.frames,s),this.wings.fromJSON(t.wings,s),this.stabilizers.fromJSON(t.stabilizers,s),this.controlsurfaces.fromJSON(t.controlsurfaces,s),this.reinforcements.fromJSON(t.reinforcements,s),this.fuel.fromJSON(t.fuel,s),this.munitions.fromJSON(t.munitions,s),this.cargo.fromJSON(t.cargo,s),this.gear.fromJSON(t.gear,s),this.accessories.fromJSON(t.accessories,s),this.optimization.fromJSON(t.optimization,s),this.weapons.fromJSON(t.weapons,s),s>10.65&&this.used.fromJSON(t.used,s),s>11.05&&this.rotor.fromJSON(t.rotor,s),s>12.25?this.alter.fromJSON(t.alter,s):this.alter.ClearAll(),this.freeze_calculation=!1,!0}serialize(t){t.PushString(this.version),t.PushString(this.name),this.era.serialize(t),this.cockpits.serialize(t),this.passengers.serialize(t),this.engines.serialize(t),this.propeller.serialize(t),this.frames.serialize(t),this.wings.serialize(t),this.stabilizers.serialize(t),this.controlsurfaces.serialize(t),this.reinforcements.serialize(t),this.fuel.serialize(t),this.munitions.serialize(t),this.cargo.serialize(t),this.gear.serialize(t),this.accessories.serialize(t),this.optimization.serialize(t),this.weapons.serialize(t),this.used.serialize(t),this.rotor.serialize(t),t.PushNum(this.aircraft_type),this.alter.serialize(t)}deserialize(t){this.freeze_calculation=!0,t.version=parseFloat(t.GetString()),this.name=t.GetString(),this.era.deserialize(t),this.cockpits.deserialize(t),this.passengers.deserialize(t),this.engines.deserialize(t),this.propeller.deserialize(t),this.frames.deserialize(t),this.wings.deserialize(t),this.stabilizers.deserialize(t),this.controlsurfaces.deserialize(t),this.reinforcements.deserialize(t),this.fuel.deserialize(t),this.munitions.deserialize(t),this.cargo.deserialize(t),this.gear.deserialize(t),this.accessories.deserialize(t),this.optimization.deserialize(t),this.weapons.deserialize(t),t.version>10.65&&this.used.deserialize(t),t.version>11.05&&t.GetRemaining()>0?(this.rotor.deserialise(t),this.aircraft_type=t.GetNum(),this.rotor.SetType(this.aircraft_type)):(this.aircraft_type=N.AIRPLANE,this.rotor.SetType(N.AIRPLANE)),t.version>12.25?this.alter.deserialize(t):this.alter.ClearAll(),this.freeze_calculation=!1}SetType(t){this.aircraft_type=t,this.rotor.SetType(t),this.CalculateStats()}SetDisplayCallback(t){this.DisplayCallback=t}CalculateStats(){if(this.freeze_calculation)return;this.recurrent_calculation_depth=this.recurrent_calculation_depth+1,this.updated_stats=!1;let t=new u;if(t=t.Add(this.era.PartStats()),t=t.Add(this.cockpits.PartStats()),t=t.Add(this.passengers.PartStats()),this.engines.SetTailMods(this.frames.GetFarmanOrBoom(),this.wings.GetSwept()&&this.stabilizers.GetVOutboard(),this.stabilizers.GetCanard()),this.engines.SetInternal(this.aircraft_type==N.HELICOPTER||W(this.aircraft_type)),this.engines.SetMetalArea(this.wings.GetMetalArea()),this.engines.HaveParasol(this.wings.GetParasol()),t=t.Add(this.engines.PartStats()),this.propeller.SetEngineTypes(this.engines.GetEngineTypes()),this.propeller.SetAcftType(this.aircraft_type),t=t.Add(this.propeller.PartStats()),t=t.Add(this.fuel.PartStats()),t=t.Add(this.munitions.PartStats()),this.weapons.SetNumberOfCockpits(this.cockpits.GetNumberOfCockpits()),this.weapons.SetTractorInfo(this.engines.GetTractorSpinner()),this.weapons.SetPusherInfo(this.engines.GetPusherSpinner()),this.weapons.cant_type=this.reinforcements.GetCantileverType(),this.weapons.SetHavePropeller(this.engines.GetNumPropellers()>0),this.weapons.SetCanWing(!W(this.aircraft_type)),t=t.Add(this.weapons.PartStats()),t=t.Add(this.cargo.PartStats()),this.wings.SetAcftType(this.aircraft_type),this.aircraft_type==N.AUTOGYRO?this.wings.SetRotorSpan(this.rotor.GetRotorSpan()):this.wings.SetRotorSpan(0),t=t.Add(this.wings.PartStats()),this.rotor.SetWingArea(t.wingarea),this.aircraft_type==N.AUTOGYRO&&(this.rotor.SetEngineCount(this.engines.GetNumberOfEngines()),t=t.Add(this.rotor.PartStats())),this.controlsurfaces.SetWingArea(t.wingarea),this.controlsurfaces.SetBoomTail(this.frames.GetUseBoom()),this.controlsurfaces.SetSpan(this.wings.GetSpan()),this.controlsurfaces.SetAcftType(this.aircraft_type),this.controlsurfaces.SetCanElevator(this.stabilizers.GetHStabCount()>0),this.controlsurfaces.SetCanRudder(this.stabilizers.GetVStabCount()>0),this.controlsurfaces.SetIsVTail(this.stabilizers.GetIsVTail()),this.aircraft_type==N.AIRPLANE?this.controlsurfaces.SetNumCantilever(this.reinforcements.GetTotalCantilevers()):this.controlsurfaces.SetNumCantilever(0),t=t.Add(this.controlsurfaces.PartStats()),this.reinforcements.SetMonoplane(this.wings.GetMonoplane()),this.reinforcements.SetTandem(this.wings.GetTandem()),this.reinforcements.SetStaggered(this.wings.GetStaggered()),this.reinforcements.SetCanUseExternal(this.wings.GetArea()>0),this.reinforcements.SetSesquiplane(this.wings.GetIsSesquiplane()),this.reinforcements.SetAircraftType(this.aircraft_type),this.reinforcements.SetCantLift(this.era.GetCantLift()),t=t.Add(this.reinforcements.PartStats()),this.rotor.GetTailRotor()&&(t.power=Math.floor(1e-6+.9*t.power)),this.accessories.SetAcftRadiator(this.engines.GetNumberOfRadiators()>0),this.accessories.SetSkinArmor(this.frames.GetArmor()),this.accessories.SetCanCutouts(this.wings.CanCutout(),this.frames.CanCutout()),t=t.Add(this.accessories.PartStats()),this.frames.SetRequiredSections(t.reqsections),this.frames.SetHasTractorNacelles(this.engines.GetHasTractorNacelles()),this.frames.SetIsTandem(this.wings.GetTandem()),t=t.Add(this.frames.PartStats()),this.stabilizers.SetEngineCount(this.engines.GetNumberOfEngines()),this.stabilizers.SetIsTandem(this.wings.GetTandem()),this.stabilizers.SetIsSwept(this.wings.GetSwept()),this.stabilizers.SetHaveTail(!this.frames.GetIsTailless()),this.stabilizers.SetHelicopter(!1),this.stabilizers.SetLiftingArea(t.wingarea),this.stabilizers.wing_drag=this.wings.GetWingDrag()+this.rotor.GetRotorDrag(),t=t.Add(this.stabilizers.PartStats()),this.wings.SetAircraftMass(t.mass),t.mass+=this.wings.GetPaperMass(),t.mass=Math.max(1,t.mass),this.gear.SetGull(this.wings.HasInvertedGull()),this.gear.SetLoadedMass(t.mass+t.wetmass),this.gear.CanBoat(this.engines.GetEngineHeight(),this.wings.GetWingHeight()),t=t.Add(this.gear.PartStats()),t.toughness+=Math.floor(1e-6+t.structure/5),this.optimization.SetAcftStats(t),t=t.Add(this.optimization.PartStats()),this.cockpits.SetHasRotary(this.engines.HasTractorRotary()),t=t.Add(this.alter.PartStats()),t.Round(),!this.updated_stats){this.updated_stats=!0,this.stats=t;const e=this.GetDerivedStats();this.stats.cost+=this.controlsurfaces.GetFlapCost(e.DryMP),t.reliability-=this.used.burnt_out,this.weapons.SetStickyGuns(this.used.sticky_guns),this.cockpits.SetArmed(this.weapons.GetArmedSeats()),this.cockpits.UpdateCrewStats(this.stats.escape,e.ControlStress,e.RumbleStress,this.stats.visibility,this.stats.crashsafety);let s=0;for(const t of this.cockpits.GetStressList())s=Math.max(s,t[0]-t[1]);0!=s&&-1==this.stats.warnings.findIndex((t=>t.source==h("Co-Pilot Controls")))&&this.stats.warnings.push({source:h("Co-Pilot Controls"),warning:h("Co-Pilot Warning",s),color:c.WHITE}),W(this.aircraft_type)&&(t.upkeep+=1),this.aircraft_type==N.ORNITHOPTER_BUZZER&&(t.reliability-=2),this.engines.UpdateReliability(t),this.reinforcements.SetAcftStructure(t.structure),this.fuel.SetArea(this.wings.GetArea()),this.fuel.SetCantilever(this.reinforcements.GetIsCantilever()),this.accessories.SetVitalParts(this.VitalComponentList().length),this.munitions.SetAcftParameters(t.structure,this.era.GetMaxBomb(),this.wings.HasInvertedGull()),this.stats.cost=Math.max(1,this.stats.cost),this.stats.liftbleed=Math.max(1,this.stats.liftbleed),10*this.engines.GetRumble()>t.structure&&(this.stats.power=0,this.stats.warnings.push({source:h("Stat Rumble"),warning:h("Rumble Warning"),color:c.RED})),this.use_storage&&window.localStorage.setItem("aircraft",JSON.stringify(this))}this.recurrent_calculation_depth=this.recurrent_calculation_depth-1,this.DisplayCallback&&!this.freeze_calculation&&0==this.recurrent_calculation_depth&&this.DisplayCallback()}GetDerivedStats(){let t=Math.floor(1e-6+this.stats.mass/5);t=Math.max(t,1);let e=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass)/5);e=Math.max(e,1);let s=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass+this.stats.bomb_mass)/5);s=Math.max(s,1);let i=Math.floor(1e-6+(this.stats.drag+t)/5);i=Math.max(i,1);const a=i;let n=Math.floor(1e-6+(this.stats.drag+this.munitions.GetExternalMass()+t)/5);n=Math.max(n,1);let r=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*i))),o=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*a))),l=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*n)));this.stats.mass<15&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Mass")))&&this.stats.warnings.push({source:h("Stat Mass"),warning:h("Low Mass Warning"),color:c.YELLOW}),this.stats.drag+t<35&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Drag")))&&this.stats.warnings.push({source:h("Stat Drag"),warning:h("Low Drag Warning"),color:c.YELLOW});let u=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*t/Math.max(1,this.stats.wingarea))),m=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*e/Math.max(1,this.stats.wingarea))),p=Math.max(Math.floor(1e-6+this.stats.liftbleed*s/Math.max(1,this.stats.wingarea)));var d=this.engines.GetOverspeed();const g=Math.floor(1e-6+this.stats.power/t),_=Math.floor(1e-6+this.stats.power/e),f=Math.floor(1e-6+this.stats.power/s);0==f&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Boost")))&&this.stats.warnings.push({source:h("Derived Boost"),warning:h("Boost Warning"),color:c.RED});const A=Math.floor(1e-6+this.stats.pitchboost*r);r=Math.floor(1e-6+r*(1-.1*this.used.ragged)),o=Math.floor(1e-6+o*(1-.1*this.used.ragged)),l=Math.floor(1e-6+l*(1-.1*this.used.ragged));let b=this.stats.pitchstab+this.stats.latstab;this.stats.pitchstab>0&&this.stats.latstab>0?b+=2:this.stats.pitchstab<0&&this.stats.latstab<0&&(b-=2);let S=100+this.stats.control-t;b>10||b<-10?(S=-1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Stability")))&&this.stats.warnings.push({source:h("Derived Stability"),warning:h("Stability Warning"),color:c.RED})):10==b?S-=4:b>6?S-=3:b>3?S-=2:b>0?S-=1:0==b?S+=0:b>-4?S+=1:b>-7?S+=2:b>-10?S+=3:-10==b&&(S+=4);let y=S+t-e,w=S+t-s;S=Math.floor(1e-6+S-5*this.used.sluggish),y=Math.floor(1e-6+y-5*this.used.sluggish),w=Math.floor(1e-6+w-5*this.used.sluggish);let C=Math.min(this.stats.maxstrain-t,this.stats.structure);this.optimization.final_ms=Math.floor(1e-6+1.5*this.optimization.GetMaxStrain()*C/10),C+=this.optimization.final_ms,C=Math.floor(1e-6+C*(1-.2*this.used.fragile)),C<10&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Max Strain")))&&this.stats.warnings.push({source:h("Stat Max Strain"),warning:h("Max Strain Warning"),color:c.RED});let B=this.stats.toughness;B=Math.floor(1e-6+B*(1-.5*this.used.weak));const E=this.stats.structure;let M=Math.ceil(i/this.propeller.GetEnergy()-1e-6),P=M+1;M=Math.min(M,10),P=Math.min(P,10);let G=Math.ceil(Math.floor(1e-6+(u+m)/2)/this.propeller.GetTurn()-1e-6);this.aircraft_type==N.HELICOPTER&&(G=Math.max(1,Math.floor(1e-6+t/2))+this.rotor.GetRotorBleed(),M=Math.max(1,Math.floor(1e-6+i/7)),u=0,m=0,p=0,r=Math.min(37,r),o=Math.min(37,o),l=Math.min(37,l)),G=Math.max(G,1);let F=G+1;F=Math.max(F,1),u=Math.max(1,Math.floor(1e-6+u*(1+.2*this.used.hefty))),m=Math.max(1,Math.floor(1e-6+m*(1+.2*this.used.hefty))),p=Math.max(1,Math.floor(1e-6+p*(1+.2*this.used.hefty))),(l<=p||o<=m)&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stall Speed")))&&this.stats.warnings.push({source:h("Stall Speed"),warning:h("Stall Speed Warning"),color:c.RED});let R=Math.floor(1e-6+this.stats.fuel/this.stats.fuelconsumption);R=Math.floor(1e-6+R*(1-.2*this.used.leaky)),isFinite(R)||(R=0),R<6&&0!=this.stats.fuelconsumption&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Fuel Uses")))&&this.stats.warnings.push({source:h("Derived Fuel Uses"),warning:h("Fuel Uses Warning"),color:c.YELLOW});let x=1;(b>3||b<-3)&&x++;let I=0;x+=Math.min(this.accessories.GetMaxMassStress(),Math.floor(1e-6+t/10));const T=this.accessories.GetMaxTotalStress();x=Math.min(T,x),this.engines.GetMaxRumble()>0&&(I+=Math.max(1,.5*this.engines.GetRumble()),I=Math.floor(1e-6+I),I=Math.min(3,I)),0==T&&(I=0);let v=Math.max(1,Math.floor(1e-6+this.stats.power/t*(23/this.stats.pitchspeed)/i)),D=Math.max(1,Math.floor(1e-6+this.stats.power/e*(23/this.stats.pitchspeed)/a)),O=Math.max(1,Math.floor(1e-6+this.stats.power/s*(23/this.stats.pitchspeed)/n));return isFinite(v)||(v=0,D=0,O=0),W(this.aircraft_type)&&(S+=5,y+=5,w+=5,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Stall")))&&this.stats.warnings.push({source:h("Ornithopter Stall"),warning:h("Ornithopter Stall Warning"),color:c.WHITE}),d=C),this.aircraft_type==N.ORNITHOPTER_FLUTTER&&(S+=5,y+=5,w+=5,d=1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Flutterer Attack")))&&this.stats.warnings.push({source:h("Ornithopter Flutterer Attack"),warning:h("Ornithopter Flutterer Attack Warning"),color:c.WHITE})),this.aircraft_type==N.ORNITHOPTER_BUZZER&&(-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Boost")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Boost"),warning:h("Ornithopter Buzzer Boost Warning"),color:c.WHITE}),-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Stall")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Stall"),warning:h("Ornithopter Buzzer Stall Warning"),color:c.WHITE})),{DryMP:t,WetMP:e,WetMPwBombs:s,DPEmpty:i,DPFull:a,DPwBombs:n,MaxSpeedEmpty:r,MaxSpeedFull:o,MaxSpeedwBombs:l,StallSpeedEmpty:u,StallSpeedFull:m,StallSpeedFullwBombs:p,Overspeed:d,BoostEmpty:g,BoostFull:_,BoostFullwBombs:f,Dropoff:A,Stabiilty:b,HandlingEmpty:S,HandlingFull:y,HandlingFullwBombs:w,MaxStrain:C,Toughness:B,Structure:E,EnergyLoss:M,EnergyLosswBombs:P,TurnBleed:G,TurnBleedwBombs:F,FuelUses:R,ControlStress:x,RumbleStress:I,RateOfClimbFull:D,RateOfClimbEmpty:v,RateOfClimbwBombs:O}}VitalComponentList(){const t=this.GetDerivedStats(),e=[];e.push(h("Vital Part Controls"));for(let t=0;t0&&e.push(h("Vital Part Fuel Tanks"));for(let t=0;t{let s=parseInt(t.charge);"-"==t.charge&&(s=0);let i=parseInt(e.charge);return"-"==e.charge&&(i=0),isNaN(s)&&isNaN(i)?0:isNaN(s)?-1:isNaN(i)?1:i-s})),t=q(this.engines.GetElectrics(),t),t=q(t,this.weapons.GetElectrics());let e=!1;for(const s of t.equipment){const t=parseInt(s.charge);!isNaN(t)&&t>0&&(s.charge="+"+s.charge,e=!0)}return t.equipment.length>0&&t.storage<=0&&!e&&-1==this.stats.warnings.findIndex((t=>t.source==h("Insufficient Charge")))&&this.stats.warnings.push({source:h("Insufficient Charge"),warning:h("Insufficient Charge Warning"),color:c.RED}),t}}class zt extends kt{constructor(t){super(),this.model=t,document.getElementById("lbl_era").textContent=h("Era Section Title");const e=document.getElementById("table_era"),s=document.createDocumentFragment();var i=xt(s);St(i,h("Era Option")),St(i,h("Stat Lift Bleed")),St(i,h("Stat Cost")),St(i,h("Stat Pitch Stability"));const a=(i=xt(s)).insertCell();this.select=document.createElement("SELECT"),a.append(this.select),this.bleed=i.insertCell(),this.cost=i.insertCell(),this.pstab=i.insertCell(),this.select.required=!0,this.select.onchange=()=>{this.model.SetSelected(this.select.selectedIndex)};for(let t of this.model.GetEraOptions()){const e=document.createElement("OPTION");e.text=h(t.name),this.select.add(e)}e.appendChild(s)}UpdateDisplay(){this.select.selectedIndex=this.model.GetSelected();const t=this.model.PartStats();Nt(this.bleed,t.liftbleed.toString(),!1),Nt(this.cost,t.cost.toString(),!1),Nt(this.pstab,t.pitchstab.toString(),!1)}}class Jt extends kt{constructor(t,e){super(),this.row=t,this.cockpit=e,this.upg_chbxs=[],this.sft_chbxs=[],this.gun_chbxs=[];const s=document.createDocumentFragment(),i=It(s),a=It(s),n=It(s),r=It(s),o=It(s),l=document.createElement("TABLE"),c=l.insertRow();St(c,h("Stat Mass")),St(c,h("Stat Drag")),St(c,h("Stat Cost"));const u=l.insertRow();this.d_mass=u.insertCell(),this.d_drag=u.insertCell(),this.d_cost=u.insertCell();const m=l.insertRow();St(m,h("Stat Control")),St(m,h("Stat Required Sections")),St(m,"");const p=l.insertRow();this.d_cont=p.insertCell(),this.d_rseq=p.insertCell(),p.insertCell();const d=l.insertRow();St(d,h("Stat Flight Stress")),St(d,h("Stat Escape")),St(d,h("Stat Visibility"));const g=l.insertRow();this.d_strs=g.insertCell(),this.d_escp=g.insertCell(),this.d_visi=g.insertCell(),o.appendChild(l),o.className="inner_table",l.className="inner_table",this.sel_type=document.createElement("SELECT"),this.d_strs.className="part_local",this.d_visi.className="part_local",this.d_escp.className="part_local";for(let t of e.GetTypeList()){let e=document.createElement("OPTION");e.text=h(t.name),this.sel_type.add(e)}i.appendChild(this.sel_type);var _=bt(a);const f=e.GetUpgradeList(),A=e.CanUpgrades();for(let t=0;t{this.cockpit.SetUpgrade(t,e.checked)}),this.upg_chbxs.push(e)}_=bt(n);var b=0;for(let t of e.GetSafetyList()){let e=document.createElement("INPUT");Pt(h(t.name),e,_);let s=b;b+=1,e.onchange=()=>{this.cockpit.SetSafety(s,e.checked)},this.sft_chbxs.push(e)}_=bt(r);var S=0;for(let t of e.GetGunsightList()){let e=document.createElement("INPUT");Pt(h(t.name),e,_);let s=S;S+=1,e.onchange=()=>{this.cockpit.SetGunsight(s,e.checked)},this.gun_chbxs.push(e)}this.bombsight=document.createElement("INPUT"),wt(h("Cockpit Bombsight"),this.bombsight,_),this.bombsight.onchange=()=>{this.cockpit.SetBombsightQuality(this.bombsight.valueAsNumber)},this.bombsight.min="0",this.bombsight.max="301",this.bombsight.step="1",this.sel_type.onchange=()=>{this.cockpit.SetType(this.sel_type.selectedIndex)},this.row.appendChild(s)}UpdateCockpit(t){this.cockpit=t}UpdateDisplay(){let t=this.cockpit.PartStats();Nt(this.d_mass,t.mass.toString(),!1),Nt(this.d_drag,t.drag.toString(),!1),Nt(this.d_cost,t.cost.toString(),!1),Nt(this.d_cont,t.control.toString(),!0),Nt(this.d_rseq,t.reqsections.toString(),!1);const e=this.cockpit.GetFlightStress();e[0],e[1],Nt(this.d_strs,n.Format("{0}",e[0])),Nt(this.d_escp,this.cockpit.GetEscape().toString(),!0),Nt(this.d_visi,this.cockpit.GetVisibility().toString(),!0),this.sel_type.selectedIndex=this.cockpit.GetType();const s=this.cockpit.GetSelectedUpgrades();for(let t=0;t{this.cockpits.SetNumberOfCockpits(this.counter.valueAsNumber)},this.tbl.appendChild(e)}CounterChange(){for(;this.positions.length>this.counter.valueAsNumber;)this.RemoveCockpit();for(;this.positions.length{this.pass.SetSeats(this.nseats.valueAsNumber)},this.nbeds.onchange=()=>{this.pass.SetBeds(this.nbeds.valueAsNumber)},this.connect.onchange=()=>{this.pass.SetConnected(this.connect.checked)},e.appendChild(s)}SetCollapse(){Ot("passenger_collapse",!this.pass.IsDefault())}UpdateDisplay(){const t=this.pass.PartStats();this.nseats.valueAsNumber=this.pass.GetSeats(),this.nbeds.valueAsNumber=this.pass.GetBeds(),this.connect.checked=this.pass.GetConnected(),this.connect.disabled=!this.pass.PossibleConnection(),Nt(this.mass,t.mass.toString(),!1),Nt(this.reqseq,t.reqsections.toString(),!1)}}class Qt extends kt{constructor(t,e){super(),this.engine=t;const s=e;this.InitTypeSelect(s);const i=s.insertCell();i.className="inner_table";const a=document.createElement("TABLE");a.className="inner_table",St(a.insertRow(),h("Engine Cooling")),this.cool_cell=a.insertRow().insertCell(),St(a.insertRow(),h("Engine Mounting"));const n=a.insertRow().insertCell();St(a.insertRow(),h("Engine Upgrades"));const r=a.insertRow().insertCell();i.appendChild(a);const o=s.insertCell();o.className="inner_table";const l=document.createElement("TABLE");l.className="inner_table",St(l.insertRow(),h("Engine Cowls"));const c=l.insertRow().insertCell();o.appendChild(l),St(l.insertRow(),h("Engine Electrical"));const u=l.insertRow().insertCell();this.InitMountSelect(n),this.InitUpgradeSelect(r),this.InitCowlSelect(c),this.InitElectricSelect(u),this.InitStatDisplay(s),this.intake_fan=document.createElement("INPUT"),this.intake_fan.onchange=()=>{this.engine.SetIntakeFan(this.intake_fan.checked)}}InitTypeSelect(t){this.e_rarity=document.createElement("LABEL"),this.e_pwr=document.createElement("LABEL"),this.e_mass=document.createElement("LABEL"),this.e_drag=document.createElement("LABEL"),this.e_rely=document.createElement("LABEL"),this.e_cool=document.createElement("LABEL"),this.e_over=document.createElement("LABEL"),this.e_fuel=document.createElement("LABEL"),this.e_alti=document.createElement("LABEL"),this.e_torq=document.createElement("LABEL"),this.e_rumb=document.createElement("LABEL"),this.e_cost=document.createElement("LABEL"),this.cool_count=document.createElement("INPUT"),this.cool_count.setAttribute("type","number");const e=t.insertCell(0);this.e_list_select=document.createElement("SELECT"),this.e_list_select.required=!0,e.appendChild(this.e_list_select),e.appendChild(document.createElement("BR"));for(let t of T().keys()){let e=document.createElement("OPTION");e.text=t,this.e_list_select.add(e)}this.e_select=document.createElement("SELECT"),this.e_select.required=!0,e.appendChild(this.e_select),e.appendChild(document.createElement("BR"));const s=T();for(let t=0;t{this.engine.SetSelectedList(this.e_list_select.options[this.e_list_select.selectedIndex].text)},this.e_select.onchange=()=>{this.engine.SetSelectedIndex(this.e_select.selectedIndex)}}UpdateEngine(t){this.engine=t}InitMountSelect(t){const e=document.createElement("SPAN");e.textContent=h("Engine Mounting Location"),t.appendChild(e),t.appendChild(document.createElement("BR")),this.mount_select=document.createElement("SELECT");for(let t of this.engine.GetMountList()){let e=document.createElement("OPTION");e.text=h(t.name),this.mount_select.add(e)}this.mount_select.required=!0,this.mount_select.selectedIndex=this.engine.GetMountIndex(),this.mount_select.onchange=()=>{this.engine.SetMountIndex(this.mount_select.selectedIndex)},t.appendChild(this.mount_select),t.appendChild(document.createElement("BR")),this.pushpull_input=document.createElement("INPUT"),this.torque_input=document.createElement("INPUT");const s=bt(t);this.pushpull_label=Pt(" "+h("Engine Push Pull"),this.pushpull_input,s),Pt(" "+h("Engine Torque To Structure"),this.torque_input,s),this.pushpull_input.checked=this.engine.GetUsePushPull(),this.torque_input.checked=this.engine.GetUsePushPull(),this.pushpull_input.onchange=()=>{this.engine.SetUsePushPull(this.pushpull_input.checked)},this.torque_input.onchange=()=>{this.engine.SetTorqueToStruct(this.torque_input.checked)}}InitUpgradeSelect(t){this.ds_input=document.createElement("INPUT"),this.op_input=document.createElement("INPUT"),this.gp_input=document.createElement("INPUT"),this.gpr_input=document.createElement("INPUT");const e=bt(t);Pt(h("Engine Extended Driveshafts"),this.ds_input,e),Pt(h("Engine Outboard Propeller"),this.op_input,e),wt(h("Engine Geared Propeller"),this.gp_input,e),wt(h("Engine Negate Reliability Penalty"),this.gpr_input,e),this.gp_input.onchange=()=>{this.engine.SetGearCount(this.gp_input.valueAsNumber)},this.gpr_input.onchange=()=>{this.engine.SetGearReliability(this.gpr_input.valueAsNumber)},this.ds_input.onchange=()=>{this.engine.SetUseExtendedDriveshaft(this.ds_input.checked)},this.op_input.onchange=()=>{this.engine.SetOutboardProp(this.op_input.checked)}}InitElectricSelect(t){const e=bt(t);this.alternator_input=document.createElement("INPUT"),this.generator_input=document.createElement("INPUT"),Pt(h("Engine Alternator"),this.alternator_input,e),Pt(h("Engine Generator"),this.generator_input,e),this.alternator_input.onchange=()=>{this.engine.SetAlternator(this.alternator_input.checked)},this.generator_input.onchange=()=>{this.engine.SetGenerator(this.generator_input.checked)}}InitStatDisplay(t){const e=t.insertCell();e.className="inner_table";const s=document.createElement("TABLE");s.className="inner_table",e.appendChild(s);const i=s.insertRow();St(i,h("Stat Power")),St(i,h("Stat Mass")),St(i,h("Stat Drag"));const a=s.insertRow();this.d_powr=a.insertCell(),this.d_mass=a.insertCell(),this.d_drag=a.insertCell();const n=s.insertRow();St(n,h("Stat Reliability")),St(n,h("Stat Visibility")),St(n,h("Stat Overspeed"));const r=s.insertRow();this.d_rely=r.insertCell(),this.d_rely.className="part_local",this.d_visi=r.insertCell(),this.d_over=r.insertCell();const o=s.insertRow();St(o,h("Stat Cost")),St(o,h("Stat Altitude")),St(o,h("Stat Fuel Consumption"));const l=s.insertRow();this.d_cost=l.insertCell(),this.d_alti=l.insertCell(),this.d_fuel=l.insertCell();const c=s.insertRow();St(c,h("Stat Pitch Stability")),St(c,h("Stat Lateral Stability")),St(c,h("Stat Raw Strain"));const u=s.insertRow();this.d_pstb=u.insertCell(),this.d_lstb=u.insertCell(),this.d_maxs=u.insertCell();const m=s.insertRow();St(m,h("Stat Structure")),St(m,h("Stat Flight Stress")),St(m,h("Stat Required Sections"));const p=s.insertRow();this.d_strc=p.insertCell(),this.d_fstr=p.insertCell(),this.d_sect=p.insertCell();const d=s.insertRow();St(d,h("Stat Charge")),St(d,""),St(d,"");const g=s.insertRow();this.d_chrg=g.insertCell(),g.insertCell(),g.insertCell()}InitCowlSelect(t){this.cowl_select=document.createElement("SELECT");for(let t of this.engine.GetCowlList()){let e=document.createElement("OPTION");e.text=h(t.name),this.cowl_select.add(e)}this.cowl_select.required=!0,this.cowl_select.selectedIndex=this.engine.GetMountIndex(),this.cowl_select.onchange=()=>{this.engine.SetCowl(this.cowl_select.selectedIndex)},t.appendChild(this.cowl_select)}InitCoolingSelect(){for(;this.cool_cell.children.length>0;)this.cool_cell.removeChild(this.cool_cell.children[0]);if(this.engine.IsRotary()){this.e_cool.textContent="0";const t=document.createElement("SPAN");t.innerText=h("Engine Rotary Cooling"),this.cool_cell.appendChild(t)}else if("0"==this.e_cool.textContent){const t=document.createElement("SPAN");t.textContent=h("Engine Air-Cooled Engine."),this.cool_cell.appendChild(t);const e=bt(this.cool_cell);Pt(h("Engine Air Cooling Fan"),this.intake_fan,e),this.intake_fan.disabled=!this.engine.CanIntakeFan()}else{this.cool_select||(this.cool_select=document.createElement("SELECT"),this.cool_select.required=!0);const t=bt(this.cool_cell);Bt(h("Engine Select Radiator"),this.cool_select,t),wt(h("Engine Cooling Amount"),this.cool_count,t);const e=this.engine.GetNumRadiators();for(;this.cool_select.options.length>0;)this.cool_select.options.remove(this.cool_select.options.length-1);for(let t=1;t{this.engine.SetRadiator(this.cool_select.selectedIndex)},this.cool_select.selectedIndex=this.engine.GetRadiator(),this.cool_count.min="0",this.cool_count.max=this.engine.GetMaxCooling().toString(),this.cool_count.valueAsNumber=this.engine.GetCooling(),this.cool_count.onchange=()=>{this.engine.SetCooling(this.cool_count.valueAsNumber)}}}UpdateDisplay(){for(;this.e_list_select.options.length>0;)this.e_list_select.options.remove(this.e_list_select.options.length-1);for(;this.e_select.options.length>0;)this.e_select.options.remove(this.e_select.options.length-1);const t=this.engine.GetSelectedList();if(""!=t){var e=!1,s=0;const i=T();for(let a of i.keys()){let i=document.createElement("OPTION");i.text=a,this.e_list_select.add(i),a==t||e?(s=Math.abs(s),e=!0):s-=1}this.e_list_select.selectedIndex=s;const a=this.engine.CanSelectIndex();for(let e=0;e{this.radiator.SetTypeIndex(this.type_select.selectedIndex)},s.appendChild(this.type_select);const i=t.insertCell();this.mount_select=document.createElement("SELECT");for(let t of this.radiator.GetMountList()){let e=document.createElement("OPTION");e.text=h(t.name),this.mount_select.add(e)}this.mount_select.onchange=()=>{this.radiator.SetMountIndex(this.mount_select.selectedIndex)},i.appendChild(this.mount_select);const a=t.insertCell();this.coolant_select=document.createElement("SELECT");for(let t of this.radiator.GetCoolantList()){let e=document.createElement("OPTION");e.text=h(t.name),this.coolant_select.add(e)}this.coolant_select.onchange=()=>{this.radiator.SetCoolantIndex(this.coolant_select.selectedIndex)},a.appendChild(this.coolant_select),a.appendChild(document.createElement("BR")),this.harden_input=document.createElement("INPUT");const n=bt(a);Pt(h("Radiators Harden Radiator"),this.harden_input,n),this.harden_input.onchange=()=>{this.radiator.SetHarden(this.harden_input.checked)};const r=t.insertCell(),o=document.createElement("TABLE");r.className="inner_table",o.className="inner_table";const l=o.insertRow();St(l,h("Stat Mass")),St(l,h("Stat Cost")),St(l,h("Stat Drag")),St(l,h("Stat Reliability")),St(l,h("Stat Lateral Stability")),St(l,h("Derived Is Flammable Question"));const c=o.insertRow();this.c_mass=c.insertCell(),this.c_cost=c.insertCell(),this.c_drag=c.insertCell(),this.c_rely=c.insertCell(),this.c_lstb=c.insertCell(),this.c_flam=c.insertCell(),r.appendChild(o)}UpdateRadiator(t){this.radiator=t}UpdateDisplay(){const t=this.radiator.CanType();for(let e=0;e{this.eng.SetNumberOfEngines(this.num_engines.valueAsNumber)},this.num_engines.valueAsNumber=this.eng.GetNumberOfItems(),document.getElementById("lbl_num_radiators").textContent=h("Engines Num Radiators"),this.num_radiators=document.getElementById("num_radiators"),this.num_radiators.onchange=()=>{this.eng.SetNumberOfRadiators(this.num_radiators.valueAsNumber)},this.num_radiators.valueAsNumber=this.eng.GetNumberOfRadiators(),document.getElementById("lbl_asymmetric").textContent=h("Engines Asymmetric Plane"),this.is_asymmetric=document.getElementById("asymmetric"),this.is_asymmetric.onchange=()=>{this.eng.SetAsymmetry(this.is_asymmetric.checked)},this.is_asymmetric.checked=this.eng.GetAsymmetry()}UpdateDisplay(){const t=this.eng.GetNumberOfItems();for(this.tbl.style.display=0==t?"none":"",this.num_engines.valueAsNumber=t;this.engines.length>t;)this.engines.pop(),this.tbl.deleteRow(this.engines.length+1);for(var e=document.createDocumentFragment();this.engines.lengths;)this.radiators.pop(),this.tblR.deleteRow(this.radiators.length+1);for(e=document.createDocumentFragment();this.radiators.length{this.prop.SetPropIndex(this.select_prop.selectedIndex)},document.getElementById("lbl_propeller_upgrade").textContent=h("Propeller Propeller Upgrades:"),this.select_upgrade=document.getElementById("propeller_upgrade");for(let e of t.GetUpgradeList()){let t=document.createElement("OPTION");t.text=h(e.name),this.select_upgrade.add(t)}this.select_upgrade.onchange=()=>{this.prop.SetUpgradeIndex(this.select_upgrade.selectedIndex)}}UpdateDisplay(){this.select_upgrade.selectedIndex=this.prop.GetUpgradeIndex(),this.select_prop.selectedIndex=this.prop.GetPropIndex(),0==this.prop.GetNumPropellers()?(this.select_upgrade.disabled=!0,this.select_prop.disabled=!0,this.select_prop.selectedIndex=-1):(this.select_prop.disabled=!1,this.select_upgrade.disabled=!1)}}class Xt extends kt{constructor(t){super(),this.c_sec=[],this.t_sec=[],this.frames=t,document.getElementById("lbl_frames").textContent=h("Frames Frames and Covering"),this.table=document.getElementById("table_frames");const e=document.createDocumentFragment();var s=xt(e);this.all_frame=document.createElement("SELECT"),this.all_skin=document.createElement("SELECT"),St(s,h("Frames Frame Type")).append(document.createElement("BR"),this.all_frame),St(s,h("Frames Skin Type")).append(document.createElement("BR"),this.all_skin),St(s,h("Frames Frame Options")),St(s,h("Frames Frame Stats")),s=xt(e),this.c_frame=s.insertCell(),this.c_skin=s.insertCell(),this.c_options=s.insertCell(),this.c_stats=s.insertCell(),this.c_stats.className="inner_table",this.c_stats.rowSpan=0;const i=document.createElement("TABLE");i.className="inner_table";const a=i.insertRow();St(a,h("Stat Mass")),St(a,h("Stat Drag")),St(a,h("Stat Cost"));const n=i.insertRow();this.d_mass=n.insertCell(),this.d_drag=n.insertCell(),this.d_cost=n.insertCell();const r=i.insertRow();St(r,h("Stat Structure")),St(r,h("Stat Toughness")),St(r,h("Stat Visibility"));const o=i.insertRow();this.d_strc=o.insertCell(),this.d_tugh=o.insertCell(),this.d_visi=o.insertCell();const l=i.insertRow();St(l,h("Stat Wing Area")),St(l,h("Derived Is Flammable Question")),St(l,h("Stat Pitch Stability"));const c=i.insertRow();this.d_area=c.insertCell(),this.d_flammable=c.insertCell(),this.d_pstb=c.insertCell();const u=i.insertRow();St(u,h("Stat Raw Strain")),St(u,h("Stat Lift Bleed")),St(u,"");const m=i.insertRow();this.d_strn=m.insertCell(),this.d_lift=m.insertCell(),m.insertCell(),this.c_stats.appendChild(i);const p=xt(e);St(p,h("Frames Tail Frame Type")),St(p,h("Frames Tail Skin Type")),St(p,h("Frames Tail Frame Options"));const d=xt(e);this.t_frame=d.insertCell(),this.t_skin=d.insertCell(),this.t_options=d.insertCell(),document.getElementById("lbl_tail").textContent=h("Frames Tail Section Title"),document.getElementById("lbl_tail_type").textContent=h("Frames Tail Type"),this.t_select=document.getElementById("tail_type"),document.getElementById("lbl_tail_farman").textContent=h("Frames Tail Farman"),this.t_farman=document.getElementById("tail_farman"),document.getElementById("lbl_tail_boom").textContent=h("Frames Tail Boom"),this.t_boom=document.getElementById("tail_boom"),document.getElementById("lbl_flying_wing").textContent=h("Frames Flying Wing"),this.t_fwing=document.getElementById("flying_wing");const g=this.frames.GetFrameList();for(let t of g){let e=document.createElement("OPTION");e.text=h(t.name),t.basestruct<=0&&(e.disabled=!0),this.all_frame.add(e)}this.all_frame.onchange=()=>{this.frames.SetAllFrame(this.all_frame.selectedIndex)};const _=this.frames.GetSkinList();for(let t of _){let e=document.createElement("OPTION");e.text=h(t.name),this.all_skin.add(e)}this.all_skin.onchange=()=>{this.frames.SetAllSkin(this.all_skin.selectedIndex)};for(let t of this.frames.GetTailList()){let e=document.createElement("OPTION");e.text=h(t.name),this.t_select.add(e)}this.t_select.onchange=()=>{this.frames.SetTailType(this.t_select.selectedIndex)},this.t_farman.onchange=()=>{this.frames.SetUseFarman(this.t_farman.checked)},this.t_boom.onchange=()=>{this.frames.SetUseBoom(this.t_boom.checked)},this.t_fwing.onchange=()=>{this.frames.SetFlyingWing(this.t_fwing.checked)},this.table.appendChild(e)}UpdateDisplay(){const t=document.createDocumentFragment();for(;this.table.children.length;)t.append(this.table.children[0]);const e=this.frames.GetSectionList(),s=this.frames.GetTailSectionList();for(;e.length>this.c_sec.length;){let t=this.c_sec.length;this.CreateSection(t,e[t])}for(;e.lengththis.t_sec.length;){let t=this.t_sec.length;this.CreateTailSection(t,s[t])}for(;s.length{this.frames.DeleteSection(t)},s.add.textContent="+",s.add.onclick=()=>{this.frames.DuplicateSection(t)};const i=this.frames.GetFrameList();for(let t of i){let e=document.createElement("OPTION");e.text=h(t.name),s.fsel.add(e)}s.fsel.onchange=()=>{this.frames.SetFrame(t,s.fsel.selectedIndex)},s.fspan.appendChild(s.rem),s.fspan.appendChild(s.add),s.fspan.appendChild(s.fsel),s.fspan.appendChild(document.createElement("BR")),this.c_frame.appendChild(s.fspan),s.sspan.appendChild(s.ssel),s.sspan.appendChild(document.createElement("BR")),this.c_skin.appendChild(s.sspan),Et(h("Frames Geodesic"),s.geo,s.ospan,!1),s.geo.onchange=()=>{this.frames.SetGeodesic(t,s.geo.checked)},Et(h("Frames Monocoque"),s.mono,s.ospan,!1),s.mono.onchange=()=>{this.frames.SetMonocoque(t,s.mono.checked)},Et(h("Frames Internal Bracing"),s.int,s.ospan,!1),s.int.onchange=()=>{this.frames.SetInternalBracing(t,s.int.checked)},Et(h("Frames Lifting Body"),s.lb,s.ospan,!0),s.lb.onchange=()=>{this.frames.SetLiftingBody(t,s.lb.checked)},this.c_options.appendChild(s.ospan),this.c_sec.push(s),this.UpdateSection(t,e)}RemoveSection(){const t=this.c_sec.pop();this.c_frame.removeChild(t.fspan),this.c_skin.removeChild(t.sspan),this.c_options.removeChild(t.ospan)}UpdateSection(t,e){const s=this.c_sec[t];s.rem.disabled=!e.internal_bracing&&!this.frames.PossibleRemoveSections(),s.add.disabled=e.internal_bracing&&!this.frames.PossibleInternalBracing();const i=this.frames.GetFrameList();for(let t=0;t{this.frames.SetTailFrame(t,s.fsel.selectedIndex)},s.fspan.appendChild(s.fsel),s.fspan.appendChild(document.createElement("BR")),this.t_frame.appendChild(s.fspan),s.sspan.appendChild(s.ssel),s.sspan.appendChild(document.createElement("BR")),this.t_skin.appendChild(s.sspan),Et(h("Frames Geodesic"),s.geo,s.ospan,!1),s.geo.onchange=()=>{this.frames.SetTailGeodesic(t,s.geo.checked)},Et(h("Frames Monocoque"),s.mono,s.ospan,!1),s.mono.onchange=()=>{this.frames.SetTailMonocoque(t,s.mono.checked)},Et(h("Frames Lifting Body"),s.lb,s.ospan,!0),s.lb.onchange=()=>{this.frames.SetTailLiftingBody(t,s.lb.checked)},this.t_options.appendChild(s.ospan),this.t_sec.push(s),this.UpdateTailSection(t,e)}RemoveTailSection(){const t=this.t_sec.pop();this.t_frame.removeChild(t.fspan),this.t_skin.removeChild(t.sspan),this.t_options.removeChild(t.ospan)}UpdateTailSection(t,e){const s=this.t_sec[t],i=this.frames.GetFrameList();for(let t=0;t{this.wings.SetStagger(this.stagger.selectedIndex)},this.closed.onchange=()=>{this.wings.SetClosed(this.closed.checked)},this.swept.onchange=()=>{this.wings.SetSwept(this.swept.checked)};const e=document.getElementById("wing_table"),s=document.createDocumentFragment(),i=xt(s);St(i,h("Wings Wing Type")),St(i,h("Wings Wing Options")),St(i,h("Wings Wing Stats"));const a=xt(s);St(a,h("Wings Full Wings"));const n=xt(s);St(n,h("Wings Miniature Wings")),this.full_cell=a.insertCell(),this.mini_cell=n.insertCell();const r=a.insertCell();r.rowSpan=0,this.InitStatDisplay(r),e.appendChild(s)}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Wing Area")),St(s,h("Stat Mass")),St(s,h("Stat Drag"));const i=e.insertRow();this.d_area=i.insertCell(),this.d_mass=i.insertCell(),this.d_drag=i.insertCell();const a=e.insertRow();St(a,h("Stat Control")),St(a,h("Stat Pitch Stability")),St(a,h("Stat Lateral Stability"));const n=e.insertRow();this.d_cont=n.insertCell(),this.d_pstb=n.insertCell(),this.d_lstb=n.insertCell();const r=e.insertRow();St(r,h("Stat Raw Strain")),St(r,h("Stat Crash Safety")),St(r,h("Stat Lift Bleed"));const o=e.insertRow();this.d_maxs=o.insertCell(),this.d_crsh=o.insertCell(),this.d_lift=o.insertCell();const l=e.insertRow();St(l,h("Stat Cost")),St(l,h("Stat Visibility")),St(l,h("Stat Charge"));const c=e.insertRow();this.d_cost=c.insertCell(),this.d_visi=c.insertCell(),this.d_chrg=c.insertCell();const u=e.insertRow();St(u,""),St(u,h("Wings Sesquiplane")),St(u,h("Derived Is Flammable Question"));const m=e.insertRow();m.insertCell(),this.d_sesq=m.insertCell(),this.d_flam=m.insertCell()}UpdateDisplay(){const t=this.wings.CanStagger();for(let e=0;ee.length;)this.PopFullWing();const s=this.wings.GetMiniWingList();for(let t=0;ts.length;)this.PopMiniWing();this.CreateFWAdd(e.length),this.CreateMWAdd(s.length);const i=this.wings.PartStats();Nt(this.d_area,i.wingarea.toString(),!0),Nt(this.d_mass,(i.mass+this.wings.GetPaperMass()).toString(),!1),Nt(this.d_drag,i.drag.toString(),!1),Nt(this.d_cont,i.control.toString(),!0),Nt(this.d_pstb,i.pitchstab.toString(),!0),Nt(this.d_lstb,i.latstab.toString(),!0),Nt(this.d_maxs,i.maxstrain.toString(),!0),Nt(this.d_lift,i.liftbleed.toString(),!1),Nt(this.d_crsh,i.crashsafety.toString(),!0),Nt(this.d_cost,i.cost.toString(),!1),Nt(this.d_visi,i.visibility.toString(),!0),Nt(this.d_chrg,i.charge.toString(),!0),this.wings.GetIsSesquiplane().is?Nt(this.d_sesq,h("Yes")):Nt(this.d_sesq,h("No")),this.wings.IsFlammable()?Nt(this.d_flam,h("Yes")):Nt(this.d_flam,h("No"))}AddFullWing(){const t={span:document.createElement("SPAN"),deck:document.createElement("SELECT"),skin:document.createElement("SELECT"),area:document.createElement("INPUT"),wspan:document.createElement("INPUT"),gull:document.createElement("INPUT"),dihedral:document.createElement("INPUT"),anhedral:document.createElement("INPUT"),br:document.createElement("BR")};t.span.appendChild(t.deck);const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),t.deck.append(s);for(let s=0;s{let i={...s};i.deck=t.deck.selectedIndex-1,this.wings.SetFullWing(e,i)},t.deck.selectedIndex=s.deck+1,t.skin.onchange=()=>{let i={...s};i.surface=t.skin.selectedIndex,this.wings.SetFullWing(e,i)},t.skin.selectedIndex=s.surface,t.area.onchange=()=>{let i={...s};i.area=t.area.valueAsNumber,this.wings.SetFullWing(e,i)},t.area.valueAsNumber=s.area,t.wspan.onchange=()=>{let i={...s};i.span=t.wspan.valueAsNumber,this.wings.SetFullWing(e,i)},t.wspan.valueAsNumber=s.span,t.gull.onchange=()=>{let i={...s};i.gull=t.gull.checked,this.wings.SetFullWing(e,i)},t.gull.checked=s.gull,t.gull.disabled=!this.wings.CanGull(s.deck),t.dihedral.onchange=()=>{let i={...s};isNaN(t.dihedral.valueAsNumber)||(i.dihedral=t.dihedral.valueAsNumber),this.wings.SetFullWing(e,i)},t.dihedral.max=(s.span-s.anhedral-1).toString(),t.dihedral.valueAsNumber=s.dihedral,t.anhedral.onchange=()=>{let i={...s};isNaN(t.anhedral.valueAsNumber)||(i.anhedral=t.anhedral.valueAsNumber),this.wings.SetFullWing(e,i)},t.anhedral.max=(s.span-s.dihedral-1).toString(),t.anhedral.valueAsNumber=s.anhedral}AddMiniWing(){const t={span:document.createElement("SPAN"),deck:document.createElement("SELECT"),skin:document.createElement("SELECT"),area:document.createElement("INPUT"),wspan:document.createElement("INPUT"),gull:void 0,dihedral:void 0,anhedral:void 0,br:document.createElement("BR")};t.span.appendChild(t.deck);const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),t.deck.append(s);for(let s=0;s{let i={...s};i.deck=t.deck.selectedIndex-1,this.wings.SetMiniWing(e,i)},t.deck.selectedIndex=s.deck+1,t.skin.onchange=()=>{let i={...s};i.surface=t.skin.selectedIndex,this.wings.SetMiniWing(e,i)},t.skin.selectedIndex=s.surface,t.area.onchange=()=>{let i={...s};i.area=t.area.valueAsNumber,this.wings.SetMiniWing(e,i)},t.area.valueAsNumber=s.area,t.wspan.onchange=()=>{let i={...s};i.span=t.wspan.valueAsNumber,this.wings.SetMiniWing(e,i)},t.wspan.valueAsNumber=s.span}PopMiniWing(){const t=this.mw_list.pop();this.mini_cell.removeChild(t.span),this.mini_cell.removeChild(t.br)}CreateFWAdd(t){this.fw_add=document.createElement("SELECT");const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),this.fw_add.append(s);var i=!1;for(let t=0;t{let e={surface:0,area:10,span:5,gull:!1,dihedral:0,anhedral:0,deck:this.fw_add.selectedIndex-1};this.wings.SetFullWing(t,e)},this.fw_add.selectedIndex=0,this.fw_add.disabled=!i,this.full_cell.appendChild(this.fw_add)}CreateMWAdd(t){this.mw_add=document.createElement("SELECT");const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),this.mw_add.append(s);var i=!1;for(let t=0;t{let e={surface:0,area:2,span:2,gull:!1,dihedral:0,anhedral:0,deck:this.mw_add.selectedIndex-1};this.wings.SetMiniWing(t,e)},this.mw_add.selectedIndex=0,this.mw_add.disabled=!i,this.mini_cell.appendChild(this.mw_add)}}class te extends kt{constructor(t){super(),this.stab=t,document.getElementById("lbl_stab").textContent=h("Stabilizers Section Title");const e=document.getElementById("stab_table"),s=document.createDocumentFragment();var i=xt(s);St(i,h("Stabilizers Horizontal Stabilizers")),St(i,h("Stabilizers Vertical Stabilizers")),St(i,h("Stabilizers Stabilizer Stats"));const a=(i=xt(s)).insertCell(),n=i.insertCell();this.h_type=document.createElement("SELECT"),this.h_count=document.createElement("INPUT"),a.appendChild(this.h_type),a.append(document.createElement("BR")),yt(h("Stabilizers # of Stabilizers"),this.h_count,a),this.h_count.min="0",this.h_count.max="20",this.h_count.onchange=()=>{this.stab.SetHStabCount(this.h_count.valueAsNumber)},this.h_type.onchange=()=>{this.stab.SetHStabType(this.h_type.selectedIndex)};for(let e of t.GetHStabList()){let t=document.createElement("OPTION");t.text=h(e.name),this.h_type.add(t)}this.v_type=document.createElement("SELECT"),this.v_count=document.createElement("INPUT"),n.appendChild(this.v_type),n.appendChild(document.createElement("BR")),yt(h("Stabilizers # of Stabilizers"),this.v_count,n),this.v_count.min="0",this.v_count.max="20",this.v_count.onchange=()=>{this.stab.SetVStabCount(this.v_count.valueAsNumber)},this.v_type.onchange=()=>{this.stab.SetVStabType(this.v_type.selectedIndex)};for(let e of t.GetVStabList()){let t=document.createElement("OPTION");t.text=h(e.name),this.v_type.add(t)}const r=i.insertCell();r.rowSpan=0,this.InitStatDisplay(r),e.appendChild(s)}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Control")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_cont=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Pitch Stability")),St(a,h("Stat Lateral Stability")),St(a,h("Stat Lift Bleed"));const n=e.insertRow();this.d_pstb=n.insertCell(),this.d_lstb=n.insertCell(),this.d_lift=n.insertCell()}SetCollapse(){Ot("stabilizer_collapse",!this.stab.IsDefault())}UpdateDisplay(){this.h_type.selectedIndex=this.stab.GetHStabType(),this.v_type.selectedIndex=this.stab.GetVStabType();var t=this.stab.GetHValidList();for(let e=0;e{this.cs.SetAileron(this.aileron_select.selectedIndex)},this.rudder_select=document.createElement("SELECT");for(let e of t.GetRudderList()){let t=document.createElement("OPTION");t.text=h(e.name),this.rudder_select.add(t)}this.rudder_select.onchange=()=>{this.cs.SetRudder(this.rudder_select.selectedIndex)},this.elevator_select=document.createElement("SELECT");for(let e of t.GetElevatorList()){let t=document.createElement("OPTION");t.text=h(e.name),this.elevator_select.add(t)}this.elevator_select.onchange=()=>{this.cs.SetElevator(this.elevator_select.selectedIndex)},this.flaps_select=document.createElement("SELECT");for(let e of t.GetFlapsList()){let t=document.createElement("OPTION");t.text=h(e.name),this.flaps_select.add(t)}this.flaps_select.onchange=()=>{this.cs.SetFlaps(this.flaps_select.selectedIndex)},this.slats_select=document.createElement("SELECT");for(let e of t.GetSlatsList()){let t=document.createElement("OPTION");t.text=h(e.name),this.slats_select.add(t)}this.slats_select.onchange=()=>{this.cs.SetSlats(this.slats_select.selectedIndex)};const n=bt(a);Bt(h("Control Surfaces Ailerons"),this.aileron_select,n),Bt(h("Control Surfaces Rudders"),this.rudder_select,n),Bt(h("Control Surfaces Elevators"),this.elevator_select,n),Bt(h("Control Surfaces Flaps"),this.flaps_select,n),Bt(h("Control Surfaces Slats"),this.slats_select,n);const r=bt(i.insertCell());this.drag_chbx=[];const o=t.GetDragList();for(let t=0;t{this.cs.SetDrag(t,e.checked)},this.drag_chbx.push(e)}this.InitStatDisplay(i.insertCell()),e.appendChild(s)}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Control")),St(a,h("Stat Pitch Stability")),St(a,h("Stat Lateral Stability"));const n=e.insertRow();this.d_cont=n.insertCell(),this.d_pstb=n.insertCell(),this.d_lstb=n.insertCell();const r=e.insertRow();St(r,h("Stat Lift Bleed")),St(r,h("Stat Crash Safety")),St(r," ");const o=e.insertRow();this.d_lift=o.insertCell(),this.d_crsh=o.insertCell(),this.d_none=o.insertCell()}SetCollapse(){Ot("control_collapse",!this.cs.IsDefault())}UpdateDisplay(){const t=this.cs.CanAileron();for(let e=0;e{this.rf.SetExternalWoodCount(t,r.valueAsNumber)},o.onchange=()=>{this.rf.SetExternalSteelCount(t,o.valueAsNumber)},this.ext_wood_inp.push(r),this.ext_steel_inp.push(o)}this.cabane=document.createElement("SELECT"),Bt(h("Reinforcement Cabane"),this.cabane,e);for(let t of this.rf.GetCabaneList()){let e=document.createElement("OPTION");e.text=h(t.name),this.cabane.add(e)}this.cabane.onchange=()=>{this.rf.SetCabane(this.cabane.selectedIndex)},this.cabane.selectedIndex=0,this.wires=document.createElement("INPUT"),Pt(h("Reinforcement Wires"),this.wires,e),this.wires.onchange=()=>{this.rf.SetWires(this.wires.checked)}}InitInternal(t){const e=bt(t),s=this.rf.GetCantileverList();for(let t=0;t{this.rf.SetCantileverCount(t,a.valueAsNumber)},this.cant_inp.push(a)}this.wing_blades=document.createElement("INPUT"),Pt(h("Reinforcement Wing Blades"),this.wing_blades,e),this.wing_blades.onchange=()=>{this.rf.SetWingBlade(this.wing_blades.checked)}}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Structure")),St(a,h("Stat Raw Strain")),St(a,h("Reinforcement Aircraft Max Strain"));const n=e.insertRow();this.d_strc=n.insertCell(),this.d_maxs=n.insertCell(),this.d_amax=n.insertCell(),this.d_amax.className="part_local"}UpdateDisplay(){this.cabane.selectedIndex=this.rf.GetCabane(),this.wires.checked=this.rf.GetWires();const t=this.rf.GetExternalWoodCount(),e=this.rf.CanExternalWood();for(let s=0;s{this.fuel.SetTankCount(t,i.valueAsNumber)},this.fuel_list.push(i)}this.seal=document.createElement("INPUT"),Pt(h("Load Self-Sealing Gas Tank"),this.seal,s),this.seal.onchange=()=>{this.fuel.SetSelfSealing(this.seal.checked)},this.extinguish=document.createElement("INPUT"),Pt(h("Load Remote Fire Extinguisher"),this.extinguish,s),this.extinguish.onchange=()=>{this.fuel.SetExtinguisher(this.extinguish.checked)}}InitMunitions(t){const e=bt(t);this.bombs=document.createElement("INPUT"),wt(h("Load Bombs"),this.bombs,e),this.bombs.onchange=()=>{this.boom.SetBombCount(this.bombs.valueAsNumber)},this.rockets=document.createElement("INPUT"),wt(h("Load Rockets"),this.rockets,e),this.rockets.onchange=()=>{this.boom.SetRocketCount(this.rockets.valueAsNumber)},this.bay_count=document.createElement("INPUT"),wt(h("Load Internal Bay Count"),this.bay_count,e),this.bay_count.onchange=()=>{this.boom.SetBayCount(this.bay_count.valueAsNumber)},this.bay1=document.createElement("INPUT"),Pt(h("Load Widen Internal Bay 1"),this.bay1,e),this.bay1.onchange=()=>{this.boom.SetUseBays(this.bay1.checked,this.bay2.checked)},this.bay2=document.createElement("INPUT"),Pt(h("Load Widen Internal Bay 2"),this.bay2,e),this.bay2.onchange=()=>{this.boom.SetUseBays(this.bay1.checked,this.bay2.checked)}}InitCargoAndPassengers(t){this.carg=document.createElement("SELECT"),t.appendChild(this.carg);const e=this.cargo.GetSpaceList();for(let t of e){let e=document.createElement("OPTION");e.text=h(t.name),this.carg.add(e)}this.carg.onchange=()=>{this.cargo.SetSpace(this.carg.selectedIndex)}}InitStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Wet Mass"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_wmas=i.insertCell();var a=e.insertRow();St(a,h("Stat Required Sections")),St(a,h("Stat Fuel")),St(a,h("Stat Cost"));var n=e.insertRow();this.d_rsec=n.insertCell(),this.d_fuel=n.insertCell(),this.d_cost=n.insertCell(),St(a=e.insertRow(),""),St(a,h("Derived Fuel Uses")),St(a,""),(n=e.insertRow()).insertCell(),this.d_fuse=n.insertCell(),n.insertCell()}UpdateFuelUses(t){var e=Math.floor(1e-6+10*t)/10;isFinite(e)||(e=0),Nt(this.d_fuse,e.toString(),!1)}UpdateDisplay(){const t=this.fuel.GetTankCount(),e=this.fuel.GetTankEnabled();for(let s=0;s0?(this.bay1.disabled=!1,this.bay1.checked?this.bay2.disabled=!1:this.bay2.disabled=!0):(this.bay1.disabled=!0,this.bay2.disabled=!0),this.carg.selectedIndex=this.cargo.GetSpace();var s=this.fuel.PartStats();s=(s=s.Add(this.boom.PartStats())).Add(this.cargo.PartStats()),Nt(this.d_drag,s.drag.toString(),!1),Nt(this.d_mass,s.mass.toString(),!1),Nt(this.d_wmas,s.wetmass.toString(),!1),Nt(this.d_rsec,s.reqsections.toString(),!1),Nt(this.d_fuel,s.fuel.toString(),!0),Nt(this.d_cost,s.cost.toString(),!1)}}class ae extends kt{constructor(t){super(),this.gear=t,document.getElementById("lbl_landing_gear").textContent=h("Landing Gear Section Title");const e=document.getElementById("tbl_gear"),s=document.createDocumentFragment();var i=xt(s);St(i,h("Landing Gear Landing Gear")),St(i,h("Landing Gear Extras")),St(i,h("Landing Gear Gear Stats")),i=xt(s),this.InitGear(i.insertCell()),this.InitExtras(i.insertCell()),this.InitStats(i.insertCell()),e.appendChild(s)}InitGear(t){const e=this.gear.GetGearList(),s=bt(t);this.sel=document.createElement("SELECT"),Bt("Type",this.sel,s);for(let t=0;t{this.gear.SetGear(this.sel.selectedIndex)},this.retract=document.createElement("INPUT"),Pt(h("Landing Gear Retractable"),this.retract,s),this.retract.onchange=()=>{this.gear.SetRetract(this.retract.checked)}}InitExtras(t){this.extras=[];const e=this.gear.GetExtraList(),s=bt(t);for(let t=0;t{this.gear.SetExtraSelected(t,i.checked)},this.extras.push(i)}}InitStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Structure")),St(a,h("Stat Crash Safety")),St(a,"");const n=e.insertRow();this.d_strc=n.insertCell(),this.d_crsh=n.insertCell(),n.insertCell()}SetCollapse(){Ot("gear_collapse",!this.gear.IsDefault())}UpdateDisplay(){this.sel.selectedIndex=this.gear.GetGear();const t=this.gear.CanGear();for(let e=0;e{this.acc.SetArmourCoverage(t,this.a_AP[t].valueAsNumber)};let n=t+a/2;e=n+1,wt("Thickness "+e.toString(),this.a_AP[n],i),this.a_AP[n].onchange=()=>{this.acc.SetArmourCoverage(n,this.a_AP[n].valueAsNumber)}}}InitElectrical(t){const e=bt(t);this.radio=document.createElement("SELECT"),Bt(h("Accessories Radio"),this.radio,e);const s=this.acc.GetRadioList();for(let t=0;t{this.acc.SetRadioSel(this.radio.selectedIndex)},this.elect=[];const i=this.acc.GetElectricalList();for(let t=0;t{this.acc.SetElectricalCount(t,s.valueAsNumber)},this.elect.push(s)}}InitInformation(t){const e=bt(t),s=this.acc.GetReconList();this.recon=[];for(let t=0;t{this.acc.SetReconSel(t,i.valueAsNumber)},this.recon.push(i)}}InitVisibility(t){const e=bt(t),s=this.acc.GetVisibilityList();this.visi=[];for(let t=0;t{this.acc.SetVisibilitySel(t,i.checked)},this.visi.push(i)}}InitClimate(t){const e=bt(t),s=this.acc.GetClimateList();this.clim=[];for(let t=0;t{this.acc.SetClimateSel(t,i.checked)},this.clim.push(i)}}InitControl(t){const e=bt(t);this.auto=document.createElement("SELECT");const s=this.acc.GetAutopilotList();Bt(h("Accessories Autopilot"),this.auto,e);for(let t=0;t{this.acc.SetAutopilotSel(this.auto.selectedIndex)};const i=this.acc.GetControlList();this.cont=document.createElement("SELECT"),Bt(h("Accessories Control Aids"),this.cont,e);for(let t=0;t{this.acc.SetControlSel(this.cont.selectedIndex)}}InitStats(t){t.rowSpan=3,t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Structure")),St(a,h("Stat Charge")),St(a,h("Stat Lift Bleed"));const n=e.insertRow();this.d_strc=n.insertCell(),this.d_chgh=n.insertCell(),this.d_lift=n.insertCell();const r=e.insertRow();St(r,h("Stat Visibility")),St(r,h("Stat Flight Stress")),St(r,h("Stat Required Sections"));const o=e.insertRow();this.d_visi=o.insertCell(),this.d_strs=o.insertCell(),this.d_rsec=o.insertCell()}UpdateDisplay(){const t=this.acc.GetArmourCoverageForDisplay();for(let e=0;e{this.opt.SetFreeDots(this.free_inp.valueAsNumber)};const e=document.getElementById("tbl_optimization"),s=document.createDocumentFragment(),i=xt(s);St(i,h("Optimization Negative")),St(i,h("Optimization Effect")),St(i,h("Optimization Positive")),St(i,h("Optimization Optimization Stats"));const a=xt(s);this.cost_cbx=this.InitRow(a,h("Optimization Cost"),(t=>this.opt.SetCost(t))),this.bleed_cbx=this.InitRow(xt(s),h("Optimization Lift Bleed"),(t=>this.opt.SetBleed(t))),this.escape_cbx=this.InitRow(xt(s),h("Optimization Leg Room"),(t=>this.opt.SetEscape(t))),this.mass_cbx=this.InitRow(xt(s),h("Optimization Mass"),(t=>this.opt.SetMass(t))),this.toughness_cbx=this.InitRow(xt(s),h("Optimization Toughness"),(t=>this.opt.SetToughness(t))),this.maxstrain_cbx=this.InitRow(xt(s),h("Optimization Max Strain"),(t=>this.opt.SetMaxStrain(t))),this.reliability_cbx=this.InitRow(xt(s),h("Optimization Reliability"),(t=>this.opt.SetReliability(t))),this.drag_cbx=this.InitRow(xt(s),h("Optimization Drag"),(t=>this.opt.SetDrag(t))),this.InitStatDisplay(a.insertCell()),e.appendChild(s)}InitRow(t,e,s){const i=[];for(let t=0;t<6;t++)i.push(document.createElement("INPUT")),i[t].setAttribute("type","checkbox"),i[t].onchange=t<3?()=>{i[t].checked?s(t-3):s(t-2)}:()=>{i[t].checked?s(t-2):s(t-3)};const a=t.insertCell(),n=t.insertCell(),r=t.insertCell();return a.appendChild(i[0]),a.appendChild(i[1]),a.appendChild(i[2]),n.textContent=e,r.appendChild(i[3]),r.appendChild(i[4]),r.appendChild(i[5]),i}InitStatDisplay(t){t.rowSpan=0,t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Cost")),St(s,h("Stat Lift Bleed")),St(s,h("Stat Escape"));const i=e.insertRow();this.d_cost=i.insertCell(),this.d_lift=i.insertCell(),this.d_escp=i.insertCell();const a=e.insertRow();St(a,h("Stat Visibility")),St(a,h("Stat Mass")),St(a,h("Stat Toughness"));const n=e.insertRow();this.d_visi=n.insertCell(),this.d_mass=n.insertCell(),this.d_tugh=n.insertCell();const r=e.insertRow();St(r,h("Stat Max Strain")),St(r,h("Stat Reliability")),St(r,h("Stat Drag"));const o=e.insertRow();this.d_mstr=o.insertCell(),this.d_reli=o.insertCell(),this.d_drag=o.insertCell()}SetCollapse(){Ot("optimization_collapse",!this.opt.IsDefault())}UpdateChecked(t,e){for(let t=0;t0&&(e[3].checked=!0,t>1&&(e[4].checked=!0,t>2&&(e[5].checked=!0)))}UpdateEnabled(t,e){var s=0;for(let i=3;it}UpdateDisplay(){this.free_inp.valueAsNumber=this.opt.GetFreeDots(),this.UpdateChecked(this.opt.GetCost(),this.cost_cbx),this.UpdateChecked(this.opt.GetBleed(),this.bleed_cbx),this.UpdateChecked(this.opt.GetEscape(),this.escape_cbx),this.UpdateChecked(this.opt.GetMass(),this.mass_cbx),this.UpdateChecked(this.opt.GetToughness(),this.toughness_cbx),this.UpdateChecked(this.opt.GetMaxStrain(),this.maxstrain_cbx),this.UpdateChecked(this.opt.GetReliabiilty(),this.reliability_cbx),this.UpdateChecked(this.opt.GetDrag(),this.drag_cbx);const t=this.opt.GetUnassignedCount();this.UpdateEnabled(t,this.cost_cbx),this.UpdateEnabled(t,this.bleed_cbx),this.UpdateEnabled(t,this.escape_cbx),this.UpdateEnabled(t,this.mass_cbx),this.UpdateEnabled(t,this.toughness_cbx),this.UpdateEnabled(t,this.maxstrain_cbx),this.UpdateEnabled(t,this.reliability_cbx),this.UpdateEnabled(t,this.drag_cbx);const e=this.opt.PartStats();Nt(this.d_cost,e.cost.toString(),!1),Nt(this.d_lift,e.liftbleed.toString(),!1),Nt(this.d_escp,e.escape.toString(),!0),Nt(this.d_visi,e.visibility.toString(),!0),Nt(this.d_mass,e.mass.toString(),!1),Nt(this.d_tugh,e.toughness.toString(),!0),Nt(this.d_mstr,this.opt.final_ms.toString(),!0),Nt(this.d_reli,e.reliability.toString(),!0),Nt(this.d_drag,e.drag.toString(),!1)}}class oe extends kt{constructor(t){super(),this.used=t,document.getElementById("lbl_used").textContent=h("Used Section Title"),this.tbl=document.getElementById("tbl_used");const e=document.createDocumentFragment(),s=xt(e);St(s,h("Used Effect")),St(s,h("Used Description")),St(s,h("Used Penalties(+)
Benefits(-)")),this.InitTable(e),this.tbl.appendChild(e)}InitTable(t){this.burnt_out=document.createElement("INPUT"),this.ragged=document.createElement("INPUT"),this.hefty=document.createElement("INPUT"),this.sticky_guns=document.createElement("INPUT"),this.weak=document.createElement("INPUT"),this.fragile=document.createElement("INPUT"),this.leaky=document.createElement("INPUT"),this.sluggish=document.createElement("INPUT");var e=xt(t);e.insertCell().textContent=h("Used Burnt Out"),e.insertCell().textContent=h("Used Burnt Out Description");var s=e.insertCell();yt("",this.burnt_out,s,!1),(e=xt(t)).insertCell().textContent=h("Used Ragged"),e.insertCell().textContent=h("Used Ragged Description"),s=e.insertCell(),yt("",this.ragged,s,!1),(e=xt(t)).insertCell().textContent=h("Used Hefty"),e.insertCell().textContent=h("Used Hefty Description"),s=e.insertCell(),yt("",this.hefty,s,!1),(e=xt(t)).insertCell().textContent=h("Used Sticky Guns"),e.insertCell().textContent=h("Used Sticky Guns Description"),s=e.insertCell(),yt("",this.sticky_guns,s,!1),(e=xt(t)).insertCell().textContent=h("Used Weak"),e.insertCell().textContent=h("Used Weak Description"),s=e.insertCell(),yt("",this.weak,s,!1),(e=xt(t)).insertCell().textContent=h("Used Fragile"),e.insertCell().textContent=h("Used Fragile Description"),s=e.insertCell(),yt("",this.fragile,s,!1),(e=xt(t)).insertCell().textContent=h("Used Leaky"),e.insertCell().textContent=h("Used Leaky Description"),s=e.insertCell(),yt("",this.leaky,s,!1),(e=xt(t)).insertCell().textContent=h("Used Sluggish"),e.insertCell().textContent=h("Used Sluggish Description"),s=e.insertCell(),yt("",this.sluggish,s,!1),this.burnt_out.onchange=()=>{this.used.burnt_out=this.burnt_out.valueAsNumber,this.used.TriggerCS()},this.ragged.onchange=()=>{this.used.ragged=this.ragged.valueAsNumber,this.used.TriggerCS()},this.hefty.onchange=()=>{this.used.hefty=this.hefty.valueAsNumber,this.used.TriggerCS()},this.sticky_guns.onchange=()=>{this.used.sticky_guns=this.sticky_guns.valueAsNumber,this.used.TriggerCS()},this.weak.onchange=()=>{this.used.weak=this.weak.valueAsNumber,this.used.TriggerCS()},this.fragile.onchange=()=>{this.used.fragile=this.fragile.valueAsNumber,this.used.TriggerCS()},this.leaky.onchange=()=>{this.used.leaky=this.leaky.valueAsNumber,this.used.TriggerCS()},this.sluggish.onchange=()=>{this.used.sluggish=this.sluggish.valueAsNumber,this.used.TriggerCS()},this.burnt_out.min="-1",this.burnt_out.max="1",this.ragged.min="-1",this.ragged.max="1",this.hefty.min="-1",this.hefty.max="1",this.sticky_guns.min="-1",this.sticky_guns.max="1",this.weak.min="-1",this.weak.max="1",this.fragile.min="-1",this.fragile.max="1",this.leaky.min="-1",this.leaky.max="1",this.sluggish.min="-1",this.sluggish.max="1"}SetCollapse(){Ot("used_collapse",!this.used.IsDefault())}UpdateDisplay(){this.burnt_out.valueAsNumber=this.used.burnt_out,this.ragged.valueAsNumber=this.used.ragged,this.hefty.valueAsNumber=this.used.hefty,this.sticky_guns.valueAsNumber=this.used.sticky_guns,this.weak.valueAsNumber=this.used.weak,this.fragile.valueAsNumber=this.used.fragile,this.leaky.valueAsNumber=this.used.leaky,this.sluggish.valueAsNumber=this.used.sluggish}}class le extends kt{constructor(t){super(),this.rotor=t,document.getElementById("lbl_rotor").textContent=h("Rotor Section Title"),this.div=document.getElementById("Rotors"),this.wing_div=document.getElementById("Wings"),this.reinforce_div=document.getElementById("Reinforcements"),this.control_div=document.getElementById("ControlSurfaces");const e=document.getElementById("rotor_table"),s=document.createDocumentFragment();this.InitAutogyro(s),this.InitHelicopter(s),e.appendChild(s)}InitAutogyro(t){this.auto_header=xt(t),St(this.auto_header,h("Rotor Rotor")),St(this.auto_header,h("Rotor Material")),St(this.auto_header,h("Rotor Accessories")),St(this.auto_header,h("Rotor Stats")),this.auto_row=xt(t);const e=bt(this.auto_row.insertCell());this.auto_min=document.createElement("LABEL"),Ct(h("Rotor Minimum Span"),this.auto_min,e),this.auto_span=document.createElement("INPUT"),wt(h("Rotor Span"),this.auto_span,e),this.auto_span.onchange=()=>{this.rotor.SetRotorSpan(this.auto_span.valueAsNumber)};const s=bt(this.auto_row.insertCell());this.auto_mat=document.createElement("SELECT"),Bt(h("Rotor Material"),this.auto_mat,s);for(let t of this.rotor.GetCantileverList()){let e=document.createElement("OPTION");e.text=h(t.name),this.auto_mat.add(e)}this.auto_mat.onchange=()=>{this.rotor.SetCantilever(this.auto_mat.selectedIndex)};const i=bt(this.auto_row.insertCell());this.auto_clutch=document.createElement("INPUT"),Pt(h("Rotor Clutched Rotor"),this.auto_clutch,i),this.auto_clutch.onchange=()=>{this.rotor.SetAccessory(this.auto_clutch.checked)},this.InitAutogyroStats(this.auto_row.insertCell())}InitAutogyroStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.a_drag=i.insertCell(),this.a_mass=i.insertCell(),this.a_cost=i.insertCell();const a=e.insertRow();St(a,h("Rotor Area")),St(a,""),St(a,"");const n=e.insertRow();this.a_area=n.insertCell(),n.insertCell(),n.insertCell()}UpdateAutogyroStats(){this.auto_span.valueAsNumber=this.rotor.GetRotorSpan(),this.auto_mat.selectedIndex=this.rotor.GetCantilever(),this.auto_min.innerText=""+this.rotor.GetSizingSpan(),this.auto_clutch.checked=this.rotor.GetAccessory();const t=this.rotor.PartStats();Nt(this.a_drag,t.drag.toString(),!1),Nt(this.a_mass,t.mass.toString(),!1),Nt(this.a_cost,t.cost.toString(),!1),Nt(this.a_area,t.wingarea.toString(),!0)}InitHelicopter(t){this.heli_header=xt(t),St(this.heli_header,h("Rotor Rotor")),St(this.heli_header,h("Rotor Material")),St(this.heli_header,h("Rotor Accessories")),St(this.heli_header,h("Rotor Stats")),this.heli_row=xt(t);const e=bt(this.heli_row.insertCell());this.heli_count=document.createElement("INPUT"),wt(h("Rotor Number of Rotors"),this.heli_count,e),this.heli_count.onchange=()=>{this.rotor.SetRotorCount(this.heli_count.valueAsNumber)},this.heli_min=document.createElement("LABEL"),Ct(h("Rotor Ideal Rotor Span"),this.heli_min,e),this.heli_span=document.createElement("INPUT"),wt(h("Rotor Span"),this.heli_span,e),this.heli_span.min="",this.heli_span.onchange=()=>{this.rotor.SetRotorSpan(this.heli_span.valueAsNumber)},this.heli_stagger=document.createElement("SELECT"),Bt(h("Rotor Stagger"),this.heli_stagger,e);const s=this.rotor.GetStaggerList();for(let t of s){let e=document.createElement("OPTION");e.text=h(t.name),this.heli_stagger.add(e)}this.heli_stagger.onchange=()=>{this.rotor.SetStagger(this.heli_stagger.selectedIndex)},this.heli_blade_count=document.createElement("SELECT"),Bt(h("Rotor Blade Count"),this.heli_blade_count,e);const i=this.rotor.GetBladeList();for(let t of i){let e=document.createElement("OPTION");e.textContent=t.name,this.heli_blade_count.add(e)}this.heli_blade_count.onchange=()=>{this.rotor.SetBladeCount(this.heli_blade_count.selectedIndex)};const a=bt(this.heli_row.insertCell());this.heli_mat=document.createElement("SELECT"),Bt(h("Rotor Rotor Material"),this.heli_mat,a);for(let t of this.rotor.GetCantileverList()){let e=document.createElement("OPTION");e.text=h(t.name),this.heli_mat.add(e)}this.heli_mat.onchange=()=>{this.rotor.SetCantilever(this.heli_mat.selectedIndex)},this.heli_blade_thickness=document.createElement("INPUT"),wt(h("Rotor Thickness"),this.heli_blade_thickness,a),this.heli_blade_thickness.onchange=()=>{this.rotor.SetRotorThickness(this.heli_blade_thickness.valueAsNumber)};const n=bt(this.heli_row.insertCell());this.heli_shafts=document.createElement("INPUT"),Pt(h("Rotor Motor Cross-link"),this.heli_shafts,n),this.heli_shafts.onchange=()=>{this.rotor.SetAccessory(this.heli_shafts.checked)},this.InitHelicopterStats(this.heli_row.insertCell())}InitHelicopterStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.h_drag=i.insertCell(),this.h_mass=i.insertCell(),this.h_cost=i.insertCell();const a=e.insertRow();St(a,h("Rotor Area")),St(a,h("Stat Reliability")),St(a,h("Reinforcement Aircraft Max Strain"));const n=e.insertRow();this.h_area=n.insertCell(),this.h_rely=n.insertCell(),this.h_strn=n.insertCell();const r=e.insertRow();St(r,""),St(r,h("Power")),St(r,"");const o=e.insertRow();o.insertCell(),this.h_powr=o.insertCell(),o.insertCell()}UpdateHelicopterStats(){this.heli_count.valueAsNumber=this.rotor.GetRotorCount(),1==this.rotor.GetRotorCount()?this.heli_count.step="1":this.heli_count.step="2",this.heli_min.innerText=""+this.rotor.GetSizingSpan(),this.heli_span.valueAsNumber=this.rotor.GetRotorSpan();const t=this.rotor.CanStagger();for(let e=0;e{let t=new u;t.drag=this.drag.valueAsNumber,t.mass=this.mass.valueAsNumber,t.wetmass=this.wmas.valueAsNumber,t.bomb_mass=this.bmas.valueAsNumber,t.cost=this.cost.valueAsNumber,t.upkeep=this.upkp.valueAsNumber,t.liftbleed=this.lfbd.valueAsNumber,t.wingarea=this.area.valueAsNumber,t.control=this.ctrl.valueAsNumber,t.pitchstab=this.pstb.valueAsNumber,t.latstab=this.lstb.valueAsNumber,t.maxstrain=this.rstn.valueAsNumber,t.structure=this.strc.valueAsNumber,t.toughness=this.tugh.valueAsNumber,t.power=this.powr.valueAsNumber,t.fuelconsumption=this.fcon.valueAsNumber,t.fuel=this.fuel.valueAsNumber,t.charge=this.chrg.valueAsNumber,t.crashsafety=this.sfty.valueAsNumber,t.visibility=this.visi.valueAsNumber,t.escape=this.escp.valueAsNumber,t.reliability=this.rely.valueAsNumber,this.sprl.value=this.sprl.value.trim(),this.sprl.value.length>0&&t.warnings.push({source:this.name.value,warning:this.sprl.value,color:c.WHITE}),this.alter.AddPart(this.name.value,t),this.UpdateSelect(),this.sel.selectedIndex=-1},this.rem.onclick=()=>{this.alter.RemovePart(this.name.value),this.ResetInputs(),this.UpdateSelect(),this.sel.selectedIndex=-1},this.sel.onchange=()=>{let t=this.alter.GetParts()[this.sel.selectedIndex];this.name.value=t.name,this.drag.valueAsNumber=t.stats.drag,this.mass.valueAsNumber=t.stats.mass,this.wmas.valueAsNumber=t.stats.wetmass,this.bmas.valueAsNumber=t.stats.bomb_mass,this.cost.valueAsNumber=t.stats.cost,this.upkp.valueAsNumber=t.stats.upkeep,this.lfbd.valueAsNumber=t.stats.liftbleed,this.area.valueAsNumber=t.stats.wingarea,this.ctrl.valueAsNumber=t.stats.control,this.pstb.valueAsNumber=t.stats.pitchstab,this.lstb.valueAsNumber=t.stats.latstab,this.rstn.valueAsNumber=t.stats.maxstrain,this.strc.valueAsNumber=t.stats.structure,this.tugh.valueAsNumber=t.stats.toughness,this.powr.valueAsNumber=t.stats.power,this.fcon.valueAsNumber=t.stats.fuelconsumption,this.fuel.valueAsNumber=t.stats.fuel,this.chrg.valueAsNumber=t.stats.charge,this.sfty.valueAsNumber=t.stats.crashsafety,this.visi.valueAsNumber=t.stats.visibility,this.escp.valueAsNumber=t.stats.escape,this.rely.valueAsNumber=t.stats.reliability;const e=[];for(let s of t.stats.warnings)e.push(s.warning);this.sprl.value=n.Join(" ",e),this.sel.selectedIndex=-1},this.ResetInputs(),this.UpdateSelect()}ResetInputs(){this.name.value="Default",this.drag.valueAsNumber=0,this.mass.valueAsNumber=0,this.wmas.valueAsNumber=0,this.bmas.valueAsNumber=0,this.cost.valueAsNumber=0,this.upkp.valueAsNumber=0,this.lfbd.valueAsNumber=0,this.area.valueAsNumber=0,this.ctrl.valueAsNumber=0,this.pstb.valueAsNumber=0,this.lstb.valueAsNumber=0,this.rstn.valueAsNumber=0,this.strc.valueAsNumber=0,this.tugh.valueAsNumber=0,this.powr.valueAsNumber=0,this.fcon.valueAsNumber=0,this.fuel.valueAsNumber=0,this.chrg.valueAsNumber=0,this.sfty.valueAsNumber=0,this.visi.valueAsNumber=0,this.escp.valueAsNumber=0,this.rely.valueAsNumber=0,this.sprl.value=""}UpdateSelect(){for(;this.sel.options.length;)this.sel.remove(this.sel.options.length-1);const t=this.alter.GetParts();for(let e of t){let t=document.createElement("OPTION");t.textContent=e.name,this.sel.add(t)}this.sel.selectedIndex=-1}SetCollapse(){Ot("alter_collapse",!this.alter.IsDefault())}UpdateDisplay(){this.UpdateSelect();const t=this.alter.GetParts();for(let e=0;e{this.alter.SetUsedPart(e,t.qty.valueAsNumber)},this.add_fs.div1.appendChild(t.lbl),this.add_fs.div2.appendChild(t.qty),this.add_list.push(t)}this.add_list[e].lbl.textContent=t[e].name,this.add_list[e].qty.valueAsNumber=t[e].qty}for(;this.add_list.length>t.length;)this.add_list[this.add_list.length-1].lbl.remove(),this.add_list[this.add_list.length-1].qty.remove(),this.add_list.pop()}}class ce{constructor(t){const e=document.createDocumentFragment(),s=xt(e),i=s.insertCell();i.colSpan=2,this.name_inp=document.createElement("INPUT"),this.name_inp.defaultValue=h("Derived Aircraft Name"),i.appendChild(this.name_inp),St(s,h("Stat Cost")),this.cost_cell=s.insertCell(),St(s,h("Stat Upkeep")),this.upkeep_cell=s.insertCell(),St(s,h("Derived Era Report")),this.version_cell=s.insertCell();const a=xt(e);St(a,h("Derived Mass Variations")),St(a,h("Derived Boost")),St(a,h("Derived Handling")),St(a,h("Derived Rate of Climb")),St(a,h("Derived Stall Speed")),St(a,h("Derived Top Speed")),St(a,h("Derived Vital Components")).colSpan=2,this.bomb_row2=xt(e),St(this.bomb_row2,h("Derived Full Fuel with Bombs")),this.boost_fullwB=this.bomb_row2.insertCell(),this.hand_fullwB=this.bomb_row2.insertCell(),this.roc_fullwB=this.bomb_row2.insertCell(),this.ss_fullwB=this.bomb_row2.insertCell(),this.ts_fullwB=this.bomb_row2.insertCell(),this.vital_components=this.bomb_row2.insertCell(),this.vital_components.rowSpan=3,this.vital_components.colSpan=3,this.bomb_row1=xt(e),St(this.bomb_row1,h("Derived Half Fuel with Bombs")),this.boost_halfwB=this.bomb_row1.insertCell(),this.hand_halfwB=this.bomb_row1.insertCell(),this.roc_halfwB=this.bomb_row1.insertCell(),this.ss_halfwB=this.bomb_row1.insertCell(),this.ts_halfwB=this.bomb_row1.insertCell(),this.full_row=xt(e),St(this.full_row,h("Derived Full Fuel")),this.boost_full=this.full_row.insertCell(),this.hand_full=this.full_row.insertCell(),this.roc_full=this.full_row.insertCell(),this.ss_full=this.full_row.insertCell(),this.ts_full=this.full_row.insertCell();const n=xt(e);St(n,h("Derived Half Fuel")),this.boost_half=n.insertCell(),this.hand_half=n.insertCell(),this.roc_half=n.insertCell(),this.ss_half=n.insertCell(),this.ts_half=n.insertCell();const r=xt(e);St(r,h("Derived Empty Fuel")),this.boost_empty=r.insertCell(),this.hand_empty=r.insertCell(),this.roc_empty=r.insertCell(),this.ss_empty=r.insertCell(),this.ts_empty=r.insertCell();const o=xt(e);St(o,h("Derived Propulsion")).colSpan=2,St(o,h("Derived Aerodynamics")).colSpan=2,St(o,h("Derived Survivability")).colSpan=2,St(o,h("Derived Crew Members")).colSpan=2;const l=xt(e);St(l,h("Derived Dropoff")),this.dropoff_cell=l.insertCell(),St(l,h("Derived Stability")),this.stability_cell=l.insertCell(),St(l,h("Derived Crash Safety")),this.crashsafety_cell=l.insertCell(),St(l,h("Derived Crew/Passengers")),this.crew_cell=l.insertCell();const c=xt(e);St(c,h("Derived Overspeed")),this.overspeed_cell=c.insertCell(),St(c,h("Derived Energy Loss")),this.eloss_cell=c.insertCell(),St(c,h("Stat Toughness")),this.toughness_cell=c.insertCell(),St(c,h("Stat Visibility")),this.visibility_cell=c.insertCell();const u=xt(e);St(u,h("Derived Fuel Uses")),this.maxfuel_cell=u.insertCell(),this.turnbleed_label=St(u,h("Derived Turn Bleed")),this.turnbleed_cell=u.insertCell(),St(u,h("Stat Max Strain")),this.mxstrain_cell=u.insertCell(),St(u,h("Derived Attack Modifier")),this.attack_cell=u.insertCell();const m=xt(e);St(m,h("Stat Reliability")),this.reliability_cell=m.insertCell(),St(m,h("Derived Landing Gear")),this.landing_cell=m.insertCell(),St(m,h("Derived Communications")),this.communications_cell=m.insertCell(),St(m,h("Derived Escape")),this.escape_cell=m.insertCell();const p=xt(e);St(p,h("Derived Ideal Engine Altitude")),this.maxalt_cell=p.insertCell(),St(p,h("Derived Is Flammable Question")),this.flammable_cell=p.insertCell(),this.desc_cell=p.insertCell(),this.desc_cell.colSpan=2,St(p,h("Stat Flight Stress")),this.flightstress_cell=p.insertCell();const d=xt(e),g=xt(e);this.weapon_head=St(d,h("Derived Weapon Systems")),this.weapon_head.colSpan=6,this.weapon_cell=g.insertCell(),this.weapon_cell.colSpan=6,this.warning_head=St(xt(e),h("Derived Special Rules")),this.warning_head.colSpan=6,this.warning_cell=xt(e).insertCell(),this.warning_cell.colSpan=6,St(d,h("Derived Electrics")).colSpan=2,this.electric_cell=g.insertCell(),this.electric_cell.colSpan=2,this.electric_cell.rowSpan=3,t.appendChild(e),this.tbl=t}UpdateDisplay(t,e,s){for(this.name_inp.value=t.name;this.version_cell.children.length>0;)this.version_cell.removeChild(this.version_cell.children[0]);this.version_cell.className="tooltip";const i=document.createElement("DIV");i.className="tooltiptext";let a=document.createElement("P");a.textContent=h("Derived Problematic Parts"),i.appendChild(a);const r=p(t.GetEra().GetSelectedText());var o=0;for(let t of e.era){const e=p(t.era);if(e>r){o+=e-r;let s=document.createElement("P");s.textContent=t.name+": "+t.era,i.appendChild(s)}}if(0==o){let t=document.createElement("P");t.textContent=h("None"),i.appendChild(t)}const l=document.createElement("P");for(l.textContent=h(t.GetEra().GetSelectedText()),l.className=0==o?"green":o>2?"red":"yellow",this.version_cell.appendChild(l),this.version_cell.appendChild(i),this.cost_cell.textContent=e.cost.toString()+"þ ",t.GetUsed().IsDefault()||(this.cost_cell.textContent+=" ("+Math.floor(1e-6+e.cost/2).toString()+"þ "+h("Price Word Used")+")"),this.upkeep_cell.textContent=e.upkeep.toString()+"þ",this.ts_empty.textContent=(0).toString(),this.ss_empty.textContent=s.StallSpeedEmpty.toString(),this.hand_empty.textContent=s.HandlingEmpty.toString(),this.boost_empty.textContent=(0).toString(),this.roc_empty.textContent=(0).toString(),this.ts_half.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedFull)/2).toString(),this.ss_half.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFull)/2).toString(),this.hand_half.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFull)/2).toString(),this.boost_half.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFull)/2).toString(),this.roc_half.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbFull)/2).toString(),this.ts_full.textContent=Math.floor(1e-6+s.MaxSpeedFull).toString(),this.ss_full.textContent=s.StallSpeedFull.toString(),this.hand_full.textContent=s.HandlingFull.toString(),this.boost_full.textContent=s.BoostFull.toString(),this.roc_full.textContent=s.RateOfClimbFull.toString(),e.bomb_mass>0||this.show_bombs?(this.bomb_row1.hidden=!1,this.bomb_row2.hidden=!1,this.bomb_row2.appendChild(this.vital_components),this.vital_components.rowSpan=5,this.ts_halfwB.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedwBombs)/2).toString(),this.ss_halfwB.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFullwBombs)/2).toString(),this.hand_halfwB.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFullwBombs)/2).toString(),this.boost_halfwB.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFullwBombs)/2).toString(),this.roc_halfwB.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbwBombs)/2).toString(),this.ts_fullwB.textContent=Math.floor(1e-6+s.MaxSpeedwBombs).toString(),this.ss_fullwB.textContent=s.StallSpeedFullwBombs.toString(),this.hand_fullwB.textContent=s.HandlingFullwBombs.toString(),this.boost_fullwB.textContent=s.BoostFullwBombs.toString(),this.roc_fullwB.textContent=s.RateOfClimbwBombs.toString(),this.turnbleed_label.textContent=h("Derived Turn Bleed wB"),this.turnbleed_cell.textContent=n.Format("{0} ({1})",s.TurnBleed,s.TurnBleedwBombs)):(this.bomb_row1.hidden=!0,this.bomb_row2.hidden=!0,this.full_row.appendChild(this.vital_components),this.vital_components.rowSpan=3,this.turnbleed_label.textContent=h("Derived Turn Bleed"),this.turnbleed_cell.textContent=n.Format("{0}",s.TurnBleed)),this.dropoff_cell.textContent=s.Dropoff.toString(),this.overspeed_cell.textContent=s.Overspeed.toString(),this.maxfuel_cell.textContent=(Math.floor(1e-6+10*s.FuelUses)/10).toString(),t.GetIsFlammable()?this.flammable_cell.textContent=h("Yes"):this.flammable_cell.textContent=h("No"),this.stability_cell.textContent=s.Stabiilty.toString(),this.eloss_cell.textContent=s.EnergyLoss.toString(),this.landing_cell.textContent=t.GetGearName(),this.maxalt_cell.textContent=t.GetMinAltitude().toString()+"-"+t.GetMaxAltitude().toString(),this.reliability_cell.textContent=n.Join(", ",t.GetReliabilityList()),this.toughness_cell.textContent=s.Toughness.toString(),this.mxstrain_cell.textContent=s.MaxStrain.toString(),this.escape_cell.textContent=n.Join(", ",t.GetEscapeList()),this.crashsafety_cell.textContent=e.crashsafety.toString(),this.crew_cell.textContent=t.GetCockpits().GetNumberOfCockpits().toString()+"/"+(t.GetPassengers().GetSeats()+t.GetPassengers().GetBeds()).toString(),this.flightstress_cell.textContent=g(t.GetStressList()),this.visibility_cell.textContent=n.Join(", ",t.GetVisibilityList()),this.attack_cell.textContent=n.Join(", ",t.GetAttackList()),this.communications_cell.textContent=t.GetCommunicationName();this.electric_cell.childElementCount>0;)this.electric_cell.removeChild(this.electric_cell.firstChild);const u=t.GetElectrics(),m=bt(this.electric_cell);u.storage>0&&Ft(h("Derived Battery"),u.storage.toString(),m);for(let t of u.equipment)Ft(t.source,t.charge,m);var d="";const _=t.VitalComponentList();for(let t of _)d+=t+"
";this.vital_components.innerHTML=d;const f=t.GetWeapons().GetWeaponList(),A=t.GetWeapons().GetDirectionList(),b=t.GetMunitions().GetBombCount(),S=t.GetMunitions().GetRocketCount();var y=t.GetMunitions().GetInternalBombCount(),w="";if(b>0){const e=Math.min(b,y),s=Math.max(0,b-e);e>0&&(w+=h(" Bomb Mass Internally.",e)),s>0&&(w+=h(" Bomb Mass Externally.",s)),e>0&&(w+=h("Largest Internal Bomb",Math.min(e,t.GetMunitions().GetMaxBombSize()).toString())),y-=e,w+="
"}if(S>0){const t=Math.min(S,y),e=Math.max(0,S-t);t>0&&(w+=h(" Rocket Mass Internally.",t)),e>0&&(w+=h(" Rocket Mass Externally.",e)),w+="
"}for(let e of t.GetWeapons().GetWeaponSets())w+=qt(e,f,A),w+="
";this.weapon_cell.innerHTML=w,e.warnings.sort(((t,e)=>t.color-e.color));var C="";for(let t of e.warnings){switch(t.color){case c.RED:C+='
';break;case c.YELLOW:C+='
';break;case c.WHITE:default:C+='
'}C+=t.source+": "+t.warning+"
"}this.warning_cell.innerHTML=C;var B="";const E=t.GetWings().GetWingList().length;if(1==E){const e=t.GetWings().GetWingList()[0].deck;e{t()},this.fires=document.getElementById("input_fires"),this.fires.onchange=()=>{t()},this.oxidized=document.getElementById("input_oxidized"),this.oxidized.onchange=()=>{t()},this.fRow=xt(this.tbl),St(this.fRow,h("Altitude Altitude")),St(this.fRow,h("Derived Boost")),St(this.fRow,h("Derived Rate of Climb")),St(this.fRow,h("Derived Stall Speed")),St(this.fRow,h("Derived Top Speed")),this.rows=[]}AddRow(t){const e=document.createElement("TR");e.insertCell().textContent=n.Format("{0}-{1}",10*t,10*t+9),e.insertCell(),e.insertCell(),e.insertCell(),e.insertCell(),this.rows.push(e)}UpdateDisplay(t,e){for(;this.tbl.lastChild;)this.tbl.removeChild(this.tbl.lastChild);const s=document.createDocumentFragment();s.appendChild(this.fRow);var i=0,a=0,n=0,r=0;switch(this.fuel_state.selectedIndex){case ue.FULLWBOMBS:i=e.BoostFullwBombs,a=e.RateOfClimbwBombs,n=e.StallSpeedFullwBombs,r=e.MaxSpeedwBombs;break;case ue.HALFWBOMBS:i=Math.floor(1e-6+(e.BoostEmpty+e.BoostFullwBombs)/2),a=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),n=Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFullwBombs)/2),r=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2);break;case ue.FULL:i=e.BoostFull,a=e.RateOfClimbFull,n=e.StallSpeedFull,r=e.MaxSpeedFull;break;case ue.HALF:i=Math.floor(1e-6+(e.BoostEmpty+e.BoostFull)/2),a=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),n=Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFull)/2),r=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2)}for(let e=0;e<100;e++){var o=0,l=0;if(es&&(o=e-s)}this.fires.checked&&(o=0),this.rows.length<=e&&this.AddRow(e);const c=this.rows[e];var h=0;h=o>0&&0!=i?Math.max(1,i-1):i;const u=Math.max(1,a-o),m=Math.max(1,n+e),p=Math.max(1,r+l-o);if(c.children[1].textContent=h.toString(),c.children[2].textContent=u.toString(),c.children[3].textContent=m.toString(),c.children[4].textContent=p.toString(),s.appendChild(c),m>p){for(;this.rows.length>e;)this.rows.pop();break}}this.tbl.appendChild(s)}}!function(t){t[t.SINGLE=0]="SINGLE",t[t.PUSHER=1]="PUSHER",t[t.PULLER=2]="PULLER"}(me||(me={}));class de{constructor(){this.dash_canvas=document.createElement("CANVAS"),this.dash_canvas.width=1122,this.dash_canvas.height=786,this.dash_image=document.getElementById("dash_img"),this.dash_image.width=1122,this.dash_image.height=786,this.weap_canvas=document.createElement("CANVAS"),this.weap_canvas.width=483,this.weap_canvas.height=291,this.weap_image=document.getElementById("weap_img"),this.weap_image.width=483,this.weap_image.height=291,this.eng_canvas=document.createElement("CANVAS"),this.eng_canvas.width=600,this.eng_canvas.height=360,this.eng_image=document.getElementById("eng_img"),this.eng_image.width=600,this.eng_image.height=360,this.rad_canvas=document.createElement("CANVAS"),this.rad_canvas.width=479,this.rad_canvas.height=290,this.rad_image=document.getElementById("rad_img"),this.rad_image.width=479,this.rad_image.height=290,this.npc_canvas=document.createElement("CANVAS"),this.npc_canvas.width=482,this.npc_canvas.height=290,this.npc_image=document.getElementById("npc_img"),this.npc_image.width=482,this.npc_image.height=290,this.acft_data={full_bomb_boost:0,half_bomb_boost:0,full_boost:0,half_boost:0,empty_boost:0,full_bomb_hand:0,half_bomb_hand:0,full_hand:0,half_hand:0,empty_hand:0,full_bomb_climb:0,half_bomb_climb:0,full_climb:0,half_climb:0,empty_climb:0,full_bomb_stall:0,half_bomb_stall:0,full_stall:0,half_stall:0,empty_stall:0,full_bomb_speed:0,half_bomb_speed:0,full_speed:0,half_speed:0,empty_speed:0,fuel:0,dropoff:0,ordinance:[""],escape:0,crash:0,visibility:0,energy_loss:0,turn_bleed:0,stability:0,stress:0,toughness:0,max_strain:0,vital_parts:[""],armour:[],warnings:[{source:"",warning:""}]},this.weap_data={type:"",abrv:"",ammo:0,ap:0,jam:"",hits:[],damage:[],tags:[],reload:0,gyrojet:!1},this.eng_data={reliability:"0",min_IAF:0,altitude:0,overspeed:0,radiator:0,notes:[]},this.rad_data={mount_type:"",coolant_type:""}}SaveDash(){var t=this.dash_canvas.getContext("2d");t.clearRect(0,0,this.dash_canvas.width,this.dash_canvas.height),t.textAlign="center",t.drawImage(this.dash_image,0,0),t.font="35px Balthazar",t.fillText(this.acft_data.full_bomb_boost.toString(),493,94,80),t.fillText(this.acft_data.full_bomb_hand.toString(),555,94,80),t.fillText(this.acft_data.full_bomb_climb.toString(),617,94,80),t.fillText(this.acft_data.full_bomb_stall.toString(),679,94,80),t.fillText(this.acft_data.full_bomb_speed.toString(),741,94,80),t.fillText(this.acft_data.half_bomb_boost.toString(),493,134,80),t.fillText(this.acft_data.half_bomb_hand.toString(),555,134,80),t.fillText(this.acft_data.half_bomb_climb.toString(),617,134,80),t.fillText(this.acft_data.half_bomb_stall.toString(),679,134,80),t.fillText(this.acft_data.half_bomb_speed.toString(),741,134,80),t.fillText(this.acft_data.full_boost.toString(),493,174,80),t.fillText(this.acft_data.full_hand.toString(),555,174,80),t.fillText(this.acft_data.full_climb.toString(),617,174,80),t.fillText(this.acft_data.full_stall.toString(),679,174,80),t.fillText(this.acft_data.full_speed.toString(),741,174,80),t.fillText(this.acft_data.half_boost.toString(),493,214,80),t.fillText(this.acft_data.half_hand.toString(),555,214,80),t.fillText(this.acft_data.half_climb.toString(),617,214,80),t.fillText(this.acft_data.half_stall.toString(),679,214,80),t.fillText(this.acft_data.half_speed.toString(),741,214,80),t.fillText("0",493,254,80),t.fillText(this.acft_data.empty_hand.toString(),555,254,80),t.fillText("0",617,254,80),t.fillText(this.acft_data.empty_stall.toString(),679,254,80),t.fillText("0",741,254,80),t.fillText(Math.floor(this.acft_data.fuel).toString(),417,310,35),t.fillText(this.acft_data.dropoff.toString(),1048,375,35),t.fillText(this.acft_data.escape.toString(),85,640,35),t.fillText(this.acft_data.crash.toString(),85,720,35),t.fillText(this.acft_data.visibility.toString(),135,460,35),t.fillText(this.acft_data.stability.toString(),135,550,35),t.fillText(this.acft_data.energy_loss.toString(),70,505,35),t.fillText(this.acft_data.turn_bleed.toString(),195,505,35),t.fillText(this.acft_data.stress.toString(),285,495,35),t.fillText(this.acft_data.toughness.toString(),250,645,35),t.fillText(this.acft_data.max_strain.toString(),250,720,35),t.font="20px Balthazar",t.textAlign="left";var e=Math.min(this.acft_data.ordinance.length,2),s=Math.ceil(this.acft_data.ordinance.length/e-1e-6),i=0;for(let a=0;a0&&(a+=""!=a?", ":h("Armour")+" ",a+=e.toString()+"/+"+(11-this.acft_data.armour[t]).toString())}t.fillText(a,335,558,375),t.font="14px Balthazar",i=1;for(let e=0;ee+1?t.fillText(h("Cards Too Many Warnings Warning"),335,673+14*i,370):i>6||t.fillText(s,335,673+14*i,370),i++}this.download(this.name+"_Dashboard",this.dash_canvas)}SaveWeapon(t){t++;var e=this.weap_canvas.getContext("2d");e.clearRect(0,0,this.weap_canvas.width,this.weap_canvas.height),e.textAlign="center",e.drawImage(this.weap_image,0,0),e.font="25px Balthazar",e.fillText(this.weap_data.type,150,112,215),e.font="15px Balthazar";var s="";this.weap_data.reload>0?(s+=h("Cards Gun String Reload",(this.weap_data.ammo/this.weap_data.reload).toString(),this.weap_data.reload.toString()),this.weap_data.tags.push(h("Weapon Tag Reload",this.weap_data.reload.toString()))):s+=h("Cards Gun String No Reload",this.weap_data.ammo),e.fillText(s,95,158,105),e.fillText(this.weap_data.ap.toString(),172,158,23),e.fillText(this.weap_data.jam,230,158,65),e.fillText(this.weap_data.hits[0].toString(),157,208,80),e.fillText(this.weap_data.hits[1].toString(),237,208,80),e.fillText(this.weap_data.hits[2].toString(),317,208,80),e.fillText(this.weap_data.hits[3].toString(),397,208,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[0]).toString(),157,231,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[1]).toString(),237,231,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[2]).toString(),317,231,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[3]).toString(),397,231,80),e.textAlign="left",e.fillText(this.weap_data.tags[0],90,256,350);var i="";for(let t=1;t=0&&s.fillText(h("Cards Uses Radiator",this.eng_data.radiator+1),109,340,270),s.textAlign="right",s.font="30px Balthazar",s.fillStyle="#fff",s.strokeStyle="#fff",s.fillText("#"+t.toString(),37,67,35),e){case me.SINGLE:this.download(this.name+"_Engine_"+t.toString(),this.eng_canvas);break;case me.PUSHER:this.download(this.name+"_Engine_"+t.toString()+"_Pusher",this.eng_canvas);break;case me.PULLER:this.download(this.name+"_Engine_"+t.toString()+"_Puller",this.eng_canvas)}}SaveRadiator(t){t++;var e=this.rad_canvas.getContext("2d");e.clearRect(0,0,this.rad_canvas.width,this.rad_canvas.height),e.drawImage(this.rad_image,0,0),e.textAlign="center",e.font="25px Balthazar",e.fillStyle="#000",e.strokeStyle="#000",e.fillText(this.rad_data.mount_type,162,141,230),e.fillText(this.rad_data.coolant_type,162,217,230),e.textAlign="right",e.font="25px Balthazar",e.fillStyle="#fff",e.strokeStyle="#fff",e.fillText("#"+t.toString(),37,56,35),this.download(this.name+"_Radiator_"+t.toString(),this.rad_canvas)}SaveNPC(){var t=this.npc_canvas.getContext("2d");t.clearRect(0,0,this.npc_canvas.width,this.npc_canvas.height),t.drawImage(this.npc_image,0,0),t.font="20px Balthazar",t.textAlign="center",t.fillStyle="#000",t.strokeStyle="#000",t.fillText(this.name,100,100,145),t.fillText(""+this.lowest_overspeed,70,158,40),t.fillText(""+this.acft_data.full_speed,126,158,40);var e=this.acft_data.full_speed-this.acft_data.turn_bleed-Math.floor(1e-6+.1*this.acft_data.full_speed);t.fillText(""+e,187,158,40),t.fillText(""+this.acft_data.full_stall,245,158,40);var s,i=this.acft_data.toughness+this.acft_data.max_strain;if(t.fillText(""+i,70,236,40),t.fillText(""+this.acft_data.full_hand,123,236,40),this.all_weapons[0]){s=this.all_weapons[0],t.font="12px Avenir",t.fillText(s.abrv,232,71,91),t.font="20px Balthazar";var a=n.Join("/",[s.hits[0],s.hits[1],s.hits[2],s.hits[3]]),r=n.Join("/",[Math.floor(1e-6+s.damage[0]),Math.floor(1e-6+s.damage[1]),Math.floor(1e-6+s.damage[2]),Math.floor(1e-6+s.damage[3])]);t.fillText(a,320,71,80),t.fillText(r,401,71,80)}this.all_weapons[1]&&(s=this.all_weapons[1],t.font="12px Avenir",t.fillText(s.abrv,232,103,91),t.font="20px Balthazar",a=n.Join("/",[s.hits[0],s.hits[1],s.hits[2],s.hits[3]]),r=n.Join("/",[Math.floor(1e-6+s.damage[0]),Math.floor(1e-6+s.damage[1]),Math.floor(1e-6+s.damage[2]),Math.floor(1e-6+s.damage[3])]),t.fillText(a,320,103,80),t.fillText(r,401,103,80)),this.download(this.name+"_NPC",this.npc_canvas)}download(t,e){var s=document.createElement("a");if(s.download=t+".png",s.href=e.toDataURL(),document.createEvent){var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.dispatchEvent(i)}}}var ge=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function a(t,e){if(!i[t]){i[t]={};for(let e=0;e>>8,s[2*t+1]=i%256}return s},decompressFromUint8Array:function(e){if(null==e)return n.decompress(e);var s=new Array(e.length/2);for(let t=0,i=s.length;t>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=r[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++),r[h]=m++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(o,c)){if(c.charCodeAt(0)<256){for(i=0;i>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=r[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++)}for(a=2,i=0;i>=1;for(;;){if(g<<=1,_==e-1){d.push(s(g));break}_++}return d.join("")},decompress:function(t){return null==t?"":""==t?null:n._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,s,i){var a,n,r,o,l,h,c,u=[],m=4,p=4,d=3,g="",_=[],f={val:i(0),position:s,index:1};for(a=0;a<3;a+=1)u[a]=a;for(r=0,l=Math.pow(2,2),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;switch(r){case 0:for(r=0,l=Math.pow(2,8),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;c=t(r);break;case 1:for(r=0,l=Math.pow(2,16),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;c=t(r);break;case 2:return""}for(u[3]=c,n=c,_.push(c);;){if(f.index>e)return"";for(r=0,l=Math.pow(2,d),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;switch(c=r){case 0:for(r=0,l=Math.pow(2,8),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;u[p++]=t(r),c=p-1,m--;break;case 1:for(r=0,l=Math.pow(2,16),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;u[p++]=t(r),c=p-1,m--;break;case 2:return _.join("")}if(0==m&&(m=Math.pow(2,d),d++),u[c])g=u[c];else{if(c!==p)return null;g=n+n.charAt(0)}_.push(g),u[p++]=n+g.charAt(0),n=g,0==--m&&(m=Math.pow(2,d),d++)}}};return n}();class _e extends kt{constructor(t,e){super(),this.acft=t,this.parts_JSON=e,this.era=new zt(this.acft.GetEra()),this.cockpits=new jt(t.GetCockpits()),this.passengers=new Yt(t.GetPassengers()),this.engines=new Kt(t.GetEngines()),this.propeller=new Zt(t.GetPropeller()),this.frames=new Xt(t.GetFrames()),this.wings=new $t(t.GetWings()),this.stabilizers=new te(t.GetStabilizers()),this.controlsurfaces=new ee(t.GetControlSurfaces()),this.reinforcements=new se(t.GetReinforcements()),this.load=new ie(t.GetFuel(),t.GetMunitions(),t.GetCargoAndPassengers()),this.gear=new ae(t.GetLandingGear()),this.accessories=new ne(t.GetAccessories()),this.optimization=new re(t.GetOptimization()),this.weapons=new Lt(t.GetWeapons()),this.used=new oe(t.GetUsed()),this.rotor=new le(t.GetRotor()),this.alter=new he(t.GetAlter()),this.altitude=new pe((()=>{this.UpdateDisplay()})),this.acft_type=document.getElementById("acft_type");let s=0;for(let t in N)if(isNaN(Number(t))&&(s+=1,2!=s)){let e=document.createElement("OPTION");e.text=h(t),this.acft_type.add(e)}this.acft_type.onchange=()=>{let t=this.acft_type.selectedIndex;t>=1&&(t+=1),this.acft.SetType(t)};const i=document.getElementById("tbl_stats");this.InitStats(i);const a=document.getElementById("tbl_derived");this.InitDerived(a),this.acft.SetDisplayCallback((()=>{this.UpdateDisplay()})),document.getElementById("acft_save").onclick=()=>{this.SaveJSON()};const n=document.getElementById("acft_load");n.multiple=!1,n.accept="application/JSON",n.onchange=t=>{this.LoadJSON(n)};const r=document.getElementById("acft_load_text");r.onchange=()=>{this.LoadText(r)};const o=document.getElementById("acft_load_text2");o.onchange=()=>{this.LoadText(o)},document.getElementById("acft_save_link").onclick=()=>{this.SaveLink()},this.cards=new de,document.getElementById("acft_save_dash").onclick=()=>{this.SaveDash()},document.getElementById("acft_interactive_dash").onclick=()=>{this.SaveInteractive()},document.getElementById("acft_save_npc").onclick=()=>{this.SaveNPC()},document.getElementById("acft_reset").onclick=()=>{this.acft.Reset(),this.derived.SetName(this.acft.name),this.acft.CalculateStats(),this.SetCollapse()},document.getElementById("acft_save_cat").onclick=()=>{this.CatalogStats()},document.getElementById("acft_save_cat_json").onclick=()=>{this.CatalogJSON()},this.SetCollapse()}UpdateCard(){this.acft.name=this.derived.GetName();const t=this.acft.GetStats(),e=this.acft.GetDerivedStats();this.cards.name=this.acft.name,this.cards.acft_data.armour=this.acft.GetAccessories().GetEffectiveCoverage(),this.cards.acft_data.crash=t.crashsafety,this.cards.acft_data.dropoff=e.Dropoff,this.cards.acft_data.empty_boost=e.BoostEmpty,this.cards.acft_data.empty_hand=e.HandlingEmpty,this.cards.acft_data.empty_climb=e.RateOfClimbEmpty,this.cards.acft_data.empty_stall=e.StallSpeedEmpty,this.cards.acft_data.empty_speed=Math.floor(1e-6+e.MaxSpeedEmpty),this.cards.acft_data.energy_loss=e.EnergyLoss,this.cards.acft_data.escape=this.acft.GetCockpits().GetEscapeList()[0],this.cards.acft_data.fuel=e.FuelUses,this.cards.acft_data.full_bomb_boost=e.BoostFullwBombs,this.cards.acft_data.full_bomb_hand=e.HandlingFullwBombs,this.cards.acft_data.full_bomb_climb=e.RateOfClimbwBombs,this.cards.acft_data.full_bomb_stall=e.StallSpeedFullwBombs,this.cards.acft_data.full_bomb_speed=e.MaxSpeedwBombs,this.cards.acft_data.full_boost=e.BoostFull,this.cards.acft_data.full_hand=e.HandlingFull,this.cards.acft_data.full_climb=e.RateOfClimbFull,this.cards.acft_data.full_stall=e.StallSpeedFull,this.cards.acft_data.full_speed=Math.floor(1e-6+e.MaxSpeedFull),this.cards.acft_data.half_bomb_boost=Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),this.cards.acft_data.half_bomb_hand=Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),this.cards.acft_data.half_bomb_climb=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),this.cards.acft_data.half_bomb_stall=Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),this.cards.acft_data.half_bomb_speed=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),this.cards.acft_data.half_boost=Math.floor((e.BoostFull+e.BoostEmpty)/2),this.cards.acft_data.half_hand=Math.floor((e.HandlingFull+e.HandlingEmpty)/2),this.cards.acft_data.half_climb=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),this.cards.acft_data.half_stall=Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),this.cards.acft_data.half_speed=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),this.cards.acft_data.max_strain=e.MaxStrain;const s=[],i=this.acft.GetMunitions().GetBombCount(),a=this.acft.GetMunitions().GetRocketCount();var n=this.acft.GetMunitions().GetInternalBombCount();if(i>0){const t=Math.min(i,n),e=Math.max(0,i-t);if(t>0&&s.push(h(" Bomb Mass Internally.",t)),e>0&&s.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.acft.GetMunitions().GetMaxBombSize());s.push(h("Largest Internal Bomb",e.toString()))}n-=t}if(a>0){const t=Math.min(a,n),e=Math.max(0,a-t);t>0&&s.push(h(" Rocket Mass Internally.",t)),e>0&&s.push(h(" Rocket Mass Externally.",e))}this.cards.acft_data.ordinance=s,this.cards.acft_data.stability=e.Stabiilty,this.cards.acft_data.stress=this.acft.GetCockpits().GetStressList()[0][0],this.cards.acft_data.toughness=e.Toughness,this.cards.acft_data.turn_bleed=e.TurnBleed,this.cards.acft_data.visibility=this.acft.GetCockpits().GetVisibilityList()[0],this.cards.acft_data.vital_parts=this.acft.VitalComponentList(),this.cards.acft_data.warnings=t.warnings}UpdateWeaponCard(t){const e=this.acft.GetWeapons().GetWeaponList(),s=this.acft.GetWeapons().GetDirectionList();var i=Wt(t,e);t.IsPlural()&&(i=t.GetWeaponCount().toString()+"x "+i);const a=t.GetDirection();var n="";n+="[";for(let t=0;t0&&s.starter&&this.cards.eng_data.notes.push(h("Starter"))}}else if(t.IsRotary()&&t.IsTractor()?this.cards.eng_data.notes.push(h("Turns Right")):t.IsRotary()&&t.IsPusher()&&this.cards.eng_data.notes.push(h("Turns Left")),""!=t.GetSelectedList()){const s=T().get(t.GetSelectedList()).get_name(e.name);this.cards.eng_data.min_IAF=s.min_IdealAlt,s.upgrades[1]?this.cards.eng_data.notes.push(h("War Emergency Power")):s.compressor_count>0&&1==s.compressor_type&&this.cards.eng_data.notes.push(h("War Emergency Power from altitudes 0-9"))}}UpdateRadiatorCard(t){this.cards.rad_data.mount_type=h(t.GetMountList()[t.GetMountIndex()].name),this.cards.rad_data.coolant_type=h(t.GetCoolantList()[t.GetCoolantIndex()].name)}LoadJSON(t){if(0==t.files.length)return;const e=t.files[0],s=new FileReader;s.onloadend=()=>{try{var t=JSON.parse(s.result);new Ut(this.parts_JSON,!1).fromJSON(t)&&(t=JSON.parse(s.result),console.log(t),this.acft.fromJSON(t),this.derived.SetName(this.acft.name),this.acft.CalculateStats(),this.SetCollapse())}catch(t){console.error(t,t.stack)}},s.readAsText(e),t.value=""}CatalogStats(){this.acft.name=this.derived.GetName();const t=this.acft.GetStats(),e=this.acft.GetDerivedStats();var s="\\FCPlane[Nickname=\\FrameDefault{Not Set}, %Box Text = {}, Image = {},\n";s+=n.Format("Name={{0}}, Price={1}, Used={2}, Upkeep={3},\n",this.acft.name,t.cost,Math.floor(1e-6+t.cost/2),t.upkeep),s+="Stats = {\n",t.bomb_mass>0&&(s+=n.Format("Full Load & {0} & {1} & {2} & {3} & {4} \\\\\n",e.BoostFullwBombs,e.HandlingFullwBombs,e.RateOfClimbwBombs,e.StallSpeedFullwBombs,e.MaxSpeedwBombs),s+="\\nicefrac{1}{2}"+n.Format(", Bombs & {0} & {1} & {2} & {3} & {4}\\\\\n",Math.floor(1e-6+(e.BoostEmpty+e.BoostFullwBombs)/2),Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFullwBombs)/2),Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFullwBombs)/2),Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2))),s+=n.Format("Full Fuel & {0} & {1} & {2} & {3} & {4}\\\\\n",e.BoostFull,e.HandlingFull,e.RateOfClimbFull,e.StallSpeedFull,e.MaxSpeedFull),s+=n.Format("Half Fuel & {0} & {1} & {2} & {3} & {4}\\\\\n",Math.floor(1e-6+(e.BoostEmpty+e.BoostFull)/2),Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFull)/2),Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFull)/2),Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2)),s+=n.Format("Empty & {0} & {1} & {2} & {3} & {4}\\\\\n","-",e.HandlingEmpty,"-",e.StallSpeedEmpty,0),s+="},\n";var i=this.acft.VitalComponentList(),a=new Map;for(let t of i)t=t.replace(/Weapon Set #.*/g,"Guns").trim(),t=t.replace(/#.*/g,"").trim(),a.has(t)?a.set(t,a.get(t)+1):a.set(t,1);i=[];for(let t of a.keys())1==a.get(t)?i.push(t):i.push(t+" x"+a.get(t).toString());s+="Vital Parts = {"+n.Join(", ",i)+"},\n";var r=[];for(let t=0;t0){const t=Math.min(c,m),e=Math.max(0,c-t);t>0&&(s+=h(" Bomb Mass Internally.",t)),e>0&&(s+=h(" Bomb Mass Externally.",e)),t>0&&(s+=h("Largest Internal Bomb",Math.min(t,this.acft.GetMunitions().GetMaxBombSize()).toString())),m-=t,s+="\\\\\n"}if(u>0){const t=Math.min(u,m),e=Math.max(0,u-t);t>0&&(s+=h(" Rocket Mass Internally.",t)),e>0&&(s+=h(" Rocket Mass Externally.",e)),s+="\\\\\n"}const p=this.acft.GetWeapons().GetWeaponSets();for(let t=0;t0&&(s.push({Name:"Full Load",Boost:e.BoostFullwBombs,Handling:e.HandlingFullwBombs,Climb:e.RateOfClimbwBombs,Stall:e.StallSpeedFullwBombs,Speed:e.MaxSpeedwBombs}),s.push({Name:"1/2, Bombs",Boost:Math.floor(1e-6+(e.BoostEmpty+e.BoostFullwBombs)/2),Handling:Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFullwBombs)/2),Climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),Stall:Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFullwBombs)/2),Speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2)})),s.push({Name:"Full Fuel",Boost:e.BoostFull,Handling:e.HandlingFull,Climb:e.RateOfClimbFull,Stall:e.StallSpeedFull,Speed:e.MaxSpeedFull}),s.push({Name:"Half Fuel",Boost:Math.floor(1e-6+(e.BoostEmpty+e.BoostFull)/2),Handling:Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFull)/2),Climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),Stall:Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFull)/2),Speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2)}),s.push({Name:"Empty",Boost:"-",Handling:e.HandlingEmpty,Climb:"-",Stall:e.StallSpeedEmpty,Speed:0});let i=this.acft.VitalComponentList(),a=new Map;for(let t of i)t=t.replace(/Weapon Set #.*/g,"Guns").trim(),t=t.replace(/#.*/g,"").trim(),a.has(t)?a.set(t,a.get(t)+1):a.set(t,1);i=[];for(let t of a.keys())1==a.get(t)?i.push(t):i.push(t+" x"+a.get(t).toString());let r=[];for(let t=0;t0){const t=Math.min(d,f),e=Math.max(0,d-t);t>0&&(u+=h(" Bomb Mass Internally.",t)),e>0&&(u+=h(" Bomb Mass Externally.",e)),t>0&&(u+=h("Largest Internal Bomb",Math.min(t,this.acft.GetMunitions().GetMaxBombSize()).toString())),f-=t,u+="\n"}if(_>0){const t=Math.min(_,f),e=Math.max(0,_-t);t>0&&(u+=h(" Rocket Mass Internally.",t)),e>0&&(u+=h(" Rocket Mass Externally.",e)),u+="\n"}const A=this.acft.GetWeapons().GetWeaponSets();for(let t=0;t10;)s.pop(),i=!0;for(i&&(s.pop(),s.push("And More. See Plane Builder for full list."));s.length<10;)s.push("");const a=this.acft.GetAccessories().GetEffectiveCoverage();var n="";for(let t=0;t0&&(n+=""!=n?", ":h("Armour")+" ",n+=e.toString()+"/+"+(11-a[t]).toString())}const r=[],o=this.acft.GetMunitions().GetBombCount(),l=this.acft.GetMunitions().GetRocketCount();var c=this.acft.GetMunitions().GetInternalBombCount();if((o>0||l>0)&&r.push("Current load here."),o>0){const t=Math.min(o,c),e=Math.max(0,o-t);if(t>0&&r.push(h(" Bomb Mass Internally.",t)),e>0&&r.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.acft.GetMunitions().GetMaxBombSize());r.push(h("Largest Internal Bomb",e.toString()))}c-=t}if(l>0){const t=Math.min(l,c),e=Math.max(0,l-t);t>0&&r.push(h(" Rocket Mass Internally.",t)),e>0&&r.push(h(" Rocket Mass Externally.",e))}for(;r.length<5;)r.push("");var u="";for(let e of t.warnings)u+=e.source+": "+e.warning+"\n";const m={altitude:0,airspeed:0,fuel:e.FuelUses,dropoff:e.Dropoff,visibility:this.acft.GetCockpits().GetCockpit(0).GetVisibility(),energy_loss:e.EnergyLoss,turn_bleed:e.TurnBleed,stability:e.Stabiilty,stress:this.acft.GetCockpits().GetCockpit(0).GetFlightStress()[0],plane_escape:this.acft.GetCockpits().GetCockpit(0).GetEscape(),crash:this.acft.GetCockpits().GetCockpit(0).GetCrash(),max_toughness:e.Toughness,current_toughness:e.Toughness,max_strain:e.MaxStrain,current_strain:e.MaxStrain,g_force:0,kills:0,full_load_boost:e.BoostFullwBombs,full_load_handling:e.HandlingFullwBombs,full_load_climb:e.RateOfClimbwBombs,full_load_stall:e.StallSpeedFullwBombs,full_load_speed:e.MaxSpeedwBombs,half_fuel_bombs_boost:Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),half_fuel_bombs_handling:Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),half_fuel_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),half_fuel_bombs_stall:Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),half_fuel_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),full_fuel_no_bombs_boost:e.BoostFull,full_fuel_no_bombs_handling:e.HandlingFull,full_fuel_no_bombs_climb:e.RateOfClimbFull,full_fuel_no_bombs_stall:e.StallSpeedFull,full_fuel_no_bombs_speed:Math.floor(1e-6+e.MaxSpeedFull),half_fuel_no_bombs_boost:Math.floor((e.BoostFull+e.BoostEmpty)/2),half_fuel_no_bombs_handling:Math.floor((e.HandlingFull+e.HandlingEmpty)/2),half_fuel_no_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),half_fuel_no_bombs_stall:Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),half_fuel_no_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),empty_boost:0,empty_handling:e.HandlingEmpty,empty_climb:0,empty_stall:e.StallSpeedEmpty,empty_speed:0,vital_part_1:s[0],vital_part_2:s[1],vital_part_3:s[2],vital_part_4:s[3],vital_part_5:s[4],vital_part_6:s[5],vital_part_7:s[6],vital_part_8:s[7],vital_part_9:s[8],vital_part_10:s[9],armor:n,max_bomb_load:r[0],ordinance_1:r[1],ordinance_2:r[2],ordinance_3:r[3],ordinance_4:r[4],notes:u,full_load_selected:!0,half_fuel_bombs_selected:!1,full_fuel_no_bombs_selected:!1,half_fuel_no_bombs_selected:!1,empty_selected:!1,engines:this.InteractiveEngines(),weapons:this.InteractiveWeapons()};return JSON.stringify(m)}InteractiveEngines(){const t=[];for(let e=0;e0&&t.starter&&r.push(h("Starter"))}else{s.IsRotary()&&s.IsTractor()?r.push(h("Turns Right")):s.IsRotary()&&s.IsPusher()&&r.push(h("Turns Left"));const t=T().get(s.GetSelectedList()).get_name(a.name);t.upgrades[1]?r.push(h("War Emergency Power")):t.compressor_count>0&&1==t.compressor_type&&r.push(h("War Emergency Power from altitudes 0-9"))}if(i.notes=n.Join(", ",r),s.GetUsePushPull()){const e=i.reliability.split("/");i.reliability=e[0].toString(),t.push(JSON.stringify(i)),i.reliability=e[0].toString(),t.push(JSON.stringify(i))}else t.push(JSON.stringify(i))}return t}InteractiveWeapons(){const t=[];for(let s of this.acft.GetWeapons().GetWeaponSets()){const i=this.acft.GetWeapons().GetWeaponList(),a=s.GetHits(),r=[];"PR"==i[s.GetWeaponSelected()].abrv?(r.push(5),r.push(5),r.push(5),r.push(5)):(r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[0])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[1])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[2])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[3])));const o=s.GetFinalWeapon(),l=[];let c={type:Wt(s,i),ammo:s.GetShots(),ap:o.ap,jam:s.GetJam(),knife_hits:a[0],close_hits:a[1],long_hits:a[2],extreme_hits:a[3],knife_damage:r[0],close_damage:r[1],long_damage:r[2],extreme_damage:r[3],tags:""};const u=this.acft.GetWeapons().GetDirectionList();s.IsPlural()&&(c.type=s.GetWeaponCount().toString()+"x "+c.type);const m=s.GetDirection();var e="";e+="[";for(let t=0;t=1&&(s-=1),this.acft_type.selectedIndex=s,this.era.UpdateDisplay(),this.cockpits.UpdateDisplay(),this.passengers.UpdateDisplay(),this.engines.UpdateDisplay(),this.propeller.UpdateDisplay(),this.frames.UpdateDisplay(),this.wings.UpdateDisplay(),this.stabilizers.UpdateDisplay(),this.controlsurfaces.UpdateDisplay(),this.reinforcements.UpdateDisplay(),this.reinforcements.UpdateMaxStrain(e.MaxStrain),this.load.UpdateDisplay(),this.load.UpdateFuelUses(t.fuel/t.fuelconsumption),this.gear.UpdateDisplay(),this.accessories.UpdateDisplay(),this.optimization.UpdateDisplay(),this.weapons.UpdateDisplay(),this.used.UpdateDisplay(),this.rotor.UpdateDisplay(),this.alter.UpdateDisplay(),this.UpdateStats(t),this.UpdateDerived(t,e)}}function fe(){Ae(),Be().hash&&(De.forEach(be),xe?.observe(document,ve),Ce(),Ie=setTimeout(Ae,Ne))}function Ae(){clearTimeout(Ie),cancelAnimationFrame(Te),xe?.disconnect(),De.forEach(Se)}function be(t){document.addEventListener(t,Ae)}function Se(t){document.removeEventListener(t,Ae)}function ye(t){if(t.defaultPrevented)return;const e=function(t){let e=t;for(;e&&"A"!==e.nodeName;)e=e.parentElement;return e}(t.target);e&&e.hash&&e.pathname===Be().pathname&&Pe(fe)}function we(){Pe(Ce)}function Ce(){const t=Be().hash;if(!t)return;const e=decodeURIComponent(t.substring(1)),s=Ge.call(null,e);s&&Fe.call(null,s)}function Be(){return location}function Ee(t){return document.getElementById(t)}function Me(t){t.scrollIntoView()}function Pe(t){cancelAnimationFrame(Te),Te=requestAnimationFrame(t)}let Ge,Fe,Re,xe,Ie,Te;const ve={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ne=1e4,De=["selectstart","touchend","wheel"],Oe=JSON.parse('{"version":"12.7","era":{"options":[{"name":"Pioneer","liftbleed":30,"maxbomb":0.166666666666,"cost":-2,"cant_lift":4,"pitchstab":0},{"name":"WWI","liftbleed":25,"maxbomb":0.2,"cant_lift":3,"pitchstab":0,"cost":0},{"name":"Roaring 20s","liftbleed":22,"maxbomb":0.25,"cost":5,"cant_lift":1,"pitchstab":0},{"name":"Coming Storm","liftbleed":22,"maxbomb":0.333333333333,"cost":10,"cant_lift":0,"pitchstab":2},{"name":"WWII","liftbleed":20,"maxbomb":0.333333333333,"cost":15,"cant_lift":0,"pitchstab":2},{"name":"Last Hurrah","liftbleed":18,"maxbomb":0.5,"cost":20,"cant_lift":0,"pitchstab":2}]},"cockpit":{"options":[{"name":"Open","era":"Pioneer","mass":1,"drag":3,"control":0,"escape":2,"cost":0,"flightstress":0,"visibility":1,"exposed":true,"warning":""},{"name":"Windscreen","era":"Pioneer","mass":2,"drag":1,"control":0,"escape":2,"cost":1,"flightstress":0,"visibility":1,"exposed":true,"warning":""},{"name":"Sealed","era":"Pioneer","mass":2,"drag":0,"control":0,"escape":-3,"cost":1,"flightstress":-1,"visibility":-99,"warning":"Sealed Warning","exposed":false},{"name":"Narrow Canopy","era":"WWI","mass":3,"drag":0,"control":0,"escape":0,"cost":3,"flightstress":-1,"visibility":-1,"exposed":false,"warning":""},{"name":"Bubble Canopy","era":"WWII","mass":3,"drag":-3,"control":0,"escape":0,"cost":8,"flightstress":-1,"visibility":0,"exposed":false,"warning":""}],"upgrades":[{"name":"Co-Pilot Controls","era":"Pioneer","mass":0,"drag":0,"control":0,"escape":0,"cost":1,"flightstress":-2,"visibility":0,"warning":"","charge":0},{"name":"Escape Hatch","era":"Pioneer","mass":1,"drag":0,"control":0,"escape":3,"cost":2,"flightstress":0,"visibility":0,"warning":"","charge":0},{"name":"Ejection Seat","era":"Last Hurrah","mass":2,"drag":0,"control":0,"escape":5,"cost":4,"flightstress":0,"visibility":0,"warning":"","charge":0},{"name":"Connectivity","era":"Pioneer","mass":1,"drag":0,"control":0,"escape":0,"cost":0,"flightstress":0,"visibility":0,"warning":"Connectivity Warning","charge":0},{"name":"Oxygen Mask","era":"WWI","warning":"Oxygen Mask Warning","mass":0,"drag":0,"control":0,"escape":0,"charge":-1,"cost":2,"flightstress":0,"visibility":0},{"name":"Isolated","era":"Pioneer","mass":1,"drag":5,"control":0,"escape":-2,"cost":1,"flightstress":1,"visibility":2,"warning":"Isolated Warning","charge":0}],"safety":[{"name":"Padding","era":"Pioneer","cost":1,"warning":"Injury Reduction Warning","charge":0,"escape":0,"visibility":0,"mass":0},{"name":"Harness","era":"Pioneer","escape":-1,"cost":1,"warning":"Injury Reduction Warning","charge":0,"visibility":0,"mass":0},{"name":"Fast Release System","era":"Coming Storm","escape":2,"cost":1,"warning":"","charge":0,"visibility":0,"mass":0},{"name":"Roll Bar","era":"WWI","mass":2,"warning":"Injury Reduction Warning","charge":0,"escape":0,"visibility":0,"cost":0},{"name":"Flare Slot","era":"Roaring 20s","cost":1,"warning":"Flare Slot Warning","charge":0,"escape":0,"visibility":0,"mass":0},{"name":"Basic Fan","era":"Pioneer","charge":1e-9,"visibility":-1,"warning":"Basic Fan Warning","escape":0,"mass":0,"cost":0}],"gunsights":[{"name":"X1 Collimated Gunsight","era":"WWI","visibility":-1,"attack":1,"cost":2,"warning":"X1 Collimated Gunsight Warning","charge":0},{"name":"Telescopic Gunsight","era":"WWI","visibility":-1,"attack":0,"cost":3,"warning":"Telescopic Gunsight Warning","charge":0},{"name":"Illuminated Reflex Sight","era":"WWI","visibility":-1,"attack":2,"charge":1e-9,"cost":6,"warning":"Illuminated Reflex Sight Warning"},{"name":"Gyro Gunsight","era":"WWII","visibility":-1,"attack":2,"charge":1e-9,"cost":12,"warning":"Gyro Gunsight Warning"}]},"passengers":{},"engines":{"mounts":[{"name":"Tractor","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":0,"visibility":0,"liftbleed":0,"strainfactor":0,"dragfactor":0,"location":"fuselage","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Center-Mounted Tractor","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":-2,"visibility":1,"liftbleed":0,"strainfactor":0,"dragfactor":0,"location":"fuselage","reqED":true,"powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqTail":false,"escape":0},{"name":"Rear-Mounted Pusher","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":-4,"visibility":2,"liftbleed":0,"strainfactor":0,"dragfactor":0,"escape":-2,"location":"fuselage","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqTail":false,"reqED":false},{"name":"Center-Mounted Pusher","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":-2,"visibility":2,"liftbleed":0,"strainfactor":0,"dragfactor":0,"escape":-2,"location":"fuselage","reqTail":true,"powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqED":false},{"name":"Pod","era":"Pioneer","drag":5,"reqsections":1,"pitchstab":0,"visibility":-2,"liftbleed":0,"strainfactor":0,"dragfactor":0,"location":"pod","powerfactor":0.9,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Nacelle (Inside)","era":"Pioneer","drag":0,"reqsections":0,"pitchstab":0,"visibility":0,"liftbleed":1,"strainfactor":0.5,"dragfactor":0,"location":"wing","powerfactor":0.8,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Nacelle (Offset)","era":"Pioneer","drag":0,"reqsections":0,"pitchstab":0,"visibility":0,"liftbleed":0,"strainfactor":0,"dragfactor":1,"location":"wing","powerfactor":0.8,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Channel Tractor","era":"Pioneer","drag":0,"reqsections":0,"pitchstab":0,"visibility":0,"liftbleed":-1,"strainfactor":1,"dragfactor":0,"location":"wing","powerfactor":0.9,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Fuselage Push-Pull","era":"Pioneer","reqsections":2,"pitchstab":-2,"escape":-2,"strainfactor":0,"dragfactor":0,"location":"fuselage","powerfactor":0.9,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"liftbleed":0,"visibility":0,"drag":0,"reqED":false},{"name":"Front Intake","era":"Pioneer","strainfactor":0,"dragfactor":0,"location":"fuselage","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":true,"reqTail":false,"liftbleed":0,"escape":0,"visibility":0,"reqsections":0,"drag":0,"pitchstab":0,"reqED":false},{"name":"Wing Pod","era":"Pioneer","liftbleed":1,"strainfactor":0.5,"dragfactor":0,"location":"wing","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":true,"reqTail":false,"escape":0,"visibility":0,"reqsections":0,"drag":0,"pitchstab":0,"reqED":false},{"name":"Underwing Pod","era":"Pioneer","drag":3,"visibility":-1,"strainfactor":0,"dragfactor":0,"location":"wing","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":true,"reqTail":false,"liftbleed":0,"escape":0,"reqsections":0,"pitchstab":0,"reqED":false}],"radiator-type":[{"name":"Panel","era":"Pioneer","drag":0,"mass":0,"cost":0,"cooling":0,"dragpercool":0.5,"warning":""},{"name":"Box","era":"Pioneer","drag":2,"mass":-1,"cost":0,"cooling":0,"dragpercool":0.5,"warning":""},{"name":"Intake","era":"Roaring 20s","drag":0,"mass":0,"cost":3,"cooling":2,"dragpercool":0.5,"warning":""},{"name":"Evaporation","era":"Coming Storm","warning":"Evaporation Warning","drag":0,"mass":0,"cost":0,"cooling":0,"dragpercool":0}],"radiator-mount":[{"name":"Low","era":"Pioneer","warning":"Low Warning","reliability":1,"drag":0,"latstab":0},{"name":"Inline","era":"Pioneer","reliability":0,"drag":0,"latstab":0,"warning":""},{"name":"High","era":"Pioneer","warning":"High Warning","reliability":0,"drag":1,"latstab":0},{"name":"High Offset","era":"WWI","warning":"High Offset Warning","reliability":0,"drag":1,"latstab":-1}],"radiator-coolant":[{"name":"Water","era":"Pioneer","cost":0,"harden":false,"reliability":0,"flammable":false,"warning":""},{"name":"Salt Water","era":"Pioneer","cost":1,"harden":true,"reliability":1,"flammable":false,"warning":""},{"name":"Mineral Oil","era":"Pioneer","warning":"Mineral Oil Warning","cost":1,"harden":true,"reliability":0,"flammable":true},{"name":"Castor Oil","era":"Pioneer","warning":"Castor Oil Warning","cost":0,"harden":false,"reliability":0,"flammable":true},{"name":"Glycol","era":"Roaring 20s","reliability":2,"harden":false,"cost":2,"flammable":false,"warning":""},{"name":"Freon","era":"Coming Storm","warning":"Freon Warning","reliability":4,"harden":false,"cost":3,"flammable":false},{"name":"Ammonia","era":"Pioneer","warning":"Ammonia Warning","reliability":4,"harden":false,"cost":2,"flammable":false}],"cowling":[{"name":"No Cowling","era":"Pioneer","ed":1,"mpd":0,"air":true,"liquid":true,"rotary":true,"reliability":0,"mass":0,"cost":0},{"name":"Basic Cowl","era":"Pioneer","mass":1,"cost":1,"ed":0.8,"mpd":0,"air":true,"liquid":false,"rotary":false,"reliability":0},{"name":"Rotary Basic Cowl","era":"Pioneer","mass":1,"cost":1,"ed":0.4,"mpd":0,"air":false,"liquid":false,"rotary":true,"reliability":0},{"name":"Closed Cowl","era":"WWI","mass":1,"cost":1,"reliability":-1,"ed":0.3,"mpd":0,"air":false,"liquid":false,"rotary":true},{"name":"Adjustable Slat Cowl","era":"Coming Storm","mass":2,"reliability":2,"cost":2,"ed":0.5,"mpd":0,"air":true,"liquid":false,"rotary":true},{"name":"Foil Cowl","era":"Roaring 20s","mass":2,"reliability":3,"cost":3,"ed":0.4,"mpd":0,"air":true,"liquid":false,"rotary":true},{"name":"Sealed Cowl","era":"Pioneer","cost":1,"ed":0.5,"mpd":0.333333333333,"air":false,"liquid":true,"rotary":false,"reliability":0,"mass":0}]},"propellers":{"props":[{"name":"High Power","era":"Pioneer","pitchspeed":0.8,"pitchboost":0.9,"cost":0,"energy":1.5,"turn":8},{"name":"Power","era":"Pioneer","pitchspeed":0.9,"pitchboost":0.8,"cost":0,"energy":2,"turn":7},{"name":"Default","era":"Pioneer","pitchspeed":1,"pitchboost":0.6,"cost":0,"energy":3,"turn":6},{"name":"Speed","era":"Pioneer","pitchspeed":1.1,"pitchboost":0.4,"cost":0,"energy":4,"turn":5},{"name":"High Speed","era":"Pioneer","pitchspeed":1.2,"pitchboost":0.3,"cost":0,"energy":4.5,"turn":4}],"upgrades":[{"name":"None","era":"Pioneer","energy":0,"turn":0,"warning":"","pitchboost":0,"mass":0,"pitchspeed":0,"cost":0},{"name":"Manually Adjustable Pitch","era":"Pioneer","energy":0,"turn":0,"cost":2,"warning":"MVP_Warning","pitchboost":0,"mass":0,"pitchspeed":0},{"name":"Automatic Pitch","era":"Roaring 20s","pitchspeed":0.1,"pitchboost":0.1,"energy":0.5,"turn":1,"mass":1,"cost":8,"warning":""}]},"frames":{"frames":[{"name":"Wooden Spars","era":"Pioneer","basestructure":15,"basecost":0,"mass":1,"structure":2,"cost":0,"geodesic":false,"warning":""},{"name":"Steel Spars","era":"Pioneer","basestructure":25,"basecost":1,"mass":1,"structure":5,"cost":1,"geodesic":false,"warning":""},{"name":"Aluminum Spars","era":"WWI","basestructure":20,"basecost":2,"mass":0.5,"structure":4,"cost":2,"geodesic":false,"warning":""},{"name":"Wooden Ribs","era":"WWI","basestructure":30,"basecost":1,"mass":2,"structure":5,"cost":0.5,"geodesic":true,"warning":""},{"name":"Steel Ribs","era":"Roaring 20s","basestructure":60,"basecost":2,"mass":3,"structure":12,"cost":2,"geodesic":true,"warning":""},{"name":"Aluminum Ribs","era":"Roaring 20s","basestructure":50,"basecost":3,"mass":2,"structure":8,"cost":3,"geodesic":true,"warning":""},{"name":"Titanium","era":"Last Hurrah","basestructure":0,"basecost":0,"mass":1,"structure":10,"cost":8,"geodesic":false,"warning":""},{"name":"Living Grove","era":"Pioneer","basestructure":30,"basecost":8,"mass":2,"structure":4,"cost":0,"geodesic":true,"warning":"Living Grove Warning"}],"skin":[{"name":"Naked","era":"Pioneer","dragfactor":1,"massfactor":0.6,"visibility":1,"flammable":false,"monocoque":false,"monocoque_structure":0,"toughness":0,"cost":0},{"name":"Cloth Canvas","era":"Pioneer","dragfactor":0.5,"massfactor":1,"flammable":false,"monocoque":false,"monocoque_structure":0,"toughness":0,"visibility":0,"cost":0},{"name":"Transparent Celluloid","era":"Pioneer","dragfactor":0.6,"massfactor":1,"visibility":1,"cost":1,"flammable":true,"monocoque":false,"monocoque_structure":0,"toughness":0},{"name":"Treated Paper","era":"Pioneer","dragfactor":0.5,"massfactor":0.75,"flammable":true,"monocoque":false,"monocoque_structure":0,"toughness":0,"visibility":0,"cost":0},{"name":"Tense Silk","era":"Pioneer","dragfactor":0.5,"massfactor":1,"toughness":1,"cost":1,"flammable":false,"monocoque":false,"monocoque_structure":0,"visibility":0},{"name":"Dragon Skin","era":"Himmilgard","dragfactor":0.5,"massfactor":1,"cost":4,"flammable":false,"monocoque":false,"monocoque_structure":0,"toughness":0,"visibility":0},{"name":"Molded Plywood","era":"Pioneer","dragfactor":0.4,"massfactor":1,"cost":0.5,"flammable":false,"monocoque":true,"monocoque_structure":3,"toughness":0,"visibility":0},{"name":"Clinker Build","era":"Pioneer","dragfactor":0.5,"massfactor":1,"cost":0,"flammable":false,"monocoque":true,"monocoque_structure":-3,"toughness":0,"visibility":0},{"name":"Glass Reinforced Plastic","era":"Last Hurrah","dragfactor":0.3,"massfactor":1,"cost":1,"flammable":false,"monocoque":true,"monocoque_structure":0,"toughness":0,"visibility":0},{"name":"Corrugated Duralumin","era":"WWI","dragfactor":0.5,"massfactor":1,"toughness":3,"cost":1,"flammable":false,"monocoque":true,"monocoque_structure":10,"visibility":0},{"name":"Steel Sheet","era":"Roaring 20s","dragfactor":0.35,"massfactor":1,"cost":1.5,"toughness":3,"flammable":false,"monocoque":true,"monocoque_structure":8,"visibility":0},{"name":"Aluminum Sheet","era":"Roaring 20s","dragfactor":0.35,"massfactor":0.75,"cost":2,"toughness":2,"flammable":false,"monocoque":true,"monocoque_structure":6,"visibility":0}],"tail":[{"name":"Tailless","era":"Pioneer","reqsections":0,"pitchstab":-4,"visibility":3},{"name":"Stubby","era":"Pioneer","reqsections":1,"pitchstab":-3,"visibility":0},{"name":"Standard","era":"Pioneer","reqsections":2,"pitchstab":0,"visibility":0},{"name":"Long","era":"Pioneer","reqsections":3,"pitchstab":3,"visibility":0}]},"wings":{"decks":[{"name":"Wing Deck Parasol","era":"Pioneer","pitchstab":3,"maxstrain":-10,"liftbleed":-2,"visibility":-1,"limited":false,"crashsafety":0},{"name":"Wing Deck Shoulder","era":"Pioneer","pitchstab":2,"liftbleed":-1,"visibility":-1,"limited":true,"crashsafety":0,"maxstrain":0},{"name":"Wing Deck Mid","era":"Pioneer","limited":true,"liftbleed":0,"visibility":0,"pitchstab":0,"crashsafety":0,"maxstrain":0},{"name":"Wing Deck Low","era":"Pioneer","pitchstab":-2,"crashsafety":-1,"liftbleed":-1,"limited":true,"visibility":0,"maxstrain":0},{"name":"Wing Deck Gear","era":"Pioneer","pitchstab":-3,"maxstrain":-10,"crashsafety":-1,"liftbleed":-2,"limited":false,"visibility":0}],"largest":[{"name":"Wing Deck Parasol","era":"Pioneer","latstab":1,"control":-1,"dragfactor":1},{"name":"Wing Deck Shoulder","era":"Pioneer","control":-1,"dragfactor":1,"latstab":0},{"name":"Wing Deck Mid","era":"Pioneer","dragfactor":0.9,"latstab":0,"control":0},{"name":"Wing Deck Low","era":"Pioneer","latstab":-1,"control":2,"dragfactor":1},{"name":"Wing Deck Gear","era":"Pioneer","latstab":-1,"control":3,"dragfactor":1}],"surface":[{"name":"Cloth Canvas","era":"Pioneer","flammable":false,"strainfactor":1,"dragfactor":1,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0,"cost":0},{"name":"Treated Paper","era":"Pioneer","flammable":true,"strainfactor":1,"dragfactor":1,"mass":-0.25,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0,"cost":0},{"name":"Tense Silk Layers","era":"Pioneer","flammable":false,"strainfactor":0.9,"dragfactor":1,"cost":0.2,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0},{"name":"Plywood","era":"Pioneer","flammable":false,"strainfactor":0.9,"dragfactor":1,"mass":0.2,"cost":0.1,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0},{"name":"Aluminum Sheet","era":"Roaring 20s","flammable":false,"strainfactor":1,"dragfactor":0.8,"cost":0.3,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0},{"name":"Corrugated Duralumin","era":"Pioneer","flammable":false,"strainfactor":0.6,"dragfactor":1,"mass":0.25,"cost":0.2,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0},{"name":"Thin Sheet Steel","era":"Roaring 20s","flammable":false,"strainfactor":0.6,"dragfactor":0.9,"mass":0.2,"cost":0.3,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0},{"name":"Grand Eagle Feather","era":"Himmilgard","flammable":false,"strainfactor":1,"dragfactor":1,"control":0.2,"cost":0.6,"metal":false,"transparent":false,"charge":0,"toughness":0,"mass":0},{"name":"Solar Fiber","era":"Himmilgard","flammable":false,"strainfactor":1,"dragfactor":1,"charge":0.2,"cost":0.4,"metal":false,"transparent":false,"toughness":0,"control":0,"mass":0},{"name":"Dragon Skin","era":"Himmilgard","flammable":false,"strainfactor":0.4,"dragfactor":1,"cost":0.8,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0},{"name":"Transparent Celluloid","era":"Pioneer","flammable":true,"strainfactor":1,"dragfactor":1,"toughness":-0.1,"cost":0.1,"metal":false,"transparent":true,"charge":0,"control":0,"mass":0}],"stagger":[{"name":"Monoplane","era":"Pioneer","inline":false,"wing_count":1,"hstab":true,"pitchstab":0,"liftbleed":0},{"name":"Tandem","era":"Pioneer","inline":true,"wing_count":20,"hstab":false,"pitchstab":4,"liftbleed":0},{"name":"Extreme Positive","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":2,"liftbleed":-2},{"name":"Positive","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":1,"liftbleed":-1},{"name":"Unstaggered","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":0,"liftbleed":0},{"name":"Negative","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":-1,"liftbleed":-1},{"name":"Extreme Negative","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":-2,"liftbleed":-2}]},"stabilizers":{"hstab":[{"name":"Tailplane","era":"Pioneer","dragfactor":1,"is_canard":false,"increment":1,"is_vtail":false,"is_tail":true,"warning":"","liftbleed":0,"latstab":0,"pitchstab":0,"cost":0},{"name":"The Wings","era":"Pioneer","dragfactor":0,"is_canard":false,"increment":0,"is_vtail":false,"is_tail":false,"warning":"","liftbleed":0,"latstab":0,"pitchstab":0,"cost":0},{"name":"Canards","era":"Pioneer","pitchstab":-3,"dragfactor":0.5,"is_canard":true,"increment":1,"is_vtail":false,"is_tail":true,"warning":"","liftbleed":0,"latstab":0,"cost":0},{"name":"Outboard","era":"Pioneer","latstab":1,"dragfactor":1,"is_canard":false,"increment":2,"is_vtail":false,"is_tail":false,"warning":"","liftbleed":0,"pitchstab":0,"cost":0},{"name":"V-Tail","era":"Coming Storm","latstab":2,"pitchstab":2,"cost":5,"dragfactor":0.8,"is_canard":false,"increment":1,"is_vtail":true,"is_tail":true,"warning":"","liftbleed":0},{"name":"T-Tail","era":"WWII","liftbleed":-2,"dragfactor":0.5,"is_canard":false,"increment":1,"is_vtail":false,"is_tail":true,"warning":"T-Tail Warning","latstab":0,"pitchstab":0,"cost":0}],"vstab":[{"name":"Tailfin","era":"Pioneer","dragfactor":1,"increment":1,"is_vtail":false,"is_tail":true,"control":0},{"name":"Outboard","era":"Pioneer","dragfactor":1,"control":1,"increment":2,"is_vtail":false,"is_tail":false},{"name":"V-Tail","era":"Coming Storm","dragfactor":0,"increment":0,"is_vtail":true,"is_tail":true,"control":0}]},"controls":{"ailerons":[{"name":"Flap Ailerons","era":"Pioneer","warping":false,"warning":"","cost":0,"control":0,"drag":0,"crashsafety":0},{"name":"Wing Warping","era":"Pioneer","drag":-1,"warping":true,"warning":"Wing Warping Warning 2","cost":0,"control":0,"crashsafety":0},{"name":"Spoilerons","era":"WWII","cost":2,"warping":false,"warning":"Spoilerons Warning","control":0,"drag":0,"crashsafety":0},{"name":"None","era":"Pioneer","warping":false,"control":-15,"crashsafety":-1,"cost":-2,"warning":"","drag":0}],"rudders":[{"name":"Flap Rudder","era":"Pioneer","latstab":0,"control":0},{"name":"Flying Rudder","era":"Pioneer","latstab":-1,"control":3}],"elevators":[{"name":"Flap Elevator","era":"Pioneer","pitchstab":0,"control":0},{"name":"Flying Elevator","era":"Pioneer","pitchstab":-1,"control":2}],"flaps":[{"name":"None","era":"Pioneer","costfactor":0,"control":0,"warning":"","liftbleed":0,"crashsafety":0},{"name":"Basic Flaps","era":"WWI","liftbleed":-3,"control":-3,"costfactor":0.333333333333,"warning":"","crashsafety":0},{"name":"Advanced Flaps","era":"Coming Storm","liftbleed":-5,"costfactor":0.666666666666,"control":0,"warning":"","crashsafety":0},{"name":"Control Flaps","era":"WWII","liftbleed":-5,"control":3,"costfactor":1,"warning":"","crashsafety":0},{"name":"Lift Dumpers","era":"Last Hurrah","crashsafety":2,"costfactor":1,"warning":"Lift Dumpers Warning","control":0,"liftbleed":0}],"slats":[{"name":"None","era":"Pioneer","control":0,"drag":0,"liftbleed":0,"cost":0},{"name":"Fixed Slots","era":"Roaring 20s","drag":5,"liftbleed":-3,"cost":1,"control":0},{"name":"Automatic Slats","era":"WWII","liftbleed":-1,"control":3,"cost":4,"drag":0}],"drag_inducers":[{"name":"Air Brake","era":"WWII","mass":1,"cost":3,"warning":"Air Brake Warning"},{"name":"Dive Brake","era":"Pioneer","mass":2,"cost":4,"warning":"Dive Brake Warning"},{"name":"Drogue Chute","era":"Last Hurrah","cost":3,"warning":"Drogue Chute Warning","mass":0}]},"reinforcement":{"external_wood":[{"name":"Parallel Struts","era":"Pioneer","drag":2,"mass":1,"structure":5,"maxstrain":5,"tension":30,"cost":1,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"N-Strut","era":"Pioneer","drag":2,"mass":1,"structure":6,"maxstrain":8,"tension":20,"cost":1,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"V-Strut","era":"Pioneer","drag":1,"mass":1,"structure":-5,"maxstrain":5,"tension":30,"cost":1,"config":true,"first":true,"small_sqp":true,"ornith":false},{"name":"I-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":20,"tension":15,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false,"structure":0},{"name":"W-Strut","era":"WWI","drag":3,"mass":1,"maxstrain":35,"tension":0,"cost":2,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Single Strut","era":"Pioneer","drag":1,"mass":1,"maxstrain":10,"tension":0,"cost":1,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Star Strut","era":"WWI","drag":8,"mass":2,"structure":10,"maxstrain":30,"tension":0,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Wing Truss","era":"Pioneer","drag":4,"tension":40,"cost":1,"config":false,"first":true,"small_sqp":true,"ornith":true,"structure":0,"mass":0,"maxstrain":0},{"name":"Wire Root","era":"Pioneer","tension":10,"config":true,"first":false,"small_sqp":true,"ornith":true,"structure":0,"mass":0,"drag":0,"cost":0,"maxstrain":0}],"external_steel":[{"name":"Steel Parallel Struts","era":"Pioneer","drag":2,"mass":1,"structure":10,"maxstrain":10,"tension":15,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Steel N-Strut","era":"Pioneer","drag":2,"mass":1,"structure":12,"maxstrain":13,"tension":10,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Steel V-Strut","era":"Pioneer","drag":1,"mass":1,"structure":0,"maxstrain":10,"tension":15,"cost":2,"config":true,"first":true,"small_sqp":true,"ornith":false},{"name":"Steel I-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":25,"tension":7,"cost":4,"config":true,"first":true,"small_sqp":false,"ornith":false,"structure":0},{"name":"Steel W-Strut","era":"WWI","drag":3,"mass":1,"maxstrain":40,"tension":0,"cost":4,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Steel Single Strut","era":"Pioneer","drag":1,"mass":1,"maxstrain":15,"tension":0,"cost":2,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Steel Star Strut","era":"WWI","drag":6,"mass":2,"structure":20,"maxstrain":35,"tension":0,"cost":4,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Steel Wing Truss","era":"Pioneer","drag":4,"maxstrain":5,"tension":20,"cost":2,"config":false,"first":true,"small_sqp":true,"ornith":true,"structure":0,"mass":0},{"name":"Steel Wire Root","era":"Pioneer","tension":10,"config":true,"first":false,"small_sqp":true,"ornith":true,"structure":0,"mass":0,"drag":0,"cost":0,"maxstrain":0}],"cabane":[{"name":"None","era":"Pioneer","tension":0,"structure":0,"config":false,"drag":0,"mass":0,"cost":0,"maxstrain":0},{"name":"Parallel Struts","era":"Pioneer","drag":0,"mass":1,"structure":5,"maxstrain":5,"tension":15,"cost":1,"config":true},{"name":"Steel Parallel Struts","era":"Pioneer","drag":0,"mass":1,"structure":10,"maxstrain":10,"tension":7,"cost":2,"config":true},{"name":"N-Strut","era":"Pioneer","drag":0,"mass":1,"structure":6,"maxstrain":8,"tension":10,"cost":1,"config":true},{"name":"Steel N-Strut","era":"Pioneer","drag":0,"mass":1,"structure":12,"maxstrain":13,"tension":5,"cost":2,"config":true},{"name":"V-Strut","era":"Pioneer","drag":0,"mass":1,"structure":-5,"maxstrain":5,"tension":15,"cost":1,"config":true},{"name":"Steel V-Strut","era":"Pioneer","drag":0,"mass":1,"structure":0,"maxstrain":10,"tension":7,"cost":2,"config":true},{"name":"I-Strut","era":"WWI","drag":0,"mass":1,"maxstrain":20,"tension":7,"cost":2,"config":true,"structure":0},{"name":"Steel I-Strut","era":"WWI","drag":0,"mass":1,"maxstrain":25,"tension":3,"cost":4,"config":true,"structure":0},{"name":"W-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":35,"tension":0,"cost":2,"config":true,"structure":0},{"name":"Steel W-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":40,"tension":0,"cost":4,"config":true,"structure":0},{"name":"Single Strut","era":"Pioneer","drag":0,"mass":1,"maxstrain":10,"tension":0,"cost":1,"config":true,"structure":0},{"name":"Steel Single Strut","era":"Pioneer","drag":0,"mass":1,"maxstrain":15,"tension":0,"cost":2,"config":true,"structure":0},{"name":"Star Strut","era":"WWI","drag":6,"mass":2,"structure":10,"maxstrain":30,"tension":0,"cost":2,"config":true},{"name":"Steel Star Strut","era":"WWI","drag":4,"mass":2,"structure":20,"maxstrain":35,"tension":0,"cost":4,"config":true}],"cantilever":[{"name":"Birch","era":"WWI","mass":1,"maxstrain":10,"toughness":2,"cost":1,"limited":true,"liftbleed":0},{"name":"Duralumin","era":"WWI","mass":1,"maxstrain":15,"toughness":3,"cost":2,"limited":true,"liftbleed":0},{"name":"Steel","era":"WWI","mass":1,"maxstrain":20,"toughness":5,"cost":3,"limited":true,"liftbleed":0},{"name":"Aluminium","era":"Roaring 20s","mass":1,"maxstrain":25,"toughness":3,"cost":4,"limited":true,"liftbleed":0},{"name":"Whalebone","era":"Himmilgard","mass":1,"liftbleed":-3,"maxstrain":5,"cost":8,"limited":true,"toughness":0}]},"fuel":{"tanks":[{"name":"Internal Fuselage Tank","era":"Pioneer","mass":1,"wetmass":5,"fuel":125,"reqsections":0.5,"internal":true,"cantilever":false,"control":0,"drag":0},{"name":"External Wing Tank","era":"Pioneer","mass":1,"wetmass":5,"fuel":125,"drag":3,"control":-1,"internal":false,"cantilever":false,"reqsections":0},{"name":"Internal Wing Tank","era":"Pioneer","mass":1,"wetmass":5,"fuel":125,"control":-1,"internal":true,"cantilever":true,"reqsections":0,"drag":0},{"name":"Microtank","era":"Pioneer","mass":1,"wetmass":0,"fuel":25,"internal":true,"cantilever":false,"reqsections":0,"control":0,"drag":0}]},"cargo":{"spaces":[{"name":"None","era":"Pioneer","reqsections":0,"mass":0,"warning":""},{"name":"Tiny","era":"Pioneer","mass":1,"warning":"Cargo Tiny","reqsections":0},{"name":"Small","era":"Pioneer","reqsections":1,"warning":"Cargo Small","mass":0},{"name":"Medium","era":"Pioneer","reqsections":3,"warning":"Cargo Medium","mass":0},{"name":"Large","era":"Pioneer","reqsections":5,"warning":"Cargo Large","mass":0},{"name":"Huge","era":"Pioneer","reqsections":10,"warning":"Cargo Huge","mass":0}]},"landing_gear":{"gear":[{"name":"Landing Gear","era":"Pioneer","DpLMP":1,"SpLMP":0,"can_retract":true,"mass":0,"warning":""},{"name":"Floats","era":"Pioneer","DpLMP":1.5,"SpLMP":0,"can_retract":true,"mass":0,"warning":""},{"name":"Hybrid Floats","era":"Pioneer","DpLMP":2,"SpLMP":0,"can_retract":true,"mass":0,"warning":""},{"name":"Boat Hull","era":"Pioneer","mass":5,"DpLMP":1,"SpLMP":1,"can_retract":false,"warning":""},{"name":"Landing Skid","era":"Pioneer","DpLMP":0,"SpLMP":0,"can_retract":false,"warning":"Landing Skid Warning","mass":0}],"extras":[{"name":"Zeppelin Hook","era":"Pioneer","mass":1,"MpLMP":0,"warning":"Zeppelin Hook Warning","drag":0,"crashsafety":0},{"name":"Carrier Hook","era":"Pioneer","MpLMP":0.5,"warning":"Carrier Hook Warning","mass":0,"drag":0,"crashsafety":0},{"name":"Underwing Skid","era":"Pioneer","MpLMP":0,"drag":3,"crashsafety":2,"mass":0,"warning":""}]},"accessories":{"electrical":[{"name":"Windmill","era":"Pioneer","drag":1,"cost":1,"cp10s":1,"storage":0,"mass":0},{"name":"Battery","era":"Pioneer","mass":1,"cost":2,"cp10s":0,"storage":5,"drag":0},{"name":"Battery (High Quality)","era":"Roaring 20s","mass":0,"cost":4,"cp10s":0,"storage":5,"drag":0}],"radios":[{"name":"Loud Yelling","era":"Pioneer","mass":0,"drag":0,"charge":0,"cost":0},{"name":"Intercom System","era":"Pioneer","charge":1e-9,"cost":1,"mass":0,"drag":0},{"name":"Radio Receiver","era":"Pioneer","mass":2,"drag":2,"charge":1e-9,"cost":3},{"name":"Radio Transmitter","era":"WWI","mass":3,"drag":3,"charge":-1,"cost":3},{"name":"Radio Transceiver","era":"WWI","mass":5,"drag":3,"charge":-1,"cost":3},{"name":"Whalebone Radio Receiver","era":"Himmilgard","charge":1e-9,"cost":5,"mass":0,"drag":0},{"name":"Whalebone Radio Base Station","era":"Himmilgard","mass":6,"drag":1,"charge":-1,"cost":12},{"name":"Radio Receiver (High Quality)","era":"Roaring 20s","mass":1,"drag":2,"charge":1e-9,"cost":6},{"name":"Radio Transmitter (High Quality)","era":"Roaring 20s","mass":2,"drag":3,"charge":-1,"cost":6},{"name":"Radio Transceiver (High Quality)","era":"Roaring 20s","mass":4,"drag":3,"charge":-1,"cost":6},{"name":"Whalebone Radio Base Station (High Quality)","era":"Himmilgard","mass":5,"drag":1,"charge":-1,"cost":24}],"recon":[{"name":"Guncam","era":"Pioneer","cost":1,"warning":"Guncam Warning","reqsections":0,"mass":0,"drag":0},{"name":"Small Reconnaissance Camera","era":"Pioneer","mass":1,"drag":1,"cost":2,"warning":"Small Reconnaissance Camera Warning","reqsections":0},{"name":"Medium Reconnaissance Camera","era":"Pioneer","mass":2,"drag":2,"cost":2,"warning":"Medium Reconnaissance Camera Warning","reqsections":0},{"name":"Large Reconnaissance Camera","era":"Pioneer","mass":3,"drag":3,"cost":2,"warning":"Large Reconnaissance Camera Warning","reqsections":0},{"name":"Internal Small Reconnaissance Camera","era":"Pioneer","mass":1,"cost":4,"warning":"Small Reconnaissance Camera Warning","reqsections":0,"drag":0},{"name":"Internal Medium Reconnaissance Camera","era":"Pioneer","mass":2,"cost":2,"reqsections":1,"warning":"Medium Reconnaissance Camera Warning","drag":0},{"name":"Internal Large Reconnaissance Camera","era":"Pioneer","mass":3,"cost":2,"reqsections":1,"warning":"Large Reconnaissance Camera Warning","drag":0}],"visibility":[{"name":"Wing Cutouts","era":"Pioneer","visibility":1,"liftbleed":1,"charge":0,"structure":0,"cost":0},{"name":"Hull Cutouts","era":"Pioneer","visibility":1,"structure":-5,"charge":0,"liftbleed":0,"cost":0},{"name":"Searchlight","era":"Pioneer","charge":1e-9,"cost":1,"liftbleed":0,"structure":0,"visibility":0}],"climate":[{"name":"Electric Heating","era":"Pioneer","charge":-1,"cost":1,"req_radiator":false},{"name":"Radiator Loop","era":"Pioneer","cost":1,"req_radiator":true,"charge":0},{"name":"Air Conditioning","era":"Pioneer","charge":-2,"cost":4,"req_radiator":false}],"autopilots":[{"name":"None","era":"Pioneer","mass":0,"warning":"","charge":0,"cost":0},{"name":"Gyroscopic","era":"WWI","cost":3,"warning":"Gyroscopic Warning","mass":0,"charge":0},{"name":"Altitude Holding","era":"Coming Storm","mass":1,"cost":5,"warning":"Altitude Holding Warning","charge":0},{"name":"Clockwork Programmable","era":"Himmilgard","mass":1,"cost":6,"warning":"Clockwork Programmable Warning","charge":0},{"name":"Programmable","era":"WWII","mass":1,"charge":-2,"cost":6,"warning":"Programmable Warning"},{"name":"Rattenhirn","era":"Himmilgard","mass":3,"charge":-3,"cost":25,"warning":"Rattenhirn Warning"}],"control":[{"name":"None","era":"Pioneer","max_mass_stress":1000,"max_total_stress":1000,"mass":0,"cost":0},{"name":"Control Rods","era":"WWI","mass":1,"cost":2,"max_mass_stress":1,"max_total_stress":1000},{"name":"Hydraulic-Assisted","era":"WWII","mass":3,"cost":5,"max_mass_stress":0,"max_total_stress":1000},{"name":"Fly by Wire","era":"Last Hurrah","mass":3,"cost":10,"max_mass_stress":0,"max_total_stress":0}]},"rotor":{"blade_count":[{"name":"Two","sizing":1.05,"flightstress":1,"rotor_bleed":0,"cost":0},{"name":"Three","sizing":1,"cost":2,"rotor_bleed":1,"flightstress":0},{"name":"Four","sizing":0.95,"cost":4,"rotor_bleed":2,"flightstress":0},{"name":"Five","sizing":0.9,"cost":6,"rotor_bleed":3,"flightstress":0}],"arrangement":[{"name":"Single Rotor","count":1,"powerfactor":1,"blades":0,"reliability":0,"latstab":0,"pitchstab":0,"cost":0},{"name":"Coaxial","count":2,"cost":2,"reliability":-1,"powerfactor":1,"blades":0,"latstab":0,"pitchstab":0},{"name":"Synchropter","count":2,"cost":-2,"powerfactor":0.95,"blades":0,"reliability":0,"latstab":0,"pitchstab":0},{"name":"Tandem","count":2,"pitchstab":4,"powerfactor":1,"blades":0,"reliability":0,"latstab":0,"cost":0},{"name":"Transverse","count":2,"latstab":4,"powerfactor":1,"blades":0,"reliability":0,"pitchstab":0,"cost":0},{"name":"Tandem Transverse","count":3,"pitchstab":4,"latstab":4,"powerfactor":1,"blades":0,"reliability":0,"cost":0}]}}');var ke=a.t(Oe,2);window.addEventListener("DOMContentLoaded",(()=>{const t=new URLSearchParams(location.search);var e=t.get("json"),s=t.get("lang"),i=t.get("test");s?l.SetCurrentLanguage(s):window.localStorage.language&&l.SetCurrentLanguage(window.localStorage.language),i&&function(){var t=JSON.parse(String.raw`{ "names": ["Theler Kobra MD", "Kreuzer Spinne M3", "Ritter Model F \"Singvogel\"", "Markgraf Zerstörer B", "Theler Drachen", "Living Grove (Farman)", "Rathenau 7k", "Braun VJ", "KW-S1", "KW-S4", "Ritter Model D \"SeePfau\"", "Teicher Möwe 13S-J", "Ritter \"Ersatz S\"", "Kreuzer Spinne V8", "Hugo's Ganzmetall Wunderflugzeug!", "L&L Kessel IIb", "Ajeet Interceptor", "Shamsher Interceptor", "Bahadur Escort", "Cheetal Fighter", "Markgraf Attentäter C", "Königskondor L.1", "Von Morgen Vampyr", "Hugo's Einzigartiger Stahl-Jagdbomber!", "Theler Kobra MB", "Kreuzer Skorpion", "KW Adler N", "Markgraf Volksfestung A", "Arntwerke c.7", "Mitscher IG J-79SF", "Recht Luftschlepper", "Ritter Model Cj \"Spatz\"", "Theler Zweihander", "Mitscher IG J-83 Geistliche", "Arntwerke d.13", "Rathenau-9c", "Gernsback 0012", "Gegenbeispeil", "Universität Kobra M01", "Teicher Schnelles Mammut", "Rathenau-16d", "Braun DC \"Puma\"", "Ritter Model S \"Fink\"", "Theler Eklipse", "Mitscher IG JA-81", "Arntwerke c.10", "SAM 99", "SAM 1144", "Teicher Mammut", "Mammut Smuggler Custom", "Markgraf Totengräber A", "Kreuzer Spinnmilbe", "KW Dickhäuter", "Mushshak Trainer", "Sonnenjäger Hummel", "Ritter Model ABh Eule", "Albrecht Kugel", "Flugzeugwerft-Neustadt Korsar", "Kreuzer Zecke", "Markgraf Streiter", "Mitscher IG B-78", "Müller Experimental 3", "SFW Flitzer", "SFW-Rathenau Nimbus", "Teicher Fuchs", "Weiss Wrackbarsch", "Braun GA 'Gulaschkanone'", "Ritter Model X \"Falke\"", "von Morgen Walküre", "Hugo's Metallisches Jagdflugzeug!", "Sonnenjäger Seitenwinder", "Tejas Interceptor", "Sonnenjäger Haifisch", "Albrecht Pfeil", "Teicher Sperber 8N-A", "Markgraf Todesbote C", "von Morgen Pferd", "von Morgen Oger", "Dryad of Hanriot", "Thorstad S1M2b \"Schreckensgans\"", "Straßenkämpfer", "Marut Raider", "DFB Blitzgewitter", "KZ-2 Mangusten", "Rebuilt LM \"Viper\"", "Libelle T.87", "Mauss Z-95 Phönix"], "acft": ["AAEAjATAdALMDwAVAFgUwDaoE4AIDSA9gEZYCGOAsgCLACAdDAYMC68M2yyPZ5-QOgAhbABdk5AGJgYANhk4AO0Ww4wADgAMyAA7AAGMAC4vBmwAwwAMCsAkCd42A-wF-gAJGABkez98sBwlhiktJyisq46lq6lgDqsQCSwEKi4jhSsvJKKlE6fACCusAAAgApAF4Ah0wA-ADOAMwNNQBmba1tJiB8wHZ+vDxWnABArNbWgxNjpsCjUyzzs2zMoywAcL2+AOCbnNYLPf5++yx9rIP29Gf9bACgvvT73Rc3e2wAEK-T9juvJ0NfViORznJaWeiMF4MWiDQarXirSEzaEo4HIw6Ar5AA", "AAEAjATAdALMCIBpATgUwK4C9XIAQGUAHASwDtTVcBZAZmAEAHhmAwZ91j9kL3pgDABKACwD2pAIbVRAF1HIARhPS4AWpFxgwABmGFgAFGABcYAGBmjJhzYAIdgHA+fAP8vgAaGAAEZ3-+WwEJiktJyispqGlq6+mYA6vEAkkEi4lJUsvJKKuoQmjp67ABADACC+sAAAgAF7ACQDAD8ADIAMwCzTQABzD1+PBxWbv4WfKXMFlbs04FD1jPzY8D2Tn5sbFzTAKDAu1xTixMcPMtzC7PsZ428l7w3Aby7x+PMPHePHGf2n1d+a58zmdfs5GGZGCw7ox6NNpi8tiDEcwgA", "AAEAjATAdALMBYAlAlgF1QUwE4AICyA9gCYYA2OAYjgEQDKyAdgOYBuBTZ1wAgD8PwDB+-XsCHDhIURJm8AKLQDGACywZkAI2w4AQlACSADRxgAzAAZlAB2ABkYAFxQIlxIDgwAFDCAEDP-+ALDAAAgB4RGywAoqapraekYmFtbAAMAA6hn60Uqq6lq4icZmljb8AEA8AIIAgQCZAFkAAvVNwACQPAD8AM6mpt0AAfzdADEAMwCzASBRwAD-C5FVAavpkRHSEtu8695+EQd8wmmn8ycRZ8Jd25v8Xff+AKCRvKJzdxLrVxKHT-wzl9gB4AWlpNcAW90rwBF93u9Lj8LlCoUA", "AAEAjATAdALMAoBZAhgJwNYHNXIGYAIAtAU1QGcAXAN9VPwCFgBAYAIGA4DAOeuXfQ-AcG7DRAkMOEsA+AHUA9gBsllYgEsAduhy4K+OckzEAFslX4AwvggBOAAwmADsAA4wALjMB7XgFhgAGAeAGgpYQBIHi8AVHD4hI5ZRRU1LR08fUNjMwtrO0cXQLk5AElgeWVVCg1tXSyjU3MyKxsHZwEmAEFcXoABAEqATIAsthEAfiHRiYAAjgmAGIAZgFmpSV52KMTxJO8hDl9QRNOjs+PvY4BkYAAYbykAJHvhTaDOnkOpYJ4oy8S2zOwgAoAkWL5JN8hAAIU6-Dhw4EcBHCADgyMCQlRyKk7CxIm+BxYJK+4V83CYJNJhyYAH+6eNPo9ccigA", "AAEAjATAdALMBwAVAFgUwDaoE4AIAiWAhgMZoB2wAgMAEDD0Bg9zjLzIbLTn3bHnbagGQAsqgCW2HAHVxZACbIArgpwB2AAzIADsACowALgDqXYAGBmlgWwDgze-ZvOXVYKIlTZC5as06LaWkASXcxSVxvRRV5dS1dFkoAAQBJgEyALKSAAOZqEAB+NMyCgDKAM3KCgBkAGYBZgX484CcXXnpqLrZrC1cbOn7Bzrd6HAROUxMWqan6XuAASH7mYeWVtgBQFznmlmGVhYAIDatnNv6FhdOdm7ugA", "AAEAjATAdALMCoAZAlgN2QOwOYAIDiATgPaoCmOAFAGICGBAtjRgJTBsCAbwAYF373zYhBI4JwBIAIVIEALgAsaOKmBgA2NTjAB2AAzyADsAAYwALijOfADDAAwFwCQokQAgA-wD-gARGABkFyDgjmApGQUlFXVNHX0jOwB1RIBJMOk5RWVVDS09Q0F2AEEjYAABABSALwBDsR4AfgAzFubWgACg4T5OVy4HENDOKy4AIH7gAHBBab5ZsamZwVGR3nHOAFhgACgXTltdwQHQQq5hoOPgZz5xwevBwQBQYJGT14ejvj6Ptkulj8ufx+Ik4IE43He9XYI3Y7ncwFulmByKAA", "AAEAjATAdALMDQAlAhgFwBYFMB2yCuABAOwDWwAgBcNQGDX20P0hOtUAoAygMboBOmAJYAjTHwIAhKAEkAGgTABmAAzoADsADIwALihqlKgwDgwAFD0AEGxvUAsMAAItly8pdeAkWMkz5S1Q0AYAB1EOlgD34hUXEpOQUVdXoAIAoAQQBAgEyALIABbLzgAEgKAH4AZ0VFcoAA6nKAGIAZgFm2FgZDAH+elzS2QeAg1xthge6jYAAkBDGpgypKQ3pR+jKF6c2t+gBQNxHqFlXdhnXqazOL1lMtm5uz1koUyhpTpfJVylGPxaetkA", "AAEAjATAdALMAQAhATgQwK4DsAEA1AUsAIDABAxwAYMDbVXbSAzSdc2w08wyQLAoYcAVQAy2AJwAGABYAHYAHRgAXG4k68YAGBaO7t3IBIYACh95iy2D80WbKIkz5WgOouAktYF2HUubRIiAEEAGAAZgFmAAQBIgEyALLJQAH44xJSAMoAzbJSAAPMuAJoAf9KEdUtGWgBQaobmKrpmnUDgAHhTRqsacj1uAeBjRqqRnpp682amcgmGIc0JtooaJgBwHqGh+f1m3csgA", "AAEAjATAdALMCgBpA6gWgMpmAQB3gYMEccISUSOVXgBQBiA9gNZMCmATgAR0CuAdgHMAlgC8hAEwAWHAM4AXVgBtF-AZwAqATwAOnCDADsnMADYADJO3AAmMAC41XCQBQwAMDEA0NSoBwAP-+wAAIwADIPpFRRLj0zGxcvIKiEtLs8koqgho6eobG5pbuyMgAksBxLBzcqilSsgrKqjm6+kamFlYk2ACC4gAzALMAAgCZowBZBAD8AJqT0wAyQ9PjU1SU3cC+xGTReLhOTh5EAEDEThfE5zHklzdEhA8R3nfEAJDAABAbxJtXtyiJyIny2+1BwAe+3gUUuoDw+yoJ2B30RJBR5B2aJRGLRjncuHwcNu2Eu2ECkMixLxiKAA", "AAEAjATAdALMCgBpA6gWgMpwIDAEDBwDBgTThiySQDL8LL6zrKWcBkdAQQFkACRAK4AnAJYBTIbwAaU3hAAM8gBYAHYABxgAXBpl8ZABDAAwKSMsWASAD-14ABRgABAuu3ldlz6DRE6bIVlNWNkZABJYA4efmFxSRk5RVUPTgBmdIABAEqATIAsvFAAfgAYgBmAWaKAAJIat2ZSfEtSRt1yDxocPVbSbr7Osn79dpJhsmIcUzZgAChRtsHRi1NSFvdXdY2WeA6GqmXtklXVknMj47cAcAuTMlPb1ymifoGsHA-bQ4HHx6A", "AAEAjATAdALMAYAlAlgF1QUwE4AICyA9gCYYA2OAIjgEQDKGGACgGYCGArtcAIA-D8AwfsMEjhIMZL4AUWgGMAFlgzIARthwAhKAEkAGjjABmAAwKADsADIwALih+vPiIDgwAFDCAEFN-8AsMAACH6hobyyispqGtr6hqYWwADAAOqpOsCRSirquHEGxmaW-ABAPACCAIEAmQBZAAI19cAAkDwA-ADORkYdAAH8HQAxADMAs1ISIk4A-7Oh5VJLKWG+TmIbfMnCbj5+e5Ibh2I7ZZvCW1Jn-O1HYXdrYgCg4cBuDldPzjfA+9+rXwfJ7JDa-AFSXig4ACL68bgbRF+L4QsJAA", "AAEAjATAdALMBIAVApgSwMYAtkCcAEAsgG8DuyeYAzAMoC0AUsAIDABAwHAYBz17zyH69OLftyGCh-FvABCuAC6YAhngBiYGADYtFAOwAGTAAdgADGABcKaJ4AYYAGAeASClCAEAH+Af8ACIwADI7qFhHDLyOEqqGtq6YIYmTgDqKQCSCFEx6po6+kamvEwAgkUAAgApAF4Ah8zAnAD8AGZtre0AAaGSPCwe4TYNthzsHIIjDcXS-OyTk2MRbDwA8MAAUGFrm-zO4zNLh7u8boNCp+GTAKDH7oKLQjtDTrwDZzx7UgDg7y8fv5cnCwREIWExbLYHgcAb8gA", "AAEAjATAdALMCIAlAlgF1QUwE4AIBEAolgM4CGqAXjgMp7ACADwzAYM+6x+yF70wNAB1KAHkoAZhwRxABgAWAB2ABUYAFxgAUGaNgAYC4BIYADh2AeD58A-9eAB0YABwrrtzuBDREqbMX7BQQBJT2ExSWl5JWYAIAYAQQBxhQASgAEAMoAzLOBjegB+HKyCgBkAGYBZgoBMmoAsvh4OA2Bbdys45maOrl0mfo5Bxi7PYAAINwAoCaZ2Vv0+9kG+Bby53uZjTY5tV0ZdHlGdlo5Jk7WuAHAdvX7L-d52jy6WA6GBpnbjpZOToA", "AAEAjATAdALMCIBpATgUwK4C9XIAQGUAHASwDtTVcA1ADmAEAHhmAwZ91j9kL3pgdABCyAIakAJgBdcidMmI5cADSoBJXGBoAGABaFgAHGABcPgCAuACGABgdtb5cA4AH+XwAEjAACI7--mRiFRCWlZeUUVdU1dfRsAdXjVYGCxKRk5BTwojW09LnoAQQBmUoABAEqATIAs4AsQAH4AAOYWttbHHg4LJwC+RkZeC2Y7IfZxwIKmDknGO2ZrPr82NmnmAFBgLa4xifreHgX9qdPdjgBIAYCr-t4tkccRnkm78-s39mPeZbvv78+1xsjBYryY9HG8yYj1mgLhQA", "AAEAjATAdALMCEAJArgcwPYHIDOACA4gIYB2AXgLYCmALoQDZ24DqyxAJpQE4BmdaplNPGABAUcAkAwCTKmyZIeUvEAkAEJdqAC0K4AYmDAA2I7kgAGLQAdgADGABcZWNkAIYAGAZAUGVKA4AD-gcAAMMAA0H7RMRJi6po6+oYmZhCWNh5MTACSwAmc2roGxqYW1vIiAIIAaNzcAAIACTJikgD8ADEAMwCz7QABEoPRirJi-rHO0QBAMl4urZXyc4txK7IAkOK+9gCwSnN+iyfKXjLbU0qXV7K+smPKimu3sucS7hLvMd-yk7ffX6vJRiDxtF7iESndbHYFwoA", "AAEAjATAdALMBwAZAZIgBAaQKYGcdYBs0BJYgI2AEBgAgYegMHucZeZDZac+7Y87Z0AKAGUAxgAsA9gQBeaRAFdJONAA00YMAAYJAB2ABMYAFwB1FgFBg11gM4B-h8ADQwAAj2v3+tVGSZeSUVdU0dfWAAYAB1aOJgf2k5BWUJVQ0tXQNfKgBBXIBMgCyAAQBsgGYKm1oAfkQAGYBZ2oAzdtqAGOaBfmYLJ2BeNgtmRMCUkIzwg2MzTlH6a1shn2ZBt0817f6E8SSg1PSwrKjY+PHk4LTQzIicynzi8qqamnrmto7upt6R+kGwxYi2B7B2u1BdDWNFG1ChwAA6MAAIjeADwwAAMJxImDQfQONQQfRccwAJBRcH0ClUpbeIkE5jwqxrUn0AAQtLZnAA4ODudzaYJgJyhgzdotKINiXDWJRJVRFdRpQsckKdkA", "AAEAjATAdALMCIBBAVgU1QFwAQEkB2GqATgMaoAOGA9kcAID3BMBgTbL7bInPjAGACUAFlTwBDLAFkq1IgCMxAVywAtSFjBgADEPLAAKMAC4wAMBMGjdqwAQbAOC9eAf+fAA0MAAIT334vAgiLiUjI0CspqEBraumYA6vE4gcKiEtKyEarqmjp6TABA9Ij5AAIABWwAkPQA-AAyADMAs7UAAUztvtzslq5+5ryDZmyWo5xjRQG9bFNMjmMAcMAAUDxj6+MD7DX+W8C7e5wAoH4b3BtHnKZjdldMwzyOV4+vfv2bDDfAzJeMdGNAbMJvdQUwgA", "AAEAjATAdALMAoBlAFgQwLYGdkFMBOABAJIB2ALvgMY4AOZA9nsAIAvDsBg73nP3IfQWwAYAJWT0SqAgFl6DPACNUAVwIAtSATBgADMhoJgAXGABgdqzY8uACG4BwIUID-L4AGhgABGd--lsBiElKy8ozKapoQ2noG5gDqCURB4pLScgqRGlo6+obsAEAsAIIFAAIABdwAkCwA-AAyADMAs-UAAeydfgI8Vm7+FkLD5txW43wTxYH93DPsThMAcMD2U34TrNsjPHUBk6z7B3wAoP4ToNYnXHxmE+sn7KOCTk8vH09CrIWsHJeBZhAtiDaYbL4Q4BAA", "AAEAjATAdALMBwAhAhgC2QEwK4CcAEAogM4DGA9jgC7ACAtwDAYAy06yyO18AEDAAoAZRKocAUwCWAIzH4A4lACSADTxgwABlQAHAcAC4vBnXqsAoMAAQLAODduAf4C-wANDAACPe8-jA4aKSMvJKqupaugDAAOrRiv4i4tKyeAoqapo6LHw0AIIAvtoAJQACANkAzBXAAJC0APwAMgAzALNNbfUAAd6crCYODsB2vgxCiUEpaWGZuvwGRqYmLBbWDCOjzm6eo7v9CYHJIenhWTFxB0nBqaEZEdm0BcXlVbUNLe0f3b3sA0Mbez4fmBplBy2GoIAqG92ED2Jw+HC-ODgJFWHU9ujMeYIaM+g9sajlmtMWj7ADfGSGFTCVw6CA6IwUfQaMsaINFtxmbTvEA", "AAEAjATAdALMDwBhAFgU1QFwIYBsAEAYgJYDmyGqATsAIDABAwTAYE2y+2yJ+6z35249OdANAB1KAHkoAZjwRZABmQAHYAFRgAXGABQJnWABgTgEhgAODbxhwgP-3gAdGAAcO56+HgE6XIVlNRNxcQBJX0kZeUUVdSZGGgBBAHHVABKAAQAygDNc4AsaAH583OKAGQAZgFnigEz6gCzhITZTYEcTbx5GJgMfdiM2YcGRtj7vemGAcFo2AExgAFgeofGx9g6mIrXhizXOAbs6I25tw85jYYAIS6YLzjnD6-b7r0S6ZlGfGlPaLqTSbzYDfP60f6jGiAiaDH7vbxAA", "AAEAjATAdALMCoBZAhgJwNYHNXIGYAIBBAF2IFMA7YgE-NXwGFgBAFtgMGC++E565Ct+-VgGQAyoUT4A0gFdUASzL0AGqvwQADFoAWAB2AAcYAFw2PAED8AEMADA3O8OEBIAP-vgAFGAAEF0CgkWAJKVkFZTUNbT1DewB1BIBJUMlpeSUVfHVNHQMRQgBmEoABAEqATIAs4GsQAH4AGIAZgFmGgACuLqCQfmtXQKFeEJGeRy5J4JdrGbqeVjngABhgAChhEbXN-mmAUBCucZdp4CHl+a4hq-5DoPH+k9vuM+cXs-4AcA+LT9vPNxWI57Kx2M9WMwRiNLlYwcdFiwoWxAbDuJYwRCkSNUQ8XviuEA", "AAEAjATAdALMAIBpAbwOwJYHMDOBrA9qgCb4BOABADJRjACA9wTAYE0w8M3R2yD2wMYBEAMqUA6uRFYAbulJFyYABwAGABYAHYOWC1+wAMCCA4MDNMA0IJsCGAJGAA0W67eCGoiVNnzFKjW1DcXEASWAvSWlMOQUlNS1eegBBVSYAAQABpLoAfgAApgKigDKAMzLgACBqpIFjYAB-xpseBgNamuNjHh62PqYa9g82IZZapgAYYAAId2m5wQHGMaSGtjb3IwEASC3XPdatgFBBVcGmEAn913XZm-q3CxuBw02Hmy6GLiOq9-p2hwah1Bt8OoD2k0WiDhh84cAgA", "AAEAjATAdALMCIA1A9gOwAQFlkCcDmAphogIYC2ADgJ47ACA9wTAYE2y+2yA55wwOgAhAjgAuACxLoAYmBgA2eegA7AIxHowADgAM4isAAYwALi9G7ADDAAwGwCQ53vYD-AX+AAkYAGQn-gKYBYTFJGTlFFXUcTV19WwB1BIBJYCERCSlZBSU1DW09A3Y6AEEigAEAFIAvAEPGZgB+AGcAZlbGgDNuru7zED5gR0DWYsYeNgAgNjsJoMH2abmLKbHppgAoIYCt4fZZtgZ19gG7MfmAs6Y9wM495YCAUFAdpgGH2-32AAhPr6cAOB-Wz-YH+Bg2BjMB4MOgTCbHXgfMEBIA", "AAEAjATAdALMBkAJArgcwPYHIDOACAogJYB2AXoagIYBOALhQKbW4DKtlAFgDYC0AUpVQATAEboAtiKYBCYAEBgAIGAqAYCpULg6jRpC6DOzWoMr9pgwoDoAISa0OlXADEwMAGzvcAHanMwABwADBwADsAAGMAAuBZaGgAwwADAGgCQFqZpAP8Av8AASMAAyJll5ca29o4ubp4+friBIeHJAOptAJLAVXQ1rh5evkxNwWGWAILhwAACACmkAIfy2gD82ADMG6sAZnu7exbmGgoZcRrq8QrXBqkqAKAruvHGz5YnSk8fusrpK49RJK-FR3c6vL66UHAM4VLKwiyPXTHUz6F5fRHlKEACHhkPOAHBcSk8UTyspkgpVGiVnIrhpgbcTLS3i85NlshDXtTSRUgA", "AAEAjATAdALMDwAVAFgUwDaoE4AIDSA9gEZYCGOAsgELACAdDAYMC68M2yyJzwwEhVsAF2TkAYmBgA2KTjAB2AAzIADsAAYwALi96bADDAAwKwCQvHgAgA-wD-gARGABkC2-ct6A4aJwTpsgrKakYA6qEAksDeWCLikjJySqqctACCasAAAgApAF4Ah0wA-ABm5WUVAAFu3Gz0lh66rABAnG0sJiZ6xgydfcBt3azDLB0szOMAsMDmbgDQwI2cJlyprD0Wqyzmmx70c02cAKDu9Kvce0ds20vXI24A4Pe3t-fNy4z0m98M9NbWAY8K7vDxAA", "AAEAjATAdALMAIBpATgUwK4C9XIAQGUBrAe2QAcBLYgO2AEB7gmAwJtl9tkTnxgDABKACxoBDXAFliAF1IAjUelwAtSLjBgADELLAAKMAC4wAMBMGjdqwAQbAOC9eAf6fAA0Akdfv54IJHU4lKyyApKqhDqWjqmAOqxAJJ+wmKSMvKKKmoa2rpMAED0AIJ5AAIABWwAkPQA-AAyADMAs7UAAUztXtzsFi7eZryDppZsFmOcDOO+E+MeNbzjDIWcPZMTM5zDwAs+PLt77ACgI14AUEzc04db7LY3TNucDjfbTw88DCYMzNeMdEs2CtFh9QUA", "AAEAjATAdALMBQBpA6gAgIIBMA2BTATqgHLACAZFAYMDbcNXTSOY4+QCgDK6AsqogFd8ASwKoAGgElJqMAFYADAAsADsACYwALisKdABDAAwLUO7GDYAHhr5u-ZodufQSLFSZ85WqPJkk4C5efiFRQg9ZRVU2dABmeIABAEykgCzgACBQAH4AAJo8goAYgBmAWd0QNnpzFhq6ckbGExoWh1Y6hq6smgBoYENOun7Buja2x1oh1gmASD12innFxgBQeybQBZXmgx3WuwBwHaM6ibsAf4u7cizT+mnGprrpmh7KTcnn4Cvt6v39kA", "AAEAjATAdALMDoBZAhgJwNYHNXIGYAIA1AewBt0BnXAUwoBcBXAO03wEFgBAYAUGH4Bg-LsKHDhIcVIHcRgqf0kL5-WcDFSlwgFCjhajeK0KNB5ceXAAQMABEAdTKl61AJZN0OXHSLVUdNwATV0w-fAAJfABmADYABgALAAdgfGAAXGUbcQBYUGEAVEspAAgAf7LgABJgAEJihobuBycXd088H0I-ANdg0NQI6Pjk4ABge3sASTtHUmdejy8unqCQsMjYxJTxTjYAAv4AAQAB4RsBAH4ATQBMgCzLqOfLgDLcXHMpGxK9ZUNZq1Fh1vL5-GsBkMtqM0pkFNlhHktEVGsBypUavVUdj9ID5m0lp0wb1+hthttxpMZi18cDlsSIWToTt9Adjmd+Bcbg8ni93p8FBYfiIAX9ziI1BLvsJ4Di5fKFcVJXJcbspMqNeqtWqdbixorxmqEQAtYAAPAal2AKPE+sU0v4dpVtvEAEh1Ni1O7FXwlXJJKLhBancoQ795frNQBwOUhkMG4T67IyLicNNS-QVZ2c6zydO4yWcLPKw3J1UZ1TFwXjEsJ5RAA", "AAEAjATAdALMCwBBATgOwC4HcCmyDW2ABAMZQDswAgFTQGDAOPD1MMisc0AIAsgPYATAdgGEAWpEJgwABgAWAB2AAUYGGABgBtWAAgVvQAQjAFCdOAf4vAA0MC7nHT6gEREAG3QBLdAFdhhAAqcsh86Oju2GrBXgDOhNioAOZeqERyAIbx6HJEAOoAogAKhL4KScgZARnohB7efsLxMgC0AJxQ3PxCIuKS0vJKGnl5AJL23cKiEhBSsoqM+pSISsAAAgAFjACQVAD8ADIAMwCzewABDBeM1DqgrPrAVk6PHOwMWk7mry9Mt4wOXZ3GjmO5gkGMT4MXZfG47WGcACgziY7GBCNYUOAxgxH0cAHBcVisbjONQNNRaOiaJRwdpHNTSV8gA", "AAEAjATAdALMBIBZAlgFwM4GMAWBTATgAQCSA4oQFIC0A7AJwDKAYsAIBvCcBgnv3fvEAOEcAKAxz5cyAEYFCpKMQAahMGAAM2AA7BRwALjAAQJ3Yc+AUGAAIXgHARIgP8Bf4AGhgABCd--ZnoS2FKy8ooqapo6wADAAOrxxEGS0nJEEarqWrqcpqwAggC+2gAlAAIA2QDM1cAAkGwA-AAyADMAs62dTQABfkJ85s7OcQHCpnnjJtPG5hyTng3+Xo0CsYIC89siG7yN89PLR1b+7OaDFie8e5x217fCjkePj+OsIyLn7FyHgazbT5-IbXUFAA", "AAEAjATAdALMDIAlApgYwBYBcAEAZArgGaYDOGANsgA5XIBOwAgMAEDDsBg73nP3IfHl0HC+AwX2YAKAHIBDTAEsA9gDs5lEtgCyyzMroAjAD91l2AIJHkizPWwANAGoBJF9jAB2AAzoqwABxgAFwmPjYeAAhgAGBuaIk+AEgAf5TgAERgBMTcvOl5JTUNZC1dfSNTcytDGzs6R1d3L19-GIB1dpdgWQUVdU0dPQMTM0trW3tnNw8fP0kLAG4AZmWAAQBKgEyALNZQAH4AGIAZgFmDgAD2K9zxMLYk7ji87mZ38OfXxJfvvhjmDwIsAABjAABweTBkP+-G4bF+vx+PCeSL+Tz+fAAoPkwqA3hIAFDfJE5TFongAcExsR4FJpkmA1OAHHejHZYUB7EYaTxPEBXIZmKAA", "AAEAjATAdALMDoAlAlgF1QUwE4AICyA9gCYYA2OAwgFY4BEAygA4CGqAXrcAIDe8BgwQUOADhgkDzFieADEQALAgDtm+AqgJYARswCuOAFqQcYMAAZ5jYABRgAXGABgQZMlCBACCEBwKX+AA-wHAANDAAAj+UdEuwHKKKmoa2nqGxqYWVo4A6tkAknEKyqqEyTr6RhAm5pZCAEDcAIJWwAACAAVCAJDcAPwAMgAzALO9AAGC41Eg0oJB0Q1+i04x-ssLwjzLPV5RO7xCzoJHQm5u-ifAPeerV7dSAKDRPJIzN-eHwrsfl2K+9443L8PlIeICRO8XmdTlF3iCYkA", "AAEAjATAdALMCIAVAFgUwDaoE4AIBaA7qgJbICGAdgCbbACA9wAwMAGDAedtecg-+MASACFsAF3I4AYmBgA2OTjAB2AAzIADsAAYwALgCGXADDNOASAH8AEAH+AfwmABkK2-ccGI8ZJnzFKupaTADqIQCSwN5YEmTSsgpKapo8dACCWsAAAgApAF4Ah4ysAPwAZhXllQABbnxcDNacLIzuRgL1Zp6pPRwtrZzt3X1c7ABAZgBQ3D0s0+w8-UOMDBPu-cCWHgJb2zwAoIuGoAN7vCOcTWcXAgDg1xsb18djDKzLKwxftranvc-XIA", "AAEAjATAdALMDYBZAlgFwM4GMAWBTATgAQCSA4oQFIC0AHAMyGm7LqoA2yOuwAgMAEDAhAMCFiR4sSEnjR4vnMnS+MsXwDwAIXwBDAK4A7QgFUAMgGlCYMAAZsAB2AB0YAFxVKsQAhgAYCmqgXwA0MAAMIGRUUIa2vpGZpbWdo6+AOppxMBauoYmFla2Dmq8AIJhADMAswACAJEAmQBZAqAA-A3NHV0AAWKCntLyQgD-I9GB-kJDE9GCE-MxrUIAsMChkWsb4lN+kp6ek+IAkMuzQqfn4gCgUXwqylequ8A+Ty+SAOBXLx9P+8thPdeHwBvIxrwzpDof9zkA", "AAEAjATAdALMBwBBATgOwC4HcCmyDW2ABACZRgDMwAgMAMDAMBgDLTrLI7rzXP7nXNr0EDBLGgHQASgAsA9qgCGhALJz0c5ACNFAV0IAtMGEIAOAAwyADsABIwALjAAQAxrV+wABAcxXAP-+3sAAUH7h4ZKyCspqGtp6hsZmlja0AOrpAJLA0vJKquqaOvpGJhbWLK5UiFAAZnUAAgAJLACQ1AD8AAEMPX29YqJuDIHeVO6sroL0QhHz89MR1SNLAAih4Rth7LOg7EsrNJMMe8AdZwsdC+wAoJF0DJxLXD4RZ283j2IA4F9nlwi7jGUxcTGOIwh4jGJ1W4I87ihbhhXGmsK+CyAA", "AAEAjATAdALMDQAlAhgFwBYFMB2yCuAtAJwDGwAgBcNQGDX20P0hOtUAYi6A9rgAQBZbqm4AnAEb4+ALUh8wYAAzoADsAAowALjAAwNUpUGdABD0A4GzYB-6wmAAEK85cHgnHvyEiJU2RHklVT0AdRCASXcuXmRBYTFJPBk5BWU1agAgCgBBdIABAAL6AEgKAH4AGQAZgFmygADqBucWBkNbFyy2Lr1XKx7OtuAegChgM2cAUHHWfWo5+kMjZYYF4FKhvo2+pmnnSkMWJb7W1YYJnfnnS0u1tb72uyGMyhpjt3JPqg73zcv-6hAA", "AAEAjATAdALMBwBxApgJwHYGcBGBDAxgNYAEADKZMAIDXADAwAYMC6026yFTR2zQCgoMOAiQCyAewAuE1GXIBWYMWABcWmwZsAEOxYAoXkYCgAf9PAAqMH5G79jgKFY8RYpJlzypJXQDqfgCSNs4ibh6y8j6sxtQAggACLAkAAzHAAEAA-AABLLn5eXYgHAyxLBl2zDwatSw1WnVNDaw19Y6sjeyNurptOsB9mqy9dTXlmbQ0lQ5dAJAO9gt2MyaLbCWr60ZduhXbjVvAAOBNdl1d2-Y02jSM-VM1VOa1-Q9X20A", "AAEAjATAdALMCwBxApgc2QOwEbIJYGcAHPAG2AEAKqAwYO+4WhukZtqgFAGUBBAWQAEAaQCuAJ1zIxAgBoBJOQLABWAAwALQsACYwALjtKDABDAAwPVPtmTYAHh71p87qVu-YeMnT5ilRq0zAHUguWB3QVEJKVkFJTVNZnIeAGY0gAEATMyALOAAIFAAfgAAulLygBiAGYBZ9lYGSlsLKgZbV3ojekK6VraupMHOkboAKAL6AGhgK2sZufpG8x6B7tG+hgBIIZdgHfW94ABQZ0pe1kOjhn7Z6-pb5gBwe4sjR+cAf8-DKifmq6UchAijfAZsK73PZAA", "AAEAjATAdALMCoBVAdgSwG4FMBOBnVALgCcEAEA0gPYBG2AhqQLIAMYwAgB1wGDB--BeAviE7DhnAEgAhHAQAWDAGJgYANjWkwAdmbyADsAAYwALjiuAgDDAAwPwCQF8QAgA-wD-gARGABkZ0CgvilZbAVlVQ0tXQM7AHV4gElgGTlFUhV1TR09QwF2AEF8gAEAFIAvAEOeAH4AM0aGpoAAwJAJYBdgizE7YQAgfnt7PtHhy2Ah8b4ZqYFeDr5up0CAcGBVgSWuzaCNrf4dzhPOoPtHeZ6QvevhAFAg09BJu+EL5bfZ9beP-q++G43PxTrZONw+iCOH0+kNnJCAT0gA", "AAEAjATAdALMAYAVApgSwMYAtkCcAEAylgHbIA2ZyAzngLICGAtowK4AuwAgMAMC-AAwYMO7ChwiaEnAAUBPFd504SGVKR66arWTVAFAAKLMlWQArZGzwGAagFowAVjwAKAOpuAkgEpgAE2AAXAkAIEVlbj4NHWkAf4Af4AB4YDsY9PTuQ2NTCytbB2d3L18eD09gbJNzS2t7J1dy31FFJIB+AADhTrVY2MEMiSrc2oKG4p9-INDw6UiJFoyE5NTBtckso2q8usLGkt5yyq2R-Pqiptnudq7gHuU+gbXhmrO9id8A4OEwxYX+aKDZYpNLrdabHKvXbjS5lLzHSE7MYXA4ta73e5xfoKDIvJHnfaTL4zP4aKKzJaJEFg8EI7ajAkfQ7wvEM96XNHJDG3LFPMFhYQAGBpIsBYopEr+UoBIvJigFwAAMsAAHjpMDAACoynJ2n+wnJpJlwAAkHzMhIzaKAKAWiR6uSAvTABVqOUACFlLu9GgA4GC5XKwY8NGEogJuJHIxTOI9OYpw1wo4pFrH+vGBUbRTogA", "AAEAjATAdALMAwAlAhgFwBYFMB2yCuAtGAGwAmwAgJcDQGA0N2MMjNvUAoAygMboBOmAJYAjTPwAEAISgBJABoSwAZgAM6AA7AAyMAC4oGlWqMA4MABQDABDs7NALDAACPbduq3PoNHjpcxRV1LQBgAHUw2WAvAWExSRkFJTVNBgAgSgBBAECATIAsgAFcguAASEoAfgBnZWVKgACaSoAYgBmAWfZWRmMAf763DPZh4BD3O1Gh3rGbcrd6W2ZjQ3pmDJWqKZpWbc2GFcZxhgrGbbtTieYAUA9gYdZDq+ZjmiXn2btzZ9fP9gHlvYMiEqLQntQKPsaOc3qDwVRIQjgADwQcPuiaEA", "AAEAjATAdALMDwAhATgQwK4DsAEARAwtgEQAK6AtqkcAIC3AMBgDLTrLI7X9AhAHKoALgEsA9plQAbAKYBnbAFlRg0cgBGAH+SjsAJQC0YABwA2AAzYw5gBYAHYAAxgYYACAGdN+wAQwADAsAHDc3AD-ocAACI4hsXF0AIgAgpIigugAJtLYACrW2oKCMs55wvLSmADmwpjZ1qjygtbZAOoAoiTY6LaVaFnYQtgpaZly2Gb6AJxQvAIi4lJjSirqWjoGxuaWNvYAwC0tAJLA-EJiEjLyy6qa2nqGphZWZnYsu7RJACkAMwCzAAIAAZYAGhaAB+ABkADNoeCAAEMBEsOieUDsdzAcJcNGYuLvd5owlvegMdzvVgUlh44DMPHBABQcQA4MAAJBcKlUjwouLAbkc1hokJ0QV8rgAUHi-IYnBp4s5rF8CpJIVZKu53PFnmxQv5dEYwp5NDRptiRpVKqAA", "AAEAjATAdALMCoAlAlgF1QUwE4AICyA9gCYYA2OAyjgEQBiyAdgNbXACA7wXAYF1x8F58+ITsPEcA0AHUoAeSgBmHBEUAGABYAHBMAC4wAKD8uAYHEBIYADg+AeHGO+Af+fAA6MAA4T334nAMvJKKurawKbS0gCSgbIKyqqaOlwAQOwAggDjWgAlAAIAZQBmxcBWbAD8pcWVADIAMwCzlQCZrQBZTqLC5sCu-ukCwulm-n7DwpMco8AAsOVijgAwi5N9EQEm-huLs+N8VgeOxhNiovvil067ABDHvX4A4A+bfLuvThymHNyTJmwOEC+Nc+P9PgcgA", "AAEAjATAdALMBwAVAFgUwDaoE4AICiA1ugJYAOAzqsAIDADAwjAYI6826yB2y97x1zYAoVvx7dQEjgCBgAJABC2AC7IAhjgBiEAAx6cEAKw7kpYACxgAXAm02AFEmN4UjgGgA-x+ABMa64CA2kUVdS1dfSMTMzoAdViASXklLFUNbT0dA2NTDmoAQQAagBmAWYABADz7AG8aYCYAfgAZMsaAAMYO10FWWjdRKTFk0PSIrKjcyxtuO1ZHXpdA4E9vPxnlzcZglLTwzOzo+nikkNSwjMicszYCkorqutom1tLu4HeJXu2V+uHBtiyWhzeog+qMAAwW2hPx+c2BfXBoMR8KRtFkywx7CxAFpgAAMAJ4wkcBiMb5owJkxgASGAAFAYcA6UyGUFgBiuBSHMtqcAABBMvkcADg0L5wtZrFkGKYCOo8tuXiRiNlNAVCuRfWVYI5sKlyyAA", "AAEAjATAdALMCIBZAlgFwM4GMAWBTATgAQCSA4oQFICCAtABxjACAwAQMBwGAc9e88h+vbkJH9BQ-iwBIiXMgKEA8jnSEIhMADYADNgAOwABjAAuJJa8AUMADAPADCShAcAD-AP+AAEYABRnQKCOGTkFIhVsNQ1tPUNbAHUE4mBZeUVI6M1dAykqABCAGYBZgAEABJ4WTgB+BKsAXhqAZlaagEz2gCzJCSrgFx57YJCh-nYOYZH+Kemhy2BuCeAAdGAAeCC1zZmBKX7RoVmASDs5nlPzngBQIJZLPoXrEdmACCuz50G52dmP8bYXHuvGBVTcbmYQhYE04TDh8MhTyY4Mhzie-2CQA", "AAEAjATAdALMBwBBATgOwC4HcCmyDW2ABAMZRgAMwAgNbQGDCNPAPOMhue0AYASgBYB7VAENCAWUHpByAEYiAroQBakQmAr8ADsAAowALjAAwIxq1mDABBMA4Fy4B-x8ADQwAAgPvPs8D5CohJSMvJKqhDqmjrGAOqxAJL+AsJiktJyiipqGuTaTABA1Ig6wAACAAVMAJDUAPwAMgAzALN1AAGMHd4czObOPkVcQya+DiODfRaewLXmfg7zNMvTjKY1Y0wrtZtsAKA+86Cru8zrjDanow72u+fXV4smNHRHflRLW95vj75AA", "AAEAjATAdALMBgBlAggWQAQE5PAIB4PmGJIVJJAPNPwGQUMBpAVwCcBLAU1fQA1f0EAAxCAFgAdgAHGABcKiQBA5ABDAAwCTXVqASAD-+4ABRgABB2Wr5Og3QsO3PgOFjJ6gOoeAksHpp7Ni4efkERCRtkAGYYgAEASoBMgCzgZRAAfgAYgBmAWYyAAOIiq0pSZV1LfHwiGgJ8UnLQa1bSTTbqDuJ8ZWIq7UsBroobEkarbuAqvs7+ufIAUGsa4koJ6mUNka0F4inyAHAFqYPqQ0MGnXx1Wu2GiYnZ6nu91qA", "AAEAjATAdALMAQBlAggWQARjDOBAYAQMPgGDDkXBmXkj43nU1OUg1s34DoKGAKgCcAhgDsAzgAcA9gIAuAUwHoAkugDMABg0ALCcAAYwALgNCNACigKAWFMMAkAH-HwAHjAA2He8-y3XuiCopIyCkqqmjp6AMAA6rHKwDxogcLi0nKKKupaupzIAA0AxQDrAAIACRREJAD8AMlqarUAAeSt3hzVwPZ29FScxEOU0RRsRJQT3ZM0RFPk82YU+FMAmMAAcD6GtjSj5ACgg36m-fvkvYs++L2+pkcLDPj0494AUHfnCHd73gDgP3IXy+3mc3hWwGipH6y2I-XhdgmZFwz2ewz8YKu9BhgNxQA", "AAEAjATAdALMBwAVApgSwMYAtkCcAEAsgIYC2JArgC7ACAwAwA8AGDBt1utveg-ABQ3LrSF82IMaPZS+EyTwl4AckUqoA9gDsiAG2QBnQusrqcAIwA-OdXgAiAWgDsANgAMeMAFZXmAA7AAXECRHgAgPgAIJjYAUHk+YQB4YABoePT0umVVDW09QwJjU0trOyc3D28-BgB1GoBJYGy1LV0DIxNzKxsHF3cvH38eGgABAGeAZgmRgAbucJAAfgAYgBmAWcWAAbZFgEwATIAsyTl5lhkM5ty2gqKu0t6KgeqgoI5znijGWIzObmSaT+wO4WRULTy7UKnRKPXK-Sq-nodUa11a+Q6xW6ZT6lUGfFGk2mczYCxWG22u0OJzEZ1JFzowkkHzRkLuMOxTwR+LeIU+3G+3DifySqRB4rBOXRUPusJxz0RtQaTXBNwx0Kxj3heOqw3GU1m5yWa02O2A+2Opz44VYNsy3FZt0xDzhuJe-l5H3pX2iwGFGVFQPFf0lEKdGpd8u51WRysd6tlnO17oJ+uJRvJpqpltp1oujCZ6QkdC9JeGfJEXuA4TYABhgw3pOXm6CCW3yz8G52RDXgAAZYAAPHSYGAAFQxJ26XzO1W2N2AJAXEPcJeN-3MhSXbgAFGr6W7UWD3dbAHBxd36HPG-ua8wyzQH8MAP-PivSO+0EtP0Gv9-7-8b3kIA", "AAEAjATAdALMBoBZAhgW1QVwC4AIDKmA5oQDYCmATjgMIYDOWA9qsAICjADAwAYMP+359+IjqP7cegwb3H8QcrrIEjh4hXMkiZa0RvUqFAYgByyLAEtGAO2Tk6ORIyYUARgB+KjHABEAtADsAGwADFikOGAAHCEAFgAOwAC4wGBs4gBA4gCQSkLpiqoA-wB-wABIwADQhbV1KqbmVrb2js6Mbp7e-sFhEdFxiZwA6sMAksCNljZ2ZA5OLh5evoGh4SSRMQnirAACAM8AzIe7AA0iWSAA-AAxADMAs1cAA-wAfHePSjL6-FlqujqU2as3m7U6yx6a36W0SKTSMj+OTyskRih4pQq1XqOLk7GBM1aCw6S26qz6GwG2xG40mZmmLTmbUWXRWvXWm0GOwOxzOF1At0eL3enwe3xEv2A-3SgJ2IgJjLBLMh5I5VLhqQK-NEuW4+TRcgxZUqNVxZvSCtBzJJrKhFM51NGE0tRPBpLZ0MpsO5RxO5yR13uT1ewA+X24P0ysmltRkLqZxIhZPZMK58K1SJ1KL4BvERqxpvNOPx9JBruVyc9DqGTrpTUJCbdttVqe2oj2vr5AcFwZF4a1kulWlxCnYiLH7YzE9EeuAAFgi4ul8varOi2v2Fl+CFgABUOppffiWeSmSzmRnrOy+q5JcAUDq0-018Ka7XAAhF2vtMAAODmt8LxXKUxCkVgx3YCN2yKIoQK3AMhHAtgkKg7QYLgmcVGA+ogA", "AAEAjATAdALMBoBZAhgJwNYHNXIGYAIAVAewBcBTAO2wBOAjc1fAQWAEBgAgYHgMB4F9BAkMMH8xE4aLHCOAfADqxADYqAzhQCWldDlyl8i5JnIALZBqL4AzADYADGYAOwADjAAou2HdBABFABADgfWQEASAB-qOAAEmAAVHCU1J4FZTVNch09PENjUwsrQltHF2AAYEVFAElgJVUNbV19ApNzS3VreydXQTZmXGGAAQBKgEyALK5gXgB+Cen5gACeeYAYgBmAWarZnhkBbgi02Q4OMT9gAFAz+6v7659rgGRgABgwsQAkT7FKgJAQMBJcUsCeKdnmkTg9hHcUhw-KJoXCeBDgAAINH7cIAcDhlTBGJxwkBRLmYNB7Au3ypgj8-DYF1pVLYMQOIOxlO+PlZwA59JBpIeQA", "AAEAjATAdALMBIBpATgUwK4C9XIAQGUAHASwDtSBbYgGwCNVgBAJ4VgMFdeeA885D6DOzAKj4AxgAs0xengAqAcSgBJABq4wAZgAMkwsAAowALjAAQFyt8OAKE4AIIc+AB-gL-AAsEZd--VmJSMnK4Sqoa2noGAMAA6nEqwEHSqLI4Ycrqmrr6nJaMAIIAvoQAJQACANlaWsAAkEwA-AAyADMAs62dTQAB+SzGAnzcrq7+MSyC3MCTM9bC01OLi5asANAN-puNgnOrQgLDK8vznJOcuwFCV9d8AKDAj372oMt3QhesTh+sX0IAcF+-xiZ1+S1BPDBzEYMxma2cYPBASAA", "AAEAjATAdALMCwBpA6gAgCIEsDGBrAFgCcCuALgKYBOwAgLcAwGAMN3DMssic8sBAwAKgBlAIIBZVImKVMVVAA0AkitRgAHAAZ8AB2ABMYGF7ABnAJDAAoC0tsTTFgCRgAeAcfPrIWMnTZ8sqqGtp6AMDIyEo+ElIycpSKKkpqWro8NKIAzDkAAgCZ+QBZpqAA-AABDJXVADEAMwCzwGH0AFCgPAIc7A7M9iKx-glJwWl6hsa8ZrbWs-Z9zm5eK7x0g37xgcmpoS2R0RtxAYlBKSHpnJk5WQXFpSA1wE9lDc2tdB3cnN0sPTz-Up0BbArpcVYrBYsUH0GYABGAABhPAjkTxWgwMdD+CZ7FjgJYZhDLBDODYPDDuESeAAIFb4umkloeADgpPxHyZDgENLojCh9Bo9hoAH+RfQTGE+QLgWw6GLSg4BVzPEA", "AAEAjATAdALMAIBZArgZwBYYIYGsAEAKgE5YCWAdgKZHACAwAQMMwGDPusfshccv1c2vHry70AWACUA9gCNkRPAAlqWNADNpRACbVqeMAA4ADOgAOwAGjAwwIQIDAXAFAJ2AGDqiuAf5-AAJGAACG8w8OYJGXlFFRINLV0ifSNTCwcAdQyASWApOQVlVQSdPUVU83YmWgBBAATmAAEABvYAUEYAfnUezoAA5n72J3oAClBI+idgPwjvJmYOueWuBYi1rwFgAFxAxg4t3i36Q65p5gBIFf3L644l70OeU5WRBy3Qu-PeAHBr7++dxm-hOjHo-COdFooNmawWAheQPCQA", "AAEAjATAdALMBIBlA9gO1QU1QKwCcHMMAnAAgAkBXAWyowBtgBAJlgMGA5eHc85F4GdmANBTosVZABdkpAKIBxMgGYSECAAYAFgAdgAdGABcQcADAAgPDAAkJwAQpwfAD-AX+DCETn744ixTFRJGXklVXVtPQBwAAUASzQMYk9AiWlZEkUVNU1dQQBBAAKOAAESjgAgUAB+AACOGoAzFvrOauYIUCFzb1NmXgGWIf4OCzHeoYsprmBq6c4Fqt52DuAAGGBHAWZmTe3ece7Bnt8j236-Oz9TAFBfZmiOUdmhm96Hd8OfJ5vmc6WPhcLh8u3MzFYb38TCG-1m8KhXy+QA", "AAEAjATAdALMCoAlAlgF1QUwE4AICyA9gCYYA2OAggEIAWOAogK6kbACA7wXAYF3z-z4hBIzgBQAygGMaWDMgBG2HABUoASQAaOMADYADDQAOwAMjAAuKC4dgAIEEAIYAFg+ASFFeuABGBjvQMCOSRk5RWU1LR0DY2AAYAB1RPV-aVl5JVwo7T1DEy4HNgoAQIBMgCyAATLK4E82AH4AZwBmVsaAAK5GgBiAGYBZ+04APGt+B2AAf+nAqZF4viWg0RXVwXXOBb8AKE5RAHhgfc3lwVsD7y2Gjf5PO-4AUGD6rmFLm28AcEX+Z0eCR+jy2W0BIg4U24HE+MM4HFmIy8n3BqyAA", "AAEAjATAdALMBwBBANgIwE4FMDGALALgAQDSArgOabLACAwAQMEwGBNsvtsifus9+duPTnQDIAWUwBLTOkIB1KQDsAJrlKrCAdgAMuAA7AAqMAC4wur2ABgNreGcA4G2fOH7j7WATpshcrUNFW09Q2t5eQBJb0kZOUVVdU1dAxEAAQBJgEyALLSAALY6EAB+LNySgDKAM2qSgBkAGYBZ4SEi4DdPEQ72extuiyGOy2AAFGAAGB5GB1HZ937gAEhBplHVtfYAUA9R0GEFwaWACC2mJactpcvznrZmOn2nrzoAf7eGd3277qA", "AAEAjATAdALMC4AxANgVwOYC8CmGDu2ATgGYAuAtAHK4DOpAhgCakAEA0gPaE32HACAwAEDBRAMFGTxUySBlSJ8xTLnyZggAgBRAJYA7Gl1YBZAEoswAVgAMACwAOwAFgI1gqQHBgASEkBoNXkAYAB-kOAAeGAAVEC4+NFNXQMjFjMLGwdgIIB1HIBJYG19Q0ITcys7R1EAUAEAQTwAHQBKAAEAAslffgB+AHEAOoAUXuJx3oAYgBmAWbVVSUEghOBlRIFhGRFRRdX4nYTDzcOAJGAAuIBEC+DZdSWEle6t-Ze3qTq4wXc5d0fRMdAs9RAAID6iEHyLxvKFQiHyERBQRif6Pfj-TGBHYSDFSH74sKbB7EhFvIA", "AAEAjATAdALMCwBpATgUwK4C9XIAQC1UBjAa1WAEBLgaAwGhuxhkZt6gJACEcAXACwCGuAGJgwANgm5IABn4AHYAAxgAXHZVGACGABgBgFB2bAOAB-88AAwwANAnHTmlW58ho8VJkR5SvQDqAQCSwG7IAsJiktJyiswUAIIAaABmqQACAAkMVLQA-AAxADMAs-kAATSVjqyMVKbOmtRaDABADAZNbB1NvS7A-QBQwACQTiPjzF36CbnUA4wzY4PdjFNrRk5UWqytm0s6B7MmjWvLy8dzenn7AxStj453V05AA", "AAEAjATAdALMCIBZAhgJwNYHNXIGYAIBlAF1QFMBLYs1YAQHuCYDAm2X22ROfGB0AEoALAPYA7ZPkQjiI1ACNkAV3wAtMGHwAOAAxCADsABIwALjAAQEwaN23ABBdevAP8vgjgFDOfv68EFRCSkZOUUVdU1dA2AAYAB1eIBJAOFxSWlZBWU1DW09QyYrOgBBKFxcAAEABLYASHoAfgAApha21ududhs3X1jnKyK-YZGh-3GGxx8pngGmebYbWxX2ReAG5ZGmBu3OAFBfBhtuznWR9em9uJ8AcGv18+ueBiHmZZtjnputzl-nkZAA", "AAEAjATAdALMAIBZAlgFwM4GMAWBTATgAQCSA4oQEIC0A7ABzACAwAQMOwGDveffPsgeQrkOAihg0UObwAosgB26APb5UhRIkJgYABmwAHYACxgAXCn9uAcGABIbgGgpogMAB-98ABwwACgugUHsMvJKquqa2nqGwK4A6vHECGEqahpaOvpG7ACgTACCANYAoQD4AAIABdwOjAD8pAB1fvUAZh31ADEAMwCzUpJ8cdyuwcPMVuxsAkzS8zxTrHOLQixWXDPAAJjAAPBBuwdCY7OrIRMnPA6n47V3ovmBk7NLVk9Bt8AAEA+jgbYHl8vn9LMsxEs5lNGJ4VudIaDgkA", "AAEAjATAdALMCoBZAPwG1QUwE4AICiAHgA7YCWAthgHYAuAhqjgMzACAbwnAYJ7937xADhHACgBlAMYALLBlIAjbDgDyUAGoBJTTgCsABmlFgo4AFwOl9nwDAwAKC87I4QH-XD4AAgXvv53YJGTlFZTUtHQMjYBsAdVjNEylZeSVccO09Q2NOACA2AEFeAAEAbKYWAHA2AH4AGQAZgFmagADONt8hPmt3fxd8vP7gQf9c6w4JgDhvYQm53nYlkWdOAEhhgN4Nzb5HX3nugVX5l1XZ3Zjfas3z88uDh8ugA", "AAEAjATAdALMDQBlAYgdQATIDYEsAuAXgKYBOwAgBcNQGDX20P0hOtUAoiAxgBYlE4ARqXQAZKADUAklPQAOAAw8ADsAAIwALjAAQNUpUGLABDM2bAP8Bf4KYCQ5x0-3BOvfkJHjpsxSuAAwKioUq7cfALCJGKSMvJKqtR65ACCAHwAZhkAAgDuAHXswADgFAD8AJkVAFllogAzALNlAAGOLAwGFhZOAeZ6SfQGQ-QDzmPAdGMOpo4zrH3UiyMuvQwOw870DlusAKBOlAYdTMu7Z7O7S46lV2dnV86bj1dAA", "AAEAjATAdALMDIBlAYgdQLQCUCGAXAFgKYB22ArgAQByAlgLYBGZAzsAIDvBcBgXfP-PiEEjOAFEQBjfACdCNBoRkUAMlABqASU0UAHAAZ8AB2AAEYAFxgAIC4dO-YQAgho0QH+Av8BcBINwGBdsAS0nIKSqoa2nqGJgDAqKiaIVKy8orKalo6BsZ8tmwAggB8AGZlAAIA7gB1YsAA4OwA-ACZbQBZLSoAMwCzLQABAcL89u7uwPFBIrZcM7NLHPPAAJjAAHBNbhvbzXyLoGwc9pyrbkfA-ldL-kuCAKCBp1zCZw+Cixwun9MBByWV1uf0EHHMwG4H2CHzYkwcomhoKCQA", "AAEAjATAdALMCwAVApgSwMYAtkCcAEAYgK5YDOwAgJcDQGA0N2MMhXPNUBIAsmrngHkyeCHjAA2AAyYADsAAYwALjtqjAFDAAwAwAwq9gHAA-wD-gABGAAUA3fs0uvVPyGZSIsVNnaA6r4BJYB4+fDcPUQlpOUYKAEEAEIAZgFmAAQAEhipaAH5fdQBeXIBmMtyATIqALNUQDmBDB1U2YAAgZg6aHWb2VtjGei7gfQBIezH2Hu0Gxwdp4HHe5iWHfuAAUGbNUDVs5e7GAAgDw4Mm5YWFu2NjOyoqLRz16go3hlu9vtOfoA", "AAEAjATAdALMCIB1ApgSwM7oASIE4EMBjAawCN9d1CALYAQHsYDBhW3gX3WQvfGAMAErUA9gDt8WALIiALiNzkArlgBakLGDAAGagAdgAFGABcYAGBWDRuxYAINgHA+fAP+vgAaGAAEF-4CrYCFRCWk5BWU1DS1dA3NERABJYOFxSRl5RXwVdQhNHX02ACB6AEEDYAABAAK2AEh6AH4AGQAZgFmmgADWHv8edmt3ANK+MYtAlwnR9kseBhYWayGONa4GRfW5xh4AUF5BydWggMsGmymLq64D-03uS5uuc9YHZ+O+ZxvzFdePvgMX4cFZsTYrFYzDYAj5AA", "AAEAjATAdALMAYAhATgQwK4DsAEBxAgtgOS7oA2qAzgMYAWA1qpgPaYCmRwAgMAEDACAYAJFDRIkONHCpM8ZKnieAFADKdZGwCWAIzbJsAeSgA1AJJnsAVgAMtAA7BlwALjcBPd6IDAwAKAivopSAP8h-sAAEMExsR5O6rSauvpGphbWdo7eAOo5Zgka2noGxuaWtg4i-Fz4IgACANkAzM3AAODcAPwAMgAzALNdAAECIzEKIp5hUVxz4kFeAvwCAXHriosbgaI8K8AA2MAA8LEAyMAAUFKTk-H3MVsAkMBbGy-bomvBPJ6Snp8FqJooDfL8JB1Pls3oCfrDAUA", "AAEAjATAdALMBoAlAlgF1QUwE4AICyA9gCYYA2OAGjgEQBiAhqQNYbXACAHw3AYN952B9+-EFxETOALABCWDGgBGAVwDOAYwAWOADLJFZUhhwByAMwQADJoAOJ4AHRgAXHH8AwBIDQwAFD9-CSDuAH+AT5dgABxg2LjJYFl5JTUtXX1DY3MrW3t3AHV8gElEuQVUFQ1tPQNSI1MLazt+TnYAQQA2gF4ARwABAFibABLgAEgOAH4AcoA6gBRJgBiAGYBZgD4ATK2ALOCxEU9gEJD41qCAIA94uMEEluBr7gBYcbcJABh3iWPgP4Ej3iAImz1uIgm4KCAFBzuIxGCoUEAQAIJE3WIAcHRAIB6OCnHcnB490e7Au90RD3x6KAA", "AAEAjATAdALMBIA3A9gOwAQFlkCcDmAphgOoCGANgNYA-OBwAgI8CwGAsducchPfdMAyAGUAgpnQBpAK44AlgRzoAGsvQQADBoAWAB2AAcYAFxmnAEDcAEMADAHG-34BIAP+vgAFGAAEJ-4CBYBFxKVkFJVV1LT07YmIASWCxCRl5RRU1TR19TgZRAGYigAEASoBMgCzgSxAAfgAYgBmAWbqAAJYOgJBuS2dArjyOPg5LFnsWUamglnGzEbHOdkngAHhgAGhAmwAoflG9-lXe4ZnA1eABwadrvsGAUECmfdAF-lOLzhtLdhvL7gAcBuHEuAJB03czFsTFY0xmDCYSKW-nhIPRwCAA", "AAEAjATAdALMCEAJArgcwPYHIDOACAsgKYAuAhgDbkCW2AxgBaF4BSpqAJgGbloBehaeMACAI4OIBg48aOBTp0kAuXTRAdABChAE7F6pXADEwMAGyncAHYBGO3GAAcABnoAHYAAxgAXBViFADDAAMDSAJB+KmEA-wC-wABIwADIkWnpMsCaOnoGxmYWNnaOLu7BAOrlAJJZWrr6RibmVrba9s5uysIAgu7AAAIAKbwAh2ISAPzYAMzTE5wL8wt+SgqiEX6ycv5iolvioQc7mWvKAEDHlxfhYgCgwADwwBHXR5FbH36H4hsZUX9+e4KVYrS77P7fYAACABCkhygA4LCQnC-uDlNFomJgqIJOi9p9xK8VOjkX8gA", "AAEAjATAdALMAYBlA9gO1QU1QKwCcHMMAnAAkQwEsAXLAdwtQBNjgBANjgMGB9+G748QgkRwBIAIWJUAFgEMSAMTAwAbKpJgA7AAYZABwTAAuKPZ8AMMADAvAJCiRACAD-AP+ABEYAGRH-gJ52SWl5JRV1TV0DGwB1WIBJYBCiWQVlNQ1tPUM+VgBBXIABABSALwBDrgB+ADN6uoaAAP9hPOAnQLNeWz4AIB6bDh5bcyGx9lHeMf5QXk6AcADhJcEBoWBVvl6OzZE24HXp44Cd4Ad+rvOrkQBQAMmNmeGbs86bkf8trrOzj+7rOxOM8OKwJrwjiIQf9AkA", "AAEAjATAdALMCIAVApgKwIYGcAEBJAdgC7IBOAxsgA6ED2JwAgI8wGDDsfBufsg--MAhADl0hAJY186ADbIcAWRq0SAIwA-JGtgBKAWjBgAnAAZshkwAtKwABjAwzJwCAebAJAcAUAN9MA0MAA8L6hYUzwAIIyEoQArgAmyNiIllqEhHIOqeI4yPgA5uL4yZZY2ISWyQDqAKIACthxlAUk6EnYYtjRsYny2CZ6RlBCohJSsv1KKhpaugbGZhbWwADA1dW4wCJiktJyisp0s9r6hqbmYFY27KuMkQB8AGZPAAIAAxyeDAD8ANQAUIA+D8AJmggBZPwAARwmExeDxXMAAP8o-gIta+Pi3OE8THsTHIpx49jE4AAcBJ8GAgXxJKY5MRGNJoTuXzCoU8-CZ-AAoJzQIiCYL+KtMQAIUWcdkCKnS8UcWVY0JogTwtZMFgi5gMDVEjhMnXS0VAA", "AAEAjATAdALMAoBlA9gO1QU1QKwCcHMMAnAAgAkBDASwDMqBnAYwAtgBAd4LgMC75-58QgkZwDoAIWIAXZhRIAxMDABsKkgB2ARsRJgAHAAZmAB2AAMYAFxRHfgBhgAYD4BIUSNcB-gL-AASMAAyB6hYVwckjJyispqmjqkBsZmTgDqaQCSwFFEsvJKqurausmmgmwAgmbAAAIAKQBeAIec3AD89ADMXe00-X39osL8HO7hIhxTggBAfC4uds6cXIt8c2urK8BzfLy7wADQwOOjfMen80IVfEseLm7bE1yXz1wAoGEcAOBcwndvFYPLgACEBWw8vzewOW4NCHCcHG4AM4bGmSwOkzh4KAA", "AAEAjATAdALMBwBBANgIwE4FMDGALALgAQAKAZpgJbLACAwAQLcAGDBvssfshceu-8uPXlzoB0AELoAhgDsAJkQDSAV3QVM6QgA0AagElCYABwAGXAAdgAHGABcEYw4AIYAGB2rkVwDgAf79gACRgAARvCMi2cSk5RUJVdU0dAyMzS3cAdUz9YEkZBWU1DS09QxNzKw4aRABmeoABAEqATIAshlAAfgAAtl7+vu9hdkYfKM5q0a4PNh4POjYF9mWlpmj3da3OReAAFGAAGAmpjcjZtgBIE95r3ZuAUGAniOEee5uOC+AvT+-fP5fT5RRhuOjMD5MGi7GHeJysaG0OjI6oBbZnSHAqJAA", "AAEAjATAdALMAoAVApgSwMYAtkCcAEAygA64BGueAHAHIC0AgsAIDPBsBgbXH3XIvA1vAJYcacvgBCUAJIANPGADMABkxFgAZGABcUGxatuAcGAAoLgAhBNtgFhgABFsuXLYaPEVp8xavXAAMAA6sEyCCKYYqgSeD4KymoabABAzPQAgQCZAFkAAlm5wACQzAD8AM5KSmUAAWxlADEAMwCzgvzchgD-3S5pggNBrjZD-V3AQwAwJQKGwACgwKa8gXy885uCa1ylIwJ7gvMCS64D-Mf7q9zWV2w7giv7gfMPdzYsL8Dsl6xMWyxAUd3iCgA", "AAEAjATAdALMAoBZAhgJwNYHNXIGYAIAVAewBMBTAZwCNiAXc-AYWAEBgAgN4AMGH4G9BAkMMF8xE4aLHD2AIgDqxADYrKDAJYA7dDlx18ANXKotpTZlP4AEvgDMANgAMACwAOwfMAC4sroIAsKACAKiyYgAQAP-RwAAkwACEEalp-ArKahrkOnp4hiZmuRZWqLYOLh7AAMCKigCSwEqq6lq6+oWm5pbWdk5unoKsAIIABfwAAgADAlw8APwAmgCZAFkL9lsLAGW4uLIyc8CR6bLs7GIBwACgZ-diNQ-CTwLs1-DAAHBpnz8vIjkb3OAle-AAkJxnuxIWlLsI7ql3vxREcxAAoJH8V7sU7PWqpADgzzBBPS8NksShNXYPApGTY8KZEQCfFYFwu3DeVPpXN5+PSQA", "AAEAjATAdALMAIA3A9gOwAQFlkCcDmAphgAoBmBOAJsAIDADgwAwMAGDAd0fse+h+8WrLlzYCOIcczYjePAZPFDeo+X0VT5qqRo4AoOSsPjdArcYVSBAIGAB0AEIUALgAsAhugBiEAAwAOX3QAHYAjCnQIAHZfVwAHYABMYABcKVs+AFhpDgB4KwEAaAB-gF-gAGxgACwCurq6RxcPbz9AkPCcSJj45gB1PoBJeyccN08fAKCwiOjYhL4aAEEAXIBMgCyAATXN2mAACAB+AACOI8TNo92NnRtgADQ5UT52USaxlsn2ma653uSaXEGV42RYeXqHBK5SqtUh8KMH3GrSmHVmPQSTAGwyRXza0063XmAmW622N32xzOwAuVwpJnuTzowk09044hewBBABR9osSQL+UKjML2aK+SLJWKpRLpXLZQqWJzlQJweyQahgAAqOqanWq3imEEgqxq4AASGAABgEbxLbbeABQBrqYAGKzEUCcvhmg4OnKWRgIs1m-0GjIsmhRui2F40YrFLkMiPR2gx2XxxMmjjOiP7USxxYJpNmeVhupAA", "AAEAjATAdArMDwA3A9gOwAQFlkCcDmAphgPKE7ACAlwNAYDTVcPQwyKxw1QEgBCBOAC4ALAIboAYmAAsANlnowAdgAMwgA7AAGMAC4naqwAwwAMAMAkAc4AIAP8A-4AERgAZGuevjYHwEjxKTkFZTVNUwB1CIBJX34hMUkZeUVVDQ4KAEFNYAABABSALwBD6loAfgAzaqqagADPdlYqGy4fJmZDag7Wcxom70GAIEHgEYZ6ceArVs8AaGAAKDHehj62ny916YYpwatRjgBQLyo+9h7D1YZZq+2OAHA7jvurzioAFCpaS+6qf5WPSBbxBQA", "AAEAjATAdArMAIARATgTwIYBMAEB7AZtgBLoB2yAlrgC7B0CAdwAYE2623SJz8IwCgBlAMYALXABsAXtgAyAVzEBnbAA1sYMAAZRAB2ABMYAFxejNgFBgVuh16cA-w+ABoBPY+eGwIWMkyFZTUNbT1gAGAAdUiASR8RcWk5RVEVdU0dfW96AEEcgEyALIABAGyAZnLrYAAgAH5ZABmAWbr8drqAGJbebjZzJy97GqZw4ABwTkm2aaZGWe8mVjGxgAgJ+zHWOzmI0H3OMboj3cWPE+AASD4hzmvbzht7ea4bh94L9fe9+wWvcPMP2+XkBwNuQA", "AAEAjATAdArMD4AVAFgewE4GcAuBDAJgAQDKYAshAEaEBExAxsugKb0DWzAdpgOa7c1gAQGAAgYBIBgEmVNkyQI+VKWzpykMuUiAKACF0-fNkIAFXNnQBLVCYhgADMgAOwAHjAAuFvGyA0MAAwDIACFrKAOAA-wB-wACowADY4alpEroGRibmljZ2ji5BAOrFAJLA+oacxmYW1raE9k6uskIAggAxEgACAC0AMwCzwsCSAPwAZABm0+MAzIvjAJnLAFlamrLiETK+GamqqhJboOnnEsEX8lcH+wAwwABQaY8vNzK34iIi++G3wAAkGJrjJgaCZABQNIiK6aP6gpQAgAQEKCqV212CSLRqWCAGQRJJjhJvj9hFEoqMfCpRkJycchJTqW1gAAkWks74yETMkms3HXIA", "AAEAjATAdArMBwBlALgJwIYH2CmA7A1gCcC2ADgGbarACAtwDAYAy06yyO1-QNADqUAPJQwAAjAwADAAtSwACjAAuKAZ1gAIHYBwYDxYAIbtwD-J4AHhgAJGN37avQOFiJMuQGA+fAJJOhIuJSsixaNACCABEAMwCzAAIAOXHAAJC0APwAAQzZuTnGnKxawGbAHsYV3CXl9KzqLA0MYexNmg3pWgCgwACwacY9+unsVbX1jQ5jAw7c6W2zPXZ0JZwLs6zTRhXTdrusuhvjDPtHXOp0jAt0NA00ZWM1jmcvwEA", "AAEAjATAdArMAwBZAhgJwK4BcAEAlZAlgCYCmqwAgMAEDB0BgdTDzTIrzjHXr7HrVACgBlAIKJsAaXSoCZbAA0AkkuxgYABgAWAB2ABMYAFx+VZgAhgAYCaX+rHgHhgz+2-eVgI8VJlzUiipqmrrWAOphSl5iEtKy8sqq6tp6zBSiAMxZAAIAmbkAWTSgAPwAAXTllQAxADMAs-x8TFQ8bm2eVGZMtHTsNt0DTEN0I55j3cAA4MV0AJDACwJMANCLHDZ03duzbpvzHmmeS4esAKDuk+yTHgBQG912p6NuM8-71s+HtCCtN507Lb2XqMChdLqeFoAf6hu16Zn+X0OQA", "AAEAjATAdArMCIARAYgIQASoDYEsAuAXgOYCmA7vniQE7ACAwAQMCwGAsduccj3df92-Xv27MAKAGUAxgAsA9lgLoAMgFc5AZ3QANdGDAAGWQAdgATGABcUQ04BQYI4GjuAf7fAA0MAAIrgMCWBik5RWV1LV19I1NgAGAAdUSASWBQhSVVDVltPQNjM2D6AEESgEyALIABAGyAZnqnJgB+FQAZgFmWgDM+loAYrtERDjsPYCFXO3SZTIicvJjCi2tbbkdnSaCOCZ9-HcOx2bCsyNzogrik1JP57Kj82KK+OjKqusbmxjau3v6hp0Rtxxp4pusxBx4kdITtmHZ2MwWAA4YAAWECqIx3GhLFGxRYSL4BISnAAkEwYQwKTCOFt1nZRkTaaSOAAIFm40QAcBhXNZLOB8QYrBmxzoMzoEzF5JFMteYulnBm8Dl-AYEuJoC1sPYEslOqlnnldnlgoCQA", "AAEAjATAdArMBwBpAWgWggAgLIEMB2A5gK4DOALgKZ7ACAwAQMEwGBNsvtsifus9+duPTnQCoAZQDGACwBOFAJYAjCrIwAZKAA0AkgDUMYAGwAGaQAdgABGABcYHzq1OAKGAAINgEhhwgP8Av9bAAMi+4RFMYlJyiipqmroGxmaWAMAA6hk6wBIy8sqqGtr6hqYWbIw0AIIAfQBm9QACAO4AdQAowADgDAD8AJkDAFl96gAzALN9AAHhQmxOfn4RjMJroJFbTBur7HQbADDAPuEA0Cc8aWzX+4uRt0w+Ttt0p9vsAKARdE7cLzwFkwgUxHh4Pjdwr0og92GCIetgGk6MwATCaC8Xrt2GtWBjaL9nItlkS7qSER8gA", "AAEAjATAdArMBIAlApgIwK4EsA2AXABADICy+ARAGqYAOyATmcAIDPBsBgbXH3XIvA1vABC9XAAsAhvgBiYACwA2RfjAB2AAzjqwABjAAuIJbcAMMADAXAJCCBACAD-AP+ABEYAGQ7P32xYiYlKyCsqqmtqWAOpRAJIIonQS0nJKKupaOtxMAIJZAAIAKQBeAIes7AD8AGa1NXUAAT782cD2XABAflwsJrxdbFZWfcNco2xdVtxTndwA4MCTwACwwLYD-pbAANBtAjMti6wsG3Yza6zdm7ZXvACgvn2gl7f73O2vW3YLt+fnAk8BI5HD1Fix2IDjn0mMCjnZIZ8-EA", "AAEAjATAdArMAwAZAlgIwKYBtPoAQBUoAOAdmAEAKqAwYO+4WhukZtqgDACUALAewB2AQ1wBZPgBc+AJ1RCArrgBakXGDAAGHgAdgAFGABcYAGA6lKg1oAIegHB27AP9PgAaGAAERz9-ng3PzCYpIycooqEGqaOqYA6nEAkgG8giLiUrIKyqrqWrp0AEAUAIIFAAIABfQAkBQA-IgAMwCz9QABdB0+rAwWLsDF7ENsI2b+fcwWg-TTEzP0tCO2DlP0K6OzW-4jjuN0dZN+wIfHzACgvnOsc2fM+8C2d3QPzKtnD693A-6UJpTUW5UcjTcgDXZrZ5Q4BAA", "AAEAjATAdArMCIBZAhgVwM7oAQC0C0AnDFgAoAWAbwHYCWAHsAIBPADAwAYMNz57zyG7N+PZgDQASgHt0AUwBus5ACcsAQSoBrKaiwAhLGAAcABjIAHYAGxgYEW34AoYAAgeASHtfmAJGBivQKChf2k5RRV1LR19Q1MLNgB1RIBJUJkFJVUNbV0DYzNLEMY1ADkAM3KAAQBS8wAS4E9GAH5K8paAZoBmbrbK4AAgIYF+dmAAf4mRYRZZnnGHYPth5dWQ9a5PQIA4JpFF9ZDjwMX95ZFtniPAgFAg5kFQEYuvM7duJ+D2G+4AcFebEYwjOgPszFYzA482Ks1m6xhMLByyAA"]}`),e=JSON.parse(String.raw`[{"name":"Theler Kobra MD","cost":37,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":2,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":22,"Toughness":10,"Structure":51,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Kreuzer Spinne M3","cost":32,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"3","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":109,"HandlingFull":108,"HandlingFullwBombs":108,"MaxStrain":21,"Toughness":16,"Structure":60,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Ritter Model F \"Singvogel\"","cost":28,"upkeep":1,"bomb_mass":5,"escape":"2","crash":"-1","stress":"3","DryMP":4,"WetMP":5,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":12,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":8,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-6,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":99,"MaxStrain":24,"Toughness":7,"Structure":38,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":4},{"name":"Markgraf Zerstörer B","cost":32,"upkeep":2,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":7,"WetMP":8,"WetMPwBombs":10,"DPEmpty":20,"DPFull":20,"DPwBombs":22,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":5,"StallSpeedFull":5,"StallSpeedFullwBombs":7,"Overspeed":28,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":1,"HandlingEmpty":91,"HandlingFull":90,"HandlingFullwBombs":88,"MaxStrain":26,"Toughness":10,"Structure":52,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Theler Drachen","cost":6,"upkeep":0,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"1, 0","DryMP":3,"WetMP":3,"WetMPwBombs":3,"DPEmpty":16,"DPFull":16,"DPwBombs":16,"MaxSpeedEmpty":10,"MaxSpeedFull":10,"MaxSpeedwBombs":10,"StallSpeedEmpty":2,"StallSpeedFull":2,"StallSpeedFullwBombs":2,"Overspeed":21,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":4,"Stabiilty":1,"HandlingEmpty":91,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":3,"RateOfClimbwBombs":3},{"name":"Living Grove (Farman)","cost":24,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":20,"Toughness":9,"Structure":45,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Rathenau 7k","cost":14,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":3,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":19,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":9,"Stabiilty":-2,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":20,"Toughness":7,"Structure":36,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":9,"RateOfClimbwBombs":6},{"name":"Braun VJ","cost":13,"upkeep":1,"bomb_mass":0,"escape":"0/0","crash":"-1/-1","stress":"1, 0","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":21,"MaxSpeedFull":21,"MaxSpeedwBombs":21,"StallSpeedEmpty":7,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":23,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":-1,"HandlingEmpty":79,"HandlingFull":77,"HandlingFullwBombs":77,"MaxStrain":20,"Toughness":6,"Structure":32,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":12,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":5,"RateOfClimbwBombs":3},{"name":"KW-S1","cost":29,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":17,"DPFull":17,"DPwBombs":17,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":-1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":32,"Toughness":11,"Structure":56,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":3,"RateOfClimbwBombs":3},{"name":"KW-S4","cost":42,"upkeep":2,"bomb_mass":0,"escape":"2/-3","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":42,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":-3,"HandlingEmpty":96,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":31,"Toughness":22,"Structure":51,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Ritter Model D \"SeePfau\"","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-2,"HandlingEmpty":103,"HandlingFull":102,"HandlingFullwBombs":102,"MaxStrain":26,"Toughness":5,"Structure":28,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Teicher Möwe 13S-J","cost":43,"upkeep":1,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"1(0), 1(0)","DryMP":7,"WetMP":9,"WetMPwBombs":11,"DPEmpty":18,"DPFull":18,"DPwBombs":20,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":13,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":8,"Overspeed":24,"BoostEmpty":2,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":8,"Stabiilty":0,"HandlingEmpty":97,"HandlingFull":95,"HandlingFullwBombs":93,"MaxStrain":38,"Toughness":31,"Structure":80,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":13,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":1},{"name":"Ritter \"Ersatz S\"","cost":25,"upkeep":2,"bomb_mass":0,"escape":"3","crash":"-1","stress":"3","DryMP":4,"WetMP":6,"WetMPwBombs":6,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":5,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":21,"BoostEmpty":5,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":11,"Stabiilty":-7,"HandlingEmpty":102,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":23,"Toughness":8,"Structure":43,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":9,"RateOfClimbwBombs":6},{"name":"Kreuzer Spinne V8","cost":29,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":28,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":11,"Stabiilty":-1,"HandlingEmpty":108,"HandlingFull":107,"HandlingFullwBombs":107,"MaxStrain":21,"Toughness":16,"Structure":60,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":7,"RateOfClimbEmpty":9,"RateOfClimbwBombs":7},{"name":"Hugo's Ganzmetall Wunderflugzeug!","cost":43,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"1","DryMP":7,"WetMP":8,"WetMPwBombs":8,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":1,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":8,"Stabiilty":-1,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":49,"Toughness":51,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"L&L Kessel IIb","cost":30,"upkeep":2,"bomb_mass":5,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":8,"WetMPwBombs":9,"DPEmpty":22,"DPFull":22,"DPwBombs":23,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":13,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":6,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":0,"HandlingEmpty":94,"HandlingFull":92,"HandlingFullwBombs":91,"MaxStrain":36,"Toughness":10,"Structure":52,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Ajeet Interceptor","cost":24,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-1,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":94,"MaxStrain":33,"Toughness":7,"Structure":35,"EnergyLoss":2,"EnergyLosswBombs":3,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":8,"RateOfClimbEmpty":10,"RateOfClimbwBombs":8},{"name":"Shamsher Interceptor","cost":23,"upkeep":1,"bomb_mass":10,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":13,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":10,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":6,"Stabiilty":-2,"HandlingEmpty":100,"HandlingFull":99,"HandlingFullwBombs":97,"MaxStrain":35,"Toughness":7,"Structure":35,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":2},{"name":"Bahadur Escort","cost":39,"upkeep":2,"bomb_mass":0,"escape":"2","crash":"0","stress":"1","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":101,"HandlingFull":99,"HandlingFullwBombs":99,"MaxStrain":22,"Toughness":21,"Structure":39,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Cheetal Fighter","cost":37,"upkeep":2,"bomb_mass":0,"escape":"0/0","crash":"0/0","stress":"2, 0","DryMP":5,"WetMP":8,"WetMPwBombs":8,"DPEmpty":19,"DPFull":19,"DPwBombs":19,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":4,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":21,"BoostEmpty":4,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":94,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":41,"Toughness":9,"Structure":49,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":13,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":5,"RateOfClimbwBombs":3},{"name":"Markgraf Attentäter C","cost":32,"upkeep":2,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":7,"WetMP":8,"WetMPwBombs":8,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":7,"StallSpeedFull":9,"StallSpeedFullwBombs":9,"Overspeed":42,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-4,"HandlingEmpty":94,"HandlingFull":93,"HandlingFullwBombs":93,"MaxStrain":28,"Toughness":7,"Structure":35,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Königskondor L.1","cost":70,"upkeep":1,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":48,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":13,"Stabiilty":1,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":34,"Toughness":21,"Structure":55,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Von Morgen Vampyr","cost":41,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":2,"HandlingEmpty":96,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":51,"Toughness":21,"Structure":67,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Hugo's Einzigartiger Stahl-Jagdbomber!","cost":65,"upkeep":1,"bomb_mass":5,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":9,"WetMP":10,"WetMPwBombs":11,"DPEmpty":16,"DPFull":16,"DPwBombs":17,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":16,"StallSpeedEmpty":8,"StallSpeedFull":9,"StallSpeedFullwBombs":10,"Overspeed":36,"BoostEmpty":2,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":6,"Stabiilty":-2,"HandlingEmpty":93,"HandlingFull":92,"HandlingFullwBombs":91,"MaxStrain":49,"Toughness":50,"Structure":60,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":2,"RateOfClimbwBombs":2},{"name":"Theler Kobra MB","cost":32,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":1,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":94,"MaxStrain":30,"Toughness":12,"Structure":61,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Kreuzer Skorpion","cost":33,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":6,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-3,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":37,"Toughness":15,"Structure":45,"EnergyLoss":2,"EnergyLosswBombs":3,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"KW Adler N","cost":25,"upkeep":1,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":37,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":30,"Toughness":7,"Structure":38,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Markgraf Volksfestung A","cost":70,"upkeep":7,"bomb_mass":30,"escape":"2/2/2/2/2","crash":"-1/-1/-1/-1/-1","stress":"2(0), 2(0), 0, 0, 0","DryMP":17,"WetMP":23,"WetMPwBombs":29,"DPEmpty":65,"DPFull":65,"DPwBombs":65,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":32,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":3,"HandlingEmpty":71,"HandlingFull":65,"HandlingFullwBombs":59,"MaxStrain":28,"Toughness":21,"Structure":107,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Arntwerke c.7","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":-2,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Mitscher IG J-79SF","cost":11,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":2,"WetMP":3,"WetMPwBombs":3,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":20,"BoostEmpty":5,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":8,"Stabiilty":-6,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":25,"Toughness":5,"Structure":38,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":7,"RateOfClimbEmpty":10,"RateOfClimbwBombs":7},{"name":"Recht Luftschlepper","cost":22,"upkeep":1,"bomb_mass":10,"escape":"0/0","crash":"-1/-1","stress":"2, 0","DryMP":5,"WetMP":6,"WetMPwBombs":8,"DPEmpty":25,"DPFull":25,"DPwBombs":27,"MaxSpeedEmpty":12,"MaxSpeedFull":12,"MaxSpeedwBombs":11,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":4,"Overspeed":28,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-4,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":94,"MaxStrain":46,"Toughness":10,"Structure":52,"EnergyLoss":9,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":15,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":1},{"name":"Ritter Model Cj \"Spatz\"","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":0,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":26,"Toughness":8,"Structure":40,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Theler Zweihander","cost":40,"upkeep":1,"bomb_mass":0,"escape":"-2","crash":"-1","stress":"0","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":7,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":24,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":3,"HandlingEmpty":100,"HandlingFull":99,"HandlingFullwBombs":99,"MaxStrain":33,"Toughness":21,"Structure":33,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Mitscher IG J-83 Geistliche","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2/0","crash":"-1/-1","stress":"1, 1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":23,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":2,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":94,"MaxStrain":38,"Toughness":9,"Structure":47,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":10,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Arntwerke d.13","cost":24,"upkeep":1,"bomb_mass":10,"escape":"0/0/0","crash":"-1/-1/-1","stress":"3, 1, 1","DryMP":6,"WetMP":8,"WetMPwBombs":10,"DPEmpty":22,"DPFull":22,"DPwBombs":23,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":12,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":8,"Overspeed":18,"BoostEmpty":2,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":5,"Stabiilty":-9,"HandlingEmpty":105,"HandlingFull":103,"HandlingFullwBombs":101,"MaxStrain":45,"Toughness":10,"Structure":53,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":12,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":2,"RateOfClimbwBombs":1},{"name":"Rathenau-9c","cost":13,"upkeep":1,"bomb_mass":5,"escape":"2","crash":"-1","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":5,"DPEmpty":9,"DPFull":9,"DPwBombs":10,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":8,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-1,"HandlingEmpty":105,"HandlingFull":104,"HandlingFullwBombs":103,"MaxStrain":25,"Toughness":6,"Structure":30,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":7,"RateOfClimbEmpty":9,"RateOfClimbwBombs":5},{"name":"Gernsback 0012","cost":52,"upkeep":2,"bomb_mass":0,"escape":"-2","crash":"-1","stress":"0","DryMP":6,"WetMP":8,"WetMPwBombs":8,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":8,"StallSpeedFull":11,"StallSpeedFullwBombs":11,"Overspeed":32,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":13,"Stabiilty":0,"HandlingEmpty":102,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":32,"Toughness":11,"Structure":38,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":12,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Gegenbeispeil","cost":34,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-8,"HandlingEmpty":103,"HandlingFull":102,"HandlingFullwBombs":102,"MaxStrain":32,"Toughness":24,"Structure":62,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Universität Kobra M01","cost":34,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-2","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":3,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":30,"Toughness":13,"Structure":65,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":7,"RateOfClimbwBombs":6},{"name":"Teicher Schnelles Mammut","cost":64,"upkeep":10,"bomb_mass":20,"escape":"0/2/2","crash":"-1/-1/-1","stress":"7, 6, 6","DryMP":12,"WetMP":22,"WetMPwBombs":26,"DPEmpty":45,"DPFull":45,"DPwBombs":45,"MaxSpeedEmpty":0,"MaxSpeedFull":0,"MaxSpeedwBombs":0,"StallSpeedEmpty":2,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":100,"BoostEmpty":0,"BoostFull":0,"BoostFullwBombs":0,"Dropoff":0,"Stabiilty":3,"HandlingEmpty":67,"HandlingFull":57,"HandlingFullwBombs":53,"MaxStrain":34,"Toughness":16,"Structure":80,"EnergyLoss":9,"EnergyLosswBombs":10,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":5,"ControlStress":2,"RumbleStress":6,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Rathenau-16d","cost":28,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":7,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":19,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":3,"HandlingEmpty":103,"HandlingFull":102,"HandlingFullwBombs":102,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Braun DC \"Puma\"","cost":31,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":3,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":3,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":36,"BoostEmpty":5,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":13,"Stabiilty":1,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":22,"Toughness":11,"Structure":55,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":10,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":9,"RateOfClimbEmpty":15,"RateOfClimbwBombs":9},{"name":"Ritter Model S \"Fink\"","cost":38,"upkeep":2,"bomb_mass":5,"escape":"2","crash":"-1","stress":"3","DryMP":5,"WetMP":7,"WetMPwBombs":8,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":8,"Overspeed":21,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":-6,"HandlingEmpty":99,"HandlingFull":97,"HandlingFullwBombs":96,"MaxStrain":43,"Toughness":8,"Structure":43,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":4},{"name":"Theler Eklipse","cost":60,"upkeep":5,"bomb_mass":20,"escape":"2/2/2","crash":"-1/-1/-1","stress":"2, 0, 0","DryMP":16,"WetMP":20,"WetMPwBombs":24,"DPEmpty":41,"DPFull":41,"DPwBombs":45,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":7,"Overspeed":26,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":1,"HandlingEmpty":70,"HandlingFull":66,"HandlingFullwBombs":62,"MaxStrain":20,"Toughness":20,"Structure":104,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Mitscher IG JA-81","cost":26,"upkeep":1,"bomb_mass":10,"escape":"0/0","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":7,"WetMPwBombs":9,"DPEmpty":21,"DPFull":21,"DPwBombs":23,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":12,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":24,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":7,"Stabiilty":0,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":89,"MaxStrain":43,"Toughness":10,"Structure":52,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":2,"RateOfClimbwBombs":1},{"name":"Arntwerke c.10","cost":14,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-2,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"SAM 99","cost":26,"upkeep":2,"bomb_mass":5,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":22,"MaxSpeedFull":22,"MaxSpeedwBombs":22,"StallSpeedEmpty":8,"StallSpeedFull":10,"StallSpeedFullwBombs":11,"Overspeed":42,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":3,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":95,"MaxStrain":49,"Toughness":11,"Structure":49,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":3,"TurnBleedwBombs":4,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"SAM 1144","cost":60,"upkeep":3,"bomb_mass":10,"escape":"1/1","crash":"-1/-1","stress":"1, 0","DryMP":9,"WetMP":11,"WetMPwBombs":13,"DPEmpty":21,"DPFull":21,"DPwBombs":23,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":18,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":36,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":0,"HandlingEmpty":85,"HandlingFull":83,"HandlingFullwBombs":81,"MaxStrain":39,"Toughness":18,"Structure":64,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":9,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Teicher Mammut","cost":48,"upkeep":6,"bomb_mass":20,"escape":"0/2/2","crash":"-1/-1/-1","stress":"1, 0, 0","DryMP":16,"WetMP":22,"WetMPwBombs":26,"DPEmpty":56,"DPFull":56,"DPwBombs":56,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":29,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":3,"HandlingEmpty":67,"HandlingFull":61,"HandlingFullwBombs":57,"MaxStrain":33,"Toughness":16,"Structure":80,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":17,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Mammut Smuggler Custom","cost":96,"upkeep":7,"bomb_mass":15,"escape":"0/0/0/0","crash":"-1/-1/-1/-1","stress":"2(0), 2(0), 0, 0","DryMP":22,"WetMP":28,"WetMPwBombs":31,"DPEmpty":59,"DPFull":59,"DPwBombs":59,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":7,"Overspeed":29,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":3,"HandlingEmpty":67,"HandlingFull":61,"HandlingFullwBombs":58,"MaxStrain":53,"Toughness":17,"Structure":87,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":17,"ControlStress":3,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Markgraf Totengräber A","cost":40,"upkeep":3,"bomb_mass":0,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":9,"WetMP":11,"WetMPwBombs":11,"DPEmpty":23,"DPFull":23,"DPwBombs":23,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":6,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":28,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":2,"HandlingEmpty":88,"HandlingFull":86,"HandlingFullwBombs":86,"MaxStrain":34,"Toughness":10,"Structure":54,"EnergyLoss":8,"EnergyLosswBombs":9,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Kreuzer Spinnmilbe","cost":41,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"3","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":12,"Stabiilty":-7,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":37,"Toughness":19,"Structure":45,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"KW Dickhäuter","cost":40,"upkeep":3,"bomb_mass":10,"escape":"2","crash":"-1","stress":"1","DryMP":9,"WetMP":11,"WetMPwBombs":13,"DPEmpty":23,"DPFull":23,"DPwBombs":24,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":9,"Overspeed":25,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":91,"HandlingFull":89,"HandlingFullwBombs":87,"MaxStrain":22,"Toughness":9,"Structure":45,"EnergyLoss":8,"EnergyLosswBombs":9,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Mushshak Trainer","cost":20,"upkeep":1,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"2(1), 2(1)","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":22,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":-2,"HandlingEmpty":85,"HandlingFull":84,"HandlingFullwBombs":84,"MaxStrain":22,"Toughness":6,"Structure":34,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":15,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Sonnenjäger Hummel","cost":37,"upkeep":2,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":15,"DPFull":15,"DPwBombs":15,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":34,"BoostEmpty":5,"BoostFull":4,"BoostFullwBombs":4,"Dropoff":7,"Stabiilty":0,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":42,"Toughness":10,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":7,"RateOfClimbwBombs":6},{"name":"Ritter Model ABh Eule","cost":20,"upkeep":1,"bomb_mass":10,"escape":"2","crash":"-1","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":8,"DPEmpty":16,"DPFull":16,"DPwBombs":18,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":6,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":2,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":92,"MaxStrain":21,"Toughness":7,"Structure":37,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Albrecht Kugel","cost":8,"upkeep":0,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"1, 0","DryMP":3,"WetMP":3,"WetMPwBombs":3,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":13,"StallSpeedEmpty":3,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":21,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":-3,"HandlingEmpty":95,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":23,"Toughness":5,"Structure":28,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":4,"RateOfClimbwBombs":4},{"name":"Flugzeugwerft-Neustadt Korsar","cost":22,"upkeep":1,"bomb_mass":5,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":7,"WetMPwBombs":8,"DPEmpty":19,"DPFull":19,"DPwBombs":19,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":13,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":6,"Overspeed":26,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":7,"Stabiilty":1,"HandlingEmpty":93,"HandlingFull":92,"HandlingFullwBombs":91,"MaxStrain":35,"Toughness":9,"Structure":47,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Kreuzer Zecke","cost":12,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":1,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":43,"Toughness":9,"Structure":45,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Markgraf Streiter","cost":11,"upkeep":0,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":3,"WetMP":3,"WetMPwBombs":3,"DPEmpty":9,"DPFull":9,"DPwBombs":9,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":4,"StallSpeedFullwBombs":4,"Overspeed":18,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-1,"HandlingEmpty":104,"HandlingFull":104,"HandlingFullwBombs":104,"MaxStrain":27,"Toughness":7,"Structure":38,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":6,"RateOfClimbwBombs":6},{"name":"Mitscher IG B-78","cost":26,"upkeep":1,"bomb_mass":5,"escape":"0/0","crash":"-1/-1","stress":"2, 0","DryMP":5,"WetMP":6,"WetMPwBombs":7,"DPEmpty":21,"DPFull":21,"DPwBombs":22,"MaxSpeedEmpty":12,"MaxSpeedFull":12,"MaxSpeedwBombs":11,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":26,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-5,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":96,"MaxStrain":40,"Toughness":16,"Structure":80,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Müller Experimental 3","cost":4,"upkeep":0,"bomb_mass":5,"escape":"2","crash":"0","stress":"2","DryMP":2,"WetMP":2,"WetMPwBombs":3,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":10,"MaxSpeedFull":10,"MaxSpeedwBombs":10,"StallSpeedEmpty":3,"StallSpeedFull":3,"StallSpeedFullwBombs":5,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":6,"Stabiilty":0,"HandlingEmpty":100,"HandlingFull":100,"HandlingFullwBombs":99,"MaxStrain":28,"Toughness":5,"Structure":28,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":9,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":5,"RateOfClimbwBombs":3},{"name":"SFW Flitzer","cost":11,"upkeep":0,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":2,"WetMP":2,"WetMPwBombs":2,"DPEmpty":8,"DPFull":8,"DPwBombs":8,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":2,"StallSpeedFull":2,"StallSpeedFullwBombs":2,"Overspeed":16,"BoostEmpty":4,"BoostFull":4,"BoostFullwBombs":4,"Dropoff":8,"Stabiilty":0,"HandlingEmpty":101,"HandlingFull":101,"HandlingFullwBombs":101,"MaxStrain":28,"Toughness":8,"Structure":40,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":11,"RateOfClimbEmpty":11,"RateOfClimbwBombs":11},{"name":"SFW-Rathenau Nimbus","cost":10,"upkeep":0,"bomb_mass":0,"escape":"0","crash":"1","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":18,"DPFull":18,"DPwBombs":18,"MaxSpeedEmpty":9,"MaxSpeedFull":9,"MaxSpeedwBombs":9,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":16,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":6,"HandlingEmpty":89,"HandlingFull":88,"HandlingFullwBombs":88,"MaxStrain":46,"Toughness":9,"Structure":46,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":13,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Teicher Fuchs","cost":26,"upkeep":1,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":30,"Toughness":9,"Structure":48,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Weiss Wrackbarsch","cost":19,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-2","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-3,"HandlingEmpty":109,"HandlingFull":108,"HandlingFullwBombs":108,"MaxStrain":19,"Toughness":8,"Structure":40,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Braun GA 'Gulaschkanone'","cost":20,"upkeep":1,"bomb_mass":0,"escape":"2/2","crash":"-1/-1","stress":"2, 1","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":23,"DPFull":23,"DPwBombs":23,"MaxSpeedEmpty":9,"MaxSpeedFull":9,"MaxSpeedwBombs":9,"StallSpeedEmpty":3,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":20,"BoostEmpty":1,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":5,"Stabiilty":1,"HandlingEmpty":89,"HandlingFull":88,"HandlingFullwBombs":88,"MaxStrain":43,"Toughness":10,"Structure":54,"EnergyLoss":8,"EnergyLosswBombs":9,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Ritter Model X \"Falke\"","cost":33,"upkeep":2,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":21,"MaxSpeedFull":21,"MaxSpeedwBombs":21,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":23,"BoostEmpty":5,"BoostFull":4,"BoostFullwBombs":4,"Dropoff":12,"Stabiilty":-1,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":43,"Toughness":8,"Structure":43,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":9,"RateOfClimbwBombs":6},{"name":"von Morgen Walküre","cost":46,"upkeep":2,"bomb_mass":5,"escape":"2","crash":"-1","stress":"1","DryMP":7,"WetMP":8,"WetMPwBombs":9,"DPEmpty":15,"DPFull":15,"DPwBombs":15,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":7,"StallSpeedFull":8,"StallSpeedFullwBombs":9,"Overspeed":28,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":2,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":93,"MaxStrain":35,"Toughness":26,"Structure":35,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Hugo's Metallisches Jagdflugzeug!","cost":54,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":7,"WetMP":8,"WetMPwBombs":8,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":9,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":36,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-2,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":50,"Toughness":45,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Sonnenjäger Seitenwinder","cost":30,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-2","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-7,"HandlingEmpty":110,"HandlingFull":109,"HandlingFullwBombs":109,"MaxStrain":36,"Toughness":8,"Structure":43,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Tejas Interceptor","cost":46,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":22,"MaxSpeedFull":22,"MaxSpeedwBombs":22,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":36,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":1,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":40,"Toughness":9,"Structure":47,"EnergyLoss":2,"EnergyLosswBombs":3,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":7,"RateOfClimbwBombs":6},{"name":"Sonnenjäger Haifisch","cost":35,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":0,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":40,"Toughness":11,"Structure":55,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"Albrecht Pfeil","cost":43,"upkeep":1,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"1, 0","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":28,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":8,"Stabiilty":1,"HandlingEmpty":89,"HandlingFull":88,"HandlingFullwBombs":88,"MaxStrain":34,"Toughness":24,"Structure":72,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Teicher Sperber 8N-A","cost":19,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"3","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":9,"DPFull":9,"DPwBombs":9,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-5,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":27,"Toughness":8,"Structure":40,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"Markgraf Todesbote C","cost":38,"upkeep":3,"bomb_mass":10,"escape":"2/2","crash":"1/1","stress":"2, 0","DryMP":8,"WetMP":12,"WetMPwBombs":14,"DPEmpty":25,"DPFull":25,"DPwBombs":27,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":7,"Overspeed":32,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":4,"HandlingEmpty":84,"HandlingFull":80,"HandlingFullwBombs":78,"MaxStrain":38,"Toughness":11,"Structure":56,"EnergyLoss":9,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":15,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"von Morgen Pferd","cost":145,"upkeep":10,"bomb_mass":80,"escape":"0/0/0/0/2/2/2","crash":"-1/-1/-1/-1/-1/-1/-1","stress":"4(0), 4(0), 4(0), 0, 0, 0, 0","DryMP":30,"WetMP":40,"WetMPwBombs":56,"DPEmpty":72,"DPFull":72,"DPwBombs":72,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":6,"Overspeed":25,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":9,"Stabiilty":4,"HandlingEmpty":41,"HandlingFull":31,"HandlingFullwBombs":15,"MaxStrain":32,"Toughness":41,"Structure":205,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":12,"ControlStress":5,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"von Morgen Oger","cost":36,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":8,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":36,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":2,"HandlingEmpty":94,"HandlingFull":93,"HandlingFullwBombs":93,"MaxStrain":37,"Toughness":10,"Structure":50,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":4,"RateOfClimbwBombs":4},{"name":"Dryad of Hanriot","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":1,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":41,"Toughness":11,"Structure":56,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"Thorstad S1M2b \"Schreckensgans\"","cost":39,"upkeep":2,"bomb_mass":0,"escape":"0/0","crash":"-1/-1","stress":"1(0), 1(0)","DryMP":7,"WetMP":9,"WetMPwBombs":9,"DPEmpty":17,"DPFull":17,"DPwBombs":17,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":7,"StallSpeedFull":9,"StallSpeedFullwBombs":9,"Overspeed":45,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":-2,"HandlingEmpty":97,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":40,"Toughness":9,"Structure":45,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":9,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Straßenkämpfer","cost":34,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":20,"Toughness":33,"Structure":75,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Marut Raider","cost":30,"upkeep":1,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":4,"WetMP":5,"WetMPwBombs":7,"DPEmpty":12,"DPFull":12,"DPwBombs":14,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":9,"Overspeed":25,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":1,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":96,"MaxStrain":28,"Toughness":10,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":3},{"name":"DFB Blitzgewitter","cost":49,"upkeep":2,"bomb_mass":0,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":7,"WetMP":9,"WetMPwBombs":9,"DPEmpty":18,"DPFull":18,"DPwBombs":18,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":0,"HandlingEmpty":92,"HandlingFull":90,"HandlingFullwBombs":90,"MaxStrain":41,"Toughness":9,"Structure":45,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"KZ-2 Mangusten","cost":26,"upkeep":1,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"3, 1","DryMP":6,"WetMP":7,"WetMPwBombs":9,"DPEmpty":15,"DPFull":15,"DPwBombs":16,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":14,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":10,"Overspeed":16,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":95,"MaxStrain":24,"Toughness":8,"Structure":42,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Rebuilt LM \"Viper\"","cost":19,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-5,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":27,"Toughness":8,"Structure":41,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Libelle T.87","cost":23,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"0","stress":"1","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-2,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":18,"Toughness":6,"Structure":30,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":9,"RateOfClimbEmpty":12,"RateOfClimbwBombs":9},{"name":"Mauss Z-95 Phönix","cost":44,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"0","DryMP":7,"WetMP":9,"WetMPwBombs":9,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":8,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":40,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":2,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":31,"Toughness":15,"Structure":37,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3}]`),s=new Ut(ke,!1),i=0,a=0;for(let m=0;m{(function(t={}){Ae(),removeEventListener("click",ye),Re&&Re(),Re=void 0,xe=void 0,Ge=t.getElement||Ee,Fe=t.scrollIntoView||Me,xe=new MutationObserver(we),addEventListener("click",ye),Re=void 0,fe()})(),setTimeout((()=>{window.onscroll=function(t,e){let s;return function(){clearTimeout(s),s=setTimeout(t,250)}}(He)}),1e3)}));var c=document.getElementsByClassName("collapsible");for(let t=0;tdocument.getElementById(t).offsetTop))break;s=t}We!=s&&(We=s,window.history.replaceState(null,null,"index.html#"+s))}})(); \ No newline at end of file +(()=>{"use strict";var t,e,s={},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={exports:{}};return s[t](n,n.exports,a),n.exports}e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,a.t=function(s,i){if(1&i&&(s=this(s)),8&i)return s;if("object"==typeof s&&s){if(4&i&&s.__esModule)return s;if(16&i&&"function"==typeof s.then)return s}var n=Object.create(null);a.r(n);var r={};t=t||[null,e({}),e([]),e(e)];for(var o=2&i&&s;"object"==typeof o&&!~t.indexOf(o);o=e(o))Object.getOwnPropertyNames(o).forEach((t=>r[t]=()=>s[t]));return r.default=()=>s,a.d(n,r),n},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};class n{static IsNullOrWhiteSpace(t){try{return null==t||"undefined"==t||t.toString().replace(/\s/g,"").length<1}catch(t){return console.log(t),!1}}static Join(t,...e){try{const s=e[0];if(Array.isArray(s)||s instanceof Array){let e=n.Empty;for(let i=0;i{e+=i[s]+t})),e=e.slice(0,e.length-t.length),e}const i=e;return n.join(t,...i)}catch(t){return console.log(t),n.Empty}}static Format(t,...e){try{return t.match(n.regexNumber)?n.format(n.regexNumber,t,e):t.match(n.regexObject)?n.format(n.regexObject,t,e,!0):t}catch(t){return console.log(t),n.Empty}}static format(t,e,s,i=!1){return e.replace(t,(function(t,e){const a=t.split(":");let r;return a.length>1&&(e=a[0].replace("{",""),t=a[1].replace("}","")),r=i?s[0][e]:s[e],null==r||null==r||t.match(/{\d+}/)?r:(r=n.parsePattern(t,r),void 0!==r&&null!=r?r:n.Empty)}))}static parsePattern(t,e){switch(t){case"L":return e.toLocaleLowerCase();case"U":return e.toLocaleUpperCase();case"d":if("string"==typeof e)return n.getDisplayDateFromString(e);if(e instanceof Date)return n.Format("{0:00}.{1:00}.{2:0000}",e.getDate(),e.getMonth(),e.getFullYear());break;case"s":if("string"==typeof e)return n.getSortableDateFromString(e);if(e instanceof Date)return n.Format("{0:0000}-{1:00}-{2:00}",e.getFullYear(),e.getMonth(),e.getDate());break;case"n":{"string"!=typeof e&&(e=e.toString());const t=e.replace(/,/g,".");if(isNaN(parseFloat(t))||t.length<=3)break;const s=t.split(/[^0-9]+/g);let i=s;s.length>1&&(i=[n.join("",...s.splice(0,s.length-1)),s[s.length-1]]);const a=i[0],r=a.length%3;let o=r>0?a.substring(0,r):n.Empty;const l=a.substring(r).match(/.{3}/g);return o=o+"."+n.Join(".",l),o+(i.length>1?","+i[1]:"")}case"x":return this.decimalToHexString(e);case"X":return this.decimalToHexString(e,!0)}return"number"!=typeof e&&isNaN(e)||isNaN(+t)||n.IsNullOrWhiteSpace(e)?e:n.formatNumber(e,t)}static decimalToHexString(t,e=!1){const s=parseFloat(t).toString(16);return e?s.toLocaleUpperCase():s}static getDisplayDateFromString(t){const e=t.split("-");if(e.length<=1)return t;let s=e[e.length-1];const i=e[e.length-2],a=e[e.length-3];return s=s.split("T")[0],s=s.split(" ")[0],`${s}.${i}.${a}`}static getSortableDateFromString(t){const e=t.replace(",","").split(".");if(e.length<=1)return t;const s=e[e.length-1].split(" ");let i=n.Empty;s.length>1&&(i=s[s.length-1]);let a=`${e[e.length-1].split(" ")[0]}-${e[e.length-2]}-${e[e.length-3]}`;return!n.IsNullOrWhiteSpace(i)&&i.length>1?a+=`T${i}`:a+="T00:00:00",a}static formatNumber(t,e){const s=e.length,i=t.toString();if(s<=i.length)return i;let a=s-i.length;return a+=1,new Array(a).join("0")+i}static join(t,...e){let s=n.Empty;for(let i=0;i Benefits(-)":"Penalties(+)
Benefits(-)","Used Burnt Out":"Burnt Out","Used Burnt Out Description":"Engines are at -1 Reliability","Used Ragged":"Ragged","Used Ragged Description":"Reduce your Max Speed by 10%","Used Hefty":"Hefty","Used Hefty Description":"Increase your Stall Speeds by 20%","Used Sticky Guns":"Sticky Guns","Used Sticky Guns Description":"Increase the chance of guns jamming by 1","Used Weak":"Weak","Used Weak Description":"Cut the plane\'s Toughness in half","Used Fragile":"Fragile","Used Fragile Description":"Reduce your Max Strain by 20%","Used Leaky":"Leaky","Used Leaky Description":"Reduce your Fuel by 20%","Used Sluggish":"Sluggish","Used Sluggish Description":"Reduce your Handling by 5","Weapons Section Title":"Weapons","Weapons Number of Weapon Sets":"Number of Weapon Sets:","Weapons Number of Weapon Braces":"Number of Weapon Braces:","Weapons Weapon Set":"Weapon Set","Weapons Weapons":"Weapons","Weapons Weapon Stats":"Weapon Stats","Weapons Type":"Weapon Type","Weapons Number of Mounts":"Number of Mounts","Weapons Ammunition":"Ammunition","Weapons Action":"Action","Weapons Projectile":"Projectile","Weapons Belt Fed":"Belt Fed","Weapons Stat Mounting":"Mounting","Weapons Stat Jam":"Jam","Weapons Stat Hits":"Hits","Weapons Stat Damage":"Damage","Weapons Stat Shots":"Shots","Weapons Stat Charges":"Charges per Shot","Weapons Wing Mount":"Wing Mount","Weapons Accessible":"Accessible","Weapons Free Accessible":"Free Accessible","Weapons Covered":"Covered","Weapons # Weapons at Mount":"Weapons at Mount","Weapons Synchronization":"Synchronization","Weapons Mount":"Weapon Mount","Weapons Braces":"Weapon Braces","Weapons Braces Warning":"These mounts give an observer +1 to make a Personal Attack with a loose weapon they are carrying in their hands.","Wings Section Title":"Wings","Wings Wing Stagger":"Wing Stagger:","Wings Closed Wing":"Closed Wing:","Wings Swept Wing":"Swept Wings:","Wings Wing Type":"Wing Type","Wings Wing Options":"Wing Options","Wings Wing Stats":"Wing Stats","Wings Full Wings":"Full Wings","Wings Miniature Wings":"Miniature Wings","Wings Sesquiplane":"Sesquiplane","Wings No Wing":"None","Wings Area":"Area","Wings Span":"Span","Wings Gull":"Gull","Wings Dihedral":"Dihedral","Wings Anhedral":"Anhedral","Aircraft Button Save":"Save","Aircraft Button Load":"Load","Aircraft Button Copy As Link":"Copy As Link","Aircraft Button Save Dashboard":"Save Dashboard","Aircraft Button Interactive Dashboard":"Interactive Dashboard","Aircraft Button Save NPC":"Save NPC","Aircraft Button Save Catalog":"Save Catalog","Aircraft Button Default Aircraft":"Default Aircraft","Aircraft Stats Section Title":"Total Sum of Stats","Aircraft Derived Section Title":"Aircraft Derived Statistics","Seat #":"Seat #{0}","Seats #":"Seats # {0}","Seat Location":"Choose Seat","Radiators #":"Radiators # {0}","Crew Pilot":"Pilot","Crew Bombadier":"Bombardier","Crew Co-Pilot":"Co-Pilot","Crew Gunner":"Gunner","Crew Aircrew":"Aircrew","Diesel":"Diesel Engine","Diesel Warning":"Engine won\'t catch fire.","Cargo Tiny":"A small locker for personal stuff.","Cargo Small":"Will fit a trunk, barrel, or crate.","Cargo Medium":"Will fit a small vehicle like a motorcycle, car, or zeppelin engine.","Cargo Large":"Will fit a scout or fighter aircraft with the wings taken off.","Cargo Huge":"Will fit just about anything you can imagine.","Alter Select Part":"Select Part","Alter Quantity":"Quantity","Alter Part Name":"Part Name","Alter Part Special Rules":"Special Rules","Frame Count":"Frame Count","Frame Count Warning":"This plane appears to have unused frame sections. Check to see if this is intentional.","Altitude Section Title":"Altitude Effects","Altitude Altitude":"Altitude","Rarity":"Rarity","Rarity Custom":"Custom","Rarity Common":"Common","Rarity Rare":"Rare","Rarity Legendary":"Legendary","Boost Warning":"Boost is 0 for some loads. The plane cannot accelerate to take off.","Insufficient Charge":"Insufficient Charge","Insufficient Charge Warning":"This aircraft has electrical systems with nothing to power them.","Low Mass Warning":"This aircraft is very low mass. If it is a custom airplane, be careful not to make it overpowered.","Low Drag Warning":"This aircraft is very low drag. If it is a custom airplane, be careful not to make it overpowered.","Connectivity Warning":"Can move between positions without Wingwalking.","Passenger Connectivity Warning":"Can reach the cockpit without Wingwalking.","Rotor Thickness":"Rotor Thickness"}}');var o=a.t(r,2);const l=new class{constructor(){this.lang="en"}LoadLanguages(t){this.languages=t}GetLanguages(){const t=[];for(const e of this.languages.languages)t.push(e);return t}SetCurrentLanguage(t){this.languages[t]&&(this.lang=t)}e(t){return this.languages[this.lang][t]?this.languages[this.lang][t]:this.languages.en[t]?this.languages.en[t]:(console.error("Failed to find "+t),"!"+t+"!")}};function h(t,...e){return n.Format(l.e(t),...e)}var c;l.LoadLanguages(o),function(t){t[t.WHITE=0]="WHITE",t[t.YELLOW=1]="YELLOW",t[t.RED=2]="RED"}(c||(c={}));class u{constructor(t){this.liftbleed=0,this.wetmass=0,this.mass=0,this.drag=0,this.control=0,this.cost=0,this.reqsections=0,this.visibility=0,this.flightstress=0,this.escape=0,this.pitchstab=0,this.latstab=0,this.cooling=0,this.reliability=0,this.power=0,this.fuelconsumption=0,this.maxstrain=0,this.structure=0,this.pitchspeed=0,this.pitchboost=0,this.wingarea=0,this.toughness=0,this.upkeep=0,this.crashsafety=0,this.bomb_mass=0,this.fuel=0,this.charge=0,this.warnings=[],this.era=[],t&&this.fromJSON(t,0)}toJSON(){return{liftbleed:this.liftbleed,wetmass:this.wetmass,mass:this.mass,drag:this.drag,control:this.control,cost:this.cost,reqsections:this.reqsections,visibility:this.visibility,flightstress:this.flightstress,escape:this.escape,pitchstab:this.pitchstab,latstab:this.latstab,cooling:this.cooling,reliability:this.reliability,power:this.power,fuelconsumption:this.fuelconsumption,maxstrain:this.maxstrain,structure:this.structure,pitchboost:this.pitchboost,pitchspeed:this.pitchspeed,wingarea:this.wingarea,toughness:this.toughness,upkeep:this.upkeep,crashsafety:this.crashsafety,bomb_mass:this.bomb_mass,fuel:this.fuel,charge:this.charge,warnings:this.warnings,eras:this.era}}fromJSON(t,e){if(t.liftbleed&&(this.liftbleed=t.liftbleed),t.wetmass&&(this.wetmass=t.wetmass),t.mass&&(this.mass=t.mass),t.drag&&(this.drag=t.drag),t.control&&(this.control=t.control),t.cost&&(this.cost=t.cost),t.reqsections&&(this.reqsections=t.reqsections),t.visibility&&(this.visibility=t.visibility),t.flightstress&&(this.flightstress=t.flightstress),t.escape&&(this.escape=t.escape),t.pitchstab&&(this.pitchstab=t.pitchstab),t.latstab&&(this.latstab=t.latstab),t.cooling&&(this.cooling=t.cooling),t.reliability&&(this.reliability=t.reliability),t.power&&(this.power=t.power),t.fuelconsumption&&(this.fuelconsumption=t.fuelconsumption),t.maxstrain&&(this.maxstrain=t.maxstrain),t.structure&&(this.structure=t.structure),t.pitchspeed&&(this.pitchspeed=t.pitchspeed),t.pitchboost&&(this.pitchboost=t.pitchboost),t.wingarea&&(this.wingarea=t.wingarea),t.toughness&&(this.toughness=t.toughness),t.upkeep&&(this.upkeep=t.upkeep),t.crashsafety&&(this.crashsafety=t.crashsafety),t.bomb_mass&&(this.bomb_mass=t.bomb_mass),t.fuel&&(this.fuel=t.fuel),t.charge&&(this.charge=t.charge),t.warning&&this.warnings.push({source:h(t.name),warning:h(t.warning),color:c.WHITE}),t.warnings){const e=t.warnings,s=[];for(const t of e)s.push({source:t.source,warning:t.warning});this.warnings=this.MergeWarnings(s)}if(t.era&&this.era.push({name:h(t.name),era:h(t.era)}),t.eras){const e=t.eras,s=[];for(const t of e)s.push({name:t.name,era:t.era});this.era=this.MergeEra(s)}}serialize(t){t.PushNum(this.liftbleed),t.PushNum(this.wetmass),t.PushNum(this.mass),t.PushNum(this.drag),t.PushNum(this.control),t.PushNum(this.cost),t.PushNum(this.reqsections),t.PushNum(this.visibility),t.PushNum(this.flightstress),t.PushNum(this.escape),t.PushNum(this.pitchstab),t.PushNum(this.latstab),t.PushNum(this.cooling),t.PushNum(this.reliability),t.PushNum(this.power),t.PushNum(this.fuelconsumption),t.PushNum(this.maxstrain),t.PushNum(this.structure),t.PushFloat(this.pitchboost),t.PushFloat(this.pitchspeed),t.PushNum(this.wingarea),t.PushNum(this.toughness),t.PushNum(this.upkeep),t.PushNum(this.crashsafety),t.PushNum(this.bomb_mass),t.PushNum(this.fuel),t.PushNum(this.charge),t.PushNum(this.warnings.length);for(const e of this.warnings)t.PushString(e.source),t.PushString(e.warning);t.PushNum(this.era.length);for(const e of this.era)t.PushString(e.name),t.PushString(e.era)}deserialize(t){if(this.liftbleed=t.GetNum(),this.wetmass=t.GetNum(),this.mass=t.GetNum(),this.drag=t.GetNum(),this.control=t.GetNum(),this.cost=t.GetNum(),this.reqsections=t.GetNum(),this.visibility=t.GetNum(),this.flightstress=t.GetNum(),this.escape=t.GetNum(),this.pitchstab=t.GetNum(),this.latstab=t.GetNum(),this.cooling=t.GetNum(),this.reliability=t.GetNum(),this.power=t.GetNum(),this.fuelconsumption=t.GetNum(),this.maxstrain=t.GetNum(),this.structure=t.GetNum(),this.pitchboost=t.GetFloat(),this.pitchspeed=t.GetFloat(),this.wingarea=t.GetNum(),this.toughness=t.GetNum(),this.upkeep=t.GetNum(),this.crashsafety=t.GetNum(),this.bomb_mass=t.GetNum(),this.fuel=t.GetNum(),this.charge=t.GetNum(),t.version>12.25){const e=t.GetNum();this.warnings=[];for(let s=0;s1e-6&&(e.warnings=this.warnings,e.era=this.era),e}Equal(t){return this.liftbleed==t.liftbleed&&this.wetmass==t.wetmass&&this.mass==t.mass&&this.drag==t.drag&&this.control==t.control&&this.cost==t.cost&&this.reqsections==t.reqsections&&this.visibility==t.visibility&&this.flightstress==t.flightstress&&this.escape==t.escape&&this.pitchstab==t.pitchstab&&this.latstab==t.latstab&&this.cooling==t.cooling&&this.reliability==t.reliability&&this.power==t.power&&this.fuelconsumption==t.fuelconsumption&&this.maxstrain==t.maxstrain&&this.structure==t.structure&&this.pitchspeed==t.pitchspeed&&this.pitchboost==t.pitchboost&&this.wingarea==t.wingarea&&this.toughness==t.toughness&&this.upkeep==t.upkeep&&this.crashsafety==t.crashsafety&&this.bomb_mass==t.bomb_mass&&this.fuel==t.fuel&&this.charge==t.charge}rtz(t){return t>0?Math.floor(1e-6+t):Math.ceil(-1e-6+t)}Round(){this.liftbleed=this.rtz(this.liftbleed),this.wetmass=this.rtz(this.wetmass),this.mass=this.rtz(this.mass),this.drag=this.rtz(this.drag),this.control=this.rtz(this.control),this.cost=this.rtz(this.cost),this.reqsections=this.rtz(this.reqsections),this.visibility=this.rtz(this.visibility),this.flightstress=this.rtz(this.flightstress),this.escape=this.rtz(this.escape),this.pitchstab=this.rtz(this.pitchstab),this.latstab=this.rtz(this.latstab),this.cooling=this.rtz(this.cooling),this.reliability=this.rtz(this.reliability),this.power=this.rtz(this.power),this.fuelconsumption=this.rtz(this.fuelconsumption),this.maxstrain=this.rtz(this.maxstrain),this.structure=this.rtz(this.structure),this.wingarea=this.rtz(this.wingarea),this.toughness=this.rtz(this.toughness),this.upkeep=this.rtz(this.upkeep),this.crashsafety=this.rtz(this.crashsafety),this.bomb_mass=this.rtz(this.bomb_mass),this.fuel=this.rtz(this.fuel),this.charge=this.rtz(this.charge)}Clone(){return this.Add(new u)}}const m=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return 6}},p=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return-1}},d=t=>{switch(t){case 0:return"Pioneer";case 1:return"WWI";case 2:return"Roaring 20s";case 3:return"Coming Storm";case 4:return"WWII";case 5:return"Last Hurrah";case 6:case-1:return"Himmilgard"}},g=t=>{var e="";for(let s=0;s0){const s=t.length-1;2==t[s].length&&t[s][0]!=t[s][1]?e+=t[s][0].toString()+"("+t[s][1].toString()+")":e+=t[s][0].toString()}return e};class _{constructor(t){this.array=new ArrayBuffer(51200),this.view=new DataView(this.array),this.offset=0}Check(){if(this.offset>=this.array.byteLength)throw"Serialization Way too long."}PushNum(t){this.view.setInt16(this.offset,t,!1),this.offset+=2,this.Check()}PushBool(t){t?this.view.setUint8(this.offset,1):this.view.setUint8(this.offset,0),this.offset+=1,this.Check()}PushString(t){var e=(new TextEncoder).encode(t);this.PushNum(e.length);for(let t=0;t=this.array.byteLength)throw"Deserialization Failed"}GetNum(){this.Check();const t=this.view.getInt16(this.offset,!1);return this.offset+=2,t}GetBool(){this.Check();const t=this.view.getUint8(this.offset);return this.offset+=1,t>0}GetString(){this.Check();const t=this.GetNum(),e=new Uint8Array(this.view.buffer,this.offset,t);let s;return this.offset+=t,s=this.version<12.65?"windows-1252":"utf-8",new TextDecoder(s).decode(e)}GetNumArr(t){this.Check();const e=this.GetNum(),s=[];for(let t=0;t0&&(n*=1.4),Math.floor(1e-6+n)}VerifyValues(){for(this.engine_displacement=Math.max(.01,this.engine_displacement),this.engine_displacement=Math.min(150,this.engine_displacement),this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.cool_sel=Math.max(0,Math.min(this.CoolingTable.length-1,this.cool_sel)),this.num_cyl_per_row=Math.floor(Math.max(1,this.num_cyl_per_row)),this.num_rows=Math.floor(Math.max(1,this.num_rows)),this.compression_ratio=Math.max(.01,this.compression_ratio),this.compression_ratio=Math.min(25,this.compression_ratio),this.rpm_boost=Math.max(.1,this.rpm_boost),this.rpm_boost=Math.min(2,this.rpm_boost),this.material_fudge=Math.max(.1,this.material_fudge),this.material_fudge=Math.min(2,this.material_fudge),this.quality_fudge=Math.max(.1,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge);this.material_fudge-1+(this.quality_fudge-1)<-.9;)this.material_fudge+=.1,this.quality_fudge+=.1;this.min_IAF=10*Math.round(1e-6+this.min_IAF/10),this.compressor_count=Math.floor(1e-6+this.compressor_count),this.compressor_count=Math.min(5,this.compressor_count),this.compressor_type==S.NONE?(this.compressor_count=0,this.min_IAF=0):this.compressor_type==S.ALTITUDE_THROTTLE?(this.compressor_count=1,this.min_IAF=0,this.upg_sel[0]=!1,this.upg_sel[1]=!1,this.upg_sel[2]=!1):(this.min_IAF=Math.max(0,this.min_IAF),this.compressor_count=Math.max(1,this.compressor_count))}EngineStats(){const t=new F;switch(t.name=this.name,this.VerifyValues(),t.stats.power=this.CalcPower(),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=Math.floor(-1.999999+this.era_sel+10*(this.quality_fudge+this.material_fudge-2)),t.stats.cooling=this.CalcCooling(),t.oiltank=this.IsRotary(),t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=this.CalcFuelConsumption(),t.altitude=this.CalcAltitude(),t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(d(this.era_sel))}),this.compressor_type){case S.NONE:break;case S.ALTITUDE_THROTTLE:t.stats.cost+=3,t.altitude=49,t.stats.warnings.push({source:h("Altitude Throttle"),warning:h("Altitude Throttle Warning"),color:c.WHITE});break;case S.SUPERCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.fuelconsumption=Math.floor(1e-6+1.25*t.stats.fuelconsumption),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=29+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e;break}case S.TURBOCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10*2,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=49+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e,t.stats.reqsections+=1;break}}return(this.compressor_type==S.ALTITUDE_THROTTLE||this.upg_sel[1])&&t.stats.warnings.push({source:h("War Emergency Power"),warning:h("War Emergency Power Warning"),color:c.WHITE}),t.stats.fuelconsumption=Math.max(1,t.stats.fuelconsumption),t.rarity=this.rarity,t}EngineInputs(){const t=new G;t.engine_type=y.PROPELLER,t.RPM_boost=this.rpm_boost,t.compression=this.compression_ratio,t.compressor_count=this.compressor_count,t.compressor_type=this.compressor_type,t.cyl_per_row=this.num_cyl_per_row,t.displacement=this.engine_displacement,t.era_sel=this.era_sel,t.material_fudge=this.material_fudge,t.min_IdealAlt=this.min_IAF,t.name=this.name,t.quality_fudge=this.quality_fudge,t.rows=this.num_rows,t.type=this.cool_sel;for(let e=0;e2&&(this.afterburner=!1)}EngineInputs(){const t=new G;return t.name=this.name,t.engine_type=y.TURBOMACHINERY,t.era_sel=this.era_sel,t.type=this.type_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.upgrades[0]=this.afterburner,t.rarity=this.rarity,t}GetPitchSpeed(){return this.bypass_ratio>=8?1:this.bypass_ratio>=3.5?1.1:this.bypass_ratio>=1?1.2:1.3}EngineStats(){const t=new F;this.VerifyValues();const e=this.CalcStages();return this.kN=e.thrust,this.tsfc=e.fuel/e.thrust,t.name=this.name,t.stats.power=Math.round(1e3*e.thrust/89),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.fuelconsumption=Math.round(200*e.fuel/1e3),t.rumble=0,t.stats.cost=this.CalcCost(),t.overspeed=100,t.altitude=59,8==this.era_sel?t.stats.era.push({name:t.name,era:h(d(-1))}):t.stats.era.push({name:t.name,era:h(d(5))}),t.stats.pitchspeed=this.GetPitchSpeed(),t.rarity=this.rarity,t}}class P{constructor(){this.EraTable=[{name:"Pioneer",draw:3,drawfactor:.4,massfactor:.4,reliability:-1,costfactor:.4,overspeed:20},{name:"WWI",draw:1,drawfactor:.4,massfactor:1/3,reliability:0,costfactor:1/2.25,overspeed:25},{name:"Roaring 20s",draw:1,drawfactor:2/7,massfactor:2/7,reliability:1,costfactor:.5,overspeed:30},{name:"Coming Storm",draw:0,drawfactor:2/7,massfactor:1/4,reliability:2,costfactor:1/1.9,overspeed:35},{name:"WWII",draw:0,drawfactor:1/4,massfactor:.2,reliability:3,costfactor:1/1.8,overspeed:40},{name:"Last Hurrah",draw:0,drawfactor:.2,massfactor:1/6,reliability:4,costfactor:1/1.75,overspeed:45}],this.Winding=[{name:"Aluminum",drawmod:1.1,mass:-2,drag:1,costfactor:1,reliabilty:0},{name:"Copper",drawmod:1,mass:0,drag:0,costfactor:1,reliabilty:0},{name:"Silver",drawmod:.95,mass:1,drag:0,costfactor:1.1,reliabilty:0},{name:"Electrum",drawmod:.9,mass:2,drag:0,costfactor:1.3,reliabilty:1},{name:"Platinum",drawmod:.75,mass:3,drag:0,costfactor:2,reliabilty:2},{name:"Screamer Sinew",drawmod:.9,mass:0,drag:1,costfactor:1.75,reliabilty:4},{name:"Lightning Sprite Ephemera",drawmod:.5,mass:-2,drag:-2,costfactor:2,reliabilty:-3}],this.name="Default",this.era_sel=0,this.winding_sel=0,this.power=1,this.chonk=1,this.quality_fudge=1}EraMass(){const t=this.EraTable[this.era_sel];return Math.floor(1e-6+t.massfactor*this.power)}CalcMass(){const t=this.Winding[this.winding_sel];return Math.max(0,Math.floor(1e-6+this.EraMass()+t.mass))}CalcDrag(){const t=this.power/10,e=this.Winding[this.winding_sel].drag;return Math.max(1,Math.floor(1.000001+t+this.chonk+e))}CalcOverspeed(){const t=this.chonk/2,e=7.5*(this.quality_fudge-1);return Math.ceil(-1e-6+this.EraTable[this.era_sel].overspeed-t+e)}CalcDraw(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.draw+Math.ceil(this.power*t.drawfactor-1e-6);return Math.ceil(s*e.drawmod-1e-6)}CalcReliability(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=this.power/10,i=5*(this.quality_fudge-1);return Math.trunc(1e-6+t.reliability+this.chonk-s+i)+e.reliabilty}CalcTorque(){const t=1+this.EraMass()/10+this.chonk/4;return Math.max(1,Math.floor(1e-6+t))}CalcCost(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.costfactor*this.power,i=Math.ceil(s*Math.max(.5,this.quality_fudge)-1e-6);return Math.ceil(i*e.costfactor-1e-6)}VerifyValues(){this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.winding_sel=Math.max(0,Math.min(this.Winding.length-1,this.winding_sel)),this.power=Math.max(1,this.power),this.power=Math.floor(1e-6+this.power),this.chonk=Math.floor(1e-6+this.chonk),this.chonk=Math.max(-10,this.chonk),this.chonk=Math.min(10,this.chonk),this.quality_fudge=Math.max(.5,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge)}EngineStats(){var t=new F;return t.name=this.name,this.VerifyValues(),t.stats.power=this.power,t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.cooling=0,t.oiltank=!1,t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=0,t.stats.charge=-this.CalcDraw(),t.altitude=100,t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(d(this.era_sel))}),t}EngineInputs(){var t=new G;return t.engine_type=y.ELECTRIC,t.name=this.name,t.power=this.power,t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.material_fudge=this.chonk,t.quality_fudge=this.quality_fudge,t}}!function(t){t[t.PROPELLER=0]="PROPELLER",t[t.PULSEJET=1]="PULSEJET",t[t.TURBOMACHINERY=2]="TURBOMACHINERY",t[t.ELECTRIC=3]="ELECTRIC"}(y||(y={})),function(t){t[t.CUSTOM=0]="CUSTOM",t[t.COMMON=1]="COMMON",t[t.RARE=2]="RARE",t[t.LEGENDARY=3]="LEGENDARY"}(w||(w={}));class G{constructor(t){this.name="Default",this.engine_type=y.PROPELLER,this.type=0,this.era_sel=0,this.rarity=w.CUSTOM,this.displacement=0,this.compression=0,this.cyl_per_row=0,this.rows=0,this.RPM_boost=0,this.material_fudge=0,this.quality_fudge=0,this.compressor_type=0,this.compressor_count=0,this.min_IdealAlt=0,this.upgrades=[...Array(4).fill(!1)],this.power=0,this.quality_cost=0,this.quality_rely=0,this.starter=!1,this.flow_adjustment=0,this.diameter=0,this.compression_ratio=0,this.bypass_ratio=0,this.winding_sel=0,t&&this.fromJSON(t)}toJSON(){switch(this.engine_type){case y.PROPELLER:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,displacement:this.displacement,compression:this.compression,cyl_per_row:this.cyl_per_row,rows:this.rows,RPM_boost:this.RPM_boost,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge,compressor_type:this.compressor_type,compressor_count:this.compressor_count,min_IAF:this.min_IdealAlt,upgrades:this.upgrades,rarity:this.rarity};case y.PULSEJET:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,power:this.power,quality_cost:this.quality_cost,quality_rely:this.quality_rely,starter:this.starter,rarity:this.rarity};case y.TURBOMACHINERY:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,flow_adjustment:this.flow_adjustment,diameter:this.diameter,compression_ratio:this.compression_ratio,bypass_ratio:this.bypass_ratio,upgrades:this.upgrades,rarity:this.rarity};case y.ELECTRIC:return{name:this.name,engine_type:this.engine_type,power:this.power,era_sel:this.era_sel,winding_sel:this.winding_sel,diameter:this.diameter,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge};default:throw"EngineInputs.toJSON: Oh dear, you have a new engine type."}}fromJSON(t){switch(this.name=t.name,this.engine_type=t.engine_type,this.type=t.type,this.era_sel=t.era_sel,this.engine_type){case y.PROPELLER:this.displacement=t.displacement,this.compression=t.compression,this.cyl_per_row=t.cyl_per_row,this.rows=t.rows,this.RPM_boost=t.RPM_boost,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge,this.compressor_type=t.compressor_type,this.compressor_count=t.compressor_count,this.min_IdealAlt=t.min_IAF,this.upgrades=b(t.upgrades,this.upgrades.length);break;case y.PULSEJET:this.power=t.power,this.quality_cost=t.quality_cost,this.quality_rely=t.quality_rely,this.starter=t.starter;break;case y.TURBOMACHINERY:this.flow_adjustment=t.flow_adjustment,this.diameter=t.diameter,this.compression_ratio=t.compression_ratio,this.bypass_ratio=t.bypass_ratio,this.upgrades=t.upgrades;break;case y.ELECTRIC:this.power=t.power,this.winding_sel=t.winding_sel,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge;break;default:throw"EngineInputs.fromJSON: Oh dear, you have a new engine type."}t.rarity?this.rarity=t.rarity:this.rarity=w.CUSTOM}serialize(t){switch(t.PushString(this.name),t.PushNum(this.engine_type),t.PushNum(this.type),t.PushNum(this.era_sel),this.engine_type){case y.PROPELLER:t.PushFloat(this.displacement),t.PushFloat(this.compression),t.PushNum(this.cyl_per_row),t.PushNum(this.rows),t.PushFloat(this.RPM_boost),t.PushFloat(this.material_fudge),t.PushFloat(this.quality_fudge),t.PushNum(this.compressor_type),t.PushNum(this.compressor_count),t.PushNum(this.min_IdealAlt),t.PushBoolArr(this.upgrades);break;case y.PULSEJET:t.PushNum(this.power),t.PushFloat(this.quality_cost),t.PushFloat(this.quality_rely),t.PushBool(this.starter);break;case y.TURBOMACHINERY:t.PushFloat(this.flow_adjustment),t.PushFloat(this.diameter),t.PushFloat(this.compression_ratio),t.PushFloat(this.bypass_ratio),t.PushBoolArr(this.upgrades);break;case y.ELECTRIC:t.PushNum(this.power),t.PushNum(this.winding_sel),t.PushNum(this.material_fudge),t.PushFloat(this.quality_fudge);break;default:throw"EngineInputs.serialize: Oh dear, you have a new engine type."}t.PushNum(this.rarity)}deserialize(t){switch(this.name=t.GetString(),this.engine_type=t.GetNum(),this.type=t.GetNum(),this.era_sel=t.GetNum(),this.engine_type){case y.PROPELLER:this.displacement=t.GetFloat(),this.compression=t.GetFloat(),this.cyl_per_row=t.GetNum(),this.rows=t.GetNum(),this.RPM_boost=t.GetFloat(),this.material_fudge=t.GetFloat(),this.quality_fudge=t.GetFloat(),this.compressor_type=t.GetNum(),this.compressor_count=t.GetNum(),this.min_IdealAlt=t.GetNum(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case y.PULSEJET:this.power=t.GetNum(),this.quality_cost=t.GetFloat(),this.quality_rely=t.GetFloat(),this.starter=t.GetBool();break;case y.TURBOMACHINERY:this.flow_adjustment=t.GetFloat(),this.diameter=t.GetFloat(),this.compression_ratio=t.GetFloat(),this.bypass_ratio=t.GetFloat(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case y.ELECTRIC:this.power=t.GetNum(),this.winding_sel=t.GetNum(),this.material_fudge=t.GetNum(),this.quality_fudge=t.GetFloat();break;default:throw"EngineInputs.deserialize: Oh dear, you have a new engine type."}t.version>12.35?this.rarity=t.GetNum():this.rarity=w.CUSTOM}PartStats(){switch(this.engine_type){case y.PROPELLER:{const t=new B;return t.name=this.name,t.cool_sel=this.type,t.era_sel=this.era_sel,t.engine_displacement=this.displacement,t.compression_ratio=this.compression,t.num_cyl_per_row=this.cyl_per_row,t.num_rows=this.rows,t.rpm_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IAF=this.min_IdealAlt,t.upg_sel=this.upgrades,t.rarity=this.rarity,t.EngineStats()}case y.PULSEJET:{const t=new E;t.valve_sel=this.type,t.era_sel=this.era_sel,t.desired_power=this.power,t.build_quality=this.quality_cost,t.overall_quality=this.quality_rely,t.starter=this.starter,t.rarity=this.rarity;const e=t.EngineStats();return this.name=e.name,e}case y.TURBOMACHINERY:{const t=new M;return t.type_sel=this.type,t.era_sel=this.era_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.afterburner=this.upgrades[0],t.name=this.name,t.rarity=this.rarity,t.EngineStats()}case y.ELECTRIC:{const t=new P;return t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.power=this.power,t.chonk=this.material_fudge,t.quality_fudge=this.quality_fudge,t.name=this.name,t.EngineStats()}default:throw"EngineInputs.PartStats: Oh dear, you have a new engine type."}}Equal(t){return this.name==t.name}Clone(){const t=new G;t.name=this.name,t.engine_type=this.engine_type,t.type=this.type,t.era_sel=this.era_sel,t.displacement=this.displacement,t.compression=this.compression,t.cyl_per_row=this.cyl_per_row,t.rows=this.rows,t.RPM_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IdealAlt=this.min_IdealAlt,t.power=this.power,t.quality_cost=this.quality_cost,t.quality_rely=this.quality_rely,t.starter=this.starter;for(let e=0;e12.35&&(this.rarity=t.GetNum()),this.stats.deserialize(t)}Clone(){const t=new F;return t.fromJSON(JSON.parse(JSON.stringify(this.toJSON()))),t}Equal(t){return this.stats.Equal(t.stats)&&this.overspeed==t.overspeed&&this.altitude==t.altitude&&this.torque==t.torque&&this.rumble==t.rumble&&this.oiltank==t.oiltank&&this.pulsejet==t.pulsejet&&this.rarity==t.rarity}Verify(){this.oiltank&&(this.stats.cooling=0),this.PulseJetCheck()}PulseJetCheck(){this.pulsejet?(this.stats.cooling=0,this.overspeed=100,this.altitude=3,this.torque=0):this.rumble=0}}const R=JSON.parse('{"l":[{"name":"Custom","engines":[{"name":"Bentley BR.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Renault V8 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":7,"compression":4,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.4,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Early-WWI","engines":[{"name":"Aeromarine K-6 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.36,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 80hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.27,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 6 cylinder 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Argus As II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":10.353,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.8,"compression":4.85,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Benz Bz.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.4,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 7Z 95hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.88,"compression":4.3,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9Bf 140hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.46,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 14 Double Lambda 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 70hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.75,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Omega 50hp","engine_type":0,"type":2,"era_sel":0,"displacement":7.7,"compression":4,"cyl_per_row":7,"rows":1,"RPM_boost":1.49,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome monosoupape 9B 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9C 90hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.89,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"RAF 1a 90hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.88,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.9,"material_fudge":1.3,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Late-WWI","engines":[{"name":"Bentley BR.2 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 11EB 200hp","engine_type":0,"type":2,"era_sel":1,"displacement":21.49,"compression":5.1,"cyl_per_row":11,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 16X 420hp","engine_type":0,"type":0,"era_sel":1,"displacement":32.53333333,"compression":5,"cyl_per_row":4,"rows":4,"RPM_boost":0.87,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8F 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.98,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIav 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'18","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle III 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle VIII 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 110hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Dyak 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.800000002,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.III 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.6,"compression":5,"cyl_per_row":11,"rows":1,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Mid-WWI","engines":[{"name":"Argus As III 190hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.9,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Beardmore 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.635,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bz.IV 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.6,"compression":4.9,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9B 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Cosmos Mercury","engine_type":0,"type":1,"era_sel":1,"displacement":19.6,"compression":5.3,"cyl_per_row":7,"rows":2,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss K-12 375hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.33,"material_fudge":0.8,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss OXX-6","engine_type":0,"type":0,"era_sel":1,"displacement":9.3,"compression":4.92,"cyl_per_row":2,"rows":4,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Fiat A.12 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9B Monosoupape 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9N Monosoupape 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":5.1,"cyl_per_row":9,"rows":1,"RPM_boost":1.05,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Aa 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Ab 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8B 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Bc 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Ja 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Jb 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Liberty L-12 400hp","engine_type":0,"type":0,"era_sel":2,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.64,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Lorraine 12Da 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":24.4,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIa 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIaü 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IVa 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Falcon III 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 80hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Arab 208hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.76,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Maori II 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":12.27,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.3,"material_fudge":1.7,"quality_fudge":0.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.II 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Pre-WWI","engines":[{"name":"Mercedes E4F 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Coming Storm","engines":[{"name":"Allison V-1710-85 1200hp","engine_type":0,"type":0,"era_sel":3,"displacement":28,"compression":6.65,"cyl_per_row":2,"rows":6,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bristol Pegasus XVIII 835hp","engine_type":0,"type":1,"era_sel":2,"displacement":28.7,"compression":6.25,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1.2,"quality_fudge":0.8,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Daimler-Benz 601ARJ 1775hp","engine_type":0,"type":0,"era_sel":3,"displacement":33.93,"compression":6.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.84,"material_fudge":0.6,"quality_fudge":0.7,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,true,false]}]},{"name":"Roaring 20s","engines":[{"name":"Argus As 5 1500hp","engine_type":0,"type":0,"era_sel":2,"displacement":94.1,"compression":5.6,"cyl_per_row":6,"rows":4,"RPM_boost":0.638,"material_fudge":0.4,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bréguet Quadrimoteur Type B H-32 970hp","engine_type":0,"type":0,"era_sel":2,"displacement":48.64,"compression":5,"cyl_per_row":4,"rows":8,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'20","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion XI 580hp","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":6,"cyl_per_row":4,"rows":3,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"WWII","engines":[{"name":"Klimov M-105PF 1230hp","engine_type":0,"type":0,"era_sel":3,"displacement":35.101,"compression":7,"cyl_per_row":2,"rows":6,"RPM_boost":0.55,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls Royce Merlin 46 930hp","engine_type":0,"type":0,"era_sel":3,"displacement":27,"compression":5.55,"cyl_per_row":2,"rows":6,"RPM_boost":0.98,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,true,true,false]}]},{"name":"ACDQ","engines":[{"name":"2A-Series 4-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":16,"compression":4.5,"cyl_per_row":1,"rows":2,"RPM_boost":0.5,"material_fudge":0.8,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"F-Series 6-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":17,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.07,"material_fudge":0.7,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"G-Series 9-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":16,"compression":4.7,"cyl_per_row":9,"rows":1,"RPM_boost":1.04,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hartmann H.IIc Straight-6 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":12,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hornet R-3 Boxer 6-Cylinder","engine_type":0,"type":0,"era_sel":1,"displacement":10,"compression":5,"cyl_per_row":2,"rows":3,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Maclean-King Tiger MK.1 V-12 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":17,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ogre-Z Beta V-6","engine_type":0,"type":0,"era_sel":0,"displacement":11,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Pulsejet PV-12 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":12,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-20 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":20,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-8 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":8,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Seguin Σ110 Sigma 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":1,"displacement":14,"compression":4.5,"cyl_per_row":7,"rows":1,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"SuperPegasus 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":13.5,"compression":5,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"TurboGoblin 8-Cylinder Semi-Radial","engine_type":0,"type":4,"era_sel":0,"displacement":13,"compression":5.5,"cyl_per_row":8,"rows":1,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Himmilgard Pulsejet","engines":[{"name":"Pulsejet PV-5 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":5,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-6 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":6,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-7 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":7,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-8 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":8,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-9 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":9,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-10 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":10,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-11 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":11,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-12 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":12,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-13 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":13,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-14 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":14,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-15 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":15,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1}]},{"name":"Himmilgard Liquid Radial","engines":[{"name":"Einsort MM 140hp","engine_type":0,"type":5,"era_sel":1,"displacement":14.72,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Einsort MR 150hp","engine_type":0,"type":5,"era_sel":1,"displacement":15.46,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Gernsback Motor 0005","engine_type":0,"type":5,"era_sel":1,"displacement":12,"compression":6,"cyl_per_row":5,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Liquid Cooled","engines":[{"name":"Meier Bärenjunge 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.5,"compression":5.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.86,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F1166 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 Über 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2000 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Brandt Krieger I 370hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Brandt Kurier XVI 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Fleischmann F10 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fleischmann F10ü 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.75,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fokker Fungizidherstellung Typ 247 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.3,"compression":4.8,"cyl_per_row":1,"rows":6,"RPM_boost":0.85,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Ochs 2 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.84,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Windhund 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Nationales Motorbüro Arbeiter XVII 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,true],"rarity":2},{"name":"Nationales Motorbüro D-1140 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.4,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760tgl 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.4,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-840 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.4,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.05,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro Kurier XXI 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XII 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"SAM Kurier XX 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter I 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.15,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter III 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter V 350hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.75,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Schrankhut RD.300V 230hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":6.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.51,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Wollsteinkraft Verteidiger C 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Wollsteinkraft Verteidiger H 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Wollsteinkraft Wagehals C 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F4398 490hp","engine_type":0,"type":0,"era_sel":1,"displacement":44.3,"compression":4.7,"cyl_per_row":3,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Patriot 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Turbolader-Patriot 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"Meier Bär 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Meier Eisbär 500hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XIII 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":1,"min_IAF":10,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter IV 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":2},{"name":"Sonnenmotor EGH3 220hp","engine_type":0,"type":0,"era_sel":0,"displacement":20,"compression":5,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":50,"upgrades":[false,false,false,true],"rarity":3},{"name":"Wollsteinkraft Wagehals T 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Kurier L 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.99,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Bertha F2080 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.4,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2080 Über 270hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.8,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Contrarotary","engines":[{"name":"Nationales Motorbüro R-1860 160hp","engine_type":0,"type":3,"era_sel":1,"displacement":18.6,"compression":6,"cyl_per_row":11,"rows":1,"RPM_boost":0.65,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro R-1190 110hp","engine_type":0,"type":3,"era_sel":1,"displacement":11.9,"compression":6,"cyl_per_row":9,"rows":1,"RPM_boost":0.67,"material_fudge":1.2,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Air Cooled","engines":[{"name":"Braun UL 90hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun ULK 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.2,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs X 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.1,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun UX 150hp","engine_type":0,"type":1,"era_sel":1,"displacement":13.2,"compression":4.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.23,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Scholz Luchs III 30hp","engine_type":0,"type":1,"era_sel":1,"displacement":3.1,"compression":4.5,"cyl_per_row":3,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs VI 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Breitbusch Libelle \'320hp\'","engine_type":0,"type":1,"era_sel":1,"displacement":22.78,"compression":4.42,"cyl_per_row":9,"rows":1,"RPM_boost":1.31,"material_fudge":1.1,"quality_fudge":0.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Rosevear Ankou B 180hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.9,"compression":5.17,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":1.4,"quality_fudge":0.9,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Semi-Radial","engines":[{"name":"SLW Sigvird 180hp","engine_type":0,"type":4,"era_sel":1,"displacement":11,"compression":6,"cyl_per_row":4,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Rotary","engines":[{"name":"Modded Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Robur Herausforderer 180hp","engine_type":0,"type":2,"era_sel":1,"displacement":18,"compression":5.5,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":40,"upgrades":[false,false,true,true],"rarity":3},{"name":"Rhona Motorbau Z11 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z11tgl 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber B.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber G.IX 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber O.VII 50hp","engine_type":0,"type":2,"era_sel":1,"displacement":8,"compression":4.85,"cyl_per_row":7,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber L.VII 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber TG.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber T.IX 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.3 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Schreiber L.XIV 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1}]}]}');class x{constructor(t){this.constant=!1,this.name=t,this.list=[];const e=window.localStorage.getItem("engines."+this.name);null!=e&&this.fromJSON(JSON.parse(e));const s=window.localStorage.getItem("engines_names");let i=[];s&&(i=JSON.parse(s));let a=!1;for(const e of i)if(e==t){a=!0;break}a||i.push(t),window.localStorage.setItem("engines_names",JSON.stringify(i))}toJSON(){const t=[];for(const e of this.list)t.push(e.toJSON());return{name:this.name,engines:t}}fromJSON(t,e=!1){t.name&&(this.name=t.name),e&&(this.list=[]);for(const s of t.engines)try{this.push(new G(s),e)}catch(t){console.error(t)}}deserializeEngine(t){if(this.constant)throw"Engine List is Constant";const e=new G;return e.deserialize(t),this.push(e)}push(t,e=!1){if(this.constant)throw"Engine List is Constant";if(e)this.remove(t);else for(let e=0;e(""+t.name).localeCompare(e.name))),window.localStorage.setItem("engines."+this.name,JSON.stringify(this.toJSON())),this.find(t)}get(t){return t<0||t>=this.length?new G:this.list[t]}get_name(t){const e=this.find_name(t);return this.get(e)}get_stats(t){return t<0||t>=this.length?new F:this.list[t].PartStats()}get_stats_name(t){const e=this.find_name(t);return this.get_stats(e)}find(t){for(let e=0;e=0&&this.list.splice(e,1),window.localStorage.setItem("engines."+this.name,JSON.stringify(this.toJSON()))}remove_name(t){if(this.constant)throw"Engine List is Constant";const e=this.find_name(t);e>=0&&this.list.splice(e,1),window.localStorage.setItem("engines."+this.name,JSON.stringify(this.toJSON()))}get length(){return this.list.length}SetConstant(){this.constant=!0}}const I=new Map([["Custom",new x("Custom")]]);function T(){return I}function v(t){const e=T();for(const s of e.keys())if("Custom"!=s&&e.get(s).find_name(t)>=0)return s;return e.get("Custom").find_name(t)>=0?"Custom":""}var N,D,O,k,L;function W(t){return t==N.ORNITHOPTER_BASIC||t==N.ORNITHOPTER_FLUTTER||t==N.ORNITHOPTER_BUZZER}!function(t){t[t.AIRPLANE=0]="AIRPLANE",t[t.HELICOPTER=1]="HELICOPTER",t[t.AUTOGYRO=2]="AUTOGYRO",t[t.ORNITHOPTER_BASIC=3]="ORNITHOPTER_BASIC",t[t.ORNITHOPTER_FLUTTER=4]="ORNITHOPTER_FLUTTER",t[t.ORNITHOPTER_BUZZER=5]="ORNITHOPTER_BUZZER"}(N||(N={}));class H{FormatEquipment(t,e,s){return Math.abs(s)>.5?t.push({source:h(e),charge:s.toString()}):s>0&&s<1e-6&&t.push({source:h(e),charge:"-"}),t}}function q(t,e){for(let s=0;s0&&t.push({name:s.name,stats:s.stats.toJSON(),qty:s.qty});return window.localStorage.setItem("CustomParts",JSON.stringify(e)),{part_list:t}}fromJSON(t,e){for(const t of this.custom_parts)t.qty=0;for(const e of t.part_list){const t=this.custom_parts.findIndex((t=>t.name==e.name));-1==t?this.custom_parts.push({name:e.name,stats:new u(e.stats),qty:e.qty}):this.custom_parts[t].qty=e.qty}}serialize(t){const e=[];for(const t of this.custom_parts)t.qty>0&&e.push({name:t.name,stats:t.stats,qty:t.qty});t.PushNum(e.length);for(const s of e)t.PushString(s.name),s.stats.serialize(t),t.PushNum(s.qty)}deserialize(t){for(const t of this.custom_parts)t.qty=0;const e=t.GetNum();for(let i=0;it.name==e));-1==s?(s=this.custom_parts.length,this.custom_parts.push({name:e,stats:i,qty:a})):this.custom_parts[s].qty=a}}IsDefault(){for(const t of this.custom_parts)if(t.qty>0)return!1;return!0}ClearAll(){for(const t of this.custom_parts)t.qty=0}AddPart(t,e){var s=0;if(s+=Math.abs(e.drag),s+=Math.abs(e.mass),s+=Math.abs(e.wetmass),s+=Math.abs(e.bomb_mass),s+=Math.abs(e.cost),s+=Math.abs(e.upkeep),s+=Math.abs(e.liftbleed),s+=Math.abs(e.wingarea),s+=Math.abs(e.control),s+=Math.abs(e.pitchstab),s+=Math.abs(e.latstab),s+=Math.abs(e.maxstrain),s+=Math.abs(e.structure),s+=Math.abs(e.toughness),s+=Math.abs(e.power),s+=Math.abs(e.fuelconsumption),s+=Math.abs(e.fuel),s+=Math.abs(e.charge),s+=Math.abs(e.crashsafety),s+=Math.abs(e.visibility),s+=Math.abs(e.escape),s+=Math.abs(e.reliability),0==(s+=Math.abs(e.warnings.length)))return;const i=this.custom_parts.findIndex((e=>e.name==t));-1!=i?this.custom_parts[i].stats=e:this.custom_parts.push({name:t,stats:e,qty:0}),this.custom_parts.sort(((t,e)=>t.name.localeCompare(e.name))),this.CalculateStats()}RemovePart(t){const e=this.custom_parts.findIndex((e=>e.name==t));-1!=e&&this.custom_parts.splice(e,1),this.CalculateStats()}GetParts(){return this.custom_parts}SetUsedPart(t,e){this.custom_parts[t].qty=e,this.CalculateStats()}PartStats(){var t=new u;for(const e of this.custom_parts)if(e.qty>0){let s=e.stats.Clone();s=s.Multiply(e.qty),t=t.Add(s)}return t}GetElectrics(){var t=[];for(const e of this.custom_parts)e.qty>0&&(t=this.FormatEquipment(t,e.name,e.stats.charge));return{storage:0,equipment:t}}SetCalculateStats(t){this.CalculateStats=t}}class z extends H{constructor(t){super(),this.selected=0,this.vals=[];for(const e of t.options){const t={name:e.name,maxbomb:e.maxbomb,cant_lift:e.cant_lift,stats:new u(e)};this.vals.push(t)}}toJSON(){return{selected:this.selected}}fromJSON(t,e){this.selected=t.selected,e<10.35&&this.selected>2&&this.selected++}serialize(t){t.PushNum(this.selected)}deserialize(t){this.selected=t.GetNum()}GetSelected(){return this.selected}GetSelectedText(){return this.vals[this.selected].name}SetSelected(t){this.selected=t,this.CalculateStats()}GetEraOptions(){return this.vals}GetLiftBleed(){return this.vals[this.selected].stats.liftbleed}GetMaxBomb(){return this.vals[this.selected].maxbomb}GetCantLift(){return this.vals[this.selected].cant_lift}PartStats(){var t=new u;return t.Add(this.vals[this.selected].stats)}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class J extends H{constructor(t,e,s,i){super(),this.stats=new u,this.types=t,this.upgrades=e,this.safety=s,this.gunsights=i,this.selected_type=0,this.selected_upgrades=[...Array(this.upgrades.length).fill(!1)],this.selected_safety=[...Array(this.safety.length).fill(!1)],this.selected_gunsights=[...Array(this.gunsights.length).fill(!1)],this.total_stress=[0,0],this.total_escape=0,this.total_visibility=0,this.seat_index=0,this.bombsight=0,this.is_armed=!1}toJSON(){return{type:this.selected_type,upgrades:this.selected_upgrades,safety:this.selected_safety,sights:this.selected_gunsights,bombsight:this.bombsight}}fromJSON(t,e){this.selected_type=t.type,this.selected_upgrades=b(t.upgrades,this.selected_upgrades.length),this.selected_safety=b(t.safety,this.selected_safety.length),this.selected_gunsights=b(t.sights,this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),e>10.35&&(this.bombsight=t.bombsight)}serialize(t){t.PushNum(this.selected_type),t.PushBoolArr(this.selected_upgrades),t.PushBoolArr(this.selected_safety),t.PushBoolArr(this.selected_gunsights),t.PushNum(this.bombsight)}deserialize(t){this.selected_type=t.GetNum(),this.selected_upgrades=t.GetBoolArr(this.selected_upgrades.length),this.selected_safety=t.GetBoolArr(this.selected_safety.length),this.selected_gunsights=t.GetBoolArr(this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),t.version>10.35&&(this.bombsight=t.GetNum())}GetTypeList(){return this.types}GetUpgradeList(){return this.upgrades}GetSafetyList(){return this.safety}GetGunsightList(){return this.gunsights}GetType(){return this.selected_type}SetType(t){if(t>=this.types.length)throw"Selected type is not in range of actual types.";this.selected_type=t,this.CalculateStats()}GetSelectedUpgrades(){return this.selected_upgrades}SetUpgrade(t,e){if(t>=this.upgrades.length)throw"Selected type is not in range of actual upgrades.";this.selected_upgrades[t]=e,this.CalculateStats()}GetSelectedSafety(){return this.selected_safety}CanSafety(){const t=Array(this.safety.length).fill(!0);return t[5]=!this.types[this.selected_type].exposed,t}SetSafety(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual safties.";this.selected_safety[t]=e,this.CalculateStats()}GetSelectedGunsights(){return this.selected_gunsights}SetGunsight(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual gunsights.";this.selected_gunsights[t]=e,this.CalculateStats()}GetVisibility(){return this.types[this.selected_type].stats.visibility<-10?-1/0:this.total_visibility}GetFlightStress(){return this.total_stress}GetEscape(){return this.total_escape}GetCrash(){return this.total_crash}GetAttack(){var t=0;for(let e=0;e0&&(t=t-t%3+1),this.bombsight=t,this.CalculateStats()}SetHasRotary(t){this.has_rotary=t}IsElectrics(){return 0!=this.stats.charge}IsCopilot(){return this.selected_upgrades[0]}SetArmed(t){this.is_armed=t}GetName(){return this.IsPrimary()?"Crew Pilot":this.bombsight>0?"Crew Bombadier":this.IsCopilot()?"Crew Co-Pilot":this.is_armed?"Crew Gunner":"Crew Aircrew"}PartStats(){let t=new u;t.reqsections=1,t=t.Add(this.types[this.selected_type].stats);for(let e=0;e0&&(t.cost+=Math.floor(2.000001+(this.bombsight-4)/3),t.warnings.push({source:h("Bombsight"),warning:h("Bombsight Warning 1")+this.bombsight.toString()+h("Bombsight Warning 2"),color:c.WHITE}),this.IsCopilot()&&t.warnings.push({source:h("Bombadier Controls"),warning:h("Bombadier Controls Warning"),color:c.WHITE})),this.stats=t.Clone(),this.selected_upgrades[0]?(t.flightstress=this.upgrades[0].stats.flightstress,this.stats.flightstress-=t.flightstress):t.flightstress=0,t}CrewUpdate(t,e,s,i,a,n){this.total_escape=this.stats.escape+t;let r=this.stats.flightstress,o=this.stats.flightstress;(this.IsPrimary()||this.selected_upgrades[0])&&(r+=e,o+=e-2*i),r=Math.max(0,r),o=Math.max(0,o),r+=s,o+=s,this.IsOpen()&&this.has_rotary&&(r+=1,o+=1),r=Math.max(0,r),o=Math.max(0,o),this.total_stress=[r,o],this.total_visibility=this.stats.visibility+a,this.total_crash=this.stats.crashsafety+n}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){var t=[];for(let e=0;et;)this.positions.pop();var e=null;for(this.positions.length>0&&(e=JSON.stringify(this.positions[this.positions.length-1].toJSON()));this.positions.length0}GetConnected(){return this.connected}SetConnected(t){this.connected=t,this.CalculateStats()}PartStats(){const t=new u;return t.reqsections=2*Math.ceil((this.seats+2*this.beds)/5-1e-6),this.seats+this.beds>0&&this.connected&&(t.mass=1,t.warnings.push({source:h("Passengers Section Title"),warning:h("Passenger Connectivity Warning"),color:c.WHITE})),t.bomb_mass+=this.seats+this.beds,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),this.seats+this.beds>0&&t.warnings.push({source:h("Passengers Section Title"),warning:h("Passengers Count",this.seats,this.beds),color:c.WHITE}),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class Q extends H{constructor(t,e){super();const s=T();if(this.elist_idx="Custom",this.etype_stats=s.get(this.elist_idx).get_stats(0),this.etype_inputs=s.get(this.elist_idx).get(0),this.cooling_count=this.etype_stats.stats.cooling,this.radiator_index=-1,this.cooling_count>0&&(this.radiator_index=0),this.num_radiators=0,this.mount_list=t,this.mount_sel=0,this.intake_fan=!1,this.use_pp=!1,this.torque_to_struct=!1,this.cowl_list=e,this.cowl_sel=0,this.use_ds=!1,this.outboard_prop=!1,this.gp_count=0,this.gpr_count=0,this.total_reliability=0,this.is_generator=!1,this.has_alternator=!1,s.get(this.elist_idx).length<=0)throw"No Engine Stats Found. Should be at least one."}toJSON(){return{selected_stats:this.etype_stats.toJSON(),selected_inputs:this.etype_inputs.toJSON(),cooling_count:this.cooling_count,radiator_index:this.radiator_index,selected_mount:this.mount_sel,use_pushpull:this.use_pp,pp_torque_to_struct:this.torque_to_struct,use_driveshafts:this.use_ds,geared_propeller_ratio:this.gp_count,geared_propeller_reliability:this.gpr_count,cowl_sel:this.cowl_sel,is_generator:this.is_generator,has_alternator:this.has_alternator,intake_fan:this.intake_fan,outboard_prop:this.outboard_prop}}oldJSON(t,e){const s=t.selected_stats;if(this.etype_stats.fromJSON(s,e),this.etype_inputs=new G,this.etype_stats.pulsejet&&s.input_pj){this.etype_inputs=new G,this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=y.PULSEJET;const t=s.input_pj;this.etype_inputs.type=t.type,this.etype_inputs.power=t.power,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.quality_cost=t.quality_cost,this.etype_inputs.quality_rely=t.quality_rely,this.etype_inputs.starter=t.starter}else if(s.input_eb){this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=y.PROPELLER;const t=s.input_eb;this.etype_inputs.displacement=t.displacement,this.etype_inputs.compression=t.compression,this.etype_inputs.type=t.type,this.etype_inputs.cyl_per_row=t.cyl_per_row,this.etype_inputs.rows=t.rows,this.etype_inputs.RPM_boost=t.RPM_boost,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.material_fudge=t.material_fudge,this.etype_inputs.quality_fudge=t.quality_fudge,this.etype_inputs.upgrades=t.upgrades,6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.compressor_type,this.etype_inputs.compressor_count=t.compressor_count,this.etype_inputs.min_IdealAlt=t.min_IAF)}else this.etype_stats.altitude=10*this.etype_stats.altitude-1;return this.etype_inputs}fromJSON(t,e){const s=T();let i="";if(e>10.55){this.etype_stats.fromJSON(t.selected_stats,e);const a=new G(t.selected_inputs);i=v(this.etype_stats.name),""==i&&(i="Custom","Default"!=a.name&&s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name)}else{const a=this.oldJSON(t,e);"Default"!=a.name&&(i=v(this.etype_stats.name),""==i&&(i="Custom",s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name))}this.elist_idx=i,this.cooling_count=t.cooling_count,this.radiator_index=t.radiator_index,this.mount_sel=t.selected_mount,this.use_pp=t.use_pushpull,this.torque_to_struct=t.pp_torque_to_struct,this.use_ds=t.use_driveshafts,this.gp_count=t.geared_propeller_ratio,this.gpr_count=t.geared_propeller_reliability,this.cowl_sel=t.cowl_sel,this.is_generator=t.is_generator,this.has_alternator=t.has_alternator,this.intake_fan=t.intake_fan,this.outboard_prop=e>=12.15&&t.outboard_prop}serialize(t){this.etype_stats.serialize(t),this.etype_inputs.serialize(t),t.PushNum(this.cooling_count),t.PushNum(this.radiator_index),t.PushNum(this.mount_sel),t.PushBool(this.use_pp),t.PushBool(this.torque_to_struct),t.PushBool(this.use_ds),t.PushNum(this.gp_count),t.PushNum(this.gpr_count),t.PushNum(this.cowl_sel),t.PushBool(this.is_generator),t.PushBool(this.has_alternator),t.PushBool(this.intake_fan),t.PushBool(this.outboard_prop)}oldDeserialize(t){return this.etype_stats.name=t.GetString(),this.etype_stats.overspeed=t.GetNum(),this.etype_stats.altitude=t.GetNum(),this.etype_stats.torque=t.GetNum(),this.etype_stats.rumble=t.GetNum(),this.etype_stats.oiltank=t.GetBool(),this.etype_stats.pulsejet=t.GetBool(),this.etype_inputs=new G,t.version>10.45?(this.etype_inputs.name=this.etype_stats.name,this.etype_stats.pulsejet?(this.etype_inputs.engine_type=y.PULSEJET,this.etype_inputs.power=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.quality_cost=t.GetNum(),this.etype_inputs.quality_rely=t.GetNum(),this.etype_inputs.starter=t.GetBool()):(this.etype_inputs.displacement=t.GetNum(),this.etype_inputs.compression=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.cyl_per_row=t.GetNum(),this.etype_inputs.rows=t.GetNum(),this.etype_inputs.RPM_boost=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.material_fudge=t.GetNum(),this.etype_inputs.quality_fudge=t.GetNum(),this.etype_inputs.upgrades=t.GetBoolArr(0),6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.GetNum(),this.etype_inputs.compressor_count=t.GetNum(),this.etype_inputs.min_IdealAlt=t.GetNum()))):this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_stats.stats.deserialize(t),this.etype_inputs}deserialize(t){const e=T();var s="";if(t.version>10.55){this.etype_stats.deserialize(t);const i=new G;i.deserialize(t),""==(s=v(this.etype_stats.name))&&(s="Custom","Default"!=i.name&&e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name)}else{const i=this.oldDeserialize(t);"Default"!=i.name&&(""==(s=v(this.etype_stats.name))&&(s="Custom",e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name))}this.cooling_count=t.GetNum(),this.radiator_index=t.GetNum(),this.mount_sel=t.GetNum(),this.use_pp=t.GetBool(),this.torque_to_struct=t.GetBool(),this.use_ds=t.GetBool(),this.gp_count=t.GetNum(),this.gpr_count=t.GetNum(),this.cowl_sel=t.GetNum(),this.is_generator=t.GetBool(),this.has_alternator=t.GetBool(),this.intake_fan=t.GetBool(),t.version>=12.15?this.outboard_prop=t.GetBool():this.outboard_prop=!1,this.elist_idx=s}GetMinAltitude(){return this.etype_inputs.min_IdealAlt}GetMaxAltitude(){return this.GetMinAltitude()+this.etype_stats.altitude}GetMinIAF(){return Math.floor(1e-6+this.GetMinAltitude()/10)}GetMaxIAF(){return Math.floor(1e-6+this.GetMaxAltitude()/10)}CanSelectIndex(){const t=T().get(this.elist_idx),e=[...Array(t.length).fill(!0)];if(this.is_internal)for(let s=0;s0}WarnCoolingReliability(){return this.cooling_count=t&&(this.radiator_index=t-1),this.radiator_index<0&&t>0&&(this.radiator_index=0)}GetNumRadiators(){return this.num_radiators}SetRadiator(t){this.radiator_index=t,this.CalculateStats()}GetRadiator(){return this.radiator_index}CanIntakeFan(){return this.IsAirCooled()}SetIntakeFan(t){this.intake_fan=t,this.CalculateStats()}GetIntakeFan(){return this.intake_fan}CanOutboardProp(){return this.use_ds&&(this.IsTractor()||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}GetOutboardProp(){return this.outboard_prop}SetOutboardProp(t){t&&this.use_ds?this.outboard_prop=!0:this.outboard_prop=!1,this.CalculateStats()}SetSelectedList(t){t!=this.elist_idx&&(this.elist_idx=t,this.SetSelectedIndex(0))}GetSelectedList(){return this.elist_idx}GetListOfEngines(){return T().get(this.elist_idx)}RequiresExtendedDriveshafts(){return!this.is_internal&&this.mount_list[this.mount_sel].reqED}SetTailMods(t,e,s){!this.mount_list[this.mount_sel].reqTail||t||e||this.GetGenerator()||(this.use_ds=!0),!this.mount_list[this.mount_sel].reqED||this.GetGenerator()||s&&(t||e)||(this.use_ds=!0)}CanMountIndex(){var t=[...Array(this.mount_list.length).fill(!0)];if(this.is_internal)for(let e=0;e=this.mount_list.length)throw"Index outside of mount_list range.";this.mount_sel=t,this.mount_list[this.mount_sel].reqED?this.SetUseExtendedDriveshaft(!0):this.CalculateStats()}GetMountIndex(){return this.GetIsPulsejet()?-1:this.mount_sel}CanUsePushPull(){return!(this.is_generator||this.GetIsJet()||this.is_internal||this.mount_list[this.mount_sel].helicopter)}SetUsePushPull(t){this.use_pp=t,t?(this.cooling_count*=2,"fuselage"==this.mount_list[this.mount_sel].mount_type&&(this.mount_sel=8)):(this.cooling_count=Math.floor(1e-6+this.cooling_count/2),"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(this.mount_sel=0)),this.CalculateStats()}GetUsePushPull(){return this.use_pp}GetMountList(){return this.mount_list}CanUseExtendedDriveshaft(){return!(0==this.GetNumPropellers()||this.is_internal||this.GetGenerator()||this.mount_list[this.mount_sel].helicopter)}SetUseExtendedDriveshaft(t){this.GetGenerator()||this.is_internal?this.use_ds=!1:this.use_ds=t,this.CalculateStats()}GetUseExtendedDriveshaft(){return this.use_ds}CanUseGears(){return!(0==this.GetNumPropellers()||this.GetGenerator())}SetGearCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gp_count=t,this.SetGearReliability(this.gpr_count)}GetGearCount(){return this.gp_count}SetGearReliability(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gpr_count=Math.min(t,this.gp_count),this.CalculateStats()}GetGearReliability(){return this.gpr_count}SetTorqueToStruct(t){this.torque_to_struct=t,this.use_pp||(this.torque_to_struct=!1),this.CalculateStats()}GetTorqueToStruct(){return this.torque_to_struct}CanTorqueToStruct(){return this.use_pp&&this.etype_stats.torque>0&&"pod"!=this.mount_list[this.mount_sel].mount_type}UpdateReliability(t){this.total_reliability=this.etype_stats.stats.reliability,this.total_reliability-=this.gp_count-this.gpr_count,this.total_reliability+=this.cowl_list[this.cowl_sel].stats.reliability,this.NeedCooling()&&(this.total_reliability-=this.GetMaxCooling()-this.cooling_count),this.GetIntakeFan()&&(this.total_reliability+=6),this.total_reliability+=t}GetReliability(){return this.use_pp?this.outboard_prop?this.total_reliability.toString()+"/"+(this.total_reliability-2).toString():this.total_reliability.toString()+"/"+this.total_reliability.toString():this.outboard_prop?(this.total_reliability-2).toString():this.total_reliability.toString()}GetOverspeed(){return this.is_generator?1e3:this.etype_stats.overspeed+Math.floor(1e-6+this.gp_count*this.etype_stats.overspeed/2)}GetIsPulsejet(){return this.etype_stats.pulsejet}GetIsJet(){return this.GetIsPulsejet()||this.GetIsTurbine()&&!this.GetIsTurboprop()}PulseJetCheck(){this.GetIsPulsejet()&&(this.use_pp=!1,this.use_ds=!1,this.gp_count=0,this.gpr_count=0,this.cooling_count=0,this.has_alternator=!1,this.is_generator=!1,this.cowl_sel=0,this.radiator_index=-1)}GetIsTurbine(){return this.etype_inputs.engine_type==y.TURBOMACHINERY}GetIsTurboprop(){return this.etype_inputs.engine_type==y.TURBOMACHINERY&&3==this.etype_inputs.type}TurbineCheck(){this.GetIsTurbine()&&(0==this.GetNumPropellers()&&(this.use_ds=!1,this.gp_count=0,this.gpr_count=0),this.cooling_count=0,this.cowl_sel=0,this.radiator_index=-1)}GetNumPropellers(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.GetGenerator())||this.GetIsTurboprop()||this.is_internal?this.use_pp?2:1:0}GetIsTractorNacelle(){return this.GetNumPropellers()>0&&!this.GetUsePushPull()&&.8==this.mount_list[this.mount_sel].powerfactor&&!this.is_internal}IsLiquidCooled(){return this.NeedCooling()}IsRotary(){return this.etype_stats.oiltank}IsContraRotary(){return!this.GetIsPulsejet()&&!this.GetIsTurbine()&&""!=this.elist_idx&&3==this.etype_inputs.type}IsAirCooled(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.IsLiquidCooled()||this.IsRotary())}GetCowlList(){return this.cowl_list}GetCowl(){return this.cowl_sel}GetCowlEnabled(){const t=[];for(const e of this.cowl_list)this.GetIsPulsejet()||this.GetIsTurbine()?t.push(e.air&&e.rotary&&e.liquid):this.IsLiquidCooled()?t.push(e.liquid):this.IsRotary()?t.push(e.rotary):t.push(e.air);return t}GetHasOilTank(){return this.etype_stats.oiltank}GetHasOilCooler(){return this.etype_stats.stats.cooling>0}GetHasOilPan(){return this.IsAirCooled()}VerifyCowl(t){const e=this.GetCowlEnabled();e[t]&&(this.cowl_sel=t),e[this.cowl_sel]||(this.cowl_sel=0)}SetCowl(t){this.VerifyCowl(t),this.CalculateStats()}GetGeneratorEnabled(){return!(this.GetIsPulsejet()||this.use_pp||this.GetIsElectric())}GetGenerator(){return this.is_generator}SetGenerator(t){this.GetGeneratorEnabled()?this.is_generator=t:this.is_generator=!1,this.is_generator&&(this.gp_count=0,this.gpr_count=0,this.use_ds=!1,this.use_pp=!1),this.CalculateStats()}GetIsElectric(){return this.etype_inputs.engine_type==y.ELECTRIC}GetAlternatorEnabled(){return!(this.GetIsPulsejet()||this.is_generator||this.GetIsElectric())}GetAlternator(){return this.has_alternator}SetAlternator(t){this.GetAlternatorEnabled()?this.has_alternator=t:this.has_alternator=!1,this.CalculateStats()}GetRumble(){return this.etype_stats.rumble}IsTractor(){return!(this.is_internal||this.GetGenerator()||"Tractor"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetTractorSpinner(){return{has:this.IsTractor()&&!(this.outboard_prop&&!this.use_pp),spinner:this.GetSpinner()}}IsPusher(){return!(this.is_internal||this.GetGenerator()||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetPusherSpinner(){return{has:this.IsPusher()&&!this.outboard_prop,spinner:this.GetSpinner()}}GetSpinner(){if(this.gp_count>0&&!this.GetGenerator()){if(this.use_ds&&("Center-Mounted Tractor"==this.mount_list[this.mount_sel].name||"Center-Mounted Pusher"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name))return[!0,!0];if(!this.etype_stats.oiltank)return[!0,!1]}return[!1,!1]}IsElectrics(){return this.has_alternator||this.GetGenerator()}GetEngineHeight(){return this.GetGenerator()?5:"Pod"==this.mount_list[this.mount_sel].name||this.etype_stats.pulsejet||this.is_internal||this.outboard_prop?2:"Nacelle (Offset)"==this.mount_list[this.mount_sel].name?1:"Nacelle (Inside)"==this.mount_list[this.mount_sel].name||"Channel Tractor"==this.mount_list[this.mount_sel].name||"Wing Pod"==this.mount_list[this.mount_sel].name?0:-1}IsTractorRotary(){return!this.GetGenerator()&&this.IsRotary()&&("Tractor"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}IsDiesel(){return this.etype_inputs.upgrades[3]}SetCalculateStats(t){this.CalculateStats=t}SetInternal(t){this.is_internal=t,t&&(this.use_ds=!1)}VerifyMount(){if(this.GetIsTurbine()&&!this.GetIsTurboprop())for(;!this.mount_list[this.mount_sel].turbine;)this.mount_sel++;else if(this.GetIsPulsejet()){if("fuselage"==this.mount_list[this.mount_sel].mount_type)for(let t=0;t0&&t.era.push({name:"Propeller Gearing",era:"WWI"}),this.gpr_count>0&&t.era.push({name:"Reliable Gearing",era:"Roaring 20s"}),this.use_ds&&(t.mass+=1),t=t.Add(this.cowl_list[this.cowl_sel].stats),t.mass+=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].mpd),t.drag=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].ed),this.use_pp&&(t.power*=2,t.mass*=2,t.cooling*=2,t.fuelconsumption*=2,t.cost*=2,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.upkeep*=2,t.reqsections*=2,t.charge*=2,t.power=Math.floor(1e-6+this.mount_list[this.mount_sel].powerfactor*t.power)),"No Cowling"==this.cowl_list[this.cowl_sel].name||"Sealed Cowl"==this.cowl_list[this.cowl_sel].name||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name||(t.cost+=2),this.IsAirCooled()&&this.intake_fan?(t.mass+=3,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.cost+=4,t.era.push({name:"Air Cooling Fan",era:"WWII"})):this.intake_fan=!1,this.GetHasOilCooler()&&(t.drag+=Math.floor(t.power/15)),this.GetIsPulsejet()||(t=t.Add(this.mount_list[this.mount_sel].stats),t.maxstrain-=Math.floor(1e-6+this.mount_list[this.mount_sel].strainfactor*this.etype_stats.stats.mass),t.drag+=Math.floor(1e-6+this.mount_list[this.mount_sel].dragfactor*this.etype_stats.stats.mass)),this.is_generator?(t.charge=Math.floor(1e-6+2*t.power/10)+2,t.power=0,t.visibility=2):this.has_alternator&&(t.charge=Math.floor(1e-6+t.power/10)+1,t.mass+=1,t.cost+=2,this.use_pp&&"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(t.mass+=1,t.cost+=2)),this.outboard_prop&&(t.drag+=3,this.use_pp&&(t.escape+=2)),this.is_first_pulsejet&&(t.cost+=5),t.pitchspeed=0,t.reliability=0,t}GetElectrics(){return{storage:0,equipment:[]}}}class V extends H{constructor(t,e,s){super(),this.need_cool=0,this.idx_type=1,this.idx_mount=1,this.idx_coolant=0,this.metal_area=0,this.engine_count=0,this.type_list=t,this.mount_list=e,this.coolant_list=s,this.harden_cool=!1}toJSON(){return{type:this.idx_type,mount:this.idx_mount,coolant:this.idx_coolant,harden_cool:this.harden_cool}}fromJSON(t,e){this.idx_type=t.type,this.idx_mount=t.mount,this.idx_coolant=t.coolant,e>10.85&&(this.harden_cool=t.harden_cool)}serialize(t){t.PushNum(this.idx_type),t.PushNum(this.idx_mount),t.PushNum(this.idx_coolant),t.PushBool(this.harden_cool)}derserialize(t){this.idx_type=t.GetNum(),this.idx_mount=t.GetNum(),this.idx_coolant=t.GetNum(),t.version>10.85&&(this.harden_cool=t.GetBool())}GetTypeList(){return this.type_list}GetMountList(){return this.mount_list}GetCoolantList(){return this.coolant_list}CanType(){const t=[...Array(this.type_list.length).fill(!0)];for(let e=0;et;)this.engines.pop();var e=null;for(this.engines.length>0&&(e=JSON.stringify(this.engines[this.engines.length-1].toJSON()));this.engines.lengtht;)this.radiators.pop();for(;this.radiators.length0&&!this.NeedCooling()&&this.SetNumberOfRadiators(0),this.radiators.length}NeedCooling(){let t=!1;for(const e of this.engines)t=t||e.NeedCooling();return t}UpdateReliability(t){for(const e of this.engines){let s=new u;e.GetRadiator()=0&&(s=this.radiators[e.GetRadiator()].PartStats()),e.UpdateReliability(t.reliability+s.reliability)}}SetAsymmetry(t){this.is_asymmetric=t,this.CalculateStats()}GetAsymmetry(){return this.is_asymmetric}GetNumPropellers(){var t=0;for(const e of this.engines)t+=e.GetNumPropellers();return t}GetOverspeed(){let t=100;for(const e of this.engines)t=Math.min(t,e.GetOverspeed());return t}GetRumble(){var t=0;for(const e of this.engines)t+=e.GetRumble();return t}GetMaxRumble(){var t=0;for(const e of this.engines)t=Math.max(t,e.GetRumble());return t}GetTractorSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetTractorSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}GetPusherSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetPusherSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}IsElectrics(){for(const t of this.engines)if(t.IsElectrics())return!0;return!1}HaveParasol(t){for(const e of this.radiators)e.SetParasol(t)}SetMetalArea(t){for(const e of this.radiators)e.SetMetalArea(t)}SetTailMods(t,e,s){for(const i of this.engines)i.SetTailMods(t,e,s)}GetEngineHeight(){var t=2;for(const e of this.engines)t=Math.min(t,e.GetEngineHeight());return t}HasTractorRotary(){for(const t of this.engines)if(t.IsTractorRotary())return!0;return!1}SetInternal(t){for(const e of this.engines)e.SetInternal(t);if(t)for(const t of this.radiators)t.SetMetalArea(0),t.SetParasol(!1)}HasPulsejet(){for(const t of this.engines)if(t.GetIsPulsejet())return!0;return!1}HasTurbineNoProp(){for(const t of this.engines)if(t.GetIsTurbine()&&0==t.GetNumPropellers())return!0;return!1}HasDiesel(){for(const t of this.engines)if(t.IsDiesel())return!0;return!1}GetEngineTypes(){var t=[];for(const e of this.engines)e.GetNumPropellers()>0?t.push({type:C.PROPELLER,num:e.GetNumPropellers()}):e.GetIsPulsejet()?t.push({type:C.PULSEJET,num:0}):e.GetIsTurbine()&&t.push({type:C.TURBINE,num:e.GetCurrentStats().stats.pitchspeed});return t}GetIsFlammable(){for(const t of this.radiators)if(t.GetIsFlammable())return!0;return!1}PartStats(){var t=new u;const e=new Array(this.GetNumberOfRadiators()).fill(null).map((()=>({cool:0,count:0})));var s=0,i=100,a=!1,r=2;for(let n of this.engines){!a&&n.GetIsPulsejet()?(a=!0,n.SetFirstPulsejet(!0)):n.SetFirstPulsejet(!1);const o=n.PartStats();r=Math.min(r,o.visibility),t=t.Add(o),n.NeedCooling()&&(e[n.GetRadiator()].cool+=n.GetCooling(),e[n.GetRadiator()].count+=1),s+=n.GetCurrentStats().stats.cost,o.pitchspeed>0&&(i=Math.min(i,o.pitchspeed))}t.visibility=r,i<100&&(t.pitchspeed=i),t.upkeep=Math.floor(1e-6+Math.min(t.upkeep,s));let o=new u;const l=new Map;for(let t=0;t0?t.warnings.push({source:h("Rotary"),warning:h("Rotary Right Warning"),color:c.WHITE}):m<0&&t.warnings.push({source:h("Rotary"),warning:h("Rotary Left Warning"),color:c.WHITE}),t.reliability=0,t}SetCalculateStats(t){this.CalculateStats=t}GetHasTractorNacelles(){let t=0;for(const e of this.engines)e.GetIsTractorNacelle()&&t++;return t>1}GetElectrics(){let t={storage:0,equipment:[]};for(let e=0;e10.25&&(this.sel_skin=t.sel_skin),this.interal_bracing_count=this.CountInternalBracing()}serialize(t){t.PushNum(this.section_list.length);for(let e=0;e10.25&&(this.sel_skin=t.GetNum()),this.interal_bracing_count=this.CountInternalBracing()}DuplicateSection(t,e=1){const s=this.section_list[t];for(let i=0;ithis.CountSections()+this.tail_section_list.length)for(let t=this.section_list.length-1;t>=0;t--)if(this.section_list[t].internal_bracing){this.interal_bracing_count--,this.section_list.splice(t,1);break}e&&this.CalculateStats()}}SetRequiredSections(t){if(this.required_sections=t,this.required_sections>this.CountSections()&&(0==this.section_list.length&&this.section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),this.required_sections-this.CountSections()>0))for(let t=this.section_list.length-1;t>=0;t--)if(!this.section_list[t].internal_bracing)return void this.DuplicateSection(t,this.required_sections-this.CountSections())}SetRequiredTailSections(t){for(t>this.tail_section_list.length&&(0==this.tail_section_list.length&&this.tail_section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),t-this.tail_section_list.length>0&&this.DuplicateTailSection(this.tail_section_list.length-1,t-this.tail_section_list.length));t0&&!this.section_list[t].internal_bracing;t--);this.DeleteSection(t,!1)}this.CalculateStats()}CountSections(){return this.section_list.length-this.interal_bracing_count}GetNumFrames(){return this.CountSections()+this.tail_section_list.length}CountInternalBracing(){var t=0;for(const e of this.section_list)e.internal_bracing&&t++;return t}BaseType(){const t=[...Array(this.frame_list.length).fill(0)];for(const e of this.section_list)e.internal_bracing||t[e.frame]++;for(const e of this.tail_section_list)e.internal_bracing||t[e.frame]++;var e=0,s=0;for(let i=t.length-1;i>=0;i--)t[i]>s&&(s=t[i],e=i);return e}GetFrameList(){return this.frame_list}GetSkinList(){return this.skin_list}GetSectionList(){return this.section_list}SetFrame(t,e){this.section_list[t].frame=e,this.frame_list[e].geodesic||(this.section_list[t].geodesic=!1),this.CalculateStats()}SetGeodesic(t,e){this.frame_list[this.section_list[t].frame].geodesic&&(this.section_list[t].geodesic=e,this.CalculateStats())}SetMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].monocoque=e,this.CalculateStats())}SetLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].lifting_body=e,this.CalculateStats())}SetInternalBracing(t,e){e&&!this.section_list[t].internal_bracing&&this.PossibleInternalBracing(!0)&&this.CountSections()>this.required_sections?(this.section_list[t].internal_bracing=!0,this.section_list[t].monocoque=!1,this.section_list[t].lifting_body=!1,this.interal_bracing_count++,this.CalculateStats()):e||(this.section_list[t].internal_bracing=!1,this.interal_bracing_count--,this.CalculateStats())}PossibleInternalBracing(t=!1){var e=this.CountSections();return this.farman||(e+=this.tail_section_list.length),t&&(e-=1),this.interal_bracing_count+1<=e}PossibleGeodesic(t){return this.frame_list[this.section_list[t].frame].geodesic&&!this.section_list[t].monocoque}PossibleMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].lifting_body}PossibleLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].monocoque}PossibleTailGeodesic(t){return this.frame_list[this.tail_section_list[t].frame].geodesic&&!this.tail_section_list[t].monocoque}PossibleTailMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].lifting_body}PossibleTailLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].monocoque}PossibleRemoveSections(){return this.CountSections()>this.required_sections}GetFarmanOrBoom(){return this.farman||this.boom}SectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),t.internal_bracing||(e.drag+=4,t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}TailSectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),e.drag+=4,this.farman||(t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}CountMainLiftingBody(){var t=0;for(const e of this.section_list)e.lifting_body&&t++;return t}CountTailLiftingBody(){var t=0;for(const e of this.tail_section_list)e.lifting_body&&t++;return t}CountLiftingBody(){return this.CountMainLiftingBody()+this.CountTailLiftingBody()}SetIsTandem(t){this.is_tandem!=t&&(this.is_tandem=t,this.SetTailType(this.sel_tail))}SetTailType(t){0==this.tail_list[t].stats.reqsections&&this.is_tandem&&t++,this.sel_tail=t,this.SetRequiredTailSections(this.tail_list[t].stats.reqsections)}GetTailType(){return this.sel_tail}GetTailList(){return this.tail_list}GetTailSectionList(){return this.tail_section_list}SetUseFarman(t){if(this.farman=t,t&&this.boom&&(this.boom=!1),this.farman)for(const t of this.tail_section_list)t.monocoque=!1,t.lifting_body=!1;this.CalculateStats()}GetUseFarman(){return this.farman}SetUseBoom(t){this.boom=t,t&&this.farman&&(this.farman=!1),this.CalculateStats()}GetUseBoom(){return this.boom}SetTailFrame(t,e){this.tail_section_list[t].frame=e,this.frame_list[e].geodesic||(this.tail_section_list[t].geodesic=!1),this.CalculateStats()}SetTailGeodesic(t,e){this.frame_list[this.tail_section_list[t].frame].geodesic&&(this.tail_section_list[t].geodesic=e,this.CalculateStats())}SetTailMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].monocoque=e,this.CalculateStats())}SetTailLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].lifting_body=e,this.CalculateStats())}SetHasTractorNacelles(t){this.has_tractor_nacelles=t}GetHasTractorNacelles(){return this.has_tractor_nacelles}CanFlyingWing(){for(const t of this.section_list)if(t.lifting_body)return!0;for(const t of this.tail_section_list)if(t.lifting_body)return!0;return!1}GetFlyingWing(){return this.flying_wing}SetFlyingWing(t){t&&this.CanFlyingWing()?this.flying_wing=!0:this.flying_wing=!1,this.CalculateStats()}GetIsTailless(){return 0==this.tail_section_list.length}SetAllFrame(t){for(const e of this.section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);for(const e of this.tail_section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);this.CalculateStats()}SetAllSkin(t){this.sel_skin=t;for(const e of this.section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);for(const e of this.tail_section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);this.CalculateStats()}GetArmor(){return"Dragon Skin"==this.skin_list[this.sel_skin].name?5:0}GetIsFlammable(){return!!this.skin_list[this.sel_skin].flammable}GetSkin(){return this.sel_skin}CanCutout(){let t=this.section_list.length*this.skin_list[this.sel_skin].stats.visibility;return this.farman?t+=this.tail_section_list.length:t+=this.tail_section_list.length*this.skin_list[this.sel_skin].stats.visibility,t<3}SetCalculateStats(t){this.CalculateStats=t}PartStats(){this.CanFlyingWing()||(this.flying_wing=!1);var t=new u;const e=this.BaseType();t.structure=this.frame_list[e].basestruct,t.cost=this.frame_list[e].basecost;var s=this.skin_list[this.sel_skin].monocoque_structure<0;for(const e of this.section_list)t=t.Add(this.SectionStats(e)),s=s&&(e.internal_bracing||e.monocoque);var i=new u;for(const t of this.tail_section_list)i=i.Add(this.TailSectionStats(t)),this.farman||(s=s&&(t.internal_bracing||t.monocoque));s&&(t.structure+=30),t=t.Add(this.tail_list[this.sel_tail].stats),this.boom&&(i.maxstrain-=i.mass,this.has_tractor_nacelles||(i.drag=Math.floor(1e-6+1.5*i.drag))),this.farman?(t.drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor,t.visibility+=this.tail_section_list.length,i.mass=Math.floor(1e-6+.5*i.mass),t=t.Add(i)):((t=t.Add(i)).drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor);const a=this.CountLiftingBody();return t.cost+=a,this.flying_wing?t.liftbleed+=5:t.drag+=a,this.PossibleRemoveSections()&&this.CountMainLiftingBody()11.15)this.wing_list=t.wing_list,this.mini_wing_list=t.mini_wing_list;else{const e=t.wing_list;this.wing_list=this.OldtoNew(e);const s=t.mini_wing_list;this.mini_wing_list=this.OldtoNew(s)}this.wing_stagger=t.wing_stagger,this.is_swept=t.is_swept,this.is_closed=t.is_closed}OldtoNew(t){const e=[];for(const s of t)e.push({surface:s.surface,area:s.area,span:s.span,anhedral:s.anhedral,dihedral:s.dihedral,gull:!1,deck:s.deck});return e}serialize(t){t.PushNum(this.wing_list.length);for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.wing_list.push(e)}const s=t.GetNum();this.mini_wing_list=[];for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.mini_wing_list.push(e)}this.wing_stagger=t.GetNum(),this.is_swept=t.GetBool(),this.is_closed=t.GetBool()}SetRotorSpan(t){this.rotor_span=t}GetWingList(){return this.wing_list}GetMiniWingList(){return this.mini_wing_list}GetSkinList(){return this.skin_list}GetStaggerList(){return this.stagger_list}GetDeckList(){return this.deck_list}DeckCountFull(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.wing_list)t[e.deck]++;return t}DeckCountMini(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.mini_wing_list)t[e.deck]++;return t}CanStagger(){const t=[...Array(this.stagger_list.length).fill(!1)];if(this.acft_type==N.ORNITHOPTER_FLUTTER)this.wing_list.length>1?t[1]=!0:t[0]=!0;else{if(this.wing_list.length>1)for(let e=1;e1?this.wing_stagger=1:this.wing_stagger=0)}SetStagger(t){for(this.wing_stagger=t;this.stagger_list[t].wing_count=0;e--){const s=this.wing_list[e];t[s.deck]>1&&this.deck_list[s.deck].limited&&(t[s.deck]--,this.wing_list.splice(e,1))}}this.CalculateStats()}GetStagger(){return this.wing_list.length>0?this.wing_stagger:-1}CanAddFullWing(t){if(t>=this.deck_list.length&&console.log("Deck out of Bounds"),!this.stagger_list[this.wing_stagger].inline){if(t==D.SHOULDER&&this.HasPolishWing())return!1;if(this.DeckCountFull()[t]==D.SHOULDER&&this.deck_list[t].limited)return!1}return 0==this.DeckCountMini()[t]}CanAddMiniWing(t){const e=this.DeckCountFull(),s=this.DeckCountMini();return 0==e[t]&&0==s[t]}CanMoveFullWing(t,e){const s=this.wing_list[t];this.wing_list.splice(t,1);const i=this.CanAddFullWing(e);return this.wing_list.splice(t,0,s),i}CanMoveMiniWing(t,e){const s=this.mini_wing_list[t];this.mini_wing_list.splice(t,1);const i=this.CanAddMiniWing(e);return this.mini_wing_list.splice(t,0,s),i}GetWingHeight(){let t=0;for(const e of this.wing_list)t=Math.max(t,4-e.deck);return t}CanClosed(){return this.wing_list.length>1}SetClosed(t){this.wing_list.length>0?this.is_closed=t:this.is_closed=!1,this.CalculateStats()}GetClosed(){return this.is_closed}CanSwept(){return this.wing_list.length>0}SetSwept(t){this.wing_list.length>0?this.is_swept=t:this.is_swept=!1,this.CalculateStats()}GetSwept(){return this.is_swept}GetTandem(){return this.stagger_list[this.wing_stagger].inline&&this.wing_list.length>1}GetMonoplane(){return 1==this.wing_list.length}GetStaggered(){return 0!=this.stagger_list[this.wing_stagger].stats.liftbleed}SetFullWing(t,e){this.wing_list.length!=t&&this.wing_list.splice(t,1),e.area!=e.area&&(e.area=3),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,3),e.span=Math.max(e.span,1),this.CanAddFullWing(e.deck)&&this.wing_list.splice(t,0,e)),this.wing_list.length>1&&0==this.wing_stagger?this.wing_stagger=4:this.wing_list.length<=1&&(this.wing_stagger=0),e.dihedral=Math.floor(1e-6+e.dihedral),e.anhedral=Math.floor(1e-6+e.anhedral),e.dihedral=Math.max(0,Math.min(e.dihedral,e.span-1)),e.anhedral=Math.max(0,Math.min(e.anhedral,e.span-1-e.dihedral)),this.CalculateStats()}SetMiniWing(t,e){this.mini_wing_list.length!=t&&this.mini_wing_list.splice(t,1),e.area!=e.area&&(e.area=2),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,1),e.area=Math.min(e.area,2),e.span=Math.max(e.span,1),this.CanAddMiniWing(e.deck)&&this.mini_wing_list.splice(t,0,e)),this.CalculateStats()}HasNonGullDeck(t){for(const e of this.wing_list)if(e.deck==t&&!e.gull)return!0;return!1}CanGull(t){if(t==D.PARASOL){if(!this.GetTandem()&&this.HasNonGullDeck(D.SHOULDER))return!1}else{if(t==D.SHOULDER)return!1;if(!this.GetTandem()&&this.HasNonGullDeck(t-1))return!1}return!0}IsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}NeedHStab(){return this.stagger_list[this.wing_stagger].hstab}NeedTail(){return this.NeedHStab()||!this.is_swept}GetSpan(){let t=0;for(const e of this.wing_list){const s=e.span;t=Math.max(t,s)}for(const e of this.mini_wing_list){const s=e.span;t=Math.max(t,s)}return t}GetArea(){let t=0;for(const e of this.wing_list)t+=e.area;for(const e of this.mini_wing_list)t+=e.area;return t}GetParasol(){for(const t of this.wing_list)if(t.deck==D.PARASOL)return!0;for(const t of this.mini_wing_list)if(t.deck==D.PARASOL)return!0;return!1}GetMetalArea(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].metal&&(t+=e.area);for(const e of this.mini_wing_list)this.skin_list[e.surface].metal&&(t+=e.area);return t}GetWingDrag(){let t=0;const e=this.DeckCountFull();let s=0,i=0;for(const a of this.wing_list){const n=a.span;let r=a.area;s=Math.max(s,n),a.gull&&(r=Math.floor(1e-6+1.1*r));let o=Math.max(1,6*r*r/(n*n));o=Math.max(1,o*this.skin_list[a.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&e[a.deck]>1&&(o=Math.floor(1e-6+.75*o),o=Math.max(1,o)),o=Math.floor(1e-6+o),s==n&&(i=i),t+=o}for(const e of this.mini_wing_list){const s=e.span;let i=Math.max(1,6*e.area*e.area/(s*s));i=Math.max(1,i*this.skin_list[e.surface].dragfactor),i=Math.floor(1e-6+i),t+=i}const a=this.GetIsSesquiplane();return(a.is||this.GetMonoplane())&&-1!=a.deck&&(t-=Math.floor(1e-6+(1-this.long_list[a.deck].dragfactor)*i)),t}GetIsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}SetAircraftMass(t){this.plane_mass=t}GetPaperMass(){let t=0;for(const e of this.wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}for(const e of this.mini_wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}return Math.max(-Math.floor(1e-6+.25*this.plane_mass),t)}GetIsSesquiplane(){let t=0,e=-1,s=0,i=1e100,a=0;for(const n of this.wing_list)n.area>t?(t=n.area,e=n.deck,s=n.span):n.area==t&&(e=-1),i>n.area&&(i=n.area,a=n.span);let n=t>=2*i;return n=n&&!this.GetMonoplane()&&!this.GetTandem(),n?{is:n,deck:e,super_small:.75*s>=a}:{is:!1,deck:e,super_small:!1}}HasPolishWing(){for(const t of this.wing_list)if(t.deck==D.PARASOL&&1==t.gull)return!0;return!1}HasInvertedGull(){let t=-1;for(const e of this.wing_list)e.gull&&e.deck>D.SHOULDER&&(t=Math.max(t,e.deck));return t}CanCutout(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].transparent&&(t+=1);return t<3}PartStats(){this.CanClosed()||(this.is_closed=!1),this.CanSwept()||(this.is_swept=!1);var t=new u;let e=!1;const s=this.DeckCountFull();let i=!1,a=this.rotor_span,n=0,r=0;for(let i of this.wing_list){this.CanGull(i.deck)||(i.gull=!1),a=Math.max(a,i.span),e?(t.control+=3,t.liftbleed+=5,t.visibility-=1):e=!0;let o=new u;o=o.Add(this.skin_list[i.surface].stats.Multiply(i.area)),o.wingarea=i.area,o.maxstrain+=Math.min(0,-(2*i.span+i.area-10)),this.acft_type==N.ORNITHOPTER_BUZZER&&(o.maxstrain+=Math.min(0,-(2*i.span+i.area-10))),o.maxstrain*=this.skin_list[i.surface].strainfactor,this.skin_list[i.surface].transparent&&r<3&&(o.visibility+=1,r+=1);const l=i.span;let h=i.area;i.gull&&(h=Math.floor(1e-6+1.1*h));const c=Math.max(1,6*h*h/(l*l));o.drag=o.drag+c,o.drag=Math.max(1,o.drag*this.skin_list[i.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&s[i.deck]>1&&(o.drag=Math.floor(1e-6+.75*o.drag),o.drag=Math.max(1,o.drag)),t=t.Add(this.deck_list[i.deck].stats),o.latstab+=i.dihedral-i.anhedral,o.liftbleed+=i.dihedral+i.anhedral,o.Round(),a==i.span&&(n=o.drag),o.mass<0&&(o.mass=0),t=t.Add(o)}for(const e of this.mini_wing_list){a=Math.max(a,e.span),t.control+=1,i?t.liftbleed+=1:i=!0;const s=this.skin_list[e.surface].stats.Multiply(e.area);s.wingarea=e.area,s.maxstrain+=Math.min(0,-(2*e.span+e.area-10)),s.maxstrain*=this.skin_list[e.surface].strainfactor;const n=e.span;s.drag=Math.max(1,s.drag+6*e.area*e.area/(n*n)),s.drag=Math.max(1,s.drag*this.skin_list[e.surface].dragfactor),s.latstab+=e.dihedral-e.anhedral,s.liftbleed+=e.dihedral+e.anhedral,s.Round(),s.mass<0&&(s.mass=0),t=t.Add(s)}t.control+=8-a,t.latstab+=Math.min(0,a-8);const o=this.GetIsSesquiplane();if((o.is||this.GetMonoplane())&&-1!=o.deck&&((t=t.Add(this.long_list[o.deck].stats)).drag-=Math.floor(1e-6+(1-this.long_list[o.deck].dragfactor)*n)),o.is&&(t.liftbleed-=2,t.control+=2),this.stagger_list[this.wing_stagger].inline)for(const e of s)e>1&&(t.liftbleed+=3*(e-1));switch(this.HasPolishWing()&&(t.visibility+=1,t.maxstrain+=10),this.HasInvertedGull()){case 1:case 2:case 3:break;case 4:t.maxstrain+=10,t.crashsafety+=1}if((this.HasInvertedGull()>0||this.HasPolishWing())&&t.era.push({name:"Gull Wing",era:"Coming Storm"}),this.is_swept&&(t.liftbleed+=5,t.latstab--),this.is_closed){const e=Math.floor(1e-6+this.wing_list.length/2);t.mass+=1*e,t.control-=5*e,t.maxstrain+=20*e}return this.wing_list.length>1&&(t=t.Add(this.stagger_list[this.wing_stagger].stats)),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){const t={storage:0,equipment:[]};let e=0,s="";for(const t of this.wing_list){const i=this.skin_list[t.surface];0!=i.stats.charge&&(s=h(i.name),e+=i.stats.charge*t.area,e=Math.floor(1e-6+e))}return 0!=e&&t.equipment.push({source:s,charge:e.toString()}),t}}class tt extends H{constructor(t){super(),this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.is_heli=!1,this.hstab_sel=0,this.hstab_count=1,this.hstab_list=[];for(const e of t.hstab)this.hstab_list.push({name:e.name,is_canard:e.is_canard,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail});this.vstab_sel=0,this.vstab_count=1,this.vstab_list=[];for(const e of t.vstab)this.vstab_list.push({name:e.name,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail})}toJSON(){return{hstab_sel:this.hstab_sel,hstab_count:this.hstab_count,vstab_sel:this.vstab_sel,vstab_count:this.vstab_count}}fromJSON(t,e){this.hstab_sel=t.hstab_sel,this.hstab_count=t.hstab_count,this.vstab_sel=t.vstab_sel,this.vstab_count=t.vstab_count}serialize(t){t.PushNum(this.hstab_sel),t.PushNum(this.hstab_count),t.PushNum(this.vstab_sel),t.PushNum(this.vstab_count)}deserialize(t){this.hstab_sel=t.GetNum(),this.hstab_count=t.GetNum(),this.vstab_sel=t.GetNum(),this.vstab_count=t.GetNum()}IsDefault(){return 0==this.hstab_sel&&1==this.hstab_count&&0==this.vstab_sel&&1==this.vstab_count}GetHStabList(){return this.hstab_list}GetVStabList(){return this.vstab_list}GetHStabType(){return this.hstab_sel}SetHStabType(t){("The Wings"!=this.hstab_list[t].name||this.is_tandem||this.is_swept)&&(this.hstab_list[t].is_vtail?this.SetVTail():this.hstab_list[this.hstab_sel].is_vtail&&(this.vstab_sel=0,this.vstab_count=1),this.hstab_sel=t,this.SetHStabCount(this.hstab_count))}GetHValidList(){var t=[];if(this.is_heli)t=Array(this.hstab_list.length).fill(!1),this.have_tail?t[0]=!0:t[1]=!0;else for(const e of this.hstab_list)"The Wings"!=e.name&&"Outboard"!=e.name||this.is_tandem||this.is_swept?e.is_tail&&!this.have_tail?t.push(!1):t.push(!0):t.push(!1);return t}GetIsVTail(){return this.hstab_list[this.hstab_sel].is_vtail}SetVTail(){for(let t=0;t=0?this.hstab_list[this.hstab_sel].increment:1}GetVStabCount(){return this.vstab_count}SetVStabCount(t){if((t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.vstab_count=t,0!=this.vstab_list[this.vstab_sel].increment)for(;this.vstab_count%this.vstab_list[this.vstab_sel].increment!=0;)this.vstab_count++;else this.vstab_count=0;this.CalculateStats()}GetVStabIncrement(){return this.vstab_sel>=0?this.vstab_list[this.vstab_sel].increment:1}SetEngineCount(t){this.engine_count=t}GetIsTandem(){return this.is_tandem}SetIsTandem(t){this.is_tandem=t}SetIsSwept(t){this.is_swept=t}CanVOutboard(){return this.is_swept||this.is_tandem||this.hstab_list[this.hstab_sel].is_canard&&this.hstab_count>0}GetVOutboard(){return"Outboard"==this.vstab_list[this.vstab_sel].name}GetCanard(){return this.hstab_list[this.hstab_sel].is_canard}SetLiftingArea(t){this.lifting_area=t}SetHaveTail(t){if(this.have_tail=t,!t){this.GetHValidList()[this.hstab_sel]||(this.hstab_sel=2);const t=this.GetVValidList();t[this.vstab_sel]||(t[1]||(this.hstab_sel=2),this.vstab_sel=1,this.vstab_count%2!=0&&this.vstab_count++)}this.is_heli&&(this.have_tail?this.hstab_sel=0:this.hstab_sel=1,this.hstab_count=1)}SetHelicopter(t){this.is_heli=t,t&&(this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.lifting_area=0,this.engine_count=0,this.hstab_sel=0,this.hstab_count=1,this.vstab_sel=0,this.vstab_count=1)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=this.GetHValidList();t[this.hstab_sel]||(this.hstab_sel=0,t[this.hstab_sel]||(this.hstab_sel=0,this.hstab_count=0));const e=this.GetVValidList();e[this.vstab_sel]||(this.vstab_sel=0,e[this.vstab_sel]||(this.vstab_sel=0,this.vstab_count=0));var s=new u;if(this.hstab_count>0){s=s.Add(this.hstab_list[this.hstab_sel].stats);var i=0;this.is_heli?(i=Math.floor(1e-6+this.wing_drag/8*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/4*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(1,i))}else(this.hstab_sel<0||0!=this.hstab_list[this.hstab_sel].increment)&&(s.pitchstab-=Math.floor(1e-6+this.lifting_area/2),s.liftbleed+=5);if(this.vstab_count>0?(s=s.Add(this.vstab_list[this.vstab_sel].stats),i=0,this.is_heli?(i=Math.floor(1e-6+this.wing_drag/16*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/8*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(1,i))):(this.vstab_sel<0||0!=this.vstab_list[this.vstab_sel].increment||0==this.vstab_list[this.vstab_sel].increment&&0==this.hstab_count)&&(s.latstab-=this.lifting_area),s.drag+=2*(Math.max(0,this.hstab_count-1)+Math.max(0,this.vstab_count-1)),this.vstab_sel>=0&&0!=this.vstab_list[this.vstab_sel].increment){var a=Math.max(0,this.hstab_count-1);const t=Math.min(this.engine_count-1,this.vstab_count-1);a+=Math.max(0,this.vstab_count-1-t),s.control+=3*t+a}else{const t=Math.max(0,Math.min(this.engine_count-1,this.hstab_count-1));a=Math.max(0,this.hstab_count-1-t),s.control+=3*t+a}return s}GetElectrics(){return{storage:0,equipment:[]}}}class et extends H{constructor(t){super(),this.span=0,this.is_cantilever=0,this.wing_area=0,this.mp=0,this.is_boom=!1,this.acft_type=N.AIRPLANE,this.aileron_sel=0,this.aileron_list=[];for(const e of t.ailerons)this.aileron_list.push({name:e.name,warping:e.warping,stats:new u(e)});this.rudder_sel=0,this.rudder_list=[];for(const e of t.rudders)this.rudder_list.push({name:e.name,stats:new u(e)});this.elevator_sel=0,this.elevator_list=[];for(const e of t.elevators)this.elevator_list.push({name:e.name,stats:new u(e)});this.flaps_sel=0,this.flaps_list=[];for(const e of t.flaps)this.flaps_list.push({name:e.name,costfactor:e.costfactor,stats:new u(e)});this.slats_sel=0,this.slats_list=[];for(const e of t.slats)this.slats_list.push({name:e.name,stats:new u(e)});this.drag_list=[];for(const e of t.drag_inducers)this.drag_list.push({name:e.name,stats:new u(e)});this.drag_sel=[...Array(this.drag_list.length).fill(!1)]}toJSON(){return{aileron_sel:this.aileron_sel,rudder_sel:this.rudder_sel,elevator_sel:this.elevator_sel,flaps_sel:this.flaps_sel,slats_sel:this.slats_sel,drag_sel:this.drag_sel}}fromJSON(t,e){this.aileron_sel=t.aileron_sel,this.rudder_sel=t.rudder_sel,this.elevator_sel=t.elevator_sel,this.flaps_sel=t.flaps_sel,this.slats_sel=t.slats_sel,this.drag_sel=b(t.drag_sel,this.drag_sel.length)}serialize(t){t.PushNum(this.aileron_sel),t.PushNum(this.rudder_sel),t.PushNum(this.elevator_sel),t.PushNum(this.flaps_sel),t.PushNum(this.slats_sel),t.PushBoolArr(this.drag_sel)}deserialize(t){this.aileron_sel=t.GetNum(),this.rudder_sel=t.GetNum(),this.elevator_sel=t.GetNum(),this.flaps_sel=t.GetNum(),this.slats_sel=t.GetNum(),this.drag_sel=t.GetBoolArr(this.drag_sel.length)}IsDefault(){return 0==this.aileron_sel&&0==this.rudder_sel&&0==this.elevator_sel&&0==this.flaps_sel&&0==this.slats_sel&&0==this.drag_sel.reduce(((t,e)=>t||e),!1)}GetAileronList(){return this.aileron_list}CanAileron(){const t=[];if(W(this.acft_type))for(const e of this.aileron_list)t.push(e.warping);else for(const e of this.aileron_list)e.warping&&0==this.wing_area?t.push(!1):t.push(!0);return t}GetAileron(){return this.aileron_sel}SetAileron(t){this.aileron_sel=t,this.CalculateStats()}GetRudderList(){return this.rudder_list}CanRudder(){return this.can_rudder}SetCanRudder(t){this.can_rudder=t,t||(this.rudder_sel=0)}GetRudder(){return this.rudder_sel}SetRudder(t){this.rudder_sel=t,this.CalculateStats()}GetElevatorList(){return this.elevator_list}CanElevator(){return this.can_elevator}SetCanElevator(t){this.can_elevator=t,t||(this.elevator_sel=0)}GetElevator(){return this.elevator_sel}SetElevator(t){this.elevator_sel=t,this.CalculateStats()}GetFlapsList(){return this.flaps_list}GetFlaps(){return this.flaps_sel}SetFlaps(t){this.flaps_sel=t,this.CalculateStats()}GetFlapCost(t){return t&&(this.mp=t),this.flaps_list[this.flaps_sel].costfactor>0?Math.max(1,Math.floor(1e-6+this.flaps_list[this.flaps_sel].costfactor*this.mp)):0}GetSlatsList(){return this.slats_list}GetSlats(){return this.slats_sel}SetSlats(t){this.slats_sel=t,this.CalculateStats()}GetDragList(){return this.drag_list}GetDrag(){return this.drag_sel}SetDrag(t,e){this.drag_sel[t]=e,this.CalculateStats()}SetNumCantilever(t){this.is_cantilever=t}SetSpan(t){this.span=t}SetWingArea(t){this.wing_area=t}SetAcftType(t){if(this.acft_type=t,this.acft_type==N.HELICOPTER){this.aileron_sel=0,this.rudder_sel=0,this.elevator_sel=0,this.flaps_sel=0,this.slats_sel=0;for(let t=0;tt)),this.is_cantilever=0}}SetBoomTail(t){this.is_boom=t}SetIsVTail(t){t&&(this.rudder_sel=this.elevator_sel)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;this.aileron_list[this.aileron_sel].warping&&0==this.wing_area&&(this.aileron_sel=0),t=t.Add(this.aileron_list[this.aileron_sel].stats),this.aileron_list[this.aileron_sel].warping&&(t.maxstrain-=this.span,this.is_cantilever&&(t.cost+=2*this.is_cantilever,t.era.push({name:h("Cantilever Wing Warping"),era:"Last Hurrah"})),this.is_boom&&(t.pitchstab-=2,t.latstab-=2,t.warnings.push({source:h("Wing Warping"),warning:h("Wing Warping Warning"),color:c.WHITE}))),t=(t=(t=(t=t.Add(this.rudder_list[this.rudder_sel].stats)).Add(this.elevator_list[this.elevator_sel].stats)).Add(this.flaps_list[this.flaps_sel].stats)).Add(this.slats_list[this.slats_sel].stats);for(let e=0;e10.25&&t.wing_blades,e<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}serialize(t){t.PushNumArr(this.ext_wood_count),t.PushNumArr(this.ext_steel_count),t.PushNumArr(this.cant_count),t.PushBool(this.wires),t.PushNum(this.cabane_sel),t.PushBool(this.wing_blades)}deserialize(t){this.ext_wood_count=t.GetNumArr(this.ext_wood_count.length),this.ext_steel_count=t.GetNumArr(this.ext_steel_count.length),this.cant_count=t.GetNumArr(this.cant_count.length),this.wires=t.GetBool(),this.cabane_sel=t.GetNum(),t.version>10.25?this.wing_blades=t.GetBool():this.wing_blades=!1,t.version<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}GetExternalList(){return this.ext_wood_list}GetCantileverList(){return this.cant_list}CanExternalWood(){const t=[...Array(this.ext_wood_list.length).fill(this.can_external)];for(let e=0;e0}SetCantileverCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.ImplSCC(t,e),this.CalculateStats()}ImplSCC(t,e){var s=e-this.cant_count[t];if(this.cant_list[t].limited&&e>0){var i=this.TotalStructure();for(let t=0;tthis.acft_structure)for(let t=this.cant_list.length-1;t>=0;t--)s=s||this.ImplSCC(t,this.cant_count[t]);s&&this.CalculateStats()}TotalStructure(){var t=this.ext_cabane_list[this.cabane_sel].stats.structure,e=!1;for(let s=0;s0||this.ext_steel_count[s]>0)&&(e=!0);return e&&(t+=5),this.acft_structure+t}GetCantileverType(){const t=this.cant_count[0]+this.cant_count[4];return this.cant_count[1]+this.cant_count[2]+this.cant_count[3]>0?2:t>0?1:0}GetCabaneList(){return this.ext_cabane_list}GetCabane(){return this.cabane_sel}SetCabane(t){this.cabane_sel=t,this.CalculateStats()}SetCantLift(t){this.cant_lift=t}CanWingBlade(){for(const t of this.ext_wood_count)if(t>0)return!1;for(const t of this.ext_steel_count)if(t>0)return!1;return 0==this.cabane_sel&&this.cant_count[2]>0}GetWingBlade(){return this.wing_blades}SetWingBlade(t){this.wing_blades=t,this.CalculateStats()}SetAircraftType(t){this.acft_type=t,t==N.HELICOPTER&&(this.can_external=!1,this.is_monoplane=!1,this.is_tandem=!1,this.is_staggered=!1),t==N.ORNITHOPTER_BUZZER&&(this.can_external=!1);const e=this.CanExternalWood();for(let t=0;t0){a=a||this.ext_wood_list[n].first;let i=this.ext_wood_list[n].stats;i=i.Multiply(this.ext_wood_count[n]),t=t.Add(i),this.ext_wood_list[n].config?s+=e*this.ext_wood_list[n].tension*this.ext_wood_count[n]:s+=this.ext_wood_list[n].tension*this.ext_wood_count[n]}for(let n=0;n0){a=a||this.ext_wood_list[n].first;let i=this.ext_steel_list[n].stats.Clone();i=i.Multiply(this.ext_steel_count[n]),t=t.Add(i),this.ext_steel_list[n].config?s+=e*this.ext_steel_list[n].tension*this.ext_steel_count[n]:s+=this.ext_steel_list[n].tension*this.ext_steel_count[n]}this.acft_type==N.ORNITHOPTER_BASIC&&(t.maxstrain=Math.floor(1e-6+.5*t.maxstrain)),a&&(t.structure+=5,t.maxstrain+=10,s+=10);const n=this.ext_cabane_list[this.cabane_sel].stats.Clone();t=t.Add(n),s+=e*this.ext_cabane_list[this.cabane_sel].tension,this.cabane_sel>0&&(i+=1),this.wires&&(t.maxstrain+=Math.floor(1e-6+s),t.drag+=3*i);var r=!1;for(let e=0;e0){r=!0;let s=this.cant_list[e].stats;s=s.Multiply(this.cant_count[e]),s.maxstrain,t=t.Add(s)}return this.CanWingBlade()?this.wing_blades&&(t.mass*=2,t.warnings.push({source:h("Wing Blades"),warning:h("Wing Blades Warning"),color:c.WHITE})):this.wing_blades=!1,r&&(t.cost+=5,t.liftbleed-=this.cant_lift),t}GetElectrics(){return{storage:0,equipment:[]}}}class it extends H{constructor(t){super(),this.tank_stats=[],this.tank_count=[];for(const e of t.tanks)this.tank_stats.push({name:e.name,stats:new u(e),internal:e.internal,cantilever:e.cantilever}),this.tank_count.push(0);this.self_sealing=!1,this.is_cantilever=!1,this.wing_area=-1}toJSON(){return{tank_count:this.tank_count,self_sealing:this.self_sealing,fire_extinguisher:this.fire_extinguisher}}fromJSON(t,e){this.tank_count=A(t.tank_count,this.tank_count.length),this.self_sealing=t.self_sealing,this.fire_extinguisher=t.fire_extinguisher,this.wing_area=-1}serialize(t){t.PushNumArr(this.tank_count),t.PushBool(this.self_sealing),t.PushBool(this.fire_extinguisher)}deserialize(t){this.tank_count=t.GetNumArr(this.tank_count.length),this.self_sealing=t.GetBool(),this.fire_extinguisher=t.GetBool(),this.wing_area=-1}GetTankList(){return this.tank_stats}GetTankEnabled(){const t=[];for(const e of this.tank_stats)!this.is_cantilever&&e.cantilever?t.push(!1):t.push(!0);return t}GetTankCount(){return this.tank_count}SetTankCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.tank_count[t]=e,this.VerifyOK(),this.CalculateStats()}SetCantilever(t){this.is_cantilever&&!t&&(this.is_cantilever=t,this.VerifyOK()&&this.CalculateStats()),this.is_cantilever=t}SetArea(t){this.wing_area>t&&(this.wing_area=t,this.VerifyOK()&&this.CalculateStats()),this.wing_area=t}VerifyOK(){if(-1!=this.wing_area){var t=0;for(let e=0;e0;for(;s>0;)for(let t=this.tank_count.length-1;t>=0;t--)if(this.tank_stats[t].cantilever){this.tank_count[t]--,s--;break}for(let t=0;t0}GetSelfSealing(){return this.self_sealing}SetSelfSealing(t){this.self_sealing=t,this.CalculateStats()}GetExtinguisher(){return this.fire_extinguisher}SetExtinguisher(t){this.fire_extinguisher=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u,e=0;for(let s=0;s0&&(t.wetmass+=5-t.wetmass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class at extends H{constructor(){super(),this.bomb_count=0,this.rocket_count=0,this.internal_bay_count=0,this.internal_bay_1=!1,this.internal_bay_2=!1}toJSON(){return{bomb_count:this.bomb_count,rocket_count:this.rocket_count,bay_count:this.internal_bay_count,bay1:this.internal_bay_1,bay2:this.internal_bay_2}}fromJSON(t,e){this.bomb_count=t.bomb_count,this.internal_bay_count=t.bay_count,this.internal_bay_1=t.bay1,this.internal_bay_2=t.bay2,e>10.75&&(this.rocket_count=t.rocket_count)}serialize(t){t.PushNum(this.bomb_count),t.PushNum(this.internal_bay_count),t.PushBool(this.internal_bay_1),t.PushBool(this.internal_bay_2),t.PushNum(this.rocket_count)}deserialize(t){this.bomb_count=t.GetNum(),this.internal_bay_count=t.GetNum(),this.internal_bay_1=t.GetBool(),this.internal_bay_2=t.GetBool(),t.version>10.75&&(this.rocket_count=t.GetNum())}GetRocketCount(){return this.rocket_count}GetBombCount(){return this.bomb_count}GetInternalBombCount(){var t=10*this.internal_bay_count;return this.bomb_count>0&&this.internal_bay_count>0&&this.internal_bay_1&&(t*=2,this.internal_bay_2&&(t*=2)),t}GetMaxBombSize(){var t=0;const e=this.GetInternalBombCount();return this.bomb_count>0&&this.internal_bay_count>0&&(t=this.internal_bay_1?this.internal_bay_2?Math.floor(1e-6+e):Math.floor(1e-6+e/2):Math.floor(1e-6+e/4)),t}SetRocketCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.rocket_count=t,this.LimitMass(),this.CalculateStats()}SetBombCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.bomb_count=t,this.LimitMass(),this.CalculateStats()}GetBayCount(){return this.internal_bay_count}GetBay1(){return this.internal_bay_1}GetBay2(){return this.internal_bay_2}SetBayCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.internal_bay_count=t,this.CalculateStats()}SetUseBays(t,e){this.internal_bay_1=t,this.internal_bay_2=e,!this.internal_bay_1&&this.internal_bay_2&&(this.internal_bay_1=!0,this.internal_bay_2=!1),this.CalculateStats()}LimitMass(){var t=!1;const e=Math.min(this.GetInternalBombCount(),Math.floor(1e-6+3*this.acft_struct*this.maxbomb));var s,i,a=0,n=0;s=this.bomb_count>e?e:this.bomb_count,i=this.rocket_count+s>e?e-s:this.rocket_count,a=this.bomb_count-s,n=this.rocket_count-i;const r=Math.floor(1e-6+this.acft_struct*this.maxbomb-(s+i)/3)*this.gull_factor;for(;a+n>r;)n>0?n--:a--;let o=Math.max(0,s+a);this.bomb_count>o&&(t=!0,this.bomb_count=o);let l=Math.max(0,i+n);return this.rocket_count>l&&(t=!0,this.rocket_count=l),t}GetExternalMass(){const t=this.bomb_count+this.rocket_count;return Math.max(0,t-this.GetInternalBombCount())}SetAcftParameters(t,e,s){switch(this.acft_struct=t,this.maxbomb=e,s){case 2:case 3:this.gull_factor=1.1;break;case 4:this.gull_factor=1.2;break;default:this.gull_factor=1}this.LimitMass()&&this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u,e=this.GetExternalMass();if(t.reqsections+=this.internal_bay_count,this.internal_bay_count>0){const e=t.reqsections;this.internal_bay_1&&(t.reqsections+=e,this.internal_bay_2&&(t.reqsections+=e))}const s=Math.ceil(e/5-1e-6);return t.mass+=s,t.drag+=s,t.bomb_mass=this.bomb_count+this.rocket_count,t.reqsections=Math.ceil(-1e-6+t.reqsections),t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class nt extends H{constructor(t){super(),this.cargo_list=[];for(const e of t.spaces)this.cargo_list.push({name:e.name,stats:new u(e)});this.cargo_sel=0}toJSON(){return{space_sel:this.cargo_sel}}fromJSON(t,e){this.cargo_sel=t.space_sel}serialize(t){t.PushNum(this.cargo_sel)}deserialize(t){this.cargo_sel=t.GetNum()}GetSpaceList(){return this.cargo_list}GetSpace(){return this.cargo_sel}SetSpace(t){this.cargo_sel=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;return(t=t.Add(this.cargo_list[this.cargo_sel].stats)).bomb_mass+=3*t.reqsections,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class rt extends H{constructor(t){super(),this.gear_list=[],this.gear_sel=0,this.retract=!1;for(const e of t.gear)this.gear_list.push({name:e.name,stats:new u(e),DpLMP:e.DpLMP,SpLMP:e.SpLMP,can_retract:e.can_retract});this.extra_list=[];for(const e of t.extras)this.extra_list.push({name:e.name,stats:new u(e),MpLMP:e.MpLMP});this.extra_sel=[...Array(this.extra_list.length).fill(!1)]}toJSON(){return{gear_sel:this.gear_sel,retract:this.retract,extra_sel:this.extra_sel}}fromJSON(t,e){this.gear_sel=t.gear_sel,this.retract=t.retract,this.extra_sel=b(t.extra_sel,this.extra_sel.length)}serialize(t){t.PushNum(this.gear_sel),t.PushBool(this.retract),t.PushBoolArr(this.extra_sel)}deserialize(t){this.gear_sel=t.GetNum(),this.retract=t.GetBool(),this.extra_sel=t.GetBoolArr(this.extra_sel.length)}IsDefault(){return 0==this.gear_sel&&0==this.retract&&0==this.extra_sel.reduce(((t,e)=>t||e),!1)}GetGearName(){return this.retract&&"Boat Hull"==this.gear_list[this.gear_sel].name?h("Retractable Gear + Boat Hull"):this.retract?h("Retractable ")+h(this.gear_list[this.gear_sel].name):h(this.gear_list[this.gear_sel].name)}GetGearList(){return this.gear_list}CanGear(){const t=[...Array(this.gear_list.length).fill(!0)];for(let e=0;e=2||0==t&&e>=3}SetGull(t){this.gull_deck=t}SetCalculateStats(t){this.CalculateStats=t}IsVital(){return!0}PartStats(){var t=new u;this.CanGear()[this.gear_sel]||(this.gear_sel=0),this.CanRetract()||(this.retract=!1);var e=this.loadedMass;for(let s=0;s=0;i--)s+=t[i],t[i]=s-e;return t}SetArmourCoverage(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.armour_coverage[t]=1!=t?e:e-this.skin_armour,this.NormalizeCoverage(),this.CalculateStats()}NormalizeCoverage(){var t=-8+Math.min(0,-Math.floor(1e-6+(this.vital_parts-8)/2));t+=this.skin_armour;for(let e=this.armour_coverage.length-1;e>=0;e--)this.armour_coverage[e]=Math.max(0,Math.min(Math.abs(t),this.armour_coverage[e])),t+=this.armour_coverage[e]}GetElectricalList(){return this.electric_list}GetElectricalCount(){return this.electrical_count}SetElectricalCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),e=Math.min(e,50),this.electrical_count[t]=e,this.CalculateStats()}GetRadioList(){return this.radio_list}GetRadioSel(){return this.radio_sel}SetRadioSel(t){this.radio_sel=t,this.CalculateStats()}GetReconList(){return this.recon_list}GetReconSel(){return this.recon_sel}SetReconSel(t,e){((e=Math.trunc(e))!=e||e<0)&&(e=0),this.recon_sel[t]=e,this.CalculateStats()}GetVisibilityList(){return this.visi_list}GetCanVisibility(){return this.can_visi}GetVisibilitySel(){return this.visi_sel}SetVisibilitySel(t,e){this.visi_sel[t]=e,this.CalculateStats()}GetClimateList(){return this.clim_list}GetClimateSel(){return this.clim_sel}GetClimateEnable(){const t=[];for(const e of this.clim_list)!this.acft_rad&&e.req_radiator?t.push(!1):t.push(!0);return t}SetClimateSel(t,e){this.clim_sel[t]=e,this.CalculateStats()}GetAutopilotList(){return this.auto_list}GetAutopilotSel(){return this.auto_sel}SetAutopilotSel(t){this.auto_sel=t,this.CalculateStats()}GetControlList(){return this.cont_list}GetControlSel(){return this.cont_sel}SetControlSel(t){this.cont_sel=t,this.CalculateStats()}SetAcftRadiator(t){this.acft_rad=t}IsElectrics(){for(const t of this.electrical_count)if(t>0)return!0;for(let t=0;t0&&(""!=e&&(e+=", "),e+=n.toString()+"/"+(11-s[a]).toString()+"+")}""!=e&&t.warnings.push({source:h("Armour"),warning:e,color:c.WHITE});for(let e=0;e0){let s=this.electric_list[e].stats.Clone();s=s.Multiply(this.electrical_count[e]),t=t.Add(s)}t=t.Add(this.radio_list[this.radio_sel].stats);for(let e=0;e0){let s=this.recon_list[e].stats.Clone();s=s.Multiply(this.recon_sel[e]),t=t.Add(s)}for(let e=0;e0&&(t+=i.storage*a,i.cp10s>0?e.push({source:h(i.name),charge:n.Format("{0}"+h("Derived Per 10 Speed"),Math.floor(1e-6+a*i.cp10s))}):0!=i.stats.charge&&e.push({source:h(i.name),charge:(a*i.stats.charge).toString()}))}const s=this.radio_list[this.radio_sel];e=this.FormatEquipment(e,s.name,s.stats.charge);for(let t=0;t0&&(e=this.FormatEquipment(e,s.name,i*s.stats.charge))}for(let t=0;t0){let e=Math.min(t,this.drag);e=Math.max(e,0),this.drag-=e,t-=e,e=Math.min(t,this.reliability),e=Math.max(e,0),this.reliability-=e,t-=e,e=Math.min(t,this.maxstrain),e=Math.max(e,0),this.maxstrain-=e,t-=e,e=Math.min(t,this.toughness),e=Math.max(e,0),this.toughness-=e,t-=e,e=Math.min(t,this.mass),e=Math.max(e,0),this.mass-=e,t-=e,e=Math.min(t,this.escape),e=Math.max(e,0),this.escape-=e,t-=e,e=Math.min(t,this.bleed),e=Math.max(e,0),this.bleed-=e,t-=e,e=Math.min(t,this.cost),e=Math.max(e,0),this.cost-=e,t-=e}}GetFreeDots(){return this.free_dots}SetFreeDots(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,0),this.free_dots=t,this.ReduceDots(),this.CalculateStats()}GetCost(){return this.cost}SetCost(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.cost=t,this.ReduceDots(),this.CalculateStats()}GetBleed(){return this.bleed}SetBleed(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.bleed=t,this.ReduceDots(),this.CalculateStats()}GetEscape(){return this.escape}SetEscape(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.escape=t,this.ReduceDots(),this.CalculateStats()}GetMass(){return this.mass}SetMass(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.mass=t,this.ReduceDots(),this.CalculateStats()}GetToughness(){return this.toughness}SetToughness(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.toughness=t,this.ReduceDots(),this.CalculateStats()}GetMaxStrain(){return this.maxstrain}SetMaxStrain(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.maxstrain=t,this.ReduceDots(),this.CalculateStats()}GetReliabiilty(){return this.reliability}SetReliability(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.reliability=t,this.ReduceDots(),this.CalculateStats()}GetDrag(){return this.drag}SetDrag(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.drag=t,this.ReduceDots(),this.CalculateStats()}SetAcftStats(t){this.acft_stats=t}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u;return t.cost=Math.floor(1e-6+-this.cost*this.acft_stats.cost/10),t.liftbleed=Math.floor(1e-6+3*-this.bleed),t.escape=this.escape,t.visibility=this.escape,t.mass=Math.floor(1e-6+-this.mass*this.acft_stats.mass/10),t.toughness=Math.floor(1e-6+this.toughness*this.acft_stats.toughness/4),t.reliability=2*this.reliability,t.drag=Math.floor(1e-6+-this.drag*this.acft_stats.drag/10),t}GetElectrics(){return{storage:0,equipment:[]}}}!function(t){t[t.NONE=-1]="NONE",t[t.INTERRUPT=0]="INTERRUPT",t[t.SYNCH=1]="SYNCH",t[t.SPINNER=2]="SPINNER",t[t.DEFLECT=3]="DEFLECT",t[t.NO_INTERFERENCE=4]="NO_INTERFERENCE",t[t.ENUM_MAX=5]="ENUM_MAX"}(O||(O={})),function(t){t[t.BULLETS=0]="BULLETS",t[t.HEATRAY=1]="HEATRAY",t[t.PNEUMATIC=2]="PNEUMATIC",t[t.ENUM_MAX=3]="ENUM_MAX",t[t.GYROJETS=4]="GYROJETS"}(k||(k={})),function(t){t[t.STANDARD=0]="STANDARD",t[t.MECHANICAL=1]="MECHANICAL",t[t.GAST=2]="GAST",t[t.ROTARY=3]="ROTARY",t[t.ENUM_MAX=4]="ENUM_MAX"}(L||(L={}));class ht extends H{constructor(t,e,s,i=!1){super(),this.weapon_type=t,this.fixed=i,this.wing=!0,this.covered=!1,this.accessible=!1,this.free_accessible=!1,this.synchronization=i?O.NONE:O.INTERRUPT,this.w_count=1,this.repeating=!1,this.wing_reinforcement=!1}toJSON(){return{fixed:this.fixed,wing:this.wing,covered:this.covered,accessible:this.accessible,free_accessible:this.free_accessible,synchronization:this.synchronization,w_count:this.w_count}}fromJSON(t,e){this.fixed=t.fixed,this.wing=t.wing,this.covered=t.covered,this.accessible=t.accessible,this.free_accessible=t.free_accessible,this.synchronization=t.synchronization,this.w_count=t.w_count,e<10.95&&(this.repeating=t.repeating)}serialize(t){t.PushBool(this.fixed),t.PushBool(this.wing),t.PushBool(this.covered),t.PushBool(this.accessible),t.PushBool(this.free_accessible),t.PushNum(this.synchronization),t.PushNum(this.w_count)}deserialize(t){this.fixed=t.GetBool(),this.wing=t.GetBool(),this.covered=t.GetBool(),this.accessible=t.GetBool(),this.free_accessible=t.GetBool(),this.synchronization=t.GetNum(),this.w_count=t.GetNum(),t.version<10.95&&(this.repeating=t.GetBool())}SetWeaponType(t,e,s){this.weapon_type=t,this.action=e,16==this.weapon_type.size&&(this.w_count=1),this.SetCount(this.w_count,!1)}GetFixed(){return this.fixed}SetFixed(t){t!=this.fixed&&(t?this.fixed=!0:(this.fixed=!1,this.synchronization=O.NONE))}SetCanWing(t){this.canwing=t,this.wing&&!t&&(this.wing=!1)}GetWing(){return this.wing}CanWing(){return this.weapon_type.size<=16&&this.canwing}SetWing(t){t&&this.CanWing()?(this.wing=!0,this.free_accessible=!1,this.synchronization=O.NONE):this.wing=!1,this.CalculateStats()}CanCovered(){return this.wing?this.has_cantilever&&!(16==this.weapon_type.size&&!this.fixed):!(this.GetArty()&&!this.fixed)}GetCovered(){return this.covered}SetCovered(t){this.covered=t,this.CalculateStats()}GetAccessible(){return this.accessible||this.free_accessible}SetAccessible(t){t&&this.free_accessible&&(t=!1),this.accessible=t,this.CalculateStats()}GetFreeAccessible(){return this.free_accessible}SetFreeAccessible(t){t&&!this.wing&&this.can_free_accessible?(this.free_accessible=!0,this.accessible=!1):this.free_accessible=!1,this.CalculateStats()}CanSynchronization(){const t=[];for(let e=-1;e16;)t-=1;this.w_count=t,e&&this.CalculateStats()}CanRepeating(){return!this.weapon_type.rapid||this.weapon_type.reload>0}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:this.repeating=!1,this.CalculateStats()}ResolveSynch(){const t=this.synchronization;if(this.synchronization=O.ENUM_MAX,this.CanSynch(t))this.action==L.MECHANICAL&&t!=O.SPINNER?this.synchronization=O.SYNCH:this.synchronization=t;else{for(let t=-1;t8||16==this.weapon_type.size)&&(t.reqsections+=1),this.accessible&&(t.cost+=Math.max(1,Math.floor(1e-6+this.w_count/2))),!this.fixed)if(e<=2);else if(e<=4)t.cost+=1;else if(e<=8)t.mass+=1,t.cost+=3;else{if(!(e<=16))throw"Weapon size screwup in Turret size cost.";t.mass+=2,t.cost+=5}return this.synchronization==O.INTERRUPT?(t.cost+=2*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=2*this.w_count),t.era.push({name:h("Interruptor Gear"),era:h("WWI")})):this.synchronization==O.SYNCH&&this.action!=L.MECHANICAL?(t.cost+=3*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=3*this.w_count),t.era.push({name:h("Synchronization Gear"),era:h("Roaring 20s")})):this.synchronization==O.DEFLECT?(t.cost+=1,t.warnings.push({source:h(this.weapon_type.name),warning:h("Deflector Plate Warning"),color:c.WHITE})):this.synchronization!=O.NO_INTERFERENCE||this.IsLightningArc()||t.warnings.push({source:h(this.weapon_type.name)+" "+h("No Interference"),warning:h("No Interference Warning"),color:c.YELLOW}),this.wing_reinforcement&&(t.mass+=2),t.Round(),t}GetElectrics(){return{storage:0,equipment:[]}}}class ct extends H{constructor(t,e){super(),this.weapon_list=t,this.wl_permute=e,this.directions=[...Array(6).fill(!1)],this.directions[0]=!0,this.fixed=!0,this.ammo=1,this.weapon_type=0,this.raw_weapon_type=0,this.weapons=[],this.action_sel=L.STANDARD,this.projectile_sel=k.BULLETS,this.has_propeller=!0,this.sticky_guns=0,this.repeating=!1,this.seat=0,this.final_weapon={name:"",abrv:"",era:"",size:0,stats:new u,damage:0,hits:0,ammo:0,ap:0,jam:"",reload:0,rapid:!1,synched:!1,shells:!1,can_action:!1,can_projectile:!1,deflection:0},this.MakeFinalWeapon(),this.SWC(1)}toJSON(){const t=[];for(const e of this.weapons)t.push(e.toJSON());return{weapon_type:this.raw_weapon_type,fixed:this.fixed,directions:this.directions,weapons:t,ammo:this.ammo,action:this.action_sel,projectile:this.projectile_sel,repeating:this.repeating,seat:this.seat}}fromJSON(t,e){this.raw_weapon_type=t.weapon_type,this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.fixed,this.directions=b(t.directions,this.directions.length),this.weapons=[],this.ammo=t.ammo,null==this.ammo&&(this.ammo=1),e<10.25?(this.action_sel=L.STANDARD,this.projectile_sel=k.BULLETS):(this.action_sel=t.action,this.projectile_sel=t.projectile),e<11.75&&(this.projectile_sel==k.PNEUMATIC?this.projectile_sel=k.BULLETS:this.projectile_sel==k.ENUM_MAX&&(this.projectile_sel=k.PNEUMATIC)),this.MakeFinalWeapon();for(const s of t.weapons){const t=new ht(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),t.fromJSON(s,e),this.weapons.push(t)}if(e<10.95){this.repeating=!1;for(const t of this.weapons)this.repeating=this.repeating||t.GetRepeating()}else this.repeating=t.repeating;this.seat=e>11.65?t.seat:0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}serialize(t){t.PushNum(this.raw_weapon_type),t.PushBool(this.fixed),t.PushBoolArr(this.directions),t.PushNum(this.ammo),t.PushNum(this.weapons.length);for(const e of this.weapons)e.serialize(t);t.PushNum(this.action_sel),t.PushNum(this.projectile_sel),t.PushBool(this.repeating),t.PushNum(this.seat)}deserialize(t){this.raw_weapon_type=t.GetNum(),this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.GetBool(),this.directions=t.GetBoolArr(this.directions.length),this.ammo=t.GetNum();const e=t.GetNum();this.weapons=[],this.MakeFinalWeapon();for(let s=0;s11.65?this.seat=t.GetNum():this.seat=0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}GetWeaponSelected(){return this.weapon_type}MakeFinalWeapon(){const t=this.weapon_type;if(this.final_weapon.can_action=this.weapon_list[t].can_action,this.final_weapon.can_projectile=this.weapon_list[t].can_projectile,this.final_weapon.ammo=this.weapon_list[t].ammo,this.final_weapon.ap=this.weapon_list[t].ap,this.final_weapon.damage=this.weapon_list[t].damage,this.final_weapon.era=this.weapon_list[t].era,this.final_weapon.name=this.weapon_list[t].name,this.final_weapon.abrv=this.weapon_list[t].abrv,this.final_weapon.reload=this.weapon_list[t].reload,this.final_weapon.shells=this.weapon_list[t].shells,this.final_weapon.size=this.weapon_list[t].size,this.final_weapon.stats=this.weapon_list[t].stats.Clone(),this.final_weapon.deflection=this.weapon_list[t].deflection,this.final_weapon.jam=this.weapon_list[t].jam,this.final_weapon.stats.era=[],this.final_weapon.stats.era.push({name:this.weapon_list[t].name,era:this.weapon_list[t].era}),0==this.weapon_list[t].hits&&(this.action_sel==L.MECHANICAL&&(this.action_sel=L.STANDARD),this.projectile_sel!=k.GYROJETS&&this.projectile_sel!=k.HEATRAY||(this.projectile_sel=k.BULLETS)),this.action_sel==L.STANDARD)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.synched=this.weapon_list[t].synched;else if(this.action_sel==L.MECHANICAL)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.stats.warnings.push({source:h("Mechanical Action"),warning:h("Mechanical Action Warning"),color:c.WHITE}),this.final_weapon.jam="0/0",this.final_weapon.rapid=!0,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!0,this.final_weapon.stats.era.push({name:h("Mechanical Action"),era:h("WWI")});else if(this.action_sel==L.GAST)this.final_weapon.hits=2*this.weapon_list[t].hits,this.final_weapon.ammo=this.weapon_list[t].ammo/2,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!1,this.final_weapon.stats.era.push({name:h("Gast Principle"),era:h("WWI")});else if(this.action_sel==L.ROTARY){this.final_weapon.stats.mass+=this.weapon_list[t].stats.mass,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.size+=this.weapon_list[t].size,this.final_weapon.size=Math.min(16,this.final_weapon.size),this.final_weapon.hits=3*this.weapon_list[t].hits,this.final_weapon.deflection-=1,this.final_weapon.synched=!1;const e=this.final_weapon.jam.split("/");e[0]="9999",e[1]=(parseInt(e[1])+1).toString(),this.final_weapon.jam=e.join("/"),this.final_weapon.stats.era.push({name:h("Rotary_Gun"),era:h("WWI")})}if(this.repeating&&0!=this.final_weapon.reload&&(this.final_weapon.reload=0,this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost))),this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=k.HEATRAY||(this.projectile_sel=k.BULLETS),this.action_sel!=L.GAST&&this.action_sel!=L.ROTARY&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=k.PNEUMATIC||(this.projectile_sel=k.BULLETS),this.projectile_sel==k.HEATRAY)this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.shells=!1,this.final_weapon.ammo=0,this.final_weapon.deflection=0,this.final_weapon.ap=Math.max(0,this.final_weapon.ap-1),this.final_weapon.stats.warnings.push({source:h("Heat Ray"),warning:h("Heat Ray Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Heat Ray"),era:h("Himmilgard")});else if(this.projectile_sel==k.GYROJETS)this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost)),this.final_weapon.shells=!1,this.final_weapon.damage-=1,this.final_weapon.stats.warnings.push({source:h("Gyrojets"),warning:h("Gyrojets Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Gyrojets"),era:h("Roaring 20s")});else if(this.projectile_sel==k.PNEUMATIC){if(this.final_weapon.ammo*=2,this.final_weapon.shells=!1,this.final_weapon.rapid){const t=this.final_weapon.jam.split("/");t[1]="9999",this.final_weapon.jam=t.join("/"),this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 1"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Pneumatic"),era:h("Pioneer")})}this.final_weapon.hits>0&&this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 2"),color:c.WHITE})}0!=this.final_weapon.deflection&&this.final_weapon.stats.warnings.push({source:h(this.final_weapon.name),warning:h("Deflection Warning",this.final_weapon.deflection),color:c.WHITE})}SetWeaponSelected(t){const e=this.IsLightningArc();if(this.weapon_type=t,this.raw_weapon_type=this.wl_permute.findIndex((e=>e==t)),16==this.weapon_list[t].size)for(;this.weapons.length>1;)this.weapons.pop();this.weapon_list[t].can_action&&this.GetCanAction()[this.action_sel]||(this.action_sel=L.STANDARD),this.weapon_list[t].can_projectile&&this.GetCanProjectile()[this.projectile_sel]||(this.projectile_sel=k.BULLETS),this.weapon_list[t].rapid?this.repeating=!1:this.repeating||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD),this.CanRepeating()||(this.repeating=!1),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);if(this.IsLightningArc()){this.SetFixed(!0),this.directions[0]=!0;for(let t=1;t0)&&this.weapon_list[this.weapon_type].ammo>0&&"Precision Rifle"!=this.weapon_list[this.weapon_type].name}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:(this.repeating=!1,this.weapon_list[this.weapon_type].rapid||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD)),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);this.CalculateStats()}GetFixed(){return this.fixed}SetFixed(t){if(this.IsLightningArc()&&(t=!0),this.fixed!=t){this.fixed=t;for(const t of this.weapons)t.SetFixed(this.fixed);if(t){let t=!1;for(let e=0;ethis.weapons.length;){const t=new ht(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),this.weapons.push(t)}for(;t1||this.weapons[0].GetCount()>1}SetAmmo(t){(t!=t||t<1)&&(t=1),t=Math.floor(1e-6+t),this.ammo=t,this.CalculateStats()}SetHavePropeller(t){this.has_propeller&&!t&&this.action_sel==L.MECHANICAL&&(this.has_propeller=t,this.SetAction(L.STANDARD)),this.has_propeller=t}SetCanWing(t){for(const e of this.weapons)e.SetCanWing(t)}GetAction(){return this.action_sel}GetCanAction(){return[!0,this.has_propeller&&this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].hits>0&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].rapid]}SetAction(t){if(this.final_weapon.can_action){this.action_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.action_sel=L.STANDARD;this.CalculateStats()}GetCanProjectile(){return[!0,this.final_weapon.can_projectile&&this.action_sel!=L.MECHANICAL&&this.action_sel!=L.GAST&&this.weapon_list[this.weapon_type].hits>0,this.final_weapon.can_projectile&&this.action_sel!=L.ROTARY&&this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL]}GetProjectile(){return this.projectile_sel}SetProjectile(t){if(this.final_weapon.can_projectile){this.projectile_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.projectile_sel=k.BULLETS;this.CalculateStats()}GetFinalWeapon(){return this.final_weapon}SetStickyGuns(t){this.sticky_guns=t}GetHRCharges(){if(this.IsLightningArc())return[3];let t=0;for(const e of this.weapons)t+=e.GetCount();if(this.final_weapon.hits>0){let e=this.weapon_list[this.weapon_type].stats.cost;return this.action_sel==L.ROTARY&&(e*=2),this.final_weapon.rapid?[t*e,Math.max(t*e+1,Math.floor(1e-6+1.5*t*e))]:[t*e]}return"Scattergun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(1.875001),Math.floor(3.125001)]:[Math.floor(1.875001)]:"Punt Gun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(3.750001),Math.floor(6.250001)]:[Math.floor(3.750001)]:void 0}GetShots(){return Math.max(1,Math.floor(1e-6+this.final_weapon.ammo*this.ammo))}IsLightningArc(){return"Lightning Arc"==this.final_weapon.name}GetReload(){return this.final_weapon.reload}GetWingWeight(){let t=0;for(const e of this.weapons)e.GetWing()&&(t+=e.PartStats().mass);return t}GetDirectionCount(){let t=0;for(const e of this.directions)e&&t++;return t}SetSeat(t){this.seat=t,this.CalculateStats()}GetSeat(){return this.seat}GetIsFullyAccessible(){for(const t of this.weapons)if(!t.GetAccessible())return!1;return!0}GetIsPartlyAccessible(){for(const t of this.weapons)if(t.GetAccessible())return!0;return!1}SetCalculateStats(t){this.CalculateStats=t;for(const e of this.weapons)e.SetCalculateStats(t)}PartStats(){var t=new u;let e=this.GetDirectionCount(),s=0;for(const i of this.weapons)i.has_cantilever=this.has_cantilever,i.SetTurret(e>2),t=t.Add(i.PartStats()),s+=i.GetCount(),this.fixed||(2==e?t.cost+=1:3==e||4==e?t.cost+=2:5==e?t.cost+=3:6==e&&(t.cost+=4));return(this.projectile_sel==k.HEATRAY||this.IsLightningArc())&&(this.ammo=1),t.mass+=(this.ammo-1)*s,t}GetElectrics(){return{storage:0,equipment:[]}}}const ut=JSON.parse('{"A":[{"name":"Submachine Gun","abrv":"SMG","era":"WWI","cost":1,"mass":1,"drag":0,"damage":1,"hits":4,"ap":0,"ammo":10,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"0/1","reload":2,"size":1,"can_action":true,"can_projectile":true,"deflection":0,"warning":"SMG Warning"},{"name":"Scattergun","abrv":"SG","era":"Pioneer","cost":2,"mass":2,"drag":2,"damage":0.5,"hits":0,"ap":0,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Scattergun Warning","size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Machine Gun","abrv":"LMG","era":"WWI","cost":2,"mass":2,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"1/2","reload":2,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Machine Gun","abrv":"MG","era":"WWI","cost":2,"mass":3,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":10,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"1/2","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Balloon Gun","abrv":"BMG","era":"WWI","cost":3,"mass":3,"drag":1,"damage":2,"hits":4,"ap":0,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":-2},{"name":"Enhanced Machine Gun","abrv":"EMG","era":"Coming Storm","cost":3,"mass":2,"drag":1,"damage":2,"hits":5,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"0/0","reload":0,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Enhanced Heavy Machine Gun","abrv":"EHMG","era":"Coming Storm","cost":5,"mass":3,"drag":2,"damage":4,"hits":5,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Punt Gun","abrv":"PG","era":"Pioneer","cost":4,"mass":4,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Punt Gun Warning","size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Repeating Cannon","abrv":"LRC","era":"WWI","cost":4,"mass":4,"drag":3,"damage":8,"hits":3,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"2/5","reload":2,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Heavy Cannon","abrv":"HC","era":"WWI","cost":6,"mass":5,"drag":2,"damage":16,"hits":1,"ap":2,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Light Machine Cannon","abrv":"LMC","era":"Coming Storm","cost":8,"mass":4,"drag":3,"damage":8,"hits":4,"ap":4,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Machine Cannon","abrv":"HMC","era":"WWII","cost":12,"mass":5,"drag":4,"damage":12,"hits":3,"ap":4,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Fliergerflammenwerfer","abrv":"FFW","era":"WWI","cost":5,"mass":1,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0/0","reload":0,"warning":"Fliergerflammenwerfer Warning","size":8,"can_action":false,"can_projectile":false,"deflection":0},{"name":"Recoilless Cannon","abrv":"RC","era":"WWI","cost":5,"mass":8,"drag":3,"damage":30,"hits":1,"ap":3,"ammo":3,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":-5},{"name":"Autocannon","abrv":"AC","era":"WWII","cost":15,"mass":8,"drag":5,"damage":24,"hits":2,"ap":5,"ammo":2,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Battle Cannon","abrv":"BC","era":"WWII","cost":15,"mass":40,"drag":8,"damage":24,"hits":2,"ap":5,"ammo":1,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Precision Rifle","abrv":"PR","era":"WWI","mass":1,"drag":1,"cost":2,"damage":5,"hits":10,"ap":2,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":2,"can_action":false,"can_projectile":false,"warning":"Precision Rifle Warning","deflection":0},{"name":"Lightning Arc","abrv":"LA","era":"Himmilgard","cost":8,"mass":5,"drag":3,"damage":0,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0","reload":0,"size":16,"can_action":false,"can_projectile":false,"warning":"Lightning Arc Warning","deflection":0},{"name":"Harpoon Launcher","abrv":"HL","era":"Himmilgard","cost":3,"mass":3,"drag":2,"damage":4,"hits":1,"ap":1,"ammo":2,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":0,"reload":1,"size":4,"can_action":false,"can_projectile":false,"warning":"Harpoon Launcher Warning","deflection":0},{"name":"Heavy Machine Gun","abrv":"HMG","era":"WWI","cost":4,"mass":4,"drag":2,"damage":4,"hits":4,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Repeating Cannon","abrv":"HRC","era":"WWI","cost":10,"mass":6,"drag":4,"damage":16,"hits":2,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"4/6","reload":2,"size":16,"can_action":true,"can_projectile":true,"deflection":-3}]}');class mt extends H{constructor(){super(),this.direction_list=["Forward","Rearward","Up","Down","Left","Right"],this.synchronization_list=["None","Interruptor Gear","Synchronization Gear","Spinner Gun","Deflector Plate","No Interference"],this.action_list=[{name:"Standard Action"},{name:"Mechanical Action"},{name:"Gast Principle"},{name:"Rotary_Gun"}],this.projectile_list=[{name:"Standard"},{name:"Heat Ray"},{name:"Pneumatic"}],this.weapon_list=[];for(const t of ut.A){const e={name:t.name,abrv:t.abrv,era:t.era,size:t.size,stats:new u(t),damage:t.damage,hits:t.hits,ammo:t.ammo,ap:t.ap,jam:t.jam.toString(),reload:t.reload,rapid:t.rapid,synched:t.synched,shells:t.shells,can_action:t.can_action,can_projectile:t.can_projectile,deflection:t.deflection};this.weapon_list.push(e)}const t=(t,e)=>{const s=(t,e)=>tt(this.weapon_list[e],this.weapon_list[s])));const e=[];for(let t=0;te==t)));this.wl_permute=e,this.weapon_list=this.weapon_list.sort(t),this.weapon_sets=[],this.brace_count=0,this.isheli=!1}toJSON(){const t=[];for(const e of this.weapon_sets)t.push(e.toJSON());return{weapon_systems:t,brace_count:this.brace_count}}fromJSON(t,e){this.weapon_sets=[];const s=t.weapon_systems;for(const t of s){const s=new ct(this.weapon_list,this.wl_permute);s.SetCalculateStats(this.CalculateStats),s.fromJSON(t,e),this.weapon_sets.push(s)}e>10.35&&(this.brace_count=t.brace_count)}serialize(t){t.PushNum(this.weapon_sets.length);for(const e of this.weapon_sets)e.serialize(t);t.PushNum(this.brace_count)}deserialize(t){this.weapon_sets=[];const e=t.GetNum();for(let s=0;s10.35&&(this.brace_count=t.GetNum())}GetWeaponList(){return this.weapon_list}GetDirectionList(){return this.direction_list}GetSynchronizationList(){return this.synchronization_list}SetWeaponSetCount(t){for((t!=t||t<1)&&(t=0),t=Math.floor(1e-6+t);t>this.weapon_sets.length;){const t=new ct(this.weapon_list,this.wl_permute);t.SetCalculateStats(this.CalculateStats),this.weapon_sets.push(t)}for(;t=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER)return void e[t].SetSynchronization(O.INTERRUPT)}}RemoveOneArtyTractorSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(O.NO_INTERFERENCE)}}RemoveOnePusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER)return void e[t].SetSynchronization(O.INTERRUPT)}}RemoveOneArtyPusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(O.NO_INTERFERENCE)}}CanTractorSpinner(){return this.CountTractorSpinner()+this.CountArtyTractorSpinner()this.tractor_arty_spinner_count;)this.RemoveOneArtyTractorSpinner();for(;this.CountTractorSpinner()>this.tractor_spinner_count;)this.RemoveOneTractorSpinner();for(;this.CountArtyPusherSpinner()>this.pusher_arty_spinner_count;)this.RemoveOneArtyPusherSpinner();for(;this.CountPusherSpinner()>this.pusher_spinner_count;)this.RemoveOnePusherSpinner();var e=0,s=0;0==this.cant_type?(e=4,s=2):1==this.cant_type?(e=8,s=4):(e=16,s=8);const i=[];for(const t of this.weapon_sets)for(const e of t.GetWeapons()){e.wing_reinforcement=!1;const s={total:0,count:0,sz:0,w:e};e.GetWing()&&(s.count=e.GetCount(),s.sz=this.weapon_list[t.GetWeaponSelected()].size,s.total=s.count*s.sz,i.push(s))}i.sort((function(t,e){return t.total-e.total}));for(const t of i)e>=0&&(s0,t=t.Add(e.PartStats());return t.cost+=this.brace_count/3,this.brace_count>0&&t.warnings.push({source:h("Weapons Braces"),warning:h("Weapons Braces Warning"),color:c.WHITE}),t.control-=Math.floor(1e-6+this.GetWingWeight()/5),t}GetElectrics(){const t={storage:0,equipment:[]};for(let e=0;e11.55&&(this.blade_idx=t.blade_idx),e<12.45&&(this.rotor_span=0),this.rotor_thickness=e<12.55?0:t.rotor_thickness,this.dryMP=-1}serialize(t){t.PushNum(this.type),t.PushNum(this.rotor_count),t.PushNum(this.rotor_span),t.PushNum(this.cant_idx),t.PushNum(this.stagger_sel),t.PushBool(this.accessory),t.PushNum(this.blade_idx),t.PushNum(this.rotor_thickness)}deserialise(t){this.type=t.GetNum(),this.rotor_count=t.GetNum(),this.rotor_span=t.GetNum(),this.cant_idx=t.GetNum(),t.version<12.35?(t.GetBool(),this.stagger_sel=0):this.stagger_sel=t.GetNum(),this.accessory=t.GetBool(),t.version>11.55&&(this.blade_idx=t.GetNum()),t.version<12.45&&(this.rotor_span=0),t.version<12.55?this.rotor_thickness=0:this.rotor_thickness=t.GetNum(),this.dryMP=-1}SetCantileverList(t){this.cant_list=t}GetCantileverList(){return this.cant_list}SetCantilever(t){this.cant_idx=t,this.CalculateStats()}GetCantilever(){return this.cant_idx}SetRotorThickness(t){t<0&&(t=0),this.rotor_thickness=Math.floor(1e-6+t),this.CalculateStats()}GetRotorThickness(){return this.rotor_thickness}SetType(t){this.type!=t&&(this.accessory=!1,this.cant_idx=0,this.stagger_sel=0,this.rotor_count=1,this.type=t,this.rotor_span=0)}CanRotorCount(){return this.type==N.HELICOPTER}SetRotorCount(t){t<1&&(t=1),t>=2&&t%2==1&&(t==this.rotor_count+1?t+=1:t-=1),this.rotor_count=t,this.rotor_count<2&&(this.stagger_sel=0),this.CalculateStats()}GetRotorCount(){return this.rotor_count}CanRotorSpan(){return this.type==N.HELICOPTER}SetRotorSpan(t){this.rotor_span=Math.floor(1e-6+t),this.CalculateStats()}GetRotorSpan(){return this.rotor_span}CanTandem(){return this.type==N.HELICOPTER&&this.rotor_count>1}SetBladeCount(t){this.blade_idx=t,this.CalculateStats()}SetWingArea(t){this.wing_area=t}GetSizingSpan(){return this.sizing_span}SetMP(t){t!=this.dryMP&&(this.dryMP=t,this.CalculateStats())}GetRotorStrain(){const t=this.GetRotorArea();return this.rotor_count*Math.max(1,2*(this.sizing_span+this.rotor_span)+t-10)}GetRotorArea(){return Math.PI/9*(this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span)}GetIdealRotorArea(){return Math.PI/9*this.sizing_span*this.sizing_span}GetRotorDrag(){if(this.type==N.HELICOPTER||this.type==N.AUTOGYRO){const t=this.GetRotorArea();return 1==this.rotor_count?Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))):Math.floor(1e-6+.75*this.rotor_count*Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))))}return 0}GetType(){return this.type}GetAccessory(){return this.accessory}SetAccessory(t){this.accessory=t,this.CalculateStats()}SetEngineCount(t){this.engine_count=t}GetTailRotor(){return this.type==N.HELICOPTER&&this.rotor_count<2}GetBladeList(){return this.blade_list}GetRotorBleed(){return this.type==N.HELICOPTER?this.blade_list[this.blade_idx].rotor_bleed:0}GetPowerFactor(){return this.stagger_list[this.stagger_sel].powerfactor}GetBladeCountIdx(){return this.blade_idx}GetStaggerList(){return this.stagger_list}GetStagger(){return this.stagger_sel}SetStagger(t){t!=this.stagger_sel&&(this.stagger_sel=t,this.CalculateStats())}CanStagger(){const t=[];for(let e=0;e=2&&3==this.stagger_list[e].count?t.push(!0):t.push(!1);return t}VerifySizes(){this.type==N.AIRPLANE?(this.rotor_count=0,this.rotor_span=0,this.stagger_sel=0):this.type==N.AUTOGYRO?(this.rotor_count=1,this.sizing_span=Math.ceil(-1e-6+Math.sqrt(.6*this.wing_area/(Math.PI/8))),this.rotor_span=Math.max(this.rotor_span,2-this.sizing_span),this.stagger_sel=0):this.type==N.HELICOPTER&&(this.rotor_count=Math.max(1,this.rotor_count),this.rotor_count>1&&this.rotor_count%2==1&&(this.rotor_count=this.rotor_count-1),-1!=this.dryMP?(1==this.rotor_count?this.sizing_span=Math.ceil(5*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6):this.sizing_span=Math.ceil(4*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6),this.sizing_span=Math.min(100,this.sizing_span),this.rotor_span=Math.max(this.rotor_span,-Math.floor(1e-6+this.sizing_span/2))):this.sizing_span=10)}VerifyStagger(){if(this.rotor_count>2&&this.stagger_list[this.stagger_sel].count<=2){for(let t=0;t{var s=document.getElementById(t);s.classList.toggle("active",e);var i=s.nextElementSibling;(i=i.nextElementSibling).style.maxHeight=e?"inherit":"0px"};class kt{}class Lt extends kt{constructor(t){super(),this.weap=t,document.getElementById("lbl_weapons").textContent=h("Weapons Section Title"),document.getElementById("lbl_num_wsets").textContent=h("Weapons Number of Weapon Sets"),this.inp_w_count=document.getElementById("num_wsets"),this.inp_w_count.onchange=()=>{this.weap.SetWeaponSetCount(this.inp_w_count.valueAsNumber)},document.getElementById("lbl_num_wbraces").textContent=h("Weapons Number of Weapon Braces"),this.inp_w_brace=document.getElementById("num_wbraces"),this.inp_w_brace.onchange=()=>{this.weap.SetBraceCount(this.inp_w_brace.valueAsNumber)},this.tbl=document.getElementById("table_weapons"),this.wrow=[]}CreateWSetRow(){const t=document.createDocumentFragment(),e=this.tbl.insertRow(),s=function(t,e){const s=document.createElement("TD");return s.innerHTML="",t.appendChild(s),s}(e),i=document.createElement("SPAN");St(e,h("Weapons Weapons")),St(e,h("Weapons Weapon Stats"));const a=xt(t),n=a.insertCell(),r={plus:document.createElement("BUTTON"),minus:document.createElement("BUTTON"),type:document.createElement("SELECT"),dirs:[],count:document.createElement("INPUT"),action:document.createElement("SELECT"),projectile:document.createElement("SELECT"),fixed:document.createElement("INPUT"),wcell:null,weaps:[],ammo:document.createElement("INPUT"),stats:{mass:null,drag:null,cost:null,sect:null,mounting:null,jams:null,hits:null,damg:null,shots:null,shots_header:null},repeating:document.createElement("INPUT"),seat:document.createElement("SELECT")},o=this.weap.GetWeaponList();for(const t of o){const e=document.createElement("OPTION");e.text=h(t.name)+" ("+h(t.era)+")",r.type.add(e)}r.type.required=!0;const l=this.weap.GetSeatList();for(const t of l){const e=document.createElement("OPTION");e.text=t,r.seat.add(e)}const c=this.weap.GetActionList();for(const t of c){const e=document.createElement("OPTION");e.text=h(t.name),r.action.add(e)}r.action.required=!0;const u=this.weap.GetProjectileList();for(const t of u){const e=document.createElement("OPTION");e.text=h(t.name),r.projectile.add(e)}r.projectile.required=!0,r.plus.textContent="+",r.minus.textContent="-";const m=bt(n);i.appendChild(r.minus),i.appendChild(r.plus);const p=St(i,h("Weapons Weapon Set"));p.style.border="none",p.style.width="100%",p.style.padding="0",i.style.display="inline-flex",i.style.width="100%",s.appendChild(i),Bt(h("Weapons Type"),r.type,m),Bt(h("Seat Location"),r.seat,m);const d=bt(m.div1),g=bt(m.div2);wt(h("Weapons Number of Mounts"),r.count,d),wt(h("Weapons Ammunition"),r.ammo,g),Bt(h("Weapons Action"),r.action,d),Bt(h("Weapons Projectile"),r.projectile,g),Pt(h("Weapons Belt Fed"),r.repeating,d),Rt(g),Pt(h("Fixed"),r.fixed,d),Rt(g);const _=this.weap.GetDirectionList();for(let t=0;t<_.length;t+=2){const e=h(_[t]);var f=document.createElement("INPUT");Pt(e,f,d),r.dirs.push(f),Pt(h(_[t+1]),f=document.createElement("INPUT"),g),r.dirs.push(f)}r.wcell=a.insertCell();const A=a.insertCell();A.classList.toggle("inner_table");const b=document.createElement("TABLE");b.classList.toggle("inner_table"),A.appendChild(b);const S=b.insertRow();St(S,h("Stat Mass")),St(S,h("Stat Drag")),St(S,h("Stat Cost"));const y=b.insertRow();r.stats.mass=y.insertCell(),r.stats.drag=y.insertCell(),r.stats.cost=y.insertCell();const w=b.insertRow();St(w,h("Stat Required Sections")),St(w,h("Weapons Stat Mounting")),St(w,h("Weapons Stat Jam"));const C=b.insertRow();r.stats.sect=C.insertCell(),r.stats.mounting=C.insertCell(),r.stats.jams=C.insertCell();const B=b.insertRow();St(B,h("Weapons Stat Hits")),St(B,h("Weapons Stat Damage")),r.stats.shots_header=St(B,h("Weapons Stat Shots"));const E=b.insertRow();return r.stats.hits=E.insertCell(),r.stats.damg=E.insertCell(),r.stats.shots=E.insertCell(),this.tbl.appendChild(t),r}CreateWRow(t){const e={span:document.createElement("SPAN"),wing:document.createElement("INPUT"),covered:document.createElement("INPUT"),accessible:document.createElement("INPUT"),free_access:document.createElement("INPUT"),synch:document.createElement("SELECT"),count:document.createElement("INPUT")};Et(h("Weapons Wing Mount"),e.wing,e.span,!1),Et(h("Weapons Accessible"),e.accessible,e.span,!1),Et(h("Weapons Free Accessible"),e.free_access,e.span,!1),Et(h("Weapons Covered"),e.covered,e.span,!0),yt(h("Weapons # Weapons at Mount"),e.count,e.span,!1),function(t,e,s,i=!0){const a=document.createElement("SPAN"),n=document.createElement("LABEL");e.id=At(),n.htmlFor=e.id,n.style.marginLeft="0.25em",n.style.marginRight="0.5em",n.textContent=t,a.appendChild(n),a.appendChild(e),s.appendChild(a),i&&s.appendChild(document.createElement("BR"))}(h("Weapons Synchronization"),e.synch,e.span,!1),e.span.appendChild(document.createElement("HR"));const s=this.weap.GetSynchronizationList();for(const t of s){const s=document.createElement("OPTION");s.text=h(t),e.synch.add(s)}return t.appendChild(e.span),e}UpdateWSet(t,e){e.type.selectedIndex=t.GetWeaponSelected(),e.type.onchange=()=>{t.SetWeaponSelected(e.type.selectedIndex)};const s=this.weap.GetSeatList();if(e.seat.options.length!=s.length){for(;e.seat.options.length>0;)e.seat.options.remove(e.seat.options.length-1);for(const t of s){const s=document.createElement("OPTION");s.text=t,e.seat.add(s)}}e.seat.selectedIndex=t.GetSeat(),e.seat.onchange=()=>{t.SetSeat(e.seat.selectedIndex)},e.count.valueAsNumber=t.GetMountingCount(),e.count.onchange=()=>{t.SetMountingCount(e.count.valueAsNumber)},e.action.selectedIndex=t.GetAction();const i=t.GetCanAction();i[3]=!1;for(let t=0;t{t.SetAction(e.action.selectedIndex)},e.projectile.selectedIndex=t.GetProjectile();const a=t.GetCanProjectile();for(let t=0;t{t.SetProjectile(e.projectile.selectedIndex)},e.repeating.checked=t.GetRepeating(),e.repeating.onchange=()=>{t.SetRepeating(e.repeating.checked)},e.repeating.disabled=!t.CanRepeating(),e.fixed.checked=t.GetFixed(),e.fixed.onchange=()=>{t.SetFixed(e.fixed.checked)};const r=t.GetDirection(),o=t.CanDirection();for(let s=0;s{t.SetDirection(s,e.dirs[s].checked)},e.dirs[s].disabled=!o[s];e.ammo.valueAsNumber=t.GetAmmo(),e.ammo.onchange=()=>{t.SetAmmo(e.ammo.valueAsNumber)};const l=t.GetWeapons();for(;e.weaps.lengthl.length;){const t=e.weaps.pop();e.wcell.removeChild(t.span)}for(let t=0;t{l[t].SetWing(e.weaps[t].wing.checked)},e.weaps[t].wing.disabled=!l[t].CanWing(),e.weaps[t].covered.checked=l[t].GetCovered(),e.weaps[t].covered.onchange=()=>{l[t].SetCovered(e.weaps[t].covered.checked)},e.weaps[t].covered.disabled=!l[t].CanCovered(),e.weaps[t].accessible.checked=l[t].GetAccessible(),e.weaps[t].accessible.onchange=()=>{l[t].SetAccessible(e.weaps[t].accessible.checked)},e.weaps[t].free_access.checked=l[t].GetFreeAccessible(),e.weaps[t].free_access.onchange=()=>{l[t].SetFreeAccessible(e.weaps[t].free_access.checked)},e.weaps[t].free_access.disabled=!(l[t].can_free_accessible||l[t].GetFreeAccessible()),e.weaps[t].count.valueAsNumber=l[t].GetCount(),e.weaps[t].count.onchange=()=>{l[t].SetCount(e.weaps[t].count.valueAsNumber)},e.weaps[t].synch.selectedIndex=l[t].GetSynchronization()+1,e.weaps[t].synch.onchange=()=>{l[t].SetSynchronization(e.weaps[t].synch.selectedIndex-1)},e.weaps[t].synch.disabled=!l[t].can_synchronize;const s=l[t].CanSynchronization();for(let i=0;ithis.wrow.length;)this.wrow.push(this.CreateWSetRow());for(;t.length{this.weap.DuplicateSet(e)},this.wrow[e].minus.onclick=()=>{this.weap.RemoveSet(e)},this.UpdateWSet(t[e],this.wrow[e])}UpdateDisplay(){this.UpdateWSets(),this.inp_w_count.valueAsNumber=this.weap.GetWeaponSets().length,this.inp_w_brace.valueAsNumber=this.weap.GetBraceCount()}}function Wt(t,e){const s=t.GetDirection();let i=0;for(const t of s)t&&i++;let a="";return 1==i&&t.GetFixed()?a+=h("Fixed")+" ":a+=i<=2?h("Flexible")+" ":h("Turreted")+" ",t.GetAction()==L.MECHANICAL?a+=h("Weapon Tag Mechanical Action")+" ":t.GetAction()==L.GAST?a+=h("Weapon Tag Gast Principle")+" ":t.GetAction()==L.ROTARY&&(a+=h("Weapon Tag Rotary")+" "),t.GetProjectile()==k.HEATRAY?a+=h("Weapon Tag Heat Ray")+" ":t.GetProjectile()==k.GYROJETS?a+=h("Weapon Tag Gyrojet")+" ":t.GetProjectile()==k.PNEUMATIC&&(a+=h("Weapon Tag Pneumatic")+" "),a+=e[t.GetWeaponSelected()].abrv,a}function Ht(t){const e=[h("Weapon Tag Jam",t.GetJam())],s=t.GetFinalWeapon();return t.GetReload()>0&&(1==t.GetReload()?e.push(h("Weapon Tag Manual")):e.push(h("Weapon Tag Reload",t.GetReload()))),s.rapid&&e.push(h("Weapon Tag Rapid Fire")),s.shells&&e.push(h("Weapon Tag Shells")),s.ap>0&&e.push(h("Weapon Tag AP",s.ap)),t.GetIsFullyAccessible()?e.push(h("Weapon Tag Fully Accessible")):t.GetIsPartlyAccessible()?e.push(h("Weapon Tag Partly Accessible")):e.push(h("Weapon Tag Inaccessible")),s.deflection&&e.push(h("Weapon Tag Awkward",s.deflection)),e}function qt(t,e,s){var i="";const a=t.GetDirection(),r=[];for(let t=0;t{this.CalculateStats()})),this.cockpits.SetCalculateStats((()=>{this.CalculateStats()})),this.passengers.SetCalculateStats((()=>{this.CalculateStats()})),this.engines.SetCalculateStats((()=>{this.CalculateStats()})),this.propeller.SetCalculateStats((()=>{this.CalculateStats()})),this.frames.SetCalculateStats((()=>{this.CalculateStats()})),this.wings.SetCalculateStats((()=>{this.CalculateStats()})),this.stabilizers.SetCalculateStats((()=>{this.CalculateStats()})),this.controlsurfaces.SetCalculateStats((()=>{this.CalculateStats()})),this.reinforcements.SetCalculateStats((()=>{this.CalculateStats()})),this.fuel.SetCalculateStats((()=>{this.CalculateStats()})),this.munitions.SetCalculateStats((()=>{this.CalculateStats()})),this.cargo.SetCalculateStats((()=>{this.CalculateStats()})),this.gear.SetCalculateStats((()=>{this.CalculateStats()})),this.accessories.SetCalculateStats((()=>{this.CalculateStats()})),this.optimization.SetCalculateStats((()=>{this.CalculateStats()})),this.weapons.SetCalculateStats((()=>{this.CalculateStats()})),this.used.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCalculateStats((()=>{this.CalculateStats()})),this.alter.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCantileverList(this.reinforcements.GetCantileverList()),this.cockpits.SetNumberOfCockpits(1),this.engines.SetNumberOfEngines(1),this.frames.SetTailType(1),this.use_storage=e,this.updated_stats=!1,this.freeze_calculation=!1,this.aircraft_type=N.AIRPLANE,this.Reset()}InteractiveDash(){const t=this.GetStats(),e=this.GetDerivedStats(),s=this.VitalComponentList();for(var i=!1;s.length>10;)s.pop(),i=!0;for(i&&(s.pop(),s.push("And More. See Plane Builder for full list."));s.length<10;)s.push("");const a=this.GetAccessories().GetEffectiveCoverage();var n="";for(let t=0;t0&&(n+=""!=n?", ":h("Armour")+" ",n+=e.toString()+"/+"+(11-a[t]).toString())}const r=[],o=this.GetMunitions().GetBombCount(),l=this.GetMunitions().GetRocketCount();var c=this.GetMunitions().GetInternalBombCount();if((o>0||l>0)&&r.push("Current load here."),o>0){const t=Math.min(o,c),e=Math.max(0,o-t);if(t>0&&r.push(h(" Bomb Mass Internally.",t)),e>0&&r.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.GetMunitions().GetMaxBombSize());r.push(h("Largest Internal Bomb",e.toString()))}c-=t}if(l>0){const t=Math.min(l,c),e=Math.max(0,l-t);t>0&&r.push(h(" Rocket Mass Internally.",t)),e>0&&r.push(h(" Rocket Mass Externally.",e))}for(;r.length<5;)r.push("");let u="";for(const e of t.warnings)u+=e.source+": "+e.warning+"\n";const m={altitude:0,airspeed:0,fuel:e.FuelUses,dropoff:e.Dropoff,visibility:this.GetCockpits().GetCockpit(0).GetVisibility(),energy_loss:e.EnergyLoss,turn_bleed:e.TurnBleed,stability:e.Stabiilty,stress:this.GetCockpits().GetCockpit(0).GetFlightStress()[0],plane_escape:this.GetCockpits().GetCockpit(0).GetEscape(),crash:this.GetCockpits().GetCockpit(0).GetCrash(),max_toughness:e.Toughness,current_toughness:e.Toughness,max_strain:e.MaxStrain,current_strain:e.MaxStrain,g_force:0,kills:0,full_load_boost:e.BoostFullwBombs,full_load_handling:e.HandlingFullwBombs,full_load_climb:e.RateOfClimbwBombs,full_load_stall:e.StallSpeedFullwBombs,full_load_speed:e.MaxSpeedwBombs,half_fuel_bombs_boost:Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),half_fuel_bombs_handling:Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),half_fuel_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),half_fuel_bombs_stall:Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),half_fuel_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),full_fuel_no_bombs_boost:e.BoostFull,full_fuel_no_bombs_handling:e.HandlingFull,full_fuel_no_bombs_climb:e.RateOfClimbFull,full_fuel_no_bombs_stall:e.StallSpeedFull,full_fuel_no_bombs_speed:Math.floor(1e-6+e.MaxSpeedFull),half_fuel_no_bombs_boost:Math.floor((e.BoostFull+e.BoostEmpty)/2),half_fuel_no_bombs_handling:Math.floor((e.HandlingFull+e.HandlingEmpty)/2),half_fuel_no_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),half_fuel_no_bombs_stall:Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),half_fuel_no_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),empty_boost:0,empty_handling:e.HandlingEmpty,empty_climb:0,empty_stall:e.StallSpeedEmpty,empty_speed:0,vital_part_1:s[0],vital_part_2:s[1],vital_part_3:s[2],vital_part_4:s[3],vital_part_5:s[4],vital_part_6:s[5],vital_part_7:s[6],vital_part_8:s[7],vital_part_9:s[8],vital_part_10:s[9],armor:n,max_bomb_load:r[0],ordinance_1:r[1],ordinance_2:r[2],ordinance_3:r[3],ordinance_4:r[4],notes:u,full_load_selected:!0,half_fuel_bombs_selected:!1,full_fuel_no_bombs_selected:!1,half_fuel_no_bombs_selected:!1,empty_selected:!1,engines:this.InteractiveEngines(),weapons:this.InteractiveWeapons()};return JSON.stringify(m)}InteractiveEngines(){const t=[];for(let e=0;e0&&t.starter&&r.push(h("Starter"))}else{s.IsRotary()&&s.IsTractor()?r.push(h("Turns Right")):s.IsRotary()&&s.IsPusher()&&r.push(h("Turns Left"));const t=T().get(s.GetSelectedList()).get_name(a.name);t.upgrades[1]?r.push(h("War Emergency Power")):t.compressor_count>0&&1==t.compressor_type&&r.push(h("War Emergency Power from altitudes 0-9"))}if(i.notes=n.Join(", ",r),s.GetUsePushPull()){const e=i.reliability.split("/");i.reliability=e[0].toString(),t.push(JSON.stringify(i)),i.reliability=e[0].toString(),t.push(JSON.stringify(i))}else t.push(JSON.stringify(i))}return t}InteractiveWeapons(){const t=[];for(const s of this.GetWeapons().GetWeaponSets()){const i=this.GetWeapons().GetWeaponList(),a=s.GetHits(),r=[];"PR"==i[s.GetWeaponSelected()].abrv?(r.push(5),r.push(5),r.push(5),r.push(5)):(r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[0])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[1])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[2])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[3])));const o=s.GetFinalWeapon(),l=[],c={type:Wt(s,i),ammo:s.GetShots(),ap:o.ap,jam:s.GetJam(),knife_hits:a[0],close_hits:a[1],long_hits:a[2],extreme_hits:a[3],knife_damage:r[0],close_damage:r[1],long_damage:r[2],extreme_damage:r[3],tags:""},u=this.GetWeapons().GetDirectionList();s.IsPlural()&&(c.type=s.GetWeaponCount().toString()+"x "+c.type);const m=s.GetDirection();var e="";e+="[";for(let t=0;t11.05?(this.aircraft_type=t.aircraft_type,this.rotor.SetType(t.aircraft_type)):(this.aircraft_type=N.AIRPLANE,this.rotor.SetType(N.AIRPLANE)),this.era.fromJSON(t.era,s),this.cockpits.fromJSON(t.cockpits,s),this.passengers.fromJSON(t.passengers,s),this.engines.fromJSON(t.engines,s),this.propeller.fromJSON(t.propeller,s),this.frames.fromJSON(t.frames,s),this.wings.fromJSON(t.wings,s),this.stabilizers.fromJSON(t.stabilizers,s),this.controlsurfaces.fromJSON(t.controlsurfaces,s),this.reinforcements.fromJSON(t.reinforcements,s),this.fuel.fromJSON(t.fuel,s),this.munitions.fromJSON(t.munitions,s),this.cargo.fromJSON(t.cargo,s),this.gear.fromJSON(t.gear,s),this.accessories.fromJSON(t.accessories,s),this.optimization.fromJSON(t.optimization,s),this.weapons.fromJSON(t.weapons,s),s>10.65&&this.used.fromJSON(t.used,s),s>11.05&&this.rotor.fromJSON(t.rotor,s),s>12.25?this.alter.fromJSON(t.alter,s):this.alter.ClearAll(),this.freeze_calculation=!1,!0}serialize(t){t.PushString(this.version),t.PushString(this.name),this.era.serialize(t),this.cockpits.serialize(t),this.passengers.serialize(t),this.engines.serialize(t),this.propeller.serialize(t),this.frames.serialize(t),this.wings.serialize(t),this.stabilizers.serialize(t),this.controlsurfaces.serialize(t),this.reinforcements.serialize(t),this.fuel.serialize(t),this.munitions.serialize(t),this.cargo.serialize(t),this.gear.serialize(t),this.accessories.serialize(t),this.optimization.serialize(t),this.weapons.serialize(t),this.used.serialize(t),this.rotor.serialize(t),t.PushNum(this.aircraft_type),this.alter.serialize(t)}deserialize(t){this.freeze_calculation=!0,t.version=parseFloat(t.GetString()),this.name=t.GetString(),this.era.deserialize(t),this.cockpits.deserialize(t),this.passengers.deserialize(t),this.engines.deserialize(t),this.propeller.deserialize(t),this.frames.deserialize(t),this.wings.deserialize(t),this.stabilizers.deserialize(t),this.controlsurfaces.deserialize(t),this.reinforcements.deserialize(t),this.fuel.deserialize(t),this.munitions.deserialize(t),this.cargo.deserialize(t),this.gear.deserialize(t),this.accessories.deserialize(t),this.optimization.deserialize(t),this.weapons.deserialize(t),t.version>10.65&&this.used.deserialize(t),t.version>11.05&&t.GetRemaining()>0?(this.rotor.deserialise(t),this.aircraft_type=t.GetNum(),this.rotor.SetType(this.aircraft_type)):(this.aircraft_type=N.AIRPLANE,this.rotor.SetType(N.AIRPLANE)),t.version>12.25?this.alter.deserialize(t):this.alter.ClearAll(),this.freeze_calculation=!1}SetType(t){this.aircraft_type=t,this.rotor.SetType(t),this.CalculateStats()}SetDisplayCallback(t){this.DisplayCallback=t}CalculateStats(){if(this.freeze_calculation)return;this.recurrent_calculation_depth=this.recurrent_calculation_depth+1,this.updated_stats=!1;let t=new u;if(t=t.Add(this.era.PartStats()),t=t.Add(this.cockpits.PartStats()),t=t.Add(this.passengers.PartStats()),this.engines.SetTailMods(this.frames.GetFarmanOrBoom(),this.wings.GetSwept()&&this.stabilizers.GetVOutboard(),this.stabilizers.GetCanard()),this.engines.SetInternal(this.aircraft_type==N.HELICOPTER||W(this.aircraft_type)),this.engines.SetMetalArea(this.wings.GetMetalArea()),this.engines.HaveParasol(this.wings.GetParasol()),t=t.Add(this.engines.PartStats()),this.propeller.SetEngineTypes(this.engines.GetEngineTypes()),this.propeller.SetAcftType(this.aircraft_type),t=t.Add(this.propeller.PartStats()),t=t.Add(this.fuel.PartStats()),t=t.Add(this.munitions.PartStats()),this.weapons.SetNumberOfCockpits(this.cockpits.GetNumberOfCockpits()),this.weapons.SetTractorInfo(this.engines.GetTractorSpinner()),this.weapons.SetPusherInfo(this.engines.GetPusherSpinner()),this.weapons.cant_type=this.reinforcements.GetCantileverType(),this.weapons.SetHavePropeller(this.engines.GetNumPropellers()>0),this.weapons.SetCanWing(!W(this.aircraft_type)),t=t.Add(this.weapons.PartStats()),t=t.Add(this.cargo.PartStats()),this.wings.SetAcftType(this.aircraft_type),this.aircraft_type==N.AUTOGYRO?this.wings.SetRotorSpan(this.rotor.GetRotorSpan()):this.wings.SetRotorSpan(0),t=t.Add(this.wings.PartStats()),this.rotor.SetWingArea(t.wingarea),this.aircraft_type==N.AUTOGYRO&&(this.rotor.SetEngineCount(this.engines.GetNumberOfEngines()),t=t.Add(this.rotor.PartStats())),this.controlsurfaces.SetWingArea(t.wingarea),this.controlsurfaces.SetBoomTail(this.frames.GetUseBoom()),this.controlsurfaces.SetSpan(this.wings.GetSpan()),this.controlsurfaces.SetAcftType(this.aircraft_type),this.controlsurfaces.SetCanElevator(this.stabilizers.GetHStabCount()>0),this.controlsurfaces.SetCanRudder(this.stabilizers.GetVStabCount()>0),this.controlsurfaces.SetIsVTail(this.stabilizers.GetIsVTail()),this.aircraft_type==N.AIRPLANE?this.controlsurfaces.SetNumCantilever(this.reinforcements.GetTotalCantilevers()):this.controlsurfaces.SetNumCantilever(0),t=t.Add(this.controlsurfaces.PartStats()),this.reinforcements.SetMonoplane(this.wings.GetMonoplane()),this.reinforcements.SetTandem(this.wings.GetTandem()),this.reinforcements.SetStaggered(this.wings.GetStaggered()),this.reinforcements.SetCanUseExternal(this.wings.GetArea()>0),this.reinforcements.SetSesquiplane(this.wings.GetIsSesquiplane()),this.reinforcements.SetAircraftType(this.aircraft_type),this.reinforcements.SetCantLift(this.era.GetCantLift()),t=t.Add(this.reinforcements.PartStats()),this.rotor.GetTailRotor()&&(t.power=Math.floor(1e-6+.9*t.power)),this.accessories.SetAcftRadiator(this.engines.GetNumberOfRadiators()>0),this.accessories.SetSkinArmor(this.frames.GetArmor()),this.accessories.SetCanCutouts(this.wings.CanCutout(),this.frames.CanCutout()),t=t.Add(this.accessories.PartStats()),this.frames.SetRequiredSections(t.reqsections),this.frames.SetHasTractorNacelles(this.engines.GetHasTractorNacelles()),this.frames.SetIsTandem(this.wings.GetTandem()),t=t.Add(this.frames.PartStats()),this.stabilizers.SetEngineCount(this.engines.GetNumberOfEngines()),this.stabilizers.SetIsTandem(this.wings.GetTandem()),this.stabilizers.SetIsSwept(this.wings.GetSwept()),this.stabilizers.SetHaveTail(!this.frames.GetIsTailless()),this.stabilizers.SetHelicopter(!1),this.stabilizers.SetLiftingArea(t.wingarea),this.stabilizers.wing_drag=this.wings.GetWingDrag()+this.rotor.GetRotorDrag(),t=t.Add(this.stabilizers.PartStats()),this.wings.SetAircraftMass(t.mass),t.mass+=this.wings.GetPaperMass(),t.mass=Math.max(1,t.mass),this.gear.SetGull(this.wings.HasInvertedGull()),this.gear.SetLoadedMass(t.mass+t.wetmass),this.gear.CanBoat(this.engines.GetEngineHeight(),this.wings.GetWingHeight()),t=t.Add(this.gear.PartStats()),t.toughness+=Math.floor(1e-6+t.structure/5),this.optimization.SetAcftStats(t),t=t.Add(this.optimization.PartStats()),this.cockpits.SetHasRotary(this.engines.HasTractorRotary()),t=t.Add(this.alter.PartStats()),t.Round(),!this.updated_stats){this.updated_stats=!0,this.stats=t;const e=this.GetDerivedStats();this.stats.cost+=this.controlsurfaces.GetFlapCost(e.DryMP),t.reliability-=this.used.burnt_out,this.weapons.SetStickyGuns(this.used.sticky_guns),this.cockpits.SetArmed(this.weapons.GetArmedSeats()),this.cockpits.UpdateCrewStats(this.stats.escape,e.ControlStress,e.RumbleStress,this.stats.visibility,this.stats.crashsafety);let s=0;for(const t of this.cockpits.GetStressList())s=Math.max(s,t[0]-t[1]);0!=s&&-1==this.stats.warnings.findIndex((t=>t.source==h("Co-Pilot Controls")))&&this.stats.warnings.push({source:h("Co-Pilot Controls"),warning:h("Co-Pilot Warning",s),color:c.WHITE}),W(this.aircraft_type)&&(t.upkeep+=1),this.aircraft_type==N.ORNITHOPTER_BUZZER&&(t.reliability-=2),this.engines.UpdateReliability(t),this.reinforcements.SetAcftStructure(t.structure),this.fuel.SetArea(this.wings.GetArea()),this.fuel.SetCantilever(this.reinforcements.GetIsCantilever()),this.accessories.SetVitalParts(this.VitalComponentList().length),this.munitions.SetAcftParameters(t.structure,this.era.GetMaxBomb(),this.wings.HasInvertedGull()),this.stats.cost=Math.max(1,this.stats.cost),this.stats.liftbleed=Math.max(1,this.stats.liftbleed),10*this.engines.GetRumble()>t.structure&&(this.stats.power=0,this.stats.warnings.push({source:h("Stat Rumble"),warning:h("Rumble Warning"),color:c.RED})),this.use_storage&&window.localStorage.setItem("aircraft",JSON.stringify(this))}this.recurrent_calculation_depth=this.recurrent_calculation_depth-1,this.DisplayCallback&&!this.freeze_calculation&&0==this.recurrent_calculation_depth&&this.DisplayCallback()}GetDerivedStats(){let t=Math.floor(1e-6+this.stats.mass/5);t=Math.max(t,1);let e=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass)/5);e=Math.max(e,1);let s=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass+this.stats.bomb_mass)/5);s=Math.max(s,1);let i=Math.floor(1e-6+(this.stats.drag+t)/5);i=Math.max(i,1);const a=i;let n=Math.floor(1e-6+(this.stats.drag+this.munitions.GetExternalMass()+t)/5);n=Math.max(n,1);let r=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*i))),o=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*a))),l=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*n)));this.stats.mass<15&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Mass")))&&this.stats.warnings.push({source:h("Stat Mass"),warning:h("Low Mass Warning"),color:c.YELLOW}),this.stats.drag+t<35&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Drag")))&&this.stats.warnings.push({source:h("Stat Drag"),warning:h("Low Drag Warning"),color:c.YELLOW});let u=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*t/Math.max(1,this.stats.wingarea))),m=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*e/Math.max(1,this.stats.wingarea))),p=Math.max(Math.floor(1e-6+this.stats.liftbleed*s/Math.max(1,this.stats.wingarea)));var d=this.engines.GetOverspeed();const g=Math.floor(1e-6+this.stats.power/t),_=Math.floor(1e-6+this.stats.power/e),f=Math.floor(1e-6+this.stats.power/s);0==f&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Boost")))&&this.stats.warnings.push({source:h("Derived Boost"),warning:h("Boost Warning"),color:c.RED});const A=Math.floor(1e-6+this.stats.pitchboost*r);r=Math.floor(1e-6+r*(1-.1*this.used.ragged)),o=Math.floor(1e-6+o*(1-.1*this.used.ragged)),l=Math.floor(1e-6+l*(1-.1*this.used.ragged));let b=this.stats.pitchstab+this.stats.latstab;this.stats.pitchstab>0&&this.stats.latstab>0?b+=2:this.stats.pitchstab<0&&this.stats.latstab<0&&(b-=2);let S=100+this.stats.control-t;b>10||b<-10?(S=-1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Stability")))&&this.stats.warnings.push({source:h("Derived Stability"),warning:h("Stability Warning"),color:c.RED})):10==b?S-=4:b>6?S-=3:b>3?S-=2:b>0?S-=1:0==b?S+=0:b>-4?S+=1:b>-7?S+=2:b>-10?S+=3:-10==b&&(S+=4);let y=S+t-e,w=S+t-s;S=Math.floor(1e-6+S-5*this.used.sluggish),y=Math.floor(1e-6+y-5*this.used.sluggish),w=Math.floor(1e-6+w-5*this.used.sluggish);let C=Math.min(this.stats.maxstrain-t,this.stats.structure);this.optimization.final_ms=Math.floor(1e-6+1.5*this.optimization.GetMaxStrain()*C/10),C+=this.optimization.final_ms,C=Math.floor(1e-6+C*(1-.2*this.used.fragile)),C<10&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Max Strain")))&&this.stats.warnings.push({source:h("Stat Max Strain"),warning:h("Max Strain Warning"),color:c.RED});let B=this.stats.toughness;B=Math.floor(1e-6+B*(1-.5*this.used.weak));const E=this.stats.structure;let M=Math.ceil(i/this.propeller.GetEnergy()-1e-6),P=M+1;M=Math.min(M,10),P=Math.min(P,10);let G=Math.ceil(Math.floor(1e-6+(u+m)/2)/this.propeller.GetTurn()-1e-6);this.aircraft_type==N.HELICOPTER&&(G=Math.max(1,Math.floor(1e-6+t/2))+this.rotor.GetRotorBleed(),M=Math.max(1,Math.floor(1e-6+i/7)),u=0,m=0,p=0,r=Math.min(37,r),o=Math.min(37,o),l=Math.min(37,l)),G=Math.max(G,1);let F=G+1;F=Math.max(F,1),u=Math.max(1,Math.floor(1e-6+u*(1+.2*this.used.hefty))),m=Math.max(1,Math.floor(1e-6+m*(1+.2*this.used.hefty))),p=Math.max(1,Math.floor(1e-6+p*(1+.2*this.used.hefty))),(l<=p||o<=m)&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stall Speed")))&&this.stats.warnings.push({source:h("Stall Speed"),warning:h("Stall Speed Warning"),color:c.RED});let R=Math.floor(1e-6+this.stats.fuel/this.stats.fuelconsumption);R=Math.floor(1e-6+R*(1-.2*this.used.leaky)),isFinite(R)||(R=0),R<6&&0!=this.stats.fuelconsumption&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Fuel Uses")))&&this.stats.warnings.push({source:h("Derived Fuel Uses"),warning:h("Fuel Uses Warning"),color:c.YELLOW});let x=1;(b>3||b<-3)&&x++;let I=0;x+=Math.min(this.accessories.GetMaxMassStress(),Math.floor(1e-6+t/10));const T=this.accessories.GetMaxTotalStress();x=Math.min(T,x),this.engines.GetMaxRumble()>0&&(I+=Math.max(1,.5*this.engines.GetRumble()),I=Math.floor(1e-6+I),I=Math.min(3,I)),0==T&&(I=0);let v=Math.max(1,Math.floor(1e-6+this.stats.power/t*(23/this.stats.pitchspeed)/i)),D=Math.max(1,Math.floor(1e-6+this.stats.power/e*(23/this.stats.pitchspeed)/a)),O=Math.max(1,Math.floor(1e-6+this.stats.power/s*(23/this.stats.pitchspeed)/n));return isFinite(v)||(v=0,D=0,O=0),W(this.aircraft_type)&&(S+=5,y+=5,w+=5,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Stall")))&&this.stats.warnings.push({source:h("Ornithopter Stall"),warning:h("Ornithopter Stall Warning"),color:c.WHITE}),d=C),this.aircraft_type==N.ORNITHOPTER_FLUTTER&&(S+=5,y+=5,w+=5,d=1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Flutterer Attack")))&&this.stats.warnings.push({source:h("Ornithopter Flutterer Attack"),warning:h("Ornithopter Flutterer Attack Warning"),color:c.WHITE})),this.aircraft_type==N.ORNITHOPTER_BUZZER&&(-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Boost")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Boost"),warning:h("Ornithopter Buzzer Boost Warning"),color:c.WHITE}),-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Stall")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Stall"),warning:h("Ornithopter Buzzer Stall Warning"),color:c.WHITE})),{DryMP:t,WetMP:e,WetMPwBombs:s,DPEmpty:i,DPFull:a,DPwBombs:n,MaxSpeedEmpty:r,MaxSpeedFull:o,MaxSpeedwBombs:l,StallSpeedEmpty:u,StallSpeedFull:m,StallSpeedFullwBombs:p,Overspeed:d,BoostEmpty:g,BoostFull:_,BoostFullwBombs:f,Dropoff:A,Stabiilty:b,HandlingEmpty:S,HandlingFull:y,HandlingFullwBombs:w,MaxStrain:C,Toughness:B,Structure:E,EnergyLoss:M,EnergyLosswBombs:P,TurnBleed:G,TurnBleedwBombs:F,FuelUses:R,ControlStress:x,RumbleStress:I,RateOfClimbFull:D,RateOfClimbEmpty:v,RateOfClimbwBombs:O}}VitalComponentList(){const t=this.GetDerivedStats(),e=[];e.push(h("Vital Part Controls"));for(let t=0;t0&&e.push(h("Vital Part Fuel Tanks"));for(let t=0;t{let s=parseInt(t.charge);"-"==t.charge&&(s=0);let i=parseInt(e.charge);return"-"==e.charge&&(i=0),isNaN(s)&&isNaN(i)?0:isNaN(s)?-1:isNaN(i)?1:i-s})),t=q(this.engines.GetElectrics(),t),t=q(t,this.weapons.GetElectrics());let e=!1;for(const s of t.equipment){const t=parseInt(s.charge);!isNaN(t)&&t>0&&(s.charge="+"+s.charge,e=!0)}return t.equipment.length>0&&t.storage<=0&&!e&&-1==this.stats.warnings.findIndex((t=>t.source==h("Insufficient Charge")))&&this.stats.warnings.push({source:h("Insufficient Charge"),warning:h("Insufficient Charge Warning"),color:c.RED}),t}}class zt extends kt{constructor(t){super(),this.model=t,document.getElementById("lbl_era").textContent=h("Era Section Title");const e=document.getElementById("table_era"),s=document.createDocumentFragment();var i=xt(s);St(i,h("Era Option")),St(i,h("Stat Lift Bleed")),St(i,h("Stat Cost")),St(i,h("Stat Pitch Stability"));const a=(i=xt(s)).insertCell();this.select=document.createElement("SELECT"),a.append(this.select),this.bleed=i.insertCell(),this.cost=i.insertCell(),this.pstab=i.insertCell(),this.select.required=!0,this.select.onchange=()=>{this.model.SetSelected(this.select.selectedIndex)};for(let t of this.model.GetEraOptions()){const e=document.createElement("OPTION");e.text=h(t.name),this.select.add(e)}e.appendChild(s)}UpdateDisplay(){this.select.selectedIndex=this.model.GetSelected();const t=this.model.PartStats();Nt(this.bleed,t.liftbleed.toString(),!1),Nt(this.cost,t.cost.toString(),!1),Nt(this.pstab,t.pitchstab.toString(),!1)}}class Jt extends kt{constructor(t,e){super(),this.row=t,this.cockpit=e,this.upg_chbxs=[],this.sft_chbxs=[],this.gun_chbxs=[];const s=document.createDocumentFragment(),i=It(s),a=It(s),n=It(s),r=It(s),o=It(s),l=document.createElement("TABLE"),c=l.insertRow();St(c,h("Stat Mass")),St(c,h("Stat Drag")),St(c,h("Stat Cost"));const u=l.insertRow();this.d_mass=u.insertCell(),this.d_drag=u.insertCell(),this.d_cost=u.insertCell();const m=l.insertRow();St(m,h("Stat Control")),St(m,h("Stat Required Sections")),St(m,"");const p=l.insertRow();this.d_cont=p.insertCell(),this.d_rseq=p.insertCell(),p.insertCell();const d=l.insertRow();St(d,h("Stat Flight Stress")),St(d,h("Stat Escape")),St(d,h("Stat Visibility"));const g=l.insertRow();this.d_strs=g.insertCell(),this.d_escp=g.insertCell(),this.d_visi=g.insertCell(),o.appendChild(l),o.className="inner_table",l.className="inner_table",this.sel_type=document.createElement("SELECT"),this.d_strs.className="part_local",this.d_visi.className="part_local",this.d_escp.className="part_local";for(let t of e.GetTypeList()){let e=document.createElement("OPTION");e.text=h(t.name),this.sel_type.add(e)}i.appendChild(this.sel_type);var _=bt(a);const f=e.GetUpgradeList(),A=e.CanUpgrades();for(let t=0;t{this.cockpit.SetUpgrade(t,e.checked)}),this.upg_chbxs.push(e)}_=bt(n);var b=0;for(let t of e.GetSafetyList()){let e=document.createElement("INPUT");Pt(h(t.name),e,_);let s=b;b+=1,e.onchange=()=>{this.cockpit.SetSafety(s,e.checked)},this.sft_chbxs.push(e)}_=bt(r);var S=0;for(let t of e.GetGunsightList()){let e=document.createElement("INPUT");Pt(h(t.name),e,_);let s=S;S+=1,e.onchange=()=>{this.cockpit.SetGunsight(s,e.checked)},this.gun_chbxs.push(e)}this.bombsight=document.createElement("INPUT"),wt(h("Cockpit Bombsight"),this.bombsight,_),this.bombsight.onchange=()=>{this.cockpit.SetBombsightQuality(this.bombsight.valueAsNumber)},this.bombsight.min="0",this.bombsight.max="301",this.bombsight.step="1",this.sel_type.onchange=()=>{this.cockpit.SetType(this.sel_type.selectedIndex)},this.row.appendChild(s)}UpdateCockpit(t){this.cockpit=t}UpdateDisplay(){let t=this.cockpit.PartStats();Nt(this.d_mass,t.mass.toString(),!1),Nt(this.d_drag,t.drag.toString(),!1),Nt(this.d_cost,t.cost.toString(),!1),Nt(this.d_cont,t.control.toString(),!0),Nt(this.d_rseq,t.reqsections.toString(),!1);const e=this.cockpit.GetFlightStress();e[0],e[1],Nt(this.d_strs,n.Format("{0}",e[0])),Nt(this.d_escp,this.cockpit.GetEscape().toString(),!0),Nt(this.d_visi,this.cockpit.GetVisibility().toString(),!0),this.sel_type.selectedIndex=this.cockpit.GetType();const s=this.cockpit.GetSelectedUpgrades();for(let t=0;t{this.cockpits.SetNumberOfCockpits(this.counter.valueAsNumber)},this.tbl.appendChild(e)}CounterChange(){for(;this.positions.length>this.counter.valueAsNumber;)this.RemoveCockpit();for(;this.positions.length{this.pass.SetSeats(this.nseats.valueAsNumber)},this.nbeds.onchange=()=>{this.pass.SetBeds(this.nbeds.valueAsNumber)},this.connect.onchange=()=>{this.pass.SetConnected(this.connect.checked)},e.appendChild(s)}SetCollapse(){Ot("passenger_collapse",!this.pass.IsDefault())}UpdateDisplay(){const t=this.pass.PartStats();this.nseats.valueAsNumber=this.pass.GetSeats(),this.nbeds.valueAsNumber=this.pass.GetBeds(),this.connect.checked=this.pass.GetConnected(),this.connect.disabled=!this.pass.PossibleConnection(),Nt(this.mass,t.mass.toString(),!1),Nt(this.reqseq,t.reqsections.toString(),!1)}}class Qt extends kt{constructor(t,e){super(),this.engine=t;const s=e;this.InitTypeSelect(s);const i=s.insertCell();i.className="inner_table";const a=document.createElement("TABLE");a.className="inner_table",St(a.insertRow(),h("Engine Cooling")),this.cool_cell=a.insertRow().insertCell(),St(a.insertRow(),h("Engine Mounting"));const n=a.insertRow().insertCell();St(a.insertRow(),h("Engine Upgrades"));const r=a.insertRow().insertCell();i.appendChild(a);const o=s.insertCell();o.className="inner_table";const l=document.createElement("TABLE");l.className="inner_table",St(l.insertRow(),h("Engine Cowls"));const c=l.insertRow().insertCell();o.appendChild(l),St(l.insertRow(),h("Engine Electrical"));const u=l.insertRow().insertCell();this.InitMountSelect(n),this.InitUpgradeSelect(r),this.InitCowlSelect(c),this.InitElectricSelect(u),this.InitStatDisplay(s),this.intake_fan=document.createElement("INPUT"),this.intake_fan.onchange=()=>{this.engine.SetIntakeFan(this.intake_fan.checked)}}InitTypeSelect(t){this.e_rarity=document.createElement("LABEL"),this.e_pwr=document.createElement("LABEL"),this.e_mass=document.createElement("LABEL"),this.e_drag=document.createElement("LABEL"),this.e_rely=document.createElement("LABEL"),this.e_cool=document.createElement("LABEL"),this.e_over=document.createElement("LABEL"),this.e_fuel=document.createElement("LABEL"),this.e_alti=document.createElement("LABEL"),this.e_torq=document.createElement("LABEL"),this.e_rumb=document.createElement("LABEL"),this.e_cost=document.createElement("LABEL"),this.cool_count=document.createElement("INPUT"),this.cool_count.setAttribute("type","number");const e=t.insertCell(0);this.e_list_select=document.createElement("SELECT"),this.e_list_select.required=!0,e.appendChild(this.e_list_select),e.appendChild(document.createElement("BR"));for(let t of T().keys()){let e=document.createElement("OPTION");e.text=t,this.e_list_select.add(e)}this.e_select=document.createElement("SELECT"),this.e_select.required=!0,e.appendChild(this.e_select),e.appendChild(document.createElement("BR"));const s=T();for(let t=0;t{this.engine.SetSelectedList(this.e_list_select.options[this.e_list_select.selectedIndex].text)},this.e_select.onchange=()=>{this.engine.SetSelectedIndex(this.e_select.selectedIndex)}}UpdateEngine(t){this.engine=t}InitMountSelect(t){const e=document.createElement("SPAN");e.textContent=h("Engine Mounting Location"),t.appendChild(e),t.appendChild(document.createElement("BR")),this.mount_select=document.createElement("SELECT");for(let t of this.engine.GetMountList()){let e=document.createElement("OPTION");e.text=h(t.name),this.mount_select.add(e)}this.mount_select.required=!0,this.mount_select.selectedIndex=this.engine.GetMountIndex(),this.mount_select.onchange=()=>{this.engine.SetMountIndex(this.mount_select.selectedIndex)},t.appendChild(this.mount_select),t.appendChild(document.createElement("BR")),this.pushpull_input=document.createElement("INPUT"),this.torque_input=document.createElement("INPUT");const s=bt(t);this.pushpull_label=Pt(" "+h("Engine Push Pull"),this.pushpull_input,s),Pt(" "+h("Engine Torque To Structure"),this.torque_input,s),this.pushpull_input.checked=this.engine.GetUsePushPull(),this.torque_input.checked=this.engine.GetUsePushPull(),this.pushpull_input.onchange=()=>{this.engine.SetUsePushPull(this.pushpull_input.checked)},this.torque_input.onchange=()=>{this.engine.SetTorqueToStruct(this.torque_input.checked)}}InitUpgradeSelect(t){this.ds_input=document.createElement("INPUT"),this.op_input=document.createElement("INPUT"),this.gp_input=document.createElement("INPUT"),this.gpr_input=document.createElement("INPUT");const e=bt(t);Pt(h("Engine Extended Driveshafts"),this.ds_input,e),Pt(h("Engine Outboard Propeller"),this.op_input,e),wt(h("Engine Geared Propeller"),this.gp_input,e),wt(h("Engine Negate Reliability Penalty"),this.gpr_input,e),this.gp_input.onchange=()=>{this.engine.SetGearCount(this.gp_input.valueAsNumber)},this.gpr_input.onchange=()=>{this.engine.SetGearReliability(this.gpr_input.valueAsNumber)},this.ds_input.onchange=()=>{this.engine.SetUseExtendedDriveshaft(this.ds_input.checked)},this.op_input.onchange=()=>{this.engine.SetOutboardProp(this.op_input.checked)}}InitElectricSelect(t){const e=bt(t);this.alternator_input=document.createElement("INPUT"),this.generator_input=document.createElement("INPUT"),Pt(h("Engine Alternator"),this.alternator_input,e),Pt(h("Engine Generator"),this.generator_input,e),this.alternator_input.onchange=()=>{this.engine.SetAlternator(this.alternator_input.checked)},this.generator_input.onchange=()=>{this.engine.SetGenerator(this.generator_input.checked)}}InitStatDisplay(t){const e=t.insertCell();e.className="inner_table";const s=document.createElement("TABLE");s.className="inner_table",e.appendChild(s);const i=s.insertRow();St(i,h("Stat Power")),St(i,h("Stat Mass")),St(i,h("Stat Drag"));const a=s.insertRow();this.d_powr=a.insertCell(),this.d_mass=a.insertCell(),this.d_drag=a.insertCell();const n=s.insertRow();St(n,h("Stat Reliability")),St(n,h("Stat Visibility")),St(n,h("Stat Overspeed"));const r=s.insertRow();this.d_rely=r.insertCell(),this.d_rely.className="part_local",this.d_visi=r.insertCell(),this.d_over=r.insertCell();const o=s.insertRow();St(o,h("Stat Cost")),St(o,h("Stat Altitude")),St(o,h("Stat Fuel Consumption"));const l=s.insertRow();this.d_cost=l.insertCell(),this.d_alti=l.insertCell(),this.d_fuel=l.insertCell();const c=s.insertRow();St(c,h("Stat Pitch Stability")),St(c,h("Stat Lateral Stability")),St(c,h("Stat Raw Strain"));const u=s.insertRow();this.d_pstb=u.insertCell(),this.d_lstb=u.insertCell(),this.d_maxs=u.insertCell();const m=s.insertRow();St(m,h("Stat Structure")),St(m,h("Stat Flight Stress")),St(m,h("Stat Required Sections"));const p=s.insertRow();this.d_strc=p.insertCell(),this.d_fstr=p.insertCell(),this.d_sect=p.insertCell();const d=s.insertRow();St(d,h("Stat Charge")),St(d,""),St(d,"");const g=s.insertRow();this.d_chrg=g.insertCell(),g.insertCell(),g.insertCell()}InitCowlSelect(t){this.cowl_select=document.createElement("SELECT");for(let t of this.engine.GetCowlList()){let e=document.createElement("OPTION");e.text=h(t.name),this.cowl_select.add(e)}this.cowl_select.required=!0,this.cowl_select.selectedIndex=this.engine.GetMountIndex(),this.cowl_select.onchange=()=>{this.engine.SetCowl(this.cowl_select.selectedIndex)},t.appendChild(this.cowl_select)}InitCoolingSelect(){for(;this.cool_cell.children.length>0;)this.cool_cell.removeChild(this.cool_cell.children[0]);if(this.engine.IsRotary()){this.e_cool.textContent="0";const t=document.createElement("SPAN");t.innerText=h("Engine Rotary Cooling"),this.cool_cell.appendChild(t)}else if("0"==this.e_cool.textContent){const t=document.createElement("SPAN");t.textContent=h("Engine Air-Cooled Engine."),this.cool_cell.appendChild(t);const e=bt(this.cool_cell);Pt(h("Engine Air Cooling Fan"),this.intake_fan,e),this.intake_fan.disabled=!this.engine.CanIntakeFan()}else{this.cool_select||(this.cool_select=document.createElement("SELECT"),this.cool_select.required=!0);const t=bt(this.cool_cell);Bt(h("Engine Select Radiator"),this.cool_select,t),wt(h("Engine Cooling Amount"),this.cool_count,t);const e=this.engine.GetNumRadiators();for(;this.cool_select.options.length>0;)this.cool_select.options.remove(this.cool_select.options.length-1);for(let t=1;t{this.engine.SetRadiator(this.cool_select.selectedIndex)},this.cool_select.selectedIndex=this.engine.GetRadiator(),this.cool_count.min="0",this.cool_count.max=this.engine.GetMaxCooling().toString(),this.cool_count.valueAsNumber=this.engine.GetCooling(),this.cool_count.onchange=()=>{this.engine.SetCooling(this.cool_count.valueAsNumber)}}}UpdateDisplay(){for(;this.e_list_select.options.length>0;)this.e_list_select.options.remove(this.e_list_select.options.length-1);for(;this.e_select.options.length>0;)this.e_select.options.remove(this.e_select.options.length-1);const t=this.engine.GetSelectedList();if(""!=t){var e=!1,s=0;const i=T();for(let a of i.keys()){let i=document.createElement("OPTION");i.text=a,this.e_list_select.add(i),a==t||e?(s=Math.abs(s),e=!0):s-=1}this.e_list_select.selectedIndex=s;const a=this.engine.CanSelectIndex();for(let e=0;e{this.radiator.SetTypeIndex(this.type_select.selectedIndex)},s.appendChild(this.type_select);const i=t.insertCell();this.mount_select=document.createElement("SELECT");for(let t of this.radiator.GetMountList()){let e=document.createElement("OPTION");e.text=h(t.name),this.mount_select.add(e)}this.mount_select.onchange=()=>{this.radiator.SetMountIndex(this.mount_select.selectedIndex)},i.appendChild(this.mount_select);const a=t.insertCell();this.coolant_select=document.createElement("SELECT");for(let t of this.radiator.GetCoolantList()){let e=document.createElement("OPTION");e.text=h(t.name),this.coolant_select.add(e)}this.coolant_select.onchange=()=>{this.radiator.SetCoolantIndex(this.coolant_select.selectedIndex)},a.appendChild(this.coolant_select),a.appendChild(document.createElement("BR")),this.harden_input=document.createElement("INPUT");const n=bt(a);Pt(h("Radiators Harden Radiator"),this.harden_input,n),this.harden_input.onchange=()=>{this.radiator.SetHarden(this.harden_input.checked)};const r=t.insertCell(),o=document.createElement("TABLE");r.className="inner_table",o.className="inner_table";const l=o.insertRow();St(l,h("Stat Mass")),St(l,h("Stat Cost")),St(l,h("Stat Drag")),St(l,h("Stat Reliability")),St(l,h("Stat Lateral Stability")),St(l,h("Derived Is Flammable Question"));const c=o.insertRow();this.c_mass=c.insertCell(),this.c_cost=c.insertCell(),this.c_drag=c.insertCell(),this.c_rely=c.insertCell(),this.c_lstb=c.insertCell(),this.c_flam=c.insertCell(),r.appendChild(o)}UpdateRadiator(t){this.radiator=t}UpdateDisplay(){const t=this.radiator.CanType();for(let e=0;e{this.eng.SetNumberOfEngines(this.num_engines.valueAsNumber)},this.num_engines.valueAsNumber=this.eng.GetNumberOfItems(),document.getElementById("lbl_num_radiators").textContent=h("Engines Num Radiators"),this.num_radiators=document.getElementById("num_radiators"),this.num_radiators.onchange=()=>{this.eng.SetNumberOfRadiators(this.num_radiators.valueAsNumber)},this.num_radiators.valueAsNumber=this.eng.GetNumberOfRadiators(),document.getElementById("lbl_asymmetric").textContent=h("Engines Asymmetric Plane"),this.is_asymmetric=document.getElementById("asymmetric"),this.is_asymmetric.onchange=()=>{this.eng.SetAsymmetry(this.is_asymmetric.checked)},this.is_asymmetric.checked=this.eng.GetAsymmetry()}UpdateDisplay(){const t=this.eng.GetNumberOfItems();for(this.tbl.style.display=0==t?"none":"",this.num_engines.valueAsNumber=t;this.engines.length>t;)this.engines.pop(),this.tbl.deleteRow(this.engines.length+1);for(var e=document.createDocumentFragment();this.engines.lengths;)this.radiators.pop(),this.tblR.deleteRow(this.radiators.length+1);for(e=document.createDocumentFragment();this.radiators.length{this.prop.SetPropIndex(this.select_prop.selectedIndex)},document.getElementById("lbl_propeller_upgrade").textContent=h("Propeller Propeller Upgrades:"),this.select_upgrade=document.getElementById("propeller_upgrade");for(let e of t.GetUpgradeList()){let t=document.createElement("OPTION");t.text=h(e.name),this.select_upgrade.add(t)}this.select_upgrade.onchange=()=>{this.prop.SetUpgradeIndex(this.select_upgrade.selectedIndex)}}UpdateDisplay(){this.select_upgrade.selectedIndex=this.prop.GetUpgradeIndex(),this.select_prop.selectedIndex=this.prop.GetPropIndex(),0==this.prop.GetNumPropellers()?(this.select_upgrade.disabled=!0,this.select_prop.disabled=!0,this.select_prop.selectedIndex=-1):(this.select_prop.disabled=!1,this.select_upgrade.disabled=!1)}}class Xt extends kt{constructor(t){super(),this.c_sec=[],this.t_sec=[],this.frames=t,document.getElementById("lbl_frames").textContent=h("Frames Frames and Covering"),this.table=document.getElementById("table_frames");const e=document.createDocumentFragment();var s=xt(e);this.all_frame=document.createElement("SELECT"),this.all_skin=document.createElement("SELECT"),St(s,h("Frames Frame Type")).append(document.createElement("BR"),this.all_frame),St(s,h("Frames Skin Type")).append(document.createElement("BR"),this.all_skin),St(s,h("Frames Frame Options")),St(s,h("Frames Frame Stats")),s=xt(e),this.c_frame=s.insertCell(),this.c_skin=s.insertCell(),this.c_options=s.insertCell(),this.c_stats=s.insertCell(),this.c_stats.className="inner_table",this.c_stats.rowSpan=0;const i=document.createElement("TABLE");i.className="inner_table";const a=i.insertRow();St(a,h("Stat Mass")),St(a,h("Stat Drag")),St(a,h("Stat Cost"));const n=i.insertRow();this.d_mass=n.insertCell(),this.d_drag=n.insertCell(),this.d_cost=n.insertCell();const r=i.insertRow();St(r,h("Stat Structure")),St(r,h("Stat Toughness")),St(r,h("Stat Visibility"));const o=i.insertRow();this.d_strc=o.insertCell(),this.d_tugh=o.insertCell(),this.d_visi=o.insertCell();const l=i.insertRow();St(l,h("Stat Wing Area")),St(l,h("Derived Is Flammable Question")),St(l,h("Stat Pitch Stability"));const c=i.insertRow();this.d_area=c.insertCell(),this.d_flammable=c.insertCell(),this.d_pstb=c.insertCell();const u=i.insertRow();St(u,h("Stat Raw Strain")),St(u,h("Stat Lift Bleed")),St(u,"");const m=i.insertRow();this.d_strn=m.insertCell(),this.d_lift=m.insertCell(),m.insertCell(),this.c_stats.appendChild(i);const p=xt(e);St(p,h("Frames Tail Frame Type")),St(p,h("Frames Tail Skin Type")),St(p,h("Frames Tail Frame Options"));const d=xt(e);this.t_frame=d.insertCell(),this.t_skin=d.insertCell(),this.t_options=d.insertCell(),document.getElementById("lbl_tail").textContent=h("Frames Tail Section Title"),document.getElementById("lbl_tail_type").textContent=h("Frames Tail Type"),this.t_select=document.getElementById("tail_type"),document.getElementById("lbl_tail_farman").textContent=h("Frames Tail Farman"),this.t_farman=document.getElementById("tail_farman"),document.getElementById("lbl_tail_boom").textContent=h("Frames Tail Boom"),this.t_boom=document.getElementById("tail_boom"),document.getElementById("lbl_flying_wing").textContent=h("Frames Flying Wing"),this.t_fwing=document.getElementById("flying_wing");const g=this.frames.GetFrameList();for(let t of g){let e=document.createElement("OPTION");e.text=h(t.name),t.basestruct<=0&&(e.disabled=!0),this.all_frame.add(e)}this.all_frame.onchange=()=>{this.frames.SetAllFrame(this.all_frame.selectedIndex)};const _=this.frames.GetSkinList();for(let t of _){let e=document.createElement("OPTION");e.text=h(t.name),this.all_skin.add(e)}this.all_skin.onchange=()=>{this.frames.SetAllSkin(this.all_skin.selectedIndex)};for(let t of this.frames.GetTailList()){let e=document.createElement("OPTION");e.text=h(t.name),this.t_select.add(e)}this.t_select.onchange=()=>{this.frames.SetTailType(this.t_select.selectedIndex)},this.t_farman.onchange=()=>{this.frames.SetUseFarman(this.t_farman.checked)},this.t_boom.onchange=()=>{this.frames.SetUseBoom(this.t_boom.checked)},this.t_fwing.onchange=()=>{this.frames.SetFlyingWing(this.t_fwing.checked)},this.table.appendChild(e)}UpdateDisplay(){const t=document.createDocumentFragment();for(;this.table.children.length;)t.append(this.table.children[0]);const e=this.frames.GetSectionList(),s=this.frames.GetTailSectionList();for(;e.length>this.c_sec.length;){let t=this.c_sec.length;this.CreateSection(t,e[t])}for(;e.lengththis.t_sec.length;){let t=this.t_sec.length;this.CreateTailSection(t,s[t])}for(;s.length{this.frames.DeleteSection(t)},s.add.textContent="+",s.add.onclick=()=>{this.frames.DuplicateSection(t)};const i=this.frames.GetFrameList();for(let t of i){let e=document.createElement("OPTION");e.text=h(t.name),s.fsel.add(e)}s.fsel.onchange=()=>{this.frames.SetFrame(t,s.fsel.selectedIndex)},s.fspan.appendChild(s.rem),s.fspan.appendChild(s.add),s.fspan.appendChild(s.fsel),s.fspan.appendChild(document.createElement("BR")),this.c_frame.appendChild(s.fspan),s.sspan.appendChild(s.ssel),s.sspan.appendChild(document.createElement("BR")),this.c_skin.appendChild(s.sspan),Et(h("Frames Geodesic"),s.geo,s.ospan,!1),s.geo.onchange=()=>{this.frames.SetGeodesic(t,s.geo.checked)},Et(h("Frames Monocoque"),s.mono,s.ospan,!1),s.mono.onchange=()=>{this.frames.SetMonocoque(t,s.mono.checked)},Et(h("Frames Internal Bracing"),s.int,s.ospan,!1),s.int.onchange=()=>{this.frames.SetInternalBracing(t,s.int.checked)},Et(h("Frames Lifting Body"),s.lb,s.ospan,!0),s.lb.onchange=()=>{this.frames.SetLiftingBody(t,s.lb.checked)},this.c_options.appendChild(s.ospan),this.c_sec.push(s),this.UpdateSection(t,e)}RemoveSection(){const t=this.c_sec.pop();this.c_frame.removeChild(t.fspan),this.c_skin.removeChild(t.sspan),this.c_options.removeChild(t.ospan)}UpdateSection(t,e){const s=this.c_sec[t];s.rem.disabled=!e.internal_bracing&&!this.frames.PossibleRemoveSections(),s.add.disabled=e.internal_bracing&&!this.frames.PossibleInternalBracing();const i=this.frames.GetFrameList();for(let t=0;t{this.frames.SetTailFrame(t,s.fsel.selectedIndex)},s.fspan.appendChild(s.fsel),s.fspan.appendChild(document.createElement("BR")),this.t_frame.appendChild(s.fspan),s.sspan.appendChild(s.ssel),s.sspan.appendChild(document.createElement("BR")),this.t_skin.appendChild(s.sspan),Et(h("Frames Geodesic"),s.geo,s.ospan,!1),s.geo.onchange=()=>{this.frames.SetTailGeodesic(t,s.geo.checked)},Et(h("Frames Monocoque"),s.mono,s.ospan,!1),s.mono.onchange=()=>{this.frames.SetTailMonocoque(t,s.mono.checked)},Et(h("Frames Lifting Body"),s.lb,s.ospan,!0),s.lb.onchange=()=>{this.frames.SetTailLiftingBody(t,s.lb.checked)},this.t_options.appendChild(s.ospan),this.t_sec.push(s),this.UpdateTailSection(t,e)}RemoveTailSection(){const t=this.t_sec.pop();this.t_frame.removeChild(t.fspan),this.t_skin.removeChild(t.sspan),this.t_options.removeChild(t.ospan)}UpdateTailSection(t,e){const s=this.t_sec[t],i=this.frames.GetFrameList();for(let t=0;t{this.wings.SetStagger(this.stagger.selectedIndex)},this.closed.onchange=()=>{this.wings.SetClosed(this.closed.checked)},this.swept.onchange=()=>{this.wings.SetSwept(this.swept.checked)};const e=document.getElementById("wing_table"),s=document.createDocumentFragment(),i=xt(s);St(i,h("Wings Wing Type")),St(i,h("Wings Wing Options")),St(i,h("Wings Wing Stats"));const a=xt(s);St(a,h("Wings Full Wings"));const n=xt(s);St(n,h("Wings Miniature Wings")),this.full_cell=a.insertCell(),this.mini_cell=n.insertCell();const r=a.insertCell();r.rowSpan=0,this.InitStatDisplay(r),e.appendChild(s)}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Wing Area")),St(s,h("Stat Mass")),St(s,h("Stat Drag"));const i=e.insertRow();this.d_area=i.insertCell(),this.d_mass=i.insertCell(),this.d_drag=i.insertCell();const a=e.insertRow();St(a,h("Stat Control")),St(a,h("Stat Pitch Stability")),St(a,h("Stat Lateral Stability"));const n=e.insertRow();this.d_cont=n.insertCell(),this.d_pstb=n.insertCell(),this.d_lstb=n.insertCell();const r=e.insertRow();St(r,h("Stat Raw Strain")),St(r,h("Stat Crash Safety")),St(r,h("Stat Lift Bleed"));const o=e.insertRow();this.d_maxs=o.insertCell(),this.d_crsh=o.insertCell(),this.d_lift=o.insertCell();const l=e.insertRow();St(l,h("Stat Cost")),St(l,h("Stat Visibility")),St(l,h("Stat Charge"));const c=e.insertRow();this.d_cost=c.insertCell(),this.d_visi=c.insertCell(),this.d_chrg=c.insertCell();const u=e.insertRow();St(u,""),St(u,h("Wings Sesquiplane")),St(u,h("Derived Is Flammable Question"));const m=e.insertRow();m.insertCell(),this.d_sesq=m.insertCell(),this.d_flam=m.insertCell()}UpdateDisplay(){const t=this.wings.CanStagger();for(let e=0;ee.length;)this.PopFullWing();const s=this.wings.GetMiniWingList();for(let t=0;ts.length;)this.PopMiniWing();this.CreateFWAdd(e.length),this.CreateMWAdd(s.length);const i=this.wings.PartStats();Nt(this.d_area,i.wingarea.toString(),!0),Nt(this.d_mass,(i.mass+this.wings.GetPaperMass()).toString(),!1),Nt(this.d_drag,i.drag.toString(),!1),Nt(this.d_cont,i.control.toString(),!0),Nt(this.d_pstb,i.pitchstab.toString(),!0),Nt(this.d_lstb,i.latstab.toString(),!0),Nt(this.d_maxs,i.maxstrain.toString(),!0),Nt(this.d_lift,i.liftbleed.toString(),!1),Nt(this.d_crsh,i.crashsafety.toString(),!0),Nt(this.d_cost,i.cost.toString(),!1),Nt(this.d_visi,i.visibility.toString(),!0),Nt(this.d_chrg,i.charge.toString(),!0),this.wings.GetIsSesquiplane().is?Nt(this.d_sesq,h("Yes")):Nt(this.d_sesq,h("No")),this.wings.IsFlammable()?Nt(this.d_flam,h("Yes")):Nt(this.d_flam,h("No"))}AddFullWing(){const t={span:document.createElement("SPAN"),deck:document.createElement("SELECT"),skin:document.createElement("SELECT"),area:document.createElement("INPUT"),wspan:document.createElement("INPUT"),gull:document.createElement("INPUT"),dihedral:document.createElement("INPUT"),anhedral:document.createElement("INPUT"),br:document.createElement("BR")};t.span.appendChild(t.deck);const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),t.deck.append(s);for(let s=0;s{let i={...s};i.deck=t.deck.selectedIndex-1,this.wings.SetFullWing(e,i)},t.deck.selectedIndex=s.deck+1,t.skin.onchange=()=>{let i={...s};i.surface=t.skin.selectedIndex,this.wings.SetFullWing(e,i)},t.skin.selectedIndex=s.surface,t.area.onchange=()=>{let i={...s};i.area=t.area.valueAsNumber,this.wings.SetFullWing(e,i)},t.area.valueAsNumber=s.area,t.wspan.onchange=()=>{let i={...s};i.span=t.wspan.valueAsNumber,this.wings.SetFullWing(e,i)},t.wspan.valueAsNumber=s.span,t.gull.onchange=()=>{let i={...s};i.gull=t.gull.checked,this.wings.SetFullWing(e,i)},t.gull.checked=s.gull,t.gull.disabled=!this.wings.CanGull(s.deck),t.dihedral.onchange=()=>{let i={...s};isNaN(t.dihedral.valueAsNumber)||(i.dihedral=t.dihedral.valueAsNumber),this.wings.SetFullWing(e,i)},t.dihedral.max=(s.span-s.anhedral-1).toString(),t.dihedral.valueAsNumber=s.dihedral,t.anhedral.onchange=()=>{let i={...s};isNaN(t.anhedral.valueAsNumber)||(i.anhedral=t.anhedral.valueAsNumber),this.wings.SetFullWing(e,i)},t.anhedral.max=(s.span-s.dihedral-1).toString(),t.anhedral.valueAsNumber=s.anhedral}AddMiniWing(){const t={span:document.createElement("SPAN"),deck:document.createElement("SELECT"),skin:document.createElement("SELECT"),area:document.createElement("INPUT"),wspan:document.createElement("INPUT"),gull:void 0,dihedral:void 0,anhedral:void 0,br:document.createElement("BR")};t.span.appendChild(t.deck);const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),t.deck.append(s);for(let s=0;s{let i={...s};i.deck=t.deck.selectedIndex-1,this.wings.SetMiniWing(e,i)},t.deck.selectedIndex=s.deck+1,t.skin.onchange=()=>{let i={...s};i.surface=t.skin.selectedIndex,this.wings.SetMiniWing(e,i)},t.skin.selectedIndex=s.surface,t.area.onchange=()=>{let i={...s};i.area=t.area.valueAsNumber,this.wings.SetMiniWing(e,i)},t.area.valueAsNumber=s.area,t.wspan.onchange=()=>{let i={...s};i.span=t.wspan.valueAsNumber,this.wings.SetMiniWing(e,i)},t.wspan.valueAsNumber=s.span}PopMiniWing(){const t=this.mw_list.pop();this.mini_cell.removeChild(t.span),this.mini_cell.removeChild(t.br)}CreateFWAdd(t){this.fw_add=document.createElement("SELECT");const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),this.fw_add.append(s);var i=!1;for(let t=0;t{let e={surface:0,area:10,span:5,gull:!1,dihedral:0,anhedral:0,deck:this.fw_add.selectedIndex-1};this.wings.SetFullWing(t,e)},this.fw_add.selectedIndex=0,this.fw_add.disabled=!i,this.full_cell.appendChild(this.fw_add)}CreateMWAdd(t){this.mw_add=document.createElement("SELECT");const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),this.mw_add.append(s);var i=!1;for(let t=0;t{let e={surface:0,area:2,span:2,gull:!1,dihedral:0,anhedral:0,deck:this.mw_add.selectedIndex-1};this.wings.SetMiniWing(t,e)},this.mw_add.selectedIndex=0,this.mw_add.disabled=!i,this.mini_cell.appendChild(this.mw_add)}}class te extends kt{constructor(t){super(),this.stab=t,document.getElementById("lbl_stab").textContent=h("Stabilizers Section Title");const e=document.getElementById("stab_table"),s=document.createDocumentFragment();var i=xt(s);St(i,h("Stabilizers Horizontal Stabilizers")),St(i,h("Stabilizers Vertical Stabilizers")),St(i,h("Stabilizers Stabilizer Stats"));const a=(i=xt(s)).insertCell(),n=i.insertCell();this.h_type=document.createElement("SELECT"),this.h_count=document.createElement("INPUT"),a.appendChild(this.h_type),a.append(document.createElement("BR")),yt(h("Stabilizers # of Stabilizers"),this.h_count,a),this.h_count.min="0",this.h_count.max="20",this.h_count.onchange=()=>{this.stab.SetHStabCount(this.h_count.valueAsNumber)},this.h_type.onchange=()=>{this.stab.SetHStabType(this.h_type.selectedIndex)};for(let e of t.GetHStabList()){let t=document.createElement("OPTION");t.text=h(e.name),this.h_type.add(t)}this.v_type=document.createElement("SELECT"),this.v_count=document.createElement("INPUT"),n.appendChild(this.v_type),n.appendChild(document.createElement("BR")),yt(h("Stabilizers # of Stabilizers"),this.v_count,n),this.v_count.min="0",this.v_count.max="20",this.v_count.onchange=()=>{this.stab.SetVStabCount(this.v_count.valueAsNumber)},this.v_type.onchange=()=>{this.stab.SetVStabType(this.v_type.selectedIndex)};for(let e of t.GetVStabList()){let t=document.createElement("OPTION");t.text=h(e.name),this.v_type.add(t)}const r=i.insertCell();r.rowSpan=0,this.InitStatDisplay(r),e.appendChild(s)}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Control")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_cont=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Pitch Stability")),St(a,h("Stat Lateral Stability")),St(a,h("Stat Lift Bleed"));const n=e.insertRow();this.d_pstb=n.insertCell(),this.d_lstb=n.insertCell(),this.d_lift=n.insertCell()}SetCollapse(){Ot("stabilizer_collapse",!this.stab.IsDefault())}UpdateDisplay(){this.h_type.selectedIndex=this.stab.GetHStabType(),this.v_type.selectedIndex=this.stab.GetVStabType();var t=this.stab.GetHValidList();for(let e=0;e{this.cs.SetAileron(this.aileron_select.selectedIndex)},this.rudder_select=document.createElement("SELECT");for(let e of t.GetRudderList()){let t=document.createElement("OPTION");t.text=h(e.name),this.rudder_select.add(t)}this.rudder_select.onchange=()=>{this.cs.SetRudder(this.rudder_select.selectedIndex)},this.elevator_select=document.createElement("SELECT");for(let e of t.GetElevatorList()){let t=document.createElement("OPTION");t.text=h(e.name),this.elevator_select.add(t)}this.elevator_select.onchange=()=>{this.cs.SetElevator(this.elevator_select.selectedIndex)},this.flaps_select=document.createElement("SELECT");for(let e of t.GetFlapsList()){let t=document.createElement("OPTION");t.text=h(e.name),this.flaps_select.add(t)}this.flaps_select.onchange=()=>{this.cs.SetFlaps(this.flaps_select.selectedIndex)},this.slats_select=document.createElement("SELECT");for(let e of t.GetSlatsList()){let t=document.createElement("OPTION");t.text=h(e.name),this.slats_select.add(t)}this.slats_select.onchange=()=>{this.cs.SetSlats(this.slats_select.selectedIndex)};const n=bt(a);Bt(h("Control Surfaces Ailerons"),this.aileron_select,n),Bt(h("Control Surfaces Rudders"),this.rudder_select,n),Bt(h("Control Surfaces Elevators"),this.elevator_select,n),Bt(h("Control Surfaces Flaps"),this.flaps_select,n),Bt(h("Control Surfaces Slats"),this.slats_select,n);const r=bt(i.insertCell());this.drag_chbx=[];const o=t.GetDragList();for(let t=0;t{this.cs.SetDrag(t,e.checked)},this.drag_chbx.push(e)}this.InitStatDisplay(i.insertCell()),e.appendChild(s)}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Control")),St(a,h("Stat Pitch Stability")),St(a,h("Stat Lateral Stability"));const n=e.insertRow();this.d_cont=n.insertCell(),this.d_pstb=n.insertCell(),this.d_lstb=n.insertCell();const r=e.insertRow();St(r,h("Stat Lift Bleed")),St(r,h("Stat Crash Safety")),St(r," ");const o=e.insertRow();this.d_lift=o.insertCell(),this.d_crsh=o.insertCell(),this.d_none=o.insertCell()}SetCollapse(){Ot("control_collapse",!this.cs.IsDefault())}UpdateDisplay(){const t=this.cs.CanAileron();for(let e=0;e{this.rf.SetExternalWoodCount(t,r.valueAsNumber)},o.onchange=()=>{this.rf.SetExternalSteelCount(t,o.valueAsNumber)},this.ext_wood_inp.push(r),this.ext_steel_inp.push(o)}this.cabane=document.createElement("SELECT"),Bt(h("Reinforcement Cabane"),this.cabane,e);for(let t of this.rf.GetCabaneList()){let e=document.createElement("OPTION");e.text=h(t.name),this.cabane.add(e)}this.cabane.onchange=()=>{this.rf.SetCabane(this.cabane.selectedIndex)},this.cabane.selectedIndex=0,this.wires=document.createElement("INPUT"),Pt(h("Reinforcement Wires"),this.wires,e),this.wires.onchange=()=>{this.rf.SetWires(this.wires.checked)}}InitInternal(t){const e=bt(t),s=this.rf.GetCantileverList();for(let t=0;t{this.rf.SetCantileverCount(t,a.valueAsNumber)},this.cant_inp.push(a)}this.wing_blades=document.createElement("INPUT"),Pt(h("Reinforcement Wing Blades"),this.wing_blades,e),this.wing_blades.onchange=()=>{this.rf.SetWingBlade(this.wing_blades.checked)}}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Structure")),St(a,h("Stat Raw Strain")),St(a,h("Reinforcement Aircraft Max Strain"));const n=e.insertRow();this.d_strc=n.insertCell(),this.d_maxs=n.insertCell(),this.d_amax=n.insertCell(),this.d_amax.className="part_local"}UpdateDisplay(){this.cabane.selectedIndex=this.rf.GetCabane(),this.wires.checked=this.rf.GetWires();const t=this.rf.GetExternalWoodCount(),e=this.rf.CanExternalWood();for(let s=0;s{this.fuel.SetTankCount(t,i.valueAsNumber)},this.fuel_list.push(i)}this.seal=document.createElement("INPUT"),Pt(h("Load Self-Sealing Gas Tank"),this.seal,s),this.seal.onchange=()=>{this.fuel.SetSelfSealing(this.seal.checked)},this.extinguish=document.createElement("INPUT"),Pt(h("Load Remote Fire Extinguisher"),this.extinguish,s),this.extinguish.onchange=()=>{this.fuel.SetExtinguisher(this.extinguish.checked)}}InitMunitions(t){const e=bt(t);this.bombs=document.createElement("INPUT"),wt(h("Load Bombs"),this.bombs,e),this.bombs.onchange=()=>{this.boom.SetBombCount(this.bombs.valueAsNumber)},this.rockets=document.createElement("INPUT"),wt(h("Load Rockets"),this.rockets,e),this.rockets.onchange=()=>{this.boom.SetRocketCount(this.rockets.valueAsNumber)},this.bay_count=document.createElement("INPUT"),wt(h("Load Internal Bay Count"),this.bay_count,e),this.bay_count.onchange=()=>{this.boom.SetBayCount(this.bay_count.valueAsNumber)},this.bay1=document.createElement("INPUT"),Pt(h("Load Widen Internal Bay 1"),this.bay1,e),this.bay1.onchange=()=>{this.boom.SetUseBays(this.bay1.checked,this.bay2.checked)},this.bay2=document.createElement("INPUT"),Pt(h("Load Widen Internal Bay 2"),this.bay2,e),this.bay2.onchange=()=>{this.boom.SetUseBays(this.bay1.checked,this.bay2.checked)}}InitCargoAndPassengers(t){this.carg=document.createElement("SELECT"),t.appendChild(this.carg);const e=this.cargo.GetSpaceList();for(let t of e){let e=document.createElement("OPTION");e.text=h(t.name),this.carg.add(e)}this.carg.onchange=()=>{this.cargo.SetSpace(this.carg.selectedIndex)}}InitStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Wet Mass"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_wmas=i.insertCell();var a=e.insertRow();St(a,h("Stat Required Sections")),St(a,h("Stat Fuel")),St(a,h("Stat Cost"));var n=e.insertRow();this.d_rsec=n.insertCell(),this.d_fuel=n.insertCell(),this.d_cost=n.insertCell(),St(a=e.insertRow(),""),St(a,h("Derived Fuel Uses")),St(a,""),(n=e.insertRow()).insertCell(),this.d_fuse=n.insertCell(),n.insertCell()}UpdateFuelUses(t){var e=Math.floor(1e-6+10*t)/10;isFinite(e)||(e=0),Nt(this.d_fuse,e.toString(),!1)}UpdateDisplay(){const t=this.fuel.GetTankCount(),e=this.fuel.GetTankEnabled();for(let s=0;s0?(this.bay1.disabled=!1,this.bay1.checked?this.bay2.disabled=!1:this.bay2.disabled=!0):(this.bay1.disabled=!0,this.bay2.disabled=!0),this.carg.selectedIndex=this.cargo.GetSpace();var s=this.fuel.PartStats();s=(s=s.Add(this.boom.PartStats())).Add(this.cargo.PartStats()),Nt(this.d_drag,s.drag.toString(),!1),Nt(this.d_mass,s.mass.toString(),!1),Nt(this.d_wmas,s.wetmass.toString(),!1),Nt(this.d_rsec,s.reqsections.toString(),!1),Nt(this.d_fuel,s.fuel.toString(),!0),Nt(this.d_cost,s.cost.toString(),!1)}}class ae extends kt{constructor(t){super(),this.gear=t,document.getElementById("lbl_landing_gear").textContent=h("Landing Gear Section Title");const e=document.getElementById("tbl_gear"),s=document.createDocumentFragment();var i=xt(s);St(i,h("Landing Gear Landing Gear")),St(i,h("Landing Gear Extras")),St(i,h("Landing Gear Gear Stats")),i=xt(s),this.InitGear(i.insertCell()),this.InitExtras(i.insertCell()),this.InitStats(i.insertCell()),e.appendChild(s)}InitGear(t){const e=this.gear.GetGearList(),s=bt(t);this.sel=document.createElement("SELECT"),Bt("Type",this.sel,s);for(let t=0;t{this.gear.SetGear(this.sel.selectedIndex)},this.retract=document.createElement("INPUT"),Pt(h("Landing Gear Retractable"),this.retract,s),this.retract.onchange=()=>{this.gear.SetRetract(this.retract.checked)}}InitExtras(t){this.extras=[];const e=this.gear.GetExtraList(),s=bt(t);for(let t=0;t{this.gear.SetExtraSelected(t,i.checked)},this.extras.push(i)}}InitStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Structure")),St(a,h("Stat Crash Safety")),St(a,"");const n=e.insertRow();this.d_strc=n.insertCell(),this.d_crsh=n.insertCell(),n.insertCell()}SetCollapse(){Ot("gear_collapse",!this.gear.IsDefault())}UpdateDisplay(){this.sel.selectedIndex=this.gear.GetGear();const t=this.gear.CanGear();for(let e=0;e{this.acc.SetArmourCoverage(t,this.a_AP[t].valueAsNumber)};let n=t+a/2;e=n+1,wt("Thickness "+e.toString(),this.a_AP[n],i),this.a_AP[n].onchange=()=>{this.acc.SetArmourCoverage(n,this.a_AP[n].valueAsNumber)}}}InitElectrical(t){const e=bt(t);this.radio=document.createElement("SELECT"),Bt(h("Accessories Radio"),this.radio,e);const s=this.acc.GetRadioList();for(let t=0;t{this.acc.SetRadioSel(this.radio.selectedIndex)},this.elect=[];const i=this.acc.GetElectricalList();for(let t=0;t{this.acc.SetElectricalCount(t,s.valueAsNumber)},this.elect.push(s)}}InitInformation(t){const e=bt(t),s=this.acc.GetReconList();this.recon=[];for(let t=0;t{this.acc.SetReconSel(t,i.valueAsNumber)},this.recon.push(i)}}InitVisibility(t){const e=bt(t),s=this.acc.GetVisibilityList();this.visi=[];for(let t=0;t{this.acc.SetVisibilitySel(t,i.checked)},this.visi.push(i)}}InitClimate(t){const e=bt(t),s=this.acc.GetClimateList();this.clim=[];for(let t=0;t{this.acc.SetClimateSel(t,i.checked)},this.clim.push(i)}}InitControl(t){const e=bt(t);this.auto=document.createElement("SELECT");const s=this.acc.GetAutopilotList();Bt(h("Accessories Autopilot"),this.auto,e);for(let t=0;t{this.acc.SetAutopilotSel(this.auto.selectedIndex)};const i=this.acc.GetControlList();this.cont=document.createElement("SELECT"),Bt(h("Accessories Control Aids"),this.cont,e);for(let t=0;t{this.acc.SetControlSel(this.cont.selectedIndex)}}InitStats(t){t.rowSpan=3,t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Structure")),St(a,h("Stat Charge")),St(a,h("Stat Lift Bleed"));const n=e.insertRow();this.d_strc=n.insertCell(),this.d_chgh=n.insertCell(),this.d_lift=n.insertCell();const r=e.insertRow();St(r,h("Stat Visibility")),St(r,h("Stat Flight Stress")),St(r,h("Stat Required Sections"));const o=e.insertRow();this.d_visi=o.insertCell(),this.d_strs=o.insertCell(),this.d_rsec=o.insertCell()}UpdateDisplay(){const t=this.acc.GetArmourCoverageForDisplay();for(let e=0;e{this.opt.SetFreeDots(this.free_inp.valueAsNumber)};const e=document.getElementById("tbl_optimization"),s=document.createDocumentFragment(),i=xt(s);St(i,h("Optimization Negative")),St(i,h("Optimization Effect")),St(i,h("Optimization Positive")),St(i,h("Optimization Optimization Stats"));const a=xt(s);this.cost_cbx=this.InitRow(a,h("Optimization Cost"),(t=>this.opt.SetCost(t))),this.bleed_cbx=this.InitRow(xt(s),h("Optimization Lift Bleed"),(t=>this.opt.SetBleed(t))),this.escape_cbx=this.InitRow(xt(s),h("Optimization Leg Room"),(t=>this.opt.SetEscape(t))),this.mass_cbx=this.InitRow(xt(s),h("Optimization Mass"),(t=>this.opt.SetMass(t))),this.toughness_cbx=this.InitRow(xt(s),h("Optimization Toughness"),(t=>this.opt.SetToughness(t))),this.maxstrain_cbx=this.InitRow(xt(s),h("Optimization Max Strain"),(t=>this.opt.SetMaxStrain(t))),this.reliability_cbx=this.InitRow(xt(s),h("Optimization Reliability"),(t=>this.opt.SetReliability(t))),this.drag_cbx=this.InitRow(xt(s),h("Optimization Drag"),(t=>this.opt.SetDrag(t))),this.InitStatDisplay(a.insertCell()),e.appendChild(s)}InitRow(t,e,s){const i=[];for(let t=0;t<6;t++)i.push(document.createElement("INPUT")),i[t].setAttribute("type","checkbox"),i[t].onchange=t<3?()=>{i[t].checked?s(t-3):s(t-2)}:()=>{i[t].checked?s(t-2):s(t-3)};const a=t.insertCell(),n=t.insertCell(),r=t.insertCell();return a.appendChild(i[0]),a.appendChild(i[1]),a.appendChild(i[2]),n.textContent=e,r.appendChild(i[3]),r.appendChild(i[4]),r.appendChild(i[5]),i}InitStatDisplay(t){t.rowSpan=0,t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Cost")),St(s,h("Stat Lift Bleed")),St(s,h("Stat Escape"));const i=e.insertRow();this.d_cost=i.insertCell(),this.d_lift=i.insertCell(),this.d_escp=i.insertCell();const a=e.insertRow();St(a,h("Stat Visibility")),St(a,h("Stat Mass")),St(a,h("Stat Toughness"));const n=e.insertRow();this.d_visi=n.insertCell(),this.d_mass=n.insertCell(),this.d_tugh=n.insertCell();const r=e.insertRow();St(r,h("Stat Max Strain")),St(r,h("Stat Reliability")),St(r,h("Stat Drag"));const o=e.insertRow();this.d_mstr=o.insertCell(),this.d_reli=o.insertCell(),this.d_drag=o.insertCell()}SetCollapse(){Ot("optimization_collapse",!this.opt.IsDefault())}UpdateChecked(t,e){for(let t=0;t0&&(e[3].checked=!0,t>1&&(e[4].checked=!0,t>2&&(e[5].checked=!0)))}UpdateEnabled(t,e){var s=0;for(let i=3;it}UpdateDisplay(){this.free_inp.valueAsNumber=this.opt.GetFreeDots(),this.UpdateChecked(this.opt.GetCost(),this.cost_cbx),this.UpdateChecked(this.opt.GetBleed(),this.bleed_cbx),this.UpdateChecked(this.opt.GetEscape(),this.escape_cbx),this.UpdateChecked(this.opt.GetMass(),this.mass_cbx),this.UpdateChecked(this.opt.GetToughness(),this.toughness_cbx),this.UpdateChecked(this.opt.GetMaxStrain(),this.maxstrain_cbx),this.UpdateChecked(this.opt.GetReliabiilty(),this.reliability_cbx),this.UpdateChecked(this.opt.GetDrag(),this.drag_cbx);const t=this.opt.GetUnassignedCount();this.UpdateEnabled(t,this.cost_cbx),this.UpdateEnabled(t,this.bleed_cbx),this.UpdateEnabled(t,this.escape_cbx),this.UpdateEnabled(t,this.mass_cbx),this.UpdateEnabled(t,this.toughness_cbx),this.UpdateEnabled(t,this.maxstrain_cbx),this.UpdateEnabled(t,this.reliability_cbx),this.UpdateEnabled(t,this.drag_cbx);const e=this.opt.PartStats();Nt(this.d_cost,e.cost.toString(),!1),Nt(this.d_lift,e.liftbleed.toString(),!1),Nt(this.d_escp,e.escape.toString(),!0),Nt(this.d_visi,e.visibility.toString(),!0),Nt(this.d_mass,e.mass.toString(),!1),Nt(this.d_tugh,e.toughness.toString(),!0),Nt(this.d_mstr,this.opt.final_ms.toString(),!0),Nt(this.d_reli,e.reliability.toString(),!0),Nt(this.d_drag,e.drag.toString(),!1)}}class oe extends kt{constructor(t){super(),this.used=t,document.getElementById("lbl_used").textContent=h("Used Section Title"),this.tbl=document.getElementById("tbl_used");const e=document.createDocumentFragment(),s=xt(e);St(s,h("Used Effect")),St(s,h("Used Description")),St(s,h("Used Penalties(+)
Benefits(-)")),this.InitTable(e),this.tbl.appendChild(e)}InitTable(t){this.burnt_out=document.createElement("INPUT"),this.ragged=document.createElement("INPUT"),this.hefty=document.createElement("INPUT"),this.sticky_guns=document.createElement("INPUT"),this.weak=document.createElement("INPUT"),this.fragile=document.createElement("INPUT"),this.leaky=document.createElement("INPUT"),this.sluggish=document.createElement("INPUT");var e=xt(t);e.insertCell().textContent=h("Used Burnt Out"),e.insertCell().textContent=h("Used Burnt Out Description");var s=e.insertCell();yt("",this.burnt_out,s,!1),(e=xt(t)).insertCell().textContent=h("Used Ragged"),e.insertCell().textContent=h("Used Ragged Description"),s=e.insertCell(),yt("",this.ragged,s,!1),(e=xt(t)).insertCell().textContent=h("Used Hefty"),e.insertCell().textContent=h("Used Hefty Description"),s=e.insertCell(),yt("",this.hefty,s,!1),(e=xt(t)).insertCell().textContent=h("Used Sticky Guns"),e.insertCell().textContent=h("Used Sticky Guns Description"),s=e.insertCell(),yt("",this.sticky_guns,s,!1),(e=xt(t)).insertCell().textContent=h("Used Weak"),e.insertCell().textContent=h("Used Weak Description"),s=e.insertCell(),yt("",this.weak,s,!1),(e=xt(t)).insertCell().textContent=h("Used Fragile"),e.insertCell().textContent=h("Used Fragile Description"),s=e.insertCell(),yt("",this.fragile,s,!1),(e=xt(t)).insertCell().textContent=h("Used Leaky"),e.insertCell().textContent=h("Used Leaky Description"),s=e.insertCell(),yt("",this.leaky,s,!1),(e=xt(t)).insertCell().textContent=h("Used Sluggish"),e.insertCell().textContent=h("Used Sluggish Description"),s=e.insertCell(),yt("",this.sluggish,s,!1),this.burnt_out.onchange=()=>{this.used.burnt_out=this.burnt_out.valueAsNumber,this.used.TriggerCS()},this.ragged.onchange=()=>{this.used.ragged=this.ragged.valueAsNumber,this.used.TriggerCS()},this.hefty.onchange=()=>{this.used.hefty=this.hefty.valueAsNumber,this.used.TriggerCS()},this.sticky_guns.onchange=()=>{this.used.sticky_guns=this.sticky_guns.valueAsNumber,this.used.TriggerCS()},this.weak.onchange=()=>{this.used.weak=this.weak.valueAsNumber,this.used.TriggerCS()},this.fragile.onchange=()=>{this.used.fragile=this.fragile.valueAsNumber,this.used.TriggerCS()},this.leaky.onchange=()=>{this.used.leaky=this.leaky.valueAsNumber,this.used.TriggerCS()},this.sluggish.onchange=()=>{this.used.sluggish=this.sluggish.valueAsNumber,this.used.TriggerCS()},this.burnt_out.min="-1",this.burnt_out.max="1",this.ragged.min="-1",this.ragged.max="1",this.hefty.min="-1",this.hefty.max="1",this.sticky_guns.min="-1",this.sticky_guns.max="1",this.weak.min="-1",this.weak.max="1",this.fragile.min="-1",this.fragile.max="1",this.leaky.min="-1",this.leaky.max="1",this.sluggish.min="-1",this.sluggish.max="1"}SetCollapse(){Ot("used_collapse",!this.used.IsDefault())}UpdateDisplay(){this.burnt_out.valueAsNumber=this.used.burnt_out,this.ragged.valueAsNumber=this.used.ragged,this.hefty.valueAsNumber=this.used.hefty,this.sticky_guns.valueAsNumber=this.used.sticky_guns,this.weak.valueAsNumber=this.used.weak,this.fragile.valueAsNumber=this.used.fragile,this.leaky.valueAsNumber=this.used.leaky,this.sluggish.valueAsNumber=this.used.sluggish}}class le extends kt{constructor(t){super(),this.rotor=t,document.getElementById("lbl_rotor").textContent=h("Rotor Section Title"),this.div=document.getElementById("Rotors"),this.wing_div=document.getElementById("Wings"),this.reinforce_div=document.getElementById("Reinforcements"),this.control_div=document.getElementById("ControlSurfaces");const e=document.getElementById("rotor_table"),s=document.createDocumentFragment();this.InitAutogyro(s),this.InitHelicopter(s),e.appendChild(s)}InitAutogyro(t){this.auto_header=xt(t),St(this.auto_header,h("Rotor Rotor")),St(this.auto_header,h("Rotor Material")),St(this.auto_header,h("Rotor Accessories")),St(this.auto_header,h("Rotor Stats")),this.auto_row=xt(t);const e=bt(this.auto_row.insertCell());this.auto_min=document.createElement("LABEL"),Ct(h("Rotor Minimum Span"),this.auto_min,e),this.auto_span=document.createElement("INPUT"),wt(h("Rotor Span"),this.auto_span,e),this.auto_span.onchange=()=>{this.rotor.SetRotorSpan(this.auto_span.valueAsNumber)};const s=bt(this.auto_row.insertCell());this.auto_mat=document.createElement("SELECT"),Bt(h("Rotor Material"),this.auto_mat,s);for(let t of this.rotor.GetCantileverList()){let e=document.createElement("OPTION");e.text=h(t.name),this.auto_mat.add(e)}this.auto_mat.onchange=()=>{this.rotor.SetCantilever(this.auto_mat.selectedIndex)};const i=bt(this.auto_row.insertCell());this.auto_clutch=document.createElement("INPUT"),Pt(h("Rotor Clutched Rotor"),this.auto_clutch,i),this.auto_clutch.onchange=()=>{this.rotor.SetAccessory(this.auto_clutch.checked)},this.InitAutogyroStats(this.auto_row.insertCell())}InitAutogyroStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.a_drag=i.insertCell(),this.a_mass=i.insertCell(),this.a_cost=i.insertCell();const a=e.insertRow();St(a,h("Rotor Area")),St(a,""),St(a,"");const n=e.insertRow();this.a_area=n.insertCell(),n.insertCell(),n.insertCell()}UpdateAutogyroStats(){this.auto_span.valueAsNumber=this.rotor.GetRotorSpan(),this.auto_mat.selectedIndex=this.rotor.GetCantilever(),this.auto_min.innerText=""+this.rotor.GetSizingSpan(),this.auto_clutch.checked=this.rotor.GetAccessory();const t=this.rotor.PartStats();Nt(this.a_drag,t.drag.toString(),!1),Nt(this.a_mass,t.mass.toString(),!1),Nt(this.a_cost,t.cost.toString(),!1),Nt(this.a_area,t.wingarea.toString(),!0)}InitHelicopter(t){this.heli_header=xt(t),St(this.heli_header,h("Rotor Rotor")),St(this.heli_header,h("Rotor Material")),St(this.heli_header,h("Rotor Accessories")),St(this.heli_header,h("Rotor Stats")),this.heli_row=xt(t);const e=bt(this.heli_row.insertCell());this.heli_count=document.createElement("INPUT"),wt(h("Rotor Number of Rotors"),this.heli_count,e),this.heli_count.onchange=()=>{this.rotor.SetRotorCount(this.heli_count.valueAsNumber)},this.heli_min=document.createElement("LABEL"),Ct(h("Rotor Ideal Rotor Span"),this.heli_min,e),this.heli_span=document.createElement("INPUT"),wt(h("Rotor Span"),this.heli_span,e),this.heli_span.min="",this.heli_span.onchange=()=>{this.rotor.SetRotorSpan(this.heli_span.valueAsNumber)},this.heli_stagger=document.createElement("SELECT"),Bt(h("Rotor Stagger"),this.heli_stagger,e);const s=this.rotor.GetStaggerList();for(let t of s){let e=document.createElement("OPTION");e.text=h(t.name),this.heli_stagger.add(e)}this.heli_stagger.onchange=()=>{this.rotor.SetStagger(this.heli_stagger.selectedIndex)},this.heli_blade_count=document.createElement("SELECT"),Bt(h("Rotor Blade Count"),this.heli_blade_count,e);const i=this.rotor.GetBladeList();for(let t of i){let e=document.createElement("OPTION");e.textContent=t.name,this.heli_blade_count.add(e)}this.heli_blade_count.onchange=()=>{this.rotor.SetBladeCount(this.heli_blade_count.selectedIndex)};const a=bt(this.heli_row.insertCell());this.heli_mat=document.createElement("SELECT"),Bt(h("Rotor Rotor Material"),this.heli_mat,a);for(let t of this.rotor.GetCantileverList()){let e=document.createElement("OPTION");e.text=h(t.name),this.heli_mat.add(e)}this.heli_mat.onchange=()=>{this.rotor.SetCantilever(this.heli_mat.selectedIndex)},this.heli_blade_thickness=document.createElement("INPUT"),wt(h("Rotor Thickness"),this.heli_blade_thickness,a),this.heli_blade_thickness.onchange=()=>{this.rotor.SetRotorThickness(this.heli_blade_thickness.valueAsNumber)};const n=bt(this.heli_row.insertCell());this.heli_shafts=document.createElement("INPUT"),Pt(h("Rotor Motor Cross-link"),this.heli_shafts,n),this.heli_shafts.onchange=()=>{this.rotor.SetAccessory(this.heli_shafts.checked)},this.InitHelicopterStats(this.heli_row.insertCell())}InitHelicopterStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.h_drag=i.insertCell(),this.h_mass=i.insertCell(),this.h_cost=i.insertCell();const a=e.insertRow();St(a,h("Rotor Area")),St(a,h("Stat Reliability")),St(a,h("Reinforcement Aircraft Max Strain"));const n=e.insertRow();this.h_area=n.insertCell(),this.h_rely=n.insertCell(),this.h_strn=n.insertCell();const r=e.insertRow();St(r,""),St(r,h("Power")),St(r,"");const o=e.insertRow();o.insertCell(),this.h_powr=o.insertCell(),o.insertCell()}UpdateHelicopterStats(){this.heli_count.valueAsNumber=this.rotor.GetRotorCount(),1==this.rotor.GetRotorCount()?this.heli_count.step="1":this.heli_count.step="2",this.heli_min.innerText=""+this.rotor.GetSizingSpan(),this.heli_span.valueAsNumber=this.rotor.GetRotorSpan();const t=this.rotor.CanStagger();for(let e=0;e{let t=new u;t.drag=this.drag.valueAsNumber,t.mass=this.mass.valueAsNumber,t.wetmass=this.wmas.valueAsNumber,t.bomb_mass=this.bmas.valueAsNumber,t.cost=this.cost.valueAsNumber,t.upkeep=this.upkp.valueAsNumber,t.liftbleed=this.lfbd.valueAsNumber,t.wingarea=this.area.valueAsNumber,t.control=this.ctrl.valueAsNumber,t.pitchstab=this.pstb.valueAsNumber,t.latstab=this.lstb.valueAsNumber,t.maxstrain=this.rstn.valueAsNumber,t.structure=this.strc.valueAsNumber,t.toughness=this.tugh.valueAsNumber,t.power=this.powr.valueAsNumber,t.fuelconsumption=this.fcon.valueAsNumber,t.fuel=this.fuel.valueAsNumber,t.charge=this.chrg.valueAsNumber,t.crashsafety=this.sfty.valueAsNumber,t.visibility=this.visi.valueAsNumber,t.escape=this.escp.valueAsNumber,t.reliability=this.rely.valueAsNumber,this.sprl.value=this.sprl.value.trim(),this.sprl.value.length>0&&t.warnings.push({source:this.name.value,warning:this.sprl.value,color:c.WHITE}),this.alter.AddPart(this.name.value,t),this.UpdateSelect(),this.sel.selectedIndex=-1},this.rem.onclick=()=>{this.alter.RemovePart(this.name.value),this.ResetInputs(),this.UpdateSelect(),this.sel.selectedIndex=-1},this.sel.onchange=()=>{let t=this.alter.GetParts()[this.sel.selectedIndex];this.name.value=t.name,this.drag.valueAsNumber=t.stats.drag,this.mass.valueAsNumber=t.stats.mass,this.wmas.valueAsNumber=t.stats.wetmass,this.bmas.valueAsNumber=t.stats.bomb_mass,this.cost.valueAsNumber=t.stats.cost,this.upkp.valueAsNumber=t.stats.upkeep,this.lfbd.valueAsNumber=t.stats.liftbleed,this.area.valueAsNumber=t.stats.wingarea,this.ctrl.valueAsNumber=t.stats.control,this.pstb.valueAsNumber=t.stats.pitchstab,this.lstb.valueAsNumber=t.stats.latstab,this.rstn.valueAsNumber=t.stats.maxstrain,this.strc.valueAsNumber=t.stats.structure,this.tugh.valueAsNumber=t.stats.toughness,this.powr.valueAsNumber=t.stats.power,this.fcon.valueAsNumber=t.stats.fuelconsumption,this.fuel.valueAsNumber=t.stats.fuel,this.chrg.valueAsNumber=t.stats.charge,this.sfty.valueAsNumber=t.stats.crashsafety,this.visi.valueAsNumber=t.stats.visibility,this.escp.valueAsNumber=t.stats.escape,this.rely.valueAsNumber=t.stats.reliability;const e=[];for(let s of t.stats.warnings)e.push(s.warning);this.sprl.value=n.Join(" ",e),this.sel.selectedIndex=-1},this.ResetInputs(),this.UpdateSelect()}ResetInputs(){this.name.value="Default",this.drag.valueAsNumber=0,this.mass.valueAsNumber=0,this.wmas.valueAsNumber=0,this.bmas.valueAsNumber=0,this.cost.valueAsNumber=0,this.upkp.valueAsNumber=0,this.lfbd.valueAsNumber=0,this.area.valueAsNumber=0,this.ctrl.valueAsNumber=0,this.pstb.valueAsNumber=0,this.lstb.valueAsNumber=0,this.rstn.valueAsNumber=0,this.strc.valueAsNumber=0,this.tugh.valueAsNumber=0,this.powr.valueAsNumber=0,this.fcon.valueAsNumber=0,this.fuel.valueAsNumber=0,this.chrg.valueAsNumber=0,this.sfty.valueAsNumber=0,this.visi.valueAsNumber=0,this.escp.valueAsNumber=0,this.rely.valueAsNumber=0,this.sprl.value=""}UpdateSelect(){for(;this.sel.options.length;)this.sel.remove(this.sel.options.length-1);const t=this.alter.GetParts();for(let e of t){let t=document.createElement("OPTION");t.textContent=e.name,this.sel.add(t)}this.sel.selectedIndex=-1}SetCollapse(){Ot("alter_collapse",!this.alter.IsDefault())}UpdateDisplay(){this.UpdateSelect();const t=this.alter.GetParts();for(let e=0;e{this.alter.SetUsedPart(e,t.qty.valueAsNumber)},this.add_fs.div1.appendChild(t.lbl),this.add_fs.div2.appendChild(t.qty),this.add_list.push(t)}this.add_list[e].lbl.textContent=t[e].name,this.add_list[e].qty.valueAsNumber=t[e].qty}for(;this.add_list.length>t.length;)this.add_list[this.add_list.length-1].lbl.remove(),this.add_list[this.add_list.length-1].qty.remove(),this.add_list.pop()}}class ce{constructor(t){const e=document.createDocumentFragment(),s=xt(e),i=s.insertCell();i.colSpan=2,this.name_inp=document.createElement("INPUT"),this.name_inp.defaultValue=h("Derived Aircraft Name"),i.appendChild(this.name_inp),St(s,h("Stat Cost")),this.cost_cell=s.insertCell(),St(s,h("Stat Upkeep")),this.upkeep_cell=s.insertCell(),St(s,h("Derived Era Report")),this.version_cell=s.insertCell();const a=xt(e);St(a,h("Derived Mass Variations")),St(a,h("Derived Boost")),St(a,h("Derived Handling")),St(a,h("Derived Rate of Climb")),St(a,h("Derived Stall Speed")),St(a,h("Derived Top Speed")),St(a,h("Derived Vital Components")).colSpan=2,this.bomb_row2=xt(e),St(this.bomb_row2,h("Derived Full Fuel with Bombs")),this.boost_fullwB=this.bomb_row2.insertCell(),this.hand_fullwB=this.bomb_row2.insertCell(),this.roc_fullwB=this.bomb_row2.insertCell(),this.ss_fullwB=this.bomb_row2.insertCell(),this.ts_fullwB=this.bomb_row2.insertCell(),this.vital_components=this.bomb_row2.insertCell(),this.vital_components.rowSpan=3,this.vital_components.colSpan=3,this.bomb_row1=xt(e),St(this.bomb_row1,h("Derived Half Fuel with Bombs")),this.boost_halfwB=this.bomb_row1.insertCell(),this.hand_halfwB=this.bomb_row1.insertCell(),this.roc_halfwB=this.bomb_row1.insertCell(),this.ss_halfwB=this.bomb_row1.insertCell(),this.ts_halfwB=this.bomb_row1.insertCell(),this.full_row=xt(e),St(this.full_row,h("Derived Full Fuel")),this.boost_full=this.full_row.insertCell(),this.hand_full=this.full_row.insertCell(),this.roc_full=this.full_row.insertCell(),this.ss_full=this.full_row.insertCell(),this.ts_full=this.full_row.insertCell();const n=xt(e);St(n,h("Derived Half Fuel")),this.boost_half=n.insertCell(),this.hand_half=n.insertCell(),this.roc_half=n.insertCell(),this.ss_half=n.insertCell(),this.ts_half=n.insertCell();const r=xt(e);St(r,h("Derived Empty Fuel")),this.boost_empty=r.insertCell(),this.hand_empty=r.insertCell(),this.roc_empty=r.insertCell(),this.ss_empty=r.insertCell(),this.ts_empty=r.insertCell();const o=xt(e);St(o,h("Derived Propulsion")).colSpan=2,St(o,h("Derived Aerodynamics")).colSpan=2,St(o,h("Derived Survivability")).colSpan=2,St(o,h("Derived Crew Members")).colSpan=2;const l=xt(e);St(l,h("Derived Dropoff")),this.dropoff_cell=l.insertCell(),St(l,h("Derived Stability")),this.stability_cell=l.insertCell(),St(l,h("Derived Crash Safety")),this.crashsafety_cell=l.insertCell(),St(l,h("Derived Crew/Passengers")),this.crew_cell=l.insertCell();const c=xt(e);St(c,h("Derived Overspeed")),this.overspeed_cell=c.insertCell(),St(c,h("Derived Energy Loss")),this.eloss_cell=c.insertCell(),St(c,h("Stat Toughness")),this.toughness_cell=c.insertCell(),St(c,h("Stat Visibility")),this.visibility_cell=c.insertCell();const u=xt(e);St(u,h("Derived Fuel Uses")),this.maxfuel_cell=u.insertCell(),this.turnbleed_label=St(u,h("Derived Turn Bleed")),this.turnbleed_cell=u.insertCell(),St(u,h("Stat Max Strain")),this.mxstrain_cell=u.insertCell(),St(u,h("Derived Attack Modifier")),this.attack_cell=u.insertCell();const m=xt(e);St(m,h("Stat Reliability")),this.reliability_cell=m.insertCell(),St(m,h("Derived Landing Gear")),this.landing_cell=m.insertCell(),St(m,h("Derived Communications")),this.communications_cell=m.insertCell(),St(m,h("Derived Escape")),this.escape_cell=m.insertCell();const p=xt(e);St(p,h("Derived Ideal Engine Altitude")),this.maxalt_cell=p.insertCell(),St(p,h("Derived Is Flammable Question")),this.flammable_cell=p.insertCell(),this.desc_cell=p.insertCell(),this.desc_cell.colSpan=2,St(p,h("Stat Flight Stress")),this.flightstress_cell=p.insertCell();const d=xt(e),g=xt(e);this.weapon_head=St(d,h("Derived Weapon Systems")),this.weapon_head.colSpan=6,this.weapon_cell=g.insertCell(),this.weapon_cell.colSpan=6,this.warning_head=St(xt(e),h("Derived Special Rules")),this.warning_head.colSpan=6,this.warning_cell=xt(e).insertCell(),this.warning_cell.colSpan=6,St(d,h("Derived Electrics")).colSpan=2,this.electric_cell=g.insertCell(),this.electric_cell.colSpan=2,this.electric_cell.rowSpan=3,t.appendChild(e),this.tbl=t}UpdateDisplay(t,e,s){for(this.name_inp.value=t.name;this.version_cell.children.length>0;)this.version_cell.removeChild(this.version_cell.children[0]);this.version_cell.className="tooltip";const i=document.createElement("DIV");i.className="tooltiptext";let a=document.createElement("P");a.textContent=h("Derived Problematic Parts"),i.appendChild(a);const r=p(t.GetEra().GetSelectedText());var o=0;for(let t of e.era){const e=p(t.era);if(e>r){o+=e-r;let s=document.createElement("P");s.textContent=t.name+": "+t.era,i.appendChild(s)}}if(0==o){let t=document.createElement("P");t.textContent=h("None"),i.appendChild(t)}const l=document.createElement("P");for(l.textContent=h(t.GetEra().GetSelectedText()),l.className=0==o?"green":o>2?"red":"yellow",this.version_cell.appendChild(l),this.version_cell.appendChild(i),this.cost_cell.textContent=e.cost.toString()+"þ ",t.GetUsed().IsDefault()||(this.cost_cell.textContent+=" ("+Math.floor(1e-6+e.cost/2).toString()+"þ "+h("Price Word Used")+")"),this.upkeep_cell.textContent=e.upkeep.toString()+"þ",this.ts_empty.textContent=(0).toString(),this.ss_empty.textContent=s.StallSpeedEmpty.toString(),this.hand_empty.textContent=s.HandlingEmpty.toString(),this.boost_empty.textContent=(0).toString(),this.roc_empty.textContent=(0).toString(),this.ts_half.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedFull)/2).toString(),this.ss_half.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFull)/2).toString(),this.hand_half.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFull)/2).toString(),this.boost_half.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFull)/2).toString(),this.roc_half.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbFull)/2).toString(),this.ts_full.textContent=Math.floor(1e-6+s.MaxSpeedFull).toString(),this.ss_full.textContent=s.StallSpeedFull.toString(),this.hand_full.textContent=s.HandlingFull.toString(),this.boost_full.textContent=s.BoostFull.toString(),this.roc_full.textContent=s.RateOfClimbFull.toString(),e.bomb_mass>0||this.show_bombs?(this.bomb_row1.hidden=!1,this.bomb_row2.hidden=!1,this.bomb_row2.appendChild(this.vital_components),this.vital_components.rowSpan=5,this.ts_halfwB.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedwBombs)/2).toString(),this.ss_halfwB.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFullwBombs)/2).toString(),this.hand_halfwB.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFullwBombs)/2).toString(),this.boost_halfwB.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFullwBombs)/2).toString(),this.roc_halfwB.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbwBombs)/2).toString(),this.ts_fullwB.textContent=Math.floor(1e-6+s.MaxSpeedwBombs).toString(),this.ss_fullwB.textContent=s.StallSpeedFullwBombs.toString(),this.hand_fullwB.textContent=s.HandlingFullwBombs.toString(),this.boost_fullwB.textContent=s.BoostFullwBombs.toString(),this.roc_fullwB.textContent=s.RateOfClimbwBombs.toString(),this.turnbleed_label.textContent=h("Derived Turn Bleed wB"),this.turnbleed_cell.textContent=n.Format("{0} ({1})",s.TurnBleed,s.TurnBleedwBombs)):(this.bomb_row1.hidden=!0,this.bomb_row2.hidden=!0,this.full_row.appendChild(this.vital_components),this.vital_components.rowSpan=3,this.turnbleed_label.textContent=h("Derived Turn Bleed"),this.turnbleed_cell.textContent=n.Format("{0}",s.TurnBleed)),this.dropoff_cell.textContent=s.Dropoff.toString(),this.overspeed_cell.textContent=s.Overspeed.toString(),this.maxfuel_cell.textContent=(Math.floor(1e-6+10*s.FuelUses)/10).toString(),t.GetIsFlammable()?this.flammable_cell.textContent=h("Yes"):this.flammable_cell.textContent=h("No"),this.stability_cell.textContent=s.Stabiilty.toString(),this.eloss_cell.textContent=s.EnergyLoss.toString(),this.landing_cell.textContent=t.GetGearName(),this.maxalt_cell.textContent=t.GetMinAltitude().toString()+"-"+t.GetMaxAltitude().toString(),this.reliability_cell.textContent=n.Join(", ",t.GetReliabilityList()),this.toughness_cell.textContent=s.Toughness.toString(),this.mxstrain_cell.textContent=s.MaxStrain.toString(),this.escape_cell.textContent=n.Join(", ",t.GetEscapeList()),this.crashsafety_cell.textContent=e.crashsafety.toString(),this.crew_cell.textContent=t.GetCockpits().GetNumberOfCockpits().toString()+"/"+(t.GetPassengers().GetSeats()+t.GetPassengers().GetBeds()).toString(),this.flightstress_cell.textContent=g(t.GetStressList()),this.visibility_cell.textContent=n.Join(", ",t.GetVisibilityList()),this.attack_cell.textContent=n.Join(", ",t.GetAttackList()),this.communications_cell.textContent=t.GetCommunicationName();this.electric_cell.childElementCount>0;)this.electric_cell.removeChild(this.electric_cell.firstChild);const u=t.GetElectrics(),m=bt(this.electric_cell);u.storage>0&&Ft(h("Derived Battery"),u.storage.toString(),m);for(let t of u.equipment)Ft(t.source,t.charge,m);var d="";const _=t.VitalComponentList();for(let t of _)d+=t+"
";this.vital_components.innerHTML=d;const f=t.GetWeapons().GetWeaponList(),A=t.GetWeapons().GetDirectionList(),b=t.GetMunitions().GetBombCount(),S=t.GetMunitions().GetRocketCount();var y=t.GetMunitions().GetInternalBombCount(),w="";if(b>0){const e=Math.min(b,y),s=Math.max(0,b-e);e>0&&(w+=h(" Bomb Mass Internally.",e)),s>0&&(w+=h(" Bomb Mass Externally.",s)),e>0&&(w+=h("Largest Internal Bomb",Math.min(e,t.GetMunitions().GetMaxBombSize()).toString())),y-=e,w+="
"}if(S>0){const t=Math.min(S,y),e=Math.max(0,S-t);t>0&&(w+=h(" Rocket Mass Internally.",t)),e>0&&(w+=h(" Rocket Mass Externally.",e)),w+="
"}for(let e of t.GetWeapons().GetWeaponSets())w+=qt(e,f,A),w+="
";this.weapon_cell.innerHTML=w,e.warnings.sort(((t,e)=>t.color-e.color));var C="";for(let t of e.warnings){switch(t.color){case c.RED:C+='
';break;case c.YELLOW:C+='
';break;case c.WHITE:default:C+='
'}C+=t.source+": "+t.warning+"
"}this.warning_cell.innerHTML=C;var B="";const E=t.GetWings().GetWingList().length;if(1==E){const e=t.GetWings().GetWingList()[0].deck;e{t()},this.fires=document.getElementById("input_fires"),this.fires.onchange=()=>{t()},this.oxidized=document.getElementById("input_oxidized"),this.oxidized.onchange=()=>{t()},this.fRow=xt(this.tbl),St(this.fRow,h("Altitude Altitude")),St(this.fRow,h("Derived Boost")),St(this.fRow,h("Derived Rate of Climb")),St(this.fRow,h("Derived Stall Speed")),St(this.fRow,h("Derived Top Speed")),this.rows=[]}AddRow(t){const e=document.createElement("TR");e.insertCell().textContent=n.Format("{0}-{1}",10*t,10*t+9),e.insertCell(),e.insertCell(),e.insertCell(),e.insertCell(),this.rows.push(e)}UpdateDisplay(t,e){for(;this.tbl.lastChild;)this.tbl.removeChild(this.tbl.lastChild);const s=document.createDocumentFragment();s.appendChild(this.fRow);var i=0,a=0,n=0,r=0;switch(this.fuel_state.selectedIndex){case ue.FULLWBOMBS:i=e.BoostFullwBombs,a=e.RateOfClimbwBombs,n=e.StallSpeedFullwBombs,r=e.MaxSpeedwBombs;break;case ue.HALFWBOMBS:i=Math.floor(1e-6+(e.BoostEmpty+e.BoostFullwBombs)/2),a=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),n=Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFullwBombs)/2),r=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2);break;case ue.FULL:i=e.BoostFull,a=e.RateOfClimbFull,n=e.StallSpeedFull,r=e.MaxSpeedFull;break;case ue.HALF:i=Math.floor(1e-6+(e.BoostEmpty+e.BoostFull)/2),a=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),n=Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFull)/2),r=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2)}for(let e=0;e<100;e++){var o=0,l=0;if(es&&(o=e-s)}this.fires.checked&&(o=0),this.rows.length<=e&&this.AddRow(e);const c=this.rows[e];var h=0;h=o>0&&0!=i?Math.max(1,i-1):i;const u=Math.max(1,a-o),m=Math.max(1,n+e),p=Math.max(1,r+l-o);if(c.children[1].textContent=h.toString(),c.children[2].textContent=u.toString(),c.children[3].textContent=m.toString(),c.children[4].textContent=p.toString(),s.appendChild(c),m>p){for(;this.rows.length>e;)this.rows.pop();break}}this.tbl.appendChild(s)}}!function(t){t[t.SINGLE=0]="SINGLE",t[t.PUSHER=1]="PUSHER",t[t.PULLER=2]="PULLER"}(me||(me={}));class de{constructor(){this.dash_canvas=document.createElement("CANVAS"),this.dash_canvas.width=1122,this.dash_canvas.height=786,this.dash_image=document.getElementById("dash_img"),this.dash_image.width=1122,this.dash_image.height=786,this.weap_canvas=document.createElement("CANVAS"),this.weap_canvas.width=483,this.weap_canvas.height=291,this.weap_image=document.getElementById("weap_img"),this.weap_image.width=483,this.weap_image.height=291,this.eng_canvas=document.createElement("CANVAS"),this.eng_canvas.width=600,this.eng_canvas.height=360,this.eng_image=document.getElementById("eng_img"),this.eng_image.width=600,this.eng_image.height=360,this.rad_canvas=document.createElement("CANVAS"),this.rad_canvas.width=479,this.rad_canvas.height=290,this.rad_image=document.getElementById("rad_img"),this.rad_image.width=479,this.rad_image.height=290,this.npc_canvas=document.createElement("CANVAS"),this.npc_canvas.width=482,this.npc_canvas.height=290,this.npc_image=document.getElementById("npc_img"),this.npc_image.width=482,this.npc_image.height=290,this.acft_data={full_bomb_boost:0,half_bomb_boost:0,full_boost:0,half_boost:0,empty_boost:0,full_bomb_hand:0,half_bomb_hand:0,full_hand:0,half_hand:0,empty_hand:0,full_bomb_climb:0,half_bomb_climb:0,full_climb:0,half_climb:0,empty_climb:0,full_bomb_stall:0,half_bomb_stall:0,full_stall:0,half_stall:0,empty_stall:0,full_bomb_speed:0,half_bomb_speed:0,full_speed:0,half_speed:0,empty_speed:0,fuel:0,dropoff:0,ordinance:[""],escape:0,crash:0,visibility:0,energy_loss:0,turn_bleed:0,stability:0,stress:0,toughness:0,max_strain:0,vital_parts:[""],armour:[],warnings:[{source:"",warning:""}]},this.weap_data={type:"",abrv:"",ammo:0,ap:0,jam:"",hits:[],damage:[],tags:[],reload:0,gyrojet:!1},this.eng_data={reliability:"0",min_IAF:0,altitude:0,overspeed:0,radiator:0,notes:[]},this.rad_data={mount_type:"",coolant_type:""}}SaveDash(){var t=this.dash_canvas.getContext("2d");t.clearRect(0,0,this.dash_canvas.width,this.dash_canvas.height),t.textAlign="center",t.drawImage(this.dash_image,0,0),t.font="35px Balthazar",t.fillText(this.acft_data.full_bomb_boost.toString(),493,94,80),t.fillText(this.acft_data.full_bomb_hand.toString(),555,94,80),t.fillText(this.acft_data.full_bomb_climb.toString(),617,94,80),t.fillText(this.acft_data.full_bomb_stall.toString(),679,94,80),t.fillText(this.acft_data.full_bomb_speed.toString(),741,94,80),t.fillText(this.acft_data.half_bomb_boost.toString(),493,134,80),t.fillText(this.acft_data.half_bomb_hand.toString(),555,134,80),t.fillText(this.acft_data.half_bomb_climb.toString(),617,134,80),t.fillText(this.acft_data.half_bomb_stall.toString(),679,134,80),t.fillText(this.acft_data.half_bomb_speed.toString(),741,134,80),t.fillText(this.acft_data.full_boost.toString(),493,174,80),t.fillText(this.acft_data.full_hand.toString(),555,174,80),t.fillText(this.acft_data.full_climb.toString(),617,174,80),t.fillText(this.acft_data.full_stall.toString(),679,174,80),t.fillText(this.acft_data.full_speed.toString(),741,174,80),t.fillText(this.acft_data.half_boost.toString(),493,214,80),t.fillText(this.acft_data.half_hand.toString(),555,214,80),t.fillText(this.acft_data.half_climb.toString(),617,214,80),t.fillText(this.acft_data.half_stall.toString(),679,214,80),t.fillText(this.acft_data.half_speed.toString(),741,214,80),t.fillText("0",493,254,80),t.fillText(this.acft_data.empty_hand.toString(),555,254,80),t.fillText("0",617,254,80),t.fillText(this.acft_data.empty_stall.toString(),679,254,80),t.fillText("0",741,254,80),t.fillText(Math.floor(this.acft_data.fuel).toString(),417,310,35),t.fillText(this.acft_data.dropoff.toString(),1048,375,35),t.fillText(this.acft_data.escape.toString(),85,640,35),t.fillText(this.acft_data.crash.toString(),85,720,35),t.fillText(this.acft_data.visibility.toString(),135,460,35),t.fillText(this.acft_data.stability.toString(),135,550,35),t.fillText(this.acft_data.energy_loss.toString(),70,505,35),t.fillText(this.acft_data.turn_bleed.toString(),195,505,35),t.fillText(this.acft_data.stress.toString(),285,495,35),t.fillText(this.acft_data.toughness.toString(),250,645,35),t.fillText(this.acft_data.max_strain.toString(),250,720,35),t.font="20px Balthazar",t.textAlign="left";var e=Math.min(this.acft_data.ordinance.length,2),s=Math.ceil(this.acft_data.ordinance.length/e-1e-6),i=0;for(let a=0;a0&&(a+=""!=a?", ":h("Armour")+" ",a+=e.toString()+"/+"+(11-this.acft_data.armour[t]).toString())}t.fillText(a,335,558,375),t.font="14px Balthazar",i=1;for(let e=0;ee+1?t.fillText(h("Cards Too Many Warnings Warning"),335,673+14*i,370):i>6||t.fillText(s,335,673+14*i,370),i++}this.download(this.name+"_Dashboard",this.dash_canvas)}SaveWeapon(t){t++;var e=this.weap_canvas.getContext("2d");e.clearRect(0,0,this.weap_canvas.width,this.weap_canvas.height),e.textAlign="center",e.drawImage(this.weap_image,0,0),e.font="25px Balthazar",e.fillText(this.weap_data.type,150,112,215),e.font="15px Balthazar";var s="";this.weap_data.reload>0?(s+=h("Cards Gun String Reload",(this.weap_data.ammo/this.weap_data.reload).toString(),this.weap_data.reload.toString()),this.weap_data.tags.push(h("Weapon Tag Reload",this.weap_data.reload.toString()))):s+=h("Cards Gun String No Reload",this.weap_data.ammo),e.fillText(s,95,158,105),e.fillText(this.weap_data.ap.toString(),172,158,23),e.fillText(this.weap_data.jam,230,158,65),e.fillText(this.weap_data.hits[0].toString(),157,208,80),e.fillText(this.weap_data.hits[1].toString(),237,208,80),e.fillText(this.weap_data.hits[2].toString(),317,208,80),e.fillText(this.weap_data.hits[3].toString(),397,208,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[0]).toString(),157,231,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[1]).toString(),237,231,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[2]).toString(),317,231,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[3]).toString(),397,231,80),e.textAlign="left",e.fillText(this.weap_data.tags[0],90,256,350);var i="";for(let t=1;t=0&&s.fillText(h("Cards Uses Radiator",this.eng_data.radiator+1),109,340,270),s.textAlign="right",s.font="30px Balthazar",s.fillStyle="#fff",s.strokeStyle="#fff",s.fillText("#"+t.toString(),37,67,35),e){case me.SINGLE:this.download(this.name+"_Engine_"+t.toString(),this.eng_canvas);break;case me.PUSHER:this.download(this.name+"_Engine_"+t.toString()+"_Pusher",this.eng_canvas);break;case me.PULLER:this.download(this.name+"_Engine_"+t.toString()+"_Puller",this.eng_canvas)}}SaveRadiator(t){t++;var e=this.rad_canvas.getContext("2d");e.clearRect(0,0,this.rad_canvas.width,this.rad_canvas.height),e.drawImage(this.rad_image,0,0),e.textAlign="center",e.font="25px Balthazar",e.fillStyle="#000",e.strokeStyle="#000",e.fillText(this.rad_data.mount_type,162,141,230),e.fillText(this.rad_data.coolant_type,162,217,230),e.textAlign="right",e.font="25px Balthazar",e.fillStyle="#fff",e.strokeStyle="#fff",e.fillText("#"+t.toString(),37,56,35),this.download(this.name+"_Radiator_"+t.toString(),this.rad_canvas)}SaveNPC(){var t=this.npc_canvas.getContext("2d");t.clearRect(0,0,this.npc_canvas.width,this.npc_canvas.height),t.drawImage(this.npc_image,0,0),t.font="20px Balthazar",t.textAlign="center",t.fillStyle="#000",t.strokeStyle="#000",t.fillText(this.name,100,100,145),t.fillText(""+this.lowest_overspeed,70,158,40),t.fillText(""+this.acft_data.full_speed,126,158,40);var e=this.acft_data.full_speed-this.acft_data.turn_bleed-Math.floor(1e-6+.1*this.acft_data.full_speed);t.fillText(""+e,187,158,40),t.fillText(""+this.acft_data.full_stall,245,158,40);var s,i=this.acft_data.toughness+this.acft_data.max_strain;if(t.fillText(""+i,70,236,40),t.fillText(""+this.acft_data.full_hand,123,236,40),this.all_weapons[0]){s=this.all_weapons[0],t.font="12px Avenir",t.fillText(s.abrv,232,71,91),t.font="20px Balthazar";var a=n.Join("/",[s.hits[0],s.hits[1],s.hits[2],s.hits[3]]),r=n.Join("/",[Math.floor(1e-6+s.damage[0]),Math.floor(1e-6+s.damage[1]),Math.floor(1e-6+s.damage[2]),Math.floor(1e-6+s.damage[3])]);t.fillText(a,320,71,80),t.fillText(r,401,71,80)}this.all_weapons[1]&&(s=this.all_weapons[1],t.font="12px Avenir",t.fillText(s.abrv,232,103,91),t.font="20px Balthazar",a=n.Join("/",[s.hits[0],s.hits[1],s.hits[2],s.hits[3]]),r=n.Join("/",[Math.floor(1e-6+s.damage[0]),Math.floor(1e-6+s.damage[1]),Math.floor(1e-6+s.damage[2]),Math.floor(1e-6+s.damage[3])]),t.fillText(a,320,103,80),t.fillText(r,401,103,80)),this.download(this.name+"_NPC",this.npc_canvas)}download(t,e){var s=document.createElement("a");if(s.download=t+".png",s.href=e.toDataURL(),document.createEvent){var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.dispatchEvent(i)}}}var ge=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function a(t,e){if(!i[t]){i[t]={};for(let e=0;e>>8,s[2*t+1]=i%256}return s},decompressFromUint8Array:function(e){if(null==e)return n.decompress(e);var s=new Array(e.length/2);for(let t=0,i=s.length;t>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=r[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++),r[h]=m++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(o,c)){if(c.charCodeAt(0)<256){for(i=0;i>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=r[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++)}for(a=2,i=0;i>=1;for(;;){if(g<<=1,_==e-1){d.push(s(g));break}_++}return d.join("")},decompress:function(t){return null==t?"":""==t?null:n._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,s,i){var a,n,r,o,l,h,c,u=[],m=4,p=4,d=3,g="",_=[],f={val:i(0),position:s,index:1};for(a=0;a<3;a+=1)u[a]=a;for(r=0,l=Math.pow(2,2),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;switch(r){case 0:for(r=0,l=Math.pow(2,8),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;c=t(r);break;case 1:for(r=0,l=Math.pow(2,16),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;c=t(r);break;case 2:return""}for(u[3]=c,n=c,_.push(c);;){if(f.index>e)return"";for(r=0,l=Math.pow(2,d),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;switch(c=r){case 0:for(r=0,l=Math.pow(2,8),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;u[p++]=t(r),c=p-1,m--;break;case 1:for(r=0,l=Math.pow(2,16),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;u[p++]=t(r),c=p-1,m--;break;case 2:return _.join("")}if(0==m&&(m=Math.pow(2,d),d++),u[c])g=u[c];else{if(c!==p)return null;g=n+n.charAt(0)}_.push(g),u[p++]=n+g.charAt(0),n=g,0==--m&&(m=Math.pow(2,d),d++)}}};return n}();class _e extends kt{constructor(t,e){super(),this.acft=t,this.parts_JSON=e,this.era=new zt(this.acft.GetEra()),this.cockpits=new jt(t.GetCockpits()),this.passengers=new Yt(t.GetPassengers()),this.engines=new Kt(t.GetEngines()),this.propeller=new Zt(t.GetPropeller()),this.frames=new Xt(t.GetFrames()),this.wings=new $t(t.GetWings()),this.stabilizers=new te(t.GetStabilizers()),this.controlsurfaces=new ee(t.GetControlSurfaces()),this.reinforcements=new se(t.GetReinforcements()),this.load=new ie(t.GetFuel(),t.GetMunitions(),t.GetCargoAndPassengers()),this.gear=new ae(t.GetLandingGear()),this.accessories=new ne(t.GetAccessories()),this.optimization=new re(t.GetOptimization()),this.weapons=new Lt(t.GetWeapons()),this.used=new oe(t.GetUsed()),this.rotor=new le(t.GetRotor()),this.alter=new he(t.GetAlter()),this.altitude=new pe((()=>{this.UpdateDisplay()})),this.acft_type=document.getElementById("acft_type");let s=0;for(let t in N)if(isNaN(Number(t))&&(s+=1,2!=s)){let e=document.createElement("OPTION");e.text=h(t),this.acft_type.add(e)}this.acft_type.onchange=()=>{let t=this.acft_type.selectedIndex;t>=1&&(t+=1),this.acft.SetType(t)};const i=document.getElementById("tbl_stats");this.InitStats(i);const a=document.getElementById("tbl_derived");this.InitDerived(a),this.acft.SetDisplayCallback((()=>{this.UpdateDisplay()})),document.getElementById("acft_save").onclick=()=>{this.SaveJSON()};const n=document.getElementById("acft_load");n.multiple=!1,n.accept="application/JSON",n.onchange=t=>{this.LoadJSON(n)};const r=document.getElementById("acft_load_text");r.onchange=()=>{this.LoadText(r)};const o=document.getElementById("acft_load_text2");o.onchange=()=>{this.LoadText(o)},document.getElementById("acft_save_link").onclick=()=>{this.SaveLink()},this.cards=new de,document.getElementById("acft_save_dash").onclick=()=>{this.SaveDash()},document.getElementById("acft_interactive_dash").onclick=()=>{this.SaveInteractive()},document.getElementById("acft_save_npc").onclick=()=>{this.SaveNPC()},document.getElementById("acft_reset").onclick=()=>{this.acft.Reset(),this.derived.SetName(this.acft.name),this.acft.CalculateStats(),this.SetCollapse()},document.getElementById("acft_save_cat").onclick=()=>{this.CatalogStats()},document.getElementById("acft_save_cat_json").onclick=()=>{this.CatalogJSON()},this.SetCollapse()}UpdateCard(){this.acft.name=this.derived.GetName();const t=this.acft.GetStats(),e=this.acft.GetDerivedStats();this.cards.name=this.acft.name,this.cards.acft_data.armour=this.acft.GetAccessories().GetEffectiveCoverage(),this.cards.acft_data.crash=t.crashsafety,this.cards.acft_data.dropoff=e.Dropoff,this.cards.acft_data.empty_boost=e.BoostEmpty,this.cards.acft_data.empty_hand=e.HandlingEmpty,this.cards.acft_data.empty_climb=e.RateOfClimbEmpty,this.cards.acft_data.empty_stall=e.StallSpeedEmpty,this.cards.acft_data.empty_speed=Math.floor(1e-6+e.MaxSpeedEmpty),this.cards.acft_data.energy_loss=e.EnergyLoss,this.cards.acft_data.escape=this.acft.GetCockpits().GetEscapeList()[0],this.cards.acft_data.fuel=e.FuelUses,this.cards.acft_data.full_bomb_boost=e.BoostFullwBombs,this.cards.acft_data.full_bomb_hand=e.HandlingFullwBombs,this.cards.acft_data.full_bomb_climb=e.RateOfClimbwBombs,this.cards.acft_data.full_bomb_stall=e.StallSpeedFullwBombs,this.cards.acft_data.full_bomb_speed=e.MaxSpeedwBombs,this.cards.acft_data.full_boost=e.BoostFull,this.cards.acft_data.full_hand=e.HandlingFull,this.cards.acft_data.full_climb=e.RateOfClimbFull,this.cards.acft_data.full_stall=e.StallSpeedFull,this.cards.acft_data.full_speed=Math.floor(1e-6+e.MaxSpeedFull),this.cards.acft_data.half_bomb_boost=Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),this.cards.acft_data.half_bomb_hand=Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),this.cards.acft_data.half_bomb_climb=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),this.cards.acft_data.half_bomb_stall=Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),this.cards.acft_data.half_bomb_speed=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),this.cards.acft_data.half_boost=Math.floor((e.BoostFull+e.BoostEmpty)/2),this.cards.acft_data.half_hand=Math.floor((e.HandlingFull+e.HandlingEmpty)/2),this.cards.acft_data.half_climb=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),this.cards.acft_data.half_stall=Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),this.cards.acft_data.half_speed=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),this.cards.acft_data.max_strain=e.MaxStrain;const s=[],i=this.acft.GetMunitions().GetBombCount(),a=this.acft.GetMunitions().GetRocketCount();var n=this.acft.GetMunitions().GetInternalBombCount();if(i>0){const t=Math.min(i,n),e=Math.max(0,i-t);if(t>0&&s.push(h(" Bomb Mass Internally.",t)),e>0&&s.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.acft.GetMunitions().GetMaxBombSize());s.push(h("Largest Internal Bomb",e.toString()))}n-=t}if(a>0){const t=Math.min(a,n),e=Math.max(0,a-t);t>0&&s.push(h(" Rocket Mass Internally.",t)),e>0&&s.push(h(" Rocket Mass Externally.",e))}this.cards.acft_data.ordinance=s,this.cards.acft_data.stability=e.Stabiilty,this.cards.acft_data.stress=this.acft.GetCockpits().GetStressList()[0][0],this.cards.acft_data.toughness=e.Toughness,this.cards.acft_data.turn_bleed=e.TurnBleed,this.cards.acft_data.visibility=this.acft.GetCockpits().GetVisibilityList()[0],this.cards.acft_data.vital_parts=this.acft.VitalComponentList(),this.cards.acft_data.warnings=t.warnings}UpdateWeaponCard(t){const e=this.acft.GetWeapons().GetWeaponList(),s=this.acft.GetWeapons().GetDirectionList();var i=Wt(t,e);t.IsPlural()&&(i=t.GetWeaponCount().toString()+"x "+i);const a=t.GetDirection();var n="";n+="[";for(let t=0;t0&&s.starter&&this.cards.eng_data.notes.push(h("Starter"))}}else if(t.IsRotary()&&t.IsTractor()?this.cards.eng_data.notes.push(h("Turns Right")):t.IsRotary()&&t.IsPusher()&&this.cards.eng_data.notes.push(h("Turns Left")),""!=t.GetSelectedList()){const s=T().get(t.GetSelectedList()).get_name(e.name);this.cards.eng_data.min_IAF=s.min_IdealAlt,s.upgrades[1]?this.cards.eng_data.notes.push(h("War Emergency Power")):s.compressor_count>0&&1==s.compressor_type&&this.cards.eng_data.notes.push(h("War Emergency Power from altitudes 0-9"))}}UpdateRadiatorCard(t){this.cards.rad_data.mount_type=h(t.GetMountList()[t.GetMountIndex()].name),this.cards.rad_data.coolant_type=h(t.GetCoolantList()[t.GetCoolantIndex()].name)}LoadJSON(t){if(0==t.files.length)return;const e=t.files[0],s=new FileReader;s.onloadend=()=>{try{var t=JSON.parse(s.result);new Ut(this.parts_JSON,!1).fromJSON(t)&&(t=JSON.parse(s.result),console.log(t),this.acft.fromJSON(t),this.derived.SetName(this.acft.name),this.acft.CalculateStats(),this.SetCollapse())}catch(t){console.error(t,t.stack)}},s.readAsText(e),t.value=""}CatalogStats(){this.acft.name=this.derived.GetName();const t=this.acft.GetStats(),e=this.acft.GetDerivedStats();var s="\\FCPlane[Nickname=\\FrameDefault{Not Set}, %Box Text = {}, Image = {},\n";s+=n.Format("Name={{0}}, Price={1}, Used={2}, Upkeep={3},\n",this.acft.name,t.cost,Math.floor(1e-6+t.cost/2),t.upkeep),s+="Stats = {\n",t.bomb_mass>0&&(s+=n.Format("Full Load & {0} & {1} & {2} & {3} & {4} \\\\\n",e.BoostFullwBombs,e.HandlingFullwBombs,e.RateOfClimbwBombs,e.StallSpeedFullwBombs,e.MaxSpeedwBombs),s+="\\nicefrac{1}{2}"+n.Format(", Bombs & {0} & {1} & {2} & {3} & {4}\\\\\n",Math.floor(1e-6+(e.BoostEmpty+e.BoostFullwBombs)/2),Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFullwBombs)/2),Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFullwBombs)/2),Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2))),s+=n.Format("Full Fuel & {0} & {1} & {2} & {3} & {4}\\\\\n",e.BoostFull,e.HandlingFull,e.RateOfClimbFull,e.StallSpeedFull,e.MaxSpeedFull),s+=n.Format("Half Fuel & {0} & {1} & {2} & {3} & {4}\\\\\n",Math.floor(1e-6+(e.BoostEmpty+e.BoostFull)/2),Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFull)/2),Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFull)/2),Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2)),s+=n.Format("Empty & {0} & {1} & {2} & {3} & {4}\\\\\n","-",e.HandlingEmpty,"-",e.StallSpeedEmpty,0),s+="},\n";var i=this.acft.VitalComponentList(),a=new Map;for(let t of i)t=t.replace(/Weapon Set #.*/g,"Guns").trim(),t=t.replace(/#.*/g,"").trim(),a.has(t)?a.set(t,a.get(t)+1):a.set(t,1);i=[];for(let t of a.keys())1==a.get(t)?i.push(t):i.push(t+" x"+a.get(t).toString());s+="Vital Parts = {"+n.Join(", ",i)+"},\n";var r=[];for(let t=0;t0){const t=Math.min(c,m),e=Math.max(0,c-t);t>0&&(s+=h(" Bomb Mass Internally.",t)),e>0&&(s+=h(" Bomb Mass Externally.",e)),t>0&&(s+=h("Largest Internal Bomb",Math.min(t,this.acft.GetMunitions().GetMaxBombSize()).toString())),m-=t,s+="\\\\\n"}if(u>0){const t=Math.min(u,m),e=Math.max(0,u-t);t>0&&(s+=h(" Rocket Mass Internally.",t)),e>0&&(s+=h(" Rocket Mass Externally.",e)),s+="\\\\\n"}const p=this.acft.GetWeapons().GetWeaponSets();for(let t=0;t0&&(s.push({Name:"Full Load",Boost:e.BoostFullwBombs,Handling:e.HandlingFullwBombs,Climb:e.RateOfClimbwBombs,Stall:e.StallSpeedFullwBombs,Speed:e.MaxSpeedwBombs}),s.push({Name:"1/2, Bombs",Boost:Math.floor(1e-6+(e.BoostEmpty+e.BoostFullwBombs)/2),Handling:Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFullwBombs)/2),Climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),Stall:Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFullwBombs)/2),Speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2)})),s.push({Name:"Full Fuel",Boost:e.BoostFull,Handling:e.HandlingFull,Climb:e.RateOfClimbFull,Stall:e.StallSpeedFull,Speed:e.MaxSpeedFull}),s.push({Name:"Half Fuel",Boost:Math.floor(1e-6+(e.BoostEmpty+e.BoostFull)/2),Handling:Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFull)/2),Climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),Stall:Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFull)/2),Speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2)}),s.push({Name:"Empty",Boost:"-",Handling:e.HandlingEmpty,Climb:"-",Stall:e.StallSpeedEmpty,Speed:0});let i=this.acft.VitalComponentList(),a=new Map;for(let t of i)t=t.replace(/Weapon Set #.*/g,"Guns").trim(),t=t.replace(/#.*/g,"").trim(),a.has(t)?a.set(t,a.get(t)+1):a.set(t,1);i=[];for(let t of a.keys())1==a.get(t)?i.push(t):i.push(t+" x"+a.get(t).toString());let r=[];for(let t=0;t0){const t=Math.min(d,f),e=Math.max(0,d-t);t>0&&(u+=h(" Bomb Mass Internally.",t)),e>0&&(u+=h(" Bomb Mass Externally.",e)),t>0&&(u+=h("Largest Internal Bomb",Math.min(t,this.acft.GetMunitions().GetMaxBombSize()).toString())),f-=t,u+="\n"}if(_>0){const t=Math.min(_,f),e=Math.max(0,_-t);t>0&&(u+=h(" Rocket Mass Internally.",t)),e>0&&(u+=h(" Rocket Mass Externally.",e)),u+="\n"}const A=this.acft.GetWeapons().GetWeaponSets();for(let t=0;t10;)s.pop(),i=!0;for(i&&(s.pop(),s.push("And More. See Plane Builder for full list."));s.length<10;)s.push("");const a=this.acft.GetAccessories().GetEffectiveCoverage();var n="";for(let t=0;t0&&(n+=""!=n?", ":h("Armour")+" ",n+=e.toString()+"/+"+(11-a[t]).toString())}const r=[],o=this.acft.GetMunitions().GetBombCount(),l=this.acft.GetMunitions().GetRocketCount();var c=this.acft.GetMunitions().GetInternalBombCount();if((o>0||l>0)&&r.push("Current load here."),o>0){const t=Math.min(o,c),e=Math.max(0,o-t);if(t>0&&r.push(h(" Bomb Mass Internally.",t)),e>0&&r.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.acft.GetMunitions().GetMaxBombSize());r.push(h("Largest Internal Bomb",e.toString()))}c-=t}if(l>0){const t=Math.min(l,c),e=Math.max(0,l-t);t>0&&r.push(h(" Rocket Mass Internally.",t)),e>0&&r.push(h(" Rocket Mass Externally.",e))}for(;r.length<5;)r.push("");var u="";for(let e of t.warnings)u+=e.source+": "+e.warning+"\n";const m={altitude:0,airspeed:0,fuel:e.FuelUses,dropoff:e.Dropoff,visibility:this.acft.GetCockpits().GetCockpit(0).GetVisibility(),energy_loss:e.EnergyLoss,turn_bleed:e.TurnBleed,stability:e.Stabiilty,stress:this.acft.GetCockpits().GetCockpit(0).GetFlightStress()[0],plane_escape:this.acft.GetCockpits().GetCockpit(0).GetEscape(),crash:this.acft.GetCockpits().GetCockpit(0).GetCrash(),max_toughness:e.Toughness,current_toughness:e.Toughness,max_strain:e.MaxStrain,current_strain:e.MaxStrain,g_force:0,kills:0,full_load_boost:e.BoostFullwBombs,full_load_handling:e.HandlingFullwBombs,full_load_climb:e.RateOfClimbwBombs,full_load_stall:e.StallSpeedFullwBombs,full_load_speed:e.MaxSpeedwBombs,half_fuel_bombs_boost:Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),half_fuel_bombs_handling:Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),half_fuel_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),half_fuel_bombs_stall:Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),half_fuel_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),full_fuel_no_bombs_boost:e.BoostFull,full_fuel_no_bombs_handling:e.HandlingFull,full_fuel_no_bombs_climb:e.RateOfClimbFull,full_fuel_no_bombs_stall:e.StallSpeedFull,full_fuel_no_bombs_speed:Math.floor(1e-6+e.MaxSpeedFull),half_fuel_no_bombs_boost:Math.floor((e.BoostFull+e.BoostEmpty)/2),half_fuel_no_bombs_handling:Math.floor((e.HandlingFull+e.HandlingEmpty)/2),half_fuel_no_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),half_fuel_no_bombs_stall:Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),half_fuel_no_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),empty_boost:0,empty_handling:e.HandlingEmpty,empty_climb:0,empty_stall:e.StallSpeedEmpty,empty_speed:0,vital_part_1:s[0],vital_part_2:s[1],vital_part_3:s[2],vital_part_4:s[3],vital_part_5:s[4],vital_part_6:s[5],vital_part_7:s[6],vital_part_8:s[7],vital_part_9:s[8],vital_part_10:s[9],armor:n,max_bomb_load:r[0],ordinance_1:r[1],ordinance_2:r[2],ordinance_3:r[3],ordinance_4:r[4],notes:u,full_load_selected:!0,half_fuel_bombs_selected:!1,full_fuel_no_bombs_selected:!1,half_fuel_no_bombs_selected:!1,empty_selected:!1,engines:this.InteractiveEngines(),weapons:this.InteractiveWeapons()};return JSON.stringify(m)}InteractiveEngines(){const t=[];for(let e=0;e0&&t.starter&&r.push(h("Starter"))}else{s.IsRotary()&&s.IsTractor()?r.push(h("Turns Right")):s.IsRotary()&&s.IsPusher()&&r.push(h("Turns Left"));const t=T().get(s.GetSelectedList()).get_name(a.name);t.upgrades[1]?r.push(h("War Emergency Power")):t.compressor_count>0&&1==t.compressor_type&&r.push(h("War Emergency Power from altitudes 0-9"))}if(i.notes=n.Join(", ",r),s.GetUsePushPull()){const e=i.reliability.split("/");i.reliability=e[0].toString(),t.push(JSON.stringify(i)),i.reliability=e[0].toString(),t.push(JSON.stringify(i))}else t.push(JSON.stringify(i))}return t}InteractiveWeapons(){const t=[];for(let s of this.acft.GetWeapons().GetWeaponSets()){const i=this.acft.GetWeapons().GetWeaponList(),a=s.GetHits(),r=[];"PR"==i[s.GetWeaponSelected()].abrv?(r.push(5),r.push(5),r.push(5),r.push(5)):(r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[0])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[1])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[2])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[3])));const o=s.GetFinalWeapon(),l=[];let c={type:Wt(s,i),ammo:s.GetShots(),ap:o.ap,jam:s.GetJam(),knife_hits:a[0],close_hits:a[1],long_hits:a[2],extreme_hits:a[3],knife_damage:r[0],close_damage:r[1],long_damage:r[2],extreme_damage:r[3],tags:""};const u=this.acft.GetWeapons().GetDirectionList();s.IsPlural()&&(c.type=s.GetWeaponCount().toString()+"x "+c.type);const m=s.GetDirection();var e="";e+="[";for(let t=0;t=1&&(s-=1),this.acft_type.selectedIndex=s,this.era.UpdateDisplay(),this.cockpits.UpdateDisplay(),this.passengers.UpdateDisplay(),this.engines.UpdateDisplay(),this.propeller.UpdateDisplay(),this.frames.UpdateDisplay(),this.wings.UpdateDisplay(),this.stabilizers.UpdateDisplay(),this.controlsurfaces.UpdateDisplay(),this.reinforcements.UpdateDisplay(),this.reinforcements.UpdateMaxStrain(e.MaxStrain),this.load.UpdateDisplay(),this.load.UpdateFuelUses(t.fuel/t.fuelconsumption),this.gear.UpdateDisplay(),this.accessories.UpdateDisplay(),this.optimization.UpdateDisplay(),this.weapons.UpdateDisplay(),this.used.UpdateDisplay(),this.rotor.UpdateDisplay(),this.alter.UpdateDisplay(),this.UpdateStats(t),this.UpdateDerived(t,e)}}function fe(){Ae(),Be().hash&&(De.forEach(be),xe?.observe(document,ve),Ce(),Ie=setTimeout(Ae,Ne))}function Ae(){clearTimeout(Ie),cancelAnimationFrame(Te),xe?.disconnect(),De.forEach(Se)}function be(t){document.addEventListener(t,Ae)}function Se(t){document.removeEventListener(t,Ae)}function ye(t){if(t.defaultPrevented)return;const e=function(t){let e=t;for(;e&&"A"!==e.nodeName;)e=e.parentElement;return e}(t.target);e&&e.hash&&e.pathname===Be().pathname&&Pe(fe)}function we(){Pe(Ce)}function Ce(){const t=Be().hash;if(!t)return;const e=decodeURIComponent(t.substring(1)),s=Ge.call(null,e);s&&Fe.call(null,s)}function Be(){return location}function Ee(t){return document.getElementById(t)}function Me(t){t.scrollIntoView()}function Pe(t){cancelAnimationFrame(Te),Te=requestAnimationFrame(t)}let Ge,Fe,Re,xe,Ie,Te;const ve={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ne=1e4,De=["selectstart","touchend","wheel"],Oe=JSON.parse('{"version":"12.7","era":{"options":[{"name":"Pioneer","liftbleed":30,"maxbomb":0.166666666666,"cost":-2,"cant_lift":4,"pitchstab":0},{"name":"WWI","liftbleed":25,"maxbomb":0.2,"cant_lift":3,"pitchstab":0,"cost":0},{"name":"Roaring 20s","liftbleed":22,"maxbomb":0.25,"cost":5,"cant_lift":1,"pitchstab":0},{"name":"Coming Storm","liftbleed":22,"maxbomb":0.333333333333,"cost":10,"cant_lift":0,"pitchstab":2},{"name":"WWII","liftbleed":20,"maxbomb":0.333333333333,"cost":15,"cant_lift":0,"pitchstab":2},{"name":"Last Hurrah","liftbleed":18,"maxbomb":0.5,"cost":20,"cant_lift":0,"pitchstab":2}]},"cockpit":{"options":[{"name":"Open","era":"Pioneer","mass":1,"drag":3,"control":0,"escape":2,"cost":0,"flightstress":0,"visibility":1,"exposed":true,"warning":""},{"name":"Windscreen","era":"Pioneer","mass":2,"drag":1,"control":0,"escape":2,"cost":1,"flightstress":0,"visibility":1,"exposed":true,"warning":""},{"name":"Sealed","era":"Pioneer","mass":2,"drag":0,"control":0,"escape":-3,"cost":1,"flightstress":-1,"visibility":-99,"warning":"Sealed Warning","exposed":false},{"name":"Narrow Canopy","era":"WWI","mass":3,"drag":0,"control":0,"escape":0,"cost":3,"flightstress":-1,"visibility":-1,"exposed":false,"warning":""},{"name":"Bubble Canopy","era":"WWII","mass":3,"drag":-3,"control":0,"escape":0,"cost":8,"flightstress":-1,"visibility":0,"exposed":false,"warning":""}],"upgrades":[{"name":"Co-Pilot Controls","era":"Pioneer","mass":0,"drag":0,"control":0,"escape":0,"cost":1,"flightstress":-2,"visibility":0,"warning":"","charge":0},{"name":"Escape Hatch","era":"Pioneer","mass":1,"drag":0,"control":0,"escape":3,"cost":2,"flightstress":0,"visibility":0,"warning":"","charge":0},{"name":"Ejection Seat","era":"Last Hurrah","mass":2,"drag":0,"control":0,"escape":5,"cost":4,"flightstress":0,"visibility":0,"warning":"","charge":0},{"name":"Connectivity","era":"Pioneer","mass":1,"drag":0,"control":0,"escape":0,"cost":0,"flightstress":0,"visibility":0,"warning":"Connectivity Warning","charge":0},{"name":"Oxygen Mask","era":"WWI","warning":"Oxygen Mask Warning","mass":0,"drag":0,"control":0,"escape":0,"charge":-1,"cost":2,"flightstress":0,"visibility":0},{"name":"Isolated","era":"Pioneer","mass":1,"drag":5,"control":0,"escape":-2,"cost":1,"flightstress":1,"visibility":2,"warning":"Isolated Warning","charge":0}],"safety":[{"name":"Padding","era":"Pioneer","cost":1,"warning":"Injury Reduction Warning","charge":0,"escape":0,"visibility":0,"mass":0},{"name":"Harness","era":"Pioneer","escape":-1,"cost":1,"warning":"Injury Reduction Warning","charge":0,"visibility":0,"mass":0},{"name":"Fast Release System","era":"Coming Storm","escape":2,"cost":1,"warning":"","charge":0,"visibility":0,"mass":0},{"name":"Roll Bar","era":"WWI","mass":2,"warning":"Injury Reduction Warning","charge":0,"escape":0,"visibility":0,"cost":0},{"name":"Flare Slot","era":"Roaring 20s","cost":1,"warning":"Flare Slot Warning","charge":0,"escape":0,"visibility":0,"mass":0},{"name":"Basic Fan","era":"Pioneer","charge":1e-9,"visibility":-1,"warning":"Basic Fan Warning","escape":0,"mass":0,"cost":0}],"gunsights":[{"name":"X1 Collimated Gunsight","era":"WWI","visibility":-1,"attack":1,"cost":2,"warning":"X1 Collimated Gunsight Warning","charge":0},{"name":"Telescopic Gunsight","era":"WWI","visibility":-1,"attack":0,"cost":3,"warning":"Telescopic Gunsight Warning","charge":0},{"name":"Illuminated Reflex Sight","era":"WWI","visibility":-1,"attack":2,"charge":1e-9,"cost":6,"warning":"Illuminated Reflex Sight Warning"},{"name":"Gyro Gunsight","era":"WWII","visibility":-1,"attack":2,"charge":1e-9,"cost":12,"warning":"Gyro Gunsight Warning"}]},"passengers":{},"engines":{"mounts":[{"name":"Tractor","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":0,"visibility":0,"liftbleed":0,"strainfactor":0,"dragfactor":0,"location":"fuselage","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Center-Mounted Tractor","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":-2,"visibility":1,"liftbleed":0,"strainfactor":0,"dragfactor":0,"location":"fuselage","reqED":true,"powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqTail":false,"escape":0},{"name":"Rear-Mounted Pusher","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":-4,"visibility":2,"liftbleed":0,"strainfactor":0,"dragfactor":0,"escape":-2,"location":"fuselage","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqTail":false,"reqED":false},{"name":"Center-Mounted Pusher","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":-2,"visibility":2,"liftbleed":0,"strainfactor":0,"dragfactor":0,"escape":-2,"location":"fuselage","reqTail":true,"powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqED":false},{"name":"Pod","era":"Pioneer","drag":5,"reqsections":1,"pitchstab":0,"visibility":-2,"liftbleed":0,"strainfactor":0,"dragfactor":0,"location":"pod","powerfactor":0.9,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Nacelle (Inside)","era":"Pioneer","drag":0,"reqsections":0,"pitchstab":0,"visibility":0,"liftbleed":1,"strainfactor":0.5,"dragfactor":0,"location":"wing","powerfactor":0.8,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Nacelle (Offset)","era":"Pioneer","drag":0,"reqsections":0,"pitchstab":0,"visibility":0,"liftbleed":0,"strainfactor":0,"dragfactor":1,"location":"wing","powerfactor":0.8,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Channel Tractor","era":"Pioneer","drag":0,"reqsections":0,"pitchstab":0,"visibility":0,"liftbleed":-1,"strainfactor":1,"dragfactor":0,"location":"wing","powerfactor":0.9,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Fuselage Push-Pull","era":"Pioneer","reqsections":2,"pitchstab":-2,"escape":-2,"strainfactor":0,"dragfactor":0,"location":"fuselage","powerfactor":0.9,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"liftbleed":0,"visibility":0,"drag":0,"reqED":false},{"name":"Front Intake","era":"Pioneer","strainfactor":0,"dragfactor":0,"location":"fuselage","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":true,"reqTail":false,"liftbleed":0,"escape":0,"visibility":0,"reqsections":0,"drag":0,"pitchstab":0,"reqED":false},{"name":"Wing Pod","era":"Pioneer","liftbleed":1,"strainfactor":0.5,"dragfactor":0,"location":"wing","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":true,"reqTail":false,"escape":0,"visibility":0,"reqsections":0,"drag":0,"pitchstab":0,"reqED":false},{"name":"Underwing Pod","era":"Pioneer","drag":3,"visibility":-1,"strainfactor":0,"dragfactor":0,"location":"wing","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":true,"reqTail":false,"liftbleed":0,"escape":0,"reqsections":0,"pitchstab":0,"reqED":false}],"radiator-type":[{"name":"Panel","era":"Pioneer","drag":0,"mass":0,"cost":0,"cooling":0,"dragpercool":0.5,"warning":""},{"name":"Box","era":"Pioneer","drag":2,"mass":-1,"cost":0,"cooling":0,"dragpercool":0.5,"warning":""},{"name":"Intake","era":"Roaring 20s","drag":0,"mass":0,"cost":3,"cooling":2,"dragpercool":0.5,"warning":""},{"name":"Evaporation","era":"Coming Storm","warning":"Evaporation Warning","drag":0,"mass":0,"cost":0,"cooling":0,"dragpercool":0}],"radiator-mount":[{"name":"Low","era":"Pioneer","warning":"Low Warning","reliability":1,"drag":0,"latstab":0},{"name":"Inline","era":"Pioneer","reliability":0,"drag":0,"latstab":0,"warning":""},{"name":"High","era":"Pioneer","warning":"High Warning","reliability":0,"drag":1,"latstab":0},{"name":"High Offset","era":"WWI","warning":"High Offset Warning","reliability":0,"drag":1,"latstab":-1}],"radiator-coolant":[{"name":"Water","era":"Pioneer","cost":0,"harden":false,"reliability":0,"flammable":false,"warning":""},{"name":"Salt Water","era":"Pioneer","cost":1,"harden":true,"reliability":1,"flammable":false,"warning":""},{"name":"Mineral Oil","era":"Pioneer","warning":"Mineral Oil Warning","cost":1,"harden":true,"reliability":0,"flammable":true},{"name":"Castor Oil","era":"Pioneer","warning":"Castor Oil Warning","cost":0,"harden":false,"reliability":0,"flammable":true},{"name":"Glycol","era":"Roaring 20s","reliability":2,"harden":false,"cost":2,"flammable":false,"warning":""},{"name":"Freon","era":"Coming Storm","warning":"Freon Warning","reliability":4,"harden":false,"cost":3,"flammable":false},{"name":"Ammonia","era":"Pioneer","warning":"Ammonia Warning","reliability":4,"harden":false,"cost":2,"flammable":false}],"cowling":[{"name":"No Cowling","era":"Pioneer","ed":1,"mpd":0,"air":true,"liquid":true,"rotary":true,"reliability":0,"mass":0,"cost":0},{"name":"Basic Cowl","era":"Pioneer","mass":1,"cost":1,"ed":0.8,"mpd":0,"air":true,"liquid":false,"rotary":false,"reliability":0},{"name":"Rotary Basic Cowl","era":"Pioneer","mass":1,"cost":1,"ed":0.4,"mpd":0,"air":false,"liquid":false,"rotary":true,"reliability":0},{"name":"Closed Cowl","era":"WWI","mass":1,"cost":1,"reliability":-1,"ed":0.3,"mpd":0,"air":false,"liquid":false,"rotary":true},{"name":"Adjustable Slat Cowl","era":"Coming Storm","mass":2,"reliability":2,"cost":2,"ed":0.5,"mpd":0,"air":true,"liquid":false,"rotary":true},{"name":"Foil Cowl","era":"Roaring 20s","mass":2,"reliability":3,"cost":3,"ed":0.4,"mpd":0,"air":true,"liquid":false,"rotary":true},{"name":"Sealed Cowl","era":"Pioneer","cost":1,"ed":0.5,"mpd":0.333333333333,"air":false,"liquid":true,"rotary":false,"reliability":0,"mass":0}]},"propellers":{"props":[{"name":"High Power","era":"Pioneer","pitchspeed":0.8,"pitchboost":0.9,"cost":0,"energy":1.5,"turn":8},{"name":"Power","era":"Pioneer","pitchspeed":0.9,"pitchboost":0.8,"cost":0,"energy":2,"turn":7},{"name":"Default","era":"Pioneer","pitchspeed":1,"pitchboost":0.6,"cost":0,"energy":3,"turn":6},{"name":"Speed","era":"Pioneer","pitchspeed":1.1,"pitchboost":0.4,"cost":0,"energy":4,"turn":5},{"name":"High Speed","era":"Pioneer","pitchspeed":1.2,"pitchboost":0.3,"cost":0,"energy":4.5,"turn":4}],"upgrades":[{"name":"None","era":"Pioneer","energy":0,"turn":0,"warning":"","pitchboost":0,"mass":0,"pitchspeed":0,"cost":0},{"name":"Manually Adjustable Pitch","era":"Pioneer","energy":0,"turn":0,"cost":2,"warning":"MVP_Warning","pitchboost":0,"mass":0,"pitchspeed":0},{"name":"Automatic Pitch","era":"Roaring 20s","pitchspeed":0.1,"pitchboost":0.1,"energy":0.5,"turn":1,"mass":1,"cost":8,"warning":""}]},"frames":{"frames":[{"name":"Wooden Spars","era":"Pioneer","basestructure":15,"basecost":0,"mass":1,"structure":2,"cost":0,"geodesic":false,"warning":""},{"name":"Steel Spars","era":"Pioneer","basestructure":25,"basecost":1,"mass":1,"structure":5,"cost":1,"geodesic":false,"warning":""},{"name":"Aluminum Spars","era":"WWI","basestructure":20,"basecost":2,"mass":0.5,"structure":4,"cost":2,"geodesic":false,"warning":""},{"name":"Wooden Ribs","era":"WWI","basestructure":30,"basecost":1,"mass":2,"structure":5,"cost":0.5,"geodesic":true,"warning":""},{"name":"Steel Ribs","era":"Roaring 20s","basestructure":60,"basecost":2,"mass":3,"structure":12,"cost":2,"geodesic":true,"warning":""},{"name":"Aluminum Ribs","era":"Roaring 20s","basestructure":50,"basecost":3,"mass":2,"structure":8,"cost":3,"geodesic":true,"warning":""},{"name":"Titanium","era":"Last Hurrah","basestructure":0,"basecost":0,"mass":1,"structure":10,"cost":8,"geodesic":false,"warning":""},{"name":"Living Grove","era":"Pioneer","basestructure":30,"basecost":8,"mass":2,"structure":4,"cost":0,"geodesic":true,"warning":"Living Grove Warning"}],"skin":[{"name":"Naked","era":"Pioneer","dragfactor":1,"massfactor":0.6,"visibility":1,"flammable":false,"monocoque":false,"monocoque_structure":0,"toughness":0,"cost":0},{"name":"Cloth Canvas","era":"Pioneer","dragfactor":0.5,"massfactor":1,"flammable":false,"monocoque":false,"monocoque_structure":0,"toughness":0,"visibility":0,"cost":0},{"name":"Transparent Celluloid","era":"Pioneer","dragfactor":0.6,"massfactor":1,"visibility":1,"cost":1,"flammable":true,"monocoque":false,"monocoque_structure":0,"toughness":0},{"name":"Treated Paper","era":"Pioneer","dragfactor":0.5,"massfactor":0.75,"flammable":true,"monocoque":false,"monocoque_structure":0,"toughness":0,"visibility":0,"cost":0},{"name":"Tense Silk","era":"Pioneer","dragfactor":0.5,"massfactor":1,"toughness":1,"cost":1,"flammable":false,"monocoque":false,"monocoque_structure":0,"visibility":0},{"name":"Dragon Skin","era":"Himmilgard","dragfactor":0.5,"massfactor":1,"cost":4,"flammable":false,"monocoque":false,"monocoque_structure":0,"toughness":0,"visibility":0},{"name":"Molded Plywood","era":"Pioneer","dragfactor":0.4,"massfactor":1,"cost":0.5,"flammable":false,"monocoque":true,"monocoque_structure":3,"toughness":0,"visibility":0},{"name":"Clinker Build","era":"Pioneer","dragfactor":0.5,"massfactor":1,"cost":0,"flammable":false,"monocoque":true,"monocoque_structure":-3,"toughness":0,"visibility":0},{"name":"Glass Reinforced Plastic","era":"Last Hurrah","dragfactor":0.3,"massfactor":1,"cost":1,"flammable":false,"monocoque":true,"monocoque_structure":0,"toughness":0,"visibility":0},{"name":"Corrugated Duralumin","era":"WWI","dragfactor":0.5,"massfactor":1,"toughness":3,"cost":1,"flammable":false,"monocoque":true,"monocoque_structure":10,"visibility":0},{"name":"Steel Sheet","era":"Roaring 20s","dragfactor":0.35,"massfactor":1,"cost":1.5,"toughness":3,"flammable":false,"monocoque":true,"monocoque_structure":8,"visibility":0},{"name":"Aluminum Sheet","era":"Roaring 20s","dragfactor":0.35,"massfactor":0.75,"cost":2,"toughness":2,"flammable":false,"monocoque":true,"monocoque_structure":6,"visibility":0}],"tail":[{"name":"Tailless","era":"Pioneer","reqsections":0,"pitchstab":-4,"visibility":3},{"name":"Stubby","era":"Pioneer","reqsections":1,"pitchstab":-3,"visibility":0},{"name":"Standard","era":"Pioneer","reqsections":2,"pitchstab":0,"visibility":0},{"name":"Long","era":"Pioneer","reqsections":3,"pitchstab":3,"visibility":0}]},"wings":{"decks":[{"name":"Wing Deck Parasol","era":"Pioneer","pitchstab":3,"maxstrain":-10,"liftbleed":-2,"visibility":-1,"limited":false,"crashsafety":0},{"name":"Wing Deck Shoulder","era":"Pioneer","pitchstab":2,"liftbleed":-1,"visibility":-1,"limited":true,"crashsafety":0,"maxstrain":0},{"name":"Wing Deck Mid","era":"Pioneer","limited":true,"liftbleed":0,"visibility":0,"pitchstab":0,"crashsafety":0,"maxstrain":0},{"name":"Wing Deck Low","era":"Pioneer","pitchstab":-2,"crashsafety":-1,"liftbleed":-1,"limited":true,"visibility":0,"maxstrain":0},{"name":"Wing Deck Gear","era":"Pioneer","pitchstab":-3,"maxstrain":-10,"crashsafety":-1,"liftbleed":-2,"limited":false,"visibility":0}],"largest":[{"name":"Wing Deck Parasol","era":"Pioneer","latstab":1,"control":-1,"dragfactor":1},{"name":"Wing Deck Shoulder","era":"Pioneer","control":-1,"dragfactor":1,"latstab":0},{"name":"Wing Deck Mid","era":"Pioneer","dragfactor":0.9,"latstab":0,"control":0},{"name":"Wing Deck Low","era":"Pioneer","latstab":-1,"control":2,"dragfactor":1},{"name":"Wing Deck Gear","era":"Pioneer","latstab":-1,"control":3,"dragfactor":1}],"surface":[{"name":"Cloth Canvas","era":"Pioneer","flammable":false,"strainfactor":1,"dragfactor":1,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0,"cost":0},{"name":"Treated Paper","era":"Pioneer","flammable":true,"strainfactor":1,"dragfactor":1,"mass":-0.25,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0,"cost":0},{"name":"Tense Silk Layers","era":"Pioneer","flammable":false,"strainfactor":0.9,"dragfactor":1,"cost":0.2,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0},{"name":"Plywood","era":"Pioneer","flammable":false,"strainfactor":0.9,"dragfactor":1,"mass":0.2,"cost":0.1,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0},{"name":"Aluminum Sheet","era":"Roaring 20s","flammable":false,"strainfactor":1,"dragfactor":0.8,"cost":0.3,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0},{"name":"Corrugated Duralumin","era":"Pioneer","flammable":false,"strainfactor":0.6,"dragfactor":1,"mass":0.25,"cost":0.2,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0},{"name":"Thin Sheet Steel","era":"Roaring 20s","flammable":false,"strainfactor":0.6,"dragfactor":0.9,"mass":0.2,"cost":0.3,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0},{"name":"Grand Eagle Feather","era":"Himmilgard","flammable":false,"strainfactor":1,"dragfactor":1,"control":0.2,"cost":0.6,"metal":false,"transparent":false,"charge":0,"toughness":0,"mass":0},{"name":"Solar Fiber","era":"Himmilgard","flammable":false,"strainfactor":1,"dragfactor":1,"charge":0.2,"cost":0.4,"metal":false,"transparent":false,"toughness":0,"control":0,"mass":0},{"name":"Dragon Skin","era":"Himmilgard","flammable":false,"strainfactor":0.4,"dragfactor":1,"cost":0.8,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0},{"name":"Transparent Celluloid","era":"Pioneer","flammable":true,"strainfactor":1,"dragfactor":1,"toughness":-0.1,"cost":0.1,"metal":false,"transparent":true,"charge":0,"control":0,"mass":0}],"stagger":[{"name":"Monoplane","era":"Pioneer","inline":false,"wing_count":1,"hstab":true,"pitchstab":0,"liftbleed":0},{"name":"Tandem","era":"Pioneer","inline":true,"wing_count":20,"hstab":false,"pitchstab":4,"liftbleed":0},{"name":"Extreme Positive","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":2,"liftbleed":-2},{"name":"Positive","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":1,"liftbleed":-1},{"name":"Unstaggered","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":0,"liftbleed":0},{"name":"Negative","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":-1,"liftbleed":-1},{"name":"Extreme Negative","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":-2,"liftbleed":-2}]},"stabilizers":{"hstab":[{"name":"Tailplane","era":"Pioneer","dragfactor":1,"is_canard":false,"increment":1,"is_vtail":false,"is_tail":true,"warning":"","liftbleed":0,"latstab":0,"pitchstab":0,"cost":0},{"name":"The Wings","era":"Pioneer","dragfactor":0,"is_canard":false,"increment":0,"is_vtail":false,"is_tail":false,"warning":"","liftbleed":0,"latstab":0,"pitchstab":0,"cost":0},{"name":"Canards","era":"Pioneer","pitchstab":-3,"dragfactor":0.5,"is_canard":true,"increment":1,"is_vtail":false,"is_tail":true,"warning":"","liftbleed":0,"latstab":0,"cost":0},{"name":"Outboard","era":"Pioneer","latstab":1,"dragfactor":1,"is_canard":false,"increment":2,"is_vtail":false,"is_tail":false,"warning":"","liftbleed":0,"pitchstab":0,"cost":0},{"name":"V-Tail","era":"Coming Storm","latstab":2,"pitchstab":2,"cost":5,"dragfactor":0.8,"is_canard":false,"increment":1,"is_vtail":true,"is_tail":true,"warning":"","liftbleed":0},{"name":"T-Tail","era":"WWII","liftbleed":-2,"dragfactor":0.5,"is_canard":false,"increment":1,"is_vtail":false,"is_tail":true,"warning":"T-Tail Warning","latstab":0,"pitchstab":0,"cost":0}],"vstab":[{"name":"Tailfin","era":"Pioneer","dragfactor":1,"increment":1,"is_vtail":false,"is_tail":true,"control":0},{"name":"Outboard","era":"Pioneer","dragfactor":1,"control":1,"increment":2,"is_vtail":false,"is_tail":false},{"name":"V-Tail","era":"Coming Storm","dragfactor":0,"increment":0,"is_vtail":true,"is_tail":true,"control":0}]},"controls":{"ailerons":[{"name":"Flap Ailerons","era":"Pioneer","warping":false,"warning":"","cost":0,"control":0,"drag":0,"crashsafety":0},{"name":"Wing Warping","era":"Pioneer","drag":-1,"warping":true,"warning":"Wing Warping Warning 2","cost":0,"control":0,"crashsafety":0},{"name":"Spoilerons","era":"WWII","cost":2,"warping":false,"warning":"Spoilerons Warning","control":0,"drag":0,"crashsafety":0},{"name":"None","era":"Pioneer","warping":false,"control":-15,"crashsafety":-1,"cost":-2,"warning":"","drag":0}],"rudders":[{"name":"Flap Rudder","era":"Pioneer","latstab":0,"control":0},{"name":"Flying Rudder","era":"Pioneer","latstab":-1,"control":3}],"elevators":[{"name":"Flap Elevator","era":"Pioneer","pitchstab":0,"control":0},{"name":"Flying Elevator","era":"Pioneer","pitchstab":-1,"control":2}],"flaps":[{"name":"None","era":"Pioneer","costfactor":0,"control":0,"warning":"","liftbleed":0,"crashsafety":0},{"name":"Basic Flaps","era":"WWI","liftbleed":-3,"control":-3,"costfactor":0.333333333333,"warning":"","crashsafety":0},{"name":"Advanced Flaps","era":"Coming Storm","liftbleed":-5,"costfactor":0.666666666666,"control":0,"warning":"","crashsafety":0},{"name":"Control Flaps","era":"WWII","liftbleed":-5,"control":3,"costfactor":1,"warning":"","crashsafety":0},{"name":"Lift Dumpers","era":"Last Hurrah","crashsafety":2,"costfactor":1,"warning":"Lift Dumpers Warning","control":0,"liftbleed":0}],"slats":[{"name":"None","era":"Pioneer","control":0,"drag":0,"liftbleed":0,"cost":0},{"name":"Fixed Slots","era":"Roaring 20s","drag":5,"liftbleed":-3,"cost":1,"control":0},{"name":"Automatic Slats","era":"WWII","liftbleed":-1,"control":3,"cost":4,"drag":0}],"drag_inducers":[{"name":"Air Brake","era":"WWII","mass":1,"cost":3,"warning":"Air Brake Warning"},{"name":"Dive Brake","era":"Pioneer","mass":2,"cost":4,"warning":"Dive Brake Warning"},{"name":"Drogue Chute","era":"Last Hurrah","cost":3,"warning":"Drogue Chute Warning","mass":0}]},"reinforcement":{"external_wood":[{"name":"Parallel Struts","era":"Pioneer","drag":2,"mass":1,"structure":5,"maxstrain":5,"tension":30,"cost":1,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"N-Strut","era":"Pioneer","drag":2,"mass":1,"structure":6,"maxstrain":8,"tension":20,"cost":1,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"V-Strut","era":"Pioneer","drag":1,"mass":1,"structure":-5,"maxstrain":5,"tension":30,"cost":1,"config":true,"first":true,"small_sqp":true,"ornith":false},{"name":"I-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":20,"tension":15,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false,"structure":0},{"name":"W-Strut","era":"WWI","drag":3,"mass":1,"maxstrain":35,"tension":0,"cost":2,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Single Strut","era":"Pioneer","drag":1,"mass":1,"maxstrain":10,"tension":0,"cost":1,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Star Strut","era":"WWI","drag":8,"mass":2,"structure":10,"maxstrain":30,"tension":0,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Wing Truss","era":"Pioneer","drag":4,"tension":40,"cost":1,"config":false,"first":true,"small_sqp":true,"ornith":true,"structure":0,"mass":0,"maxstrain":0},{"name":"Wire Root","era":"Pioneer","tension":10,"config":true,"first":false,"small_sqp":true,"ornith":true,"structure":0,"mass":0,"drag":0,"cost":0,"maxstrain":0}],"external_steel":[{"name":"Steel Parallel Struts","era":"Pioneer","drag":2,"mass":1,"structure":10,"maxstrain":10,"tension":15,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Steel N-Strut","era":"Pioneer","drag":2,"mass":1,"structure":12,"maxstrain":13,"tension":10,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Steel V-Strut","era":"Pioneer","drag":1,"mass":1,"structure":0,"maxstrain":10,"tension":15,"cost":2,"config":true,"first":true,"small_sqp":true,"ornith":false},{"name":"Steel I-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":25,"tension":7,"cost":4,"config":true,"first":true,"small_sqp":false,"ornith":false,"structure":0},{"name":"Steel W-Strut","era":"WWI","drag":3,"mass":1,"maxstrain":40,"tension":0,"cost":4,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Steel Single Strut","era":"Pioneer","drag":1,"mass":1,"maxstrain":15,"tension":0,"cost":2,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Steel Star Strut","era":"WWI","drag":6,"mass":2,"structure":20,"maxstrain":35,"tension":0,"cost":4,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Steel Wing Truss","era":"Pioneer","drag":4,"maxstrain":5,"tension":20,"cost":2,"config":false,"first":true,"small_sqp":true,"ornith":true,"structure":0,"mass":0},{"name":"Steel Wire Root","era":"Pioneer","tension":10,"config":true,"first":false,"small_sqp":true,"ornith":true,"structure":0,"mass":0,"drag":0,"cost":0,"maxstrain":0}],"cabane":[{"name":"None","era":"Pioneer","tension":0,"structure":0,"config":false,"drag":0,"mass":0,"cost":0,"maxstrain":0},{"name":"Parallel Struts","era":"Pioneer","drag":0,"mass":1,"structure":5,"maxstrain":5,"tension":15,"cost":1,"config":true},{"name":"Steel Parallel Struts","era":"Pioneer","drag":0,"mass":1,"structure":10,"maxstrain":10,"tension":7,"cost":2,"config":true},{"name":"N-Strut","era":"Pioneer","drag":0,"mass":1,"structure":6,"maxstrain":8,"tension":10,"cost":1,"config":true},{"name":"Steel N-Strut","era":"Pioneer","drag":0,"mass":1,"structure":12,"maxstrain":13,"tension":5,"cost":2,"config":true},{"name":"V-Strut","era":"Pioneer","drag":0,"mass":1,"structure":-5,"maxstrain":5,"tension":15,"cost":1,"config":true},{"name":"Steel V-Strut","era":"Pioneer","drag":0,"mass":1,"structure":0,"maxstrain":10,"tension":7,"cost":2,"config":true},{"name":"I-Strut","era":"WWI","drag":0,"mass":1,"maxstrain":20,"tension":7,"cost":2,"config":true,"structure":0},{"name":"Steel I-Strut","era":"WWI","drag":0,"mass":1,"maxstrain":25,"tension":3,"cost":4,"config":true,"structure":0},{"name":"W-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":35,"tension":0,"cost":2,"config":true,"structure":0},{"name":"Steel W-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":40,"tension":0,"cost":4,"config":true,"structure":0},{"name":"Single Strut","era":"Pioneer","drag":0,"mass":1,"maxstrain":10,"tension":0,"cost":1,"config":true,"structure":0},{"name":"Steel Single Strut","era":"Pioneer","drag":0,"mass":1,"maxstrain":15,"tension":0,"cost":2,"config":true,"structure":0},{"name":"Star Strut","era":"WWI","drag":6,"mass":2,"structure":10,"maxstrain":30,"tension":0,"cost":2,"config":true},{"name":"Steel Star Strut","era":"WWI","drag":4,"mass":2,"structure":20,"maxstrain":35,"tension":0,"cost":4,"config":true}],"cantilever":[{"name":"Birch","era":"WWI","mass":1,"maxstrain":10,"toughness":2,"cost":1,"limited":true,"liftbleed":0},{"name":"Duralumin","era":"WWI","mass":1,"maxstrain":15,"toughness":3,"cost":2,"limited":true,"liftbleed":0},{"name":"Steel","era":"WWI","mass":1,"maxstrain":20,"toughness":5,"cost":3,"limited":true,"liftbleed":0},{"name":"Aluminium","era":"Roaring 20s","mass":1,"maxstrain":25,"toughness":3,"cost":4,"limited":true,"liftbleed":0},{"name":"Whalebone","era":"Himmilgard","mass":1,"liftbleed":-3,"maxstrain":5,"cost":8,"limited":true,"toughness":0}]},"fuel":{"tanks":[{"name":"Internal Fuselage Tank","era":"Pioneer","mass":1,"wetmass":5,"fuel":125,"reqsections":0.5,"internal":true,"cantilever":false,"control":0,"drag":0},{"name":"External Wing Tank","era":"Pioneer","mass":1,"wetmass":5,"fuel":125,"drag":3,"control":-1,"internal":false,"cantilever":false,"reqsections":0},{"name":"Internal Wing Tank","era":"Pioneer","mass":1,"wetmass":5,"fuel":125,"control":-1,"internal":true,"cantilever":true,"reqsections":0,"drag":0},{"name":"Microtank","era":"Pioneer","mass":1,"wetmass":0,"fuel":25,"internal":true,"cantilever":false,"reqsections":0,"control":0,"drag":0}]},"cargo":{"spaces":[{"name":"None","era":"Pioneer","reqsections":0,"mass":0,"warning":""},{"name":"Tiny","era":"Pioneer","mass":1,"warning":"Cargo Tiny","reqsections":0},{"name":"Small","era":"Pioneer","reqsections":1,"warning":"Cargo Small","mass":0},{"name":"Medium","era":"Pioneer","reqsections":3,"warning":"Cargo Medium","mass":0},{"name":"Large","era":"Pioneer","reqsections":5,"warning":"Cargo Large","mass":0},{"name":"Huge","era":"Pioneer","reqsections":10,"warning":"Cargo Huge","mass":0}]},"landing_gear":{"gear":[{"name":"Landing Gear","era":"Pioneer","DpLMP":1,"SpLMP":0,"can_retract":true,"mass":0,"warning":""},{"name":"Floats","era":"Pioneer","DpLMP":1.5,"SpLMP":0,"can_retract":true,"mass":0,"warning":""},{"name":"Hybrid Floats","era":"Pioneer","DpLMP":2,"SpLMP":0,"can_retract":true,"mass":0,"warning":""},{"name":"Boat Hull","era":"Pioneer","mass":5,"DpLMP":1,"SpLMP":1,"can_retract":false,"warning":""},{"name":"Landing Skid","era":"Pioneer","DpLMP":0,"SpLMP":0,"can_retract":false,"warning":"Landing Skid Warning","mass":0}],"extras":[{"name":"Zeppelin Hook","era":"Pioneer","mass":1,"MpLMP":0,"warning":"Zeppelin Hook Warning","drag":0,"crashsafety":0},{"name":"Carrier Hook","era":"Pioneer","MpLMP":0.5,"warning":"Carrier Hook Warning","mass":0,"drag":0,"crashsafety":0},{"name":"Underwing Skid","era":"Pioneer","MpLMP":0,"drag":3,"crashsafety":2,"mass":0,"warning":""}]},"accessories":{"electrical":[{"name":"Windmill","era":"Pioneer","drag":1,"cost":1,"cp10s":1,"storage":0,"mass":0},{"name":"Battery","era":"Pioneer","mass":1,"cost":2,"cp10s":0,"storage":5,"drag":0},{"name":"Battery (High Quality)","era":"Roaring 20s","mass":0,"cost":4,"cp10s":0,"storage":5,"drag":0}],"radios":[{"name":"Loud Yelling","era":"Pioneer","mass":0,"drag":0,"charge":0,"cost":0},{"name":"Intercom System","era":"Pioneer","charge":1e-9,"cost":1,"mass":0,"drag":0},{"name":"Radio Receiver","era":"Pioneer","mass":2,"drag":2,"charge":1e-9,"cost":3},{"name":"Radio Transmitter","era":"WWI","mass":3,"drag":3,"charge":-1,"cost":3},{"name":"Radio Transceiver","era":"WWI","mass":5,"drag":3,"charge":-1,"cost":3},{"name":"Whalebone Radio Receiver","era":"Himmilgard","charge":1e-9,"cost":5,"mass":0,"drag":0},{"name":"Whalebone Radio Base Station","era":"Himmilgard","mass":6,"drag":1,"charge":-1,"cost":12},{"name":"Radio Receiver (High Quality)","era":"Roaring 20s","mass":1,"drag":2,"charge":1e-9,"cost":6},{"name":"Radio Transmitter (High Quality)","era":"Roaring 20s","mass":2,"drag":3,"charge":-1,"cost":6},{"name":"Radio Transceiver (High Quality)","era":"Roaring 20s","mass":4,"drag":3,"charge":-1,"cost":6},{"name":"Whalebone Radio Base Station (High Quality)","era":"Himmilgard","mass":5,"drag":1,"charge":-1,"cost":24}],"recon":[{"name":"Guncam","era":"Pioneer","cost":1,"warning":"Guncam Warning","reqsections":0,"mass":0,"drag":0},{"name":"Small Reconnaissance Camera","era":"Pioneer","mass":1,"drag":1,"cost":2,"warning":"Small Reconnaissance Camera Warning","reqsections":0},{"name":"Medium Reconnaissance Camera","era":"Pioneer","mass":2,"drag":2,"cost":2,"warning":"Medium Reconnaissance Camera Warning","reqsections":0},{"name":"Large Reconnaissance Camera","era":"Pioneer","mass":3,"drag":3,"cost":2,"warning":"Large Reconnaissance Camera Warning","reqsections":0},{"name":"Internal Small Reconnaissance Camera","era":"Pioneer","mass":1,"cost":4,"warning":"Small Reconnaissance Camera Warning","reqsections":0,"drag":0},{"name":"Internal Medium Reconnaissance Camera","era":"Pioneer","mass":2,"cost":2,"reqsections":1,"warning":"Medium Reconnaissance Camera Warning","drag":0},{"name":"Internal Large Reconnaissance Camera","era":"Pioneer","mass":3,"cost":2,"reqsections":1,"warning":"Large Reconnaissance Camera Warning","drag":0}],"visibility":[{"name":"Wing Cutouts","era":"Pioneer","visibility":1,"liftbleed":1,"charge":0,"structure":0,"cost":0},{"name":"Hull Cutouts","era":"Pioneer","visibility":1,"structure":-5,"charge":0,"liftbleed":0,"cost":0},{"name":"Searchlight","era":"Pioneer","charge":1e-9,"cost":1,"liftbleed":0,"structure":0,"visibility":0}],"climate":[{"name":"Electric Heating","era":"Pioneer","charge":-1,"cost":1,"req_radiator":false},{"name":"Radiator Loop","era":"Pioneer","cost":1,"req_radiator":true,"charge":0},{"name":"Air Conditioning","era":"Pioneer","charge":-2,"cost":4,"req_radiator":false}],"autopilots":[{"name":"None","era":"Pioneer","mass":0,"warning":"","charge":0,"cost":0},{"name":"Gyroscopic","era":"WWI","cost":3,"warning":"Gyroscopic Warning","mass":0,"charge":0},{"name":"Altitude Holding","era":"Coming Storm","mass":1,"cost":5,"warning":"Altitude Holding Warning","charge":0},{"name":"Clockwork Programmable","era":"Himmilgard","mass":1,"cost":6,"warning":"Clockwork Programmable Warning","charge":0},{"name":"Programmable","era":"WWII","mass":1,"charge":-2,"cost":6,"warning":"Programmable Warning"},{"name":"Rattenhirn","era":"Himmilgard","mass":3,"charge":-3,"cost":25,"warning":"Rattenhirn Warning"}],"control":[{"name":"None","era":"Pioneer","max_mass_stress":1000,"max_total_stress":1000,"mass":0,"cost":0},{"name":"Control Rods","era":"WWI","mass":1,"cost":2,"max_mass_stress":1,"max_total_stress":1000},{"name":"Hydraulic-Assisted","era":"WWII","mass":3,"cost":5,"max_mass_stress":0,"max_total_stress":1000},{"name":"Fly by Wire","era":"Last Hurrah","mass":3,"cost":10,"max_mass_stress":0,"max_total_stress":0}]},"rotor":{"blade_count":[{"name":"Two","sizing":1.05,"flightstress":1,"rotor_bleed":0,"cost":0},{"name":"Three","sizing":1,"cost":2,"rotor_bleed":1,"flightstress":0},{"name":"Four","sizing":0.95,"cost":4,"rotor_bleed":2,"flightstress":0},{"name":"Five","sizing":0.9,"cost":6,"rotor_bleed":3,"flightstress":0}],"arrangement":[{"name":"Single Rotor","count":1,"powerfactor":1,"blades":0,"reliability":0,"latstab":0,"pitchstab":0,"cost":0},{"name":"Coaxial","count":2,"cost":2,"reliability":-1,"powerfactor":1,"blades":0,"latstab":0,"pitchstab":0},{"name":"Synchropter","count":2,"cost":-2,"powerfactor":0.95,"blades":0,"reliability":0,"latstab":0,"pitchstab":0},{"name":"Tandem","count":2,"pitchstab":4,"powerfactor":1,"blades":0,"reliability":0,"latstab":0,"cost":0},{"name":"Transverse","count":2,"latstab":4,"powerfactor":1,"blades":0,"reliability":0,"pitchstab":0,"cost":0},{"name":"Tandem Transverse","count":3,"pitchstab":4,"latstab":4,"powerfactor":1,"blades":0,"reliability":0,"cost":0}]}}');var ke=a.t(Oe,2);window.addEventListener("DOMContentLoaded",(()=>{const t=new URLSearchParams(location.search);var e=t.get("json"),s=t.get("lang"),i=t.get("test");s?l.SetCurrentLanguage(s):window.localStorage.language&&l.SetCurrentLanguage(window.localStorage.language),i&&function(){var t=JSON.parse(String.raw`{ "names": ["Theler Kobra MD", "Kreuzer Spinne M3", "Ritter Model F \"Singvogel\"", "Markgraf Zerstörer B", "Theler Drachen", "Living Grove (Farman)", "Rathenau 7k", "Braun VJ", "KW-S1", "KW-S4", "Ritter Model D \"SeePfau\"", "Teicher Möwe 13S-J", "Ritter \"Ersatz S\"", "Kreuzer Spinne V8", "Hugo's Ganzmetall Wunderflugzeug!", "L&L Kessel IIb", "Ajeet Interceptor", "Shamsher Interceptor", "Bahadur Escort", "Cheetal Fighter", "Markgraf Attentäter C", "Königskondor L.1", "Von Morgen Vampyr", "Hugo's Einzigartiger Stahl-Jagdbomber!", "Theler Kobra MB", "Kreuzer Skorpion", "KW Adler N", "Markgraf Volksfestung A", "Arntwerke c.7", "Mitscher IG J-79SF", "Recht Luftschlepper", "Ritter Model Cj \"Spatz\"", "Theler Zweihander", "Mitscher IG J-83 Geistliche", "Arntwerke d.13", "Rathenau-9c", "Gernsback 0012", "Gegenbeispeil", "Universität Kobra M01", "Teicher Schnelles Mammut", "Rathenau-16d", "Braun DC \"Puma\"", "Ritter Model S \"Fink\"", "Theler Eklipse", "Mitscher IG JA-81", "Arntwerke c.10", "SAM 99", "SAM 1144", "Teicher Mammut", "Mammut Smuggler Custom", "Markgraf Totengräber A", "Kreuzer Spinnmilbe", "KW Dickhäuter", "Mushshak Trainer", "Sonnenjäger Hummel", "Ritter Model ABh Eule", "Albrecht Kugel", "Flugzeugwerft-Neustadt Korsar", "Kreuzer Zecke", "Markgraf Streiter", "Mitscher IG B-78", "Müller Experimental 3", "SFW Flitzer", "SFW-Rathenau Nimbus", "Teicher Fuchs", "Weiss Wrackbarsch", "Braun GA 'Gulaschkanone'", "Ritter Model X \"Falke\"", "von Morgen Walküre", "Hugo's Metallisches Jagdflugzeug!", "Sonnenjäger Seitenwinder", "Tejas Interceptor", "Sonnenjäger Haifisch", "Albrecht Pfeil", "Teicher Sperber 8N-A", "Markgraf Todesbote C", "von Morgen Pferd", "von Morgen Oger", "Dryad of Hanriot", "Thorstad S1M2b \"Schreckensgans\"", "Straßenkämpfer", "Marut Raider", "DFB Blitzgewitter", "KZ-2 Mangusten", "Rebuilt LM \"Viper\"", "Libelle T.87", "Mauss Z-95 Phönix"], "acft": ["AAEAjATAdALMDwAVAFgUwDaoE4AIDSA9gEZYCGOAsgCLACAdDAYMC68M2yyPZ5-QOgAhbABdk5AGJgYANhk4AO0Ww4wADgAMyAA7AAGMAC4vBmwAwwAMCsAkCd42A-wF-gAJGABkez98sBwlhiktJyisq46lq6lgDqsQCSwEKi4jhSsvJKKlE6fACCusAAAgApAF4Ah0wA-ADOAMwNNQBmba1tJiB8wHZ+vDxWnABArNbWgxNjpsCjUyzzs2zMoywAcL2+AOCbnNYLPf5++yx9rIP29Gf9bACgvvT73Rc3e2wAEK-T9juvJ0NfViORznJaWeiMF4MWiDQarXirSEzaEo4HIw6Ar5AA", "AAEAjATAdALMCIBpATgUwK4C9XIAQGUAHASwDtTVcBZAZmAEAHhmAwZ91j9kL3pgDABKACwD2pAIbVRAF1HIARhPS4AWpFxgwABmGFgAFGABcYAGBmjJhzYAIdgHA+fAP8vgAaGAAEZ3-+WwEJiktJyispqGlq6+mYA6vEAkkEi4lJUsvJKKuoQmjp67ABADACC+sAAAgAF7ACQDAD8ADIAMwCzTQABzD1+PBxWbv4WfKXMFlbs04FD1jPzY8D2Tn5sbFzTAKDAu1xTixMcPMtzC7PsZ428l7w3Aby7x+PMPHePHGf2n1d+a58zmdfs5GGZGCw7ox6NNpi8tiDEcwgA", "AAEAjATAdALMBYAlAlgF1QUwE4AICyA9gCYYA2OAYjgEQDKyAdgOYBuBTZ1wAgD8PwDB+-XsCHDhIURJm8AKLQDGACywZkAI2w4AQlACSADRxgAzAAZlAB2ABkYAFxQIlxIDgwAFDCAEDP-+ALDAAAgB4RGywAoqapraekYmFtbAAMAA6hn60Uqq6lq4icZmljb8AEA8AIIAgQCZAFkAAvVNwACQPAD8AM6mpt0AAfzdADEAMwCzASBRwAD-C5FVAavpkRHSEtu8695+EQd8wmmn8ycRZ8Jd25v8Xff+AKCRvKJzdxLrVxKHT-wzl9gB4AWlpNcAW90rwBF93u9Lj8LlCoUA", "AAEAjATAdALMAoBZAhgJwNYHNXIGYAIAtAU1QGcAXAN9VPwCFgBAYAIGA4DAOeuXfQ-AcG7DRAkMOEsA+AHUA9gBsllYgEsAduhy4K+OckzEAFslX4AwvggBOAAwmADsAA4wALjMB7XgFhgAGAeAGgpYQBIHi8AVHD4hI5ZRRU1LR08fUNjMwtrO0cXQLk5AElgeWVVCg1tXSyjU3MyKxsHZwEmAEFcXoABAEqATIAsthEAfiHRiYAAjgmAGIAZgFmpSV52KMTxJO8hDl9QRNOjs+PvY4BkYAAYbykAJHvhTaDOnkOpYJ4oy8S2zOwgAoAkWL5JN8hAAIU6-Dhw4EcBHCADgyMCQlRyKk7CxIm+BxYJK+4V83CYJNJhyYAH+6eNPo9ccigA", "AAEAjATAdALMBwAVAFgUwDaoE4AIAiWAhgMZoB2wAgMAEDD0Bg9zjLzIbLTn3bHnbagGQAsqgCW2HAHVxZACbIArgpwB2AAzIADsACowALgDqXYAGBmlgWwDgze-ZvOXVYKIlTZC5as06LaWkASXcxSVxvRRV5dS1dFkoAAQBJgEyALKSAAOZqEAB+NMyCgDKAM3KCgBkAGYBZgX484CcXXnpqLrZrC1cbOn7Bzrd6HAROUxMWqan6XuAASH7mYeWVtgBQFznmlmGVhYAIDatnNv6FhdOdm7ugA", "AAEAjATAdALMCoAZAlgN2QOwOYAIDiATgPaoCmOAFAGICGBAtjRgJTBsCAbwAYF373zYhBI4JwBIAIVIEALgAsaOKmBgA2NTjAB2AAzyADsAAYwALijOfADDAAwFwCQokQAgA-wD-gARGABkFyDgjmApGQUlFXVNHX0jOwB1RIBJMOk5RWVVDS09Q0F2AEEjYAABABSALwBDsR4AfgAzFubWgACg4T5OVy4HENDOKy4AIH7gAHBBab5ZsamZwVGR3nHOAFhgACgXTltdwQHQQq5hoOPgZz5xwevBwQBQYJGT14ejvj6Ptkulj8ufx+Ik4IE43He9XYI3Y7ncwFulmByKAA", "AAEAjATAdALMDQAlAhgFwBYFMB2yCuABAOwDWwAgBcNQGDX20P0hOtUAoAygMboBOmAJYAjTHwIAhKAEkAGgTABmAAzoADsADIwALihqlKgwDgwAFD0AEGxvUAsMAAItly8pdeAkWMkz5S1Q0AYAB1EOlgD34hUXEpOQUVdXoAIAoAQQBAgEyALIABbLzgAEgKAH4AZ0VFcoAA6nKAGIAZgFm2FgZDAH+elzS2QeAg1xthge6jYAAkBDGpgypKQ3pR+jKF6c2t+gBQNxHqFlXdhnXqazOL1lMtm5uz1koUyhpTpfJVylGPxaetkA", "AAEAjATAdALMAQAhATgQwK4DsAEA1AUsAIDABAxwAYMDbVXbSAzSdc2w08wyQLAoYcAVQAy2AJwAGABYAHYAHRgAXG4k68YAGBaO7t3IBIYACh95iy2D80WbKIkz5WgOouAktYF2HUubRIiAEEAGAAZgFmAAQBIgEyALLJQAH44xJSAMoAzbJSAAPMuAJoAf9KEdUtGWgBQaobmKrpmnUDgAHhTRqsacj1uAeBjRqqRnpp682amcgmGIc0JtooaJgBwHqGh+f1m3csgA", "AAEAjATAdALMCgBpA6gWgMpmAQB3gYMEccISUSOVXgBQBiA9gNZMCmATgAR0CuAdgHMAlgC8hAEwAWHAM4AXVgBtF-AZwAqATwAOnCDADsnMADYADJO3AAmMAC41XCQBQwAMDEA0NSoBwAP-+wAAIwADIPpFRRLj0zGxcvIKiEtLs8koqgho6eobG5pbuyMgAksBxLBzcqilSsgrKqjm6+kamFlYk2ACC4gAzALMAAgCZowBZBAD8AJqT0wAyQ9PjU1SU3cC+xGTReLhOTh5EAEDEThfE5zHklzdEhA8R3nfEAJDAABAbxJtXtyiJyIny2+1BwAe+3gUUuoDw+yoJ2B30RJBR5B2aJRGLRjncuHwcNu2Eu2ECkMixLxiKAA", "AAEAjATAdALMCgBpA6gWgMpwIDAEDBwDBgTThiySQDL8LL6zrKWcBkdAQQFkACRAK4AnAJYBTIbwAaU3hAAM8gBYAHYABxgAXBpl8ZABDAAwKSMsWASAD-14ABRgABAuu3ldlz6DRE6bIVlNWNkZABJYA4efmFxSRk5RVUPTgBmdIABAEqATIAsvFAAfgAYgBmAWaKAAJIat2ZSfEtSRt1yDxocPVbSbr7Osn79dpJhsmIcUzZgAChRtsHRi1NSFvdXdY2WeA6GqmXtklXVknMj47cAcAuTMlPb1ymifoGsHA-bQ4HHx6A", "AAEAjATAdALMAYAlAlgF1QUwE4AICyA9gCYYA2OAIjgEQDKGGACgGYCGArtcAIA-D8AwfsMEjhIMZL4AUWgGMAFlgzIARthwAhKAEkAGjjABmAAwKADsADIwALih+vPiIDgwAFDCAEFN-8AsMAACH6hobyyispqGtr6hqYWwADAAOqpOsCRSirquHEGxmaW-ABAPACCAIEAmQBZAAI19cAAkDwA-ADORkYdAAH8HQAxADMAs1ISIk4A-7Oh5VJLKWG+TmIbfMnCbj5+e5Ibh2I7ZZvCW1Jn-O1HYXdrYgCg4cBuDldPzjfA+9+rXwfJ7JDa-AFSXig4ACL68bgbRF+L4QsJAA", "AAEAjATAdALMBIAVApgSwMYAtkCcAEAsgG8DuyeYAzAMoC0AUsAIDABAwHAYBz17zyH69OLftyGCh-FvABCuAC6YAhngBiYGADYtFAOwAGTAAdgADGABcKaJ4AYYAGAeASClCAEAH+Af8ACIwADI7qFhHDLyOEqqGtq6YIYmTgDqKQCSCFEx6po6+kamvEwAgkUAAgApAF4Ah8zAnAD8AGZtre0AAaGSPCwe4TYNthzsHIIjDcXS-OyTk2MRbDwA8MAAUGFrm-zO4zNLh7u8boNCp+GTAKDH7oKLQjtDTrwDZzx7UgDg7y8fv5cnCwREIWExbLYHgcAb8gA", "AAEAjATAdALMCIAlAlgF1QUwE4AIBEAolgM4CGqAXjgMp7ACADwzAYM+6x+yF70wNAB1KAHkoAZhwRxABgAWAB2ABUYAFxgAUGaNgAYC4BIYADh2AeD58A-9eAB0YABwrrtzuBDREqbMX7BQQBJT2ExSWl5JWYAIAYAQQBxhQASgAEAMoAzLOBjegB+HKyCgBkAGYBZgoBMmoAsvh4OA2Bbdys45maOrl0mfo5Bxi7PYAAINwAoCaZ2Vv0+9kG+Bby53uZjTY5tV0ZdHlGdlo5Jk7WuAHAdvX7L-d52jy6WA6GBpnbjpZOToA", "AAEAjATAdALMCIBpATgUwK4C9XIAQGUAHASwDtTVcA1ADmAEAHhmAwZ91j9kL3pgdABCyAIakAJgBdcidMmI5cADSoBJXGBoAGABaFgAHGABcPgCAuACGABgdtb5cA4AH+XwAEjAACI7--mRiFRCWlZeUUVdU1dfRsAdXjVYGCxKRk5BTwojW09LnoAQQBmUoABAEqATIAs4AsQAH4AAOYWttbHHg4LJwC+RkZeC2Y7IfZxwIKmDknGO2ZrPr82NmnmAFBgLa4xifreHgX9qdPdjgBIAYCr-t4tkccRnkm78-s39mPeZbvv78+1xsjBYryY9HG8yYj1mgLhQA", "AAEAjATAdALMCEAJArgcwPYHIDOACA4gIYB2AXgLYCmALoQDZ24DqyxAJpQE4BmdaplNPGABAUcAkAwCTKmyZIeUvEAkAEJdqAC0K4AYmDAA2I7kgAGLQAdgADGABcZWNkAIYAGAZAUGVKA4AD-gcAAMMAA0H7RMRJi6po6+oYmZhCWNh5MTACSwAmc2roGxqYW1vIiAIIAaNzcAAIACTJikgD8ADEAMwCz7QABEoPRirJi-rHO0QBAMl4urZXyc4txK7IAkOK+9gCwSnN+iyfKXjLbU0qXV7K+smPKimu3sucS7hLvMd-yk7ffX6vJRiDxtF7iESndbHYFwoA", "AAEAjATAdALMBwAZAZIgBAaQKYGcdYBs0BJYgI2AEBgAgYegMHucZeZDZac+7Y87Z0AKAGUAxgAsA9gQBeaRAFdJONAA00YMAAYJAB2ABMYAFwB1FgFBg11gM4B-h8ADQwAAj2v3+tVGSZeSUVdU0dfWAAYAB1aOJgf2k5BWUJVQ0tXQNfKgBBXIBMgCyAAQBsgGYKm1oAfkQAGYBZ2oAzdtqAGOaBfmYLJ2BeNgtmRMCUkIzwg2MzTlH6a1shn2ZBt0817f6E8SSg1PSwrKjY+PHk4LTQzIicynzi8qqamnrmto7upt6R+kGwxYi2B7B2u1BdDWNFG1ChwAA6MAAIjeADwwAAMJxImDQfQONQQfRccwAJBRcH0ClUpbeIkE5jwqxrUn0AAQtLZnAA4ODudzaYJgJyhgzdotKINiXDWJRJVRFdRpQsckKdkA", "AAEAjATAdALMCIBBAVgU1QFwAQEkB2GqATgMaoAOGA9kcAID3BMBgTbL7bInPjAGACUAFlTwBDLAFkq1IgCMxAVywAtSFjBgADEPLAAKMAC4wAMBMGjdqwAQbAOC9eAf+fAA0MAAIT334vAgiLiUjI0CspqEBraumYA6vE4gcKiEtKyEarqmjp6TABA9Ij5AAIABWwAkPQA-AAyADMAs7UAAUztvtzslq5+5ryDZmyWo5xjRQG9bFNMjmMAcMAAUDxj6+MD7DX+W8C7e5wAoH4b3BtHnKZjdldMwzyOV4+vfv2bDDfAzJeMdGNAbMJvdQUwgA", "AAEAjATAdALMAoBlAFgQwLYGdkFMBOABAJIB2ALvgMY4AOZA9nsAIAvDsBg73nP3IfQWwAYAJWT0SqAgFl6DPACNUAVwIAtSATBgADMhoJgAXGABgdqzY8uACG4BwIUID-L4AGhgABGd--lsBiElKy8ozKapoQ2noG5gDqCURB4pLScgqRGlo6+obsAEAsAIIFAAIABdwAkCwA-AAyADMAs-UAAeydfgI8Vm7+FkLD5txW43wTxYH93DPsThMAcMD2U34TrNsjPHUBk6z7B3wAoP4ToNYnXHxmE+sn7KOCTk8vH09CrIWsHJeBZhAtiDaYbL4Q4BAA", "AAEAjATAdALMBwAhAhgC2QEwK4CcAEAogM4DGA9jgC7ACAtwDAYAy06yyO18AEDAAoAZRKocAUwCWAIzH4A4lACSADTxgwABlQAHAcAC4vBnXqsAoMAAQLAODduAf4C-wANDAACPe8-jA4aKSMvJKqupaugDAAOrRiv4i4tKyeAoqapo6LHw0AIIAvtoAJQACANkAzBXAAJC0APwAMgAzALNNbfUAAd6crCYODsB2vgxCiUEpaWGZuvwGRqYmLBbWDCOjzm6eo7v9CYHJIenhWTFxB0nBqaEZEdm0BcXlVbUNLe0f3b3sA0Mbez4fmBplBy2GoIAqG92ED2Jw+HC-ODgJFWHU9ujMeYIaM+g9sajlmtMWj7ADfGSGFTCVw6CA6IwUfQaMsaINFtxmbTvEA", "AAEAjATAdALMDwBhAFgU1QFwIYBsAEAYgJYDmyGqATsAIDABAwTAYE2y+2yJ+6z35249OdANAB1KAHkoAZjwRZABmQAHYAFRgAXGABQJnWABgTgEhgAODbxhwgP-3gAdGAAcO56+HgE6XIVlNRNxcQBJX0kZeUUVdSZGGgBBAHHVABKAAQAygDNc4AsaAH583OKAGQAZgFnigEz6gCzhITZTYEcTbx5GJgMfdiM2YcGRtj7vemGAcFo2AExgAFgeofGx9g6mIrXhizXOAbs6I25tw85jYYAIS6YLzjnD6-b7r0S6ZlGfGlPaLqTSbzYDfP60f6jGiAiaDH7vbxAA", "AAEAjATAdALMCoBZAhgJwNYHNXIGYAIBBAF2IFMA7YgE-NXwGFgBAFtgMGC++E565Ct+-VgGQAyoUT4A0gFdUASzL0AGqvwQADFoAWAB2AAcYAFw2PAED8AEMADA3O8OEBIAP-vgAFGAAEF0CgkWAJKVkFZTUNbT1DewB1BIBJUMlpeSUVfHVNHQMRQgBmEoABAEqATIAs4GsQAH4AGIAZgFmGgACuLqCQfmtXQKFeEJGeRy5J4JdrGbqeVjngABhgAChhEbXN-mmAUBCucZdp4CHl+a4hq-5DoPH+k9vuM+cXs-4AcA+LT9vPNxWI57Kx2M9WMwRiNLlYwcdFiwoWxAbDuJYwRCkSNUQ8XviuEA", "AAEAjATAdALMAIBpAbwOwJYHMDOBrA9qgCb4BOABADJRjACA9wTAYE0w8M3R2yD2wMYBEAMqUA6uRFYAbulJFyYABwAGABYAHYOWC1+wAMCCA4MDNMA0IJsCGAJGAA0W67eCGoiVNnzFKjW1DcXEASWAvSWlMOQUlNS1eegBBVSYAAQABpLoAfgAApgKigDKAMzLgACBqpIFjYAB-xpseBgNamuNjHh62PqYa9g82IZZapgAYYAAId2m5wQHGMaSGtjb3IwEASC3XPdatgFBBVcGmEAn913XZm-q3CxuBw02Hmy6GLiOq9-p2hwah1Bt8OoD2k0WiDhh84cAgA", "AAEAjATAdALMCIA1A9gOwAQFlkCcDmAphogIYC2ADgJ47ACA9wTAYE2y+2yA55wwOgAhAjgAuACxLoAYmBgA2eegA7AIxHowADgAM4isAAYwALi9G7ADDAAwGwCQ53vYD-AX+AAkYAGQn-gKYBYTFJGTlFFXUcTV19WwB1BIBJYCERCSlZBSU1DW09A3Y6AEEigAEAFIAvAEPGZgB+AGcAZlbGgDNuru7zED5gR0DWYsYeNgAgNjsJoMH2abmLKbHppgAoIYCt4fZZtgZ19gG7MfmAs6Y9wM495YCAUFAdpgGH2-32AAhPr6cAOB-Wz-YH+Bg2BjMB4MOgTCbHXgfMEBIA", "AAEAjATAdALMBkAJArgcwPYHIDOACAogJYB2AXoagIYBOALhQKbW4DKtlAFgDYC0AUpVQATAEboAtiKYBCYAEBgAIGAqAYCpULg6jRpC6DOzWoMr9pgwoDoAISa0OlXADEwMAGzvcAHanMwABwADBwADsAAGMAAuBZaGgAwwADAGgCQFqZpAP8Av8AASMAAyJll5ca29o4ubp4+friBIeHJAOptAJLAVXQ1rh5evkxNwWGWAILhwAACACmkAIfy2gD82ADMG6sAZnu7exbmGgoZcRrq8QrXBqkqAKAruvHGz5YnSk8fusrpK49RJK-FR3c6vL66UHAM4VLKwiyPXTHUz6F5fRHlKEACHhkPOAHBcSk8UTyspkgpVGiVnIrhpgbcTLS3i85NlshDXtTSRUgA", "AAEAjATAdALMDwAVAFgUwDaoE4AIDSA9gEZYCGOAsgELACAdDAYMC68M2yyJzwwEhVsAF2TkAYmBgA2KTjAB2AAzIADsAAYwALi96bADDAAwKwCQvHgAgA-wD-gARGABkC2-ct6A4aJwTpsgrKakYA6qEAksDeWCLikjJySqqctACCasAAAgApAF4Ah0wA-ABm5WUVAAFu3Gz0lh66rABAnG0sJiZ6xgydfcBt3azDLB0szOMAsMDmbgDQwI2cJlyprD0Wqyzmmx70c02cAKDu9Kvce0ds20vXI24A4Pe3t-fNy4z0m98M9NbWAY8K7vDxAA", "AAEAjATAdALMAIBpATgUwK4C9XIAQGUBrAe2QAcBLYgO2AEB7gmAwJtl9tkTnxgDABKACxoBDXAFliAF1IAjUelwAtSLjBgADELLAAKMAC4wAMBMGjdqwAQbAOC9eAf6fAA0Akdfv54IJHU4lKyyApKqhDqWjqmAOqxAJJ+wmKSMvKKKmoa2rpMAED0AIJ5AAIABWwAkPQA-AAyADMAs7UAAUztXtzsFi7eZryDppZsFmOcDOO+E+MeNbzjDIWcPZMTM5zDwAs+PLt77ACgI14AUEzc04db7LY3TNucDjfbTw88DCYMzNeMdEs2CtFh9QUA", "AAEAjATAdALMBQBpA6gAgIIBMA2BTATqgHLACAZFAYMDbcNXTSOY4+QCgDK6AsqogFd8ASwKoAGgElJqMAFYADAAsADsACYwALisKdABDAAwLUO7GDYAHhr5u-ZodufQSLFSZ85WqPJkk4C5efiFRQg9ZRVU2dABmeIABAEykgCzgACBQAH4AAJo8goAYgBmAWd0QNnpzFhq6ckbGExoWh1Y6hq6smgBoYENOun7Buja2x1oh1gmASD12innFxgBQeybQBZXmgx3WuwBwHaM6ibsAf4u7cizT+mnGprrpmh7KTcnn4Cvt6v39kA", "AAEAjATAdALMDoBZAhgJwNYHNXIGYAIA1AewBt0BnXAUwoBcBXAO03wEFgBAYAUGH4Bg-LsKHDhIcVIHcRgqf0kL5-WcDFSlwgFCjhajeK0KNB5ceXAAQMABEAdTKl61AJZN0OXHSLVUdNwATV0w-fAAJfABmADYABgALAAdgfGAAXGUbcQBYUGEAVEspAAgAf7LgABJgAEJihobuBycXd088H0I-ANdg0NQI6Pjk4ABge3sASTtHUmdejy8unqCQsMjYxJTxTjYAAv4AAQAB4RsBAH4ATQBMgCzLqOfLgDLcXHMpGxK9ZUNZq1Fh1vL5-GsBkMtqM0pkFNlhHktEVGsBypUavVUdj9ID5m0lp0wb1+hthttxpMZi18cDlsSIWToTt9Adjmd+Bcbg8ni93p8FBYfiIAX9ziI1BLvsJ4Di5fKFcVJXJcbspMqNeqtWqdbixorxmqEQAtYAAPAal2AKPE+sU0v4dpVtvEAEh1Ni1O7FXwlXJJKLhBancoQ795frNQBwOUhkMG4T67IyLicNNS-QVZ2c6zydO4yWcLPKw3J1UZ1TFwXjEsJ5RAA", "AAEAjATAdALMCwBBATgOwC4HcCmyDW2ABAMZQDswAgFTQGDAOPD1MMisc0AIAsgPYATAdgGEAWpEJgwABgAWAB2AAUYGGABgBtWAAgVvQAQjAFCdOAf4vAA0MC7nHT6gEREAG3QBLdAFdhhAAqcsh86Oju2GrBXgDOhNioAOZeqERyAIbx6HJEAOoAogAKhL4KScgZARnohB7efsLxMgC0AJxQ3PxCIuKS0vJKGnl5AJL23cKiEhBSsoqM+pSISsAAAgAFjACQVAD8ADIAMwCzewABDBeM1DqgrPrAVk6PHOwMWk7mry9Mt4wOXZ3GjmO5gkGMT4MXZfG47WGcACgziY7GBCNYUOAxgxH0cAHBcVisbjONQNNRaOiaJRwdpHNTSV8gA", "AAEAjATAdALMBIBZAlgFwM4GMAWBTATgAQCSA4oQFIC0A7AJwDKAYsAIBvCcBgnv3fvEAOEcAKAxz5cyAEYFCpKMQAahMGAAM2AA7BRwALjAAQJ3Yc+AUGAAIXgHARIgP8Bf4AGhgABCd--ZnoS2FKy8ooqapo6wADAAOrxxEGS0nJEEarqWrqcpqwAggC+2gAlAAIA2QDM1cAAkGwA-AAyADMAs62dTQABfkJ85s7OcQHCpnnjJtPG5hyTng3+Xo0CsYIC89siG7yN89PLR1b+7OaDFie8e5x217fCjkePj+OsIyLn7FyHgazbT5-IbXUFAA", "AAEAjATAdALMDIAlApgYwBYBcAEAZArgGaYDOGANsgA5XIBOwAgMAEDDsBg73nP3IfHl0HC+AwX2YAKAHIBDTAEsA9gDs5lEtgCyyzMroAjAD91l2AIJHkizPWwANAGoBJF9jAB2AAzoqwABxgAFwmPjYeAAhgAGBuaIk+AEgAf5TgAERgBMTcvOl5JTUNZC1dfSNTcytDGzs6R1d3L19-GIB1dpdgWQUVdU0dPQMTM0trW3tnNw8fP0kLAG4AZmWAAQBKgEyALNZQAH4AGIAZgFmDgAD2K9zxMLYk7ji87mZ38OfXxJfvvhjmDwIsAABjAABweTBkP+-G4bF+vx+PCeSL+Tz+fAAoPkwqA3hIAFDfJE5TFongAcExsR4FJpkmA1OAHHejHZYUB7EYaTxPEBXIZmKAA", "AAEAjATAdALMDoAlAlgF1QUwE4AICyA9gCYYA2OAwgFY4BEAygA4CGqAXrcAIDe8BgwQUOADhgkDzFieADEQALAgDtm+AqgJYARswCuOAFqQcYMAAZ5jYABRgAXGABgQZMlCBACCEBwKX+AA-wHAANDAAAj+UdEuwHKKKmoa2nqGxqYWVo4A6tkAknEKyqqEyTr6RhAm5pZCAEDcAIJWwAACAAVCAJDcAPwAMgAzALO9AAGC41Eg0oJB0Q1+i04x-ssLwjzLPV5RO7xCzoJHQm5u-ifAPeerV7dSAKDRPJIzN-eHwrsfl2K+9443L8PlIeICRO8XmdTlF3iCYkA", "AAEAjATAdALMCIAVAFgUwDaoE4AIBaA7qgJbICGAdgCbbACA9wAwMAGDAedtecg-+MASACFsAF3I4AYmBgA2OTjAB2AAzIADsAAYwALgCGXADDNOASAH8AEAH+AfwmABkK2-ccGI8ZJnzFKupaTADqIQCSwN5YEmTSsgpKapo8dACCWsAAAgApAF4Ah4ysAPwAZhXllQABbnxcDNacLIzuRgL1Zp6pPRwtrZzt3X1c7ABAZgBQ3D0s0+w8-UOMDBPu-cCWHgJb2zwAoIuGoAN7vCOcTWcXAgDg1xsb18djDKzLKwxftranvc-XIA", "AAEAjATAdALMDYBZAlgFwM4GMAWBTATgAQCSA4oQFIC0AHAMyGm7LqoA2yOuwAgMAEDAhAMCFiR4sSEnjR4vnMnS+MsXwDwAIXwBDAK4A7QgFUAMgGlCYMAAZsAB2AB0YAFxVKsQAhgAYCmqgXwA0MAAMIGRUUIa2vpGZpbWdo6+AOppxMBauoYmFla2Dmq8AIJhADMAswACAJEAmQBZAqAA-A3NHV0AAWKCntLyQgD-I9GB-kJDE9GCE-MxrUIAsMChkWsb4lN+kp6ek+IAkMuzQqfn4gCgUXwqylequ8A+Ty+SAOBXLx9P+8thPdeHwBvIxrwzpDof9zkA", "AAEAjATAdALMBwBBATgOwC4HcCmyDW2ABACZRgDMwAgMAMDAMBgDLTrLI7rzXP7nXNr0EDBLGgHQASgAsA9qgCGhALJz0c5ACNFAV0IAtMGEIAOAAwyADsABIwALjAAQAxrV+wABAcxXAP-+3sAAUH7h4ZKyCspqGtp6hsZmlja0AOrpAJLA0vJKquqaOvpGJhbWLK5UiFAAZnUAAgAJLACQ1AD8AAEMPX29YqJuDIHeVO6sroL0QhHz89MR1SNLAAih4Rth7LOg7EsrNJMMe8AdZwsdC+wAoJF0DJxLXD4RZ283j2IA4F9nlwi7jGUxcTGOIwh4jGJ1W4I87ihbhhXGmsK+CyAA", "AAEAjATAdALMDQAlAhgFwBYFMB2yCuAtAJwDGwAgBcNQGDX20P0hOtUAYi6A9rgAQBZbqm4AnAEb4+ALUh8wYAAzoADsAAowALjAAwNUpUGdABD0A4GzYB-6wmAAEK85cHgnHvyEiJU2RHklVT0AdRCASXcuXmRBYTFJPBk5BWU1agAgCgBBdIABAAL6AEgKAH4AGQAZgFmygADqBucWBkNbFyy2Lr1XKx7OtuAegChgM2cAUHHWfWo5+kMjZYYF4FKhvo2+pmnnSkMWJb7W1YYJnfnnS0u1tb72uyGMyhpjt3JPqg73zcv-6hAA", "AAEAjATAdALMBwBxApgJwHYGcBGBDAxgNYAEADKZMAIDXADAwAYMC6026yFTR2zQCgoMOAiQCyAewAuE1GXIBWYMWABcWmwZsAEOxYAoXkYCgAf9PAAqMH5G79jgKFY8RYpJlzypJXQDqfgCSNs4ibh6y8j6sxtQAggACLAkAAzHAAEAA-AABLLn5eXYgHAyxLBl2zDwatSw1WnVNDaw19Y6sjeyNurptOsB9mqy9dTXlmbQ0lQ5dAJAO9gt2MyaLbCWr60ZduhXbjVvAAOBNdl1d2-Y02jSM-VM1VOa1-Q9X20A", "AAEAjATAdALMCwBxApgc2QOwEbIJYGcAHPAG2AEAKqAwYO+4WhukZtqgFAGUBBAWQAEAaQCuAJ1zIxAgBoBJOQLABWAAwALQsACYwALjtKDABDAAwPVPtmTYAHh71p87qVu-YeMnT5ilRq0zAHUguWB3QVEJKVkFJTVNZnIeAGY0gAEATMyALOAAIFAAfgAAulLygBiAGYBZ9lYGSlsLKgZbV3ojekK6VraupMHOkboAKAL6AGhgK2sZufpG8x6B7tG+hgBIIZdgHfW94ABQZ0pe1kOjhn7Z6-pb5gBwe4sjR+cAf8-DKifmq6UchAijfAZsK73PZAA", "AAEAjATAdALMCoBVAdgSwG4FMBOBnVALgCcEAEA0gPYBG2AhqQLIAMYwAgB1wGDB--BeAviE7DhnAEgAhHAQAWDAGJgYANjWkwAdmbyADsAAYwALjiuAgDDAAwPwCQF8QAgA-wD-gARGABkZ0CgvilZbAVlVQ0tXQM7AHV4gElgGTlFUhV1TR09QwF2AEF8gAEAFIAvAEOeAH4AM0aGpoAAwJAJYBdgizE7YQAgfnt7PtHhy2Ah8b4ZqYFeDr5up0CAcGBVgSWuzaCNrf4dzhPOoPtHeZ6QvevhAFAg09BJu+EL5bfZ9beP-q++G43PxTrZONw+iCOH0+kNnJCAT0gA", "AAEAjATAdALMAYAVApgSwMYAtkCcAEAylgHbIA2ZyAzngLICGAtowK4AuwAgMAMC-AAwYMO7ChwiaEnAAUBPFd504SGVKR66arWTVAFAAKLMlWQArZGzwGAagFowAVjwAKAOpuAkgEpgAE2AAXAkAIEVlbj4NHWkAf4Af4AB4YDsY9PTuQ2NTCytbB2d3L18eD09gbJNzS2t7J1dy31FFJIB+AADhTrVY2MEMiSrc2oKG4p9-INDw6UiJFoyE5NTBtckso2q8usLGkt5yyq2R-Pqiptnudq7gHuU+gbXhmrO9id8A4OEwxYX+aKDZYpNLrdabHKvXbjS5lLzHSE7MYXA4ta73e5xfoKDIvJHnfaTL4zP4aKKzJaJEFg8EI7ajAkfQ7wvEM96XNHJDG3LFPMFhYQAGBpIsBYopEr+UoBIvJigFwAAMsAAHjpMDAACoynJ2n+wnJpJlwAAkHzMhIzaKAKAWiR6uSAvTABVqOUACFlLu9GgA4GC5XKwY8NGEogJuJHIxTOI9OYpw1wo4pFrH+vGBUbRTogA", "AAEAjATAdALMAwAlAhgFwBYFMB2yCuAtGAGwAmwAgJcDQGA0N2MMjNvUAoAygMboBOmAJYAjTPwAEAISgBJABoSwAZgAM6AA7AAyMAC4oGlWqMA4MABQDABDs7NALDAACPbduq3PoNHjpcxRV1LQBgAHUw2WAvAWExSRkFJTVNBgAgSgBBAECATIAsgAFcguAASEoAfgBnZWVKgACaSoAYgBmAWfZWRmMAf763DPZh4BD3O1Gh3rGbcrd6W2ZjQ3pmDJWqKZpWbc2GFcZxhgrGbbtTieYAUA9gYdZDq+ZjmiXn2btzZ9fP9gHlvYMiEqLQntQKPsaOc3qDwVRIQjgADwQcPuiaEA", "AAEAjATAdALMDwAhATgQwK4DsAEARAwtgEQAK6AtqkcAIC3AMBgDLTrLI7X9AhAHKoALgEsA9plQAbAKYBnbAFlRg0cgBGAH+SjsAJQC0YABwA2AAzYw5gBYAHYAAxgYYACAGdN+wAQwADAsAHDc3AD-ocAACI4hsXF0AIgAgpIigugAJtLYACrW2oKCMs55wvLSmADmwpjZ1qjygtbZAOoAoiTY6LaVaFnYQtgpaZly2Gb6AJxQvAIi4lJjSirqWjoGxuaWNvYAwC0tAJLA-EJiEjLyy6qa2nqGphZWZnYsu7RJACkAMwCzAAIAAZYAGhaAB+ABkADNoeCAAEMBEsOieUDsdzAcJcNGYuLvd5owlvegMdzvVgUlh44DMPHBABQcQA4MAAJBcKlUjwouLAbkc1hokJ0QV8rgAUHi-IYnBp4s5rF8CpJIVZKu53PFnmxQv5dEYwp5NDRptiRpVKqAA", "AAEAjATAdALMCoAlAlgF1QUwE4AICyA9gCYYA2OAyjgEQBiyAdgNbXACA7wXAYF1x8F58+ITsPEcA0AHUoAeSgBmHBEUAGABYAHBMAC4wAKD8uAYHEBIYADg+AeHGO+Af+fAA6MAA4T334nAMvJKKurawKbS0gCSgbIKyqqaOlwAQOwAggDjWgAlAAIAZQBmxcBWbAD8pcWVADIAMwCzlQCZrQBZTqLC5sCu-ukCwulm-n7DwpMco8AAsOVijgAwi5N9EQEm-huLs+N8VgeOxhNiovvil067ABDHvX4A4A+bfLuvThymHNyTJmwOEC+Nc+P9PgcgA", "AAEAjATAdALMBwAVAFgUwDaoE4AICiA1ugJYAOAzqsAIDADAwjAYI6826yB2y97x1zYAoVvx7dQEjgCBgAJABC2AC7IAhjgBiEAAx6cEAKw7kpYACxgAXAm02AFEmN4UjgGgA-x+ABMa64CA2kUVdS1dfSMTMzoAdViASXklLFUNbT0dA2NTDmoAQQAagBmAWYABADz7AG8aYCYAfgAZMsaAAMYO10FWWjdRKTFk0PSIrKjcyxtuO1ZHXpdA4E9vPxnlzcZglLTwzOzo+nikkNSwjMicszYCkorqutom1tLu4HeJXu2V+uHBtiyWhzeog+qMAAwW2hPx+c2BfXBoMR8KRtFkywx7CxAFpgAAMAJ4wkcBiMb5owJkxgASGAAFAYcA6UyGUFgBiuBSHMtqcAABBMvkcADg0L5wtZrFkGKYCOo8tuXiRiNlNAVCuRfWVYI5sKlyyAA", "AAEAjATAdALMCIBZAlgFwM4GMAWBTATgAQCSA4oQFICCAtABxjACAwAQMBwGAc9e88h+vbkJH9BQ-iwBIiXMgKEA8jnSEIhMADYADNgAOwABjAAuJJa8AUMADAPADCShAcAD-AP+AAEYABRnQKCOGTkFIhVsNQ1tPUNbAHUE4mBZeUVI6M1dAykqABCAGYBZgAEABJ4WTgB+BKsAXhqAZlaagEz2gCzJCSrgFx57YJCh-nYOYZH+Kemhy2BuCeAAdGAAeCC1zZmBKX7RoVmASDs5nlPzngBQIJZLPoXrEdmACCuz50G52dmP8bYXHuvGBVTcbmYQhYE04TDh8MhTyY4Mhzie-2CQA", "AAEAjATAdALMBwBBATgOwC4HcCmyDW2ABAMZRgAMwAgNbQGDCNPAPOMhue0AYASgBYB7VAENCAWUHpByAEYiAroQBakQmAr8ADsAAowALjAAwIxq1mDABBMA4Fy4B-x8ADQwAAgPvPs8D5CohJSMvJKqhDqmjrGAOqxAJL+AsJiktJyiipqGuTaTABA1Ig6wAACAAVMAJDUAPwAMgAzALN1AAGMHd4czObOPkVcQya+DiODfRaewLXmfg7zNMvTjKY1Y0wrtZtsAKA+86Cru8zrjDanow72u+fXV4smNHRHflRLW95vj75AA", "AAEAjATAdALMBgBlAggWQAQE5PAIB4PmGJIVJJAPNPwGQUMBpAVwCcBLAU1fQA1f0EAAxCAFgAdgAHGABcKiQBA5ABDAAwCTXVqASAD-+4ABRgABB2Wr5Og3QsO3PgOFjJ6gOoeAksHpp7Ni4efkERCRtkAGYYgAEASoBMgCzgZRAAfgAYgBmAWYyAAOIiq0pSZV1LfHwiGgJ8UnLQa1bSTTbqDuJ8ZWIq7UsBroobEkarbuAqvs7+ufIAUGsa4koJ6mUNka0F4inyAHAFqYPqQ0MGnXx1Wu2GiYnZ6nu91qA", "AAEAjATAdALMAQBlAggWQARjDOBAYAQMPgGDDkXBmXkj43nU1OUg1s34DoKGAKgCcAhgDsAzgAcA9gIAuAUwHoAkugDMABg0ALCcAAYwALgNCNACigKAWFMMAkAH-HwAHjAA2He8-y3XuiCopIyCkqqmjp6AMAA6rHKwDxogcLi0nKKKupaupzIAA0AxQDrAAIACRREJAD8AMlqarUAAeSt3hzVwPZ29FScxEOU0RRsRJQT3ZM0RFPk82YU+FMAmMAAcD6GtjSj5ACgg36m-fvkvYs++L2+pkcLDPj0494AUHfnCHd73gDgP3IXy+3mc3hWwGipH6y2I-XhdgmZFwz2ewz8YKu9BhgNxQA", "AAEAjATAdALMBwAVApgSwMYAtkCcAEAsgIYC2JArgC7ACAwAwA8AGDBt1utveg-ABQ3LrSF82IMaPZS+EyTwl4AckUqoA9gDsiAG2QBnQusrqcAIwA-OdXgAiAWgDsANgAMeMAFZXmAA7AAXECRHgAgPgAIJjYAUHk+YQB4YABoePT0umVVDW09QwJjU0trOyc3D28-BgB1GoBJYGy1LV0DIxNzKxsHF3cvH38eGgABAGeAZgmRgAbucJAAfgAYgBmAWcWAAbZFgEwATIAsyTl5lhkM5ty2gqKu0t6KgeqgoI5znijGWIzObmSaT+wO4WRULTy7UKnRKPXK-Sq-nodUa11a+Q6xW6ZT6lUGfFGk2mczYCxWG22u0OJzEZ1JFzowkkHzRkLuMOxTwR+LeIU+3G+3DifySqRB4rBOXRUPusJxz0RtQaTXBNwx0Kxj3heOqw3GU1m5yWa02O2A+2Opz44VYNsy3FZt0xDzhuJe-l5H3pX2iwGFGVFQPFf0lEKdGpd8u51WRysd6tlnO17oJ+uJRvJpqpltp1oujCZ6QkdC9JeGfJEXuA4TYABhgw3pOXm6CCW3yz8G52RDXgAAZYAAPHSYGAAFQxJ26XzO1W2N2AJAXEPcJeN-3MhSXbgAFGr6W7UWD3dbAHBxd36HPG-ua8wyzQH8MAP-PivSO+0EtP0Gv9-7-8b3kIA", "AAEAjATAdALMBoBZAhgW1QVwC4AIDKmA5oQDYCmATjgMIYDOWA9qsAICjADAwAYMP+359+IjqP7cegwb3H8QcrrIEjh4hXMkiZa0RvUqFAYgByyLAEtGAO2Tk6ORIyYUARgB+KjHABEAtADsAGwADFikOGAAHCEAFgAOwAC4wGBs4gBA4gCQSkLpiqoA-wB-wABIwADQhbV1KqbmVrb2js6Mbp7e-sFhEdFxiZwA6sMAksCNljZ2ZA5OLh5evoGh4SSRMQnirAACAM8AzIe7AA0iWSAA-AAxADMAs1cAA-wAfHePSjL6-FlqujqU2as3m7U6yx6a36W0SKTSMj+OTyskRih4pQq1XqOLk7GBM1aCw6S26qz6GwG2xG40mZmmLTmbUWXRWvXWm0GOwOxzOF1At0eL3enwe3xEv2A-3SgJ2IgJjLBLMh5I5VLhqQK-NEuW4+TRcgxZUqNVxZvSCtBzJJrKhFM51NGE0tRPBpLZ0MpsO5RxO5yR13uT1ewA+X24P0ysmltRkLqZxIhZPZMK58K1SJ1KL4BvERqxpvNOPx9JBruVyc9DqGTrpTUJCbdttVqe2oj2vr5AcFwZF4a1kulWlxCnYiLH7YzE9EeuAAFgi4ul8varOi2v2Fl+CFgABUOppffiWeSmSzmRnrOy+q5JcAUDq0-018Ka7XAAhF2vtMAAODmt8LxXKUxCkVgx3YCN2yKIoQK3AMhHAtgkKg7QYLgmcVGA+ogA", "AAEAjATAdALMBoBZAhgJwNYHNXIGYAIAVAewBcBTAO2wBOAjc1fAQWAEBgAgYHgMB4F9BAkMMH8xE4aLHCOAfADqxADYqAzhQCWldDlyl8i5JnIALZBqL4AzADYADGYAOwADjAAou2HdBABFABADgfWQEASAB-qOAAEmAAVHCU1J4FZTVNch09PENjUwsrQltHF2AAYEVFAElgJVUNbV19ApNzS3VreydXQTZmXGGAAQBKgEyALK5gXgB+Cen5gACeeYAYgBmAWarZnhkBbgi02Q4OMT9gAFAz+6v7659rgGRgABgwsQAkT7FKgJAQMBJcUsCeKdnmkTg9hHcUhw-KJoXCeBDgAAINH7cIAcDhlTBGJxwkBRLmYNB7Au3ypgj8-DYF1pVLYMQOIOxlO+PlZwA59JBpIeQA", "AAEAjATAdALMBIBpATgUwK4C9XIAQGUAHASwDtSBbYgGwCNVgBAJ4VgMFdeeA885D6DOzAKj4AxgAs0xengAqAcSgBJABq4wAZgAMkwsAAowALjAAQFyt8OAKE4AIIc+AB-gL-AAsEZd--VmJSMnK4Sqoa2noGAMAA6nEqwEHSqLI4Ycrqmrr6nJaMAIIAvoQAJQACANlaWsAAkEwA-AAyADMAs62dTQAB+SzGAnzcrq7+MSyC3MCTM9bC01OLi5asANAN-puNgnOrQgLDK8vznJOcuwFCV9d8AKDAj372oMt3QhesTh+sX0IAcF+-xiZ1+S1BPDBzEYMxma2cYPBASAA", "AAEAjATAdALMCwBpA6gAgCIEsDGBrAFgCcCuALgKYBOwAgLcAwGAMN3DMssic8sBAwAKgBlAIIBZVImKVMVVAA0AkitRgAHAAZ8AB2ABMYGF7ABnAJDAAoC0tsTTFgCRgAeAcfPrIWMnTZ8sqqGtp6AMDIyEo+ElIycpSKKkpqWro8NKIAzDkAAgCZ+QBZpqAA-AABDJXVADEAMwCzwGH0AFCgPAIc7A7M9iKx-glJwWl6hsa8ZrbWs-Z9zm5eK7x0g37xgcmpoS2R0RtxAYlBKSHpnJk5WQXFpSA1wE9lDc2tdB3cnN0sPTz-Up0BbArpcVYrBYsUH0GYABGAABhPAjkTxWgwMdD+CZ7FjgJYZhDLBDODYPDDuESeAAIFb4umkloeADgpPxHyZDgENLojCh9Bo9hoAH+RfQTGE+QLgWw6GLSg4BVzPEA", "AAEAjATAdALMAIBZArgZwBYYIYGsAEAKgE5YCWAdgKZHACAwAQMMwGDPusfshccv1c2vHry70AWACUA9gCNkRPAAlqWNADNpRACbVqeMAA4ADOgAOwAGjAwwIQIDAXAFAJ2AGDqiuAf5-AAJGAACG8w8OYJGXlFFRINLV0ifSNTCwcAdQyASWApOQVlVQSdPUVU83YmWgBBAATmAAEABvYAUEYAfnUezoAA5n72J3oAClBI+idgPwjvJmYOueWuBYi1rwFgAFxAxg4t3i36Q65p5gBIFf3L644l70OeU5WRBy3Qu-PeAHBr7++dxm-hOjHo-COdFooNmawWAheQPCQA", "AAEAjATAdALMBIBlA9gO1QU1QKwCcHMMAnAAgAkBXAWyowBtgBAJlgMGA5eHc85F4GdmANBTosVZABdkpAKIBxMgGYSECAAYAFgAdgAdGABcQcADAAgPDAAkJwAQpwfAD-AX+DCETn744ixTFRJGXklVXVtPQBwAAUASzQMYk9AiWlZEkUVNU1dQQBBAAKOAAESjgAgUAB+AACOGoAzFvrOauYIUCFzb1NmXgGWIf4OCzHeoYsprmBq6c4Fqt52DuAAGGBHAWZmTe3ece7Bnt8j236-Oz9TAFBfZmiOUdmhm96Hd8OfJ5vmc6WPhcLh8u3MzFYb38TCG-1m8KhXy+QA", "AAEAjATAdALMCoAlAlgF1QUwE4AICyA9gCYYA2OAggEIAWOAogK6kbACA7wXAYF3z-z4hBIzgBQAygGMaWDMgBG2HABUoASQAaOMADYADDQAOwAMjAAuKC4dgAIEEAIYAFg+ASFFeuABGBjvQMCOSRk5RWU1LR0DY2AAYAB1RPV-aVl5JVwo7T1DEy4HNgoAQIBMgCyAATLK4E82AH4AZwBmVsaAAK5GgBiAGYBZ+04APGt+B2AAf+nAqZF4viWg0RXVwXXOBb8AKE5RAHhgfc3lwVsD7y2Gjf5PO-4AUGD6rmFLm28AcEX+Z0eCR+jy2W0BIg4U24HE+MM4HFmIy8n3BqyAA", "AAEAjATAdALMBwBBANgIwE4FMDGALALgAQDSArgOabLACAwAQMEwGBNsvtsifus9+duPTnQDIAWUwBLTOkIB1KQDsAJrlKrCAdgAMuAA7AAqMAC4wur2ABgNreGcA4G2fOH7j7WATpshcrUNFW09Q2t5eQBJb0kZOUVVdU1dAxEAAQBJgEyALLSAALY6EAB+LNySgDKAM2qSgBkAGYBZ4SEi4DdPEQ72extuiyGOy2AAFGAAGB5GB1HZ937gAEhBplHVtfYAUA9R0GEFwaWACC2mJactpcvznrZmOn2nrzoAf7eGd3277qA", "AAEAjATAdALMC4AxANgVwOYC8CmGDu2ATgGYAuAtAHK4DOpAhgCakAEA0gPaE32HACAwAEDBRAMFGTxUySBlSJ8xTLnyZggAgBRAJYA7Gl1YBZAEoswAVgAMACwAOwAFgI1gqQHBgASEkBoNXkAYAB-kOAAeGAAVEC4+NFNXQMjFjMLGwdgIIB1HIBJYG19Q0ITcys7R1EAUAEAQTwAHQBKAAEAAslffgB+AHEAOoAUXuJx3oAYgBmAWbVVSUEghOBlRIFhGRFRRdX4nYTDzcOAJGAAuIBEC+DZdSWEle6t-Ze3qTq4wXc5d0fRMdAs9RAAID6iEHyLxvKFQiHyERBQRif6Pfj-TGBHYSDFSH74sKbB7EhFvIA", "AAEAjATAdALMCwBpATgUwK4C9XIAQC1UBjAa1WAEBLgaAwGhuxhkZt6gJACEcAXACwCGuAGJgwANgm5IABn4AHYAAxgAXHZVGACGABgBgFB2bAOAB-88AAwwANAnHTmlW58ho8VJkR5SvQDqAQCSwG7IAsJiktJyiswUAIIAaABmqQACAAkMVLQA-AAxADMAs-kAATSVjqyMVKbOmtRaDABADAZNbB1NvS7A-QBQwACQTiPjzF36CbnUA4wzY4PdjFNrRk5UWqytm0s6B7MmjWvLy8dzenn7AxStj453V05AA", "AAEAjATAdALMCIBZAhgJwNYHNXIGYAIBlAF1QFMBLYs1YAQHuCYDAm2X22ROfGB0AEoALAPYA7ZPkQjiI1ACNkAV3wAtMGHwAOAAxCADsABIwALjAAQEwaN23ABBdevAP8vgjgFDOfv68EFRCSkZOUUVdU1dA2AAYAB1eIBJAOFxSWlZBWU1DW09QyYrOgBBKFxcAAEABLYASHoAfgAApha21ududhs3X1jnKyK-YZGh-3GGxx8pngGmebYbWxX2ReAG5ZGmBu3OAFBfBhtuznWR9em9uJ8AcGv18+ueBiHmZZtjnputzl-nkZAA", "AAEAjATAdALMAIBZAlgFwM4GMAWBTATgAQCSA4oQEIC0A7ABzACAwAQMOwGDveffPsgeQrkOAihg0UObwAosgB26APb5UhRIkJgYABmwAHYACxgAXCn9uAcGABIbgGgpogMAB-98ABwwACgugUHsMvJKquqa2nqGwK4A6vHECGEqahpaOvpG7ACgTACCANYAoQD4AAIABdwOjAD8pAB1fvUAZh31ADEAMwCzUpJ8cdyuwcPMVuxsAkzS8zxTrHOLQixWXDPAAJjAAPBBuwdCY7OrIRMnPA6n47V3ovmBk7NLVk9Bt8AAEA+jgbYHl8vn9LMsxEs5lNGJ4VudIaDgkA", "AAEAjATAdALMCoBZAPwG1QUwE4AICiAHgA7YCWAthgHYAuAhqjgMzACAbwnAYJ7937xADhHACgBlAMYALLBlIAjbDgDyUAGoBJTTgCsABmlFgo4AFwOl9nwDAwAKC87I4QH-XD4AAgXvv53YJGTlFZTUtHQMjYBsAdVjNEylZeSVccO09Q2NOACA2AEFeAAEAbKYWAHA2AH4AGQAZgFmagADONt8hPmt3fxd8vP7gQf9c6w4JgDhvYQm53nYlkWdOAEhhgN4Nzb5HX3nugVX5l1XZ3Zjfas3z88uDh8ugA", "AAEAjATAdALMDQBlAYgdQATIDYEsAuAXgKYBOwAgBcNQGDX20P0hOtUAoiAxgBYlE4ARqXQAZKADUAklPQAOAAw8ADsAAIwALjAAQNUpUGLABDM2bAP8Bf4KYCQ5x0-3BOvfkJHjpsxSuAAwKioUq7cfALCJGKSMvJKqtR65ACCAHwAZhkAAgDuAHXswADgFAD8AJkVAFllogAzALNlAAGOLAwGFhZOAeZ6SfQGQ-QDzmPAdGMOpo4zrH3UiyMuvQwOw870DlusAKBOlAYdTMu7Z7O7S46lV2dnV86bj1dAA", "AAEAjATAdALMDIBlAYgdQLQCUCGAXAFgKYB22ArgAQByAlgLYBGZAzsAIDvBcBgXfP-PiEEjOAFEQBjfACdCNBoRkUAMlABqASU0UAHAAZ8AB2AAEYAFxgAIC4dO-YQAgho0QH+Av8BcBINwGBdsAS0nIKSqoa2nqGJgDAqKiaIVKy8orKalo6BsZ8tmwAggB8AGZlAAIA7gB1YsAA4OwA-ACZbQBZLSoAMwCzLQABAcL89u7uwPFBIrZcM7NLHPPAAJjAAHBNbhvbzXyLoGwc9pyrbkfA-ldL-kuCAKCBp1zCZw+Cixwun9MBByWV1uf0EHHMwG4H2CHzYkwcomhoKCQA", "AAEAjATAdALMCwAVApgSwMYAtkCcAEAYgK5YDOwAgJcDQGA0N2MMhXPNUBIAsmrngHkyeCHjAA2AAyYADsAAYwALjtqjAFDAAwAwAwq9gHAA-wD-gABGAAUA3fs0uvVPyGZSIsVNnaA6r4BJYB4+fDcPUQlpOUYKAEEAEIAZgFmAAQAEhipaAH5fdQBeXIBmMtyATIqALNUQDmBDB1U2YAAgZg6aHWb2VtjGei7gfQBIezH2Hu0Gxwdp4HHe5iWHfuAAUGbNUDVs5e7GAAgDw4Mm5YWFu2NjOyoqLRz16go3hlu9vtOfoA", "AAEAjATAdALMCIB1ApgSwM7oASIE4EMBjAawCN9d1CALYAQHsYDBhW3gX3WQvfGAMAErUA9gDt8WALIiALiNzkArlgBakLGDAAGagAdgAFGABcYAGBWDRuxYAINgHA+fAP+vgAaGAAEF-4CrYCFRCWk5BWU1DS1dA3NERABJYOFxSRl5RXwVdQhNHX02ACB6AEEDYAABAAK2AEh6AH4AGQAZgFmmgADWHv8edmt3ANK+MYtAlwnR9kseBhYWayGONa4GRfW5xh4AUF5BydWggMsGmymLq64D-03uS5uuc9YHZ+O+ZxvzFdePvgMX4cFZsTYrFYzDYAj5AA", "AAEAjATAdALMAYAhATgQwK4DsAEBxAgtgOS7oA2qAzgMYAWA1qpgPaYCmRwAgMAEDACAYAJFDRIkONHCpM8ZKnieAFADKdZGwCWAIzbJsAeSgA1AJJnsAVgAMtAA7BlwALjcBPd6IDAwAKAivopSAP8h-sAAEMExsR5O6rSauvpGphbWdo7eAOo5Zgka2noGxuaWtg4i-Fz4IgACANkAzM3AAODcAPwAMgAzALNdAAECIzEKIp5hUVxz4kFeAvwCAXHriosbgaI8K8AA2MAA8LEAyMAAUFKTk-H3MVsAkMBbGy-bomvBPJ6Snp8FqJooDfL8JB1Pls3oCfrDAUA", "AAEAjATAdALMBoAlAlgF1QUwE4AICyA9gCYYA2OAGjgEQBiAhqQNYbXACAHw3AYN952B9+-EFxETOALABCWDGgBGAVwDOAYwAWOADLJFZUhhwByAMwQADJoAOJ4AHRgAXHH8AwBIDQwAFD9-CSDuAH+AT5dgABxg2LjJYFl5JTUtXX1DY3MrW3t3AHV8gElEuQVUFQ1tPQNSI1MLazt+TnYAQQA2gF4ARwABAFibABLgAEgOAH4AcoA6gBRJgBiAGYBZgD4ATK2ALOCxEU9gEJD41qCAIA94uMEEluBr7gBYcbcJABh3iWPgP4Ej3iAImz1uIgm4KCAFBzuIxGCoUEAQAIJE3WIAcHRAIB6OCnHcnB490e7Au90RD3x6KAA", "AAEAjATAdALMBIA3A9gOwAQFlkCcDmAphgOoCGANgNYA-OBwAgI8CwGAsducchPfdMAyAGUAgpnQBpAK44AlgRzoAGsvQQADBoAWAB2AAcYAFxmnAEDcAEMADAHG-34BIAP+vgAFGAAEJ-4CBYBFxKVkFJVV1LT07YmIASWCxCRl5RRU1TR19TgZRAGYigAEASoBMgCzgSxAAfgAYgBmAWbqAAJYOgJBuS2dArjyOPg5LFnsWUamglnGzEbHOdkngAHhgAGhAmwAoflG9-lXe4ZnA1eABwadrvsGAUECmfdAF-lOLzhtLdhvL7gAcBuHEuAJB03czFsTFY0xmDCYSKW-nhIPRwCAA", "AAEAjATAdALMCEAJArgcwPYHIDOACAsgKYAuAhgDbkCW2AxgBaF4BSpqAJgGbloBehaeMACAI4OIBg48aOBTp0kAuXTRAdABChAE7F6pXADEwMAGyncAHYBGO3GAAcABnoAHYAAxgAXBViFADDAAMDSAJB+KmEA-wC-wABIwADIkWnpMsCaOnoGxmYWNnaOLu7BAOrlAJJZWrr6RibmVrba9s5uysIAgu7AAAIAKbwAh2ISAPzYAMzTE5wL8wt+SgqiEX6ycv5iolvioQc7mWvKAEDHlxfhYgCgwADwwBHXR5FbH36H4hsZUX9+e4KVYrS77P7fYAACABCkhygA4LCQnC-uDlNFomJgqIJOi9p9xK8VOjkX8gA", "AAEAjATAdALMAYBlA9gO1QU1QKwCcHMMAnAAkQwEsAXLAdwtQBNjgBANjgMGB9+G748QgkRwBIAIWJUAFgEMSAMTAwAbKpJgA7AAYZABwTAAuKPZ8AMMADAvAJCiRACAD-AP+ABEYAGRH-gJ52SWl5JRV1TV0DGwB1WIBJYBCiWQVlNQ1tPUM+VgBBXIABABSALwBDrgB+ADN6uoaAAP9hPOAnQLNeWz4AIB6bDh5bcyGx9lHeMf5QXk6AcADhJcEBoWBVvl6OzZE24HXp44Cd4Ad+rvOrkQBQAMmNmeGbs86bkf8trrOzj+7rOxOM8OKwJrwjiIQf9AkA", "AAEAjATAdALMCIAVApgKwIYGcAEBJAdgC7IBOAxsgA6ED2JwAgI8wGDDsfBufsg--MAhADl0hAJY186ADbIcAWRq0SAIwA-JGtgBKAWjBgAnAAZshkwAtKwABjAwzJwCAebAJAcAUAN9MA0MAA8L6hYUzwAIIyEoQArgAmyNiIllqEhHIOqeI4yPgA5uL4yZZY2ISWyQDqAKIACthxlAUk6EnYYtjRsYny2CZ6RlBCohJSsv1KKhpaugbGZhbWwADA1dW4wCJiktJyisp0s9r6hqbmYFY27KuMkQB8AGZPAAIAAxyeDAD8ANQAUIA+D8AJmggBZPwAARwmExeDxXMAAP8o-gIta+Pi3OE8THsTHIpx49jE4AAcBJ8GAgXxJKY5MRGNJoTuXzCoU8-CZ-AAoJzQIiCYL+KtMQAIUWcdkCKnS8UcWVY0JogTwtZMFgi5gMDVEjhMnXS0VAA", "AAEAjATAdALMAoBlA9gO1QU1QKwCcHMMAnAAgAkBDASwDMqBnAYwAtgBAd4LgMC75-58QgkZwDoAIWIAXZhRIAxMDABsKkgB2ARsRJgAHAAZmAB2AAMYAFxRHfgBhgAYD4BIUSNcB-gL-AASMAAyB6hYVwckjJyispqmjqkBsZmTgDqaQCSwFFEsvJKqurausmmgmwAgmbAAAIAKQBeAIec3AD89ADMXe00-X39osL8HO7hIhxTggBAfC4uds6cXIt8c2urK8BzfLy7wADQwOOjfMen80IVfEseLm7bE1yXz1wAoGEcAOBcwndvFYPLgACEBWw8vzewOW4NCHCcHG4AM4bGmSwOkzh4KAA", "AAEAjATAdALMBwBBANgIwE4FMDGALALgAQAKAZpgJbLACAwAQLcAGDBvssfshceu-8uPXlzoB0AELoAhgDsAJkQDSAV3QVM6QgA0AagElCYABwAGXAAdgAHGABcEYw4AIYAGB2rkVwDgAf79gACRgAARvCMi2cSk5RUJVdU0dAyMzS3cAdUz9YEkZBWU1DS09QxNzKw4aRABmeoABAEqATIAshlAAfgAAtl7+vu9hdkYfKM5q0a4PNh4POjYF9mWlpmj3da3OReAAFGAAGAmpjcjZtgBIE95r3ZuAUGAniOEee5uOC+AvT+-fP5fT5RRhuOjMD5MGi7GHeJysaG0OjI6oBbZnSHAqJAA", "AAEAjATAdALMAoAVApgSwMYAtkCcAEAygA64BGueAHAHIC0AgsAIDPBsBgbXH3XIvA1vAJYcacvgBCUAJIANPGADMABkxFgAZGABcUGxatuAcGAAoLgAhBNtgFhgABFsuXLYaPEVp8xavXAAMAA6sEyCCKYYqgSeD4KymoabABAzPQAgQCZAFkAAlm5wACQzAD8AM5KSmUAAWxlADEAMwCzgvzchgD-3S5pggNBrjZD-V3AQwAwJQKGwACgwKa8gXy885uCa1ylIwJ7gvMCS64D-Mf7q9zWV2w7giv7gfMPdzYsL8Dsl6xMWyxAUd3iCgA", "AAEAjATAdALMAoBZAhgJwNYHNXIGYAIAVAewBMBTAZwCNiAXc-AYWAEBgAgN4AMGH4G9BAkMMF8xE4aLHD2AIgDqxADYrKDAJYA7dDlx18ANXKotpTZlP4AEvgDMANgAMACwAOwfMAC4sroIAsKACAKiyYgAQAP-RwAAkwACEEalp-ArKahrkOnp4hiZmuRZWqLYOLh7AAMCKigCSwEqq6lq6+oWm5pbWdk5unoKsAIIABfwAAgADAlw8APwAmgCZAFkL9lsLAGW4uLIyc8CR6bLs7GIBwACgZ-diNQ-CTwLs1-DAAHBpnz8vIjkb3OAle-AAkJxnuxIWlLsI7ql3vxREcxAAoJH8V7sU7PWqpADgzzBBPS8NksShNXYPApGTY8KZEQCfFYFwu3DeVPpXN5+PSQA", "AAEAjATAdALMAIA3A9gOwAQFlkCcDmAphgAoBmBOAJsAIDADgwAwMAGDAd0fse+h+8WrLlzYCOIcczYjePAZPFDeo+X0VT5qqRo4AoOSsPjdArcYVSBAIGAB0AEIUALgAsAhugBiEAAwAOX3QAHYAjCnQIAHZfVwAHYABMYABcKVs+AFhpDgB4KwEAaAB-gF-gAGxgACwCurq6RxcPbz9AkPCcSJj45gB1PoBJeyccN08fAKCwiOjYhL4aAEEAXIBMgCyAATXN2mAACAB+AACOI8TNo92NnRtgADQ5UT52USaxlsn2ma653uSaXEGV42RYeXqHBK5SqtUh8KMH3GrSmHVmPQSTAGwyRXza0063XmAmW622N32xzOwAuVwpJnuTzowk09044hewBBABR9osSQL+UKjML2aK+SLJWKpRLpXLZQqWJzlQJweyQahgAAqOqanWq3imEEgqxq4AASGAABgEbxLbbeABQBrqYAGKzEUCcvhmg4OnKWRgIs1m-0GjIsmhRui2F40YrFLkMiPR2gx2XxxMmjjOiP7USxxYJpNmeVhupAA", "AAEAjATAdArMDwA3A9gOwAQFlkCcDmAphgPKE7ACAlwNAYDTVcPQwyKxw1QEgBCBOAC4ALAIboAYmAAsANlnowAdgAMwgA7AAGMAC4naqwAwwAMAMAkAc4AIAP8A-4AERgAZGuevjYHwEjxKTkFZTVNUwB1CIBJX34hMUkZeUVVDQ4KAEFNYAABABSALwBD6loAfgAzaqqagADPdlYqGy4fJmZDag7Wcxom70GAIEHgEYZ6ceArVs8AaGAAKDHehj62ny916YYpwatRjgBQLyo+9h7D1YZZq+2OAHA7jvurzioAFCpaS+6qf5WPSBbxBQA", "AAEAjATAdArMAIARATgTwIYBMAEB7AZtgBLoB2yAlrgC7B0CAdwAYE2623SJz8IwCgBlAMYALXABsAXtgAyAVzEBnbAA1sYMAAZRAB2ABMYAFxejNgFBgVuh16cA-w+ABoBPY+eGwIWMkyFZTUNbT1gAGAAdUiASR8RcWk5RVEVdU0dfW96AEEcgEyALIABAGyAZnLrYAAgAH5ZABmAWbr8drqAGJbebjZzJy97GqZw4ABwTkm2aaZGWe8mVjGxgAgJ+zHWOzmI0H3OMboj3cWPE+AASD4hzmvbzht7ea4bh94L9fe9+wWvcPMP2+XkBwNuQA", "AAEAjATAdArMD4AVAFgewE4GcAuBDAJgAQDKYAshAEaEBExAxsugKb0DWzAdpgOa7c1gAQGAAgYBIBgEmVNkyQI+VKWzpykMuUiAKACF0-fNkIAFXNnQBLVCYhgADMgAOwAHjAAuFvGyA0MAAwDIACFrKAOAA-wB-wACowADY4alpEroGRibmljZ2ji5BAOrFAJLA+oacxmYW1raE9k6uskIAggAxEgACAC0AMwCzwsCSAPwAZABm0+MAzIvjAJnLAFlamrLiETK+GamqqhJboOnnEsEX8lcH+wAwwABQaY8vNzK34iIi++G3wAAkGJrjJgaCZABQNIiK6aP6gpQAgAQEKCqV212CSLRqWCAGQRJJjhJvj9hFEoqMfCpRkJycchJTqW1gAAkWks74yETMkms3HXIA", "AAEAjATAdArMBwBlALgJwIYH2CmA7A1gCcC2ADgGbarACAtwDAYAy06yyO1-QNADqUAPJQwAAjAwADAAtSwACjAAuKAZ1gAIHYBwYDxYAIbtwD-J4AHhgAJGN37avQOFiJMuQGA+fAJJOhIuJSsixaNACCABEAMwCzAAIAOXHAAJC0APwAAQzZuTnGnKxawGbAHsYV3CXl9KzqLA0MYexNmg3pWgCgwACwacY9+unsVbX1jQ5jAw7c6W2zPXZ0JZwLs6zTRhXTdrusuhvjDPtHXOp0jAt0NA00ZWM1jmcvwEA", "AAEAjATAdArMAwBZAhgJwK4BcAEAlZAlgCYCmqwAgMAEDB0BgdTDzTIrzjHXr7HrVACgBlAIKJsAaXSoCZbAA0AkkuxgYABgAWAB2ABMYAFx+VZgAhgAYCaX+rHgHhgz+2-eVgI8VJlzUiipqmrrWAOphSl5iEtKy8sqq6tp6zBSiAMxZAAIAmbkAWTSgAPwAAXTllQAxADMAs-x8TFQ8bm2eVGZMtHTsNt0DTEN0I55j3cAA4MV0AJDACwJMANCLHDZ03duzbpvzHmmeS4esAKDuk+yTHgBQG912p6NuM8-71s+HtCCtN507Lb2XqMChdLqeFoAf6hu16Zn+X0OQA", "AAEAjATAdArMCIARAYgIQASoDYEsAuAXgOYCmA7vniQE7ACAwAQMCwGAsduccj3df92-Xv27MAKAGUAxgAsA9lgLoAMgFc5AZ3QANdGDAAGWQAdgATGABcUQ04BQYI4GjuAf7fAA0MAAIrgMCWBik5RWV1LV19I1NgAGAAdUSASWBQhSVVDVltPQNjM2D6AEESgEyALIABAGyAZnqnJgB+FQAZgFmWgDM+loAYrtERDjsPYCFXO3SZTIicvJjCi2tbbkdnSaCOCZ9-HcOx2bCsyNzogrik1JP57Kj82KK+OjKqusbmxjau3v6hp0Rtxxp4pusxBx4kdITtmHZ2MwWAA4YAAWECqIx3GhLFGxRYSL4BISnAAkEwYQwKTCOFt1nZRkTaaSOAAIFm40QAcBhXNZLOB8QYrBmxzoMzoEzF5JFMteYulnBm8Dl-AYEuJoC1sPYEslOqlnnldnlgoCQA", "AAEAjATAdArMBwBpAWgWggAgLIEMB2A5gK4DOALgKZ7ACAwAQMEwGBNsvtsifus9+duPTnQCoAZQDGACwBOFAJYAjCrIwAZKAA0AkgDUMYAGwAGaQAdgABGABcYHzq1OAKGAAINgEhhwgP8Av9bAAMi+4RFMYlJyiipqmroGxmaWAMAA6hk6wBIy8sqqGtr6hqYWbIw0AIIAfQBm9QACAO4AdQAowADgDAD8AJkDAFl96gAzALN9AAHhQmxOfn4RjMJroJFbTBur7HQbADDAPuEA0Cc8aWzX+4uRt0w+Ttt0p9vsAKARdE7cLzwFkwgUxHh4Pjdwr0og92GCIetgGk6MwATCaC8Xrt2GtWBjaL9nItlkS7qSER8gA", "AAEAjATAdArMBIAlApgIwK4EsA2AXABADICy+ARAGqYAOyATmcAIDPBsBgbXH3XIvA1vABC9XAAsAhvgBiYACwA2RfjAB2AAzjqwABjAAuIJbcAMMADAXAJCCBACAD-AP+ABEYAGQ7P32xYiYlKyCsqqmtqWAOpRAJIIonQS0nJKKupaOtxMAIJZAAIAKQBeAIes7AD8AGa1NXUAAT782cD2XABAflwsJrxdbFZWfcNco2xdVtxTndwA4MCTwACwwLYD-pbAANBtAjMti6wsG3Yza6zdm7ZXvACgvn2gl7f73O2vW3YLt+fnAk8BI5HD1Fix2IDjn0mMCjnZIZ8-EA", "AAEAjATAdArMAwAZAlgIwKYBtPoAQBUoAOAdmAEAKqAwYO+4WhukZtqgDACUALAewB2AQ1wBZPgBc+AJ1RCArrgBakXGDAAGHgAdgAFGABcYAGA6lKg1oAIegHB27AP9PgAaGAAERz9-ng3PzCYpIycooqEGqaOqYA6nEAkgG8giLiUrIKyqrqWrp0AEAUAIIFAAIABfQAkBQA-IgAMwCz9QABdB0+rAwWLsDF7ENsI2b+fcwWg-TTEzP0tCO2DlP0K6OzW-4jjuN0dZN+wIfHzACgvnOsc2fM+8C2d3QPzKtnD693A-6UJpTUW5UcjTcgDXZrZ5Q4BAA", "AAEAjATAdArMCIBZAhgVwM7oAQC0C0AnDFgAoAWAbwHYCWAHsAIBPADAwAYMNz57zyG7N+PZgDQASgHt0AUwBus5ACcsAQSoBrKaiwAhLGAAcABjIAHYAGxgYEW34AoYAAgeASHtfmAJGBivQKChf2k5RRV1LR19Q1MLNgB1RIBJUJkFJVUNbV0DYzNLEMY1ADkAM3KAAQBS8wAS4E9GAH5K8paAZoBmbrbK4AAgIYF+dmAAf4mRYRZZnnGHYPth5dWQ9a5PQIA4JpFF9ZDjwMX95ZFtniPAgFAg5kFQEYuvM7duJ+D2G+4AcFebEYwjOgPszFYzA482Ks1m6xhMLByyAA"]}`),e=JSON.parse(String.raw`[{"name":"Theler Kobra MD","cost":37,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":2,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":22,"Toughness":10,"Structure":51,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Kreuzer Spinne M3","cost":32,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"3","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":109,"HandlingFull":108,"HandlingFullwBombs":108,"MaxStrain":21,"Toughness":16,"Structure":60,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Ritter Model F \"Singvogel\"","cost":28,"upkeep":1,"bomb_mass":5,"escape":"2","crash":"-1","stress":"3","DryMP":4,"WetMP":5,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":12,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":8,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-6,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":99,"MaxStrain":24,"Toughness":7,"Structure":38,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":4},{"name":"Markgraf Zerstörer B","cost":32,"upkeep":2,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":7,"WetMP":8,"WetMPwBombs":10,"DPEmpty":20,"DPFull":20,"DPwBombs":22,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":5,"StallSpeedFull":5,"StallSpeedFullwBombs":7,"Overspeed":28,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":1,"HandlingEmpty":91,"HandlingFull":90,"HandlingFullwBombs":88,"MaxStrain":26,"Toughness":10,"Structure":52,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Theler Drachen","cost":6,"upkeep":0,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"1, 0","DryMP":3,"WetMP":3,"WetMPwBombs":3,"DPEmpty":16,"DPFull":16,"DPwBombs":16,"MaxSpeedEmpty":10,"MaxSpeedFull":10,"MaxSpeedwBombs":10,"StallSpeedEmpty":2,"StallSpeedFull":2,"StallSpeedFullwBombs":2,"Overspeed":21,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":4,"Stabiilty":1,"HandlingEmpty":91,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":3,"RateOfClimbwBombs":3},{"name":"Living Grove (Farman)","cost":24,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":20,"Toughness":9,"Structure":45,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Rathenau 7k","cost":14,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":3,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":19,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":9,"Stabiilty":-2,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":20,"Toughness":7,"Structure":36,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":9,"RateOfClimbwBombs":6},{"name":"Braun VJ","cost":13,"upkeep":1,"bomb_mass":0,"escape":"0/0","crash":"-1/-1","stress":"1, 0","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":21,"MaxSpeedFull":21,"MaxSpeedwBombs":21,"StallSpeedEmpty":7,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":23,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":-1,"HandlingEmpty":79,"HandlingFull":77,"HandlingFullwBombs":77,"MaxStrain":20,"Toughness":6,"Structure":32,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":12,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":5,"RateOfClimbwBombs":3},{"name":"KW-S1","cost":29,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":17,"DPFull":17,"DPwBombs":17,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":-1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":32,"Toughness":11,"Structure":56,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":3,"RateOfClimbwBombs":3},{"name":"KW-S4","cost":42,"upkeep":2,"bomb_mass":0,"escape":"2/-3","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":42,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":-3,"HandlingEmpty":96,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":31,"Toughness":22,"Structure":51,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Ritter Model D \"SeePfau\"","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-2,"HandlingEmpty":103,"HandlingFull":102,"HandlingFullwBombs":102,"MaxStrain":26,"Toughness":5,"Structure":28,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Teicher Möwe 13S-J","cost":43,"upkeep":1,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"1(0), 1(0)","DryMP":7,"WetMP":9,"WetMPwBombs":11,"DPEmpty":18,"DPFull":18,"DPwBombs":20,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":13,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":8,"Overspeed":24,"BoostEmpty":2,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":8,"Stabiilty":0,"HandlingEmpty":97,"HandlingFull":95,"HandlingFullwBombs":93,"MaxStrain":38,"Toughness":31,"Structure":80,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":13,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":1},{"name":"Ritter \"Ersatz S\"","cost":25,"upkeep":2,"bomb_mass":0,"escape":"3","crash":"-1","stress":"3","DryMP":4,"WetMP":6,"WetMPwBombs":6,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":5,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":21,"BoostEmpty":5,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":11,"Stabiilty":-7,"HandlingEmpty":102,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":23,"Toughness":8,"Structure":43,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":9,"RateOfClimbwBombs":6},{"name":"Kreuzer Spinne V8","cost":29,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":28,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":11,"Stabiilty":-1,"HandlingEmpty":108,"HandlingFull":107,"HandlingFullwBombs":107,"MaxStrain":21,"Toughness":16,"Structure":60,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":7,"RateOfClimbEmpty":9,"RateOfClimbwBombs":7},{"name":"Hugo's Ganzmetall Wunderflugzeug!","cost":43,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"1","DryMP":7,"WetMP":8,"WetMPwBombs":8,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":1,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":8,"Stabiilty":-1,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":49,"Toughness":51,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"L&L Kessel IIb","cost":30,"upkeep":2,"bomb_mass":5,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":8,"WetMPwBombs":9,"DPEmpty":22,"DPFull":22,"DPwBombs":23,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":13,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":6,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":0,"HandlingEmpty":94,"HandlingFull":92,"HandlingFullwBombs":91,"MaxStrain":36,"Toughness":10,"Structure":52,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Ajeet Interceptor","cost":24,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-1,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":94,"MaxStrain":33,"Toughness":7,"Structure":35,"EnergyLoss":2,"EnergyLosswBombs":3,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":8,"RateOfClimbEmpty":10,"RateOfClimbwBombs":8},{"name":"Shamsher Interceptor","cost":23,"upkeep":1,"bomb_mass":10,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":13,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":10,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":6,"Stabiilty":-2,"HandlingEmpty":100,"HandlingFull":99,"HandlingFullwBombs":97,"MaxStrain":35,"Toughness":7,"Structure":35,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":2},{"name":"Bahadur Escort","cost":39,"upkeep":2,"bomb_mass":0,"escape":"2","crash":"0","stress":"1","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":101,"HandlingFull":99,"HandlingFullwBombs":99,"MaxStrain":22,"Toughness":21,"Structure":39,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Cheetal Fighter","cost":37,"upkeep":2,"bomb_mass":0,"escape":"0/0","crash":"0/0","stress":"2, 0","DryMP":5,"WetMP":8,"WetMPwBombs":8,"DPEmpty":19,"DPFull":19,"DPwBombs":19,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":4,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":21,"BoostEmpty":4,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":94,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":41,"Toughness":9,"Structure":49,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":13,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":5,"RateOfClimbwBombs":3},{"name":"Markgraf Attentäter C","cost":32,"upkeep":2,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":7,"WetMP":8,"WetMPwBombs":8,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":7,"StallSpeedFull":9,"StallSpeedFullwBombs":9,"Overspeed":42,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-4,"HandlingEmpty":94,"HandlingFull":93,"HandlingFullwBombs":93,"MaxStrain":28,"Toughness":7,"Structure":35,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Königskondor L.1","cost":70,"upkeep":1,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":48,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":13,"Stabiilty":1,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":34,"Toughness":21,"Structure":55,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Von Morgen Vampyr","cost":41,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":2,"HandlingEmpty":96,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":51,"Toughness":21,"Structure":67,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Hugo's Einzigartiger Stahl-Jagdbomber!","cost":65,"upkeep":1,"bomb_mass":5,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":9,"WetMP":10,"WetMPwBombs":11,"DPEmpty":16,"DPFull":16,"DPwBombs":17,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":16,"StallSpeedEmpty":8,"StallSpeedFull":9,"StallSpeedFullwBombs":10,"Overspeed":36,"BoostEmpty":2,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":6,"Stabiilty":-2,"HandlingEmpty":93,"HandlingFull":92,"HandlingFullwBombs":91,"MaxStrain":49,"Toughness":50,"Structure":60,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":2,"RateOfClimbwBombs":2},{"name":"Theler Kobra MB","cost":32,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":1,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":94,"MaxStrain":30,"Toughness":12,"Structure":61,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Kreuzer Skorpion","cost":33,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":6,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-3,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":37,"Toughness":15,"Structure":45,"EnergyLoss":2,"EnergyLosswBombs":3,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"KW Adler N","cost":25,"upkeep":1,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":37,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":30,"Toughness":7,"Structure":38,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Markgraf Volksfestung A","cost":70,"upkeep":7,"bomb_mass":30,"escape":"2/2/2/2/2","crash":"-1/-1/-1/-1/-1","stress":"2(0), 2(0), 0, 0, 0","DryMP":17,"WetMP":23,"WetMPwBombs":29,"DPEmpty":65,"DPFull":65,"DPwBombs":65,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":32,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":3,"HandlingEmpty":71,"HandlingFull":65,"HandlingFullwBombs":59,"MaxStrain":28,"Toughness":21,"Structure":107,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Arntwerke c.7","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":-2,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Mitscher IG J-79SF","cost":11,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":2,"WetMP":3,"WetMPwBombs":3,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":20,"BoostEmpty":5,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":8,"Stabiilty":-6,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":25,"Toughness":5,"Structure":38,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":7,"RateOfClimbEmpty":10,"RateOfClimbwBombs":7},{"name":"Recht Luftschlepper","cost":22,"upkeep":1,"bomb_mass":10,"escape":"0/0","crash":"-1/-1","stress":"2, 0","DryMP":5,"WetMP":6,"WetMPwBombs":8,"DPEmpty":25,"DPFull":25,"DPwBombs":27,"MaxSpeedEmpty":12,"MaxSpeedFull":12,"MaxSpeedwBombs":11,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":4,"Overspeed":28,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-4,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":94,"MaxStrain":46,"Toughness":10,"Structure":52,"EnergyLoss":9,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":15,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":1},{"name":"Ritter Model Cj \"Spatz\"","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":0,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":26,"Toughness":8,"Structure":40,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Theler Zweihander","cost":40,"upkeep":1,"bomb_mass":0,"escape":"-2","crash":"-1","stress":"0","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":7,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":24,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":3,"HandlingEmpty":100,"HandlingFull":99,"HandlingFullwBombs":99,"MaxStrain":33,"Toughness":21,"Structure":33,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Mitscher IG J-83 Geistliche","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2/0","crash":"-1/-1","stress":"1, 1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":23,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":2,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":94,"MaxStrain":38,"Toughness":9,"Structure":47,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":10,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Arntwerke d.13","cost":24,"upkeep":1,"bomb_mass":10,"escape":"0/0/0","crash":"-1/-1/-1","stress":"3, 1, 1","DryMP":6,"WetMP":8,"WetMPwBombs":10,"DPEmpty":22,"DPFull":22,"DPwBombs":23,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":12,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":8,"Overspeed":18,"BoostEmpty":2,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":5,"Stabiilty":-9,"HandlingEmpty":105,"HandlingFull":103,"HandlingFullwBombs":101,"MaxStrain":45,"Toughness":10,"Structure":53,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":12,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":2,"RateOfClimbwBombs":1},{"name":"Rathenau-9c","cost":13,"upkeep":1,"bomb_mass":5,"escape":"2","crash":"-1","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":5,"DPEmpty":9,"DPFull":9,"DPwBombs":10,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":8,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-1,"HandlingEmpty":105,"HandlingFull":104,"HandlingFullwBombs":103,"MaxStrain":25,"Toughness":6,"Structure":30,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":7,"RateOfClimbEmpty":9,"RateOfClimbwBombs":5},{"name":"Gernsback 0012","cost":52,"upkeep":2,"bomb_mass":0,"escape":"-2","crash":"-1","stress":"0","DryMP":6,"WetMP":8,"WetMPwBombs":8,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":8,"StallSpeedFull":11,"StallSpeedFullwBombs":11,"Overspeed":32,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":13,"Stabiilty":0,"HandlingEmpty":102,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":32,"Toughness":11,"Structure":38,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":12,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Gegenbeispeil","cost":34,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-8,"HandlingEmpty":103,"HandlingFull":102,"HandlingFullwBombs":102,"MaxStrain":32,"Toughness":24,"Structure":62,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Universität Kobra M01","cost":34,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-2","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":3,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":30,"Toughness":13,"Structure":65,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":7,"RateOfClimbwBombs":6},{"name":"Teicher Schnelles Mammut","cost":64,"upkeep":10,"bomb_mass":20,"escape":"0/2/2","crash":"-1/-1/-1","stress":"7, 6, 6","DryMP":12,"WetMP":22,"WetMPwBombs":26,"DPEmpty":45,"DPFull":45,"DPwBombs":45,"MaxSpeedEmpty":0,"MaxSpeedFull":0,"MaxSpeedwBombs":0,"StallSpeedEmpty":2,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":100,"BoostEmpty":0,"BoostFull":0,"BoostFullwBombs":0,"Dropoff":0,"Stabiilty":3,"HandlingEmpty":67,"HandlingFull":57,"HandlingFullwBombs":53,"MaxStrain":34,"Toughness":16,"Structure":80,"EnergyLoss":9,"EnergyLosswBombs":10,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":5,"ControlStress":2,"RumbleStress":6,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Rathenau-16d","cost":28,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":7,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":19,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":3,"HandlingEmpty":103,"HandlingFull":102,"HandlingFullwBombs":102,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Braun DC \"Puma\"","cost":31,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":3,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":3,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":36,"BoostEmpty":5,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":13,"Stabiilty":1,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":22,"Toughness":11,"Structure":55,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":10,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":9,"RateOfClimbEmpty":15,"RateOfClimbwBombs":9},{"name":"Ritter Model S \"Fink\"","cost":38,"upkeep":2,"bomb_mass":5,"escape":"2","crash":"-1","stress":"3","DryMP":5,"WetMP":7,"WetMPwBombs":8,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":8,"Overspeed":21,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":-6,"HandlingEmpty":99,"HandlingFull":97,"HandlingFullwBombs":96,"MaxStrain":43,"Toughness":8,"Structure":43,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":4},{"name":"Theler Eklipse","cost":60,"upkeep":5,"bomb_mass":20,"escape":"2/2/2","crash":"-1/-1/-1","stress":"2, 0, 0","DryMP":16,"WetMP":20,"WetMPwBombs":24,"DPEmpty":41,"DPFull":41,"DPwBombs":45,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":7,"Overspeed":26,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":1,"HandlingEmpty":70,"HandlingFull":66,"HandlingFullwBombs":62,"MaxStrain":20,"Toughness":20,"Structure":104,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Mitscher IG JA-81","cost":26,"upkeep":1,"bomb_mass":10,"escape":"0/0","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":7,"WetMPwBombs":9,"DPEmpty":21,"DPFull":21,"DPwBombs":23,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":12,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":24,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":7,"Stabiilty":0,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":89,"MaxStrain":43,"Toughness":10,"Structure":52,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":2,"RateOfClimbwBombs":1},{"name":"Arntwerke c.10","cost":14,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-2,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"SAM 99","cost":26,"upkeep":2,"bomb_mass":5,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":22,"MaxSpeedFull":22,"MaxSpeedwBombs":22,"StallSpeedEmpty":8,"StallSpeedFull":10,"StallSpeedFullwBombs":11,"Overspeed":42,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":3,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":95,"MaxStrain":49,"Toughness":11,"Structure":49,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":3,"TurnBleedwBombs":4,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"SAM 1144","cost":60,"upkeep":3,"bomb_mass":10,"escape":"1/1","crash":"-1/-1","stress":"1, 0","DryMP":9,"WetMP":11,"WetMPwBombs":13,"DPEmpty":21,"DPFull":21,"DPwBombs":23,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":18,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":36,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":0,"HandlingEmpty":85,"HandlingFull":83,"HandlingFullwBombs":81,"MaxStrain":39,"Toughness":18,"Structure":64,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":9,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Teicher Mammut","cost":48,"upkeep":6,"bomb_mass":20,"escape":"0/2/2","crash":"-1/-1/-1","stress":"1, 0, 0","DryMP":16,"WetMP":22,"WetMPwBombs":26,"DPEmpty":56,"DPFull":56,"DPwBombs":56,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":29,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":3,"HandlingEmpty":67,"HandlingFull":61,"HandlingFullwBombs":57,"MaxStrain":33,"Toughness":16,"Structure":80,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":17,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Mammut Smuggler Custom","cost":96,"upkeep":7,"bomb_mass":15,"escape":"0/0/0/0","crash":"-1/-1/-1/-1","stress":"2(0), 2(0), 0, 0","DryMP":22,"WetMP":28,"WetMPwBombs":31,"DPEmpty":59,"DPFull":59,"DPwBombs":59,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":7,"Overspeed":29,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":3,"HandlingEmpty":67,"HandlingFull":61,"HandlingFullwBombs":58,"MaxStrain":53,"Toughness":17,"Structure":87,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":17,"ControlStress":3,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Markgraf Totengräber A","cost":40,"upkeep":3,"bomb_mass":0,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":9,"WetMP":11,"WetMPwBombs":11,"DPEmpty":23,"DPFull":23,"DPwBombs":23,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":6,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":28,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":2,"HandlingEmpty":88,"HandlingFull":86,"HandlingFullwBombs":86,"MaxStrain":34,"Toughness":10,"Structure":54,"EnergyLoss":8,"EnergyLosswBombs":9,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Kreuzer Spinnmilbe","cost":41,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"3","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":12,"Stabiilty":-7,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":37,"Toughness":19,"Structure":45,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"KW Dickhäuter","cost":40,"upkeep":3,"bomb_mass":10,"escape":"2","crash":"-1","stress":"1","DryMP":9,"WetMP":11,"WetMPwBombs":13,"DPEmpty":23,"DPFull":23,"DPwBombs":24,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":9,"Overspeed":25,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":91,"HandlingFull":89,"HandlingFullwBombs":87,"MaxStrain":22,"Toughness":9,"Structure":45,"EnergyLoss":8,"EnergyLosswBombs":9,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Mushshak Trainer","cost":20,"upkeep":1,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"2(1), 2(1)","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":22,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":-2,"HandlingEmpty":85,"HandlingFull":84,"HandlingFullwBombs":84,"MaxStrain":22,"Toughness":6,"Structure":34,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":15,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Sonnenjäger Hummel","cost":37,"upkeep":2,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":15,"DPFull":15,"DPwBombs":15,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":34,"BoostEmpty":5,"BoostFull":4,"BoostFullwBombs":4,"Dropoff":7,"Stabiilty":0,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":42,"Toughness":10,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":7,"RateOfClimbwBombs":6},{"name":"Ritter Model ABh Eule","cost":20,"upkeep":1,"bomb_mass":10,"escape":"2","crash":"-1","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":8,"DPEmpty":16,"DPFull":16,"DPwBombs":18,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":6,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":2,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":92,"MaxStrain":21,"Toughness":7,"Structure":37,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Albrecht Kugel","cost":8,"upkeep":0,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"1, 0","DryMP":3,"WetMP":3,"WetMPwBombs":3,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":13,"StallSpeedEmpty":3,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":21,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":-3,"HandlingEmpty":95,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":23,"Toughness":5,"Structure":28,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":4,"RateOfClimbwBombs":4},{"name":"Flugzeugwerft-Neustadt Korsar","cost":22,"upkeep":1,"bomb_mass":5,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":7,"WetMPwBombs":8,"DPEmpty":19,"DPFull":19,"DPwBombs":19,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":13,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":6,"Overspeed":26,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":7,"Stabiilty":1,"HandlingEmpty":93,"HandlingFull":92,"HandlingFullwBombs":91,"MaxStrain":35,"Toughness":9,"Structure":47,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Kreuzer Zecke","cost":12,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":1,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":43,"Toughness":9,"Structure":45,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Markgraf Streiter","cost":11,"upkeep":0,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":3,"WetMP":3,"WetMPwBombs":3,"DPEmpty":9,"DPFull":9,"DPwBombs":9,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":4,"StallSpeedFullwBombs":4,"Overspeed":18,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-1,"HandlingEmpty":104,"HandlingFull":104,"HandlingFullwBombs":104,"MaxStrain":27,"Toughness":7,"Structure":38,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":6,"RateOfClimbwBombs":6},{"name":"Mitscher IG B-78","cost":26,"upkeep":1,"bomb_mass":5,"escape":"0/0","crash":"-1/-1","stress":"2, 0","DryMP":5,"WetMP":6,"WetMPwBombs":7,"DPEmpty":21,"DPFull":21,"DPwBombs":22,"MaxSpeedEmpty":12,"MaxSpeedFull":12,"MaxSpeedwBombs":11,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":26,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-5,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":96,"MaxStrain":40,"Toughness":16,"Structure":80,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Müller Experimental 3","cost":4,"upkeep":0,"bomb_mass":5,"escape":"2","crash":"0","stress":"2","DryMP":2,"WetMP":2,"WetMPwBombs":3,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":10,"MaxSpeedFull":10,"MaxSpeedwBombs":10,"StallSpeedEmpty":3,"StallSpeedFull":3,"StallSpeedFullwBombs":5,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":6,"Stabiilty":0,"HandlingEmpty":100,"HandlingFull":100,"HandlingFullwBombs":99,"MaxStrain":28,"Toughness":5,"Structure":28,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":9,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":5,"RateOfClimbwBombs":3},{"name":"SFW Flitzer","cost":11,"upkeep":0,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":2,"WetMP":2,"WetMPwBombs":2,"DPEmpty":8,"DPFull":8,"DPwBombs":8,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":2,"StallSpeedFull":2,"StallSpeedFullwBombs":2,"Overspeed":16,"BoostEmpty":4,"BoostFull":4,"BoostFullwBombs":4,"Dropoff":8,"Stabiilty":0,"HandlingEmpty":101,"HandlingFull":101,"HandlingFullwBombs":101,"MaxStrain":28,"Toughness":8,"Structure":40,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":11,"RateOfClimbEmpty":11,"RateOfClimbwBombs":11},{"name":"SFW-Rathenau Nimbus","cost":10,"upkeep":0,"bomb_mass":0,"escape":"0","crash":"1","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":18,"DPFull":18,"DPwBombs":18,"MaxSpeedEmpty":9,"MaxSpeedFull":9,"MaxSpeedwBombs":9,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":16,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":6,"HandlingEmpty":89,"HandlingFull":88,"HandlingFullwBombs":88,"MaxStrain":46,"Toughness":9,"Structure":46,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":13,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Teicher Fuchs","cost":26,"upkeep":1,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":30,"Toughness":9,"Structure":48,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Weiss Wrackbarsch","cost":19,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-2","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-3,"HandlingEmpty":109,"HandlingFull":108,"HandlingFullwBombs":108,"MaxStrain":19,"Toughness":8,"Structure":40,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Braun GA 'Gulaschkanone'","cost":20,"upkeep":1,"bomb_mass":0,"escape":"2/2","crash":"-1/-1","stress":"2, 1","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":23,"DPFull":23,"DPwBombs":23,"MaxSpeedEmpty":9,"MaxSpeedFull":9,"MaxSpeedwBombs":9,"StallSpeedEmpty":3,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":20,"BoostEmpty":1,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":5,"Stabiilty":1,"HandlingEmpty":89,"HandlingFull":88,"HandlingFullwBombs":88,"MaxStrain":43,"Toughness":10,"Structure":54,"EnergyLoss":8,"EnergyLosswBombs":9,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Ritter Model X \"Falke\"","cost":33,"upkeep":2,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":21,"MaxSpeedFull":21,"MaxSpeedwBombs":21,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":23,"BoostEmpty":5,"BoostFull":4,"BoostFullwBombs":4,"Dropoff":12,"Stabiilty":-1,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":43,"Toughness":8,"Structure":43,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":9,"RateOfClimbwBombs":6},{"name":"von Morgen Walküre","cost":46,"upkeep":2,"bomb_mass":5,"escape":"2","crash":"-1","stress":"1","DryMP":7,"WetMP":8,"WetMPwBombs":9,"DPEmpty":15,"DPFull":15,"DPwBombs":15,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":7,"StallSpeedFull":8,"StallSpeedFullwBombs":9,"Overspeed":28,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":2,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":93,"MaxStrain":35,"Toughness":26,"Structure":35,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Hugo's Metallisches Jagdflugzeug!","cost":54,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":7,"WetMP":8,"WetMPwBombs":8,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":9,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":36,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-2,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":50,"Toughness":45,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Sonnenjäger Seitenwinder","cost":30,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-2","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-7,"HandlingEmpty":110,"HandlingFull":109,"HandlingFullwBombs":109,"MaxStrain":36,"Toughness":8,"Structure":43,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Tejas Interceptor","cost":46,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":22,"MaxSpeedFull":22,"MaxSpeedwBombs":22,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":36,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":1,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":40,"Toughness":9,"Structure":47,"EnergyLoss":2,"EnergyLosswBombs":3,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":7,"RateOfClimbwBombs":6},{"name":"Sonnenjäger Haifisch","cost":35,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":0,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":40,"Toughness":11,"Structure":55,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"Albrecht Pfeil","cost":43,"upkeep":1,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"1, 0","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":28,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":8,"Stabiilty":1,"HandlingEmpty":89,"HandlingFull":88,"HandlingFullwBombs":88,"MaxStrain":34,"Toughness":24,"Structure":72,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Teicher Sperber 8N-A","cost":19,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"3","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":9,"DPFull":9,"DPwBombs":9,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-5,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":27,"Toughness":8,"Structure":40,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"Markgraf Todesbote C","cost":38,"upkeep":3,"bomb_mass":10,"escape":"2/2","crash":"1/1","stress":"2, 0","DryMP":8,"WetMP":12,"WetMPwBombs":14,"DPEmpty":25,"DPFull":25,"DPwBombs":27,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":7,"Overspeed":32,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":4,"HandlingEmpty":84,"HandlingFull":80,"HandlingFullwBombs":78,"MaxStrain":38,"Toughness":11,"Structure":56,"EnergyLoss":9,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":15,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"von Morgen Pferd","cost":145,"upkeep":10,"bomb_mass":80,"escape":"0/0/0/0/2/2/2","crash":"-1/-1/-1/-1/-1/-1/-1","stress":"4(0), 4(0), 4(0), 0, 0, 0, 0","DryMP":30,"WetMP":40,"WetMPwBombs":56,"DPEmpty":72,"DPFull":72,"DPwBombs":72,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":6,"Overspeed":25,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":9,"Stabiilty":4,"HandlingEmpty":41,"HandlingFull":31,"HandlingFullwBombs":15,"MaxStrain":32,"Toughness":41,"Structure":205,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":12,"ControlStress":5,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"von Morgen Oger","cost":36,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":8,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":36,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":2,"HandlingEmpty":94,"HandlingFull":93,"HandlingFullwBombs":93,"MaxStrain":37,"Toughness":10,"Structure":50,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":4,"RateOfClimbwBombs":4},{"name":"Dryad of Hanriot","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":1,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":41,"Toughness":11,"Structure":56,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"Thorstad S1M2b \"Schreckensgans\"","cost":39,"upkeep":2,"bomb_mass":0,"escape":"0/0","crash":"-1/-1","stress":"1(0), 1(0)","DryMP":7,"WetMP":9,"WetMPwBombs":9,"DPEmpty":17,"DPFull":17,"DPwBombs":17,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":7,"StallSpeedFull":9,"StallSpeedFullwBombs":9,"Overspeed":45,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":-2,"HandlingEmpty":97,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":40,"Toughness":9,"Structure":45,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":9,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Straßenkämpfer","cost":34,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":20,"Toughness":33,"Structure":75,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Marut Raider","cost":30,"upkeep":1,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":4,"WetMP":5,"WetMPwBombs":7,"DPEmpty":12,"DPFull":12,"DPwBombs":14,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":9,"Overspeed":25,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":1,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":96,"MaxStrain":28,"Toughness":10,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":3},{"name":"DFB Blitzgewitter","cost":49,"upkeep":2,"bomb_mass":0,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":7,"WetMP":9,"WetMPwBombs":9,"DPEmpty":18,"DPFull":18,"DPwBombs":18,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":0,"HandlingEmpty":92,"HandlingFull":90,"HandlingFullwBombs":90,"MaxStrain":41,"Toughness":9,"Structure":45,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"KZ-2 Mangusten","cost":26,"upkeep":1,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"3, 1","DryMP":6,"WetMP":7,"WetMPwBombs":9,"DPEmpty":15,"DPFull":15,"DPwBombs":16,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":14,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":10,"Overspeed":16,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":95,"MaxStrain":24,"Toughness":8,"Structure":42,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Rebuilt LM \"Viper\"","cost":19,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-5,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":27,"Toughness":8,"Structure":41,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Libelle T.87","cost":23,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"0","stress":"1","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-2,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":18,"Toughness":6,"Structure":30,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":9,"RateOfClimbEmpty":12,"RateOfClimbwBombs":9},{"name":"Mauss Z-95 Phönix","cost":44,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"0","DryMP":7,"WetMP":9,"WetMPwBombs":9,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":8,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":40,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":2,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":31,"Toughness":15,"Structure":37,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3}]`),s=new Ut(ke,!1),i=0,a=0;for(let m=0;m{(function(t={}){Ae(),removeEventListener("click",ye),Re&&Re(),Re=void 0,xe=void 0,Ge=t.getElement||Ee,Fe=t.scrollIntoView||Me,xe=new MutationObserver(we),addEventListener("click",ye),Re=void 0,fe()})(),setTimeout((()=>{window.onscroll=function(t,e){let s;return function(){clearTimeout(s),s=setTimeout(t,250)}}(He)}),1e3)}));var c=document.getElementsByClassName("collapsible");for(let t=0;tdocument.getElementById(t).offsetTop))break;s=t}We!=s&&(We=s,window.history.replaceState(null,null,"index.html#"+s))}})(); \ No newline at end of file diff --git a/PlaneBuilder/src/impl/Engine.ts b/PlaneBuilder/src/impl/Engine.ts index af0c653..9518d37 100644 --- a/PlaneBuilder/src/impl/Engine.ts +++ b/PlaneBuilder/src/impl/Engine.ts @@ -394,7 +394,7 @@ export class Engine extends Part { if (this.NeedCooling()) { this.cooling_count = Math.max(1, this.cooling_count); } - this.cooling_count = Math.min(this.etype_stats.stats.cooling, this.cooling_count); + this.cooling_count = Math.min(this.GetMaxCooling(), this.cooling_count); this.CalculateStats(); } diff --git a/Test/Hangar/hangar.js b/Test/Hangar/hangar.js index fd55355..e9f930e 100644 --- a/Test/Hangar/hangar.js +++ b/Test/Hangar/hangar.js @@ -1 +1 @@ -(()=>{"use strict";var t,e,s={},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}};return s[t](r,r.exports,a),r.exports}e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,a.t=function(s,i){if(1&i&&(s=this(s)),8&i)return s;if("object"==typeof s&&s){if(4&i&&s.__esModule)return s;if(16&i&&"function"==typeof s.then)return s}var r=Object.create(null);a.r(r);var n={};t=t||[null,e({}),e([]),e(e)];for(var o=2&i&&s;"object"==typeof o&&!~t.indexOf(o);o=e(o))Object.getOwnPropertyNames(o).forEach((t=>n[t]=()=>s[t]));return n.default=()=>s,a.d(r,n),r},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};class r{static IsNullOrWhiteSpace(t){try{return null==t||"undefined"==t||t.toString().replace(/\s/g,"").length<1}catch(t){return console.log(t),!1}}static Join(t,...e){try{const s=e[0];if(Array.isArray(s)||s instanceof Array){let e=r.Empty;for(let i=0;i{e+=i[s]+t})),e=e.slice(0,e.length-t.length),e}const i=e;return r.join(t,...i)}catch(t){return console.log(t),r.Empty}}static Format(t,...e){try{return t.match(r.regexNumber)?r.format(r.regexNumber,t,e):t.match(r.regexObject)?r.format(r.regexObject,t,e,!0):t}catch(t){return console.log(t),r.Empty}}static format(t,e,s,i=!1){return e.replace(t,(function(t,e){const a=t.split(":");let n;return a.length>1&&(e=a[0].replace("{",""),t=a[1].replace("}","")),n=i?s[0][e]:s[e],null==n||null==n||t.match(/{\d+}/)?n:(n=r.parsePattern(t,n),void 0!==n&&null!=n?n:r.Empty)}))}static parsePattern(t,e){switch(t){case"L":return e.toLocaleLowerCase();case"U":return e.toLocaleUpperCase();case"d":if("string"==typeof e)return r.getDisplayDateFromString(e);if(e instanceof Date)return r.Format("{0:00}.{1:00}.{2:0000}",e.getDate(),e.getMonth(),e.getFullYear());break;case"s":if("string"==typeof e)return r.getSortableDateFromString(e);if(e instanceof Date)return r.Format("{0:0000}-{1:00}-{2:00}",e.getFullYear(),e.getMonth(),e.getDate());break;case"n":{"string"!=typeof e&&(e=e.toString());const t=e.replace(/,/g,".");if(isNaN(parseFloat(t))||t.length<=3)break;const s=t.split(/[^0-9]+/g);let i=s;s.length>1&&(i=[r.join("",...s.splice(0,s.length-1)),s[s.length-1]]);const a=i[0],n=a.length%3;let o=n>0?a.substring(0,n):r.Empty;const l=a.substring(n).match(/.{3}/g);return o=o+"."+r.Join(".",l),o+(i.length>1?","+i[1]:"")}case"x":return this.decimalToHexString(e);case"X":return this.decimalToHexString(e,!0)}return"number"!=typeof e&&isNaN(e)||isNaN(+t)||r.IsNullOrWhiteSpace(e)?e:r.formatNumber(e,t)}static decimalToHexString(t,e=!1){const s=parseFloat(t).toString(16);return e?s.toLocaleUpperCase():s}static getDisplayDateFromString(t){const e=t.split("-");if(e.length<=1)return t;let s=e[e.length-1];const i=e[e.length-2],a=e[e.length-3];return s=s.split("T")[0],s=s.split(" ")[0],`${s}.${i}.${a}`}static getSortableDateFromString(t){const e=t.replace(",","").split(".");if(e.length<=1)return t;const s=e[e.length-1].split(" ");let i=r.Empty;s.length>1&&(i=s[s.length-1]);let a=`${e[e.length-1].split(" ")[0]}-${e[e.length-2]}-${e[e.length-3]}`;return!r.IsNullOrWhiteSpace(i)&&i.length>1?a+=`T${i}`:a+="T00:00:00",a}static formatNumber(t,e){const s=e.length,i=t.toString();if(s<=i.length)return i;let a=s-i.length;return a+=1,new Array(a).join("0")+i}static join(t,...e){let s=r.Empty;for(let i=0;i Benefits(-)":"Penalties(+)
Benefits(-)","Used Burnt Out":"Burnt Out","Used Burnt Out Description":"Engines are at -1 Reliability","Used Ragged":"Ragged","Used Ragged Description":"Reduce your Max Speed by 10%","Used Hefty":"Hefty","Used Hefty Description":"Increase your Stall Speeds by 20%","Used Sticky Guns":"Sticky Guns","Used Sticky Guns Description":"Increase the chance of guns jamming by 1","Used Weak":"Weak","Used Weak Description":"Cut the plane\'s Toughness in half","Used Fragile":"Fragile","Used Fragile Description":"Reduce your Max Strain by 20%","Used Leaky":"Leaky","Used Leaky Description":"Reduce your Fuel by 20%","Used Sluggish":"Sluggish","Used Sluggish Description":"Reduce your Handling by 5","Weapons Section Title":"Weapons","Weapons Number of Weapon Sets":"Number of Weapon Sets:","Weapons Number of Weapon Braces":"Number of Weapon Braces:","Weapons Weapon Set":"Weapon Set","Weapons Weapons":"Weapons","Weapons Weapon Stats":"Weapon Stats","Weapons Type":"Weapon Type","Weapons Number of Mounts":"Number of Mounts","Weapons Ammunition":"Ammunition","Weapons Action":"Action","Weapons Projectile":"Projectile","Weapons Belt Fed":"Belt Fed","Weapons Stat Mounting":"Mounting","Weapons Stat Jam":"Jam","Weapons Stat Hits":"Hits","Weapons Stat Damage":"Damage","Weapons Stat Shots":"Shots","Weapons Stat Charges":"Charges per Shot","Weapons Wing Mount":"Wing Mount","Weapons Accessible":"Accessible","Weapons Free Accessible":"Free Accessible","Weapons Covered":"Covered","Weapons # Weapons at Mount":"Weapons at Mount","Weapons Synchronization":"Synchronization","Weapons Mount":"Weapon Mount","Weapons Braces":"Weapon Braces","Weapons Braces Warning":"These mounts give an observer +1 to make a Personal Attack with a loose weapon they are carrying in their hands.","Wings Section Title":"Wings","Wings Wing Stagger":"Wing Stagger:","Wings Closed Wing":"Closed Wing:","Wings Swept Wing":"Swept Wings:","Wings Wing Type":"Wing Type","Wings Wing Options":"Wing Options","Wings Wing Stats":"Wing Stats","Wings Full Wings":"Full Wings","Wings Miniature Wings":"Miniature Wings","Wings Sesquiplane":"Sesquiplane","Wings No Wing":"None","Wings Area":"Area","Wings Span":"Span","Wings Gull":"Gull","Wings Dihedral":"Dihedral","Wings Anhedral":"Anhedral","Aircraft Button Save":"Save","Aircraft Button Load":"Load","Aircraft Button Copy As Link":"Copy As Link","Aircraft Button Save Dashboard":"Save Dashboard","Aircraft Button Interactive Dashboard":"Interactive Dashboard","Aircraft Button Save NPC":"Save NPC","Aircraft Button Save Catalog":"Save Catalog","Aircraft Button Default Aircraft":"Default Aircraft","Aircraft Stats Section Title":"Total Sum of Stats","Aircraft Derived Section Title":"Aircraft Derived Statistics","Seat #":"Seat #{0}","Seats #":"Seats # {0}","Seat Location":"Choose Seat","Radiators #":"Radiators # {0}","Crew Pilot":"Pilot","Crew Bombadier":"Bombardier","Crew Co-Pilot":"Co-Pilot","Crew Gunner":"Gunner","Crew Aircrew":"Aircrew","Diesel":"Diesel Engine","Diesel Warning":"Engine won\'t catch fire.","Cargo Tiny":"A small locker for personal stuff.","Cargo Small":"Will fit a trunk, barrel, or crate.","Cargo Medium":"Will fit a small vehicle like a motorcycle, car, or zeppelin engine.","Cargo Large":"Will fit a scout or fighter aircraft with the wings taken off.","Cargo Huge":"Will fit just about anything you can imagine.","Alter Select Part":"Select Part","Alter Quantity":"Quantity","Alter Part Name":"Part Name","Alter Part Special Rules":"Special Rules","Frame Count":"Frame Count","Frame Count Warning":"This plane appears to have unused frame sections. Check to see if this is intentional.","Altitude Section Title":"Altitude Effects","Altitude Altitude":"Altitude","Rarity":"Rarity","Rarity Custom":"Custom","Rarity Common":"Common","Rarity Rare":"Rare","Rarity Legendary":"Legendary","Boost Warning":"Boost is 0 for some loads. The plane cannot accelerate to take off.","Insufficient Charge":"Insufficient Charge","Insufficient Charge Warning":"This aircraft has electrical systems with nothing to power them.","Low Mass Warning":"This aircraft is very low mass. If it is a custom airplane, be careful not to make it overpowered.","Low Drag Warning":"This aircraft is very low drag. If it is a custom airplane, be careful not to make it overpowered.","Connectivity Warning":"Can move between positions without Wingwalking.","Passenger Connectivity Warning":"Can reach the cockpit without Wingwalking.","Rotor Thickness":"Rotor Thickness"}}');var o=a.t(n,2);const l=new class{constructor(){this.lang="en"}LoadLanguages(t){this.languages=t}GetLanguages(){const t=[];for(const e of this.languages.languages)t.push(e);return t}SetCurrentLanguage(t){this.languages[t]&&(this.lang=t)}e(t){return this.languages[this.lang][t]?this.languages[this.lang][t]:this.languages.en[t]?this.languages.en[t]:(console.error("Failed to find "+t),"!"+t+"!")}};function h(t,...e){return r.Format(l.e(t),...e)}var c;l.LoadLanguages(o),function(t){t[t.WHITE=0]="WHITE",t[t.YELLOW=1]="YELLOW",t[t.RED=2]="RED"}(c||(c={}));class u{constructor(t){this.liftbleed=0,this.wetmass=0,this.mass=0,this.drag=0,this.control=0,this.cost=0,this.reqsections=0,this.visibility=0,this.flightstress=0,this.escape=0,this.pitchstab=0,this.latstab=0,this.cooling=0,this.reliability=0,this.power=0,this.fuelconsumption=0,this.maxstrain=0,this.structure=0,this.pitchspeed=0,this.pitchboost=0,this.wingarea=0,this.toughness=0,this.upkeep=0,this.crashsafety=0,this.bomb_mass=0,this.fuel=0,this.charge=0,this.warnings=[],this.era=[],t&&this.fromJSON(t,0)}toJSON(){return{liftbleed:this.liftbleed,wetmass:this.wetmass,mass:this.mass,drag:this.drag,control:this.control,cost:this.cost,reqsections:this.reqsections,visibility:this.visibility,flightstress:this.flightstress,escape:this.escape,pitchstab:this.pitchstab,latstab:this.latstab,cooling:this.cooling,reliability:this.reliability,power:this.power,fuelconsumption:this.fuelconsumption,maxstrain:this.maxstrain,structure:this.structure,pitchboost:this.pitchboost,pitchspeed:this.pitchspeed,wingarea:this.wingarea,toughness:this.toughness,upkeep:this.upkeep,crashsafety:this.crashsafety,bomb_mass:this.bomb_mass,fuel:this.fuel,charge:this.charge,warnings:this.warnings,eras:this.era}}fromJSON(t,e){if(t.liftbleed&&(this.liftbleed=t.liftbleed),t.wetmass&&(this.wetmass=t.wetmass),t.mass&&(this.mass=t.mass),t.drag&&(this.drag=t.drag),t.control&&(this.control=t.control),t.cost&&(this.cost=t.cost),t.reqsections&&(this.reqsections=t.reqsections),t.visibility&&(this.visibility=t.visibility),t.flightstress&&(this.flightstress=t.flightstress),t.escape&&(this.escape=t.escape),t.pitchstab&&(this.pitchstab=t.pitchstab),t.latstab&&(this.latstab=t.latstab),t.cooling&&(this.cooling=t.cooling),t.reliability&&(this.reliability=t.reliability),t.power&&(this.power=t.power),t.fuelconsumption&&(this.fuelconsumption=t.fuelconsumption),t.maxstrain&&(this.maxstrain=t.maxstrain),t.structure&&(this.structure=t.structure),t.pitchspeed&&(this.pitchspeed=t.pitchspeed),t.pitchboost&&(this.pitchboost=t.pitchboost),t.wingarea&&(this.wingarea=t.wingarea),t.toughness&&(this.toughness=t.toughness),t.upkeep&&(this.upkeep=t.upkeep),t.crashsafety&&(this.crashsafety=t.crashsafety),t.bomb_mass&&(this.bomb_mass=t.bomb_mass),t.fuel&&(this.fuel=t.fuel),t.charge&&(this.charge=t.charge),t.warning&&this.warnings.push({source:h(t.name),warning:h(t.warning),color:c.WHITE}),t.warnings){const e=t.warnings,s=[];for(const t of e)s.push({source:t.source,warning:t.warning});this.warnings=this.MergeWarnings(s)}if(t.era&&this.era.push({name:h(t.name),era:h(t.era)}),t.eras){const e=t.eras,s=[];for(const t of e)s.push({name:t.name,era:t.era});this.era=this.MergeEra(s)}}serialize(t){t.PushNum(this.liftbleed),t.PushNum(this.wetmass),t.PushNum(this.mass),t.PushNum(this.drag),t.PushNum(this.control),t.PushNum(this.cost),t.PushNum(this.reqsections),t.PushNum(this.visibility),t.PushNum(this.flightstress),t.PushNum(this.escape),t.PushNum(this.pitchstab),t.PushNum(this.latstab),t.PushNum(this.cooling),t.PushNum(this.reliability),t.PushNum(this.power),t.PushNum(this.fuelconsumption),t.PushNum(this.maxstrain),t.PushNum(this.structure),t.PushFloat(this.pitchboost),t.PushFloat(this.pitchspeed),t.PushNum(this.wingarea),t.PushNum(this.toughness),t.PushNum(this.upkeep),t.PushNum(this.crashsafety),t.PushNum(this.bomb_mass),t.PushNum(this.fuel),t.PushNum(this.charge),t.PushNum(this.warnings.length);for(const e of this.warnings)t.PushString(e.source),t.PushString(e.warning);t.PushNum(this.era.length);for(const e of this.era)t.PushString(e.name),t.PushString(e.era)}deserialize(t){if(this.liftbleed=t.GetNum(),this.wetmass=t.GetNum(),this.mass=t.GetNum(),this.drag=t.GetNum(),this.control=t.GetNum(),this.cost=t.GetNum(),this.reqsections=t.GetNum(),this.visibility=t.GetNum(),this.flightstress=t.GetNum(),this.escape=t.GetNum(),this.pitchstab=t.GetNum(),this.latstab=t.GetNum(),this.cooling=t.GetNum(),this.reliability=t.GetNum(),this.power=t.GetNum(),this.fuelconsumption=t.GetNum(),this.maxstrain=t.GetNum(),this.structure=t.GetNum(),this.pitchboost=t.GetFloat(),this.pitchspeed=t.GetFloat(),this.wingarea=t.GetNum(),this.toughness=t.GetNum(),this.upkeep=t.GetNum(),this.crashsafety=t.GetNum(),this.bomb_mass=t.GetNum(),this.fuel=t.GetNum(),this.charge=t.GetNum(),t.version>12.25){const e=t.GetNum();this.warnings=[];for(let s=0;s1e-6&&(e.warnings=this.warnings,e.era=this.era),e}Equal(t){return this.liftbleed==t.liftbleed&&this.wetmass==t.wetmass&&this.mass==t.mass&&this.drag==t.drag&&this.control==t.control&&this.cost==t.cost&&this.reqsections==t.reqsections&&this.visibility==t.visibility&&this.flightstress==t.flightstress&&this.escape==t.escape&&this.pitchstab==t.pitchstab&&this.latstab==t.latstab&&this.cooling==t.cooling&&this.reliability==t.reliability&&this.power==t.power&&this.fuelconsumption==t.fuelconsumption&&this.maxstrain==t.maxstrain&&this.structure==t.structure&&this.pitchspeed==t.pitchspeed&&this.pitchboost==t.pitchboost&&this.wingarea==t.wingarea&&this.toughness==t.toughness&&this.upkeep==t.upkeep&&this.crashsafety==t.crashsafety&&this.bomb_mass==t.bomb_mass&&this.fuel==t.fuel&&this.charge==t.charge}rtz(t){return t>0?Math.floor(1e-6+t):Math.ceil(-1e-6+t)}Round(){this.liftbleed=this.rtz(this.liftbleed),this.wetmass=this.rtz(this.wetmass),this.mass=this.rtz(this.mass),this.drag=this.rtz(this.drag),this.control=this.rtz(this.control),this.cost=this.rtz(this.cost),this.reqsections=this.rtz(this.reqsections),this.visibility=this.rtz(this.visibility),this.flightstress=this.rtz(this.flightstress),this.escape=this.rtz(this.escape),this.pitchstab=this.rtz(this.pitchstab),this.latstab=this.rtz(this.latstab),this.cooling=this.rtz(this.cooling),this.reliability=this.rtz(this.reliability),this.power=this.rtz(this.power),this.fuelconsumption=this.rtz(this.fuelconsumption),this.maxstrain=this.rtz(this.maxstrain),this.structure=this.rtz(this.structure),this.wingarea=this.rtz(this.wingarea),this.toughness=this.rtz(this.toughness),this.upkeep=this.rtz(this.upkeep),this.crashsafety=this.rtz(this.crashsafety),this.bomb_mass=this.rtz(this.bomb_mass),this.fuel=this.rtz(this.fuel),this.charge=this.rtz(this.charge)}Clone(){return this.Add(new u)}}const _=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return 6}},p=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return-1}},m=t=>{switch(t){case 0:return"Pioneer";case 1:return"WWI";case 2:return"Roaring 20s";case 3:return"Coming Storm";case 4:return"WWII";case 5:return"Last Hurrah";case 6:case-1:return"Himmilgard"}},g=t=>{var e="";for(let s=0;s0){const s=t.length-1;2==t[s].length&&t[s][0]!=t[s][1]?e+=t[s][0].toString()+"("+t[s][1].toString()+")":e+=t[s][0].toString()}return e};class f{constructor(t){this.array=new ArrayBuffer(51200),this.view=new DataView(this.array),this.offset=0}Check(){if(this.offset>=this.array.byteLength)throw"Serialization Way too long."}PushNum(t){this.view.setInt16(this.offset,t,!1),this.offset+=2,this.Check()}PushBool(t){t?this.view.setUint8(this.offset,1):this.view.setUint8(this.offset,0),this.offset+=1,this.Check()}PushString(t){var e=(new TextEncoder).encode(t);this.PushNum(e.length);for(let t=0;t=this.array.byteLength)throw"Deserialization Failed"}GetNum(){this.Check();const t=this.view.getInt16(this.offset,!1);return this.offset+=2,t}GetBool(){this.Check();const t=this.view.getUint8(this.offset);return this.offset+=1,t>0}GetString(){this.Check();const t=this.GetNum(),e=new Uint8Array(this.view.buffer,this.offset,t);let s;return this.offset+=t,s=this.version<12.65?"windows-1252":"utf-8",new TextDecoder(s).decode(e)}GetNumArr(t){this.Check();const e=this.GetNum(),s=[];for(let t=0;t0&&(r*=1.4),Math.floor(1e-6+r)}VerifyValues(){for(this.engine_displacement=Math.max(.01,this.engine_displacement),this.engine_displacement=Math.min(150,this.engine_displacement),this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.cool_sel=Math.max(0,Math.min(this.CoolingTable.length-1,this.cool_sel)),this.num_cyl_per_row=Math.floor(Math.max(1,this.num_cyl_per_row)),this.num_rows=Math.floor(Math.max(1,this.num_rows)),this.compression_ratio=Math.max(.01,this.compression_ratio),this.compression_ratio=Math.min(25,this.compression_ratio),this.rpm_boost=Math.max(.1,this.rpm_boost),this.rpm_boost=Math.min(2,this.rpm_boost),this.material_fudge=Math.max(.1,this.material_fudge),this.material_fudge=Math.min(2,this.material_fudge),this.quality_fudge=Math.max(.1,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge);this.material_fudge-1+(this.quality_fudge-1)<-.9;)this.material_fudge+=.1,this.quality_fudge+=.1;this.min_IAF=10*Math.round(1e-6+this.min_IAF/10),this.compressor_count=Math.floor(1e-6+this.compressor_count),this.compressor_count=Math.min(5,this.compressor_count),this.compressor_type==S.NONE?(this.compressor_count=0,this.min_IAF=0):this.compressor_type==S.ALTITUDE_THROTTLE?(this.compressor_count=1,this.min_IAF=0,this.upg_sel[0]=!1,this.upg_sel[1]=!1,this.upg_sel[2]=!1):(this.min_IAF=Math.max(0,this.min_IAF),this.compressor_count=Math.max(1,this.compressor_count))}EngineStats(){const t=new I;switch(t.name=this.name,this.VerifyValues(),t.stats.power=this.CalcPower(),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=Math.floor(-1.999999+this.era_sel+10*(this.quality_fudge+this.material_fudge-2)),t.stats.cooling=this.CalcCooling(),t.oiltank=this.IsRotary(),t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=this.CalcFuelConsumption(),t.altitude=this.CalcAltitude(),t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(m(this.era_sel))}),this.compressor_type){case S.NONE:break;case S.ALTITUDE_THROTTLE:t.stats.cost+=3,t.altitude=49,t.stats.warnings.push({source:h("Altitude Throttle"),warning:h("Altitude Throttle Warning"),color:c.WHITE});break;case S.SUPERCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.fuelconsumption=Math.floor(1e-6+1.25*t.stats.fuelconsumption),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=29+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e;break}case S.TURBOCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10*2,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=49+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e,t.stats.reqsections+=1;break}}return(this.compressor_type==S.ALTITUDE_THROTTLE||this.upg_sel[1])&&t.stats.warnings.push({source:h("War Emergency Power"),warning:h("War Emergency Power Warning"),color:c.WHITE}),t.stats.fuelconsumption=Math.max(1,t.stats.fuelconsumption),t.rarity=this.rarity,t}EngineInputs(){const t=new A;t.engine_type=w.PROPELLER,t.RPM_boost=this.rpm_boost,t.compression=this.compression_ratio,t.compressor_count=this.compressor_count,t.compressor_type=this.compressor_type,t.cyl_per_row=this.num_cyl_per_row,t.displacement=this.engine_displacement,t.era_sel=this.era_sel,t.material_fudge=this.material_fudge,t.min_IdealAlt=this.min_IAF,t.name=this.name,t.quality_fudge=this.quality_fudge,t.rows=this.num_rows,t.type=this.cool_sel;for(let e=0;e2&&(this.afterburner=!1)}EngineInputs(){const t=new A;return t.name=this.name,t.engine_type=w.TURBOMACHINERY,t.era_sel=this.era_sel,t.type=this.type_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.upgrades[0]=this.afterburner,t.rarity=this.rarity,t}GetPitchSpeed(){return this.bypass_ratio>=8?1:this.bypass_ratio>=3.5?1.1:this.bypass_ratio>=1?1.2:1.3}EngineStats(){const t=new I;this.VerifyValues();const e=this.CalcStages();return this.kN=e.thrust,this.tsfc=e.fuel/e.thrust,t.name=this.name,t.stats.power=Math.round(1e3*e.thrust/89),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.fuelconsumption=Math.round(200*e.fuel/1e3),t.rumble=0,t.stats.cost=this.CalcCost(),t.overspeed=100,t.altitude=59,8==this.era_sel?t.stats.era.push({name:t.name,era:h(m(-1))}):t.stats.era.push({name:t.name,era:h(m(5))}),t.stats.pitchspeed=this.GetPitchSpeed(),t.rarity=this.rarity,t}}class v{constructor(){this.EraTable=[{name:"Pioneer",draw:3,drawfactor:.4,massfactor:.4,reliability:-1,costfactor:.4,overspeed:20},{name:"WWI",draw:1,drawfactor:.4,massfactor:1/3,reliability:0,costfactor:1/2.25,overspeed:25},{name:"Roaring 20s",draw:1,drawfactor:2/7,massfactor:2/7,reliability:1,costfactor:.5,overspeed:30},{name:"Coming Storm",draw:0,drawfactor:2/7,massfactor:1/4,reliability:2,costfactor:1/1.9,overspeed:35},{name:"WWII",draw:0,drawfactor:1/4,massfactor:.2,reliability:3,costfactor:1/1.8,overspeed:40},{name:"Last Hurrah",draw:0,drawfactor:.2,massfactor:1/6,reliability:4,costfactor:1/1.75,overspeed:45}],this.Winding=[{name:"Aluminum",drawmod:1.1,mass:-2,drag:1,costfactor:1,reliabilty:0},{name:"Copper",drawmod:1,mass:0,drag:0,costfactor:1,reliabilty:0},{name:"Silver",drawmod:.95,mass:1,drag:0,costfactor:1.1,reliabilty:0},{name:"Electrum",drawmod:.9,mass:2,drag:0,costfactor:1.3,reliabilty:1},{name:"Platinum",drawmod:.75,mass:3,drag:0,costfactor:2,reliabilty:2},{name:"Screamer Sinew",drawmod:.9,mass:0,drag:1,costfactor:1.75,reliabilty:4},{name:"Lightning Sprite Ephemera",drawmod:.5,mass:-2,drag:-2,costfactor:2,reliabilty:-3}],this.name="Default",this.era_sel=0,this.winding_sel=0,this.power=1,this.chonk=1,this.quality_fudge=1}EraMass(){const t=this.EraTable[this.era_sel];return Math.floor(1e-6+t.massfactor*this.power)}CalcMass(){const t=this.Winding[this.winding_sel];return Math.max(0,Math.floor(1e-6+this.EraMass()+t.mass))}CalcDrag(){const t=this.power/10,e=this.Winding[this.winding_sel].drag;return Math.max(1,Math.floor(1.000001+t+this.chonk+e))}CalcOverspeed(){const t=this.chonk/2,e=7.5*(this.quality_fudge-1);return Math.ceil(-1e-6+this.EraTable[this.era_sel].overspeed-t+e)}CalcDraw(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.draw+Math.ceil(this.power*t.drawfactor-1e-6);return Math.ceil(s*e.drawmod-1e-6)}CalcReliability(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=this.power/10,i=5*(this.quality_fudge-1);return Math.trunc(1e-6+t.reliability+this.chonk-s+i)+e.reliabilty}CalcTorque(){const t=1+this.EraMass()/10+this.chonk/4;return Math.max(1,Math.floor(1e-6+t))}CalcCost(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.costfactor*this.power,i=Math.ceil(s*Math.max(.5,this.quality_fudge)-1e-6);return Math.ceil(i*e.costfactor-1e-6)}VerifyValues(){this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.winding_sel=Math.max(0,Math.min(this.Winding.length-1,this.winding_sel)),this.power=Math.max(1,this.power),this.power=Math.floor(1e-6+this.power),this.chonk=Math.floor(1e-6+this.chonk),this.chonk=Math.max(-10,this.chonk),this.chonk=Math.min(10,this.chonk),this.quality_fudge=Math.max(.5,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge)}EngineStats(){var t=new I;return t.name=this.name,this.VerifyValues(),t.stats.power=this.power,t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.cooling=0,t.oiltank=!1,t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=0,t.stats.charge=-this.CalcDraw(),t.altitude=100,t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(m(this.era_sel))}),t}EngineInputs(){var t=new A;return t.engine_type=w.ELECTRIC,t.name=this.name,t.power=this.power,t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.material_fudge=this.chonk,t.quality_fudge=this.quality_fudge,t}}!function(t){t[t.PROPELLER=0]="PROPELLER",t[t.PULSEJET=1]="PULSEJET",t[t.TURBOMACHINERY=2]="TURBOMACHINERY",t[t.ELECTRIC=3]="ELECTRIC"}(w||(w={})),function(t){t[t.CUSTOM=0]="CUSTOM",t[t.COMMON=1]="COMMON",t[t.RARE=2]="RARE",t[t.LEGENDARY=3]="LEGENDARY"}(C||(C={}));class A{constructor(t){this.name="Default",this.engine_type=w.PROPELLER,this.type=0,this.era_sel=0,this.rarity=C.CUSTOM,this.displacement=0,this.compression=0,this.cyl_per_row=0,this.rows=0,this.RPM_boost=0,this.material_fudge=0,this.quality_fudge=0,this.compressor_type=0,this.compressor_count=0,this.min_IdealAlt=0,this.upgrades=[...Array(4).fill(!1)],this.power=0,this.quality_cost=0,this.quality_rely=0,this.starter=!1,this.flow_adjustment=0,this.diameter=0,this.compression_ratio=0,this.bypass_ratio=0,this.winding_sel=0,t&&this.fromJSON(t)}toJSON(){switch(this.engine_type){case w.PROPELLER:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,displacement:this.displacement,compression:this.compression,cyl_per_row:this.cyl_per_row,rows:this.rows,RPM_boost:this.RPM_boost,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge,compressor_type:this.compressor_type,compressor_count:this.compressor_count,min_IAF:this.min_IdealAlt,upgrades:this.upgrades,rarity:this.rarity};case w.PULSEJET:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,power:this.power,quality_cost:this.quality_cost,quality_rely:this.quality_rely,starter:this.starter,rarity:this.rarity};case w.TURBOMACHINERY:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,flow_adjustment:this.flow_adjustment,diameter:this.diameter,compression_ratio:this.compression_ratio,bypass_ratio:this.bypass_ratio,upgrades:this.upgrades,rarity:this.rarity};case w.ELECTRIC:return{name:this.name,engine_type:this.engine_type,power:this.power,era_sel:this.era_sel,winding_sel:this.winding_sel,diameter:this.diameter,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge};default:throw"EngineInputs.toJSON: Oh dear, you have a new engine type."}}fromJSON(t){switch(this.name=t.name,this.engine_type=t.engine_type,this.type=t.type,this.era_sel=t.era_sel,this.engine_type){case w.PROPELLER:this.displacement=t.displacement,this.compression=t.compression,this.cyl_per_row=t.cyl_per_row,this.rows=t.rows,this.RPM_boost=t.RPM_boost,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge,this.compressor_type=t.compressor_type,this.compressor_count=t.compressor_count,this.min_IdealAlt=t.min_IAF,this.upgrades=b(t.upgrades,this.upgrades.length);break;case w.PULSEJET:this.power=t.power,this.quality_cost=t.quality_cost,this.quality_rely=t.quality_rely,this.starter=t.starter;break;case w.TURBOMACHINERY:this.flow_adjustment=t.flow_adjustment,this.diameter=t.diameter,this.compression_ratio=t.compression_ratio,this.bypass_ratio=t.bypass_ratio,this.upgrades=t.upgrades;break;case w.ELECTRIC:this.power=t.power,this.winding_sel=t.winding_sel,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge;break;default:throw"EngineInputs.fromJSON: Oh dear, you have a new engine type."}t.rarity?this.rarity=t.rarity:this.rarity=C.CUSTOM}serialize(t){switch(t.PushString(this.name),t.PushNum(this.engine_type),t.PushNum(this.type),t.PushNum(this.era_sel),this.engine_type){case w.PROPELLER:t.PushFloat(this.displacement),t.PushFloat(this.compression),t.PushNum(this.cyl_per_row),t.PushNum(this.rows),t.PushFloat(this.RPM_boost),t.PushFloat(this.material_fudge),t.PushFloat(this.quality_fudge),t.PushNum(this.compressor_type),t.PushNum(this.compressor_count),t.PushNum(this.min_IdealAlt),t.PushBoolArr(this.upgrades);break;case w.PULSEJET:t.PushNum(this.power),t.PushFloat(this.quality_cost),t.PushFloat(this.quality_rely),t.PushBool(this.starter);break;case w.TURBOMACHINERY:t.PushFloat(this.flow_adjustment),t.PushFloat(this.diameter),t.PushFloat(this.compression_ratio),t.PushFloat(this.bypass_ratio),t.PushBoolArr(this.upgrades);break;case w.ELECTRIC:t.PushNum(this.power),t.PushNum(this.winding_sel),t.PushNum(this.material_fudge),t.PushFloat(this.quality_fudge);break;default:throw"EngineInputs.serialize: Oh dear, you have a new engine type."}t.PushNum(this.rarity)}deserialize(t){switch(this.name=t.GetString(),this.engine_type=t.GetNum(),this.type=t.GetNum(),this.era_sel=t.GetNum(),this.engine_type){case w.PROPELLER:this.displacement=t.GetFloat(),this.compression=t.GetFloat(),this.cyl_per_row=t.GetNum(),this.rows=t.GetNum(),this.RPM_boost=t.GetFloat(),this.material_fudge=t.GetFloat(),this.quality_fudge=t.GetFloat(),this.compressor_type=t.GetNum(),this.compressor_count=t.GetNum(),this.min_IdealAlt=t.GetNum(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case w.PULSEJET:this.power=t.GetNum(),this.quality_cost=t.GetFloat(),this.quality_rely=t.GetFloat(),this.starter=t.GetBool();break;case w.TURBOMACHINERY:this.flow_adjustment=t.GetFloat(),this.diameter=t.GetFloat(),this.compression_ratio=t.GetFloat(),this.bypass_ratio=t.GetFloat(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case w.ELECTRIC:this.power=t.GetNum(),this.winding_sel=t.GetNum(),this.material_fudge=t.GetNum(),this.quality_fudge=t.GetFloat();break;default:throw"EngineInputs.deserialize: Oh dear, you have a new engine type."}t.version>12.35?this.rarity=t.GetNum():this.rarity=C.CUSTOM}PartStats(){switch(this.engine_type){case w.PROPELLER:{const t=new G;return t.name=this.name,t.cool_sel=this.type,t.era_sel=this.era_sel,t.engine_displacement=this.displacement,t.compression_ratio=this.compression,t.num_cyl_per_row=this.cyl_per_row,t.num_rows=this.rows,t.rpm_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IAF=this.min_IdealAlt,t.upg_sel=this.upgrades,t.rarity=this.rarity,t.EngineStats()}case w.PULSEJET:{const t=new M;t.valve_sel=this.type,t.era_sel=this.era_sel,t.desired_power=this.power,t.build_quality=this.quality_cost,t.overall_quality=this.quality_rely,t.starter=this.starter,t.rarity=this.rarity;const e=t.EngineStats();return this.name=e.name,e}case w.TURBOMACHINERY:{const t=new R;return t.type_sel=this.type,t.era_sel=this.era_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.afterburner=this.upgrades[0],t.name=this.name,t.rarity=this.rarity,t.EngineStats()}case w.ELECTRIC:{const t=new v;return t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.power=this.power,t.chonk=this.material_fudge,t.quality_fudge=this.quality_fudge,t.name=this.name,t.EngineStats()}default:throw"EngineInputs.PartStats: Oh dear, you have a new engine type."}}Equal(t){return this.name==t.name}Clone(){const t=new A;t.name=this.name,t.engine_type=this.engine_type,t.type=this.type,t.era_sel=this.era_sel,t.displacement=this.displacement,t.compression=this.compression,t.cyl_per_row=this.cyl_per_row,t.rows=this.rows,t.RPM_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IdealAlt=this.min_IdealAlt,t.power=this.power,t.quality_cost=this.quality_cost,t.quality_rely=this.quality_rely,t.starter=this.starter;for(let e=0;e12.35&&(this.rarity=t.GetNum()),this.stats.deserialize(t)}Clone(){const t=new I;return t.fromJSON(JSON.parse(JSON.stringify(this.toJSON()))),t}Equal(t){return this.stats.Equal(t.stats)&&this.overspeed==t.overspeed&&this.altitude==t.altitude&&this.torque==t.torque&&this.rumble==t.rumble&&this.oiltank==t.oiltank&&this.pulsejet==t.pulsejet&&this.rarity==t.rarity}Verify(){this.oiltank&&(this.stats.cooling=0),this.PulseJetCheck()}PulseJetCheck(){this.pulsejet?(this.stats.cooling=0,this.overspeed=100,this.altitude=3,this.torque=0):this.rumble=0}}const E=JSON.parse('{"l":[{"name":"Custom","engines":[{"name":"Bentley BR.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Renault V8 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":7,"compression":4,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.4,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Early-WWI","engines":[{"name":"Aeromarine K-6 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.36,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 80hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.27,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 6 cylinder 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Argus As II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":10.353,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.8,"compression":4.85,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Benz Bz.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.4,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 7Z 95hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.88,"compression":4.3,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9Bf 140hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.46,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 14 Double Lambda 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 70hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.75,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Omega 50hp","engine_type":0,"type":2,"era_sel":0,"displacement":7.7,"compression":4,"cyl_per_row":7,"rows":1,"RPM_boost":1.49,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome monosoupape 9B 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9C 90hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.89,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"RAF 1a 90hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.88,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.9,"material_fudge":1.3,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Late-WWI","engines":[{"name":"Bentley BR.2 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 11EB 200hp","engine_type":0,"type":2,"era_sel":1,"displacement":21.49,"compression":5.1,"cyl_per_row":11,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 16X 420hp","engine_type":0,"type":0,"era_sel":1,"displacement":32.53333333,"compression":5,"cyl_per_row":4,"rows":4,"RPM_boost":0.87,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8F 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.98,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIav 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'18","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle III 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle VIII 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 110hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Dyak 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.800000002,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.III 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.6,"compression":5,"cyl_per_row":11,"rows":1,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Mid-WWI","engines":[{"name":"Argus As III 190hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.9,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Beardmore 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.635,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bz.IV 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.6,"compression":4.9,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9B 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Cosmos Mercury","engine_type":0,"type":1,"era_sel":1,"displacement":19.6,"compression":5.3,"cyl_per_row":7,"rows":2,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss K-12 375hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.33,"material_fudge":0.8,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss OXX-6","engine_type":0,"type":0,"era_sel":1,"displacement":9.3,"compression":4.92,"cyl_per_row":2,"rows":4,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Fiat A.12 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9B Monosoupape 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9N Monosoupape 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":5.1,"cyl_per_row":9,"rows":1,"RPM_boost":1.05,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Aa 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Ab 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8B 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Bc 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Ja 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Jb 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Liberty L-12 400hp","engine_type":0,"type":0,"era_sel":2,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.64,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Lorraine 12Da 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":24.4,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIa 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIaü 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IVa 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Falcon III 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 80hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Arab 208hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.76,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Maori II 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":12.27,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.3,"material_fudge":1.7,"quality_fudge":0.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.II 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Pre-WWI","engines":[{"name":"Mercedes E4F 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Coming Storm","engines":[{"name":"Allison V-1710-85 1200hp","engine_type":0,"type":0,"era_sel":3,"displacement":28,"compression":6.65,"cyl_per_row":2,"rows":6,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bristol Pegasus XVIII 835hp","engine_type":0,"type":1,"era_sel":2,"displacement":28.7,"compression":6.25,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1.2,"quality_fudge":0.8,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Daimler-Benz 601ARJ 1775hp","engine_type":0,"type":0,"era_sel":3,"displacement":33.93,"compression":6.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.84,"material_fudge":0.6,"quality_fudge":0.7,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,true,false]}]},{"name":"Roaring 20s","engines":[{"name":"Argus As 5 1500hp","engine_type":0,"type":0,"era_sel":2,"displacement":94.1,"compression":5.6,"cyl_per_row":6,"rows":4,"RPM_boost":0.638,"material_fudge":0.4,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bréguet Quadrimoteur Type B H-32 970hp","engine_type":0,"type":0,"era_sel":2,"displacement":48.64,"compression":5,"cyl_per_row":4,"rows":8,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'20","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion XI 580hp","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":6,"cyl_per_row":4,"rows":3,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"WWII","engines":[{"name":"Klimov M-105PF 1230hp","engine_type":0,"type":0,"era_sel":3,"displacement":35.101,"compression":7,"cyl_per_row":2,"rows":6,"RPM_boost":0.55,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls Royce Merlin 46 930hp","engine_type":0,"type":0,"era_sel":3,"displacement":27,"compression":5.55,"cyl_per_row":2,"rows":6,"RPM_boost":0.98,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,true,true,false]}]},{"name":"ACDQ","engines":[{"name":"2A-Series 4-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":16,"compression":4.5,"cyl_per_row":1,"rows":2,"RPM_boost":0.5,"material_fudge":0.8,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"F-Series 6-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":17,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.07,"material_fudge":0.7,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"G-Series 9-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":16,"compression":4.7,"cyl_per_row":9,"rows":1,"RPM_boost":1.04,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hartmann H.IIc Straight-6 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":12,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hornet R-3 Boxer 6-Cylinder","engine_type":0,"type":0,"era_sel":1,"displacement":10,"compression":5,"cyl_per_row":2,"rows":3,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Maclean-King Tiger MK.1 V-12 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":17,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ogre-Z Beta V-6","engine_type":0,"type":0,"era_sel":0,"displacement":11,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Pulsejet PV-12 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":12,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-20 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":20,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-8 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":8,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Seguin Σ110 Sigma 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":1,"displacement":14,"compression":4.5,"cyl_per_row":7,"rows":1,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"SuperPegasus 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":13.5,"compression":5,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"TurboGoblin 8-Cylinder Semi-Radial","engine_type":0,"type":4,"era_sel":0,"displacement":13,"compression":5.5,"cyl_per_row":8,"rows":1,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Himmilgard Pulsejet","engines":[{"name":"Pulsejet PV-5 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":5,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-6 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":6,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-7 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":7,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-8 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":8,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-9 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":9,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-10 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":10,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-11 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":11,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-12 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":12,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-13 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":13,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-14 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":14,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-15 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":15,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1}]},{"name":"Himmilgard Liquid Radial","engines":[{"name":"Einsort MM 140hp","engine_type":0,"type":5,"era_sel":1,"displacement":14.72,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Einsort MR 150hp","engine_type":0,"type":5,"era_sel":1,"displacement":15.46,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Gernsback Motor 0005","engine_type":0,"type":5,"era_sel":1,"displacement":12,"compression":6,"cyl_per_row":5,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Liquid Cooled","engines":[{"name":"Meier Bärenjunge 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.5,"compression":5.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.86,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F1166 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 Über 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2000 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Brandt Krieger I 370hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Brandt Kurier XVI 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Fleischmann F10 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fleischmann F10ü 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.75,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fokker Fungizidherstellung Typ 247 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.3,"compression":4.8,"cyl_per_row":1,"rows":6,"RPM_boost":0.85,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Ochs 2 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.84,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Windhund 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Nationales Motorbüro Arbeiter XVII 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,true],"rarity":2},{"name":"Nationales Motorbüro D-1140 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.4,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760tgl 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.4,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-840 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.4,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.05,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro Kurier XXI 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XII 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"SAM Kurier XX 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter I 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.15,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter III 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter V 350hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.75,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Schrankhut RD.300V 230hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":6.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.51,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Wollsteinkraft Verteidiger C 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Wollsteinkraft Verteidiger H 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Wollsteinkraft Wagehals C 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F4398 490hp","engine_type":0,"type":0,"era_sel":1,"displacement":44.3,"compression":4.7,"cyl_per_row":3,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Patriot 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Turbolader-Patriot 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"Meier Bär 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Meier Eisbär 500hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XIII 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":1,"min_IAF":10,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter IV 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":2},{"name":"Sonnenmotor EGH3 220hp","engine_type":0,"type":0,"era_sel":0,"displacement":20,"compression":5,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":50,"upgrades":[false,false,false,true],"rarity":3},{"name":"Wollsteinkraft Wagehals T 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Kurier L 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.99,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Bertha F2080 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.4,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2080 Über 270hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.8,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Contrarotary","engines":[{"name":"Nationales Motorbüro R-1860 160hp","engine_type":0,"type":3,"era_sel":1,"displacement":18.6,"compression":6,"cyl_per_row":11,"rows":1,"RPM_boost":0.65,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro R-1190 110hp","engine_type":0,"type":3,"era_sel":1,"displacement":11.9,"compression":6,"cyl_per_row":9,"rows":1,"RPM_boost":0.67,"material_fudge":1.2,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Air Cooled","engines":[{"name":"Braun UL 90hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun ULK 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.2,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs X 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.1,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun UX 150hp","engine_type":0,"type":1,"era_sel":1,"displacement":13.2,"compression":4.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.23,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Scholz Luchs III 30hp","engine_type":0,"type":1,"era_sel":1,"displacement":3.1,"compression":4.5,"cyl_per_row":3,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs VI 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Breitbusch Libelle \'320hp\'","engine_type":0,"type":1,"era_sel":1,"displacement":22.78,"compression":4.42,"cyl_per_row":9,"rows":1,"RPM_boost":1.31,"material_fudge":1.1,"quality_fudge":0.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Rosevear Ankou B 180hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.9,"compression":5.17,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":1.4,"quality_fudge":0.9,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Semi-Radial","engines":[{"name":"SLW Sigvird 180hp","engine_type":0,"type":4,"era_sel":1,"displacement":11,"compression":6,"cyl_per_row":4,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Rotary","engines":[{"name":"Modded Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Robur Herausforderer 180hp","engine_type":0,"type":2,"era_sel":1,"displacement":18,"compression":5.5,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":40,"upgrades":[false,false,true,true],"rarity":3},{"name":"Rhona Motorbau Z11 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z11tgl 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber B.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber G.IX 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber O.VII 50hp","engine_type":0,"type":2,"era_sel":1,"displacement":8,"compression":4.85,"cyl_per_row":7,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber L.VII 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber TG.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber T.IX 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.3 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Schreiber L.XIV 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1}]}]}');class N{constructor(t){this.constant=!1,this.name=t,this.list=[];const e=window.localStorage.getItem("test.engines."+this.name);null!=e&&this.fromJSON(JSON.parse(e));const s=window.localStorage.getItem("test.engines_names");let i=[];s&&(i=JSON.parse(s));let a=!1;for(const e of i)if(e==t){a=!0;break}a||i.push(t),window.localStorage.setItem("test.engines_names",JSON.stringify(i))}toJSON(){const t=[];for(const e of this.list)t.push(e.toJSON());return{name:this.name,engines:t}}fromJSON(t,e=!1){t.name&&(this.name=t.name),e&&(this.list=[]);for(const s of t.engines)try{this.push(new A(s),e)}catch(t){console.error(t)}}deserializeEngine(t){if(this.constant)throw"Engine List is Constant";const e=new A;return e.deserialize(t),this.push(e)}push(t,e=!1){if(this.constant)throw"Engine List is Constant";if(e)this.remove(t);else for(let e=0;e(""+t.name).localeCompare(e.name))),window.localStorage.setItem("test.engines."+this.name,JSON.stringify(this.toJSON())),this.find(t)}get(t){return t<0||t>=this.length?new A:this.list[t]}get_name(t){const e=this.find_name(t);return this.get(e)}get_stats(t){return t<0||t>=this.length?new I:this.list[t].PartStats()}get_stats_name(t){const e=this.find_name(t);return this.get_stats(e)}find(t){for(let e=0;e=0&&this.list.splice(e,1),window.localStorage.setItem("test.engines."+this.name,JSON.stringify(this.toJSON()))}remove_name(t){if(this.constant)throw"Engine List is Constant";const e=this.find_name(t);e>=0&&this.list.splice(e,1),window.localStorage.setItem("test.engines."+this.name,JSON.stringify(this.toJSON()))}get length(){return this.list.length}SetConstant(){this.constant=!0}}const T=new Map([["Custom",new N("Custom")]]);function x(){return T}function W(t){const e=x();for(const s of e.keys())if("Custom"!=s&&e.get(s).find_name(t)>=0)return s;return e.get("Custom").find_name(t)>=0?"Custom":""}var k,O,F,q,L,B;function H(t){return t==k.ORNITHOPTER_BASIC||t==k.ORNITHOPTER_FLUTTER||t==k.ORNITHOPTER_BUZZER}!function(t){t[t.AIRPLANE=0]="AIRPLANE",t[t.HELICOPTER=1]="HELICOPTER",t[t.AUTOGYRO=2]="AUTOGYRO",t[t.ORNITHOPTER_BASIC=3]="ORNITHOPTER_BASIC",t[t.ORNITHOPTER_FLUTTER=4]="ORNITHOPTER_FLUTTER",t[t.ORNITHOPTER_BUZZER=5]="ORNITHOPTER_BUZZER"}(k||(k={}));class D{FormatEquipment(t,e,s){return Math.abs(s)>.5?t.push({source:h(e),charge:s.toString()}):s>0&&s<1e-6&&t.push({source:h(e),charge:"-"}),t}}function z(t,e){for(let s=0;s0&&t.push({name:s.name,stats:s.stats.toJSON(),qty:s.qty});return window.localStorage.setItem("test.CustomParts",JSON.stringify(e)),{part_list:t}}fromJSON(t,e){for(const t of this.custom_parts)t.qty=0;for(const e of t.part_list){const t=this.custom_parts.findIndex((t=>t.name==e.name));-1==t?this.custom_parts.push({name:e.name,stats:new u(e.stats),qty:e.qty}):this.custom_parts[t].qty=e.qty}}serialize(t){const e=[];for(const t of this.custom_parts)t.qty>0&&e.push({name:t.name,stats:t.stats,qty:t.qty});t.PushNum(e.length);for(const s of e)t.PushString(s.name),s.stats.serialize(t),t.PushNum(s.qty)}deserialize(t){for(const t of this.custom_parts)t.qty=0;const e=t.GetNum();for(let i=0;it.name==e));-1==s?(s=this.custom_parts.length,this.custom_parts.push({name:e,stats:i,qty:a})):this.custom_parts[s].qty=a}}IsDefault(){for(const t of this.custom_parts)if(t.qty>0)return!1;return!0}ClearAll(){for(const t of this.custom_parts)t.qty=0}AddPart(t,e){var s=0;if(s+=Math.abs(e.drag),s+=Math.abs(e.mass),s+=Math.abs(e.wetmass),s+=Math.abs(e.bomb_mass),s+=Math.abs(e.cost),s+=Math.abs(e.upkeep),s+=Math.abs(e.liftbleed),s+=Math.abs(e.wingarea),s+=Math.abs(e.control),s+=Math.abs(e.pitchstab),s+=Math.abs(e.latstab),s+=Math.abs(e.maxstrain),s+=Math.abs(e.structure),s+=Math.abs(e.toughness),s+=Math.abs(e.power),s+=Math.abs(e.fuelconsumption),s+=Math.abs(e.fuel),s+=Math.abs(e.charge),s+=Math.abs(e.crashsafety),s+=Math.abs(e.visibility),s+=Math.abs(e.escape),s+=Math.abs(e.reliability),0==(s+=Math.abs(e.warnings.length)))return;const i=this.custom_parts.findIndex((e=>e.name==t));-1!=i?this.custom_parts[i].stats=e:this.custom_parts.push({name:t,stats:e,qty:0}),this.custom_parts.sort(((t,e)=>t.name.localeCompare(e.name))),this.CalculateStats()}RemovePart(t){const e=this.custom_parts.findIndex((e=>e.name==t));-1!=e&&this.custom_parts.splice(e,1),this.CalculateStats()}GetParts(){return this.custom_parts}SetUsedPart(t,e){this.custom_parts[t].qty=e,this.CalculateStats()}PartStats(){var t=new u;for(const e of this.custom_parts)if(e.qty>0){let s=e.stats.Clone();s=s.Multiply(e.qty),t=t.Add(s)}return t}GetElectrics(){var t=[];for(const e of this.custom_parts)e.qty>0&&(t=this.FormatEquipment(t,e.name,e.stats.charge));return{storage:0,equipment:t}}SetCalculateStats(t){this.CalculateStats=t}}class j extends D{constructor(t){super(),this.selected=0,this.vals=[];for(const e of t.options){const t={name:e.name,maxbomb:e.maxbomb,cant_lift:e.cant_lift,stats:new u(e)};this.vals.push(t)}}toJSON(){return{selected:this.selected}}fromJSON(t,e){this.selected=t.selected,e<10.35&&this.selected>2&&this.selected++}serialize(t){t.PushNum(this.selected)}deserialize(t){this.selected=t.GetNum()}GetSelected(){return this.selected}GetSelectedText(){return this.vals[this.selected].name}SetSelected(t){this.selected=t,this.CalculateStats()}GetEraOptions(){return this.vals}GetLiftBleed(){return this.vals[this.selected].stats.liftbleed}GetMaxBomb(){return this.vals[this.selected].maxbomb}GetCantLift(){return this.vals[this.selected].cant_lift}PartStats(){var t=new u;return t.Add(this.vals[this.selected].stats)}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class J extends D{constructor(t,e,s,i){super(),this.stats=new u,this.types=t,this.upgrades=e,this.safety=s,this.gunsights=i,this.selected_type=0,this.selected_upgrades=[...Array(this.upgrades.length).fill(!1)],this.selected_safety=[...Array(this.safety.length).fill(!1)],this.selected_gunsights=[...Array(this.gunsights.length).fill(!1)],this.total_stress=[0,0],this.total_escape=0,this.total_visibility=0,this.seat_index=0,this.bombsight=0,this.is_armed=!1}toJSON(){return{type:this.selected_type,upgrades:this.selected_upgrades,safety:this.selected_safety,sights:this.selected_gunsights,bombsight:this.bombsight}}fromJSON(t,e){this.selected_type=t.type,this.selected_upgrades=b(t.upgrades,this.selected_upgrades.length),this.selected_safety=b(t.safety,this.selected_safety.length),this.selected_gunsights=b(t.sights,this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),e>10.35&&(this.bombsight=t.bombsight)}serialize(t){t.PushNum(this.selected_type),t.PushBoolArr(this.selected_upgrades),t.PushBoolArr(this.selected_safety),t.PushBoolArr(this.selected_gunsights),t.PushNum(this.bombsight)}deserialize(t){this.selected_type=t.GetNum(),this.selected_upgrades=t.GetBoolArr(this.selected_upgrades.length),this.selected_safety=t.GetBoolArr(this.selected_safety.length),this.selected_gunsights=t.GetBoolArr(this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),t.version>10.35&&(this.bombsight=t.GetNum())}GetTypeList(){return this.types}GetUpgradeList(){return this.upgrades}GetSafetyList(){return this.safety}GetGunsightList(){return this.gunsights}GetType(){return this.selected_type}SetType(t){if(t>=this.types.length)throw"Selected type is not in range of actual types.";this.selected_type=t,this.CalculateStats()}GetSelectedUpgrades(){return this.selected_upgrades}SetUpgrade(t,e){if(t>=this.upgrades.length)throw"Selected type is not in range of actual upgrades.";this.selected_upgrades[t]=e,this.CalculateStats()}GetSelectedSafety(){return this.selected_safety}CanSafety(){const t=Array(this.safety.length).fill(!0);return t[5]=!this.types[this.selected_type].exposed,t}SetSafety(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual safties.";this.selected_safety[t]=e,this.CalculateStats()}GetSelectedGunsights(){return this.selected_gunsights}SetGunsight(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual gunsights.";this.selected_gunsights[t]=e,this.CalculateStats()}GetVisibility(){return this.types[this.selected_type].stats.visibility<-10?-1/0:this.total_visibility}GetFlightStress(){return this.total_stress}GetEscape(){return this.total_escape}GetCrash(){return this.total_crash}GetAttack(){var t=0;for(let e=0;e0&&(t=t-t%3+1),this.bombsight=t,this.CalculateStats()}SetHasRotary(t){this.has_rotary=t}IsElectrics(){return 0!=this.stats.charge}IsCopilot(){return this.selected_upgrades[0]}SetArmed(t){this.is_armed=t}GetName(){return this.IsPrimary()?"Crew Pilot":this.bombsight>0?"Crew Bombadier":this.IsCopilot()?"Crew Co-Pilot":this.is_armed?"Crew Gunner":"Crew Aircrew"}PartStats(){let t=new u;t.reqsections=1,t=t.Add(this.types[this.selected_type].stats);for(let e=0;e0&&(t.cost+=Math.floor(2.000001+(this.bombsight-4)/3),t.warnings.push({source:h("Bombsight"),warning:h("Bombsight Warning 1")+this.bombsight.toString()+h("Bombsight Warning 2"),color:c.WHITE}),this.IsCopilot()&&t.warnings.push({source:h("Bombadier Controls"),warning:h("Bombadier Controls Warning"),color:c.WHITE})),this.stats=t.Clone(),this.selected_upgrades[0]?(t.flightstress=this.upgrades[0].stats.flightstress,this.stats.flightstress-=t.flightstress):t.flightstress=0,t}CrewUpdate(t,e,s,i,a,r){this.total_escape=this.stats.escape+t;let n=this.stats.flightstress,o=this.stats.flightstress;(this.IsPrimary()||this.selected_upgrades[0])&&(n+=e,o+=e-2*i),n=Math.max(0,n),o=Math.max(0,o),n+=s,o+=s,this.IsOpen()&&this.has_rotary&&(n+=1,o+=1),n=Math.max(0,n),o=Math.max(0,o),this.total_stress=[n,o],this.total_visibility=this.stats.visibility+a,this.total_crash=this.stats.crashsafety+r}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){var t=[];for(let e=0;et;)this.positions.pop();var e=null;for(this.positions.length>0&&(e=JSON.stringify(this.positions[this.positions.length-1].toJSON()));this.positions.length0}GetConnected(){return this.connected}SetConnected(t){this.connected=t,this.CalculateStats()}PartStats(){const t=new u;return t.reqsections=2*Math.ceil((this.seats+2*this.beds)/5-1e-6),this.seats+this.beds>0&&this.connected&&(t.mass=1,t.warnings.push({source:h("Passengers Section Title"),warning:h("Passenger Connectivity Warning"),color:c.WHITE})),t.bomb_mass+=this.seats+this.beds,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),this.seats+this.beds>0&&t.warnings.push({source:h("Passengers Section Title"),warning:h("Passengers Count",this.seats,this.beds),color:c.WHITE}),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class Z extends D{constructor(t,e){super();const s=x();if(this.elist_idx="Custom",this.etype_stats=s.get(this.elist_idx).get_stats(0),this.etype_inputs=s.get(this.elist_idx).get(0),this.cooling_count=this.etype_stats.stats.cooling,this.radiator_index=-1,this.cooling_count>0&&(this.radiator_index=0),this.num_radiators=0,this.mount_list=t,this.mount_sel=0,this.intake_fan=!1,this.use_pp=!1,this.torque_to_struct=!1,this.cowl_list=e,this.cowl_sel=0,this.use_ds=!1,this.outboard_prop=!1,this.gp_count=0,this.gpr_count=0,this.total_reliability=0,this.is_generator=!1,this.has_alternator=!1,s.get(this.elist_idx).length<=0)throw"No Engine Stats Found. Should be at least one."}toJSON(){return{selected_stats:this.etype_stats.toJSON(),selected_inputs:this.etype_inputs.toJSON(),cooling_count:this.cooling_count,radiator_index:this.radiator_index,selected_mount:this.mount_sel,use_pushpull:this.use_pp,pp_torque_to_struct:this.torque_to_struct,use_driveshafts:this.use_ds,geared_propeller_ratio:this.gp_count,geared_propeller_reliability:this.gpr_count,cowl_sel:this.cowl_sel,is_generator:this.is_generator,has_alternator:this.has_alternator,intake_fan:this.intake_fan,outboard_prop:this.outboard_prop}}oldJSON(t,e){const s=t.selected_stats;if(this.etype_stats.fromJSON(s,e),this.etype_inputs=new A,this.etype_stats.pulsejet&&s.input_pj){this.etype_inputs=new A,this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=w.PULSEJET;const t=s.input_pj;this.etype_inputs.type=t.type,this.etype_inputs.power=t.power,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.quality_cost=t.quality_cost,this.etype_inputs.quality_rely=t.quality_rely,this.etype_inputs.starter=t.starter}else if(s.input_eb){this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=w.PROPELLER;const t=s.input_eb;this.etype_inputs.displacement=t.displacement,this.etype_inputs.compression=t.compression,this.etype_inputs.type=t.type,this.etype_inputs.cyl_per_row=t.cyl_per_row,this.etype_inputs.rows=t.rows,this.etype_inputs.RPM_boost=t.RPM_boost,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.material_fudge=t.material_fudge,this.etype_inputs.quality_fudge=t.quality_fudge,this.etype_inputs.upgrades=t.upgrades,6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.compressor_type,this.etype_inputs.compressor_count=t.compressor_count,this.etype_inputs.min_IdealAlt=t.min_IAF)}else this.etype_stats.altitude=10*this.etype_stats.altitude-1;return this.etype_inputs}fromJSON(t,e){const s=x();let i="";if(e>10.55){this.etype_stats.fromJSON(t.selected_stats,e);const a=new A(t.selected_inputs);i=W(this.etype_stats.name),""==i&&(i="Custom","Default"!=a.name&&s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name)}else{const a=this.oldJSON(t,e);"Default"!=a.name&&(i=W(this.etype_stats.name),""==i&&(i="Custom",s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name))}this.elist_idx=i,this.cooling_count=t.cooling_count,this.radiator_index=t.radiator_index,this.mount_sel=t.selected_mount,this.use_pp=t.use_pushpull,this.torque_to_struct=t.pp_torque_to_struct,this.use_ds=t.use_driveshafts,this.gp_count=t.geared_propeller_ratio,this.gpr_count=t.geared_propeller_reliability,this.cowl_sel=t.cowl_sel,this.is_generator=t.is_generator,this.has_alternator=t.has_alternator,this.intake_fan=t.intake_fan,this.outboard_prop=e>=12.15&&t.outboard_prop}serialize(t){this.etype_stats.serialize(t),this.etype_inputs.serialize(t),t.PushNum(this.cooling_count),t.PushNum(this.radiator_index),t.PushNum(this.mount_sel),t.PushBool(this.use_pp),t.PushBool(this.torque_to_struct),t.PushBool(this.use_ds),t.PushNum(this.gp_count),t.PushNum(this.gpr_count),t.PushNum(this.cowl_sel),t.PushBool(this.is_generator),t.PushBool(this.has_alternator),t.PushBool(this.intake_fan),t.PushBool(this.outboard_prop)}oldDeserialize(t){return this.etype_stats.name=t.GetString(),this.etype_stats.overspeed=t.GetNum(),this.etype_stats.altitude=t.GetNum(),this.etype_stats.torque=t.GetNum(),this.etype_stats.rumble=t.GetNum(),this.etype_stats.oiltank=t.GetBool(),this.etype_stats.pulsejet=t.GetBool(),this.etype_inputs=new A,t.version>10.45?(this.etype_inputs.name=this.etype_stats.name,this.etype_stats.pulsejet?(this.etype_inputs.engine_type=w.PULSEJET,this.etype_inputs.power=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.quality_cost=t.GetNum(),this.etype_inputs.quality_rely=t.GetNum(),this.etype_inputs.starter=t.GetBool()):(this.etype_inputs.displacement=t.GetNum(),this.etype_inputs.compression=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.cyl_per_row=t.GetNum(),this.etype_inputs.rows=t.GetNum(),this.etype_inputs.RPM_boost=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.material_fudge=t.GetNum(),this.etype_inputs.quality_fudge=t.GetNum(),this.etype_inputs.upgrades=t.GetBoolArr(0),6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.GetNum(),this.etype_inputs.compressor_count=t.GetNum(),this.etype_inputs.min_IdealAlt=t.GetNum()))):this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_stats.stats.deserialize(t),this.etype_inputs}deserialize(t){const e=x();var s="";if(t.version>10.55){this.etype_stats.deserialize(t);const i=new A;i.deserialize(t),""==(s=W(this.etype_stats.name))&&(s="Custom","Default"!=i.name&&e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name)}else{const i=this.oldDeserialize(t);"Default"!=i.name&&(""==(s=W(this.etype_stats.name))&&(s="Custom",e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name))}this.cooling_count=t.GetNum(),this.radiator_index=t.GetNum(),this.mount_sel=t.GetNum(),this.use_pp=t.GetBool(),this.torque_to_struct=t.GetBool(),this.use_ds=t.GetBool(),this.gp_count=t.GetNum(),this.gpr_count=t.GetNum(),this.cowl_sel=t.GetNum(),this.is_generator=t.GetBool(),this.has_alternator=t.GetBool(),this.intake_fan=t.GetBool(),t.version>=12.15?this.outboard_prop=t.GetBool():this.outboard_prop=!1,this.elist_idx=s}GetMinAltitude(){return this.etype_inputs.min_IdealAlt}GetMaxAltitude(){return this.GetMinAltitude()+this.etype_stats.altitude}GetMinIAF(){return Math.floor(1e-6+this.GetMinAltitude()/10)}GetMaxIAF(){return Math.floor(1e-6+this.GetMaxAltitude()/10)}CanSelectIndex(){const t=x().get(this.elist_idx),e=[...Array(t.length).fill(!0)];if(this.is_internal)for(let s=0;s0}WarnCoolingReliability(){return this.cooling_count=t&&(this.radiator_index=t-1),this.radiator_index<0&&t>0&&(this.radiator_index=0)}GetNumRadiators(){return this.num_radiators}SetRadiator(t){this.radiator_index=t,this.CalculateStats()}GetRadiator(){return this.radiator_index}CanIntakeFan(){return this.IsAirCooled()}SetIntakeFan(t){this.intake_fan=t,this.CalculateStats()}GetIntakeFan(){return this.intake_fan}CanOutboardProp(){return this.use_ds&&(this.IsTractor()||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}GetOutboardProp(){return this.outboard_prop}SetOutboardProp(t){t&&this.use_ds?this.outboard_prop=!0:this.outboard_prop=!1,this.CalculateStats()}SetSelectedList(t){t!=this.elist_idx&&(this.elist_idx=t,this.SetSelectedIndex(0))}GetSelectedList(){return this.elist_idx}GetListOfEngines(){return x().get(this.elist_idx)}RequiresExtendedDriveshafts(){return!this.is_internal&&this.mount_list[this.mount_sel].reqED}SetTailMods(t,e,s){!this.mount_list[this.mount_sel].reqTail||t||e||this.GetGenerator()||(this.use_ds=!0),!this.mount_list[this.mount_sel].reqED||this.GetGenerator()||s&&(t||e)||(this.use_ds=!0)}CanMountIndex(){var t=[...Array(this.mount_list.length).fill(!0)];if(this.is_internal)for(let e=0;e=this.mount_list.length)throw"Index outside of mount_list range.";this.mount_sel=t,this.mount_list[this.mount_sel].reqED?this.SetUseExtendedDriveshaft(!0):this.CalculateStats()}GetMountIndex(){return this.GetIsPulsejet()?-1:this.mount_sel}CanUsePushPull(){return!(this.is_generator||this.GetIsJet()||this.is_internal||this.mount_list[this.mount_sel].helicopter)}SetUsePushPull(t){this.use_pp=t,t?(this.cooling_count*=2,"fuselage"==this.mount_list[this.mount_sel].mount_type&&(this.mount_sel=8)):(this.cooling_count=Math.floor(1e-6+this.cooling_count/2),"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(this.mount_sel=0)),this.CalculateStats()}GetUsePushPull(){return this.use_pp}GetMountList(){return this.mount_list}CanUseExtendedDriveshaft(){return!(0==this.GetNumPropellers()||this.is_internal||this.GetGenerator()||this.mount_list[this.mount_sel].helicopter)}SetUseExtendedDriveshaft(t){this.GetGenerator()||this.is_internal?this.use_ds=!1:this.use_ds=t,this.CalculateStats()}GetUseExtendedDriveshaft(){return this.use_ds}CanUseGears(){return!(0==this.GetNumPropellers()||this.GetGenerator())}SetGearCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gp_count=t,this.SetGearReliability(this.gpr_count)}GetGearCount(){return this.gp_count}SetGearReliability(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gpr_count=Math.min(t,this.gp_count),this.CalculateStats()}GetGearReliability(){return this.gpr_count}SetTorqueToStruct(t){this.torque_to_struct=t,this.use_pp||(this.torque_to_struct=!1),this.CalculateStats()}GetTorqueToStruct(){return this.torque_to_struct}CanTorqueToStruct(){return this.use_pp&&this.etype_stats.torque>0&&"pod"!=this.mount_list[this.mount_sel].mount_type}UpdateReliability(t){this.total_reliability=this.etype_stats.stats.reliability,this.total_reliability-=this.gp_count-this.gpr_count,this.total_reliability+=this.cowl_list[this.cowl_sel].stats.reliability,this.NeedCooling()&&(this.total_reliability-=this.GetMaxCooling()-this.cooling_count),this.GetIntakeFan()&&(this.total_reliability+=6),this.total_reliability+=t}GetReliability(){return this.use_pp?this.outboard_prop?this.total_reliability.toString()+"/"+(this.total_reliability-2).toString():this.total_reliability.toString()+"/"+this.total_reliability.toString():this.outboard_prop?(this.total_reliability-2).toString():this.total_reliability.toString()}GetOverspeed(){return this.is_generator?1e3:this.etype_stats.overspeed+Math.floor(1e-6+this.gp_count*this.etype_stats.overspeed/2)}GetIsPulsejet(){return this.etype_stats.pulsejet}GetIsJet(){return this.GetIsPulsejet()||this.GetIsTurbine()&&!this.GetIsTurboprop()}PulseJetCheck(){this.GetIsPulsejet()&&(this.use_pp=!1,this.use_ds=!1,this.gp_count=0,this.gpr_count=0,this.cooling_count=0,this.has_alternator=!1,this.is_generator=!1,this.cowl_sel=0,this.radiator_index=-1)}GetIsTurbine(){return this.etype_inputs.engine_type==w.TURBOMACHINERY}GetIsTurboprop(){return this.etype_inputs.engine_type==w.TURBOMACHINERY&&3==this.etype_inputs.type}TurbineCheck(){this.GetIsTurbine()&&(0==this.GetNumPropellers()&&(this.use_ds=!1,this.gp_count=0,this.gpr_count=0),this.cooling_count=0,this.cowl_sel=0,this.radiator_index=-1)}GetNumPropellers(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.GetGenerator())||this.GetIsTurboprop()||this.is_internal?this.use_pp?2:1:0}GetIsTractorNacelle(){return this.GetNumPropellers()>0&&!this.GetUsePushPull()&&.8==this.mount_list[this.mount_sel].powerfactor&&!this.is_internal}IsLiquidCooled(){return this.NeedCooling()}IsRotary(){return this.etype_stats.oiltank}IsContraRotary(){return!this.GetIsPulsejet()&&!this.GetIsTurbine()&&""!=this.elist_idx&&3==this.etype_inputs.type}IsAirCooled(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.IsLiquidCooled()||this.IsRotary())}GetCowlList(){return this.cowl_list}GetCowl(){return this.cowl_sel}GetCowlEnabled(){const t=[];for(const e of this.cowl_list)this.GetIsPulsejet()||this.GetIsTurbine()?t.push(e.air&&e.rotary&&e.liquid):this.IsLiquidCooled()?t.push(e.liquid):this.IsRotary()?t.push(e.rotary):t.push(e.air);return t}GetHasOilTank(){return this.etype_stats.oiltank}GetHasOilCooler(){return this.etype_stats.stats.cooling>0}GetHasOilPan(){return this.IsAirCooled()}VerifyCowl(t){const e=this.GetCowlEnabled();e[t]&&(this.cowl_sel=t),e[this.cowl_sel]||(this.cowl_sel=0)}SetCowl(t){this.VerifyCowl(t),this.CalculateStats()}GetGeneratorEnabled(){return!(this.GetIsPulsejet()||this.use_pp||this.GetIsElectric())}GetGenerator(){return this.is_generator}SetGenerator(t){this.GetGeneratorEnabled()?this.is_generator=t:this.is_generator=!1,this.is_generator&&(this.gp_count=0,this.gpr_count=0,this.use_ds=!1,this.use_pp=!1),this.CalculateStats()}GetIsElectric(){return this.etype_inputs.engine_type==w.ELECTRIC}GetAlternatorEnabled(){return!(this.GetIsPulsejet()||this.is_generator||this.GetIsElectric())}GetAlternator(){return this.has_alternator}SetAlternator(t){this.GetAlternatorEnabled()?this.has_alternator=t:this.has_alternator=!1,this.CalculateStats()}GetRumble(){return this.etype_stats.rumble}IsTractor(){return!(this.is_internal||this.GetGenerator()||"Tractor"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetTractorSpinner(){return{has:this.IsTractor()&&!(this.outboard_prop&&!this.use_pp),spinner:this.GetSpinner()}}IsPusher(){return!(this.is_internal||this.GetGenerator()||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetPusherSpinner(){return{has:this.IsPusher()&&!this.outboard_prop,spinner:this.GetSpinner()}}GetSpinner(){if(this.gp_count>0&&!this.GetGenerator()){if(this.use_ds&&("Center-Mounted Tractor"==this.mount_list[this.mount_sel].name||"Center-Mounted Pusher"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name))return[!0,!0];if(!this.etype_stats.oiltank)return[!0,!1]}return[!1,!1]}IsElectrics(){return this.has_alternator||this.GetGenerator()}GetEngineHeight(){return this.GetGenerator()?5:"Pod"==this.mount_list[this.mount_sel].name||this.etype_stats.pulsejet||this.is_internal||this.outboard_prop?2:"Nacelle (Offset)"==this.mount_list[this.mount_sel].name?1:"Nacelle (Inside)"==this.mount_list[this.mount_sel].name||"Channel Tractor"==this.mount_list[this.mount_sel].name||"Wing Pod"==this.mount_list[this.mount_sel].name?0:-1}IsTractorRotary(){return!this.GetGenerator()&&this.IsRotary()&&("Tractor"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}IsDiesel(){return this.etype_inputs.upgrades[3]}SetCalculateStats(t){this.CalculateStats=t}SetInternal(t){this.is_internal=t,t&&(this.use_ds=!1)}VerifyMount(){if(this.GetIsTurbine()&&!this.GetIsTurboprop())for(;!this.mount_list[this.mount_sel].turbine;)this.mount_sel++;else if(this.GetIsPulsejet()){if("fuselage"==this.mount_list[this.mount_sel].mount_type)for(let t=0;t0&&t.era.push({name:"Propeller Gearing",era:"WWI"}),this.gpr_count>0&&t.era.push({name:"Reliable Gearing",era:"Roaring 20s"}),this.use_ds&&(t.mass+=1),t=t.Add(this.cowl_list[this.cowl_sel].stats),t.mass+=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].mpd),t.drag=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].ed),this.use_pp&&(t.power*=2,t.mass*=2,t.cooling*=2,t.fuelconsumption*=2,t.cost*=2,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.upkeep*=2,t.reqsections*=2,t.charge*=2,t.power=Math.floor(1e-6+this.mount_list[this.mount_sel].powerfactor*t.power)),"No Cowling"==this.cowl_list[this.cowl_sel].name||"Sealed Cowl"==this.cowl_list[this.cowl_sel].name||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name||(t.cost+=2),this.IsAirCooled()&&this.intake_fan?(t.mass+=3,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.cost+=4,t.era.push({name:"Air Cooling Fan",era:"WWII"})):this.intake_fan=!1,this.GetHasOilCooler()&&(t.drag+=Math.floor(t.power/15)),this.GetIsPulsejet()||(t=t.Add(this.mount_list[this.mount_sel].stats),t.maxstrain-=Math.floor(1e-6+this.mount_list[this.mount_sel].strainfactor*this.etype_stats.stats.mass),t.drag+=Math.floor(1e-6+this.mount_list[this.mount_sel].dragfactor*this.etype_stats.stats.mass)),this.is_generator?(t.charge=Math.floor(1e-6+2*t.power/10)+2,t.power=0,t.visibility=2):this.has_alternator&&(t.charge=Math.floor(1e-6+t.power/10)+1,t.mass+=1,t.cost+=2,this.use_pp&&"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(t.mass+=1,t.cost+=2)),this.outboard_prop&&(t.drag+=3,this.use_pp&&(t.escape+=2)),this.is_first_pulsejet&&(t.cost+=5),t.pitchspeed=0,t.reliability=0,t}GetElectrics(){return{storage:0,equipment:[]}}}class X extends D{constructor(t,e,s){super(),this.need_cool=0,this.idx_type=1,this.idx_mount=1,this.idx_coolant=0,this.metal_area=0,this.engine_count=0,this.type_list=t,this.mount_list=e,this.coolant_list=s,this.harden_cool=!1}toJSON(){return{type:this.idx_type,mount:this.idx_mount,coolant:this.idx_coolant,harden_cool:this.harden_cool}}fromJSON(t,e){this.idx_type=t.type,this.idx_mount=t.mount,this.idx_coolant=t.coolant,e>10.85&&(this.harden_cool=t.harden_cool)}serialize(t){t.PushNum(this.idx_type),t.PushNum(this.idx_mount),t.PushNum(this.idx_coolant),t.PushBool(this.harden_cool)}derserialize(t){this.idx_type=t.GetNum(),this.idx_mount=t.GetNum(),this.idx_coolant=t.GetNum(),t.version>10.85&&(this.harden_cool=t.GetBool())}GetTypeList(){return this.type_list}GetMountList(){return this.mount_list}GetCoolantList(){return this.coolant_list}CanType(){const t=[...Array(this.type_list.length).fill(!0)];for(let e=0;et;)this.engines.pop();var e=null;for(this.engines.length>0&&(e=JSON.stringify(this.engines[this.engines.length-1].toJSON()));this.engines.lengtht;)this.radiators.pop();for(;this.radiators.length0&&!this.NeedCooling()&&this.SetNumberOfRadiators(0),this.radiators.length}NeedCooling(){let t=!1;for(const e of this.engines)t=t||e.NeedCooling();return t}UpdateReliability(t){for(const e of this.engines){let s=new u;e.GetRadiator()=0&&(s=this.radiators[e.GetRadiator()].PartStats()),e.UpdateReliability(t.reliability+s.reliability)}}SetAsymmetry(t){this.is_asymmetric=t,this.CalculateStats()}GetAsymmetry(){return this.is_asymmetric}GetNumPropellers(){var t=0;for(const e of this.engines)t+=e.GetNumPropellers();return t}GetOverspeed(){let t=100;for(const e of this.engines)t=Math.min(t,e.GetOverspeed());return t}GetRumble(){var t=0;for(const e of this.engines)t+=e.GetRumble();return t}GetMaxRumble(){var t=0;for(const e of this.engines)t=Math.max(t,e.GetRumble());return t}GetTractorSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetTractorSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}GetPusherSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetPusherSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}IsElectrics(){for(const t of this.engines)if(t.IsElectrics())return!0;return!1}HaveParasol(t){for(const e of this.radiators)e.SetParasol(t)}SetMetalArea(t){for(const e of this.radiators)e.SetMetalArea(t)}SetTailMods(t,e,s){for(const i of this.engines)i.SetTailMods(t,e,s)}GetEngineHeight(){var t=2;for(const e of this.engines)t=Math.min(t,e.GetEngineHeight());return t}HasTractorRotary(){for(const t of this.engines)if(t.IsTractorRotary())return!0;return!1}SetInternal(t){for(const e of this.engines)e.SetInternal(t);if(t)for(const t of this.radiators)t.SetMetalArea(0),t.SetParasol(!1)}HasPulsejet(){for(const t of this.engines)if(t.GetIsPulsejet())return!0;return!1}HasTurbineNoProp(){for(const t of this.engines)if(t.GetIsTurbine()&&0==t.GetNumPropellers())return!0;return!1}HasDiesel(){for(const t of this.engines)if(t.IsDiesel())return!0;return!1}GetEngineTypes(){var t=[];for(const e of this.engines)e.GetNumPropellers()>0?t.push({type:P.PROPELLER,num:e.GetNumPropellers()}):e.GetIsPulsejet()?t.push({type:P.PULSEJET,num:0}):e.GetIsTurbine()&&t.push({type:P.TURBINE,num:e.GetCurrentStats().stats.pitchspeed});return t}GetIsFlammable(){for(const t of this.radiators)if(t.GetIsFlammable())return!0;return!1}PartStats(){var t=new u;const e=new Array(this.GetNumberOfRadiators()).fill(null).map((()=>({cool:0,count:0})));var s=0,i=100,a=!1,n=2;for(let r of this.engines){!a&&r.GetIsPulsejet()?(a=!0,r.SetFirstPulsejet(!0)):r.SetFirstPulsejet(!1);const o=r.PartStats();n=Math.min(n,o.visibility),t=t.Add(o),r.NeedCooling()&&(e[r.GetRadiator()].cool+=r.GetCooling(),e[r.GetRadiator()].count+=1),s+=r.GetCurrentStats().stats.cost,o.pitchspeed>0&&(i=Math.min(i,o.pitchspeed))}t.visibility=n,i<100&&(t.pitchspeed=i),t.upkeep=Math.floor(1e-6+Math.min(t.upkeep,s));let o=new u;const l=new Map;for(let t=0;t0?t.warnings.push({source:h("Rotary"),warning:h("Rotary Right Warning"),color:c.WHITE}):_<0&&t.warnings.push({source:h("Rotary"),warning:h("Rotary Left Warning"),color:c.WHITE}),t.reliability=0,t}SetCalculateStats(t){this.CalculateStats=t}GetHasTractorNacelles(){let t=0;for(const e of this.engines)e.GetIsTractorNacelle()&&t++;return t>1}GetElectrics(){let t={storage:0,equipment:[]};for(let e=0;e10.25&&(this.sel_skin=t.sel_skin),this.interal_bracing_count=this.CountInternalBracing()}serialize(t){t.PushNum(this.section_list.length);for(let e=0;e10.25&&(this.sel_skin=t.GetNum()),this.interal_bracing_count=this.CountInternalBracing()}DuplicateSection(t,e=1){const s=this.section_list[t];for(let i=0;ithis.CountSections()+this.tail_section_list.length)for(let t=this.section_list.length-1;t>=0;t--)if(this.section_list[t].internal_bracing){this.interal_bracing_count--,this.section_list.splice(t,1);break}e&&this.CalculateStats()}}SetRequiredSections(t){if(this.required_sections=t,this.required_sections>this.CountSections()&&(0==this.section_list.length&&this.section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),this.required_sections-this.CountSections()>0))for(let t=this.section_list.length-1;t>=0;t--)if(!this.section_list[t].internal_bracing)return void this.DuplicateSection(t,this.required_sections-this.CountSections())}SetRequiredTailSections(t){for(t>this.tail_section_list.length&&(0==this.tail_section_list.length&&this.tail_section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),t-this.tail_section_list.length>0&&this.DuplicateTailSection(this.tail_section_list.length-1,t-this.tail_section_list.length));t0&&!this.section_list[t].internal_bracing;t--);this.DeleteSection(t,!1)}this.CalculateStats()}CountSections(){return this.section_list.length-this.interal_bracing_count}GetNumFrames(){return this.CountSections()+this.tail_section_list.length}CountInternalBracing(){var t=0;for(const e of this.section_list)e.internal_bracing&&t++;return t}BaseType(){const t=[...Array(this.frame_list.length).fill(0)];for(const e of this.section_list)e.internal_bracing||t[e.frame]++;for(const e of this.tail_section_list)e.internal_bracing||t[e.frame]++;var e=0,s=0;for(let i=t.length-1;i>=0;i--)t[i]>s&&(s=t[i],e=i);return e}GetFrameList(){return this.frame_list}GetSkinList(){return this.skin_list}GetSectionList(){return this.section_list}SetFrame(t,e){this.section_list[t].frame=e,this.frame_list[e].geodesic||(this.section_list[t].geodesic=!1),this.CalculateStats()}SetGeodesic(t,e){this.frame_list[this.section_list[t].frame].geodesic&&(this.section_list[t].geodesic=e,this.CalculateStats())}SetMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].monocoque=e,this.CalculateStats())}SetLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].lifting_body=e,this.CalculateStats())}SetInternalBracing(t,e){e&&!this.section_list[t].internal_bracing&&this.PossibleInternalBracing(!0)&&this.CountSections()>this.required_sections?(this.section_list[t].internal_bracing=!0,this.section_list[t].monocoque=!1,this.section_list[t].lifting_body=!1,this.interal_bracing_count++,this.CalculateStats()):e||(this.section_list[t].internal_bracing=!1,this.interal_bracing_count--,this.CalculateStats())}PossibleInternalBracing(t=!1){var e=this.CountSections();return this.farman||(e+=this.tail_section_list.length),t&&(e-=1),this.interal_bracing_count+1<=e}PossibleGeodesic(t){return this.frame_list[this.section_list[t].frame].geodesic&&!this.section_list[t].monocoque}PossibleMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].lifting_body}PossibleLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].monocoque}PossibleTailGeodesic(t){return this.frame_list[this.tail_section_list[t].frame].geodesic&&!this.tail_section_list[t].monocoque}PossibleTailMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].lifting_body}PossibleTailLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].monocoque}PossibleRemoveSections(){return this.CountSections()>this.required_sections}GetFarmanOrBoom(){return this.farman||this.boom}SectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),t.internal_bracing||(e.drag+=4,t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}TailSectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),e.drag+=4,this.farman||(t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}CountMainLiftingBody(){var t=0;for(const e of this.section_list)e.lifting_body&&t++;return t}CountTailLiftingBody(){var t=0;for(const e of this.tail_section_list)e.lifting_body&&t++;return t}CountLiftingBody(){return this.CountMainLiftingBody()+this.CountTailLiftingBody()}SetIsTandem(t){this.is_tandem!=t&&(this.is_tandem=t,this.SetTailType(this.sel_tail))}SetTailType(t){0==this.tail_list[t].stats.reqsections&&this.is_tandem&&t++,this.sel_tail=t,this.SetRequiredTailSections(this.tail_list[t].stats.reqsections)}GetTailType(){return this.sel_tail}GetTailList(){return this.tail_list}GetTailSectionList(){return this.tail_section_list}SetUseFarman(t){if(this.farman=t,t&&this.boom&&(this.boom=!1),this.farman)for(const t of this.tail_section_list)t.monocoque=!1,t.lifting_body=!1;this.CalculateStats()}GetUseFarman(){return this.farman}SetUseBoom(t){this.boom=t,t&&this.farman&&(this.farman=!1),this.CalculateStats()}GetUseBoom(){return this.boom}SetTailFrame(t,e){this.tail_section_list[t].frame=e,this.frame_list[e].geodesic||(this.tail_section_list[t].geodesic=!1),this.CalculateStats()}SetTailGeodesic(t,e){this.frame_list[this.tail_section_list[t].frame].geodesic&&(this.tail_section_list[t].geodesic=e,this.CalculateStats())}SetTailMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].monocoque=e,this.CalculateStats())}SetTailLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].lifting_body=e,this.CalculateStats())}SetHasTractorNacelles(t){this.has_tractor_nacelles=t}GetHasTractorNacelles(){return this.has_tractor_nacelles}CanFlyingWing(){for(const t of this.section_list)if(t.lifting_body)return!0;for(const t of this.tail_section_list)if(t.lifting_body)return!0;return!1}GetFlyingWing(){return this.flying_wing}SetFlyingWing(t){t&&this.CanFlyingWing()?this.flying_wing=!0:this.flying_wing=!1,this.CalculateStats()}GetIsTailless(){return 0==this.tail_section_list.length}SetAllFrame(t){for(const e of this.section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);for(const e of this.tail_section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);this.CalculateStats()}SetAllSkin(t){this.sel_skin=t;for(const e of this.section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);for(const e of this.tail_section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);this.CalculateStats()}GetArmor(){return"Dragon Skin"==this.skin_list[this.sel_skin].name?5:0}GetIsFlammable(){return!!this.skin_list[this.sel_skin].flammable}GetSkin(){return this.sel_skin}CanCutout(){let t=this.section_list.length*this.skin_list[this.sel_skin].stats.visibility;return this.farman?t+=this.tail_section_list.length:t+=this.tail_section_list.length*this.skin_list[this.sel_skin].stats.visibility,t<3}SetCalculateStats(t){this.CalculateStats=t}PartStats(){this.CanFlyingWing()||(this.flying_wing=!1);var t=new u;const e=this.BaseType();t.structure=this.frame_list[e].basestruct,t.cost=this.frame_list[e].basecost;var s=this.skin_list[this.sel_skin].monocoque_structure<0;for(const e of this.section_list)t=t.Add(this.SectionStats(e)),s=s&&(e.internal_bracing||e.monocoque);var i=new u;for(const t of this.tail_section_list)i=i.Add(this.TailSectionStats(t)),this.farman||(s=s&&(t.internal_bracing||t.monocoque));s&&(t.structure+=30),t=t.Add(this.tail_list[this.sel_tail].stats),this.boom&&(i.maxstrain-=i.mass,this.has_tractor_nacelles||(i.drag=Math.floor(1e-6+1.5*i.drag))),this.farman?(t.drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor,t.visibility+=this.tail_section_list.length,i.mass=Math.floor(1e-6+.5*i.mass),t=t.Add(i)):((t=t.Add(i)).drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor);const a=this.CountLiftingBody();return t.cost+=a,this.flying_wing?t.liftbleed+=5:t.drag+=a,this.PossibleRemoveSections()&&this.CountMainLiftingBody()11.15)this.wing_list=t.wing_list,this.mini_wing_list=t.mini_wing_list;else{const e=t.wing_list;this.wing_list=this.OldtoNew(e);const s=t.mini_wing_list;this.mini_wing_list=this.OldtoNew(s)}this.wing_stagger=t.wing_stagger,this.is_swept=t.is_swept,this.is_closed=t.is_closed}OldtoNew(t){const e=[];for(const s of t)e.push({surface:s.surface,area:s.area,span:s.span,anhedral:s.anhedral,dihedral:s.dihedral,gull:!1,deck:s.deck});return e}serialize(t){t.PushNum(this.wing_list.length);for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.wing_list.push(e)}const s=t.GetNum();this.mini_wing_list=[];for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.mini_wing_list.push(e)}this.wing_stagger=t.GetNum(),this.is_swept=t.GetBool(),this.is_closed=t.GetBool()}SetRotorSpan(t){this.rotor_span=t}GetWingList(){return this.wing_list}GetMiniWingList(){return this.mini_wing_list}GetSkinList(){return this.skin_list}GetStaggerList(){return this.stagger_list}GetDeckList(){return this.deck_list}DeckCountFull(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.wing_list)t[e.deck]++;return t}DeckCountMini(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.mini_wing_list)t[e.deck]++;return t}CanStagger(){const t=[...Array(this.stagger_list.length).fill(!1)];if(this.acft_type==k.ORNITHOPTER_FLUTTER)this.wing_list.length>1?t[1]=!0:t[0]=!0;else{if(this.wing_list.length>1)for(let e=1;e1?this.wing_stagger=1:this.wing_stagger=0)}SetStagger(t){for(this.wing_stagger=t;this.stagger_list[t].wing_count=0;e--){const s=this.wing_list[e];t[s.deck]>1&&this.deck_list[s.deck].limited&&(t[s.deck]--,this.wing_list.splice(e,1))}}this.CalculateStats()}GetStagger(){return this.wing_list.length>0?this.wing_stagger:-1}CanAddFullWing(t){if(t>=this.deck_list.length&&console.log("Deck out of Bounds"),!this.stagger_list[this.wing_stagger].inline){if(t==O.SHOULDER&&this.HasPolishWing())return!1;if(this.DeckCountFull()[t]==O.SHOULDER&&this.deck_list[t].limited)return!1}return 0==this.DeckCountMini()[t]}CanAddMiniWing(t){const e=this.DeckCountFull(),s=this.DeckCountMini();return 0==e[t]&&0==s[t]}CanMoveFullWing(t,e){const s=this.wing_list[t];this.wing_list.splice(t,1);const i=this.CanAddFullWing(e);return this.wing_list.splice(t,0,s),i}CanMoveMiniWing(t,e){const s=this.mini_wing_list[t];this.mini_wing_list.splice(t,1);const i=this.CanAddMiniWing(e);return this.mini_wing_list.splice(t,0,s),i}GetWingHeight(){let t=0;for(const e of this.wing_list)t=Math.max(t,4-e.deck);return t}CanClosed(){return this.wing_list.length>1}SetClosed(t){this.wing_list.length>0?this.is_closed=t:this.is_closed=!1,this.CalculateStats()}GetClosed(){return this.is_closed}CanSwept(){return this.wing_list.length>0}SetSwept(t){this.wing_list.length>0?this.is_swept=t:this.is_swept=!1,this.CalculateStats()}GetSwept(){return this.is_swept}GetTandem(){return this.stagger_list[this.wing_stagger].inline&&this.wing_list.length>1}GetMonoplane(){return 1==this.wing_list.length}GetStaggered(){return 0!=this.stagger_list[this.wing_stagger].stats.liftbleed}SetFullWing(t,e){this.wing_list.length!=t&&this.wing_list.splice(t,1),e.area!=e.area&&(e.area=3),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,3),e.span=Math.max(e.span,1),this.CanAddFullWing(e.deck)&&this.wing_list.splice(t,0,e)),this.wing_list.length>1&&0==this.wing_stagger?this.wing_stagger=4:this.wing_list.length<=1&&(this.wing_stagger=0),e.dihedral=Math.floor(1e-6+e.dihedral),e.anhedral=Math.floor(1e-6+e.anhedral),e.dihedral=Math.max(0,Math.min(e.dihedral,e.span-1)),e.anhedral=Math.max(0,Math.min(e.anhedral,e.span-1-e.dihedral)),this.CalculateStats()}SetMiniWing(t,e){this.mini_wing_list.length!=t&&this.mini_wing_list.splice(t,1),e.area!=e.area&&(e.area=2),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,1),e.area=Math.min(e.area,2),e.span=Math.max(e.span,1),this.CanAddMiniWing(e.deck)&&this.mini_wing_list.splice(t,0,e)),this.CalculateStats()}HasNonGullDeck(t){for(const e of this.wing_list)if(e.deck==t&&!e.gull)return!0;return!1}CanGull(t){if(t==O.PARASOL){if(!this.GetTandem()&&this.HasNonGullDeck(O.SHOULDER))return!1}else{if(t==O.SHOULDER)return!1;if(!this.GetTandem()&&this.HasNonGullDeck(t-1))return!1}return!0}IsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}NeedHStab(){return this.stagger_list[this.wing_stagger].hstab}NeedTail(){return this.NeedHStab()||!this.is_swept}GetSpan(){let t=0;for(const e of this.wing_list){const s=e.span;t=Math.max(t,s)}for(const e of this.mini_wing_list){const s=e.span;t=Math.max(t,s)}return t}GetArea(){let t=0;for(const e of this.wing_list)t+=e.area;for(const e of this.mini_wing_list)t+=e.area;return t}GetParasol(){for(const t of this.wing_list)if(t.deck==O.PARASOL)return!0;for(const t of this.mini_wing_list)if(t.deck==O.PARASOL)return!0;return!1}GetMetalArea(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].metal&&(t+=e.area);for(const e of this.mini_wing_list)this.skin_list[e.surface].metal&&(t+=e.area);return t}GetWingDrag(){let t=0;const e=this.DeckCountFull();let s=0,i=0;for(const a of this.wing_list){const r=a.span;let n=a.area;s=Math.max(s,r),a.gull&&(n=Math.floor(1e-6+1.1*n));let o=Math.max(1,6*n*n/(r*r));o=Math.max(1,o*this.skin_list[a.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&e[a.deck]>1&&(o=Math.floor(1e-6+.75*o),o=Math.max(1,o)),o=Math.floor(1e-6+o),s==r&&(i=i),t+=o}for(const e of this.mini_wing_list){const s=e.span;let i=Math.max(1,6*e.area*e.area/(s*s));i=Math.max(1,i*this.skin_list[e.surface].dragfactor),i=Math.floor(1e-6+i),t+=i}const a=this.GetIsSesquiplane();return(a.is||this.GetMonoplane())&&-1!=a.deck&&(t-=Math.floor(1e-6+(1-this.long_list[a.deck].dragfactor)*i)),t}GetIsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}SetAircraftMass(t){this.plane_mass=t}GetPaperMass(){let t=0;for(const e of this.wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}for(const e of this.mini_wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}return Math.max(-Math.floor(1e-6+.25*this.plane_mass),t)}GetIsSesquiplane(){let t=0,e=-1,s=0,i=1e100,a=0;for(const r of this.wing_list)r.area>t?(t=r.area,e=r.deck,s=r.span):r.area==t&&(e=-1),i>r.area&&(i=r.area,a=r.span);let r=t>=2*i;return r=r&&!this.GetMonoplane()&&!this.GetTandem(),r?{is:r,deck:e,super_small:.75*s>=a}:{is:!1,deck:e,super_small:!1}}HasPolishWing(){for(const t of this.wing_list)if(t.deck==O.PARASOL&&1==t.gull)return!0;return!1}HasInvertedGull(){let t=-1;for(const e of this.wing_list)e.gull&&e.deck>O.SHOULDER&&(t=Math.max(t,e.deck));return t}CanCutout(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].transparent&&(t+=1);return t<3}PartStats(){this.CanClosed()||(this.is_closed=!1),this.CanSwept()||(this.is_swept=!1);var t=new u;let e=!1;const s=this.DeckCountFull();let i=!1,a=this.rotor_span,r=0,n=0;for(let i of this.wing_list){this.CanGull(i.deck)||(i.gull=!1),a=Math.max(a,i.span),e?(t.control+=3,t.liftbleed+=5,t.visibility-=1):e=!0;let o=new u;o=o.Add(this.skin_list[i.surface].stats.Multiply(i.area)),o.wingarea=i.area,o.maxstrain+=Math.min(0,-(2*i.span+i.area-10)),this.acft_type==k.ORNITHOPTER_BUZZER&&(o.maxstrain+=Math.min(0,-(2*i.span+i.area-10))),o.maxstrain*=this.skin_list[i.surface].strainfactor,this.skin_list[i.surface].transparent&&n<3&&(o.visibility+=1,n+=1);const l=i.span;let h=i.area;i.gull&&(h=Math.floor(1e-6+1.1*h));const c=Math.max(1,6*h*h/(l*l));o.drag=o.drag+c,o.drag=Math.max(1,o.drag*this.skin_list[i.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&s[i.deck]>1&&(o.drag=Math.floor(1e-6+.75*o.drag),o.drag=Math.max(1,o.drag)),t=t.Add(this.deck_list[i.deck].stats),o.latstab+=i.dihedral-i.anhedral,o.liftbleed+=i.dihedral+i.anhedral,o.Round(),a==i.span&&(r=o.drag),o.mass<0&&(o.mass=0),t=t.Add(o)}for(const e of this.mini_wing_list){a=Math.max(a,e.span),t.control+=1,i?t.liftbleed+=1:i=!0;const s=this.skin_list[e.surface].stats.Multiply(e.area);s.wingarea=e.area,s.maxstrain+=Math.min(0,-(2*e.span+e.area-10)),s.maxstrain*=this.skin_list[e.surface].strainfactor;const r=e.span;s.drag=Math.max(1,s.drag+6*e.area*e.area/(r*r)),s.drag=Math.max(1,s.drag*this.skin_list[e.surface].dragfactor),s.latstab+=e.dihedral-e.anhedral,s.liftbleed+=e.dihedral+e.anhedral,s.Round(),s.mass<0&&(s.mass=0),t=t.Add(s)}t.control+=8-a,t.latstab+=Math.min(0,a-8);const o=this.GetIsSesquiplane();if((o.is||this.GetMonoplane())&&-1!=o.deck&&((t=t.Add(this.long_list[o.deck].stats)).drag-=Math.floor(1e-6+(1-this.long_list[o.deck].dragfactor)*r)),o.is&&(t.liftbleed-=2,t.control+=2),this.stagger_list[this.wing_stagger].inline)for(const e of s)e>1&&(t.liftbleed+=3*(e-1));switch(this.HasPolishWing()&&(t.visibility+=1,t.maxstrain+=10),this.HasInvertedGull()){case 1:case 2:case 3:break;case 4:t.maxstrain+=10,t.crashsafety+=1}if((this.HasInvertedGull()>0||this.HasPolishWing())&&t.era.push({name:"Gull Wing",era:"Coming Storm"}),this.is_swept&&(t.liftbleed+=5,t.latstab--),this.is_closed){const e=Math.floor(1e-6+this.wing_list.length/2);t.mass+=1*e,t.control-=5*e,t.maxstrain+=20*e}return this.wing_list.length>1&&(t=t.Add(this.stagger_list[this.wing_stagger].stats)),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){const t={storage:0,equipment:[]};let e=0,s="";for(const t of this.wing_list){const i=this.skin_list[t.surface];0!=i.stats.charge&&(s=h(i.name),e+=i.stats.charge*t.area,e=Math.floor(1e-6+e))}return 0!=e&&t.equipment.push({source:s,charge:e.toString()}),t}}class et extends D{constructor(t){super(),this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.is_heli=!1,this.hstab_sel=0,this.hstab_count=1,this.hstab_list=[];for(const e of t.hstab)this.hstab_list.push({name:e.name,is_canard:e.is_canard,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail});this.vstab_sel=0,this.vstab_count=1,this.vstab_list=[];for(const e of t.vstab)this.vstab_list.push({name:e.name,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail})}toJSON(){return{hstab_sel:this.hstab_sel,hstab_count:this.hstab_count,vstab_sel:this.vstab_sel,vstab_count:this.vstab_count}}fromJSON(t,e){this.hstab_sel=t.hstab_sel,this.hstab_count=t.hstab_count,this.vstab_sel=t.vstab_sel,this.vstab_count=t.vstab_count}serialize(t){t.PushNum(this.hstab_sel),t.PushNum(this.hstab_count),t.PushNum(this.vstab_sel),t.PushNum(this.vstab_count)}deserialize(t){this.hstab_sel=t.GetNum(),this.hstab_count=t.GetNum(),this.vstab_sel=t.GetNum(),this.vstab_count=t.GetNum()}IsDefault(){return 0==this.hstab_sel&&1==this.hstab_count&&0==this.vstab_sel&&1==this.vstab_count}GetHStabList(){return this.hstab_list}GetVStabList(){return this.vstab_list}GetHStabType(){return this.hstab_sel}SetHStabType(t){("The Wings"!=this.hstab_list[t].name||this.is_tandem||this.is_swept)&&(this.hstab_list[t].is_vtail?this.SetVTail():this.hstab_list[this.hstab_sel].is_vtail&&(this.vstab_sel=0,this.vstab_count=1),this.hstab_sel=t,this.SetHStabCount(this.hstab_count))}GetHValidList(){var t=[];if(this.is_heli)t=Array(this.hstab_list.length).fill(!1),this.have_tail?t[0]=!0:t[1]=!0;else for(const e of this.hstab_list)"The Wings"!=e.name&&"Outboard"!=e.name||this.is_tandem||this.is_swept?e.is_tail&&!this.have_tail?t.push(!1):t.push(!0):t.push(!1);return t}GetIsVTail(){return this.hstab_list[this.hstab_sel].is_vtail}SetVTail(){for(let t=0;t=0?this.hstab_list[this.hstab_sel].increment:1}GetVStabCount(){return this.vstab_count}SetVStabCount(t){if((t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.vstab_count=t,0!=this.vstab_list[this.vstab_sel].increment)for(;this.vstab_count%this.vstab_list[this.vstab_sel].increment!=0;)this.vstab_count++;else this.vstab_count=0;this.CalculateStats()}GetVStabIncrement(){return this.vstab_sel>=0?this.vstab_list[this.vstab_sel].increment:1}SetEngineCount(t){this.engine_count=t}GetIsTandem(){return this.is_tandem}SetIsTandem(t){this.is_tandem=t}SetIsSwept(t){this.is_swept=t}CanVOutboard(){return this.is_swept||this.is_tandem||this.hstab_list[this.hstab_sel].is_canard&&this.hstab_count>0}GetVOutboard(){return"Outboard"==this.vstab_list[this.vstab_sel].name}GetCanard(){return this.hstab_list[this.hstab_sel].is_canard}SetLiftingArea(t){this.lifting_area=t}SetHaveTail(t){if(this.have_tail=t,!t){this.GetHValidList()[this.hstab_sel]||(this.hstab_sel=2);const t=this.GetVValidList();t[this.vstab_sel]||(t[1]||(this.hstab_sel=2),this.vstab_sel=1,this.vstab_count%2!=0&&this.vstab_count++)}this.is_heli&&(this.have_tail?this.hstab_sel=0:this.hstab_sel=1,this.hstab_count=1)}SetHelicopter(t){this.is_heli=t,t&&(this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.lifting_area=0,this.engine_count=0,this.hstab_sel=0,this.hstab_count=1,this.vstab_sel=0,this.vstab_count=1)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=this.GetHValidList();t[this.hstab_sel]||(this.hstab_sel=0,t[this.hstab_sel]||(this.hstab_sel=0,this.hstab_count=0));const e=this.GetVValidList();e[this.vstab_sel]||(this.vstab_sel=0,e[this.vstab_sel]||(this.vstab_sel=0,this.vstab_count=0));var s=new u;if(this.hstab_count>0){s=s.Add(this.hstab_list[this.hstab_sel].stats);var i=0;this.is_heli?(i=Math.floor(1e-6+this.wing_drag/8*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/4*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(1,i))}else(this.hstab_sel<0||0!=this.hstab_list[this.hstab_sel].increment)&&(s.pitchstab-=Math.floor(1e-6+this.lifting_area/2),s.liftbleed+=5);if(this.vstab_count>0?(s=s.Add(this.vstab_list[this.vstab_sel].stats),i=0,this.is_heli?(i=Math.floor(1e-6+this.wing_drag/16*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/8*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(1,i))):(this.vstab_sel<0||0!=this.vstab_list[this.vstab_sel].increment||0==this.vstab_list[this.vstab_sel].increment&&0==this.hstab_count)&&(s.latstab-=this.lifting_area),s.drag+=2*(Math.max(0,this.hstab_count-1)+Math.max(0,this.vstab_count-1)),this.vstab_sel>=0&&0!=this.vstab_list[this.vstab_sel].increment){var a=Math.max(0,this.hstab_count-1);const t=Math.min(this.engine_count-1,this.vstab_count-1);a+=Math.max(0,this.vstab_count-1-t),s.control+=3*t+a}else{const t=Math.max(0,Math.min(this.engine_count-1,this.hstab_count-1));a=Math.max(0,this.hstab_count-1-t),s.control+=3*t+a}return s}GetElectrics(){return{storage:0,equipment:[]}}}class st extends D{constructor(t){super(),this.span=0,this.is_cantilever=0,this.wing_area=0,this.mp=0,this.is_boom=!1,this.acft_type=k.AIRPLANE,this.aileron_sel=0,this.aileron_list=[];for(const e of t.ailerons)this.aileron_list.push({name:e.name,warping:e.warping,stats:new u(e)});this.rudder_sel=0,this.rudder_list=[];for(const e of t.rudders)this.rudder_list.push({name:e.name,stats:new u(e)});this.elevator_sel=0,this.elevator_list=[];for(const e of t.elevators)this.elevator_list.push({name:e.name,stats:new u(e)});this.flaps_sel=0,this.flaps_list=[];for(const e of t.flaps)this.flaps_list.push({name:e.name,costfactor:e.costfactor,stats:new u(e)});this.slats_sel=0,this.slats_list=[];for(const e of t.slats)this.slats_list.push({name:e.name,stats:new u(e)});this.drag_list=[];for(const e of t.drag_inducers)this.drag_list.push({name:e.name,stats:new u(e)});this.drag_sel=[...Array(this.drag_list.length).fill(!1)]}toJSON(){return{aileron_sel:this.aileron_sel,rudder_sel:this.rudder_sel,elevator_sel:this.elevator_sel,flaps_sel:this.flaps_sel,slats_sel:this.slats_sel,drag_sel:this.drag_sel}}fromJSON(t,e){this.aileron_sel=t.aileron_sel,this.rudder_sel=t.rudder_sel,this.elevator_sel=t.elevator_sel,this.flaps_sel=t.flaps_sel,this.slats_sel=t.slats_sel,this.drag_sel=b(t.drag_sel,this.drag_sel.length)}serialize(t){t.PushNum(this.aileron_sel),t.PushNum(this.rudder_sel),t.PushNum(this.elevator_sel),t.PushNum(this.flaps_sel),t.PushNum(this.slats_sel),t.PushBoolArr(this.drag_sel)}deserialize(t){this.aileron_sel=t.GetNum(),this.rudder_sel=t.GetNum(),this.elevator_sel=t.GetNum(),this.flaps_sel=t.GetNum(),this.slats_sel=t.GetNum(),this.drag_sel=t.GetBoolArr(this.drag_sel.length)}IsDefault(){return 0==this.aileron_sel&&0==this.rudder_sel&&0==this.elevator_sel&&0==this.flaps_sel&&0==this.slats_sel&&0==this.drag_sel.reduce(((t,e)=>t||e),!1)}GetAileronList(){return this.aileron_list}CanAileron(){const t=[];if(H(this.acft_type))for(const e of this.aileron_list)t.push(e.warping);else for(const e of this.aileron_list)e.warping&&0==this.wing_area?t.push(!1):t.push(!0);return t}GetAileron(){return this.aileron_sel}SetAileron(t){this.aileron_sel=t,this.CalculateStats()}GetRudderList(){return this.rudder_list}CanRudder(){return this.can_rudder}SetCanRudder(t){this.can_rudder=t,t||(this.rudder_sel=0)}GetRudder(){return this.rudder_sel}SetRudder(t){this.rudder_sel=t,this.CalculateStats()}GetElevatorList(){return this.elevator_list}CanElevator(){return this.can_elevator}SetCanElevator(t){this.can_elevator=t,t||(this.elevator_sel=0)}GetElevator(){return this.elevator_sel}SetElevator(t){this.elevator_sel=t,this.CalculateStats()}GetFlapsList(){return this.flaps_list}GetFlaps(){return this.flaps_sel}SetFlaps(t){this.flaps_sel=t,this.CalculateStats()}GetFlapCost(t){return t&&(this.mp=t),this.flaps_list[this.flaps_sel].costfactor>0?Math.max(1,Math.floor(1e-6+this.flaps_list[this.flaps_sel].costfactor*this.mp)):0}GetSlatsList(){return this.slats_list}GetSlats(){return this.slats_sel}SetSlats(t){this.slats_sel=t,this.CalculateStats()}GetDragList(){return this.drag_list}GetDrag(){return this.drag_sel}SetDrag(t,e){this.drag_sel[t]=e,this.CalculateStats()}SetNumCantilever(t){this.is_cantilever=t}SetSpan(t){this.span=t}SetWingArea(t){this.wing_area=t}SetAcftType(t){if(this.acft_type=t,this.acft_type==k.HELICOPTER){this.aileron_sel=0,this.rudder_sel=0,this.elevator_sel=0,this.flaps_sel=0,this.slats_sel=0;for(let t=0;tt)),this.is_cantilever=0}}SetBoomTail(t){this.is_boom=t}SetIsVTail(t){t&&(this.rudder_sel=this.elevator_sel)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;this.aileron_list[this.aileron_sel].warping&&0==this.wing_area&&(this.aileron_sel=0),t=t.Add(this.aileron_list[this.aileron_sel].stats),this.aileron_list[this.aileron_sel].warping&&(t.maxstrain-=this.span,this.is_cantilever&&(t.cost+=2*this.is_cantilever,t.era.push({name:h("Cantilever Wing Warping"),era:"Last Hurrah"})),this.is_boom&&(t.pitchstab-=2,t.latstab-=2,t.warnings.push({source:h("Wing Warping"),warning:h("Wing Warping Warning"),color:c.WHITE}))),t=(t=(t=(t=t.Add(this.rudder_list[this.rudder_sel].stats)).Add(this.elevator_list[this.elevator_sel].stats)).Add(this.flaps_list[this.flaps_sel].stats)).Add(this.slats_list[this.slats_sel].stats);for(let e=0;e10.25&&t.wing_blades,e<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}serialize(t){t.PushNumArr(this.ext_wood_count),t.PushNumArr(this.ext_steel_count),t.PushNumArr(this.cant_count),t.PushBool(this.wires),t.PushNum(this.cabane_sel),t.PushBool(this.wing_blades)}deserialize(t){this.ext_wood_count=t.GetNumArr(this.ext_wood_count.length),this.ext_steel_count=t.GetNumArr(this.ext_steel_count.length),this.cant_count=t.GetNumArr(this.cant_count.length),this.wires=t.GetBool(),this.cabane_sel=t.GetNum(),t.version>10.25?this.wing_blades=t.GetBool():this.wing_blades=!1,t.version<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}GetExternalList(){return this.ext_wood_list}GetCantileverList(){return this.cant_list}CanExternalWood(){const t=[...Array(this.ext_wood_list.length).fill(this.can_external)];for(let e=0;e0}SetCantileverCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.ImplSCC(t,e),this.CalculateStats()}ImplSCC(t,e){var s=e-this.cant_count[t];if(this.cant_list[t].limited&&e>0){var i=this.TotalStructure();for(let t=0;tthis.acft_structure)for(let t=this.cant_list.length-1;t>=0;t--)s=s||this.ImplSCC(t,this.cant_count[t]);s&&this.CalculateStats()}TotalStructure(){var t=this.ext_cabane_list[this.cabane_sel].stats.structure,e=!1;for(let s=0;s0||this.ext_steel_count[s]>0)&&(e=!0);return e&&(t+=5),this.acft_structure+t}GetCantileverType(){const t=this.cant_count[0]+this.cant_count[4];return this.cant_count[1]+this.cant_count[2]+this.cant_count[3]>0?2:t>0?1:0}GetCabaneList(){return this.ext_cabane_list}GetCabane(){return this.cabane_sel}SetCabane(t){this.cabane_sel=t,this.CalculateStats()}SetCantLift(t){this.cant_lift=t}CanWingBlade(){for(const t of this.ext_wood_count)if(t>0)return!1;for(const t of this.ext_steel_count)if(t>0)return!1;return 0==this.cabane_sel&&this.cant_count[2]>0}GetWingBlade(){return this.wing_blades}SetWingBlade(t){this.wing_blades=t,this.CalculateStats()}SetAircraftType(t){this.acft_type=t,t==k.HELICOPTER&&(this.can_external=!1,this.is_monoplane=!1,this.is_tandem=!1,this.is_staggered=!1),t==k.ORNITHOPTER_BUZZER&&(this.can_external=!1);const e=this.CanExternalWood();for(let t=0;t0){a=a||this.ext_wood_list[r].first;let i=this.ext_wood_list[r].stats;i=i.Multiply(this.ext_wood_count[r]),t=t.Add(i),this.ext_wood_list[r].config?s+=e*this.ext_wood_list[r].tension*this.ext_wood_count[r]:s+=this.ext_wood_list[r].tension*this.ext_wood_count[r]}for(let r=0;r0){a=a||this.ext_wood_list[r].first;let i=this.ext_steel_list[r].stats.Clone();i=i.Multiply(this.ext_steel_count[r]),t=t.Add(i),this.ext_steel_list[r].config?s+=e*this.ext_steel_list[r].tension*this.ext_steel_count[r]:s+=this.ext_steel_list[r].tension*this.ext_steel_count[r]}this.acft_type==k.ORNITHOPTER_BASIC&&(t.maxstrain=Math.floor(1e-6+.5*t.maxstrain)),a&&(t.structure+=5,t.maxstrain+=10,s+=10);const r=this.ext_cabane_list[this.cabane_sel].stats.Clone();t=t.Add(r),s+=e*this.ext_cabane_list[this.cabane_sel].tension,this.cabane_sel>0&&(i+=1),this.wires&&(t.maxstrain+=Math.floor(1e-6+s),t.drag+=3*i);var n=!1;for(let e=0;e0){n=!0;let s=this.cant_list[e].stats;s=s.Multiply(this.cant_count[e]),s.maxstrain,t=t.Add(s)}return this.CanWingBlade()?this.wing_blades&&(t.mass*=2,t.warnings.push({source:h("Wing Blades"),warning:h("Wing Blades Warning"),color:c.WHITE})):this.wing_blades=!1,n&&(t.cost+=5,t.liftbleed-=this.cant_lift),t}GetElectrics(){return{storage:0,equipment:[]}}}class at extends D{constructor(t){super(),this.tank_stats=[],this.tank_count=[];for(const e of t.tanks)this.tank_stats.push({name:e.name,stats:new u(e),internal:e.internal,cantilever:e.cantilever}),this.tank_count.push(0);this.self_sealing=!1,this.is_cantilever=!1,this.wing_area=-1}toJSON(){return{tank_count:this.tank_count,self_sealing:this.self_sealing,fire_extinguisher:this.fire_extinguisher}}fromJSON(t,e){this.tank_count=y(t.tank_count,this.tank_count.length),this.self_sealing=t.self_sealing,this.fire_extinguisher=t.fire_extinguisher,this.wing_area=-1}serialize(t){t.PushNumArr(this.tank_count),t.PushBool(this.self_sealing),t.PushBool(this.fire_extinguisher)}deserialize(t){this.tank_count=t.GetNumArr(this.tank_count.length),this.self_sealing=t.GetBool(),this.fire_extinguisher=t.GetBool(),this.wing_area=-1}GetTankList(){return this.tank_stats}GetTankEnabled(){const t=[];for(const e of this.tank_stats)!this.is_cantilever&&e.cantilever?t.push(!1):t.push(!0);return t}GetTankCount(){return this.tank_count}SetTankCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.tank_count[t]=e,this.VerifyOK(),this.CalculateStats()}SetCantilever(t){this.is_cantilever&&!t&&(this.is_cantilever=t,this.VerifyOK()&&this.CalculateStats()),this.is_cantilever=t}SetArea(t){this.wing_area>t&&(this.wing_area=t,this.VerifyOK()&&this.CalculateStats()),this.wing_area=t}VerifyOK(){if(-1!=this.wing_area){var t=0;for(let e=0;e0;for(;s>0;)for(let t=this.tank_count.length-1;t>=0;t--)if(this.tank_stats[t].cantilever){this.tank_count[t]--,s--;break}for(let t=0;t0}GetSelfSealing(){return this.self_sealing}SetSelfSealing(t){this.self_sealing=t,this.CalculateStats()}GetExtinguisher(){return this.fire_extinguisher}SetExtinguisher(t){this.fire_extinguisher=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u,e=0;for(let s=0;s0&&(t.wetmass+=5-t.wetmass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class rt extends D{constructor(){super(),this.bomb_count=0,this.rocket_count=0,this.internal_bay_count=0,this.internal_bay_1=!1,this.internal_bay_2=!1}toJSON(){return{bomb_count:this.bomb_count,rocket_count:this.rocket_count,bay_count:this.internal_bay_count,bay1:this.internal_bay_1,bay2:this.internal_bay_2}}fromJSON(t,e){this.bomb_count=t.bomb_count,this.internal_bay_count=t.bay_count,this.internal_bay_1=t.bay1,this.internal_bay_2=t.bay2,e>10.75&&(this.rocket_count=t.rocket_count)}serialize(t){t.PushNum(this.bomb_count),t.PushNum(this.internal_bay_count),t.PushBool(this.internal_bay_1),t.PushBool(this.internal_bay_2),t.PushNum(this.rocket_count)}deserialize(t){this.bomb_count=t.GetNum(),this.internal_bay_count=t.GetNum(),this.internal_bay_1=t.GetBool(),this.internal_bay_2=t.GetBool(),t.version>10.75&&(this.rocket_count=t.GetNum())}GetRocketCount(){return this.rocket_count}GetBombCount(){return this.bomb_count}GetInternalBombCount(){var t=10*this.internal_bay_count;return this.bomb_count>0&&this.internal_bay_count>0&&this.internal_bay_1&&(t*=2,this.internal_bay_2&&(t*=2)),t}GetMaxBombSize(){var t=0;const e=this.GetInternalBombCount();return this.bomb_count>0&&this.internal_bay_count>0&&(t=this.internal_bay_1?this.internal_bay_2?Math.floor(1e-6+e):Math.floor(1e-6+e/2):Math.floor(1e-6+e/4)),t}SetRocketCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.rocket_count=t,this.LimitMass(),this.CalculateStats()}SetBombCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.bomb_count=t,this.LimitMass(),this.CalculateStats()}GetBayCount(){return this.internal_bay_count}GetBay1(){return this.internal_bay_1}GetBay2(){return this.internal_bay_2}SetBayCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.internal_bay_count=t,this.CalculateStats()}SetUseBays(t,e){this.internal_bay_1=t,this.internal_bay_2=e,!this.internal_bay_1&&this.internal_bay_2&&(this.internal_bay_1=!0,this.internal_bay_2=!1),this.CalculateStats()}LimitMass(){var t=!1;const e=Math.min(this.GetInternalBombCount(),Math.floor(1e-6+3*this.acft_struct*this.maxbomb));var s,i,a=0,r=0;s=this.bomb_count>e?e:this.bomb_count,i=this.rocket_count+s>e?e-s:this.rocket_count,a=this.bomb_count-s,r=this.rocket_count-i;const n=Math.floor(1e-6+this.acft_struct*this.maxbomb-(s+i)/3)*this.gull_factor;for(;a+r>n;)r>0?r--:a--;let o=Math.max(0,s+a);this.bomb_count>o&&(t=!0,this.bomb_count=o);let l=Math.max(0,i+r);return this.rocket_count>l&&(t=!0,this.rocket_count=l),t}GetExternalMass(){const t=this.bomb_count+this.rocket_count;return Math.max(0,t-this.GetInternalBombCount())}SetAcftParameters(t,e,s){switch(this.acft_struct=t,this.maxbomb=e,s){case 2:case 3:this.gull_factor=1.1;break;case 4:this.gull_factor=1.2;break;default:this.gull_factor=1}this.LimitMass()&&this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u,e=this.GetExternalMass();if(t.reqsections+=this.internal_bay_count,this.internal_bay_count>0){const e=t.reqsections;this.internal_bay_1&&(t.reqsections+=e,this.internal_bay_2&&(t.reqsections+=e))}const s=Math.ceil(e/5-1e-6);return t.mass+=s,t.drag+=s,t.bomb_mass=this.bomb_count+this.rocket_count,t.reqsections=Math.ceil(-1e-6+t.reqsections),t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class nt extends D{constructor(t){super(),this.cargo_list=[];for(const e of t.spaces)this.cargo_list.push({name:e.name,stats:new u(e)});this.cargo_sel=0}toJSON(){return{space_sel:this.cargo_sel}}fromJSON(t,e){this.cargo_sel=t.space_sel}serialize(t){t.PushNum(this.cargo_sel)}deserialize(t){this.cargo_sel=t.GetNum()}GetSpaceList(){return this.cargo_list}GetSpace(){return this.cargo_sel}SetSpace(t){this.cargo_sel=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;return(t=t.Add(this.cargo_list[this.cargo_sel].stats)).bomb_mass+=3*t.reqsections,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class ot extends D{constructor(t){super(),this.gear_list=[],this.gear_sel=0,this.retract=!1;for(const e of t.gear)this.gear_list.push({name:e.name,stats:new u(e),DpLMP:e.DpLMP,SpLMP:e.SpLMP,can_retract:e.can_retract});this.extra_list=[];for(const e of t.extras)this.extra_list.push({name:e.name,stats:new u(e),MpLMP:e.MpLMP});this.extra_sel=[...Array(this.extra_list.length).fill(!1)]}toJSON(){return{gear_sel:this.gear_sel,retract:this.retract,extra_sel:this.extra_sel}}fromJSON(t,e){this.gear_sel=t.gear_sel,this.retract=t.retract,this.extra_sel=b(t.extra_sel,this.extra_sel.length)}serialize(t){t.PushNum(this.gear_sel),t.PushBool(this.retract),t.PushBoolArr(this.extra_sel)}deserialize(t){this.gear_sel=t.GetNum(),this.retract=t.GetBool(),this.extra_sel=t.GetBoolArr(this.extra_sel.length)}IsDefault(){return 0==this.gear_sel&&0==this.retract&&0==this.extra_sel.reduce(((t,e)=>t||e),!1)}GetGearName(){return this.retract&&"Boat Hull"==this.gear_list[this.gear_sel].name?h("Retractable Gear + Boat Hull"):this.retract?h("Retractable ")+h(this.gear_list[this.gear_sel].name):h(this.gear_list[this.gear_sel].name)}GetGearList(){return this.gear_list}CanGear(){const t=[...Array(this.gear_list.length).fill(!0)];for(let e=0;e=2||0==t&&e>=3}SetGull(t){this.gull_deck=t}SetCalculateStats(t){this.CalculateStats=t}IsVital(){return!0}PartStats(){var t=new u;this.CanGear()[this.gear_sel]||(this.gear_sel=0),this.CanRetract()||(this.retract=!1);var e=this.loadedMass;for(let s=0;s=0;i--)s+=t[i],t[i]=s-e;return t}SetArmourCoverage(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.armour_coverage[t]=1!=t?e:e-this.skin_armour,this.NormalizeCoverage(),this.CalculateStats()}NormalizeCoverage(){var t=-8+Math.min(0,-Math.floor(1e-6+(this.vital_parts-8)/2));t+=this.skin_armour;for(let e=this.armour_coverage.length-1;e>=0;e--)this.armour_coverage[e]=Math.max(0,Math.min(Math.abs(t),this.armour_coverage[e])),t+=this.armour_coverage[e]}GetElectricalList(){return this.electric_list}GetElectricalCount(){return this.electrical_count}SetElectricalCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),e=Math.min(e,50),this.electrical_count[t]=e,this.CalculateStats()}GetRadioList(){return this.radio_list}GetRadioSel(){return this.radio_sel}SetRadioSel(t){this.radio_sel=t,this.CalculateStats()}GetReconList(){return this.recon_list}GetReconSel(){return this.recon_sel}SetReconSel(t,e){((e=Math.trunc(e))!=e||e<0)&&(e=0),this.recon_sel[t]=e,this.CalculateStats()}GetVisibilityList(){return this.visi_list}GetCanVisibility(){return this.can_visi}GetVisibilitySel(){return this.visi_sel}SetVisibilitySel(t,e){this.visi_sel[t]=e,this.CalculateStats()}GetClimateList(){return this.clim_list}GetClimateSel(){return this.clim_sel}GetClimateEnable(){const t=[];for(const e of this.clim_list)!this.acft_rad&&e.req_radiator?t.push(!1):t.push(!0);return t}SetClimateSel(t,e){this.clim_sel[t]=e,this.CalculateStats()}GetAutopilotList(){return this.auto_list}GetAutopilotSel(){return this.auto_sel}SetAutopilotSel(t){this.auto_sel=t,this.CalculateStats()}GetControlList(){return this.cont_list}GetControlSel(){return this.cont_sel}SetControlSel(t){this.cont_sel=t,this.CalculateStats()}SetAcftRadiator(t){this.acft_rad=t}IsElectrics(){for(const t of this.electrical_count)if(t>0)return!0;for(let t=0;t0&&(""!=e&&(e+=", "),e+=r.toString()+"/"+(11-s[a]).toString()+"+")}""!=e&&t.warnings.push({source:h("Armour"),warning:e,color:c.WHITE});for(let e=0;e0){let s=this.electric_list[e].stats.Clone();s=s.Multiply(this.electrical_count[e]),t=t.Add(s)}t=t.Add(this.radio_list[this.radio_sel].stats);for(let e=0;e0){let s=this.recon_list[e].stats.Clone();s=s.Multiply(this.recon_sel[e]),t=t.Add(s)}for(let e=0;e0&&(t+=i.storage*a,i.cp10s>0?e.push({source:h(i.name),charge:r.Format("{0}"+h("Derived Per 10 Speed"),Math.floor(1e-6+a*i.cp10s))}):0!=i.stats.charge&&e.push({source:h(i.name),charge:(a*i.stats.charge).toString()}))}const s=this.radio_list[this.radio_sel];e=this.FormatEquipment(e,s.name,s.stats.charge);for(let t=0;t0&&(e=this.FormatEquipment(e,s.name,i*s.stats.charge))}for(let t=0;t0){let e=Math.min(t,this.drag);e=Math.max(e,0),this.drag-=e,t-=e,e=Math.min(t,this.reliability),e=Math.max(e,0),this.reliability-=e,t-=e,e=Math.min(t,this.maxstrain),e=Math.max(e,0),this.maxstrain-=e,t-=e,e=Math.min(t,this.toughness),e=Math.max(e,0),this.toughness-=e,t-=e,e=Math.min(t,this.mass),e=Math.max(e,0),this.mass-=e,t-=e,e=Math.min(t,this.escape),e=Math.max(e,0),this.escape-=e,t-=e,e=Math.min(t,this.bleed),e=Math.max(e,0),this.bleed-=e,t-=e,e=Math.min(t,this.cost),e=Math.max(e,0),this.cost-=e,t-=e}}GetFreeDots(){return this.free_dots}SetFreeDots(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,0),this.free_dots=t,this.ReduceDots(),this.CalculateStats()}GetCost(){return this.cost}SetCost(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.cost=t,this.ReduceDots(),this.CalculateStats()}GetBleed(){return this.bleed}SetBleed(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.bleed=t,this.ReduceDots(),this.CalculateStats()}GetEscape(){return this.escape}SetEscape(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.escape=t,this.ReduceDots(),this.CalculateStats()}GetMass(){return this.mass}SetMass(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.mass=t,this.ReduceDots(),this.CalculateStats()}GetToughness(){return this.toughness}SetToughness(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.toughness=t,this.ReduceDots(),this.CalculateStats()}GetMaxStrain(){return this.maxstrain}SetMaxStrain(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.maxstrain=t,this.ReduceDots(),this.CalculateStats()}GetReliabiilty(){return this.reliability}SetReliability(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.reliability=t,this.ReduceDots(),this.CalculateStats()}GetDrag(){return this.drag}SetDrag(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.drag=t,this.ReduceDots(),this.CalculateStats()}SetAcftStats(t){this.acft_stats=t}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u;return t.cost=Math.floor(1e-6+-this.cost*this.acft_stats.cost/10),t.liftbleed=Math.floor(1e-6+3*-this.bleed),t.escape=this.escape,t.visibility=this.escape,t.mass=Math.floor(1e-6+-this.mass*this.acft_stats.mass/10),t.toughness=Math.floor(1e-6+this.toughness*this.acft_stats.toughness/4),t.reliability=2*this.reliability,t.drag=Math.floor(1e-6+-this.drag*this.acft_stats.drag/10),t}GetElectrics(){return{storage:0,equipment:[]}}}!function(t){t[t.NONE=-1]="NONE",t[t.INTERRUPT=0]="INTERRUPT",t[t.SYNCH=1]="SYNCH",t[t.SPINNER=2]="SPINNER",t[t.DEFLECT=3]="DEFLECT",t[t.NO_INTERFERENCE=4]="NO_INTERFERENCE",t[t.ENUM_MAX=5]="ENUM_MAX"}(F||(F={})),(B=q||(q={}))[B.BULLETS=0]="BULLETS",B[B.HEATRAY=1]="HEATRAY",B[B.PNEUMATIC=2]="PNEUMATIC",B[B.ENUM_MAX=3]="ENUM_MAX",B[B.GYROJETS=4]="GYROJETS",function(t){t[t.STANDARD=0]="STANDARD",t[t.MECHANICAL=1]="MECHANICAL",t[t.GAST=2]="GAST",t[t.ROTARY=3]="ROTARY",t[t.ENUM_MAX=4]="ENUM_MAX"}(L||(L={}));class ct extends D{constructor(t,e,s,i=!1){super(),this.weapon_type=t,this.fixed=i,this.wing=!0,this.covered=!1,this.accessible=!1,this.free_accessible=!1,this.synchronization=i?F.NONE:F.INTERRUPT,this.w_count=1,this.repeating=!1,this.wing_reinforcement=!1}toJSON(){return{fixed:this.fixed,wing:this.wing,covered:this.covered,accessible:this.accessible,free_accessible:this.free_accessible,synchronization:this.synchronization,w_count:this.w_count}}fromJSON(t,e){this.fixed=t.fixed,this.wing=t.wing,this.covered=t.covered,this.accessible=t.accessible,this.free_accessible=t.free_accessible,this.synchronization=t.synchronization,this.w_count=t.w_count,e<10.95&&(this.repeating=t.repeating)}serialize(t){t.PushBool(this.fixed),t.PushBool(this.wing),t.PushBool(this.covered),t.PushBool(this.accessible),t.PushBool(this.free_accessible),t.PushNum(this.synchronization),t.PushNum(this.w_count)}deserialize(t){this.fixed=t.GetBool(),this.wing=t.GetBool(),this.covered=t.GetBool(),this.accessible=t.GetBool(),this.free_accessible=t.GetBool(),this.synchronization=t.GetNum(),this.w_count=t.GetNum(),t.version<10.95&&(this.repeating=t.GetBool())}SetWeaponType(t,e,s){this.weapon_type=t,this.action=e,16==this.weapon_type.size&&(this.w_count=1),this.SetCount(this.w_count,!1)}GetFixed(){return this.fixed}SetFixed(t){t!=this.fixed&&(t?this.fixed=!0:(this.fixed=!1,this.synchronization=F.NONE))}SetCanWing(t){this.canwing=t,this.wing&&!t&&(this.wing=!1)}GetWing(){return this.wing}CanWing(){return this.weapon_type.size<=16&&this.canwing}SetWing(t){t&&this.CanWing()?(this.wing=!0,this.free_accessible=!1,this.synchronization=F.NONE):this.wing=!1,this.CalculateStats()}CanCovered(){return this.wing?this.has_cantilever&&!(16==this.weapon_type.size&&!this.fixed):!(this.GetArty()&&!this.fixed)}GetCovered(){return this.covered}SetCovered(t){this.covered=t,this.CalculateStats()}GetAccessible(){return this.accessible||this.free_accessible}SetAccessible(t){t&&this.free_accessible&&(t=!1),this.accessible=t,this.CalculateStats()}GetFreeAccessible(){return this.free_accessible}SetFreeAccessible(t){t&&!this.wing&&this.can_free_accessible?(this.free_accessible=!0,this.accessible=!1):this.free_accessible=!1,this.CalculateStats()}CanSynchronization(){const t=[];for(let e=-1;e16;)t-=1;this.w_count=t,e&&this.CalculateStats()}CanRepeating(){return!this.weapon_type.rapid||this.weapon_type.reload>0}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:this.repeating=!1,this.CalculateStats()}ResolveSynch(){const t=this.synchronization;if(this.synchronization=F.ENUM_MAX,this.CanSynch(t))this.action==L.MECHANICAL&&t!=F.SPINNER?this.synchronization=F.SYNCH:this.synchronization=t;else{for(let t=-1;t8||16==this.weapon_type.size)&&(t.reqsections+=1),this.accessible&&(t.cost+=Math.max(1,Math.floor(1e-6+this.w_count/2))),!this.fixed)if(e<=2);else if(e<=4)t.cost+=1;else if(e<=8)t.mass+=1,t.cost+=3;else{if(!(e<=16))throw"Weapon size screwup in Turret size cost.";t.mass+=2,t.cost+=5}return this.synchronization==F.INTERRUPT?(t.cost+=2*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=2*this.w_count),t.era.push({name:h("Interruptor Gear"),era:h("WWI")})):this.synchronization==F.SYNCH&&this.action!=L.MECHANICAL?(t.cost+=3*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=3*this.w_count),t.era.push({name:h("Synchronization Gear"),era:h("Roaring 20s")})):this.synchronization==F.DEFLECT?(t.cost+=1,t.warnings.push({source:h(this.weapon_type.name),warning:h("Deflector Plate Warning"),color:c.WHITE})):this.synchronization!=F.NO_INTERFERENCE||this.IsLightningArc()||t.warnings.push({source:h(this.weapon_type.name)+" "+h("No Interference"),warning:h("No Interference Warning"),color:c.YELLOW}),this.wing_reinforcement&&(t.mass+=2),t.Round(),t}GetElectrics(){return{storage:0,equipment:[]}}}class ut extends D{constructor(t,e){super(),this.weapon_list=t,this.wl_permute=e,this.directions=[...Array(6).fill(!1)],this.directions[0]=!0,this.fixed=!0,this.ammo=1,this.weapon_type=0,this.raw_weapon_type=0,this.weapons=[],this.action_sel=L.STANDARD,this.projectile_sel=q.BULLETS,this.has_propeller=!0,this.sticky_guns=0,this.repeating=!1,this.seat=0,this.final_weapon={name:"",abrv:"",era:"",size:0,stats:new u,damage:0,hits:0,ammo:0,ap:0,jam:"",reload:0,rapid:!1,synched:!1,shells:!1,can_action:!1,can_projectile:!1,deflection:0},this.MakeFinalWeapon(),this.SWC(1)}toJSON(){const t=[];for(const e of this.weapons)t.push(e.toJSON());return{weapon_type:this.raw_weapon_type,fixed:this.fixed,directions:this.directions,weapons:t,ammo:this.ammo,action:this.action_sel,projectile:this.projectile_sel,repeating:this.repeating,seat:this.seat}}fromJSON(t,e){this.raw_weapon_type=t.weapon_type,this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.fixed,this.directions=b(t.directions,this.directions.length),this.weapons=[],this.ammo=t.ammo,null==this.ammo&&(this.ammo=1),e<10.25?(this.action_sel=L.STANDARD,this.projectile_sel=q.BULLETS):(this.action_sel=t.action,this.projectile_sel=t.projectile),e<11.75&&(this.projectile_sel==q.PNEUMATIC?this.projectile_sel=q.BULLETS:this.projectile_sel==q.ENUM_MAX&&(this.projectile_sel=q.PNEUMATIC)),this.MakeFinalWeapon();for(const s of t.weapons){const t=new ct(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),t.fromJSON(s,e),this.weapons.push(t)}if(e<10.95){this.repeating=!1;for(const t of this.weapons)this.repeating=this.repeating||t.GetRepeating()}else this.repeating=t.repeating;this.seat=e>11.65?t.seat:0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}serialize(t){t.PushNum(this.raw_weapon_type),t.PushBool(this.fixed),t.PushBoolArr(this.directions),t.PushNum(this.ammo),t.PushNum(this.weapons.length);for(const e of this.weapons)e.serialize(t);t.PushNum(this.action_sel),t.PushNum(this.projectile_sel),t.PushBool(this.repeating),t.PushNum(this.seat)}deserialize(t){this.raw_weapon_type=t.GetNum(),this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.GetBool(),this.directions=t.GetBoolArr(this.directions.length),this.ammo=t.GetNum();const e=t.GetNum();this.weapons=[],this.MakeFinalWeapon();for(let s=0;s11.65?this.seat=t.GetNum():this.seat=0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}GetWeaponSelected(){return this.weapon_type}MakeFinalWeapon(){const t=this.weapon_type;if(this.final_weapon.can_action=this.weapon_list[t].can_action,this.final_weapon.can_projectile=this.weapon_list[t].can_projectile,this.final_weapon.ammo=this.weapon_list[t].ammo,this.final_weapon.ap=this.weapon_list[t].ap,this.final_weapon.damage=this.weapon_list[t].damage,this.final_weapon.era=this.weapon_list[t].era,this.final_weapon.name=this.weapon_list[t].name,this.final_weapon.abrv=this.weapon_list[t].abrv,this.final_weapon.reload=this.weapon_list[t].reload,this.final_weapon.shells=this.weapon_list[t].shells,this.final_weapon.size=this.weapon_list[t].size,this.final_weapon.stats=this.weapon_list[t].stats.Clone(),this.final_weapon.deflection=this.weapon_list[t].deflection,this.final_weapon.jam=this.weapon_list[t].jam,this.final_weapon.stats.era=[],this.final_weapon.stats.era.push({name:this.weapon_list[t].name,era:this.weapon_list[t].era}),0==this.weapon_list[t].hits&&(this.action_sel==L.MECHANICAL&&(this.action_sel=L.STANDARD),this.projectile_sel!=q.GYROJETS&&this.projectile_sel!=q.HEATRAY||(this.projectile_sel=q.BULLETS)),this.action_sel==L.STANDARD)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.synched=this.weapon_list[t].synched;else if(this.action_sel==L.MECHANICAL)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.stats.warnings.push({source:h("Mechanical Action"),warning:h("Mechanical Action Warning"),color:c.WHITE}),this.final_weapon.jam="0/0",this.final_weapon.rapid=!0,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!0,this.final_weapon.stats.era.push({name:h("Mechanical Action"),era:h("WWI")});else if(this.action_sel==L.GAST)this.final_weapon.hits=2*this.weapon_list[t].hits,this.final_weapon.ammo=this.weapon_list[t].ammo/2,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!1,this.final_weapon.stats.era.push({name:h("Gast Principle"),era:h("WWI")});else if(this.action_sel==L.ROTARY){this.final_weapon.stats.mass+=this.weapon_list[t].stats.mass,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.size+=this.weapon_list[t].size,this.final_weapon.size=Math.min(16,this.final_weapon.size),this.final_weapon.hits=3*this.weapon_list[t].hits,this.final_weapon.deflection-=1,this.final_weapon.synched=!1;const e=this.final_weapon.jam.split("/");e[0]="9999",e[1]=(parseInt(e[1])+1).toString(),this.final_weapon.jam=e.join("/"),this.final_weapon.stats.era.push({name:h("Rotary_Gun"),era:h("WWI")})}if(this.repeating&&0!=this.final_weapon.reload&&(this.final_weapon.reload=0,this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost))),this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=q.HEATRAY||(this.projectile_sel=q.BULLETS),this.action_sel!=L.GAST&&this.action_sel!=L.ROTARY&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=q.PNEUMATIC||(this.projectile_sel=q.BULLETS),this.projectile_sel==q.HEATRAY)this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.shells=!1,this.final_weapon.ammo=0,this.final_weapon.deflection=0,this.final_weapon.ap=Math.max(0,this.final_weapon.ap-1),this.final_weapon.stats.warnings.push({source:h("Heat Ray"),warning:h("Heat Ray Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Heat Ray"),era:h("Himmilgard")});else if(this.projectile_sel==q.GYROJETS)this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost)),this.final_weapon.shells=!1,this.final_weapon.damage-=1,this.final_weapon.stats.warnings.push({source:h("Gyrojets"),warning:h("Gyrojets Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Gyrojets"),era:h("Roaring 20s")});else if(this.projectile_sel==q.PNEUMATIC){if(this.final_weapon.ammo*=2,this.final_weapon.shells=!1,this.final_weapon.rapid){const t=this.final_weapon.jam.split("/");t[1]="9999",this.final_weapon.jam=t.join("/"),this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 1"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Pneumatic"),era:h("Pioneer")})}this.final_weapon.hits>0&&this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 2"),color:c.WHITE})}0!=this.final_weapon.deflection&&this.final_weapon.stats.warnings.push({source:h(this.final_weapon.name),warning:h("Deflection Warning",this.final_weapon.deflection),color:c.WHITE})}SetWeaponSelected(t){const e=this.IsLightningArc();if(this.weapon_type=t,this.raw_weapon_type=this.wl_permute.findIndex((e=>e==t)),16==this.weapon_list[t].size)for(;this.weapons.length>1;)this.weapons.pop();this.weapon_list[t].can_action&&this.GetCanAction()[this.action_sel]||(this.action_sel=L.STANDARD),this.weapon_list[t].can_projectile&&this.GetCanProjectile()[this.projectile_sel]||(this.projectile_sel=q.BULLETS),this.weapon_list[t].rapid?this.repeating=!1:this.repeating||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD),this.CanRepeating()||(this.repeating=!1),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);if(this.IsLightningArc()){this.SetFixed(!0),this.directions[0]=!0;for(let t=1;t0)&&this.weapon_list[this.weapon_type].ammo>0&&"Precision Rifle"!=this.weapon_list[this.weapon_type].name}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:(this.repeating=!1,this.weapon_list[this.weapon_type].rapid||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD)),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);this.CalculateStats()}GetFixed(){return this.fixed}SetFixed(t){if(this.IsLightningArc()&&(t=!0),this.fixed!=t){this.fixed=t;for(const t of this.weapons)t.SetFixed(this.fixed);if(t){let t=!1;for(let e=0;ethis.weapons.length;){const t=new ct(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),this.weapons.push(t)}for(;t1||this.weapons[0].GetCount()>1}SetAmmo(t){(t!=t||t<1)&&(t=1),t=Math.floor(1e-6+t),this.ammo=t,this.CalculateStats()}SetHavePropeller(t){this.has_propeller&&!t&&this.action_sel==L.MECHANICAL&&(this.has_propeller=t,this.SetAction(L.STANDARD)),this.has_propeller=t}SetCanWing(t){for(const e of this.weapons)e.SetCanWing(t)}GetAction(){return this.action_sel}GetCanAction(){return[!0,this.has_propeller&&this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].hits>0&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].rapid]}SetAction(t){if(this.final_weapon.can_action){this.action_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.action_sel=L.STANDARD;this.CalculateStats()}GetCanProjectile(){return[!0,this.final_weapon.can_projectile&&this.action_sel!=L.MECHANICAL&&this.action_sel!=L.GAST&&this.weapon_list[this.weapon_type].hits>0,this.final_weapon.can_projectile&&this.action_sel!=L.ROTARY&&this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL]}GetProjectile(){return this.projectile_sel}SetProjectile(t){if(this.final_weapon.can_projectile){this.projectile_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.projectile_sel=q.BULLETS;this.CalculateStats()}GetFinalWeapon(){return this.final_weapon}SetStickyGuns(t){this.sticky_guns=t}GetHRCharges(){if(this.IsLightningArc())return[3];let t=0;for(const e of this.weapons)t+=e.GetCount();if(this.final_weapon.hits>0){let e=this.weapon_list[this.weapon_type].stats.cost;return this.action_sel==L.ROTARY&&(e*=2),this.final_weapon.rapid?[t*e,Math.max(t*e+1,Math.floor(1e-6+1.5*t*e))]:[t*e]}return"Scattergun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(1.875001),Math.floor(3.125001)]:[Math.floor(1.875001)]:"Punt Gun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(3.750001),Math.floor(6.250001)]:[Math.floor(3.750001)]:void 0}GetShots(){return Math.max(1,Math.floor(1e-6+this.final_weapon.ammo*this.ammo))}IsLightningArc(){return"Lightning Arc"==this.final_weapon.name}GetReload(){return this.final_weapon.reload}GetWingWeight(){let t=0;for(const e of this.weapons)e.GetWing()&&(t+=e.PartStats().mass);return t}GetDirectionCount(){let t=0;for(const e of this.directions)e&&t++;return t}SetSeat(t){this.seat=t,this.CalculateStats()}GetSeat(){return this.seat}GetIsFullyAccessible(){for(const t of this.weapons)if(!t.GetAccessible())return!1;return!0}GetIsPartlyAccessible(){for(const t of this.weapons)if(t.GetAccessible())return!0;return!1}SetCalculateStats(t){this.CalculateStats=t;for(const e of this.weapons)e.SetCalculateStats(t)}PartStats(){var t=new u;let e=this.GetDirectionCount(),s=0;for(const i of this.weapons)i.has_cantilever=this.has_cantilever,i.SetTurret(e>2),t=t.Add(i.PartStats()),s+=i.GetCount(),this.fixed||(2==e?t.cost+=1:3==e||4==e?t.cost+=2:5==e?t.cost+=3:6==e&&(t.cost+=4));return(this.projectile_sel==q.HEATRAY||this.IsLightningArc())&&(this.ammo=1),t.mass+=(this.ammo-1)*s,t}GetElectrics(){return{storage:0,equipment:[]}}}const _t=JSON.parse('{"A":[{"name":"Submachine Gun","abrv":"SMG","era":"WWI","cost":1,"mass":1,"drag":0,"damage":1,"hits":4,"ap":0,"ammo":10,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"0/1","reload":2,"size":1,"can_action":true,"can_projectile":true,"deflection":0,"warning":"SMG Warning"},{"name":"Scattergun","abrv":"SG","era":"Pioneer","cost":2,"mass":2,"drag":2,"damage":0.5,"hits":0,"ap":0,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Scattergun Warning","size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Machine Gun","abrv":"LMG","era":"WWI","cost":2,"mass":2,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"1/2","reload":2,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Machine Gun","abrv":"MG","era":"WWI","cost":2,"mass":3,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":10,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"1/2","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Balloon Gun","abrv":"BMG","era":"WWI","cost":3,"mass":3,"drag":1,"damage":2,"hits":4,"ap":0,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":-2},{"name":"Enhanced Machine Gun","abrv":"EMG","era":"Coming Storm","cost":3,"mass":2,"drag":1,"damage":2,"hits":5,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"0/0","reload":0,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Enhanced Heavy Machine Gun","abrv":"EHMG","era":"Coming Storm","cost":5,"mass":3,"drag":2,"damage":4,"hits":5,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Punt Gun","abrv":"PG","era":"Pioneer","cost":4,"mass":4,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Punt Gun Warning","size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Repeating Cannon","abrv":"LRC","era":"WWI","cost":4,"mass":4,"drag":3,"damage":8,"hits":3,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"2/5","reload":2,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Heavy Cannon","abrv":"HC","era":"WWI","cost":6,"mass":5,"drag":2,"damage":16,"hits":1,"ap":2,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Light Machine Cannon","abrv":"LMC","era":"Coming Storm","cost":8,"mass":4,"drag":3,"damage":8,"hits":4,"ap":4,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Machine Cannon","abrv":"HMC","era":"WWII","cost":12,"mass":5,"drag":4,"damage":12,"hits":3,"ap":4,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Fliergerflammenwerfer","abrv":"FFW","era":"WWI","cost":5,"mass":1,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0/0","reload":0,"warning":"Fliergerflammenwerfer Warning","size":8,"can_action":false,"can_projectile":false,"deflection":0},{"name":"Recoilless Cannon","abrv":"RC","era":"WWI","cost":5,"mass":8,"drag":3,"damage":30,"hits":1,"ap":3,"ammo":3,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":-5},{"name":"Autocannon","abrv":"AC","era":"WWII","cost":15,"mass":8,"drag":5,"damage":24,"hits":2,"ap":5,"ammo":2,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Battle Cannon","abrv":"BC","era":"WWII","cost":15,"mass":40,"drag":8,"damage":24,"hits":2,"ap":5,"ammo":1,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Precision Rifle","abrv":"PR","era":"WWI","mass":1,"drag":1,"cost":2,"damage":5,"hits":10,"ap":2,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":2,"can_action":false,"can_projectile":false,"warning":"Precision Rifle Warning","deflection":0},{"name":"Lightning Arc","abrv":"LA","era":"Himmilgard","cost":8,"mass":5,"drag":3,"damage":0,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0","reload":0,"size":16,"can_action":false,"can_projectile":false,"warning":"Lightning Arc Warning","deflection":0},{"name":"Harpoon Launcher","abrv":"HL","era":"Himmilgard","cost":3,"mass":3,"drag":2,"damage":4,"hits":1,"ap":1,"ammo":2,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":0,"reload":1,"size":4,"can_action":false,"can_projectile":false,"warning":"Harpoon Launcher Warning","deflection":0},{"name":"Heavy Machine Gun","abrv":"HMG","era":"WWI","cost":4,"mass":4,"drag":2,"damage":4,"hits":4,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Repeating Cannon","abrv":"HRC","era":"WWI","cost":10,"mass":6,"drag":4,"damage":16,"hits":2,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"4/6","reload":2,"size":16,"can_action":true,"can_projectile":true,"deflection":-3}]}');class pt extends D{constructor(){super(),this.direction_list=["Forward","Rearward","Up","Down","Left","Right"],this.synchronization_list=["None","Interruptor Gear","Synchronization Gear","Spinner Gun","Deflector Plate","No Interference"],this.action_list=[{name:"Standard Action"},{name:"Mechanical Action"},{name:"Gast Principle"},{name:"Rotary_Gun"}],this.projectile_list=[{name:"Standard"},{name:"Heat Ray"},{name:"Pneumatic"}],this.weapon_list=[];for(const t of _t.A){const e={name:t.name,abrv:t.abrv,era:t.era,size:t.size,stats:new u(t),damage:t.damage,hits:t.hits,ammo:t.ammo,ap:t.ap,jam:t.jam.toString(),reload:t.reload,rapid:t.rapid,synched:t.synched,shells:t.shells,can_action:t.can_action,can_projectile:t.can_projectile,deflection:t.deflection};this.weapon_list.push(e)}const t=(t,e)=>{const s=(t,e)=>tt(this.weapon_list[e],this.weapon_list[s])));const e=[];for(let t=0;te==t)));this.wl_permute=e,this.weapon_list=this.weapon_list.sort(t),this.weapon_sets=[],this.brace_count=0,this.isheli=!1}toJSON(){const t=[];for(const e of this.weapon_sets)t.push(e.toJSON());return{weapon_systems:t,brace_count:this.brace_count}}fromJSON(t,e){this.weapon_sets=[];const s=t.weapon_systems;for(const t of s){const s=new ut(this.weapon_list,this.wl_permute);s.SetCalculateStats(this.CalculateStats),s.fromJSON(t,e),this.weapon_sets.push(s)}e>10.35&&(this.brace_count=t.brace_count)}serialize(t){t.PushNum(this.weapon_sets.length);for(const e of this.weapon_sets)e.serialize(t);t.PushNum(this.brace_count)}deserialize(t){this.weapon_sets=[];const e=t.GetNum();for(let s=0;s10.35&&(this.brace_count=t.GetNum())}GetWeaponList(){return this.weapon_list}GetDirectionList(){return this.direction_list}GetSynchronizationList(){return this.synchronization_list}SetWeaponSetCount(t){for((t!=t||t<1)&&(t=0),t=Math.floor(1e-6+t);t>this.weapon_sets.length;){const t=new ut(this.weapon_list,this.wl_permute);t.SetCalculateStats(this.CalculateStats),this.weapon_sets.push(t)}for(;t=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER)return void e[t].SetSynchronization(F.INTERRUPT)}}RemoveOneArtyTractorSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(F.NO_INTERFERENCE)}}RemoveOnePusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER)return void e[t].SetSynchronization(F.INTERRUPT)}}RemoveOneArtyPusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(F.NO_INTERFERENCE)}}CanTractorSpinner(){return this.CountTractorSpinner()+this.CountArtyTractorSpinner()this.tractor_arty_spinner_count;)this.RemoveOneArtyTractorSpinner();for(;this.CountTractorSpinner()>this.tractor_spinner_count;)this.RemoveOneTractorSpinner();for(;this.CountArtyPusherSpinner()>this.pusher_arty_spinner_count;)this.RemoveOneArtyPusherSpinner();for(;this.CountPusherSpinner()>this.pusher_spinner_count;)this.RemoveOnePusherSpinner();var e=0,s=0;0==this.cant_type?(e=4,s=2):1==this.cant_type?(e=8,s=4):(e=16,s=8);const i=[];for(const t of this.weapon_sets)for(const e of t.GetWeapons()){e.wing_reinforcement=!1;const s={total:0,count:0,sz:0,w:e};e.GetWing()&&(s.count=e.GetCount(),s.sz=this.weapon_list[t.GetWeaponSelected()].size,s.total=s.count*s.sz,i.push(s))}i.sort((function(t,e){return t.total-e.total}));for(const t of i)e>=0&&(s0,t=t.Add(e.PartStats());return t.cost+=this.brace_count/3,this.brace_count>0&&t.warnings.push({source:h("Weapons Braces"),warning:h("Weapons Braces Warning"),color:c.WHITE}),t.control-=Math.floor(1e-6+this.GetWingWeight()/5),t}GetElectrics(){const t={storage:0,equipment:[]};for(let e=0;e11.55&&(this.blade_idx=t.blade_idx),e<12.45&&(this.rotor_span=0),this.rotor_thickness=e<12.55?0:t.rotor_thickness,this.dryMP=-1}serialize(t){t.PushNum(this.type),t.PushNum(this.rotor_count),t.PushNum(this.rotor_span),t.PushNum(this.cant_idx),t.PushNum(this.stagger_sel),t.PushBool(this.accessory),t.PushNum(this.blade_idx),t.PushNum(this.rotor_thickness)}deserialise(t){this.type=t.GetNum(),this.rotor_count=t.GetNum(),this.rotor_span=t.GetNum(),this.cant_idx=t.GetNum(),t.version<12.35?(t.GetBool(),this.stagger_sel=0):this.stagger_sel=t.GetNum(),this.accessory=t.GetBool(),t.version>11.55&&(this.blade_idx=t.GetNum()),t.version<12.45&&(this.rotor_span=0),t.version<12.55?this.rotor_thickness=0:this.rotor_thickness=t.GetNum(),this.dryMP=-1}SetCantileverList(t){this.cant_list=t}GetCantileverList(){return this.cant_list}SetCantilever(t){this.cant_idx=t,this.CalculateStats()}GetCantilever(){return this.cant_idx}SetRotorThickness(t){t<0&&(t=0),this.rotor_thickness=Math.floor(1e-6+t),this.CalculateStats()}GetRotorThickness(){return this.rotor_thickness}SetType(t){this.type!=t&&(this.accessory=!1,this.cant_idx=0,this.stagger_sel=0,this.rotor_count=1,this.type=t,this.rotor_span=0)}CanRotorCount(){return this.type==k.HELICOPTER}SetRotorCount(t){t<1&&(t=1),t>=2&&t%2==1&&(t==this.rotor_count+1?t+=1:t-=1),this.rotor_count=t,this.rotor_count<2&&(this.stagger_sel=0),this.CalculateStats()}GetRotorCount(){return this.rotor_count}CanRotorSpan(){return this.type==k.HELICOPTER}SetRotorSpan(t){this.rotor_span=Math.floor(1e-6+t),this.CalculateStats()}GetRotorSpan(){return this.rotor_span}CanTandem(){return this.type==k.HELICOPTER&&this.rotor_count>1}SetBladeCount(t){this.blade_idx=t,this.CalculateStats()}SetWingArea(t){this.wing_area=t}GetSizingSpan(){return this.sizing_span}SetMP(t){t!=this.dryMP&&(this.dryMP=t,this.CalculateStats())}GetRotorStrain(){const t=this.GetRotorArea();return this.rotor_count*Math.max(1,2*(this.sizing_span+this.rotor_span)+t-10)}GetRotorArea(){return Math.PI/9*(this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span)}GetIdealRotorArea(){return Math.PI/9*this.sizing_span*this.sizing_span}GetRotorDrag(){if(this.type==k.HELICOPTER||this.type==k.AUTOGYRO){const t=this.GetRotorArea();return 1==this.rotor_count?Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))):Math.floor(1e-6+.75*this.rotor_count*Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))))}return 0}GetType(){return this.type}GetAccessory(){return this.accessory}SetAccessory(t){this.accessory=t,this.CalculateStats()}SetEngineCount(t){this.engine_count=t}GetTailRotor(){return this.type==k.HELICOPTER&&this.rotor_count<2}GetBladeList(){return this.blade_list}GetRotorBleed(){return this.type==k.HELICOPTER?this.blade_list[this.blade_idx].rotor_bleed:0}GetPowerFactor(){return this.stagger_list[this.stagger_sel].powerfactor}GetBladeCountIdx(){return this.blade_idx}GetStaggerList(){return this.stagger_list}GetStagger(){return this.stagger_sel}SetStagger(t){t!=this.stagger_sel&&(this.stagger_sel=t,this.CalculateStats())}CanStagger(){const t=[];for(let e=0;e=2&&3==this.stagger_list[e].count?t.push(!0):t.push(!1);return t}VerifySizes(){this.type==k.AIRPLANE?(this.rotor_count=0,this.rotor_span=0,this.stagger_sel=0):this.type==k.AUTOGYRO?(this.rotor_count=1,this.sizing_span=Math.ceil(-1e-6+Math.sqrt(.6*this.wing_area/(Math.PI/8))),this.rotor_span=Math.max(this.rotor_span,2-this.sizing_span),this.stagger_sel=0):this.type==k.HELICOPTER&&(this.rotor_count=Math.max(1,this.rotor_count),this.rotor_count>1&&this.rotor_count%2==1&&(this.rotor_count=this.rotor_count-1),-1!=this.dryMP?(1==this.rotor_count?this.sizing_span=Math.ceil(5*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6):this.sizing_span=Math.ceil(4*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6),this.sizing_span=Math.min(100,this.sizing_span),this.rotor_span=Math.max(this.rotor_span,-Math.floor(1e-6+this.sizing_span/2))):this.sizing_span=10)}VerifyStagger(){if(this.rotor_count>2&&this.stagger_list[this.stagger_sel].count<=2){for(let t=0;t0&&(1==t.GetReload()?e.push(h("Weapon Tag Manual")):e.push(h("Weapon Tag Reload",t.GetReload()))),s.rapid&&e.push(h("Weapon Tag Rapid Fire")),s.shells&&e.push(h("Weapon Tag Shells")),s.ap>0&&e.push(h("Weapon Tag AP",s.ap)),t.GetIsFullyAccessible()?e.push(h("Weapon Tag Fully Accessible")):t.GetIsPartlyAccessible()?e.push(h("Weapon Tag Partly Accessible")):e.push(h("Weapon Tag Inaccessible")),s.deflection&&e.push(h("Weapon Tag Awkward",s.deflection)),e}function bt(t,e,s){var i="";const a=t.GetDirection(),n=[];for(let t=0;t{this.CalculateStats()})),this.cockpits.SetCalculateStats((()=>{this.CalculateStats()})),this.passengers.SetCalculateStats((()=>{this.CalculateStats()})),this.engines.SetCalculateStats((()=>{this.CalculateStats()})),this.propeller.SetCalculateStats((()=>{this.CalculateStats()})),this.frames.SetCalculateStats((()=>{this.CalculateStats()})),this.wings.SetCalculateStats((()=>{this.CalculateStats()})),this.stabilizers.SetCalculateStats((()=>{this.CalculateStats()})),this.controlsurfaces.SetCalculateStats((()=>{this.CalculateStats()})),this.reinforcements.SetCalculateStats((()=>{this.CalculateStats()})),this.fuel.SetCalculateStats((()=>{this.CalculateStats()})),this.munitions.SetCalculateStats((()=>{this.CalculateStats()})),this.cargo.SetCalculateStats((()=>{this.CalculateStats()})),this.gear.SetCalculateStats((()=>{this.CalculateStats()})),this.accessories.SetCalculateStats((()=>{this.CalculateStats()})),this.optimization.SetCalculateStats((()=>{this.CalculateStats()})),this.weapons.SetCalculateStats((()=>{this.CalculateStats()})),this.used.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCalculateStats((()=>{this.CalculateStats()})),this.alter.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCantileverList(this.reinforcements.GetCantileverList()),this.cockpits.SetNumberOfCockpits(1),this.engines.SetNumberOfEngines(1),this.frames.SetTailType(1),this.use_storage=e,this.updated_stats=!1,this.freeze_calculation=!1,this.aircraft_type=k.AIRPLANE,this.Reset()}InteractiveDash(){const t=this.GetStats(),e=this.GetDerivedStats(),s=this.VitalComponentList();for(var i=!1;s.length>10;)s.pop(),i=!0;for(i&&(s.pop(),s.push("And More. See Plane Builder for full list."));s.length<10;)s.push("");const a=this.GetAccessories().GetEffectiveCoverage();var r="";for(let t=0;t0&&(r+=""!=r?", ":h("Armour")+" ",r+=e.toString()+"/+"+(11-a[t]).toString())}const n=[],o=this.GetMunitions().GetBombCount(),l=this.GetMunitions().GetRocketCount();var c=this.GetMunitions().GetInternalBombCount();if((o>0||l>0)&&n.push("Current load here."),o>0){const t=Math.min(o,c),e=Math.max(0,o-t);if(t>0&&n.push(h(" Bomb Mass Internally.",t)),e>0&&n.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.GetMunitions().GetMaxBombSize());n.push(h("Largest Internal Bomb",e.toString()))}c-=t}if(l>0){const t=Math.min(l,c),e=Math.max(0,l-t);t>0&&n.push(h(" Rocket Mass Internally.",t)),e>0&&n.push(h(" Rocket Mass Externally.",e))}for(;n.length<5;)n.push("");let u="";for(const e of t.warnings)u+=e.source+": "+e.warning+"\n";const _={altitude:0,airspeed:0,fuel:e.FuelUses,dropoff:e.Dropoff,visibility:this.GetCockpits().GetCockpit(0).GetVisibility(),energy_loss:e.EnergyLoss,turn_bleed:e.TurnBleed,stability:e.Stabiilty,stress:this.GetCockpits().GetCockpit(0).GetFlightStress()[0],plane_escape:this.GetCockpits().GetCockpit(0).GetEscape(),crash:this.GetCockpits().GetCockpit(0).GetCrash(),max_toughness:e.Toughness,current_toughness:e.Toughness,max_strain:e.MaxStrain,current_strain:e.MaxStrain,g_force:0,kills:0,full_load_boost:e.BoostFullwBombs,full_load_handling:e.HandlingFullwBombs,full_load_climb:e.RateOfClimbwBombs,full_load_stall:e.StallSpeedFullwBombs,full_load_speed:e.MaxSpeedwBombs,half_fuel_bombs_boost:Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),half_fuel_bombs_handling:Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),half_fuel_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),half_fuel_bombs_stall:Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),half_fuel_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),full_fuel_no_bombs_boost:e.BoostFull,full_fuel_no_bombs_handling:e.HandlingFull,full_fuel_no_bombs_climb:e.RateOfClimbFull,full_fuel_no_bombs_stall:e.StallSpeedFull,full_fuel_no_bombs_speed:Math.floor(1e-6+e.MaxSpeedFull),half_fuel_no_bombs_boost:Math.floor((e.BoostFull+e.BoostEmpty)/2),half_fuel_no_bombs_handling:Math.floor((e.HandlingFull+e.HandlingEmpty)/2),half_fuel_no_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),half_fuel_no_bombs_stall:Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),half_fuel_no_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),empty_boost:0,empty_handling:e.HandlingEmpty,empty_climb:0,empty_stall:e.StallSpeedEmpty,empty_speed:0,vital_part_1:s[0],vital_part_2:s[1],vital_part_3:s[2],vital_part_4:s[3],vital_part_5:s[4],vital_part_6:s[5],vital_part_7:s[6],vital_part_8:s[7],vital_part_9:s[8],vital_part_10:s[9],armor:r,max_bomb_load:n[0],ordinance_1:n[1],ordinance_2:n[2],ordinance_3:n[3],ordinance_4:n[4],notes:u,full_load_selected:!0,half_fuel_bombs_selected:!1,full_fuel_no_bombs_selected:!1,half_fuel_no_bombs_selected:!1,empty_selected:!1,engines:this.InteractiveEngines(),weapons:this.InteractiveWeapons()};return JSON.stringify(_)}InteractiveEngines(){const t=[];for(let e=0;e0&&t.starter&&n.push(h("Starter"))}else{s.IsRotary()&&s.IsTractor()?n.push(h("Turns Right")):s.IsRotary()&&s.IsPusher()&&n.push(h("Turns Left"));const t=x().get(s.GetSelectedList()).get_name(a.name);t.upgrades[1]?n.push(h("War Emergency Power")):t.compressor_count>0&&1==t.compressor_type&&n.push(h("War Emergency Power from altitudes 0-9"))}if(i.notes=r.Join(", ",n),s.GetUsePushPull()){const e=i.reliability.split("/");i.reliability=e[0].toString(),t.push(JSON.stringify(i)),i.reliability=e[0].toString(),t.push(JSON.stringify(i))}else t.push(JSON.stringify(i))}return t}InteractiveWeapons(){const t=[];for(const s of this.GetWeapons().GetWeaponSets()){const i=this.GetWeapons().GetWeaponList(),a=s.GetHits(),n=[];"PR"==i[s.GetWeaponSelected()].abrv?(n.push(5),n.push(5),n.push(5),n.push(5)):(n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[0])),n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[1])),n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[2])),n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[3])));const o=s.GetFinalWeapon(),l=[],c={type:dt(s,i),ammo:s.GetShots(),ap:o.ap,jam:s.GetJam(),knife_hits:a[0],close_hits:a[1],long_hits:a[2],extreme_hits:a[3],knife_damage:n[0],close_damage:n[1],long_damage:n[2],extreme_damage:n[3],tags:""},u=this.GetWeapons().GetDirectionList();s.IsPlural()&&(c.type=s.GetWeaponCount().toString()+"x "+c.type);const _=s.GetDirection();var e="";e+="[";for(let t=0;t11.05?(this.aircraft_type=t.aircraft_type,this.rotor.SetType(t.aircraft_type)):(this.aircraft_type=k.AIRPLANE,this.rotor.SetType(k.AIRPLANE)),this.era.fromJSON(t.era,s),this.cockpits.fromJSON(t.cockpits,s),this.passengers.fromJSON(t.passengers,s),this.engines.fromJSON(t.engines,s),this.propeller.fromJSON(t.propeller,s),this.frames.fromJSON(t.frames,s),this.wings.fromJSON(t.wings,s),this.stabilizers.fromJSON(t.stabilizers,s),this.controlsurfaces.fromJSON(t.controlsurfaces,s),this.reinforcements.fromJSON(t.reinforcements,s),this.fuel.fromJSON(t.fuel,s),this.munitions.fromJSON(t.munitions,s),this.cargo.fromJSON(t.cargo,s),this.gear.fromJSON(t.gear,s),this.accessories.fromJSON(t.accessories,s),this.optimization.fromJSON(t.optimization,s),this.weapons.fromJSON(t.weapons,s),s>10.65&&this.used.fromJSON(t.used,s),s>11.05&&this.rotor.fromJSON(t.rotor,s),s>12.25?this.alter.fromJSON(t.alter,s):this.alter.ClearAll(),this.freeze_calculation=!1,!0}serialize(t){t.PushString(this.version),t.PushString(this.name),this.era.serialize(t),this.cockpits.serialize(t),this.passengers.serialize(t),this.engines.serialize(t),this.propeller.serialize(t),this.frames.serialize(t),this.wings.serialize(t),this.stabilizers.serialize(t),this.controlsurfaces.serialize(t),this.reinforcements.serialize(t),this.fuel.serialize(t),this.munitions.serialize(t),this.cargo.serialize(t),this.gear.serialize(t),this.accessories.serialize(t),this.optimization.serialize(t),this.weapons.serialize(t),this.used.serialize(t),this.rotor.serialize(t),t.PushNum(this.aircraft_type),this.alter.serialize(t)}deserialize(t){this.freeze_calculation=!0,t.version=parseFloat(t.GetString()),this.name=t.GetString(),this.era.deserialize(t),this.cockpits.deserialize(t),this.passengers.deserialize(t),this.engines.deserialize(t),this.propeller.deserialize(t),this.frames.deserialize(t),this.wings.deserialize(t),this.stabilizers.deserialize(t),this.controlsurfaces.deserialize(t),this.reinforcements.deserialize(t),this.fuel.deserialize(t),this.munitions.deserialize(t),this.cargo.deserialize(t),this.gear.deserialize(t),this.accessories.deserialize(t),this.optimization.deserialize(t),this.weapons.deserialize(t),t.version>10.65&&this.used.deserialize(t),t.version>11.05&&t.GetRemaining()>0?(this.rotor.deserialise(t),this.aircraft_type=t.GetNum(),this.rotor.SetType(this.aircraft_type)):(this.aircraft_type=k.AIRPLANE,this.rotor.SetType(k.AIRPLANE)),t.version>12.25?this.alter.deserialize(t):this.alter.ClearAll(),this.freeze_calculation=!1}SetType(t){this.aircraft_type=t,this.rotor.SetType(t),this.CalculateStats()}SetDisplayCallback(t){this.DisplayCallback=t}CalculateStats(){if(this.freeze_calculation)return;this.recurrent_calculation_depth=this.recurrent_calculation_depth+1,this.updated_stats=!1;let t=new u;if(t=t.Add(this.era.PartStats()),t=t.Add(this.cockpits.PartStats()),t=t.Add(this.passengers.PartStats()),this.engines.SetTailMods(this.frames.GetFarmanOrBoom(),this.wings.GetSwept()&&this.stabilizers.GetVOutboard(),this.stabilizers.GetCanard()),this.engines.SetInternal(this.aircraft_type==k.HELICOPTER||H(this.aircraft_type)),this.engines.SetMetalArea(this.wings.GetMetalArea()),this.engines.HaveParasol(this.wings.GetParasol()),t=t.Add(this.engines.PartStats()),this.propeller.SetEngineTypes(this.engines.GetEngineTypes()),this.propeller.SetAcftType(this.aircraft_type),t=t.Add(this.propeller.PartStats()),t=t.Add(this.fuel.PartStats()),t=t.Add(this.munitions.PartStats()),this.weapons.SetNumberOfCockpits(this.cockpits.GetNumberOfCockpits()),this.weapons.SetTractorInfo(this.engines.GetTractorSpinner()),this.weapons.SetPusherInfo(this.engines.GetPusherSpinner()),this.weapons.cant_type=this.reinforcements.GetCantileverType(),this.weapons.SetHavePropeller(this.engines.GetNumPropellers()>0),this.weapons.SetCanWing(!H(this.aircraft_type)),t=t.Add(this.weapons.PartStats()),t=t.Add(this.cargo.PartStats()),this.wings.SetAcftType(this.aircraft_type),this.aircraft_type==k.AUTOGYRO?this.wings.SetRotorSpan(this.rotor.GetRotorSpan()):this.wings.SetRotorSpan(0),t=t.Add(this.wings.PartStats()),this.rotor.SetWingArea(t.wingarea),this.aircraft_type==k.AUTOGYRO&&(this.rotor.SetEngineCount(this.engines.GetNumberOfEngines()),t=t.Add(this.rotor.PartStats())),this.controlsurfaces.SetWingArea(t.wingarea),this.controlsurfaces.SetBoomTail(this.frames.GetUseBoom()),this.controlsurfaces.SetSpan(this.wings.GetSpan()),this.controlsurfaces.SetAcftType(this.aircraft_type),this.controlsurfaces.SetCanElevator(this.stabilizers.GetHStabCount()>0),this.controlsurfaces.SetCanRudder(this.stabilizers.GetVStabCount()>0),this.controlsurfaces.SetIsVTail(this.stabilizers.GetIsVTail()),this.aircraft_type==k.AIRPLANE?this.controlsurfaces.SetNumCantilever(this.reinforcements.GetTotalCantilevers()):this.controlsurfaces.SetNumCantilever(0),t=t.Add(this.controlsurfaces.PartStats()),this.reinforcements.SetMonoplane(this.wings.GetMonoplane()),this.reinforcements.SetTandem(this.wings.GetTandem()),this.reinforcements.SetStaggered(this.wings.GetStaggered()),this.reinforcements.SetCanUseExternal(this.wings.GetArea()>0),this.reinforcements.SetSesquiplane(this.wings.GetIsSesquiplane()),this.reinforcements.SetAircraftType(this.aircraft_type),this.reinforcements.SetCantLift(this.era.GetCantLift()),t=t.Add(this.reinforcements.PartStats()),this.rotor.GetTailRotor()&&(t.power=Math.floor(1e-6+.9*t.power)),this.accessories.SetAcftRadiator(this.engines.GetNumberOfRadiators()>0),this.accessories.SetSkinArmor(this.frames.GetArmor()),this.accessories.SetCanCutouts(this.wings.CanCutout(),this.frames.CanCutout()),t=t.Add(this.accessories.PartStats()),this.frames.SetRequiredSections(t.reqsections),this.frames.SetHasTractorNacelles(this.engines.GetHasTractorNacelles()),this.frames.SetIsTandem(this.wings.GetTandem()),t=t.Add(this.frames.PartStats()),this.stabilizers.SetEngineCount(this.engines.GetNumberOfEngines()),this.stabilizers.SetIsTandem(this.wings.GetTandem()),this.stabilizers.SetIsSwept(this.wings.GetSwept()),this.stabilizers.SetHaveTail(!this.frames.GetIsTailless()),this.stabilizers.SetHelicopter(!1),this.stabilizers.SetLiftingArea(t.wingarea),this.stabilizers.wing_drag=this.wings.GetWingDrag()+this.rotor.GetRotorDrag(),t=t.Add(this.stabilizers.PartStats()),this.wings.SetAircraftMass(t.mass),t.mass+=this.wings.GetPaperMass(),t.mass=Math.max(1,t.mass),this.gear.SetGull(this.wings.HasInvertedGull()),this.gear.SetLoadedMass(t.mass+t.wetmass),this.gear.CanBoat(this.engines.GetEngineHeight(),this.wings.GetWingHeight()),t=t.Add(this.gear.PartStats()),t.toughness+=Math.floor(1e-6+t.structure/5),this.optimization.SetAcftStats(t),t=t.Add(this.optimization.PartStats()),this.cockpits.SetHasRotary(this.engines.HasTractorRotary()),t=t.Add(this.alter.PartStats()),t.Round(),!this.updated_stats){this.updated_stats=!0,this.stats=t;const e=this.GetDerivedStats();this.stats.cost+=this.controlsurfaces.GetFlapCost(e.DryMP),t.reliability-=this.used.burnt_out,this.weapons.SetStickyGuns(this.used.sticky_guns),this.cockpits.SetArmed(this.weapons.GetArmedSeats()),this.cockpits.UpdateCrewStats(this.stats.escape,e.ControlStress,e.RumbleStress,this.stats.visibility,this.stats.crashsafety);let s=0;for(const t of this.cockpits.GetStressList())s=Math.max(s,t[0]-t[1]);0!=s&&-1==this.stats.warnings.findIndex((t=>t.source==h("Co-Pilot Controls")))&&this.stats.warnings.push({source:h("Co-Pilot Controls"),warning:h("Co-Pilot Warning",s),color:c.WHITE}),H(this.aircraft_type)&&(t.upkeep+=1),this.aircraft_type==k.ORNITHOPTER_BUZZER&&(t.reliability-=2),this.engines.UpdateReliability(t),this.reinforcements.SetAcftStructure(t.structure),this.fuel.SetArea(this.wings.GetArea()),this.fuel.SetCantilever(this.reinforcements.GetIsCantilever()),this.accessories.SetVitalParts(this.VitalComponentList().length),this.munitions.SetAcftParameters(t.structure,this.era.GetMaxBomb(),this.wings.HasInvertedGull()),this.stats.cost=Math.max(1,this.stats.cost),this.stats.liftbleed=Math.max(1,this.stats.liftbleed),10*this.engines.GetRumble()>t.structure&&(this.stats.power=0,this.stats.warnings.push({source:h("Stat Rumble"),warning:h("Rumble Warning"),color:c.RED})),this.use_storage&&window.localStorage.setItem("test.aircraft",JSON.stringify(this))}this.recurrent_calculation_depth=this.recurrent_calculation_depth-1,this.DisplayCallback&&!this.freeze_calculation&&0==this.recurrent_calculation_depth&&this.DisplayCallback()}GetDerivedStats(){let t=Math.floor(1e-6+this.stats.mass/5);t=Math.max(t,1);let e=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass)/5);e=Math.max(e,1);let s=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass+this.stats.bomb_mass)/5);s=Math.max(s,1);let i=Math.floor(1e-6+(this.stats.drag+t)/5);i=Math.max(i,1);const a=i;let r=Math.floor(1e-6+(this.stats.drag+this.munitions.GetExternalMass()+t)/5);r=Math.max(r,1);let n=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*i))),o=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*a))),l=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*r)));this.stats.mass<15&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Mass")))&&this.stats.warnings.push({source:h("Stat Mass"),warning:h("Low Mass Warning"),color:c.YELLOW}),this.stats.drag+t<35&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Drag")))&&this.stats.warnings.push({source:h("Stat Drag"),warning:h("Low Drag Warning"),color:c.YELLOW});let u=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*t/Math.max(1,this.stats.wingarea))),_=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*e/Math.max(1,this.stats.wingarea))),p=Math.max(Math.floor(1e-6+this.stats.liftbleed*s/Math.max(1,this.stats.wingarea)));var m=this.engines.GetOverspeed();const g=Math.floor(1e-6+this.stats.power/t),f=Math.floor(1e-6+this.stats.power/e),d=Math.floor(1e-6+this.stats.power/s);0==d&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Boost")))&&this.stats.warnings.push({source:h("Derived Boost"),warning:h("Boost Warning"),color:c.RED});const y=Math.floor(1e-6+this.stats.pitchboost*n);n=Math.floor(1e-6+n*(1-.1*this.used.ragged)),o=Math.floor(1e-6+o*(1-.1*this.used.ragged)),l=Math.floor(1e-6+l*(1-.1*this.used.ragged));let b=this.stats.pitchstab+this.stats.latstab;this.stats.pitchstab>0&&this.stats.latstab>0?b+=2:this.stats.pitchstab<0&&this.stats.latstab<0&&(b-=2);let S=100+this.stats.control-t;b>10||b<-10?(S=-1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Stability")))&&this.stats.warnings.push({source:h("Derived Stability"),warning:h("Stability Warning"),color:c.RED})):10==b?S-=4:b>6?S-=3:b>3?S-=2:b>0?S-=1:0==b?S+=0:b>-4?S+=1:b>-7?S+=2:b>-10?S+=3:-10==b&&(S+=4);let w=S+t-e,C=S+t-s;S=Math.floor(1e-6+S-5*this.used.sluggish),w=Math.floor(1e-6+w-5*this.used.sluggish),C=Math.floor(1e-6+C-5*this.used.sluggish);let P=Math.min(this.stats.maxstrain-t,this.stats.structure);this.optimization.final_ms=Math.floor(1e-6+1.5*this.optimization.GetMaxStrain()*P/10),P+=this.optimization.final_ms,P=Math.floor(1e-6+P*(1-.2*this.used.fragile)),P<10&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Max Strain")))&&this.stats.warnings.push({source:h("Stat Max Strain"),warning:h("Max Strain Warning"),color:c.RED});let G=this.stats.toughness;G=Math.floor(1e-6+G*(1-.5*this.used.weak));const M=this.stats.structure;let R=Math.ceil(i/this.propeller.GetEnergy()-1e-6),v=R+1;R=Math.min(R,10),v=Math.min(v,10);let A=Math.ceil(Math.floor(1e-6+(u+_)/2)/this.propeller.GetTurn()-1e-6);this.aircraft_type==k.HELICOPTER&&(A=Math.max(1,Math.floor(1e-6+t/2))+this.rotor.GetRotorBleed(),R=Math.max(1,Math.floor(1e-6+i/7)),u=0,_=0,p=0,n=Math.min(37,n),o=Math.min(37,o),l=Math.min(37,l)),A=Math.max(A,1);let I=A+1;I=Math.max(I,1),u=Math.max(1,Math.floor(1e-6+u*(1+.2*this.used.hefty))),_=Math.max(1,Math.floor(1e-6+_*(1+.2*this.used.hefty))),p=Math.max(1,Math.floor(1e-6+p*(1+.2*this.used.hefty))),(l<=p||o<=_)&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stall Speed")))&&this.stats.warnings.push({source:h("Stall Speed"),warning:h("Stall Speed Warning"),color:c.RED});let E=Math.floor(1e-6+this.stats.fuel/this.stats.fuelconsumption);E=Math.floor(1e-6+E*(1-.2*this.used.leaky)),isFinite(E)||(E=0),E<6&&0!=this.stats.fuelconsumption&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Fuel Uses")))&&this.stats.warnings.push({source:h("Derived Fuel Uses"),warning:h("Fuel Uses Warning"),color:c.YELLOW});let N=1;(b>3||b<-3)&&N++;let T=0;N+=Math.min(this.accessories.GetMaxMassStress(),Math.floor(1e-6+t/10));const x=this.accessories.GetMaxTotalStress();N=Math.min(x,N),this.engines.GetMaxRumble()>0&&(T+=Math.max(1,.5*this.engines.GetRumble()),T=Math.floor(1e-6+T),T=Math.min(3,T)),0==x&&(T=0);let W=Math.max(1,Math.floor(1e-6+this.stats.power/t*(23/this.stats.pitchspeed)/i)),O=Math.max(1,Math.floor(1e-6+this.stats.power/e*(23/this.stats.pitchspeed)/a)),F=Math.max(1,Math.floor(1e-6+this.stats.power/s*(23/this.stats.pitchspeed)/r));return isFinite(W)||(W=0,O=0,F=0),H(this.aircraft_type)&&(S+=5,w+=5,C+=5,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Stall")))&&this.stats.warnings.push({source:h("Ornithopter Stall"),warning:h("Ornithopter Stall Warning"),color:c.WHITE}),m=P),this.aircraft_type==k.ORNITHOPTER_FLUTTER&&(S+=5,w+=5,C+=5,m=1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Flutterer Attack")))&&this.stats.warnings.push({source:h("Ornithopter Flutterer Attack"),warning:h("Ornithopter Flutterer Attack Warning"),color:c.WHITE})),this.aircraft_type==k.ORNITHOPTER_BUZZER&&(-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Boost")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Boost"),warning:h("Ornithopter Buzzer Boost Warning"),color:c.WHITE}),-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Stall")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Stall"),warning:h("Ornithopter Buzzer Stall Warning"),color:c.WHITE})),{DryMP:t,WetMP:e,WetMPwBombs:s,DPEmpty:i,DPFull:a,DPwBombs:r,MaxSpeedEmpty:n,MaxSpeedFull:o,MaxSpeedwBombs:l,StallSpeedEmpty:u,StallSpeedFull:_,StallSpeedFullwBombs:p,Overspeed:m,BoostEmpty:g,BoostFull:f,BoostFullwBombs:d,Dropoff:y,Stabiilty:b,HandlingEmpty:S,HandlingFull:w,HandlingFullwBombs:C,MaxStrain:P,Toughness:G,Structure:M,EnergyLoss:R,EnergyLosswBombs:v,TurnBleed:A,TurnBleedwBombs:I,FuelUses:E,ControlStress:N,RumbleStress:T,RateOfClimbFull:O,RateOfClimbEmpty:W,RateOfClimbwBombs:F}}VitalComponentList(){const t=this.GetDerivedStats(),e=[];e.push(h("Vital Part Controls"));for(let t=0;t0&&e.push(h("Vital Part Fuel Tanks"));for(let t=0;t{let s=parseInt(t.charge);"-"==t.charge&&(s=0);let i=parseInt(e.charge);return"-"==e.charge&&(i=0),isNaN(s)&&isNaN(i)?0:isNaN(s)?-1:isNaN(i)?1:i-s})),t=z(this.engines.GetElectrics(),t),t=z(t,this.weapons.GetElectrics());let e=!1;for(const s of t.equipment){const t=parseInt(s.charge);!isNaN(t)&&t>0&&(s.charge="+"+s.charge,e=!0)}return t.equipment.length>0&&t.storage<=0&&!e&&-1==this.stats.warnings.findIndex((t=>t.source==h("Insufficient Charge")))&&this.stats.warnings.push({source:h("Insufficient Charge"),warning:h("Insufficient Charge Warning"),color:c.RED}),t}}function wt(t,e,s){const i=new Blob([t],{type:s}),a=document.createElement("a"),r=URL.createObjectURL(i);a.href=r,a.download=e,document.body.appendChild(a),a.click(),setTimeout((function(){document.body.removeChild(a),window.URL.revokeObjectURL(r)}),0)}function Ct(t,e){const s=document.createElement("TH");return s.innerHTML=e,t.appendChild(s),s}function Pt(t,e,s){const i=document.createElement("LABEL");i.style.marginLeft="0.25em",i.style.marginRight="0.5em",i.textContent=t,i.classList.add("flex-item"),s.div1.appendChild(i);const a=document.createElement("LABEL");return a.style.marginLeft="0.25em",a.style.marginRight="0.5em",a.textContent=e,a.classList.add("flex-item"),s.div2.appendChild(a),[i,a]}function Gt(t){const e=document.createElement("TR");return t.append(e),e}function Mt(t){t.classList.toggle("changed_b",!1),t.classList.toggle("changed_g",!1),t.classList.toggle("changed_n",!1),t.offsetHeight,t.classList.toggle("changed_n")}function Rt(t){const e=new Uint8Array(t.length);for(let s=0;s0;)this.version_cell.removeChild(this.version_cell.children[0]);this.version_cell.className="tooltip";const i=document.createElement("DIV");i.className="tooltiptext";let a=document.createElement("P");a.textContent=h("Derived Problematic Parts"),i.appendChild(a);const n=p(t.GetEra().GetSelectedText());var o=0;for(let t of e.era){const e=p(t.era);if(e>n){o+=e-n;let s=document.createElement("P");s.textContent=t.name+": "+t.era,i.appendChild(s)}}if(0==o){let t=document.createElement("P");t.textContent=h("None"),i.appendChild(t)}const l=document.createElement("P");for(l.textContent=h(t.GetEra().GetSelectedText()),l.className=0==o?"green":o>2?"red":"yellow",this.version_cell.appendChild(l),this.version_cell.appendChild(i),this.cost_cell.textContent=e.cost.toString()+"þ ",t.GetUsed().IsDefault()||(this.cost_cell.textContent+=" ("+Math.floor(1e-6+e.cost/2).toString()+"þ "+h("Price Word Used")+")"),this.upkeep_cell.textContent=e.upkeep.toString()+"þ",this.ts_empty.textContent=(0).toString(),this.ss_empty.textContent=s.StallSpeedEmpty.toString(),this.hand_empty.textContent=s.HandlingEmpty.toString(),this.boost_empty.textContent=(0).toString(),this.roc_empty.textContent=(0).toString(),this.ts_half.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedFull)/2).toString(),this.ss_half.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFull)/2).toString(),this.hand_half.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFull)/2).toString(),this.boost_half.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFull)/2).toString(),this.roc_half.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbFull)/2).toString(),this.ts_full.textContent=Math.floor(1e-6+s.MaxSpeedFull).toString(),this.ss_full.textContent=s.StallSpeedFull.toString(),this.hand_full.textContent=s.HandlingFull.toString(),this.boost_full.textContent=s.BoostFull.toString(),this.roc_full.textContent=s.RateOfClimbFull.toString(),e.bomb_mass>0||this.show_bombs?(this.bomb_row1.hidden=!1,this.bomb_row2.hidden=!1,this.bomb_row2.appendChild(this.vital_components),this.vital_components.rowSpan=5,this.ts_halfwB.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedwBombs)/2).toString(),this.ss_halfwB.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFullwBombs)/2).toString(),this.hand_halfwB.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFullwBombs)/2).toString(),this.boost_halfwB.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFullwBombs)/2).toString(),this.roc_halfwB.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbwBombs)/2).toString(),this.ts_fullwB.textContent=Math.floor(1e-6+s.MaxSpeedwBombs).toString(),this.ss_fullwB.textContent=s.StallSpeedFullwBombs.toString(),this.hand_fullwB.textContent=s.HandlingFullwBombs.toString(),this.boost_fullwB.textContent=s.BoostFullwBombs.toString(),this.roc_fullwB.textContent=s.RateOfClimbwBombs.toString(),this.turnbleed_label.textContent=h("Derived Turn Bleed wB"),this.turnbleed_cell.textContent=r.Format("{0} ({1})",s.TurnBleed,s.TurnBleedwBombs)):(this.bomb_row1.hidden=!0,this.bomb_row2.hidden=!0,this.full_row.appendChild(this.vital_components),this.vital_components.rowSpan=3,this.turnbleed_label.textContent=h("Derived Turn Bleed"),this.turnbleed_cell.textContent=r.Format("{0}",s.TurnBleed)),this.dropoff_cell.textContent=s.Dropoff.toString(),this.overspeed_cell.textContent=s.Overspeed.toString(),this.maxfuel_cell.textContent=(Math.floor(1e-6+10*s.FuelUses)/10).toString(),t.GetIsFlammable()?this.flammable_cell.textContent=h("Yes"):this.flammable_cell.textContent=h("No"),this.stability_cell.textContent=s.Stabiilty.toString(),this.eloss_cell.textContent=s.EnergyLoss.toString(),this.landing_cell.textContent=t.GetGearName(),this.maxalt_cell.textContent=t.GetMinAltitude().toString()+"-"+t.GetMaxAltitude().toString(),this.reliability_cell.textContent=r.Join(", ",t.GetReliabilityList()),this.toughness_cell.textContent=s.Toughness.toString(),this.mxstrain_cell.textContent=s.MaxStrain.toString(),this.escape_cell.textContent=r.Join(", ",t.GetEscapeList()),this.crashsafety_cell.textContent=e.crashsafety.toString(),this.crew_cell.textContent=t.GetCockpits().GetNumberOfCockpits().toString()+"/"+(t.GetPassengers().GetSeats()+t.GetPassengers().GetBeds()).toString(),this.flightstress_cell.textContent=g(t.GetStressList()),this.visibility_cell.textContent=r.Join(", ",t.GetVisibilityList()),this.attack_cell.textContent=r.Join(", ",t.GetAttackList()),this.communications_cell.textContent=t.GetCommunicationName();this.electric_cell.childElementCount>0;)this.electric_cell.removeChild(this.electric_cell.firstChild);const u=t.GetElectrics(),_=function(t){const e={div0:document.createElement("DIV"),div1:document.createElement("DIV"),div2:document.createElement("DIV")};return e.div0.classList.add("flex-container-o"),e.div1.classList.add("flex-container-i"),e.div2.classList.add("flex-container-i"),e.div0.appendChild(e.div1),e.div0.appendChild(e.div2),t.appendChild(e.div0),e}(this.electric_cell);u.storage>0&&Pt(h("Derived Battery"),u.storage.toString(),_);for(let t of u.equipment)Pt(t.source,t.charge,_);var m="";const f=t.VitalComponentList();for(let t of f)m+=t+"
";this.vital_components.innerHTML=m;const d=t.GetWeapons().GetWeaponList(),y=t.GetWeapons().GetDirectionList(),b=t.GetMunitions().GetBombCount(),S=t.GetMunitions().GetRocketCount();var w=t.GetMunitions().GetInternalBombCount(),C="";if(b>0){const e=Math.min(b,w),s=Math.max(0,b-e);e>0&&(C+=h(" Bomb Mass Internally.",e)),s>0&&(C+=h(" Bomb Mass Externally.",s)),e>0&&(C+=h("Largest Internal Bomb",Math.min(e,t.GetMunitions().GetMaxBombSize()).toString())),w-=e,C+="
"}if(S>0){const t=Math.min(S,w),e=Math.max(0,S-t);t>0&&(C+=h(" Rocket Mass Internally.",t)),e>0&&(C+=h(" Rocket Mass Externally.",e)),C+="
"}for(let e of t.GetWeapons().GetWeaponSets())C+=bt(e,d,y),C+="
";this.weapon_cell.innerHTML=C,e.warnings.sort(((t,e)=>t.color-e.color));var P="";for(let t of e.warnings){switch(t.color){case c.RED:P+='
';break;case c.YELLOW:P+='
';break;case c.WHITE:default:P+='
'}P+=t.source+": "+t.warning+"
"}this.warning_cell.innerHTML=P;var G="";const M=t.GetWings().GetWingList().length;if(1==M){const e=t.GetWings().GetWingList()[0].deck;e>>8,s[2*t+1]=i%256}return s},decompressFromUint8Array:function(e){if(null==e)return r.decompress(e);var s=new Array(e.length/2);for(let t=0,i=s.length;t>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=n[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++),n[h]=_++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(o,c)){if(c.charCodeAt(0)<256){for(i=0;i>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=n[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++)}for(a=2,i=0;i>=1;for(;;){if(g<<=1,f==e-1){m.push(s(g));break}f++}return m.join("")},decompress:function(t){return null==t?"":""==t?null:r._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,s,i){var a,r,n,o,l,h,c,u=[],_=4,p=4,m=3,g="",f=[],d={val:i(0),position:s,index:1};for(a=0;a<3;a+=1)u[a]=a;for(n=0,l=Math.pow(2,2),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;switch(n){case 0:for(n=0,l=Math.pow(2,8),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;c=t(n);break;case 1:for(n=0,l=Math.pow(2,16),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;c=t(n);break;case 2:return""}for(u[3]=c,r=c,f.push(c);;){if(d.index>e)return"";for(n=0,l=Math.pow(2,m),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;switch(c=n){case 0:for(n=0,l=Math.pow(2,8),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;u[p++]=t(n),c=p-1,_--;break;case 1:for(n=0,l=Math.pow(2,16),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;u[p++]=t(n),c=p-1,_--;break;case 2:return f.join("")}if(0==_&&(_=Math.pow(2,m),m++),u[c])g=u[c];else{if(c!==p)return null;g=r+r.charAt(0)}f.push(g),u[p++]=r+g.charAt(0),r=g,0==--_&&(_=Math.pow(2,m),m++)}}};return r}();class It{constructor(){this.errorMissingSeparator="Missing separator option.",this.errorEmpty="JSON is empty.",this.errorEmptyHeader="Could not detect header. Ensure first row contains your column headers.",this.errorNotAnArray="Your JSON must be an array or an object.",this.errorItemNotAnObject="Item in array is not an object: {0}"}flattenArray(t,e=[]){function s(t,e){let s=t.slice(0);if(!Array.isArray(e))return s;for(let t=0;te==t));return-1==s&&(e.push(t),s=e.length-1,Jt(e)),s}function Ut(t){var e=new f;t.serialize(e);var s=function(t){let e="";const s=new Uint8Array(t),i=s.byteLength;for(let t=0;te==t.name));return-1==r?(a.names.push(t.name),a.acft.push(i),r=a.names.length-1):a.acft[r]=i,jt(a),r}function jt(t){window.localStorage.setItem("test.hangar."+qt,JSON.stringify(t)),Vt(t)}function Jt(t){window.localStorage.setItem("test.hangar_names",JSON.stringify(t)),Yt(t)}function Vt(t){for(;Ft.lastChild;)Ft.removeChild(Ft.lastChild);for(let e=0;e'+o.innerHTML,r.appendChild(l)}}else{var h=r.insertCell();h.colSpan=2,h.appendChild(kt),kt.value=Nt.name;var c=document.createElement("HR");c.className="dashed",h.appendChild(c),h.appendChild(Ot),h.appendChild(document.createElement("BR")),h.appendChild(Ft)}}}(document.getElementById("table_builder"),document.getElementById("table_hangar"),document.getElementById("table_comp"))}window.addEventListener("DOMContentLoaded",(()=>{var t=new URLSearchParams(location.search).get("lang");t?l.SetCurrentLanguage(t):window.localStorage.language&&l.SetCurrentLanguage(window.localStorage.language),function(t){for(const t of E.l)if(T.has(t.name)||T.set(t.name,new N(t.name)),"Custom"!=t.name){T.get(t.name).fromJSON(t,!0),T.get(t.name).SetConstant();for(let e=0;e{qt=Ot.options[Ot.selectedIndex].text,Vt(Ht())},Yt(Bt()),(Ft=document.createElement("SELECT")).onchange=()=>{Dt(Ft.selectedIndex)},Vt(Ht()),kt=document.createElement("INPUT");var t=document.getElementById("btn_load");t.onclick=()=>{Nt.fromJSON(JSON.parse(JSON.stringify(xt.toJSON()))),Nt.CalculateStats(),Tt.UpdateDisplay(Nt,Nt.GetStats(),Nt.GetDerivedStats()),window.localStorage.setItem("test.aircraft",JSON.stringify(Nt.toJSON())),Zt(),Mt(t.parentElement)};var e=document.getElementById("btn_save");e.onclick=()=>{Nt.name=kt.value,Ut(Nt),Mt(e.parentElement)};var s=document.getElementById("btn_json");s.multiple=!1,s.accept="application/JSON",s.onchange=t=>{!function(t){if(0!=t.files.length){var e=t.files[0],s=new FileReader;s.onloadend=()=>{try{var t=JSON.parse(s.result),e=new St(Lt,!1);e.fromJSON(t)&&Dt(Ut(e))}catch(t){console.error(t,t.stack)}},s.readAsText(e),t.value=""}}(s),Mt(s.parentElement)};var i=document.getElementById("btn_remove");i.onclick=()=>{var t,e,s;t=xt.name,e=Ht(),-1!=(s=e.names.findIndex((e=>e==t)))&&(e.names.splice(s,1),e.acft.splice(s,1)),jt(e),Dt(Math.min(e.names.length-1,s)),Mt(i.parentElement)};var a=document.getElementById("btn_save_h");a.onclick=()=>{wt(JSON.stringify(Ht()),qt+".json","json"),Mt(a.parentElement)};var n=document.getElementById("btn_json_h");n.setAttribute("type","file"),n.multiple=!1,n.accept="application/JSON",n.onchange=t=>{if(0!=n.files.length){Mt(n.parentElement);var e=n.files[0],s=new FileReader;s.onloadend=()=>{try{var t,i=e.name.substr(0,e.name.length-5);if(i=(i=i.trim()).replace(/\s+/g," "),(t=JSON.parse(s.result)).names.length!=t.acft.length)throw"Bad";zt(i),window.localStorage.setItem("test.hangar."+i,s.result),qt=i,Yt(Bt()),Vt(Ht())}catch{(a=n.parentElement).classList.toggle("changed_b",!1),a.classList.toggle("changed_g",!1),a.classList.toggle("changed_n",!1),a.offsetHeight,a.classList.toggle("changed_b")}var a},s.readAsText(e),n.value=""}};var o=document.getElementById("lbl_create_list"),l=document.getElementById("btn_create_list");o.onclick=()=>{var t=l.value;""!=(t=(t=t.trim()).replace(/\s+/g," "))&&(Ot.selectedIndex=zt(t),qt=t,Vt(Ht()),Mt(o.parentElement)),l.value=""};var h=document.getElementById("btn_delete_list");h.onclick=()=>{var t,e,s;t=qt,e=Bt(),-1!=(s=e.findIndex((e=>e==t)))&&(e.splice(s,1),window.localStorage.removeItem("test.hangar."+t)),Jt(e),qt="Default",Yt(Bt()),Vt(Ht()),Dt(0),Mt(h.parentElement)},document.getElementById("btn_to_csv").onclick=()=>{var t=Ht(),e=[],s=JSON.stringify(xt.toJSON());for(let s of t.acft){try{var i=Rt(At.decompressFromEncodedURIComponent(s)),a=new d(i);xt.deserialize(a),xt.CalculateStats()}catch(t){console.log("Compressed Query Parameter Failed."),console.log(t),xt.Reset()}let t=xt.GetStats(),n=xt.GetDerivedStats(),o=Object.entries(n);o.splice(0,0,["name",xt.name]),o.splice(1,0,["cost",t.cost]),o.splice(2,0,["upkeep",t.upkeep]),o.splice(3,0,["bomb_mass",t.bomb_mass]),o.splice(4,0,["escape",r.Join("/",xt.GetEscapeList())]),o.splice(5,0,["crash",r.Join("/",xt.GetCrashList())]),o.splice(6,0,["stress",g(xt.GetStressList())]);let l=Object.fromEntries(o);e.push(l)}xt.fromJSON(JSON.parse(s)),wt((new It).convert(e,{separator:",",flatten:!0,output_csvjson_variant:!1}),qt+".csv","csv")}}(),function(){let t=window.localStorage.getItem("test.aircraft");if(Nt=new St(Lt,!1),t){console.log("Used Saved Data");try{Nt.fromJSON(JSON.parse(t)),Nt.CalculateStats()}catch{console.log("Saved Data Failed."),Nt.Reset()}}(Tt=new vt(document.getElementById("table_builder"))).SetShowBombs(!0),Tt.UpdateDisplay(Nt,Nt.GetStats(),Nt.GetDerivedStats()),xt=new St(Lt,!1),(Wt=new vt(document.getElementById("table_hangar"))).SetShowBombs(!0)}(),Dt(0)}))})(); \ No newline at end of file +(()=>{"use strict";var t,e,s={},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}};return s[t](r,r.exports,a),r.exports}e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,a.t=function(s,i){if(1&i&&(s=this(s)),8&i)return s;if("object"==typeof s&&s){if(4&i&&s.__esModule)return s;if(16&i&&"function"==typeof s.then)return s}var r=Object.create(null);a.r(r);var n={};t=t||[null,e({}),e([]),e(e)];for(var o=2&i&&s;"object"==typeof o&&!~t.indexOf(o);o=e(o))Object.getOwnPropertyNames(o).forEach((t=>n[t]=()=>s[t]));return n.default=()=>s,a.d(r,n),r},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};class r{static IsNullOrWhiteSpace(t){try{return null==t||"undefined"==t||t.toString().replace(/\s/g,"").length<1}catch(t){return console.log(t),!1}}static Join(t,...e){try{const s=e[0];if(Array.isArray(s)||s instanceof Array){let e=r.Empty;for(let i=0;i{e+=i[s]+t})),e=e.slice(0,e.length-t.length),e}const i=e;return r.join(t,...i)}catch(t){return console.log(t),r.Empty}}static Format(t,...e){try{return t.match(r.regexNumber)?r.format(r.regexNumber,t,e):t.match(r.regexObject)?r.format(r.regexObject,t,e,!0):t}catch(t){return console.log(t),r.Empty}}static format(t,e,s,i=!1){return e.replace(t,(function(t,e){const a=t.split(":");let n;return a.length>1&&(e=a[0].replace("{",""),t=a[1].replace("}","")),n=i?s[0][e]:s[e],null==n||null==n||t.match(/{\d+}/)?n:(n=r.parsePattern(t,n),void 0!==n&&null!=n?n:r.Empty)}))}static parsePattern(t,e){switch(t){case"L":return e.toLocaleLowerCase();case"U":return e.toLocaleUpperCase();case"d":if("string"==typeof e)return r.getDisplayDateFromString(e);if(e instanceof Date)return r.Format("{0:00}.{1:00}.{2:0000}",e.getDate(),e.getMonth(),e.getFullYear());break;case"s":if("string"==typeof e)return r.getSortableDateFromString(e);if(e instanceof Date)return r.Format("{0:0000}-{1:00}-{2:00}",e.getFullYear(),e.getMonth(),e.getDate());break;case"n":{"string"!=typeof e&&(e=e.toString());const t=e.replace(/,/g,".");if(isNaN(parseFloat(t))||t.length<=3)break;const s=t.split(/[^0-9]+/g);let i=s;s.length>1&&(i=[r.join("",...s.splice(0,s.length-1)),s[s.length-1]]);const a=i[0],n=a.length%3;let o=n>0?a.substring(0,n):r.Empty;const l=a.substring(n).match(/.{3}/g);return o=o+"."+r.Join(".",l),o+(i.length>1?","+i[1]:"")}case"x":return this.decimalToHexString(e);case"X":return this.decimalToHexString(e,!0)}return"number"!=typeof e&&isNaN(e)||isNaN(+t)||r.IsNullOrWhiteSpace(e)?e:r.formatNumber(e,t)}static decimalToHexString(t,e=!1){const s=parseFloat(t).toString(16);return e?s.toLocaleUpperCase():s}static getDisplayDateFromString(t){const e=t.split("-");if(e.length<=1)return t;let s=e[e.length-1];const i=e[e.length-2],a=e[e.length-3];return s=s.split("T")[0],s=s.split(" ")[0],`${s}.${i}.${a}`}static getSortableDateFromString(t){const e=t.replace(",","").split(".");if(e.length<=1)return t;const s=e[e.length-1].split(" ");let i=r.Empty;s.length>1&&(i=s[s.length-1]);let a=`${e[e.length-1].split(" ")[0]}-${e[e.length-2]}-${e[e.length-3]}`;return!r.IsNullOrWhiteSpace(i)&&i.length>1?a+=`T${i}`:a+="T00:00:00",a}static formatNumber(t,e){const s=e.length,i=t.toString();if(s<=i.length)return i;let a=s-i.length;return a+=1,new Array(a).join("0")+i}static join(t,...e){let s=r.Empty;for(let i=0;i Benefits(-)":"Penalties(+)
Benefits(-)","Used Burnt Out":"Burnt Out","Used Burnt Out Description":"Engines are at -1 Reliability","Used Ragged":"Ragged","Used Ragged Description":"Reduce your Max Speed by 10%","Used Hefty":"Hefty","Used Hefty Description":"Increase your Stall Speeds by 20%","Used Sticky Guns":"Sticky Guns","Used Sticky Guns Description":"Increase the chance of guns jamming by 1","Used Weak":"Weak","Used Weak Description":"Cut the plane\'s Toughness in half","Used Fragile":"Fragile","Used Fragile Description":"Reduce your Max Strain by 20%","Used Leaky":"Leaky","Used Leaky Description":"Reduce your Fuel by 20%","Used Sluggish":"Sluggish","Used Sluggish Description":"Reduce your Handling by 5","Weapons Section Title":"Weapons","Weapons Number of Weapon Sets":"Number of Weapon Sets:","Weapons Number of Weapon Braces":"Number of Weapon Braces:","Weapons Weapon Set":"Weapon Set","Weapons Weapons":"Weapons","Weapons Weapon Stats":"Weapon Stats","Weapons Type":"Weapon Type","Weapons Number of Mounts":"Number of Mounts","Weapons Ammunition":"Ammunition","Weapons Action":"Action","Weapons Projectile":"Projectile","Weapons Belt Fed":"Belt Fed","Weapons Stat Mounting":"Mounting","Weapons Stat Jam":"Jam","Weapons Stat Hits":"Hits","Weapons Stat Damage":"Damage","Weapons Stat Shots":"Shots","Weapons Stat Charges":"Charges per Shot","Weapons Wing Mount":"Wing Mount","Weapons Accessible":"Accessible","Weapons Free Accessible":"Free Accessible","Weapons Covered":"Covered","Weapons # Weapons at Mount":"Weapons at Mount","Weapons Synchronization":"Synchronization","Weapons Mount":"Weapon Mount","Weapons Braces":"Weapon Braces","Weapons Braces Warning":"These mounts give an observer +1 to make a Personal Attack with a loose weapon they are carrying in their hands.","Wings Section Title":"Wings","Wings Wing Stagger":"Wing Stagger:","Wings Closed Wing":"Closed Wing:","Wings Swept Wing":"Swept Wings:","Wings Wing Type":"Wing Type","Wings Wing Options":"Wing Options","Wings Wing Stats":"Wing Stats","Wings Full Wings":"Full Wings","Wings Miniature Wings":"Miniature Wings","Wings Sesquiplane":"Sesquiplane","Wings No Wing":"None","Wings Area":"Area","Wings Span":"Span","Wings Gull":"Gull","Wings Dihedral":"Dihedral","Wings Anhedral":"Anhedral","Aircraft Button Save":"Save","Aircraft Button Load":"Load","Aircraft Button Copy As Link":"Copy As Link","Aircraft Button Save Dashboard":"Save Dashboard","Aircraft Button Interactive Dashboard":"Interactive Dashboard","Aircraft Button Save NPC":"Save NPC","Aircraft Button Save Catalog":"Save Catalog","Aircraft Button Default Aircraft":"Default Aircraft","Aircraft Stats Section Title":"Total Sum of Stats","Aircraft Derived Section Title":"Aircraft Derived Statistics","Seat #":"Seat #{0}","Seats #":"Seats # {0}","Seat Location":"Choose Seat","Radiators #":"Radiators # {0}","Crew Pilot":"Pilot","Crew Bombadier":"Bombardier","Crew Co-Pilot":"Co-Pilot","Crew Gunner":"Gunner","Crew Aircrew":"Aircrew","Diesel":"Diesel Engine","Diesel Warning":"Engine won\'t catch fire.","Cargo Tiny":"A small locker for personal stuff.","Cargo Small":"Will fit a trunk, barrel, or crate.","Cargo Medium":"Will fit a small vehicle like a motorcycle, car, or zeppelin engine.","Cargo Large":"Will fit a scout or fighter aircraft with the wings taken off.","Cargo Huge":"Will fit just about anything you can imagine.","Alter Select Part":"Select Part","Alter Quantity":"Quantity","Alter Part Name":"Part Name","Alter Part Special Rules":"Special Rules","Frame Count":"Frame Count","Frame Count Warning":"This plane appears to have unused frame sections. Check to see if this is intentional.","Altitude Section Title":"Altitude Effects","Altitude Altitude":"Altitude","Rarity":"Rarity","Rarity Custom":"Custom","Rarity Common":"Common","Rarity Rare":"Rare","Rarity Legendary":"Legendary","Boost Warning":"Boost is 0 for some loads. The plane cannot accelerate to take off.","Insufficient Charge":"Insufficient Charge","Insufficient Charge Warning":"This aircraft has electrical systems with nothing to power them.","Low Mass Warning":"This aircraft is very low mass. If it is a custom airplane, be careful not to make it overpowered.","Low Drag Warning":"This aircraft is very low drag. If it is a custom airplane, be careful not to make it overpowered.","Connectivity Warning":"Can move between positions without Wingwalking.","Passenger Connectivity Warning":"Can reach the cockpit without Wingwalking.","Rotor Thickness":"Rotor Thickness"}}');var o=a.t(n,2);const l=new class{constructor(){this.lang="en"}LoadLanguages(t){this.languages=t}GetLanguages(){const t=[];for(const e of this.languages.languages)t.push(e);return t}SetCurrentLanguage(t){this.languages[t]&&(this.lang=t)}e(t){return this.languages[this.lang][t]?this.languages[this.lang][t]:this.languages.en[t]?this.languages.en[t]:(console.error("Failed to find "+t),"!"+t+"!")}};function h(t,...e){return r.Format(l.e(t),...e)}var c;l.LoadLanguages(o),function(t){t[t.WHITE=0]="WHITE",t[t.YELLOW=1]="YELLOW",t[t.RED=2]="RED"}(c||(c={}));class u{constructor(t){this.liftbleed=0,this.wetmass=0,this.mass=0,this.drag=0,this.control=0,this.cost=0,this.reqsections=0,this.visibility=0,this.flightstress=0,this.escape=0,this.pitchstab=0,this.latstab=0,this.cooling=0,this.reliability=0,this.power=0,this.fuelconsumption=0,this.maxstrain=0,this.structure=0,this.pitchspeed=0,this.pitchboost=0,this.wingarea=0,this.toughness=0,this.upkeep=0,this.crashsafety=0,this.bomb_mass=0,this.fuel=0,this.charge=0,this.warnings=[],this.era=[],t&&this.fromJSON(t,0)}toJSON(){return{liftbleed:this.liftbleed,wetmass:this.wetmass,mass:this.mass,drag:this.drag,control:this.control,cost:this.cost,reqsections:this.reqsections,visibility:this.visibility,flightstress:this.flightstress,escape:this.escape,pitchstab:this.pitchstab,latstab:this.latstab,cooling:this.cooling,reliability:this.reliability,power:this.power,fuelconsumption:this.fuelconsumption,maxstrain:this.maxstrain,structure:this.structure,pitchboost:this.pitchboost,pitchspeed:this.pitchspeed,wingarea:this.wingarea,toughness:this.toughness,upkeep:this.upkeep,crashsafety:this.crashsafety,bomb_mass:this.bomb_mass,fuel:this.fuel,charge:this.charge,warnings:this.warnings,eras:this.era}}fromJSON(t,e){if(t.liftbleed&&(this.liftbleed=t.liftbleed),t.wetmass&&(this.wetmass=t.wetmass),t.mass&&(this.mass=t.mass),t.drag&&(this.drag=t.drag),t.control&&(this.control=t.control),t.cost&&(this.cost=t.cost),t.reqsections&&(this.reqsections=t.reqsections),t.visibility&&(this.visibility=t.visibility),t.flightstress&&(this.flightstress=t.flightstress),t.escape&&(this.escape=t.escape),t.pitchstab&&(this.pitchstab=t.pitchstab),t.latstab&&(this.latstab=t.latstab),t.cooling&&(this.cooling=t.cooling),t.reliability&&(this.reliability=t.reliability),t.power&&(this.power=t.power),t.fuelconsumption&&(this.fuelconsumption=t.fuelconsumption),t.maxstrain&&(this.maxstrain=t.maxstrain),t.structure&&(this.structure=t.structure),t.pitchspeed&&(this.pitchspeed=t.pitchspeed),t.pitchboost&&(this.pitchboost=t.pitchboost),t.wingarea&&(this.wingarea=t.wingarea),t.toughness&&(this.toughness=t.toughness),t.upkeep&&(this.upkeep=t.upkeep),t.crashsafety&&(this.crashsafety=t.crashsafety),t.bomb_mass&&(this.bomb_mass=t.bomb_mass),t.fuel&&(this.fuel=t.fuel),t.charge&&(this.charge=t.charge),t.warning&&this.warnings.push({source:h(t.name),warning:h(t.warning),color:c.WHITE}),t.warnings){const e=t.warnings,s=[];for(const t of e)s.push({source:t.source,warning:t.warning});this.warnings=this.MergeWarnings(s)}if(t.era&&this.era.push({name:h(t.name),era:h(t.era)}),t.eras){const e=t.eras,s=[];for(const t of e)s.push({name:t.name,era:t.era});this.era=this.MergeEra(s)}}serialize(t){t.PushNum(this.liftbleed),t.PushNum(this.wetmass),t.PushNum(this.mass),t.PushNum(this.drag),t.PushNum(this.control),t.PushNum(this.cost),t.PushNum(this.reqsections),t.PushNum(this.visibility),t.PushNum(this.flightstress),t.PushNum(this.escape),t.PushNum(this.pitchstab),t.PushNum(this.latstab),t.PushNum(this.cooling),t.PushNum(this.reliability),t.PushNum(this.power),t.PushNum(this.fuelconsumption),t.PushNum(this.maxstrain),t.PushNum(this.structure),t.PushFloat(this.pitchboost),t.PushFloat(this.pitchspeed),t.PushNum(this.wingarea),t.PushNum(this.toughness),t.PushNum(this.upkeep),t.PushNum(this.crashsafety),t.PushNum(this.bomb_mass),t.PushNum(this.fuel),t.PushNum(this.charge),t.PushNum(this.warnings.length);for(const e of this.warnings)t.PushString(e.source),t.PushString(e.warning);t.PushNum(this.era.length);for(const e of this.era)t.PushString(e.name),t.PushString(e.era)}deserialize(t){if(this.liftbleed=t.GetNum(),this.wetmass=t.GetNum(),this.mass=t.GetNum(),this.drag=t.GetNum(),this.control=t.GetNum(),this.cost=t.GetNum(),this.reqsections=t.GetNum(),this.visibility=t.GetNum(),this.flightstress=t.GetNum(),this.escape=t.GetNum(),this.pitchstab=t.GetNum(),this.latstab=t.GetNum(),this.cooling=t.GetNum(),this.reliability=t.GetNum(),this.power=t.GetNum(),this.fuelconsumption=t.GetNum(),this.maxstrain=t.GetNum(),this.structure=t.GetNum(),this.pitchboost=t.GetFloat(),this.pitchspeed=t.GetFloat(),this.wingarea=t.GetNum(),this.toughness=t.GetNum(),this.upkeep=t.GetNum(),this.crashsafety=t.GetNum(),this.bomb_mass=t.GetNum(),this.fuel=t.GetNum(),this.charge=t.GetNum(),t.version>12.25){const e=t.GetNum();this.warnings=[];for(let s=0;s1e-6&&(e.warnings=this.warnings,e.era=this.era),e}Equal(t){return this.liftbleed==t.liftbleed&&this.wetmass==t.wetmass&&this.mass==t.mass&&this.drag==t.drag&&this.control==t.control&&this.cost==t.cost&&this.reqsections==t.reqsections&&this.visibility==t.visibility&&this.flightstress==t.flightstress&&this.escape==t.escape&&this.pitchstab==t.pitchstab&&this.latstab==t.latstab&&this.cooling==t.cooling&&this.reliability==t.reliability&&this.power==t.power&&this.fuelconsumption==t.fuelconsumption&&this.maxstrain==t.maxstrain&&this.structure==t.structure&&this.pitchspeed==t.pitchspeed&&this.pitchboost==t.pitchboost&&this.wingarea==t.wingarea&&this.toughness==t.toughness&&this.upkeep==t.upkeep&&this.crashsafety==t.crashsafety&&this.bomb_mass==t.bomb_mass&&this.fuel==t.fuel&&this.charge==t.charge}rtz(t){return t>0?Math.floor(1e-6+t):Math.ceil(-1e-6+t)}Round(){this.liftbleed=this.rtz(this.liftbleed),this.wetmass=this.rtz(this.wetmass),this.mass=this.rtz(this.mass),this.drag=this.rtz(this.drag),this.control=this.rtz(this.control),this.cost=this.rtz(this.cost),this.reqsections=this.rtz(this.reqsections),this.visibility=this.rtz(this.visibility),this.flightstress=this.rtz(this.flightstress),this.escape=this.rtz(this.escape),this.pitchstab=this.rtz(this.pitchstab),this.latstab=this.rtz(this.latstab),this.cooling=this.rtz(this.cooling),this.reliability=this.rtz(this.reliability),this.power=this.rtz(this.power),this.fuelconsumption=this.rtz(this.fuelconsumption),this.maxstrain=this.rtz(this.maxstrain),this.structure=this.rtz(this.structure),this.wingarea=this.rtz(this.wingarea),this.toughness=this.rtz(this.toughness),this.upkeep=this.rtz(this.upkeep),this.crashsafety=this.rtz(this.crashsafety),this.bomb_mass=this.rtz(this.bomb_mass),this.fuel=this.rtz(this.fuel),this.charge=this.rtz(this.charge)}Clone(){return this.Add(new u)}}const _=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return 6}},p=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return-1}},m=t=>{switch(t){case 0:return"Pioneer";case 1:return"WWI";case 2:return"Roaring 20s";case 3:return"Coming Storm";case 4:return"WWII";case 5:return"Last Hurrah";case 6:case-1:return"Himmilgard"}},g=t=>{var e="";for(let s=0;s0){const s=t.length-1;2==t[s].length&&t[s][0]!=t[s][1]?e+=t[s][0].toString()+"("+t[s][1].toString()+")":e+=t[s][0].toString()}return e};class f{constructor(t){this.array=new ArrayBuffer(51200),this.view=new DataView(this.array),this.offset=0}Check(){if(this.offset>=this.array.byteLength)throw"Serialization Way too long."}PushNum(t){this.view.setInt16(this.offset,t,!1),this.offset+=2,this.Check()}PushBool(t){t?this.view.setUint8(this.offset,1):this.view.setUint8(this.offset,0),this.offset+=1,this.Check()}PushString(t){var e=(new TextEncoder).encode(t);this.PushNum(e.length);for(let t=0;t=this.array.byteLength)throw"Deserialization Failed"}GetNum(){this.Check();const t=this.view.getInt16(this.offset,!1);return this.offset+=2,t}GetBool(){this.Check();const t=this.view.getUint8(this.offset);return this.offset+=1,t>0}GetString(){this.Check();const t=this.GetNum(),e=new Uint8Array(this.view.buffer,this.offset,t);let s;return this.offset+=t,s=this.version<12.65?"windows-1252":"utf-8",new TextDecoder(s).decode(e)}GetNumArr(t){this.Check();const e=this.GetNum(),s=[];for(let t=0;t0&&(r*=1.4),Math.floor(1e-6+r)}VerifyValues(){for(this.engine_displacement=Math.max(.01,this.engine_displacement),this.engine_displacement=Math.min(150,this.engine_displacement),this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.cool_sel=Math.max(0,Math.min(this.CoolingTable.length-1,this.cool_sel)),this.num_cyl_per_row=Math.floor(Math.max(1,this.num_cyl_per_row)),this.num_rows=Math.floor(Math.max(1,this.num_rows)),this.compression_ratio=Math.max(.01,this.compression_ratio),this.compression_ratio=Math.min(25,this.compression_ratio),this.rpm_boost=Math.max(.1,this.rpm_boost),this.rpm_boost=Math.min(2,this.rpm_boost),this.material_fudge=Math.max(.1,this.material_fudge),this.material_fudge=Math.min(2,this.material_fudge),this.quality_fudge=Math.max(.1,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge);this.material_fudge-1+(this.quality_fudge-1)<-.9;)this.material_fudge+=.1,this.quality_fudge+=.1;this.min_IAF=10*Math.round(1e-6+this.min_IAF/10),this.compressor_count=Math.floor(1e-6+this.compressor_count),this.compressor_count=Math.min(5,this.compressor_count),this.compressor_type==S.NONE?(this.compressor_count=0,this.min_IAF=0):this.compressor_type==S.ALTITUDE_THROTTLE?(this.compressor_count=1,this.min_IAF=0,this.upg_sel[0]=!1,this.upg_sel[1]=!1,this.upg_sel[2]=!1):(this.min_IAF=Math.max(0,this.min_IAF),this.compressor_count=Math.max(1,this.compressor_count))}EngineStats(){const t=new I;switch(t.name=this.name,this.VerifyValues(),t.stats.power=this.CalcPower(),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=Math.floor(-1.999999+this.era_sel+10*(this.quality_fudge+this.material_fudge-2)),t.stats.cooling=this.CalcCooling(),t.oiltank=this.IsRotary(),t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=this.CalcFuelConsumption(),t.altitude=this.CalcAltitude(),t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(m(this.era_sel))}),this.compressor_type){case S.NONE:break;case S.ALTITUDE_THROTTLE:t.stats.cost+=3,t.altitude=49,t.stats.warnings.push({source:h("Altitude Throttle"),warning:h("Altitude Throttle Warning"),color:c.WHITE});break;case S.SUPERCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.fuelconsumption=Math.floor(1e-6+1.25*t.stats.fuelconsumption),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=29+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e;break}case S.TURBOCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10*2,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=49+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e,t.stats.reqsections+=1;break}}return(this.compressor_type==S.ALTITUDE_THROTTLE||this.upg_sel[1])&&t.stats.warnings.push({source:h("War Emergency Power"),warning:h("War Emergency Power Warning"),color:c.WHITE}),t.stats.fuelconsumption=Math.max(1,t.stats.fuelconsumption),t.rarity=this.rarity,t}EngineInputs(){const t=new A;t.engine_type=w.PROPELLER,t.RPM_boost=this.rpm_boost,t.compression=this.compression_ratio,t.compressor_count=this.compressor_count,t.compressor_type=this.compressor_type,t.cyl_per_row=this.num_cyl_per_row,t.displacement=this.engine_displacement,t.era_sel=this.era_sel,t.material_fudge=this.material_fudge,t.min_IdealAlt=this.min_IAF,t.name=this.name,t.quality_fudge=this.quality_fudge,t.rows=this.num_rows,t.type=this.cool_sel;for(let e=0;e2&&(this.afterburner=!1)}EngineInputs(){const t=new A;return t.name=this.name,t.engine_type=w.TURBOMACHINERY,t.era_sel=this.era_sel,t.type=this.type_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.upgrades[0]=this.afterburner,t.rarity=this.rarity,t}GetPitchSpeed(){return this.bypass_ratio>=8?1:this.bypass_ratio>=3.5?1.1:this.bypass_ratio>=1?1.2:1.3}EngineStats(){const t=new I;this.VerifyValues();const e=this.CalcStages();return this.kN=e.thrust,this.tsfc=e.fuel/e.thrust,t.name=this.name,t.stats.power=Math.round(1e3*e.thrust/89),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.fuelconsumption=Math.round(200*e.fuel/1e3),t.rumble=0,t.stats.cost=this.CalcCost(),t.overspeed=100,t.altitude=59,8==this.era_sel?t.stats.era.push({name:t.name,era:h(m(-1))}):t.stats.era.push({name:t.name,era:h(m(5))}),t.stats.pitchspeed=this.GetPitchSpeed(),t.rarity=this.rarity,t}}class v{constructor(){this.EraTable=[{name:"Pioneer",draw:3,drawfactor:.4,massfactor:.4,reliability:-1,costfactor:.4,overspeed:20},{name:"WWI",draw:1,drawfactor:.4,massfactor:1/3,reliability:0,costfactor:1/2.25,overspeed:25},{name:"Roaring 20s",draw:1,drawfactor:2/7,massfactor:2/7,reliability:1,costfactor:.5,overspeed:30},{name:"Coming Storm",draw:0,drawfactor:2/7,massfactor:1/4,reliability:2,costfactor:1/1.9,overspeed:35},{name:"WWII",draw:0,drawfactor:1/4,massfactor:.2,reliability:3,costfactor:1/1.8,overspeed:40},{name:"Last Hurrah",draw:0,drawfactor:.2,massfactor:1/6,reliability:4,costfactor:1/1.75,overspeed:45}],this.Winding=[{name:"Aluminum",drawmod:1.1,mass:-2,drag:1,costfactor:1,reliabilty:0},{name:"Copper",drawmod:1,mass:0,drag:0,costfactor:1,reliabilty:0},{name:"Silver",drawmod:.95,mass:1,drag:0,costfactor:1.1,reliabilty:0},{name:"Electrum",drawmod:.9,mass:2,drag:0,costfactor:1.3,reliabilty:1},{name:"Platinum",drawmod:.75,mass:3,drag:0,costfactor:2,reliabilty:2},{name:"Screamer Sinew",drawmod:.9,mass:0,drag:1,costfactor:1.75,reliabilty:4},{name:"Lightning Sprite Ephemera",drawmod:.5,mass:-2,drag:-2,costfactor:2,reliabilty:-3}],this.name="Default",this.era_sel=0,this.winding_sel=0,this.power=1,this.chonk=1,this.quality_fudge=1}EraMass(){const t=this.EraTable[this.era_sel];return Math.floor(1e-6+t.massfactor*this.power)}CalcMass(){const t=this.Winding[this.winding_sel];return Math.max(0,Math.floor(1e-6+this.EraMass()+t.mass))}CalcDrag(){const t=this.power/10,e=this.Winding[this.winding_sel].drag;return Math.max(1,Math.floor(1.000001+t+this.chonk+e))}CalcOverspeed(){const t=this.chonk/2,e=7.5*(this.quality_fudge-1);return Math.ceil(-1e-6+this.EraTable[this.era_sel].overspeed-t+e)}CalcDraw(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.draw+Math.ceil(this.power*t.drawfactor-1e-6);return Math.ceil(s*e.drawmod-1e-6)}CalcReliability(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=this.power/10,i=5*(this.quality_fudge-1);return Math.trunc(1e-6+t.reliability+this.chonk-s+i)+e.reliabilty}CalcTorque(){const t=1+this.EraMass()/10+this.chonk/4;return Math.max(1,Math.floor(1e-6+t))}CalcCost(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.costfactor*this.power,i=Math.ceil(s*Math.max(.5,this.quality_fudge)-1e-6);return Math.ceil(i*e.costfactor-1e-6)}VerifyValues(){this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.winding_sel=Math.max(0,Math.min(this.Winding.length-1,this.winding_sel)),this.power=Math.max(1,this.power),this.power=Math.floor(1e-6+this.power),this.chonk=Math.floor(1e-6+this.chonk),this.chonk=Math.max(-10,this.chonk),this.chonk=Math.min(10,this.chonk),this.quality_fudge=Math.max(.5,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge)}EngineStats(){var t=new I;return t.name=this.name,this.VerifyValues(),t.stats.power=this.power,t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.cooling=0,t.oiltank=!1,t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=0,t.stats.charge=-this.CalcDraw(),t.altitude=100,t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(m(this.era_sel))}),t}EngineInputs(){var t=new A;return t.engine_type=w.ELECTRIC,t.name=this.name,t.power=this.power,t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.material_fudge=this.chonk,t.quality_fudge=this.quality_fudge,t}}!function(t){t[t.PROPELLER=0]="PROPELLER",t[t.PULSEJET=1]="PULSEJET",t[t.TURBOMACHINERY=2]="TURBOMACHINERY",t[t.ELECTRIC=3]="ELECTRIC"}(w||(w={})),function(t){t[t.CUSTOM=0]="CUSTOM",t[t.COMMON=1]="COMMON",t[t.RARE=2]="RARE",t[t.LEGENDARY=3]="LEGENDARY"}(C||(C={}));class A{constructor(t){this.name="Default",this.engine_type=w.PROPELLER,this.type=0,this.era_sel=0,this.rarity=C.CUSTOM,this.displacement=0,this.compression=0,this.cyl_per_row=0,this.rows=0,this.RPM_boost=0,this.material_fudge=0,this.quality_fudge=0,this.compressor_type=0,this.compressor_count=0,this.min_IdealAlt=0,this.upgrades=[...Array(4).fill(!1)],this.power=0,this.quality_cost=0,this.quality_rely=0,this.starter=!1,this.flow_adjustment=0,this.diameter=0,this.compression_ratio=0,this.bypass_ratio=0,this.winding_sel=0,t&&this.fromJSON(t)}toJSON(){switch(this.engine_type){case w.PROPELLER:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,displacement:this.displacement,compression:this.compression,cyl_per_row:this.cyl_per_row,rows:this.rows,RPM_boost:this.RPM_boost,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge,compressor_type:this.compressor_type,compressor_count:this.compressor_count,min_IAF:this.min_IdealAlt,upgrades:this.upgrades,rarity:this.rarity};case w.PULSEJET:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,power:this.power,quality_cost:this.quality_cost,quality_rely:this.quality_rely,starter:this.starter,rarity:this.rarity};case w.TURBOMACHINERY:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,flow_adjustment:this.flow_adjustment,diameter:this.diameter,compression_ratio:this.compression_ratio,bypass_ratio:this.bypass_ratio,upgrades:this.upgrades,rarity:this.rarity};case w.ELECTRIC:return{name:this.name,engine_type:this.engine_type,power:this.power,era_sel:this.era_sel,winding_sel:this.winding_sel,diameter:this.diameter,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge};default:throw"EngineInputs.toJSON: Oh dear, you have a new engine type."}}fromJSON(t){switch(this.name=t.name,this.engine_type=t.engine_type,this.type=t.type,this.era_sel=t.era_sel,this.engine_type){case w.PROPELLER:this.displacement=t.displacement,this.compression=t.compression,this.cyl_per_row=t.cyl_per_row,this.rows=t.rows,this.RPM_boost=t.RPM_boost,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge,this.compressor_type=t.compressor_type,this.compressor_count=t.compressor_count,this.min_IdealAlt=t.min_IAF,this.upgrades=b(t.upgrades,this.upgrades.length);break;case w.PULSEJET:this.power=t.power,this.quality_cost=t.quality_cost,this.quality_rely=t.quality_rely,this.starter=t.starter;break;case w.TURBOMACHINERY:this.flow_adjustment=t.flow_adjustment,this.diameter=t.diameter,this.compression_ratio=t.compression_ratio,this.bypass_ratio=t.bypass_ratio,this.upgrades=t.upgrades;break;case w.ELECTRIC:this.power=t.power,this.winding_sel=t.winding_sel,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge;break;default:throw"EngineInputs.fromJSON: Oh dear, you have a new engine type."}t.rarity?this.rarity=t.rarity:this.rarity=C.CUSTOM}serialize(t){switch(t.PushString(this.name),t.PushNum(this.engine_type),t.PushNum(this.type),t.PushNum(this.era_sel),this.engine_type){case w.PROPELLER:t.PushFloat(this.displacement),t.PushFloat(this.compression),t.PushNum(this.cyl_per_row),t.PushNum(this.rows),t.PushFloat(this.RPM_boost),t.PushFloat(this.material_fudge),t.PushFloat(this.quality_fudge),t.PushNum(this.compressor_type),t.PushNum(this.compressor_count),t.PushNum(this.min_IdealAlt),t.PushBoolArr(this.upgrades);break;case w.PULSEJET:t.PushNum(this.power),t.PushFloat(this.quality_cost),t.PushFloat(this.quality_rely),t.PushBool(this.starter);break;case w.TURBOMACHINERY:t.PushFloat(this.flow_adjustment),t.PushFloat(this.diameter),t.PushFloat(this.compression_ratio),t.PushFloat(this.bypass_ratio),t.PushBoolArr(this.upgrades);break;case w.ELECTRIC:t.PushNum(this.power),t.PushNum(this.winding_sel),t.PushNum(this.material_fudge),t.PushFloat(this.quality_fudge);break;default:throw"EngineInputs.serialize: Oh dear, you have a new engine type."}t.PushNum(this.rarity)}deserialize(t){switch(this.name=t.GetString(),this.engine_type=t.GetNum(),this.type=t.GetNum(),this.era_sel=t.GetNum(),this.engine_type){case w.PROPELLER:this.displacement=t.GetFloat(),this.compression=t.GetFloat(),this.cyl_per_row=t.GetNum(),this.rows=t.GetNum(),this.RPM_boost=t.GetFloat(),this.material_fudge=t.GetFloat(),this.quality_fudge=t.GetFloat(),this.compressor_type=t.GetNum(),this.compressor_count=t.GetNum(),this.min_IdealAlt=t.GetNum(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case w.PULSEJET:this.power=t.GetNum(),this.quality_cost=t.GetFloat(),this.quality_rely=t.GetFloat(),this.starter=t.GetBool();break;case w.TURBOMACHINERY:this.flow_adjustment=t.GetFloat(),this.diameter=t.GetFloat(),this.compression_ratio=t.GetFloat(),this.bypass_ratio=t.GetFloat(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case w.ELECTRIC:this.power=t.GetNum(),this.winding_sel=t.GetNum(),this.material_fudge=t.GetNum(),this.quality_fudge=t.GetFloat();break;default:throw"EngineInputs.deserialize: Oh dear, you have a new engine type."}t.version>12.35?this.rarity=t.GetNum():this.rarity=C.CUSTOM}PartStats(){switch(this.engine_type){case w.PROPELLER:{const t=new G;return t.name=this.name,t.cool_sel=this.type,t.era_sel=this.era_sel,t.engine_displacement=this.displacement,t.compression_ratio=this.compression,t.num_cyl_per_row=this.cyl_per_row,t.num_rows=this.rows,t.rpm_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IAF=this.min_IdealAlt,t.upg_sel=this.upgrades,t.rarity=this.rarity,t.EngineStats()}case w.PULSEJET:{const t=new M;t.valve_sel=this.type,t.era_sel=this.era_sel,t.desired_power=this.power,t.build_quality=this.quality_cost,t.overall_quality=this.quality_rely,t.starter=this.starter,t.rarity=this.rarity;const e=t.EngineStats();return this.name=e.name,e}case w.TURBOMACHINERY:{const t=new R;return t.type_sel=this.type,t.era_sel=this.era_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.afterburner=this.upgrades[0],t.name=this.name,t.rarity=this.rarity,t.EngineStats()}case w.ELECTRIC:{const t=new v;return t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.power=this.power,t.chonk=this.material_fudge,t.quality_fudge=this.quality_fudge,t.name=this.name,t.EngineStats()}default:throw"EngineInputs.PartStats: Oh dear, you have a new engine type."}}Equal(t){return this.name==t.name}Clone(){const t=new A;t.name=this.name,t.engine_type=this.engine_type,t.type=this.type,t.era_sel=this.era_sel,t.displacement=this.displacement,t.compression=this.compression,t.cyl_per_row=this.cyl_per_row,t.rows=this.rows,t.RPM_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IdealAlt=this.min_IdealAlt,t.power=this.power,t.quality_cost=this.quality_cost,t.quality_rely=this.quality_rely,t.starter=this.starter;for(let e=0;e12.35&&(this.rarity=t.GetNum()),this.stats.deserialize(t)}Clone(){const t=new I;return t.fromJSON(JSON.parse(JSON.stringify(this.toJSON()))),t}Equal(t){return this.stats.Equal(t.stats)&&this.overspeed==t.overspeed&&this.altitude==t.altitude&&this.torque==t.torque&&this.rumble==t.rumble&&this.oiltank==t.oiltank&&this.pulsejet==t.pulsejet&&this.rarity==t.rarity}Verify(){this.oiltank&&(this.stats.cooling=0),this.PulseJetCheck()}PulseJetCheck(){this.pulsejet?(this.stats.cooling=0,this.overspeed=100,this.altitude=3,this.torque=0):this.rumble=0}}const E=JSON.parse('{"l":[{"name":"Custom","engines":[{"name":"Bentley BR.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Renault V8 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":7,"compression":4,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.4,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Early-WWI","engines":[{"name":"Aeromarine K-6 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.36,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 80hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.27,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 6 cylinder 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Argus As II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":10.353,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.8,"compression":4.85,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Benz Bz.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.4,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 7Z 95hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.88,"compression":4.3,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9Bf 140hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.46,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 14 Double Lambda 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 70hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.75,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Omega 50hp","engine_type":0,"type":2,"era_sel":0,"displacement":7.7,"compression":4,"cyl_per_row":7,"rows":1,"RPM_boost":1.49,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome monosoupape 9B 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9C 90hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.89,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"RAF 1a 90hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.88,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.9,"material_fudge":1.3,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Late-WWI","engines":[{"name":"Bentley BR.2 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 11EB 200hp","engine_type":0,"type":2,"era_sel":1,"displacement":21.49,"compression":5.1,"cyl_per_row":11,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 16X 420hp","engine_type":0,"type":0,"era_sel":1,"displacement":32.53333333,"compression":5,"cyl_per_row":4,"rows":4,"RPM_boost":0.87,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8F 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.98,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIav 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'18","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle III 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle VIII 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 110hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Dyak 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.800000002,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.III 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.6,"compression":5,"cyl_per_row":11,"rows":1,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Mid-WWI","engines":[{"name":"Argus As III 190hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.9,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Beardmore 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.635,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bz.IV 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.6,"compression":4.9,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9B 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Cosmos Mercury","engine_type":0,"type":1,"era_sel":1,"displacement":19.6,"compression":5.3,"cyl_per_row":7,"rows":2,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss K-12 375hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.33,"material_fudge":0.8,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss OXX-6","engine_type":0,"type":0,"era_sel":1,"displacement":9.3,"compression":4.92,"cyl_per_row":2,"rows":4,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Fiat A.12 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9B Monosoupape 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9N Monosoupape 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":5.1,"cyl_per_row":9,"rows":1,"RPM_boost":1.05,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Aa 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Ab 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8B 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Bc 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Ja 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Jb 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Liberty L-12 400hp","engine_type":0,"type":0,"era_sel":2,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.64,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Lorraine 12Da 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":24.4,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIa 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIaü 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IVa 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Falcon III 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 80hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Arab 208hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.76,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Maori II 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":12.27,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.3,"material_fudge":1.7,"quality_fudge":0.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.II 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Pre-WWI","engines":[{"name":"Mercedes E4F 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Coming Storm","engines":[{"name":"Allison V-1710-85 1200hp","engine_type":0,"type":0,"era_sel":3,"displacement":28,"compression":6.65,"cyl_per_row":2,"rows":6,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bristol Pegasus XVIII 835hp","engine_type":0,"type":1,"era_sel":2,"displacement":28.7,"compression":6.25,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1.2,"quality_fudge":0.8,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Daimler-Benz 601ARJ 1775hp","engine_type":0,"type":0,"era_sel":3,"displacement":33.93,"compression":6.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.84,"material_fudge":0.6,"quality_fudge":0.7,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,true,false]}]},{"name":"Roaring 20s","engines":[{"name":"Argus As 5 1500hp","engine_type":0,"type":0,"era_sel":2,"displacement":94.1,"compression":5.6,"cyl_per_row":6,"rows":4,"RPM_boost":0.638,"material_fudge":0.4,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bréguet Quadrimoteur Type B H-32 970hp","engine_type":0,"type":0,"era_sel":2,"displacement":48.64,"compression":5,"cyl_per_row":4,"rows":8,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'20","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion XI 580hp","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":6,"cyl_per_row":4,"rows":3,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"WWII","engines":[{"name":"Klimov M-105PF 1230hp","engine_type":0,"type":0,"era_sel":3,"displacement":35.101,"compression":7,"cyl_per_row":2,"rows":6,"RPM_boost":0.55,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls Royce Merlin 46 930hp","engine_type":0,"type":0,"era_sel":3,"displacement":27,"compression":5.55,"cyl_per_row":2,"rows":6,"RPM_boost":0.98,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,true,true,false]}]},{"name":"ACDQ","engines":[{"name":"2A-Series 4-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":16,"compression":4.5,"cyl_per_row":1,"rows":2,"RPM_boost":0.5,"material_fudge":0.8,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"F-Series 6-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":17,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.07,"material_fudge":0.7,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"G-Series 9-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":16,"compression":4.7,"cyl_per_row":9,"rows":1,"RPM_boost":1.04,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hartmann H.IIc Straight-6 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":12,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hornet R-3 Boxer 6-Cylinder","engine_type":0,"type":0,"era_sel":1,"displacement":10,"compression":5,"cyl_per_row":2,"rows":3,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Maclean-King Tiger MK.1 V-12 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":17,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ogre-Z Beta V-6","engine_type":0,"type":0,"era_sel":0,"displacement":11,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Pulsejet PV-12 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":12,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-20 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":20,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-8 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":8,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Seguin Σ110 Sigma 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":1,"displacement":14,"compression":4.5,"cyl_per_row":7,"rows":1,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"SuperPegasus 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":13.5,"compression":5,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"TurboGoblin 8-Cylinder Semi-Radial","engine_type":0,"type":4,"era_sel":0,"displacement":13,"compression":5.5,"cyl_per_row":8,"rows":1,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Himmilgard Pulsejet","engines":[{"name":"Pulsejet PV-5 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":5,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-6 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":6,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-7 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":7,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-8 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":8,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-9 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":9,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-10 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":10,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-11 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":11,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-12 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":12,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-13 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":13,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-14 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":14,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-15 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":15,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1}]},{"name":"Himmilgard Liquid Radial","engines":[{"name":"Einsort MM 140hp","engine_type":0,"type":5,"era_sel":1,"displacement":14.72,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Einsort MR 150hp","engine_type":0,"type":5,"era_sel":1,"displacement":15.46,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Gernsback Motor 0005","engine_type":0,"type":5,"era_sel":1,"displacement":12,"compression":6,"cyl_per_row":5,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Liquid Cooled","engines":[{"name":"Meier Bärenjunge 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.5,"compression":5.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.86,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F1166 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 Über 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2000 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Brandt Krieger I 370hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Brandt Kurier XVI 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Fleischmann F10 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fleischmann F10ü 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.75,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fokker Fungizidherstellung Typ 247 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.3,"compression":4.8,"cyl_per_row":1,"rows":6,"RPM_boost":0.85,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Ochs 2 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.84,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Windhund 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Nationales Motorbüro Arbeiter XVII 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,true],"rarity":2},{"name":"Nationales Motorbüro D-1140 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.4,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760tgl 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.4,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-840 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.4,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.05,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro Kurier XXI 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XII 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"SAM Kurier XX 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter I 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.15,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter III 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter V 350hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.75,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Schrankhut RD.300V 230hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":6.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.51,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Wollsteinkraft Verteidiger C 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Wollsteinkraft Verteidiger H 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Wollsteinkraft Wagehals C 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F4398 490hp","engine_type":0,"type":0,"era_sel":1,"displacement":44.3,"compression":4.7,"cyl_per_row":3,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Patriot 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Turbolader-Patriot 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"Meier Bär 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Meier Eisbär 500hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XIII 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":1,"min_IAF":10,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter IV 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":2},{"name":"Sonnenmotor EGH3 220hp","engine_type":0,"type":0,"era_sel":0,"displacement":20,"compression":5,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":50,"upgrades":[false,false,false,true],"rarity":3},{"name":"Wollsteinkraft Wagehals T 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Kurier L 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.99,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Bertha F2080 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.4,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2080 Über 270hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.8,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Contrarotary","engines":[{"name":"Nationales Motorbüro R-1860 160hp","engine_type":0,"type":3,"era_sel":1,"displacement":18.6,"compression":6,"cyl_per_row":11,"rows":1,"RPM_boost":0.65,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro R-1190 110hp","engine_type":0,"type":3,"era_sel":1,"displacement":11.9,"compression":6,"cyl_per_row":9,"rows":1,"RPM_boost":0.67,"material_fudge":1.2,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Air Cooled","engines":[{"name":"Braun UL 90hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun ULK 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.2,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs X 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.1,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun UX 150hp","engine_type":0,"type":1,"era_sel":1,"displacement":13.2,"compression":4.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.23,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Scholz Luchs III 30hp","engine_type":0,"type":1,"era_sel":1,"displacement":3.1,"compression":4.5,"cyl_per_row":3,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs VI 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Breitbusch Libelle \'320hp\'","engine_type":0,"type":1,"era_sel":1,"displacement":22.78,"compression":4.42,"cyl_per_row":9,"rows":1,"RPM_boost":1.31,"material_fudge":1.1,"quality_fudge":0.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Rosevear Ankou B 180hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.9,"compression":5.17,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":1.4,"quality_fudge":0.9,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Semi-Radial","engines":[{"name":"SLW Sigvird 180hp","engine_type":0,"type":4,"era_sel":1,"displacement":11,"compression":6,"cyl_per_row":4,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Rotary","engines":[{"name":"Modded Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Robur Herausforderer 180hp","engine_type":0,"type":2,"era_sel":1,"displacement":18,"compression":5.5,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":40,"upgrades":[false,false,true,true],"rarity":3},{"name":"Rhona Motorbau Z11 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z11tgl 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber B.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber G.IX 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber O.VII 50hp","engine_type":0,"type":2,"era_sel":1,"displacement":8,"compression":4.85,"cyl_per_row":7,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber L.VII 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber TG.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber T.IX 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.3 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Schreiber L.XIV 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1}]}]}');class N{constructor(t){this.constant=!1,this.name=t,this.list=[];const e=window.localStorage.getItem("test.engines."+this.name);null!=e&&this.fromJSON(JSON.parse(e));const s=window.localStorage.getItem("test.engines_names");let i=[];s&&(i=JSON.parse(s));let a=!1;for(const e of i)if(e==t){a=!0;break}a||i.push(t),window.localStorage.setItem("test.engines_names",JSON.stringify(i))}toJSON(){const t=[];for(const e of this.list)t.push(e.toJSON());return{name:this.name,engines:t}}fromJSON(t,e=!1){t.name&&(this.name=t.name),e&&(this.list=[]);for(const s of t.engines)try{this.push(new A(s),e)}catch(t){console.error(t)}}deserializeEngine(t){if(this.constant)throw"Engine List is Constant";const e=new A;return e.deserialize(t),this.push(e)}push(t,e=!1){if(this.constant)throw"Engine List is Constant";if(e)this.remove(t);else for(let e=0;e(""+t.name).localeCompare(e.name))),window.localStorage.setItem("test.engines."+this.name,JSON.stringify(this.toJSON())),this.find(t)}get(t){return t<0||t>=this.length?new A:this.list[t]}get_name(t){const e=this.find_name(t);return this.get(e)}get_stats(t){return t<0||t>=this.length?new I:this.list[t].PartStats()}get_stats_name(t){const e=this.find_name(t);return this.get_stats(e)}find(t){for(let e=0;e=0&&this.list.splice(e,1),window.localStorage.setItem("test.engines."+this.name,JSON.stringify(this.toJSON()))}remove_name(t){if(this.constant)throw"Engine List is Constant";const e=this.find_name(t);e>=0&&this.list.splice(e,1),window.localStorage.setItem("test.engines."+this.name,JSON.stringify(this.toJSON()))}get length(){return this.list.length}SetConstant(){this.constant=!0}}const T=new Map([["Custom",new N("Custom")]]);function x(){return T}function W(t){const e=x();for(const s of e.keys())if("Custom"!=s&&e.get(s).find_name(t)>=0)return s;return e.get("Custom").find_name(t)>=0?"Custom":""}var k,O,F,q,L,B;function H(t){return t==k.ORNITHOPTER_BASIC||t==k.ORNITHOPTER_FLUTTER||t==k.ORNITHOPTER_BUZZER}!function(t){t[t.AIRPLANE=0]="AIRPLANE",t[t.HELICOPTER=1]="HELICOPTER",t[t.AUTOGYRO=2]="AUTOGYRO",t[t.ORNITHOPTER_BASIC=3]="ORNITHOPTER_BASIC",t[t.ORNITHOPTER_FLUTTER=4]="ORNITHOPTER_FLUTTER",t[t.ORNITHOPTER_BUZZER=5]="ORNITHOPTER_BUZZER"}(k||(k={}));class D{FormatEquipment(t,e,s){return Math.abs(s)>.5?t.push({source:h(e),charge:s.toString()}):s>0&&s<1e-6&&t.push({source:h(e),charge:"-"}),t}}function z(t,e){for(let s=0;s0&&t.push({name:s.name,stats:s.stats.toJSON(),qty:s.qty});return window.localStorage.setItem("test.CustomParts",JSON.stringify(e)),{part_list:t}}fromJSON(t,e){for(const t of this.custom_parts)t.qty=0;for(const e of t.part_list){const t=this.custom_parts.findIndex((t=>t.name==e.name));-1==t?this.custom_parts.push({name:e.name,stats:new u(e.stats),qty:e.qty}):this.custom_parts[t].qty=e.qty}}serialize(t){const e=[];for(const t of this.custom_parts)t.qty>0&&e.push({name:t.name,stats:t.stats,qty:t.qty});t.PushNum(e.length);for(const s of e)t.PushString(s.name),s.stats.serialize(t),t.PushNum(s.qty)}deserialize(t){for(const t of this.custom_parts)t.qty=0;const e=t.GetNum();for(let i=0;it.name==e));-1==s?(s=this.custom_parts.length,this.custom_parts.push({name:e,stats:i,qty:a})):this.custom_parts[s].qty=a}}IsDefault(){for(const t of this.custom_parts)if(t.qty>0)return!1;return!0}ClearAll(){for(const t of this.custom_parts)t.qty=0}AddPart(t,e){var s=0;if(s+=Math.abs(e.drag),s+=Math.abs(e.mass),s+=Math.abs(e.wetmass),s+=Math.abs(e.bomb_mass),s+=Math.abs(e.cost),s+=Math.abs(e.upkeep),s+=Math.abs(e.liftbleed),s+=Math.abs(e.wingarea),s+=Math.abs(e.control),s+=Math.abs(e.pitchstab),s+=Math.abs(e.latstab),s+=Math.abs(e.maxstrain),s+=Math.abs(e.structure),s+=Math.abs(e.toughness),s+=Math.abs(e.power),s+=Math.abs(e.fuelconsumption),s+=Math.abs(e.fuel),s+=Math.abs(e.charge),s+=Math.abs(e.crashsafety),s+=Math.abs(e.visibility),s+=Math.abs(e.escape),s+=Math.abs(e.reliability),0==(s+=Math.abs(e.warnings.length)))return;const i=this.custom_parts.findIndex((e=>e.name==t));-1!=i?this.custom_parts[i].stats=e:this.custom_parts.push({name:t,stats:e,qty:0}),this.custom_parts.sort(((t,e)=>t.name.localeCompare(e.name))),this.CalculateStats()}RemovePart(t){const e=this.custom_parts.findIndex((e=>e.name==t));-1!=e&&this.custom_parts.splice(e,1),this.CalculateStats()}GetParts(){return this.custom_parts}SetUsedPart(t,e){this.custom_parts[t].qty=e,this.CalculateStats()}PartStats(){var t=new u;for(const e of this.custom_parts)if(e.qty>0){let s=e.stats.Clone();s=s.Multiply(e.qty),t=t.Add(s)}return t}GetElectrics(){var t=[];for(const e of this.custom_parts)e.qty>0&&(t=this.FormatEquipment(t,e.name,e.stats.charge));return{storage:0,equipment:t}}SetCalculateStats(t){this.CalculateStats=t}}class j extends D{constructor(t){super(),this.selected=0,this.vals=[];for(const e of t.options){const t={name:e.name,maxbomb:e.maxbomb,cant_lift:e.cant_lift,stats:new u(e)};this.vals.push(t)}}toJSON(){return{selected:this.selected}}fromJSON(t,e){this.selected=t.selected,e<10.35&&this.selected>2&&this.selected++}serialize(t){t.PushNum(this.selected)}deserialize(t){this.selected=t.GetNum()}GetSelected(){return this.selected}GetSelectedText(){return this.vals[this.selected].name}SetSelected(t){this.selected=t,this.CalculateStats()}GetEraOptions(){return this.vals}GetLiftBleed(){return this.vals[this.selected].stats.liftbleed}GetMaxBomb(){return this.vals[this.selected].maxbomb}GetCantLift(){return this.vals[this.selected].cant_lift}PartStats(){var t=new u;return t.Add(this.vals[this.selected].stats)}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class J extends D{constructor(t,e,s,i){super(),this.stats=new u,this.types=t,this.upgrades=e,this.safety=s,this.gunsights=i,this.selected_type=0,this.selected_upgrades=[...Array(this.upgrades.length).fill(!1)],this.selected_safety=[...Array(this.safety.length).fill(!1)],this.selected_gunsights=[...Array(this.gunsights.length).fill(!1)],this.total_stress=[0,0],this.total_escape=0,this.total_visibility=0,this.seat_index=0,this.bombsight=0,this.is_armed=!1}toJSON(){return{type:this.selected_type,upgrades:this.selected_upgrades,safety:this.selected_safety,sights:this.selected_gunsights,bombsight:this.bombsight}}fromJSON(t,e){this.selected_type=t.type,this.selected_upgrades=b(t.upgrades,this.selected_upgrades.length),this.selected_safety=b(t.safety,this.selected_safety.length),this.selected_gunsights=b(t.sights,this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),e>10.35&&(this.bombsight=t.bombsight)}serialize(t){t.PushNum(this.selected_type),t.PushBoolArr(this.selected_upgrades),t.PushBoolArr(this.selected_safety),t.PushBoolArr(this.selected_gunsights),t.PushNum(this.bombsight)}deserialize(t){this.selected_type=t.GetNum(),this.selected_upgrades=t.GetBoolArr(this.selected_upgrades.length),this.selected_safety=t.GetBoolArr(this.selected_safety.length),this.selected_gunsights=t.GetBoolArr(this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),t.version>10.35&&(this.bombsight=t.GetNum())}GetTypeList(){return this.types}GetUpgradeList(){return this.upgrades}GetSafetyList(){return this.safety}GetGunsightList(){return this.gunsights}GetType(){return this.selected_type}SetType(t){if(t>=this.types.length)throw"Selected type is not in range of actual types.";this.selected_type=t,this.CalculateStats()}GetSelectedUpgrades(){return this.selected_upgrades}SetUpgrade(t,e){if(t>=this.upgrades.length)throw"Selected type is not in range of actual upgrades.";this.selected_upgrades[t]=e,this.CalculateStats()}GetSelectedSafety(){return this.selected_safety}CanSafety(){const t=Array(this.safety.length).fill(!0);return t[5]=!this.types[this.selected_type].exposed,t}SetSafety(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual safties.";this.selected_safety[t]=e,this.CalculateStats()}GetSelectedGunsights(){return this.selected_gunsights}SetGunsight(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual gunsights.";this.selected_gunsights[t]=e,this.CalculateStats()}GetVisibility(){return this.types[this.selected_type].stats.visibility<-10?-1/0:this.total_visibility}GetFlightStress(){return this.total_stress}GetEscape(){return this.total_escape}GetCrash(){return this.total_crash}GetAttack(){var t=0;for(let e=0;e0&&(t=t-t%3+1),this.bombsight=t,this.CalculateStats()}SetHasRotary(t){this.has_rotary=t}IsElectrics(){return 0!=this.stats.charge}IsCopilot(){return this.selected_upgrades[0]}SetArmed(t){this.is_armed=t}GetName(){return this.IsPrimary()?"Crew Pilot":this.bombsight>0?"Crew Bombadier":this.IsCopilot()?"Crew Co-Pilot":this.is_armed?"Crew Gunner":"Crew Aircrew"}PartStats(){let t=new u;t.reqsections=1,t=t.Add(this.types[this.selected_type].stats);for(let e=0;e0&&(t.cost+=Math.floor(2.000001+(this.bombsight-4)/3),t.warnings.push({source:h("Bombsight"),warning:h("Bombsight Warning 1")+this.bombsight.toString()+h("Bombsight Warning 2"),color:c.WHITE}),this.IsCopilot()&&t.warnings.push({source:h("Bombadier Controls"),warning:h("Bombadier Controls Warning"),color:c.WHITE})),this.stats=t.Clone(),this.selected_upgrades[0]?(t.flightstress=this.upgrades[0].stats.flightstress,this.stats.flightstress-=t.flightstress):t.flightstress=0,t}CrewUpdate(t,e,s,i,a,r){this.total_escape=this.stats.escape+t;let n=this.stats.flightstress,o=this.stats.flightstress;(this.IsPrimary()||this.selected_upgrades[0])&&(n+=e,o+=e-2*i),n=Math.max(0,n),o=Math.max(0,o),n+=s,o+=s,this.IsOpen()&&this.has_rotary&&(n+=1,o+=1),n=Math.max(0,n),o=Math.max(0,o),this.total_stress=[n,o],this.total_visibility=this.stats.visibility+a,this.total_crash=this.stats.crashsafety+r}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){var t=[];for(let e=0;et;)this.positions.pop();var e=null;for(this.positions.length>0&&(e=JSON.stringify(this.positions[this.positions.length-1].toJSON()));this.positions.length0}GetConnected(){return this.connected}SetConnected(t){this.connected=t,this.CalculateStats()}PartStats(){const t=new u;return t.reqsections=2*Math.ceil((this.seats+2*this.beds)/5-1e-6),this.seats+this.beds>0&&this.connected&&(t.mass=1,t.warnings.push({source:h("Passengers Section Title"),warning:h("Passenger Connectivity Warning"),color:c.WHITE})),t.bomb_mass+=this.seats+this.beds,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),this.seats+this.beds>0&&t.warnings.push({source:h("Passengers Section Title"),warning:h("Passengers Count",this.seats,this.beds),color:c.WHITE}),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class Z extends D{constructor(t,e){super();const s=x();if(this.elist_idx="Custom",this.etype_stats=s.get(this.elist_idx).get_stats(0),this.etype_inputs=s.get(this.elist_idx).get(0),this.cooling_count=this.etype_stats.stats.cooling,this.radiator_index=-1,this.cooling_count>0&&(this.radiator_index=0),this.num_radiators=0,this.mount_list=t,this.mount_sel=0,this.intake_fan=!1,this.use_pp=!1,this.torque_to_struct=!1,this.cowl_list=e,this.cowl_sel=0,this.use_ds=!1,this.outboard_prop=!1,this.gp_count=0,this.gpr_count=0,this.total_reliability=0,this.is_generator=!1,this.has_alternator=!1,s.get(this.elist_idx).length<=0)throw"No Engine Stats Found. Should be at least one."}toJSON(){return{selected_stats:this.etype_stats.toJSON(),selected_inputs:this.etype_inputs.toJSON(),cooling_count:this.cooling_count,radiator_index:this.radiator_index,selected_mount:this.mount_sel,use_pushpull:this.use_pp,pp_torque_to_struct:this.torque_to_struct,use_driveshafts:this.use_ds,geared_propeller_ratio:this.gp_count,geared_propeller_reliability:this.gpr_count,cowl_sel:this.cowl_sel,is_generator:this.is_generator,has_alternator:this.has_alternator,intake_fan:this.intake_fan,outboard_prop:this.outboard_prop}}oldJSON(t,e){const s=t.selected_stats;if(this.etype_stats.fromJSON(s,e),this.etype_inputs=new A,this.etype_stats.pulsejet&&s.input_pj){this.etype_inputs=new A,this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=w.PULSEJET;const t=s.input_pj;this.etype_inputs.type=t.type,this.etype_inputs.power=t.power,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.quality_cost=t.quality_cost,this.etype_inputs.quality_rely=t.quality_rely,this.etype_inputs.starter=t.starter}else if(s.input_eb){this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=w.PROPELLER;const t=s.input_eb;this.etype_inputs.displacement=t.displacement,this.etype_inputs.compression=t.compression,this.etype_inputs.type=t.type,this.etype_inputs.cyl_per_row=t.cyl_per_row,this.etype_inputs.rows=t.rows,this.etype_inputs.RPM_boost=t.RPM_boost,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.material_fudge=t.material_fudge,this.etype_inputs.quality_fudge=t.quality_fudge,this.etype_inputs.upgrades=t.upgrades,6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.compressor_type,this.etype_inputs.compressor_count=t.compressor_count,this.etype_inputs.min_IdealAlt=t.min_IAF)}else this.etype_stats.altitude=10*this.etype_stats.altitude-1;return this.etype_inputs}fromJSON(t,e){const s=x();let i="";if(e>10.55){this.etype_stats.fromJSON(t.selected_stats,e);const a=new A(t.selected_inputs);i=W(this.etype_stats.name),""==i&&(i="Custom","Default"!=a.name&&s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name)}else{const a=this.oldJSON(t,e);"Default"!=a.name&&(i=W(this.etype_stats.name),""==i&&(i="Custom",s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name))}this.elist_idx=i,this.cooling_count=t.cooling_count,this.radiator_index=t.radiator_index,this.mount_sel=t.selected_mount,this.use_pp=t.use_pushpull,this.torque_to_struct=t.pp_torque_to_struct,this.use_ds=t.use_driveshafts,this.gp_count=t.geared_propeller_ratio,this.gpr_count=t.geared_propeller_reliability,this.cowl_sel=t.cowl_sel,this.is_generator=t.is_generator,this.has_alternator=t.has_alternator,this.intake_fan=t.intake_fan,this.outboard_prop=e>=12.15&&t.outboard_prop}serialize(t){this.etype_stats.serialize(t),this.etype_inputs.serialize(t),t.PushNum(this.cooling_count),t.PushNum(this.radiator_index),t.PushNum(this.mount_sel),t.PushBool(this.use_pp),t.PushBool(this.torque_to_struct),t.PushBool(this.use_ds),t.PushNum(this.gp_count),t.PushNum(this.gpr_count),t.PushNum(this.cowl_sel),t.PushBool(this.is_generator),t.PushBool(this.has_alternator),t.PushBool(this.intake_fan),t.PushBool(this.outboard_prop)}oldDeserialize(t){return this.etype_stats.name=t.GetString(),this.etype_stats.overspeed=t.GetNum(),this.etype_stats.altitude=t.GetNum(),this.etype_stats.torque=t.GetNum(),this.etype_stats.rumble=t.GetNum(),this.etype_stats.oiltank=t.GetBool(),this.etype_stats.pulsejet=t.GetBool(),this.etype_inputs=new A,t.version>10.45?(this.etype_inputs.name=this.etype_stats.name,this.etype_stats.pulsejet?(this.etype_inputs.engine_type=w.PULSEJET,this.etype_inputs.power=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.quality_cost=t.GetNum(),this.etype_inputs.quality_rely=t.GetNum(),this.etype_inputs.starter=t.GetBool()):(this.etype_inputs.displacement=t.GetNum(),this.etype_inputs.compression=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.cyl_per_row=t.GetNum(),this.etype_inputs.rows=t.GetNum(),this.etype_inputs.RPM_boost=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.material_fudge=t.GetNum(),this.etype_inputs.quality_fudge=t.GetNum(),this.etype_inputs.upgrades=t.GetBoolArr(0),6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.GetNum(),this.etype_inputs.compressor_count=t.GetNum(),this.etype_inputs.min_IdealAlt=t.GetNum()))):this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_stats.stats.deserialize(t),this.etype_inputs}deserialize(t){const e=x();var s="";if(t.version>10.55){this.etype_stats.deserialize(t);const i=new A;i.deserialize(t),""==(s=W(this.etype_stats.name))&&(s="Custom","Default"!=i.name&&e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name)}else{const i=this.oldDeserialize(t);"Default"!=i.name&&(""==(s=W(this.etype_stats.name))&&(s="Custom",e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name))}this.cooling_count=t.GetNum(),this.radiator_index=t.GetNum(),this.mount_sel=t.GetNum(),this.use_pp=t.GetBool(),this.torque_to_struct=t.GetBool(),this.use_ds=t.GetBool(),this.gp_count=t.GetNum(),this.gpr_count=t.GetNum(),this.cowl_sel=t.GetNum(),this.is_generator=t.GetBool(),this.has_alternator=t.GetBool(),this.intake_fan=t.GetBool(),t.version>=12.15?this.outboard_prop=t.GetBool():this.outboard_prop=!1,this.elist_idx=s}GetMinAltitude(){return this.etype_inputs.min_IdealAlt}GetMaxAltitude(){return this.GetMinAltitude()+this.etype_stats.altitude}GetMinIAF(){return Math.floor(1e-6+this.GetMinAltitude()/10)}GetMaxIAF(){return Math.floor(1e-6+this.GetMaxAltitude()/10)}CanSelectIndex(){const t=x().get(this.elist_idx),e=[...Array(t.length).fill(!0)];if(this.is_internal)for(let s=0;s0}WarnCoolingReliability(){return this.cooling_count=t&&(this.radiator_index=t-1),this.radiator_index<0&&t>0&&(this.radiator_index=0)}GetNumRadiators(){return this.num_radiators}SetRadiator(t){this.radiator_index=t,this.CalculateStats()}GetRadiator(){return this.radiator_index}CanIntakeFan(){return this.IsAirCooled()}SetIntakeFan(t){this.intake_fan=t,this.CalculateStats()}GetIntakeFan(){return this.intake_fan}CanOutboardProp(){return this.use_ds&&(this.IsTractor()||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}GetOutboardProp(){return this.outboard_prop}SetOutboardProp(t){t&&this.use_ds?this.outboard_prop=!0:this.outboard_prop=!1,this.CalculateStats()}SetSelectedList(t){t!=this.elist_idx&&(this.elist_idx=t,this.SetSelectedIndex(0))}GetSelectedList(){return this.elist_idx}GetListOfEngines(){return x().get(this.elist_idx)}RequiresExtendedDriveshafts(){return!this.is_internal&&this.mount_list[this.mount_sel].reqED}SetTailMods(t,e,s){!this.mount_list[this.mount_sel].reqTail||t||e||this.GetGenerator()||(this.use_ds=!0),!this.mount_list[this.mount_sel].reqED||this.GetGenerator()||s&&(t||e)||(this.use_ds=!0)}CanMountIndex(){var t=[...Array(this.mount_list.length).fill(!0)];if(this.is_internal)for(let e=0;e=this.mount_list.length)throw"Index outside of mount_list range.";this.mount_sel=t,this.mount_list[this.mount_sel].reqED?this.SetUseExtendedDriveshaft(!0):this.CalculateStats()}GetMountIndex(){return this.GetIsPulsejet()?-1:this.mount_sel}CanUsePushPull(){return!(this.is_generator||this.GetIsJet()||this.is_internal||this.mount_list[this.mount_sel].helicopter)}SetUsePushPull(t){this.use_pp=t,t?(this.cooling_count*=2,"fuselage"==this.mount_list[this.mount_sel].mount_type&&(this.mount_sel=8)):(this.cooling_count=Math.floor(1e-6+this.cooling_count/2),"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(this.mount_sel=0)),this.CalculateStats()}GetUsePushPull(){return this.use_pp}GetMountList(){return this.mount_list}CanUseExtendedDriveshaft(){return!(0==this.GetNumPropellers()||this.is_internal||this.GetGenerator()||this.mount_list[this.mount_sel].helicopter)}SetUseExtendedDriveshaft(t){this.GetGenerator()||this.is_internal?this.use_ds=!1:this.use_ds=t,this.CalculateStats()}GetUseExtendedDriveshaft(){return this.use_ds}CanUseGears(){return!(0==this.GetNumPropellers()||this.GetGenerator())}SetGearCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gp_count=t,this.SetGearReliability(this.gpr_count)}GetGearCount(){return this.gp_count}SetGearReliability(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gpr_count=Math.min(t,this.gp_count),this.CalculateStats()}GetGearReliability(){return this.gpr_count}SetTorqueToStruct(t){this.torque_to_struct=t,this.use_pp||(this.torque_to_struct=!1),this.CalculateStats()}GetTorqueToStruct(){return this.torque_to_struct}CanTorqueToStruct(){return this.use_pp&&this.etype_stats.torque>0&&"pod"!=this.mount_list[this.mount_sel].mount_type}UpdateReliability(t){this.total_reliability=this.etype_stats.stats.reliability,this.total_reliability-=this.gp_count-this.gpr_count,this.total_reliability+=this.cowl_list[this.cowl_sel].stats.reliability,this.NeedCooling()&&(this.total_reliability-=this.GetMaxCooling()-this.cooling_count),this.GetIntakeFan()&&(this.total_reliability+=6),this.total_reliability+=t}GetReliability(){return this.use_pp?this.outboard_prop?this.total_reliability.toString()+"/"+(this.total_reliability-2).toString():this.total_reliability.toString()+"/"+this.total_reliability.toString():this.outboard_prop?(this.total_reliability-2).toString():this.total_reliability.toString()}GetOverspeed(){return this.is_generator?1e3:this.etype_stats.overspeed+Math.floor(1e-6+this.gp_count*this.etype_stats.overspeed/2)}GetIsPulsejet(){return this.etype_stats.pulsejet}GetIsJet(){return this.GetIsPulsejet()||this.GetIsTurbine()&&!this.GetIsTurboprop()}PulseJetCheck(){this.GetIsPulsejet()&&(this.use_pp=!1,this.use_ds=!1,this.gp_count=0,this.gpr_count=0,this.cooling_count=0,this.has_alternator=!1,this.is_generator=!1,this.cowl_sel=0,this.radiator_index=-1)}GetIsTurbine(){return this.etype_inputs.engine_type==w.TURBOMACHINERY}GetIsTurboprop(){return this.etype_inputs.engine_type==w.TURBOMACHINERY&&3==this.etype_inputs.type}TurbineCheck(){this.GetIsTurbine()&&(0==this.GetNumPropellers()&&(this.use_ds=!1,this.gp_count=0,this.gpr_count=0),this.cooling_count=0,this.cowl_sel=0,this.radiator_index=-1)}GetNumPropellers(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.GetGenerator())||this.GetIsTurboprop()||this.is_internal?this.use_pp?2:1:0}GetIsTractorNacelle(){return this.GetNumPropellers()>0&&!this.GetUsePushPull()&&.8==this.mount_list[this.mount_sel].powerfactor&&!this.is_internal}IsLiquidCooled(){return this.NeedCooling()}IsRotary(){return this.etype_stats.oiltank}IsContraRotary(){return!this.GetIsPulsejet()&&!this.GetIsTurbine()&&""!=this.elist_idx&&3==this.etype_inputs.type}IsAirCooled(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.IsLiquidCooled()||this.IsRotary())}GetCowlList(){return this.cowl_list}GetCowl(){return this.cowl_sel}GetCowlEnabled(){const t=[];for(const e of this.cowl_list)this.GetIsPulsejet()||this.GetIsTurbine()?t.push(e.air&&e.rotary&&e.liquid):this.IsLiquidCooled()?t.push(e.liquid):this.IsRotary()?t.push(e.rotary):t.push(e.air);return t}GetHasOilTank(){return this.etype_stats.oiltank}GetHasOilCooler(){return this.etype_stats.stats.cooling>0}GetHasOilPan(){return this.IsAirCooled()}VerifyCowl(t){const e=this.GetCowlEnabled();e[t]&&(this.cowl_sel=t),e[this.cowl_sel]||(this.cowl_sel=0)}SetCowl(t){this.VerifyCowl(t),this.CalculateStats()}GetGeneratorEnabled(){return!(this.GetIsPulsejet()||this.use_pp||this.GetIsElectric())}GetGenerator(){return this.is_generator}SetGenerator(t){this.GetGeneratorEnabled()?this.is_generator=t:this.is_generator=!1,this.is_generator&&(this.gp_count=0,this.gpr_count=0,this.use_ds=!1,this.use_pp=!1),this.CalculateStats()}GetIsElectric(){return this.etype_inputs.engine_type==w.ELECTRIC}GetAlternatorEnabled(){return!(this.GetIsPulsejet()||this.is_generator||this.GetIsElectric())}GetAlternator(){return this.has_alternator}SetAlternator(t){this.GetAlternatorEnabled()?this.has_alternator=t:this.has_alternator=!1,this.CalculateStats()}GetRumble(){return this.etype_stats.rumble}IsTractor(){return!(this.is_internal||this.GetGenerator()||"Tractor"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetTractorSpinner(){return{has:this.IsTractor()&&!(this.outboard_prop&&!this.use_pp),spinner:this.GetSpinner()}}IsPusher(){return!(this.is_internal||this.GetGenerator()||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetPusherSpinner(){return{has:this.IsPusher()&&!this.outboard_prop,spinner:this.GetSpinner()}}GetSpinner(){if(this.gp_count>0&&!this.GetGenerator()){if(this.use_ds&&("Center-Mounted Tractor"==this.mount_list[this.mount_sel].name||"Center-Mounted Pusher"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name))return[!0,!0];if(!this.etype_stats.oiltank)return[!0,!1]}return[!1,!1]}IsElectrics(){return this.has_alternator||this.GetGenerator()}GetEngineHeight(){return this.GetGenerator()?5:"Pod"==this.mount_list[this.mount_sel].name||this.etype_stats.pulsejet||this.is_internal||this.outboard_prop?2:"Nacelle (Offset)"==this.mount_list[this.mount_sel].name?1:"Nacelle (Inside)"==this.mount_list[this.mount_sel].name||"Channel Tractor"==this.mount_list[this.mount_sel].name||"Wing Pod"==this.mount_list[this.mount_sel].name?0:-1}IsTractorRotary(){return!this.GetGenerator()&&this.IsRotary()&&("Tractor"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}IsDiesel(){return this.etype_inputs.upgrades[3]}SetCalculateStats(t){this.CalculateStats=t}SetInternal(t){this.is_internal=t,t&&(this.use_ds=!1)}VerifyMount(){if(this.GetIsTurbine()&&!this.GetIsTurboprop())for(;!this.mount_list[this.mount_sel].turbine;)this.mount_sel++;else if(this.GetIsPulsejet()){if("fuselage"==this.mount_list[this.mount_sel].mount_type)for(let t=0;t0&&t.era.push({name:"Propeller Gearing",era:"WWI"}),this.gpr_count>0&&t.era.push({name:"Reliable Gearing",era:"Roaring 20s"}),this.use_ds&&(t.mass+=1),t=t.Add(this.cowl_list[this.cowl_sel].stats),t.mass+=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].mpd),t.drag=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].ed),this.use_pp&&(t.power*=2,t.mass*=2,t.cooling*=2,t.fuelconsumption*=2,t.cost*=2,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.upkeep*=2,t.reqsections*=2,t.charge*=2,t.power=Math.floor(1e-6+this.mount_list[this.mount_sel].powerfactor*t.power)),"No Cowling"==this.cowl_list[this.cowl_sel].name||"Sealed Cowl"==this.cowl_list[this.cowl_sel].name||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name||(t.cost+=2),this.IsAirCooled()&&this.intake_fan?(t.mass+=3,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.cost+=4,t.era.push({name:"Air Cooling Fan",era:"WWII"})):this.intake_fan=!1,this.GetHasOilCooler()&&(t.drag+=Math.floor(t.power/15)),this.GetIsPulsejet()||(t=t.Add(this.mount_list[this.mount_sel].stats),t.maxstrain-=Math.floor(1e-6+this.mount_list[this.mount_sel].strainfactor*this.etype_stats.stats.mass),t.drag+=Math.floor(1e-6+this.mount_list[this.mount_sel].dragfactor*this.etype_stats.stats.mass)),this.is_generator?(t.charge=Math.floor(1e-6+2*t.power/10)+2,t.power=0,t.visibility=2):this.has_alternator&&(t.charge=Math.floor(1e-6+t.power/10)+1,t.mass+=1,t.cost+=2,this.use_pp&&"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(t.mass+=1,t.cost+=2)),this.outboard_prop&&(t.drag+=3,this.use_pp&&(t.escape+=2)),this.is_first_pulsejet&&(t.cost+=5),t.pitchspeed=0,t.reliability=0,t}GetElectrics(){return{storage:0,equipment:[]}}}class X extends D{constructor(t,e,s){super(),this.need_cool=0,this.idx_type=1,this.idx_mount=1,this.idx_coolant=0,this.metal_area=0,this.engine_count=0,this.type_list=t,this.mount_list=e,this.coolant_list=s,this.harden_cool=!1}toJSON(){return{type:this.idx_type,mount:this.idx_mount,coolant:this.idx_coolant,harden_cool:this.harden_cool}}fromJSON(t,e){this.idx_type=t.type,this.idx_mount=t.mount,this.idx_coolant=t.coolant,e>10.85&&(this.harden_cool=t.harden_cool)}serialize(t){t.PushNum(this.idx_type),t.PushNum(this.idx_mount),t.PushNum(this.idx_coolant),t.PushBool(this.harden_cool)}derserialize(t){this.idx_type=t.GetNum(),this.idx_mount=t.GetNum(),this.idx_coolant=t.GetNum(),t.version>10.85&&(this.harden_cool=t.GetBool())}GetTypeList(){return this.type_list}GetMountList(){return this.mount_list}GetCoolantList(){return this.coolant_list}CanType(){const t=[...Array(this.type_list.length).fill(!0)];for(let e=0;et;)this.engines.pop();var e=null;for(this.engines.length>0&&(e=JSON.stringify(this.engines[this.engines.length-1].toJSON()));this.engines.lengtht;)this.radiators.pop();for(;this.radiators.length0&&!this.NeedCooling()&&this.SetNumberOfRadiators(0),this.radiators.length}NeedCooling(){let t=!1;for(const e of this.engines)t=t||e.NeedCooling();return t}UpdateReliability(t){for(const e of this.engines){let s=new u;e.GetRadiator()=0&&(s=this.radiators[e.GetRadiator()].PartStats()),e.UpdateReliability(t.reliability+s.reliability)}}SetAsymmetry(t){this.is_asymmetric=t,this.CalculateStats()}GetAsymmetry(){return this.is_asymmetric}GetNumPropellers(){var t=0;for(const e of this.engines)t+=e.GetNumPropellers();return t}GetOverspeed(){let t=100;for(const e of this.engines)t=Math.min(t,e.GetOverspeed());return t}GetRumble(){var t=0;for(const e of this.engines)t+=e.GetRumble();return t}GetMaxRumble(){var t=0;for(const e of this.engines)t=Math.max(t,e.GetRumble());return t}GetTractorSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetTractorSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}GetPusherSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetPusherSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}IsElectrics(){for(const t of this.engines)if(t.IsElectrics())return!0;return!1}HaveParasol(t){for(const e of this.radiators)e.SetParasol(t)}SetMetalArea(t){for(const e of this.radiators)e.SetMetalArea(t)}SetTailMods(t,e,s){for(const i of this.engines)i.SetTailMods(t,e,s)}GetEngineHeight(){var t=2;for(const e of this.engines)t=Math.min(t,e.GetEngineHeight());return t}HasTractorRotary(){for(const t of this.engines)if(t.IsTractorRotary())return!0;return!1}SetInternal(t){for(const e of this.engines)e.SetInternal(t);if(t)for(const t of this.radiators)t.SetMetalArea(0),t.SetParasol(!1)}HasPulsejet(){for(const t of this.engines)if(t.GetIsPulsejet())return!0;return!1}HasTurbineNoProp(){for(const t of this.engines)if(t.GetIsTurbine()&&0==t.GetNumPropellers())return!0;return!1}HasDiesel(){for(const t of this.engines)if(t.IsDiesel())return!0;return!1}GetEngineTypes(){var t=[];for(const e of this.engines)e.GetNumPropellers()>0?t.push({type:P.PROPELLER,num:e.GetNumPropellers()}):e.GetIsPulsejet()?t.push({type:P.PULSEJET,num:0}):e.GetIsTurbine()&&t.push({type:P.TURBINE,num:e.GetCurrentStats().stats.pitchspeed});return t}GetIsFlammable(){for(const t of this.radiators)if(t.GetIsFlammable())return!0;return!1}PartStats(){var t=new u;const e=new Array(this.GetNumberOfRadiators()).fill(null).map((()=>({cool:0,count:0})));var s=0,i=100,a=!1,n=2;for(let r of this.engines){!a&&r.GetIsPulsejet()?(a=!0,r.SetFirstPulsejet(!0)):r.SetFirstPulsejet(!1);const o=r.PartStats();n=Math.min(n,o.visibility),t=t.Add(o),r.NeedCooling()&&(e[r.GetRadiator()].cool+=r.GetCooling(),e[r.GetRadiator()].count+=1),s+=r.GetCurrentStats().stats.cost,o.pitchspeed>0&&(i=Math.min(i,o.pitchspeed))}t.visibility=n,i<100&&(t.pitchspeed=i),t.upkeep=Math.floor(1e-6+Math.min(t.upkeep,s));let o=new u;const l=new Map;for(let t=0;t0?t.warnings.push({source:h("Rotary"),warning:h("Rotary Right Warning"),color:c.WHITE}):_<0&&t.warnings.push({source:h("Rotary"),warning:h("Rotary Left Warning"),color:c.WHITE}),t.reliability=0,t}SetCalculateStats(t){this.CalculateStats=t}GetHasTractorNacelles(){let t=0;for(const e of this.engines)e.GetIsTractorNacelle()&&t++;return t>1}GetElectrics(){let t={storage:0,equipment:[]};for(let e=0;e10.25&&(this.sel_skin=t.sel_skin),this.interal_bracing_count=this.CountInternalBracing()}serialize(t){t.PushNum(this.section_list.length);for(let e=0;e10.25&&(this.sel_skin=t.GetNum()),this.interal_bracing_count=this.CountInternalBracing()}DuplicateSection(t,e=1){const s=this.section_list[t];for(let i=0;ithis.CountSections()+this.tail_section_list.length)for(let t=this.section_list.length-1;t>=0;t--)if(this.section_list[t].internal_bracing){this.interal_bracing_count--,this.section_list.splice(t,1);break}e&&this.CalculateStats()}}SetRequiredSections(t){if(this.required_sections=t,this.required_sections>this.CountSections()&&(0==this.section_list.length&&this.section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),this.required_sections-this.CountSections()>0))for(let t=this.section_list.length-1;t>=0;t--)if(!this.section_list[t].internal_bracing)return void this.DuplicateSection(t,this.required_sections-this.CountSections())}SetRequiredTailSections(t){for(t>this.tail_section_list.length&&(0==this.tail_section_list.length&&this.tail_section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),t-this.tail_section_list.length>0&&this.DuplicateTailSection(this.tail_section_list.length-1,t-this.tail_section_list.length));t0&&!this.section_list[t].internal_bracing;t--);this.DeleteSection(t,!1)}this.CalculateStats()}CountSections(){return this.section_list.length-this.interal_bracing_count}GetNumFrames(){return this.CountSections()+this.tail_section_list.length}CountInternalBracing(){var t=0;for(const e of this.section_list)e.internal_bracing&&t++;return t}BaseType(){const t=[...Array(this.frame_list.length).fill(0)];for(const e of this.section_list)e.internal_bracing||t[e.frame]++;for(const e of this.tail_section_list)e.internal_bracing||t[e.frame]++;var e=0,s=0;for(let i=t.length-1;i>=0;i--)t[i]>s&&(s=t[i],e=i);return e}GetFrameList(){return this.frame_list}GetSkinList(){return this.skin_list}GetSectionList(){return this.section_list}SetFrame(t,e){this.section_list[t].frame=e,this.frame_list[e].geodesic||(this.section_list[t].geodesic=!1),this.CalculateStats()}SetGeodesic(t,e){this.frame_list[this.section_list[t].frame].geodesic&&(this.section_list[t].geodesic=e,this.CalculateStats())}SetMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].monocoque=e,this.CalculateStats())}SetLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].lifting_body=e,this.CalculateStats())}SetInternalBracing(t,e){e&&!this.section_list[t].internal_bracing&&this.PossibleInternalBracing(!0)&&this.CountSections()>this.required_sections?(this.section_list[t].internal_bracing=!0,this.section_list[t].monocoque=!1,this.section_list[t].lifting_body=!1,this.interal_bracing_count++,this.CalculateStats()):e||(this.section_list[t].internal_bracing=!1,this.interal_bracing_count--,this.CalculateStats())}PossibleInternalBracing(t=!1){var e=this.CountSections();return this.farman||(e+=this.tail_section_list.length),t&&(e-=1),this.interal_bracing_count+1<=e}PossibleGeodesic(t){return this.frame_list[this.section_list[t].frame].geodesic&&!this.section_list[t].monocoque}PossibleMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].lifting_body}PossibleLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].monocoque}PossibleTailGeodesic(t){return this.frame_list[this.tail_section_list[t].frame].geodesic&&!this.tail_section_list[t].monocoque}PossibleTailMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].lifting_body}PossibleTailLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].monocoque}PossibleRemoveSections(){return this.CountSections()>this.required_sections}GetFarmanOrBoom(){return this.farman||this.boom}SectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),t.internal_bracing||(e.drag+=4,t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}TailSectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),e.drag+=4,this.farman||(t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}CountMainLiftingBody(){var t=0;for(const e of this.section_list)e.lifting_body&&t++;return t}CountTailLiftingBody(){var t=0;for(const e of this.tail_section_list)e.lifting_body&&t++;return t}CountLiftingBody(){return this.CountMainLiftingBody()+this.CountTailLiftingBody()}SetIsTandem(t){this.is_tandem!=t&&(this.is_tandem=t,this.SetTailType(this.sel_tail))}SetTailType(t){0==this.tail_list[t].stats.reqsections&&this.is_tandem&&t++,this.sel_tail=t,this.SetRequiredTailSections(this.tail_list[t].stats.reqsections)}GetTailType(){return this.sel_tail}GetTailList(){return this.tail_list}GetTailSectionList(){return this.tail_section_list}SetUseFarman(t){if(this.farman=t,t&&this.boom&&(this.boom=!1),this.farman)for(const t of this.tail_section_list)t.monocoque=!1,t.lifting_body=!1;this.CalculateStats()}GetUseFarman(){return this.farman}SetUseBoom(t){this.boom=t,t&&this.farman&&(this.farman=!1),this.CalculateStats()}GetUseBoom(){return this.boom}SetTailFrame(t,e){this.tail_section_list[t].frame=e,this.frame_list[e].geodesic||(this.tail_section_list[t].geodesic=!1),this.CalculateStats()}SetTailGeodesic(t,e){this.frame_list[this.tail_section_list[t].frame].geodesic&&(this.tail_section_list[t].geodesic=e,this.CalculateStats())}SetTailMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].monocoque=e,this.CalculateStats())}SetTailLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].lifting_body=e,this.CalculateStats())}SetHasTractorNacelles(t){this.has_tractor_nacelles=t}GetHasTractorNacelles(){return this.has_tractor_nacelles}CanFlyingWing(){for(const t of this.section_list)if(t.lifting_body)return!0;for(const t of this.tail_section_list)if(t.lifting_body)return!0;return!1}GetFlyingWing(){return this.flying_wing}SetFlyingWing(t){t&&this.CanFlyingWing()?this.flying_wing=!0:this.flying_wing=!1,this.CalculateStats()}GetIsTailless(){return 0==this.tail_section_list.length}SetAllFrame(t){for(const e of this.section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);for(const e of this.tail_section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);this.CalculateStats()}SetAllSkin(t){this.sel_skin=t;for(const e of this.section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);for(const e of this.tail_section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);this.CalculateStats()}GetArmor(){return"Dragon Skin"==this.skin_list[this.sel_skin].name?5:0}GetIsFlammable(){return!!this.skin_list[this.sel_skin].flammable}GetSkin(){return this.sel_skin}CanCutout(){let t=this.section_list.length*this.skin_list[this.sel_skin].stats.visibility;return this.farman?t+=this.tail_section_list.length:t+=this.tail_section_list.length*this.skin_list[this.sel_skin].stats.visibility,t<3}SetCalculateStats(t){this.CalculateStats=t}PartStats(){this.CanFlyingWing()||(this.flying_wing=!1);var t=new u;const e=this.BaseType();t.structure=this.frame_list[e].basestruct,t.cost=this.frame_list[e].basecost;var s=this.skin_list[this.sel_skin].monocoque_structure<0;for(const e of this.section_list)t=t.Add(this.SectionStats(e)),s=s&&(e.internal_bracing||e.monocoque);var i=new u;for(const t of this.tail_section_list)i=i.Add(this.TailSectionStats(t)),this.farman||(s=s&&(t.internal_bracing||t.monocoque));s&&(t.structure+=30),t=t.Add(this.tail_list[this.sel_tail].stats),this.boom&&(i.maxstrain-=i.mass,this.has_tractor_nacelles||(i.drag=Math.floor(1e-6+1.5*i.drag))),this.farman?(t.drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor,t.visibility+=this.tail_section_list.length,i.mass=Math.floor(1e-6+.5*i.mass),t=t.Add(i)):((t=t.Add(i)).drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor);const a=this.CountLiftingBody();return t.cost+=a,this.flying_wing?t.liftbleed+=5:t.drag+=a,this.PossibleRemoveSections()&&this.CountMainLiftingBody()11.15)this.wing_list=t.wing_list,this.mini_wing_list=t.mini_wing_list;else{const e=t.wing_list;this.wing_list=this.OldtoNew(e);const s=t.mini_wing_list;this.mini_wing_list=this.OldtoNew(s)}this.wing_stagger=t.wing_stagger,this.is_swept=t.is_swept,this.is_closed=t.is_closed}OldtoNew(t){const e=[];for(const s of t)e.push({surface:s.surface,area:s.area,span:s.span,anhedral:s.anhedral,dihedral:s.dihedral,gull:!1,deck:s.deck});return e}serialize(t){t.PushNum(this.wing_list.length);for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.wing_list.push(e)}const s=t.GetNum();this.mini_wing_list=[];for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.mini_wing_list.push(e)}this.wing_stagger=t.GetNum(),this.is_swept=t.GetBool(),this.is_closed=t.GetBool()}SetRotorSpan(t){this.rotor_span=t}GetWingList(){return this.wing_list}GetMiniWingList(){return this.mini_wing_list}GetSkinList(){return this.skin_list}GetStaggerList(){return this.stagger_list}GetDeckList(){return this.deck_list}DeckCountFull(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.wing_list)t[e.deck]++;return t}DeckCountMini(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.mini_wing_list)t[e.deck]++;return t}CanStagger(){const t=[...Array(this.stagger_list.length).fill(!1)];if(this.acft_type==k.ORNITHOPTER_FLUTTER)this.wing_list.length>1?t[1]=!0:t[0]=!0;else{if(this.wing_list.length>1)for(let e=1;e1?this.wing_stagger=1:this.wing_stagger=0)}SetStagger(t){for(this.wing_stagger=t;this.stagger_list[t].wing_count=0;e--){const s=this.wing_list[e];t[s.deck]>1&&this.deck_list[s.deck].limited&&(t[s.deck]--,this.wing_list.splice(e,1))}}this.CalculateStats()}GetStagger(){return this.wing_list.length>0?this.wing_stagger:-1}CanAddFullWing(t){if(t>=this.deck_list.length&&console.log("Deck out of Bounds"),!this.stagger_list[this.wing_stagger].inline){if(t==O.SHOULDER&&this.HasPolishWing())return!1;if(this.DeckCountFull()[t]==O.SHOULDER&&this.deck_list[t].limited)return!1}return 0==this.DeckCountMini()[t]}CanAddMiniWing(t){const e=this.DeckCountFull(),s=this.DeckCountMini();return 0==e[t]&&0==s[t]}CanMoveFullWing(t,e){const s=this.wing_list[t];this.wing_list.splice(t,1);const i=this.CanAddFullWing(e);return this.wing_list.splice(t,0,s),i}CanMoveMiniWing(t,e){const s=this.mini_wing_list[t];this.mini_wing_list.splice(t,1);const i=this.CanAddMiniWing(e);return this.mini_wing_list.splice(t,0,s),i}GetWingHeight(){let t=0;for(const e of this.wing_list)t=Math.max(t,4-e.deck);return t}CanClosed(){return this.wing_list.length>1}SetClosed(t){this.wing_list.length>0?this.is_closed=t:this.is_closed=!1,this.CalculateStats()}GetClosed(){return this.is_closed}CanSwept(){return this.wing_list.length>0}SetSwept(t){this.wing_list.length>0?this.is_swept=t:this.is_swept=!1,this.CalculateStats()}GetSwept(){return this.is_swept}GetTandem(){return this.stagger_list[this.wing_stagger].inline&&this.wing_list.length>1}GetMonoplane(){return 1==this.wing_list.length}GetStaggered(){return 0!=this.stagger_list[this.wing_stagger].stats.liftbleed}SetFullWing(t,e){this.wing_list.length!=t&&this.wing_list.splice(t,1),e.area!=e.area&&(e.area=3),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,3),e.span=Math.max(e.span,1),this.CanAddFullWing(e.deck)&&this.wing_list.splice(t,0,e)),this.wing_list.length>1&&0==this.wing_stagger?this.wing_stagger=4:this.wing_list.length<=1&&(this.wing_stagger=0),e.dihedral=Math.floor(1e-6+e.dihedral),e.anhedral=Math.floor(1e-6+e.anhedral),e.dihedral=Math.max(0,Math.min(e.dihedral,e.span-1)),e.anhedral=Math.max(0,Math.min(e.anhedral,e.span-1-e.dihedral)),this.CalculateStats()}SetMiniWing(t,e){this.mini_wing_list.length!=t&&this.mini_wing_list.splice(t,1),e.area!=e.area&&(e.area=2),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,1),e.area=Math.min(e.area,2),e.span=Math.max(e.span,1),this.CanAddMiniWing(e.deck)&&this.mini_wing_list.splice(t,0,e)),this.CalculateStats()}HasNonGullDeck(t){for(const e of this.wing_list)if(e.deck==t&&!e.gull)return!0;return!1}CanGull(t){if(t==O.PARASOL){if(!this.GetTandem()&&this.HasNonGullDeck(O.SHOULDER))return!1}else{if(t==O.SHOULDER)return!1;if(!this.GetTandem()&&this.HasNonGullDeck(t-1))return!1}return!0}IsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}NeedHStab(){return this.stagger_list[this.wing_stagger].hstab}NeedTail(){return this.NeedHStab()||!this.is_swept}GetSpan(){let t=0;for(const e of this.wing_list){const s=e.span;t=Math.max(t,s)}for(const e of this.mini_wing_list){const s=e.span;t=Math.max(t,s)}return t}GetArea(){let t=0;for(const e of this.wing_list)t+=e.area;for(const e of this.mini_wing_list)t+=e.area;return t}GetParasol(){for(const t of this.wing_list)if(t.deck==O.PARASOL)return!0;for(const t of this.mini_wing_list)if(t.deck==O.PARASOL)return!0;return!1}GetMetalArea(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].metal&&(t+=e.area);for(const e of this.mini_wing_list)this.skin_list[e.surface].metal&&(t+=e.area);return t}GetWingDrag(){let t=0;const e=this.DeckCountFull();let s=0,i=0;for(const a of this.wing_list){const r=a.span;let n=a.area;s=Math.max(s,r),a.gull&&(n=Math.floor(1e-6+1.1*n));let o=Math.max(1,6*n*n/(r*r));o=Math.max(1,o*this.skin_list[a.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&e[a.deck]>1&&(o=Math.floor(1e-6+.75*o),o=Math.max(1,o)),o=Math.floor(1e-6+o),s==r&&(i=i),t+=o}for(const e of this.mini_wing_list){const s=e.span;let i=Math.max(1,6*e.area*e.area/(s*s));i=Math.max(1,i*this.skin_list[e.surface].dragfactor),i=Math.floor(1e-6+i),t+=i}const a=this.GetIsSesquiplane();return(a.is||this.GetMonoplane())&&-1!=a.deck&&(t-=Math.floor(1e-6+(1-this.long_list[a.deck].dragfactor)*i)),t}GetIsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}SetAircraftMass(t){this.plane_mass=t}GetPaperMass(){let t=0;for(const e of this.wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}for(const e of this.mini_wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}return Math.max(-Math.floor(1e-6+.25*this.plane_mass),t)}GetIsSesquiplane(){let t=0,e=-1,s=0,i=1e100,a=0;for(const r of this.wing_list)r.area>t?(t=r.area,e=r.deck,s=r.span):r.area==t&&(e=-1),i>r.area&&(i=r.area,a=r.span);let r=t>=2*i;return r=r&&!this.GetMonoplane()&&!this.GetTandem(),r?{is:r,deck:e,super_small:.75*s>=a}:{is:!1,deck:e,super_small:!1}}HasPolishWing(){for(const t of this.wing_list)if(t.deck==O.PARASOL&&1==t.gull)return!0;return!1}HasInvertedGull(){let t=-1;for(const e of this.wing_list)e.gull&&e.deck>O.SHOULDER&&(t=Math.max(t,e.deck));return t}CanCutout(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].transparent&&(t+=1);return t<3}PartStats(){this.CanClosed()||(this.is_closed=!1),this.CanSwept()||(this.is_swept=!1);var t=new u;let e=!1;const s=this.DeckCountFull();let i=!1,a=this.rotor_span,r=0,n=0;for(let i of this.wing_list){this.CanGull(i.deck)||(i.gull=!1),a=Math.max(a,i.span),e?(t.control+=3,t.liftbleed+=5,t.visibility-=1):e=!0;let o=new u;o=o.Add(this.skin_list[i.surface].stats.Multiply(i.area)),o.wingarea=i.area,o.maxstrain+=Math.min(0,-(2*i.span+i.area-10)),this.acft_type==k.ORNITHOPTER_BUZZER&&(o.maxstrain+=Math.min(0,-(2*i.span+i.area-10))),o.maxstrain*=this.skin_list[i.surface].strainfactor,this.skin_list[i.surface].transparent&&n<3&&(o.visibility+=1,n+=1);const l=i.span;let h=i.area;i.gull&&(h=Math.floor(1e-6+1.1*h));const c=Math.max(1,6*h*h/(l*l));o.drag=o.drag+c,o.drag=Math.max(1,o.drag*this.skin_list[i.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&s[i.deck]>1&&(o.drag=Math.floor(1e-6+.75*o.drag),o.drag=Math.max(1,o.drag)),t=t.Add(this.deck_list[i.deck].stats),o.latstab+=i.dihedral-i.anhedral,o.liftbleed+=i.dihedral+i.anhedral,o.Round(),a==i.span&&(r=o.drag),o.mass<0&&(o.mass=0),t=t.Add(o)}for(const e of this.mini_wing_list){a=Math.max(a,e.span),t.control+=1,i?t.liftbleed+=1:i=!0;const s=this.skin_list[e.surface].stats.Multiply(e.area);s.wingarea=e.area,s.maxstrain+=Math.min(0,-(2*e.span+e.area-10)),s.maxstrain*=this.skin_list[e.surface].strainfactor;const r=e.span;s.drag=Math.max(1,s.drag+6*e.area*e.area/(r*r)),s.drag=Math.max(1,s.drag*this.skin_list[e.surface].dragfactor),s.latstab+=e.dihedral-e.anhedral,s.liftbleed+=e.dihedral+e.anhedral,s.Round(),s.mass<0&&(s.mass=0),t=t.Add(s)}t.control+=8-a,t.latstab+=Math.min(0,a-8);const o=this.GetIsSesquiplane();if((o.is||this.GetMonoplane())&&-1!=o.deck&&((t=t.Add(this.long_list[o.deck].stats)).drag-=Math.floor(1e-6+(1-this.long_list[o.deck].dragfactor)*r)),o.is&&(t.liftbleed-=2,t.control+=2),this.stagger_list[this.wing_stagger].inline)for(const e of s)e>1&&(t.liftbleed+=3*(e-1));switch(this.HasPolishWing()&&(t.visibility+=1,t.maxstrain+=10),this.HasInvertedGull()){case 1:case 2:case 3:break;case 4:t.maxstrain+=10,t.crashsafety+=1}if((this.HasInvertedGull()>0||this.HasPolishWing())&&t.era.push({name:"Gull Wing",era:"Coming Storm"}),this.is_swept&&(t.liftbleed+=5,t.latstab--),this.is_closed){const e=Math.floor(1e-6+this.wing_list.length/2);t.mass+=1*e,t.control-=5*e,t.maxstrain+=20*e}return this.wing_list.length>1&&(t=t.Add(this.stagger_list[this.wing_stagger].stats)),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){const t={storage:0,equipment:[]};let e=0,s="";for(const t of this.wing_list){const i=this.skin_list[t.surface];0!=i.stats.charge&&(s=h(i.name),e+=i.stats.charge*t.area,e=Math.floor(1e-6+e))}return 0!=e&&t.equipment.push({source:s,charge:e.toString()}),t}}class et extends D{constructor(t){super(),this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.is_heli=!1,this.hstab_sel=0,this.hstab_count=1,this.hstab_list=[];for(const e of t.hstab)this.hstab_list.push({name:e.name,is_canard:e.is_canard,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail});this.vstab_sel=0,this.vstab_count=1,this.vstab_list=[];for(const e of t.vstab)this.vstab_list.push({name:e.name,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail})}toJSON(){return{hstab_sel:this.hstab_sel,hstab_count:this.hstab_count,vstab_sel:this.vstab_sel,vstab_count:this.vstab_count}}fromJSON(t,e){this.hstab_sel=t.hstab_sel,this.hstab_count=t.hstab_count,this.vstab_sel=t.vstab_sel,this.vstab_count=t.vstab_count}serialize(t){t.PushNum(this.hstab_sel),t.PushNum(this.hstab_count),t.PushNum(this.vstab_sel),t.PushNum(this.vstab_count)}deserialize(t){this.hstab_sel=t.GetNum(),this.hstab_count=t.GetNum(),this.vstab_sel=t.GetNum(),this.vstab_count=t.GetNum()}IsDefault(){return 0==this.hstab_sel&&1==this.hstab_count&&0==this.vstab_sel&&1==this.vstab_count}GetHStabList(){return this.hstab_list}GetVStabList(){return this.vstab_list}GetHStabType(){return this.hstab_sel}SetHStabType(t){("The Wings"!=this.hstab_list[t].name||this.is_tandem||this.is_swept)&&(this.hstab_list[t].is_vtail?this.SetVTail():this.hstab_list[this.hstab_sel].is_vtail&&(this.vstab_sel=0,this.vstab_count=1),this.hstab_sel=t,this.SetHStabCount(this.hstab_count))}GetHValidList(){var t=[];if(this.is_heli)t=Array(this.hstab_list.length).fill(!1),this.have_tail?t[0]=!0:t[1]=!0;else for(const e of this.hstab_list)"The Wings"!=e.name&&"Outboard"!=e.name||this.is_tandem||this.is_swept?e.is_tail&&!this.have_tail?t.push(!1):t.push(!0):t.push(!1);return t}GetIsVTail(){return this.hstab_list[this.hstab_sel].is_vtail}SetVTail(){for(let t=0;t=0?this.hstab_list[this.hstab_sel].increment:1}GetVStabCount(){return this.vstab_count}SetVStabCount(t){if((t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.vstab_count=t,0!=this.vstab_list[this.vstab_sel].increment)for(;this.vstab_count%this.vstab_list[this.vstab_sel].increment!=0;)this.vstab_count++;else this.vstab_count=0;this.CalculateStats()}GetVStabIncrement(){return this.vstab_sel>=0?this.vstab_list[this.vstab_sel].increment:1}SetEngineCount(t){this.engine_count=t}GetIsTandem(){return this.is_tandem}SetIsTandem(t){this.is_tandem=t}SetIsSwept(t){this.is_swept=t}CanVOutboard(){return this.is_swept||this.is_tandem||this.hstab_list[this.hstab_sel].is_canard&&this.hstab_count>0}GetVOutboard(){return"Outboard"==this.vstab_list[this.vstab_sel].name}GetCanard(){return this.hstab_list[this.hstab_sel].is_canard}SetLiftingArea(t){this.lifting_area=t}SetHaveTail(t){if(this.have_tail=t,!t){this.GetHValidList()[this.hstab_sel]||(this.hstab_sel=2);const t=this.GetVValidList();t[this.vstab_sel]||(t[1]||(this.hstab_sel=2),this.vstab_sel=1,this.vstab_count%2!=0&&this.vstab_count++)}this.is_heli&&(this.have_tail?this.hstab_sel=0:this.hstab_sel=1,this.hstab_count=1)}SetHelicopter(t){this.is_heli=t,t&&(this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.lifting_area=0,this.engine_count=0,this.hstab_sel=0,this.hstab_count=1,this.vstab_sel=0,this.vstab_count=1)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=this.GetHValidList();t[this.hstab_sel]||(this.hstab_sel=0,t[this.hstab_sel]||(this.hstab_sel=0,this.hstab_count=0));const e=this.GetVValidList();e[this.vstab_sel]||(this.vstab_sel=0,e[this.vstab_sel]||(this.vstab_sel=0,this.vstab_count=0));var s=new u;if(this.hstab_count>0){s=s.Add(this.hstab_list[this.hstab_sel].stats);var i=0;this.is_heli?(i=Math.floor(1e-6+this.wing_drag/8*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/4*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(1,i))}else(this.hstab_sel<0||0!=this.hstab_list[this.hstab_sel].increment)&&(s.pitchstab-=Math.floor(1e-6+this.lifting_area/2),s.liftbleed+=5);if(this.vstab_count>0?(s=s.Add(this.vstab_list[this.vstab_sel].stats),i=0,this.is_heli?(i=Math.floor(1e-6+this.wing_drag/16*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/8*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(1,i))):(this.vstab_sel<0||0!=this.vstab_list[this.vstab_sel].increment||0==this.vstab_list[this.vstab_sel].increment&&0==this.hstab_count)&&(s.latstab-=this.lifting_area),s.drag+=2*(Math.max(0,this.hstab_count-1)+Math.max(0,this.vstab_count-1)),this.vstab_sel>=0&&0!=this.vstab_list[this.vstab_sel].increment){var a=Math.max(0,this.hstab_count-1);const t=Math.min(this.engine_count-1,this.vstab_count-1);a+=Math.max(0,this.vstab_count-1-t),s.control+=3*t+a}else{const t=Math.max(0,Math.min(this.engine_count-1,this.hstab_count-1));a=Math.max(0,this.hstab_count-1-t),s.control+=3*t+a}return s}GetElectrics(){return{storage:0,equipment:[]}}}class st extends D{constructor(t){super(),this.span=0,this.is_cantilever=0,this.wing_area=0,this.mp=0,this.is_boom=!1,this.acft_type=k.AIRPLANE,this.aileron_sel=0,this.aileron_list=[];for(const e of t.ailerons)this.aileron_list.push({name:e.name,warping:e.warping,stats:new u(e)});this.rudder_sel=0,this.rudder_list=[];for(const e of t.rudders)this.rudder_list.push({name:e.name,stats:new u(e)});this.elevator_sel=0,this.elevator_list=[];for(const e of t.elevators)this.elevator_list.push({name:e.name,stats:new u(e)});this.flaps_sel=0,this.flaps_list=[];for(const e of t.flaps)this.flaps_list.push({name:e.name,costfactor:e.costfactor,stats:new u(e)});this.slats_sel=0,this.slats_list=[];for(const e of t.slats)this.slats_list.push({name:e.name,stats:new u(e)});this.drag_list=[];for(const e of t.drag_inducers)this.drag_list.push({name:e.name,stats:new u(e)});this.drag_sel=[...Array(this.drag_list.length).fill(!1)]}toJSON(){return{aileron_sel:this.aileron_sel,rudder_sel:this.rudder_sel,elevator_sel:this.elevator_sel,flaps_sel:this.flaps_sel,slats_sel:this.slats_sel,drag_sel:this.drag_sel}}fromJSON(t,e){this.aileron_sel=t.aileron_sel,this.rudder_sel=t.rudder_sel,this.elevator_sel=t.elevator_sel,this.flaps_sel=t.flaps_sel,this.slats_sel=t.slats_sel,this.drag_sel=b(t.drag_sel,this.drag_sel.length)}serialize(t){t.PushNum(this.aileron_sel),t.PushNum(this.rudder_sel),t.PushNum(this.elevator_sel),t.PushNum(this.flaps_sel),t.PushNum(this.slats_sel),t.PushBoolArr(this.drag_sel)}deserialize(t){this.aileron_sel=t.GetNum(),this.rudder_sel=t.GetNum(),this.elevator_sel=t.GetNum(),this.flaps_sel=t.GetNum(),this.slats_sel=t.GetNum(),this.drag_sel=t.GetBoolArr(this.drag_sel.length)}IsDefault(){return 0==this.aileron_sel&&0==this.rudder_sel&&0==this.elevator_sel&&0==this.flaps_sel&&0==this.slats_sel&&0==this.drag_sel.reduce(((t,e)=>t||e),!1)}GetAileronList(){return this.aileron_list}CanAileron(){const t=[];if(H(this.acft_type))for(const e of this.aileron_list)t.push(e.warping);else for(const e of this.aileron_list)e.warping&&0==this.wing_area?t.push(!1):t.push(!0);return t}GetAileron(){return this.aileron_sel}SetAileron(t){this.aileron_sel=t,this.CalculateStats()}GetRudderList(){return this.rudder_list}CanRudder(){return this.can_rudder}SetCanRudder(t){this.can_rudder=t,t||(this.rudder_sel=0)}GetRudder(){return this.rudder_sel}SetRudder(t){this.rudder_sel=t,this.CalculateStats()}GetElevatorList(){return this.elevator_list}CanElevator(){return this.can_elevator}SetCanElevator(t){this.can_elevator=t,t||(this.elevator_sel=0)}GetElevator(){return this.elevator_sel}SetElevator(t){this.elevator_sel=t,this.CalculateStats()}GetFlapsList(){return this.flaps_list}GetFlaps(){return this.flaps_sel}SetFlaps(t){this.flaps_sel=t,this.CalculateStats()}GetFlapCost(t){return t&&(this.mp=t),this.flaps_list[this.flaps_sel].costfactor>0?Math.max(1,Math.floor(1e-6+this.flaps_list[this.flaps_sel].costfactor*this.mp)):0}GetSlatsList(){return this.slats_list}GetSlats(){return this.slats_sel}SetSlats(t){this.slats_sel=t,this.CalculateStats()}GetDragList(){return this.drag_list}GetDrag(){return this.drag_sel}SetDrag(t,e){this.drag_sel[t]=e,this.CalculateStats()}SetNumCantilever(t){this.is_cantilever=t}SetSpan(t){this.span=t}SetWingArea(t){this.wing_area=t}SetAcftType(t){if(this.acft_type=t,this.acft_type==k.HELICOPTER){this.aileron_sel=0,this.rudder_sel=0,this.elevator_sel=0,this.flaps_sel=0,this.slats_sel=0;for(let t=0;tt)),this.is_cantilever=0}}SetBoomTail(t){this.is_boom=t}SetIsVTail(t){t&&(this.rudder_sel=this.elevator_sel)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;this.aileron_list[this.aileron_sel].warping&&0==this.wing_area&&(this.aileron_sel=0),t=t.Add(this.aileron_list[this.aileron_sel].stats),this.aileron_list[this.aileron_sel].warping&&(t.maxstrain-=this.span,this.is_cantilever&&(t.cost+=2*this.is_cantilever,t.era.push({name:h("Cantilever Wing Warping"),era:"Last Hurrah"})),this.is_boom&&(t.pitchstab-=2,t.latstab-=2,t.warnings.push({source:h("Wing Warping"),warning:h("Wing Warping Warning"),color:c.WHITE}))),t=(t=(t=(t=t.Add(this.rudder_list[this.rudder_sel].stats)).Add(this.elevator_list[this.elevator_sel].stats)).Add(this.flaps_list[this.flaps_sel].stats)).Add(this.slats_list[this.slats_sel].stats);for(let e=0;e10.25&&t.wing_blades,e<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}serialize(t){t.PushNumArr(this.ext_wood_count),t.PushNumArr(this.ext_steel_count),t.PushNumArr(this.cant_count),t.PushBool(this.wires),t.PushNum(this.cabane_sel),t.PushBool(this.wing_blades)}deserialize(t){this.ext_wood_count=t.GetNumArr(this.ext_wood_count.length),this.ext_steel_count=t.GetNumArr(this.ext_steel_count.length),this.cant_count=t.GetNumArr(this.cant_count.length),this.wires=t.GetBool(),this.cabane_sel=t.GetNum(),t.version>10.25?this.wing_blades=t.GetBool():this.wing_blades=!1,t.version<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}GetExternalList(){return this.ext_wood_list}GetCantileverList(){return this.cant_list}CanExternalWood(){const t=[...Array(this.ext_wood_list.length).fill(this.can_external)];for(let e=0;e0}SetCantileverCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.ImplSCC(t,e),this.CalculateStats()}ImplSCC(t,e){var s=e-this.cant_count[t];if(this.cant_list[t].limited&&e>0){var i=this.TotalStructure();for(let t=0;tthis.acft_structure)for(let t=this.cant_list.length-1;t>=0;t--)s=s||this.ImplSCC(t,this.cant_count[t]);s&&this.CalculateStats()}TotalStructure(){var t=this.ext_cabane_list[this.cabane_sel].stats.structure,e=!1;for(let s=0;s0||this.ext_steel_count[s]>0)&&(e=!0);return e&&(t+=5),this.acft_structure+t}GetCantileverType(){const t=this.cant_count[0]+this.cant_count[4];return this.cant_count[1]+this.cant_count[2]+this.cant_count[3]>0?2:t>0?1:0}GetCabaneList(){return this.ext_cabane_list}GetCabane(){return this.cabane_sel}SetCabane(t){this.cabane_sel=t,this.CalculateStats()}SetCantLift(t){this.cant_lift=t}CanWingBlade(){for(const t of this.ext_wood_count)if(t>0)return!1;for(const t of this.ext_steel_count)if(t>0)return!1;return 0==this.cabane_sel&&this.cant_count[2]>0}GetWingBlade(){return this.wing_blades}SetWingBlade(t){this.wing_blades=t,this.CalculateStats()}SetAircraftType(t){this.acft_type=t,t==k.HELICOPTER&&(this.can_external=!1,this.is_monoplane=!1,this.is_tandem=!1,this.is_staggered=!1),t==k.ORNITHOPTER_BUZZER&&(this.can_external=!1);const e=this.CanExternalWood();for(let t=0;t0){a=a||this.ext_wood_list[r].first;let i=this.ext_wood_list[r].stats;i=i.Multiply(this.ext_wood_count[r]),t=t.Add(i),this.ext_wood_list[r].config?s+=e*this.ext_wood_list[r].tension*this.ext_wood_count[r]:s+=this.ext_wood_list[r].tension*this.ext_wood_count[r]}for(let r=0;r0){a=a||this.ext_wood_list[r].first;let i=this.ext_steel_list[r].stats.Clone();i=i.Multiply(this.ext_steel_count[r]),t=t.Add(i),this.ext_steel_list[r].config?s+=e*this.ext_steel_list[r].tension*this.ext_steel_count[r]:s+=this.ext_steel_list[r].tension*this.ext_steel_count[r]}this.acft_type==k.ORNITHOPTER_BASIC&&(t.maxstrain=Math.floor(1e-6+.5*t.maxstrain)),a&&(t.structure+=5,t.maxstrain+=10,s+=10);const r=this.ext_cabane_list[this.cabane_sel].stats.Clone();t=t.Add(r),s+=e*this.ext_cabane_list[this.cabane_sel].tension,this.cabane_sel>0&&(i+=1),this.wires&&(t.maxstrain+=Math.floor(1e-6+s),t.drag+=3*i);var n=!1;for(let e=0;e0){n=!0;let s=this.cant_list[e].stats;s=s.Multiply(this.cant_count[e]),s.maxstrain,t=t.Add(s)}return this.CanWingBlade()?this.wing_blades&&(t.mass*=2,t.warnings.push({source:h("Wing Blades"),warning:h("Wing Blades Warning"),color:c.WHITE})):this.wing_blades=!1,n&&(t.cost+=5,t.liftbleed-=this.cant_lift),t}GetElectrics(){return{storage:0,equipment:[]}}}class at extends D{constructor(t){super(),this.tank_stats=[],this.tank_count=[];for(const e of t.tanks)this.tank_stats.push({name:e.name,stats:new u(e),internal:e.internal,cantilever:e.cantilever}),this.tank_count.push(0);this.self_sealing=!1,this.is_cantilever=!1,this.wing_area=-1}toJSON(){return{tank_count:this.tank_count,self_sealing:this.self_sealing,fire_extinguisher:this.fire_extinguisher}}fromJSON(t,e){this.tank_count=y(t.tank_count,this.tank_count.length),this.self_sealing=t.self_sealing,this.fire_extinguisher=t.fire_extinguisher,this.wing_area=-1}serialize(t){t.PushNumArr(this.tank_count),t.PushBool(this.self_sealing),t.PushBool(this.fire_extinguisher)}deserialize(t){this.tank_count=t.GetNumArr(this.tank_count.length),this.self_sealing=t.GetBool(),this.fire_extinguisher=t.GetBool(),this.wing_area=-1}GetTankList(){return this.tank_stats}GetTankEnabled(){const t=[];for(const e of this.tank_stats)!this.is_cantilever&&e.cantilever?t.push(!1):t.push(!0);return t}GetTankCount(){return this.tank_count}SetTankCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.tank_count[t]=e,this.VerifyOK(),this.CalculateStats()}SetCantilever(t){this.is_cantilever&&!t&&(this.is_cantilever=t,this.VerifyOK()&&this.CalculateStats()),this.is_cantilever=t}SetArea(t){this.wing_area>t&&(this.wing_area=t,this.VerifyOK()&&this.CalculateStats()),this.wing_area=t}VerifyOK(){if(-1!=this.wing_area){var t=0;for(let e=0;e0;for(;s>0;)for(let t=this.tank_count.length-1;t>=0;t--)if(this.tank_stats[t].cantilever){this.tank_count[t]--,s--;break}for(let t=0;t0}GetSelfSealing(){return this.self_sealing}SetSelfSealing(t){this.self_sealing=t,this.CalculateStats()}GetExtinguisher(){return this.fire_extinguisher}SetExtinguisher(t){this.fire_extinguisher=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u,e=0;for(let s=0;s0&&(t.wetmass+=5-t.wetmass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class rt extends D{constructor(){super(),this.bomb_count=0,this.rocket_count=0,this.internal_bay_count=0,this.internal_bay_1=!1,this.internal_bay_2=!1}toJSON(){return{bomb_count:this.bomb_count,rocket_count:this.rocket_count,bay_count:this.internal_bay_count,bay1:this.internal_bay_1,bay2:this.internal_bay_2}}fromJSON(t,e){this.bomb_count=t.bomb_count,this.internal_bay_count=t.bay_count,this.internal_bay_1=t.bay1,this.internal_bay_2=t.bay2,e>10.75&&(this.rocket_count=t.rocket_count)}serialize(t){t.PushNum(this.bomb_count),t.PushNum(this.internal_bay_count),t.PushBool(this.internal_bay_1),t.PushBool(this.internal_bay_2),t.PushNum(this.rocket_count)}deserialize(t){this.bomb_count=t.GetNum(),this.internal_bay_count=t.GetNum(),this.internal_bay_1=t.GetBool(),this.internal_bay_2=t.GetBool(),t.version>10.75&&(this.rocket_count=t.GetNum())}GetRocketCount(){return this.rocket_count}GetBombCount(){return this.bomb_count}GetInternalBombCount(){var t=10*this.internal_bay_count;return this.bomb_count>0&&this.internal_bay_count>0&&this.internal_bay_1&&(t*=2,this.internal_bay_2&&(t*=2)),t}GetMaxBombSize(){var t=0;const e=this.GetInternalBombCount();return this.bomb_count>0&&this.internal_bay_count>0&&(t=this.internal_bay_1?this.internal_bay_2?Math.floor(1e-6+e):Math.floor(1e-6+e/2):Math.floor(1e-6+e/4)),t}SetRocketCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.rocket_count=t,this.LimitMass(),this.CalculateStats()}SetBombCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.bomb_count=t,this.LimitMass(),this.CalculateStats()}GetBayCount(){return this.internal_bay_count}GetBay1(){return this.internal_bay_1}GetBay2(){return this.internal_bay_2}SetBayCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.internal_bay_count=t,this.CalculateStats()}SetUseBays(t,e){this.internal_bay_1=t,this.internal_bay_2=e,!this.internal_bay_1&&this.internal_bay_2&&(this.internal_bay_1=!0,this.internal_bay_2=!1),this.CalculateStats()}LimitMass(){var t=!1;const e=Math.min(this.GetInternalBombCount(),Math.floor(1e-6+3*this.acft_struct*this.maxbomb));var s,i,a=0,r=0;s=this.bomb_count>e?e:this.bomb_count,i=this.rocket_count+s>e?e-s:this.rocket_count,a=this.bomb_count-s,r=this.rocket_count-i;const n=Math.floor(1e-6+this.acft_struct*this.maxbomb-(s+i)/3)*this.gull_factor;for(;a+r>n;)r>0?r--:a--;let o=Math.max(0,s+a);this.bomb_count>o&&(t=!0,this.bomb_count=o);let l=Math.max(0,i+r);return this.rocket_count>l&&(t=!0,this.rocket_count=l),t}GetExternalMass(){const t=this.bomb_count+this.rocket_count;return Math.max(0,t-this.GetInternalBombCount())}SetAcftParameters(t,e,s){switch(this.acft_struct=t,this.maxbomb=e,s){case 2:case 3:this.gull_factor=1.1;break;case 4:this.gull_factor=1.2;break;default:this.gull_factor=1}this.LimitMass()&&this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u,e=this.GetExternalMass();if(t.reqsections+=this.internal_bay_count,this.internal_bay_count>0){const e=t.reqsections;this.internal_bay_1&&(t.reqsections+=e,this.internal_bay_2&&(t.reqsections+=e))}const s=Math.ceil(e/5-1e-6);return t.mass+=s,t.drag+=s,t.bomb_mass=this.bomb_count+this.rocket_count,t.reqsections=Math.ceil(-1e-6+t.reqsections),t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class nt extends D{constructor(t){super(),this.cargo_list=[];for(const e of t.spaces)this.cargo_list.push({name:e.name,stats:new u(e)});this.cargo_sel=0}toJSON(){return{space_sel:this.cargo_sel}}fromJSON(t,e){this.cargo_sel=t.space_sel}serialize(t){t.PushNum(this.cargo_sel)}deserialize(t){this.cargo_sel=t.GetNum()}GetSpaceList(){return this.cargo_list}GetSpace(){return this.cargo_sel}SetSpace(t){this.cargo_sel=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;return(t=t.Add(this.cargo_list[this.cargo_sel].stats)).bomb_mass+=3*t.reqsections,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class ot extends D{constructor(t){super(),this.gear_list=[],this.gear_sel=0,this.retract=!1;for(const e of t.gear)this.gear_list.push({name:e.name,stats:new u(e),DpLMP:e.DpLMP,SpLMP:e.SpLMP,can_retract:e.can_retract});this.extra_list=[];for(const e of t.extras)this.extra_list.push({name:e.name,stats:new u(e),MpLMP:e.MpLMP});this.extra_sel=[...Array(this.extra_list.length).fill(!1)]}toJSON(){return{gear_sel:this.gear_sel,retract:this.retract,extra_sel:this.extra_sel}}fromJSON(t,e){this.gear_sel=t.gear_sel,this.retract=t.retract,this.extra_sel=b(t.extra_sel,this.extra_sel.length)}serialize(t){t.PushNum(this.gear_sel),t.PushBool(this.retract),t.PushBoolArr(this.extra_sel)}deserialize(t){this.gear_sel=t.GetNum(),this.retract=t.GetBool(),this.extra_sel=t.GetBoolArr(this.extra_sel.length)}IsDefault(){return 0==this.gear_sel&&0==this.retract&&0==this.extra_sel.reduce(((t,e)=>t||e),!1)}GetGearName(){return this.retract&&"Boat Hull"==this.gear_list[this.gear_sel].name?h("Retractable Gear + Boat Hull"):this.retract?h("Retractable ")+h(this.gear_list[this.gear_sel].name):h(this.gear_list[this.gear_sel].name)}GetGearList(){return this.gear_list}CanGear(){const t=[...Array(this.gear_list.length).fill(!0)];for(let e=0;e=2||0==t&&e>=3}SetGull(t){this.gull_deck=t}SetCalculateStats(t){this.CalculateStats=t}IsVital(){return!0}PartStats(){var t=new u;this.CanGear()[this.gear_sel]||(this.gear_sel=0),this.CanRetract()||(this.retract=!1);var e=this.loadedMass;for(let s=0;s=0;i--)s+=t[i],t[i]=s-e;return t}SetArmourCoverage(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.armour_coverage[t]=1!=t?e:e-this.skin_armour,this.NormalizeCoverage(),this.CalculateStats()}NormalizeCoverage(){var t=-8+Math.min(0,-Math.floor(1e-6+(this.vital_parts-8)/2));t+=this.skin_armour;for(let e=this.armour_coverage.length-1;e>=0;e--)this.armour_coverage[e]=Math.max(0,Math.min(Math.abs(t),this.armour_coverage[e])),t+=this.armour_coverage[e]}GetElectricalList(){return this.electric_list}GetElectricalCount(){return this.electrical_count}SetElectricalCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),e=Math.min(e,50),this.electrical_count[t]=e,this.CalculateStats()}GetRadioList(){return this.radio_list}GetRadioSel(){return this.radio_sel}SetRadioSel(t){this.radio_sel=t,this.CalculateStats()}GetReconList(){return this.recon_list}GetReconSel(){return this.recon_sel}SetReconSel(t,e){((e=Math.trunc(e))!=e||e<0)&&(e=0),this.recon_sel[t]=e,this.CalculateStats()}GetVisibilityList(){return this.visi_list}GetCanVisibility(){return this.can_visi}GetVisibilitySel(){return this.visi_sel}SetVisibilitySel(t,e){this.visi_sel[t]=e,this.CalculateStats()}GetClimateList(){return this.clim_list}GetClimateSel(){return this.clim_sel}GetClimateEnable(){const t=[];for(const e of this.clim_list)!this.acft_rad&&e.req_radiator?t.push(!1):t.push(!0);return t}SetClimateSel(t,e){this.clim_sel[t]=e,this.CalculateStats()}GetAutopilotList(){return this.auto_list}GetAutopilotSel(){return this.auto_sel}SetAutopilotSel(t){this.auto_sel=t,this.CalculateStats()}GetControlList(){return this.cont_list}GetControlSel(){return this.cont_sel}SetControlSel(t){this.cont_sel=t,this.CalculateStats()}SetAcftRadiator(t){this.acft_rad=t}IsElectrics(){for(const t of this.electrical_count)if(t>0)return!0;for(let t=0;t0&&(""!=e&&(e+=", "),e+=r.toString()+"/"+(11-s[a]).toString()+"+")}""!=e&&t.warnings.push({source:h("Armour"),warning:e,color:c.WHITE});for(let e=0;e0){let s=this.electric_list[e].stats.Clone();s=s.Multiply(this.electrical_count[e]),t=t.Add(s)}t=t.Add(this.radio_list[this.radio_sel].stats);for(let e=0;e0){let s=this.recon_list[e].stats.Clone();s=s.Multiply(this.recon_sel[e]),t=t.Add(s)}for(let e=0;e0&&(t+=i.storage*a,i.cp10s>0?e.push({source:h(i.name),charge:r.Format("{0}"+h("Derived Per 10 Speed"),Math.floor(1e-6+a*i.cp10s))}):0!=i.stats.charge&&e.push({source:h(i.name),charge:(a*i.stats.charge).toString()}))}const s=this.radio_list[this.radio_sel];e=this.FormatEquipment(e,s.name,s.stats.charge);for(let t=0;t0&&(e=this.FormatEquipment(e,s.name,i*s.stats.charge))}for(let t=0;t0){let e=Math.min(t,this.drag);e=Math.max(e,0),this.drag-=e,t-=e,e=Math.min(t,this.reliability),e=Math.max(e,0),this.reliability-=e,t-=e,e=Math.min(t,this.maxstrain),e=Math.max(e,0),this.maxstrain-=e,t-=e,e=Math.min(t,this.toughness),e=Math.max(e,0),this.toughness-=e,t-=e,e=Math.min(t,this.mass),e=Math.max(e,0),this.mass-=e,t-=e,e=Math.min(t,this.escape),e=Math.max(e,0),this.escape-=e,t-=e,e=Math.min(t,this.bleed),e=Math.max(e,0),this.bleed-=e,t-=e,e=Math.min(t,this.cost),e=Math.max(e,0),this.cost-=e,t-=e}}GetFreeDots(){return this.free_dots}SetFreeDots(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,0),this.free_dots=t,this.ReduceDots(),this.CalculateStats()}GetCost(){return this.cost}SetCost(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.cost=t,this.ReduceDots(),this.CalculateStats()}GetBleed(){return this.bleed}SetBleed(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.bleed=t,this.ReduceDots(),this.CalculateStats()}GetEscape(){return this.escape}SetEscape(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.escape=t,this.ReduceDots(),this.CalculateStats()}GetMass(){return this.mass}SetMass(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.mass=t,this.ReduceDots(),this.CalculateStats()}GetToughness(){return this.toughness}SetToughness(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.toughness=t,this.ReduceDots(),this.CalculateStats()}GetMaxStrain(){return this.maxstrain}SetMaxStrain(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.maxstrain=t,this.ReduceDots(),this.CalculateStats()}GetReliabiilty(){return this.reliability}SetReliability(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.reliability=t,this.ReduceDots(),this.CalculateStats()}GetDrag(){return this.drag}SetDrag(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.drag=t,this.ReduceDots(),this.CalculateStats()}SetAcftStats(t){this.acft_stats=t}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u;return t.cost=Math.floor(1e-6+-this.cost*this.acft_stats.cost/10),t.liftbleed=Math.floor(1e-6+3*-this.bleed),t.escape=this.escape,t.visibility=this.escape,t.mass=Math.floor(1e-6+-this.mass*this.acft_stats.mass/10),t.toughness=Math.floor(1e-6+this.toughness*this.acft_stats.toughness/4),t.reliability=2*this.reliability,t.drag=Math.floor(1e-6+-this.drag*this.acft_stats.drag/10),t}GetElectrics(){return{storage:0,equipment:[]}}}!function(t){t[t.NONE=-1]="NONE",t[t.INTERRUPT=0]="INTERRUPT",t[t.SYNCH=1]="SYNCH",t[t.SPINNER=2]="SPINNER",t[t.DEFLECT=3]="DEFLECT",t[t.NO_INTERFERENCE=4]="NO_INTERFERENCE",t[t.ENUM_MAX=5]="ENUM_MAX"}(F||(F={})),(B=q||(q={}))[B.BULLETS=0]="BULLETS",B[B.HEATRAY=1]="HEATRAY",B[B.PNEUMATIC=2]="PNEUMATIC",B[B.ENUM_MAX=3]="ENUM_MAX",B[B.GYROJETS=4]="GYROJETS",function(t){t[t.STANDARD=0]="STANDARD",t[t.MECHANICAL=1]="MECHANICAL",t[t.GAST=2]="GAST",t[t.ROTARY=3]="ROTARY",t[t.ENUM_MAX=4]="ENUM_MAX"}(L||(L={}));class ct extends D{constructor(t,e,s,i=!1){super(),this.weapon_type=t,this.fixed=i,this.wing=!0,this.covered=!1,this.accessible=!1,this.free_accessible=!1,this.synchronization=i?F.NONE:F.INTERRUPT,this.w_count=1,this.repeating=!1,this.wing_reinforcement=!1}toJSON(){return{fixed:this.fixed,wing:this.wing,covered:this.covered,accessible:this.accessible,free_accessible:this.free_accessible,synchronization:this.synchronization,w_count:this.w_count}}fromJSON(t,e){this.fixed=t.fixed,this.wing=t.wing,this.covered=t.covered,this.accessible=t.accessible,this.free_accessible=t.free_accessible,this.synchronization=t.synchronization,this.w_count=t.w_count,e<10.95&&(this.repeating=t.repeating)}serialize(t){t.PushBool(this.fixed),t.PushBool(this.wing),t.PushBool(this.covered),t.PushBool(this.accessible),t.PushBool(this.free_accessible),t.PushNum(this.synchronization),t.PushNum(this.w_count)}deserialize(t){this.fixed=t.GetBool(),this.wing=t.GetBool(),this.covered=t.GetBool(),this.accessible=t.GetBool(),this.free_accessible=t.GetBool(),this.synchronization=t.GetNum(),this.w_count=t.GetNum(),t.version<10.95&&(this.repeating=t.GetBool())}SetWeaponType(t,e,s){this.weapon_type=t,this.action=e,16==this.weapon_type.size&&(this.w_count=1),this.SetCount(this.w_count,!1)}GetFixed(){return this.fixed}SetFixed(t){t!=this.fixed&&(t?this.fixed=!0:(this.fixed=!1,this.synchronization=F.NONE))}SetCanWing(t){this.canwing=t,this.wing&&!t&&(this.wing=!1)}GetWing(){return this.wing}CanWing(){return this.weapon_type.size<=16&&this.canwing}SetWing(t){t&&this.CanWing()?(this.wing=!0,this.free_accessible=!1,this.synchronization=F.NONE):this.wing=!1,this.CalculateStats()}CanCovered(){return this.wing?this.has_cantilever&&!(16==this.weapon_type.size&&!this.fixed):!(this.GetArty()&&!this.fixed)}GetCovered(){return this.covered}SetCovered(t){this.covered=t,this.CalculateStats()}GetAccessible(){return this.accessible||this.free_accessible}SetAccessible(t){t&&this.free_accessible&&(t=!1),this.accessible=t,this.CalculateStats()}GetFreeAccessible(){return this.free_accessible}SetFreeAccessible(t){t&&!this.wing&&this.can_free_accessible?(this.free_accessible=!0,this.accessible=!1):this.free_accessible=!1,this.CalculateStats()}CanSynchronization(){const t=[];for(let e=-1;e16;)t-=1;this.w_count=t,e&&this.CalculateStats()}CanRepeating(){return!this.weapon_type.rapid||this.weapon_type.reload>0}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:this.repeating=!1,this.CalculateStats()}ResolveSynch(){const t=this.synchronization;if(this.synchronization=F.ENUM_MAX,this.CanSynch(t))this.action==L.MECHANICAL&&t!=F.SPINNER?this.synchronization=F.SYNCH:this.synchronization=t;else{for(let t=-1;t8||16==this.weapon_type.size)&&(t.reqsections+=1),this.accessible&&(t.cost+=Math.max(1,Math.floor(1e-6+this.w_count/2))),!this.fixed)if(e<=2);else if(e<=4)t.cost+=1;else if(e<=8)t.mass+=1,t.cost+=3;else{if(!(e<=16))throw"Weapon size screwup in Turret size cost.";t.mass+=2,t.cost+=5}return this.synchronization==F.INTERRUPT?(t.cost+=2*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=2*this.w_count),t.era.push({name:h("Interruptor Gear"),era:h("WWI")})):this.synchronization==F.SYNCH&&this.action!=L.MECHANICAL?(t.cost+=3*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=3*this.w_count),t.era.push({name:h("Synchronization Gear"),era:h("Roaring 20s")})):this.synchronization==F.DEFLECT?(t.cost+=1,t.warnings.push({source:h(this.weapon_type.name),warning:h("Deflector Plate Warning"),color:c.WHITE})):this.synchronization!=F.NO_INTERFERENCE||this.IsLightningArc()||t.warnings.push({source:h(this.weapon_type.name)+" "+h("No Interference"),warning:h("No Interference Warning"),color:c.YELLOW}),this.wing_reinforcement&&(t.mass+=2),t.Round(),t}GetElectrics(){return{storage:0,equipment:[]}}}class ut extends D{constructor(t,e){super(),this.weapon_list=t,this.wl_permute=e,this.directions=[...Array(6).fill(!1)],this.directions[0]=!0,this.fixed=!0,this.ammo=1,this.weapon_type=0,this.raw_weapon_type=0,this.weapons=[],this.action_sel=L.STANDARD,this.projectile_sel=q.BULLETS,this.has_propeller=!0,this.sticky_guns=0,this.repeating=!1,this.seat=0,this.final_weapon={name:"",abrv:"",era:"",size:0,stats:new u,damage:0,hits:0,ammo:0,ap:0,jam:"",reload:0,rapid:!1,synched:!1,shells:!1,can_action:!1,can_projectile:!1,deflection:0},this.MakeFinalWeapon(),this.SWC(1)}toJSON(){const t=[];for(const e of this.weapons)t.push(e.toJSON());return{weapon_type:this.raw_weapon_type,fixed:this.fixed,directions:this.directions,weapons:t,ammo:this.ammo,action:this.action_sel,projectile:this.projectile_sel,repeating:this.repeating,seat:this.seat}}fromJSON(t,e){this.raw_weapon_type=t.weapon_type,this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.fixed,this.directions=b(t.directions,this.directions.length),this.weapons=[],this.ammo=t.ammo,null==this.ammo&&(this.ammo=1),e<10.25?(this.action_sel=L.STANDARD,this.projectile_sel=q.BULLETS):(this.action_sel=t.action,this.projectile_sel=t.projectile),e<11.75&&(this.projectile_sel==q.PNEUMATIC?this.projectile_sel=q.BULLETS:this.projectile_sel==q.ENUM_MAX&&(this.projectile_sel=q.PNEUMATIC)),this.MakeFinalWeapon();for(const s of t.weapons){const t=new ct(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),t.fromJSON(s,e),this.weapons.push(t)}if(e<10.95){this.repeating=!1;for(const t of this.weapons)this.repeating=this.repeating||t.GetRepeating()}else this.repeating=t.repeating;this.seat=e>11.65?t.seat:0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}serialize(t){t.PushNum(this.raw_weapon_type),t.PushBool(this.fixed),t.PushBoolArr(this.directions),t.PushNum(this.ammo),t.PushNum(this.weapons.length);for(const e of this.weapons)e.serialize(t);t.PushNum(this.action_sel),t.PushNum(this.projectile_sel),t.PushBool(this.repeating),t.PushNum(this.seat)}deserialize(t){this.raw_weapon_type=t.GetNum(),this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.GetBool(),this.directions=t.GetBoolArr(this.directions.length),this.ammo=t.GetNum();const e=t.GetNum();this.weapons=[],this.MakeFinalWeapon();for(let s=0;s11.65?this.seat=t.GetNum():this.seat=0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}GetWeaponSelected(){return this.weapon_type}MakeFinalWeapon(){const t=this.weapon_type;if(this.final_weapon.can_action=this.weapon_list[t].can_action,this.final_weapon.can_projectile=this.weapon_list[t].can_projectile,this.final_weapon.ammo=this.weapon_list[t].ammo,this.final_weapon.ap=this.weapon_list[t].ap,this.final_weapon.damage=this.weapon_list[t].damage,this.final_weapon.era=this.weapon_list[t].era,this.final_weapon.name=this.weapon_list[t].name,this.final_weapon.abrv=this.weapon_list[t].abrv,this.final_weapon.reload=this.weapon_list[t].reload,this.final_weapon.shells=this.weapon_list[t].shells,this.final_weapon.size=this.weapon_list[t].size,this.final_weapon.stats=this.weapon_list[t].stats.Clone(),this.final_weapon.deflection=this.weapon_list[t].deflection,this.final_weapon.jam=this.weapon_list[t].jam,this.final_weapon.stats.era=[],this.final_weapon.stats.era.push({name:this.weapon_list[t].name,era:this.weapon_list[t].era}),0==this.weapon_list[t].hits&&(this.action_sel==L.MECHANICAL&&(this.action_sel=L.STANDARD),this.projectile_sel!=q.GYROJETS&&this.projectile_sel!=q.HEATRAY||(this.projectile_sel=q.BULLETS)),this.action_sel==L.STANDARD)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.synched=this.weapon_list[t].synched;else if(this.action_sel==L.MECHANICAL)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.stats.warnings.push({source:h("Mechanical Action"),warning:h("Mechanical Action Warning"),color:c.WHITE}),this.final_weapon.jam="0/0",this.final_weapon.rapid=!0,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!0,this.final_weapon.stats.era.push({name:h("Mechanical Action"),era:h("WWI")});else if(this.action_sel==L.GAST)this.final_weapon.hits=2*this.weapon_list[t].hits,this.final_weapon.ammo=this.weapon_list[t].ammo/2,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!1,this.final_weapon.stats.era.push({name:h("Gast Principle"),era:h("WWI")});else if(this.action_sel==L.ROTARY){this.final_weapon.stats.mass+=this.weapon_list[t].stats.mass,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.size+=this.weapon_list[t].size,this.final_weapon.size=Math.min(16,this.final_weapon.size),this.final_weapon.hits=3*this.weapon_list[t].hits,this.final_weapon.deflection-=1,this.final_weapon.synched=!1;const e=this.final_weapon.jam.split("/");e[0]="9999",e[1]=(parseInt(e[1])+1).toString(),this.final_weapon.jam=e.join("/"),this.final_weapon.stats.era.push({name:h("Rotary_Gun"),era:h("WWI")})}if(this.repeating&&0!=this.final_weapon.reload&&(this.final_weapon.reload=0,this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost))),this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=q.HEATRAY||(this.projectile_sel=q.BULLETS),this.action_sel!=L.GAST&&this.action_sel!=L.ROTARY&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=q.PNEUMATIC||(this.projectile_sel=q.BULLETS),this.projectile_sel==q.HEATRAY)this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.shells=!1,this.final_weapon.ammo=0,this.final_weapon.deflection=0,this.final_weapon.ap=Math.max(0,this.final_weapon.ap-1),this.final_weapon.stats.warnings.push({source:h("Heat Ray"),warning:h("Heat Ray Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Heat Ray"),era:h("Himmilgard")});else if(this.projectile_sel==q.GYROJETS)this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost)),this.final_weapon.shells=!1,this.final_weapon.damage-=1,this.final_weapon.stats.warnings.push({source:h("Gyrojets"),warning:h("Gyrojets Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Gyrojets"),era:h("Roaring 20s")});else if(this.projectile_sel==q.PNEUMATIC){if(this.final_weapon.ammo*=2,this.final_weapon.shells=!1,this.final_weapon.rapid){const t=this.final_weapon.jam.split("/");t[1]="9999",this.final_weapon.jam=t.join("/"),this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 1"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Pneumatic"),era:h("Pioneer")})}this.final_weapon.hits>0&&this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 2"),color:c.WHITE})}0!=this.final_weapon.deflection&&this.final_weapon.stats.warnings.push({source:h(this.final_weapon.name),warning:h("Deflection Warning",this.final_weapon.deflection),color:c.WHITE})}SetWeaponSelected(t){const e=this.IsLightningArc();if(this.weapon_type=t,this.raw_weapon_type=this.wl_permute.findIndex((e=>e==t)),16==this.weapon_list[t].size)for(;this.weapons.length>1;)this.weapons.pop();this.weapon_list[t].can_action&&this.GetCanAction()[this.action_sel]||(this.action_sel=L.STANDARD),this.weapon_list[t].can_projectile&&this.GetCanProjectile()[this.projectile_sel]||(this.projectile_sel=q.BULLETS),this.weapon_list[t].rapid?this.repeating=!1:this.repeating||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD),this.CanRepeating()||(this.repeating=!1),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);if(this.IsLightningArc()){this.SetFixed(!0),this.directions[0]=!0;for(let t=1;t0)&&this.weapon_list[this.weapon_type].ammo>0&&"Precision Rifle"!=this.weapon_list[this.weapon_type].name}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:(this.repeating=!1,this.weapon_list[this.weapon_type].rapid||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD)),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);this.CalculateStats()}GetFixed(){return this.fixed}SetFixed(t){if(this.IsLightningArc()&&(t=!0),this.fixed!=t){this.fixed=t;for(const t of this.weapons)t.SetFixed(this.fixed);if(t){let t=!1;for(let e=0;ethis.weapons.length;){const t=new ct(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),this.weapons.push(t)}for(;t1||this.weapons[0].GetCount()>1}SetAmmo(t){(t!=t||t<1)&&(t=1),t=Math.floor(1e-6+t),this.ammo=t,this.CalculateStats()}SetHavePropeller(t){this.has_propeller&&!t&&this.action_sel==L.MECHANICAL&&(this.has_propeller=t,this.SetAction(L.STANDARD)),this.has_propeller=t}SetCanWing(t){for(const e of this.weapons)e.SetCanWing(t)}GetAction(){return this.action_sel}GetCanAction(){return[!0,this.has_propeller&&this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].hits>0&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].rapid]}SetAction(t){if(this.final_weapon.can_action){this.action_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.action_sel=L.STANDARD;this.CalculateStats()}GetCanProjectile(){return[!0,this.final_weapon.can_projectile&&this.action_sel!=L.MECHANICAL&&this.action_sel!=L.GAST&&this.weapon_list[this.weapon_type].hits>0,this.final_weapon.can_projectile&&this.action_sel!=L.ROTARY&&this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL]}GetProjectile(){return this.projectile_sel}SetProjectile(t){if(this.final_weapon.can_projectile){this.projectile_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.projectile_sel=q.BULLETS;this.CalculateStats()}GetFinalWeapon(){return this.final_weapon}SetStickyGuns(t){this.sticky_guns=t}GetHRCharges(){if(this.IsLightningArc())return[3];let t=0;for(const e of this.weapons)t+=e.GetCount();if(this.final_weapon.hits>0){let e=this.weapon_list[this.weapon_type].stats.cost;return this.action_sel==L.ROTARY&&(e*=2),this.final_weapon.rapid?[t*e,Math.max(t*e+1,Math.floor(1e-6+1.5*t*e))]:[t*e]}return"Scattergun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(1.875001),Math.floor(3.125001)]:[Math.floor(1.875001)]:"Punt Gun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(3.750001),Math.floor(6.250001)]:[Math.floor(3.750001)]:void 0}GetShots(){return Math.max(1,Math.floor(1e-6+this.final_weapon.ammo*this.ammo))}IsLightningArc(){return"Lightning Arc"==this.final_weapon.name}GetReload(){return this.final_weapon.reload}GetWingWeight(){let t=0;for(const e of this.weapons)e.GetWing()&&(t+=e.PartStats().mass);return t}GetDirectionCount(){let t=0;for(const e of this.directions)e&&t++;return t}SetSeat(t){this.seat=t,this.CalculateStats()}GetSeat(){return this.seat}GetIsFullyAccessible(){for(const t of this.weapons)if(!t.GetAccessible())return!1;return!0}GetIsPartlyAccessible(){for(const t of this.weapons)if(t.GetAccessible())return!0;return!1}SetCalculateStats(t){this.CalculateStats=t;for(const e of this.weapons)e.SetCalculateStats(t)}PartStats(){var t=new u;let e=this.GetDirectionCount(),s=0;for(const i of this.weapons)i.has_cantilever=this.has_cantilever,i.SetTurret(e>2),t=t.Add(i.PartStats()),s+=i.GetCount(),this.fixed||(2==e?t.cost+=1:3==e||4==e?t.cost+=2:5==e?t.cost+=3:6==e&&(t.cost+=4));return(this.projectile_sel==q.HEATRAY||this.IsLightningArc())&&(this.ammo=1),t.mass+=(this.ammo-1)*s,t}GetElectrics(){return{storage:0,equipment:[]}}}const _t=JSON.parse('{"A":[{"name":"Submachine Gun","abrv":"SMG","era":"WWI","cost":1,"mass":1,"drag":0,"damage":1,"hits":4,"ap":0,"ammo":10,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"0/1","reload":2,"size":1,"can_action":true,"can_projectile":true,"deflection":0,"warning":"SMG Warning"},{"name":"Scattergun","abrv":"SG","era":"Pioneer","cost":2,"mass":2,"drag":2,"damage":0.5,"hits":0,"ap":0,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Scattergun Warning","size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Machine Gun","abrv":"LMG","era":"WWI","cost":2,"mass":2,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"1/2","reload":2,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Machine Gun","abrv":"MG","era":"WWI","cost":2,"mass":3,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":10,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"1/2","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Balloon Gun","abrv":"BMG","era":"WWI","cost":3,"mass":3,"drag":1,"damage":2,"hits":4,"ap":0,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":-2},{"name":"Enhanced Machine Gun","abrv":"EMG","era":"Coming Storm","cost":3,"mass":2,"drag":1,"damage":2,"hits":5,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"0/0","reload":0,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Enhanced Heavy Machine Gun","abrv":"EHMG","era":"Coming Storm","cost":5,"mass":3,"drag":2,"damage":4,"hits":5,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Punt Gun","abrv":"PG","era":"Pioneer","cost":4,"mass":4,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Punt Gun Warning","size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Repeating Cannon","abrv":"LRC","era":"WWI","cost":4,"mass":4,"drag":3,"damage":8,"hits":3,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"2/5","reload":2,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Heavy Cannon","abrv":"HC","era":"WWI","cost":6,"mass":5,"drag":2,"damage":16,"hits":1,"ap":2,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Light Machine Cannon","abrv":"LMC","era":"Coming Storm","cost":8,"mass":4,"drag":3,"damage":8,"hits":4,"ap":4,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Machine Cannon","abrv":"HMC","era":"WWII","cost":12,"mass":5,"drag":4,"damage":12,"hits":3,"ap":4,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Fliergerflammenwerfer","abrv":"FFW","era":"WWI","cost":5,"mass":1,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0/0","reload":0,"warning":"Fliergerflammenwerfer Warning","size":8,"can_action":false,"can_projectile":false,"deflection":0},{"name":"Recoilless Cannon","abrv":"RC","era":"WWI","cost":5,"mass":8,"drag":3,"damage":30,"hits":1,"ap":3,"ammo":3,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":-5},{"name":"Autocannon","abrv":"AC","era":"WWII","cost":15,"mass":8,"drag":5,"damage":24,"hits":2,"ap":5,"ammo":2,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Battle Cannon","abrv":"BC","era":"WWII","cost":15,"mass":40,"drag":8,"damage":24,"hits":2,"ap":5,"ammo":1,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Precision Rifle","abrv":"PR","era":"WWI","mass":1,"drag":1,"cost":2,"damage":5,"hits":10,"ap":2,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":2,"can_action":false,"can_projectile":false,"warning":"Precision Rifle Warning","deflection":0},{"name":"Lightning Arc","abrv":"LA","era":"Himmilgard","cost":8,"mass":5,"drag":3,"damage":0,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0","reload":0,"size":16,"can_action":false,"can_projectile":false,"warning":"Lightning Arc Warning","deflection":0},{"name":"Harpoon Launcher","abrv":"HL","era":"Himmilgard","cost":3,"mass":3,"drag":2,"damage":4,"hits":1,"ap":1,"ammo":2,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":0,"reload":1,"size":4,"can_action":false,"can_projectile":false,"warning":"Harpoon Launcher Warning","deflection":0},{"name":"Heavy Machine Gun","abrv":"HMG","era":"WWI","cost":4,"mass":4,"drag":2,"damage":4,"hits":4,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Repeating Cannon","abrv":"HRC","era":"WWI","cost":10,"mass":6,"drag":4,"damage":16,"hits":2,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"4/6","reload":2,"size":16,"can_action":true,"can_projectile":true,"deflection":-3}]}');class pt extends D{constructor(){super(),this.direction_list=["Forward","Rearward","Up","Down","Left","Right"],this.synchronization_list=["None","Interruptor Gear","Synchronization Gear","Spinner Gun","Deflector Plate","No Interference"],this.action_list=[{name:"Standard Action"},{name:"Mechanical Action"},{name:"Gast Principle"},{name:"Rotary_Gun"}],this.projectile_list=[{name:"Standard"},{name:"Heat Ray"},{name:"Pneumatic"}],this.weapon_list=[];for(const t of _t.A){const e={name:t.name,abrv:t.abrv,era:t.era,size:t.size,stats:new u(t),damage:t.damage,hits:t.hits,ammo:t.ammo,ap:t.ap,jam:t.jam.toString(),reload:t.reload,rapid:t.rapid,synched:t.synched,shells:t.shells,can_action:t.can_action,can_projectile:t.can_projectile,deflection:t.deflection};this.weapon_list.push(e)}const t=(t,e)=>{const s=(t,e)=>tt(this.weapon_list[e],this.weapon_list[s])));const e=[];for(let t=0;te==t)));this.wl_permute=e,this.weapon_list=this.weapon_list.sort(t),this.weapon_sets=[],this.brace_count=0,this.isheli=!1}toJSON(){const t=[];for(const e of this.weapon_sets)t.push(e.toJSON());return{weapon_systems:t,brace_count:this.brace_count}}fromJSON(t,e){this.weapon_sets=[];const s=t.weapon_systems;for(const t of s){const s=new ut(this.weapon_list,this.wl_permute);s.SetCalculateStats(this.CalculateStats),s.fromJSON(t,e),this.weapon_sets.push(s)}e>10.35&&(this.brace_count=t.brace_count)}serialize(t){t.PushNum(this.weapon_sets.length);for(const e of this.weapon_sets)e.serialize(t);t.PushNum(this.brace_count)}deserialize(t){this.weapon_sets=[];const e=t.GetNum();for(let s=0;s10.35&&(this.brace_count=t.GetNum())}GetWeaponList(){return this.weapon_list}GetDirectionList(){return this.direction_list}GetSynchronizationList(){return this.synchronization_list}SetWeaponSetCount(t){for((t!=t||t<1)&&(t=0),t=Math.floor(1e-6+t);t>this.weapon_sets.length;){const t=new ut(this.weapon_list,this.wl_permute);t.SetCalculateStats(this.CalculateStats),this.weapon_sets.push(t)}for(;t=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER)return void e[t].SetSynchronization(F.INTERRUPT)}}RemoveOneArtyTractorSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(F.NO_INTERFERENCE)}}RemoveOnePusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER)return void e[t].SetSynchronization(F.INTERRUPT)}}RemoveOneArtyPusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==F.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(F.NO_INTERFERENCE)}}CanTractorSpinner(){return this.CountTractorSpinner()+this.CountArtyTractorSpinner()this.tractor_arty_spinner_count;)this.RemoveOneArtyTractorSpinner();for(;this.CountTractorSpinner()>this.tractor_spinner_count;)this.RemoveOneTractorSpinner();for(;this.CountArtyPusherSpinner()>this.pusher_arty_spinner_count;)this.RemoveOneArtyPusherSpinner();for(;this.CountPusherSpinner()>this.pusher_spinner_count;)this.RemoveOnePusherSpinner();var e=0,s=0;0==this.cant_type?(e=4,s=2):1==this.cant_type?(e=8,s=4):(e=16,s=8);const i=[];for(const t of this.weapon_sets)for(const e of t.GetWeapons()){e.wing_reinforcement=!1;const s={total:0,count:0,sz:0,w:e};e.GetWing()&&(s.count=e.GetCount(),s.sz=this.weapon_list[t.GetWeaponSelected()].size,s.total=s.count*s.sz,i.push(s))}i.sort((function(t,e){return t.total-e.total}));for(const t of i)e>=0&&(s0,t=t.Add(e.PartStats());return t.cost+=this.brace_count/3,this.brace_count>0&&t.warnings.push({source:h("Weapons Braces"),warning:h("Weapons Braces Warning"),color:c.WHITE}),t.control-=Math.floor(1e-6+this.GetWingWeight()/5),t}GetElectrics(){const t={storage:0,equipment:[]};for(let e=0;e11.55&&(this.blade_idx=t.blade_idx),e<12.45&&(this.rotor_span=0),this.rotor_thickness=e<12.55?0:t.rotor_thickness,this.dryMP=-1}serialize(t){t.PushNum(this.type),t.PushNum(this.rotor_count),t.PushNum(this.rotor_span),t.PushNum(this.cant_idx),t.PushNum(this.stagger_sel),t.PushBool(this.accessory),t.PushNum(this.blade_idx),t.PushNum(this.rotor_thickness)}deserialise(t){this.type=t.GetNum(),this.rotor_count=t.GetNum(),this.rotor_span=t.GetNum(),this.cant_idx=t.GetNum(),t.version<12.35?(t.GetBool(),this.stagger_sel=0):this.stagger_sel=t.GetNum(),this.accessory=t.GetBool(),t.version>11.55&&(this.blade_idx=t.GetNum()),t.version<12.45&&(this.rotor_span=0),t.version<12.55?this.rotor_thickness=0:this.rotor_thickness=t.GetNum(),this.dryMP=-1}SetCantileverList(t){this.cant_list=t}GetCantileverList(){return this.cant_list}SetCantilever(t){this.cant_idx=t,this.CalculateStats()}GetCantilever(){return this.cant_idx}SetRotorThickness(t){t<0&&(t=0),this.rotor_thickness=Math.floor(1e-6+t),this.CalculateStats()}GetRotorThickness(){return this.rotor_thickness}SetType(t){this.type!=t&&(this.accessory=!1,this.cant_idx=0,this.stagger_sel=0,this.rotor_count=1,this.type=t,this.rotor_span=0)}CanRotorCount(){return this.type==k.HELICOPTER}SetRotorCount(t){t<1&&(t=1),t>=2&&t%2==1&&(t==this.rotor_count+1?t+=1:t-=1),this.rotor_count=t,this.rotor_count<2&&(this.stagger_sel=0),this.CalculateStats()}GetRotorCount(){return this.rotor_count}CanRotorSpan(){return this.type==k.HELICOPTER}SetRotorSpan(t){this.rotor_span=Math.floor(1e-6+t),this.CalculateStats()}GetRotorSpan(){return this.rotor_span}CanTandem(){return this.type==k.HELICOPTER&&this.rotor_count>1}SetBladeCount(t){this.blade_idx=t,this.CalculateStats()}SetWingArea(t){this.wing_area=t}GetSizingSpan(){return this.sizing_span}SetMP(t){t!=this.dryMP&&(this.dryMP=t,this.CalculateStats())}GetRotorStrain(){const t=this.GetRotorArea();return this.rotor_count*Math.max(1,2*(this.sizing_span+this.rotor_span)+t-10)}GetRotorArea(){return Math.PI/9*(this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span)}GetIdealRotorArea(){return Math.PI/9*this.sizing_span*this.sizing_span}GetRotorDrag(){if(this.type==k.HELICOPTER||this.type==k.AUTOGYRO){const t=this.GetRotorArea();return 1==this.rotor_count?Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))):Math.floor(1e-6+.75*this.rotor_count*Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))))}return 0}GetType(){return this.type}GetAccessory(){return this.accessory}SetAccessory(t){this.accessory=t,this.CalculateStats()}SetEngineCount(t){this.engine_count=t}GetTailRotor(){return this.type==k.HELICOPTER&&this.rotor_count<2}GetBladeList(){return this.blade_list}GetRotorBleed(){return this.type==k.HELICOPTER?this.blade_list[this.blade_idx].rotor_bleed:0}GetPowerFactor(){return this.stagger_list[this.stagger_sel].powerfactor}GetBladeCountIdx(){return this.blade_idx}GetStaggerList(){return this.stagger_list}GetStagger(){return this.stagger_sel}SetStagger(t){t!=this.stagger_sel&&(this.stagger_sel=t,this.CalculateStats())}CanStagger(){const t=[];for(let e=0;e=2&&3==this.stagger_list[e].count?t.push(!0):t.push(!1);return t}VerifySizes(){this.type==k.AIRPLANE?(this.rotor_count=0,this.rotor_span=0,this.stagger_sel=0):this.type==k.AUTOGYRO?(this.rotor_count=1,this.sizing_span=Math.ceil(-1e-6+Math.sqrt(.6*this.wing_area/(Math.PI/8))),this.rotor_span=Math.max(this.rotor_span,2-this.sizing_span),this.stagger_sel=0):this.type==k.HELICOPTER&&(this.rotor_count=Math.max(1,this.rotor_count),this.rotor_count>1&&this.rotor_count%2==1&&(this.rotor_count=this.rotor_count-1),-1!=this.dryMP?(1==this.rotor_count?this.sizing_span=Math.ceil(5*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6):this.sizing_span=Math.ceil(4*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6),this.sizing_span=Math.min(100,this.sizing_span),this.rotor_span=Math.max(this.rotor_span,-Math.floor(1e-6+this.sizing_span/2))):this.sizing_span=10)}VerifyStagger(){if(this.rotor_count>2&&this.stagger_list[this.stagger_sel].count<=2){for(let t=0;t0&&(1==t.GetReload()?e.push(h("Weapon Tag Manual")):e.push(h("Weapon Tag Reload",t.GetReload()))),s.rapid&&e.push(h("Weapon Tag Rapid Fire")),s.shells&&e.push(h("Weapon Tag Shells")),s.ap>0&&e.push(h("Weapon Tag AP",s.ap)),t.GetIsFullyAccessible()?e.push(h("Weapon Tag Fully Accessible")):t.GetIsPartlyAccessible()?e.push(h("Weapon Tag Partly Accessible")):e.push(h("Weapon Tag Inaccessible")),s.deflection&&e.push(h("Weapon Tag Awkward",s.deflection)),e}function bt(t,e,s){var i="";const a=t.GetDirection(),n=[];for(let t=0;t{this.CalculateStats()})),this.cockpits.SetCalculateStats((()=>{this.CalculateStats()})),this.passengers.SetCalculateStats((()=>{this.CalculateStats()})),this.engines.SetCalculateStats((()=>{this.CalculateStats()})),this.propeller.SetCalculateStats((()=>{this.CalculateStats()})),this.frames.SetCalculateStats((()=>{this.CalculateStats()})),this.wings.SetCalculateStats((()=>{this.CalculateStats()})),this.stabilizers.SetCalculateStats((()=>{this.CalculateStats()})),this.controlsurfaces.SetCalculateStats((()=>{this.CalculateStats()})),this.reinforcements.SetCalculateStats((()=>{this.CalculateStats()})),this.fuel.SetCalculateStats((()=>{this.CalculateStats()})),this.munitions.SetCalculateStats((()=>{this.CalculateStats()})),this.cargo.SetCalculateStats((()=>{this.CalculateStats()})),this.gear.SetCalculateStats((()=>{this.CalculateStats()})),this.accessories.SetCalculateStats((()=>{this.CalculateStats()})),this.optimization.SetCalculateStats((()=>{this.CalculateStats()})),this.weapons.SetCalculateStats((()=>{this.CalculateStats()})),this.used.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCalculateStats((()=>{this.CalculateStats()})),this.alter.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCantileverList(this.reinforcements.GetCantileverList()),this.cockpits.SetNumberOfCockpits(1),this.engines.SetNumberOfEngines(1),this.frames.SetTailType(1),this.use_storage=e,this.updated_stats=!1,this.freeze_calculation=!1,this.aircraft_type=k.AIRPLANE,this.Reset()}InteractiveDash(){const t=this.GetStats(),e=this.GetDerivedStats(),s=this.VitalComponentList();for(var i=!1;s.length>10;)s.pop(),i=!0;for(i&&(s.pop(),s.push("And More. See Plane Builder for full list."));s.length<10;)s.push("");const a=this.GetAccessories().GetEffectiveCoverage();var r="";for(let t=0;t0&&(r+=""!=r?", ":h("Armour")+" ",r+=e.toString()+"/+"+(11-a[t]).toString())}const n=[],o=this.GetMunitions().GetBombCount(),l=this.GetMunitions().GetRocketCount();var c=this.GetMunitions().GetInternalBombCount();if((o>0||l>0)&&n.push("Current load here."),o>0){const t=Math.min(o,c),e=Math.max(0,o-t);if(t>0&&n.push(h(" Bomb Mass Internally.",t)),e>0&&n.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.GetMunitions().GetMaxBombSize());n.push(h("Largest Internal Bomb",e.toString()))}c-=t}if(l>0){const t=Math.min(l,c),e=Math.max(0,l-t);t>0&&n.push(h(" Rocket Mass Internally.",t)),e>0&&n.push(h(" Rocket Mass Externally.",e))}for(;n.length<5;)n.push("");let u="";for(const e of t.warnings)u+=e.source+": "+e.warning+"\n";const _={altitude:0,airspeed:0,fuel:e.FuelUses,dropoff:e.Dropoff,visibility:this.GetCockpits().GetCockpit(0).GetVisibility(),energy_loss:e.EnergyLoss,turn_bleed:e.TurnBleed,stability:e.Stabiilty,stress:this.GetCockpits().GetCockpit(0).GetFlightStress()[0],plane_escape:this.GetCockpits().GetCockpit(0).GetEscape(),crash:this.GetCockpits().GetCockpit(0).GetCrash(),max_toughness:e.Toughness,current_toughness:e.Toughness,max_strain:e.MaxStrain,current_strain:e.MaxStrain,g_force:0,kills:0,full_load_boost:e.BoostFullwBombs,full_load_handling:e.HandlingFullwBombs,full_load_climb:e.RateOfClimbwBombs,full_load_stall:e.StallSpeedFullwBombs,full_load_speed:e.MaxSpeedwBombs,half_fuel_bombs_boost:Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),half_fuel_bombs_handling:Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),half_fuel_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),half_fuel_bombs_stall:Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),half_fuel_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),full_fuel_no_bombs_boost:e.BoostFull,full_fuel_no_bombs_handling:e.HandlingFull,full_fuel_no_bombs_climb:e.RateOfClimbFull,full_fuel_no_bombs_stall:e.StallSpeedFull,full_fuel_no_bombs_speed:Math.floor(1e-6+e.MaxSpeedFull),half_fuel_no_bombs_boost:Math.floor((e.BoostFull+e.BoostEmpty)/2),half_fuel_no_bombs_handling:Math.floor((e.HandlingFull+e.HandlingEmpty)/2),half_fuel_no_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),half_fuel_no_bombs_stall:Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),half_fuel_no_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),empty_boost:0,empty_handling:e.HandlingEmpty,empty_climb:0,empty_stall:e.StallSpeedEmpty,empty_speed:0,vital_part_1:s[0],vital_part_2:s[1],vital_part_3:s[2],vital_part_4:s[3],vital_part_5:s[4],vital_part_6:s[5],vital_part_7:s[6],vital_part_8:s[7],vital_part_9:s[8],vital_part_10:s[9],armor:r,max_bomb_load:n[0],ordinance_1:n[1],ordinance_2:n[2],ordinance_3:n[3],ordinance_4:n[4],notes:u,full_load_selected:!0,half_fuel_bombs_selected:!1,full_fuel_no_bombs_selected:!1,half_fuel_no_bombs_selected:!1,empty_selected:!1,engines:this.InteractiveEngines(),weapons:this.InteractiveWeapons()};return JSON.stringify(_)}InteractiveEngines(){const t=[];for(let e=0;e0&&t.starter&&n.push(h("Starter"))}else{s.IsRotary()&&s.IsTractor()?n.push(h("Turns Right")):s.IsRotary()&&s.IsPusher()&&n.push(h("Turns Left"));const t=x().get(s.GetSelectedList()).get_name(a.name);t.upgrades[1]?n.push(h("War Emergency Power")):t.compressor_count>0&&1==t.compressor_type&&n.push(h("War Emergency Power from altitudes 0-9"))}if(i.notes=r.Join(", ",n),s.GetUsePushPull()){const e=i.reliability.split("/");i.reliability=e[0].toString(),t.push(JSON.stringify(i)),i.reliability=e[0].toString(),t.push(JSON.stringify(i))}else t.push(JSON.stringify(i))}return t}InteractiveWeapons(){const t=[];for(const s of this.GetWeapons().GetWeaponSets()){const i=this.GetWeapons().GetWeaponList(),a=s.GetHits(),n=[];"PR"==i[s.GetWeaponSelected()].abrv?(n.push(5),n.push(5),n.push(5),n.push(5)):(n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[0])),n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[1])),n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[2])),n.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[3])));const o=s.GetFinalWeapon(),l=[],c={type:dt(s,i),ammo:s.GetShots(),ap:o.ap,jam:s.GetJam(),knife_hits:a[0],close_hits:a[1],long_hits:a[2],extreme_hits:a[3],knife_damage:n[0],close_damage:n[1],long_damage:n[2],extreme_damage:n[3],tags:""},u=this.GetWeapons().GetDirectionList();s.IsPlural()&&(c.type=s.GetWeaponCount().toString()+"x "+c.type);const _=s.GetDirection();var e="";e+="[";for(let t=0;t11.05?(this.aircraft_type=t.aircraft_type,this.rotor.SetType(t.aircraft_type)):(this.aircraft_type=k.AIRPLANE,this.rotor.SetType(k.AIRPLANE)),this.era.fromJSON(t.era,s),this.cockpits.fromJSON(t.cockpits,s),this.passengers.fromJSON(t.passengers,s),this.engines.fromJSON(t.engines,s),this.propeller.fromJSON(t.propeller,s),this.frames.fromJSON(t.frames,s),this.wings.fromJSON(t.wings,s),this.stabilizers.fromJSON(t.stabilizers,s),this.controlsurfaces.fromJSON(t.controlsurfaces,s),this.reinforcements.fromJSON(t.reinforcements,s),this.fuel.fromJSON(t.fuel,s),this.munitions.fromJSON(t.munitions,s),this.cargo.fromJSON(t.cargo,s),this.gear.fromJSON(t.gear,s),this.accessories.fromJSON(t.accessories,s),this.optimization.fromJSON(t.optimization,s),this.weapons.fromJSON(t.weapons,s),s>10.65&&this.used.fromJSON(t.used,s),s>11.05&&this.rotor.fromJSON(t.rotor,s),s>12.25?this.alter.fromJSON(t.alter,s):this.alter.ClearAll(),this.freeze_calculation=!1,!0}serialize(t){t.PushString(this.version),t.PushString(this.name),this.era.serialize(t),this.cockpits.serialize(t),this.passengers.serialize(t),this.engines.serialize(t),this.propeller.serialize(t),this.frames.serialize(t),this.wings.serialize(t),this.stabilizers.serialize(t),this.controlsurfaces.serialize(t),this.reinforcements.serialize(t),this.fuel.serialize(t),this.munitions.serialize(t),this.cargo.serialize(t),this.gear.serialize(t),this.accessories.serialize(t),this.optimization.serialize(t),this.weapons.serialize(t),this.used.serialize(t),this.rotor.serialize(t),t.PushNum(this.aircraft_type),this.alter.serialize(t)}deserialize(t){this.freeze_calculation=!0,t.version=parseFloat(t.GetString()),this.name=t.GetString(),this.era.deserialize(t),this.cockpits.deserialize(t),this.passengers.deserialize(t),this.engines.deserialize(t),this.propeller.deserialize(t),this.frames.deserialize(t),this.wings.deserialize(t),this.stabilizers.deserialize(t),this.controlsurfaces.deserialize(t),this.reinforcements.deserialize(t),this.fuel.deserialize(t),this.munitions.deserialize(t),this.cargo.deserialize(t),this.gear.deserialize(t),this.accessories.deserialize(t),this.optimization.deserialize(t),this.weapons.deserialize(t),t.version>10.65&&this.used.deserialize(t),t.version>11.05&&t.GetRemaining()>0?(this.rotor.deserialise(t),this.aircraft_type=t.GetNum(),this.rotor.SetType(this.aircraft_type)):(this.aircraft_type=k.AIRPLANE,this.rotor.SetType(k.AIRPLANE)),t.version>12.25?this.alter.deserialize(t):this.alter.ClearAll(),this.freeze_calculation=!1}SetType(t){this.aircraft_type=t,this.rotor.SetType(t),this.CalculateStats()}SetDisplayCallback(t){this.DisplayCallback=t}CalculateStats(){if(this.freeze_calculation)return;this.recurrent_calculation_depth=this.recurrent_calculation_depth+1,this.updated_stats=!1;let t=new u;if(t=t.Add(this.era.PartStats()),t=t.Add(this.cockpits.PartStats()),t=t.Add(this.passengers.PartStats()),this.engines.SetTailMods(this.frames.GetFarmanOrBoom(),this.wings.GetSwept()&&this.stabilizers.GetVOutboard(),this.stabilizers.GetCanard()),this.engines.SetInternal(this.aircraft_type==k.HELICOPTER||H(this.aircraft_type)),this.engines.SetMetalArea(this.wings.GetMetalArea()),this.engines.HaveParasol(this.wings.GetParasol()),t=t.Add(this.engines.PartStats()),this.propeller.SetEngineTypes(this.engines.GetEngineTypes()),this.propeller.SetAcftType(this.aircraft_type),t=t.Add(this.propeller.PartStats()),t=t.Add(this.fuel.PartStats()),t=t.Add(this.munitions.PartStats()),this.weapons.SetNumberOfCockpits(this.cockpits.GetNumberOfCockpits()),this.weapons.SetTractorInfo(this.engines.GetTractorSpinner()),this.weapons.SetPusherInfo(this.engines.GetPusherSpinner()),this.weapons.cant_type=this.reinforcements.GetCantileverType(),this.weapons.SetHavePropeller(this.engines.GetNumPropellers()>0),this.weapons.SetCanWing(!H(this.aircraft_type)),t=t.Add(this.weapons.PartStats()),t=t.Add(this.cargo.PartStats()),this.wings.SetAcftType(this.aircraft_type),this.aircraft_type==k.AUTOGYRO?this.wings.SetRotorSpan(this.rotor.GetRotorSpan()):this.wings.SetRotorSpan(0),t=t.Add(this.wings.PartStats()),this.rotor.SetWingArea(t.wingarea),this.aircraft_type==k.AUTOGYRO&&(this.rotor.SetEngineCount(this.engines.GetNumberOfEngines()),t=t.Add(this.rotor.PartStats())),this.controlsurfaces.SetWingArea(t.wingarea),this.controlsurfaces.SetBoomTail(this.frames.GetUseBoom()),this.controlsurfaces.SetSpan(this.wings.GetSpan()),this.controlsurfaces.SetAcftType(this.aircraft_type),this.controlsurfaces.SetCanElevator(this.stabilizers.GetHStabCount()>0),this.controlsurfaces.SetCanRudder(this.stabilizers.GetVStabCount()>0),this.controlsurfaces.SetIsVTail(this.stabilizers.GetIsVTail()),this.aircraft_type==k.AIRPLANE?this.controlsurfaces.SetNumCantilever(this.reinforcements.GetTotalCantilevers()):this.controlsurfaces.SetNumCantilever(0),t=t.Add(this.controlsurfaces.PartStats()),this.reinforcements.SetMonoplane(this.wings.GetMonoplane()),this.reinforcements.SetTandem(this.wings.GetTandem()),this.reinforcements.SetStaggered(this.wings.GetStaggered()),this.reinforcements.SetCanUseExternal(this.wings.GetArea()>0),this.reinforcements.SetSesquiplane(this.wings.GetIsSesquiplane()),this.reinforcements.SetAircraftType(this.aircraft_type),this.reinforcements.SetCantLift(this.era.GetCantLift()),t=t.Add(this.reinforcements.PartStats()),this.rotor.GetTailRotor()&&(t.power=Math.floor(1e-6+.9*t.power)),this.accessories.SetAcftRadiator(this.engines.GetNumberOfRadiators()>0),this.accessories.SetSkinArmor(this.frames.GetArmor()),this.accessories.SetCanCutouts(this.wings.CanCutout(),this.frames.CanCutout()),t=t.Add(this.accessories.PartStats()),this.frames.SetRequiredSections(t.reqsections),this.frames.SetHasTractorNacelles(this.engines.GetHasTractorNacelles()),this.frames.SetIsTandem(this.wings.GetTandem()),t=t.Add(this.frames.PartStats()),this.stabilizers.SetEngineCount(this.engines.GetNumberOfEngines()),this.stabilizers.SetIsTandem(this.wings.GetTandem()),this.stabilizers.SetIsSwept(this.wings.GetSwept()),this.stabilizers.SetHaveTail(!this.frames.GetIsTailless()),this.stabilizers.SetHelicopter(!1),this.stabilizers.SetLiftingArea(t.wingarea),this.stabilizers.wing_drag=this.wings.GetWingDrag()+this.rotor.GetRotorDrag(),t=t.Add(this.stabilizers.PartStats()),this.wings.SetAircraftMass(t.mass),t.mass+=this.wings.GetPaperMass(),t.mass=Math.max(1,t.mass),this.gear.SetGull(this.wings.HasInvertedGull()),this.gear.SetLoadedMass(t.mass+t.wetmass),this.gear.CanBoat(this.engines.GetEngineHeight(),this.wings.GetWingHeight()),t=t.Add(this.gear.PartStats()),t.toughness+=Math.floor(1e-6+t.structure/5),this.optimization.SetAcftStats(t),t=t.Add(this.optimization.PartStats()),this.cockpits.SetHasRotary(this.engines.HasTractorRotary()),t=t.Add(this.alter.PartStats()),t.Round(),!this.updated_stats){this.updated_stats=!0,this.stats=t;const e=this.GetDerivedStats();this.stats.cost+=this.controlsurfaces.GetFlapCost(e.DryMP),t.reliability-=this.used.burnt_out,this.weapons.SetStickyGuns(this.used.sticky_guns),this.cockpits.SetArmed(this.weapons.GetArmedSeats()),this.cockpits.UpdateCrewStats(this.stats.escape,e.ControlStress,e.RumbleStress,this.stats.visibility,this.stats.crashsafety);let s=0;for(const t of this.cockpits.GetStressList())s=Math.max(s,t[0]-t[1]);0!=s&&-1==this.stats.warnings.findIndex((t=>t.source==h("Co-Pilot Controls")))&&this.stats.warnings.push({source:h("Co-Pilot Controls"),warning:h("Co-Pilot Warning",s),color:c.WHITE}),H(this.aircraft_type)&&(t.upkeep+=1),this.aircraft_type==k.ORNITHOPTER_BUZZER&&(t.reliability-=2),this.engines.UpdateReliability(t),this.reinforcements.SetAcftStructure(t.structure),this.fuel.SetArea(this.wings.GetArea()),this.fuel.SetCantilever(this.reinforcements.GetIsCantilever()),this.accessories.SetVitalParts(this.VitalComponentList().length),this.munitions.SetAcftParameters(t.structure,this.era.GetMaxBomb(),this.wings.HasInvertedGull()),this.stats.cost=Math.max(1,this.stats.cost),this.stats.liftbleed=Math.max(1,this.stats.liftbleed),10*this.engines.GetRumble()>t.structure&&(this.stats.power=0,this.stats.warnings.push({source:h("Stat Rumble"),warning:h("Rumble Warning"),color:c.RED})),this.use_storage&&window.localStorage.setItem("test.aircraft",JSON.stringify(this))}this.recurrent_calculation_depth=this.recurrent_calculation_depth-1,this.DisplayCallback&&!this.freeze_calculation&&0==this.recurrent_calculation_depth&&this.DisplayCallback()}GetDerivedStats(){let t=Math.floor(1e-6+this.stats.mass/5);t=Math.max(t,1);let e=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass)/5);e=Math.max(e,1);let s=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass+this.stats.bomb_mass)/5);s=Math.max(s,1);let i=Math.floor(1e-6+(this.stats.drag+t)/5);i=Math.max(i,1);const a=i;let r=Math.floor(1e-6+(this.stats.drag+this.munitions.GetExternalMass()+t)/5);r=Math.max(r,1);let n=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*i))),o=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*a))),l=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*r)));this.stats.mass<15&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Mass")))&&this.stats.warnings.push({source:h("Stat Mass"),warning:h("Low Mass Warning"),color:c.YELLOW}),this.stats.drag+t<35&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Drag")))&&this.stats.warnings.push({source:h("Stat Drag"),warning:h("Low Drag Warning"),color:c.YELLOW});let u=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*t/Math.max(1,this.stats.wingarea))),_=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*e/Math.max(1,this.stats.wingarea))),p=Math.max(Math.floor(1e-6+this.stats.liftbleed*s/Math.max(1,this.stats.wingarea)));var m=this.engines.GetOverspeed();const g=Math.floor(1e-6+this.stats.power/t),f=Math.floor(1e-6+this.stats.power/e),d=Math.floor(1e-6+this.stats.power/s);0==d&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Boost")))&&this.stats.warnings.push({source:h("Derived Boost"),warning:h("Boost Warning"),color:c.RED});const y=Math.floor(1e-6+this.stats.pitchboost*n);n=Math.floor(1e-6+n*(1-.1*this.used.ragged)),o=Math.floor(1e-6+o*(1-.1*this.used.ragged)),l=Math.floor(1e-6+l*(1-.1*this.used.ragged));let b=this.stats.pitchstab+this.stats.latstab;this.stats.pitchstab>0&&this.stats.latstab>0?b+=2:this.stats.pitchstab<0&&this.stats.latstab<0&&(b-=2);let S=100+this.stats.control-t;b>10||b<-10?(S=-1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Stability")))&&this.stats.warnings.push({source:h("Derived Stability"),warning:h("Stability Warning"),color:c.RED})):10==b?S-=4:b>6?S-=3:b>3?S-=2:b>0?S-=1:0==b?S+=0:b>-4?S+=1:b>-7?S+=2:b>-10?S+=3:-10==b&&(S+=4);let w=S+t-e,C=S+t-s;S=Math.floor(1e-6+S-5*this.used.sluggish),w=Math.floor(1e-6+w-5*this.used.sluggish),C=Math.floor(1e-6+C-5*this.used.sluggish);let P=Math.min(this.stats.maxstrain-t,this.stats.structure);this.optimization.final_ms=Math.floor(1e-6+1.5*this.optimization.GetMaxStrain()*P/10),P+=this.optimization.final_ms,P=Math.floor(1e-6+P*(1-.2*this.used.fragile)),P<10&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Max Strain")))&&this.stats.warnings.push({source:h("Stat Max Strain"),warning:h("Max Strain Warning"),color:c.RED});let G=this.stats.toughness;G=Math.floor(1e-6+G*(1-.5*this.used.weak));const M=this.stats.structure;let R=Math.ceil(i/this.propeller.GetEnergy()-1e-6),v=R+1;R=Math.min(R,10),v=Math.min(v,10);let A=Math.ceil(Math.floor(1e-6+(u+_)/2)/this.propeller.GetTurn()-1e-6);this.aircraft_type==k.HELICOPTER&&(A=Math.max(1,Math.floor(1e-6+t/2))+this.rotor.GetRotorBleed(),R=Math.max(1,Math.floor(1e-6+i/7)),u=0,_=0,p=0,n=Math.min(37,n),o=Math.min(37,o),l=Math.min(37,l)),A=Math.max(A,1);let I=A+1;I=Math.max(I,1),u=Math.max(1,Math.floor(1e-6+u*(1+.2*this.used.hefty))),_=Math.max(1,Math.floor(1e-6+_*(1+.2*this.used.hefty))),p=Math.max(1,Math.floor(1e-6+p*(1+.2*this.used.hefty))),(l<=p||o<=_)&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stall Speed")))&&this.stats.warnings.push({source:h("Stall Speed"),warning:h("Stall Speed Warning"),color:c.RED});let E=Math.floor(1e-6+this.stats.fuel/this.stats.fuelconsumption);E=Math.floor(1e-6+E*(1-.2*this.used.leaky)),isFinite(E)||(E=0),E<6&&0!=this.stats.fuelconsumption&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Fuel Uses")))&&this.stats.warnings.push({source:h("Derived Fuel Uses"),warning:h("Fuel Uses Warning"),color:c.YELLOW});let N=1;(b>3||b<-3)&&N++;let T=0;N+=Math.min(this.accessories.GetMaxMassStress(),Math.floor(1e-6+t/10));const x=this.accessories.GetMaxTotalStress();N=Math.min(x,N),this.engines.GetMaxRumble()>0&&(T+=Math.max(1,.5*this.engines.GetRumble()),T=Math.floor(1e-6+T),T=Math.min(3,T)),0==x&&(T=0);let W=Math.max(1,Math.floor(1e-6+this.stats.power/t*(23/this.stats.pitchspeed)/i)),O=Math.max(1,Math.floor(1e-6+this.stats.power/e*(23/this.stats.pitchspeed)/a)),F=Math.max(1,Math.floor(1e-6+this.stats.power/s*(23/this.stats.pitchspeed)/r));return isFinite(W)||(W=0,O=0,F=0),H(this.aircraft_type)&&(S+=5,w+=5,C+=5,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Stall")))&&this.stats.warnings.push({source:h("Ornithopter Stall"),warning:h("Ornithopter Stall Warning"),color:c.WHITE}),m=P),this.aircraft_type==k.ORNITHOPTER_FLUTTER&&(S+=5,w+=5,C+=5,m=1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Flutterer Attack")))&&this.stats.warnings.push({source:h("Ornithopter Flutterer Attack"),warning:h("Ornithopter Flutterer Attack Warning"),color:c.WHITE})),this.aircraft_type==k.ORNITHOPTER_BUZZER&&(-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Boost")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Boost"),warning:h("Ornithopter Buzzer Boost Warning"),color:c.WHITE}),-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Stall")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Stall"),warning:h("Ornithopter Buzzer Stall Warning"),color:c.WHITE})),{DryMP:t,WetMP:e,WetMPwBombs:s,DPEmpty:i,DPFull:a,DPwBombs:r,MaxSpeedEmpty:n,MaxSpeedFull:o,MaxSpeedwBombs:l,StallSpeedEmpty:u,StallSpeedFull:_,StallSpeedFullwBombs:p,Overspeed:m,BoostEmpty:g,BoostFull:f,BoostFullwBombs:d,Dropoff:y,Stabiilty:b,HandlingEmpty:S,HandlingFull:w,HandlingFullwBombs:C,MaxStrain:P,Toughness:G,Structure:M,EnergyLoss:R,EnergyLosswBombs:v,TurnBleed:A,TurnBleedwBombs:I,FuelUses:E,ControlStress:N,RumbleStress:T,RateOfClimbFull:O,RateOfClimbEmpty:W,RateOfClimbwBombs:F}}VitalComponentList(){const t=this.GetDerivedStats(),e=[];e.push(h("Vital Part Controls"));for(let t=0;t0&&e.push(h("Vital Part Fuel Tanks"));for(let t=0;t{let s=parseInt(t.charge);"-"==t.charge&&(s=0);let i=parseInt(e.charge);return"-"==e.charge&&(i=0),isNaN(s)&&isNaN(i)?0:isNaN(s)?-1:isNaN(i)?1:i-s})),t=z(this.engines.GetElectrics(),t),t=z(t,this.weapons.GetElectrics());let e=!1;for(const s of t.equipment){const t=parseInt(s.charge);!isNaN(t)&&t>0&&(s.charge="+"+s.charge,e=!0)}return t.equipment.length>0&&t.storage<=0&&!e&&-1==this.stats.warnings.findIndex((t=>t.source==h("Insufficient Charge")))&&this.stats.warnings.push({source:h("Insufficient Charge"),warning:h("Insufficient Charge Warning"),color:c.RED}),t}}function wt(t,e,s){const i=new Blob([t],{type:s}),a=document.createElement("a"),r=URL.createObjectURL(i);a.href=r,a.download=e,document.body.appendChild(a),a.click(),setTimeout((function(){document.body.removeChild(a),window.URL.revokeObjectURL(r)}),0)}function Ct(t,e){const s=document.createElement("TH");return s.innerHTML=e,t.appendChild(s),s}function Pt(t,e,s){const i=document.createElement("LABEL");i.style.marginLeft="0.25em",i.style.marginRight="0.5em",i.textContent=t,i.classList.add("flex-item"),s.div1.appendChild(i);const a=document.createElement("LABEL");return a.style.marginLeft="0.25em",a.style.marginRight="0.5em",a.textContent=e,a.classList.add("flex-item"),s.div2.appendChild(a),[i,a]}function Gt(t){const e=document.createElement("TR");return t.append(e),e}function Mt(t){t.classList.toggle("changed_b",!1),t.classList.toggle("changed_g",!1),t.classList.toggle("changed_n",!1),t.offsetHeight,t.classList.toggle("changed_n")}function Rt(t){const e=new Uint8Array(t.length);for(let s=0;s0;)this.version_cell.removeChild(this.version_cell.children[0]);this.version_cell.className="tooltip";const i=document.createElement("DIV");i.className="tooltiptext";let a=document.createElement("P");a.textContent=h("Derived Problematic Parts"),i.appendChild(a);const n=p(t.GetEra().GetSelectedText());var o=0;for(let t of e.era){const e=p(t.era);if(e>n){o+=e-n;let s=document.createElement("P");s.textContent=t.name+": "+t.era,i.appendChild(s)}}if(0==o){let t=document.createElement("P");t.textContent=h("None"),i.appendChild(t)}const l=document.createElement("P");for(l.textContent=h(t.GetEra().GetSelectedText()),l.className=0==o?"green":o>2?"red":"yellow",this.version_cell.appendChild(l),this.version_cell.appendChild(i),this.cost_cell.textContent=e.cost.toString()+"þ ",t.GetUsed().IsDefault()||(this.cost_cell.textContent+=" ("+Math.floor(1e-6+e.cost/2).toString()+"þ "+h("Price Word Used")+")"),this.upkeep_cell.textContent=e.upkeep.toString()+"þ",this.ts_empty.textContent=(0).toString(),this.ss_empty.textContent=s.StallSpeedEmpty.toString(),this.hand_empty.textContent=s.HandlingEmpty.toString(),this.boost_empty.textContent=(0).toString(),this.roc_empty.textContent=(0).toString(),this.ts_half.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedFull)/2).toString(),this.ss_half.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFull)/2).toString(),this.hand_half.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFull)/2).toString(),this.boost_half.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFull)/2).toString(),this.roc_half.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbFull)/2).toString(),this.ts_full.textContent=Math.floor(1e-6+s.MaxSpeedFull).toString(),this.ss_full.textContent=s.StallSpeedFull.toString(),this.hand_full.textContent=s.HandlingFull.toString(),this.boost_full.textContent=s.BoostFull.toString(),this.roc_full.textContent=s.RateOfClimbFull.toString(),e.bomb_mass>0||this.show_bombs?(this.bomb_row1.hidden=!1,this.bomb_row2.hidden=!1,this.bomb_row2.appendChild(this.vital_components),this.vital_components.rowSpan=5,this.ts_halfwB.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedwBombs)/2).toString(),this.ss_halfwB.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFullwBombs)/2).toString(),this.hand_halfwB.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFullwBombs)/2).toString(),this.boost_halfwB.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFullwBombs)/2).toString(),this.roc_halfwB.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbwBombs)/2).toString(),this.ts_fullwB.textContent=Math.floor(1e-6+s.MaxSpeedwBombs).toString(),this.ss_fullwB.textContent=s.StallSpeedFullwBombs.toString(),this.hand_fullwB.textContent=s.HandlingFullwBombs.toString(),this.boost_fullwB.textContent=s.BoostFullwBombs.toString(),this.roc_fullwB.textContent=s.RateOfClimbwBombs.toString(),this.turnbleed_label.textContent=h("Derived Turn Bleed wB"),this.turnbleed_cell.textContent=r.Format("{0} ({1})",s.TurnBleed,s.TurnBleedwBombs)):(this.bomb_row1.hidden=!0,this.bomb_row2.hidden=!0,this.full_row.appendChild(this.vital_components),this.vital_components.rowSpan=3,this.turnbleed_label.textContent=h("Derived Turn Bleed"),this.turnbleed_cell.textContent=r.Format("{0}",s.TurnBleed)),this.dropoff_cell.textContent=s.Dropoff.toString(),this.overspeed_cell.textContent=s.Overspeed.toString(),this.maxfuel_cell.textContent=(Math.floor(1e-6+10*s.FuelUses)/10).toString(),t.GetIsFlammable()?this.flammable_cell.textContent=h("Yes"):this.flammable_cell.textContent=h("No"),this.stability_cell.textContent=s.Stabiilty.toString(),this.eloss_cell.textContent=s.EnergyLoss.toString(),this.landing_cell.textContent=t.GetGearName(),this.maxalt_cell.textContent=t.GetMinAltitude().toString()+"-"+t.GetMaxAltitude().toString(),this.reliability_cell.textContent=r.Join(", ",t.GetReliabilityList()),this.toughness_cell.textContent=s.Toughness.toString(),this.mxstrain_cell.textContent=s.MaxStrain.toString(),this.escape_cell.textContent=r.Join(", ",t.GetEscapeList()),this.crashsafety_cell.textContent=e.crashsafety.toString(),this.crew_cell.textContent=t.GetCockpits().GetNumberOfCockpits().toString()+"/"+(t.GetPassengers().GetSeats()+t.GetPassengers().GetBeds()).toString(),this.flightstress_cell.textContent=g(t.GetStressList()),this.visibility_cell.textContent=r.Join(", ",t.GetVisibilityList()),this.attack_cell.textContent=r.Join(", ",t.GetAttackList()),this.communications_cell.textContent=t.GetCommunicationName();this.electric_cell.childElementCount>0;)this.electric_cell.removeChild(this.electric_cell.firstChild);const u=t.GetElectrics(),_=function(t){const e={div0:document.createElement("DIV"),div1:document.createElement("DIV"),div2:document.createElement("DIV")};return e.div0.classList.add("flex-container-o"),e.div1.classList.add("flex-container-i"),e.div2.classList.add("flex-container-i"),e.div0.appendChild(e.div1),e.div0.appendChild(e.div2),t.appendChild(e.div0),e}(this.electric_cell);u.storage>0&&Pt(h("Derived Battery"),u.storage.toString(),_);for(let t of u.equipment)Pt(t.source,t.charge,_);var m="";const f=t.VitalComponentList();for(let t of f)m+=t+"
";this.vital_components.innerHTML=m;const d=t.GetWeapons().GetWeaponList(),y=t.GetWeapons().GetDirectionList(),b=t.GetMunitions().GetBombCount(),S=t.GetMunitions().GetRocketCount();var w=t.GetMunitions().GetInternalBombCount(),C="";if(b>0){const e=Math.min(b,w),s=Math.max(0,b-e);e>0&&(C+=h(" Bomb Mass Internally.",e)),s>0&&(C+=h(" Bomb Mass Externally.",s)),e>0&&(C+=h("Largest Internal Bomb",Math.min(e,t.GetMunitions().GetMaxBombSize()).toString())),w-=e,C+="
"}if(S>0){const t=Math.min(S,w),e=Math.max(0,S-t);t>0&&(C+=h(" Rocket Mass Internally.",t)),e>0&&(C+=h(" Rocket Mass Externally.",e)),C+="
"}for(let e of t.GetWeapons().GetWeaponSets())C+=bt(e,d,y),C+="
";this.weapon_cell.innerHTML=C,e.warnings.sort(((t,e)=>t.color-e.color));var P="";for(let t of e.warnings){switch(t.color){case c.RED:P+='
';break;case c.YELLOW:P+='
';break;case c.WHITE:default:P+='
'}P+=t.source+": "+t.warning+"
"}this.warning_cell.innerHTML=P;var G="";const M=t.GetWings().GetWingList().length;if(1==M){const e=t.GetWings().GetWingList()[0].deck;e>>8,s[2*t+1]=i%256}return s},decompressFromUint8Array:function(e){if(null==e)return r.decompress(e);var s=new Array(e.length/2);for(let t=0,i=s.length;t>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=n[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++),n[h]=_++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(o,c)){if(c.charCodeAt(0)<256){for(i=0;i>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=n[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++)}for(a=2,i=0;i>=1;for(;;){if(g<<=1,f==e-1){m.push(s(g));break}f++}return m.join("")},decompress:function(t){return null==t?"":""==t?null:r._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,s,i){var a,r,n,o,l,h,c,u=[],_=4,p=4,m=3,g="",f=[],d={val:i(0),position:s,index:1};for(a=0;a<3;a+=1)u[a]=a;for(n=0,l=Math.pow(2,2),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;switch(n){case 0:for(n=0,l=Math.pow(2,8),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;c=t(n);break;case 1:for(n=0,l=Math.pow(2,16),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;c=t(n);break;case 2:return""}for(u[3]=c,r=c,f.push(c);;){if(d.index>e)return"";for(n=0,l=Math.pow(2,m),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;switch(c=n){case 0:for(n=0,l=Math.pow(2,8),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;u[p++]=t(n),c=p-1,_--;break;case 1:for(n=0,l=Math.pow(2,16),h=1;h!=l;)o=d.val&d.position,d.position>>=1,0==d.position&&(d.position=s,d.val=i(d.index++)),n|=(o>0?1:0)*h,h<<=1;u[p++]=t(n),c=p-1,_--;break;case 2:return f.join("")}if(0==_&&(_=Math.pow(2,m),m++),u[c])g=u[c];else{if(c!==p)return null;g=r+r.charAt(0)}f.push(g),u[p++]=r+g.charAt(0),r=g,0==--_&&(_=Math.pow(2,m),m++)}}};return r}();class It{constructor(){this.errorMissingSeparator="Missing separator option.",this.errorEmpty="JSON is empty.",this.errorEmptyHeader="Could not detect header. Ensure first row contains your column headers.",this.errorNotAnArray="Your JSON must be an array or an object.",this.errorItemNotAnObject="Item in array is not an object: {0}"}flattenArray(t,e=[]){function s(t,e){let s=t.slice(0);if(!Array.isArray(e))return s;for(let t=0;te==t));return-1==s&&(e.push(t),s=e.length-1,Jt(e)),s}function Ut(t){var e=new f;t.serialize(e);var s=function(t){let e="";const s=new Uint8Array(t),i=s.byteLength;for(let t=0;te==t.name));return-1==r?(a.names.push(t.name),a.acft.push(i),r=a.names.length-1):a.acft[r]=i,jt(a),r}function jt(t){window.localStorage.setItem("test.hangar."+qt,JSON.stringify(t)),Vt(t)}function Jt(t){window.localStorage.setItem("test.hangar_names",JSON.stringify(t)),Yt(t)}function Vt(t){for(;Ft.lastChild;)Ft.removeChild(Ft.lastChild);for(let e=0;e'+o.innerHTML,r.appendChild(l)}}else{var h=r.insertCell();h.colSpan=2,h.appendChild(kt),kt.value=Nt.name;var c=document.createElement("HR");c.className="dashed",h.appendChild(c),h.appendChild(Ot),h.appendChild(document.createElement("BR")),h.appendChild(Ft)}}}(document.getElementById("table_builder"),document.getElementById("table_hangar"),document.getElementById("table_comp"))}window.addEventListener("DOMContentLoaded",(()=>{var t=new URLSearchParams(location.search).get("lang");t?l.SetCurrentLanguage(t):window.localStorage.language&&l.SetCurrentLanguage(window.localStorage.language),function(t){for(const t of E.l)if(T.has(t.name)||T.set(t.name,new N(t.name)),"Custom"!=t.name){T.get(t.name).fromJSON(t,!0),T.get(t.name).SetConstant();for(let e=0;e{qt=Ot.options[Ot.selectedIndex].text,Vt(Ht())},Yt(Bt()),(Ft=document.createElement("SELECT")).onchange=()=>{Dt(Ft.selectedIndex)},Vt(Ht()),kt=document.createElement("INPUT");var t=document.getElementById("btn_load");t.onclick=()=>{Nt.fromJSON(JSON.parse(JSON.stringify(xt.toJSON()))),Nt.CalculateStats(),Tt.UpdateDisplay(Nt,Nt.GetStats(),Nt.GetDerivedStats()),window.localStorage.setItem("test.aircraft",JSON.stringify(Nt.toJSON())),Zt(),Mt(t.parentElement)};var e=document.getElementById("btn_save");e.onclick=()=>{Nt.name=kt.value,Ut(Nt),Mt(e.parentElement)};var s=document.getElementById("btn_json");s.multiple=!1,s.accept="application/JSON",s.onchange=t=>{!function(t){if(0!=t.files.length){var e=t.files[0],s=new FileReader;s.onloadend=()=>{try{var t=JSON.parse(s.result),e=new St(Lt,!1);e.fromJSON(t)&&Dt(Ut(e))}catch(t){console.error(t,t.stack)}},s.readAsText(e),t.value=""}}(s),Mt(s.parentElement)};var i=document.getElementById("btn_remove");i.onclick=()=>{var t,e,s;t=xt.name,e=Ht(),-1!=(s=e.names.findIndex((e=>e==t)))&&(e.names.splice(s,1),e.acft.splice(s,1)),jt(e),Dt(Math.min(e.names.length-1,s)),Mt(i.parentElement)};var a=document.getElementById("btn_save_h");a.onclick=()=>{wt(JSON.stringify(Ht()),qt+".json","json"),Mt(a.parentElement)};var n=document.getElementById("btn_json_h");n.setAttribute("type","file"),n.multiple=!1,n.accept="application/JSON",n.onchange=t=>{if(0!=n.files.length){Mt(n.parentElement);var e=n.files[0],s=new FileReader;s.onloadend=()=>{try{var t,i=e.name.substr(0,e.name.length-5);if(i=(i=i.trim()).replace(/\s+/g," "),(t=JSON.parse(s.result)).names.length!=t.acft.length)throw"Bad";zt(i),window.localStorage.setItem("test.hangar."+i,s.result),qt=i,Yt(Bt()),Vt(Ht())}catch{(a=n.parentElement).classList.toggle("changed_b",!1),a.classList.toggle("changed_g",!1),a.classList.toggle("changed_n",!1),a.offsetHeight,a.classList.toggle("changed_b")}var a},s.readAsText(e),n.value=""}};var o=document.getElementById("lbl_create_list"),l=document.getElementById("btn_create_list");o.onclick=()=>{var t=l.value;""!=(t=(t=t.trim()).replace(/\s+/g," "))&&(Ot.selectedIndex=zt(t),qt=t,Vt(Ht()),Mt(o.parentElement)),l.value=""};var h=document.getElementById("btn_delete_list");h.onclick=()=>{var t,e,s;t=qt,e=Bt(),-1!=(s=e.findIndex((e=>e==t)))&&(e.splice(s,1),window.localStorage.removeItem("test.hangar."+t)),Jt(e),qt="Default",Yt(Bt()),Vt(Ht()),Dt(0),Mt(h.parentElement)},document.getElementById("btn_to_csv").onclick=()=>{var t=Ht(),e=[],s=JSON.stringify(xt.toJSON());for(let s of t.acft){try{var i=Rt(At.decompressFromEncodedURIComponent(s)),a=new d(i);xt.deserialize(a),xt.CalculateStats()}catch(t){console.log("Compressed Query Parameter Failed."),console.log(t),xt.Reset()}let t=xt.GetStats(),n=xt.GetDerivedStats(),o=Object.entries(n);o.splice(0,0,["name",xt.name]),o.splice(1,0,["cost",t.cost]),o.splice(2,0,["upkeep",t.upkeep]),o.splice(3,0,["bomb_mass",t.bomb_mass]),o.splice(4,0,["escape",r.Join("/",xt.GetEscapeList())]),o.splice(5,0,["crash",r.Join("/",xt.GetCrashList())]),o.splice(6,0,["stress",g(xt.GetStressList())]);let l=Object.fromEntries(o);e.push(l)}xt.fromJSON(JSON.parse(s)),wt((new It).convert(e,{separator:",",flatten:!0,output_csvjson_variant:!1}),qt+".csv","csv")}}(),function(){let t=window.localStorage.getItem("test.aircraft");if(Nt=new St(Lt,!1),t){console.log("Used Saved Data");try{Nt.fromJSON(JSON.parse(t)),Nt.CalculateStats()}catch{console.log("Saved Data Failed."),Nt.Reset()}}(Tt=new vt(document.getElementById("table_builder"))).SetShowBombs(!0),Tt.UpdateDisplay(Nt,Nt.GetStats(),Nt.GetDerivedStats()),xt=new St(Lt,!1),(Wt=new vt(document.getElementById("table_hangar"))).SetShowBombs(!0)}(),Dt(0)}))})(); \ No newline at end of file diff --git a/Test/plane_builder.js b/Test/plane_builder.js index 2489cc3..6bd5e6b 100644 --- a/Test/plane_builder.js +++ b/Test/plane_builder.js @@ -1 +1 @@ -(()=>{"use strict";var t,e,s={},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={exports:{}};return s[t](n,n.exports,a),n.exports}e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,a.t=function(s,i){if(1&i&&(s=this(s)),8&i)return s;if("object"==typeof s&&s){if(4&i&&s.__esModule)return s;if(16&i&&"function"==typeof s.then)return s}var n=Object.create(null);a.r(n);var r={};t=t||[null,e({}),e([]),e(e)];for(var o=2&i&&s;"object"==typeof o&&!~t.indexOf(o);o=e(o))Object.getOwnPropertyNames(o).forEach((t=>r[t]=()=>s[t]));return r.default=()=>s,a.d(n,r),n},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};class n{static IsNullOrWhiteSpace(t){try{return null==t||"undefined"==t||t.toString().replace(/\s/g,"").length<1}catch(t){return console.log(t),!1}}static Join(t,...e){try{const s=e[0];if(Array.isArray(s)||s instanceof Array){let e=n.Empty;for(let i=0;i{e+=i[s]+t})),e=e.slice(0,e.length-t.length),e}const i=e;return n.join(t,...i)}catch(t){return console.log(t),n.Empty}}static Format(t,...e){try{return t.match(n.regexNumber)?n.format(n.regexNumber,t,e):t.match(n.regexObject)?n.format(n.regexObject,t,e,!0):t}catch(t){return console.log(t),n.Empty}}static format(t,e,s,i=!1){return e.replace(t,(function(t,e){const a=t.split(":");let r;return a.length>1&&(e=a[0].replace("{",""),t=a[1].replace("}","")),r=i?s[0][e]:s[e],null==r||null==r||t.match(/{\d+}/)?r:(r=n.parsePattern(t,r),void 0!==r&&null!=r?r:n.Empty)}))}static parsePattern(t,e){switch(t){case"L":return e.toLocaleLowerCase();case"U":return e.toLocaleUpperCase();case"d":if("string"==typeof e)return n.getDisplayDateFromString(e);if(e instanceof Date)return n.Format("{0:00}.{1:00}.{2:0000}",e.getDate(),e.getMonth(),e.getFullYear());break;case"s":if("string"==typeof e)return n.getSortableDateFromString(e);if(e instanceof Date)return n.Format("{0:0000}-{1:00}-{2:00}",e.getFullYear(),e.getMonth(),e.getDate());break;case"n":{"string"!=typeof e&&(e=e.toString());const t=e.replace(/,/g,".");if(isNaN(parseFloat(t))||t.length<=3)break;const s=t.split(/[^0-9]+/g);let i=s;s.length>1&&(i=[n.join("",...s.splice(0,s.length-1)),s[s.length-1]]);const a=i[0],r=a.length%3;let o=r>0?a.substring(0,r):n.Empty;const l=a.substring(r).match(/.{3}/g);return o=o+"."+n.Join(".",l),o+(i.length>1?","+i[1]:"")}case"x":return this.decimalToHexString(e);case"X":return this.decimalToHexString(e,!0)}return"number"!=typeof e&&isNaN(e)||isNaN(+t)||n.IsNullOrWhiteSpace(e)?e:n.formatNumber(e,t)}static decimalToHexString(t,e=!1){const s=parseFloat(t).toString(16);return e?s.toLocaleUpperCase():s}static getDisplayDateFromString(t){const e=t.split("-");if(e.length<=1)return t;let s=e[e.length-1];const i=e[e.length-2],a=e[e.length-3];return s=s.split("T")[0],s=s.split(" ")[0],`${s}.${i}.${a}`}static getSortableDateFromString(t){const e=t.replace(",","").split(".");if(e.length<=1)return t;const s=e[e.length-1].split(" ");let i=n.Empty;s.length>1&&(i=s[s.length-1]);let a=`${e[e.length-1].split(" ")[0]}-${e[e.length-2]}-${e[e.length-3]}`;return!n.IsNullOrWhiteSpace(i)&&i.length>1?a+=`T${i}`:a+="T00:00:00",a}static formatNumber(t,e){const s=e.length,i=t.toString();if(s<=i.length)return i;let a=s-i.length;return a+=1,new Array(a).join("0")+i}static join(t,...e){let s=n.Empty;for(let i=0;i Benefits(-)":"Penalties(+)
Benefits(-)","Used Burnt Out":"Burnt Out","Used Burnt Out Description":"Engines are at -1 Reliability","Used Ragged":"Ragged","Used Ragged Description":"Reduce your Max Speed by 10%","Used Hefty":"Hefty","Used Hefty Description":"Increase your Stall Speeds by 20%","Used Sticky Guns":"Sticky Guns","Used Sticky Guns Description":"Increase the chance of guns jamming by 1","Used Weak":"Weak","Used Weak Description":"Cut the plane\'s Toughness in half","Used Fragile":"Fragile","Used Fragile Description":"Reduce your Max Strain by 20%","Used Leaky":"Leaky","Used Leaky Description":"Reduce your Fuel by 20%","Used Sluggish":"Sluggish","Used Sluggish Description":"Reduce your Handling by 5","Weapons Section Title":"Weapons","Weapons Number of Weapon Sets":"Number of Weapon Sets:","Weapons Number of Weapon Braces":"Number of Weapon Braces:","Weapons Weapon Set":"Weapon Set","Weapons Weapons":"Weapons","Weapons Weapon Stats":"Weapon Stats","Weapons Type":"Weapon Type","Weapons Number of Mounts":"Number of Mounts","Weapons Ammunition":"Ammunition","Weapons Action":"Action","Weapons Projectile":"Projectile","Weapons Belt Fed":"Belt Fed","Weapons Stat Mounting":"Mounting","Weapons Stat Jam":"Jam","Weapons Stat Hits":"Hits","Weapons Stat Damage":"Damage","Weapons Stat Shots":"Shots","Weapons Stat Charges":"Charges per Shot","Weapons Wing Mount":"Wing Mount","Weapons Accessible":"Accessible","Weapons Free Accessible":"Free Accessible","Weapons Covered":"Covered","Weapons # Weapons at Mount":"Weapons at Mount","Weapons Synchronization":"Synchronization","Weapons Mount":"Weapon Mount","Weapons Braces":"Weapon Braces","Weapons Braces Warning":"These mounts give an observer +1 to make a Personal Attack with a loose weapon they are carrying in their hands.","Wings Section Title":"Wings","Wings Wing Stagger":"Wing Stagger:","Wings Closed Wing":"Closed Wing:","Wings Swept Wing":"Swept Wings:","Wings Wing Type":"Wing Type","Wings Wing Options":"Wing Options","Wings Wing Stats":"Wing Stats","Wings Full Wings":"Full Wings","Wings Miniature Wings":"Miniature Wings","Wings Sesquiplane":"Sesquiplane","Wings No Wing":"None","Wings Area":"Area","Wings Span":"Span","Wings Gull":"Gull","Wings Dihedral":"Dihedral","Wings Anhedral":"Anhedral","Aircraft Button Save":"Save","Aircraft Button Load":"Load","Aircraft Button Copy As Link":"Copy As Link","Aircraft Button Save Dashboard":"Save Dashboard","Aircraft Button Interactive Dashboard":"Interactive Dashboard","Aircraft Button Save NPC":"Save NPC","Aircraft Button Save Catalog":"Save Catalog","Aircraft Button Default Aircraft":"Default Aircraft","Aircraft Stats Section Title":"Total Sum of Stats","Aircraft Derived Section Title":"Aircraft Derived Statistics","Seat #":"Seat #{0}","Seats #":"Seats # {0}","Seat Location":"Choose Seat","Radiators #":"Radiators # {0}","Crew Pilot":"Pilot","Crew Bombadier":"Bombardier","Crew Co-Pilot":"Co-Pilot","Crew Gunner":"Gunner","Crew Aircrew":"Aircrew","Diesel":"Diesel Engine","Diesel Warning":"Engine won\'t catch fire.","Cargo Tiny":"A small locker for personal stuff.","Cargo Small":"Will fit a trunk, barrel, or crate.","Cargo Medium":"Will fit a small vehicle like a motorcycle, car, or zeppelin engine.","Cargo Large":"Will fit a scout or fighter aircraft with the wings taken off.","Cargo Huge":"Will fit just about anything you can imagine.","Alter Select Part":"Select Part","Alter Quantity":"Quantity","Alter Part Name":"Part Name","Alter Part Special Rules":"Special Rules","Frame Count":"Frame Count","Frame Count Warning":"This plane appears to have unused frame sections. Check to see if this is intentional.","Altitude Section Title":"Altitude Effects","Altitude Altitude":"Altitude","Rarity":"Rarity","Rarity Custom":"Custom","Rarity Common":"Common","Rarity Rare":"Rare","Rarity Legendary":"Legendary","Boost Warning":"Boost is 0 for some loads. The plane cannot accelerate to take off.","Insufficient Charge":"Insufficient Charge","Insufficient Charge Warning":"This aircraft has electrical systems with nothing to power them.","Low Mass Warning":"This aircraft is very low mass. If it is a custom airplane, be careful not to make it overpowered.","Low Drag Warning":"This aircraft is very low drag. If it is a custom airplane, be careful not to make it overpowered.","Connectivity Warning":"Can move between positions without Wingwalking.","Passenger Connectivity Warning":"Can reach the cockpit without Wingwalking.","Rotor Thickness":"Rotor Thickness"}}');var o=a.t(r,2);const l=new class{constructor(){this.lang="en"}LoadLanguages(t){this.languages=t}GetLanguages(){const t=[];for(const e of this.languages.languages)t.push(e);return t}SetCurrentLanguage(t){this.languages[t]&&(this.lang=t)}e(t){return this.languages[this.lang][t]?this.languages[this.lang][t]:this.languages.en[t]?this.languages.en[t]:(console.error("Failed to find "+t),"!"+t+"!")}};function h(t,...e){return n.Format(l.e(t),...e)}var c;l.LoadLanguages(o),function(t){t[t.WHITE=0]="WHITE",t[t.YELLOW=1]="YELLOW",t[t.RED=2]="RED"}(c||(c={}));class u{constructor(t){this.liftbleed=0,this.wetmass=0,this.mass=0,this.drag=0,this.control=0,this.cost=0,this.reqsections=0,this.visibility=0,this.flightstress=0,this.escape=0,this.pitchstab=0,this.latstab=0,this.cooling=0,this.reliability=0,this.power=0,this.fuelconsumption=0,this.maxstrain=0,this.structure=0,this.pitchspeed=0,this.pitchboost=0,this.wingarea=0,this.toughness=0,this.upkeep=0,this.crashsafety=0,this.bomb_mass=0,this.fuel=0,this.charge=0,this.warnings=[],this.era=[],t&&this.fromJSON(t,0)}toJSON(){return{liftbleed:this.liftbleed,wetmass:this.wetmass,mass:this.mass,drag:this.drag,control:this.control,cost:this.cost,reqsections:this.reqsections,visibility:this.visibility,flightstress:this.flightstress,escape:this.escape,pitchstab:this.pitchstab,latstab:this.latstab,cooling:this.cooling,reliability:this.reliability,power:this.power,fuelconsumption:this.fuelconsumption,maxstrain:this.maxstrain,structure:this.structure,pitchboost:this.pitchboost,pitchspeed:this.pitchspeed,wingarea:this.wingarea,toughness:this.toughness,upkeep:this.upkeep,crashsafety:this.crashsafety,bomb_mass:this.bomb_mass,fuel:this.fuel,charge:this.charge,warnings:this.warnings,eras:this.era}}fromJSON(t,e){if(t.liftbleed&&(this.liftbleed=t.liftbleed),t.wetmass&&(this.wetmass=t.wetmass),t.mass&&(this.mass=t.mass),t.drag&&(this.drag=t.drag),t.control&&(this.control=t.control),t.cost&&(this.cost=t.cost),t.reqsections&&(this.reqsections=t.reqsections),t.visibility&&(this.visibility=t.visibility),t.flightstress&&(this.flightstress=t.flightstress),t.escape&&(this.escape=t.escape),t.pitchstab&&(this.pitchstab=t.pitchstab),t.latstab&&(this.latstab=t.latstab),t.cooling&&(this.cooling=t.cooling),t.reliability&&(this.reliability=t.reliability),t.power&&(this.power=t.power),t.fuelconsumption&&(this.fuelconsumption=t.fuelconsumption),t.maxstrain&&(this.maxstrain=t.maxstrain),t.structure&&(this.structure=t.structure),t.pitchspeed&&(this.pitchspeed=t.pitchspeed),t.pitchboost&&(this.pitchboost=t.pitchboost),t.wingarea&&(this.wingarea=t.wingarea),t.toughness&&(this.toughness=t.toughness),t.upkeep&&(this.upkeep=t.upkeep),t.crashsafety&&(this.crashsafety=t.crashsafety),t.bomb_mass&&(this.bomb_mass=t.bomb_mass),t.fuel&&(this.fuel=t.fuel),t.charge&&(this.charge=t.charge),t.warning&&this.warnings.push({source:h(t.name),warning:h(t.warning),color:c.WHITE}),t.warnings){const e=t.warnings,s=[];for(const t of e)s.push({source:t.source,warning:t.warning});this.warnings=this.MergeWarnings(s)}if(t.era&&this.era.push({name:h(t.name),era:h(t.era)}),t.eras){const e=t.eras,s=[];for(const t of e)s.push({name:t.name,era:t.era});this.era=this.MergeEra(s)}}serialize(t){t.PushNum(this.liftbleed),t.PushNum(this.wetmass),t.PushNum(this.mass),t.PushNum(this.drag),t.PushNum(this.control),t.PushNum(this.cost),t.PushNum(this.reqsections),t.PushNum(this.visibility),t.PushNum(this.flightstress),t.PushNum(this.escape),t.PushNum(this.pitchstab),t.PushNum(this.latstab),t.PushNum(this.cooling),t.PushNum(this.reliability),t.PushNum(this.power),t.PushNum(this.fuelconsumption),t.PushNum(this.maxstrain),t.PushNum(this.structure),t.PushFloat(this.pitchboost),t.PushFloat(this.pitchspeed),t.PushNum(this.wingarea),t.PushNum(this.toughness),t.PushNum(this.upkeep),t.PushNum(this.crashsafety),t.PushNum(this.bomb_mass),t.PushNum(this.fuel),t.PushNum(this.charge),t.PushNum(this.warnings.length);for(const e of this.warnings)t.PushString(e.source),t.PushString(e.warning);t.PushNum(this.era.length);for(const e of this.era)t.PushString(e.name),t.PushString(e.era)}deserialize(t){if(this.liftbleed=t.GetNum(),this.wetmass=t.GetNum(),this.mass=t.GetNum(),this.drag=t.GetNum(),this.control=t.GetNum(),this.cost=t.GetNum(),this.reqsections=t.GetNum(),this.visibility=t.GetNum(),this.flightstress=t.GetNum(),this.escape=t.GetNum(),this.pitchstab=t.GetNum(),this.latstab=t.GetNum(),this.cooling=t.GetNum(),this.reliability=t.GetNum(),this.power=t.GetNum(),this.fuelconsumption=t.GetNum(),this.maxstrain=t.GetNum(),this.structure=t.GetNum(),this.pitchboost=t.GetFloat(),this.pitchspeed=t.GetFloat(),this.wingarea=t.GetNum(),this.toughness=t.GetNum(),this.upkeep=t.GetNum(),this.crashsafety=t.GetNum(),this.bomb_mass=t.GetNum(),this.fuel=t.GetNum(),this.charge=t.GetNum(),t.version>12.25){const e=t.GetNum();this.warnings=[];for(let s=0;s1e-6&&(e.warnings=this.warnings,e.era=this.era),e}Equal(t){return this.liftbleed==t.liftbleed&&this.wetmass==t.wetmass&&this.mass==t.mass&&this.drag==t.drag&&this.control==t.control&&this.cost==t.cost&&this.reqsections==t.reqsections&&this.visibility==t.visibility&&this.flightstress==t.flightstress&&this.escape==t.escape&&this.pitchstab==t.pitchstab&&this.latstab==t.latstab&&this.cooling==t.cooling&&this.reliability==t.reliability&&this.power==t.power&&this.fuelconsumption==t.fuelconsumption&&this.maxstrain==t.maxstrain&&this.structure==t.structure&&this.pitchspeed==t.pitchspeed&&this.pitchboost==t.pitchboost&&this.wingarea==t.wingarea&&this.toughness==t.toughness&&this.upkeep==t.upkeep&&this.crashsafety==t.crashsafety&&this.bomb_mass==t.bomb_mass&&this.fuel==t.fuel&&this.charge==t.charge}rtz(t){return t>0?Math.floor(1e-6+t):Math.ceil(-1e-6+t)}Round(){this.liftbleed=this.rtz(this.liftbleed),this.wetmass=this.rtz(this.wetmass),this.mass=this.rtz(this.mass),this.drag=this.rtz(this.drag),this.control=this.rtz(this.control),this.cost=this.rtz(this.cost),this.reqsections=this.rtz(this.reqsections),this.visibility=this.rtz(this.visibility),this.flightstress=this.rtz(this.flightstress),this.escape=this.rtz(this.escape),this.pitchstab=this.rtz(this.pitchstab),this.latstab=this.rtz(this.latstab),this.cooling=this.rtz(this.cooling),this.reliability=this.rtz(this.reliability),this.power=this.rtz(this.power),this.fuelconsumption=this.rtz(this.fuelconsumption),this.maxstrain=this.rtz(this.maxstrain),this.structure=this.rtz(this.structure),this.wingarea=this.rtz(this.wingarea),this.toughness=this.rtz(this.toughness),this.upkeep=this.rtz(this.upkeep),this.crashsafety=this.rtz(this.crashsafety),this.bomb_mass=this.rtz(this.bomb_mass),this.fuel=this.rtz(this.fuel),this.charge=this.rtz(this.charge)}Clone(){return this.Add(new u)}}const m=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return 6}},p=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return-1}},d=t=>{switch(t){case 0:return"Pioneer";case 1:return"WWI";case 2:return"Roaring 20s";case 3:return"Coming Storm";case 4:return"WWII";case 5:return"Last Hurrah";case 6:case-1:return"Himmilgard"}},g=t=>{var e="";for(let s=0;s0){const s=t.length-1;2==t[s].length&&t[s][0]!=t[s][1]?e+=t[s][0].toString()+"("+t[s][1].toString()+")":e+=t[s][0].toString()}return e};class _{constructor(t){this.array=new ArrayBuffer(51200),this.view=new DataView(this.array),this.offset=0}Check(){if(this.offset>=this.array.byteLength)throw"Serialization Way too long."}PushNum(t){this.view.setInt16(this.offset,t,!1),this.offset+=2,this.Check()}PushBool(t){t?this.view.setUint8(this.offset,1):this.view.setUint8(this.offset,0),this.offset+=1,this.Check()}PushString(t){var e=(new TextEncoder).encode(t);this.PushNum(e.length);for(let t=0;t=this.array.byteLength)throw"Deserialization Failed"}GetNum(){this.Check();const t=this.view.getInt16(this.offset,!1);return this.offset+=2,t}GetBool(){this.Check();const t=this.view.getUint8(this.offset);return this.offset+=1,t>0}GetString(){this.Check();const t=this.GetNum(),e=new Uint8Array(this.view.buffer,this.offset,t);let s;return this.offset+=t,s=this.version<12.65?"windows-1252":"utf-8",new TextDecoder(s).decode(e)}GetNumArr(t){this.Check();const e=this.GetNum(),s=[];for(let t=0;t0&&(n*=1.4),Math.floor(1e-6+n)}VerifyValues(){for(this.engine_displacement=Math.max(.01,this.engine_displacement),this.engine_displacement=Math.min(150,this.engine_displacement),this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.cool_sel=Math.max(0,Math.min(this.CoolingTable.length-1,this.cool_sel)),this.num_cyl_per_row=Math.floor(Math.max(1,this.num_cyl_per_row)),this.num_rows=Math.floor(Math.max(1,this.num_rows)),this.compression_ratio=Math.max(.01,this.compression_ratio),this.compression_ratio=Math.min(25,this.compression_ratio),this.rpm_boost=Math.max(.1,this.rpm_boost),this.rpm_boost=Math.min(2,this.rpm_boost),this.material_fudge=Math.max(.1,this.material_fudge),this.material_fudge=Math.min(2,this.material_fudge),this.quality_fudge=Math.max(.1,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge);this.material_fudge-1+(this.quality_fudge-1)<-.9;)this.material_fudge+=.1,this.quality_fudge+=.1;this.min_IAF=10*Math.round(1e-6+this.min_IAF/10),this.compressor_count=Math.floor(1e-6+this.compressor_count),this.compressor_count=Math.min(5,this.compressor_count),this.compressor_type==S.NONE?(this.compressor_count=0,this.min_IAF=0):this.compressor_type==S.ALTITUDE_THROTTLE?(this.compressor_count=1,this.min_IAF=0,this.upg_sel[0]=!1,this.upg_sel[1]=!1,this.upg_sel[2]=!1):(this.min_IAF=Math.max(0,this.min_IAF),this.compressor_count=Math.max(1,this.compressor_count))}EngineStats(){const t=new F;switch(t.name=this.name,this.VerifyValues(),t.stats.power=this.CalcPower(),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=Math.floor(-1.999999+this.era_sel+10*(this.quality_fudge+this.material_fudge-2)),t.stats.cooling=this.CalcCooling(),t.oiltank=this.IsRotary(),t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=this.CalcFuelConsumption(),t.altitude=this.CalcAltitude(),t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(d(this.era_sel))}),this.compressor_type){case S.NONE:break;case S.ALTITUDE_THROTTLE:t.stats.cost+=3,t.altitude=49,t.stats.warnings.push({source:h("Altitude Throttle"),warning:h("Altitude Throttle Warning"),color:c.WHITE});break;case S.SUPERCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.fuelconsumption=Math.floor(1e-6+1.25*t.stats.fuelconsumption),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=29+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e;break}case S.TURBOCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10*2,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=49+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e,t.stats.reqsections+=1;break}}return(this.compressor_type==S.ALTITUDE_THROTTLE||this.upg_sel[1])&&t.stats.warnings.push({source:h("War Emergency Power"),warning:h("War Emergency Power Warning"),color:c.WHITE}),t.stats.fuelconsumption=Math.max(1,t.stats.fuelconsumption),t.rarity=this.rarity,t}EngineInputs(){const t=new G;t.engine_type=y.PROPELLER,t.RPM_boost=this.rpm_boost,t.compression=this.compression_ratio,t.compressor_count=this.compressor_count,t.compressor_type=this.compressor_type,t.cyl_per_row=this.num_cyl_per_row,t.displacement=this.engine_displacement,t.era_sel=this.era_sel,t.material_fudge=this.material_fudge,t.min_IdealAlt=this.min_IAF,t.name=this.name,t.quality_fudge=this.quality_fudge,t.rows=this.num_rows,t.type=this.cool_sel;for(let e=0;e2&&(this.afterburner=!1)}EngineInputs(){const t=new G;return t.name=this.name,t.engine_type=y.TURBOMACHINERY,t.era_sel=this.era_sel,t.type=this.type_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.upgrades[0]=this.afterburner,t.rarity=this.rarity,t}GetPitchSpeed(){return this.bypass_ratio>=8?1:this.bypass_ratio>=3.5?1.1:this.bypass_ratio>=1?1.2:1.3}EngineStats(){const t=new F;this.VerifyValues();const e=this.CalcStages();return this.kN=e.thrust,this.tsfc=e.fuel/e.thrust,t.name=this.name,t.stats.power=Math.round(1e3*e.thrust/89),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.fuelconsumption=Math.round(200*e.fuel/1e3),t.rumble=0,t.stats.cost=this.CalcCost(),t.overspeed=100,t.altitude=59,8==this.era_sel?t.stats.era.push({name:t.name,era:h(d(-1))}):t.stats.era.push({name:t.name,era:h(d(5))}),t.stats.pitchspeed=this.GetPitchSpeed(),t.rarity=this.rarity,t}}class P{constructor(){this.EraTable=[{name:"Pioneer",draw:3,drawfactor:.4,massfactor:.4,reliability:-1,costfactor:.4,overspeed:20},{name:"WWI",draw:1,drawfactor:.4,massfactor:1/3,reliability:0,costfactor:1/2.25,overspeed:25},{name:"Roaring 20s",draw:1,drawfactor:2/7,massfactor:2/7,reliability:1,costfactor:.5,overspeed:30},{name:"Coming Storm",draw:0,drawfactor:2/7,massfactor:1/4,reliability:2,costfactor:1/1.9,overspeed:35},{name:"WWII",draw:0,drawfactor:1/4,massfactor:.2,reliability:3,costfactor:1/1.8,overspeed:40},{name:"Last Hurrah",draw:0,drawfactor:.2,massfactor:1/6,reliability:4,costfactor:1/1.75,overspeed:45}],this.Winding=[{name:"Aluminum",drawmod:1.1,mass:-2,drag:1,costfactor:1,reliabilty:0},{name:"Copper",drawmod:1,mass:0,drag:0,costfactor:1,reliabilty:0},{name:"Silver",drawmod:.95,mass:1,drag:0,costfactor:1.1,reliabilty:0},{name:"Electrum",drawmod:.9,mass:2,drag:0,costfactor:1.3,reliabilty:1},{name:"Platinum",drawmod:.75,mass:3,drag:0,costfactor:2,reliabilty:2},{name:"Screamer Sinew",drawmod:.9,mass:0,drag:1,costfactor:1.75,reliabilty:4},{name:"Lightning Sprite Ephemera",drawmod:.5,mass:-2,drag:-2,costfactor:2,reliabilty:-3}],this.name="Default",this.era_sel=0,this.winding_sel=0,this.power=1,this.chonk=1,this.quality_fudge=1}EraMass(){const t=this.EraTable[this.era_sel];return Math.floor(1e-6+t.massfactor*this.power)}CalcMass(){const t=this.Winding[this.winding_sel];return Math.max(0,Math.floor(1e-6+this.EraMass()+t.mass))}CalcDrag(){const t=this.power/10,e=this.Winding[this.winding_sel].drag;return Math.max(1,Math.floor(1.000001+t+this.chonk+e))}CalcOverspeed(){const t=this.chonk/2,e=7.5*(this.quality_fudge-1);return Math.ceil(-1e-6+this.EraTable[this.era_sel].overspeed-t+e)}CalcDraw(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.draw+Math.ceil(this.power*t.drawfactor-1e-6);return Math.ceil(s*e.drawmod-1e-6)}CalcReliability(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=this.power/10,i=5*(this.quality_fudge-1);return Math.trunc(1e-6+t.reliability+this.chonk-s+i)+e.reliabilty}CalcTorque(){const t=1+this.EraMass()/10+this.chonk/4;return Math.max(1,Math.floor(1e-6+t))}CalcCost(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.costfactor*this.power,i=Math.ceil(s*Math.max(.5,this.quality_fudge)-1e-6);return Math.ceil(i*e.costfactor-1e-6)}VerifyValues(){this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.winding_sel=Math.max(0,Math.min(this.Winding.length-1,this.winding_sel)),this.power=Math.max(1,this.power),this.power=Math.floor(1e-6+this.power),this.chonk=Math.floor(1e-6+this.chonk),this.chonk=Math.max(-10,this.chonk),this.chonk=Math.min(10,this.chonk),this.quality_fudge=Math.max(.5,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge)}EngineStats(){var t=new F;return t.name=this.name,this.VerifyValues(),t.stats.power=this.power,t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.cooling=0,t.oiltank=!1,t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=0,t.stats.charge=-this.CalcDraw(),t.altitude=100,t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(d(this.era_sel))}),t}EngineInputs(){var t=new G;return t.engine_type=y.ELECTRIC,t.name=this.name,t.power=this.power,t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.material_fudge=this.chonk,t.quality_fudge=this.quality_fudge,t}}!function(t){t[t.PROPELLER=0]="PROPELLER",t[t.PULSEJET=1]="PULSEJET",t[t.TURBOMACHINERY=2]="TURBOMACHINERY",t[t.ELECTRIC=3]="ELECTRIC"}(y||(y={})),function(t){t[t.CUSTOM=0]="CUSTOM",t[t.COMMON=1]="COMMON",t[t.RARE=2]="RARE",t[t.LEGENDARY=3]="LEGENDARY"}(w||(w={}));class G{constructor(t){this.name="Default",this.engine_type=y.PROPELLER,this.type=0,this.era_sel=0,this.rarity=w.CUSTOM,this.displacement=0,this.compression=0,this.cyl_per_row=0,this.rows=0,this.RPM_boost=0,this.material_fudge=0,this.quality_fudge=0,this.compressor_type=0,this.compressor_count=0,this.min_IdealAlt=0,this.upgrades=[...Array(4).fill(!1)],this.power=0,this.quality_cost=0,this.quality_rely=0,this.starter=!1,this.flow_adjustment=0,this.diameter=0,this.compression_ratio=0,this.bypass_ratio=0,this.winding_sel=0,t&&this.fromJSON(t)}toJSON(){switch(this.engine_type){case y.PROPELLER:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,displacement:this.displacement,compression:this.compression,cyl_per_row:this.cyl_per_row,rows:this.rows,RPM_boost:this.RPM_boost,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge,compressor_type:this.compressor_type,compressor_count:this.compressor_count,min_IAF:this.min_IdealAlt,upgrades:this.upgrades,rarity:this.rarity};case y.PULSEJET:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,power:this.power,quality_cost:this.quality_cost,quality_rely:this.quality_rely,starter:this.starter,rarity:this.rarity};case y.TURBOMACHINERY:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,flow_adjustment:this.flow_adjustment,diameter:this.diameter,compression_ratio:this.compression_ratio,bypass_ratio:this.bypass_ratio,upgrades:this.upgrades,rarity:this.rarity};case y.ELECTRIC:return{name:this.name,engine_type:this.engine_type,power:this.power,era_sel:this.era_sel,winding_sel:this.winding_sel,diameter:this.diameter,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge};default:throw"EngineInputs.toJSON: Oh dear, you have a new engine type."}}fromJSON(t){switch(this.name=t.name,this.engine_type=t.engine_type,this.type=t.type,this.era_sel=t.era_sel,this.engine_type){case y.PROPELLER:this.displacement=t.displacement,this.compression=t.compression,this.cyl_per_row=t.cyl_per_row,this.rows=t.rows,this.RPM_boost=t.RPM_boost,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge,this.compressor_type=t.compressor_type,this.compressor_count=t.compressor_count,this.min_IdealAlt=t.min_IAF,this.upgrades=b(t.upgrades,this.upgrades.length);break;case y.PULSEJET:this.power=t.power,this.quality_cost=t.quality_cost,this.quality_rely=t.quality_rely,this.starter=t.starter;break;case y.TURBOMACHINERY:this.flow_adjustment=t.flow_adjustment,this.diameter=t.diameter,this.compression_ratio=t.compression_ratio,this.bypass_ratio=t.bypass_ratio,this.upgrades=t.upgrades;break;case y.ELECTRIC:this.power=t.power,this.winding_sel=t.winding_sel,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge;break;default:throw"EngineInputs.fromJSON: Oh dear, you have a new engine type."}t.rarity?this.rarity=t.rarity:this.rarity=w.CUSTOM}serialize(t){switch(t.PushString(this.name),t.PushNum(this.engine_type),t.PushNum(this.type),t.PushNum(this.era_sel),this.engine_type){case y.PROPELLER:t.PushFloat(this.displacement),t.PushFloat(this.compression),t.PushNum(this.cyl_per_row),t.PushNum(this.rows),t.PushFloat(this.RPM_boost),t.PushFloat(this.material_fudge),t.PushFloat(this.quality_fudge),t.PushNum(this.compressor_type),t.PushNum(this.compressor_count),t.PushNum(this.min_IdealAlt),t.PushBoolArr(this.upgrades);break;case y.PULSEJET:t.PushNum(this.power),t.PushFloat(this.quality_cost),t.PushFloat(this.quality_rely),t.PushBool(this.starter);break;case y.TURBOMACHINERY:t.PushFloat(this.flow_adjustment),t.PushFloat(this.diameter),t.PushFloat(this.compression_ratio),t.PushFloat(this.bypass_ratio),t.PushBoolArr(this.upgrades);break;case y.ELECTRIC:t.PushNum(this.power),t.PushNum(this.winding_sel),t.PushNum(this.material_fudge),t.PushFloat(this.quality_fudge);break;default:throw"EngineInputs.serialize: Oh dear, you have a new engine type."}t.PushNum(this.rarity)}deserialize(t){switch(this.name=t.GetString(),this.engine_type=t.GetNum(),this.type=t.GetNum(),this.era_sel=t.GetNum(),this.engine_type){case y.PROPELLER:this.displacement=t.GetFloat(),this.compression=t.GetFloat(),this.cyl_per_row=t.GetNum(),this.rows=t.GetNum(),this.RPM_boost=t.GetFloat(),this.material_fudge=t.GetFloat(),this.quality_fudge=t.GetFloat(),this.compressor_type=t.GetNum(),this.compressor_count=t.GetNum(),this.min_IdealAlt=t.GetNum(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case y.PULSEJET:this.power=t.GetNum(),this.quality_cost=t.GetFloat(),this.quality_rely=t.GetFloat(),this.starter=t.GetBool();break;case y.TURBOMACHINERY:this.flow_adjustment=t.GetFloat(),this.diameter=t.GetFloat(),this.compression_ratio=t.GetFloat(),this.bypass_ratio=t.GetFloat(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case y.ELECTRIC:this.power=t.GetNum(),this.winding_sel=t.GetNum(),this.material_fudge=t.GetNum(),this.quality_fudge=t.GetFloat();break;default:throw"EngineInputs.deserialize: Oh dear, you have a new engine type."}t.version>12.35?this.rarity=t.GetNum():this.rarity=w.CUSTOM}PartStats(){switch(this.engine_type){case y.PROPELLER:{const t=new B;return t.name=this.name,t.cool_sel=this.type,t.era_sel=this.era_sel,t.engine_displacement=this.displacement,t.compression_ratio=this.compression,t.num_cyl_per_row=this.cyl_per_row,t.num_rows=this.rows,t.rpm_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IAF=this.min_IdealAlt,t.upg_sel=this.upgrades,t.rarity=this.rarity,t.EngineStats()}case y.PULSEJET:{const t=new E;t.valve_sel=this.type,t.era_sel=this.era_sel,t.desired_power=this.power,t.build_quality=this.quality_cost,t.overall_quality=this.quality_rely,t.starter=this.starter,t.rarity=this.rarity;const e=t.EngineStats();return this.name=e.name,e}case y.TURBOMACHINERY:{const t=new M;return t.type_sel=this.type,t.era_sel=this.era_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.afterburner=this.upgrades[0],t.name=this.name,t.rarity=this.rarity,t.EngineStats()}case y.ELECTRIC:{const t=new P;return t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.power=this.power,t.chonk=this.material_fudge,t.quality_fudge=this.quality_fudge,t.name=this.name,t.EngineStats()}default:throw"EngineInputs.PartStats: Oh dear, you have a new engine type."}}Equal(t){return this.name==t.name}Clone(){const t=new G;t.name=this.name,t.engine_type=this.engine_type,t.type=this.type,t.era_sel=this.era_sel,t.displacement=this.displacement,t.compression=this.compression,t.cyl_per_row=this.cyl_per_row,t.rows=this.rows,t.RPM_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IdealAlt=this.min_IdealAlt,t.power=this.power,t.quality_cost=this.quality_cost,t.quality_rely=this.quality_rely,t.starter=this.starter;for(let e=0;e12.35&&(this.rarity=t.GetNum()),this.stats.deserialize(t)}Clone(){const t=new F;return t.fromJSON(JSON.parse(JSON.stringify(this.toJSON()))),t}Equal(t){return this.stats.Equal(t.stats)&&this.overspeed==t.overspeed&&this.altitude==t.altitude&&this.torque==t.torque&&this.rumble==t.rumble&&this.oiltank==t.oiltank&&this.pulsejet==t.pulsejet&&this.rarity==t.rarity}Verify(){this.oiltank&&(this.stats.cooling=0),this.PulseJetCheck()}PulseJetCheck(){this.pulsejet?(this.stats.cooling=0,this.overspeed=100,this.altitude=3,this.torque=0):this.rumble=0}}const R=JSON.parse('{"l":[{"name":"Custom","engines":[{"name":"Bentley BR.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Renault V8 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":7,"compression":4,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.4,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Early-WWI","engines":[{"name":"Aeromarine K-6 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.36,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 80hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.27,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 6 cylinder 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Argus As II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":10.353,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.8,"compression":4.85,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Benz Bz.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.4,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 7Z 95hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.88,"compression":4.3,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9Bf 140hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.46,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 14 Double Lambda 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 70hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.75,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Omega 50hp","engine_type":0,"type":2,"era_sel":0,"displacement":7.7,"compression":4,"cyl_per_row":7,"rows":1,"RPM_boost":1.49,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome monosoupape 9B 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9C 90hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.89,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"RAF 1a 90hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.88,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.9,"material_fudge":1.3,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Late-WWI","engines":[{"name":"Bentley BR.2 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 11EB 200hp","engine_type":0,"type":2,"era_sel":1,"displacement":21.49,"compression":5.1,"cyl_per_row":11,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 16X 420hp","engine_type":0,"type":0,"era_sel":1,"displacement":32.53333333,"compression":5,"cyl_per_row":4,"rows":4,"RPM_boost":0.87,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8F 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.98,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIav 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'18","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle III 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle VIII 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 110hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Dyak 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.800000002,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.III 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.6,"compression":5,"cyl_per_row":11,"rows":1,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Mid-WWI","engines":[{"name":"Argus As III 190hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.9,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Beardmore 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.635,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bz.IV 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.6,"compression":4.9,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9B 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Cosmos Mercury","engine_type":0,"type":1,"era_sel":1,"displacement":19.6,"compression":5.3,"cyl_per_row":7,"rows":2,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss K-12 375hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.33,"material_fudge":0.8,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss OXX-6","engine_type":0,"type":0,"era_sel":1,"displacement":9.3,"compression":4.92,"cyl_per_row":2,"rows":4,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Fiat A.12 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9B Monosoupape 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9N Monosoupape 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":5.1,"cyl_per_row":9,"rows":1,"RPM_boost":1.05,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Aa 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Ab 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8B 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Bc 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Ja 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Jb 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Liberty L-12 400hp","engine_type":0,"type":0,"era_sel":2,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.64,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Lorraine 12Da 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":24.4,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIa 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIaü 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IVa 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Falcon III 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 80hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Arab 208hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.76,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Maori II 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":12.27,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.3,"material_fudge":1.7,"quality_fudge":0.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.II 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Pre-WWI","engines":[{"name":"Mercedes E4F 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Coming Storm","engines":[{"name":"Allison V-1710-85 1200hp","engine_type":0,"type":0,"era_sel":3,"displacement":28,"compression":6.65,"cyl_per_row":2,"rows":6,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bristol Pegasus XVIII 835hp","engine_type":0,"type":1,"era_sel":2,"displacement":28.7,"compression":6.25,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1.2,"quality_fudge":0.8,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Daimler-Benz 601ARJ 1775hp","engine_type":0,"type":0,"era_sel":3,"displacement":33.93,"compression":6.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.84,"material_fudge":0.6,"quality_fudge":0.7,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,true,false]}]},{"name":"Roaring 20s","engines":[{"name":"Argus As 5 1500hp","engine_type":0,"type":0,"era_sel":2,"displacement":94.1,"compression":5.6,"cyl_per_row":6,"rows":4,"RPM_boost":0.638,"material_fudge":0.4,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bréguet Quadrimoteur Type B H-32 970hp","engine_type":0,"type":0,"era_sel":2,"displacement":48.64,"compression":5,"cyl_per_row":4,"rows":8,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'20","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion XI 580hp","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":6,"cyl_per_row":4,"rows":3,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"WWII","engines":[{"name":"Klimov M-105PF 1230hp","engine_type":0,"type":0,"era_sel":3,"displacement":35.101,"compression":7,"cyl_per_row":2,"rows":6,"RPM_boost":0.55,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls Royce Merlin 46 930hp","engine_type":0,"type":0,"era_sel":3,"displacement":27,"compression":5.55,"cyl_per_row":2,"rows":6,"RPM_boost":0.98,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,true,true,false]}]},{"name":"ACDQ","engines":[{"name":"2A-Series 4-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":16,"compression":4.5,"cyl_per_row":1,"rows":2,"RPM_boost":0.5,"material_fudge":0.8,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"F-Series 6-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":17,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.07,"material_fudge":0.7,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"G-Series 9-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":16,"compression":4.7,"cyl_per_row":9,"rows":1,"RPM_boost":1.04,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hartmann H.IIc Straight-6 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":12,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hornet R-3 Boxer 6-Cylinder","engine_type":0,"type":0,"era_sel":1,"displacement":10,"compression":5,"cyl_per_row":2,"rows":3,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Maclean-King Tiger MK.1 V-12 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":17,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ogre-Z Beta V-6","engine_type":0,"type":0,"era_sel":0,"displacement":11,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Pulsejet PV-12 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":12,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-20 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":20,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-8 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":8,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Seguin Σ110 Sigma 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":1,"displacement":14,"compression":4.5,"cyl_per_row":7,"rows":1,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"SuperPegasus 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":13.5,"compression":5,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"TurboGoblin 8-Cylinder Semi-Radial","engine_type":0,"type":4,"era_sel":0,"displacement":13,"compression":5.5,"cyl_per_row":8,"rows":1,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Himmilgard Pulsejet","engines":[{"name":"Pulsejet PV-5 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":5,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-6 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":6,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-7 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":7,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-8 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":8,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-9 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":9,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-10 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":10,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-11 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":11,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-12 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":12,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-13 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":13,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-14 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":14,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-15 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":15,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1}]},{"name":"Himmilgard Liquid Radial","engines":[{"name":"Einsort MM 140hp","engine_type":0,"type":5,"era_sel":1,"displacement":14.72,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Einsort MR 150hp","engine_type":0,"type":5,"era_sel":1,"displacement":15.46,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Gernsback Motor 0005","engine_type":0,"type":5,"era_sel":1,"displacement":12,"compression":6,"cyl_per_row":5,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Liquid Cooled","engines":[{"name":"Meier Bärenjunge 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.5,"compression":5.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.86,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F1166 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 Über 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2000 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Brandt Krieger I 370hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Brandt Kurier XVI 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Fleischmann F10 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fleischmann F10ü 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.75,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fokker Fungizidherstellung Typ 247 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.3,"compression":4.8,"cyl_per_row":1,"rows":6,"RPM_boost":0.85,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Ochs 2 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.84,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Windhund 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Nationales Motorbüro Arbeiter XVII 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,true],"rarity":2},{"name":"Nationales Motorbüro D-1140 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.4,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760tgl 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.4,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-840 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.4,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.05,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro Kurier XXI 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XII 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"SAM Kurier XX 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter I 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.15,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter III 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter V 350hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.75,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Schrankhut RD.300V 230hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":6.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.51,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Wollsteinkraft Verteidiger C 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Wollsteinkraft Verteidiger H 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Wollsteinkraft Wagehals C 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F4398 490hp","engine_type":0,"type":0,"era_sel":1,"displacement":44.3,"compression":4.7,"cyl_per_row":3,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Patriot 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Turbolader-Patriot 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"Meier Bär 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Meier Eisbär 500hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XIII 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":1,"min_IAF":10,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter IV 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":2},{"name":"Sonnenmotor EGH3 220hp","engine_type":0,"type":0,"era_sel":0,"displacement":20,"compression":5,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":50,"upgrades":[false,false,false,true],"rarity":3},{"name":"Wollsteinkraft Wagehals T 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Kurier L 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.99,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Bertha F2080 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.4,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2080 Über 270hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.8,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Contrarotary","engines":[{"name":"Nationales Motorbüro R-1860 160hp","engine_type":0,"type":3,"era_sel":1,"displacement":18.6,"compression":6,"cyl_per_row":11,"rows":1,"RPM_boost":0.65,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro R-1190 110hp","engine_type":0,"type":3,"era_sel":1,"displacement":11.9,"compression":6,"cyl_per_row":9,"rows":1,"RPM_boost":0.67,"material_fudge":1.2,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Air Cooled","engines":[{"name":"Braun UL 90hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun ULK 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.2,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs X 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.1,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun UX 150hp","engine_type":0,"type":1,"era_sel":1,"displacement":13.2,"compression":4.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.23,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Scholz Luchs III 30hp","engine_type":0,"type":1,"era_sel":1,"displacement":3.1,"compression":4.5,"cyl_per_row":3,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs VI 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Breitbusch Libelle \'320hp\'","engine_type":0,"type":1,"era_sel":1,"displacement":22.78,"compression":4.42,"cyl_per_row":9,"rows":1,"RPM_boost":1.31,"material_fudge":1.1,"quality_fudge":0.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Rosevear Ankou B 180hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.9,"compression":5.17,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":1.4,"quality_fudge":0.9,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Semi-Radial","engines":[{"name":"SLW Sigvird 180hp","engine_type":0,"type":4,"era_sel":1,"displacement":11,"compression":6,"cyl_per_row":4,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Rotary","engines":[{"name":"Modded Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Robur Herausforderer 180hp","engine_type":0,"type":2,"era_sel":1,"displacement":18,"compression":5.5,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":40,"upgrades":[false,false,true,true],"rarity":3},{"name":"Rhona Motorbau Z11 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z11tgl 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber B.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber G.IX 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber O.VII 50hp","engine_type":0,"type":2,"era_sel":1,"displacement":8,"compression":4.85,"cyl_per_row":7,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber L.VII 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber TG.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber T.IX 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.3 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Schreiber L.XIV 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1}]}]}');class x{constructor(t){this.constant=!1,this.name=t,this.list=[];const e=window.localStorage.getItem("test.engines."+this.name);null!=e&&this.fromJSON(JSON.parse(e));const s=window.localStorage.getItem("test.engines_names");let i=[];s&&(i=JSON.parse(s));let a=!1;for(const e of i)if(e==t){a=!0;break}a||i.push(t),window.localStorage.setItem("test.engines_names",JSON.stringify(i))}toJSON(){const t=[];for(const e of this.list)t.push(e.toJSON());return{name:this.name,engines:t}}fromJSON(t,e=!1){t.name&&(this.name=t.name),e&&(this.list=[]);for(const s of t.engines)try{this.push(new G(s),e)}catch(t){console.error(t)}}deserializeEngine(t){if(this.constant)throw"Engine List is Constant";const e=new G;return e.deserialize(t),this.push(e)}push(t,e=!1){if(this.constant)throw"Engine List is Constant";if(e)this.remove(t);else for(let e=0;e(""+t.name).localeCompare(e.name))),window.localStorage.setItem("test.engines."+this.name,JSON.stringify(this.toJSON())),this.find(t)}get(t){return t<0||t>=this.length?new G:this.list[t]}get_name(t){const e=this.find_name(t);return this.get(e)}get_stats(t){return t<0||t>=this.length?new F:this.list[t].PartStats()}get_stats_name(t){const e=this.find_name(t);return this.get_stats(e)}find(t){for(let e=0;e=0&&this.list.splice(e,1),window.localStorage.setItem("test.engines."+this.name,JSON.stringify(this.toJSON()))}remove_name(t){if(this.constant)throw"Engine List is Constant";const e=this.find_name(t);e>=0&&this.list.splice(e,1),window.localStorage.setItem("test.engines."+this.name,JSON.stringify(this.toJSON()))}get length(){return this.list.length}SetConstant(){this.constant=!0}}const I=new Map([["Custom",new x("Custom")]]);function T(){return I}function v(t){const e=T();for(const s of e.keys())if("Custom"!=s&&e.get(s).find_name(t)>=0)return s;return e.get("Custom").find_name(t)>=0?"Custom":""}var N,D,O,k,L;function W(t){return t==N.ORNITHOPTER_BASIC||t==N.ORNITHOPTER_FLUTTER||t==N.ORNITHOPTER_BUZZER}!function(t){t[t.AIRPLANE=0]="AIRPLANE",t[t.HELICOPTER=1]="HELICOPTER",t[t.AUTOGYRO=2]="AUTOGYRO",t[t.ORNITHOPTER_BASIC=3]="ORNITHOPTER_BASIC",t[t.ORNITHOPTER_FLUTTER=4]="ORNITHOPTER_FLUTTER",t[t.ORNITHOPTER_BUZZER=5]="ORNITHOPTER_BUZZER"}(N||(N={}));class H{FormatEquipment(t,e,s){return Math.abs(s)>.5?t.push({source:h(e),charge:s.toString()}):s>0&&s<1e-6&&t.push({source:h(e),charge:"-"}),t}}function q(t,e){for(let s=0;s0&&t.push({name:s.name,stats:s.stats.toJSON(),qty:s.qty});return window.localStorage.setItem("test.CustomParts",JSON.stringify(e)),{part_list:t}}fromJSON(t,e){for(const t of this.custom_parts)t.qty=0;for(const e of t.part_list){const t=this.custom_parts.findIndex((t=>t.name==e.name));-1==t?this.custom_parts.push({name:e.name,stats:new u(e.stats),qty:e.qty}):this.custom_parts[t].qty=e.qty}}serialize(t){const e=[];for(const t of this.custom_parts)t.qty>0&&e.push({name:t.name,stats:t.stats,qty:t.qty});t.PushNum(e.length);for(const s of e)t.PushString(s.name),s.stats.serialize(t),t.PushNum(s.qty)}deserialize(t){for(const t of this.custom_parts)t.qty=0;const e=t.GetNum();for(let i=0;it.name==e));-1==s?(s=this.custom_parts.length,this.custom_parts.push({name:e,stats:i,qty:a})):this.custom_parts[s].qty=a}}IsDefault(){for(const t of this.custom_parts)if(t.qty>0)return!1;return!0}ClearAll(){for(const t of this.custom_parts)t.qty=0}AddPart(t,e){var s=0;if(s+=Math.abs(e.drag),s+=Math.abs(e.mass),s+=Math.abs(e.wetmass),s+=Math.abs(e.bomb_mass),s+=Math.abs(e.cost),s+=Math.abs(e.upkeep),s+=Math.abs(e.liftbleed),s+=Math.abs(e.wingarea),s+=Math.abs(e.control),s+=Math.abs(e.pitchstab),s+=Math.abs(e.latstab),s+=Math.abs(e.maxstrain),s+=Math.abs(e.structure),s+=Math.abs(e.toughness),s+=Math.abs(e.power),s+=Math.abs(e.fuelconsumption),s+=Math.abs(e.fuel),s+=Math.abs(e.charge),s+=Math.abs(e.crashsafety),s+=Math.abs(e.visibility),s+=Math.abs(e.escape),s+=Math.abs(e.reliability),0==(s+=Math.abs(e.warnings.length)))return;const i=this.custom_parts.findIndex((e=>e.name==t));-1!=i?this.custom_parts[i].stats=e:this.custom_parts.push({name:t,stats:e,qty:0}),this.custom_parts.sort(((t,e)=>t.name.localeCompare(e.name))),this.CalculateStats()}RemovePart(t){const e=this.custom_parts.findIndex((e=>e.name==t));-1!=e&&this.custom_parts.splice(e,1),this.CalculateStats()}GetParts(){return this.custom_parts}SetUsedPart(t,e){this.custom_parts[t].qty=e,this.CalculateStats()}PartStats(){var t=new u;for(const e of this.custom_parts)if(e.qty>0){let s=e.stats.Clone();s=s.Multiply(e.qty),t=t.Add(s)}return t}GetElectrics(){var t=[];for(const e of this.custom_parts)e.qty>0&&(t=this.FormatEquipment(t,e.name,e.stats.charge));return{storage:0,equipment:t}}SetCalculateStats(t){this.CalculateStats=t}}class z extends H{constructor(t){super(),this.selected=0,this.vals=[];for(const e of t.options){const t={name:e.name,maxbomb:e.maxbomb,cant_lift:e.cant_lift,stats:new u(e)};this.vals.push(t)}}toJSON(){return{selected:this.selected}}fromJSON(t,e){this.selected=t.selected,e<10.35&&this.selected>2&&this.selected++}serialize(t){t.PushNum(this.selected)}deserialize(t){this.selected=t.GetNum()}GetSelected(){return this.selected}GetSelectedText(){return this.vals[this.selected].name}SetSelected(t){this.selected=t,this.CalculateStats()}GetEraOptions(){return this.vals}GetLiftBleed(){return this.vals[this.selected].stats.liftbleed}GetMaxBomb(){return this.vals[this.selected].maxbomb}GetCantLift(){return this.vals[this.selected].cant_lift}PartStats(){var t=new u;return t.Add(this.vals[this.selected].stats)}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class J extends H{constructor(t,e,s,i){super(),this.stats=new u,this.types=t,this.upgrades=e,this.safety=s,this.gunsights=i,this.selected_type=0,this.selected_upgrades=[...Array(this.upgrades.length).fill(!1)],this.selected_safety=[...Array(this.safety.length).fill(!1)],this.selected_gunsights=[...Array(this.gunsights.length).fill(!1)],this.total_stress=[0,0],this.total_escape=0,this.total_visibility=0,this.seat_index=0,this.bombsight=0,this.is_armed=!1}toJSON(){return{type:this.selected_type,upgrades:this.selected_upgrades,safety:this.selected_safety,sights:this.selected_gunsights,bombsight:this.bombsight}}fromJSON(t,e){this.selected_type=t.type,this.selected_upgrades=b(t.upgrades,this.selected_upgrades.length),this.selected_safety=b(t.safety,this.selected_safety.length),this.selected_gunsights=b(t.sights,this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),e>10.35&&(this.bombsight=t.bombsight)}serialize(t){t.PushNum(this.selected_type),t.PushBoolArr(this.selected_upgrades),t.PushBoolArr(this.selected_safety),t.PushBoolArr(this.selected_gunsights),t.PushNum(this.bombsight)}deserialize(t){this.selected_type=t.GetNum(),this.selected_upgrades=t.GetBoolArr(this.selected_upgrades.length),this.selected_safety=t.GetBoolArr(this.selected_safety.length),this.selected_gunsights=t.GetBoolArr(this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),t.version>10.35&&(this.bombsight=t.GetNum())}GetTypeList(){return this.types}GetUpgradeList(){return this.upgrades}GetSafetyList(){return this.safety}GetGunsightList(){return this.gunsights}GetType(){return this.selected_type}SetType(t){if(t>=this.types.length)throw"Selected type is not in range of actual types.";this.selected_type=t,this.CalculateStats()}GetSelectedUpgrades(){return this.selected_upgrades}SetUpgrade(t,e){if(t>=this.upgrades.length)throw"Selected type is not in range of actual upgrades.";this.selected_upgrades[t]=e,this.CalculateStats()}GetSelectedSafety(){return this.selected_safety}CanSafety(){const t=Array(this.safety.length).fill(!0);return t[5]=!this.types[this.selected_type].exposed,t}SetSafety(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual safties.";this.selected_safety[t]=e,this.CalculateStats()}GetSelectedGunsights(){return this.selected_gunsights}SetGunsight(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual gunsights.";this.selected_gunsights[t]=e,this.CalculateStats()}GetVisibility(){return this.types[this.selected_type].stats.visibility<-10?-1/0:this.total_visibility}GetFlightStress(){return this.total_stress}GetEscape(){return this.total_escape}GetCrash(){return this.total_crash}GetAttack(){var t=0;for(let e=0;e0&&(t=t-t%3+1),this.bombsight=t,this.CalculateStats()}SetHasRotary(t){this.has_rotary=t}IsElectrics(){return 0!=this.stats.charge}IsCopilot(){return this.selected_upgrades[0]}SetArmed(t){this.is_armed=t}GetName(){return this.IsPrimary()?"Crew Pilot":this.bombsight>0?"Crew Bombadier":this.IsCopilot()?"Crew Co-Pilot":this.is_armed?"Crew Gunner":"Crew Aircrew"}PartStats(){let t=new u;t.reqsections=1,t=t.Add(this.types[this.selected_type].stats);for(let e=0;e0&&(t.cost+=Math.floor(2.000001+(this.bombsight-4)/3),t.warnings.push({source:h("Bombsight"),warning:h("Bombsight Warning 1")+this.bombsight.toString()+h("Bombsight Warning 2"),color:c.WHITE}),this.IsCopilot()&&t.warnings.push({source:h("Bombadier Controls"),warning:h("Bombadier Controls Warning"),color:c.WHITE})),this.stats=t.Clone(),this.selected_upgrades[0]?(t.flightstress=this.upgrades[0].stats.flightstress,this.stats.flightstress-=t.flightstress):t.flightstress=0,t}CrewUpdate(t,e,s,i,a,n){this.total_escape=this.stats.escape+t;let r=this.stats.flightstress,o=this.stats.flightstress;(this.IsPrimary()||this.selected_upgrades[0])&&(r+=e,o+=e-2*i),r=Math.max(0,r),o=Math.max(0,o),r+=s,o+=s,this.IsOpen()&&this.has_rotary&&(r+=1,o+=1),r=Math.max(0,r),o=Math.max(0,o),this.total_stress=[r,o],this.total_visibility=this.stats.visibility+a,this.total_crash=this.stats.crashsafety+n}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){var t=[];for(let e=0;et;)this.positions.pop();var e=null;for(this.positions.length>0&&(e=JSON.stringify(this.positions[this.positions.length-1].toJSON()));this.positions.length0}GetConnected(){return this.connected}SetConnected(t){this.connected=t,this.CalculateStats()}PartStats(){const t=new u;return t.reqsections=2*Math.ceil((this.seats+2*this.beds)/5-1e-6),this.seats+this.beds>0&&this.connected&&(t.mass=1,t.warnings.push({source:h("Passengers Section Title"),warning:h("Passenger Connectivity Warning"),color:c.WHITE})),t.bomb_mass+=this.seats+this.beds,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),this.seats+this.beds>0&&t.warnings.push({source:h("Passengers Section Title"),warning:h("Passengers Count",this.seats,this.beds),color:c.WHITE}),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class Q extends H{constructor(t,e){super();const s=T();if(this.elist_idx="Custom",this.etype_stats=s.get(this.elist_idx).get_stats(0),this.etype_inputs=s.get(this.elist_idx).get(0),this.cooling_count=this.etype_stats.stats.cooling,this.radiator_index=-1,this.cooling_count>0&&(this.radiator_index=0),this.num_radiators=0,this.mount_list=t,this.mount_sel=0,this.intake_fan=!1,this.use_pp=!1,this.torque_to_struct=!1,this.cowl_list=e,this.cowl_sel=0,this.use_ds=!1,this.outboard_prop=!1,this.gp_count=0,this.gpr_count=0,this.total_reliability=0,this.is_generator=!1,this.has_alternator=!1,s.get(this.elist_idx).length<=0)throw"No Engine Stats Found. Should be at least one."}toJSON(){return{selected_stats:this.etype_stats.toJSON(),selected_inputs:this.etype_inputs.toJSON(),cooling_count:this.cooling_count,radiator_index:this.radiator_index,selected_mount:this.mount_sel,use_pushpull:this.use_pp,pp_torque_to_struct:this.torque_to_struct,use_driveshafts:this.use_ds,geared_propeller_ratio:this.gp_count,geared_propeller_reliability:this.gpr_count,cowl_sel:this.cowl_sel,is_generator:this.is_generator,has_alternator:this.has_alternator,intake_fan:this.intake_fan,outboard_prop:this.outboard_prop}}oldJSON(t,e){const s=t.selected_stats;if(this.etype_stats.fromJSON(s,e),this.etype_inputs=new G,this.etype_stats.pulsejet&&s.input_pj){this.etype_inputs=new G,this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=y.PULSEJET;const t=s.input_pj;this.etype_inputs.type=t.type,this.etype_inputs.power=t.power,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.quality_cost=t.quality_cost,this.etype_inputs.quality_rely=t.quality_rely,this.etype_inputs.starter=t.starter}else if(s.input_eb){this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=y.PROPELLER;const t=s.input_eb;this.etype_inputs.displacement=t.displacement,this.etype_inputs.compression=t.compression,this.etype_inputs.type=t.type,this.etype_inputs.cyl_per_row=t.cyl_per_row,this.etype_inputs.rows=t.rows,this.etype_inputs.RPM_boost=t.RPM_boost,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.material_fudge=t.material_fudge,this.etype_inputs.quality_fudge=t.quality_fudge,this.etype_inputs.upgrades=t.upgrades,6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.compressor_type,this.etype_inputs.compressor_count=t.compressor_count,this.etype_inputs.min_IdealAlt=t.min_IAF)}else this.etype_stats.altitude=10*this.etype_stats.altitude-1;return this.etype_inputs}fromJSON(t,e){const s=T();let i="";if(e>10.55){this.etype_stats.fromJSON(t.selected_stats,e);const a=new G(t.selected_inputs);i=v(this.etype_stats.name),""==i&&(i="Custom","Default"!=a.name&&s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name)}else{const a=this.oldJSON(t,e);"Default"!=a.name&&(i=v(this.etype_stats.name),""==i&&(i="Custom",s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name))}this.elist_idx=i,this.cooling_count=t.cooling_count,this.radiator_index=t.radiator_index,this.mount_sel=t.selected_mount,this.use_pp=t.use_pushpull,this.torque_to_struct=t.pp_torque_to_struct,this.use_ds=t.use_driveshafts,this.gp_count=t.geared_propeller_ratio,this.gpr_count=t.geared_propeller_reliability,this.cowl_sel=t.cowl_sel,this.is_generator=t.is_generator,this.has_alternator=t.has_alternator,this.intake_fan=t.intake_fan,this.outboard_prop=e>=12.15&&t.outboard_prop}serialize(t){this.etype_stats.serialize(t),this.etype_inputs.serialize(t),t.PushNum(this.cooling_count),t.PushNum(this.radiator_index),t.PushNum(this.mount_sel),t.PushBool(this.use_pp),t.PushBool(this.torque_to_struct),t.PushBool(this.use_ds),t.PushNum(this.gp_count),t.PushNum(this.gpr_count),t.PushNum(this.cowl_sel),t.PushBool(this.is_generator),t.PushBool(this.has_alternator),t.PushBool(this.intake_fan),t.PushBool(this.outboard_prop)}oldDeserialize(t){return this.etype_stats.name=t.GetString(),this.etype_stats.overspeed=t.GetNum(),this.etype_stats.altitude=t.GetNum(),this.etype_stats.torque=t.GetNum(),this.etype_stats.rumble=t.GetNum(),this.etype_stats.oiltank=t.GetBool(),this.etype_stats.pulsejet=t.GetBool(),this.etype_inputs=new G,t.version>10.45?(this.etype_inputs.name=this.etype_stats.name,this.etype_stats.pulsejet?(this.etype_inputs.engine_type=y.PULSEJET,this.etype_inputs.power=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.quality_cost=t.GetNum(),this.etype_inputs.quality_rely=t.GetNum(),this.etype_inputs.starter=t.GetBool()):(this.etype_inputs.displacement=t.GetNum(),this.etype_inputs.compression=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.cyl_per_row=t.GetNum(),this.etype_inputs.rows=t.GetNum(),this.etype_inputs.RPM_boost=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.material_fudge=t.GetNum(),this.etype_inputs.quality_fudge=t.GetNum(),this.etype_inputs.upgrades=t.GetBoolArr(0),6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.GetNum(),this.etype_inputs.compressor_count=t.GetNum(),this.etype_inputs.min_IdealAlt=t.GetNum()))):this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_stats.stats.deserialize(t),this.etype_inputs}deserialize(t){const e=T();var s="";if(t.version>10.55){this.etype_stats.deserialize(t);const i=new G;i.deserialize(t),""==(s=v(this.etype_stats.name))&&(s="Custom","Default"!=i.name&&e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name)}else{const i=this.oldDeserialize(t);"Default"!=i.name&&(""==(s=v(this.etype_stats.name))&&(s="Custom",e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name))}this.cooling_count=t.GetNum(),this.radiator_index=t.GetNum(),this.mount_sel=t.GetNum(),this.use_pp=t.GetBool(),this.torque_to_struct=t.GetBool(),this.use_ds=t.GetBool(),this.gp_count=t.GetNum(),this.gpr_count=t.GetNum(),this.cowl_sel=t.GetNum(),this.is_generator=t.GetBool(),this.has_alternator=t.GetBool(),this.intake_fan=t.GetBool(),t.version>=12.15?this.outboard_prop=t.GetBool():this.outboard_prop=!1,this.elist_idx=s}GetMinAltitude(){return this.etype_inputs.min_IdealAlt}GetMaxAltitude(){return this.GetMinAltitude()+this.etype_stats.altitude}GetMinIAF(){return Math.floor(1e-6+this.GetMinAltitude()/10)}GetMaxIAF(){return Math.floor(1e-6+this.GetMaxAltitude()/10)}CanSelectIndex(){const t=T().get(this.elist_idx),e=[...Array(t.length).fill(!0)];if(this.is_internal)for(let s=0;s0}WarnCoolingReliability(){return this.cooling_count=t&&(this.radiator_index=t-1),this.radiator_index<0&&t>0&&(this.radiator_index=0)}GetNumRadiators(){return this.num_radiators}SetRadiator(t){this.radiator_index=t,this.CalculateStats()}GetRadiator(){return this.radiator_index}CanIntakeFan(){return this.IsAirCooled()}SetIntakeFan(t){this.intake_fan=t,this.CalculateStats()}GetIntakeFan(){return this.intake_fan}CanOutboardProp(){return this.use_ds&&(this.IsTractor()||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}GetOutboardProp(){return this.outboard_prop}SetOutboardProp(t){t&&this.use_ds?this.outboard_prop=!0:this.outboard_prop=!1,this.CalculateStats()}SetSelectedList(t){t!=this.elist_idx&&(this.elist_idx=t,this.SetSelectedIndex(0))}GetSelectedList(){return this.elist_idx}GetListOfEngines(){return T().get(this.elist_idx)}RequiresExtendedDriveshafts(){return!this.is_internal&&this.mount_list[this.mount_sel].reqED}SetTailMods(t,e,s){!this.mount_list[this.mount_sel].reqTail||t||e||this.GetGenerator()||(this.use_ds=!0),!this.mount_list[this.mount_sel].reqED||this.GetGenerator()||s&&(t||e)||(this.use_ds=!0)}CanMountIndex(){var t=[...Array(this.mount_list.length).fill(!0)];if(this.is_internal)for(let e=0;e=this.mount_list.length)throw"Index outside of mount_list range.";this.mount_sel=t,this.mount_list[this.mount_sel].reqED?this.SetUseExtendedDriveshaft(!0):this.CalculateStats()}GetMountIndex(){return this.GetIsPulsejet()?-1:this.mount_sel}CanUsePushPull(){return!(this.is_generator||this.GetIsJet()||this.is_internal||this.mount_list[this.mount_sel].helicopter)}SetUsePushPull(t){this.use_pp=t,t?(this.cooling_count*=2,"fuselage"==this.mount_list[this.mount_sel].mount_type&&(this.mount_sel=8)):(this.cooling_count=Math.floor(1e-6+this.cooling_count/2),"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(this.mount_sel=0)),this.CalculateStats()}GetUsePushPull(){return this.use_pp}GetMountList(){return this.mount_list}CanUseExtendedDriveshaft(){return!(0==this.GetNumPropellers()||this.is_internal||this.GetGenerator()||this.mount_list[this.mount_sel].helicopter)}SetUseExtendedDriveshaft(t){this.GetGenerator()||this.is_internal?this.use_ds=!1:this.use_ds=t,this.CalculateStats()}GetUseExtendedDriveshaft(){return this.use_ds}CanUseGears(){return!(0==this.GetNumPropellers()||this.GetGenerator())}SetGearCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gp_count=t,this.SetGearReliability(this.gpr_count)}GetGearCount(){return this.gp_count}SetGearReliability(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gpr_count=Math.min(t,this.gp_count),this.CalculateStats()}GetGearReliability(){return this.gpr_count}SetTorqueToStruct(t){this.torque_to_struct=t,this.use_pp||(this.torque_to_struct=!1),this.CalculateStats()}GetTorqueToStruct(){return this.torque_to_struct}CanTorqueToStruct(){return this.use_pp&&this.etype_stats.torque>0&&"pod"!=this.mount_list[this.mount_sel].mount_type}UpdateReliability(t){this.total_reliability=this.etype_stats.stats.reliability,this.total_reliability-=this.gp_count-this.gpr_count,this.total_reliability+=this.cowl_list[this.cowl_sel].stats.reliability,this.NeedCooling()&&(this.total_reliability-=this.GetMaxCooling()-this.cooling_count),this.GetIntakeFan()&&(this.total_reliability+=6),this.total_reliability+=t}GetReliability(){return this.use_pp?this.outboard_prop?this.total_reliability.toString()+"/"+(this.total_reliability-2).toString():this.total_reliability.toString()+"/"+this.total_reliability.toString():this.outboard_prop?(this.total_reliability-2).toString():this.total_reliability.toString()}GetOverspeed(){return this.is_generator?1e3:this.etype_stats.overspeed+Math.floor(1e-6+this.gp_count*this.etype_stats.overspeed/2)}GetIsPulsejet(){return this.etype_stats.pulsejet}GetIsJet(){return this.GetIsPulsejet()||this.GetIsTurbine()&&!this.GetIsTurboprop()}PulseJetCheck(){this.GetIsPulsejet()&&(this.use_pp=!1,this.use_ds=!1,this.gp_count=0,this.gpr_count=0,this.cooling_count=0,this.has_alternator=!1,this.is_generator=!1,this.cowl_sel=0,this.radiator_index=-1)}GetIsTurbine(){return this.etype_inputs.engine_type==y.TURBOMACHINERY}GetIsTurboprop(){return this.etype_inputs.engine_type==y.TURBOMACHINERY&&3==this.etype_inputs.type}TurbineCheck(){this.GetIsTurbine()&&(0==this.GetNumPropellers()&&(this.use_ds=!1,this.gp_count=0,this.gpr_count=0),this.cooling_count=0,this.cowl_sel=0,this.radiator_index=-1)}GetNumPropellers(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.GetGenerator())||this.GetIsTurboprop()||this.is_internal?this.use_pp?2:1:0}GetIsTractorNacelle(){return this.GetNumPropellers()>0&&!this.GetUsePushPull()&&.8==this.mount_list[this.mount_sel].powerfactor&&!this.is_internal}IsLiquidCooled(){return this.NeedCooling()}IsRotary(){return this.etype_stats.oiltank}IsContraRotary(){return!this.GetIsPulsejet()&&!this.GetIsTurbine()&&""!=this.elist_idx&&3==this.etype_inputs.type}IsAirCooled(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.IsLiquidCooled()||this.IsRotary())}GetCowlList(){return this.cowl_list}GetCowl(){return this.cowl_sel}GetCowlEnabled(){const t=[];for(const e of this.cowl_list)this.GetIsPulsejet()||this.GetIsTurbine()?t.push(e.air&&e.rotary&&e.liquid):this.IsLiquidCooled()?t.push(e.liquid):this.IsRotary()?t.push(e.rotary):t.push(e.air);return t}GetHasOilTank(){return this.etype_stats.oiltank}GetHasOilCooler(){return this.etype_stats.stats.cooling>0}GetHasOilPan(){return this.IsAirCooled()}VerifyCowl(t){const e=this.GetCowlEnabled();e[t]&&(this.cowl_sel=t),e[this.cowl_sel]||(this.cowl_sel=0)}SetCowl(t){this.VerifyCowl(t),this.CalculateStats()}GetGeneratorEnabled(){return!(this.GetIsPulsejet()||this.use_pp||this.GetIsElectric())}GetGenerator(){return this.is_generator}SetGenerator(t){this.GetGeneratorEnabled()?this.is_generator=t:this.is_generator=!1,this.is_generator&&(this.gp_count=0,this.gpr_count=0,this.use_ds=!1,this.use_pp=!1),this.CalculateStats()}GetIsElectric(){return this.etype_inputs.engine_type==y.ELECTRIC}GetAlternatorEnabled(){return!(this.GetIsPulsejet()||this.is_generator||this.GetIsElectric())}GetAlternator(){return this.has_alternator}SetAlternator(t){this.GetAlternatorEnabled()?this.has_alternator=t:this.has_alternator=!1,this.CalculateStats()}GetRumble(){return this.etype_stats.rumble}IsTractor(){return!(this.is_internal||this.GetGenerator()||"Tractor"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetTractorSpinner(){return{has:this.IsTractor()&&!(this.outboard_prop&&!this.use_pp),spinner:this.GetSpinner()}}IsPusher(){return!(this.is_internal||this.GetGenerator()||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetPusherSpinner(){return{has:this.IsPusher()&&!this.outboard_prop,spinner:this.GetSpinner()}}GetSpinner(){if(this.gp_count>0&&!this.GetGenerator()){if(this.use_ds&&("Center-Mounted Tractor"==this.mount_list[this.mount_sel].name||"Center-Mounted Pusher"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name))return[!0,!0];if(!this.etype_stats.oiltank)return[!0,!1]}return[!1,!1]}IsElectrics(){return this.has_alternator||this.GetGenerator()}GetEngineHeight(){return this.GetGenerator()?5:"Pod"==this.mount_list[this.mount_sel].name||this.etype_stats.pulsejet||this.is_internal||this.outboard_prop?2:"Nacelle (Offset)"==this.mount_list[this.mount_sel].name?1:"Nacelle (Inside)"==this.mount_list[this.mount_sel].name||"Channel Tractor"==this.mount_list[this.mount_sel].name||"Wing Pod"==this.mount_list[this.mount_sel].name?0:-1}IsTractorRotary(){return!this.GetGenerator()&&this.IsRotary()&&("Tractor"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}IsDiesel(){return this.etype_inputs.upgrades[3]}SetCalculateStats(t){this.CalculateStats=t}SetInternal(t){this.is_internal=t,t&&(this.use_ds=!1)}VerifyMount(){if(this.GetIsTurbine()&&!this.GetIsTurboprop())for(;!this.mount_list[this.mount_sel].turbine;)this.mount_sel++;else if(this.GetIsPulsejet()){if("fuselage"==this.mount_list[this.mount_sel].mount_type)for(let t=0;t0&&t.era.push({name:"Propeller Gearing",era:"WWI"}),this.gpr_count>0&&t.era.push({name:"Reliable Gearing",era:"Roaring 20s"}),this.use_ds&&(t.mass+=1),t=t.Add(this.cowl_list[this.cowl_sel].stats),t.mass+=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].mpd),t.drag=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].ed),this.use_pp&&(t.power*=2,t.mass*=2,t.cooling*=2,t.fuelconsumption*=2,t.cost*=2,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.upkeep*=2,t.reqsections*=2,t.charge*=2,t.power=Math.floor(1e-6+this.mount_list[this.mount_sel].powerfactor*t.power)),"No Cowling"==this.cowl_list[this.cowl_sel].name||"Sealed Cowl"==this.cowl_list[this.cowl_sel].name||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name||(t.cost+=2),this.IsAirCooled()&&this.intake_fan?(t.mass+=3,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.cost+=4,t.era.push({name:"Air Cooling Fan",era:"WWII"})):this.intake_fan=!1,this.GetHasOilCooler()&&(t.drag+=Math.floor(t.power/15)),this.GetIsPulsejet()||(t=t.Add(this.mount_list[this.mount_sel].stats),t.maxstrain-=Math.floor(1e-6+this.mount_list[this.mount_sel].strainfactor*this.etype_stats.stats.mass),t.drag+=Math.floor(1e-6+this.mount_list[this.mount_sel].dragfactor*this.etype_stats.stats.mass)),this.is_generator?(t.charge=Math.floor(1e-6+2*t.power/10)+2,t.power=0,t.visibility=2):this.has_alternator&&(t.charge=Math.floor(1e-6+t.power/10)+1,t.mass+=1,t.cost+=2,this.use_pp&&"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(t.mass+=1,t.cost+=2)),this.outboard_prop&&(t.drag+=3,this.use_pp&&(t.escape+=2)),this.is_first_pulsejet&&(t.cost+=5),t.pitchspeed=0,t.reliability=0,t}GetElectrics(){return{storage:0,equipment:[]}}}class V extends H{constructor(t,e,s){super(),this.need_cool=0,this.idx_type=1,this.idx_mount=1,this.idx_coolant=0,this.metal_area=0,this.engine_count=0,this.type_list=t,this.mount_list=e,this.coolant_list=s,this.harden_cool=!1}toJSON(){return{type:this.idx_type,mount:this.idx_mount,coolant:this.idx_coolant,harden_cool:this.harden_cool}}fromJSON(t,e){this.idx_type=t.type,this.idx_mount=t.mount,this.idx_coolant=t.coolant,e>10.85&&(this.harden_cool=t.harden_cool)}serialize(t){t.PushNum(this.idx_type),t.PushNum(this.idx_mount),t.PushNum(this.idx_coolant),t.PushBool(this.harden_cool)}derserialize(t){this.idx_type=t.GetNum(),this.idx_mount=t.GetNum(),this.idx_coolant=t.GetNum(),t.version>10.85&&(this.harden_cool=t.GetBool())}GetTypeList(){return this.type_list}GetMountList(){return this.mount_list}GetCoolantList(){return this.coolant_list}CanType(){const t=[...Array(this.type_list.length).fill(!0)];for(let e=0;et;)this.engines.pop();var e=null;for(this.engines.length>0&&(e=JSON.stringify(this.engines[this.engines.length-1].toJSON()));this.engines.lengtht;)this.radiators.pop();for(;this.radiators.length0&&!this.NeedCooling()&&this.SetNumberOfRadiators(0),this.radiators.length}NeedCooling(){let t=!1;for(const e of this.engines)t=t||e.NeedCooling();return t}UpdateReliability(t){for(const e of this.engines){let s=new u;e.GetRadiator()=0&&(s=this.radiators[e.GetRadiator()].PartStats()),e.UpdateReliability(t.reliability+s.reliability)}}SetAsymmetry(t){this.is_asymmetric=t,this.CalculateStats()}GetAsymmetry(){return this.is_asymmetric}GetNumPropellers(){var t=0;for(const e of this.engines)t+=e.GetNumPropellers();return t}GetOverspeed(){let t=100;for(const e of this.engines)t=Math.min(t,e.GetOverspeed());return t}GetRumble(){var t=0;for(const e of this.engines)t+=e.GetRumble();return t}GetMaxRumble(){var t=0;for(const e of this.engines)t=Math.max(t,e.GetRumble());return t}GetTractorSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetTractorSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}GetPusherSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetPusherSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}IsElectrics(){for(const t of this.engines)if(t.IsElectrics())return!0;return!1}HaveParasol(t){for(const e of this.radiators)e.SetParasol(t)}SetMetalArea(t){for(const e of this.radiators)e.SetMetalArea(t)}SetTailMods(t,e,s){for(const i of this.engines)i.SetTailMods(t,e,s)}GetEngineHeight(){var t=2;for(const e of this.engines)t=Math.min(t,e.GetEngineHeight());return t}HasTractorRotary(){for(const t of this.engines)if(t.IsTractorRotary())return!0;return!1}SetInternal(t){for(const e of this.engines)e.SetInternal(t);if(t)for(const t of this.radiators)t.SetMetalArea(0),t.SetParasol(!1)}HasPulsejet(){for(const t of this.engines)if(t.GetIsPulsejet())return!0;return!1}HasTurbineNoProp(){for(const t of this.engines)if(t.GetIsTurbine()&&0==t.GetNumPropellers())return!0;return!1}HasDiesel(){for(const t of this.engines)if(t.IsDiesel())return!0;return!1}GetEngineTypes(){var t=[];for(const e of this.engines)e.GetNumPropellers()>0?t.push({type:C.PROPELLER,num:e.GetNumPropellers()}):e.GetIsPulsejet()?t.push({type:C.PULSEJET,num:0}):e.GetIsTurbine()&&t.push({type:C.TURBINE,num:e.GetCurrentStats().stats.pitchspeed});return t}GetIsFlammable(){for(const t of this.radiators)if(t.GetIsFlammable())return!0;return!1}PartStats(){var t=new u;const e=new Array(this.GetNumberOfRadiators()).fill(null).map((()=>({cool:0,count:0})));var s=0,i=100,a=!1,r=2;for(let n of this.engines){!a&&n.GetIsPulsejet()?(a=!0,n.SetFirstPulsejet(!0)):n.SetFirstPulsejet(!1);const o=n.PartStats();r=Math.min(r,o.visibility),t=t.Add(o),n.NeedCooling()&&(e[n.GetRadiator()].cool+=n.GetCooling(),e[n.GetRadiator()].count+=1),s+=n.GetCurrentStats().stats.cost,o.pitchspeed>0&&(i=Math.min(i,o.pitchspeed))}t.visibility=r,i<100&&(t.pitchspeed=i),t.upkeep=Math.floor(1e-6+Math.min(t.upkeep,s));let o=new u;const l=new Map;for(let t=0;t0?t.warnings.push({source:h("Rotary"),warning:h("Rotary Right Warning"),color:c.WHITE}):m<0&&t.warnings.push({source:h("Rotary"),warning:h("Rotary Left Warning"),color:c.WHITE}),t.reliability=0,t}SetCalculateStats(t){this.CalculateStats=t}GetHasTractorNacelles(){let t=0;for(const e of this.engines)e.GetIsTractorNacelle()&&t++;return t>1}GetElectrics(){let t={storage:0,equipment:[]};for(let e=0;e10.25&&(this.sel_skin=t.sel_skin),this.interal_bracing_count=this.CountInternalBracing()}serialize(t){t.PushNum(this.section_list.length);for(let e=0;e10.25&&(this.sel_skin=t.GetNum()),this.interal_bracing_count=this.CountInternalBracing()}DuplicateSection(t,e=1){const s=this.section_list[t];for(let i=0;ithis.CountSections()+this.tail_section_list.length)for(let t=this.section_list.length-1;t>=0;t--)if(this.section_list[t].internal_bracing){this.interal_bracing_count--,this.section_list.splice(t,1);break}e&&this.CalculateStats()}}SetRequiredSections(t){if(this.required_sections=t,this.required_sections>this.CountSections()&&(0==this.section_list.length&&this.section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),this.required_sections-this.CountSections()>0))for(let t=this.section_list.length-1;t>=0;t--)if(!this.section_list[t].internal_bracing)return void this.DuplicateSection(t,this.required_sections-this.CountSections())}SetRequiredTailSections(t){for(t>this.tail_section_list.length&&(0==this.tail_section_list.length&&this.tail_section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),t-this.tail_section_list.length>0&&this.DuplicateTailSection(this.tail_section_list.length-1,t-this.tail_section_list.length));t0&&!this.section_list[t].internal_bracing;t--);this.DeleteSection(t,!1)}this.CalculateStats()}CountSections(){return this.section_list.length-this.interal_bracing_count}GetNumFrames(){return this.CountSections()+this.tail_section_list.length}CountInternalBracing(){var t=0;for(const e of this.section_list)e.internal_bracing&&t++;return t}BaseType(){const t=[...Array(this.frame_list.length).fill(0)];for(const e of this.section_list)e.internal_bracing||t[e.frame]++;for(const e of this.tail_section_list)e.internal_bracing||t[e.frame]++;var e=0,s=0;for(let i=t.length-1;i>=0;i--)t[i]>s&&(s=t[i],e=i);return e}GetFrameList(){return this.frame_list}GetSkinList(){return this.skin_list}GetSectionList(){return this.section_list}SetFrame(t,e){this.section_list[t].frame=e,this.frame_list[e].geodesic||(this.section_list[t].geodesic=!1),this.CalculateStats()}SetGeodesic(t,e){this.frame_list[this.section_list[t].frame].geodesic&&(this.section_list[t].geodesic=e,this.CalculateStats())}SetMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].monocoque=e,this.CalculateStats())}SetLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].lifting_body=e,this.CalculateStats())}SetInternalBracing(t,e){e&&!this.section_list[t].internal_bracing&&this.PossibleInternalBracing(!0)&&this.CountSections()>this.required_sections?(this.section_list[t].internal_bracing=!0,this.section_list[t].monocoque=!1,this.section_list[t].lifting_body=!1,this.interal_bracing_count++,this.CalculateStats()):e||(this.section_list[t].internal_bracing=!1,this.interal_bracing_count--,this.CalculateStats())}PossibleInternalBracing(t=!1){var e=this.CountSections();return this.farman||(e+=this.tail_section_list.length),t&&(e-=1),this.interal_bracing_count+1<=e}PossibleGeodesic(t){return this.frame_list[this.section_list[t].frame].geodesic&&!this.section_list[t].monocoque}PossibleMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].lifting_body}PossibleLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].monocoque}PossibleTailGeodesic(t){return this.frame_list[this.tail_section_list[t].frame].geodesic&&!this.tail_section_list[t].monocoque}PossibleTailMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].lifting_body}PossibleTailLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].monocoque}PossibleRemoveSections(){return this.CountSections()>this.required_sections}GetFarmanOrBoom(){return this.farman||this.boom}SectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),t.internal_bracing||(e.drag+=4,t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}TailSectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),e.drag+=4,this.farman||(t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}CountMainLiftingBody(){var t=0;for(const e of this.section_list)e.lifting_body&&t++;return t}CountTailLiftingBody(){var t=0;for(const e of this.tail_section_list)e.lifting_body&&t++;return t}CountLiftingBody(){return this.CountMainLiftingBody()+this.CountTailLiftingBody()}SetIsTandem(t){this.is_tandem!=t&&(this.is_tandem=t,this.SetTailType(this.sel_tail))}SetTailType(t){0==this.tail_list[t].stats.reqsections&&this.is_tandem&&t++,this.sel_tail=t,this.SetRequiredTailSections(this.tail_list[t].stats.reqsections)}GetTailType(){return this.sel_tail}GetTailList(){return this.tail_list}GetTailSectionList(){return this.tail_section_list}SetUseFarman(t){if(this.farman=t,t&&this.boom&&(this.boom=!1),this.farman)for(const t of this.tail_section_list)t.monocoque=!1,t.lifting_body=!1;this.CalculateStats()}GetUseFarman(){return this.farman}SetUseBoom(t){this.boom=t,t&&this.farman&&(this.farman=!1),this.CalculateStats()}GetUseBoom(){return this.boom}SetTailFrame(t,e){this.tail_section_list[t].frame=e,this.frame_list[e].geodesic||(this.tail_section_list[t].geodesic=!1),this.CalculateStats()}SetTailGeodesic(t,e){this.frame_list[this.tail_section_list[t].frame].geodesic&&(this.tail_section_list[t].geodesic=e,this.CalculateStats())}SetTailMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].monocoque=e,this.CalculateStats())}SetTailLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].lifting_body=e,this.CalculateStats())}SetHasTractorNacelles(t){this.has_tractor_nacelles=t}GetHasTractorNacelles(){return this.has_tractor_nacelles}CanFlyingWing(){for(const t of this.section_list)if(t.lifting_body)return!0;for(const t of this.tail_section_list)if(t.lifting_body)return!0;return!1}GetFlyingWing(){return this.flying_wing}SetFlyingWing(t){t&&this.CanFlyingWing()?this.flying_wing=!0:this.flying_wing=!1,this.CalculateStats()}GetIsTailless(){return 0==this.tail_section_list.length}SetAllFrame(t){for(const e of this.section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);for(const e of this.tail_section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);this.CalculateStats()}SetAllSkin(t){this.sel_skin=t;for(const e of this.section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);for(const e of this.tail_section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);this.CalculateStats()}GetArmor(){return"Dragon Skin"==this.skin_list[this.sel_skin].name?5:0}GetIsFlammable(){return!!this.skin_list[this.sel_skin].flammable}GetSkin(){return this.sel_skin}CanCutout(){let t=this.section_list.length*this.skin_list[this.sel_skin].stats.visibility;return this.farman?t+=this.tail_section_list.length:t+=this.tail_section_list.length*this.skin_list[this.sel_skin].stats.visibility,t<3}SetCalculateStats(t){this.CalculateStats=t}PartStats(){this.CanFlyingWing()||(this.flying_wing=!1);var t=new u;const e=this.BaseType();t.structure=this.frame_list[e].basestruct,t.cost=this.frame_list[e].basecost;var s=this.skin_list[this.sel_skin].monocoque_structure<0;for(const e of this.section_list)t=t.Add(this.SectionStats(e)),s=s&&(e.internal_bracing||e.monocoque);var i=new u;for(const t of this.tail_section_list)i=i.Add(this.TailSectionStats(t)),this.farman||(s=s&&(t.internal_bracing||t.monocoque));s&&(t.structure+=30),t=t.Add(this.tail_list[this.sel_tail].stats),this.boom&&(i.maxstrain-=i.mass,this.has_tractor_nacelles||(i.drag=Math.floor(1e-6+1.5*i.drag))),this.farman?(t.drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor,t.visibility+=this.tail_section_list.length,i.mass=Math.floor(1e-6+.5*i.mass),t=t.Add(i)):((t=t.Add(i)).drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor);const a=this.CountLiftingBody();return t.cost+=a,this.flying_wing?t.liftbleed+=5:t.drag+=a,this.PossibleRemoveSections()&&this.CountMainLiftingBody()11.15)this.wing_list=t.wing_list,this.mini_wing_list=t.mini_wing_list;else{const e=t.wing_list;this.wing_list=this.OldtoNew(e);const s=t.mini_wing_list;this.mini_wing_list=this.OldtoNew(s)}this.wing_stagger=t.wing_stagger,this.is_swept=t.is_swept,this.is_closed=t.is_closed}OldtoNew(t){const e=[];for(const s of t)e.push({surface:s.surface,area:s.area,span:s.span,anhedral:s.anhedral,dihedral:s.dihedral,gull:!1,deck:s.deck});return e}serialize(t){t.PushNum(this.wing_list.length);for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.wing_list.push(e)}const s=t.GetNum();this.mini_wing_list=[];for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.mini_wing_list.push(e)}this.wing_stagger=t.GetNum(),this.is_swept=t.GetBool(),this.is_closed=t.GetBool()}SetRotorSpan(t){this.rotor_span=t}GetWingList(){return this.wing_list}GetMiniWingList(){return this.mini_wing_list}GetSkinList(){return this.skin_list}GetStaggerList(){return this.stagger_list}GetDeckList(){return this.deck_list}DeckCountFull(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.wing_list)t[e.deck]++;return t}DeckCountMini(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.mini_wing_list)t[e.deck]++;return t}CanStagger(){const t=[...Array(this.stagger_list.length).fill(!1)];if(this.acft_type==N.ORNITHOPTER_FLUTTER)this.wing_list.length>1?t[1]=!0:t[0]=!0;else{if(this.wing_list.length>1)for(let e=1;e1?this.wing_stagger=1:this.wing_stagger=0)}SetStagger(t){for(this.wing_stagger=t;this.stagger_list[t].wing_count=0;e--){const s=this.wing_list[e];t[s.deck]>1&&this.deck_list[s.deck].limited&&(t[s.deck]--,this.wing_list.splice(e,1))}}this.CalculateStats()}GetStagger(){return this.wing_list.length>0?this.wing_stagger:-1}CanAddFullWing(t){if(t>=this.deck_list.length&&console.log("Deck out of Bounds"),!this.stagger_list[this.wing_stagger].inline){if(t==D.SHOULDER&&this.HasPolishWing())return!1;if(this.DeckCountFull()[t]==D.SHOULDER&&this.deck_list[t].limited)return!1}return 0==this.DeckCountMini()[t]}CanAddMiniWing(t){const e=this.DeckCountFull(),s=this.DeckCountMini();return 0==e[t]&&0==s[t]}CanMoveFullWing(t,e){const s=this.wing_list[t];this.wing_list.splice(t,1);const i=this.CanAddFullWing(e);return this.wing_list.splice(t,0,s),i}CanMoveMiniWing(t,e){const s=this.mini_wing_list[t];this.mini_wing_list.splice(t,1);const i=this.CanAddMiniWing(e);return this.mini_wing_list.splice(t,0,s),i}GetWingHeight(){let t=0;for(const e of this.wing_list)t=Math.max(t,4-e.deck);return t}CanClosed(){return this.wing_list.length>1}SetClosed(t){this.wing_list.length>0?this.is_closed=t:this.is_closed=!1,this.CalculateStats()}GetClosed(){return this.is_closed}CanSwept(){return this.wing_list.length>0}SetSwept(t){this.wing_list.length>0?this.is_swept=t:this.is_swept=!1,this.CalculateStats()}GetSwept(){return this.is_swept}GetTandem(){return this.stagger_list[this.wing_stagger].inline&&this.wing_list.length>1}GetMonoplane(){return 1==this.wing_list.length}GetStaggered(){return 0!=this.stagger_list[this.wing_stagger].stats.liftbleed}SetFullWing(t,e){this.wing_list.length!=t&&this.wing_list.splice(t,1),e.area!=e.area&&(e.area=3),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,3),e.span=Math.max(e.span,1),this.CanAddFullWing(e.deck)&&this.wing_list.splice(t,0,e)),this.wing_list.length>1&&0==this.wing_stagger?this.wing_stagger=4:this.wing_list.length<=1&&(this.wing_stagger=0),e.dihedral=Math.floor(1e-6+e.dihedral),e.anhedral=Math.floor(1e-6+e.anhedral),e.dihedral=Math.max(0,Math.min(e.dihedral,e.span-1)),e.anhedral=Math.max(0,Math.min(e.anhedral,e.span-1-e.dihedral)),this.CalculateStats()}SetMiniWing(t,e){this.mini_wing_list.length!=t&&this.mini_wing_list.splice(t,1),e.area!=e.area&&(e.area=2),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,1),e.area=Math.min(e.area,2),e.span=Math.max(e.span,1),this.CanAddMiniWing(e.deck)&&this.mini_wing_list.splice(t,0,e)),this.CalculateStats()}HasNonGullDeck(t){for(const e of this.wing_list)if(e.deck==t&&!e.gull)return!0;return!1}CanGull(t){if(t==D.PARASOL){if(!this.GetTandem()&&this.HasNonGullDeck(D.SHOULDER))return!1}else{if(t==D.SHOULDER)return!1;if(!this.GetTandem()&&this.HasNonGullDeck(t-1))return!1}return!0}IsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}NeedHStab(){return this.stagger_list[this.wing_stagger].hstab}NeedTail(){return this.NeedHStab()||!this.is_swept}GetSpan(){let t=0;for(const e of this.wing_list){const s=e.span;t=Math.max(t,s)}for(const e of this.mini_wing_list){const s=e.span;t=Math.max(t,s)}return t}GetArea(){let t=0;for(const e of this.wing_list)t+=e.area;for(const e of this.mini_wing_list)t+=e.area;return t}GetParasol(){for(const t of this.wing_list)if(t.deck==D.PARASOL)return!0;for(const t of this.mini_wing_list)if(t.deck==D.PARASOL)return!0;return!1}GetMetalArea(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].metal&&(t+=e.area);for(const e of this.mini_wing_list)this.skin_list[e.surface].metal&&(t+=e.area);return t}GetWingDrag(){let t=0;const e=this.DeckCountFull();let s=0,i=0;for(const a of this.wing_list){const n=a.span;let r=a.area;s=Math.max(s,n),a.gull&&(r=Math.floor(1e-6+1.1*r));let o=Math.max(1,6*r*r/(n*n));o=Math.max(1,o*this.skin_list[a.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&e[a.deck]>1&&(o=Math.floor(1e-6+.75*o),o=Math.max(1,o)),o=Math.floor(1e-6+o),s==n&&(i=i),t+=o}for(const e of this.mini_wing_list){const s=e.span;let i=Math.max(1,6*e.area*e.area/(s*s));i=Math.max(1,i*this.skin_list[e.surface].dragfactor),i=Math.floor(1e-6+i),t+=i}const a=this.GetIsSesquiplane();return(a.is||this.GetMonoplane())&&-1!=a.deck&&(t-=Math.floor(1e-6+(1-this.long_list[a.deck].dragfactor)*i)),t}GetIsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}SetAircraftMass(t){this.plane_mass=t}GetPaperMass(){let t=0;for(const e of this.wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}for(const e of this.mini_wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}return Math.max(-Math.floor(1e-6+.25*this.plane_mass),t)}GetIsSesquiplane(){let t=0,e=-1,s=0,i=1e100,a=0;for(const n of this.wing_list)n.area>t?(t=n.area,e=n.deck,s=n.span):n.area==t&&(e=-1),i>n.area&&(i=n.area,a=n.span);let n=t>=2*i;return n=n&&!this.GetMonoplane()&&!this.GetTandem(),n?{is:n,deck:e,super_small:.75*s>=a}:{is:!1,deck:e,super_small:!1}}HasPolishWing(){for(const t of this.wing_list)if(t.deck==D.PARASOL&&1==t.gull)return!0;return!1}HasInvertedGull(){let t=-1;for(const e of this.wing_list)e.gull&&e.deck>D.SHOULDER&&(t=Math.max(t,e.deck));return t}CanCutout(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].transparent&&(t+=1);return t<3}PartStats(){this.CanClosed()||(this.is_closed=!1),this.CanSwept()||(this.is_swept=!1);var t=new u;let e=!1;const s=this.DeckCountFull();let i=!1,a=this.rotor_span,n=0,r=0;for(let i of this.wing_list){this.CanGull(i.deck)||(i.gull=!1),a=Math.max(a,i.span),e?(t.control+=3,t.liftbleed+=5,t.visibility-=1):e=!0;let o=new u;o=o.Add(this.skin_list[i.surface].stats.Multiply(i.area)),o.wingarea=i.area,o.maxstrain+=Math.min(0,-(2*i.span+i.area-10)),this.acft_type==N.ORNITHOPTER_BUZZER&&(o.maxstrain+=Math.min(0,-(2*i.span+i.area-10))),o.maxstrain*=this.skin_list[i.surface].strainfactor,this.skin_list[i.surface].transparent&&r<3&&(o.visibility+=1,r+=1);const l=i.span;let h=i.area;i.gull&&(h=Math.floor(1e-6+1.1*h));const c=Math.max(1,6*h*h/(l*l));o.drag=o.drag+c,o.drag=Math.max(1,o.drag*this.skin_list[i.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&s[i.deck]>1&&(o.drag=Math.floor(1e-6+.75*o.drag),o.drag=Math.max(1,o.drag)),t=t.Add(this.deck_list[i.deck].stats),o.latstab+=i.dihedral-i.anhedral,o.liftbleed+=i.dihedral+i.anhedral,o.Round(),a==i.span&&(n=o.drag),o.mass<0&&(o.mass=0),t=t.Add(o)}for(const e of this.mini_wing_list){a=Math.max(a,e.span),t.control+=1,i?t.liftbleed+=1:i=!0;const s=this.skin_list[e.surface].stats.Multiply(e.area);s.wingarea=e.area,s.maxstrain+=Math.min(0,-(2*e.span+e.area-10)),s.maxstrain*=this.skin_list[e.surface].strainfactor;const n=e.span;s.drag=Math.max(1,s.drag+6*e.area*e.area/(n*n)),s.drag=Math.max(1,s.drag*this.skin_list[e.surface].dragfactor),s.latstab+=e.dihedral-e.anhedral,s.liftbleed+=e.dihedral+e.anhedral,s.Round(),s.mass<0&&(s.mass=0),t=t.Add(s)}t.control+=8-a,t.latstab+=Math.min(0,a-8);const o=this.GetIsSesquiplane();if((o.is||this.GetMonoplane())&&-1!=o.deck&&((t=t.Add(this.long_list[o.deck].stats)).drag-=Math.floor(1e-6+(1-this.long_list[o.deck].dragfactor)*n)),o.is&&(t.liftbleed-=2,t.control+=2),this.stagger_list[this.wing_stagger].inline)for(const e of s)e>1&&(t.liftbleed+=3*(e-1));switch(this.HasPolishWing()&&(t.visibility+=1,t.maxstrain+=10),this.HasInvertedGull()){case 1:case 2:case 3:break;case 4:t.maxstrain+=10,t.crashsafety+=1}if((this.HasInvertedGull()>0||this.HasPolishWing())&&t.era.push({name:"Gull Wing",era:"Coming Storm"}),this.is_swept&&(t.liftbleed+=5,t.latstab--),this.is_closed){const e=Math.floor(1e-6+this.wing_list.length/2);t.mass+=1*e,t.control-=5*e,t.maxstrain+=20*e}return this.wing_list.length>1&&(t=t.Add(this.stagger_list[this.wing_stagger].stats)),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){const t={storage:0,equipment:[]};let e=0,s="";for(const t of this.wing_list){const i=this.skin_list[t.surface];0!=i.stats.charge&&(s=h(i.name),e+=i.stats.charge*t.area,e=Math.floor(1e-6+e))}return 0!=e&&t.equipment.push({source:s,charge:e.toString()}),t}}class tt extends H{constructor(t){super(),this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.is_heli=!1,this.hstab_sel=0,this.hstab_count=1,this.hstab_list=[];for(const e of t.hstab)this.hstab_list.push({name:e.name,is_canard:e.is_canard,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail});this.vstab_sel=0,this.vstab_count=1,this.vstab_list=[];for(const e of t.vstab)this.vstab_list.push({name:e.name,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail})}toJSON(){return{hstab_sel:this.hstab_sel,hstab_count:this.hstab_count,vstab_sel:this.vstab_sel,vstab_count:this.vstab_count}}fromJSON(t,e){this.hstab_sel=t.hstab_sel,this.hstab_count=t.hstab_count,this.vstab_sel=t.vstab_sel,this.vstab_count=t.vstab_count}serialize(t){t.PushNum(this.hstab_sel),t.PushNum(this.hstab_count),t.PushNum(this.vstab_sel),t.PushNum(this.vstab_count)}deserialize(t){this.hstab_sel=t.GetNum(),this.hstab_count=t.GetNum(),this.vstab_sel=t.GetNum(),this.vstab_count=t.GetNum()}IsDefault(){return 0==this.hstab_sel&&1==this.hstab_count&&0==this.vstab_sel&&1==this.vstab_count}GetHStabList(){return this.hstab_list}GetVStabList(){return this.vstab_list}GetHStabType(){return this.hstab_sel}SetHStabType(t){("The Wings"!=this.hstab_list[t].name||this.is_tandem||this.is_swept)&&(this.hstab_list[t].is_vtail?this.SetVTail():this.hstab_list[this.hstab_sel].is_vtail&&(this.vstab_sel=0,this.vstab_count=1),this.hstab_sel=t,this.SetHStabCount(this.hstab_count))}GetHValidList(){var t=[];if(this.is_heli)t=Array(this.hstab_list.length).fill(!1),this.have_tail?t[0]=!0:t[1]=!0;else for(const e of this.hstab_list)"The Wings"!=e.name&&"Outboard"!=e.name||this.is_tandem||this.is_swept?e.is_tail&&!this.have_tail?t.push(!1):t.push(!0):t.push(!1);return t}GetIsVTail(){return this.hstab_list[this.hstab_sel].is_vtail}SetVTail(){for(let t=0;t=0?this.hstab_list[this.hstab_sel].increment:1}GetVStabCount(){return this.vstab_count}SetVStabCount(t){if((t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.vstab_count=t,0!=this.vstab_list[this.vstab_sel].increment)for(;this.vstab_count%this.vstab_list[this.vstab_sel].increment!=0;)this.vstab_count++;else this.vstab_count=0;this.CalculateStats()}GetVStabIncrement(){return this.vstab_sel>=0?this.vstab_list[this.vstab_sel].increment:1}SetEngineCount(t){this.engine_count=t}GetIsTandem(){return this.is_tandem}SetIsTandem(t){this.is_tandem=t}SetIsSwept(t){this.is_swept=t}CanVOutboard(){return this.is_swept||this.is_tandem||this.hstab_list[this.hstab_sel].is_canard&&this.hstab_count>0}GetVOutboard(){return"Outboard"==this.vstab_list[this.vstab_sel].name}GetCanard(){return this.hstab_list[this.hstab_sel].is_canard}SetLiftingArea(t){this.lifting_area=t}SetHaveTail(t){if(this.have_tail=t,!t){this.GetHValidList()[this.hstab_sel]||(this.hstab_sel=2);const t=this.GetVValidList();t[this.vstab_sel]||(t[1]||(this.hstab_sel=2),this.vstab_sel=1,this.vstab_count%2!=0&&this.vstab_count++)}this.is_heli&&(this.have_tail?this.hstab_sel=0:this.hstab_sel=1,this.hstab_count=1)}SetHelicopter(t){this.is_heli=t,t&&(this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.lifting_area=0,this.engine_count=0,this.hstab_sel=0,this.hstab_count=1,this.vstab_sel=0,this.vstab_count=1)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=this.GetHValidList();t[this.hstab_sel]||(this.hstab_sel=0,t[this.hstab_sel]||(this.hstab_sel=0,this.hstab_count=0));const e=this.GetVValidList();e[this.vstab_sel]||(this.vstab_sel=0,e[this.vstab_sel]||(this.vstab_sel=0,this.vstab_count=0));var s=new u;if(this.hstab_count>0){s=s.Add(this.hstab_list[this.hstab_sel].stats);var i=0;this.is_heli?(i=Math.floor(1e-6+this.wing_drag/8*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/4*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(1,i))}else(this.hstab_sel<0||0!=this.hstab_list[this.hstab_sel].increment)&&(s.pitchstab-=Math.floor(1e-6+this.lifting_area/2),s.liftbleed+=5);if(this.vstab_count>0?(s=s.Add(this.vstab_list[this.vstab_sel].stats),i=0,this.is_heli?(i=Math.floor(1e-6+this.wing_drag/16*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/8*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(1,i))):(this.vstab_sel<0||0!=this.vstab_list[this.vstab_sel].increment||0==this.vstab_list[this.vstab_sel].increment&&0==this.hstab_count)&&(s.latstab-=this.lifting_area),s.drag+=2*(Math.max(0,this.hstab_count-1)+Math.max(0,this.vstab_count-1)),this.vstab_sel>=0&&0!=this.vstab_list[this.vstab_sel].increment){var a=Math.max(0,this.hstab_count-1);const t=Math.min(this.engine_count-1,this.vstab_count-1);a+=Math.max(0,this.vstab_count-1-t),s.control+=3*t+a}else{const t=Math.max(0,Math.min(this.engine_count-1,this.hstab_count-1));a=Math.max(0,this.hstab_count-1-t),s.control+=3*t+a}return s}GetElectrics(){return{storage:0,equipment:[]}}}class et extends H{constructor(t){super(),this.span=0,this.is_cantilever=0,this.wing_area=0,this.mp=0,this.is_boom=!1,this.acft_type=N.AIRPLANE,this.aileron_sel=0,this.aileron_list=[];for(const e of t.ailerons)this.aileron_list.push({name:e.name,warping:e.warping,stats:new u(e)});this.rudder_sel=0,this.rudder_list=[];for(const e of t.rudders)this.rudder_list.push({name:e.name,stats:new u(e)});this.elevator_sel=0,this.elevator_list=[];for(const e of t.elevators)this.elevator_list.push({name:e.name,stats:new u(e)});this.flaps_sel=0,this.flaps_list=[];for(const e of t.flaps)this.flaps_list.push({name:e.name,costfactor:e.costfactor,stats:new u(e)});this.slats_sel=0,this.slats_list=[];for(const e of t.slats)this.slats_list.push({name:e.name,stats:new u(e)});this.drag_list=[];for(const e of t.drag_inducers)this.drag_list.push({name:e.name,stats:new u(e)});this.drag_sel=[...Array(this.drag_list.length).fill(!1)]}toJSON(){return{aileron_sel:this.aileron_sel,rudder_sel:this.rudder_sel,elevator_sel:this.elevator_sel,flaps_sel:this.flaps_sel,slats_sel:this.slats_sel,drag_sel:this.drag_sel}}fromJSON(t,e){this.aileron_sel=t.aileron_sel,this.rudder_sel=t.rudder_sel,this.elevator_sel=t.elevator_sel,this.flaps_sel=t.flaps_sel,this.slats_sel=t.slats_sel,this.drag_sel=b(t.drag_sel,this.drag_sel.length)}serialize(t){t.PushNum(this.aileron_sel),t.PushNum(this.rudder_sel),t.PushNum(this.elevator_sel),t.PushNum(this.flaps_sel),t.PushNum(this.slats_sel),t.PushBoolArr(this.drag_sel)}deserialize(t){this.aileron_sel=t.GetNum(),this.rudder_sel=t.GetNum(),this.elevator_sel=t.GetNum(),this.flaps_sel=t.GetNum(),this.slats_sel=t.GetNum(),this.drag_sel=t.GetBoolArr(this.drag_sel.length)}IsDefault(){return 0==this.aileron_sel&&0==this.rudder_sel&&0==this.elevator_sel&&0==this.flaps_sel&&0==this.slats_sel&&0==this.drag_sel.reduce(((t,e)=>t||e),!1)}GetAileronList(){return this.aileron_list}CanAileron(){const t=[];if(W(this.acft_type))for(const e of this.aileron_list)t.push(e.warping);else for(const e of this.aileron_list)e.warping&&0==this.wing_area?t.push(!1):t.push(!0);return t}GetAileron(){return this.aileron_sel}SetAileron(t){this.aileron_sel=t,this.CalculateStats()}GetRudderList(){return this.rudder_list}CanRudder(){return this.can_rudder}SetCanRudder(t){this.can_rudder=t,t||(this.rudder_sel=0)}GetRudder(){return this.rudder_sel}SetRudder(t){this.rudder_sel=t,this.CalculateStats()}GetElevatorList(){return this.elevator_list}CanElevator(){return this.can_elevator}SetCanElevator(t){this.can_elevator=t,t||(this.elevator_sel=0)}GetElevator(){return this.elevator_sel}SetElevator(t){this.elevator_sel=t,this.CalculateStats()}GetFlapsList(){return this.flaps_list}GetFlaps(){return this.flaps_sel}SetFlaps(t){this.flaps_sel=t,this.CalculateStats()}GetFlapCost(t){return t&&(this.mp=t),this.flaps_list[this.flaps_sel].costfactor>0?Math.max(1,Math.floor(1e-6+this.flaps_list[this.flaps_sel].costfactor*this.mp)):0}GetSlatsList(){return this.slats_list}GetSlats(){return this.slats_sel}SetSlats(t){this.slats_sel=t,this.CalculateStats()}GetDragList(){return this.drag_list}GetDrag(){return this.drag_sel}SetDrag(t,e){this.drag_sel[t]=e,this.CalculateStats()}SetNumCantilever(t){this.is_cantilever=t}SetSpan(t){this.span=t}SetWingArea(t){this.wing_area=t}SetAcftType(t){if(this.acft_type=t,this.acft_type==N.HELICOPTER){this.aileron_sel=0,this.rudder_sel=0,this.elevator_sel=0,this.flaps_sel=0,this.slats_sel=0;for(let t=0;tt)),this.is_cantilever=0}}SetBoomTail(t){this.is_boom=t}SetIsVTail(t){t&&(this.rudder_sel=this.elevator_sel)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;this.aileron_list[this.aileron_sel].warping&&0==this.wing_area&&(this.aileron_sel=0),t=t.Add(this.aileron_list[this.aileron_sel].stats),this.aileron_list[this.aileron_sel].warping&&(t.maxstrain-=this.span,this.is_cantilever&&(t.cost+=2*this.is_cantilever,t.era.push({name:h("Cantilever Wing Warping"),era:"Last Hurrah"})),this.is_boom&&(t.pitchstab-=2,t.latstab-=2,t.warnings.push({source:h("Wing Warping"),warning:h("Wing Warping Warning"),color:c.WHITE}))),t=(t=(t=(t=t.Add(this.rudder_list[this.rudder_sel].stats)).Add(this.elevator_list[this.elevator_sel].stats)).Add(this.flaps_list[this.flaps_sel].stats)).Add(this.slats_list[this.slats_sel].stats);for(let e=0;e10.25&&t.wing_blades,e<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}serialize(t){t.PushNumArr(this.ext_wood_count),t.PushNumArr(this.ext_steel_count),t.PushNumArr(this.cant_count),t.PushBool(this.wires),t.PushNum(this.cabane_sel),t.PushBool(this.wing_blades)}deserialize(t){this.ext_wood_count=t.GetNumArr(this.ext_wood_count.length),this.ext_steel_count=t.GetNumArr(this.ext_steel_count.length),this.cant_count=t.GetNumArr(this.cant_count.length),this.wires=t.GetBool(),this.cabane_sel=t.GetNum(),t.version>10.25?this.wing_blades=t.GetBool():this.wing_blades=!1,t.version<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}GetExternalList(){return this.ext_wood_list}GetCantileverList(){return this.cant_list}CanExternalWood(){const t=[...Array(this.ext_wood_list.length).fill(this.can_external)];for(let e=0;e0}SetCantileverCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.ImplSCC(t,e),this.CalculateStats()}ImplSCC(t,e){var s=e-this.cant_count[t];if(this.cant_list[t].limited&&e>0){var i=this.TotalStructure();for(let t=0;tthis.acft_structure)for(let t=this.cant_list.length-1;t>=0;t--)s=s||this.ImplSCC(t,this.cant_count[t]);s&&this.CalculateStats()}TotalStructure(){var t=this.ext_cabane_list[this.cabane_sel].stats.structure,e=!1;for(let s=0;s0||this.ext_steel_count[s]>0)&&(e=!0);return e&&(t+=5),this.acft_structure+t}GetCantileverType(){const t=this.cant_count[0]+this.cant_count[4];return this.cant_count[1]+this.cant_count[2]+this.cant_count[3]>0?2:t>0?1:0}GetCabaneList(){return this.ext_cabane_list}GetCabane(){return this.cabane_sel}SetCabane(t){this.cabane_sel=t,this.CalculateStats()}SetCantLift(t){this.cant_lift=t}CanWingBlade(){for(const t of this.ext_wood_count)if(t>0)return!1;for(const t of this.ext_steel_count)if(t>0)return!1;return 0==this.cabane_sel&&this.cant_count[2]>0}GetWingBlade(){return this.wing_blades}SetWingBlade(t){this.wing_blades=t,this.CalculateStats()}SetAircraftType(t){this.acft_type=t,t==N.HELICOPTER&&(this.can_external=!1,this.is_monoplane=!1,this.is_tandem=!1,this.is_staggered=!1),t==N.ORNITHOPTER_BUZZER&&(this.can_external=!1);const e=this.CanExternalWood();for(let t=0;t0){a=a||this.ext_wood_list[n].first;let i=this.ext_wood_list[n].stats;i=i.Multiply(this.ext_wood_count[n]),t=t.Add(i),this.ext_wood_list[n].config?s+=e*this.ext_wood_list[n].tension*this.ext_wood_count[n]:s+=this.ext_wood_list[n].tension*this.ext_wood_count[n]}for(let n=0;n0){a=a||this.ext_wood_list[n].first;let i=this.ext_steel_list[n].stats.Clone();i=i.Multiply(this.ext_steel_count[n]),t=t.Add(i),this.ext_steel_list[n].config?s+=e*this.ext_steel_list[n].tension*this.ext_steel_count[n]:s+=this.ext_steel_list[n].tension*this.ext_steel_count[n]}this.acft_type==N.ORNITHOPTER_BASIC&&(t.maxstrain=Math.floor(1e-6+.5*t.maxstrain)),a&&(t.structure+=5,t.maxstrain+=10,s+=10);const n=this.ext_cabane_list[this.cabane_sel].stats.Clone();t=t.Add(n),s+=e*this.ext_cabane_list[this.cabane_sel].tension,this.cabane_sel>0&&(i+=1),this.wires&&(t.maxstrain+=Math.floor(1e-6+s),t.drag+=3*i);var r=!1;for(let e=0;e0){r=!0;let s=this.cant_list[e].stats;s=s.Multiply(this.cant_count[e]),s.maxstrain,t=t.Add(s)}return this.CanWingBlade()?this.wing_blades&&(t.mass*=2,t.warnings.push({source:h("Wing Blades"),warning:h("Wing Blades Warning"),color:c.WHITE})):this.wing_blades=!1,r&&(t.cost+=5,t.liftbleed-=this.cant_lift),t}GetElectrics(){return{storage:0,equipment:[]}}}class it extends H{constructor(t){super(),this.tank_stats=[],this.tank_count=[];for(const e of t.tanks)this.tank_stats.push({name:e.name,stats:new u(e),internal:e.internal,cantilever:e.cantilever}),this.tank_count.push(0);this.self_sealing=!1,this.is_cantilever=!1,this.wing_area=-1}toJSON(){return{tank_count:this.tank_count,self_sealing:this.self_sealing,fire_extinguisher:this.fire_extinguisher}}fromJSON(t,e){this.tank_count=A(t.tank_count,this.tank_count.length),this.self_sealing=t.self_sealing,this.fire_extinguisher=t.fire_extinguisher,this.wing_area=-1}serialize(t){t.PushNumArr(this.tank_count),t.PushBool(this.self_sealing),t.PushBool(this.fire_extinguisher)}deserialize(t){this.tank_count=t.GetNumArr(this.tank_count.length),this.self_sealing=t.GetBool(),this.fire_extinguisher=t.GetBool(),this.wing_area=-1}GetTankList(){return this.tank_stats}GetTankEnabled(){const t=[];for(const e of this.tank_stats)!this.is_cantilever&&e.cantilever?t.push(!1):t.push(!0);return t}GetTankCount(){return this.tank_count}SetTankCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.tank_count[t]=e,this.VerifyOK(),this.CalculateStats()}SetCantilever(t){this.is_cantilever&&!t&&(this.is_cantilever=t,this.VerifyOK()&&this.CalculateStats()),this.is_cantilever=t}SetArea(t){this.wing_area>t&&(this.wing_area=t,this.VerifyOK()&&this.CalculateStats()),this.wing_area=t}VerifyOK(){if(-1!=this.wing_area){var t=0;for(let e=0;e0;for(;s>0;)for(let t=this.tank_count.length-1;t>=0;t--)if(this.tank_stats[t].cantilever){this.tank_count[t]--,s--;break}for(let t=0;t0}GetSelfSealing(){return this.self_sealing}SetSelfSealing(t){this.self_sealing=t,this.CalculateStats()}GetExtinguisher(){return this.fire_extinguisher}SetExtinguisher(t){this.fire_extinguisher=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u,e=0;for(let s=0;s0&&(t.wetmass+=5-t.wetmass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class at extends H{constructor(){super(),this.bomb_count=0,this.rocket_count=0,this.internal_bay_count=0,this.internal_bay_1=!1,this.internal_bay_2=!1}toJSON(){return{bomb_count:this.bomb_count,rocket_count:this.rocket_count,bay_count:this.internal_bay_count,bay1:this.internal_bay_1,bay2:this.internal_bay_2}}fromJSON(t,e){this.bomb_count=t.bomb_count,this.internal_bay_count=t.bay_count,this.internal_bay_1=t.bay1,this.internal_bay_2=t.bay2,e>10.75&&(this.rocket_count=t.rocket_count)}serialize(t){t.PushNum(this.bomb_count),t.PushNum(this.internal_bay_count),t.PushBool(this.internal_bay_1),t.PushBool(this.internal_bay_2),t.PushNum(this.rocket_count)}deserialize(t){this.bomb_count=t.GetNum(),this.internal_bay_count=t.GetNum(),this.internal_bay_1=t.GetBool(),this.internal_bay_2=t.GetBool(),t.version>10.75&&(this.rocket_count=t.GetNum())}GetRocketCount(){return this.rocket_count}GetBombCount(){return this.bomb_count}GetInternalBombCount(){var t=10*this.internal_bay_count;return this.bomb_count>0&&this.internal_bay_count>0&&this.internal_bay_1&&(t*=2,this.internal_bay_2&&(t*=2)),t}GetMaxBombSize(){var t=0;const e=this.GetInternalBombCount();return this.bomb_count>0&&this.internal_bay_count>0&&(t=this.internal_bay_1?this.internal_bay_2?Math.floor(1e-6+e):Math.floor(1e-6+e/2):Math.floor(1e-6+e/4)),t}SetRocketCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.rocket_count=t,this.LimitMass(),this.CalculateStats()}SetBombCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.bomb_count=t,this.LimitMass(),this.CalculateStats()}GetBayCount(){return this.internal_bay_count}GetBay1(){return this.internal_bay_1}GetBay2(){return this.internal_bay_2}SetBayCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.internal_bay_count=t,this.CalculateStats()}SetUseBays(t,e){this.internal_bay_1=t,this.internal_bay_2=e,!this.internal_bay_1&&this.internal_bay_2&&(this.internal_bay_1=!0,this.internal_bay_2=!1),this.CalculateStats()}LimitMass(){var t=!1;const e=Math.min(this.GetInternalBombCount(),Math.floor(1e-6+3*this.acft_struct*this.maxbomb));var s,i,a=0,n=0;s=this.bomb_count>e?e:this.bomb_count,i=this.rocket_count+s>e?e-s:this.rocket_count,a=this.bomb_count-s,n=this.rocket_count-i;const r=Math.floor(1e-6+this.acft_struct*this.maxbomb-(s+i)/3)*this.gull_factor;for(;a+n>r;)n>0?n--:a--;let o=Math.max(0,s+a);this.bomb_count>o&&(t=!0,this.bomb_count=o);let l=Math.max(0,i+n);return this.rocket_count>l&&(t=!0,this.rocket_count=l),t}GetExternalMass(){const t=this.bomb_count+this.rocket_count;return Math.max(0,t-this.GetInternalBombCount())}SetAcftParameters(t,e,s){switch(this.acft_struct=t,this.maxbomb=e,s){case 2:case 3:this.gull_factor=1.1;break;case 4:this.gull_factor=1.2;break;default:this.gull_factor=1}this.LimitMass()&&this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u,e=this.GetExternalMass();if(t.reqsections+=this.internal_bay_count,this.internal_bay_count>0){const e=t.reqsections;this.internal_bay_1&&(t.reqsections+=e,this.internal_bay_2&&(t.reqsections+=e))}const s=Math.ceil(e/5-1e-6);return t.mass+=s,t.drag+=s,t.bomb_mass=this.bomb_count+this.rocket_count,t.reqsections=Math.ceil(-1e-6+t.reqsections),t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class nt extends H{constructor(t){super(),this.cargo_list=[];for(const e of t.spaces)this.cargo_list.push({name:e.name,stats:new u(e)});this.cargo_sel=0}toJSON(){return{space_sel:this.cargo_sel}}fromJSON(t,e){this.cargo_sel=t.space_sel}serialize(t){t.PushNum(this.cargo_sel)}deserialize(t){this.cargo_sel=t.GetNum()}GetSpaceList(){return this.cargo_list}GetSpace(){return this.cargo_sel}SetSpace(t){this.cargo_sel=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;return(t=t.Add(this.cargo_list[this.cargo_sel].stats)).bomb_mass+=3*t.reqsections,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class rt extends H{constructor(t){super(),this.gear_list=[],this.gear_sel=0,this.retract=!1;for(const e of t.gear)this.gear_list.push({name:e.name,stats:new u(e),DpLMP:e.DpLMP,SpLMP:e.SpLMP,can_retract:e.can_retract});this.extra_list=[];for(const e of t.extras)this.extra_list.push({name:e.name,stats:new u(e),MpLMP:e.MpLMP});this.extra_sel=[...Array(this.extra_list.length).fill(!1)]}toJSON(){return{gear_sel:this.gear_sel,retract:this.retract,extra_sel:this.extra_sel}}fromJSON(t,e){this.gear_sel=t.gear_sel,this.retract=t.retract,this.extra_sel=b(t.extra_sel,this.extra_sel.length)}serialize(t){t.PushNum(this.gear_sel),t.PushBool(this.retract),t.PushBoolArr(this.extra_sel)}deserialize(t){this.gear_sel=t.GetNum(),this.retract=t.GetBool(),this.extra_sel=t.GetBoolArr(this.extra_sel.length)}IsDefault(){return 0==this.gear_sel&&0==this.retract&&0==this.extra_sel.reduce(((t,e)=>t||e),!1)}GetGearName(){return this.retract&&"Boat Hull"==this.gear_list[this.gear_sel].name?h("Retractable Gear + Boat Hull"):this.retract?h("Retractable ")+h(this.gear_list[this.gear_sel].name):h(this.gear_list[this.gear_sel].name)}GetGearList(){return this.gear_list}CanGear(){const t=[...Array(this.gear_list.length).fill(!0)];for(let e=0;e=2||0==t&&e>=3}SetGull(t){this.gull_deck=t}SetCalculateStats(t){this.CalculateStats=t}IsVital(){return!0}PartStats(){var t=new u;this.CanGear()[this.gear_sel]||(this.gear_sel=0),this.CanRetract()||(this.retract=!1);var e=this.loadedMass;for(let s=0;s=0;i--)s+=t[i],t[i]=s-e;return t}SetArmourCoverage(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.armour_coverage[t]=1!=t?e:e-this.skin_armour,this.NormalizeCoverage(),this.CalculateStats()}NormalizeCoverage(){var t=-8+Math.min(0,-Math.floor(1e-6+(this.vital_parts-8)/2));t+=this.skin_armour;for(let e=this.armour_coverage.length-1;e>=0;e--)this.armour_coverage[e]=Math.max(0,Math.min(Math.abs(t),this.armour_coverage[e])),t+=this.armour_coverage[e]}GetElectricalList(){return this.electric_list}GetElectricalCount(){return this.electrical_count}SetElectricalCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),e=Math.min(e,50),this.electrical_count[t]=e,this.CalculateStats()}GetRadioList(){return this.radio_list}GetRadioSel(){return this.radio_sel}SetRadioSel(t){this.radio_sel=t,this.CalculateStats()}GetReconList(){return this.recon_list}GetReconSel(){return this.recon_sel}SetReconSel(t,e){((e=Math.trunc(e))!=e||e<0)&&(e=0),this.recon_sel[t]=e,this.CalculateStats()}GetVisibilityList(){return this.visi_list}GetCanVisibility(){return this.can_visi}GetVisibilitySel(){return this.visi_sel}SetVisibilitySel(t,e){this.visi_sel[t]=e,this.CalculateStats()}GetClimateList(){return this.clim_list}GetClimateSel(){return this.clim_sel}GetClimateEnable(){const t=[];for(const e of this.clim_list)!this.acft_rad&&e.req_radiator?t.push(!1):t.push(!0);return t}SetClimateSel(t,e){this.clim_sel[t]=e,this.CalculateStats()}GetAutopilotList(){return this.auto_list}GetAutopilotSel(){return this.auto_sel}SetAutopilotSel(t){this.auto_sel=t,this.CalculateStats()}GetControlList(){return this.cont_list}GetControlSel(){return this.cont_sel}SetControlSel(t){this.cont_sel=t,this.CalculateStats()}SetAcftRadiator(t){this.acft_rad=t}IsElectrics(){for(const t of this.electrical_count)if(t>0)return!0;for(let t=0;t0&&(""!=e&&(e+=", "),e+=n.toString()+"/"+(11-s[a]).toString()+"+")}""!=e&&t.warnings.push({source:h("Armour"),warning:e,color:c.WHITE});for(let e=0;e0){let s=this.electric_list[e].stats.Clone();s=s.Multiply(this.electrical_count[e]),t=t.Add(s)}t=t.Add(this.radio_list[this.radio_sel].stats);for(let e=0;e0){let s=this.recon_list[e].stats.Clone();s=s.Multiply(this.recon_sel[e]),t=t.Add(s)}for(let e=0;e0&&(t+=i.storage*a,i.cp10s>0?e.push({source:h(i.name),charge:n.Format("{0}"+h("Derived Per 10 Speed"),Math.floor(1e-6+a*i.cp10s))}):0!=i.stats.charge&&e.push({source:h(i.name),charge:(a*i.stats.charge).toString()}))}const s=this.radio_list[this.radio_sel];e=this.FormatEquipment(e,s.name,s.stats.charge);for(let t=0;t0&&(e=this.FormatEquipment(e,s.name,i*s.stats.charge))}for(let t=0;t0){let e=Math.min(t,this.drag);e=Math.max(e,0),this.drag-=e,t-=e,e=Math.min(t,this.reliability),e=Math.max(e,0),this.reliability-=e,t-=e,e=Math.min(t,this.maxstrain),e=Math.max(e,0),this.maxstrain-=e,t-=e,e=Math.min(t,this.toughness),e=Math.max(e,0),this.toughness-=e,t-=e,e=Math.min(t,this.mass),e=Math.max(e,0),this.mass-=e,t-=e,e=Math.min(t,this.escape),e=Math.max(e,0),this.escape-=e,t-=e,e=Math.min(t,this.bleed),e=Math.max(e,0),this.bleed-=e,t-=e,e=Math.min(t,this.cost),e=Math.max(e,0),this.cost-=e,t-=e}}GetFreeDots(){return this.free_dots}SetFreeDots(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,0),this.free_dots=t,this.ReduceDots(),this.CalculateStats()}GetCost(){return this.cost}SetCost(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.cost=t,this.ReduceDots(),this.CalculateStats()}GetBleed(){return this.bleed}SetBleed(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.bleed=t,this.ReduceDots(),this.CalculateStats()}GetEscape(){return this.escape}SetEscape(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.escape=t,this.ReduceDots(),this.CalculateStats()}GetMass(){return this.mass}SetMass(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.mass=t,this.ReduceDots(),this.CalculateStats()}GetToughness(){return this.toughness}SetToughness(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.toughness=t,this.ReduceDots(),this.CalculateStats()}GetMaxStrain(){return this.maxstrain}SetMaxStrain(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.maxstrain=t,this.ReduceDots(),this.CalculateStats()}GetReliabiilty(){return this.reliability}SetReliability(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.reliability=t,this.ReduceDots(),this.CalculateStats()}GetDrag(){return this.drag}SetDrag(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.drag=t,this.ReduceDots(),this.CalculateStats()}SetAcftStats(t){this.acft_stats=t}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u;return t.cost=Math.floor(1e-6+-this.cost*this.acft_stats.cost/10),t.liftbleed=Math.floor(1e-6+3*-this.bleed),t.escape=this.escape,t.visibility=this.escape,t.mass=Math.floor(1e-6+-this.mass*this.acft_stats.mass/10),t.toughness=Math.floor(1e-6+this.toughness*this.acft_stats.toughness/4),t.reliability=2*this.reliability,t.drag=Math.floor(1e-6+-this.drag*this.acft_stats.drag/10),t}GetElectrics(){return{storage:0,equipment:[]}}}!function(t){t[t.NONE=-1]="NONE",t[t.INTERRUPT=0]="INTERRUPT",t[t.SYNCH=1]="SYNCH",t[t.SPINNER=2]="SPINNER",t[t.DEFLECT=3]="DEFLECT",t[t.NO_INTERFERENCE=4]="NO_INTERFERENCE",t[t.ENUM_MAX=5]="ENUM_MAX"}(O||(O={})),function(t){t[t.BULLETS=0]="BULLETS",t[t.HEATRAY=1]="HEATRAY",t[t.PNEUMATIC=2]="PNEUMATIC",t[t.ENUM_MAX=3]="ENUM_MAX",t[t.GYROJETS=4]="GYROJETS"}(k||(k={})),function(t){t[t.STANDARD=0]="STANDARD",t[t.MECHANICAL=1]="MECHANICAL",t[t.GAST=2]="GAST",t[t.ROTARY=3]="ROTARY",t[t.ENUM_MAX=4]="ENUM_MAX"}(L||(L={}));class ht extends H{constructor(t,e,s,i=!1){super(),this.weapon_type=t,this.fixed=i,this.wing=!0,this.covered=!1,this.accessible=!1,this.free_accessible=!1,this.synchronization=i?O.NONE:O.INTERRUPT,this.w_count=1,this.repeating=!1,this.wing_reinforcement=!1}toJSON(){return{fixed:this.fixed,wing:this.wing,covered:this.covered,accessible:this.accessible,free_accessible:this.free_accessible,synchronization:this.synchronization,w_count:this.w_count}}fromJSON(t,e){this.fixed=t.fixed,this.wing=t.wing,this.covered=t.covered,this.accessible=t.accessible,this.free_accessible=t.free_accessible,this.synchronization=t.synchronization,this.w_count=t.w_count,e<10.95&&(this.repeating=t.repeating)}serialize(t){t.PushBool(this.fixed),t.PushBool(this.wing),t.PushBool(this.covered),t.PushBool(this.accessible),t.PushBool(this.free_accessible),t.PushNum(this.synchronization),t.PushNum(this.w_count)}deserialize(t){this.fixed=t.GetBool(),this.wing=t.GetBool(),this.covered=t.GetBool(),this.accessible=t.GetBool(),this.free_accessible=t.GetBool(),this.synchronization=t.GetNum(),this.w_count=t.GetNum(),t.version<10.95&&(this.repeating=t.GetBool())}SetWeaponType(t,e,s){this.weapon_type=t,this.action=e,16==this.weapon_type.size&&(this.w_count=1),this.SetCount(this.w_count,!1)}GetFixed(){return this.fixed}SetFixed(t){t!=this.fixed&&(t?this.fixed=!0:(this.fixed=!1,this.synchronization=O.NONE))}SetCanWing(t){this.canwing=t,this.wing&&!t&&(this.wing=!1)}GetWing(){return this.wing}CanWing(){return this.weapon_type.size<=16&&this.canwing}SetWing(t){t&&this.CanWing()?(this.wing=!0,this.free_accessible=!1,this.synchronization=O.NONE):this.wing=!1,this.CalculateStats()}CanCovered(){return this.wing?this.has_cantilever&&!(16==this.weapon_type.size&&!this.fixed):!(this.GetArty()&&!this.fixed)}GetCovered(){return this.covered}SetCovered(t){this.covered=t,this.CalculateStats()}GetAccessible(){return this.accessible||this.free_accessible}SetAccessible(t){t&&this.free_accessible&&(t=!1),this.accessible=t,this.CalculateStats()}GetFreeAccessible(){return this.free_accessible}SetFreeAccessible(t){t&&!this.wing&&this.can_free_accessible?(this.free_accessible=!0,this.accessible=!1):this.free_accessible=!1,this.CalculateStats()}CanSynchronization(){const t=[];for(let e=-1;e16;)t-=1;this.w_count=t,e&&this.CalculateStats()}CanRepeating(){return!this.weapon_type.rapid||this.weapon_type.reload>0}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:this.repeating=!1,this.CalculateStats()}ResolveSynch(){const t=this.synchronization;if(this.synchronization=O.ENUM_MAX,this.CanSynch(t))this.action==L.MECHANICAL&&t!=O.SPINNER?this.synchronization=O.SYNCH:this.synchronization=t;else{for(let t=-1;t8||16==this.weapon_type.size)&&(t.reqsections+=1),this.accessible&&(t.cost+=Math.max(1,Math.floor(1e-6+this.w_count/2))),!this.fixed)if(e<=2);else if(e<=4)t.cost+=1;else if(e<=8)t.mass+=1,t.cost+=3;else{if(!(e<=16))throw"Weapon size screwup in Turret size cost.";t.mass+=2,t.cost+=5}return this.synchronization==O.INTERRUPT?(t.cost+=2*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=2*this.w_count),t.era.push({name:h("Interruptor Gear"),era:h("WWI")})):this.synchronization==O.SYNCH&&this.action!=L.MECHANICAL?(t.cost+=3*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=3*this.w_count),t.era.push({name:h("Synchronization Gear"),era:h("Roaring 20s")})):this.synchronization==O.DEFLECT?(t.cost+=1,t.warnings.push({source:h(this.weapon_type.name),warning:h("Deflector Plate Warning"),color:c.WHITE})):this.synchronization!=O.NO_INTERFERENCE||this.IsLightningArc()||t.warnings.push({source:h(this.weapon_type.name)+" "+h("No Interference"),warning:h("No Interference Warning"),color:c.YELLOW}),this.wing_reinforcement&&(t.mass+=2),t.Round(),t}GetElectrics(){return{storage:0,equipment:[]}}}class ct extends H{constructor(t,e){super(),this.weapon_list=t,this.wl_permute=e,this.directions=[...Array(6).fill(!1)],this.directions[0]=!0,this.fixed=!0,this.ammo=1,this.weapon_type=0,this.raw_weapon_type=0,this.weapons=[],this.action_sel=L.STANDARD,this.projectile_sel=k.BULLETS,this.has_propeller=!0,this.sticky_guns=0,this.repeating=!1,this.seat=0,this.final_weapon={name:"",abrv:"",era:"",size:0,stats:new u,damage:0,hits:0,ammo:0,ap:0,jam:"",reload:0,rapid:!1,synched:!1,shells:!1,can_action:!1,can_projectile:!1,deflection:0},this.MakeFinalWeapon(),this.SWC(1)}toJSON(){const t=[];for(const e of this.weapons)t.push(e.toJSON());return{weapon_type:this.raw_weapon_type,fixed:this.fixed,directions:this.directions,weapons:t,ammo:this.ammo,action:this.action_sel,projectile:this.projectile_sel,repeating:this.repeating,seat:this.seat}}fromJSON(t,e){this.raw_weapon_type=t.weapon_type,this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.fixed,this.directions=b(t.directions,this.directions.length),this.weapons=[],this.ammo=t.ammo,null==this.ammo&&(this.ammo=1),e<10.25?(this.action_sel=L.STANDARD,this.projectile_sel=k.BULLETS):(this.action_sel=t.action,this.projectile_sel=t.projectile),e<11.75&&(this.projectile_sel==k.PNEUMATIC?this.projectile_sel=k.BULLETS:this.projectile_sel==k.ENUM_MAX&&(this.projectile_sel=k.PNEUMATIC)),this.MakeFinalWeapon();for(const s of t.weapons){const t=new ht(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),t.fromJSON(s,e),this.weapons.push(t)}if(e<10.95){this.repeating=!1;for(const t of this.weapons)this.repeating=this.repeating||t.GetRepeating()}else this.repeating=t.repeating;this.seat=e>11.65?t.seat:0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}serialize(t){t.PushNum(this.raw_weapon_type),t.PushBool(this.fixed),t.PushBoolArr(this.directions),t.PushNum(this.ammo),t.PushNum(this.weapons.length);for(const e of this.weapons)e.serialize(t);t.PushNum(this.action_sel),t.PushNum(this.projectile_sel),t.PushBool(this.repeating),t.PushNum(this.seat)}deserialize(t){this.raw_weapon_type=t.GetNum(),this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.GetBool(),this.directions=t.GetBoolArr(this.directions.length),this.ammo=t.GetNum();const e=t.GetNum();this.weapons=[],this.MakeFinalWeapon();for(let s=0;s11.65?this.seat=t.GetNum():this.seat=0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}GetWeaponSelected(){return this.weapon_type}MakeFinalWeapon(){const t=this.weapon_type;if(this.final_weapon.can_action=this.weapon_list[t].can_action,this.final_weapon.can_projectile=this.weapon_list[t].can_projectile,this.final_weapon.ammo=this.weapon_list[t].ammo,this.final_weapon.ap=this.weapon_list[t].ap,this.final_weapon.damage=this.weapon_list[t].damage,this.final_weapon.era=this.weapon_list[t].era,this.final_weapon.name=this.weapon_list[t].name,this.final_weapon.abrv=this.weapon_list[t].abrv,this.final_weapon.reload=this.weapon_list[t].reload,this.final_weapon.shells=this.weapon_list[t].shells,this.final_weapon.size=this.weapon_list[t].size,this.final_weapon.stats=this.weapon_list[t].stats.Clone(),this.final_weapon.deflection=this.weapon_list[t].deflection,this.final_weapon.jam=this.weapon_list[t].jam,this.final_weapon.stats.era=[],this.final_weapon.stats.era.push({name:this.weapon_list[t].name,era:this.weapon_list[t].era}),0==this.weapon_list[t].hits&&(this.action_sel==L.MECHANICAL&&(this.action_sel=L.STANDARD),this.projectile_sel!=k.GYROJETS&&this.projectile_sel!=k.HEATRAY||(this.projectile_sel=k.BULLETS)),this.action_sel==L.STANDARD)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.synched=this.weapon_list[t].synched;else if(this.action_sel==L.MECHANICAL)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.stats.warnings.push({source:h("Mechanical Action"),warning:h("Mechanical Action Warning"),color:c.WHITE}),this.final_weapon.jam="0/0",this.final_weapon.rapid=!0,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!0,this.final_weapon.stats.era.push({name:h("Mechanical Action"),era:h("WWI")});else if(this.action_sel==L.GAST)this.final_weapon.hits=2*this.weapon_list[t].hits,this.final_weapon.ammo=this.weapon_list[t].ammo/2,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!1,this.final_weapon.stats.era.push({name:h("Gast Principle"),era:h("WWI")});else if(this.action_sel==L.ROTARY){this.final_weapon.stats.mass+=this.weapon_list[t].stats.mass,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.size+=this.weapon_list[t].size,this.final_weapon.size=Math.min(16,this.final_weapon.size),this.final_weapon.hits=3*this.weapon_list[t].hits,this.final_weapon.deflection-=1,this.final_weapon.synched=!1;const e=this.final_weapon.jam.split("/");e[0]="9999",e[1]=(parseInt(e[1])+1).toString(),this.final_weapon.jam=e.join("/"),this.final_weapon.stats.era.push({name:h("Rotary_Gun"),era:h("WWI")})}if(this.repeating&&0!=this.final_weapon.reload&&(this.final_weapon.reload=0,this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost))),this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=k.HEATRAY||(this.projectile_sel=k.BULLETS),this.action_sel!=L.GAST&&this.action_sel!=L.ROTARY&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=k.PNEUMATIC||(this.projectile_sel=k.BULLETS),this.projectile_sel==k.HEATRAY)this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.shells=!1,this.final_weapon.ammo=0,this.final_weapon.deflection=0,this.final_weapon.ap=Math.max(0,this.final_weapon.ap-1),this.final_weapon.stats.warnings.push({source:h("Heat Ray"),warning:h("Heat Ray Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Heat Ray"),era:h("Himmilgard")});else if(this.projectile_sel==k.GYROJETS)this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost)),this.final_weapon.shells=!1,this.final_weapon.damage-=1,this.final_weapon.stats.warnings.push({source:h("Gyrojets"),warning:h("Gyrojets Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Gyrojets"),era:h("Roaring 20s")});else if(this.projectile_sel==k.PNEUMATIC){if(this.final_weapon.ammo*=2,this.final_weapon.shells=!1,this.final_weapon.rapid){const t=this.final_weapon.jam.split("/");t[1]="9999",this.final_weapon.jam=t.join("/"),this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 1"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Pneumatic"),era:h("Pioneer")})}this.final_weapon.hits>0&&this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 2"),color:c.WHITE})}0!=this.final_weapon.deflection&&this.final_weapon.stats.warnings.push({source:h(this.final_weapon.name),warning:h("Deflection Warning",this.final_weapon.deflection),color:c.WHITE})}SetWeaponSelected(t){const e=this.IsLightningArc();if(this.weapon_type=t,this.raw_weapon_type=this.wl_permute.findIndex((e=>e==t)),16==this.weapon_list[t].size)for(;this.weapons.length>1;)this.weapons.pop();this.weapon_list[t].can_action&&this.GetCanAction()[this.action_sel]||(this.action_sel=L.STANDARD),this.weapon_list[t].can_projectile&&this.GetCanProjectile()[this.projectile_sel]||(this.projectile_sel=k.BULLETS),this.weapon_list[t].rapid?this.repeating=!1:this.repeating||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD),this.CanRepeating()||(this.repeating=!1),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);if(this.IsLightningArc()){this.SetFixed(!0),this.directions[0]=!0;for(let t=1;t0)&&this.weapon_list[this.weapon_type].ammo>0&&"Precision Rifle"!=this.weapon_list[this.weapon_type].name}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:(this.repeating=!1,this.weapon_list[this.weapon_type].rapid||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD)),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);this.CalculateStats()}GetFixed(){return this.fixed}SetFixed(t){if(this.IsLightningArc()&&(t=!0),this.fixed!=t){this.fixed=t;for(const t of this.weapons)t.SetFixed(this.fixed);if(t){let t=!1;for(let e=0;ethis.weapons.length;){const t=new ht(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),this.weapons.push(t)}for(;t1||this.weapons[0].GetCount()>1}SetAmmo(t){(t!=t||t<1)&&(t=1),t=Math.floor(1e-6+t),this.ammo=t,this.CalculateStats()}SetHavePropeller(t){this.has_propeller&&!t&&this.action_sel==L.MECHANICAL&&(this.has_propeller=t,this.SetAction(L.STANDARD)),this.has_propeller=t}SetCanWing(t){for(const e of this.weapons)e.SetCanWing(t)}GetAction(){return this.action_sel}GetCanAction(){return[!0,this.has_propeller&&this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].hits>0&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].rapid]}SetAction(t){if(this.final_weapon.can_action){this.action_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.action_sel=L.STANDARD;this.CalculateStats()}GetCanProjectile(){return[!0,this.final_weapon.can_projectile&&this.action_sel!=L.MECHANICAL&&this.action_sel!=L.GAST&&this.weapon_list[this.weapon_type].hits>0,this.final_weapon.can_projectile&&this.action_sel!=L.ROTARY&&this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL]}GetProjectile(){return this.projectile_sel}SetProjectile(t){if(this.final_weapon.can_projectile){this.projectile_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.projectile_sel=k.BULLETS;this.CalculateStats()}GetFinalWeapon(){return this.final_weapon}SetStickyGuns(t){this.sticky_guns=t}GetHRCharges(){if(this.IsLightningArc())return[3];let t=0;for(const e of this.weapons)t+=e.GetCount();if(this.final_weapon.hits>0){let e=this.weapon_list[this.weapon_type].stats.cost;return this.action_sel==L.ROTARY&&(e*=2),this.final_weapon.rapid?[t*e,Math.max(t*e+1,Math.floor(1e-6+1.5*t*e))]:[t*e]}return"Scattergun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(1.875001),Math.floor(3.125001)]:[Math.floor(1.875001)]:"Punt Gun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(3.750001),Math.floor(6.250001)]:[Math.floor(3.750001)]:void 0}GetShots(){return Math.max(1,Math.floor(1e-6+this.final_weapon.ammo*this.ammo))}IsLightningArc(){return"Lightning Arc"==this.final_weapon.name}GetReload(){return this.final_weapon.reload}GetWingWeight(){let t=0;for(const e of this.weapons)e.GetWing()&&(t+=e.PartStats().mass);return t}GetDirectionCount(){let t=0;for(const e of this.directions)e&&t++;return t}SetSeat(t){this.seat=t,this.CalculateStats()}GetSeat(){return this.seat}GetIsFullyAccessible(){for(const t of this.weapons)if(!t.GetAccessible())return!1;return!0}GetIsPartlyAccessible(){for(const t of this.weapons)if(t.GetAccessible())return!0;return!1}SetCalculateStats(t){this.CalculateStats=t;for(const e of this.weapons)e.SetCalculateStats(t)}PartStats(){var t=new u;let e=this.GetDirectionCount(),s=0;for(const i of this.weapons)i.has_cantilever=this.has_cantilever,i.SetTurret(e>2),t=t.Add(i.PartStats()),s+=i.GetCount(),this.fixed||(2==e?t.cost+=1:3==e||4==e?t.cost+=2:5==e?t.cost+=3:6==e&&(t.cost+=4));return(this.projectile_sel==k.HEATRAY||this.IsLightningArc())&&(this.ammo=1),t.mass+=(this.ammo-1)*s,t}GetElectrics(){return{storage:0,equipment:[]}}}const ut=JSON.parse('{"A":[{"name":"Submachine Gun","abrv":"SMG","era":"WWI","cost":1,"mass":1,"drag":0,"damage":1,"hits":4,"ap":0,"ammo":10,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"0/1","reload":2,"size":1,"can_action":true,"can_projectile":true,"deflection":0,"warning":"SMG Warning"},{"name":"Scattergun","abrv":"SG","era":"Pioneer","cost":2,"mass":2,"drag":2,"damage":0.5,"hits":0,"ap":0,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Scattergun Warning","size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Machine Gun","abrv":"LMG","era":"WWI","cost":2,"mass":2,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"1/2","reload":2,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Machine Gun","abrv":"MG","era":"WWI","cost":2,"mass":3,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":10,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"1/2","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Balloon Gun","abrv":"BMG","era":"WWI","cost":3,"mass":3,"drag":1,"damage":2,"hits":4,"ap":0,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":-2},{"name":"Enhanced Machine Gun","abrv":"EMG","era":"Coming Storm","cost":3,"mass":2,"drag":1,"damage":2,"hits":5,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"0/0","reload":0,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Enhanced Heavy Machine Gun","abrv":"EHMG","era":"Coming Storm","cost":5,"mass":3,"drag":2,"damage":4,"hits":5,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Punt Gun","abrv":"PG","era":"Pioneer","cost":4,"mass":4,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Punt Gun Warning","size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Repeating Cannon","abrv":"LRC","era":"WWI","cost":4,"mass":4,"drag":3,"damage":8,"hits":3,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"2/5","reload":2,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Heavy Cannon","abrv":"HC","era":"WWI","cost":6,"mass":5,"drag":2,"damage":16,"hits":1,"ap":2,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Light Machine Cannon","abrv":"LMC","era":"Coming Storm","cost":8,"mass":4,"drag":3,"damage":8,"hits":4,"ap":4,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Machine Cannon","abrv":"HMC","era":"WWII","cost":12,"mass":5,"drag":4,"damage":12,"hits":3,"ap":4,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Fliergerflammenwerfer","abrv":"FFW","era":"WWI","cost":5,"mass":1,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0/0","reload":0,"warning":"Fliergerflammenwerfer Warning","size":8,"can_action":false,"can_projectile":false,"deflection":0},{"name":"Recoilless Cannon","abrv":"RC","era":"WWI","cost":5,"mass":8,"drag":3,"damage":30,"hits":1,"ap":3,"ammo":3,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":-5},{"name":"Autocannon","abrv":"AC","era":"WWII","cost":15,"mass":8,"drag":5,"damage":24,"hits":2,"ap":5,"ammo":2,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Battle Cannon","abrv":"BC","era":"WWII","cost":15,"mass":40,"drag":8,"damage":24,"hits":2,"ap":5,"ammo":1,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Precision Rifle","abrv":"PR","era":"WWI","mass":1,"drag":1,"cost":2,"damage":5,"hits":10,"ap":2,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":2,"can_action":false,"can_projectile":false,"warning":"Precision Rifle Warning","deflection":0},{"name":"Lightning Arc","abrv":"LA","era":"Himmilgard","cost":8,"mass":5,"drag":3,"damage":0,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0","reload":0,"size":16,"can_action":false,"can_projectile":false,"warning":"Lightning Arc Warning","deflection":0},{"name":"Harpoon Launcher","abrv":"HL","era":"Himmilgard","cost":3,"mass":3,"drag":2,"damage":4,"hits":1,"ap":1,"ammo":2,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":0,"reload":1,"size":4,"can_action":false,"can_projectile":false,"warning":"Harpoon Launcher Warning","deflection":0},{"name":"Heavy Machine Gun","abrv":"HMG","era":"WWI","cost":4,"mass":4,"drag":2,"damage":4,"hits":4,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Repeating Cannon","abrv":"HRC","era":"WWI","cost":10,"mass":6,"drag":4,"damage":16,"hits":2,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"4/6","reload":2,"size":16,"can_action":true,"can_projectile":true,"deflection":-3}]}');class mt extends H{constructor(){super(),this.direction_list=["Forward","Rearward","Up","Down","Left","Right"],this.synchronization_list=["None","Interruptor Gear","Synchronization Gear","Spinner Gun","Deflector Plate","No Interference"],this.action_list=[{name:"Standard Action"},{name:"Mechanical Action"},{name:"Gast Principle"},{name:"Rotary_Gun"}],this.projectile_list=[{name:"Standard"},{name:"Heat Ray"},{name:"Pneumatic"}],this.weapon_list=[];for(const t of ut.A){const e={name:t.name,abrv:t.abrv,era:t.era,size:t.size,stats:new u(t),damage:t.damage,hits:t.hits,ammo:t.ammo,ap:t.ap,jam:t.jam.toString(),reload:t.reload,rapid:t.rapid,synched:t.synched,shells:t.shells,can_action:t.can_action,can_projectile:t.can_projectile,deflection:t.deflection};this.weapon_list.push(e)}const t=(t,e)=>{const s=(t,e)=>tt(this.weapon_list[e],this.weapon_list[s])));const e=[];for(let t=0;te==t)));this.wl_permute=e,this.weapon_list=this.weapon_list.sort(t),this.weapon_sets=[],this.brace_count=0,this.isheli=!1}toJSON(){const t=[];for(const e of this.weapon_sets)t.push(e.toJSON());return{weapon_systems:t,brace_count:this.brace_count}}fromJSON(t,e){this.weapon_sets=[];const s=t.weapon_systems;for(const t of s){const s=new ct(this.weapon_list,this.wl_permute);s.SetCalculateStats(this.CalculateStats),s.fromJSON(t,e),this.weapon_sets.push(s)}e>10.35&&(this.brace_count=t.brace_count)}serialize(t){t.PushNum(this.weapon_sets.length);for(const e of this.weapon_sets)e.serialize(t);t.PushNum(this.brace_count)}deserialize(t){this.weapon_sets=[];const e=t.GetNum();for(let s=0;s10.35&&(this.brace_count=t.GetNum())}GetWeaponList(){return this.weapon_list}GetDirectionList(){return this.direction_list}GetSynchronizationList(){return this.synchronization_list}SetWeaponSetCount(t){for((t!=t||t<1)&&(t=0),t=Math.floor(1e-6+t);t>this.weapon_sets.length;){const t=new ct(this.weapon_list,this.wl_permute);t.SetCalculateStats(this.CalculateStats),this.weapon_sets.push(t)}for(;t=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER)return void e[t].SetSynchronization(O.INTERRUPT)}}RemoveOneArtyTractorSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(O.NO_INTERFERENCE)}}RemoveOnePusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER)return void e[t].SetSynchronization(O.INTERRUPT)}}RemoveOneArtyPusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(O.NO_INTERFERENCE)}}CanTractorSpinner(){return this.CountTractorSpinner()+this.CountArtyTractorSpinner()this.tractor_arty_spinner_count;)this.RemoveOneArtyTractorSpinner();for(;this.CountTractorSpinner()>this.tractor_spinner_count;)this.RemoveOneTractorSpinner();for(;this.CountArtyPusherSpinner()>this.pusher_arty_spinner_count;)this.RemoveOneArtyPusherSpinner();for(;this.CountPusherSpinner()>this.pusher_spinner_count;)this.RemoveOnePusherSpinner();var e=0,s=0;0==this.cant_type?(e=4,s=2):1==this.cant_type?(e=8,s=4):(e=16,s=8);const i=[];for(const t of this.weapon_sets)for(const e of t.GetWeapons()){e.wing_reinforcement=!1;const s={total:0,count:0,sz:0,w:e};e.GetWing()&&(s.count=e.GetCount(),s.sz=this.weapon_list[t.GetWeaponSelected()].size,s.total=s.count*s.sz,i.push(s))}i.sort((function(t,e){return t.total-e.total}));for(const t of i)e>=0&&(s0,t=t.Add(e.PartStats());return t.cost+=this.brace_count/3,this.brace_count>0&&t.warnings.push({source:h("Weapons Braces"),warning:h("Weapons Braces Warning"),color:c.WHITE}),t.control-=Math.floor(1e-6+this.GetWingWeight()/5),t}GetElectrics(){const t={storage:0,equipment:[]};for(let e=0;e11.55&&(this.blade_idx=t.blade_idx),e<12.45&&(this.rotor_span=0),this.rotor_thickness=e<12.55?0:t.rotor_thickness,this.dryMP=-1}serialize(t){t.PushNum(this.type),t.PushNum(this.rotor_count),t.PushNum(this.rotor_span),t.PushNum(this.cant_idx),t.PushNum(this.stagger_sel),t.PushBool(this.accessory),t.PushNum(this.blade_idx),t.PushNum(this.rotor_thickness)}deserialise(t){this.type=t.GetNum(),this.rotor_count=t.GetNum(),this.rotor_span=t.GetNum(),this.cant_idx=t.GetNum(),t.version<12.35?(t.GetBool(),this.stagger_sel=0):this.stagger_sel=t.GetNum(),this.accessory=t.GetBool(),t.version>11.55&&(this.blade_idx=t.GetNum()),t.version<12.45&&(this.rotor_span=0),t.version<12.55?this.rotor_thickness=0:this.rotor_thickness=t.GetNum(),this.dryMP=-1}SetCantileverList(t){this.cant_list=t}GetCantileverList(){return this.cant_list}SetCantilever(t){this.cant_idx=t,this.CalculateStats()}GetCantilever(){return this.cant_idx}SetRotorThickness(t){t<0&&(t=0),this.rotor_thickness=Math.floor(1e-6+t),this.CalculateStats()}GetRotorThickness(){return this.rotor_thickness}SetType(t){this.type!=t&&(this.accessory=!1,this.cant_idx=0,this.stagger_sel=0,this.rotor_count=1,this.type=t,this.rotor_span=0)}CanRotorCount(){return this.type==N.HELICOPTER}SetRotorCount(t){t<1&&(t=1),t>=2&&t%2==1&&(t==this.rotor_count+1?t+=1:t-=1),this.rotor_count=t,this.rotor_count<2&&(this.stagger_sel=0),this.CalculateStats()}GetRotorCount(){return this.rotor_count}CanRotorSpan(){return this.type==N.HELICOPTER}SetRotorSpan(t){this.rotor_span=Math.floor(1e-6+t),this.CalculateStats()}GetRotorSpan(){return this.rotor_span}CanTandem(){return this.type==N.HELICOPTER&&this.rotor_count>1}SetBladeCount(t){this.blade_idx=t,this.CalculateStats()}SetWingArea(t){this.wing_area=t}GetSizingSpan(){return this.sizing_span}SetMP(t){t!=this.dryMP&&(this.dryMP=t,this.CalculateStats())}GetRotorStrain(){const t=this.GetRotorArea();return this.rotor_count*Math.max(1,2*(this.sizing_span+this.rotor_span)+t-10)}GetRotorArea(){return Math.PI/9*(this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span)}GetIdealRotorArea(){return Math.PI/9*this.sizing_span*this.sizing_span}GetRotorDrag(){if(this.type==N.HELICOPTER||this.type==N.AUTOGYRO){const t=this.GetRotorArea();return 1==this.rotor_count?Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))):Math.floor(1e-6+.75*this.rotor_count*Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))))}return 0}GetType(){return this.type}GetAccessory(){return this.accessory}SetAccessory(t){this.accessory=t,this.CalculateStats()}SetEngineCount(t){this.engine_count=t}GetTailRotor(){return this.type==N.HELICOPTER&&this.rotor_count<2}GetBladeList(){return this.blade_list}GetRotorBleed(){return this.type==N.HELICOPTER?this.blade_list[this.blade_idx].rotor_bleed:0}GetPowerFactor(){return this.stagger_list[this.stagger_sel].powerfactor}GetBladeCountIdx(){return this.blade_idx}GetStaggerList(){return this.stagger_list}GetStagger(){return this.stagger_sel}SetStagger(t){t!=this.stagger_sel&&(this.stagger_sel=t,this.CalculateStats())}CanStagger(){const t=[];for(let e=0;e=2&&3==this.stagger_list[e].count?t.push(!0):t.push(!1);return t}VerifySizes(){this.type==N.AIRPLANE?(this.rotor_count=0,this.rotor_span=0,this.stagger_sel=0):this.type==N.AUTOGYRO?(this.rotor_count=1,this.sizing_span=Math.ceil(-1e-6+Math.sqrt(.6*this.wing_area/(Math.PI/8))),this.rotor_span=Math.max(this.rotor_span,2-this.sizing_span),this.stagger_sel=0):this.type==N.HELICOPTER&&(this.rotor_count=Math.max(1,this.rotor_count),this.rotor_count>1&&this.rotor_count%2==1&&(this.rotor_count=this.rotor_count-1),-1!=this.dryMP?(1==this.rotor_count?this.sizing_span=Math.ceil(5*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6):this.sizing_span=Math.ceil(4*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6),this.sizing_span=Math.min(100,this.sizing_span),this.rotor_span=Math.max(this.rotor_span,-Math.floor(1e-6+this.sizing_span/2))):this.sizing_span=10)}VerifyStagger(){if(this.rotor_count>2&&this.stagger_list[this.stagger_sel].count<=2){for(let t=0;t{var s=document.getElementById(t);s.classList.toggle("active",e);var i=s.nextElementSibling;(i=i.nextElementSibling).style.maxHeight=e?"inherit":"0px"};class kt{}class Lt extends kt{constructor(t){super(),this.weap=t,document.getElementById("lbl_weapons").textContent=h("Weapons Section Title"),document.getElementById("lbl_num_wsets").textContent=h("Weapons Number of Weapon Sets"),this.inp_w_count=document.getElementById("num_wsets"),this.inp_w_count.onchange=()=>{this.weap.SetWeaponSetCount(this.inp_w_count.valueAsNumber)},document.getElementById("lbl_num_wbraces").textContent=h("Weapons Number of Weapon Braces"),this.inp_w_brace=document.getElementById("num_wbraces"),this.inp_w_brace.onchange=()=>{this.weap.SetBraceCount(this.inp_w_brace.valueAsNumber)},this.tbl=document.getElementById("table_weapons"),this.wrow=[]}CreateWSetRow(){const t=document.createDocumentFragment(),e=this.tbl.insertRow(),s=function(t,e){const s=document.createElement("TD");return s.innerHTML="",t.appendChild(s),s}(e),i=document.createElement("SPAN");St(e,h("Weapons Weapons")),St(e,h("Weapons Weapon Stats"));const a=xt(t),n=a.insertCell(),r={plus:document.createElement("BUTTON"),minus:document.createElement("BUTTON"),type:document.createElement("SELECT"),dirs:[],count:document.createElement("INPUT"),action:document.createElement("SELECT"),projectile:document.createElement("SELECT"),fixed:document.createElement("INPUT"),wcell:null,weaps:[],ammo:document.createElement("INPUT"),stats:{mass:null,drag:null,cost:null,sect:null,mounting:null,jams:null,hits:null,damg:null,shots:null,shots_header:null},repeating:document.createElement("INPUT"),seat:document.createElement("SELECT")},o=this.weap.GetWeaponList();for(const t of o){const e=document.createElement("OPTION");e.text=h(t.name)+" ("+h(t.era)+")",r.type.add(e)}r.type.required=!0;const l=this.weap.GetSeatList();for(const t of l){const e=document.createElement("OPTION");e.text=t,r.seat.add(e)}const c=this.weap.GetActionList();for(const t of c){const e=document.createElement("OPTION");e.text=h(t.name),r.action.add(e)}r.action.required=!0;const u=this.weap.GetProjectileList();for(const t of u){const e=document.createElement("OPTION");e.text=h(t.name),r.projectile.add(e)}r.projectile.required=!0,r.plus.textContent="+",r.minus.textContent="-";const m=bt(n);i.appendChild(r.minus),i.appendChild(r.plus);const p=St(i,h("Weapons Weapon Set"));p.style.border="none",p.style.width="100%",p.style.padding="0",i.style.display="inline-flex",i.style.width="100%",s.appendChild(i),Bt(h("Weapons Type"),r.type,m),Bt(h("Seat Location"),r.seat,m);const d=bt(m.div1),g=bt(m.div2);wt(h("Weapons Number of Mounts"),r.count,d),wt(h("Weapons Ammunition"),r.ammo,g),Bt(h("Weapons Action"),r.action,d),Bt(h("Weapons Projectile"),r.projectile,g),Pt(h("Weapons Belt Fed"),r.repeating,d),Rt(g),Pt(h("Fixed"),r.fixed,d),Rt(g);const _=this.weap.GetDirectionList();for(let t=0;t<_.length;t+=2){const e=h(_[t]);var f=document.createElement("INPUT");Pt(e,f,d),r.dirs.push(f),Pt(h(_[t+1]),f=document.createElement("INPUT"),g),r.dirs.push(f)}r.wcell=a.insertCell();const A=a.insertCell();A.classList.toggle("inner_table");const b=document.createElement("TABLE");b.classList.toggle("inner_table"),A.appendChild(b);const S=b.insertRow();St(S,h("Stat Mass")),St(S,h("Stat Drag")),St(S,h("Stat Cost"));const y=b.insertRow();r.stats.mass=y.insertCell(),r.stats.drag=y.insertCell(),r.stats.cost=y.insertCell();const w=b.insertRow();St(w,h("Stat Required Sections")),St(w,h("Weapons Stat Mounting")),St(w,h("Weapons Stat Jam"));const C=b.insertRow();r.stats.sect=C.insertCell(),r.stats.mounting=C.insertCell(),r.stats.jams=C.insertCell();const B=b.insertRow();St(B,h("Weapons Stat Hits")),St(B,h("Weapons Stat Damage")),r.stats.shots_header=St(B,h("Weapons Stat Shots"));const E=b.insertRow();return r.stats.hits=E.insertCell(),r.stats.damg=E.insertCell(),r.stats.shots=E.insertCell(),this.tbl.appendChild(t),r}CreateWRow(t){const e={span:document.createElement("SPAN"),wing:document.createElement("INPUT"),covered:document.createElement("INPUT"),accessible:document.createElement("INPUT"),free_access:document.createElement("INPUT"),synch:document.createElement("SELECT"),count:document.createElement("INPUT")};Et(h("Weapons Wing Mount"),e.wing,e.span,!1),Et(h("Weapons Accessible"),e.accessible,e.span,!1),Et(h("Weapons Free Accessible"),e.free_access,e.span,!1),Et(h("Weapons Covered"),e.covered,e.span,!0),yt(h("Weapons # Weapons at Mount"),e.count,e.span,!1),function(t,e,s,i=!0){const a=document.createElement("SPAN"),n=document.createElement("LABEL");e.id=At(),n.htmlFor=e.id,n.style.marginLeft="0.25em",n.style.marginRight="0.5em",n.textContent=t,a.appendChild(n),a.appendChild(e),s.appendChild(a),i&&s.appendChild(document.createElement("BR"))}(h("Weapons Synchronization"),e.synch,e.span,!1),e.span.appendChild(document.createElement("HR"));const s=this.weap.GetSynchronizationList();for(const t of s){const s=document.createElement("OPTION");s.text=h(t),e.synch.add(s)}return t.appendChild(e.span),e}UpdateWSet(t,e){e.type.selectedIndex=t.GetWeaponSelected(),e.type.onchange=()=>{t.SetWeaponSelected(e.type.selectedIndex)};const s=this.weap.GetSeatList();if(e.seat.options.length!=s.length){for(;e.seat.options.length>0;)e.seat.options.remove(e.seat.options.length-1);for(const t of s){const s=document.createElement("OPTION");s.text=t,e.seat.add(s)}}e.seat.selectedIndex=t.GetSeat(),e.seat.onchange=()=>{t.SetSeat(e.seat.selectedIndex)},e.count.valueAsNumber=t.GetMountingCount(),e.count.onchange=()=>{t.SetMountingCount(e.count.valueAsNumber)},e.action.selectedIndex=t.GetAction();const i=t.GetCanAction();for(let t=0;t{t.SetAction(e.action.selectedIndex)},e.projectile.selectedIndex=t.GetProjectile();const a=t.GetCanProjectile();for(let t=0;t{t.SetProjectile(e.projectile.selectedIndex)},e.repeating.checked=t.GetRepeating(),e.repeating.onchange=()=>{t.SetRepeating(e.repeating.checked)},e.repeating.disabled=!t.CanRepeating(),e.fixed.checked=t.GetFixed(),e.fixed.onchange=()=>{t.SetFixed(e.fixed.checked)};const r=t.GetDirection(),o=t.CanDirection();for(let s=0;s{t.SetDirection(s,e.dirs[s].checked)},e.dirs[s].disabled=!o[s];e.ammo.valueAsNumber=t.GetAmmo(),e.ammo.onchange=()=>{t.SetAmmo(e.ammo.valueAsNumber)};const l=t.GetWeapons();for(;e.weaps.lengthl.length;){const t=e.weaps.pop();e.wcell.removeChild(t.span)}for(let t=0;t{l[t].SetWing(e.weaps[t].wing.checked)},e.weaps[t].wing.disabled=!l[t].CanWing(),e.weaps[t].covered.checked=l[t].GetCovered(),e.weaps[t].covered.onchange=()=>{l[t].SetCovered(e.weaps[t].covered.checked)},e.weaps[t].covered.disabled=!l[t].CanCovered(),e.weaps[t].accessible.checked=l[t].GetAccessible(),e.weaps[t].accessible.onchange=()=>{l[t].SetAccessible(e.weaps[t].accessible.checked)},e.weaps[t].free_access.checked=l[t].GetFreeAccessible(),e.weaps[t].free_access.onchange=()=>{l[t].SetFreeAccessible(e.weaps[t].free_access.checked)},e.weaps[t].free_access.disabled=!(l[t].can_free_accessible||l[t].GetFreeAccessible()),e.weaps[t].count.valueAsNumber=l[t].GetCount(),e.weaps[t].count.onchange=()=>{l[t].SetCount(e.weaps[t].count.valueAsNumber)},e.weaps[t].synch.selectedIndex=l[t].GetSynchronization()+1,e.weaps[t].synch.onchange=()=>{l[t].SetSynchronization(e.weaps[t].synch.selectedIndex-1)},e.weaps[t].synch.disabled=!l[t].can_synchronize;const s=l[t].CanSynchronization();for(let i=0;ithis.wrow.length;)this.wrow.push(this.CreateWSetRow());for(;t.length{this.weap.DuplicateSet(e)},this.wrow[e].minus.onclick=()=>{this.weap.RemoveSet(e)},this.UpdateWSet(t[e],this.wrow[e])}UpdateDisplay(){this.UpdateWSets(),this.inp_w_count.valueAsNumber=this.weap.GetWeaponSets().length,this.inp_w_brace.valueAsNumber=this.weap.GetBraceCount()}}function Wt(t,e){const s=t.GetDirection();let i=0;for(const t of s)t&&i++;let a="";return 1==i&&t.GetFixed()?a+=h("Fixed")+" ":a+=i<=2?h("Flexible")+" ":h("Turreted")+" ",t.GetAction()==L.MECHANICAL?a+=h("Weapon Tag Mechanical Action")+" ":t.GetAction()==L.GAST?a+=h("Weapon Tag Gast Principle")+" ":t.GetAction()==L.ROTARY&&(a+=h("Weapon Tag Rotary")+" "),t.GetProjectile()==k.HEATRAY?a+=h("Weapon Tag Heat Ray")+" ":t.GetProjectile()==k.GYROJETS?a+=h("Weapon Tag Gyrojet")+" ":t.GetProjectile()==k.PNEUMATIC&&(a+=h("Weapon Tag Pneumatic")+" "),a+=e[t.GetWeaponSelected()].abrv,a}function Ht(t){const e=[h("Weapon Tag Jam",t.GetJam())],s=t.GetFinalWeapon();return t.GetReload()>0&&(1==t.GetReload()?e.push(h("Weapon Tag Manual")):e.push(h("Weapon Tag Reload",t.GetReload()))),s.rapid&&e.push(h("Weapon Tag Rapid Fire")),s.shells&&e.push(h("Weapon Tag Shells")),s.ap>0&&e.push(h("Weapon Tag AP",s.ap)),t.GetIsFullyAccessible()?e.push(h("Weapon Tag Fully Accessible")):t.GetIsPartlyAccessible()?e.push(h("Weapon Tag Partly Accessible")):e.push(h("Weapon Tag Inaccessible")),s.deflection&&e.push(h("Weapon Tag Awkward",s.deflection)),e}function qt(t,e,s){var i="";const a=t.GetDirection(),r=[];for(let t=0;t{this.CalculateStats()})),this.cockpits.SetCalculateStats((()=>{this.CalculateStats()})),this.passengers.SetCalculateStats((()=>{this.CalculateStats()})),this.engines.SetCalculateStats((()=>{this.CalculateStats()})),this.propeller.SetCalculateStats((()=>{this.CalculateStats()})),this.frames.SetCalculateStats((()=>{this.CalculateStats()})),this.wings.SetCalculateStats((()=>{this.CalculateStats()})),this.stabilizers.SetCalculateStats((()=>{this.CalculateStats()})),this.controlsurfaces.SetCalculateStats((()=>{this.CalculateStats()})),this.reinforcements.SetCalculateStats((()=>{this.CalculateStats()})),this.fuel.SetCalculateStats((()=>{this.CalculateStats()})),this.munitions.SetCalculateStats((()=>{this.CalculateStats()})),this.cargo.SetCalculateStats((()=>{this.CalculateStats()})),this.gear.SetCalculateStats((()=>{this.CalculateStats()})),this.accessories.SetCalculateStats((()=>{this.CalculateStats()})),this.optimization.SetCalculateStats((()=>{this.CalculateStats()})),this.weapons.SetCalculateStats((()=>{this.CalculateStats()})),this.used.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCalculateStats((()=>{this.CalculateStats()})),this.alter.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCantileverList(this.reinforcements.GetCantileverList()),this.cockpits.SetNumberOfCockpits(1),this.engines.SetNumberOfEngines(1),this.frames.SetTailType(1),this.use_storage=e,this.updated_stats=!1,this.freeze_calculation=!1,this.aircraft_type=N.AIRPLANE,this.Reset()}InteractiveDash(){const t=this.GetStats(),e=this.GetDerivedStats(),s=this.VitalComponentList();for(var i=!1;s.length>10;)s.pop(),i=!0;for(i&&(s.pop(),s.push("And More. See Plane Builder for full list."));s.length<10;)s.push("");const a=this.GetAccessories().GetEffectiveCoverage();var n="";for(let t=0;t0&&(n+=""!=n?", ":h("Armour")+" ",n+=e.toString()+"/+"+(11-a[t]).toString())}const r=[],o=this.GetMunitions().GetBombCount(),l=this.GetMunitions().GetRocketCount();var c=this.GetMunitions().GetInternalBombCount();if((o>0||l>0)&&r.push("Current load here."),o>0){const t=Math.min(o,c),e=Math.max(0,o-t);if(t>0&&r.push(h(" Bomb Mass Internally.",t)),e>0&&r.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.GetMunitions().GetMaxBombSize());r.push(h("Largest Internal Bomb",e.toString()))}c-=t}if(l>0){const t=Math.min(l,c),e=Math.max(0,l-t);t>0&&r.push(h(" Rocket Mass Internally.",t)),e>0&&r.push(h(" Rocket Mass Externally.",e))}for(;r.length<5;)r.push("");let u="";for(const e of t.warnings)u+=e.source+": "+e.warning+"\n";const m={altitude:0,airspeed:0,fuel:e.FuelUses,dropoff:e.Dropoff,visibility:this.GetCockpits().GetCockpit(0).GetVisibility(),energy_loss:e.EnergyLoss,turn_bleed:e.TurnBleed,stability:e.Stabiilty,stress:this.GetCockpits().GetCockpit(0).GetFlightStress()[0],plane_escape:this.GetCockpits().GetCockpit(0).GetEscape(),crash:this.GetCockpits().GetCockpit(0).GetCrash(),max_toughness:e.Toughness,current_toughness:e.Toughness,max_strain:e.MaxStrain,current_strain:e.MaxStrain,g_force:0,kills:0,full_load_boost:e.BoostFullwBombs,full_load_handling:e.HandlingFullwBombs,full_load_climb:e.RateOfClimbwBombs,full_load_stall:e.StallSpeedFullwBombs,full_load_speed:e.MaxSpeedwBombs,half_fuel_bombs_boost:Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),half_fuel_bombs_handling:Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),half_fuel_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),half_fuel_bombs_stall:Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),half_fuel_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),full_fuel_no_bombs_boost:e.BoostFull,full_fuel_no_bombs_handling:e.HandlingFull,full_fuel_no_bombs_climb:e.RateOfClimbFull,full_fuel_no_bombs_stall:e.StallSpeedFull,full_fuel_no_bombs_speed:Math.floor(1e-6+e.MaxSpeedFull),half_fuel_no_bombs_boost:Math.floor((e.BoostFull+e.BoostEmpty)/2),half_fuel_no_bombs_handling:Math.floor((e.HandlingFull+e.HandlingEmpty)/2),half_fuel_no_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),half_fuel_no_bombs_stall:Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),half_fuel_no_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),empty_boost:0,empty_handling:e.HandlingEmpty,empty_climb:0,empty_stall:e.StallSpeedEmpty,empty_speed:0,vital_part_1:s[0],vital_part_2:s[1],vital_part_3:s[2],vital_part_4:s[3],vital_part_5:s[4],vital_part_6:s[5],vital_part_7:s[6],vital_part_8:s[7],vital_part_9:s[8],vital_part_10:s[9],armor:n,max_bomb_load:r[0],ordinance_1:r[1],ordinance_2:r[2],ordinance_3:r[3],ordinance_4:r[4],notes:u,full_load_selected:!0,half_fuel_bombs_selected:!1,full_fuel_no_bombs_selected:!1,half_fuel_no_bombs_selected:!1,empty_selected:!1,engines:this.InteractiveEngines(),weapons:this.InteractiveWeapons()};return JSON.stringify(m)}InteractiveEngines(){const t=[];for(let e=0;e0&&t.starter&&r.push(h("Starter"))}else{s.IsRotary()&&s.IsTractor()?r.push(h("Turns Right")):s.IsRotary()&&s.IsPusher()&&r.push(h("Turns Left"));const t=T().get(s.GetSelectedList()).get_name(a.name);t.upgrades[1]?r.push(h("War Emergency Power")):t.compressor_count>0&&1==t.compressor_type&&r.push(h("War Emergency Power from altitudes 0-9"))}if(i.notes=n.Join(", ",r),s.GetUsePushPull()){const e=i.reliability.split("/");i.reliability=e[0].toString(),t.push(JSON.stringify(i)),i.reliability=e[0].toString(),t.push(JSON.stringify(i))}else t.push(JSON.stringify(i))}return t}InteractiveWeapons(){const t=[];for(const s of this.GetWeapons().GetWeaponSets()){const i=this.GetWeapons().GetWeaponList(),a=s.GetHits(),r=[];"PR"==i[s.GetWeaponSelected()].abrv?(r.push(5),r.push(5),r.push(5),r.push(5)):(r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[0])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[1])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[2])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[3])));const o=s.GetFinalWeapon(),l=[],c={type:Wt(s,i),ammo:s.GetShots(),ap:o.ap,jam:s.GetJam(),knife_hits:a[0],close_hits:a[1],long_hits:a[2],extreme_hits:a[3],knife_damage:r[0],close_damage:r[1],long_damage:r[2],extreme_damage:r[3],tags:""},u=this.GetWeapons().GetDirectionList();s.IsPlural()&&(c.type=s.GetWeaponCount().toString()+"x "+c.type);const m=s.GetDirection();var e="";e+="[";for(let t=0;t11.05?(this.aircraft_type=t.aircraft_type,this.rotor.SetType(t.aircraft_type)):(this.aircraft_type=N.AIRPLANE,this.rotor.SetType(N.AIRPLANE)),this.era.fromJSON(t.era,s),this.cockpits.fromJSON(t.cockpits,s),this.passengers.fromJSON(t.passengers,s),this.engines.fromJSON(t.engines,s),this.propeller.fromJSON(t.propeller,s),this.frames.fromJSON(t.frames,s),this.wings.fromJSON(t.wings,s),this.stabilizers.fromJSON(t.stabilizers,s),this.controlsurfaces.fromJSON(t.controlsurfaces,s),this.reinforcements.fromJSON(t.reinforcements,s),this.fuel.fromJSON(t.fuel,s),this.munitions.fromJSON(t.munitions,s),this.cargo.fromJSON(t.cargo,s),this.gear.fromJSON(t.gear,s),this.accessories.fromJSON(t.accessories,s),this.optimization.fromJSON(t.optimization,s),this.weapons.fromJSON(t.weapons,s),s>10.65&&this.used.fromJSON(t.used,s),s>11.05&&this.rotor.fromJSON(t.rotor,s),s>12.25?this.alter.fromJSON(t.alter,s):this.alter.ClearAll(),this.freeze_calculation=!1,!0}serialize(t){t.PushString(this.version),t.PushString(this.name),this.era.serialize(t),this.cockpits.serialize(t),this.passengers.serialize(t),this.engines.serialize(t),this.propeller.serialize(t),this.frames.serialize(t),this.wings.serialize(t),this.stabilizers.serialize(t),this.controlsurfaces.serialize(t),this.reinforcements.serialize(t),this.fuel.serialize(t),this.munitions.serialize(t),this.cargo.serialize(t),this.gear.serialize(t),this.accessories.serialize(t),this.optimization.serialize(t),this.weapons.serialize(t),this.used.serialize(t),this.rotor.serialize(t),t.PushNum(this.aircraft_type),this.alter.serialize(t)}deserialize(t){this.freeze_calculation=!0,t.version=parseFloat(t.GetString()),this.name=t.GetString(),this.era.deserialize(t),this.cockpits.deserialize(t),this.passengers.deserialize(t),this.engines.deserialize(t),this.propeller.deserialize(t),this.frames.deserialize(t),this.wings.deserialize(t),this.stabilizers.deserialize(t),this.controlsurfaces.deserialize(t),this.reinforcements.deserialize(t),this.fuel.deserialize(t),this.munitions.deserialize(t),this.cargo.deserialize(t),this.gear.deserialize(t),this.accessories.deserialize(t),this.optimization.deserialize(t),this.weapons.deserialize(t),t.version>10.65&&this.used.deserialize(t),t.version>11.05&&t.GetRemaining()>0?(this.rotor.deserialise(t),this.aircraft_type=t.GetNum(),this.rotor.SetType(this.aircraft_type)):(this.aircraft_type=N.AIRPLANE,this.rotor.SetType(N.AIRPLANE)),t.version>12.25?this.alter.deserialize(t):this.alter.ClearAll(),this.freeze_calculation=!1}SetType(t){this.aircraft_type=t,this.rotor.SetType(t),this.CalculateStats()}SetDisplayCallback(t){this.DisplayCallback=t}CalculateStats(){if(this.freeze_calculation)return;this.recurrent_calculation_depth=this.recurrent_calculation_depth+1,this.updated_stats=!1;let t=new u;if(t=t.Add(this.era.PartStats()),t=t.Add(this.cockpits.PartStats()),t=t.Add(this.passengers.PartStats()),this.engines.SetTailMods(this.frames.GetFarmanOrBoom(),this.wings.GetSwept()&&this.stabilizers.GetVOutboard(),this.stabilizers.GetCanard()),this.engines.SetInternal(this.aircraft_type==N.HELICOPTER||W(this.aircraft_type)),this.engines.SetMetalArea(this.wings.GetMetalArea()),this.engines.HaveParasol(this.wings.GetParasol()),t=t.Add(this.engines.PartStats()),this.propeller.SetEngineTypes(this.engines.GetEngineTypes()),this.propeller.SetAcftType(this.aircraft_type),t=t.Add(this.propeller.PartStats()),t=t.Add(this.fuel.PartStats()),t=t.Add(this.munitions.PartStats()),this.weapons.SetNumberOfCockpits(this.cockpits.GetNumberOfCockpits()),this.weapons.SetTractorInfo(this.engines.GetTractorSpinner()),this.weapons.SetPusherInfo(this.engines.GetPusherSpinner()),this.weapons.cant_type=this.reinforcements.GetCantileverType(),this.weapons.SetHavePropeller(this.engines.GetNumPropellers()>0),this.weapons.SetCanWing(!W(this.aircraft_type)),t=t.Add(this.weapons.PartStats()),t=t.Add(this.cargo.PartStats()),this.wings.SetAcftType(this.aircraft_type),this.aircraft_type==N.AUTOGYRO?this.wings.SetRotorSpan(this.rotor.GetRotorSpan()):this.wings.SetRotorSpan(0),t=t.Add(this.wings.PartStats()),this.rotor.SetWingArea(t.wingarea),this.aircraft_type==N.AUTOGYRO&&(this.rotor.SetEngineCount(this.engines.GetNumberOfEngines()),t=t.Add(this.rotor.PartStats())),this.controlsurfaces.SetWingArea(t.wingarea),this.controlsurfaces.SetBoomTail(this.frames.GetUseBoom()),this.controlsurfaces.SetSpan(this.wings.GetSpan()),this.controlsurfaces.SetAcftType(this.aircraft_type),this.controlsurfaces.SetCanElevator(this.stabilizers.GetHStabCount()>0),this.controlsurfaces.SetCanRudder(this.stabilizers.GetVStabCount()>0),this.controlsurfaces.SetIsVTail(this.stabilizers.GetIsVTail()),this.aircraft_type==N.AIRPLANE?this.controlsurfaces.SetNumCantilever(this.reinforcements.GetTotalCantilevers()):this.controlsurfaces.SetNumCantilever(0),t=t.Add(this.controlsurfaces.PartStats()),this.reinforcements.SetMonoplane(this.wings.GetMonoplane()),this.reinforcements.SetTandem(this.wings.GetTandem()),this.reinforcements.SetStaggered(this.wings.GetStaggered()),this.reinforcements.SetCanUseExternal(this.wings.GetArea()>0),this.reinforcements.SetSesquiplane(this.wings.GetIsSesquiplane()),this.reinforcements.SetAircraftType(this.aircraft_type),this.reinforcements.SetCantLift(this.era.GetCantLift()),t=t.Add(this.reinforcements.PartStats()),this.rotor.GetTailRotor()&&(t.power=Math.floor(1e-6+.9*t.power)),this.accessories.SetAcftRadiator(this.engines.GetNumberOfRadiators()>0),this.accessories.SetSkinArmor(this.frames.GetArmor()),this.accessories.SetCanCutouts(this.wings.CanCutout(),this.frames.CanCutout()),t=t.Add(this.accessories.PartStats()),this.frames.SetRequiredSections(t.reqsections),this.frames.SetHasTractorNacelles(this.engines.GetHasTractorNacelles()),this.frames.SetIsTandem(this.wings.GetTandem()),t=t.Add(this.frames.PartStats()),this.stabilizers.SetEngineCount(this.engines.GetNumberOfEngines()),this.stabilizers.SetIsTandem(this.wings.GetTandem()),this.stabilizers.SetIsSwept(this.wings.GetSwept()),this.stabilizers.SetHaveTail(!this.frames.GetIsTailless()),this.stabilizers.SetHelicopter(!1),this.stabilizers.SetLiftingArea(t.wingarea),this.stabilizers.wing_drag=this.wings.GetWingDrag()+this.rotor.GetRotorDrag(),t=t.Add(this.stabilizers.PartStats()),this.wings.SetAircraftMass(t.mass),t.mass+=this.wings.GetPaperMass(),t.mass=Math.max(1,t.mass),this.gear.SetGull(this.wings.HasInvertedGull()),this.gear.SetLoadedMass(t.mass+t.wetmass),this.gear.CanBoat(this.engines.GetEngineHeight(),this.wings.GetWingHeight()),t=t.Add(this.gear.PartStats()),t.toughness+=Math.floor(1e-6+t.structure/5),this.optimization.SetAcftStats(t),t=t.Add(this.optimization.PartStats()),this.cockpits.SetHasRotary(this.engines.HasTractorRotary()),t=t.Add(this.alter.PartStats()),t.Round(),!this.updated_stats){this.updated_stats=!0,this.stats=t;const e=this.GetDerivedStats();this.stats.cost+=this.controlsurfaces.GetFlapCost(e.DryMP),t.reliability-=this.used.burnt_out,this.weapons.SetStickyGuns(this.used.sticky_guns),this.cockpits.SetArmed(this.weapons.GetArmedSeats()),this.cockpits.UpdateCrewStats(this.stats.escape,e.ControlStress,e.RumbleStress,this.stats.visibility,this.stats.crashsafety);let s=0;for(const t of this.cockpits.GetStressList())s=Math.max(s,t[0]-t[1]);0!=s&&-1==this.stats.warnings.findIndex((t=>t.source==h("Co-Pilot Controls")))&&this.stats.warnings.push({source:h("Co-Pilot Controls"),warning:h("Co-Pilot Warning",s),color:c.WHITE}),W(this.aircraft_type)&&(t.upkeep+=1),this.aircraft_type==N.ORNITHOPTER_BUZZER&&(t.reliability-=2),this.engines.UpdateReliability(t),this.reinforcements.SetAcftStructure(t.structure),this.fuel.SetArea(this.wings.GetArea()),this.fuel.SetCantilever(this.reinforcements.GetIsCantilever()),this.accessories.SetVitalParts(this.VitalComponentList().length),this.munitions.SetAcftParameters(t.structure,this.era.GetMaxBomb(),this.wings.HasInvertedGull()),this.stats.cost=Math.max(1,this.stats.cost),this.stats.liftbleed=Math.max(1,this.stats.liftbleed),10*this.engines.GetRumble()>t.structure&&(this.stats.power=0,this.stats.warnings.push({source:h("Stat Rumble"),warning:h("Rumble Warning"),color:c.RED})),this.use_storage&&window.localStorage.setItem("test.aircraft",JSON.stringify(this))}this.recurrent_calculation_depth=this.recurrent_calculation_depth-1,this.DisplayCallback&&!this.freeze_calculation&&0==this.recurrent_calculation_depth&&this.DisplayCallback()}GetDerivedStats(){let t=Math.floor(1e-6+this.stats.mass/5);t=Math.max(t,1);let e=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass)/5);e=Math.max(e,1);let s=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass+this.stats.bomb_mass)/5);s=Math.max(s,1);let i=Math.floor(1e-6+(this.stats.drag+t)/5);i=Math.max(i,1);const a=i;let n=Math.floor(1e-6+(this.stats.drag+this.munitions.GetExternalMass()+t)/5);n=Math.max(n,1);let r=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*i))),o=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*a))),l=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*n)));this.stats.mass<15&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Mass")))&&this.stats.warnings.push({source:h("Stat Mass"),warning:h("Low Mass Warning"),color:c.YELLOW}),this.stats.drag+t<35&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Drag")))&&this.stats.warnings.push({source:h("Stat Drag"),warning:h("Low Drag Warning"),color:c.YELLOW});let u=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*t/Math.max(1,this.stats.wingarea))),m=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*e/Math.max(1,this.stats.wingarea))),p=Math.max(Math.floor(1e-6+this.stats.liftbleed*s/Math.max(1,this.stats.wingarea)));var d=this.engines.GetOverspeed();const g=Math.floor(1e-6+this.stats.power/t),_=Math.floor(1e-6+this.stats.power/e),f=Math.floor(1e-6+this.stats.power/s);0==f&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Boost")))&&this.stats.warnings.push({source:h("Derived Boost"),warning:h("Boost Warning"),color:c.RED});const A=Math.floor(1e-6+this.stats.pitchboost*r);r=Math.floor(1e-6+r*(1-.1*this.used.ragged)),o=Math.floor(1e-6+o*(1-.1*this.used.ragged)),l=Math.floor(1e-6+l*(1-.1*this.used.ragged));let b=this.stats.pitchstab+this.stats.latstab;this.stats.pitchstab>0&&this.stats.latstab>0?b+=2:this.stats.pitchstab<0&&this.stats.latstab<0&&(b-=2);let S=100+this.stats.control-t;b>10||b<-10?(S=-1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Stability")))&&this.stats.warnings.push({source:h("Derived Stability"),warning:h("Stability Warning"),color:c.RED})):10==b?S-=4:b>6?S-=3:b>3?S-=2:b>0?S-=1:0==b?S+=0:b>-4?S+=1:b>-7?S+=2:b>-10?S+=3:-10==b&&(S+=4);let y=S+t-e,w=S+t-s;S=Math.floor(1e-6+S-5*this.used.sluggish),y=Math.floor(1e-6+y-5*this.used.sluggish),w=Math.floor(1e-6+w-5*this.used.sluggish);let C=Math.min(this.stats.maxstrain-t,this.stats.structure);this.optimization.final_ms=Math.floor(1e-6+1.5*this.optimization.GetMaxStrain()*C/10),C+=this.optimization.final_ms,C=Math.floor(1e-6+C*(1-.2*this.used.fragile)),C<10&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Max Strain")))&&this.stats.warnings.push({source:h("Stat Max Strain"),warning:h("Max Strain Warning"),color:c.RED});let B=this.stats.toughness;B=Math.floor(1e-6+B*(1-.5*this.used.weak));const E=this.stats.structure;let M=Math.ceil(i/this.propeller.GetEnergy()-1e-6),P=M+1;M=Math.min(M,10),P=Math.min(P,10);let G=Math.ceil(Math.floor(1e-6+(u+m)/2)/this.propeller.GetTurn()-1e-6);this.aircraft_type==N.HELICOPTER&&(G=Math.max(1,Math.floor(1e-6+t/2))+this.rotor.GetRotorBleed(),M=Math.max(1,Math.floor(1e-6+i/7)),u=0,m=0,p=0,r=Math.min(37,r),o=Math.min(37,o),l=Math.min(37,l)),G=Math.max(G,1);let F=G+1;F=Math.max(F,1),u=Math.max(1,Math.floor(1e-6+u*(1+.2*this.used.hefty))),m=Math.max(1,Math.floor(1e-6+m*(1+.2*this.used.hefty))),p=Math.max(1,Math.floor(1e-6+p*(1+.2*this.used.hefty))),(l<=p||o<=m)&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stall Speed")))&&this.stats.warnings.push({source:h("Stall Speed"),warning:h("Stall Speed Warning"),color:c.RED});let R=Math.floor(1e-6+this.stats.fuel/this.stats.fuelconsumption);R=Math.floor(1e-6+R*(1-.2*this.used.leaky)),isFinite(R)||(R=0),R<6&&0!=this.stats.fuelconsumption&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Fuel Uses")))&&this.stats.warnings.push({source:h("Derived Fuel Uses"),warning:h("Fuel Uses Warning"),color:c.YELLOW});let x=1;(b>3||b<-3)&&x++;let I=0;x+=Math.min(this.accessories.GetMaxMassStress(),Math.floor(1e-6+t/10));const T=this.accessories.GetMaxTotalStress();x=Math.min(T,x),this.engines.GetMaxRumble()>0&&(I+=Math.max(1,.5*this.engines.GetRumble()),I=Math.floor(1e-6+I),I=Math.min(3,I)),0==T&&(I=0);let v=Math.max(1,Math.floor(1e-6+this.stats.power/t*(23/this.stats.pitchspeed)/i)),D=Math.max(1,Math.floor(1e-6+this.stats.power/e*(23/this.stats.pitchspeed)/a)),O=Math.max(1,Math.floor(1e-6+this.stats.power/s*(23/this.stats.pitchspeed)/n));return isFinite(v)||(v=0,D=0,O=0),W(this.aircraft_type)&&(S+=5,y+=5,w+=5,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Stall")))&&this.stats.warnings.push({source:h("Ornithopter Stall"),warning:h("Ornithopter Stall Warning"),color:c.WHITE}),d=C),this.aircraft_type==N.ORNITHOPTER_FLUTTER&&(S+=5,y+=5,w+=5,d=1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Flutterer Attack")))&&this.stats.warnings.push({source:h("Ornithopter Flutterer Attack"),warning:h("Ornithopter Flutterer Attack Warning"),color:c.WHITE})),this.aircraft_type==N.ORNITHOPTER_BUZZER&&(-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Boost")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Boost"),warning:h("Ornithopter Buzzer Boost Warning"),color:c.WHITE}),-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Stall")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Stall"),warning:h("Ornithopter Buzzer Stall Warning"),color:c.WHITE})),{DryMP:t,WetMP:e,WetMPwBombs:s,DPEmpty:i,DPFull:a,DPwBombs:n,MaxSpeedEmpty:r,MaxSpeedFull:o,MaxSpeedwBombs:l,StallSpeedEmpty:u,StallSpeedFull:m,StallSpeedFullwBombs:p,Overspeed:d,BoostEmpty:g,BoostFull:_,BoostFullwBombs:f,Dropoff:A,Stabiilty:b,HandlingEmpty:S,HandlingFull:y,HandlingFullwBombs:w,MaxStrain:C,Toughness:B,Structure:E,EnergyLoss:M,EnergyLosswBombs:P,TurnBleed:G,TurnBleedwBombs:F,FuelUses:R,ControlStress:x,RumbleStress:I,RateOfClimbFull:D,RateOfClimbEmpty:v,RateOfClimbwBombs:O}}VitalComponentList(){const t=this.GetDerivedStats(),e=[];e.push(h("Vital Part Controls"));for(let t=0;t0&&e.push(h("Vital Part Fuel Tanks"));for(let t=0;t{let s=parseInt(t.charge);"-"==t.charge&&(s=0);let i=parseInt(e.charge);return"-"==e.charge&&(i=0),isNaN(s)&&isNaN(i)?0:isNaN(s)?-1:isNaN(i)?1:i-s})),t=q(this.engines.GetElectrics(),t),t=q(t,this.weapons.GetElectrics());let e=!1;for(const s of t.equipment){const t=parseInt(s.charge);!isNaN(t)&&t>0&&(s.charge="+"+s.charge,e=!0)}return t.equipment.length>0&&t.storage<=0&&!e&&-1==this.stats.warnings.findIndex((t=>t.source==h("Insufficient Charge")))&&this.stats.warnings.push({source:h("Insufficient Charge"),warning:h("Insufficient Charge Warning"),color:c.RED}),t}}class zt extends kt{constructor(t){super(),this.model=t,document.getElementById("lbl_era").textContent=h("Era Section Title");const e=document.getElementById("table_era"),s=document.createDocumentFragment();var i=xt(s);St(i,h("Era Option")),St(i,h("Stat Lift Bleed")),St(i,h("Stat Cost")),St(i,h("Stat Pitch Stability"));const a=(i=xt(s)).insertCell();this.select=document.createElement("SELECT"),a.append(this.select),this.bleed=i.insertCell(),this.cost=i.insertCell(),this.pstab=i.insertCell(),this.select.required=!0,this.select.onchange=()=>{this.model.SetSelected(this.select.selectedIndex)};for(let t of this.model.GetEraOptions()){const e=document.createElement("OPTION");e.text=h(t.name),this.select.add(e)}e.appendChild(s)}UpdateDisplay(){this.select.selectedIndex=this.model.GetSelected();const t=this.model.PartStats();Nt(this.bleed,t.liftbleed.toString(),!1),Nt(this.cost,t.cost.toString(),!1),Nt(this.pstab,t.pitchstab.toString(),!1)}}class Jt extends kt{constructor(t,e){super(),this.row=t,this.cockpit=e,this.upg_chbxs=[],this.sft_chbxs=[],this.gun_chbxs=[];const s=document.createDocumentFragment(),i=It(s),a=It(s),n=It(s),r=It(s),o=It(s),l=document.createElement("TABLE"),c=l.insertRow();St(c,h("Stat Mass")),St(c,h("Stat Drag")),St(c,h("Stat Cost"));const u=l.insertRow();this.d_mass=u.insertCell(),this.d_drag=u.insertCell(),this.d_cost=u.insertCell();const m=l.insertRow();St(m,h("Stat Control")),St(m,h("Stat Required Sections")),St(m,"");const p=l.insertRow();this.d_cont=p.insertCell(),this.d_rseq=p.insertCell(),p.insertCell();const d=l.insertRow();St(d,h("Stat Flight Stress")),St(d,h("Stat Escape")),St(d,h("Stat Visibility"));const g=l.insertRow();this.d_strs=g.insertCell(),this.d_escp=g.insertCell(),this.d_visi=g.insertCell(),o.appendChild(l),o.className="inner_table",l.className="inner_table",this.sel_type=document.createElement("SELECT"),this.d_strs.className="part_local",this.d_visi.className="part_local",this.d_escp.className="part_local";for(let t of e.GetTypeList()){let e=document.createElement("OPTION");e.text=h(t.name),this.sel_type.add(e)}i.appendChild(this.sel_type);var _=bt(a);const f=e.GetUpgradeList(),A=e.CanUpgrades();for(let t=0;t{this.cockpit.SetUpgrade(t,e.checked)}),this.upg_chbxs.push(e)}_=bt(n);var b=0;for(let t of e.GetSafetyList()){let e=document.createElement("INPUT");Pt(h(t.name),e,_);let s=b;b+=1,e.onchange=()=>{this.cockpit.SetSafety(s,e.checked)},this.sft_chbxs.push(e)}_=bt(r);var S=0;for(let t of e.GetGunsightList()){let e=document.createElement("INPUT");Pt(h(t.name),e,_);let s=S;S+=1,e.onchange=()=>{this.cockpit.SetGunsight(s,e.checked)},this.gun_chbxs.push(e)}this.bombsight=document.createElement("INPUT"),wt(h("Cockpit Bombsight"),this.bombsight,_),this.bombsight.onchange=()=>{this.cockpit.SetBombsightQuality(this.bombsight.valueAsNumber)},this.bombsight.min="0",this.bombsight.max="301",this.bombsight.step="1",this.sel_type.onchange=()=>{this.cockpit.SetType(this.sel_type.selectedIndex)},this.row.appendChild(s)}UpdateCockpit(t){this.cockpit=t}UpdateDisplay(){let t=this.cockpit.PartStats();Nt(this.d_mass,t.mass.toString(),!1),Nt(this.d_drag,t.drag.toString(),!1),Nt(this.d_cost,t.cost.toString(),!1),Nt(this.d_cont,t.control.toString(),!0),Nt(this.d_rseq,t.reqsections.toString(),!1);const e=this.cockpit.GetFlightStress();e[0],e[1],Nt(this.d_strs,n.Format("{0}",e[0])),Nt(this.d_escp,this.cockpit.GetEscape().toString(),!0),Nt(this.d_visi,this.cockpit.GetVisibility().toString(),!0),this.sel_type.selectedIndex=this.cockpit.GetType();const s=this.cockpit.GetSelectedUpgrades();for(let t=0;t{this.cockpits.SetNumberOfCockpits(this.counter.valueAsNumber)},this.tbl.appendChild(e)}CounterChange(){for(;this.positions.length>this.counter.valueAsNumber;)this.RemoveCockpit();for(;this.positions.length{this.pass.SetSeats(this.nseats.valueAsNumber)},this.nbeds.onchange=()=>{this.pass.SetBeds(this.nbeds.valueAsNumber)},this.connect.onchange=()=>{this.pass.SetConnected(this.connect.checked)},e.appendChild(s)}SetCollapse(){Ot("passenger_collapse",!this.pass.IsDefault())}UpdateDisplay(){const t=this.pass.PartStats();this.nseats.valueAsNumber=this.pass.GetSeats(),this.nbeds.valueAsNumber=this.pass.GetBeds(),this.connect.checked=this.pass.GetConnected(),this.connect.disabled=!this.pass.PossibleConnection(),Nt(this.mass,t.mass.toString(),!1),Nt(this.reqseq,t.reqsections.toString(),!1)}}class Qt extends kt{constructor(t,e){super(),this.engine=t;const s=e;this.InitTypeSelect(s);const i=s.insertCell();i.className="inner_table";const a=document.createElement("TABLE");a.className="inner_table",St(a.insertRow(),h("Engine Cooling")),this.cool_cell=a.insertRow().insertCell(),St(a.insertRow(),h("Engine Mounting"));const n=a.insertRow().insertCell();St(a.insertRow(),h("Engine Upgrades"));const r=a.insertRow().insertCell();i.appendChild(a);const o=s.insertCell();o.className="inner_table";const l=document.createElement("TABLE");l.className="inner_table",St(l.insertRow(),h("Engine Cowls"));const c=l.insertRow().insertCell();o.appendChild(l),St(l.insertRow(),h("Engine Electrical"));const u=l.insertRow().insertCell();this.InitMountSelect(n),this.InitUpgradeSelect(r),this.InitCowlSelect(c),this.InitElectricSelect(u),this.InitStatDisplay(s),this.intake_fan=document.createElement("INPUT"),this.intake_fan.onchange=()=>{this.engine.SetIntakeFan(this.intake_fan.checked)}}InitTypeSelect(t){this.e_rarity=document.createElement("LABEL"),this.e_pwr=document.createElement("LABEL"),this.e_mass=document.createElement("LABEL"),this.e_drag=document.createElement("LABEL"),this.e_rely=document.createElement("LABEL"),this.e_cool=document.createElement("LABEL"),this.e_over=document.createElement("LABEL"),this.e_fuel=document.createElement("LABEL"),this.e_alti=document.createElement("LABEL"),this.e_torq=document.createElement("LABEL"),this.e_rumb=document.createElement("LABEL"),this.e_cost=document.createElement("LABEL"),this.cool_count=document.createElement("INPUT"),this.cool_count.setAttribute("type","number");const e=t.insertCell(0);this.e_list_select=document.createElement("SELECT"),this.e_list_select.required=!0,e.appendChild(this.e_list_select),e.appendChild(document.createElement("BR"));for(let t of T().keys()){let e=document.createElement("OPTION");e.text=t,this.e_list_select.add(e)}this.e_select=document.createElement("SELECT"),this.e_select.required=!0,e.appendChild(this.e_select),e.appendChild(document.createElement("BR"));const s=T();for(let t=0;t{this.engine.SetSelectedList(this.e_list_select.options[this.e_list_select.selectedIndex].text)},this.e_select.onchange=()=>{this.engine.SetSelectedIndex(this.e_select.selectedIndex)}}UpdateEngine(t){this.engine=t}InitMountSelect(t){const e=document.createElement("SPAN");e.textContent=h("Engine Mounting Location"),t.appendChild(e),t.appendChild(document.createElement("BR")),this.mount_select=document.createElement("SELECT");for(let t of this.engine.GetMountList()){let e=document.createElement("OPTION");e.text=h(t.name),this.mount_select.add(e)}this.mount_select.required=!0,this.mount_select.selectedIndex=this.engine.GetMountIndex(),this.mount_select.onchange=()=>{this.engine.SetMountIndex(this.mount_select.selectedIndex)},t.appendChild(this.mount_select),t.appendChild(document.createElement("BR")),this.pushpull_input=document.createElement("INPUT"),this.torque_input=document.createElement("INPUT");const s=bt(t);this.pushpull_label=Pt(" "+h("Engine Push Pull"),this.pushpull_input,s),Pt(" "+h("Engine Torque To Structure"),this.torque_input,s),this.pushpull_input.checked=this.engine.GetUsePushPull(),this.torque_input.checked=this.engine.GetUsePushPull(),this.pushpull_input.onchange=()=>{this.engine.SetUsePushPull(this.pushpull_input.checked)},this.torque_input.onchange=()=>{this.engine.SetTorqueToStruct(this.torque_input.checked)}}InitUpgradeSelect(t){this.ds_input=document.createElement("INPUT"),this.op_input=document.createElement("INPUT"),this.gp_input=document.createElement("INPUT"),this.gpr_input=document.createElement("INPUT");const e=bt(t);Pt(h("Engine Extended Driveshafts"),this.ds_input,e),Pt(h("Engine Outboard Propeller"),this.op_input,e),wt(h("Engine Geared Propeller"),this.gp_input,e),wt(h("Engine Negate Reliability Penalty"),this.gpr_input,e),this.gp_input.onchange=()=>{this.engine.SetGearCount(this.gp_input.valueAsNumber)},this.gpr_input.onchange=()=>{this.engine.SetGearReliability(this.gpr_input.valueAsNumber)},this.ds_input.onchange=()=>{this.engine.SetUseExtendedDriveshaft(this.ds_input.checked)},this.op_input.onchange=()=>{this.engine.SetOutboardProp(this.op_input.checked)}}InitElectricSelect(t){const e=bt(t);this.alternator_input=document.createElement("INPUT"),this.generator_input=document.createElement("INPUT"),Pt(h("Engine Alternator"),this.alternator_input,e),Pt(h("Engine Generator"),this.generator_input,e),this.alternator_input.onchange=()=>{this.engine.SetAlternator(this.alternator_input.checked)},this.generator_input.onchange=()=>{this.engine.SetGenerator(this.generator_input.checked)}}InitStatDisplay(t){const e=t.insertCell();e.className="inner_table";const s=document.createElement("TABLE");s.className="inner_table",e.appendChild(s);const i=s.insertRow();St(i,h("Stat Power")),St(i,h("Stat Mass")),St(i,h("Stat Drag"));const a=s.insertRow();this.d_powr=a.insertCell(),this.d_mass=a.insertCell(),this.d_drag=a.insertCell();const n=s.insertRow();St(n,h("Stat Reliability")),St(n,h("Stat Visibility")),St(n,h("Stat Overspeed"));const r=s.insertRow();this.d_rely=r.insertCell(),this.d_rely.className="part_local",this.d_visi=r.insertCell(),this.d_over=r.insertCell();const o=s.insertRow();St(o,h("Stat Cost")),St(o,h("Stat Altitude")),St(o,h("Stat Fuel Consumption"));const l=s.insertRow();this.d_cost=l.insertCell(),this.d_alti=l.insertCell(),this.d_fuel=l.insertCell();const c=s.insertRow();St(c,h("Stat Pitch Stability")),St(c,h("Stat Lateral Stability")),St(c,h("Stat Raw Strain"));const u=s.insertRow();this.d_pstb=u.insertCell(),this.d_lstb=u.insertCell(),this.d_maxs=u.insertCell();const m=s.insertRow();St(m,h("Stat Structure")),St(m,h("Stat Flight Stress")),St(m,h("Stat Required Sections"));const p=s.insertRow();this.d_strc=p.insertCell(),this.d_fstr=p.insertCell(),this.d_sect=p.insertCell();const d=s.insertRow();St(d,h("Stat Charge")),St(d,""),St(d,"");const g=s.insertRow();this.d_chrg=g.insertCell(),g.insertCell(),g.insertCell()}InitCowlSelect(t){this.cowl_select=document.createElement("SELECT");for(let t of this.engine.GetCowlList()){let e=document.createElement("OPTION");e.text=h(t.name),this.cowl_select.add(e)}this.cowl_select.required=!0,this.cowl_select.selectedIndex=this.engine.GetMountIndex(),this.cowl_select.onchange=()=>{this.engine.SetCowl(this.cowl_select.selectedIndex)},t.appendChild(this.cowl_select)}InitCoolingSelect(){for(;this.cool_cell.children.length>0;)this.cool_cell.removeChild(this.cool_cell.children[0]);if(this.engine.IsRotary()){this.e_cool.textContent="0";const t=document.createElement("SPAN");t.innerText=h("Engine Rotary Cooling"),this.cool_cell.appendChild(t)}else if("0"==this.e_cool.textContent){const t=document.createElement("SPAN");t.textContent=h("Engine Air-Cooled Engine."),this.cool_cell.appendChild(t);const e=bt(this.cool_cell);Pt(h("Engine Air Cooling Fan"),this.intake_fan,e),this.intake_fan.disabled=!this.engine.CanIntakeFan()}else{this.cool_select||(this.cool_select=document.createElement("SELECT"),this.cool_select.required=!0);const t=bt(this.cool_cell);Bt(h("Engine Select Radiator"),this.cool_select,t),wt(h("Engine Cooling Amount"),this.cool_count,t);const e=this.engine.GetNumRadiators();for(;this.cool_select.options.length>0;)this.cool_select.options.remove(this.cool_select.options.length-1);for(let t=1;t{this.engine.SetRadiator(this.cool_select.selectedIndex)},this.cool_select.selectedIndex=this.engine.GetRadiator(),this.cool_count.min="0",this.cool_count.max=this.engine.GetMaxCooling().toString(),this.cool_count.valueAsNumber=this.engine.GetCooling(),this.cool_count.onchange=()=>{this.engine.SetCooling(this.cool_count.valueAsNumber)}}}UpdateDisplay(){for(;this.e_list_select.options.length>0;)this.e_list_select.options.remove(this.e_list_select.options.length-1);for(;this.e_select.options.length>0;)this.e_select.options.remove(this.e_select.options.length-1);const t=this.engine.GetSelectedList();if(""!=t){var e=!1,s=0;const i=T();for(let a of i.keys()){let i=document.createElement("OPTION");i.text=a,this.e_list_select.add(i),a==t||e?(s=Math.abs(s),e=!0):s-=1}this.e_list_select.selectedIndex=s;const a=this.engine.CanSelectIndex();for(let e=0;e{this.radiator.SetTypeIndex(this.type_select.selectedIndex)},s.appendChild(this.type_select);const i=t.insertCell();this.mount_select=document.createElement("SELECT");for(let t of this.radiator.GetMountList()){let e=document.createElement("OPTION");e.text=h(t.name),this.mount_select.add(e)}this.mount_select.onchange=()=>{this.radiator.SetMountIndex(this.mount_select.selectedIndex)},i.appendChild(this.mount_select);const a=t.insertCell();this.coolant_select=document.createElement("SELECT");for(let t of this.radiator.GetCoolantList()){let e=document.createElement("OPTION");e.text=h(t.name),this.coolant_select.add(e)}this.coolant_select.onchange=()=>{this.radiator.SetCoolantIndex(this.coolant_select.selectedIndex)},a.appendChild(this.coolant_select),a.appendChild(document.createElement("BR")),this.harden_input=document.createElement("INPUT");const n=bt(a);Pt(h("Radiators Harden Radiator"),this.harden_input,n),this.harden_input.onchange=()=>{this.radiator.SetHarden(this.harden_input.checked)};const r=t.insertCell(),o=document.createElement("TABLE");r.className="inner_table",o.className="inner_table";const l=o.insertRow();St(l,h("Stat Mass")),St(l,h("Stat Cost")),St(l,h("Stat Drag")),St(l,h("Stat Reliability")),St(l,h("Stat Lateral Stability")),St(l,h("Derived Is Flammable Question"));const c=o.insertRow();this.c_mass=c.insertCell(),this.c_cost=c.insertCell(),this.c_drag=c.insertCell(),this.c_rely=c.insertCell(),this.c_lstb=c.insertCell(),this.c_flam=c.insertCell(),r.appendChild(o)}UpdateRadiator(t){this.radiator=t}UpdateDisplay(){const t=this.radiator.CanType();for(let e=0;e{this.eng.SetNumberOfEngines(this.num_engines.valueAsNumber)},this.num_engines.valueAsNumber=this.eng.GetNumberOfItems(),document.getElementById("lbl_num_radiators").textContent=h("Engines Num Radiators"),this.num_radiators=document.getElementById("num_radiators"),this.num_radiators.onchange=()=>{this.eng.SetNumberOfRadiators(this.num_radiators.valueAsNumber)},this.num_radiators.valueAsNumber=this.eng.GetNumberOfRadiators(),document.getElementById("lbl_asymmetric").textContent=h("Engines Asymmetric Plane"),this.is_asymmetric=document.getElementById("asymmetric"),this.is_asymmetric.onchange=()=>{this.eng.SetAsymmetry(this.is_asymmetric.checked)},this.is_asymmetric.checked=this.eng.GetAsymmetry()}UpdateDisplay(){const t=this.eng.GetNumberOfItems();for(this.tbl.style.display=0==t?"none":"",this.num_engines.valueAsNumber=t;this.engines.length>t;)this.engines.pop(),this.tbl.deleteRow(this.engines.length+1);for(var e=document.createDocumentFragment();this.engines.lengths;)this.radiators.pop(),this.tblR.deleteRow(this.radiators.length+1);for(e=document.createDocumentFragment();this.radiators.length{this.prop.SetPropIndex(this.select_prop.selectedIndex)},document.getElementById("lbl_propeller_upgrade").textContent=h("Propeller Propeller Upgrades:"),this.select_upgrade=document.getElementById("propeller_upgrade");for(let e of t.GetUpgradeList()){let t=document.createElement("OPTION");t.text=h(e.name),this.select_upgrade.add(t)}this.select_upgrade.onchange=()=>{this.prop.SetUpgradeIndex(this.select_upgrade.selectedIndex)}}UpdateDisplay(){this.select_upgrade.selectedIndex=this.prop.GetUpgradeIndex(),this.select_prop.selectedIndex=this.prop.GetPropIndex(),0==this.prop.GetNumPropellers()?(this.select_upgrade.disabled=!0,this.select_prop.disabled=!0,this.select_prop.selectedIndex=-1):(this.select_prop.disabled=!1,this.select_upgrade.disabled=!1)}}class Xt extends kt{constructor(t){super(),this.c_sec=[],this.t_sec=[],this.frames=t,document.getElementById("lbl_frames").textContent=h("Frames Frames and Covering"),this.table=document.getElementById("table_frames");const e=document.createDocumentFragment();var s=xt(e);this.all_frame=document.createElement("SELECT"),this.all_skin=document.createElement("SELECT"),St(s,h("Frames Frame Type")).append(document.createElement("BR"),this.all_frame),St(s,h("Frames Skin Type")).append(document.createElement("BR"),this.all_skin),St(s,h("Frames Frame Options")),St(s,h("Frames Frame Stats")),s=xt(e),this.c_frame=s.insertCell(),this.c_skin=s.insertCell(),this.c_options=s.insertCell(),this.c_stats=s.insertCell(),this.c_stats.className="inner_table",this.c_stats.rowSpan=0;const i=document.createElement("TABLE");i.className="inner_table";const a=i.insertRow();St(a,h("Stat Mass")),St(a,h("Stat Drag")),St(a,h("Stat Cost"));const n=i.insertRow();this.d_mass=n.insertCell(),this.d_drag=n.insertCell(),this.d_cost=n.insertCell();const r=i.insertRow();St(r,h("Stat Structure")),St(r,h("Stat Toughness")),St(r,h("Stat Visibility"));const o=i.insertRow();this.d_strc=o.insertCell(),this.d_tugh=o.insertCell(),this.d_visi=o.insertCell();const l=i.insertRow();St(l,h("Stat Wing Area")),St(l,h("Derived Is Flammable Question")),St(l,h("Stat Pitch Stability"));const c=i.insertRow();this.d_area=c.insertCell(),this.d_flammable=c.insertCell(),this.d_pstb=c.insertCell();const u=i.insertRow();St(u,h("Stat Raw Strain")),St(u,h("Stat Lift Bleed")),St(u,"");const m=i.insertRow();this.d_strn=m.insertCell(),this.d_lift=m.insertCell(),m.insertCell(),this.c_stats.appendChild(i);const p=xt(e);St(p,h("Frames Tail Frame Type")),St(p,h("Frames Tail Skin Type")),St(p,h("Frames Tail Frame Options"));const d=xt(e);this.t_frame=d.insertCell(),this.t_skin=d.insertCell(),this.t_options=d.insertCell(),document.getElementById("lbl_tail").textContent=h("Frames Tail Section Title"),document.getElementById("lbl_tail_type").textContent=h("Frames Tail Type"),this.t_select=document.getElementById("tail_type"),document.getElementById("lbl_tail_farman").textContent=h("Frames Tail Farman"),this.t_farman=document.getElementById("tail_farman"),document.getElementById("lbl_tail_boom").textContent=h("Frames Tail Boom"),this.t_boom=document.getElementById("tail_boom"),document.getElementById("lbl_flying_wing").textContent=h("Frames Flying Wing"),this.t_fwing=document.getElementById("flying_wing");const g=this.frames.GetFrameList();for(let t of g){let e=document.createElement("OPTION");e.text=h(t.name),t.basestruct<=0&&(e.disabled=!0),this.all_frame.add(e)}this.all_frame.onchange=()=>{this.frames.SetAllFrame(this.all_frame.selectedIndex)};const _=this.frames.GetSkinList();for(let t of _){let e=document.createElement("OPTION");e.text=h(t.name),this.all_skin.add(e)}this.all_skin.onchange=()=>{this.frames.SetAllSkin(this.all_skin.selectedIndex)};for(let t of this.frames.GetTailList()){let e=document.createElement("OPTION");e.text=h(t.name),this.t_select.add(e)}this.t_select.onchange=()=>{this.frames.SetTailType(this.t_select.selectedIndex)},this.t_farman.onchange=()=>{this.frames.SetUseFarman(this.t_farman.checked)},this.t_boom.onchange=()=>{this.frames.SetUseBoom(this.t_boom.checked)},this.t_fwing.onchange=()=>{this.frames.SetFlyingWing(this.t_fwing.checked)},this.table.appendChild(e)}UpdateDisplay(){const t=document.createDocumentFragment();for(;this.table.children.length;)t.append(this.table.children[0]);const e=this.frames.GetSectionList(),s=this.frames.GetTailSectionList();for(;e.length>this.c_sec.length;){let t=this.c_sec.length;this.CreateSection(t,e[t])}for(;e.lengththis.t_sec.length;){let t=this.t_sec.length;this.CreateTailSection(t,s[t])}for(;s.length{this.frames.DeleteSection(t)},s.add.textContent="+",s.add.onclick=()=>{this.frames.DuplicateSection(t)};const i=this.frames.GetFrameList();for(let t of i){let e=document.createElement("OPTION");e.text=h(t.name),s.fsel.add(e)}s.fsel.onchange=()=>{this.frames.SetFrame(t,s.fsel.selectedIndex)},s.fspan.appendChild(s.rem),s.fspan.appendChild(s.add),s.fspan.appendChild(s.fsel),s.fspan.appendChild(document.createElement("BR")),this.c_frame.appendChild(s.fspan),s.sspan.appendChild(s.ssel),s.sspan.appendChild(document.createElement("BR")),this.c_skin.appendChild(s.sspan),Et(h("Frames Geodesic"),s.geo,s.ospan,!1),s.geo.onchange=()=>{this.frames.SetGeodesic(t,s.geo.checked)},Et(h("Frames Monocoque"),s.mono,s.ospan,!1),s.mono.onchange=()=>{this.frames.SetMonocoque(t,s.mono.checked)},Et(h("Frames Internal Bracing"),s.int,s.ospan,!1),s.int.onchange=()=>{this.frames.SetInternalBracing(t,s.int.checked)},Et(h("Frames Lifting Body"),s.lb,s.ospan,!0),s.lb.onchange=()=>{this.frames.SetLiftingBody(t,s.lb.checked)},this.c_options.appendChild(s.ospan),this.c_sec.push(s),this.UpdateSection(t,e)}RemoveSection(){const t=this.c_sec.pop();this.c_frame.removeChild(t.fspan),this.c_skin.removeChild(t.sspan),this.c_options.removeChild(t.ospan)}UpdateSection(t,e){const s=this.c_sec[t];s.rem.disabled=!e.internal_bracing&&!this.frames.PossibleRemoveSections(),s.add.disabled=e.internal_bracing&&!this.frames.PossibleInternalBracing();const i=this.frames.GetFrameList();for(let t=0;t{this.frames.SetTailFrame(t,s.fsel.selectedIndex)},s.fspan.appendChild(s.fsel),s.fspan.appendChild(document.createElement("BR")),this.t_frame.appendChild(s.fspan),s.sspan.appendChild(s.ssel),s.sspan.appendChild(document.createElement("BR")),this.t_skin.appendChild(s.sspan),Et(h("Frames Geodesic"),s.geo,s.ospan,!1),s.geo.onchange=()=>{this.frames.SetTailGeodesic(t,s.geo.checked)},Et(h("Frames Monocoque"),s.mono,s.ospan,!1),s.mono.onchange=()=>{this.frames.SetTailMonocoque(t,s.mono.checked)},Et(h("Frames Lifting Body"),s.lb,s.ospan,!0),s.lb.onchange=()=>{this.frames.SetTailLiftingBody(t,s.lb.checked)},this.t_options.appendChild(s.ospan),this.t_sec.push(s),this.UpdateTailSection(t,e)}RemoveTailSection(){const t=this.t_sec.pop();this.t_frame.removeChild(t.fspan),this.t_skin.removeChild(t.sspan),this.t_options.removeChild(t.ospan)}UpdateTailSection(t,e){const s=this.t_sec[t],i=this.frames.GetFrameList();for(let t=0;t{this.wings.SetStagger(this.stagger.selectedIndex)},this.closed.onchange=()=>{this.wings.SetClosed(this.closed.checked)},this.swept.onchange=()=>{this.wings.SetSwept(this.swept.checked)};const e=document.getElementById("wing_table"),s=document.createDocumentFragment(),i=xt(s);St(i,h("Wings Wing Type")),St(i,h("Wings Wing Options")),St(i,h("Wings Wing Stats"));const a=xt(s);St(a,h("Wings Full Wings"));const n=xt(s);St(n,h("Wings Miniature Wings")),this.full_cell=a.insertCell(),this.mini_cell=n.insertCell();const r=a.insertCell();r.rowSpan=0,this.InitStatDisplay(r),e.appendChild(s)}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Wing Area")),St(s,h("Stat Mass")),St(s,h("Stat Drag"));const i=e.insertRow();this.d_area=i.insertCell(),this.d_mass=i.insertCell(),this.d_drag=i.insertCell();const a=e.insertRow();St(a,h("Stat Control")),St(a,h("Stat Pitch Stability")),St(a,h("Stat Lateral Stability"));const n=e.insertRow();this.d_cont=n.insertCell(),this.d_pstb=n.insertCell(),this.d_lstb=n.insertCell();const r=e.insertRow();St(r,h("Stat Raw Strain")),St(r,h("Stat Crash Safety")),St(r,h("Stat Lift Bleed"));const o=e.insertRow();this.d_maxs=o.insertCell(),this.d_crsh=o.insertCell(),this.d_lift=o.insertCell();const l=e.insertRow();St(l,h("Stat Cost")),St(l,h("Stat Visibility")),St(l,h("Stat Charge"));const c=e.insertRow();this.d_cost=c.insertCell(),this.d_visi=c.insertCell(),this.d_chrg=c.insertCell();const u=e.insertRow();St(u,""),St(u,h("Wings Sesquiplane")),St(u,h("Derived Is Flammable Question"));const m=e.insertRow();m.insertCell(),this.d_sesq=m.insertCell(),this.d_flam=m.insertCell()}UpdateDisplay(){const t=this.wings.CanStagger();for(let e=0;ee.length;)this.PopFullWing();const s=this.wings.GetMiniWingList();for(let t=0;ts.length;)this.PopMiniWing();this.CreateFWAdd(e.length),this.CreateMWAdd(s.length);const i=this.wings.PartStats();Nt(this.d_area,i.wingarea.toString(),!0),Nt(this.d_mass,(i.mass+this.wings.GetPaperMass()).toString(),!1),Nt(this.d_drag,i.drag.toString(),!1),Nt(this.d_cont,i.control.toString(),!0),Nt(this.d_pstb,i.pitchstab.toString(),!0),Nt(this.d_lstb,i.latstab.toString(),!0),Nt(this.d_maxs,i.maxstrain.toString(),!0),Nt(this.d_lift,i.liftbleed.toString(),!1),Nt(this.d_crsh,i.crashsafety.toString(),!0),Nt(this.d_cost,i.cost.toString(),!1),Nt(this.d_visi,i.visibility.toString(),!0),Nt(this.d_chrg,i.charge.toString(),!0),this.wings.GetIsSesquiplane().is?Nt(this.d_sesq,h("Yes")):Nt(this.d_sesq,h("No")),this.wings.IsFlammable()?Nt(this.d_flam,h("Yes")):Nt(this.d_flam,h("No"))}AddFullWing(){const t={span:document.createElement("SPAN"),deck:document.createElement("SELECT"),skin:document.createElement("SELECT"),area:document.createElement("INPUT"),wspan:document.createElement("INPUT"),gull:document.createElement("INPUT"),dihedral:document.createElement("INPUT"),anhedral:document.createElement("INPUT"),br:document.createElement("BR")};t.span.appendChild(t.deck);const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),t.deck.append(s);for(let s=0;s{let i={...s};i.deck=t.deck.selectedIndex-1,this.wings.SetFullWing(e,i)},t.deck.selectedIndex=s.deck+1,t.skin.onchange=()=>{let i={...s};i.surface=t.skin.selectedIndex,this.wings.SetFullWing(e,i)},t.skin.selectedIndex=s.surface,t.area.onchange=()=>{let i={...s};i.area=t.area.valueAsNumber,this.wings.SetFullWing(e,i)},t.area.valueAsNumber=s.area,t.wspan.onchange=()=>{let i={...s};i.span=t.wspan.valueAsNumber,this.wings.SetFullWing(e,i)},t.wspan.valueAsNumber=s.span,t.gull.onchange=()=>{let i={...s};i.gull=t.gull.checked,this.wings.SetFullWing(e,i)},t.gull.checked=s.gull,t.gull.disabled=!this.wings.CanGull(s.deck),t.dihedral.onchange=()=>{let i={...s};isNaN(t.dihedral.valueAsNumber)||(i.dihedral=t.dihedral.valueAsNumber),this.wings.SetFullWing(e,i)},t.dihedral.max=(s.span-s.anhedral-1).toString(),t.dihedral.valueAsNumber=s.dihedral,t.anhedral.onchange=()=>{let i={...s};isNaN(t.anhedral.valueAsNumber)||(i.anhedral=t.anhedral.valueAsNumber),this.wings.SetFullWing(e,i)},t.anhedral.max=(s.span-s.dihedral-1).toString(),t.anhedral.valueAsNumber=s.anhedral}AddMiniWing(){const t={span:document.createElement("SPAN"),deck:document.createElement("SELECT"),skin:document.createElement("SELECT"),area:document.createElement("INPUT"),wspan:document.createElement("INPUT"),gull:void 0,dihedral:void 0,anhedral:void 0,br:document.createElement("BR")};t.span.appendChild(t.deck);const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),t.deck.append(s);for(let s=0;s{let i={...s};i.deck=t.deck.selectedIndex-1,this.wings.SetMiniWing(e,i)},t.deck.selectedIndex=s.deck+1,t.skin.onchange=()=>{let i={...s};i.surface=t.skin.selectedIndex,this.wings.SetMiniWing(e,i)},t.skin.selectedIndex=s.surface,t.area.onchange=()=>{let i={...s};i.area=t.area.valueAsNumber,this.wings.SetMiniWing(e,i)},t.area.valueAsNumber=s.area,t.wspan.onchange=()=>{let i={...s};i.span=t.wspan.valueAsNumber,this.wings.SetMiniWing(e,i)},t.wspan.valueAsNumber=s.span}PopMiniWing(){const t=this.mw_list.pop();this.mini_cell.removeChild(t.span),this.mini_cell.removeChild(t.br)}CreateFWAdd(t){this.fw_add=document.createElement("SELECT");const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),this.fw_add.append(s);var i=!1;for(let t=0;t{let e={surface:0,area:10,span:5,gull:!1,dihedral:0,anhedral:0,deck:this.fw_add.selectedIndex-1};this.wings.SetFullWing(t,e)},this.fw_add.selectedIndex=0,this.fw_add.disabled=!i,this.full_cell.appendChild(this.fw_add)}CreateMWAdd(t){this.mw_add=document.createElement("SELECT");const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),this.mw_add.append(s);var i=!1;for(let t=0;t{let e={surface:0,area:2,span:2,gull:!1,dihedral:0,anhedral:0,deck:this.mw_add.selectedIndex-1};this.wings.SetMiniWing(t,e)},this.mw_add.selectedIndex=0,this.mw_add.disabled=!i,this.mini_cell.appendChild(this.mw_add)}}class te extends kt{constructor(t){super(),this.stab=t,document.getElementById("lbl_stab").textContent=h("Stabilizers Section Title");const e=document.getElementById("stab_table"),s=document.createDocumentFragment();var i=xt(s);St(i,h("Stabilizers Horizontal Stabilizers")),St(i,h("Stabilizers Vertical Stabilizers")),St(i,h("Stabilizers Stabilizer Stats"));const a=(i=xt(s)).insertCell(),n=i.insertCell();this.h_type=document.createElement("SELECT"),this.h_count=document.createElement("INPUT"),a.appendChild(this.h_type),a.append(document.createElement("BR")),yt(h("Stabilizers # of Stabilizers"),this.h_count,a),this.h_count.min="0",this.h_count.max="20",this.h_count.onchange=()=>{this.stab.SetHStabCount(this.h_count.valueAsNumber)},this.h_type.onchange=()=>{this.stab.SetHStabType(this.h_type.selectedIndex)};for(let e of t.GetHStabList()){let t=document.createElement("OPTION");t.text=h(e.name),this.h_type.add(t)}this.v_type=document.createElement("SELECT"),this.v_count=document.createElement("INPUT"),n.appendChild(this.v_type),n.appendChild(document.createElement("BR")),yt(h("Stabilizers # of Stabilizers"),this.v_count,n),this.v_count.min="0",this.v_count.max="20",this.v_count.onchange=()=>{this.stab.SetVStabCount(this.v_count.valueAsNumber)},this.v_type.onchange=()=>{this.stab.SetVStabType(this.v_type.selectedIndex)};for(let e of t.GetVStabList()){let t=document.createElement("OPTION");t.text=h(e.name),this.v_type.add(t)}const r=i.insertCell();r.rowSpan=0,this.InitStatDisplay(r),e.appendChild(s)}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Control")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_cont=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Pitch Stability")),St(a,h("Stat Lateral Stability")),St(a,h("Stat Lift Bleed"));const n=e.insertRow();this.d_pstb=n.insertCell(),this.d_lstb=n.insertCell(),this.d_lift=n.insertCell()}SetCollapse(){Ot("stabilizer_collapse",!this.stab.IsDefault())}UpdateDisplay(){this.h_type.selectedIndex=this.stab.GetHStabType(),this.v_type.selectedIndex=this.stab.GetVStabType();var t=this.stab.GetHValidList();for(let e=0;e{this.cs.SetAileron(this.aileron_select.selectedIndex)},this.rudder_select=document.createElement("SELECT");for(let e of t.GetRudderList()){let t=document.createElement("OPTION");t.text=h(e.name),this.rudder_select.add(t)}this.rudder_select.onchange=()=>{this.cs.SetRudder(this.rudder_select.selectedIndex)},this.elevator_select=document.createElement("SELECT");for(let e of t.GetElevatorList()){let t=document.createElement("OPTION");t.text=h(e.name),this.elevator_select.add(t)}this.elevator_select.onchange=()=>{this.cs.SetElevator(this.elevator_select.selectedIndex)},this.flaps_select=document.createElement("SELECT");for(let e of t.GetFlapsList()){let t=document.createElement("OPTION");t.text=h(e.name),this.flaps_select.add(t)}this.flaps_select.onchange=()=>{this.cs.SetFlaps(this.flaps_select.selectedIndex)},this.slats_select=document.createElement("SELECT");for(let e of t.GetSlatsList()){let t=document.createElement("OPTION");t.text=h(e.name),this.slats_select.add(t)}this.slats_select.onchange=()=>{this.cs.SetSlats(this.slats_select.selectedIndex)};const n=bt(a);Bt(h("Control Surfaces Ailerons"),this.aileron_select,n),Bt(h("Control Surfaces Rudders"),this.rudder_select,n),Bt(h("Control Surfaces Elevators"),this.elevator_select,n),Bt(h("Control Surfaces Flaps"),this.flaps_select,n),Bt(h("Control Surfaces Slats"),this.slats_select,n);const r=bt(i.insertCell());this.drag_chbx=[];const o=t.GetDragList();for(let t=0;t{this.cs.SetDrag(t,e.checked)},this.drag_chbx.push(e)}this.InitStatDisplay(i.insertCell()),e.appendChild(s)}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Control")),St(a,h("Stat Pitch Stability")),St(a,h("Stat Lateral Stability"));const n=e.insertRow();this.d_cont=n.insertCell(),this.d_pstb=n.insertCell(),this.d_lstb=n.insertCell();const r=e.insertRow();St(r,h("Stat Lift Bleed")),St(r,h("Stat Crash Safety")),St(r," ");const o=e.insertRow();this.d_lift=o.insertCell(),this.d_crsh=o.insertCell(),this.d_none=o.insertCell()}SetCollapse(){Ot("control_collapse",!this.cs.IsDefault())}UpdateDisplay(){const t=this.cs.CanAileron();for(let e=0;e{this.rf.SetExternalWoodCount(t,r.valueAsNumber)},o.onchange=()=>{this.rf.SetExternalSteelCount(t,o.valueAsNumber)},this.ext_wood_inp.push(r),this.ext_steel_inp.push(o)}this.cabane=document.createElement("SELECT"),Bt(h("Reinforcement Cabane"),this.cabane,e);for(let t of this.rf.GetCabaneList()){let e=document.createElement("OPTION");e.text=h(t.name),this.cabane.add(e)}this.cabane.onchange=()=>{this.rf.SetCabane(this.cabane.selectedIndex)},this.cabane.selectedIndex=0,this.wires=document.createElement("INPUT"),Pt(h("Reinforcement Wires"),this.wires,e),this.wires.onchange=()=>{this.rf.SetWires(this.wires.checked)}}InitInternal(t){const e=bt(t),s=this.rf.GetCantileverList();for(let t=0;t{this.rf.SetCantileverCount(t,a.valueAsNumber)},this.cant_inp.push(a)}this.wing_blades=document.createElement("INPUT"),Pt(h("Reinforcement Wing Blades"),this.wing_blades,e),this.wing_blades.onchange=()=>{this.rf.SetWingBlade(this.wing_blades.checked)}}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Structure")),St(a,h("Stat Raw Strain")),St(a,h("Reinforcement Aircraft Max Strain"));const n=e.insertRow();this.d_strc=n.insertCell(),this.d_maxs=n.insertCell(),this.d_amax=n.insertCell(),this.d_amax.className="part_local"}UpdateDisplay(){this.cabane.selectedIndex=this.rf.GetCabane(),this.wires.checked=this.rf.GetWires();const t=this.rf.GetExternalWoodCount(),e=this.rf.CanExternalWood();for(let s=0;s{this.fuel.SetTankCount(t,i.valueAsNumber)},this.fuel_list.push(i)}this.seal=document.createElement("INPUT"),Pt(h("Load Self-Sealing Gas Tank"),this.seal,s),this.seal.onchange=()=>{this.fuel.SetSelfSealing(this.seal.checked)},this.extinguish=document.createElement("INPUT"),Pt(h("Load Remote Fire Extinguisher"),this.extinguish,s),this.extinguish.onchange=()=>{this.fuel.SetExtinguisher(this.extinguish.checked)}}InitMunitions(t){const e=bt(t);this.bombs=document.createElement("INPUT"),wt(h("Load Bombs"),this.bombs,e),this.bombs.onchange=()=>{this.boom.SetBombCount(this.bombs.valueAsNumber)},this.rockets=document.createElement("INPUT"),wt(h("Load Rockets"),this.rockets,e),this.rockets.onchange=()=>{this.boom.SetRocketCount(this.rockets.valueAsNumber)},this.bay_count=document.createElement("INPUT"),wt(h("Load Internal Bay Count"),this.bay_count,e),this.bay_count.onchange=()=>{this.boom.SetBayCount(this.bay_count.valueAsNumber)},this.bay1=document.createElement("INPUT"),Pt(h("Load Widen Internal Bay 1"),this.bay1,e),this.bay1.onchange=()=>{this.boom.SetUseBays(this.bay1.checked,this.bay2.checked)},this.bay2=document.createElement("INPUT"),Pt(h("Load Widen Internal Bay 2"),this.bay2,e),this.bay2.onchange=()=>{this.boom.SetUseBays(this.bay1.checked,this.bay2.checked)}}InitCargoAndPassengers(t){this.carg=document.createElement("SELECT"),t.appendChild(this.carg);const e=this.cargo.GetSpaceList();for(let t of e){let e=document.createElement("OPTION");e.text=h(t.name),this.carg.add(e)}this.carg.onchange=()=>{this.cargo.SetSpace(this.carg.selectedIndex)}}InitStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Wet Mass"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_wmas=i.insertCell();var a=e.insertRow();St(a,h("Stat Required Sections")),St(a,h("Stat Fuel")),St(a,h("Stat Cost"));var n=e.insertRow();this.d_rsec=n.insertCell(),this.d_fuel=n.insertCell(),this.d_cost=n.insertCell(),St(a=e.insertRow(),""),St(a,h("Derived Fuel Uses")),St(a,""),(n=e.insertRow()).insertCell(),this.d_fuse=n.insertCell(),n.insertCell()}UpdateFuelUses(t){var e=Math.floor(1e-6+10*t)/10;isFinite(e)||(e=0),Nt(this.d_fuse,e.toString(),!1)}UpdateDisplay(){const t=this.fuel.GetTankCount(),e=this.fuel.GetTankEnabled();for(let s=0;s0?(this.bay1.disabled=!1,this.bay1.checked?this.bay2.disabled=!1:this.bay2.disabled=!0):(this.bay1.disabled=!0,this.bay2.disabled=!0),this.carg.selectedIndex=this.cargo.GetSpace();var s=this.fuel.PartStats();s=(s=s.Add(this.boom.PartStats())).Add(this.cargo.PartStats()),Nt(this.d_drag,s.drag.toString(),!1),Nt(this.d_mass,s.mass.toString(),!1),Nt(this.d_wmas,s.wetmass.toString(),!1),Nt(this.d_rsec,s.reqsections.toString(),!1),Nt(this.d_fuel,s.fuel.toString(),!0),Nt(this.d_cost,s.cost.toString(),!1)}}class ae extends kt{constructor(t){super(),this.gear=t,document.getElementById("lbl_landing_gear").textContent=h("Landing Gear Section Title");const e=document.getElementById("tbl_gear"),s=document.createDocumentFragment();var i=xt(s);St(i,h("Landing Gear Landing Gear")),St(i,h("Landing Gear Extras")),St(i,h("Landing Gear Gear Stats")),i=xt(s),this.InitGear(i.insertCell()),this.InitExtras(i.insertCell()),this.InitStats(i.insertCell()),e.appendChild(s)}InitGear(t){const e=this.gear.GetGearList(),s=bt(t);this.sel=document.createElement("SELECT"),Bt("Type",this.sel,s);for(let t=0;t{this.gear.SetGear(this.sel.selectedIndex)},this.retract=document.createElement("INPUT"),Pt(h("Landing Gear Retractable"),this.retract,s),this.retract.onchange=()=>{this.gear.SetRetract(this.retract.checked)}}InitExtras(t){this.extras=[];const e=this.gear.GetExtraList(),s=bt(t);for(let t=0;t{this.gear.SetExtraSelected(t,i.checked)},this.extras.push(i)}}InitStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Structure")),St(a,h("Stat Crash Safety")),St(a,"");const n=e.insertRow();this.d_strc=n.insertCell(),this.d_crsh=n.insertCell(),n.insertCell()}SetCollapse(){Ot("gear_collapse",!this.gear.IsDefault())}UpdateDisplay(){this.sel.selectedIndex=this.gear.GetGear();const t=this.gear.CanGear();for(let e=0;e{this.acc.SetArmourCoverage(t,this.a_AP[t].valueAsNumber)};let n=t+a/2;e=n+1,wt("Thickness "+e.toString(),this.a_AP[n],i),this.a_AP[n].onchange=()=>{this.acc.SetArmourCoverage(n,this.a_AP[n].valueAsNumber)}}}InitElectrical(t){const e=bt(t);this.radio=document.createElement("SELECT"),Bt(h("Accessories Radio"),this.radio,e);const s=this.acc.GetRadioList();for(let t=0;t{this.acc.SetRadioSel(this.radio.selectedIndex)},this.elect=[];const i=this.acc.GetElectricalList();for(let t=0;t{this.acc.SetElectricalCount(t,s.valueAsNumber)},this.elect.push(s)}}InitInformation(t){const e=bt(t),s=this.acc.GetReconList();this.recon=[];for(let t=0;t{this.acc.SetReconSel(t,i.valueAsNumber)},this.recon.push(i)}}InitVisibility(t){const e=bt(t),s=this.acc.GetVisibilityList();this.visi=[];for(let t=0;t{this.acc.SetVisibilitySel(t,i.checked)},this.visi.push(i)}}InitClimate(t){const e=bt(t),s=this.acc.GetClimateList();this.clim=[];for(let t=0;t{this.acc.SetClimateSel(t,i.checked)},this.clim.push(i)}}InitControl(t){const e=bt(t);this.auto=document.createElement("SELECT");const s=this.acc.GetAutopilotList();Bt(h("Accessories Autopilot"),this.auto,e);for(let t=0;t{this.acc.SetAutopilotSel(this.auto.selectedIndex)};const i=this.acc.GetControlList();this.cont=document.createElement("SELECT"),Bt(h("Accessories Control Aids"),this.cont,e);for(let t=0;t{this.acc.SetControlSel(this.cont.selectedIndex)}}InitStats(t){t.rowSpan=3,t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Structure")),St(a,h("Stat Charge")),St(a,h("Stat Lift Bleed"));const n=e.insertRow();this.d_strc=n.insertCell(),this.d_chgh=n.insertCell(),this.d_lift=n.insertCell();const r=e.insertRow();St(r,h("Stat Visibility")),St(r,h("Stat Flight Stress")),St(r,h("Stat Required Sections"));const o=e.insertRow();this.d_visi=o.insertCell(),this.d_strs=o.insertCell(),this.d_rsec=o.insertCell()}UpdateDisplay(){const t=this.acc.GetArmourCoverageForDisplay();for(let e=0;e{this.opt.SetFreeDots(this.free_inp.valueAsNumber)};const e=document.getElementById("tbl_optimization"),s=document.createDocumentFragment(),i=xt(s);St(i,h("Optimization Negative")),St(i,h("Optimization Effect")),St(i,h("Optimization Positive")),St(i,h("Optimization Optimization Stats"));const a=xt(s);this.cost_cbx=this.InitRow(a,h("Optimization Cost"),(t=>this.opt.SetCost(t))),this.bleed_cbx=this.InitRow(xt(s),h("Optimization Lift Bleed"),(t=>this.opt.SetBleed(t))),this.escape_cbx=this.InitRow(xt(s),h("Optimization Leg Room"),(t=>this.opt.SetEscape(t))),this.mass_cbx=this.InitRow(xt(s),h("Optimization Mass"),(t=>this.opt.SetMass(t))),this.toughness_cbx=this.InitRow(xt(s),h("Optimization Toughness"),(t=>this.opt.SetToughness(t))),this.maxstrain_cbx=this.InitRow(xt(s),h("Optimization Max Strain"),(t=>this.opt.SetMaxStrain(t))),this.reliability_cbx=this.InitRow(xt(s),h("Optimization Reliability"),(t=>this.opt.SetReliability(t))),this.drag_cbx=this.InitRow(xt(s),h("Optimization Drag"),(t=>this.opt.SetDrag(t))),this.InitStatDisplay(a.insertCell()),e.appendChild(s)}InitRow(t,e,s){const i=[];for(let t=0;t<6;t++)i.push(document.createElement("INPUT")),i[t].setAttribute("type","checkbox"),i[t].onchange=t<3?()=>{i[t].checked?s(t-3):s(t-2)}:()=>{i[t].checked?s(t-2):s(t-3)};const a=t.insertCell(),n=t.insertCell(),r=t.insertCell();return a.appendChild(i[0]),a.appendChild(i[1]),a.appendChild(i[2]),n.textContent=e,r.appendChild(i[3]),r.appendChild(i[4]),r.appendChild(i[5]),i}InitStatDisplay(t){t.rowSpan=0,t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Cost")),St(s,h("Stat Lift Bleed")),St(s,h("Stat Escape"));const i=e.insertRow();this.d_cost=i.insertCell(),this.d_lift=i.insertCell(),this.d_escp=i.insertCell();const a=e.insertRow();St(a,h("Stat Visibility")),St(a,h("Stat Mass")),St(a,h("Stat Toughness"));const n=e.insertRow();this.d_visi=n.insertCell(),this.d_mass=n.insertCell(),this.d_tugh=n.insertCell();const r=e.insertRow();St(r,h("Stat Max Strain")),St(r,h("Stat Reliability")),St(r,h("Stat Drag"));const o=e.insertRow();this.d_mstr=o.insertCell(),this.d_reli=o.insertCell(),this.d_drag=o.insertCell()}SetCollapse(){Ot("optimization_collapse",!this.opt.IsDefault())}UpdateChecked(t,e){for(let t=0;t0&&(e[3].checked=!0,t>1&&(e[4].checked=!0,t>2&&(e[5].checked=!0)))}UpdateEnabled(t,e){var s=0;for(let i=3;it}UpdateDisplay(){this.free_inp.valueAsNumber=this.opt.GetFreeDots(),this.UpdateChecked(this.opt.GetCost(),this.cost_cbx),this.UpdateChecked(this.opt.GetBleed(),this.bleed_cbx),this.UpdateChecked(this.opt.GetEscape(),this.escape_cbx),this.UpdateChecked(this.opt.GetMass(),this.mass_cbx),this.UpdateChecked(this.opt.GetToughness(),this.toughness_cbx),this.UpdateChecked(this.opt.GetMaxStrain(),this.maxstrain_cbx),this.UpdateChecked(this.opt.GetReliabiilty(),this.reliability_cbx),this.UpdateChecked(this.opt.GetDrag(),this.drag_cbx);const t=this.opt.GetUnassignedCount();this.UpdateEnabled(t,this.cost_cbx),this.UpdateEnabled(t,this.bleed_cbx),this.UpdateEnabled(t,this.escape_cbx),this.UpdateEnabled(t,this.mass_cbx),this.UpdateEnabled(t,this.toughness_cbx),this.UpdateEnabled(t,this.maxstrain_cbx),this.UpdateEnabled(t,this.reliability_cbx),this.UpdateEnabled(t,this.drag_cbx);const e=this.opt.PartStats();Nt(this.d_cost,e.cost.toString(),!1),Nt(this.d_lift,e.liftbleed.toString(),!1),Nt(this.d_escp,e.escape.toString(),!0),Nt(this.d_visi,e.visibility.toString(),!0),Nt(this.d_mass,e.mass.toString(),!1),Nt(this.d_tugh,e.toughness.toString(),!0),Nt(this.d_mstr,this.opt.final_ms.toString(),!0),Nt(this.d_reli,e.reliability.toString(),!0),Nt(this.d_drag,e.drag.toString(),!1)}}class oe extends kt{constructor(t){super(),this.used=t,document.getElementById("lbl_used").textContent=h("Used Section Title"),this.tbl=document.getElementById("tbl_used");const e=document.createDocumentFragment(),s=xt(e);St(s,h("Used Effect")),St(s,h("Used Description")),St(s,h("Used Penalties(+)
Benefits(-)")),this.InitTable(e),this.tbl.appendChild(e)}InitTable(t){this.burnt_out=document.createElement("INPUT"),this.ragged=document.createElement("INPUT"),this.hefty=document.createElement("INPUT"),this.sticky_guns=document.createElement("INPUT"),this.weak=document.createElement("INPUT"),this.fragile=document.createElement("INPUT"),this.leaky=document.createElement("INPUT"),this.sluggish=document.createElement("INPUT");var e=xt(t);e.insertCell().textContent=h("Used Burnt Out"),e.insertCell().textContent=h("Used Burnt Out Description");var s=e.insertCell();yt("",this.burnt_out,s,!1),(e=xt(t)).insertCell().textContent=h("Used Ragged"),e.insertCell().textContent=h("Used Ragged Description"),s=e.insertCell(),yt("",this.ragged,s,!1),(e=xt(t)).insertCell().textContent=h("Used Hefty"),e.insertCell().textContent=h("Used Hefty Description"),s=e.insertCell(),yt("",this.hefty,s,!1),(e=xt(t)).insertCell().textContent=h("Used Sticky Guns"),e.insertCell().textContent=h("Used Sticky Guns Description"),s=e.insertCell(),yt("",this.sticky_guns,s,!1),(e=xt(t)).insertCell().textContent=h("Used Weak"),e.insertCell().textContent=h("Used Weak Description"),s=e.insertCell(),yt("",this.weak,s,!1),(e=xt(t)).insertCell().textContent=h("Used Fragile"),e.insertCell().textContent=h("Used Fragile Description"),s=e.insertCell(),yt("",this.fragile,s,!1),(e=xt(t)).insertCell().textContent=h("Used Leaky"),e.insertCell().textContent=h("Used Leaky Description"),s=e.insertCell(),yt("",this.leaky,s,!1),(e=xt(t)).insertCell().textContent=h("Used Sluggish"),e.insertCell().textContent=h("Used Sluggish Description"),s=e.insertCell(),yt("",this.sluggish,s,!1),this.burnt_out.onchange=()=>{this.used.burnt_out=this.burnt_out.valueAsNumber,this.used.TriggerCS()},this.ragged.onchange=()=>{this.used.ragged=this.ragged.valueAsNumber,this.used.TriggerCS()},this.hefty.onchange=()=>{this.used.hefty=this.hefty.valueAsNumber,this.used.TriggerCS()},this.sticky_guns.onchange=()=>{this.used.sticky_guns=this.sticky_guns.valueAsNumber,this.used.TriggerCS()},this.weak.onchange=()=>{this.used.weak=this.weak.valueAsNumber,this.used.TriggerCS()},this.fragile.onchange=()=>{this.used.fragile=this.fragile.valueAsNumber,this.used.TriggerCS()},this.leaky.onchange=()=>{this.used.leaky=this.leaky.valueAsNumber,this.used.TriggerCS()},this.sluggish.onchange=()=>{this.used.sluggish=this.sluggish.valueAsNumber,this.used.TriggerCS()},this.burnt_out.min="-1",this.burnt_out.max="1",this.ragged.min="-1",this.ragged.max="1",this.hefty.min="-1",this.hefty.max="1",this.sticky_guns.min="-1",this.sticky_guns.max="1",this.weak.min="-1",this.weak.max="1",this.fragile.min="-1",this.fragile.max="1",this.leaky.min="-1",this.leaky.max="1",this.sluggish.min="-1",this.sluggish.max="1"}SetCollapse(){Ot("used_collapse",!this.used.IsDefault())}UpdateDisplay(){this.burnt_out.valueAsNumber=this.used.burnt_out,this.ragged.valueAsNumber=this.used.ragged,this.hefty.valueAsNumber=this.used.hefty,this.sticky_guns.valueAsNumber=this.used.sticky_guns,this.weak.valueAsNumber=this.used.weak,this.fragile.valueAsNumber=this.used.fragile,this.leaky.valueAsNumber=this.used.leaky,this.sluggish.valueAsNumber=this.used.sluggish}}class le extends kt{constructor(t){super(),this.rotor=t,document.getElementById("lbl_rotor").textContent=h("Rotor Section Title"),this.div=document.getElementById("Rotors"),this.wing_div=document.getElementById("Wings"),this.reinforce_div=document.getElementById("Reinforcements"),this.control_div=document.getElementById("ControlSurfaces");const e=document.getElementById("rotor_table"),s=document.createDocumentFragment();this.InitAutogyro(s),this.InitHelicopter(s),e.appendChild(s)}InitAutogyro(t){this.auto_header=xt(t),St(this.auto_header,h("Rotor Rotor")),St(this.auto_header,h("Rotor Material")),St(this.auto_header,h("Rotor Accessories")),St(this.auto_header,h("Rotor Stats")),this.auto_row=xt(t);const e=bt(this.auto_row.insertCell());this.auto_min=document.createElement("LABEL"),Ct(h("Rotor Minimum Span"),this.auto_min,e),this.auto_span=document.createElement("INPUT"),wt(h("Rotor Span"),this.auto_span,e),this.auto_span.onchange=()=>{this.rotor.SetRotorSpan(this.auto_span.valueAsNumber)};const s=bt(this.auto_row.insertCell());this.auto_mat=document.createElement("SELECT"),Bt(h("Rotor Material"),this.auto_mat,s);for(let t of this.rotor.GetCantileverList()){let e=document.createElement("OPTION");e.text=h(t.name),this.auto_mat.add(e)}this.auto_mat.onchange=()=>{this.rotor.SetCantilever(this.auto_mat.selectedIndex)};const i=bt(this.auto_row.insertCell());this.auto_clutch=document.createElement("INPUT"),Pt(h("Rotor Clutched Rotor"),this.auto_clutch,i),this.auto_clutch.onchange=()=>{this.rotor.SetAccessory(this.auto_clutch.checked)},this.InitAutogyroStats(this.auto_row.insertCell())}InitAutogyroStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.a_drag=i.insertCell(),this.a_mass=i.insertCell(),this.a_cost=i.insertCell();const a=e.insertRow();St(a,h("Rotor Area")),St(a,""),St(a,"");const n=e.insertRow();this.a_area=n.insertCell(),n.insertCell(),n.insertCell()}UpdateAutogyroStats(){this.auto_span.valueAsNumber=this.rotor.GetRotorSpan(),this.auto_mat.selectedIndex=this.rotor.GetCantilever(),this.auto_min.innerText=""+this.rotor.GetSizingSpan(),this.auto_clutch.checked=this.rotor.GetAccessory();const t=this.rotor.PartStats();Nt(this.a_drag,t.drag.toString(),!1),Nt(this.a_mass,t.mass.toString(),!1),Nt(this.a_cost,t.cost.toString(),!1),Nt(this.a_area,t.wingarea.toString(),!0)}InitHelicopter(t){this.heli_header=xt(t),St(this.heli_header,h("Rotor Rotor")),St(this.heli_header,h("Rotor Material")),St(this.heli_header,h("Rotor Accessories")),St(this.heli_header,h("Rotor Stats")),this.heli_row=xt(t);const e=bt(this.heli_row.insertCell());this.heli_count=document.createElement("INPUT"),wt(h("Rotor Number of Rotors"),this.heli_count,e),this.heli_count.onchange=()=>{this.rotor.SetRotorCount(this.heli_count.valueAsNumber)},this.heli_min=document.createElement("LABEL"),Ct(h("Rotor Ideal Rotor Span"),this.heli_min,e),this.heli_span=document.createElement("INPUT"),wt(h("Rotor Span"),this.heli_span,e),this.heli_span.min="",this.heli_span.onchange=()=>{this.rotor.SetRotorSpan(this.heli_span.valueAsNumber)},this.heli_stagger=document.createElement("SELECT"),Bt(h("Rotor Stagger"),this.heli_stagger,e);const s=this.rotor.GetStaggerList();for(let t of s){let e=document.createElement("OPTION");e.text=h(t.name),this.heli_stagger.add(e)}this.heli_stagger.onchange=()=>{this.rotor.SetStagger(this.heli_stagger.selectedIndex)},this.heli_blade_count=document.createElement("SELECT"),Bt(h("Rotor Blade Count"),this.heli_blade_count,e);const i=this.rotor.GetBladeList();for(let t of i){let e=document.createElement("OPTION");e.textContent=t.name,this.heli_blade_count.add(e)}this.heli_blade_count.onchange=()=>{this.rotor.SetBladeCount(this.heli_blade_count.selectedIndex)};const a=bt(this.heli_row.insertCell());this.heli_mat=document.createElement("SELECT"),Bt(h("Rotor Rotor Material"),this.heli_mat,a);for(let t of this.rotor.GetCantileverList()){let e=document.createElement("OPTION");e.text=h(t.name),this.heli_mat.add(e)}this.heli_mat.onchange=()=>{this.rotor.SetCantilever(this.heli_mat.selectedIndex)},this.heli_blade_thickness=document.createElement("INPUT"),wt(h("Rotor Thickness"),this.heli_blade_thickness,a),this.heli_blade_thickness.onchange=()=>{this.rotor.SetRotorThickness(this.heli_blade_thickness.valueAsNumber)};const n=bt(this.heli_row.insertCell());this.heli_shafts=document.createElement("INPUT"),Pt(h("Rotor Motor Cross-link"),this.heli_shafts,n),this.heli_shafts.onchange=()=>{this.rotor.SetAccessory(this.heli_shafts.checked)},this.InitHelicopterStats(this.heli_row.insertCell())}InitHelicopterStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.h_drag=i.insertCell(),this.h_mass=i.insertCell(),this.h_cost=i.insertCell();const a=e.insertRow();St(a,h("Rotor Area")),St(a,h("Stat Reliability")),St(a,h("Reinforcement Aircraft Max Strain"));const n=e.insertRow();this.h_area=n.insertCell(),this.h_rely=n.insertCell(),this.h_strn=n.insertCell();const r=e.insertRow();St(r,""),St(r,h("Power")),St(r,"");const o=e.insertRow();o.insertCell(),this.h_powr=o.insertCell(),o.insertCell()}UpdateHelicopterStats(){this.heli_count.valueAsNumber=this.rotor.GetRotorCount(),1==this.rotor.GetRotorCount()?this.heli_count.step="1":this.heli_count.step="2",this.heli_min.innerText=""+this.rotor.GetSizingSpan(),this.heli_span.valueAsNumber=this.rotor.GetRotorSpan();const t=this.rotor.CanStagger();for(let e=0;e{let t=new u;t.drag=this.drag.valueAsNumber,t.mass=this.mass.valueAsNumber,t.wetmass=this.wmas.valueAsNumber,t.bomb_mass=this.bmas.valueAsNumber,t.cost=this.cost.valueAsNumber,t.upkeep=this.upkp.valueAsNumber,t.liftbleed=this.lfbd.valueAsNumber,t.wingarea=this.area.valueAsNumber,t.control=this.ctrl.valueAsNumber,t.pitchstab=this.pstb.valueAsNumber,t.latstab=this.lstb.valueAsNumber,t.maxstrain=this.rstn.valueAsNumber,t.structure=this.strc.valueAsNumber,t.toughness=this.tugh.valueAsNumber,t.power=this.powr.valueAsNumber,t.fuelconsumption=this.fcon.valueAsNumber,t.fuel=this.fuel.valueAsNumber,t.charge=this.chrg.valueAsNumber,t.crashsafety=this.sfty.valueAsNumber,t.visibility=this.visi.valueAsNumber,t.escape=this.escp.valueAsNumber,t.reliability=this.rely.valueAsNumber,this.sprl.value=this.sprl.value.trim(),this.sprl.value.length>0&&t.warnings.push({source:this.name.value,warning:this.sprl.value,color:c.WHITE}),this.alter.AddPart(this.name.value,t),this.UpdateSelect(),this.sel.selectedIndex=-1},this.rem.onclick=()=>{this.alter.RemovePart(this.name.value),this.ResetInputs(),this.UpdateSelect(),this.sel.selectedIndex=-1},this.sel.onchange=()=>{let t=this.alter.GetParts()[this.sel.selectedIndex];this.name.value=t.name,this.drag.valueAsNumber=t.stats.drag,this.mass.valueAsNumber=t.stats.mass,this.wmas.valueAsNumber=t.stats.wetmass,this.bmas.valueAsNumber=t.stats.bomb_mass,this.cost.valueAsNumber=t.stats.cost,this.upkp.valueAsNumber=t.stats.upkeep,this.lfbd.valueAsNumber=t.stats.liftbleed,this.area.valueAsNumber=t.stats.wingarea,this.ctrl.valueAsNumber=t.stats.control,this.pstb.valueAsNumber=t.stats.pitchstab,this.lstb.valueAsNumber=t.stats.latstab,this.rstn.valueAsNumber=t.stats.maxstrain,this.strc.valueAsNumber=t.stats.structure,this.tugh.valueAsNumber=t.stats.toughness,this.powr.valueAsNumber=t.stats.power,this.fcon.valueAsNumber=t.stats.fuelconsumption,this.fuel.valueAsNumber=t.stats.fuel,this.chrg.valueAsNumber=t.stats.charge,this.sfty.valueAsNumber=t.stats.crashsafety,this.visi.valueAsNumber=t.stats.visibility,this.escp.valueAsNumber=t.stats.escape,this.rely.valueAsNumber=t.stats.reliability;const e=[];for(let s of t.stats.warnings)e.push(s.warning);this.sprl.value=n.Join(" ",e),this.sel.selectedIndex=-1},this.ResetInputs(),this.UpdateSelect()}ResetInputs(){this.name.value="Default",this.drag.valueAsNumber=0,this.mass.valueAsNumber=0,this.wmas.valueAsNumber=0,this.bmas.valueAsNumber=0,this.cost.valueAsNumber=0,this.upkp.valueAsNumber=0,this.lfbd.valueAsNumber=0,this.area.valueAsNumber=0,this.ctrl.valueAsNumber=0,this.pstb.valueAsNumber=0,this.lstb.valueAsNumber=0,this.rstn.valueAsNumber=0,this.strc.valueAsNumber=0,this.tugh.valueAsNumber=0,this.powr.valueAsNumber=0,this.fcon.valueAsNumber=0,this.fuel.valueAsNumber=0,this.chrg.valueAsNumber=0,this.sfty.valueAsNumber=0,this.visi.valueAsNumber=0,this.escp.valueAsNumber=0,this.rely.valueAsNumber=0,this.sprl.value=""}UpdateSelect(){for(;this.sel.options.length;)this.sel.remove(this.sel.options.length-1);const t=this.alter.GetParts();for(let e of t){let t=document.createElement("OPTION");t.textContent=e.name,this.sel.add(t)}this.sel.selectedIndex=-1}SetCollapse(){Ot("alter_collapse",!this.alter.IsDefault())}UpdateDisplay(){this.UpdateSelect();const t=this.alter.GetParts();for(let e=0;e{this.alter.SetUsedPart(e,t.qty.valueAsNumber)},this.add_fs.div1.appendChild(t.lbl),this.add_fs.div2.appendChild(t.qty),this.add_list.push(t)}this.add_list[e].lbl.textContent=t[e].name,this.add_list[e].qty.valueAsNumber=t[e].qty}for(;this.add_list.length>t.length;)this.add_list[this.add_list.length-1].lbl.remove(),this.add_list[this.add_list.length-1].qty.remove(),this.add_list.pop()}}class ce{constructor(t){const e=document.createDocumentFragment(),s=xt(e),i=s.insertCell();i.colSpan=2,this.name_inp=document.createElement("INPUT"),this.name_inp.defaultValue=h("Derived Aircraft Name"),i.appendChild(this.name_inp),St(s,h("Stat Cost")),this.cost_cell=s.insertCell(),St(s,h("Stat Upkeep")),this.upkeep_cell=s.insertCell(),St(s,h("Derived Era Report")),this.version_cell=s.insertCell();const a=xt(e);St(a,h("Derived Mass Variations")),St(a,h("Derived Boost")),St(a,h("Derived Handling")),St(a,h("Derived Rate of Climb")),St(a,h("Derived Stall Speed")),St(a,h("Derived Top Speed")),St(a,h("Derived Vital Components")).colSpan=2,this.bomb_row2=xt(e),St(this.bomb_row2,h("Derived Full Fuel with Bombs")),this.boost_fullwB=this.bomb_row2.insertCell(),this.hand_fullwB=this.bomb_row2.insertCell(),this.roc_fullwB=this.bomb_row2.insertCell(),this.ss_fullwB=this.bomb_row2.insertCell(),this.ts_fullwB=this.bomb_row2.insertCell(),this.vital_components=this.bomb_row2.insertCell(),this.vital_components.rowSpan=3,this.vital_components.colSpan=3,this.bomb_row1=xt(e),St(this.bomb_row1,h("Derived Half Fuel with Bombs")),this.boost_halfwB=this.bomb_row1.insertCell(),this.hand_halfwB=this.bomb_row1.insertCell(),this.roc_halfwB=this.bomb_row1.insertCell(),this.ss_halfwB=this.bomb_row1.insertCell(),this.ts_halfwB=this.bomb_row1.insertCell(),this.full_row=xt(e),St(this.full_row,h("Derived Full Fuel")),this.boost_full=this.full_row.insertCell(),this.hand_full=this.full_row.insertCell(),this.roc_full=this.full_row.insertCell(),this.ss_full=this.full_row.insertCell(),this.ts_full=this.full_row.insertCell();const n=xt(e);St(n,h("Derived Half Fuel")),this.boost_half=n.insertCell(),this.hand_half=n.insertCell(),this.roc_half=n.insertCell(),this.ss_half=n.insertCell(),this.ts_half=n.insertCell();const r=xt(e);St(r,h("Derived Empty Fuel")),this.boost_empty=r.insertCell(),this.hand_empty=r.insertCell(),this.roc_empty=r.insertCell(),this.ss_empty=r.insertCell(),this.ts_empty=r.insertCell();const o=xt(e);St(o,h("Derived Propulsion")).colSpan=2,St(o,h("Derived Aerodynamics")).colSpan=2,St(o,h("Derived Survivability")).colSpan=2,St(o,h("Derived Crew Members")).colSpan=2;const l=xt(e);St(l,h("Derived Dropoff")),this.dropoff_cell=l.insertCell(),St(l,h("Derived Stability")),this.stability_cell=l.insertCell(),St(l,h("Derived Crash Safety")),this.crashsafety_cell=l.insertCell(),St(l,h("Derived Crew/Passengers")),this.crew_cell=l.insertCell();const c=xt(e);St(c,h("Derived Overspeed")),this.overspeed_cell=c.insertCell(),St(c,h("Derived Energy Loss")),this.eloss_cell=c.insertCell(),St(c,h("Stat Toughness")),this.toughness_cell=c.insertCell(),St(c,h("Stat Visibility")),this.visibility_cell=c.insertCell();const u=xt(e);St(u,h("Derived Fuel Uses")),this.maxfuel_cell=u.insertCell(),this.turnbleed_label=St(u,h("Derived Turn Bleed")),this.turnbleed_cell=u.insertCell(),St(u,h("Stat Max Strain")),this.mxstrain_cell=u.insertCell(),St(u,h("Derived Attack Modifier")),this.attack_cell=u.insertCell();const m=xt(e);St(m,h("Stat Reliability")),this.reliability_cell=m.insertCell(),St(m,h("Derived Landing Gear")),this.landing_cell=m.insertCell(),St(m,h("Derived Communications")),this.communications_cell=m.insertCell(),St(m,h("Derived Escape")),this.escape_cell=m.insertCell();const p=xt(e);St(p,h("Derived Ideal Engine Altitude")),this.maxalt_cell=p.insertCell(),St(p,h("Derived Is Flammable Question")),this.flammable_cell=p.insertCell(),this.desc_cell=p.insertCell(),this.desc_cell.colSpan=2,St(p,h("Stat Flight Stress")),this.flightstress_cell=p.insertCell();const d=xt(e),g=xt(e);this.weapon_head=St(d,h("Derived Weapon Systems")),this.weapon_head.colSpan=6,this.weapon_cell=g.insertCell(),this.weapon_cell.colSpan=6,this.warning_head=St(xt(e),h("Derived Special Rules")),this.warning_head.colSpan=6,this.warning_cell=xt(e).insertCell(),this.warning_cell.colSpan=6,St(d,h("Derived Electrics")).colSpan=2,this.electric_cell=g.insertCell(),this.electric_cell.colSpan=2,this.electric_cell.rowSpan=3,t.appendChild(e),this.tbl=t}UpdateDisplay(t,e,s){for(this.name_inp.value=t.name;this.version_cell.children.length>0;)this.version_cell.removeChild(this.version_cell.children[0]);this.version_cell.className="tooltip";const i=document.createElement("DIV");i.className="tooltiptext";let a=document.createElement("P");a.textContent=h("Derived Problematic Parts"),i.appendChild(a);const r=p(t.GetEra().GetSelectedText());var o=0;for(let t of e.era){const e=p(t.era);if(e>r){o+=e-r;let s=document.createElement("P");s.textContent=t.name+": "+t.era,i.appendChild(s)}}if(0==o){let t=document.createElement("P");t.textContent=h("None"),i.appendChild(t)}const l=document.createElement("P");for(l.textContent=h(t.GetEra().GetSelectedText()),l.className=0==o?"green":o>2?"red":"yellow",this.version_cell.appendChild(l),this.version_cell.appendChild(i),this.cost_cell.textContent=e.cost.toString()+"þ ",t.GetUsed().IsDefault()||(this.cost_cell.textContent+=" ("+Math.floor(1e-6+e.cost/2).toString()+"þ "+h("Price Word Used")+")"),this.upkeep_cell.textContent=e.upkeep.toString()+"þ",this.ts_empty.textContent=(0).toString(),this.ss_empty.textContent=s.StallSpeedEmpty.toString(),this.hand_empty.textContent=s.HandlingEmpty.toString(),this.boost_empty.textContent=(0).toString(),this.roc_empty.textContent=(0).toString(),this.ts_half.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedFull)/2).toString(),this.ss_half.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFull)/2).toString(),this.hand_half.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFull)/2).toString(),this.boost_half.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFull)/2).toString(),this.roc_half.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbFull)/2).toString(),this.ts_full.textContent=Math.floor(1e-6+s.MaxSpeedFull).toString(),this.ss_full.textContent=s.StallSpeedFull.toString(),this.hand_full.textContent=s.HandlingFull.toString(),this.boost_full.textContent=s.BoostFull.toString(),this.roc_full.textContent=s.RateOfClimbFull.toString(),e.bomb_mass>0||this.show_bombs?(this.bomb_row1.hidden=!1,this.bomb_row2.hidden=!1,this.bomb_row2.appendChild(this.vital_components),this.vital_components.rowSpan=5,this.ts_halfwB.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedwBombs)/2).toString(),this.ss_halfwB.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFullwBombs)/2).toString(),this.hand_halfwB.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFullwBombs)/2).toString(),this.boost_halfwB.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFullwBombs)/2).toString(),this.roc_halfwB.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbwBombs)/2).toString(),this.ts_fullwB.textContent=Math.floor(1e-6+s.MaxSpeedwBombs).toString(),this.ss_fullwB.textContent=s.StallSpeedFullwBombs.toString(),this.hand_fullwB.textContent=s.HandlingFullwBombs.toString(),this.boost_fullwB.textContent=s.BoostFullwBombs.toString(),this.roc_fullwB.textContent=s.RateOfClimbwBombs.toString(),this.turnbleed_label.textContent=h("Derived Turn Bleed wB"),this.turnbleed_cell.textContent=n.Format("{0} ({1})",s.TurnBleed,s.TurnBleedwBombs)):(this.bomb_row1.hidden=!0,this.bomb_row2.hidden=!0,this.full_row.appendChild(this.vital_components),this.vital_components.rowSpan=3,this.turnbleed_label.textContent=h("Derived Turn Bleed"),this.turnbleed_cell.textContent=n.Format("{0}",s.TurnBleed)),this.dropoff_cell.textContent=s.Dropoff.toString(),this.overspeed_cell.textContent=s.Overspeed.toString(),this.maxfuel_cell.textContent=(Math.floor(1e-6+10*s.FuelUses)/10).toString(),t.GetIsFlammable()?this.flammable_cell.textContent=h("Yes"):this.flammable_cell.textContent=h("No"),this.stability_cell.textContent=s.Stabiilty.toString(),this.eloss_cell.textContent=s.EnergyLoss.toString(),this.landing_cell.textContent=t.GetGearName(),this.maxalt_cell.textContent=t.GetMinAltitude().toString()+"-"+t.GetMaxAltitude().toString(),this.reliability_cell.textContent=n.Join(", ",t.GetReliabilityList()),this.toughness_cell.textContent=s.Toughness.toString(),this.mxstrain_cell.textContent=s.MaxStrain.toString(),this.escape_cell.textContent=n.Join(", ",t.GetEscapeList()),this.crashsafety_cell.textContent=e.crashsafety.toString(),this.crew_cell.textContent=t.GetCockpits().GetNumberOfCockpits().toString()+"/"+(t.GetPassengers().GetSeats()+t.GetPassengers().GetBeds()).toString(),this.flightstress_cell.textContent=g(t.GetStressList()),this.visibility_cell.textContent=n.Join(", ",t.GetVisibilityList()),this.attack_cell.textContent=n.Join(", ",t.GetAttackList()),this.communications_cell.textContent=t.GetCommunicationName();this.electric_cell.childElementCount>0;)this.electric_cell.removeChild(this.electric_cell.firstChild);const u=t.GetElectrics(),m=bt(this.electric_cell);u.storage>0&&Ft(h("Derived Battery"),u.storage.toString(),m);for(let t of u.equipment)Ft(t.source,t.charge,m);var d="";const _=t.VitalComponentList();for(let t of _)d+=t+"
";this.vital_components.innerHTML=d;const f=t.GetWeapons().GetWeaponList(),A=t.GetWeapons().GetDirectionList(),b=t.GetMunitions().GetBombCount(),S=t.GetMunitions().GetRocketCount();var y=t.GetMunitions().GetInternalBombCount(),w="";if(b>0){const e=Math.min(b,y),s=Math.max(0,b-e);e>0&&(w+=h(" Bomb Mass Internally.",e)),s>0&&(w+=h(" Bomb Mass Externally.",s)),e>0&&(w+=h("Largest Internal Bomb",Math.min(e,t.GetMunitions().GetMaxBombSize()).toString())),y-=e,w+="
"}if(S>0){const t=Math.min(S,y),e=Math.max(0,S-t);t>0&&(w+=h(" Rocket Mass Internally.",t)),e>0&&(w+=h(" Rocket Mass Externally.",e)),w+="
"}for(let e of t.GetWeapons().GetWeaponSets())w+=qt(e,f,A),w+="
";this.weapon_cell.innerHTML=w,e.warnings.sort(((t,e)=>t.color-e.color));var C="";for(let t of e.warnings){switch(t.color){case c.RED:C+='
';break;case c.YELLOW:C+='
';break;case c.WHITE:default:C+='
'}C+=t.source+": "+t.warning+"
"}this.warning_cell.innerHTML=C;var B="";const E=t.GetWings().GetWingList().length;if(1==E){const e=t.GetWings().GetWingList()[0].deck;e{t()},this.fires=document.getElementById("input_fires"),this.fires.onchange=()=>{t()},this.oxidized=document.getElementById("input_oxidized"),this.oxidized.onchange=()=>{t()},this.fRow=xt(this.tbl),St(this.fRow,h("Altitude Altitude")),St(this.fRow,h("Derived Boost")),St(this.fRow,h("Derived Rate of Climb")),St(this.fRow,h("Derived Stall Speed")),St(this.fRow,h("Derived Top Speed")),this.rows=[]}AddRow(t){const e=document.createElement("TR");e.insertCell().textContent=n.Format("{0}-{1}",10*t,10*t+9),e.insertCell(),e.insertCell(),e.insertCell(),e.insertCell(),this.rows.push(e)}UpdateDisplay(t,e){for(;this.tbl.lastChild;)this.tbl.removeChild(this.tbl.lastChild);const s=document.createDocumentFragment();s.appendChild(this.fRow);var i=0,a=0,n=0,r=0;switch(this.fuel_state.selectedIndex){case ue.FULLWBOMBS:i=e.BoostFullwBombs,a=e.RateOfClimbwBombs,n=e.StallSpeedFullwBombs,r=e.MaxSpeedwBombs;break;case ue.HALFWBOMBS:i=Math.floor(1e-6+(e.BoostEmpty+e.BoostFullwBombs)/2),a=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),n=Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFullwBombs)/2),r=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2);break;case ue.FULL:i=e.BoostFull,a=e.RateOfClimbFull,n=e.StallSpeedFull,r=e.MaxSpeedFull;break;case ue.HALF:i=Math.floor(1e-6+(e.BoostEmpty+e.BoostFull)/2),a=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),n=Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFull)/2),r=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2)}for(let e=0;e<100;e++){var o=0,l=0;if(es&&(o=e-s)}this.fires.checked&&(o=0),this.rows.length<=e&&this.AddRow(e);const c=this.rows[e];var h=0;h=o>0&&0!=i?Math.max(1,i-1):i;const u=Math.max(1,a-o),m=Math.max(1,n+e),p=Math.max(1,r+l-o);if(c.children[1].textContent=h.toString(),c.children[2].textContent=u.toString(),c.children[3].textContent=m.toString(),c.children[4].textContent=p.toString(),s.appendChild(c),m>p){for(;this.rows.length>e;)this.rows.pop();break}}this.tbl.appendChild(s)}}!function(t){t[t.SINGLE=0]="SINGLE",t[t.PUSHER=1]="PUSHER",t[t.PULLER=2]="PULLER"}(me||(me={}));class de{constructor(){this.dash_canvas=document.createElement("CANVAS"),this.dash_canvas.width=1122,this.dash_canvas.height=786,this.dash_image=document.getElementById("dash_img"),this.dash_image.width=1122,this.dash_image.height=786,this.weap_canvas=document.createElement("CANVAS"),this.weap_canvas.width=483,this.weap_canvas.height=291,this.weap_image=document.getElementById("weap_img"),this.weap_image.width=483,this.weap_image.height=291,this.eng_canvas=document.createElement("CANVAS"),this.eng_canvas.width=600,this.eng_canvas.height=360,this.eng_image=document.getElementById("eng_img"),this.eng_image.width=600,this.eng_image.height=360,this.rad_canvas=document.createElement("CANVAS"),this.rad_canvas.width=479,this.rad_canvas.height=290,this.rad_image=document.getElementById("rad_img"),this.rad_image.width=479,this.rad_image.height=290,this.npc_canvas=document.createElement("CANVAS"),this.npc_canvas.width=482,this.npc_canvas.height=290,this.npc_image=document.getElementById("npc_img"),this.npc_image.width=482,this.npc_image.height=290,this.acft_data={full_bomb_boost:0,half_bomb_boost:0,full_boost:0,half_boost:0,empty_boost:0,full_bomb_hand:0,half_bomb_hand:0,full_hand:0,half_hand:0,empty_hand:0,full_bomb_climb:0,half_bomb_climb:0,full_climb:0,half_climb:0,empty_climb:0,full_bomb_stall:0,half_bomb_stall:0,full_stall:0,half_stall:0,empty_stall:0,full_bomb_speed:0,half_bomb_speed:0,full_speed:0,half_speed:0,empty_speed:0,fuel:0,dropoff:0,ordinance:[""],escape:0,crash:0,visibility:0,energy_loss:0,turn_bleed:0,stability:0,stress:0,toughness:0,max_strain:0,vital_parts:[""],armour:[],warnings:[{source:"",warning:""}]},this.weap_data={type:"",abrv:"",ammo:0,ap:0,jam:"",hits:[],damage:[],tags:[],reload:0,gyrojet:!1},this.eng_data={reliability:"0",min_IAF:0,altitude:0,overspeed:0,radiator:0,notes:[]},this.rad_data={mount_type:"",coolant_type:""}}SaveDash(){var t=this.dash_canvas.getContext("2d");t.clearRect(0,0,this.dash_canvas.width,this.dash_canvas.height),t.textAlign="center",t.drawImage(this.dash_image,0,0),t.font="35px Balthazar",t.fillText(this.acft_data.full_bomb_boost.toString(),493,94,80),t.fillText(this.acft_data.full_bomb_hand.toString(),555,94,80),t.fillText(this.acft_data.full_bomb_climb.toString(),617,94,80),t.fillText(this.acft_data.full_bomb_stall.toString(),679,94,80),t.fillText(this.acft_data.full_bomb_speed.toString(),741,94,80),t.fillText(this.acft_data.half_bomb_boost.toString(),493,134,80),t.fillText(this.acft_data.half_bomb_hand.toString(),555,134,80),t.fillText(this.acft_data.half_bomb_climb.toString(),617,134,80),t.fillText(this.acft_data.half_bomb_stall.toString(),679,134,80),t.fillText(this.acft_data.half_bomb_speed.toString(),741,134,80),t.fillText(this.acft_data.full_boost.toString(),493,174,80),t.fillText(this.acft_data.full_hand.toString(),555,174,80),t.fillText(this.acft_data.full_climb.toString(),617,174,80),t.fillText(this.acft_data.full_stall.toString(),679,174,80),t.fillText(this.acft_data.full_speed.toString(),741,174,80),t.fillText(this.acft_data.half_boost.toString(),493,214,80),t.fillText(this.acft_data.half_hand.toString(),555,214,80),t.fillText(this.acft_data.half_climb.toString(),617,214,80),t.fillText(this.acft_data.half_stall.toString(),679,214,80),t.fillText(this.acft_data.half_speed.toString(),741,214,80),t.fillText("0",493,254,80),t.fillText(this.acft_data.empty_hand.toString(),555,254,80),t.fillText("0",617,254,80),t.fillText(this.acft_data.empty_stall.toString(),679,254,80),t.fillText("0",741,254,80),t.fillText(Math.floor(this.acft_data.fuel).toString(),417,310,35),t.fillText(this.acft_data.dropoff.toString(),1048,375,35),t.fillText(this.acft_data.escape.toString(),85,640,35),t.fillText(this.acft_data.crash.toString(),85,720,35),t.fillText(this.acft_data.visibility.toString(),135,460,35),t.fillText(this.acft_data.stability.toString(),135,550,35),t.fillText(this.acft_data.energy_loss.toString(),70,505,35),t.fillText(this.acft_data.turn_bleed.toString(),195,505,35),t.fillText(this.acft_data.stress.toString(),285,495,35),t.fillText(this.acft_data.toughness.toString(),250,645,35),t.fillText(this.acft_data.max_strain.toString(),250,720,35),t.font="20px Balthazar",t.textAlign="left";var e=Math.min(this.acft_data.ordinance.length,2),s=Math.ceil(this.acft_data.ordinance.length/e-1e-6),i=0;for(let a=0;a0&&(a+=""!=a?", ":h("Armour")+" ",a+=e.toString()+"/+"+(11-this.acft_data.armour[t]).toString())}t.fillText(a,335,558,375),t.font="14px Balthazar",i=1;for(let e=0;ee+1?t.fillText(h("Cards Too Many Warnings Warning"),335,673+14*i,370):i>6||t.fillText(s,335,673+14*i,370),i++}this.download(this.name+"_Dashboard",this.dash_canvas)}SaveWeapon(t){t++;var e=this.weap_canvas.getContext("2d");e.clearRect(0,0,this.weap_canvas.width,this.weap_canvas.height),e.textAlign="center",e.drawImage(this.weap_image,0,0),e.font="25px Balthazar",e.fillText(this.weap_data.type,150,112,215),e.font="15px Balthazar";var s="";this.weap_data.reload>0?(s+=h("Cards Gun String Reload",(this.weap_data.ammo/this.weap_data.reload).toString(),this.weap_data.reload.toString()),this.weap_data.tags.push(h("Weapon Tag Reload",this.weap_data.reload.toString()))):s+=h("Cards Gun String No Reload",this.weap_data.ammo),e.fillText(s,95,158,105),e.fillText(this.weap_data.ap.toString(),172,158,23),e.fillText(this.weap_data.jam,230,158,65),e.fillText(this.weap_data.hits[0].toString(),157,208,80),e.fillText(this.weap_data.hits[1].toString(),237,208,80),e.fillText(this.weap_data.hits[2].toString(),317,208,80),e.fillText(this.weap_data.hits[3].toString(),397,208,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[0]).toString(),157,231,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[1]).toString(),237,231,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[2]).toString(),317,231,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[3]).toString(),397,231,80),e.textAlign="left",e.fillText(this.weap_data.tags[0],90,256,350);var i="";for(let t=1;t=0&&s.fillText(h("Cards Uses Radiator",this.eng_data.radiator+1),109,340,270),s.textAlign="right",s.font="30px Balthazar",s.fillStyle="#fff",s.strokeStyle="#fff",s.fillText("#"+t.toString(),37,67,35),e){case me.SINGLE:this.download(this.name+"_Engine_"+t.toString(),this.eng_canvas);break;case me.PUSHER:this.download(this.name+"_Engine_"+t.toString()+"_Pusher",this.eng_canvas);break;case me.PULLER:this.download(this.name+"_Engine_"+t.toString()+"_Puller",this.eng_canvas)}}SaveRadiator(t){t++;var e=this.rad_canvas.getContext("2d");e.clearRect(0,0,this.rad_canvas.width,this.rad_canvas.height),e.drawImage(this.rad_image,0,0),e.textAlign="center",e.font="25px Balthazar",e.fillStyle="#000",e.strokeStyle="#000",e.fillText(this.rad_data.mount_type,162,141,230),e.fillText(this.rad_data.coolant_type,162,217,230),e.textAlign="right",e.font="25px Balthazar",e.fillStyle="#fff",e.strokeStyle="#fff",e.fillText("#"+t.toString(),37,56,35),this.download(this.name+"_Radiator_"+t.toString(),this.rad_canvas)}SaveNPC(){var t=this.npc_canvas.getContext("2d");t.clearRect(0,0,this.npc_canvas.width,this.npc_canvas.height),t.drawImage(this.npc_image,0,0),t.font="20px Balthazar",t.textAlign="center",t.fillStyle="#000",t.strokeStyle="#000",t.fillText(this.name,100,100,145),t.fillText(""+this.lowest_overspeed,70,158,40),t.fillText(""+this.acft_data.full_speed,126,158,40);var e=this.acft_data.full_speed-this.acft_data.turn_bleed-Math.floor(1e-6+.1*this.acft_data.full_speed);t.fillText(""+e,187,158,40),t.fillText(""+this.acft_data.full_stall,245,158,40);var s,i=this.acft_data.toughness+this.acft_data.max_strain;if(t.fillText(""+i,70,236,40),t.fillText(""+this.acft_data.full_hand,123,236,40),this.all_weapons[0]){s=this.all_weapons[0],t.font="12px Avenir",t.fillText(s.abrv,232,71,91),t.font="20px Balthazar";var a=n.Join("/",[s.hits[0],s.hits[1],s.hits[2],s.hits[3]]),r=n.Join("/",[Math.floor(1e-6+s.damage[0]),Math.floor(1e-6+s.damage[1]),Math.floor(1e-6+s.damage[2]),Math.floor(1e-6+s.damage[3])]);t.fillText(a,320,71,80),t.fillText(r,401,71,80)}this.all_weapons[1]&&(s=this.all_weapons[1],t.font="12px Avenir",t.fillText(s.abrv,232,103,91),t.font="20px Balthazar",a=n.Join("/",[s.hits[0],s.hits[1],s.hits[2],s.hits[3]]),r=n.Join("/",[Math.floor(1e-6+s.damage[0]),Math.floor(1e-6+s.damage[1]),Math.floor(1e-6+s.damage[2]),Math.floor(1e-6+s.damage[3])]),t.fillText(a,320,103,80),t.fillText(r,401,103,80)),this.download(this.name+"_NPC",this.npc_canvas)}download(t,e){var s=document.createElement("a");if(s.download=t+".png",s.href=e.toDataURL(),document.createEvent){var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.dispatchEvent(i)}}}var ge=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function a(t,e){if(!i[t]){i[t]={};for(let e=0;e>>8,s[2*t+1]=i%256}return s},decompressFromUint8Array:function(e){if(null==e)return n.decompress(e);var s=new Array(e.length/2);for(let t=0,i=s.length;t>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=r[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++),r[h]=m++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(o,c)){if(c.charCodeAt(0)<256){for(i=0;i>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=r[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++)}for(a=2,i=0;i>=1;for(;;){if(g<<=1,_==e-1){d.push(s(g));break}_++}return d.join("")},decompress:function(t){return null==t?"":""==t?null:n._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,s,i){var a,n,r,o,l,h,c,u=[],m=4,p=4,d=3,g="",_=[],f={val:i(0),position:s,index:1};for(a=0;a<3;a+=1)u[a]=a;for(r=0,l=Math.pow(2,2),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;switch(r){case 0:for(r=0,l=Math.pow(2,8),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;c=t(r);break;case 1:for(r=0,l=Math.pow(2,16),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;c=t(r);break;case 2:return""}for(u[3]=c,n=c,_.push(c);;){if(f.index>e)return"";for(r=0,l=Math.pow(2,d),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;switch(c=r){case 0:for(r=0,l=Math.pow(2,8),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;u[p++]=t(r),c=p-1,m--;break;case 1:for(r=0,l=Math.pow(2,16),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;u[p++]=t(r),c=p-1,m--;break;case 2:return _.join("")}if(0==m&&(m=Math.pow(2,d),d++),u[c])g=u[c];else{if(c!==p)return null;g=n+n.charAt(0)}_.push(g),u[p++]=n+g.charAt(0),n=g,0==--m&&(m=Math.pow(2,d),d++)}}};return n}();class _e extends kt{constructor(t,e){super(),this.acft=t,this.parts_JSON=e,this.era=new zt(this.acft.GetEra()),this.cockpits=new jt(t.GetCockpits()),this.passengers=new Yt(t.GetPassengers()),this.engines=new Kt(t.GetEngines()),this.propeller=new Zt(t.GetPropeller()),this.frames=new Xt(t.GetFrames()),this.wings=new $t(t.GetWings()),this.stabilizers=new te(t.GetStabilizers()),this.controlsurfaces=new ee(t.GetControlSurfaces()),this.reinforcements=new se(t.GetReinforcements()),this.load=new ie(t.GetFuel(),t.GetMunitions(),t.GetCargoAndPassengers()),this.gear=new ae(t.GetLandingGear()),this.accessories=new ne(t.GetAccessories()),this.optimization=new re(t.GetOptimization()),this.weapons=new Lt(t.GetWeapons()),this.used=new oe(t.GetUsed()),this.rotor=new le(t.GetRotor()),this.alter=new he(t.GetAlter()),this.altitude=new pe((()=>{this.UpdateDisplay()})),this.acft_type=document.getElementById("acft_type");let s=0;for(let t in N)if(isNaN(Number(t))&&(s+=1,2!=s)){let e=document.createElement("OPTION");e.text=h(t),this.acft_type.add(e)}this.acft_type.onchange=()=>{let t=this.acft_type.selectedIndex;t>=1&&(t+=1),this.acft.SetType(t)};const i=document.getElementById("tbl_stats");this.InitStats(i);const a=document.getElementById("tbl_derived");this.InitDerived(a),this.acft.SetDisplayCallback((()=>{this.UpdateDisplay()})),document.getElementById("acft_save").onclick=()=>{this.SaveJSON()};const n=document.getElementById("acft_load");n.multiple=!1,n.accept="application/JSON",n.onchange=t=>{this.LoadJSON(n)};const r=document.getElementById("acft_load_text");r.onchange=()=>{this.LoadText(r)};const o=document.getElementById("acft_load_text2");o.onchange=()=>{this.LoadText(o)},document.getElementById("acft_save_link").onclick=()=>{this.SaveLink()},this.cards=new de,document.getElementById("acft_save_dash").onclick=()=>{this.SaveDash()},document.getElementById("acft_interactive_dash").onclick=()=>{this.SaveInteractive()},document.getElementById("acft_save_npc").onclick=()=>{this.SaveNPC()},document.getElementById("acft_reset").onclick=()=>{this.acft.Reset(),this.derived.SetName(this.acft.name),this.acft.CalculateStats(),this.SetCollapse()},document.getElementById("acft_save_cat").onclick=()=>{this.CatalogStats()},document.getElementById("acft_save_cat_json").onclick=()=>{this.CatalogJSON()},this.SetCollapse()}UpdateCard(){this.acft.name=this.derived.GetName();const t=this.acft.GetStats(),e=this.acft.GetDerivedStats();this.cards.name=this.acft.name,this.cards.acft_data.armour=this.acft.GetAccessories().GetEffectiveCoverage(),this.cards.acft_data.crash=t.crashsafety,this.cards.acft_data.dropoff=e.Dropoff,this.cards.acft_data.empty_boost=e.BoostEmpty,this.cards.acft_data.empty_hand=e.HandlingEmpty,this.cards.acft_data.empty_climb=e.RateOfClimbEmpty,this.cards.acft_data.empty_stall=e.StallSpeedEmpty,this.cards.acft_data.empty_speed=Math.floor(1e-6+e.MaxSpeedEmpty),this.cards.acft_data.energy_loss=e.EnergyLoss,this.cards.acft_data.escape=this.acft.GetCockpits().GetEscapeList()[0],this.cards.acft_data.fuel=e.FuelUses,this.cards.acft_data.full_bomb_boost=e.BoostFullwBombs,this.cards.acft_data.full_bomb_hand=e.HandlingFullwBombs,this.cards.acft_data.full_bomb_climb=e.RateOfClimbwBombs,this.cards.acft_data.full_bomb_stall=e.StallSpeedFullwBombs,this.cards.acft_data.full_bomb_speed=e.MaxSpeedwBombs,this.cards.acft_data.full_boost=e.BoostFull,this.cards.acft_data.full_hand=e.HandlingFull,this.cards.acft_data.full_climb=e.RateOfClimbFull,this.cards.acft_data.full_stall=e.StallSpeedFull,this.cards.acft_data.full_speed=Math.floor(1e-6+e.MaxSpeedFull),this.cards.acft_data.half_bomb_boost=Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),this.cards.acft_data.half_bomb_hand=Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),this.cards.acft_data.half_bomb_climb=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),this.cards.acft_data.half_bomb_stall=Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),this.cards.acft_data.half_bomb_speed=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),this.cards.acft_data.half_boost=Math.floor((e.BoostFull+e.BoostEmpty)/2),this.cards.acft_data.half_hand=Math.floor((e.HandlingFull+e.HandlingEmpty)/2),this.cards.acft_data.half_climb=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),this.cards.acft_data.half_stall=Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),this.cards.acft_data.half_speed=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),this.cards.acft_data.max_strain=e.MaxStrain;const s=[],i=this.acft.GetMunitions().GetBombCount(),a=this.acft.GetMunitions().GetRocketCount();var n=this.acft.GetMunitions().GetInternalBombCount();if(i>0){const t=Math.min(i,n),e=Math.max(0,i-t);if(t>0&&s.push(h(" Bomb Mass Internally.",t)),e>0&&s.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.acft.GetMunitions().GetMaxBombSize());s.push(h("Largest Internal Bomb",e.toString()))}n-=t}if(a>0){const t=Math.min(a,n),e=Math.max(0,a-t);t>0&&s.push(h(" Rocket Mass Internally.",t)),e>0&&s.push(h(" Rocket Mass Externally.",e))}this.cards.acft_data.ordinance=s,this.cards.acft_data.stability=e.Stabiilty,this.cards.acft_data.stress=this.acft.GetCockpits().GetStressList()[0][0],this.cards.acft_data.toughness=e.Toughness,this.cards.acft_data.turn_bleed=e.TurnBleed,this.cards.acft_data.visibility=this.acft.GetCockpits().GetVisibilityList()[0],this.cards.acft_data.vital_parts=this.acft.VitalComponentList(),this.cards.acft_data.warnings=t.warnings}UpdateWeaponCard(t){const e=this.acft.GetWeapons().GetWeaponList(),s=this.acft.GetWeapons().GetDirectionList();var i=Wt(t,e);t.IsPlural()&&(i=t.GetWeaponCount().toString()+"x "+i);const a=t.GetDirection();var n="";n+="[";for(let t=0;t0&&s.starter&&this.cards.eng_data.notes.push(h("Starter"))}}else if(t.IsRotary()&&t.IsTractor()?this.cards.eng_data.notes.push(h("Turns Right")):t.IsRotary()&&t.IsPusher()&&this.cards.eng_data.notes.push(h("Turns Left")),""!=t.GetSelectedList()){const s=T().get(t.GetSelectedList()).get_name(e.name);this.cards.eng_data.min_IAF=s.min_IdealAlt,s.upgrades[1]?this.cards.eng_data.notes.push(h("War Emergency Power")):s.compressor_count>0&&1==s.compressor_type&&this.cards.eng_data.notes.push(h("War Emergency Power from altitudes 0-9"))}}UpdateRadiatorCard(t){this.cards.rad_data.mount_type=h(t.GetMountList()[t.GetMountIndex()].name),this.cards.rad_data.coolant_type=h(t.GetCoolantList()[t.GetCoolantIndex()].name)}LoadJSON(t){if(0==t.files.length)return;const e=t.files[0],s=new FileReader;s.onloadend=()=>{try{var t=JSON.parse(s.result);new Ut(this.parts_JSON,!1).fromJSON(t)&&(t=JSON.parse(s.result),console.log(t),this.acft.fromJSON(t),this.derived.SetName(this.acft.name),this.acft.CalculateStats(),this.SetCollapse())}catch(t){console.error(t,t.stack)}},s.readAsText(e),t.value=""}CatalogStats(){this.acft.name=this.derived.GetName();const t=this.acft.GetStats(),e=this.acft.GetDerivedStats();var s="\\FCPlane[Nickname=\\FrameDefault{Not Set}, %Box Text = {}, Image = {},\n";s+=n.Format("Name={{0}}, Price={1}, Used={2}, Upkeep={3},\n",this.acft.name,t.cost,Math.floor(1e-6+t.cost/2),t.upkeep),s+="Stats = {\n",t.bomb_mass>0&&(s+=n.Format("Full Load & {0} & {1} & {2} & {3} & {4} \\\\\n",e.BoostFullwBombs,e.HandlingFullwBombs,e.RateOfClimbwBombs,e.StallSpeedFullwBombs,e.MaxSpeedwBombs),s+="\\nicefrac{1}{2}"+n.Format(", Bombs & {0} & {1} & {2} & {3} & {4}\\\\\n",Math.floor(1e-6+(e.BoostEmpty+e.BoostFullwBombs)/2),Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFullwBombs)/2),Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFullwBombs)/2),Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2))),s+=n.Format("Full Fuel & {0} & {1} & {2} & {3} & {4}\\\\\n",e.BoostFull,e.HandlingFull,e.RateOfClimbFull,e.StallSpeedFull,e.MaxSpeedFull),s+=n.Format("Half Fuel & {0} & {1} & {2} & {3} & {4}\\\\\n",Math.floor(1e-6+(e.BoostEmpty+e.BoostFull)/2),Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFull)/2),Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFull)/2),Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2)),s+=n.Format("Empty & {0} & {1} & {2} & {3} & {4}\\\\\n","-",e.HandlingEmpty,"-",e.StallSpeedEmpty,0),s+="},\n";var i=this.acft.VitalComponentList(),a=new Map;for(let t of i)t=t.replace(/Weapon Set #.*/g,"Guns").trim(),t=t.replace(/#.*/g,"").trim(),a.has(t)?a.set(t,a.get(t)+1):a.set(t,1);i=[];for(let t of a.keys())1==a.get(t)?i.push(t):i.push(t+" x"+a.get(t).toString());s+="Vital Parts = {"+n.Join(", ",i)+"},\n";var r=[];for(let t=0;t0){const t=Math.min(c,m),e=Math.max(0,c-t);t>0&&(s+=h(" Bomb Mass Internally.",t)),e>0&&(s+=h(" Bomb Mass Externally.",e)),t>0&&(s+=h("Largest Internal Bomb",Math.min(t,this.acft.GetMunitions().GetMaxBombSize()).toString())),m-=t,s+="\\\\\n"}if(u>0){const t=Math.min(u,m),e=Math.max(0,u-t);t>0&&(s+=h(" Rocket Mass Internally.",t)),e>0&&(s+=h(" Rocket Mass Externally.",e)),s+="\\\\\n"}const p=this.acft.GetWeapons().GetWeaponSets();for(let t=0;t0&&(s.push({Name:"Full Load",Boost:e.BoostFullwBombs,Handling:e.HandlingFullwBombs,Climb:e.RateOfClimbwBombs,Stall:e.StallSpeedFullwBombs,Speed:e.MaxSpeedwBombs}),s.push({Name:"1/2, Bombs",Boost:Math.floor(1e-6+(e.BoostEmpty+e.BoostFullwBombs)/2),Handling:Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFullwBombs)/2),Climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),Stall:Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFullwBombs)/2),Speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2)})),s.push({Name:"Full Fuel",Boost:e.BoostFull,Handling:e.HandlingFull,Climb:e.RateOfClimbFull,Stall:e.StallSpeedFull,Speed:e.MaxSpeedFull}),s.push({Name:"Half Fuel",Boost:Math.floor(1e-6+(e.BoostEmpty+e.BoostFull)/2),Handling:Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFull)/2),Climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),Stall:Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFull)/2),Speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2)}),s.push({Name:"Empty",Boost:"-",Handling:e.HandlingEmpty,Climb:"-",Stall:e.StallSpeedEmpty,Speed:0});let i=this.acft.VitalComponentList(),a=new Map;for(let t of i)t=t.replace(/Weapon Set #.*/g,"Guns").trim(),t=t.replace(/#.*/g,"").trim(),a.has(t)?a.set(t,a.get(t)+1):a.set(t,1);i=[];for(let t of a.keys())1==a.get(t)?i.push(t):i.push(t+" x"+a.get(t).toString());let r=[];for(let t=0;t0){const t=Math.min(d,f),e=Math.max(0,d-t);t>0&&(u+=h(" Bomb Mass Internally.",t)),e>0&&(u+=h(" Bomb Mass Externally.",e)),t>0&&(u+=h("Largest Internal Bomb",Math.min(t,this.acft.GetMunitions().GetMaxBombSize()).toString())),f-=t,u+="\n"}if(_>0){const t=Math.min(_,f),e=Math.max(0,_-t);t>0&&(u+=h(" Rocket Mass Internally.",t)),e>0&&(u+=h(" Rocket Mass Externally.",e)),u+="\n"}const A=this.acft.GetWeapons().GetWeaponSets();for(let t=0;t10;)s.pop(),i=!0;for(i&&(s.pop(),s.push("And More. See Plane Builder for full list."));s.length<10;)s.push("");const a=this.acft.GetAccessories().GetEffectiveCoverage();var n="";for(let t=0;t0&&(n+=""!=n?", ":h("Armour")+" ",n+=e.toString()+"/+"+(11-a[t]).toString())}const r=[],o=this.acft.GetMunitions().GetBombCount(),l=this.acft.GetMunitions().GetRocketCount();var c=this.acft.GetMunitions().GetInternalBombCount();if((o>0||l>0)&&r.push("Current load here."),o>0){const t=Math.min(o,c),e=Math.max(0,o-t);if(t>0&&r.push(h(" Bomb Mass Internally.",t)),e>0&&r.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.acft.GetMunitions().GetMaxBombSize());r.push(h("Largest Internal Bomb",e.toString()))}c-=t}if(l>0){const t=Math.min(l,c),e=Math.max(0,l-t);t>0&&r.push(h(" Rocket Mass Internally.",t)),e>0&&r.push(h(" Rocket Mass Externally.",e))}for(;r.length<5;)r.push("");var u="";for(let e of t.warnings)u+=e.source+": "+e.warning+"\n";const m={altitude:0,airspeed:0,fuel:e.FuelUses,dropoff:e.Dropoff,visibility:this.acft.GetCockpits().GetCockpit(0).GetVisibility(),energy_loss:e.EnergyLoss,turn_bleed:e.TurnBleed,stability:e.Stabiilty,stress:this.acft.GetCockpits().GetCockpit(0).GetFlightStress()[0],plane_escape:this.acft.GetCockpits().GetCockpit(0).GetEscape(),crash:this.acft.GetCockpits().GetCockpit(0).GetCrash(),max_toughness:e.Toughness,current_toughness:e.Toughness,max_strain:e.MaxStrain,current_strain:e.MaxStrain,g_force:0,kills:0,full_load_boost:e.BoostFullwBombs,full_load_handling:e.HandlingFullwBombs,full_load_climb:e.RateOfClimbwBombs,full_load_stall:e.StallSpeedFullwBombs,full_load_speed:e.MaxSpeedwBombs,half_fuel_bombs_boost:Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),half_fuel_bombs_handling:Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),half_fuel_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),half_fuel_bombs_stall:Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),half_fuel_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),full_fuel_no_bombs_boost:e.BoostFull,full_fuel_no_bombs_handling:e.HandlingFull,full_fuel_no_bombs_climb:e.RateOfClimbFull,full_fuel_no_bombs_stall:e.StallSpeedFull,full_fuel_no_bombs_speed:Math.floor(1e-6+e.MaxSpeedFull),half_fuel_no_bombs_boost:Math.floor((e.BoostFull+e.BoostEmpty)/2),half_fuel_no_bombs_handling:Math.floor((e.HandlingFull+e.HandlingEmpty)/2),half_fuel_no_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),half_fuel_no_bombs_stall:Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),half_fuel_no_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),empty_boost:0,empty_handling:e.HandlingEmpty,empty_climb:0,empty_stall:e.StallSpeedEmpty,empty_speed:0,vital_part_1:s[0],vital_part_2:s[1],vital_part_3:s[2],vital_part_4:s[3],vital_part_5:s[4],vital_part_6:s[5],vital_part_7:s[6],vital_part_8:s[7],vital_part_9:s[8],vital_part_10:s[9],armor:n,max_bomb_load:r[0],ordinance_1:r[1],ordinance_2:r[2],ordinance_3:r[3],ordinance_4:r[4],notes:u,full_load_selected:!0,half_fuel_bombs_selected:!1,full_fuel_no_bombs_selected:!1,half_fuel_no_bombs_selected:!1,empty_selected:!1,engines:this.InteractiveEngines(),weapons:this.InteractiveWeapons()};return JSON.stringify(m)}InteractiveEngines(){const t=[];for(let e=0;e0&&t.starter&&r.push(h("Starter"))}else{s.IsRotary()&&s.IsTractor()?r.push(h("Turns Right")):s.IsRotary()&&s.IsPusher()&&r.push(h("Turns Left"));const t=T().get(s.GetSelectedList()).get_name(a.name);t.upgrades[1]?r.push(h("War Emergency Power")):t.compressor_count>0&&1==t.compressor_type&&r.push(h("War Emergency Power from altitudes 0-9"))}if(i.notes=n.Join(", ",r),s.GetUsePushPull()){const e=i.reliability.split("/");i.reliability=e[0].toString(),t.push(JSON.stringify(i)),i.reliability=e[0].toString(),t.push(JSON.stringify(i))}else t.push(JSON.stringify(i))}return t}InteractiveWeapons(){const t=[];for(let s of this.acft.GetWeapons().GetWeaponSets()){const i=this.acft.GetWeapons().GetWeaponList(),a=s.GetHits(),r=[];"PR"==i[s.GetWeaponSelected()].abrv?(r.push(5),r.push(5),r.push(5),r.push(5)):(r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[0])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[1])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[2])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[3])));const o=s.GetFinalWeapon(),l=[];let c={type:Wt(s,i),ammo:s.GetShots(),ap:o.ap,jam:s.GetJam(),knife_hits:a[0],close_hits:a[1],long_hits:a[2],extreme_hits:a[3],knife_damage:r[0],close_damage:r[1],long_damage:r[2],extreme_damage:r[3],tags:""};const u=this.acft.GetWeapons().GetDirectionList();s.IsPlural()&&(c.type=s.GetWeaponCount().toString()+"x "+c.type);const m=s.GetDirection();var e="";e+="[";for(let t=0;t=1&&(s-=1),this.acft_type.selectedIndex=s,this.era.UpdateDisplay(),this.cockpits.UpdateDisplay(),this.passengers.UpdateDisplay(),this.engines.UpdateDisplay(),this.propeller.UpdateDisplay(),this.frames.UpdateDisplay(),this.wings.UpdateDisplay(),this.stabilizers.UpdateDisplay(),this.controlsurfaces.UpdateDisplay(),this.reinforcements.UpdateDisplay(),this.reinforcements.UpdateMaxStrain(e.MaxStrain),this.load.UpdateDisplay(),this.load.UpdateFuelUses(t.fuel/t.fuelconsumption),this.gear.UpdateDisplay(),this.accessories.UpdateDisplay(),this.optimization.UpdateDisplay(),this.weapons.UpdateDisplay(),this.used.UpdateDisplay(),this.rotor.UpdateDisplay(),this.alter.UpdateDisplay(),this.UpdateStats(t),this.UpdateDerived(t,e)}}function fe(){Ae(),Be().hash&&(De.forEach(be),xe?.observe(document,ve),Ce(),Ie=setTimeout(Ae,Ne))}function Ae(){clearTimeout(Ie),cancelAnimationFrame(Te),xe?.disconnect(),De.forEach(Se)}function be(t){document.addEventListener(t,Ae)}function Se(t){document.removeEventListener(t,Ae)}function ye(t){if(t.defaultPrevented)return;const e=function(t){let e=t;for(;e&&"A"!==e.nodeName;)e=e.parentElement;return e}(t.target);e&&e.hash&&e.pathname===Be().pathname&&Pe(fe)}function we(){Pe(Ce)}function Ce(){const t=Be().hash;if(!t)return;const e=decodeURIComponent(t.substring(1)),s=Ge.call(null,e);s&&Fe.call(null,s)}function Be(){return location}function Ee(t){return document.getElementById(t)}function Me(t){t.scrollIntoView()}function Pe(t){cancelAnimationFrame(Te),Te=requestAnimationFrame(t)}let Ge,Fe,Re,xe,Ie,Te;const ve={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ne=1e4,De=["selectstart","touchend","wheel"],Oe=JSON.parse('{"version":"12.7","era":{"options":[{"name":"Pioneer","liftbleed":30,"maxbomb":0.166666666666,"cost":-2,"cant_lift":4,"pitchstab":0},{"name":"WWI","liftbleed":25,"maxbomb":0.2,"cant_lift":3,"pitchstab":0,"cost":0},{"name":"Roaring 20s","liftbleed":22,"maxbomb":0.25,"cost":5,"cant_lift":1,"pitchstab":0},{"name":"Coming Storm","liftbleed":22,"maxbomb":0.333333333333,"cost":10,"cant_lift":0,"pitchstab":2},{"name":"WWII","liftbleed":20,"maxbomb":0.333333333333,"cost":15,"cant_lift":0,"pitchstab":2},{"name":"Last Hurrah","liftbleed":18,"maxbomb":0.5,"cost":20,"cant_lift":0,"pitchstab":2}]},"cockpit":{"options":[{"name":"Open","era":"Pioneer","mass":1,"drag":3,"control":0,"escape":2,"cost":0,"flightstress":0,"visibility":1,"exposed":true,"warning":""},{"name":"Windscreen","era":"Pioneer","mass":2,"drag":1,"control":0,"escape":2,"cost":1,"flightstress":0,"visibility":1,"exposed":true,"warning":""},{"name":"Sealed","era":"Pioneer","mass":2,"drag":0,"control":0,"escape":-3,"cost":1,"flightstress":-1,"visibility":-99,"warning":"Sealed Warning","exposed":false},{"name":"Narrow Canopy","era":"WWI","mass":3,"drag":0,"control":0,"escape":0,"cost":3,"flightstress":-1,"visibility":-1,"exposed":false,"warning":""},{"name":"Bubble Canopy","era":"WWII","mass":3,"drag":-3,"control":0,"escape":0,"cost":8,"flightstress":-1,"visibility":0,"exposed":false,"warning":""}],"upgrades":[{"name":"Co-Pilot Controls","era":"Pioneer","mass":0,"drag":0,"control":0,"escape":0,"cost":1,"flightstress":-2,"visibility":0,"warning":"","charge":0},{"name":"Escape Hatch","era":"Pioneer","mass":1,"drag":0,"control":0,"escape":3,"cost":2,"flightstress":0,"visibility":0,"warning":"","charge":0},{"name":"Ejection Seat","era":"Last Hurrah","mass":2,"drag":0,"control":0,"escape":5,"cost":4,"flightstress":0,"visibility":0,"warning":"","charge":0},{"name":"Connectivity","era":"Pioneer","mass":1,"drag":0,"control":0,"escape":0,"cost":0,"flightstress":0,"visibility":0,"warning":"Connectivity Warning","charge":0},{"name":"Oxygen Mask","era":"WWI","warning":"Oxygen Mask Warning","mass":0,"drag":0,"control":0,"escape":0,"charge":-1,"cost":2,"flightstress":0,"visibility":0},{"name":"Isolated","era":"Pioneer","mass":1,"drag":5,"control":0,"escape":-2,"cost":1,"flightstress":1,"visibility":2,"warning":"Isolated Warning","charge":0}],"safety":[{"name":"Padding","era":"Pioneer","cost":1,"warning":"Injury Reduction Warning","charge":0,"escape":0,"visibility":0,"mass":0},{"name":"Harness","era":"Pioneer","escape":-1,"cost":1,"warning":"Injury Reduction Warning","charge":0,"visibility":0,"mass":0},{"name":"Fast Release System","era":"Coming Storm","escape":2,"cost":1,"warning":"","charge":0,"visibility":0,"mass":0},{"name":"Roll Bar","era":"WWI","mass":2,"warning":"Injury Reduction Warning","charge":0,"escape":0,"visibility":0,"cost":0},{"name":"Flare Slot","era":"Roaring 20s","cost":1,"warning":"Flare Slot Warning","charge":0,"escape":0,"visibility":0,"mass":0},{"name":"Basic Fan","era":"Pioneer","charge":1e-9,"visibility":-1,"warning":"Basic Fan Warning","escape":0,"mass":0,"cost":0}],"gunsights":[{"name":"X1 Collimated Gunsight","era":"WWI","visibility":-1,"attack":1,"cost":2,"warning":"X1 Collimated Gunsight Warning","charge":0},{"name":"Telescopic Gunsight","era":"WWI","visibility":-1,"attack":0,"cost":3,"warning":"Telescopic Gunsight Warning","charge":0},{"name":"Illuminated Reflex Sight","era":"WWI","visibility":-1,"attack":2,"charge":1e-9,"cost":6,"warning":"Illuminated Reflex Sight Warning"},{"name":"Gyro Gunsight","era":"WWII","visibility":-1,"attack":2,"charge":1e-9,"cost":12,"warning":"Gyro Gunsight Warning"}]},"passengers":{},"engines":{"mounts":[{"name":"Tractor","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":0,"visibility":0,"liftbleed":0,"strainfactor":0,"dragfactor":0,"location":"fuselage","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Center-Mounted Tractor","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":-2,"visibility":1,"liftbleed":0,"strainfactor":0,"dragfactor":0,"location":"fuselage","reqED":true,"powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqTail":false,"escape":0},{"name":"Rear-Mounted Pusher","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":-4,"visibility":2,"liftbleed":0,"strainfactor":0,"dragfactor":0,"escape":-2,"location":"fuselage","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqTail":false,"reqED":false},{"name":"Center-Mounted Pusher","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":-2,"visibility":2,"liftbleed":0,"strainfactor":0,"dragfactor":0,"escape":-2,"location":"fuselage","reqTail":true,"powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqED":false},{"name":"Pod","era":"Pioneer","drag":5,"reqsections":1,"pitchstab":0,"visibility":-2,"liftbleed":0,"strainfactor":0,"dragfactor":0,"location":"pod","powerfactor":0.9,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Nacelle (Inside)","era":"Pioneer","drag":0,"reqsections":0,"pitchstab":0,"visibility":0,"liftbleed":1,"strainfactor":0.5,"dragfactor":0,"location":"wing","powerfactor":0.8,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Nacelle (Offset)","era":"Pioneer","drag":0,"reqsections":0,"pitchstab":0,"visibility":0,"liftbleed":0,"strainfactor":0,"dragfactor":1,"location":"wing","powerfactor":0.8,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Channel Tractor","era":"Pioneer","drag":0,"reqsections":0,"pitchstab":0,"visibility":0,"liftbleed":-1,"strainfactor":1,"dragfactor":0,"location":"wing","powerfactor":0.9,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Fuselage Push-Pull","era":"Pioneer","reqsections":2,"pitchstab":-2,"escape":-2,"strainfactor":0,"dragfactor":0,"location":"fuselage","powerfactor":0.9,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"liftbleed":0,"visibility":0,"drag":0,"reqED":false},{"name":"Front Intake","era":"Pioneer","strainfactor":0,"dragfactor":0,"location":"fuselage","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":true,"reqTail":false,"liftbleed":0,"escape":0,"visibility":0,"reqsections":0,"drag":0,"pitchstab":0,"reqED":false},{"name":"Wing Pod","era":"Pioneer","liftbleed":1,"strainfactor":0.5,"dragfactor":0,"location":"wing","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":true,"reqTail":false,"escape":0,"visibility":0,"reqsections":0,"drag":0,"pitchstab":0,"reqED":false},{"name":"Underwing Pod","era":"Pioneer","drag":3,"visibility":-1,"strainfactor":0,"dragfactor":0,"location":"wing","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":true,"reqTail":false,"liftbleed":0,"escape":0,"reqsections":0,"pitchstab":0,"reqED":false}],"radiator-type":[{"name":"Panel","era":"Pioneer","drag":0,"mass":0,"cost":0,"cooling":0,"dragpercool":0.5,"warning":""},{"name":"Box","era":"Pioneer","drag":2,"mass":-1,"cost":0,"cooling":0,"dragpercool":0.5,"warning":""},{"name":"Intake","era":"Roaring 20s","drag":0,"mass":0,"cost":3,"cooling":2,"dragpercool":0.5,"warning":""},{"name":"Evaporation","era":"Coming Storm","warning":"Evaporation Warning","drag":0,"mass":0,"cost":0,"cooling":0,"dragpercool":0}],"radiator-mount":[{"name":"Low","era":"Pioneer","warning":"Low Warning","reliability":1,"drag":0,"latstab":0},{"name":"Inline","era":"Pioneer","reliability":0,"drag":0,"latstab":0,"warning":""},{"name":"High","era":"Pioneer","warning":"High Warning","reliability":0,"drag":1,"latstab":0},{"name":"High Offset","era":"WWI","warning":"High Offset Warning","reliability":0,"drag":1,"latstab":-1}],"radiator-coolant":[{"name":"Water","era":"Pioneer","cost":0,"harden":false,"reliability":0,"flammable":false,"warning":""},{"name":"Salt Water","era":"Pioneer","cost":1,"harden":true,"reliability":1,"flammable":false,"warning":""},{"name":"Mineral Oil","era":"Pioneer","warning":"Mineral Oil Warning","cost":1,"harden":true,"reliability":0,"flammable":true},{"name":"Castor Oil","era":"Pioneer","warning":"Castor Oil Warning","cost":0,"harden":false,"reliability":0,"flammable":true},{"name":"Glycol","era":"Roaring 20s","reliability":2,"harden":false,"cost":2,"flammable":false,"warning":""},{"name":"Freon","era":"Coming Storm","warning":"Freon Warning","reliability":4,"harden":false,"cost":3,"flammable":false},{"name":"Ammonia","era":"Pioneer","warning":"Ammonia Warning","reliability":4,"harden":false,"cost":2,"flammable":false}],"cowling":[{"name":"No Cowling","era":"Pioneer","ed":1,"mpd":0,"air":true,"liquid":true,"rotary":true,"reliability":0,"mass":0,"cost":0},{"name":"Basic Cowl","era":"Pioneer","mass":1,"cost":1,"ed":0.8,"mpd":0,"air":true,"liquid":false,"rotary":false,"reliability":0},{"name":"Rotary Basic Cowl","era":"Pioneer","mass":1,"cost":1,"ed":0.4,"mpd":0,"air":false,"liquid":false,"rotary":true,"reliability":0},{"name":"Closed Cowl","era":"WWI","mass":1,"cost":1,"reliability":-1,"ed":0.3,"mpd":0,"air":false,"liquid":false,"rotary":true},{"name":"Adjustable Slat Cowl","era":"Coming Storm","mass":2,"reliability":2,"cost":2,"ed":0.5,"mpd":0,"air":true,"liquid":false,"rotary":true},{"name":"Foil Cowl","era":"Roaring 20s","mass":2,"reliability":3,"cost":3,"ed":0.4,"mpd":0,"air":true,"liquid":false,"rotary":true},{"name":"Sealed Cowl","era":"Pioneer","cost":1,"ed":0.5,"mpd":0.333333333333,"air":false,"liquid":true,"rotary":false,"reliability":0,"mass":0}]},"propellers":{"props":[{"name":"High Power","era":"Pioneer","pitchspeed":0.8,"pitchboost":0.9,"cost":0,"energy":1.5,"turn":8},{"name":"Power","era":"Pioneer","pitchspeed":0.9,"pitchboost":0.8,"cost":0,"energy":2,"turn":7},{"name":"Default","era":"Pioneer","pitchspeed":1,"pitchboost":0.6,"cost":0,"energy":3,"turn":6},{"name":"Speed","era":"Pioneer","pitchspeed":1.1,"pitchboost":0.4,"cost":0,"energy":4,"turn":5},{"name":"High Speed","era":"Pioneer","pitchspeed":1.2,"pitchboost":0.3,"cost":0,"energy":4.5,"turn":4}],"upgrades":[{"name":"None","era":"Pioneer","energy":0,"turn":0,"warning":"","pitchboost":0,"mass":0,"pitchspeed":0,"cost":0},{"name":"Manually Adjustable Pitch","era":"Pioneer","energy":0,"turn":0,"cost":2,"warning":"MVP_Warning","pitchboost":0,"mass":0,"pitchspeed":0},{"name":"Automatic Pitch","era":"Roaring 20s","pitchspeed":0.1,"pitchboost":0.1,"energy":0.5,"turn":1,"mass":1,"cost":8,"warning":""}]},"frames":{"frames":[{"name":"Wooden Spars","era":"Pioneer","basestructure":15,"basecost":0,"mass":1,"structure":2,"cost":0,"geodesic":false,"warning":""},{"name":"Steel Spars","era":"Pioneer","basestructure":25,"basecost":1,"mass":1,"structure":5,"cost":1,"geodesic":false,"warning":""},{"name":"Aluminum Spars","era":"WWI","basestructure":20,"basecost":2,"mass":0.5,"structure":4,"cost":2,"geodesic":false,"warning":""},{"name":"Wooden Ribs","era":"WWI","basestructure":30,"basecost":1,"mass":2,"structure":5,"cost":0.5,"geodesic":true,"warning":""},{"name":"Steel Ribs","era":"Roaring 20s","basestructure":60,"basecost":2,"mass":3,"structure":12,"cost":2,"geodesic":true,"warning":""},{"name":"Aluminum Ribs","era":"Roaring 20s","basestructure":50,"basecost":3,"mass":2,"structure":8,"cost":3,"geodesic":true,"warning":""},{"name":"Titanium","era":"Last Hurrah","basestructure":0,"basecost":0,"mass":1,"structure":10,"cost":8,"geodesic":false,"warning":""},{"name":"Living Grove","era":"Pioneer","basestructure":30,"basecost":8,"mass":2,"structure":4,"cost":0,"geodesic":true,"warning":"Living Grove Warning"}],"skin":[{"name":"Naked","era":"Pioneer","dragfactor":1,"massfactor":0.6,"visibility":1,"flammable":false,"monocoque":false,"monocoque_structure":0,"toughness":0,"cost":0},{"name":"Cloth Canvas","era":"Pioneer","dragfactor":0.5,"massfactor":1,"flammable":false,"monocoque":false,"monocoque_structure":0,"toughness":0,"visibility":0,"cost":0},{"name":"Transparent Celluloid","era":"Pioneer","dragfactor":0.6,"massfactor":1,"visibility":1,"cost":1,"flammable":true,"monocoque":false,"monocoque_structure":0,"toughness":0},{"name":"Treated Paper","era":"Pioneer","dragfactor":0.5,"massfactor":0.75,"flammable":true,"monocoque":false,"monocoque_structure":0,"toughness":0,"visibility":0,"cost":0},{"name":"Tense Silk","era":"Pioneer","dragfactor":0.5,"massfactor":1,"toughness":1,"cost":1,"flammable":false,"monocoque":false,"monocoque_structure":0,"visibility":0},{"name":"Dragon Skin","era":"Himmilgard","dragfactor":0.5,"massfactor":1,"cost":4,"flammable":false,"monocoque":false,"monocoque_structure":0,"toughness":0,"visibility":0},{"name":"Molded Plywood","era":"Pioneer","dragfactor":0.4,"massfactor":1,"cost":0.5,"flammable":false,"monocoque":true,"monocoque_structure":3,"toughness":0,"visibility":0},{"name":"Clinker Build","era":"Pioneer","dragfactor":0.5,"massfactor":1,"cost":0,"flammable":false,"monocoque":true,"monocoque_structure":-3,"toughness":0,"visibility":0},{"name":"Glass Reinforced Plastic","era":"Last Hurrah","dragfactor":0.3,"massfactor":1,"cost":1,"flammable":false,"monocoque":true,"monocoque_structure":0,"toughness":0,"visibility":0},{"name":"Corrugated Duralumin","era":"WWI","dragfactor":0.5,"massfactor":1,"toughness":3,"cost":1,"flammable":false,"monocoque":true,"monocoque_structure":10,"visibility":0},{"name":"Steel Sheet","era":"Roaring 20s","dragfactor":0.35,"massfactor":1,"cost":1.5,"toughness":3,"flammable":false,"monocoque":true,"monocoque_structure":8,"visibility":0},{"name":"Aluminum Sheet","era":"Roaring 20s","dragfactor":0.35,"massfactor":0.75,"cost":2,"toughness":2,"flammable":false,"monocoque":true,"monocoque_structure":6,"visibility":0}],"tail":[{"name":"Tailless","era":"Pioneer","reqsections":0,"pitchstab":-4,"visibility":3},{"name":"Stubby","era":"Pioneer","reqsections":1,"pitchstab":-3,"visibility":0},{"name":"Standard","era":"Pioneer","reqsections":2,"pitchstab":0,"visibility":0},{"name":"Long","era":"Pioneer","reqsections":3,"pitchstab":3,"visibility":0}]},"wings":{"decks":[{"name":"Wing Deck Parasol","era":"Pioneer","pitchstab":3,"maxstrain":-10,"liftbleed":-2,"visibility":-1,"limited":false,"crashsafety":0},{"name":"Wing Deck Shoulder","era":"Pioneer","pitchstab":2,"liftbleed":-1,"visibility":-1,"limited":true,"crashsafety":0,"maxstrain":0},{"name":"Wing Deck Mid","era":"Pioneer","limited":true,"liftbleed":0,"visibility":0,"pitchstab":0,"crashsafety":0,"maxstrain":0},{"name":"Wing Deck Low","era":"Pioneer","pitchstab":-2,"crashsafety":-1,"liftbleed":-1,"limited":true,"visibility":0,"maxstrain":0},{"name":"Wing Deck Gear","era":"Pioneer","pitchstab":-3,"maxstrain":-10,"crashsafety":-1,"liftbleed":-2,"limited":false,"visibility":0}],"largest":[{"name":"Wing Deck Parasol","era":"Pioneer","latstab":1,"control":-1,"dragfactor":1},{"name":"Wing Deck Shoulder","era":"Pioneer","control":-1,"dragfactor":1,"latstab":0},{"name":"Wing Deck Mid","era":"Pioneer","dragfactor":0.9,"latstab":0,"control":0},{"name":"Wing Deck Low","era":"Pioneer","latstab":-1,"control":2,"dragfactor":1},{"name":"Wing Deck Gear","era":"Pioneer","latstab":-1,"control":3,"dragfactor":1}],"surface":[{"name":"Cloth Canvas","era":"Pioneer","flammable":false,"strainfactor":1,"dragfactor":1,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0,"cost":0},{"name":"Treated Paper","era":"Pioneer","flammable":true,"strainfactor":1,"dragfactor":1,"mass":-0.25,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0,"cost":0},{"name":"Tense Silk Layers","era":"Pioneer","flammable":false,"strainfactor":0.9,"dragfactor":1,"cost":0.2,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0},{"name":"Plywood","era":"Pioneer","flammable":false,"strainfactor":0.9,"dragfactor":1,"mass":0.2,"cost":0.1,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0},{"name":"Aluminum Sheet","era":"Roaring 20s","flammable":false,"strainfactor":1,"dragfactor":0.8,"cost":0.3,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0},{"name":"Corrugated Duralumin","era":"Pioneer","flammable":false,"strainfactor":0.6,"dragfactor":1,"mass":0.25,"cost":0.2,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0},{"name":"Thin Sheet Steel","era":"Roaring 20s","flammable":false,"strainfactor":0.6,"dragfactor":0.9,"mass":0.2,"cost":0.3,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0},{"name":"Grand Eagle Feather","era":"Himmilgard","flammable":false,"strainfactor":1,"dragfactor":1,"control":0.2,"cost":0.6,"metal":false,"transparent":false,"charge":0,"toughness":0,"mass":0},{"name":"Solar Fiber","era":"Himmilgard","flammable":false,"strainfactor":1,"dragfactor":1,"charge":0.2,"cost":0.4,"metal":false,"transparent":false,"toughness":0,"control":0,"mass":0},{"name":"Dragon Skin","era":"Himmilgard","flammable":false,"strainfactor":0.4,"dragfactor":1,"cost":0.8,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0},{"name":"Transparent Celluloid","era":"Pioneer","flammable":true,"strainfactor":1,"dragfactor":1,"toughness":-0.1,"cost":0.1,"metal":false,"transparent":true,"charge":0,"control":0,"mass":0}],"stagger":[{"name":"Monoplane","era":"Pioneer","inline":false,"wing_count":1,"hstab":true,"pitchstab":0,"liftbleed":0},{"name":"Tandem","era":"Pioneer","inline":true,"wing_count":20,"hstab":false,"pitchstab":4,"liftbleed":0},{"name":"Extreme Positive","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":2,"liftbleed":-2},{"name":"Positive","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":1,"liftbleed":-1},{"name":"Unstaggered","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":0,"liftbleed":0},{"name":"Negative","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":-1,"liftbleed":-1},{"name":"Extreme Negative","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":-2,"liftbleed":-2}]},"stabilizers":{"hstab":[{"name":"Tailplane","era":"Pioneer","dragfactor":1,"is_canard":false,"increment":1,"is_vtail":false,"is_tail":true,"warning":"","liftbleed":0,"latstab":0,"pitchstab":0,"cost":0},{"name":"The Wings","era":"Pioneer","dragfactor":0,"is_canard":false,"increment":0,"is_vtail":false,"is_tail":false,"warning":"","liftbleed":0,"latstab":0,"pitchstab":0,"cost":0},{"name":"Canards","era":"Pioneer","pitchstab":-3,"dragfactor":0.5,"is_canard":true,"increment":1,"is_vtail":false,"is_tail":true,"warning":"","liftbleed":0,"latstab":0,"cost":0},{"name":"Outboard","era":"Pioneer","latstab":1,"dragfactor":1,"is_canard":false,"increment":2,"is_vtail":false,"is_tail":false,"warning":"","liftbleed":0,"pitchstab":0,"cost":0},{"name":"V-Tail","era":"Coming Storm","latstab":2,"pitchstab":2,"cost":5,"dragfactor":0.8,"is_canard":false,"increment":1,"is_vtail":true,"is_tail":true,"warning":"","liftbleed":0},{"name":"T-Tail","era":"WWII","liftbleed":-2,"dragfactor":0.5,"is_canard":false,"increment":1,"is_vtail":false,"is_tail":true,"warning":"T-Tail Warning","latstab":0,"pitchstab":0,"cost":0}],"vstab":[{"name":"Tailfin","era":"Pioneer","dragfactor":1,"increment":1,"is_vtail":false,"is_tail":true,"control":0},{"name":"Outboard","era":"Pioneer","dragfactor":1,"control":1,"increment":2,"is_vtail":false,"is_tail":false},{"name":"V-Tail","era":"Coming Storm","dragfactor":0,"increment":0,"is_vtail":true,"is_tail":true,"control":0}]},"controls":{"ailerons":[{"name":"Flap Ailerons","era":"Pioneer","warping":false,"warning":"","cost":0,"control":0,"drag":0,"crashsafety":0},{"name":"Wing Warping","era":"Pioneer","drag":-1,"warping":true,"warning":"Wing Warping Warning 2","cost":0,"control":0,"crashsafety":0},{"name":"Spoilerons","era":"WWII","cost":2,"warping":false,"warning":"Spoilerons Warning","control":0,"drag":0,"crashsafety":0},{"name":"None","era":"Pioneer","warping":false,"control":-15,"crashsafety":-1,"cost":-2,"warning":"","drag":0}],"rudders":[{"name":"Flap Rudder","era":"Pioneer","latstab":0,"control":0},{"name":"Flying Rudder","era":"Pioneer","latstab":-1,"control":3}],"elevators":[{"name":"Flap Elevator","era":"Pioneer","pitchstab":0,"control":0},{"name":"Flying Elevator","era":"Pioneer","pitchstab":-1,"control":2}],"flaps":[{"name":"None","era":"Pioneer","costfactor":0,"control":0,"warning":"","liftbleed":0,"crashsafety":0},{"name":"Basic Flaps","era":"WWI","liftbleed":-3,"control":-3,"costfactor":0.333333333333,"warning":"","crashsafety":0},{"name":"Advanced Flaps","era":"Coming Storm","liftbleed":-5,"costfactor":0.666666666666,"control":0,"warning":"","crashsafety":0},{"name":"Control Flaps","era":"WWII","liftbleed":-5,"control":3,"costfactor":1,"warning":"","crashsafety":0},{"name":"Lift Dumpers","era":"Last Hurrah","crashsafety":2,"costfactor":1,"warning":"Lift Dumpers Warning","control":0,"liftbleed":0}],"slats":[{"name":"None","era":"Pioneer","control":0,"drag":0,"liftbleed":0,"cost":0},{"name":"Fixed Slots","era":"Roaring 20s","drag":5,"liftbleed":-3,"cost":1,"control":0},{"name":"Automatic Slats","era":"WWII","liftbleed":-1,"control":3,"cost":4,"drag":0}],"drag_inducers":[{"name":"Air Brake","era":"WWII","mass":1,"cost":3,"warning":"Air Brake Warning"},{"name":"Dive Brake","era":"Pioneer","mass":2,"cost":4,"warning":"Dive Brake Warning"},{"name":"Drogue Chute","era":"Last Hurrah","cost":3,"warning":"Drogue Chute Warning","mass":0}]},"reinforcement":{"external_wood":[{"name":"Parallel Struts","era":"Pioneer","drag":2,"mass":1,"structure":5,"maxstrain":5,"tension":30,"cost":1,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"N-Strut","era":"Pioneer","drag":2,"mass":1,"structure":6,"maxstrain":8,"tension":20,"cost":1,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"V-Strut","era":"Pioneer","drag":1,"mass":1,"structure":-5,"maxstrain":5,"tension":30,"cost":1,"config":true,"first":true,"small_sqp":true,"ornith":false},{"name":"I-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":20,"tension":15,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false,"structure":0},{"name":"W-Strut","era":"WWI","drag":3,"mass":1,"maxstrain":35,"tension":0,"cost":2,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Single Strut","era":"Pioneer","drag":1,"mass":1,"maxstrain":10,"tension":0,"cost":1,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Star Strut","era":"WWI","drag":8,"mass":2,"structure":10,"maxstrain":30,"tension":0,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Wing Truss","era":"Pioneer","drag":4,"tension":40,"cost":1,"config":false,"first":true,"small_sqp":true,"ornith":true,"structure":0,"mass":0,"maxstrain":0},{"name":"Wire Root","era":"Pioneer","tension":10,"config":true,"first":false,"small_sqp":true,"ornith":true,"structure":0,"mass":0,"drag":0,"cost":0,"maxstrain":0}],"external_steel":[{"name":"Steel Parallel Struts","era":"Pioneer","drag":2,"mass":1,"structure":10,"maxstrain":10,"tension":15,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Steel N-Strut","era":"Pioneer","drag":2,"mass":1,"structure":12,"maxstrain":13,"tension":10,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Steel V-Strut","era":"Pioneer","drag":1,"mass":1,"structure":0,"maxstrain":10,"tension":15,"cost":2,"config":true,"first":true,"small_sqp":true,"ornith":false},{"name":"Steel I-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":25,"tension":7,"cost":4,"config":true,"first":true,"small_sqp":false,"ornith":false,"structure":0},{"name":"Steel W-Strut","era":"WWI","drag":3,"mass":1,"maxstrain":40,"tension":0,"cost":4,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Steel Single Strut","era":"Pioneer","drag":1,"mass":1,"maxstrain":15,"tension":0,"cost":2,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Steel Star Strut","era":"WWI","drag":6,"mass":2,"structure":20,"maxstrain":35,"tension":0,"cost":4,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Steel Wing Truss","era":"Pioneer","drag":4,"maxstrain":5,"tension":20,"cost":2,"config":false,"first":true,"small_sqp":true,"ornith":true,"structure":0,"mass":0},{"name":"Steel Wire Root","era":"Pioneer","tension":10,"config":true,"first":false,"small_sqp":true,"ornith":true,"structure":0,"mass":0,"drag":0,"cost":0,"maxstrain":0}],"cabane":[{"name":"None","era":"Pioneer","tension":0,"structure":0,"config":false,"drag":0,"mass":0,"cost":0,"maxstrain":0},{"name":"Parallel Struts","era":"Pioneer","drag":0,"mass":1,"structure":5,"maxstrain":5,"tension":15,"cost":1,"config":true},{"name":"Steel Parallel Struts","era":"Pioneer","drag":0,"mass":1,"structure":10,"maxstrain":10,"tension":7,"cost":2,"config":true},{"name":"N-Strut","era":"Pioneer","drag":0,"mass":1,"structure":6,"maxstrain":8,"tension":10,"cost":1,"config":true},{"name":"Steel N-Strut","era":"Pioneer","drag":0,"mass":1,"structure":12,"maxstrain":13,"tension":5,"cost":2,"config":true},{"name":"V-Strut","era":"Pioneer","drag":0,"mass":1,"structure":-5,"maxstrain":5,"tension":15,"cost":1,"config":true},{"name":"Steel V-Strut","era":"Pioneer","drag":0,"mass":1,"structure":0,"maxstrain":10,"tension":7,"cost":2,"config":true},{"name":"I-Strut","era":"WWI","drag":0,"mass":1,"maxstrain":20,"tension":7,"cost":2,"config":true,"structure":0},{"name":"Steel I-Strut","era":"WWI","drag":0,"mass":1,"maxstrain":25,"tension":3,"cost":4,"config":true,"structure":0},{"name":"W-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":35,"tension":0,"cost":2,"config":true,"structure":0},{"name":"Steel W-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":40,"tension":0,"cost":4,"config":true,"structure":0},{"name":"Single Strut","era":"Pioneer","drag":0,"mass":1,"maxstrain":10,"tension":0,"cost":1,"config":true,"structure":0},{"name":"Steel Single Strut","era":"Pioneer","drag":0,"mass":1,"maxstrain":15,"tension":0,"cost":2,"config":true,"structure":0},{"name":"Star Strut","era":"WWI","drag":6,"mass":2,"structure":10,"maxstrain":30,"tension":0,"cost":2,"config":true},{"name":"Steel Star Strut","era":"WWI","drag":4,"mass":2,"structure":20,"maxstrain":35,"tension":0,"cost":4,"config":true}],"cantilever":[{"name":"Birch","era":"WWI","mass":1,"maxstrain":10,"toughness":2,"cost":1,"limited":true,"liftbleed":0},{"name":"Duralumin","era":"WWI","mass":1,"maxstrain":15,"toughness":3,"cost":2,"limited":true,"liftbleed":0},{"name":"Steel","era":"WWI","mass":1,"maxstrain":20,"toughness":5,"cost":3,"limited":true,"liftbleed":0},{"name":"Aluminium","era":"Roaring 20s","mass":1,"maxstrain":25,"toughness":3,"cost":4,"limited":true,"liftbleed":0},{"name":"Whalebone","era":"Himmilgard","mass":1,"liftbleed":-3,"maxstrain":5,"cost":8,"limited":true,"toughness":0}]},"fuel":{"tanks":[{"name":"Internal Fuselage Tank","era":"Pioneer","mass":1,"wetmass":5,"fuel":125,"reqsections":0.5,"internal":true,"cantilever":false,"control":0,"drag":0},{"name":"External Wing Tank","era":"Pioneer","mass":1,"wetmass":5,"fuel":125,"drag":3,"control":-1,"internal":false,"cantilever":false,"reqsections":0},{"name":"Internal Wing Tank","era":"Pioneer","mass":1,"wetmass":5,"fuel":125,"control":-1,"internal":true,"cantilever":true,"reqsections":0,"drag":0},{"name":"Microtank","era":"Pioneer","mass":1,"wetmass":0,"fuel":25,"internal":true,"cantilever":false,"reqsections":0,"control":0,"drag":0}]},"cargo":{"spaces":[{"name":"None","era":"Pioneer","reqsections":0,"mass":0,"warning":""},{"name":"Tiny","era":"Pioneer","mass":1,"warning":"Cargo Tiny","reqsections":0},{"name":"Small","era":"Pioneer","reqsections":1,"warning":"Cargo Small","mass":0},{"name":"Medium","era":"Pioneer","reqsections":3,"warning":"Cargo Medium","mass":0},{"name":"Large","era":"Pioneer","reqsections":5,"warning":"Cargo Large","mass":0},{"name":"Huge","era":"Pioneer","reqsections":10,"warning":"Cargo Huge","mass":0}]},"landing_gear":{"gear":[{"name":"Landing Gear","era":"Pioneer","DpLMP":1,"SpLMP":0,"can_retract":true,"mass":0,"warning":""},{"name":"Floats","era":"Pioneer","DpLMP":1.5,"SpLMP":0,"can_retract":true,"mass":0,"warning":""},{"name":"Hybrid Floats","era":"Pioneer","DpLMP":2,"SpLMP":0,"can_retract":true,"mass":0,"warning":""},{"name":"Boat Hull","era":"Pioneer","mass":5,"DpLMP":1,"SpLMP":1,"can_retract":false,"warning":""},{"name":"Landing Skid","era":"Pioneer","DpLMP":0,"SpLMP":0,"can_retract":false,"warning":"Landing Skid Warning","mass":0}],"extras":[{"name":"Zeppelin Hook","era":"Pioneer","mass":1,"MpLMP":0,"warning":"Zeppelin Hook Warning","drag":0,"crashsafety":0},{"name":"Carrier Hook","era":"Pioneer","MpLMP":0.5,"warning":"Carrier Hook Warning","mass":0,"drag":0,"crashsafety":0},{"name":"Underwing Skid","era":"Pioneer","MpLMP":0,"drag":3,"crashsafety":2,"mass":0,"warning":""}]},"accessories":{"electrical":[{"name":"Windmill","era":"Pioneer","drag":1,"cost":1,"cp10s":1,"storage":0,"mass":0},{"name":"Battery","era":"Pioneer","mass":1,"cost":2,"cp10s":0,"storage":5,"drag":0},{"name":"Battery (High Quality)","era":"Roaring 20s","mass":0,"cost":4,"cp10s":0,"storage":5,"drag":0}],"radios":[{"name":"Loud Yelling","era":"Pioneer","mass":0,"drag":0,"charge":0,"cost":0},{"name":"Intercom System","era":"Pioneer","charge":1e-9,"cost":1,"mass":0,"drag":0},{"name":"Radio Receiver","era":"Pioneer","mass":2,"drag":2,"charge":1e-9,"cost":3},{"name":"Radio Transmitter","era":"WWI","mass":3,"drag":3,"charge":-1,"cost":3},{"name":"Radio Transceiver","era":"WWI","mass":5,"drag":3,"charge":-1,"cost":3},{"name":"Whalebone Radio Receiver","era":"Himmilgard","charge":1e-9,"cost":5,"mass":0,"drag":0},{"name":"Whalebone Radio Base Station","era":"Himmilgard","mass":6,"drag":1,"charge":-1,"cost":12},{"name":"Radio Receiver (High Quality)","era":"Roaring 20s","mass":1,"drag":2,"charge":1e-9,"cost":6},{"name":"Radio Transmitter (High Quality)","era":"Roaring 20s","mass":2,"drag":3,"charge":-1,"cost":6},{"name":"Radio Transceiver (High Quality)","era":"Roaring 20s","mass":4,"drag":3,"charge":-1,"cost":6},{"name":"Whalebone Radio Base Station (High Quality)","era":"Himmilgard","mass":5,"drag":1,"charge":-1,"cost":24}],"recon":[{"name":"Guncam","era":"Pioneer","cost":1,"warning":"Guncam Warning","reqsections":0,"mass":0,"drag":0},{"name":"Small Reconnaissance Camera","era":"Pioneer","mass":1,"drag":1,"cost":2,"warning":"Small Reconnaissance Camera Warning","reqsections":0},{"name":"Medium Reconnaissance Camera","era":"Pioneer","mass":2,"drag":2,"cost":2,"warning":"Medium Reconnaissance Camera Warning","reqsections":0},{"name":"Large Reconnaissance Camera","era":"Pioneer","mass":3,"drag":3,"cost":2,"warning":"Large Reconnaissance Camera Warning","reqsections":0},{"name":"Internal Small Reconnaissance Camera","era":"Pioneer","mass":1,"cost":4,"warning":"Small Reconnaissance Camera Warning","reqsections":0,"drag":0},{"name":"Internal Medium Reconnaissance Camera","era":"Pioneer","mass":2,"cost":2,"reqsections":1,"warning":"Medium Reconnaissance Camera Warning","drag":0},{"name":"Internal Large Reconnaissance Camera","era":"Pioneer","mass":3,"cost":2,"reqsections":1,"warning":"Large Reconnaissance Camera Warning","drag":0}],"visibility":[{"name":"Wing Cutouts","era":"Pioneer","visibility":1,"liftbleed":1,"charge":0,"structure":0,"cost":0},{"name":"Hull Cutouts","era":"Pioneer","visibility":1,"structure":-5,"charge":0,"liftbleed":0,"cost":0},{"name":"Searchlight","era":"Pioneer","charge":1e-9,"cost":1,"liftbleed":0,"structure":0,"visibility":0}],"climate":[{"name":"Electric Heating","era":"Pioneer","charge":-1,"cost":1,"req_radiator":false},{"name":"Radiator Loop","era":"Pioneer","cost":1,"req_radiator":true,"charge":0},{"name":"Air Conditioning","era":"Pioneer","charge":-2,"cost":4,"req_radiator":false}],"autopilots":[{"name":"None","era":"Pioneer","mass":0,"warning":"","charge":0,"cost":0},{"name":"Gyroscopic","era":"WWI","cost":3,"warning":"Gyroscopic Warning","mass":0,"charge":0},{"name":"Altitude Holding","era":"Coming Storm","mass":1,"cost":5,"warning":"Altitude Holding Warning","charge":0},{"name":"Clockwork Programmable","era":"Himmilgard","mass":1,"cost":6,"warning":"Clockwork Programmable Warning","charge":0},{"name":"Programmable","era":"WWII","mass":1,"charge":-2,"cost":6,"warning":"Programmable Warning"},{"name":"Rattenhirn","era":"Himmilgard","mass":3,"charge":-3,"cost":25,"warning":"Rattenhirn Warning"}],"control":[{"name":"None","era":"Pioneer","max_mass_stress":1000,"max_total_stress":1000,"mass":0,"cost":0},{"name":"Control Rods","era":"WWI","mass":1,"cost":2,"max_mass_stress":1,"max_total_stress":1000},{"name":"Hydraulic-Assisted","era":"WWII","mass":3,"cost":5,"max_mass_stress":0,"max_total_stress":1000},{"name":"Fly by Wire","era":"Last Hurrah","mass":3,"cost":10,"max_mass_stress":0,"max_total_stress":0}]},"rotor":{"blade_count":[{"name":"Two","sizing":1.05,"flightstress":1,"rotor_bleed":0,"cost":0},{"name":"Three","sizing":1,"cost":2,"rotor_bleed":1,"flightstress":0},{"name":"Four","sizing":0.95,"cost":4,"rotor_bleed":2,"flightstress":0},{"name":"Five","sizing":0.9,"cost":6,"rotor_bleed":3,"flightstress":0}],"arrangement":[{"name":"Single Rotor","count":1,"powerfactor":1,"blades":0,"reliability":0,"latstab":0,"pitchstab":0,"cost":0},{"name":"Coaxial","count":2,"cost":2,"reliability":-1,"powerfactor":1,"blades":0,"latstab":0,"pitchstab":0},{"name":"Synchropter","count":2,"cost":-2,"powerfactor":0.95,"blades":0,"reliability":0,"latstab":0,"pitchstab":0},{"name":"Tandem","count":2,"pitchstab":4,"powerfactor":1,"blades":0,"reliability":0,"latstab":0,"cost":0},{"name":"Transverse","count":2,"latstab":4,"powerfactor":1,"blades":0,"reliability":0,"pitchstab":0,"cost":0},{"name":"Tandem Transverse","count":3,"pitchstab":4,"latstab":4,"powerfactor":1,"blades":0,"reliability":0,"cost":0}]}}');var ke=a.t(Oe,2);window.addEventListener("DOMContentLoaded",(()=>{const t=new URLSearchParams(location.search);var e=t.get("json"),s=t.get("lang"),i=t.get("test");s?l.SetCurrentLanguage(s):window.localStorage.language&&l.SetCurrentLanguage(window.localStorage.language),i&&function(){var t=JSON.parse(String.raw`{ "names": ["Theler Kobra MD", "Kreuzer Spinne M3", "Ritter Model F \"Singvogel\"", "Markgraf Zerstörer B", "Theler Drachen", "Living Grove (Farman)", "Rathenau 7k", "Braun VJ", "KW-S1", "KW-S4", "Ritter Model D \"SeePfau\"", "Teicher Möwe 13S-J", "Ritter \"Ersatz S\"", "Kreuzer Spinne V8", "Hugo's Ganzmetall Wunderflugzeug!", "L&L Kessel IIb", "Ajeet Interceptor", "Shamsher Interceptor", "Bahadur Escort", "Cheetal Fighter", "Markgraf Attentäter C", "Königskondor L.1", "Von Morgen Vampyr", "Hugo's Einzigartiger Stahl-Jagdbomber!", "Theler Kobra MB", "Kreuzer Skorpion", "KW Adler N", "Markgraf Volksfestung A", "Arntwerke c.7", "Mitscher IG J-79SF", "Recht Luftschlepper", "Ritter Model Cj \"Spatz\"", "Theler Zweihander", "Mitscher IG J-83 Geistliche", "Arntwerke d.13", "Rathenau-9c", "Gernsback 0012", "Gegenbeispeil", "Universität Kobra M01", "Teicher Schnelles Mammut", "Rathenau-16d", "Braun DC \"Puma\"", "Ritter Model S \"Fink\"", "Theler Eklipse", "Mitscher IG JA-81", "Arntwerke c.10", "SAM 99", "SAM 1144", "Teicher Mammut", "Mammut Smuggler Custom", "Markgraf Totengräber A", "Kreuzer Spinnmilbe", "KW Dickhäuter", "Mushshak Trainer", "Sonnenjäger Hummel", "Ritter Model ABh Eule", "Albrecht Kugel", "Flugzeugwerft-Neustadt Korsar", "Kreuzer Zecke", "Markgraf Streiter", "Mitscher IG B-78", "Müller Experimental 3", "SFW Flitzer", "SFW-Rathenau Nimbus", "Teicher Fuchs", "Weiss Wrackbarsch", "Braun GA 'Gulaschkanone'", "Ritter Model X \"Falke\"", "von Morgen Walküre", "Hugo's Metallisches Jagdflugzeug!", "Sonnenjäger Seitenwinder", "Tejas Interceptor", "Sonnenjäger Haifisch", "Albrecht Pfeil", "Teicher Sperber 8N-A", "Markgraf Todesbote C", "von Morgen Pferd", "von Morgen Oger", "Dryad of Hanriot", "Thorstad S1M2b \"Schreckensgans\"", "Straßenkämpfer", "Marut Raider", "DFB Blitzgewitter", "KZ-2 Mangusten", "Rebuilt LM \"Viper\"", "Libelle T.87", "Mauss Z-95 Phönix"], "acft": ["AAEAjATAdALMDwAVAFgUwDaoE4AIDSA9gEZYCGOAsgCLACAdDAYMC68M2yyPZ5-QOgAhbABdk5AGJgYANhk4AO0Ww4wADgAMyAA7AAGMAC4vBmwAwwAMCsAkCd42A-wF-gAJGABkez98sBwlhiktJyisq46lq6lgDqsQCSwEKi4jhSsvJKKlE6fACCusAAAgApAF4Ah0wA-ADOAMwNNQBmba1tJiB8wHZ+vDxWnABArNbWgxNjpsCjUyzzs2zMoywAcL2+AOCbnNYLPf5++yx9rIP29Gf9bACgvvT73Rc3e2wAEK-T9juvJ0NfViORznJaWeiMF4MWiDQarXirSEzaEo4HIw6Ar5AA", "AAEAjATAdALMCIBpATgUwK4C9XIAQGUAHASwDtTVcBZAZmAEAHhmAwZ91j9kL3pgDABKACwD2pAIbVRAF1HIARhPS4AWpFxgwABmGFgAFGABcYAGBmjJhzYAIdgHA+fAP8vgAaGAAEZ3-+WwEJiktJyispqGlq6+mYA6vEAkkEi4lJUsvJKKuoQmjp67ABADACC+sAAAgAF7ACQDAD8ADIAMwCzTQABzD1+PBxWbv4WfKXMFlbs04FD1jPzY8D2Tn5sbFzTAKDAu1xTixMcPMtzC7PsZ428l7w3Aby7x+PMPHePHGf2n1d+a58zmdfs5GGZGCw7ox6NNpi8tiDEcwgA", "AAEAjATAdALMBYAlAlgF1QUwE4AICyA9gCYYA2OAYjgEQDKyAdgOYBuBTZ1wAgD8PwDB+-XsCHDhIURJm8AKLQDGACywZkAI2w4AQlACSADRxgAzAAZlAB2ABkYAFxQIlxIDgwAFDCAEDP-+ALDAAAgB4RGywAoqapraekYmFtbAAMAA6hn60Uqq6lq4icZmljb8AEA8AIIAgQCZAFkAAvVNwACQPAD8AM6mpt0AAfzdADEAMwCzASBRwAD-C5FVAavpkRHSEtu8695+EQd8wmmn8ycRZ8Jd25v8Xff+AKCRvKJzdxLrVxKHT-wzl9gB4AWlpNcAW90rwBF93u9Lj8LlCoUA", "AAEAjATAdALMAoBZAhgJwNYHNXIGYAIAtAU1QGcAXAN9VPwCFgBAYAIGA4DAOeuXfQ-AcG7DRAkMOEsA+AHUA9gBsllYgEsAduhy4K+OckzEAFslX4AwvggBOAAwmADsAA4wALjMB7XgFhgAGAeAGgpYQBIHi8AVHD4hI5ZRRU1LR08fUNjMwtrO0cXQLk5AElgeWVVCg1tXSyjU3MyKxsHZwEmAEFcXoABAEqATIAsthEAfiHRiYAAjgmAGIAZgFmpSV52KMTxJO8hDl9QRNOjs+PvY4BkYAAYbykAJHvhTaDOnkOpYJ4oy8S2zOwgAoAkWL5JN8hAAIU6-Dhw4EcBHCADgyMCQlRyKk7CxIm+BxYJK+4V83CYJNJhyYAH+6eNPo9ccigA", "AAEAjATAdALMBwAVAFgUwDaoE4AIAiWAhgMZoB2wAgMAEDD0Bg9zjLzIbLTn3bHnbagGQAsqgCW2HAHVxZACbIArgpwB2AAzIADsACowALgDqXYAGBmlgWwDgze-ZvOXVYKIlTZC5as06LaWkASXcxSVxvRRV5dS1dFkoAAQBJgEyALKSAAOZqEAB+NMyCgDKAM3KCgBkAGYBZgX484CcXXnpqLrZrC1cbOn7Bzrd6HAROUxMWqan6XuAASH7mYeWVtgBQFznmlmGVhYAIDatnNv6FhdOdm7ugA", "AAEAjATAdALMCoAZAlgN2QOwOYAIDiATgPaoCmOAFAGICGBAtjRgJTBsCAbwAYF373zYhBI4JwBIAIVIEALgAsaOKmBgA2NTjAB2AAzyADsAAYwALijOfADDAAwFwCQokQAgA-wD-gARGABkFyDgjmApGQUlFXVNHX0jOwB1RIBJMOk5RWVVDS09Q0F2AEEjYAABABSALwBDsR4AfgAzFubWgACg4T5OVy4HENDOKy4AIH7gAHBBab5ZsamZwVGR3nHOAFhgACgXTltdwQHQQq5hoOPgZz5xwevBwQBQYJGT14ejvj6Ptkulj8ufx+Ik4IE43He9XYI3Y7ncwFulmByKAA", "AAEAjATAdALMDQAlAhgFwBYFMB2yCuABAOwDWwAgBcNQGDX20P0hOtUAoAygMboBOmAJYAjTHwIAhKAEkAGgTABmAAzoADsADIwALihqlKgwDgwAFD0AEGxvUAsMAAItly8pdeAkWMkz5S1Q0AYAB1EOlgD34hUXEpOQUVdXoAIAoAQQBAgEyALIABbLzgAEgKAH4AZ0VFcoAA6nKAGIAZgFm2FgZDAH+elzS2QeAg1xthge6jYAAkBDGpgypKQ3pR+jKF6c2t+gBQNxHqFlXdhnXqazOL1lMtm5uz1koUyhpTpfJVylGPxaetkA", "AAEAjATAdALMAQAhATgQwK4DsAEA1AUsAIDABAxwAYMDbVXbSAzSdc2w08wyQLAoYcAVQAy2AJwAGABYAHYAHRgAXG4k68YAGBaO7t3IBIYACh95iy2D80WbKIkz5WgOouAktYF2HUubRIiAEEAGAAZgFmAAQBIgEyALLJQAH44xJSAMoAzbJSAAPMuAJoAf9KEdUtGWgBQaobmKrpmnUDgAHhTRqsacj1uAeBjRqqRnpp682amcgmGIc0JtooaJgBwHqGh+f1m3csgA", "AAEAjATAdALMCgBpA6gWgMpmAQB3gYMEccISUSOVXgBQBiA9gNZMCmATgAR0CuAdgHMAlgC8hAEwAWHAM4AXVgBtF-AZwAqATwAOnCDADsnMADYADJO3AAmMAC41XCQBQwAMDEA0NSoBwAP-+wAAIwADIPpFRRLj0zGxcvIKiEtLs8koqgho6eobG5pbuyMgAksBxLBzcqilSsgrKqjm6+kamFlYk2ACC4gAzALMAAgCZowBZBAD8AJqT0wAyQ9PjU1SU3cC+xGTReLhOTh5EAEDEThfE5zHklzdEhA8R3nfEAJDAABAbxJtXtyiJyIny2+1BwAe+3gUUuoDw+yoJ2B30RJBR5B2aJRGLRjncuHwcNu2Eu2ECkMixLxiKAA", "AAEAjATAdALMCgBpA6gWgMpwIDAEDBwDBgTThiySQDL8LL6zrKWcBkdAQQFkACRAK4AnAJYBTIbwAaU3hAAM8gBYAHYABxgAXBpl8ZABDAAwKSMsWASAD-14ABRgABAuu3ldlz6DRE6bIVlNWNkZABJYA4efmFxSRk5RVUPTgBmdIABAEqATIAsvFAAfgAYgBmAWaKAAJIat2ZSfEtSRt1yDxocPVbSbr7Osn79dpJhsmIcUzZgAChRtsHRi1NSFvdXdY2WeA6GqmXtklXVknMj47cAcAuTMlPb1ymifoGsHA-bQ4HHx6A", "AAEAjATAdALMAYAlAlgF1QUwE4AICyA9gCYYA2OAIjgEQDKGGACgGYCGArtcAIA-D8AwfsMEjhIMZL4AUWgGMAFlgzIARthwAhKAEkAGjjABmAAwKADsADIwALih+vPiIDgwAFDCAEFN-8AsMAACH6hobyyispqGtr6hqYWwADAAOqpOsCRSirquHEGxmaW-ABAPACCAIEAmQBZAAI19cAAkDwA-ADORkYdAAH8HQAxADMAs1ISIk4A-7Oh5VJLKWG+TmIbfMnCbj5+e5Ibh2I7ZZvCW1Jn-O1HYXdrYgCg4cBuDldPzjfA+9+rXwfJ7JDa-AFSXig4ACL68bgbRF+L4QsJAA", "AAEAjATAdALMBIAVApgSwMYAtkCcAEAsgG8DuyeYAzAMoC0AUsAIDABAwHAYBz17zyH69OLftyGCh-FvABCuAC6YAhngBiYGADYtFAOwAGTAAdgADGABcKaJ4AYYAGAeASClCAEAH+Af8ACIwADI7qFhHDLyOEqqGtq6YIYmTgDqKQCSCFEx6po6+kamvEwAgkUAAgApAF4Ah8zAnAD8AGZtre0AAaGSPCwe4TYNthzsHIIjDcXS-OyTk2MRbDwA8MAAUGFrm-zO4zNLh7u8boNCp+GTAKDH7oKLQjtDTrwDZzx7UgDg7y8fv5cnCwREIWExbLYHgcAb8gA", "AAEAjATAdALMCIAlAlgF1QUwE4AIBEAolgM4CGqAXjgMp7ACADwzAYM+6x+yF70wNAB1KAHkoAZhwRxABgAWAB2ABUYAFxgAUGaNgAYC4BIYADh2AeD58A-9eAB0YABwrrtzuBDREqbMX7BQQBJT2ExSWl5JWYAIAYAQQBxhQASgAEAMoAzLOBjegB+HKyCgBkAGYBZgoBMmoAsvh4OA2Bbdys45maOrl0mfo5Bxi7PYAAINwAoCaZ2Vv0+9kG+Bby53uZjTY5tV0ZdHlGdlo5Jk7WuAHAdvX7L-d52jy6WA6GBpnbjpZOToA", "AAEAjATAdALMCIBpATgUwK4C9XIAQGUAHASwDtTVcA1ADmAEAHhmAwZ91j9kL3pgdABCyAIakAJgBdcidMmI5cADSoBJXGBoAGABaFgAHGABcPgCAuACGABgdtb5cA4AH+XwAEjAACI7--mRiFRCWlZeUUVdU1dfRsAdXjVYGCxKRk5BTwojW09LnoAQQBmUoABAEqATIAs4AsQAH4AAOYWttbHHg4LJwC+RkZeC2Y7IfZxwIKmDknGO2ZrPr82NmnmAFBgLa4xifreHgX9qdPdjgBIAYCr-t4tkccRnkm78-s39mPeZbvv78+1xsjBYryY9HG8yYj1mgLhQA", "AAEAjATAdALMCEAJArgcwPYHIDOACA4gIYB2AXgLYCmALoQDZ24DqyxAJpQE4BmdaplNPGABAUcAkAwCTKmyZIeUvEAkAEJdqAC0K4AYmDAA2I7kgAGLQAdgADGABcZWNkAIYAGAZAUGVKA4AD-gcAAMMAA0H7RMRJi6po6+oYmZhCWNh5MTACSwAmc2roGxqYW1vIiAIIAaNzcAAIACTJikgD8ADEAMwCz7QABEoPRirJi-rHO0QBAMl4urZXyc4txK7IAkOK+9gCwSnN+iyfKXjLbU0qXV7K+smPKimu3sucS7hLvMd-yk7ffX6vJRiDxtF7iESndbHYFwoA", "AAEAjATAdALMBwAZAZIgBAaQKYGcdYBs0BJYgI2AEBgAgYegMHucZeZDZac+7Y87Z0AKAGUAxgAsA9gQBeaRAFdJONAA00YMAAYJAB2ABMYAFwB1FgFBg11gM4B-h8ADQwAAj2v3+tVGSZeSUVdU0dfWAAYAB1aOJgf2k5BWUJVQ0tXQNfKgBBXIBMgCyAAQBsgGYKm1oAfkQAGYBZ2oAzdtqAGOaBfmYLJ2BeNgtmRMCUkIzwg2MzTlH6a1shn2ZBt0817f6E8SSg1PSwrKjY+PHk4LTQzIicynzi8qqamnrmto7upt6R+kGwxYi2B7B2u1BdDWNFG1ChwAA6MAAIjeADwwAAMJxImDQfQONQQfRccwAJBRcH0ClUpbeIkE5jwqxrUn0AAQtLZnAA4ODudzaYJgJyhgzdotKINiXDWJRJVRFdRpQsckKdkA", "AAEAjATAdALMCIBBAVgU1QFwAQEkB2GqATgMaoAOGA9kcAID3BMBgTbL7bInPjAGACUAFlTwBDLAFkq1IgCMxAVywAtSFjBgADEPLAAKMAC4wAMBMGjdqwAQbAOC9eAf+fAA0MAAIT334vAgiLiUjI0CspqEBraumYA6vE4gcKiEtKyEarqmjp6TABA9Ij5AAIABWwAkPQA-AAyADMAs7UAAUztvtzslq5+5ryDZmyWo5xjRQG9bFNMjmMAcMAAUDxj6+MD7DX+W8C7e5wAoH4b3BtHnKZjdldMwzyOV4+vfv2bDDfAzJeMdGNAbMJvdQUwgA", "AAEAjATAdALMAoBlAFgQwLYGdkFMBOABAJIB2ALvgMY4AOZA9nsAIAvDsBg73nP3IfQWwAYAJWT0SqAgFl6DPACNUAVwIAtSATBgADMhoJgAXGABgdqzY8uACG4BwIUID-L4AGhgABGd--lsBiElKy8ozKapoQ2noG5gDqCURB4pLScgqRGlo6+obsAEAsAIIFAAIABdwAkCwA-AAyADMAs-UAAeydfgI8Vm7+FkLD5txW43wTxYH93DPsThMAcMD2U34TrNsjPHUBk6z7B3wAoP4ToNYnXHxmE+sn7KOCTk8vH09CrIWsHJeBZhAtiDaYbL4Q4BAA", "AAEAjATAdALMBwAhAhgC2QEwK4CcAEAogM4DGA9jgC7ACAtwDAYAy06yyO18AEDAAoAZRKocAUwCWAIzH4A4lACSADTxgwABlQAHAcAC4vBnXqsAoMAAQLAODduAf4C-wANDAACPe8-jA4aKSMvJKqupaugDAAOrRiv4i4tKyeAoqapo6LHw0AIIAvtoAJQACANkAzBXAAJC0APwAMgAzALNNbfUAAd6crCYODsB2vgxCiUEpaWGZuvwGRqYmLBbWDCOjzm6eo7v9CYHJIenhWTFxB0nBqaEZEdm0BcXlVbUNLe0f3b3sA0Mbez4fmBplBy2GoIAqG92ED2Jw+HC-ODgJFWHU9ujMeYIaM+g9sajlmtMWj7ADfGSGFTCVw6CA6IwUfQaMsaINFtxmbTvEA", "AAEAjATAdALMDwBhAFgU1QFwIYBsAEAYgJYDmyGqATsAIDABAwTAYE2y+2yJ+6z35249OdANAB1KAHkoAZjwRZABmQAHYAFRgAXGABQJnWABgTgEhgAODbxhwgP-3gAdGAAcO56+HgE6XIVlNRNxcQBJX0kZeUUVdSZGGgBBAHHVABKAAQAygDNc4AsaAH583OKAGQAZgFnigEz6gCzhITZTYEcTbx5GJgMfdiM2YcGRtj7vemGAcFo2AExgAFgeofGx9g6mIrXhizXOAbs6I25tw85jYYAIS6YLzjnD6-b7r0S6ZlGfGlPaLqTSbzYDfP60f6jGiAiaDH7vbxAA", "AAEAjATAdALMCoBZAhgJwNYHNXIGYAIBBAF2IFMA7YgE-NXwGFgBAFtgMGC++E565Ct+-VgGQAyoUT4A0gFdUASzL0AGqvwQADFoAWAB2AAcYAFw2PAED8AEMADA3O8OEBIAP-vgAFGAAEF0CgkWAJKVkFZTUNbT1DewB1BIBJUMlpeSUVfHVNHQMRQgBmEoABAEqATIAs4GsQAH4AGIAZgFmGgACuLqCQfmtXQKFeEJGeRy5J4JdrGbqeVjngABhgAChhEbXN-mmAUBCucZdp4CHl+a4hq-5DoPH+k9vuM+cXs-4AcA+LT9vPNxWI57Kx2M9WMwRiNLlYwcdFiwoWxAbDuJYwRCkSNUQ8XviuEA", "AAEAjATAdALMAIBpAbwOwJYHMDOBrA9qgCb4BOABADJRjACA9wTAYE0w8M3R2yD2wMYBEAMqUA6uRFYAbulJFyYABwAGABYAHYOWC1+wAMCCA4MDNMA0IJsCGAJGAA0W67eCGoiVNnzFKjW1DcXEASWAvSWlMOQUlNS1eegBBVSYAAQABpLoAfgAApgKigDKAMzLgACBqpIFjYAB-xpseBgNamuNjHh62PqYa9g82IZZapgAYYAAId2m5wQHGMaSGtjb3IwEASC3XPdatgFBBVcGmEAn913XZm-q3CxuBw02Hmy6GLiOq9-p2hwah1Bt8OoD2k0WiDhh84cAgA", "AAEAjATAdALMCIA1A9gOwAQFlkCcDmAphogIYC2ADgJ47ACA9wTAYE2y+2yA55wwOgAhAjgAuACxLoAYmBgA2eegA7AIxHowADgAM4isAAYwALi9G7ADDAAwGwCQ53vYD-AX+AAkYAGQn-gKYBYTFJGTlFFXUcTV19WwB1BIBJYCERCSlZBSU1DW09A3Y6AEEigAEAFIAvAEPGZgB+AGcAZlbGgDNuru7zED5gR0DWYsYeNgAgNjsJoMH2abmLKbHppgAoIYCt4fZZtgZ19gG7MfmAs6Y9wM495YCAUFAdpgGH2-32AAhPr6cAOB-Wz-YH+Bg2BjMB4MOgTCbHXgfMEBIA", "AAEAjATAdALMBkAJArgcwPYHIDOACAogJYB2AXoagIYBOALhQKbW4DKtlAFgDYC0AUpVQATAEboAtiKYBCYAEBgAIGAqAYCpULg6jRpC6DOzWoMr9pgwoDoAISa0OlXADEwMAGzvcAHanMwABwADBwADsAAGMAAuBZaGgAwwADAGgCQFqZpAP8Av8AASMAAyJll5ca29o4ubp4+friBIeHJAOptAJLAVXQ1rh5evkxNwWGWAILhwAACACmkAIfy2gD82ADMG6sAZnu7exbmGgoZcRrq8QrXBqkqAKAruvHGz5YnSk8fusrpK49RJK-FR3c6vL66UHAM4VLKwiyPXTHUz6F5fRHlKEACHhkPOAHBcSk8UTyspkgpVGiVnIrhpgbcTLS3i85NlshDXtTSRUgA", "AAEAjATAdALMDwAVAFgUwDaoE4AIDSA9gEZYCGOAsgELACAdDAYMC68M2yyJzwwEhVsAF2TkAYmBgA2KTjAB2AAzIADsAAYwALi96bADDAAwKwCQvHgAgA-wD-gARGABkC2-ct6A4aJwTpsgrKakYA6qEAksDeWCLikjJySqqctACCasAAAgApAF4Ah0wA-ABm5WUVAAFu3Gz0lh66rABAnG0sJiZ6xgydfcBt3azDLB0szOMAsMDmbgDQwI2cJlyprD0Wqyzmmx70c02cAKDu9Kvce0ds20vXI24A4Pe3t-fNy4z0m98M9NbWAY8K7vDxAA", "AAEAjATAdALMAIBpATgUwK4C9XIAQGUBrAe2QAcBLYgO2AEB7gmAwJtl9tkTnxgDABKACxoBDXAFliAF1IAjUelwAtSLjBgADELLAAKMAC4wAMBMGjdqwAQbAOC9eAf6fAA0Akdfv54IJHU4lKyyApKqhDqWjqmAOqxAJJ+wmKSMvKKKmoa2rpMAED0AIJ5AAIABWwAkPQA-AAyADMAs7UAAUztXtzsFi7eZryDppZsFmOcDOO+E+MeNbzjDIWcPZMTM5zDwAs+PLt77ACgI14AUEzc04db7LY3TNucDjfbTw88DCYMzNeMdEs2CtFh9QUA", "AAEAjATAdALMBQBpA6gAgIIBMA2BTATqgHLACAZFAYMDbcNXTSOY4+QCgDK6AsqogFd8ASwKoAGgElJqMAFYADAAsADsACYwALisKdABDAAwLUO7GDYAHhr5u-ZodufQSLFSZ85WqPJkk4C5efiFRQg9ZRVU2dABmeIABAEykgCzgACBQAH4AAJo8goAYgBmAWd0QNnpzFhq6ckbGExoWh1Y6hq6smgBoYENOun7Buja2x1oh1gmASD12innFxgBQeybQBZXmgx3WuwBwHaM6ibsAf4u7cizT+mnGprrpmh7KTcnn4Cvt6v39kA", "AAEAjATAdALMDoBZAhgJwNYHNXIGYAIA1AewBt0BnXAUwoBcBXAO03wEFgBAYAUGH4Bg-LsKHDhIcVIHcRgqf0kL5-WcDFSlwgFCjhajeK0KNB5ceXAAQMABEAdTKl61AJZN0OXHSLVUdNwATV0w-fAAJfABmADYABgALAAdgfGAAXGUbcQBYUGEAVEspAAgAf7LgABJgAEJihobuBycXd088H0I-ANdg0NQI6Pjk4ABge3sASTtHUmdejy8unqCQsMjYxJTxTjYAAv4AAQAB4RsBAH4ATQBMgCzLqOfLgDLcXHMpGxK9ZUNZq1Fh1vL5-GsBkMtqM0pkFNlhHktEVGsBypUavVUdj9ID5m0lp0wb1+hthttxpMZi18cDlsSIWToTt9Adjmd+Bcbg8ni93p8FBYfiIAX9ziI1BLvsJ4Di5fKFcVJXJcbspMqNeqtWqdbixorxmqEQAtYAAPAal2AKPE+sU0v4dpVtvEAEh1Ni1O7FXwlXJJKLhBancoQ795frNQBwOUhkMG4T67IyLicNNS-QVZ2c6zydO4yWcLPKw3J1UZ1TFwXjEsJ5RAA", "AAEAjATAdALMCwBBATgOwC4HcCmyDW2ABAMZQDswAgFTQGDAOPD1MMisc0AIAsgPYATAdgGEAWpEJgwABgAWAB2AAUYGGABgBtWAAgVvQAQjAFCdOAf4vAA0MC7nHT6gEREAG3QBLdAFdhhAAqcsh86Oju2GrBXgDOhNioAOZeqERyAIbx6HJEAOoAogAKhL4KScgZARnohB7efsLxMgC0AJxQ3PxCIuKS0vJKGnl5AJL23cKiEhBSsoqM+pSISsAAAgAFjACQVAD8ADIAMwCzewABDBeM1DqgrPrAVk6PHOwMWk7mry9Mt4wOXZ3GjmO5gkGMT4MXZfG47WGcACgziY7GBCNYUOAxgxH0cAHBcVisbjONQNNRaOiaJRwdpHNTSV8gA", "AAEAjATAdALMBIBZAlgFwM4GMAWBTATgAQCSA4oQFIC0A7AJwDKAYsAIBvCcBgnv3fvEAOEcAKAxz5cyAEYFCpKMQAahMGAAM2AA7BRwALjAAQJ3Yc+AUGAAIXgHARIgP8Bf4AGhgABCd--ZnoS2FKy8ooqapo6wADAAOrxxEGS0nJEEarqWrqcpqwAggC+2gAlAAIA2QDM1cAAkGwA-AAyADMAs62dTQABfkJ85s7OcQHCpnnjJtPG5hyTng3+Xo0CsYIC89siG7yN89PLR1b+7OaDFie8e5x217fCjkePj+OsIyLn7FyHgazbT5-IbXUFAA", "AAEAjATAdALMDIAlApgYwBYBcAEAZArgGaYDOGANsgA5XIBOwAgMAEDDsBg73nP3IfHl0HC+AwX2YAKAHIBDTAEsA9gDs5lEtgCyyzMroAjAD91l2AIJHkizPWwANAGoBJF9jAB2AAzoqwABxgAFwmPjYeAAhgAGBuaIk+AEgAf5TgAERgBMTcvOl5JTUNZC1dfSNTcytDGzs6R1d3L19-GIB1dpdgWQUVdU0dPQMTM0trW3tnNw8fP0kLAG4AZmWAAQBKgEyALNZQAH4AGIAZgFmDgAD2K9zxMLYk7ji87mZ38OfXxJfvvhjmDwIsAABjAABweTBkP+-G4bF+vx+PCeSL+Tz+fAAoPkwqA3hIAFDfJE5TFongAcExsR4FJpkmA1OAHHejHZYUB7EYaTxPEBXIZmKAA", "AAEAjATAdALMDoAlAlgF1QUwE4AICyA9gCYYA2OAwgFY4BEAygA4CGqAXrcAIDe8BgwQUOADhgkDzFieADEQALAgDtm+AqgJYARswCuOAFqQcYMAAZ5jYABRgAXGABgQZMlCBACCEBwKX+AA-wHAANDAAAj+UdEuwHKKKmoa2nqGxqYWVo4A6tkAknEKyqqEyTr6RhAm5pZCAEDcAIJWwAACAAVCAJDcAPwAMgAzALO9AAGC41Eg0oJB0Q1+i04x-ssLwjzLPV5RO7xCzoJHQm5u-ifAPeerV7dSAKDRPJIzN-eHwrsfl2K+9443L8PlIeICRO8XmdTlF3iCYkA", "AAEAjATAdALMCIAVAFgUwDaoE4AIBaA7qgJbICGAdgCbbACA9wAwMAGDAedtecg-+MASACFsAF3I4AYmBgA2OTjAB2AAzIADsAAYwALgCGXADDNOASAH8AEAH+AfwmABkK2-ccGI8ZJnzFKupaTADqIQCSwN5YEmTSsgpKapo8dACCWsAAAgApAF4Ah4ysAPwAZhXllQABbnxcDNacLIzuRgL1Zp6pPRwtrZzt3X1c7ABAZgBQ3D0s0+w8-UOMDBPu-cCWHgJb2zwAoIuGoAN7vCOcTWcXAgDg1xsb18djDKzLKwxftranvc-XIA", "AAEAjATAdALMDYBZAlgFwM4GMAWBTATgAQCSA4oQFIC0AHAMyGm7LqoA2yOuwAgMAEDAhAMCFiR4sSEnjR4vnMnS+MsXwDwAIXwBDAK4A7QgFUAMgGlCYMAAZsAB2AB0YAFxVKsQAhgAYCmqgXwA0MAAMIGRUUIa2vpGZpbWdo6+AOppxMBauoYmFla2Dmq8AIJhADMAswACAJEAmQBZAqAA-A3NHV0AAWKCntLyQgD-I9GB-kJDE9GCE-MxrUIAsMChkWsb4lN+kp6ek+IAkMuzQqfn4gCgUXwqylequ8A+Ty+SAOBXLx9P+8thPdeHwBvIxrwzpDof9zkA", "AAEAjATAdALMBwBBATgOwC4HcCmyDW2ABACZRgDMwAgMAMDAMBgDLTrLI7rzXP7nXNr0EDBLGgHQASgAsA9qgCGhALJz0c5ACNFAV0IAtMGEIAOAAwyADsABIwALjAAQAxrV+wABAcxXAP-+3sAAUH7h4ZKyCspqGtp6hsZmlja0AOrpAJLA0vJKquqaOvpGJhbWLK5UiFAAZnUAAgAJLACQ1AD8AAEMPX29YqJuDIHeVO6sroL0QhHz89MR1SNLAAih4Rth7LOg7EsrNJMMe8AdZwsdC+wAoJF0DJxLXD4RZ283j2IA4F9nlwi7jGUxcTGOIwh4jGJ1W4I87ihbhhXGmsK+CyAA", "AAEAjATAdALMDQAlAhgFwBYFMB2yCuAtAJwDGwAgBcNQGDX20P0hOtUAYi6A9rgAQBZbqm4AnAEb4+ALUh8wYAAzoADsAAowALjAAwNUpUGdABD0A4GzYB-6wmAAEK85cHgnHvyEiJU2RHklVT0AdRCASXcuXmRBYTFJPBk5BWU1agAgCgBBdIABAAL6AEgKAH4AGQAZgFmygADqBucWBkNbFyy2Lr1XKx7OtuAegChgM2cAUHHWfWo5+kMjZYYF4FKhvo2+pmnnSkMWJb7W1YYJnfnnS0u1tb72uyGMyhpjt3JPqg73zcv-6hAA", "AAEAjATAdALMBwBxApgJwHYGcBGBDAxgNYAEADKZMAIDXADAwAYMC6026yFTR2zQCgoMOAiQCyAewAuE1GXIBWYMWABcWmwZsAEOxYAoXkYCgAf9PAAqMH5G79jgKFY8RYpJlzypJXQDqfgCSNs4ibh6y8j6sxtQAggACLAkAAzHAAEAA-AABLLn5eXYgHAyxLBl2zDwatSw1WnVNDaw19Y6sjeyNurptOsB9mqy9dTXlmbQ0lQ5dAJAO9gt2MyaLbCWr60ZduhXbjVvAAOBNdl1d2-Y02jSM-VM1VOa1-Q9X20A", "AAEAjATAdALMCwBxApgc2QOwEbIJYGcAHPAG2AEAKqAwYO+4WhukZtqgFAGUBBAWQAEAaQCuAJ1zIxAgBoBJOQLABWAAwALQsACYwALjtKDABDAAwPVPtmTYAHh71p87qVu-YeMnT5ilRq0zAHUguWB3QVEJKVkFJTVNZnIeAGY0gAEATMyALOAAIFAAfgAAulLygBiAGYBZ9lYGSlsLKgZbV3ojekK6VraupMHOkboAKAL6AGhgK2sZufpG8x6B7tG+hgBIIZdgHfW94ABQZ0pe1kOjhn7Z6-pb5gBwe4sjR+cAf8-DKifmq6UchAijfAZsK73PZAA", "AAEAjATAdALMCoBVAdgSwG4FMBOBnVALgCcEAEA0gPYBG2AhqQLIAMYwAgB1wGDB--BeAviE7DhnAEgAhHAQAWDAGJgYANjWkwAdmbyADsAAYwALjiuAgDDAAwPwCQF8QAgA-wD-gARGABkZ0CgvilZbAVlVQ0tXQM7AHV4gElgGTlFUhV1TR09QwF2AEF8gAEAFIAvAEOeAH4AM0aGpoAAwJAJYBdgizE7YQAgfnt7PtHhy2Ah8b4ZqYFeDr5up0CAcGBVgSWuzaCNrf4dzhPOoPtHeZ6QvevhAFAg09BJu+EL5bfZ9beP-q++G43PxTrZONw+iCOH0+kNnJCAT0gA", "AAEAjATAdALMAYAVApgSwMYAtkCcAEAylgHbIA2ZyAzngLICGAtowK4AuwAgMAMC-AAwYMO7ChwiaEnAAUBPFd504SGVKR66arWTVAFAAKLMlWQArZGzwGAagFowAVjwAKAOpuAkgEpgAE2AAXAkAIEVlbj4NHWkAf4Af4AB4YDsY9PTuQ2NTCytbB2d3L18eD09gbJNzS2t7J1dy31FFJIB+AADhTrVY2MEMiSrc2oKG4p9-INDw6UiJFoyE5NTBtckso2q8usLGkt5yyq2R-Pqiptnudq7gHuU+gbXhmrO9id8A4OEwxYX+aKDZYpNLrdabHKvXbjS5lLzHSE7MYXA4ta73e5xfoKDIvJHnfaTL4zP4aKKzJaJEFg8EI7ajAkfQ7wvEM96XNHJDG3LFPMFhYQAGBpIsBYopEr+UoBIvJigFwAAMsAAHjpMDAACoynJ2n+wnJpJlwAAkHzMhIzaKAKAWiR6uSAvTABVqOUACFlLu9GgA4GC5XKwY8NGEogJuJHIxTOI9OYpw1wo4pFrH+vGBUbRTogA", "AAEAjATAdALMAwAlAhgFwBYFMB2yCuAtGAGwAmwAgJcDQGA0N2MMjNvUAoAygMboBOmAJYAjTPwAEAISgBJABoSwAZgAM6AA7AAyMAC4oGlWqMA4MABQDABDs7NALDAACPbduq3PoNHjpcxRV1LQBgAHUw2WAvAWExSRkFJTVNBgAgSgBBAECATIAsgAFcguAASEoAfgBnZWVKgACaSoAYgBmAWfZWRmMAf763DPZh4BD3O1Gh3rGbcrd6W2ZjQ3pmDJWqKZpWbc2GFcZxhgrGbbtTieYAUA9gYdZDq+ZjmiXn2btzZ9fP9gHlvYMiEqLQntQKPsaOc3qDwVRIQjgADwQcPuiaEA", "AAEAjATAdALMDwAhATgQwK4DsAEARAwtgEQAK6AtqkcAIC3AMBgDLTrLI7X9AhAHKoALgEsA9plQAbAKYBnbAFlRg0cgBGAH+SjsAJQC0YABwA2AAzYw5gBYAHYAAxgYYACAGdN+wAQwADAsAHDc3AD-ocAACI4hsXF0AIgAgpIigugAJtLYACrW2oKCMs55wvLSmADmwpjZ1qjygtbZAOoAoiTY6LaVaFnYQtgpaZly2Gb6AJxQvAIi4lJjSirqWjoGxuaWNvYAwC0tAJLA-EJiEjLyy6qa2nqGphZWZnYsu7RJACkAMwCzAAIAAZYAGhaAB+ABkADNoeCAAEMBEsOieUDsdzAcJcNGYuLvd5owlvegMdzvVgUlh44DMPHBABQcQA4MAAJBcKlUjwouLAbkc1hokJ0QV8rgAUHi-IYnBp4s5rF8CpJIVZKu53PFnmxQv5dEYwp5NDRptiRpVKqAA", "AAEAjATAdALMCoAlAlgF1QUwE4AICyA9gCYYA2OAyjgEQBiyAdgNbXACA7wXAYF1x8F58+ITsPEcA0AHUoAeSgBmHBEUAGABYAHBMAC4wAKD8uAYHEBIYADg+AeHGO+Af+fAA6MAA4T334nAMvJKKurawKbS0gCSgbIKyqqaOlwAQOwAggDjWgAlAAIAZQBmxcBWbAD8pcWVADIAMwCzlQCZrQBZTqLC5sCu-ukCwulm-n7DwpMco8AAsOVijgAwi5N9EQEm-huLs+N8VgeOxhNiovvil067ABDHvX4A4A+bfLuvThymHNyTJmwOEC+Nc+P9PgcgA", "AAEAjATAdALMBwAVAFgUwDaoE4AICiA1ugJYAOAzqsAIDADAwjAYI6826yB2y97x1zYAoVvx7dQEjgCBgAJABC2AC7IAhjgBiEAAx6cEAKw7kpYACxgAXAm02AFEmN4UjgGgA-x+ABMa64CA2kUVdS1dfSMTMzoAdViASXklLFUNbT0dA2NTDmoAQQAagBmAWYABADz7AG8aYCYAfgAZMsaAAMYO10FWWjdRKTFk0PSIrKjcyxtuO1ZHXpdA4E9vPxnlzcZglLTwzOzo+nikkNSwjMicszYCkorqutom1tLu4HeJXu2V+uHBtiyWhzeog+qMAAwW2hPx+c2BfXBoMR8KRtFkywx7CxAFpgAAMAJ4wkcBiMb5owJkxgASGAAFAYcA6UyGUFgBiuBSHMtqcAABBMvkcADg0L5wtZrFkGKYCOo8tuXiRiNlNAVCuRfWVYI5sKlyyAA", "AAEAjATAdALMCIBZAlgFwM4GMAWBTATgAQCSA4oQFICCAtABxjACAwAQMBwGAc9e88h+vbkJH9BQ-iwBIiXMgKEA8jnSEIhMADYADNgAOwABjAAuJJa8AUMADAPADCShAcAD-AP+AAEYABRnQKCOGTkFIhVsNQ1tPUNbAHUE4mBZeUVI6M1dAykqABCAGYBZgAEABJ4WTgB+BKsAXhqAZlaagEz2gCzJCSrgFx57YJCh-nYOYZH+Kemhy2BuCeAAdGAAeCC1zZmBKX7RoVmASDs5nlPzngBQIJZLPoXrEdmACCuz50G52dmP8bYXHuvGBVTcbmYQhYE04TDh8MhTyY4Mhzie-2CQA", "AAEAjATAdALMBwBBATgOwC4HcCmyDW2ABAMZRgAMwAgNbQGDCNPAPOMhue0AYASgBYB7VAENCAWUHpByAEYiAroQBakQmAr8ADsAAowALjAAwIxq1mDABBMA4Fy4B-x8ADQwAAgPvPs8D5CohJSMvJKqhDqmjrGAOqxAJL+AsJiktJyiipqGuTaTABA1Ig6wAACAAVMAJDUAPwAMgAzALN1AAGMHd4czObOPkVcQya+DiODfRaewLXmfg7zNMvTjKY1Y0wrtZtsAKA+86Cru8zrjDanow72u+fXV4smNHRHflRLW95vj75AA", "AAEAjATAdALMBgBlAggWQAQE5PAIB4PmGJIVJJAPNPwGQUMBpAVwCcBLAU1fQA1f0EAAxCAFgAdgAHGABcKiQBA5ABDAAwCTXVqASAD-+4ABRgABB2Wr5Og3QsO3PgOFjJ6gOoeAksHpp7Ni4efkERCRtkAGYYgAEASoBMgCzgZRAAfgAYgBmAWYyAAOIiq0pSZV1LfHwiGgJ8UnLQa1bSTTbqDuJ8ZWIq7UsBroobEkarbuAqvs7+ufIAUGsa4koJ6mUNka0F4inyAHAFqYPqQ0MGnXx1Wu2GiYnZ6nu91qA", "AAEAjATAdALMAQBlAggWQARjDOBAYAQMPgGDDkXBmXkj43nU1OUg1s34DoKGAKgCcAhgDsAzgAcA9gIAuAUwHoAkugDMABg0ALCcAAYwALgNCNACigKAWFMMAkAH-HwAHjAA2He8-y3XuiCopIyCkqqmjp6AMAA6rHKwDxogcLi0nKKKupaupzIAA0AxQDrAAIACRREJAD8AMlqarUAAeSt3hzVwPZ29FScxEOU0RRsRJQT3ZM0RFPk82YU+FMAmMAAcD6GtjSj5ACgg36m-fvkvYs++L2+pkcLDPj0494AUHfnCHd73gDgP3IXy+3mc3hWwGipH6y2I-XhdgmZFwz2ewz8YKu9BhgNxQA", "AAEAjATAdALMBwAVApgSwMYAtkCcAEAsgIYC2JArgC7ACAwAwA8AGDBt1utveg-ABQ3LrSF82IMaPZS+EyTwl4AckUqoA9gDsiAG2QBnQusrqcAIwA-OdXgAiAWgDsANgAMeMAFZXmAA7AAXECRHgAgPgAIJjYAUHk+YQB4YABoePT0umVVDW09QwJjU0trOyc3D28-BgB1GoBJYGy1LV0DIxNzKxsHF3cvH38eGgABAGeAZgmRgAbucJAAfgAYgBmAWcWAAbZFgEwATIAsyTl5lhkM5ty2gqKu0t6KgeqgoI5znijGWIzObmSaT+wO4WRULTy7UKnRKPXK-Sq-nodUa11a+Q6xW6ZT6lUGfFGk2mczYCxWG22u0OJzEZ1JFzowkkHzRkLuMOxTwR+LeIU+3G+3DifySqRB4rBOXRUPusJxz0RtQaTXBNwx0Kxj3heOqw3GU1m5yWa02O2A+2Opz44VYNsy3FZt0xDzhuJe-l5H3pX2iwGFGVFQPFf0lEKdGpd8u51WRysd6tlnO17oJ+uJRvJpqpltp1oujCZ6QkdC9JeGfJEXuA4TYABhgw3pOXm6CCW3yz8G52RDXgAAZYAAPHSYGAAFQxJ26XzO1W2N2AJAXEPcJeN-3MhSXbgAFGr6W7UWD3dbAHBxd36HPG-ua8wyzQH8MAP-PivSO+0EtP0Gv9-7-8b3kIA", "AAEAjATAdALMBoBZAhgW1QVwC4AIDKmA5oQDYCmATjgMIYDOWA9qsAICjADAwAYMP+359+IjqP7cegwb3H8QcrrIEjh4hXMkiZa0RvUqFAYgByyLAEtGAO2Tk6ORIyYUARgB+KjHABEAtADsAGwADFikOGAAHCEAFgAOwAC4wGBs4gBA4gCQSkLpiqoA-wB-wABIwADQhbV1KqbmVrb2js6Mbp7e-sFhEdFxiZwA6sMAksCNljZ2ZA5OLh5evoGh4SSRMQnirAACAM8AzIe7AA0iWSAA-AAxADMAs1cAA-wAfHePSjL6-FlqujqU2as3m7U6yx6a36W0SKTSMj+OTyskRih4pQq1XqOLk7GBM1aCw6S26qz6GwG2xG40mZmmLTmbUWXRWvXWm0GOwOxzOF1At0eL3enwe3xEv2A-3SgJ2IgJjLBLMh5I5VLhqQK-NEuW4+TRcgxZUqNVxZvSCtBzJJrKhFM51NGE0tRPBpLZ0MpsO5RxO5yR13uT1ewA+X24P0ysmltRkLqZxIhZPZMK58K1SJ1KL4BvERqxpvNOPx9JBruVyc9DqGTrpTUJCbdttVqe2oj2vr5AcFwZF4a1kulWlxCnYiLH7YzE9EeuAAFgi4ul8varOi2v2Fl+CFgABUOppffiWeSmSzmRnrOy+q5JcAUDq0-018Ka7XAAhF2vtMAAODmt8LxXKUxCkVgx3YCN2yKIoQK3AMhHAtgkKg7QYLgmcVGA+ogA", "AAEAjATAdALMBoBZAhgJwNYHNXIGYAIAVAewBcBTAO2wBOAjc1fAQWAEBgAgYHgMB4F9BAkMMH8xE4aLHCOAfADqxADYqAzhQCWldDlyl8i5JnIALZBqL4AzADYADGYAOwADjAAou2HdBABFABADgfWQEASAB-qOAAEmAAVHCU1J4FZTVNch09PENjUwsrQltHF2AAYEVFAElgJVUNbV19ApNzS3VreydXQTZmXGGAAQBKgEyALK5gXgB+Cen5gACeeYAYgBmAWarZnhkBbgi02Q4OMT9gAFAz+6v7659rgGRgABgwsQAkT7FKgJAQMBJcUsCeKdnmkTg9hHcUhw-KJoXCeBDgAAINH7cIAcDhlTBGJxwkBRLmYNB7Au3ypgj8-DYF1pVLYMQOIOxlO+PlZwA59JBpIeQA", "AAEAjATAdALMBIBpATgUwK4C9XIAQGUAHASwDtSBbYgGwCNVgBAJ4VgMFdeeA885D6DOzAKj4AxgAs0xengAqAcSgBJABq4wAZgAMkwsAAowALjAAQFyt8OAKE4AIIc+AB-gL-AAsEZd--VmJSMnK4Sqoa2noGAMAA6nEqwEHSqLI4Ycrqmrr6nJaMAIIAvoQAJQACANlaWsAAkEwA-AAyADMAs62dTQAB+SzGAnzcrq7+MSyC3MCTM9bC01OLi5asANAN-puNgnOrQgLDK8vznJOcuwFCV9d8AKDAj372oMt3QhesTh+sX0IAcF+-xiZ1+S1BPDBzEYMxma2cYPBASAA", "AAEAjATAdALMCwBpA6gAgCIEsDGBrAFgCcCuALgKYBOwAgLcAwGAMN3DMssic8sBAwAKgBlAIIBZVImKVMVVAA0AkitRgAHAAZ8AB2ABMYGF7ABnAJDAAoC0tsTTFgCRgAeAcfPrIWMnTZ8sqqGtp6AMDIyEo+ElIycpSKKkpqWro8NKIAzDkAAgCZ+QBZpqAA-AABDJXVADEAMwCzwGH0AFCgPAIc7A7M9iKx-glJwWl6hsa8ZrbWs-Z9zm5eK7x0g37xgcmpoS2R0RtxAYlBKSHpnJk5WQXFpSA1wE9lDc2tdB3cnN0sPTz-Up0BbArpcVYrBYsUH0GYABGAABhPAjkTxWgwMdD+CZ7FjgJYZhDLBDODYPDDuESeAAIFb4umkloeADgpPxHyZDgENLojCh9Bo9hoAH+RfQTGE+QLgWw6GLSg4BVzPEA", "AAEAjATAdALMAIBZArgZwBYYIYGsAEAKgE5YCWAdgKZHACAwAQMMwGDPusfshccv1c2vHry70AWACUA9gCNkRPAAlqWNADNpRACbVqeMAA4ADOgAOwAGjAwwIQIDAXAFAJ2AGDqiuAf5-AAJGAACG8w8OYJGXlFFRINLV0ifSNTCwcAdQyASWApOQVlVQSdPUVU83YmWgBBAATmAAEABvYAUEYAfnUezoAA5n72J3oAClBI+idgPwjvJmYOueWuBYi1rwFgAFxAxg4t3i36Q65p5gBIFf3L644l70OeU5WRBy3Qu-PeAHBr7++dxm-hOjHo-COdFooNmawWAheQPCQA", "AAEAjATAdALMBIBlA9gO1QU1QKwCcHMMAnAAgAkBXAWyowBtgBAJlgMGA5eHc85F4GdmANBTosVZABdkpAKIBxMgGYSECAAYAFgAdgAdGABcQcADAAgPDAAkJwAQpwfAD-AX+DCETn744ixTFRJGXklVXVtPQBwAAUASzQMYk9AiWlZEkUVNU1dQQBBAAKOAAESjgAgUAB+AACOGoAzFvrOauYIUCFzb1NmXgGWIf4OCzHeoYsprmBq6c4Fqt52DuAAGGBHAWZmTe3ece7Bnt8j236-Oz9TAFBfZmiOUdmhm96Hd8OfJ5vmc6WPhcLh8u3MzFYb38TCG-1m8KhXy+QA", "AAEAjATAdALMCoAlAlgF1QUwE4AICyA9gCYYA2OAggEIAWOAogK6kbACA7wXAYF3z-z4hBIzgBQAygGMaWDMgBG2HABUoASQAaOMADYADDQAOwAMjAAuKC4dgAIEEAIYAFg+ASFFeuABGBjvQMCOSRk5RWU1LR0DY2AAYAB1RPV-aVl5JVwo7T1DEy4HNgoAQIBMgCyAATLK4E82AH4AZwBmVsaAAK5GgBiAGYBZ+04APGt+B2AAf+nAqZF4viWg0RXVwXXOBb8AKE5RAHhgfc3lwVsD7y2Gjf5PO-4AUGD6rmFLm28AcEX+Z0eCR+jy2W0BIg4U24HE+MM4HFmIy8n3BqyAA", "AAEAjATAdALMBwBBANgIwE4FMDGALALgAQDSArgOabLACAwAQMEwGBNsvtsifus9+duPTnQDIAWUwBLTOkIB1KQDsAJrlKrCAdgAMuAA7AAqMAC4wur2ABgNreGcA4G2fOH7j7WATpshcrUNFW09Q2t5eQBJb0kZOUVVdU1dAxEAAQBJgEyALLSAALY6EAB+LNySgDKAM2qSgBkAGYBZ4SEi4DdPEQ72extuiyGOy2AAFGAAGB5GB1HZ937gAEhBplHVtfYAUA9R0GEFwaWACC2mJactpcvznrZmOn2nrzoAf7eGd3277qA", "AAEAjATAdALMC4AxANgVwOYC8CmGDu2ATgGYAuAtAHK4DOpAhgCakAEA0gPaE32HACAwAEDBRAMFGTxUySBlSJ8xTLnyZggAgBRAJYA7Gl1YBZAEoswAVgAMACwAOwAFgI1gqQHBgASEkBoNXkAYAB-kOAAeGAAVEC4+NFNXQMjFjMLGwdgIIB1HIBJYG19Q0ITcys7R1EAUAEAQTwAHQBKAAEAAslffgB+AHEAOoAUXuJx3oAYgBmAWbVVSUEghOBlRIFhGRFRRdX4nYTDzcOAJGAAuIBEC+DZdSWEle6t-Ze3qTq4wXc5d0fRMdAs9RAAID6iEHyLxvKFQiHyERBQRif6Pfj-TGBHYSDFSH74sKbB7EhFvIA", "AAEAjATAdALMCwBpATgUwK4C9XIAQC1UBjAa1WAEBLgaAwGhuxhkZt6gJACEcAXACwCGuAGJgwANgm5IABn4AHYAAxgAXHZVGACGABgBgFB2bAOAB-88AAwwANAnHTmlW58ho8VJkR5SvQDqAQCSwG7IAsJiktJyiswUAIIAaABmqQACAAkMVLQA-AAxADMAs-kAATSVjqyMVKbOmtRaDABADAZNbB1NvS7A-QBQwACQTiPjzF36CbnUA4wzY4PdjFNrRk5UWqytm0s6B7MmjWvLy8dzenn7AxStj453V05AA", "AAEAjATAdALMCIBZAhgJwNYHNXIGYAIBlAF1QFMBLYs1YAQHuCYDAm2X22ROfGB0AEoALAPYA7ZPkQjiI1ACNkAV3wAtMGHwAOAAxCADsABIwALjAAQEwaN23ABBdevAP8vgjgFDOfv68EFRCSkZOUUVdU1dA2AAYAB1eIBJAOFxSWlZBWU1DW09QyYrOgBBKFxcAAEABLYASHoAfgAApha21ududhs3X1jnKyK-YZGh-3GGxx8pngGmebYbWxX2ReAG5ZGmBu3OAFBfBhtuznWR9em9uJ8AcGv18+ueBiHmZZtjnputzl-nkZAA", "AAEAjATAdALMAIBZAlgFwM4GMAWBTATgAQCSA4oQEIC0A7ABzACAwAQMOwGDveffPsgeQrkOAihg0UObwAosgB26APb5UhRIkJgYABmwAHYACxgAXCn9uAcGABIbgGgpogMAB-98ABwwACgugUHsMvJKquqa2nqGwK4A6vHECGEqahpaOvpG7ACgTACCANYAoQD4AAIABdwOjAD8pAB1fvUAZh31ADEAMwCzUpJ8cdyuwcPMVuxsAkzS8zxTrHOLQixWXDPAAJjAAPBBuwdCY7OrIRMnPA6n47V3ovmBk7NLVk9Bt8AAEA+jgbYHl8vn9LMsxEs5lNGJ4VudIaDgkA", "AAEAjATAdALMCoBZAPwG1QUwE4AICiAHgA7YCWAthgHYAuAhqjgMzACAbwnAYJ7937xADhHACgBlAMYALLBlIAjbDgDyUAGoBJTTgCsABmlFgo4AFwOl9nwDAwAKC87I4QH-XD4AAgXvv53YJGTlFZTUtHQMjYBsAdVjNEylZeSVccO09Q2NOACA2AEFeAAEAbKYWAHA2AH4AGQAZgFmagADONt8hPmt3fxd8vP7gQf9c6w4JgDhvYQm53nYlkWdOAEhhgN4Nzb5HX3nugVX5l1XZ3Zjfas3z88uDh8ugA", "AAEAjATAdALMDQBlAYgdQATIDYEsAuAXgKYBOwAgBcNQGDX20P0hOtUAoiAxgBYlE4ARqXQAZKADUAklPQAOAAw8ADsAAIwALjAAQNUpUGLABDM2bAP8Bf4KYCQ5x0-3BOvfkJHjpsxSuAAwKioUq7cfALCJGKSMvJKqtR65ACCAHwAZhkAAgDuAHXswADgFAD8AJkVAFllogAzALNlAAGOLAwGFhZOAeZ6SfQGQ-QDzmPAdGMOpo4zrH3UiyMuvQwOw870DlusAKBOlAYdTMu7Z7O7S46lV2dnV86bj1dAA", "AAEAjATAdALMDIBlAYgdQLQCUCGAXAFgKYB22ArgAQByAlgLYBGZAzsAIDvBcBgXfP-PiEEjOAFEQBjfACdCNBoRkUAMlABqASU0UAHAAZ8AB2AAEYAFxgAIC4dO-YQAgho0QH+Av8BcBINwGBdsAS0nIKSqoa2nqGJgDAqKiaIVKy8orKalo6BsZ8tmwAggB8AGZlAAIA7gB1YsAA4OwA-ACZbQBZLSoAMwCzLQABAcL89u7uwPFBIrZcM7NLHPPAAJjAAHBNbhvbzXyLoGwc9pyrbkfA-ldL-kuCAKCBp1zCZw+Cixwun9MBByWV1uf0EHHMwG4H2CHzYkwcomhoKCQA", "AAEAjATAdALMCwAVApgSwMYAtkCcAEAYgK5YDOwAgJcDQGA0N2MMhXPNUBIAsmrngHkyeCHjAA2AAyYADsAAYwALjtqjAFDAAwAwAwq9gHAA-wD-gABGAAUA3fs0uvVPyGZSIsVNnaA6r4BJYB4+fDcPUQlpOUYKAEEAEIAZgFmAAQAEhipaAH5fdQBeXIBmMtyATIqALNUQDmBDB1U2YAAgZg6aHWb2VtjGei7gfQBIezH2Hu0Gxwdp4HHe5iWHfuAAUGbNUDVs5e7GAAgDw4Mm5YWFu2NjOyoqLRz16go3hlu9vtOfoA", "AAEAjATAdALMCIB1ApgSwM7oASIE4EMBjAawCN9d1CALYAQHsYDBhW3gX3WQvfGAMAErUA9gDt8WALIiALiNzkArlgBakLGDAAGagAdgAFGABcYAGBWDRuxYAINgHA+fAP+vgAaGAAEF-4CrYCFRCWk5BWU1DS1dA3NERABJYOFxSRl5RXwVdQhNHX02ACB6AEEDYAABAAK2AEh6AH4AGQAZgFmmgADWHv8edmt3ANK+MYtAlwnR9kseBhYWayGONa4GRfW5xh4AUF5BydWggMsGmymLq64D-03uS5uuc9YHZ+O+ZxvzFdePvgMX4cFZsTYrFYzDYAj5AA", "AAEAjATAdALMAYAhATgQwK4DsAEBxAgtgOS7oA2qAzgMYAWA1qpgPaYCmRwAgMAEDACAYAJFDRIkONHCpM8ZKnieAFADKdZGwCWAIzbJsAeSgA1AJJnsAVgAMtAA7BlwALjcBPd6IDAwAKAivopSAP8h-sAAEMExsR5O6rSauvpGphbWdo7eAOo5Zgka2noGxuaWtg4i-Fz4IgACANkAzM3AAODcAPwAMgAzALNdAAECIzEKIp5hUVxz4kFeAvwCAXHriosbgaI8K8AA2MAA8LEAyMAAUFKTk-H3MVsAkMBbGy-bomvBPJ6Snp8FqJooDfL8JB1Pls3oCfrDAUA", "AAEAjATAdALMBoAlAlgF1QUwE4AICyA9gCYYA2OAGjgEQBiAhqQNYbXACAHw3AYN952B9+-EFxETOALABCWDGgBGAVwDOAYwAWOADLJFZUhhwByAMwQADJoAOJ4AHRgAXHH8AwBIDQwAFD9-CSDuAH+AT5dgABxg2LjJYFl5JTUtXX1DY3MrW3t3AHV8gElEuQVUFQ1tPQNSI1MLazt+TnYAQQA2gF4ARwABAFibABLgAEgOAH4AcoA6gBRJgBiAGYBZgD4ATK2ALOCxEU9gEJD41qCAIA94uMEEluBr7gBYcbcJABh3iWPgP4Ej3iAImz1uIgm4KCAFBzuIxGCoUEAQAIJE3WIAcHRAIB6OCnHcnB490e7Au90RD3x6KAA", "AAEAjATAdALMBIA3A9gOwAQFlkCcDmAphgOoCGANgNYA-OBwAgI8CwGAsducchPfdMAyAGUAgpnQBpAK44AlgRzoAGsvQQADBoAWAB2AAcYAFxmnAEDcAEMADAHG-34BIAP+vgAFGAAEJ-4CBYBFxKVkFJVV1LT07YmIASWCxCRl5RRU1TR19TgZRAGYigAEASoBMgCzgSxAAfgAYgBmAWbqAAJYOgJBuS2dArjyOPg5LFnsWUamglnGzEbHOdkngAHhgAGhAmwAoflG9-lXe4ZnA1eABwadrvsGAUECmfdAF-lOLzhtLdhvL7gAcBuHEuAJB03czFsTFY0xmDCYSKW-nhIPRwCAA", "AAEAjATAdALMCEAJArgcwPYHIDOACAsgKYAuAhgDbkCW2AxgBaF4BSpqAJgGbloBehaeMACAI4OIBg48aOBTp0kAuXTRAdABChAE7F6pXADEwMAGyncAHYBGO3GAAcABnoAHYAAxgAXBViFADDAAMDSAJB+KmEA-wC-wABIwADIkWnpMsCaOnoGxmYWNnaOLu7BAOrlAJJZWrr6RibmVrba9s5uysIAgu7AAAIAKbwAh2ISAPzYAMzTE5wL8wt+SgqiEX6ycv5iolvioQc7mWvKAEDHlxfhYgCgwADwwBHXR5FbH36H4hsZUX9+e4KVYrS77P7fYAACABCkhygA4LCQnC-uDlNFomJgqIJOi9p9xK8VOjkX8gA", "AAEAjATAdALMAYBlA9gO1QU1QKwCcHMMAnAAkQwEsAXLAdwtQBNjgBANjgMGB9+G748QgkRwBIAIWJUAFgEMSAMTAwAbKpJgA7AAYZABwTAAuKPZ8AMMADAvAJCiRACAD-AP+ABEYAGRH-gJ52SWl5JRV1TV0DGwB1WIBJYBCiWQVlNQ1tPUM+VgBBXIABABSALwBDrgB+ADN6uoaAAP9hPOAnQLNeWz4AIB6bDh5bcyGx9lHeMf5QXk6AcADhJcEBoWBVvl6OzZE24HXp44Cd4Ad+rvOrkQBQAMmNmeGbs86bkf8trrOzj+7rOxOM8OKwJrwjiIQf9AkA", "AAEAjATAdALMCIAVApgKwIYGcAEBJAdgC7IBOAxsgA6ED2JwAgI8wGDDsfBufsg--MAhADl0hAJY186ADbIcAWRq0SAIwA-JGtgBKAWjBgAnAAZshkwAtKwABjAwzJwCAebAJAcAUAN9MA0MAA8L6hYUzwAIIyEoQArgAmyNiIllqEhHIOqeI4yPgA5uL4yZZY2ISWyQDqAKIACthxlAUk6EnYYtjRsYny2CZ6RlBCohJSsv1KKhpaugbGZhbWwADA1dW4wCJiktJyisp0s9r6hqbmYFY27KuMkQB8AGZPAAIAAxyeDAD8ANQAUIA+D8AJmggBZPwAARwmExeDxXMAAP8o-gIta+Pi3OE8THsTHIpx49jE4AAcBJ8GAgXxJKY5MRGNJoTuXzCoU8-CZ-AAoJzQIiCYL+KtMQAIUWcdkCKnS8UcWVY0JogTwtZMFgi5gMDVEjhMnXS0VAA", "AAEAjATAdALMAoBlA9gO1QU1QKwCcHMMAnAAgAkBDASwDMqBnAYwAtgBAd4LgMC75-58QgkZwDoAIWIAXZhRIAxMDABsKkgB2ARsRJgAHAAZmAB2AAMYAFxRHfgBhgAYD4BIUSNcB-gL-AASMAAyB6hYVwckjJyispqmjqkBsZmTgDqaQCSwFFEsvJKqurausmmgmwAgmbAAAIAKQBeAIec3AD89ADMXe00-X39osL8HO7hIhxTggBAfC4uds6cXIt8c2urK8BzfLy7wADQwOOjfMen80IVfEseLm7bE1yXz1wAoGEcAOBcwndvFYPLgACEBWw8vzewOW4NCHCcHG4AM4bGmSwOkzh4KAA", "AAEAjATAdALMBwBBANgIwE4FMDGALALgAQAKAZpgJbLACAwAQLcAGDBvssfshceu-8uPXlzoB0AELoAhgDsAJkQDSAV3QVM6QgA0AagElCYABwAGXAAdgAHGABcEYw4AIYAGB2rkVwDgAf79gACRgAARvCMi2cSk5RUJVdU0dAyMzS3cAdUz9YEkZBWU1DS09QxNzKw4aRABmeoABAEqATIAshlAAfgAAtl7+vu9hdkYfKM5q0a4PNh4POjYF9mWlpmj3da3OReAAFGAAGAmpjcjZtgBIE95r3ZuAUGAniOEee5uOC+AvT+-fP5fT5RRhuOjMD5MGi7GHeJysaG0OjI6oBbZnSHAqJAA", "AAEAjATAdALMAoAVApgSwMYAtkCcAEAygA64BGueAHAHIC0AgsAIDPBsBgbXH3XIvA1vAJYcacvgBCUAJIANPGADMABkxFgAZGABcUGxatuAcGAAoLgAhBNtgFhgABFsuXLYaPEVp8xavXAAMAA6sEyCCKYYqgSeD4KymoabABAzPQAgQCZAFkAAlm5wACQzAD8AM5KSmUAAWxlADEAMwCzgvzchgD-3S5pggNBrjZD-V3AQwAwJQKGwACgwKa8gXy885uCa1ylIwJ7gvMCS64D-Mf7q9zWV2w7giv7gfMPdzYsL8Dsl6xMWyxAUd3iCgA", "AAEAjATAdALMAoBZAhgJwNYHNXIGYAIAVAewBMBTAZwCNiAXc-AYWAEBgAgN4AMGH4G9BAkMMF8xE4aLHD2AIgDqxADYrKDAJYA7dDlx18ANXKotpTZlP4AEvgDMANgAMACwAOwfMAC4sroIAsKACAKiyYgAQAP-RwAAkwACEEalp-ArKahrkOnp4hiZmuRZWqLYOLh7AAMCKigCSwEqq6lq6+oWm5pbWdk5unoKsAIIABfwAAgADAlw8APwAmgCZAFkL9lsLAGW4uLIyc8CR6bLs7GIBwACgZ-diNQ-CTwLs1-DAAHBpnz8vIjkb3OAle-AAkJxnuxIWlLsI7ql3vxREcxAAoJH8V7sU7PWqpADgzzBBPS8NksShNXYPApGTY8KZEQCfFYFwu3DeVPpXN5+PSQA", "AAEAjATAdALMAIA3A9gOwAQFlkCcDmAphgAoBmBOAJsAIDADgwAwMAGDAd0fse+h+8WrLlzYCOIcczYjePAZPFDeo+X0VT5qqRo4AoOSsPjdArcYVSBAIGAB0AEIUALgAsAhugBiEAAwAOX3QAHYAjCnQIAHZfVwAHYABMYABcKVs+AFhpDgB4KwEAaAB-gF-gAGxgACwCurq6RxcPbz9AkPCcSJj45gB1PoBJeyccN08fAKCwiOjYhL4aAEEAXIBMgCyAATXN2mAACAB+AACOI8TNo92NnRtgADQ5UT52USaxlsn2ma653uSaXEGV42RYeXqHBK5SqtUh8KMH3GrSmHVmPQSTAGwyRXza0063XmAmW622N32xzOwAuVwpJnuTzowk09044hewBBABR9osSQL+UKjML2aK+SLJWKpRLpXLZQqWJzlQJweyQahgAAqOqanWq3imEEgqxq4AASGAABgEbxLbbeABQBrqYAGKzEUCcvhmg4OnKWRgIs1m-0GjIsmhRui2F40YrFLkMiPR2gx2XxxMmjjOiP7USxxYJpNmeVhupAA", "AAEAjATAdArMDwA3A9gOwAQFlkCcDmAphgPKE7ACAlwNAYDTVcPQwyKxw1QEgBCBOAC4ALAIboAYmAAsANlnowAdgAMwgA7AAGMAC4naqwAwwAMAMAkAc4AIAP8A-4AERgAZGuevjYHwEjxKTkFZTVNUwB1CIBJX34hMUkZeUVVDQ4KAEFNYAABABSALwBD6loAfgAzaqqagADPdlYqGy4fJmZDag7Wcxom70GAIEHgEYZ6ceArVs8AaGAAKDHehj62ny916YYpwatRjgBQLyo+9h7D1YZZq+2OAHA7jvurzioAFCpaS+6qf5WPSBbxBQA", "AAEAjATAdArMAIARATgTwIYBMAEB7AZtgBLoB2yAlrgC7B0CAdwAYE2623SJz8IwCgBlAMYALXABsAXtgAyAVzEBnbAA1sYMAAZRAB2ABMYAFxejNgFBgVuh16cA-w+ABoBPY+eGwIWMkyFZTUNbT1gAGAAdUiASR8RcWk5RVEVdU0dfW96AEEcgEyALIABAGyAZnLrYAAgAH5ZABmAWbr8drqAGJbebjZzJy97GqZw4ABwTkm2aaZGWe8mVjGxgAgJ+zHWOzmI0H3OMboj3cWPE+AASD4hzmvbzht7ea4bh94L9fe9+wWvcPMP2+XkBwNuQA", "AAEAjATAdArMD4AVAFgewE4GcAuBDAJgAQDKYAshAEaEBExAxsugKb0DWzAdpgOa7c1gAQGAAgYBIBgEmVNkyQI+VKWzpykMuUiAKACF0-fNkIAFXNnQBLVCYhgADMgAOwAHjAAuFvGyA0MAAwDIACFrKAOAA-wB-wACowADY4alpEroGRibmljZ2ji5BAOrFAJLA+oacxmYW1raE9k6uskIAggAxEgACAC0AMwCzwsCSAPwAZABm0+MAzIvjAJnLAFlamrLiETK+GamqqhJboOnnEsEX8lcH+wAwwABQaY8vNzK34iIi++G3wAAkGJrjJgaCZABQNIiK6aP6gpQAgAQEKCqV212CSLRqWCAGQRJJjhJvj9hFEoqMfCpRkJycchJTqW1gAAkWks74yETMkms3HXIA", "AAEAjATAdArMBwBlALgJwIYH2CmA7A1gCcC2ADgGbarACAtwDAYAy06yyO1-QNADqUAPJQwAAjAwADAAtSwACjAAuKAZ1gAIHYBwYDxYAIbtwD-J4AHhgAJGN37avQOFiJMuQGA+fAJJOhIuJSsixaNACCABEAMwCzAAIAOXHAAJC0APwAAQzZuTnGnKxawGbAHsYV3CXl9KzqLA0MYexNmg3pWgCgwACwacY9+unsVbX1jQ5jAw7c6W2zPXZ0JZwLs6zTRhXTdrusuhvjDPtHXOp0jAt0NA00ZWM1jmcvwEA", "AAEAjATAdArMAwBZAhgJwK4BcAEAlZAlgCYCmqwAgMAEDB0BgdTDzTIrzjHXr7HrVACgBlAIKJsAaXSoCZbAA0AkkuxgYABgAWAB2ABMYAFx+VZgAhgAYCaX+rHgHhgz+2-eVgI8VJlzUiipqmrrWAOphSl5iEtKy8sqq6tp6zBSiAMxZAAIAmbkAWTSgAPwAAXTllQAxADMAs-x8TFQ8bm2eVGZMtHTsNt0DTEN0I55j3cAA4MV0AJDACwJMANCLHDZ03duzbpvzHmmeS4esAKDuk+yTHgBQG912p6NuM8-71s+HtCCtN507Lb2XqMChdLqeFoAf6hu16Zn+X0OQA", "AAEAjATAdArMCIARAYgIQASoDYEsAuAXgOYCmA7vniQE7ACAwAQMCwGAsduccj3df92-Xv27MAKAGUAxgAsA9lgLoAMgFc5AZ3QANdGDAAGWQAdgATGABcUQ04BQYI4GjuAf7fAA0MAAIrgMCWBik5RWV1LV19I1NgAGAAdUSASWBQhSVVDVltPQNjM2D6AEESgEyALIABAGyAZnqnJgB+FQAZgFmWgDM+loAYrtERDjsPYCFXO3SZTIicvJjCi2tbbkdnSaCOCZ9-HcOx2bCsyNzogrik1JP57Kj82KK+OjKqusbmxjau3v6hp0Rtxxp4pusxBx4kdITtmHZ2MwWAA4YAAWECqIx3GhLFGxRYSL4BISnAAkEwYQwKTCOFt1nZRkTaaSOAAIFm40QAcBhXNZLOB8QYrBmxzoMzoEzF5JFMteYulnBm8Dl-AYEuJoC1sPYEslOqlnnldnlgoCQA", "AAEAjATAdArMBwBpAWgWggAgLIEMB2A5gK4DOALgKZ7ACAwAQMEwGBNsvtsifus9+duPTnQCoAZQDGACwBOFAJYAjCrIwAZKAA0AkgDUMYAGwAGaQAdgABGABcYHzq1OAKGAAINgEhhwgP8Av9bAAMi+4RFMYlJyiipqmroGxmaWAMAA6hk6wBIy8sqqGtr6hqYWbIw0AIIAfQBm9QACAO4AdQAowADgDAD8AJkDAFl96gAzALN9AAHhQmxOfn4RjMJroJFbTBur7HQbADDAPuEA0Cc8aWzX+4uRt0w+Ttt0p9vsAKARdE7cLzwFkwgUxHh4Pjdwr0og92GCIetgGk6MwATCaC8Xrt2GtWBjaL9nItlkS7qSER8gA", "AAEAjATAdArMBIAlApgIwK4EsA2AXABADICy+ARAGqYAOyATmcAIDPBsBgbXH3XIvA1vABC9XAAsAhvgBiYACwA2RfjAB2AAzjqwABjAAuIJbcAMMADAXAJCCBACAD-AP+ABEYAGQ7P32xYiYlKyCsqqmtqWAOpRAJIIonQS0nJKKupaOtxMAIJZAAIAKQBeAIes7AD8AGa1NXUAAT782cD2XABAflwsJrxdbFZWfcNco2xdVtxTndwA4MCTwACwwLYD-pbAANBtAjMti6wsG3Yza6zdm7ZXvACgvn2gl7f73O2vW3YLt+fnAk8BI5HD1Fix2IDjn0mMCjnZIZ8-EA", "AAEAjATAdArMAwAZAlgIwKYBtPoAQBUoAOAdmAEAKqAwYO+4WhukZtqgDACUALAewB2AQ1wBZPgBc+AJ1RCArrgBakXGDAAGHgAdgAFGABcYAGA6lKg1oAIegHB27AP9PgAaGAAERz9-ng3PzCYpIycooqEGqaOqYA6nEAkgG8giLiUrIKyqrqWrp0AEAUAIIFAAIABfQAkBQA-IgAMwCz9QABdB0+rAwWLsDF7ENsI2b+fcwWg-TTEzP0tCO2DlP0K6OzW-4jjuN0dZN+wIfHzACgvnOsc2fM+8C2d3QPzKtnD693A-6UJpTUW5UcjTcgDXZrZ5Q4BAA", "AAEAjATAdArMCIBZAhgVwM7oAQC0C0AnDFgAoAWAbwHYCWAHsAIBPADAwAYMNz57zyG7N+PZgDQASgHt0AUwBus5ACcsAQSoBrKaiwAhLGAAcABjIAHYAGxgYEW34AoYAAgeASHtfmAJGBivQKChf2k5RRV1LR19Q1MLNgB1RIBJUJkFJVUNbV0DYzNLEMY1ADkAM3KAAQBS8wAS4E9GAH5K8paAZoBmbrbK4AAgIYF+dmAAf4mRYRZZnnGHYPth5dWQ9a5PQIA4JpFF9ZDjwMX95ZFtniPAgFAg5kFQEYuvM7duJ+D2G+4AcFebEYwjOgPszFYzA482Ks1m6xhMLByyAA"]}`),e=JSON.parse(String.raw`[{"name":"Theler Kobra MD","cost":37,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":2,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":22,"Toughness":10,"Structure":51,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Kreuzer Spinne M3","cost":32,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"3","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":109,"HandlingFull":108,"HandlingFullwBombs":108,"MaxStrain":21,"Toughness":16,"Structure":60,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Ritter Model F \"Singvogel\"","cost":28,"upkeep":1,"bomb_mass":5,"escape":"2","crash":"-1","stress":"3","DryMP":4,"WetMP":5,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":12,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":8,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-6,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":99,"MaxStrain":24,"Toughness":7,"Structure":38,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":4},{"name":"Markgraf Zerstörer B","cost":32,"upkeep":2,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":7,"WetMP":8,"WetMPwBombs":10,"DPEmpty":20,"DPFull":20,"DPwBombs":22,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":5,"StallSpeedFull":5,"StallSpeedFullwBombs":7,"Overspeed":28,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":1,"HandlingEmpty":91,"HandlingFull":90,"HandlingFullwBombs":88,"MaxStrain":26,"Toughness":10,"Structure":52,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Theler Drachen","cost":6,"upkeep":0,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"1, 0","DryMP":3,"WetMP":3,"WetMPwBombs":3,"DPEmpty":16,"DPFull":16,"DPwBombs":16,"MaxSpeedEmpty":10,"MaxSpeedFull":10,"MaxSpeedwBombs":10,"StallSpeedEmpty":2,"StallSpeedFull":2,"StallSpeedFullwBombs":2,"Overspeed":21,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":4,"Stabiilty":1,"HandlingEmpty":91,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":3,"RateOfClimbwBombs":3},{"name":"Living Grove (Farman)","cost":24,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":20,"Toughness":9,"Structure":45,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Rathenau 7k","cost":14,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":3,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":19,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":9,"Stabiilty":-2,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":20,"Toughness":7,"Structure":36,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":9,"RateOfClimbwBombs":6},{"name":"Braun VJ","cost":13,"upkeep":1,"bomb_mass":0,"escape":"0/0","crash":"-1/-1","stress":"1, 0","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":21,"MaxSpeedFull":21,"MaxSpeedwBombs":21,"StallSpeedEmpty":7,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":23,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":-1,"HandlingEmpty":79,"HandlingFull":77,"HandlingFullwBombs":77,"MaxStrain":20,"Toughness":6,"Structure":32,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":12,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":5,"RateOfClimbwBombs":3},{"name":"KW-S1","cost":29,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":17,"DPFull":17,"DPwBombs":17,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":-1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":32,"Toughness":11,"Structure":56,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":3,"RateOfClimbwBombs":3},{"name":"KW-S4","cost":42,"upkeep":2,"bomb_mass":0,"escape":"2/-3","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":42,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":-3,"HandlingEmpty":96,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":31,"Toughness":22,"Structure":51,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Ritter Model D \"SeePfau\"","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-2,"HandlingEmpty":103,"HandlingFull":102,"HandlingFullwBombs":102,"MaxStrain":26,"Toughness":5,"Structure":28,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Teicher Möwe 13S-J","cost":43,"upkeep":1,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"1(0), 1(0)","DryMP":7,"WetMP":9,"WetMPwBombs":11,"DPEmpty":18,"DPFull":18,"DPwBombs":20,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":13,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":8,"Overspeed":24,"BoostEmpty":2,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":8,"Stabiilty":0,"HandlingEmpty":97,"HandlingFull":95,"HandlingFullwBombs":93,"MaxStrain":38,"Toughness":31,"Structure":80,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":13,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":1},{"name":"Ritter \"Ersatz S\"","cost":25,"upkeep":2,"bomb_mass":0,"escape":"3","crash":"-1","stress":"3","DryMP":4,"WetMP":6,"WetMPwBombs":6,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":5,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":21,"BoostEmpty":5,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":11,"Stabiilty":-7,"HandlingEmpty":102,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":23,"Toughness":8,"Structure":43,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":9,"RateOfClimbwBombs":6},{"name":"Kreuzer Spinne V8","cost":29,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":28,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":11,"Stabiilty":-1,"HandlingEmpty":108,"HandlingFull":107,"HandlingFullwBombs":107,"MaxStrain":21,"Toughness":16,"Structure":60,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":7,"RateOfClimbEmpty":9,"RateOfClimbwBombs":7},{"name":"Hugo's Ganzmetall Wunderflugzeug!","cost":43,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"1","DryMP":7,"WetMP":8,"WetMPwBombs":8,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":1,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":8,"Stabiilty":-1,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":49,"Toughness":51,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"L&L Kessel IIb","cost":30,"upkeep":2,"bomb_mass":5,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":8,"WetMPwBombs":9,"DPEmpty":22,"DPFull":22,"DPwBombs":23,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":13,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":6,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":0,"HandlingEmpty":94,"HandlingFull":92,"HandlingFullwBombs":91,"MaxStrain":36,"Toughness":10,"Structure":52,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Ajeet Interceptor","cost":24,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-1,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":94,"MaxStrain":33,"Toughness":7,"Structure":35,"EnergyLoss":2,"EnergyLosswBombs":3,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":8,"RateOfClimbEmpty":10,"RateOfClimbwBombs":8},{"name":"Shamsher Interceptor","cost":23,"upkeep":1,"bomb_mass":10,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":13,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":10,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":6,"Stabiilty":-2,"HandlingEmpty":100,"HandlingFull":99,"HandlingFullwBombs":97,"MaxStrain":35,"Toughness":7,"Structure":35,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":2},{"name":"Bahadur Escort","cost":39,"upkeep":2,"bomb_mass":0,"escape":"2","crash":"0","stress":"1","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":101,"HandlingFull":99,"HandlingFullwBombs":99,"MaxStrain":22,"Toughness":21,"Structure":39,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Cheetal Fighter","cost":37,"upkeep":2,"bomb_mass":0,"escape":"0/0","crash":"0/0","stress":"2, 0","DryMP":5,"WetMP":8,"WetMPwBombs":8,"DPEmpty":19,"DPFull":19,"DPwBombs":19,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":4,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":21,"BoostEmpty":4,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":94,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":41,"Toughness":9,"Structure":49,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":13,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":5,"RateOfClimbwBombs":3},{"name":"Markgraf Attentäter C","cost":32,"upkeep":2,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":7,"WetMP":8,"WetMPwBombs":8,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":7,"StallSpeedFull":9,"StallSpeedFullwBombs":9,"Overspeed":42,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-4,"HandlingEmpty":94,"HandlingFull":93,"HandlingFullwBombs":93,"MaxStrain":28,"Toughness":7,"Structure":35,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Königskondor L.1","cost":70,"upkeep":1,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":48,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":13,"Stabiilty":1,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":34,"Toughness":21,"Structure":55,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Von Morgen Vampyr","cost":41,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":2,"HandlingEmpty":96,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":51,"Toughness":21,"Structure":67,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Hugo's Einzigartiger Stahl-Jagdbomber!","cost":65,"upkeep":1,"bomb_mass":5,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":9,"WetMP":10,"WetMPwBombs":11,"DPEmpty":16,"DPFull":16,"DPwBombs":17,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":16,"StallSpeedEmpty":8,"StallSpeedFull":9,"StallSpeedFullwBombs":10,"Overspeed":36,"BoostEmpty":2,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":6,"Stabiilty":-2,"HandlingEmpty":93,"HandlingFull":92,"HandlingFullwBombs":91,"MaxStrain":49,"Toughness":50,"Structure":60,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":2,"RateOfClimbwBombs":2},{"name":"Theler Kobra MB","cost":32,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":1,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":94,"MaxStrain":30,"Toughness":12,"Structure":61,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Kreuzer Skorpion","cost":33,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":6,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-3,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":37,"Toughness":15,"Structure":45,"EnergyLoss":2,"EnergyLosswBombs":3,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"KW Adler N","cost":25,"upkeep":1,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":37,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":30,"Toughness":7,"Structure":38,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Markgraf Volksfestung A","cost":70,"upkeep":7,"bomb_mass":30,"escape":"2/2/2/2/2","crash":"-1/-1/-1/-1/-1","stress":"2(0), 2(0), 0, 0, 0","DryMP":17,"WetMP":23,"WetMPwBombs":29,"DPEmpty":65,"DPFull":65,"DPwBombs":65,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":32,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":3,"HandlingEmpty":71,"HandlingFull":65,"HandlingFullwBombs":59,"MaxStrain":28,"Toughness":21,"Structure":107,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Arntwerke c.7","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":-2,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Mitscher IG J-79SF","cost":11,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":2,"WetMP":3,"WetMPwBombs":3,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":20,"BoostEmpty":5,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":8,"Stabiilty":-6,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":25,"Toughness":5,"Structure":38,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":7,"RateOfClimbEmpty":10,"RateOfClimbwBombs":7},{"name":"Recht Luftschlepper","cost":22,"upkeep":1,"bomb_mass":10,"escape":"0/0","crash":"-1/-1","stress":"2, 0","DryMP":5,"WetMP":6,"WetMPwBombs":8,"DPEmpty":25,"DPFull":25,"DPwBombs":27,"MaxSpeedEmpty":12,"MaxSpeedFull":12,"MaxSpeedwBombs":11,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":4,"Overspeed":28,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-4,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":94,"MaxStrain":46,"Toughness":10,"Structure":52,"EnergyLoss":9,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":15,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":1},{"name":"Ritter Model Cj \"Spatz\"","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":0,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":26,"Toughness":8,"Structure":40,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Theler Zweihander","cost":40,"upkeep":1,"bomb_mass":0,"escape":"-2","crash":"-1","stress":"0","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":7,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":24,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":3,"HandlingEmpty":100,"HandlingFull":99,"HandlingFullwBombs":99,"MaxStrain":33,"Toughness":21,"Structure":33,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Mitscher IG J-83 Geistliche","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2/0","crash":"-1/-1","stress":"1, 1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":23,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":2,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":94,"MaxStrain":38,"Toughness":9,"Structure":47,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":10,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Arntwerke d.13","cost":24,"upkeep":1,"bomb_mass":10,"escape":"0/0/0","crash":"-1/-1/-1","stress":"3, 1, 1","DryMP":6,"WetMP":8,"WetMPwBombs":10,"DPEmpty":22,"DPFull":22,"DPwBombs":23,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":12,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":8,"Overspeed":18,"BoostEmpty":2,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":5,"Stabiilty":-9,"HandlingEmpty":105,"HandlingFull":103,"HandlingFullwBombs":101,"MaxStrain":45,"Toughness":10,"Structure":53,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":12,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":2,"RateOfClimbwBombs":1},{"name":"Rathenau-9c","cost":13,"upkeep":1,"bomb_mass":5,"escape":"2","crash":"-1","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":5,"DPEmpty":9,"DPFull":9,"DPwBombs":10,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":8,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-1,"HandlingEmpty":105,"HandlingFull":104,"HandlingFullwBombs":103,"MaxStrain":25,"Toughness":6,"Structure":30,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":7,"RateOfClimbEmpty":9,"RateOfClimbwBombs":5},{"name":"Gernsback 0012","cost":52,"upkeep":2,"bomb_mass":0,"escape":"-2","crash":"-1","stress":"0","DryMP":6,"WetMP":8,"WetMPwBombs":8,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":8,"StallSpeedFull":11,"StallSpeedFullwBombs":11,"Overspeed":32,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":13,"Stabiilty":0,"HandlingEmpty":102,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":32,"Toughness":11,"Structure":38,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":12,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Gegenbeispeil","cost":34,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-8,"HandlingEmpty":103,"HandlingFull":102,"HandlingFullwBombs":102,"MaxStrain":32,"Toughness":24,"Structure":62,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Universität Kobra M01","cost":34,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-2","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":3,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":30,"Toughness":13,"Structure":65,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":7,"RateOfClimbwBombs":6},{"name":"Teicher Schnelles Mammut","cost":64,"upkeep":10,"bomb_mass":20,"escape":"0/2/2","crash":"-1/-1/-1","stress":"7, 6, 6","DryMP":12,"WetMP":22,"WetMPwBombs":26,"DPEmpty":45,"DPFull":45,"DPwBombs":45,"MaxSpeedEmpty":0,"MaxSpeedFull":0,"MaxSpeedwBombs":0,"StallSpeedEmpty":2,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":100,"BoostEmpty":0,"BoostFull":0,"BoostFullwBombs":0,"Dropoff":0,"Stabiilty":3,"HandlingEmpty":67,"HandlingFull":57,"HandlingFullwBombs":53,"MaxStrain":34,"Toughness":16,"Structure":80,"EnergyLoss":9,"EnergyLosswBombs":10,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":5,"ControlStress":2,"RumbleStress":6,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Rathenau-16d","cost":28,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":7,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":19,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":3,"HandlingEmpty":103,"HandlingFull":102,"HandlingFullwBombs":102,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Braun DC \"Puma\"","cost":31,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":3,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":3,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":36,"BoostEmpty":5,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":13,"Stabiilty":1,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":22,"Toughness":11,"Structure":55,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":10,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":9,"RateOfClimbEmpty":15,"RateOfClimbwBombs":9},{"name":"Ritter Model S \"Fink\"","cost":38,"upkeep":2,"bomb_mass":5,"escape":"2","crash":"-1","stress":"3","DryMP":5,"WetMP":7,"WetMPwBombs":8,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":8,"Overspeed":21,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":-6,"HandlingEmpty":99,"HandlingFull":97,"HandlingFullwBombs":96,"MaxStrain":43,"Toughness":8,"Structure":43,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":4},{"name":"Theler Eklipse","cost":60,"upkeep":5,"bomb_mass":20,"escape":"2/2/2","crash":"-1/-1/-1","stress":"2, 0, 0","DryMP":16,"WetMP":20,"WetMPwBombs":24,"DPEmpty":41,"DPFull":41,"DPwBombs":45,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":7,"Overspeed":26,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":1,"HandlingEmpty":70,"HandlingFull":66,"HandlingFullwBombs":62,"MaxStrain":20,"Toughness":20,"Structure":104,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Mitscher IG JA-81","cost":26,"upkeep":1,"bomb_mass":10,"escape":"0/0","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":7,"WetMPwBombs":9,"DPEmpty":21,"DPFull":21,"DPwBombs":23,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":12,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":24,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":7,"Stabiilty":0,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":89,"MaxStrain":43,"Toughness":10,"Structure":52,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":2,"RateOfClimbwBombs":1},{"name":"Arntwerke c.10","cost":14,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-2,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"SAM 99","cost":26,"upkeep":2,"bomb_mass":5,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":22,"MaxSpeedFull":22,"MaxSpeedwBombs":22,"StallSpeedEmpty":8,"StallSpeedFull":10,"StallSpeedFullwBombs":11,"Overspeed":42,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":3,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":95,"MaxStrain":49,"Toughness":11,"Structure":49,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":3,"TurnBleedwBombs":4,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"SAM 1144","cost":60,"upkeep":3,"bomb_mass":10,"escape":"1/1","crash":"-1/-1","stress":"1, 0","DryMP":9,"WetMP":11,"WetMPwBombs":13,"DPEmpty":21,"DPFull":21,"DPwBombs":23,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":18,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":36,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":0,"HandlingEmpty":85,"HandlingFull":83,"HandlingFullwBombs":81,"MaxStrain":39,"Toughness":18,"Structure":64,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":9,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Teicher Mammut","cost":48,"upkeep":6,"bomb_mass":20,"escape":"0/2/2","crash":"-1/-1/-1","stress":"1, 0, 0","DryMP":16,"WetMP":22,"WetMPwBombs":26,"DPEmpty":56,"DPFull":56,"DPwBombs":56,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":29,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":3,"HandlingEmpty":67,"HandlingFull":61,"HandlingFullwBombs":57,"MaxStrain":33,"Toughness":16,"Structure":80,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":17,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Mammut Smuggler Custom","cost":96,"upkeep":7,"bomb_mass":15,"escape":"0/0/0/0","crash":"-1/-1/-1/-1","stress":"2(0), 2(0), 0, 0","DryMP":22,"WetMP":28,"WetMPwBombs":31,"DPEmpty":59,"DPFull":59,"DPwBombs":59,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":7,"Overspeed":29,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":3,"HandlingEmpty":67,"HandlingFull":61,"HandlingFullwBombs":58,"MaxStrain":53,"Toughness":17,"Structure":87,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":17,"ControlStress":3,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Markgraf Totengräber A","cost":40,"upkeep":3,"bomb_mass":0,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":9,"WetMP":11,"WetMPwBombs":11,"DPEmpty":23,"DPFull":23,"DPwBombs":23,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":6,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":28,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":2,"HandlingEmpty":88,"HandlingFull":86,"HandlingFullwBombs":86,"MaxStrain":34,"Toughness":10,"Structure":54,"EnergyLoss":8,"EnergyLosswBombs":9,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Kreuzer Spinnmilbe","cost":41,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"3","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":12,"Stabiilty":-7,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":37,"Toughness":19,"Structure":45,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"KW Dickhäuter","cost":40,"upkeep":3,"bomb_mass":10,"escape":"2","crash":"-1","stress":"1","DryMP":9,"WetMP":11,"WetMPwBombs":13,"DPEmpty":23,"DPFull":23,"DPwBombs":24,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":9,"Overspeed":25,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":91,"HandlingFull":89,"HandlingFullwBombs":87,"MaxStrain":22,"Toughness":9,"Structure":45,"EnergyLoss":8,"EnergyLosswBombs":9,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Mushshak Trainer","cost":20,"upkeep":1,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"2(1), 2(1)","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":22,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":-2,"HandlingEmpty":85,"HandlingFull":84,"HandlingFullwBombs":84,"MaxStrain":22,"Toughness":6,"Structure":34,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":15,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Sonnenjäger Hummel","cost":37,"upkeep":2,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":15,"DPFull":15,"DPwBombs":15,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":34,"BoostEmpty":5,"BoostFull":4,"BoostFullwBombs":4,"Dropoff":7,"Stabiilty":0,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":42,"Toughness":10,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":7,"RateOfClimbwBombs":6},{"name":"Ritter Model ABh Eule","cost":20,"upkeep":1,"bomb_mass":10,"escape":"2","crash":"-1","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":8,"DPEmpty":16,"DPFull":16,"DPwBombs":18,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":6,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":2,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":92,"MaxStrain":21,"Toughness":7,"Structure":37,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Albrecht Kugel","cost":8,"upkeep":0,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"1, 0","DryMP":3,"WetMP":3,"WetMPwBombs":3,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":13,"StallSpeedEmpty":3,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":21,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":-3,"HandlingEmpty":95,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":23,"Toughness":5,"Structure":28,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":4,"RateOfClimbwBombs":4},{"name":"Flugzeugwerft-Neustadt Korsar","cost":22,"upkeep":1,"bomb_mass":5,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":7,"WetMPwBombs":8,"DPEmpty":19,"DPFull":19,"DPwBombs":19,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":13,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":6,"Overspeed":26,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":7,"Stabiilty":1,"HandlingEmpty":93,"HandlingFull":92,"HandlingFullwBombs":91,"MaxStrain":35,"Toughness":9,"Structure":47,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Kreuzer Zecke","cost":12,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":1,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":43,"Toughness":9,"Structure":45,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Markgraf Streiter","cost":11,"upkeep":0,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":3,"WetMP":3,"WetMPwBombs":3,"DPEmpty":9,"DPFull":9,"DPwBombs":9,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":4,"StallSpeedFullwBombs":4,"Overspeed":18,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-1,"HandlingEmpty":104,"HandlingFull":104,"HandlingFullwBombs":104,"MaxStrain":27,"Toughness":7,"Structure":38,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":6,"RateOfClimbwBombs":6},{"name":"Mitscher IG B-78","cost":26,"upkeep":1,"bomb_mass":5,"escape":"0/0","crash":"-1/-1","stress":"2, 0","DryMP":5,"WetMP":6,"WetMPwBombs":7,"DPEmpty":21,"DPFull":21,"DPwBombs":22,"MaxSpeedEmpty":12,"MaxSpeedFull":12,"MaxSpeedwBombs":11,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":26,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-5,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":96,"MaxStrain":40,"Toughness":16,"Structure":80,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Müller Experimental 3","cost":4,"upkeep":0,"bomb_mass":5,"escape":"2","crash":"0","stress":"2","DryMP":2,"WetMP":2,"WetMPwBombs":3,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":10,"MaxSpeedFull":10,"MaxSpeedwBombs":10,"StallSpeedEmpty":3,"StallSpeedFull":3,"StallSpeedFullwBombs":5,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":6,"Stabiilty":0,"HandlingEmpty":100,"HandlingFull":100,"HandlingFullwBombs":99,"MaxStrain":28,"Toughness":5,"Structure":28,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":9,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":5,"RateOfClimbwBombs":3},{"name":"SFW Flitzer","cost":11,"upkeep":0,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":2,"WetMP":2,"WetMPwBombs":2,"DPEmpty":8,"DPFull":8,"DPwBombs":8,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":2,"StallSpeedFull":2,"StallSpeedFullwBombs":2,"Overspeed":16,"BoostEmpty":4,"BoostFull":4,"BoostFullwBombs":4,"Dropoff":8,"Stabiilty":0,"HandlingEmpty":101,"HandlingFull":101,"HandlingFullwBombs":101,"MaxStrain":28,"Toughness":8,"Structure":40,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":11,"RateOfClimbEmpty":11,"RateOfClimbwBombs":11},{"name":"SFW-Rathenau Nimbus","cost":10,"upkeep":0,"bomb_mass":0,"escape":"0","crash":"1","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":18,"DPFull":18,"DPwBombs":18,"MaxSpeedEmpty":9,"MaxSpeedFull":9,"MaxSpeedwBombs":9,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":16,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":6,"HandlingEmpty":89,"HandlingFull":88,"HandlingFullwBombs":88,"MaxStrain":46,"Toughness":9,"Structure":46,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":13,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Teicher Fuchs","cost":26,"upkeep":1,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":30,"Toughness":9,"Structure":48,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Weiss Wrackbarsch","cost":19,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-2","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-3,"HandlingEmpty":109,"HandlingFull":108,"HandlingFullwBombs":108,"MaxStrain":19,"Toughness":8,"Structure":40,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Braun GA 'Gulaschkanone'","cost":20,"upkeep":1,"bomb_mass":0,"escape":"2/2","crash":"-1/-1","stress":"2, 1","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":23,"DPFull":23,"DPwBombs":23,"MaxSpeedEmpty":9,"MaxSpeedFull":9,"MaxSpeedwBombs":9,"StallSpeedEmpty":3,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":20,"BoostEmpty":1,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":5,"Stabiilty":1,"HandlingEmpty":89,"HandlingFull":88,"HandlingFullwBombs":88,"MaxStrain":43,"Toughness":10,"Structure":54,"EnergyLoss":8,"EnergyLosswBombs":9,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Ritter Model X \"Falke\"","cost":33,"upkeep":2,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":21,"MaxSpeedFull":21,"MaxSpeedwBombs":21,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":23,"BoostEmpty":5,"BoostFull":4,"BoostFullwBombs":4,"Dropoff":12,"Stabiilty":-1,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":43,"Toughness":8,"Structure":43,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":9,"RateOfClimbwBombs":6},{"name":"von Morgen Walküre","cost":46,"upkeep":2,"bomb_mass":5,"escape":"2","crash":"-1","stress":"1","DryMP":7,"WetMP":8,"WetMPwBombs":9,"DPEmpty":15,"DPFull":15,"DPwBombs":15,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":7,"StallSpeedFull":8,"StallSpeedFullwBombs":9,"Overspeed":28,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":2,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":93,"MaxStrain":35,"Toughness":26,"Structure":35,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Hugo's Metallisches Jagdflugzeug!","cost":54,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":7,"WetMP":8,"WetMPwBombs":8,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":9,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":36,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-2,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":50,"Toughness":45,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Sonnenjäger Seitenwinder","cost":30,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-2","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-7,"HandlingEmpty":110,"HandlingFull":109,"HandlingFullwBombs":109,"MaxStrain":36,"Toughness":8,"Structure":43,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Tejas Interceptor","cost":46,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":22,"MaxSpeedFull":22,"MaxSpeedwBombs":22,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":36,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":1,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":40,"Toughness":9,"Structure":47,"EnergyLoss":2,"EnergyLosswBombs":3,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":7,"RateOfClimbwBombs":6},{"name":"Sonnenjäger Haifisch","cost":35,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":0,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":40,"Toughness":11,"Structure":55,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"Albrecht Pfeil","cost":43,"upkeep":1,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"1, 0","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":28,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":8,"Stabiilty":1,"HandlingEmpty":89,"HandlingFull":88,"HandlingFullwBombs":88,"MaxStrain":34,"Toughness":24,"Structure":72,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Teicher Sperber 8N-A","cost":19,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"3","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":9,"DPFull":9,"DPwBombs":9,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-5,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":27,"Toughness":8,"Structure":40,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"Markgraf Todesbote C","cost":38,"upkeep":3,"bomb_mass":10,"escape":"2/2","crash":"1/1","stress":"2, 0","DryMP":8,"WetMP":12,"WetMPwBombs":14,"DPEmpty":25,"DPFull":25,"DPwBombs":27,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":7,"Overspeed":32,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":4,"HandlingEmpty":84,"HandlingFull":80,"HandlingFullwBombs":78,"MaxStrain":38,"Toughness":11,"Structure":56,"EnergyLoss":9,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":15,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"von Morgen Pferd","cost":145,"upkeep":10,"bomb_mass":80,"escape":"0/0/0/0/2/2/2","crash":"-1/-1/-1/-1/-1/-1/-1","stress":"4(0), 4(0), 4(0), 0, 0, 0, 0","DryMP":30,"WetMP":40,"WetMPwBombs":56,"DPEmpty":72,"DPFull":72,"DPwBombs":72,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":6,"Overspeed":25,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":9,"Stabiilty":4,"HandlingEmpty":41,"HandlingFull":31,"HandlingFullwBombs":15,"MaxStrain":32,"Toughness":41,"Structure":205,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":12,"ControlStress":5,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"von Morgen Oger","cost":36,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":8,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":36,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":2,"HandlingEmpty":94,"HandlingFull":93,"HandlingFullwBombs":93,"MaxStrain":37,"Toughness":10,"Structure":50,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":4,"RateOfClimbwBombs":4},{"name":"Dryad of Hanriot","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":1,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":41,"Toughness":11,"Structure":56,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"Thorstad S1M2b \"Schreckensgans\"","cost":39,"upkeep":2,"bomb_mass":0,"escape":"0/0","crash":"-1/-1","stress":"1(0), 1(0)","DryMP":7,"WetMP":9,"WetMPwBombs":9,"DPEmpty":17,"DPFull":17,"DPwBombs":17,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":7,"StallSpeedFull":9,"StallSpeedFullwBombs":9,"Overspeed":45,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":-2,"HandlingEmpty":97,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":40,"Toughness":9,"Structure":45,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":9,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Straßenkämpfer","cost":34,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":20,"Toughness":33,"Structure":75,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Marut Raider","cost":30,"upkeep":1,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":4,"WetMP":5,"WetMPwBombs":7,"DPEmpty":12,"DPFull":12,"DPwBombs":14,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":9,"Overspeed":25,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":1,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":96,"MaxStrain":28,"Toughness":10,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":3},{"name":"DFB Blitzgewitter","cost":49,"upkeep":2,"bomb_mass":0,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":7,"WetMP":9,"WetMPwBombs":9,"DPEmpty":18,"DPFull":18,"DPwBombs":18,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":0,"HandlingEmpty":92,"HandlingFull":90,"HandlingFullwBombs":90,"MaxStrain":41,"Toughness":9,"Structure":45,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"KZ-2 Mangusten","cost":26,"upkeep":1,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"3, 1","DryMP":6,"WetMP":7,"WetMPwBombs":9,"DPEmpty":15,"DPFull":15,"DPwBombs":16,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":14,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":10,"Overspeed":16,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":95,"MaxStrain":24,"Toughness":8,"Structure":42,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Rebuilt LM \"Viper\"","cost":19,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-5,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":27,"Toughness":8,"Structure":41,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Libelle T.87","cost":23,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"0","stress":"1","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-2,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":18,"Toughness":6,"Structure":30,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":9,"RateOfClimbEmpty":12,"RateOfClimbwBombs":9},{"name":"Mauss Z-95 Phönix","cost":44,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"0","DryMP":7,"WetMP":9,"WetMPwBombs":9,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":8,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":40,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":2,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":31,"Toughness":15,"Structure":37,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3}]`),s=new Ut(ke,!1),i=0,a=0;for(let m=0;m{(function(t={}){Ae(),removeEventListener("click",ye),Re&&Re(),Re=void 0,xe=void 0,Ge=t.getElement||Ee,Fe=t.scrollIntoView||Me,xe=new MutationObserver(we),addEventListener("click",ye),Re=void 0,fe()})(),setTimeout((()=>{window.onscroll=function(t,e){let s;return function(){clearTimeout(s),s=setTimeout(t,250)}}(He)}),1e3)}));var c=document.getElementsByClassName("collapsible");for(let t=0;tdocument.getElementById(t).offsetTop))break;s=t}We!=s&&(We=s,window.history.replaceState(null,null,"index.html#"+s))}})(); \ No newline at end of file +(()=>{"use strict";var t,e,s={},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={exports:{}};return s[t](n,n.exports,a),n.exports}e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,a.t=function(s,i){if(1&i&&(s=this(s)),8&i)return s;if("object"==typeof s&&s){if(4&i&&s.__esModule)return s;if(16&i&&"function"==typeof s.then)return s}var n=Object.create(null);a.r(n);var r={};t=t||[null,e({}),e([]),e(e)];for(var o=2&i&&s;"object"==typeof o&&!~t.indexOf(o);o=e(o))Object.getOwnPropertyNames(o).forEach((t=>r[t]=()=>s[t]));return r.default=()=>s,a.d(n,r),n},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};class n{static IsNullOrWhiteSpace(t){try{return null==t||"undefined"==t||t.toString().replace(/\s/g,"").length<1}catch(t){return console.log(t),!1}}static Join(t,...e){try{const s=e[0];if(Array.isArray(s)||s instanceof Array){let e=n.Empty;for(let i=0;i{e+=i[s]+t})),e=e.slice(0,e.length-t.length),e}const i=e;return n.join(t,...i)}catch(t){return console.log(t),n.Empty}}static Format(t,...e){try{return t.match(n.regexNumber)?n.format(n.regexNumber,t,e):t.match(n.regexObject)?n.format(n.regexObject,t,e,!0):t}catch(t){return console.log(t),n.Empty}}static format(t,e,s,i=!1){return e.replace(t,(function(t,e){const a=t.split(":");let r;return a.length>1&&(e=a[0].replace("{",""),t=a[1].replace("}","")),r=i?s[0][e]:s[e],null==r||null==r||t.match(/{\d+}/)?r:(r=n.parsePattern(t,r),void 0!==r&&null!=r?r:n.Empty)}))}static parsePattern(t,e){switch(t){case"L":return e.toLocaleLowerCase();case"U":return e.toLocaleUpperCase();case"d":if("string"==typeof e)return n.getDisplayDateFromString(e);if(e instanceof Date)return n.Format("{0:00}.{1:00}.{2:0000}",e.getDate(),e.getMonth(),e.getFullYear());break;case"s":if("string"==typeof e)return n.getSortableDateFromString(e);if(e instanceof Date)return n.Format("{0:0000}-{1:00}-{2:00}",e.getFullYear(),e.getMonth(),e.getDate());break;case"n":{"string"!=typeof e&&(e=e.toString());const t=e.replace(/,/g,".");if(isNaN(parseFloat(t))||t.length<=3)break;const s=t.split(/[^0-9]+/g);let i=s;s.length>1&&(i=[n.join("",...s.splice(0,s.length-1)),s[s.length-1]]);const a=i[0],r=a.length%3;let o=r>0?a.substring(0,r):n.Empty;const l=a.substring(r).match(/.{3}/g);return o=o+"."+n.Join(".",l),o+(i.length>1?","+i[1]:"")}case"x":return this.decimalToHexString(e);case"X":return this.decimalToHexString(e,!0)}return"number"!=typeof e&&isNaN(e)||isNaN(+t)||n.IsNullOrWhiteSpace(e)?e:n.formatNumber(e,t)}static decimalToHexString(t,e=!1){const s=parseFloat(t).toString(16);return e?s.toLocaleUpperCase():s}static getDisplayDateFromString(t){const e=t.split("-");if(e.length<=1)return t;let s=e[e.length-1];const i=e[e.length-2],a=e[e.length-3];return s=s.split("T")[0],s=s.split(" ")[0],`${s}.${i}.${a}`}static getSortableDateFromString(t){const e=t.replace(",","").split(".");if(e.length<=1)return t;const s=e[e.length-1].split(" ");let i=n.Empty;s.length>1&&(i=s[s.length-1]);let a=`${e[e.length-1].split(" ")[0]}-${e[e.length-2]}-${e[e.length-3]}`;return!n.IsNullOrWhiteSpace(i)&&i.length>1?a+=`T${i}`:a+="T00:00:00",a}static formatNumber(t,e){const s=e.length,i=t.toString();if(s<=i.length)return i;let a=s-i.length;return a+=1,new Array(a).join("0")+i}static join(t,...e){let s=n.Empty;for(let i=0;i Benefits(-)":"Penalties(+)
Benefits(-)","Used Burnt Out":"Burnt Out","Used Burnt Out Description":"Engines are at -1 Reliability","Used Ragged":"Ragged","Used Ragged Description":"Reduce your Max Speed by 10%","Used Hefty":"Hefty","Used Hefty Description":"Increase your Stall Speeds by 20%","Used Sticky Guns":"Sticky Guns","Used Sticky Guns Description":"Increase the chance of guns jamming by 1","Used Weak":"Weak","Used Weak Description":"Cut the plane\'s Toughness in half","Used Fragile":"Fragile","Used Fragile Description":"Reduce your Max Strain by 20%","Used Leaky":"Leaky","Used Leaky Description":"Reduce your Fuel by 20%","Used Sluggish":"Sluggish","Used Sluggish Description":"Reduce your Handling by 5","Weapons Section Title":"Weapons","Weapons Number of Weapon Sets":"Number of Weapon Sets:","Weapons Number of Weapon Braces":"Number of Weapon Braces:","Weapons Weapon Set":"Weapon Set","Weapons Weapons":"Weapons","Weapons Weapon Stats":"Weapon Stats","Weapons Type":"Weapon Type","Weapons Number of Mounts":"Number of Mounts","Weapons Ammunition":"Ammunition","Weapons Action":"Action","Weapons Projectile":"Projectile","Weapons Belt Fed":"Belt Fed","Weapons Stat Mounting":"Mounting","Weapons Stat Jam":"Jam","Weapons Stat Hits":"Hits","Weapons Stat Damage":"Damage","Weapons Stat Shots":"Shots","Weapons Stat Charges":"Charges per Shot","Weapons Wing Mount":"Wing Mount","Weapons Accessible":"Accessible","Weapons Free Accessible":"Free Accessible","Weapons Covered":"Covered","Weapons # Weapons at Mount":"Weapons at Mount","Weapons Synchronization":"Synchronization","Weapons Mount":"Weapon Mount","Weapons Braces":"Weapon Braces","Weapons Braces Warning":"These mounts give an observer +1 to make a Personal Attack with a loose weapon they are carrying in their hands.","Wings Section Title":"Wings","Wings Wing Stagger":"Wing Stagger:","Wings Closed Wing":"Closed Wing:","Wings Swept Wing":"Swept Wings:","Wings Wing Type":"Wing Type","Wings Wing Options":"Wing Options","Wings Wing Stats":"Wing Stats","Wings Full Wings":"Full Wings","Wings Miniature Wings":"Miniature Wings","Wings Sesquiplane":"Sesquiplane","Wings No Wing":"None","Wings Area":"Area","Wings Span":"Span","Wings Gull":"Gull","Wings Dihedral":"Dihedral","Wings Anhedral":"Anhedral","Aircraft Button Save":"Save","Aircraft Button Load":"Load","Aircraft Button Copy As Link":"Copy As Link","Aircraft Button Save Dashboard":"Save Dashboard","Aircraft Button Interactive Dashboard":"Interactive Dashboard","Aircraft Button Save NPC":"Save NPC","Aircraft Button Save Catalog":"Save Catalog","Aircraft Button Default Aircraft":"Default Aircraft","Aircraft Stats Section Title":"Total Sum of Stats","Aircraft Derived Section Title":"Aircraft Derived Statistics","Seat #":"Seat #{0}","Seats #":"Seats # {0}","Seat Location":"Choose Seat","Radiators #":"Radiators # {0}","Crew Pilot":"Pilot","Crew Bombadier":"Bombardier","Crew Co-Pilot":"Co-Pilot","Crew Gunner":"Gunner","Crew Aircrew":"Aircrew","Diesel":"Diesel Engine","Diesel Warning":"Engine won\'t catch fire.","Cargo Tiny":"A small locker for personal stuff.","Cargo Small":"Will fit a trunk, barrel, or crate.","Cargo Medium":"Will fit a small vehicle like a motorcycle, car, or zeppelin engine.","Cargo Large":"Will fit a scout or fighter aircraft with the wings taken off.","Cargo Huge":"Will fit just about anything you can imagine.","Alter Select Part":"Select Part","Alter Quantity":"Quantity","Alter Part Name":"Part Name","Alter Part Special Rules":"Special Rules","Frame Count":"Frame Count","Frame Count Warning":"This plane appears to have unused frame sections. Check to see if this is intentional.","Altitude Section Title":"Altitude Effects","Altitude Altitude":"Altitude","Rarity":"Rarity","Rarity Custom":"Custom","Rarity Common":"Common","Rarity Rare":"Rare","Rarity Legendary":"Legendary","Boost Warning":"Boost is 0 for some loads. The plane cannot accelerate to take off.","Insufficient Charge":"Insufficient Charge","Insufficient Charge Warning":"This aircraft has electrical systems with nothing to power them.","Low Mass Warning":"This aircraft is very low mass. If it is a custom airplane, be careful not to make it overpowered.","Low Drag Warning":"This aircraft is very low drag. If it is a custom airplane, be careful not to make it overpowered.","Connectivity Warning":"Can move between positions without Wingwalking.","Passenger Connectivity Warning":"Can reach the cockpit without Wingwalking.","Rotor Thickness":"Rotor Thickness"}}');var o=a.t(r,2);const l=new class{constructor(){this.lang="en"}LoadLanguages(t){this.languages=t}GetLanguages(){const t=[];for(const e of this.languages.languages)t.push(e);return t}SetCurrentLanguage(t){this.languages[t]&&(this.lang=t)}e(t){return this.languages[this.lang][t]?this.languages[this.lang][t]:this.languages.en[t]?this.languages.en[t]:(console.error("Failed to find "+t),"!"+t+"!")}};function h(t,...e){return n.Format(l.e(t),...e)}var c;l.LoadLanguages(o),function(t){t[t.WHITE=0]="WHITE",t[t.YELLOW=1]="YELLOW",t[t.RED=2]="RED"}(c||(c={}));class u{constructor(t){this.liftbleed=0,this.wetmass=0,this.mass=0,this.drag=0,this.control=0,this.cost=0,this.reqsections=0,this.visibility=0,this.flightstress=0,this.escape=0,this.pitchstab=0,this.latstab=0,this.cooling=0,this.reliability=0,this.power=0,this.fuelconsumption=0,this.maxstrain=0,this.structure=0,this.pitchspeed=0,this.pitchboost=0,this.wingarea=0,this.toughness=0,this.upkeep=0,this.crashsafety=0,this.bomb_mass=0,this.fuel=0,this.charge=0,this.warnings=[],this.era=[],t&&this.fromJSON(t,0)}toJSON(){return{liftbleed:this.liftbleed,wetmass:this.wetmass,mass:this.mass,drag:this.drag,control:this.control,cost:this.cost,reqsections:this.reqsections,visibility:this.visibility,flightstress:this.flightstress,escape:this.escape,pitchstab:this.pitchstab,latstab:this.latstab,cooling:this.cooling,reliability:this.reliability,power:this.power,fuelconsumption:this.fuelconsumption,maxstrain:this.maxstrain,structure:this.structure,pitchboost:this.pitchboost,pitchspeed:this.pitchspeed,wingarea:this.wingarea,toughness:this.toughness,upkeep:this.upkeep,crashsafety:this.crashsafety,bomb_mass:this.bomb_mass,fuel:this.fuel,charge:this.charge,warnings:this.warnings,eras:this.era}}fromJSON(t,e){if(t.liftbleed&&(this.liftbleed=t.liftbleed),t.wetmass&&(this.wetmass=t.wetmass),t.mass&&(this.mass=t.mass),t.drag&&(this.drag=t.drag),t.control&&(this.control=t.control),t.cost&&(this.cost=t.cost),t.reqsections&&(this.reqsections=t.reqsections),t.visibility&&(this.visibility=t.visibility),t.flightstress&&(this.flightstress=t.flightstress),t.escape&&(this.escape=t.escape),t.pitchstab&&(this.pitchstab=t.pitchstab),t.latstab&&(this.latstab=t.latstab),t.cooling&&(this.cooling=t.cooling),t.reliability&&(this.reliability=t.reliability),t.power&&(this.power=t.power),t.fuelconsumption&&(this.fuelconsumption=t.fuelconsumption),t.maxstrain&&(this.maxstrain=t.maxstrain),t.structure&&(this.structure=t.structure),t.pitchspeed&&(this.pitchspeed=t.pitchspeed),t.pitchboost&&(this.pitchboost=t.pitchboost),t.wingarea&&(this.wingarea=t.wingarea),t.toughness&&(this.toughness=t.toughness),t.upkeep&&(this.upkeep=t.upkeep),t.crashsafety&&(this.crashsafety=t.crashsafety),t.bomb_mass&&(this.bomb_mass=t.bomb_mass),t.fuel&&(this.fuel=t.fuel),t.charge&&(this.charge=t.charge),t.warning&&this.warnings.push({source:h(t.name),warning:h(t.warning),color:c.WHITE}),t.warnings){const e=t.warnings,s=[];for(const t of e)s.push({source:t.source,warning:t.warning});this.warnings=this.MergeWarnings(s)}if(t.era&&this.era.push({name:h(t.name),era:h(t.era)}),t.eras){const e=t.eras,s=[];for(const t of e)s.push({name:t.name,era:t.era});this.era=this.MergeEra(s)}}serialize(t){t.PushNum(this.liftbleed),t.PushNum(this.wetmass),t.PushNum(this.mass),t.PushNum(this.drag),t.PushNum(this.control),t.PushNum(this.cost),t.PushNum(this.reqsections),t.PushNum(this.visibility),t.PushNum(this.flightstress),t.PushNum(this.escape),t.PushNum(this.pitchstab),t.PushNum(this.latstab),t.PushNum(this.cooling),t.PushNum(this.reliability),t.PushNum(this.power),t.PushNum(this.fuelconsumption),t.PushNum(this.maxstrain),t.PushNum(this.structure),t.PushFloat(this.pitchboost),t.PushFloat(this.pitchspeed),t.PushNum(this.wingarea),t.PushNum(this.toughness),t.PushNum(this.upkeep),t.PushNum(this.crashsafety),t.PushNum(this.bomb_mass),t.PushNum(this.fuel),t.PushNum(this.charge),t.PushNum(this.warnings.length);for(const e of this.warnings)t.PushString(e.source),t.PushString(e.warning);t.PushNum(this.era.length);for(const e of this.era)t.PushString(e.name),t.PushString(e.era)}deserialize(t){if(this.liftbleed=t.GetNum(),this.wetmass=t.GetNum(),this.mass=t.GetNum(),this.drag=t.GetNum(),this.control=t.GetNum(),this.cost=t.GetNum(),this.reqsections=t.GetNum(),this.visibility=t.GetNum(),this.flightstress=t.GetNum(),this.escape=t.GetNum(),this.pitchstab=t.GetNum(),this.latstab=t.GetNum(),this.cooling=t.GetNum(),this.reliability=t.GetNum(),this.power=t.GetNum(),this.fuelconsumption=t.GetNum(),this.maxstrain=t.GetNum(),this.structure=t.GetNum(),this.pitchboost=t.GetFloat(),this.pitchspeed=t.GetFloat(),this.wingarea=t.GetNum(),this.toughness=t.GetNum(),this.upkeep=t.GetNum(),this.crashsafety=t.GetNum(),this.bomb_mass=t.GetNum(),this.fuel=t.GetNum(),this.charge=t.GetNum(),t.version>12.25){const e=t.GetNum();this.warnings=[];for(let s=0;s1e-6&&(e.warnings=this.warnings,e.era=this.era),e}Equal(t){return this.liftbleed==t.liftbleed&&this.wetmass==t.wetmass&&this.mass==t.mass&&this.drag==t.drag&&this.control==t.control&&this.cost==t.cost&&this.reqsections==t.reqsections&&this.visibility==t.visibility&&this.flightstress==t.flightstress&&this.escape==t.escape&&this.pitchstab==t.pitchstab&&this.latstab==t.latstab&&this.cooling==t.cooling&&this.reliability==t.reliability&&this.power==t.power&&this.fuelconsumption==t.fuelconsumption&&this.maxstrain==t.maxstrain&&this.structure==t.structure&&this.pitchspeed==t.pitchspeed&&this.pitchboost==t.pitchboost&&this.wingarea==t.wingarea&&this.toughness==t.toughness&&this.upkeep==t.upkeep&&this.crashsafety==t.crashsafety&&this.bomb_mass==t.bomb_mass&&this.fuel==t.fuel&&this.charge==t.charge}rtz(t){return t>0?Math.floor(1e-6+t):Math.ceil(-1e-6+t)}Round(){this.liftbleed=this.rtz(this.liftbleed),this.wetmass=this.rtz(this.wetmass),this.mass=this.rtz(this.mass),this.drag=this.rtz(this.drag),this.control=this.rtz(this.control),this.cost=this.rtz(this.cost),this.reqsections=this.rtz(this.reqsections),this.visibility=this.rtz(this.visibility),this.flightstress=this.rtz(this.flightstress),this.escape=this.rtz(this.escape),this.pitchstab=this.rtz(this.pitchstab),this.latstab=this.rtz(this.latstab),this.cooling=this.rtz(this.cooling),this.reliability=this.rtz(this.reliability),this.power=this.rtz(this.power),this.fuelconsumption=this.rtz(this.fuelconsumption),this.maxstrain=this.rtz(this.maxstrain),this.structure=this.rtz(this.structure),this.wingarea=this.rtz(this.wingarea),this.toughness=this.rtz(this.toughness),this.upkeep=this.rtz(this.upkeep),this.crashsafety=this.rtz(this.crashsafety),this.bomb_mass=this.rtz(this.bomb_mass),this.fuel=this.rtz(this.fuel),this.charge=this.rtz(this.charge)}Clone(){return this.Add(new u)}}const m=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return 6}},p=t=>{switch(t){case"Pioneer":return 0;case"WWI":return 1;case"Roaring 20s":return 2;case"Coming Storm":return 3;case"WWII":return 4;case"Last Hurrah":return 5;case"Himmilgard":return-1}},d=t=>{switch(t){case 0:return"Pioneer";case 1:return"WWI";case 2:return"Roaring 20s";case 3:return"Coming Storm";case 4:return"WWII";case 5:return"Last Hurrah";case 6:case-1:return"Himmilgard"}},g=t=>{var e="";for(let s=0;s0){const s=t.length-1;2==t[s].length&&t[s][0]!=t[s][1]?e+=t[s][0].toString()+"("+t[s][1].toString()+")":e+=t[s][0].toString()}return e};class _{constructor(t){this.array=new ArrayBuffer(51200),this.view=new DataView(this.array),this.offset=0}Check(){if(this.offset>=this.array.byteLength)throw"Serialization Way too long."}PushNum(t){this.view.setInt16(this.offset,t,!1),this.offset+=2,this.Check()}PushBool(t){t?this.view.setUint8(this.offset,1):this.view.setUint8(this.offset,0),this.offset+=1,this.Check()}PushString(t){var e=(new TextEncoder).encode(t);this.PushNum(e.length);for(let t=0;t=this.array.byteLength)throw"Deserialization Failed"}GetNum(){this.Check();const t=this.view.getInt16(this.offset,!1);return this.offset+=2,t}GetBool(){this.Check();const t=this.view.getUint8(this.offset);return this.offset+=1,t>0}GetString(){this.Check();const t=this.GetNum(),e=new Uint8Array(this.view.buffer,this.offset,t);let s;return this.offset+=t,s=this.version<12.65?"windows-1252":"utf-8",new TextDecoder(s).decode(e)}GetNumArr(t){this.Check();const e=this.GetNum(),s=[];for(let t=0;t0&&(n*=1.4),Math.floor(1e-6+n)}VerifyValues(){for(this.engine_displacement=Math.max(.01,this.engine_displacement),this.engine_displacement=Math.min(150,this.engine_displacement),this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.cool_sel=Math.max(0,Math.min(this.CoolingTable.length-1,this.cool_sel)),this.num_cyl_per_row=Math.floor(Math.max(1,this.num_cyl_per_row)),this.num_rows=Math.floor(Math.max(1,this.num_rows)),this.compression_ratio=Math.max(.01,this.compression_ratio),this.compression_ratio=Math.min(25,this.compression_ratio),this.rpm_boost=Math.max(.1,this.rpm_boost),this.rpm_boost=Math.min(2,this.rpm_boost),this.material_fudge=Math.max(.1,this.material_fudge),this.material_fudge=Math.min(2,this.material_fudge),this.quality_fudge=Math.max(.1,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge);this.material_fudge-1+(this.quality_fudge-1)<-.9;)this.material_fudge+=.1,this.quality_fudge+=.1;this.min_IAF=10*Math.round(1e-6+this.min_IAF/10),this.compressor_count=Math.floor(1e-6+this.compressor_count),this.compressor_count=Math.min(5,this.compressor_count),this.compressor_type==S.NONE?(this.compressor_count=0,this.min_IAF=0):this.compressor_type==S.ALTITUDE_THROTTLE?(this.compressor_count=1,this.min_IAF=0,this.upg_sel[0]=!1,this.upg_sel[1]=!1,this.upg_sel[2]=!1):(this.min_IAF=Math.max(0,this.min_IAF),this.compressor_count=Math.max(1,this.compressor_count))}EngineStats(){const t=new F;switch(t.name=this.name,this.VerifyValues(),t.stats.power=this.CalcPower(),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=Math.floor(-1.999999+this.era_sel+10*(this.quality_fudge+this.material_fudge-2)),t.stats.cooling=this.CalcCooling(),t.oiltank=this.IsRotary(),t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=this.CalcFuelConsumption(),t.altitude=this.CalcAltitude(),t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(d(this.era_sel))}),this.compressor_type){case S.NONE:break;case S.ALTITUDE_THROTTLE:t.stats.cost+=3,t.altitude=49,t.stats.warnings.push({source:h("Altitude Throttle"),warning:h("Altitude Throttle Warning"),color:c.WHITE});break;case S.SUPERCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.fuelconsumption=Math.floor(1e-6+1.25*t.stats.fuelconsumption),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=29+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e;break}case S.TURBOCHARGER:{t.stats.power=Math.floor(1e-6+1.25*t.stats.power),t.stats.mass=Math.floor(1e-6+1.2*t.stats.mass),t.stats.drag+=this.min_IAF/10*2,t.stats.cost+=1+Math.floor(1e-6+t.stats.power/50);const e=this.compressor_count-1;t.altitude=49+20*e,t.stats.reliability-=e,t.stats.mass+=e,t.stats.drag+=e,t.stats.cost+=2*e,t.stats.reqsections+=1;break}}return(this.compressor_type==S.ALTITUDE_THROTTLE||this.upg_sel[1])&&t.stats.warnings.push({source:h("War Emergency Power"),warning:h("War Emergency Power Warning"),color:c.WHITE}),t.stats.fuelconsumption=Math.max(1,t.stats.fuelconsumption),t.rarity=this.rarity,t}EngineInputs(){const t=new G;t.engine_type=y.PROPELLER,t.RPM_boost=this.rpm_boost,t.compression=this.compression_ratio,t.compressor_count=this.compressor_count,t.compressor_type=this.compressor_type,t.cyl_per_row=this.num_cyl_per_row,t.displacement=this.engine_displacement,t.era_sel=this.era_sel,t.material_fudge=this.material_fudge,t.min_IdealAlt=this.min_IAF,t.name=this.name,t.quality_fudge=this.quality_fudge,t.rows=this.num_rows,t.type=this.cool_sel;for(let e=0;e2&&(this.afterburner=!1)}EngineInputs(){const t=new G;return t.name=this.name,t.engine_type=y.TURBOMACHINERY,t.era_sel=this.era_sel,t.type=this.type_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.upgrades[0]=this.afterburner,t.rarity=this.rarity,t}GetPitchSpeed(){return this.bypass_ratio>=8?1:this.bypass_ratio>=3.5?1.1:this.bypass_ratio>=1?1.2:1.3}EngineStats(){const t=new F;this.VerifyValues();const e=this.CalcStages();return this.kN=e.thrust,this.tsfc=e.fuel/e.thrust,t.name=this.name,t.stats.power=Math.round(1e3*e.thrust/89),t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.fuelconsumption=Math.round(200*e.fuel/1e3),t.rumble=0,t.stats.cost=this.CalcCost(),t.overspeed=100,t.altitude=59,8==this.era_sel?t.stats.era.push({name:t.name,era:h(d(-1))}):t.stats.era.push({name:t.name,era:h(d(5))}),t.stats.pitchspeed=this.GetPitchSpeed(),t.rarity=this.rarity,t}}class P{constructor(){this.EraTable=[{name:"Pioneer",draw:3,drawfactor:.4,massfactor:.4,reliability:-1,costfactor:.4,overspeed:20},{name:"WWI",draw:1,drawfactor:.4,massfactor:1/3,reliability:0,costfactor:1/2.25,overspeed:25},{name:"Roaring 20s",draw:1,drawfactor:2/7,massfactor:2/7,reliability:1,costfactor:.5,overspeed:30},{name:"Coming Storm",draw:0,drawfactor:2/7,massfactor:1/4,reliability:2,costfactor:1/1.9,overspeed:35},{name:"WWII",draw:0,drawfactor:1/4,massfactor:.2,reliability:3,costfactor:1/1.8,overspeed:40},{name:"Last Hurrah",draw:0,drawfactor:.2,massfactor:1/6,reliability:4,costfactor:1/1.75,overspeed:45}],this.Winding=[{name:"Aluminum",drawmod:1.1,mass:-2,drag:1,costfactor:1,reliabilty:0},{name:"Copper",drawmod:1,mass:0,drag:0,costfactor:1,reliabilty:0},{name:"Silver",drawmod:.95,mass:1,drag:0,costfactor:1.1,reliabilty:0},{name:"Electrum",drawmod:.9,mass:2,drag:0,costfactor:1.3,reliabilty:1},{name:"Platinum",drawmod:.75,mass:3,drag:0,costfactor:2,reliabilty:2},{name:"Screamer Sinew",drawmod:.9,mass:0,drag:1,costfactor:1.75,reliabilty:4},{name:"Lightning Sprite Ephemera",drawmod:.5,mass:-2,drag:-2,costfactor:2,reliabilty:-3}],this.name="Default",this.era_sel=0,this.winding_sel=0,this.power=1,this.chonk=1,this.quality_fudge=1}EraMass(){const t=this.EraTable[this.era_sel];return Math.floor(1e-6+t.massfactor*this.power)}CalcMass(){const t=this.Winding[this.winding_sel];return Math.max(0,Math.floor(1e-6+this.EraMass()+t.mass))}CalcDrag(){const t=this.power/10,e=this.Winding[this.winding_sel].drag;return Math.max(1,Math.floor(1.000001+t+this.chonk+e))}CalcOverspeed(){const t=this.chonk/2,e=7.5*(this.quality_fudge-1);return Math.ceil(-1e-6+this.EraTable[this.era_sel].overspeed-t+e)}CalcDraw(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.draw+Math.ceil(this.power*t.drawfactor-1e-6);return Math.ceil(s*e.drawmod-1e-6)}CalcReliability(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=this.power/10,i=5*(this.quality_fudge-1);return Math.trunc(1e-6+t.reliability+this.chonk-s+i)+e.reliabilty}CalcTorque(){const t=1+this.EraMass()/10+this.chonk/4;return Math.max(1,Math.floor(1e-6+t))}CalcCost(){const t=this.EraTable[this.era_sel],e=this.Winding[this.winding_sel],s=t.costfactor*this.power,i=Math.ceil(s*Math.max(.5,this.quality_fudge)-1e-6);return Math.ceil(i*e.costfactor-1e-6)}VerifyValues(){this.era_sel=Math.max(0,Math.min(this.EraTable.length-1,this.era_sel)),this.winding_sel=Math.max(0,Math.min(this.Winding.length-1,this.winding_sel)),this.power=Math.max(1,this.power),this.power=Math.floor(1e-6+this.power),this.chonk=Math.floor(1e-6+this.chonk),this.chonk=Math.max(-10,this.chonk),this.chonk=Math.min(10,this.chonk),this.quality_fudge=Math.max(.5,this.quality_fudge),this.quality_fudge=Math.min(2,this.quality_fudge)}EngineStats(){var t=new F;return t.name=this.name,this.VerifyValues(),t.stats.power=this.power,t.stats.mass=this.CalcMass(),t.stats.drag=this.CalcDrag(),t.stats.reliability=this.CalcReliability(),t.stats.cooling=0,t.oiltank=!1,t.overspeed=this.CalcOverspeed(),t.stats.fuelconsumption=0,t.stats.charge=-this.CalcDraw(),t.altitude=100,t.torque=this.CalcTorque(),t.stats.cost=this.CalcCost(),t.pulsejet=!1,t.rumble=0,t.stats.era.push({name:this.name,era:h(d(this.era_sel))}),t}EngineInputs(){var t=new G;return t.engine_type=y.ELECTRIC,t.name=this.name,t.power=this.power,t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.material_fudge=this.chonk,t.quality_fudge=this.quality_fudge,t}}!function(t){t[t.PROPELLER=0]="PROPELLER",t[t.PULSEJET=1]="PULSEJET",t[t.TURBOMACHINERY=2]="TURBOMACHINERY",t[t.ELECTRIC=3]="ELECTRIC"}(y||(y={})),function(t){t[t.CUSTOM=0]="CUSTOM",t[t.COMMON=1]="COMMON",t[t.RARE=2]="RARE",t[t.LEGENDARY=3]="LEGENDARY"}(w||(w={}));class G{constructor(t){this.name="Default",this.engine_type=y.PROPELLER,this.type=0,this.era_sel=0,this.rarity=w.CUSTOM,this.displacement=0,this.compression=0,this.cyl_per_row=0,this.rows=0,this.RPM_boost=0,this.material_fudge=0,this.quality_fudge=0,this.compressor_type=0,this.compressor_count=0,this.min_IdealAlt=0,this.upgrades=[...Array(4).fill(!1)],this.power=0,this.quality_cost=0,this.quality_rely=0,this.starter=!1,this.flow_adjustment=0,this.diameter=0,this.compression_ratio=0,this.bypass_ratio=0,this.winding_sel=0,t&&this.fromJSON(t)}toJSON(){switch(this.engine_type){case y.PROPELLER:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,displacement:this.displacement,compression:this.compression,cyl_per_row:this.cyl_per_row,rows:this.rows,RPM_boost:this.RPM_boost,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge,compressor_type:this.compressor_type,compressor_count:this.compressor_count,min_IAF:this.min_IdealAlt,upgrades:this.upgrades,rarity:this.rarity};case y.PULSEJET:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,power:this.power,quality_cost:this.quality_cost,quality_rely:this.quality_rely,starter:this.starter,rarity:this.rarity};case y.TURBOMACHINERY:return{name:this.name,engine_type:this.engine_type,type:this.type,era_sel:this.era_sel,flow_adjustment:this.flow_adjustment,diameter:this.diameter,compression_ratio:this.compression_ratio,bypass_ratio:this.bypass_ratio,upgrades:this.upgrades,rarity:this.rarity};case y.ELECTRIC:return{name:this.name,engine_type:this.engine_type,power:this.power,era_sel:this.era_sel,winding_sel:this.winding_sel,diameter:this.diameter,material_fudge:this.material_fudge,quality_fudge:this.quality_fudge};default:throw"EngineInputs.toJSON: Oh dear, you have a new engine type."}}fromJSON(t){switch(this.name=t.name,this.engine_type=t.engine_type,this.type=t.type,this.era_sel=t.era_sel,this.engine_type){case y.PROPELLER:this.displacement=t.displacement,this.compression=t.compression,this.cyl_per_row=t.cyl_per_row,this.rows=t.rows,this.RPM_boost=t.RPM_boost,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge,this.compressor_type=t.compressor_type,this.compressor_count=t.compressor_count,this.min_IdealAlt=t.min_IAF,this.upgrades=b(t.upgrades,this.upgrades.length);break;case y.PULSEJET:this.power=t.power,this.quality_cost=t.quality_cost,this.quality_rely=t.quality_rely,this.starter=t.starter;break;case y.TURBOMACHINERY:this.flow_adjustment=t.flow_adjustment,this.diameter=t.diameter,this.compression_ratio=t.compression_ratio,this.bypass_ratio=t.bypass_ratio,this.upgrades=t.upgrades;break;case y.ELECTRIC:this.power=t.power,this.winding_sel=t.winding_sel,this.material_fudge=t.material_fudge,this.quality_fudge=t.quality_fudge;break;default:throw"EngineInputs.fromJSON: Oh dear, you have a new engine type."}t.rarity?this.rarity=t.rarity:this.rarity=w.CUSTOM}serialize(t){switch(t.PushString(this.name),t.PushNum(this.engine_type),t.PushNum(this.type),t.PushNum(this.era_sel),this.engine_type){case y.PROPELLER:t.PushFloat(this.displacement),t.PushFloat(this.compression),t.PushNum(this.cyl_per_row),t.PushNum(this.rows),t.PushFloat(this.RPM_boost),t.PushFloat(this.material_fudge),t.PushFloat(this.quality_fudge),t.PushNum(this.compressor_type),t.PushNum(this.compressor_count),t.PushNum(this.min_IdealAlt),t.PushBoolArr(this.upgrades);break;case y.PULSEJET:t.PushNum(this.power),t.PushFloat(this.quality_cost),t.PushFloat(this.quality_rely),t.PushBool(this.starter);break;case y.TURBOMACHINERY:t.PushFloat(this.flow_adjustment),t.PushFloat(this.diameter),t.PushFloat(this.compression_ratio),t.PushFloat(this.bypass_ratio),t.PushBoolArr(this.upgrades);break;case y.ELECTRIC:t.PushNum(this.power),t.PushNum(this.winding_sel),t.PushNum(this.material_fudge),t.PushFloat(this.quality_fudge);break;default:throw"EngineInputs.serialize: Oh dear, you have a new engine type."}t.PushNum(this.rarity)}deserialize(t){switch(this.name=t.GetString(),this.engine_type=t.GetNum(),this.type=t.GetNum(),this.era_sel=t.GetNum(),this.engine_type){case y.PROPELLER:this.displacement=t.GetFloat(),this.compression=t.GetFloat(),this.cyl_per_row=t.GetNum(),this.rows=t.GetNum(),this.RPM_boost=t.GetFloat(),this.material_fudge=t.GetFloat(),this.quality_fudge=t.GetFloat(),this.compressor_type=t.GetNum(),this.compressor_count=t.GetNum(),this.min_IdealAlt=t.GetNum(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case y.PULSEJET:this.power=t.GetNum(),this.quality_cost=t.GetFloat(),this.quality_rely=t.GetFloat(),this.starter=t.GetBool();break;case y.TURBOMACHINERY:this.flow_adjustment=t.GetFloat(),this.diameter=t.GetFloat(),this.compression_ratio=t.GetFloat(),this.bypass_ratio=t.GetFloat(),this.upgrades=t.GetBoolArr(this.upgrades.length);break;case y.ELECTRIC:this.power=t.GetNum(),this.winding_sel=t.GetNum(),this.material_fudge=t.GetNum(),this.quality_fudge=t.GetFloat();break;default:throw"EngineInputs.deserialize: Oh dear, you have a new engine type."}t.version>12.35?this.rarity=t.GetNum():this.rarity=w.CUSTOM}PartStats(){switch(this.engine_type){case y.PROPELLER:{const t=new B;return t.name=this.name,t.cool_sel=this.type,t.era_sel=this.era_sel,t.engine_displacement=this.displacement,t.compression_ratio=this.compression,t.num_cyl_per_row=this.cyl_per_row,t.num_rows=this.rows,t.rpm_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IAF=this.min_IdealAlt,t.upg_sel=this.upgrades,t.rarity=this.rarity,t.EngineStats()}case y.PULSEJET:{const t=new E;t.valve_sel=this.type,t.era_sel=this.era_sel,t.desired_power=this.power,t.build_quality=this.quality_cost,t.overall_quality=this.quality_rely,t.starter=this.starter,t.rarity=this.rarity;const e=t.EngineStats();return this.name=e.name,e}case y.TURBOMACHINERY:{const t=new M;return t.type_sel=this.type,t.era_sel=this.era_sel,t.flow_adjustment=this.flow_adjustment,t.diameter=this.diameter,t.compression_ratio=this.compression_ratio,t.bypass_ratio=this.bypass_ratio,t.afterburner=this.upgrades[0],t.name=this.name,t.rarity=this.rarity,t.EngineStats()}case y.ELECTRIC:{const t=new P;return t.era_sel=this.era_sel,t.winding_sel=this.winding_sel,t.power=this.power,t.chonk=this.material_fudge,t.quality_fudge=this.quality_fudge,t.name=this.name,t.EngineStats()}default:throw"EngineInputs.PartStats: Oh dear, you have a new engine type."}}Equal(t){return this.name==t.name}Clone(){const t=new G;t.name=this.name,t.engine_type=this.engine_type,t.type=this.type,t.era_sel=this.era_sel,t.displacement=this.displacement,t.compression=this.compression,t.cyl_per_row=this.cyl_per_row,t.rows=this.rows,t.RPM_boost=this.RPM_boost,t.material_fudge=this.material_fudge,t.quality_fudge=this.quality_fudge,t.compressor_type=this.compressor_type,t.compressor_count=this.compressor_count,t.min_IdealAlt=this.min_IdealAlt,t.power=this.power,t.quality_cost=this.quality_cost,t.quality_rely=this.quality_rely,t.starter=this.starter;for(let e=0;e12.35&&(this.rarity=t.GetNum()),this.stats.deserialize(t)}Clone(){const t=new F;return t.fromJSON(JSON.parse(JSON.stringify(this.toJSON()))),t}Equal(t){return this.stats.Equal(t.stats)&&this.overspeed==t.overspeed&&this.altitude==t.altitude&&this.torque==t.torque&&this.rumble==t.rumble&&this.oiltank==t.oiltank&&this.pulsejet==t.pulsejet&&this.rarity==t.rarity}Verify(){this.oiltank&&(this.stats.cooling=0),this.PulseJetCheck()}PulseJetCheck(){this.pulsejet?(this.stats.cooling=0,this.overspeed=100,this.altitude=3,this.torque=0):this.rumble=0}}const R=JSON.parse('{"l":[{"name":"Custom","engines":[{"name":"Bentley BR.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Renault V8 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":7,"compression":4,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.4,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Early-WWI","engines":[{"name":"Aeromarine K-6 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.36,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 10 Cylinder 80hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.27,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Anzani 6 cylinder 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Argus As II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":10.353,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.8,"compression":4.85,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Benz Bz.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.4,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 7Z 95hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.88,"compression":4.3,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9Bf 140hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.46,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 14 Double Lambda 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 70hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.75,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Lambda 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 7 Omega 50hp","engine_type":0,"type":2,"era_sel":0,"displacement":7.7,"compression":4,"cyl_per_row":7,"rows":1,"RPM_boost":1.49,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome monosoupape 9B 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9C 90hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.89,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.II 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.III 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"RAF 1a 90hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.88,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.9,"material_fudge":1.3,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.28,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"U.I 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Late-WWI","engines":[{"name":"Bentley BR.2 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 11EB 200hp","engine_type":0,"type":2,"era_sel":1,"displacement":21.49,"compression":5.1,"cyl_per_row":11,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 16X 420hp","engine_type":0,"type":0,"era_sel":1,"displacement":32.53333333,"compression":5,"cyl_per_row":4,"rows":4,"RPM_boost":0.87,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8F 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.98,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIav 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'18","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle III 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Eagle VIII 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 110hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Dyak 100hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.800000002,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.III 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.6,"compression":5,"cyl_per_row":11,"rows":1,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Mid-WWI","engines":[{"name":"Argus As III 190hp","engine_type":0,"type":0,"era_sel":1,"displacement":15.9,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.6,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Austro-Daimler 6 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Beardmore 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.635,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bz.IV 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.6,"compression":4.9,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Clerget 9B 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Cosmos Mercury","engine_type":0,"type":1,"era_sel":1,"displacement":19.6,"compression":5.3,"cyl_per_row":7,"rows":2,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss K-12 375hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.33,"material_fudge":0.8,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Curtiss OXX-6","engine_type":0,"type":0,"era_sel":1,"displacement":9.3,"compression":4.92,"cyl_per_row":2,"rows":4,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Fiat A.12 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9B Monosoupape 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Gnome 9N Monosoupape 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":5.1,"cyl_per_row":9,"rows":1,"RPM_boost":1.05,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Aa 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Ab 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8B 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hispano-Suiza 8Bc 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Ja 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Le Rhone 9Jb 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Liberty L-12 400hp","engine_type":0,"type":0,"era_sel":2,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.64,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Lorraine 12Da 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":24.4,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIa 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IIIaü 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Mercedes D.IVa 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Falcon III 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls-Royce Hawk 80hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.41,"compression":5.1,"cyl_per_row":1,"rows":6,"RPM_boost":0.75,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Arab 208hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.76,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.2,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Sunbeam Maori II 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":12.27,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.3,"material_fudge":1.7,"quality_fudge":0.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ur.II 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":14.4,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Pre-WWI","engines":[{"name":"Mercedes E4F 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Coming Storm","engines":[{"name":"Allison V-1710-85 1200hp","engine_type":0,"type":0,"era_sel":3,"displacement":28,"compression":6.65,"cyl_per_row":2,"rows":6,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bristol Pegasus XVIII 835hp","engine_type":0,"type":1,"era_sel":2,"displacement":28.7,"compression":6.25,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1.2,"quality_fudge":0.8,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Daimler-Benz 601ARJ 1775hp","engine_type":0,"type":0,"era_sel":3,"displacement":33.93,"compression":6.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.84,"material_fudge":0.6,"quality_fudge":0.7,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,true,false]}]},{"name":"Roaring 20s","engines":[{"name":"Argus As 5 1500hp","engine_type":0,"type":0,"era_sel":2,"displacement":94.1,"compression":5.6,"cyl_per_row":6,"rows":4,"RPM_boost":0.638,"material_fudge":0.4,"quality_fudge":1.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Bréguet Quadrimoteur Type B H-32 970hp","engine_type":0,"type":0,"era_sel":2,"displacement":48.64,"compression":5,"cyl_per_row":4,"rows":8,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion II 480hp \'20","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":5.8,"cyl_per_row":3,"rows":4,"RPM_boost":0.75,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Napier Lion XI 580hp","engine_type":0,"type":0,"era_sel":2,"displacement":24,"compression":6,"cyl_per_row":4,"rows":3,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"WWII","engines":[{"name":"Klimov M-105PF 1230hp","engine_type":0,"type":0,"era_sel":3,"displacement":35.101,"compression":7,"cyl_per_row":2,"rows":6,"RPM_boost":0.55,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Rolls Royce Merlin 46 930hp","engine_type":0,"type":0,"era_sel":3,"displacement":27,"compression":5.55,"cyl_per_row":2,"rows":6,"RPM_boost":0.98,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,true,true,false]}]},{"name":"ACDQ","engines":[{"name":"2A-Series 4-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":16,"compression":4.5,"cyl_per_row":1,"rows":2,"RPM_boost":0.5,"material_fudge":0.8,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"F-Series 6-Cylinder Inline","engine_type":0,"type":0,"era_sel":0,"displacement":17,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.07,"material_fudge":0.7,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"G-Series 9-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":16,"compression":4.7,"cyl_per_row":9,"rows":1,"RPM_boost":1.04,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hartmann H.IIc Straight-6 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":12,"compression":4.7,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Hornet R-3 Boxer 6-Cylinder","engine_type":0,"type":0,"era_sel":1,"displacement":10,"compression":5,"cyl_per_row":2,"rows":3,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Maclean-King Tiger MK.1 V-12 Engine","engine_type":0,"type":0,"era_sel":1,"displacement":17,"compression":5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Ogre-Z Beta V-6","engine_type":0,"type":0,"era_sel":0,"displacement":11,"compression":5,"cyl_per_row":1,"rows":6,"RPM_boost":1,"material_fudge":0.7,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"Pulsejet PV-12 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":12,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-20 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":20,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Pulsejet PV-8 (Pioneer)","engine_type":1,"type":0,"era_sel":0,"power":8,"quality_cost":1.1,"quality_rely":1.1,"starter":false},{"name":"Seguin Σ110 Sigma 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":1,"displacement":14,"compression":4.5,"cyl_per_row":7,"rows":1,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1.5,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"SuperPegasus 7-Cylinder Rotary Engine","engine_type":0,"type":2,"era_sel":0,"displacement":13.5,"compression":5,"cyl_per_row":7,"rows":1,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]},{"name":"TurboGoblin 8-Cylinder Semi-Radial","engine_type":0,"type":4,"era_sel":0,"displacement":13,"compression":5.5,"cyl_per_row":8,"rows":1,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false]}]},{"name":"Himmilgard Pulsejet","engines":[{"name":"Pulsejet PV-5 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":5,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-6 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":6,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-7 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":7,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-8 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":8,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-9 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":9,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-10 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":10,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-11 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":11,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-12 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":12,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-13 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":13,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-14 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":14,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1},{"name":"Pulsejet PV-15 (WWI)","engine_type":1,"type":0,"era_sel":1,"power":15,"quality_cost":1,"quality_rely":1,"starter":false,"rarity":1}]},{"name":"Himmilgard Liquid Radial","engines":[{"name":"Einsort MM 140hp","engine_type":0,"type":5,"era_sel":1,"displacement":14.72,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Einsort MR 150hp","engine_type":0,"type":5,"era_sel":1,"displacement":15.46,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.78,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Gernsback Motor 0005","engine_type":0,"type":5,"era_sel":1,"displacement":12,"compression":6,"cyl_per_row":5,"rows":2,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Liquid Cooled","engines":[{"name":"Meier Bärenjunge 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":13.5,"compression":5.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.86,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F1166 120hp","engine_type":0,"type":0,"era_sel":1,"displacement":9.4,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.9,"material_fudge":0.9,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F1466 Über 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":15,"compression":4.64,"cyl_per_row":1,"rows":6,"RPM_boost":0.95,"material_fudge":0.9,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2000 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.6,"compression":4.94,"cyl_per_row":1,"rows":6,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Brandt Krieger I 370hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.77,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Brandt Kurier XVI 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Fleischmann F10 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.3,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fleischmann F10ü 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":21.71,"compression":4.75,"cyl_per_row":1,"rows":6,"RPM_boost":1.05,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Fokker Fungizidherstellung Typ 247 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.3,"compression":4.8,"cyl_per_row":1,"rows":6,"RPM_boost":0.85,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Ochs 2 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":16.6,"compression":4.5,"cyl_per_row":1,"rows":6,"RPM_boost":0.84,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Meier Windhund 70hp","engine_type":0,"type":0,"era_sel":1,"displacement":6.3,"compression":4,"cyl_per_row":1,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":0.8,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Nationales Motorbüro Arbeiter XVII 170hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,true],"rarity":2},{"name":"Nationales Motorbüro D-1140 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.4,"compression":5.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-760tgl 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":7.6,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1.5,"quality_fudge":0.4,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro D-840 160hp","engine_type":0,"type":0,"era_sel":1,"displacement":8.4,"compression":5.5,"cyl_per_row":2,"rows":4,"RPM_boost":1.05,"material_fudge":1.5,"quality_fudge":0.6,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro Kurier XXI 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.7,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XII 150hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"SAM Kurier XX 200hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter I 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1.15,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter III 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter V 350hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.75,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Schrankhut RD.300V 230hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":6.4,"cyl_per_row":1,"rows":6,"RPM_boost":0.51,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Wollsteinkraft Verteidiger C 250hp","engine_type":0,"type":0,"era_sel":1,"displacement":24,"compression":4.9,"cyl_per_row":2,"rows":6,"RPM_boost":0.75,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Wollsteinkraft Verteidiger H 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":20,"compression":6,"cyl_per_row":2,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Wollsteinkraft Wagehals C 290hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Bertha F4398 490hp","engine_type":0,"type":0,"era_sel":1,"displacement":44.3,"compression":4.7,"cyl_per_row":3,"rows":6,"RPM_boost":0.85,"material_fudge":0.7,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Patriot 210hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Brandt Turbolader-Patriot 260hp","engine_type":0,"type":0,"era_sel":1,"displacement":17.5,"compression":5.65,"cyl_per_row":1,"rows":6,"RPM_boost":0.65,"material_fudge":0.7,"quality_fudge":1.2,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"Meier Bär 400hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Meier Eisbär 500hp","engine_type":0,"type":0,"era_sel":1,"displacement":27,"compression":5.4,"cyl_per_row":2,"rows":6,"RPM_boost":0.86,"material_fudge":0.6,"quality_fudge":1.4,"compressor_type":3,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":3},{"name":"SAM Kurier XIII 180hp","engine_type":0,"type":0,"era_sel":1,"displacement":11.2,"compression":4.8,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":1,"min_IAF":10,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Transporter IV 320hp","engine_type":0,"type":0,"era_sel":1,"displacement":22.08,"compression":4.5,"cyl_per_row":2,"rows":6,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":2},{"name":"Sonnenmotor EGH3 220hp","engine_type":0,"type":0,"era_sel":0,"displacement":20,"compression":5,"cyl_per_row":2,"rows":4,"RPM_boost":1,"material_fudge":0.9,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":50,"upgrades":[false,false,false,true],"rarity":3},{"name":"Wollsteinkraft Wagehals T 360hp","engine_type":0,"type":0,"era_sel":1,"displacement":14.4,"compression":5.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.2,"material_fudge":1,"quality_fudge":1.1,"compressor_type":3,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"SAM Kurier L 300hp","engine_type":0,"type":0,"era_sel":1,"displacement":18.4,"compression":5.3,"cyl_per_row":2,"rows":4,"RPM_boost":0.99,"material_fudge":0.8,"quality_fudge":1.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Bertha F2080 220hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.4,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Bertha F2080 Über 270hp","engine_type":0,"type":0,"era_sel":1,"displacement":19.7,"compression":4.8,"cyl_per_row":1,"rows":8,"RPM_boost":1,"material_fudge":0.6,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Contrarotary","engines":[{"name":"Nationales Motorbüro R-1860 160hp","engine_type":0,"type":3,"era_sel":1,"displacement":18.6,"compression":6,"cyl_per_row":11,"rows":1,"RPM_boost":0.65,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Nationales Motorbüro R-1190 110hp","engine_type":0,"type":3,"era_sel":1,"displacement":11.9,"compression":6,"cyl_per_row":9,"rows":1,"RPM_boost":0.67,"material_fudge":1.2,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2}]},{"name":"Himmilgard Air Cooled","engines":[{"name":"Braun UL 90hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.3,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun ULK 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":8.8,"compression":4.3,"cyl_per_row":2,"rows":4,"RPM_boost":1.2,"material_fudge":1.2,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs X 110hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.1,"compression":4.85,"cyl_per_row":5,"rows":2,"RPM_boost":0.8,"material_fudge":0.9,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Braun UX 150hp","engine_type":0,"type":1,"era_sel":1,"displacement":13.2,"compression":4.3,"cyl_per_row":2,"rows":6,"RPM_boost":1.23,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Scholz Luchs III 30hp","engine_type":0,"type":1,"era_sel":1,"displacement":3.1,"compression":4.5,"cyl_per_row":3,"rows":1,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Scholz Luchs VI 60hp","engine_type":0,"type":1,"era_sel":1,"displacement":6.23,"compression":4.5,"cyl_per_row":3,"rows":2,"RPM_boost":1,"material_fudge":1.1,"quality_fudge":0.9,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Breitbusch Libelle \'320hp\'","engine_type":0,"type":1,"era_sel":1,"displacement":22.78,"compression":4.42,"cyl_per_row":9,"rows":1,"RPM_boost":1.31,"material_fudge":1.1,"quality_fudge":0.3,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Rosevear Ankou B 180hp","engine_type":0,"type":1,"era_sel":1,"displacement":12.9,"compression":5.17,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":1.4,"quality_fudge":0.9,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Semi-Radial","engines":[{"name":"SLW Sigvird 180hp","engine_type":0,"type":4,"era_sel":1,"displacement":11,"compression":6,"cyl_per_row":4,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1.3,"compressor_type":2,"compressor_count":2,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3}]},{"name":"Himmilgard Rotary","engines":[{"name":"Modded Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":1,"compressor_count":1,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"Robur Herausforderer 180hp","engine_type":0,"type":2,"era_sel":1,"displacement":18,"compression":5.5,"cyl_per_row":5,"rows":2,"RPM_boost":0.9,"material_fudge":1,"quality_fudge":1,"compressor_type":3,"compressor_count":1,"min_IAF":40,"upgrades":[false,false,true,true],"rarity":3},{"name":"Rhona Motorbau Z11 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z11tgl 100hp","engine_type":0,"type":2,"era_sel":1,"displacement":10.9,"compression":4.5,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Rhona Motorbau Z12 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15,"compression":5,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber B.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber G.IX 110hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber O.VII 50hp","engine_type":0,"type":2,"era_sel":1,"displacement":8,"compression":4.85,"cyl_per_row":7,"rows":1,"RPM_boost":0.8,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber L.VII 80hp","engine_type":0,"type":2,"era_sel":1,"displacement":11.9,"compression":3.87,"cyl_per_row":7,"rows":1,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber TG.IX 130hp","engine_type":0,"type":2,"era_sel":1,"displacement":15.84,"compression":4.85,"cyl_per_row":9,"rows":1,"RPM_boost":0.8,"material_fudge":0.8,"quality_fudge":1,"compressor_type":2,"compressor_count":1,"min_IAF":20,"upgrades":[false,false,false,false],"rarity":1},{"name":"Schreiber T.IX 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":16.2,"compression":4.8,"cyl_per_row":9,"rows":1,"RPM_boost":0.95,"material_fudge":1,"quality_fudge":1.1,"compressor_type":2,"compressor_count":1,"min_IAF":30,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.1 150hp","engine_type":0,"type":2,"era_sel":1,"displacement":17.1,"compression":4.9,"cyl_per_row":9,"rows":1,"RPM_boost":1,"material_fudge":1,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":2},{"name":"W.O.3 230hp","engine_type":0,"type":2,"era_sel":1,"displacement":24.93,"compression":5.2,"cyl_per_row":9,"rows":1,"RPM_boost":0.9,"material_fudge":0.8,"quality_fudge":1.2,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":3},{"name":"Schreiber L.XIV 160hp","engine_type":0,"type":2,"era_sel":1,"displacement":23.8,"compression":3.87,"cyl_per_row":7,"rows":2,"RPM_boost":1.2,"material_fudge":0.8,"quality_fudge":1,"compressor_type":0,"compressor_count":0,"min_IAF":0,"upgrades":[false,false,false,false],"rarity":1}]}]}');class x{constructor(t){this.constant=!1,this.name=t,this.list=[];const e=window.localStorage.getItem("test.engines."+this.name);null!=e&&this.fromJSON(JSON.parse(e));const s=window.localStorage.getItem("test.engines_names");let i=[];s&&(i=JSON.parse(s));let a=!1;for(const e of i)if(e==t){a=!0;break}a||i.push(t),window.localStorage.setItem("test.engines_names",JSON.stringify(i))}toJSON(){const t=[];for(const e of this.list)t.push(e.toJSON());return{name:this.name,engines:t}}fromJSON(t,e=!1){t.name&&(this.name=t.name),e&&(this.list=[]);for(const s of t.engines)try{this.push(new G(s),e)}catch(t){console.error(t)}}deserializeEngine(t){if(this.constant)throw"Engine List is Constant";const e=new G;return e.deserialize(t),this.push(e)}push(t,e=!1){if(this.constant)throw"Engine List is Constant";if(e)this.remove(t);else for(let e=0;e(""+t.name).localeCompare(e.name))),window.localStorage.setItem("test.engines."+this.name,JSON.stringify(this.toJSON())),this.find(t)}get(t){return t<0||t>=this.length?new G:this.list[t]}get_name(t){const e=this.find_name(t);return this.get(e)}get_stats(t){return t<0||t>=this.length?new F:this.list[t].PartStats()}get_stats_name(t){const e=this.find_name(t);return this.get_stats(e)}find(t){for(let e=0;e=0&&this.list.splice(e,1),window.localStorage.setItem("test.engines."+this.name,JSON.stringify(this.toJSON()))}remove_name(t){if(this.constant)throw"Engine List is Constant";const e=this.find_name(t);e>=0&&this.list.splice(e,1),window.localStorage.setItem("test.engines."+this.name,JSON.stringify(this.toJSON()))}get length(){return this.list.length}SetConstant(){this.constant=!0}}const I=new Map([["Custom",new x("Custom")]]);function T(){return I}function v(t){const e=T();for(const s of e.keys())if("Custom"!=s&&e.get(s).find_name(t)>=0)return s;return e.get("Custom").find_name(t)>=0?"Custom":""}var N,D,O,k,L;function W(t){return t==N.ORNITHOPTER_BASIC||t==N.ORNITHOPTER_FLUTTER||t==N.ORNITHOPTER_BUZZER}!function(t){t[t.AIRPLANE=0]="AIRPLANE",t[t.HELICOPTER=1]="HELICOPTER",t[t.AUTOGYRO=2]="AUTOGYRO",t[t.ORNITHOPTER_BASIC=3]="ORNITHOPTER_BASIC",t[t.ORNITHOPTER_FLUTTER=4]="ORNITHOPTER_FLUTTER",t[t.ORNITHOPTER_BUZZER=5]="ORNITHOPTER_BUZZER"}(N||(N={}));class H{FormatEquipment(t,e,s){return Math.abs(s)>.5?t.push({source:h(e),charge:s.toString()}):s>0&&s<1e-6&&t.push({source:h(e),charge:"-"}),t}}function q(t,e){for(let s=0;s0&&t.push({name:s.name,stats:s.stats.toJSON(),qty:s.qty});return window.localStorage.setItem("test.CustomParts",JSON.stringify(e)),{part_list:t}}fromJSON(t,e){for(const t of this.custom_parts)t.qty=0;for(const e of t.part_list){const t=this.custom_parts.findIndex((t=>t.name==e.name));-1==t?this.custom_parts.push({name:e.name,stats:new u(e.stats),qty:e.qty}):this.custom_parts[t].qty=e.qty}}serialize(t){const e=[];for(const t of this.custom_parts)t.qty>0&&e.push({name:t.name,stats:t.stats,qty:t.qty});t.PushNum(e.length);for(const s of e)t.PushString(s.name),s.stats.serialize(t),t.PushNum(s.qty)}deserialize(t){for(const t of this.custom_parts)t.qty=0;const e=t.GetNum();for(let i=0;it.name==e));-1==s?(s=this.custom_parts.length,this.custom_parts.push({name:e,stats:i,qty:a})):this.custom_parts[s].qty=a}}IsDefault(){for(const t of this.custom_parts)if(t.qty>0)return!1;return!0}ClearAll(){for(const t of this.custom_parts)t.qty=0}AddPart(t,e){var s=0;if(s+=Math.abs(e.drag),s+=Math.abs(e.mass),s+=Math.abs(e.wetmass),s+=Math.abs(e.bomb_mass),s+=Math.abs(e.cost),s+=Math.abs(e.upkeep),s+=Math.abs(e.liftbleed),s+=Math.abs(e.wingarea),s+=Math.abs(e.control),s+=Math.abs(e.pitchstab),s+=Math.abs(e.latstab),s+=Math.abs(e.maxstrain),s+=Math.abs(e.structure),s+=Math.abs(e.toughness),s+=Math.abs(e.power),s+=Math.abs(e.fuelconsumption),s+=Math.abs(e.fuel),s+=Math.abs(e.charge),s+=Math.abs(e.crashsafety),s+=Math.abs(e.visibility),s+=Math.abs(e.escape),s+=Math.abs(e.reliability),0==(s+=Math.abs(e.warnings.length)))return;const i=this.custom_parts.findIndex((e=>e.name==t));-1!=i?this.custom_parts[i].stats=e:this.custom_parts.push({name:t,stats:e,qty:0}),this.custom_parts.sort(((t,e)=>t.name.localeCompare(e.name))),this.CalculateStats()}RemovePart(t){const e=this.custom_parts.findIndex((e=>e.name==t));-1!=e&&this.custom_parts.splice(e,1),this.CalculateStats()}GetParts(){return this.custom_parts}SetUsedPart(t,e){this.custom_parts[t].qty=e,this.CalculateStats()}PartStats(){var t=new u;for(const e of this.custom_parts)if(e.qty>0){let s=e.stats.Clone();s=s.Multiply(e.qty),t=t.Add(s)}return t}GetElectrics(){var t=[];for(const e of this.custom_parts)e.qty>0&&(t=this.FormatEquipment(t,e.name,e.stats.charge));return{storage:0,equipment:t}}SetCalculateStats(t){this.CalculateStats=t}}class z extends H{constructor(t){super(),this.selected=0,this.vals=[];for(const e of t.options){const t={name:e.name,maxbomb:e.maxbomb,cant_lift:e.cant_lift,stats:new u(e)};this.vals.push(t)}}toJSON(){return{selected:this.selected}}fromJSON(t,e){this.selected=t.selected,e<10.35&&this.selected>2&&this.selected++}serialize(t){t.PushNum(this.selected)}deserialize(t){this.selected=t.GetNum()}GetSelected(){return this.selected}GetSelectedText(){return this.vals[this.selected].name}SetSelected(t){this.selected=t,this.CalculateStats()}GetEraOptions(){return this.vals}GetLiftBleed(){return this.vals[this.selected].stats.liftbleed}GetMaxBomb(){return this.vals[this.selected].maxbomb}GetCantLift(){return this.vals[this.selected].cant_lift}PartStats(){var t=new u;return t.Add(this.vals[this.selected].stats)}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class J extends H{constructor(t,e,s,i){super(),this.stats=new u,this.types=t,this.upgrades=e,this.safety=s,this.gunsights=i,this.selected_type=0,this.selected_upgrades=[...Array(this.upgrades.length).fill(!1)],this.selected_safety=[...Array(this.safety.length).fill(!1)],this.selected_gunsights=[...Array(this.gunsights.length).fill(!1)],this.total_stress=[0,0],this.total_escape=0,this.total_visibility=0,this.seat_index=0,this.bombsight=0,this.is_armed=!1}toJSON(){return{type:this.selected_type,upgrades:this.selected_upgrades,safety:this.selected_safety,sights:this.selected_gunsights,bombsight:this.bombsight}}fromJSON(t,e){this.selected_type=t.type,this.selected_upgrades=b(t.upgrades,this.selected_upgrades.length),this.selected_safety=b(t.safety,this.selected_safety.length),this.selected_gunsights=b(t.sights,this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),e>10.35&&(this.bombsight=t.bombsight)}serialize(t){t.PushNum(this.selected_type),t.PushBoolArr(this.selected_upgrades),t.PushBoolArr(this.selected_safety),t.PushBoolArr(this.selected_gunsights),t.PushNum(this.bombsight)}deserialize(t){this.selected_type=t.GetNum(),this.selected_upgrades=t.GetBoolArr(this.selected_upgrades.length),this.selected_safety=t.GetBoolArr(this.selected_safety.length),this.selected_gunsights=t.GetBoolArr(this.selected_gunsights.length),this.IsPrimary()&&(this.selected_upgrades[0]=!1),t.version>10.35&&(this.bombsight=t.GetNum())}GetTypeList(){return this.types}GetUpgradeList(){return this.upgrades}GetSafetyList(){return this.safety}GetGunsightList(){return this.gunsights}GetType(){return this.selected_type}SetType(t){if(t>=this.types.length)throw"Selected type is not in range of actual types.";this.selected_type=t,this.CalculateStats()}GetSelectedUpgrades(){return this.selected_upgrades}SetUpgrade(t,e){if(t>=this.upgrades.length)throw"Selected type is not in range of actual upgrades.";this.selected_upgrades[t]=e,this.CalculateStats()}GetSelectedSafety(){return this.selected_safety}CanSafety(){const t=Array(this.safety.length).fill(!0);return t[5]=!this.types[this.selected_type].exposed,t}SetSafety(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual safties.";this.selected_safety[t]=e,this.CalculateStats()}GetSelectedGunsights(){return this.selected_gunsights}SetGunsight(t,e){if(t>=this.safety.length)throw"Selected type is not in range of actual gunsights.";this.selected_gunsights[t]=e,this.CalculateStats()}GetVisibility(){return this.types[this.selected_type].stats.visibility<-10?-1/0:this.total_visibility}GetFlightStress(){return this.total_stress}GetEscape(){return this.total_escape}GetCrash(){return this.total_crash}GetAttack(){var t=0;for(let e=0;e0&&(t=t-t%3+1),this.bombsight=t,this.CalculateStats()}SetHasRotary(t){this.has_rotary=t}IsElectrics(){return 0!=this.stats.charge}IsCopilot(){return this.selected_upgrades[0]}SetArmed(t){this.is_armed=t}GetName(){return this.IsPrimary()?"Crew Pilot":this.bombsight>0?"Crew Bombadier":this.IsCopilot()?"Crew Co-Pilot":this.is_armed?"Crew Gunner":"Crew Aircrew"}PartStats(){let t=new u;t.reqsections=1,t=t.Add(this.types[this.selected_type].stats);for(let e=0;e0&&(t.cost+=Math.floor(2.000001+(this.bombsight-4)/3),t.warnings.push({source:h("Bombsight"),warning:h("Bombsight Warning 1")+this.bombsight.toString()+h("Bombsight Warning 2"),color:c.WHITE}),this.IsCopilot()&&t.warnings.push({source:h("Bombadier Controls"),warning:h("Bombadier Controls Warning"),color:c.WHITE})),this.stats=t.Clone(),this.selected_upgrades[0]?(t.flightstress=this.upgrades[0].stats.flightstress,this.stats.flightstress-=t.flightstress):t.flightstress=0,t}CrewUpdate(t,e,s,i,a,n){this.total_escape=this.stats.escape+t;let r=this.stats.flightstress,o=this.stats.flightstress;(this.IsPrimary()||this.selected_upgrades[0])&&(r+=e,o+=e-2*i),r=Math.max(0,r),o=Math.max(0,o),r+=s,o+=s,this.IsOpen()&&this.has_rotary&&(r+=1,o+=1),r=Math.max(0,r),o=Math.max(0,o),this.total_stress=[r,o],this.total_visibility=this.stats.visibility+a,this.total_crash=this.stats.crashsafety+n}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){var t=[];for(let e=0;et;)this.positions.pop();var e=null;for(this.positions.length>0&&(e=JSON.stringify(this.positions[this.positions.length-1].toJSON()));this.positions.length0}GetConnected(){return this.connected}SetConnected(t){this.connected=t,this.CalculateStats()}PartStats(){const t=new u;return t.reqsections=2*Math.ceil((this.seats+2*this.beds)/5-1e-6),this.seats+this.beds>0&&this.connected&&(t.mass=1,t.warnings.push({source:h("Passengers Section Title"),warning:h("Passenger Connectivity Warning"),color:c.WHITE})),t.bomb_mass+=this.seats+this.beds,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),this.seats+this.beds>0&&t.warnings.push({source:h("Passengers Section Title"),warning:h("Passengers Count",this.seats,this.beds),color:c.WHITE}),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){return{storage:0,equipment:[]}}}class Q extends H{constructor(t,e){super();const s=T();if(this.elist_idx="Custom",this.etype_stats=s.get(this.elist_idx).get_stats(0),this.etype_inputs=s.get(this.elist_idx).get(0),this.cooling_count=this.etype_stats.stats.cooling,this.radiator_index=-1,this.cooling_count>0&&(this.radiator_index=0),this.num_radiators=0,this.mount_list=t,this.mount_sel=0,this.intake_fan=!1,this.use_pp=!1,this.torque_to_struct=!1,this.cowl_list=e,this.cowl_sel=0,this.use_ds=!1,this.outboard_prop=!1,this.gp_count=0,this.gpr_count=0,this.total_reliability=0,this.is_generator=!1,this.has_alternator=!1,s.get(this.elist_idx).length<=0)throw"No Engine Stats Found. Should be at least one."}toJSON(){return{selected_stats:this.etype_stats.toJSON(),selected_inputs:this.etype_inputs.toJSON(),cooling_count:this.cooling_count,radiator_index:this.radiator_index,selected_mount:this.mount_sel,use_pushpull:this.use_pp,pp_torque_to_struct:this.torque_to_struct,use_driveshafts:this.use_ds,geared_propeller_ratio:this.gp_count,geared_propeller_reliability:this.gpr_count,cowl_sel:this.cowl_sel,is_generator:this.is_generator,has_alternator:this.has_alternator,intake_fan:this.intake_fan,outboard_prop:this.outboard_prop}}oldJSON(t,e){const s=t.selected_stats;if(this.etype_stats.fromJSON(s,e),this.etype_inputs=new G,this.etype_stats.pulsejet&&s.input_pj){this.etype_inputs=new G,this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=y.PULSEJET;const t=s.input_pj;this.etype_inputs.type=t.type,this.etype_inputs.power=t.power,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.quality_cost=t.quality_cost,this.etype_inputs.quality_rely=t.quality_rely,this.etype_inputs.starter=t.starter}else if(s.input_eb){this.etype_inputs.name=this.etype_stats.name,this.etype_inputs.engine_type=y.PROPELLER;const t=s.input_eb;this.etype_inputs.displacement=t.displacement,this.etype_inputs.compression=t.compression,this.etype_inputs.type=t.type,this.etype_inputs.cyl_per_row=t.cyl_per_row,this.etype_inputs.rows=t.rows,this.etype_inputs.RPM_boost=t.RPM_boost,this.etype_inputs.era_sel=t.era_sel,this.etype_inputs.material_fudge=t.material_fudge,this.etype_inputs.quality_fudge=t.quality_fudge,this.etype_inputs.upgrades=t.upgrades,6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.compressor_type,this.etype_inputs.compressor_count=t.compressor_count,this.etype_inputs.min_IdealAlt=t.min_IAF)}else this.etype_stats.altitude=10*this.etype_stats.altitude-1;return this.etype_inputs}fromJSON(t,e){const s=T();let i="";if(e>10.55){this.etype_stats.fromJSON(t.selected_stats,e);const a=new G(t.selected_inputs);i=v(this.etype_stats.name),""==i&&(i="Custom","Default"!=a.name&&s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name)}else{const a=this.oldJSON(t,e);"Default"!=a.name&&(i=v(this.etype_stats.name),""==i&&(i="Custom",s.get(i).push(a)),this.etype_stats=s.get(i).get_stats_name(this.etype_stats.name),this.etype_inputs=s.get(i).get_name(this.etype_stats.name))}this.elist_idx=i,this.cooling_count=t.cooling_count,this.radiator_index=t.radiator_index,this.mount_sel=t.selected_mount,this.use_pp=t.use_pushpull,this.torque_to_struct=t.pp_torque_to_struct,this.use_ds=t.use_driveshafts,this.gp_count=t.geared_propeller_ratio,this.gpr_count=t.geared_propeller_reliability,this.cowl_sel=t.cowl_sel,this.is_generator=t.is_generator,this.has_alternator=t.has_alternator,this.intake_fan=t.intake_fan,this.outboard_prop=e>=12.15&&t.outboard_prop}serialize(t){this.etype_stats.serialize(t),this.etype_inputs.serialize(t),t.PushNum(this.cooling_count),t.PushNum(this.radiator_index),t.PushNum(this.mount_sel),t.PushBool(this.use_pp),t.PushBool(this.torque_to_struct),t.PushBool(this.use_ds),t.PushNum(this.gp_count),t.PushNum(this.gpr_count),t.PushNum(this.cowl_sel),t.PushBool(this.is_generator),t.PushBool(this.has_alternator),t.PushBool(this.intake_fan),t.PushBool(this.outboard_prop)}oldDeserialize(t){return this.etype_stats.name=t.GetString(),this.etype_stats.overspeed=t.GetNum(),this.etype_stats.altitude=t.GetNum(),this.etype_stats.torque=t.GetNum(),this.etype_stats.rumble=t.GetNum(),this.etype_stats.oiltank=t.GetBool(),this.etype_stats.pulsejet=t.GetBool(),this.etype_inputs=new G,t.version>10.45?(this.etype_inputs.name=this.etype_stats.name,this.etype_stats.pulsejet?(this.etype_inputs.engine_type=y.PULSEJET,this.etype_inputs.power=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.quality_cost=t.GetNum(),this.etype_inputs.quality_rely=t.GetNum(),this.etype_inputs.starter=t.GetBool()):(this.etype_inputs.displacement=t.GetNum(),this.etype_inputs.compression=t.GetNum(),this.etype_inputs.type=t.GetNum(),this.etype_inputs.cyl_per_row=t.GetNum(),this.etype_inputs.rows=t.GetNum(),this.etype_inputs.RPM_boost=t.GetNum(),this.etype_inputs.era_sel=t.GetNum(),this.etype_inputs.material_fudge=t.GetNum(),this.etype_inputs.quality_fudge=t.GetNum(),this.etype_inputs.upgrades=t.GetBoolArr(0),6==this.etype_inputs.upgrades.length?(this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_inputs.upgrades[0]&&(this.etype_inputs.compressor_type=2,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades[1]&&(this.etype_inputs.compressor_type=3,this.etype_inputs.compressor_count=1),this.etype_inputs.upgrades.splice(0,2)):(this.etype_inputs.compressor_type=t.GetNum(),this.etype_inputs.compressor_count=t.GetNum(),this.etype_inputs.min_IdealAlt=t.GetNum()))):this.etype_stats.altitude=10*this.etype_stats.altitude-1,this.etype_stats.stats.deserialize(t),this.etype_inputs}deserialize(t){const e=T();var s="";if(t.version>10.55){this.etype_stats.deserialize(t);const i=new G;i.deserialize(t),""==(s=v(this.etype_stats.name))&&(s="Custom","Default"!=i.name&&e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name)}else{const i=this.oldDeserialize(t);"Default"!=i.name&&(""==(s=v(this.etype_stats.name))&&(s="Custom",e.get(s).push(i)),this.etype_stats=e.get(s).get_stats_name(this.etype_stats.name),this.etype_inputs=e.get(s).get_name(this.etype_stats.name))}this.cooling_count=t.GetNum(),this.radiator_index=t.GetNum(),this.mount_sel=t.GetNum(),this.use_pp=t.GetBool(),this.torque_to_struct=t.GetBool(),this.use_ds=t.GetBool(),this.gp_count=t.GetNum(),this.gpr_count=t.GetNum(),this.cowl_sel=t.GetNum(),this.is_generator=t.GetBool(),this.has_alternator=t.GetBool(),this.intake_fan=t.GetBool(),t.version>=12.15?this.outboard_prop=t.GetBool():this.outboard_prop=!1,this.elist_idx=s}GetMinAltitude(){return this.etype_inputs.min_IdealAlt}GetMaxAltitude(){return this.GetMinAltitude()+this.etype_stats.altitude}GetMinIAF(){return Math.floor(1e-6+this.GetMinAltitude()/10)}GetMaxIAF(){return Math.floor(1e-6+this.GetMaxAltitude()/10)}CanSelectIndex(){const t=T().get(this.elist_idx),e=[...Array(t.length).fill(!0)];if(this.is_internal)for(let s=0;s0}WarnCoolingReliability(){return this.cooling_count=t&&(this.radiator_index=t-1),this.radiator_index<0&&t>0&&(this.radiator_index=0)}GetNumRadiators(){return this.num_radiators}SetRadiator(t){this.radiator_index=t,this.CalculateStats()}GetRadiator(){return this.radiator_index}CanIntakeFan(){return this.IsAirCooled()}SetIntakeFan(t){this.intake_fan=t,this.CalculateStats()}GetIntakeFan(){return this.intake_fan}CanOutboardProp(){return this.use_ds&&(this.IsTractor()||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}GetOutboardProp(){return this.outboard_prop}SetOutboardProp(t){t&&this.use_ds?this.outboard_prop=!0:this.outboard_prop=!1,this.CalculateStats()}SetSelectedList(t){t!=this.elist_idx&&(this.elist_idx=t,this.SetSelectedIndex(0))}GetSelectedList(){return this.elist_idx}GetListOfEngines(){return T().get(this.elist_idx)}RequiresExtendedDriveshafts(){return!this.is_internal&&this.mount_list[this.mount_sel].reqED}SetTailMods(t,e,s){!this.mount_list[this.mount_sel].reqTail||t||e||this.GetGenerator()||(this.use_ds=!0),!this.mount_list[this.mount_sel].reqED||this.GetGenerator()||s&&(t||e)||(this.use_ds=!0)}CanMountIndex(){var t=[...Array(this.mount_list.length).fill(!0)];if(this.is_internal)for(let e=0;e=this.mount_list.length)throw"Index outside of mount_list range.";this.mount_sel=t,this.mount_list[this.mount_sel].reqED?this.SetUseExtendedDriveshaft(!0):this.CalculateStats()}GetMountIndex(){return this.GetIsPulsejet()?-1:this.mount_sel}CanUsePushPull(){return!(this.is_generator||this.GetIsJet()||this.is_internal||this.mount_list[this.mount_sel].helicopter)}SetUsePushPull(t){this.use_pp=t,t?(this.cooling_count*=2,"fuselage"==this.mount_list[this.mount_sel].mount_type&&(this.mount_sel=8)):(this.cooling_count=Math.floor(1e-6+this.cooling_count/2),"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(this.mount_sel=0)),this.CalculateStats()}GetUsePushPull(){return this.use_pp}GetMountList(){return this.mount_list}CanUseExtendedDriveshaft(){return!(0==this.GetNumPropellers()||this.is_internal||this.GetGenerator()||this.mount_list[this.mount_sel].helicopter)}SetUseExtendedDriveshaft(t){this.GetGenerator()||this.is_internal?this.use_ds=!1:this.use_ds=t,this.CalculateStats()}GetUseExtendedDriveshaft(){return this.use_ds}CanUseGears(){return!(0==this.GetNumPropellers()||this.GetGenerator())}SetGearCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gp_count=t,this.SetGearReliability(this.gpr_count)}GetGearCount(){return this.gp_count}SetGearReliability(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.gpr_count=Math.min(t,this.gp_count),this.CalculateStats()}GetGearReliability(){return this.gpr_count}SetTorqueToStruct(t){this.torque_to_struct=t,this.use_pp||(this.torque_to_struct=!1),this.CalculateStats()}GetTorqueToStruct(){return this.torque_to_struct}CanTorqueToStruct(){return this.use_pp&&this.etype_stats.torque>0&&"pod"!=this.mount_list[this.mount_sel].mount_type}UpdateReliability(t){this.total_reliability=this.etype_stats.stats.reliability,this.total_reliability-=this.gp_count-this.gpr_count,this.total_reliability+=this.cowl_list[this.cowl_sel].stats.reliability,this.NeedCooling()&&(this.total_reliability-=this.GetMaxCooling()-this.cooling_count),this.GetIntakeFan()&&(this.total_reliability+=6),this.total_reliability+=t}GetReliability(){return this.use_pp?this.outboard_prop?this.total_reliability.toString()+"/"+(this.total_reliability-2).toString():this.total_reliability.toString()+"/"+this.total_reliability.toString():this.outboard_prop?(this.total_reliability-2).toString():this.total_reliability.toString()}GetOverspeed(){return this.is_generator?1e3:this.etype_stats.overspeed+Math.floor(1e-6+this.gp_count*this.etype_stats.overspeed/2)}GetIsPulsejet(){return this.etype_stats.pulsejet}GetIsJet(){return this.GetIsPulsejet()||this.GetIsTurbine()&&!this.GetIsTurboprop()}PulseJetCheck(){this.GetIsPulsejet()&&(this.use_pp=!1,this.use_ds=!1,this.gp_count=0,this.gpr_count=0,this.cooling_count=0,this.has_alternator=!1,this.is_generator=!1,this.cowl_sel=0,this.radiator_index=-1)}GetIsTurbine(){return this.etype_inputs.engine_type==y.TURBOMACHINERY}GetIsTurboprop(){return this.etype_inputs.engine_type==y.TURBOMACHINERY&&3==this.etype_inputs.type}TurbineCheck(){this.GetIsTurbine()&&(0==this.GetNumPropellers()&&(this.use_ds=!1,this.gp_count=0,this.gpr_count=0),this.cooling_count=0,this.cowl_sel=0,this.radiator_index=-1)}GetNumPropellers(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.GetGenerator())||this.GetIsTurboprop()||this.is_internal?this.use_pp?2:1:0}GetIsTractorNacelle(){return this.GetNumPropellers()>0&&!this.GetUsePushPull()&&.8==this.mount_list[this.mount_sel].powerfactor&&!this.is_internal}IsLiquidCooled(){return this.NeedCooling()}IsRotary(){return this.etype_stats.oiltank}IsContraRotary(){return!this.GetIsPulsejet()&&!this.GetIsTurbine()&&""!=this.elist_idx&&3==this.etype_inputs.type}IsAirCooled(){return!(this.GetIsPulsejet()||this.GetIsTurbine()||this.IsLiquidCooled()||this.IsRotary())}GetCowlList(){return this.cowl_list}GetCowl(){return this.cowl_sel}GetCowlEnabled(){const t=[];for(const e of this.cowl_list)this.GetIsPulsejet()||this.GetIsTurbine()?t.push(e.air&&e.rotary&&e.liquid):this.IsLiquidCooled()?t.push(e.liquid):this.IsRotary()?t.push(e.rotary):t.push(e.air);return t}GetHasOilTank(){return this.etype_stats.oiltank}GetHasOilCooler(){return this.etype_stats.stats.cooling>0}GetHasOilPan(){return this.IsAirCooled()}VerifyCowl(t){const e=this.GetCowlEnabled();e[t]&&(this.cowl_sel=t),e[this.cowl_sel]||(this.cowl_sel=0)}SetCowl(t){this.VerifyCowl(t),this.CalculateStats()}GetGeneratorEnabled(){return!(this.GetIsPulsejet()||this.use_pp||this.GetIsElectric())}GetGenerator(){return this.is_generator}SetGenerator(t){this.GetGeneratorEnabled()?this.is_generator=t:this.is_generator=!1,this.is_generator&&(this.gp_count=0,this.gpr_count=0,this.use_ds=!1,this.use_pp=!1),this.CalculateStats()}GetIsElectric(){return this.etype_inputs.engine_type==y.ELECTRIC}GetAlternatorEnabled(){return!(this.GetIsPulsejet()||this.is_generator||this.GetIsElectric())}GetAlternator(){return this.has_alternator}SetAlternator(t){this.GetAlternatorEnabled()?this.has_alternator=t:this.has_alternator=!1,this.CalculateStats()}GetRumble(){return this.etype_stats.rumble}IsTractor(){return!(this.is_internal||this.GetGenerator()||"Tractor"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetTractorSpinner(){return{has:this.IsTractor()&&!(this.outboard_prop&&!this.use_pp),spinner:this.GetSpinner()}}IsPusher(){return!(this.is_internal||this.GetGenerator()||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name)}GetPusherSpinner(){return{has:this.IsPusher()&&!this.outboard_prop,spinner:this.GetSpinner()}}GetSpinner(){if(this.gp_count>0&&!this.GetGenerator()){if(this.use_ds&&("Center-Mounted Tractor"==this.mount_list[this.mount_sel].name||"Center-Mounted Pusher"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name))return[!0,!0];if(!this.etype_stats.oiltank)return[!0,!1]}return[!1,!1]}IsElectrics(){return this.has_alternator||this.GetGenerator()}GetEngineHeight(){return this.GetGenerator()?5:"Pod"==this.mount_list[this.mount_sel].name||this.etype_stats.pulsejet||this.is_internal||this.outboard_prop?2:"Nacelle (Offset)"==this.mount_list[this.mount_sel].name?1:"Nacelle (Inside)"==this.mount_list[this.mount_sel].name||"Channel Tractor"==this.mount_list[this.mount_sel].name||"Wing Pod"==this.mount_list[this.mount_sel].name?0:-1}IsTractorRotary(){return!this.GetGenerator()&&this.IsRotary()&&("Tractor"==this.mount_list[this.mount_sel].name||"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name)}IsDiesel(){return this.etype_inputs.upgrades[3]}SetCalculateStats(t){this.CalculateStats=t}SetInternal(t){this.is_internal=t,t&&(this.use_ds=!1)}VerifyMount(){if(this.GetIsTurbine()&&!this.GetIsTurboprop())for(;!this.mount_list[this.mount_sel].turbine;)this.mount_sel++;else if(this.GetIsPulsejet()){if("fuselage"==this.mount_list[this.mount_sel].mount_type)for(let t=0;t0&&t.era.push({name:"Propeller Gearing",era:"WWI"}),this.gpr_count>0&&t.era.push({name:"Reliable Gearing",era:"Roaring 20s"}),this.use_ds&&(t.mass+=1),t=t.Add(this.cowl_list[this.cowl_sel].stats),t.mass+=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].mpd),t.drag=Math.floor(1e-6+t.drag*this.cowl_list[this.cowl_sel].ed),this.use_pp&&(t.power*=2,t.mass*=2,t.cooling*=2,t.fuelconsumption*=2,t.cost*=2,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.upkeep*=2,t.reqsections*=2,t.charge*=2,t.power=Math.floor(1e-6+this.mount_list[this.mount_sel].powerfactor*t.power)),"No Cowling"==this.cowl_list[this.cowl_sel].name||"Sealed Cowl"==this.cowl_list[this.cowl_sel].name||"Rear-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Pusher"!=this.mount_list[this.mount_sel].name&&"Center-Mounted Tractor"!=this.mount_list[this.mount_sel].name&&"Fuselage Push-Pull"!=this.mount_list[this.mount_sel].name||(t.cost+=2),this.IsAirCooled()&&this.intake_fan?(t.mass+=3,t.latstab*=2,t.structure*=2,t.maxstrain*=2,t.cost+=4,t.era.push({name:"Air Cooling Fan",era:"WWII"})):this.intake_fan=!1,this.GetHasOilCooler()&&(t.drag+=Math.floor(t.power/15)),this.GetIsPulsejet()||(t=t.Add(this.mount_list[this.mount_sel].stats),t.maxstrain-=Math.floor(1e-6+this.mount_list[this.mount_sel].strainfactor*this.etype_stats.stats.mass),t.drag+=Math.floor(1e-6+this.mount_list[this.mount_sel].dragfactor*this.etype_stats.stats.mass)),this.is_generator?(t.charge=Math.floor(1e-6+2*t.power/10)+2,t.power=0,t.visibility=2):this.has_alternator&&(t.charge=Math.floor(1e-6+t.power/10)+1,t.mass+=1,t.cost+=2,this.use_pp&&"Fuselage Push-Pull"==this.mount_list[this.mount_sel].name&&(t.mass+=1,t.cost+=2)),this.outboard_prop&&(t.drag+=3,this.use_pp&&(t.escape+=2)),this.is_first_pulsejet&&(t.cost+=5),t.pitchspeed=0,t.reliability=0,t}GetElectrics(){return{storage:0,equipment:[]}}}class V extends H{constructor(t,e,s){super(),this.need_cool=0,this.idx_type=1,this.idx_mount=1,this.idx_coolant=0,this.metal_area=0,this.engine_count=0,this.type_list=t,this.mount_list=e,this.coolant_list=s,this.harden_cool=!1}toJSON(){return{type:this.idx_type,mount:this.idx_mount,coolant:this.idx_coolant,harden_cool:this.harden_cool}}fromJSON(t,e){this.idx_type=t.type,this.idx_mount=t.mount,this.idx_coolant=t.coolant,e>10.85&&(this.harden_cool=t.harden_cool)}serialize(t){t.PushNum(this.idx_type),t.PushNum(this.idx_mount),t.PushNum(this.idx_coolant),t.PushBool(this.harden_cool)}derserialize(t){this.idx_type=t.GetNum(),this.idx_mount=t.GetNum(),this.idx_coolant=t.GetNum(),t.version>10.85&&(this.harden_cool=t.GetBool())}GetTypeList(){return this.type_list}GetMountList(){return this.mount_list}GetCoolantList(){return this.coolant_list}CanType(){const t=[...Array(this.type_list.length).fill(!0)];for(let e=0;et;)this.engines.pop();var e=null;for(this.engines.length>0&&(e=JSON.stringify(this.engines[this.engines.length-1].toJSON()));this.engines.lengtht;)this.radiators.pop();for(;this.radiators.length0&&!this.NeedCooling()&&this.SetNumberOfRadiators(0),this.radiators.length}NeedCooling(){let t=!1;for(const e of this.engines)t=t||e.NeedCooling();return t}UpdateReliability(t){for(const e of this.engines){let s=new u;e.GetRadiator()=0&&(s=this.radiators[e.GetRadiator()].PartStats()),e.UpdateReliability(t.reliability+s.reliability)}}SetAsymmetry(t){this.is_asymmetric=t,this.CalculateStats()}GetAsymmetry(){return this.is_asymmetric}GetNumPropellers(){var t=0;for(const e of this.engines)t+=e.GetNumPropellers();return t}GetOverspeed(){let t=100;for(const e of this.engines)t=Math.min(t,e.GetOverspeed());return t}GetRumble(){var t=0;for(const e of this.engines)t+=e.GetRumble();return t}GetMaxRumble(){var t=0;for(const e of this.engines)t=Math.max(t,e.GetRumble());return t}GetTractorSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetTractorSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}GetPusherSpinner(){const t={have:!1,spin_count:0,arty_spin_count:0};for(const e of this.engines){const s=e.GetPusherSpinner();s.has&&(t.have=!0,s.spinner[0]&&t.spin_count++,s.spinner[1]&&t.arty_spin_count++)}return t}IsElectrics(){for(const t of this.engines)if(t.IsElectrics())return!0;return!1}HaveParasol(t){for(const e of this.radiators)e.SetParasol(t)}SetMetalArea(t){for(const e of this.radiators)e.SetMetalArea(t)}SetTailMods(t,e,s){for(const i of this.engines)i.SetTailMods(t,e,s)}GetEngineHeight(){var t=2;for(const e of this.engines)t=Math.min(t,e.GetEngineHeight());return t}HasTractorRotary(){for(const t of this.engines)if(t.IsTractorRotary())return!0;return!1}SetInternal(t){for(const e of this.engines)e.SetInternal(t);if(t)for(const t of this.radiators)t.SetMetalArea(0),t.SetParasol(!1)}HasPulsejet(){for(const t of this.engines)if(t.GetIsPulsejet())return!0;return!1}HasTurbineNoProp(){for(const t of this.engines)if(t.GetIsTurbine()&&0==t.GetNumPropellers())return!0;return!1}HasDiesel(){for(const t of this.engines)if(t.IsDiesel())return!0;return!1}GetEngineTypes(){var t=[];for(const e of this.engines)e.GetNumPropellers()>0?t.push({type:C.PROPELLER,num:e.GetNumPropellers()}):e.GetIsPulsejet()?t.push({type:C.PULSEJET,num:0}):e.GetIsTurbine()&&t.push({type:C.TURBINE,num:e.GetCurrentStats().stats.pitchspeed});return t}GetIsFlammable(){for(const t of this.radiators)if(t.GetIsFlammable())return!0;return!1}PartStats(){var t=new u;const e=new Array(this.GetNumberOfRadiators()).fill(null).map((()=>({cool:0,count:0})));var s=0,i=100,a=!1,r=2;for(let n of this.engines){!a&&n.GetIsPulsejet()?(a=!0,n.SetFirstPulsejet(!0)):n.SetFirstPulsejet(!1);const o=n.PartStats();r=Math.min(r,o.visibility),t=t.Add(o),n.NeedCooling()&&(e[n.GetRadiator()].cool+=n.GetCooling(),e[n.GetRadiator()].count+=1),s+=n.GetCurrentStats().stats.cost,o.pitchspeed>0&&(i=Math.min(i,o.pitchspeed))}t.visibility=r,i<100&&(t.pitchspeed=i),t.upkeep=Math.floor(1e-6+Math.min(t.upkeep,s));let o=new u;const l=new Map;for(let t=0;t0?t.warnings.push({source:h("Rotary"),warning:h("Rotary Right Warning"),color:c.WHITE}):m<0&&t.warnings.push({source:h("Rotary"),warning:h("Rotary Left Warning"),color:c.WHITE}),t.reliability=0,t}SetCalculateStats(t){this.CalculateStats=t}GetHasTractorNacelles(){let t=0;for(const e of this.engines)e.GetIsTractorNacelle()&&t++;return t>1}GetElectrics(){let t={storage:0,equipment:[]};for(let e=0;e10.25&&(this.sel_skin=t.sel_skin),this.interal_bracing_count=this.CountInternalBracing()}serialize(t){t.PushNum(this.section_list.length);for(let e=0;e10.25&&(this.sel_skin=t.GetNum()),this.interal_bracing_count=this.CountInternalBracing()}DuplicateSection(t,e=1){const s=this.section_list[t];for(let i=0;ithis.CountSections()+this.tail_section_list.length)for(let t=this.section_list.length-1;t>=0;t--)if(this.section_list[t].internal_bracing){this.interal_bracing_count--,this.section_list.splice(t,1);break}e&&this.CalculateStats()}}SetRequiredSections(t){if(this.required_sections=t,this.required_sections>this.CountSections()&&(0==this.section_list.length&&this.section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),this.required_sections-this.CountSections()>0))for(let t=this.section_list.length-1;t>=0;t--)if(!this.section_list[t].internal_bracing)return void this.DuplicateSection(t,this.required_sections-this.CountSections())}SetRequiredTailSections(t){for(t>this.tail_section_list.length&&(0==this.tail_section_list.length&&this.tail_section_list.push({frame:0,geodesic:!1,monocoque:!1,lifting_body:!1,internal_bracing:!1}),t-this.tail_section_list.length>0&&this.DuplicateTailSection(this.tail_section_list.length-1,t-this.tail_section_list.length));t0&&!this.section_list[t].internal_bracing;t--);this.DeleteSection(t,!1)}this.CalculateStats()}CountSections(){return this.section_list.length-this.interal_bracing_count}GetNumFrames(){return this.CountSections()+this.tail_section_list.length}CountInternalBracing(){var t=0;for(const e of this.section_list)e.internal_bracing&&t++;return t}BaseType(){const t=[...Array(this.frame_list.length).fill(0)];for(const e of this.section_list)e.internal_bracing||t[e.frame]++;for(const e of this.tail_section_list)e.internal_bracing||t[e.frame]++;var e=0,s=0;for(let i=t.length-1;i>=0;i--)t[i]>s&&(s=t[i],e=i);return e}GetFrameList(){return this.frame_list}GetSkinList(){return this.skin_list}GetSectionList(){return this.section_list}SetFrame(t,e){this.section_list[t].frame=e,this.frame_list[e].geodesic||(this.section_list[t].geodesic=!1),this.CalculateStats()}SetGeodesic(t,e){this.frame_list[this.section_list[t].frame].geodesic&&(this.section_list[t].geodesic=e,this.CalculateStats())}SetMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].monocoque=e,this.CalculateStats())}SetLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&(this.section_list[t].lifting_body=e,this.CalculateStats())}SetInternalBracing(t,e){e&&!this.section_list[t].internal_bracing&&this.PossibleInternalBracing(!0)&&this.CountSections()>this.required_sections?(this.section_list[t].internal_bracing=!0,this.section_list[t].monocoque=!1,this.section_list[t].lifting_body=!1,this.interal_bracing_count++,this.CalculateStats()):e||(this.section_list[t].internal_bracing=!1,this.interal_bracing_count--,this.CalculateStats())}PossibleInternalBracing(t=!1){var e=this.CountSections();return this.farman||(e+=this.tail_section_list.length),t&&(e-=1),this.interal_bracing_count+1<=e}PossibleGeodesic(t){return this.frame_list[this.section_list[t].frame].geodesic&&!this.section_list[t].monocoque}PossibleMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].lifting_body}PossibleLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.section_list[t].internal_bracing&&!this.section_list[t].monocoque}PossibleTailGeodesic(t){return this.frame_list[this.tail_section_list[t].frame].geodesic&&!this.tail_section_list[t].monocoque}PossibleTailMonocoque(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].lifting_body}PossibleTailLiftingBody(t){return this.skin_list[this.sel_skin].monocoque&&!this.farman&&!this.tail_section_list[t].monocoque}PossibleRemoveSections(){return this.CountSections()>this.required_sections}GetFarmanOrBoom(){return this.farman||this.boom}SectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),t.internal_bracing||(e.drag+=4,t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}TailSectionStats(t){var e=new u;return e=e.Add(this.frame_list[t.frame].stats),t.geodesic&&(e.structure*=1.5,e.cost*=2,e.era.push({name:"Geodesic",era:"Coming Storm"})),t.lifting_body&&(e.wingarea+=3),e.drag+=4,this.farman||(t.monocoque&&(e.mass=0,e.cost+=1,e.structure=this.skin_list[this.sel_skin].monocoque_structure),e=e.Add(this.skin_list[this.sel_skin].stats)),e}CountMainLiftingBody(){var t=0;for(const e of this.section_list)e.lifting_body&&t++;return t}CountTailLiftingBody(){var t=0;for(const e of this.tail_section_list)e.lifting_body&&t++;return t}CountLiftingBody(){return this.CountMainLiftingBody()+this.CountTailLiftingBody()}SetIsTandem(t){this.is_tandem!=t&&(this.is_tandem=t,this.SetTailType(this.sel_tail))}SetTailType(t){0==this.tail_list[t].stats.reqsections&&this.is_tandem&&t++,this.sel_tail=t,this.SetRequiredTailSections(this.tail_list[t].stats.reqsections)}GetTailType(){return this.sel_tail}GetTailList(){return this.tail_list}GetTailSectionList(){return this.tail_section_list}SetUseFarman(t){if(this.farman=t,t&&this.boom&&(this.boom=!1),this.farman)for(const t of this.tail_section_list)t.monocoque=!1,t.lifting_body=!1;this.CalculateStats()}GetUseFarman(){return this.farman}SetUseBoom(t){this.boom=t,t&&this.farman&&(this.farman=!1),this.CalculateStats()}GetUseBoom(){return this.boom}SetTailFrame(t,e){this.tail_section_list[t].frame=e,this.frame_list[e].geodesic||(this.tail_section_list[t].geodesic=!1),this.CalculateStats()}SetTailGeodesic(t,e){this.frame_list[this.tail_section_list[t].frame].geodesic&&(this.tail_section_list[t].geodesic=e,this.CalculateStats())}SetTailMonocoque(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].monocoque=e,this.CalculateStats())}SetTailLiftingBody(t,e){this.skin_list[this.sel_skin].monocoque&&!this.farman&&(this.tail_section_list[t].lifting_body=e,this.CalculateStats())}SetHasTractorNacelles(t){this.has_tractor_nacelles=t}GetHasTractorNacelles(){return this.has_tractor_nacelles}CanFlyingWing(){for(const t of this.section_list)if(t.lifting_body)return!0;for(const t of this.tail_section_list)if(t.lifting_body)return!0;return!1}GetFlyingWing(){return this.flying_wing}SetFlyingWing(t){t&&this.CanFlyingWing()?this.flying_wing=!0:this.flying_wing=!1,this.CalculateStats()}GetIsTailless(){return 0==this.tail_section_list.length}SetAllFrame(t){for(const e of this.section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);for(const e of this.tail_section_list)e.frame=t,this.frame_list[t].geodesic||(e.geodesic=!1);this.CalculateStats()}SetAllSkin(t){this.sel_skin=t;for(const e of this.section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);for(const e of this.tail_section_list)e.internal_bracing||this.skin_list[t].monocoque||(e.monocoque=!1,e.lifting_body=!1);this.CalculateStats()}GetArmor(){return"Dragon Skin"==this.skin_list[this.sel_skin].name?5:0}GetIsFlammable(){return!!this.skin_list[this.sel_skin].flammable}GetSkin(){return this.sel_skin}CanCutout(){let t=this.section_list.length*this.skin_list[this.sel_skin].stats.visibility;return this.farman?t+=this.tail_section_list.length:t+=this.tail_section_list.length*this.skin_list[this.sel_skin].stats.visibility,t<3}SetCalculateStats(t){this.CalculateStats=t}PartStats(){this.CanFlyingWing()||(this.flying_wing=!1);var t=new u;const e=this.BaseType();t.structure=this.frame_list[e].basestruct,t.cost=this.frame_list[e].basecost;var s=this.skin_list[this.sel_skin].monocoque_structure<0;for(const e of this.section_list)t=t.Add(this.SectionStats(e)),s=s&&(e.internal_bracing||e.monocoque);var i=new u;for(const t of this.tail_section_list)i=i.Add(this.TailSectionStats(t)),this.farman||(s=s&&(t.internal_bracing||t.monocoque));s&&(t.structure+=30),t=t.Add(this.tail_list[this.sel_tail].stats),this.boom&&(i.maxstrain-=i.mass,this.has_tractor_nacelles||(i.drag=Math.floor(1e-6+1.5*i.drag))),this.farman?(t.drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor,t.visibility+=this.tail_section_list.length,i.mass=Math.floor(1e-6+.5*i.mass),t=t.Add(i)):((t=t.Add(i)).drag*=this.skin_list[this.sel_skin].dragfactor,t.mass*=this.skin_list[this.sel_skin].massfactor);const a=this.CountLiftingBody();return t.cost+=a,this.flying_wing?t.liftbleed+=5:t.drag+=a,this.PossibleRemoveSections()&&this.CountMainLiftingBody()11.15)this.wing_list=t.wing_list,this.mini_wing_list=t.mini_wing_list;else{const e=t.wing_list;this.wing_list=this.OldtoNew(e);const s=t.mini_wing_list;this.mini_wing_list=this.OldtoNew(s)}this.wing_stagger=t.wing_stagger,this.is_swept=t.is_swept,this.is_closed=t.is_closed}OldtoNew(t){const e=[];for(const s of t)e.push({surface:s.surface,area:s.area,span:s.span,anhedral:s.anhedral,dihedral:s.dihedral,gull:!1,deck:s.deck});return e}serialize(t){t.PushNum(this.wing_list.length);for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.wing_list.push(e)}const s=t.GetNum();this.mini_wing_list=[];for(let e=0;e11.15?(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=t.GetBool()):(e.dihedral=t.GetNum(),e.anhedral=t.GetNum(),e.gull=!1),e.deck=t.GetNum(),this.mini_wing_list.push(e)}this.wing_stagger=t.GetNum(),this.is_swept=t.GetBool(),this.is_closed=t.GetBool()}SetRotorSpan(t){this.rotor_span=t}GetWingList(){return this.wing_list}GetMiniWingList(){return this.mini_wing_list}GetSkinList(){return this.skin_list}GetStaggerList(){return this.stagger_list}GetDeckList(){return this.deck_list}DeckCountFull(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.wing_list)t[e.deck]++;return t}DeckCountMini(){const t=[...Array(this.deck_list.length).fill(0)];for(const e of this.mini_wing_list)t[e.deck]++;return t}CanStagger(){const t=[...Array(this.stagger_list.length).fill(!1)];if(this.acft_type==N.ORNITHOPTER_FLUTTER)this.wing_list.length>1?t[1]=!0:t[0]=!0;else{if(this.wing_list.length>1)for(let e=1;e1?this.wing_stagger=1:this.wing_stagger=0)}SetStagger(t){for(this.wing_stagger=t;this.stagger_list[t].wing_count=0;e--){const s=this.wing_list[e];t[s.deck]>1&&this.deck_list[s.deck].limited&&(t[s.deck]--,this.wing_list.splice(e,1))}}this.CalculateStats()}GetStagger(){return this.wing_list.length>0?this.wing_stagger:-1}CanAddFullWing(t){if(t>=this.deck_list.length&&console.log("Deck out of Bounds"),!this.stagger_list[this.wing_stagger].inline){if(t==D.SHOULDER&&this.HasPolishWing())return!1;if(this.DeckCountFull()[t]==D.SHOULDER&&this.deck_list[t].limited)return!1}return 0==this.DeckCountMini()[t]}CanAddMiniWing(t){const e=this.DeckCountFull(),s=this.DeckCountMini();return 0==e[t]&&0==s[t]}CanMoveFullWing(t,e){const s=this.wing_list[t];this.wing_list.splice(t,1);const i=this.CanAddFullWing(e);return this.wing_list.splice(t,0,s),i}CanMoveMiniWing(t,e){const s=this.mini_wing_list[t];this.mini_wing_list.splice(t,1);const i=this.CanAddMiniWing(e);return this.mini_wing_list.splice(t,0,s),i}GetWingHeight(){let t=0;for(const e of this.wing_list)t=Math.max(t,4-e.deck);return t}CanClosed(){return this.wing_list.length>1}SetClosed(t){this.wing_list.length>0?this.is_closed=t:this.is_closed=!1,this.CalculateStats()}GetClosed(){return this.is_closed}CanSwept(){return this.wing_list.length>0}SetSwept(t){this.wing_list.length>0?this.is_swept=t:this.is_swept=!1,this.CalculateStats()}GetSwept(){return this.is_swept}GetTandem(){return this.stagger_list[this.wing_stagger].inline&&this.wing_list.length>1}GetMonoplane(){return 1==this.wing_list.length}GetStaggered(){return 0!=this.stagger_list[this.wing_stagger].stats.liftbleed}SetFullWing(t,e){this.wing_list.length!=t&&this.wing_list.splice(t,1),e.area!=e.area&&(e.area=3),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,3),e.span=Math.max(e.span,1),this.CanAddFullWing(e.deck)&&this.wing_list.splice(t,0,e)),this.wing_list.length>1&&0==this.wing_stagger?this.wing_stagger=4:this.wing_list.length<=1&&(this.wing_stagger=0),e.dihedral=Math.floor(1e-6+e.dihedral),e.anhedral=Math.floor(1e-6+e.anhedral),e.dihedral=Math.max(0,Math.min(e.dihedral,e.span-1)),e.anhedral=Math.max(0,Math.min(e.anhedral,e.span-1-e.dihedral)),this.CalculateStats()}SetMiniWing(t,e){this.mini_wing_list.length!=t&&this.mini_wing_list.splice(t,1),e.area!=e.area&&(e.area=2),e.area=Math.floor(1e-6+e.area),e.span!=e.span&&(e.span=1),e.span=Math.floor(1e-6+e.span),e.deck>=0&&(e.area=Math.max(e.area,1),e.area=Math.min(e.area,2),e.span=Math.max(e.span,1),this.CanAddMiniWing(e.deck)&&this.mini_wing_list.splice(t,0,e)),this.CalculateStats()}HasNonGullDeck(t){for(const e of this.wing_list)if(e.deck==t&&!e.gull)return!0;return!1}CanGull(t){if(t==D.PARASOL){if(!this.GetTandem()&&this.HasNonGullDeck(D.SHOULDER))return!1}else{if(t==D.SHOULDER)return!1;if(!this.GetTandem()&&this.HasNonGullDeck(t-1))return!1}return!0}IsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}NeedHStab(){return this.stagger_list[this.wing_stagger].hstab}NeedTail(){return this.NeedHStab()||!this.is_swept}GetSpan(){let t=0;for(const e of this.wing_list){const s=e.span;t=Math.max(t,s)}for(const e of this.mini_wing_list){const s=e.span;t=Math.max(t,s)}return t}GetArea(){let t=0;for(const e of this.wing_list)t+=e.area;for(const e of this.mini_wing_list)t+=e.area;return t}GetParasol(){for(const t of this.wing_list)if(t.deck==D.PARASOL)return!0;for(const t of this.mini_wing_list)if(t.deck==D.PARASOL)return!0;return!1}GetMetalArea(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].metal&&(t+=e.area);for(const e of this.mini_wing_list)this.skin_list[e.surface].metal&&(t+=e.area);return t}GetWingDrag(){let t=0;const e=this.DeckCountFull();let s=0,i=0;for(const a of this.wing_list){const n=a.span;let r=a.area;s=Math.max(s,n),a.gull&&(r=Math.floor(1e-6+1.1*r));let o=Math.max(1,6*r*r/(n*n));o=Math.max(1,o*this.skin_list[a.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&e[a.deck]>1&&(o=Math.floor(1e-6+.75*o),o=Math.max(1,o)),o=Math.floor(1e-6+o),s==n&&(i=i),t+=o}for(const e of this.mini_wing_list){const s=e.span;let i=Math.max(1,6*e.area*e.area/(s*s));i=Math.max(1,i*this.skin_list[e.surface].dragfactor),i=Math.floor(1e-6+i),t+=i}const a=this.GetIsSesquiplane();return(a.is||this.GetMonoplane())&&-1!=a.deck&&(t-=Math.floor(1e-6+(1-this.long_list[a.deck].dragfactor)*i)),t}GetIsFlammable(){for(const t of this.wing_list)if(this.skin_list[t.surface].flammable)return!0;for(const t of this.mini_wing_list)if(this.skin_list[t.surface].flammable)return!0;return!1}SetAircraftMass(t){this.plane_mass=t}GetPaperMass(){let t=0;for(const e of this.wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}for(const e of this.mini_wing_list){const s=this.skin_list[e.surface].stats.Multiply(e.area);s.Round(),s.mass<0&&(t+=s.mass)}return Math.max(-Math.floor(1e-6+.25*this.plane_mass),t)}GetIsSesquiplane(){let t=0,e=-1,s=0,i=1e100,a=0;for(const n of this.wing_list)n.area>t?(t=n.area,e=n.deck,s=n.span):n.area==t&&(e=-1),i>n.area&&(i=n.area,a=n.span);let n=t>=2*i;return n=n&&!this.GetMonoplane()&&!this.GetTandem(),n?{is:n,deck:e,super_small:.75*s>=a}:{is:!1,deck:e,super_small:!1}}HasPolishWing(){for(const t of this.wing_list)if(t.deck==D.PARASOL&&1==t.gull)return!0;return!1}HasInvertedGull(){let t=-1;for(const e of this.wing_list)e.gull&&e.deck>D.SHOULDER&&(t=Math.max(t,e.deck));return t}CanCutout(){let t=0;for(const e of this.wing_list)this.skin_list[e.surface].transparent&&(t+=1);return t<3}PartStats(){this.CanClosed()||(this.is_closed=!1),this.CanSwept()||(this.is_swept=!1);var t=new u;let e=!1;const s=this.DeckCountFull();let i=!1,a=this.rotor_span,n=0,r=0;for(let i of this.wing_list){this.CanGull(i.deck)||(i.gull=!1),a=Math.max(a,i.span),e?(t.control+=3,t.liftbleed+=5,t.visibility-=1):e=!0;let o=new u;o=o.Add(this.skin_list[i.surface].stats.Multiply(i.area)),o.wingarea=i.area,o.maxstrain+=Math.min(0,-(2*i.span+i.area-10)),this.acft_type==N.ORNITHOPTER_BUZZER&&(o.maxstrain+=Math.min(0,-(2*i.span+i.area-10))),o.maxstrain*=this.skin_list[i.surface].strainfactor,this.skin_list[i.surface].transparent&&r<3&&(o.visibility+=1,r+=1);const l=i.span;let h=i.area;i.gull&&(h=Math.floor(1e-6+1.1*h));const c=Math.max(1,6*h*h/(l*l));o.drag=o.drag+c,o.drag=Math.max(1,o.drag*this.skin_list[i.surface].dragfactor),this.stagger_list[this.wing_stagger].inline&&s[i.deck]>1&&(o.drag=Math.floor(1e-6+.75*o.drag),o.drag=Math.max(1,o.drag)),t=t.Add(this.deck_list[i.deck].stats),o.latstab+=i.dihedral-i.anhedral,o.liftbleed+=i.dihedral+i.anhedral,o.Round(),a==i.span&&(n=o.drag),o.mass<0&&(o.mass=0),t=t.Add(o)}for(const e of this.mini_wing_list){a=Math.max(a,e.span),t.control+=1,i?t.liftbleed+=1:i=!0;const s=this.skin_list[e.surface].stats.Multiply(e.area);s.wingarea=e.area,s.maxstrain+=Math.min(0,-(2*e.span+e.area-10)),s.maxstrain*=this.skin_list[e.surface].strainfactor;const n=e.span;s.drag=Math.max(1,s.drag+6*e.area*e.area/(n*n)),s.drag=Math.max(1,s.drag*this.skin_list[e.surface].dragfactor),s.latstab+=e.dihedral-e.anhedral,s.liftbleed+=e.dihedral+e.anhedral,s.Round(),s.mass<0&&(s.mass=0),t=t.Add(s)}t.control+=8-a,t.latstab+=Math.min(0,a-8);const o=this.GetIsSesquiplane();if((o.is||this.GetMonoplane())&&-1!=o.deck&&((t=t.Add(this.long_list[o.deck].stats)).drag-=Math.floor(1e-6+(1-this.long_list[o.deck].dragfactor)*n)),o.is&&(t.liftbleed-=2,t.control+=2),this.stagger_list[this.wing_stagger].inline)for(const e of s)e>1&&(t.liftbleed+=3*(e-1));switch(this.HasPolishWing()&&(t.visibility+=1,t.maxstrain+=10),this.HasInvertedGull()){case 1:case 2:case 3:break;case 4:t.maxstrain+=10,t.crashsafety+=1}if((this.HasInvertedGull()>0||this.HasPolishWing())&&t.era.push({name:"Gull Wing",era:"Coming Storm"}),this.is_swept&&(t.liftbleed+=5,t.latstab--),this.is_closed){const e=Math.floor(1e-6+this.wing_list.length/2);t.mass+=1*e,t.control-=5*e,t.maxstrain+=20*e}return this.wing_list.length>1&&(t=t.Add(this.stagger_list[this.wing_stagger].stats)),t}SetCalculateStats(t){this.CalculateStats=t}GetElectrics(){const t={storage:0,equipment:[]};let e=0,s="";for(const t of this.wing_list){const i=this.skin_list[t.surface];0!=i.stats.charge&&(s=h(i.name),e+=i.stats.charge*t.area,e=Math.floor(1e-6+e))}return 0!=e&&t.equipment.push({source:s,charge:e.toString()}),t}}class tt extends H{constructor(t){super(),this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.is_heli=!1,this.hstab_sel=0,this.hstab_count=1,this.hstab_list=[];for(const e of t.hstab)this.hstab_list.push({name:e.name,is_canard:e.is_canard,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail});this.vstab_sel=0,this.vstab_count=1,this.vstab_list=[];for(const e of t.vstab)this.vstab_list.push({name:e.name,increment:e.increment,stats:new u(e),dragfactor:e.dragfactor,is_vtail:e.is_vtail,is_tail:e.is_tail})}toJSON(){return{hstab_sel:this.hstab_sel,hstab_count:this.hstab_count,vstab_sel:this.vstab_sel,vstab_count:this.vstab_count}}fromJSON(t,e){this.hstab_sel=t.hstab_sel,this.hstab_count=t.hstab_count,this.vstab_sel=t.vstab_sel,this.vstab_count=t.vstab_count}serialize(t){t.PushNum(this.hstab_sel),t.PushNum(this.hstab_count),t.PushNum(this.vstab_sel),t.PushNum(this.vstab_count)}deserialize(t){this.hstab_sel=t.GetNum(),this.hstab_count=t.GetNum(),this.vstab_sel=t.GetNum(),this.vstab_count=t.GetNum()}IsDefault(){return 0==this.hstab_sel&&1==this.hstab_count&&0==this.vstab_sel&&1==this.vstab_count}GetHStabList(){return this.hstab_list}GetVStabList(){return this.vstab_list}GetHStabType(){return this.hstab_sel}SetHStabType(t){("The Wings"!=this.hstab_list[t].name||this.is_tandem||this.is_swept)&&(this.hstab_list[t].is_vtail?this.SetVTail():this.hstab_list[this.hstab_sel].is_vtail&&(this.vstab_sel=0,this.vstab_count=1),this.hstab_sel=t,this.SetHStabCount(this.hstab_count))}GetHValidList(){var t=[];if(this.is_heli)t=Array(this.hstab_list.length).fill(!1),this.have_tail?t[0]=!0:t[1]=!0;else for(const e of this.hstab_list)"The Wings"!=e.name&&"Outboard"!=e.name||this.is_tandem||this.is_swept?e.is_tail&&!this.have_tail?t.push(!1):t.push(!0):t.push(!1);return t}GetIsVTail(){return this.hstab_list[this.hstab_sel].is_vtail}SetVTail(){for(let t=0;t=0?this.hstab_list[this.hstab_sel].increment:1}GetVStabCount(){return this.vstab_count}SetVStabCount(t){if((t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.vstab_count=t,0!=this.vstab_list[this.vstab_sel].increment)for(;this.vstab_count%this.vstab_list[this.vstab_sel].increment!=0;)this.vstab_count++;else this.vstab_count=0;this.CalculateStats()}GetVStabIncrement(){return this.vstab_sel>=0?this.vstab_list[this.vstab_sel].increment:1}SetEngineCount(t){this.engine_count=t}GetIsTandem(){return this.is_tandem}SetIsTandem(t){this.is_tandem=t}SetIsSwept(t){this.is_swept=t}CanVOutboard(){return this.is_swept||this.is_tandem||this.hstab_list[this.hstab_sel].is_canard&&this.hstab_count>0}GetVOutboard(){return"Outboard"==this.vstab_list[this.vstab_sel].name}GetCanard(){return this.hstab_list[this.hstab_sel].is_canard}SetLiftingArea(t){this.lifting_area=t}SetHaveTail(t){if(this.have_tail=t,!t){this.GetHValidList()[this.hstab_sel]||(this.hstab_sel=2);const t=this.GetVValidList();t[this.vstab_sel]||(t[1]||(this.hstab_sel=2),this.vstab_sel=1,this.vstab_count%2!=0&&this.vstab_count++)}this.is_heli&&(this.have_tail?this.hstab_sel=0:this.hstab_sel=1,this.hstab_count=1)}SetHelicopter(t){this.is_heli=t,t&&(this.have_tail=!0,this.is_tandem=!1,this.is_swept=!1,this.lifting_area=0,this.engine_count=0,this.hstab_sel=0,this.hstab_count=1,this.vstab_sel=0,this.vstab_count=1)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=this.GetHValidList();t[this.hstab_sel]||(this.hstab_sel=0,t[this.hstab_sel]||(this.hstab_sel=0,this.hstab_count=0));const e=this.GetVValidList();e[this.vstab_sel]||(this.vstab_sel=0,e[this.vstab_sel]||(this.vstab_sel=0,this.vstab_count=0));var s=new u;if(this.hstab_count>0){s=s.Add(this.hstab_list[this.hstab_sel].stats);var i=0;this.is_heli?(i=Math.floor(1e-6+this.wing_drag/8*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/4*this.hstab_list[this.hstab_sel].dragfactor),s.drag+=Math.max(1,i))}else(this.hstab_sel<0||0!=this.hstab_list[this.hstab_sel].increment)&&(s.pitchstab-=Math.floor(1e-6+this.lifting_area/2),s.liftbleed+=5);if(this.vstab_count>0?(s=s.Add(this.vstab_list[this.vstab_sel].stats),i=0,this.is_heli?(i=Math.floor(1e-6+this.wing_drag/16*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(Math.ceil(1*this.hstab_list[this.hstab_sel].dragfactor),i)):(i=Math.floor(1e-6+this.wing_drag/8*this.vstab_list[this.vstab_sel].dragfactor),s.drag+=Math.max(1,i))):(this.vstab_sel<0||0!=this.vstab_list[this.vstab_sel].increment||0==this.vstab_list[this.vstab_sel].increment&&0==this.hstab_count)&&(s.latstab-=this.lifting_area),s.drag+=2*(Math.max(0,this.hstab_count-1)+Math.max(0,this.vstab_count-1)),this.vstab_sel>=0&&0!=this.vstab_list[this.vstab_sel].increment){var a=Math.max(0,this.hstab_count-1);const t=Math.min(this.engine_count-1,this.vstab_count-1);a+=Math.max(0,this.vstab_count-1-t),s.control+=3*t+a}else{const t=Math.max(0,Math.min(this.engine_count-1,this.hstab_count-1));a=Math.max(0,this.hstab_count-1-t),s.control+=3*t+a}return s}GetElectrics(){return{storage:0,equipment:[]}}}class et extends H{constructor(t){super(),this.span=0,this.is_cantilever=0,this.wing_area=0,this.mp=0,this.is_boom=!1,this.acft_type=N.AIRPLANE,this.aileron_sel=0,this.aileron_list=[];for(const e of t.ailerons)this.aileron_list.push({name:e.name,warping:e.warping,stats:new u(e)});this.rudder_sel=0,this.rudder_list=[];for(const e of t.rudders)this.rudder_list.push({name:e.name,stats:new u(e)});this.elevator_sel=0,this.elevator_list=[];for(const e of t.elevators)this.elevator_list.push({name:e.name,stats:new u(e)});this.flaps_sel=0,this.flaps_list=[];for(const e of t.flaps)this.flaps_list.push({name:e.name,costfactor:e.costfactor,stats:new u(e)});this.slats_sel=0,this.slats_list=[];for(const e of t.slats)this.slats_list.push({name:e.name,stats:new u(e)});this.drag_list=[];for(const e of t.drag_inducers)this.drag_list.push({name:e.name,stats:new u(e)});this.drag_sel=[...Array(this.drag_list.length).fill(!1)]}toJSON(){return{aileron_sel:this.aileron_sel,rudder_sel:this.rudder_sel,elevator_sel:this.elevator_sel,flaps_sel:this.flaps_sel,slats_sel:this.slats_sel,drag_sel:this.drag_sel}}fromJSON(t,e){this.aileron_sel=t.aileron_sel,this.rudder_sel=t.rudder_sel,this.elevator_sel=t.elevator_sel,this.flaps_sel=t.flaps_sel,this.slats_sel=t.slats_sel,this.drag_sel=b(t.drag_sel,this.drag_sel.length)}serialize(t){t.PushNum(this.aileron_sel),t.PushNum(this.rudder_sel),t.PushNum(this.elevator_sel),t.PushNum(this.flaps_sel),t.PushNum(this.slats_sel),t.PushBoolArr(this.drag_sel)}deserialize(t){this.aileron_sel=t.GetNum(),this.rudder_sel=t.GetNum(),this.elevator_sel=t.GetNum(),this.flaps_sel=t.GetNum(),this.slats_sel=t.GetNum(),this.drag_sel=t.GetBoolArr(this.drag_sel.length)}IsDefault(){return 0==this.aileron_sel&&0==this.rudder_sel&&0==this.elevator_sel&&0==this.flaps_sel&&0==this.slats_sel&&0==this.drag_sel.reduce(((t,e)=>t||e),!1)}GetAileronList(){return this.aileron_list}CanAileron(){const t=[];if(W(this.acft_type))for(const e of this.aileron_list)t.push(e.warping);else for(const e of this.aileron_list)e.warping&&0==this.wing_area?t.push(!1):t.push(!0);return t}GetAileron(){return this.aileron_sel}SetAileron(t){this.aileron_sel=t,this.CalculateStats()}GetRudderList(){return this.rudder_list}CanRudder(){return this.can_rudder}SetCanRudder(t){this.can_rudder=t,t||(this.rudder_sel=0)}GetRudder(){return this.rudder_sel}SetRudder(t){this.rudder_sel=t,this.CalculateStats()}GetElevatorList(){return this.elevator_list}CanElevator(){return this.can_elevator}SetCanElevator(t){this.can_elevator=t,t||(this.elevator_sel=0)}GetElevator(){return this.elevator_sel}SetElevator(t){this.elevator_sel=t,this.CalculateStats()}GetFlapsList(){return this.flaps_list}GetFlaps(){return this.flaps_sel}SetFlaps(t){this.flaps_sel=t,this.CalculateStats()}GetFlapCost(t){return t&&(this.mp=t),this.flaps_list[this.flaps_sel].costfactor>0?Math.max(1,Math.floor(1e-6+this.flaps_list[this.flaps_sel].costfactor*this.mp)):0}GetSlatsList(){return this.slats_list}GetSlats(){return this.slats_sel}SetSlats(t){this.slats_sel=t,this.CalculateStats()}GetDragList(){return this.drag_list}GetDrag(){return this.drag_sel}SetDrag(t,e){this.drag_sel[t]=e,this.CalculateStats()}SetNumCantilever(t){this.is_cantilever=t}SetSpan(t){this.span=t}SetWingArea(t){this.wing_area=t}SetAcftType(t){if(this.acft_type=t,this.acft_type==N.HELICOPTER){this.aileron_sel=0,this.rudder_sel=0,this.elevator_sel=0,this.flaps_sel=0,this.slats_sel=0;for(let t=0;tt)),this.is_cantilever=0}}SetBoomTail(t){this.is_boom=t}SetIsVTail(t){t&&(this.rudder_sel=this.elevator_sel)}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;this.aileron_list[this.aileron_sel].warping&&0==this.wing_area&&(this.aileron_sel=0),t=t.Add(this.aileron_list[this.aileron_sel].stats),this.aileron_list[this.aileron_sel].warping&&(t.maxstrain-=this.span,this.is_cantilever&&(t.cost+=2*this.is_cantilever,t.era.push({name:h("Cantilever Wing Warping"),era:"Last Hurrah"})),this.is_boom&&(t.pitchstab-=2,t.latstab-=2,t.warnings.push({source:h("Wing Warping"),warning:h("Wing Warping Warning"),color:c.WHITE}))),t=(t=(t=(t=t.Add(this.rudder_list[this.rudder_sel].stats)).Add(this.elevator_list[this.elevator_sel].stats)).Add(this.flaps_list[this.flaps_sel].stats)).Add(this.slats_list[this.slats_sel].stats);for(let e=0;e10.25&&t.wing_blades,e<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}serialize(t){t.PushNumArr(this.ext_wood_count),t.PushNumArr(this.ext_steel_count),t.PushNumArr(this.cant_count),t.PushBool(this.wires),t.PushNum(this.cabane_sel),t.PushBool(this.wing_blades)}deserialize(t){this.ext_wood_count=t.GetNumArr(this.ext_wood_count.length),this.ext_steel_count=t.GetNumArr(this.ext_steel_count.length),this.cant_count=t.GetNumArr(this.cant_count.length),this.wires=t.GetBool(),this.cabane_sel=t.GetNum(),t.version>10.25?this.wing_blades=t.GetBool():this.wing_blades=!1,t.version<10.45&&(this.cant_count[0]*=2,this.cant_count[1]*=2,this.cant_count[2]*=3,this.cant_count[3]*=2)}GetExternalList(){return this.ext_wood_list}GetCantileverList(){return this.cant_list}CanExternalWood(){const t=[...Array(this.ext_wood_list.length).fill(this.can_external)];for(let e=0;e0}SetCantileverCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.ImplSCC(t,e),this.CalculateStats()}ImplSCC(t,e){var s=e-this.cant_count[t];if(this.cant_list[t].limited&&e>0){var i=this.TotalStructure();for(let t=0;tthis.acft_structure)for(let t=this.cant_list.length-1;t>=0;t--)s=s||this.ImplSCC(t,this.cant_count[t]);s&&this.CalculateStats()}TotalStructure(){var t=this.ext_cabane_list[this.cabane_sel].stats.structure,e=!1;for(let s=0;s0||this.ext_steel_count[s]>0)&&(e=!0);return e&&(t+=5),this.acft_structure+t}GetCantileverType(){const t=this.cant_count[0]+this.cant_count[4];return this.cant_count[1]+this.cant_count[2]+this.cant_count[3]>0?2:t>0?1:0}GetCabaneList(){return this.ext_cabane_list}GetCabane(){return this.cabane_sel}SetCabane(t){this.cabane_sel=t,this.CalculateStats()}SetCantLift(t){this.cant_lift=t}CanWingBlade(){for(const t of this.ext_wood_count)if(t>0)return!1;for(const t of this.ext_steel_count)if(t>0)return!1;return 0==this.cabane_sel&&this.cant_count[2]>0}GetWingBlade(){return this.wing_blades}SetWingBlade(t){this.wing_blades=t,this.CalculateStats()}SetAircraftType(t){this.acft_type=t,t==N.HELICOPTER&&(this.can_external=!1,this.is_monoplane=!1,this.is_tandem=!1,this.is_staggered=!1),t==N.ORNITHOPTER_BUZZER&&(this.can_external=!1);const e=this.CanExternalWood();for(let t=0;t0){a=a||this.ext_wood_list[n].first;let i=this.ext_wood_list[n].stats;i=i.Multiply(this.ext_wood_count[n]),t=t.Add(i),this.ext_wood_list[n].config?s+=e*this.ext_wood_list[n].tension*this.ext_wood_count[n]:s+=this.ext_wood_list[n].tension*this.ext_wood_count[n]}for(let n=0;n0){a=a||this.ext_wood_list[n].first;let i=this.ext_steel_list[n].stats.Clone();i=i.Multiply(this.ext_steel_count[n]),t=t.Add(i),this.ext_steel_list[n].config?s+=e*this.ext_steel_list[n].tension*this.ext_steel_count[n]:s+=this.ext_steel_list[n].tension*this.ext_steel_count[n]}this.acft_type==N.ORNITHOPTER_BASIC&&(t.maxstrain=Math.floor(1e-6+.5*t.maxstrain)),a&&(t.structure+=5,t.maxstrain+=10,s+=10);const n=this.ext_cabane_list[this.cabane_sel].stats.Clone();t=t.Add(n),s+=e*this.ext_cabane_list[this.cabane_sel].tension,this.cabane_sel>0&&(i+=1),this.wires&&(t.maxstrain+=Math.floor(1e-6+s),t.drag+=3*i);var r=!1;for(let e=0;e0){r=!0;let s=this.cant_list[e].stats;s=s.Multiply(this.cant_count[e]),s.maxstrain,t=t.Add(s)}return this.CanWingBlade()?this.wing_blades&&(t.mass*=2,t.warnings.push({source:h("Wing Blades"),warning:h("Wing Blades Warning"),color:c.WHITE})):this.wing_blades=!1,r&&(t.cost+=5,t.liftbleed-=this.cant_lift),t}GetElectrics(){return{storage:0,equipment:[]}}}class it extends H{constructor(t){super(),this.tank_stats=[],this.tank_count=[];for(const e of t.tanks)this.tank_stats.push({name:e.name,stats:new u(e),internal:e.internal,cantilever:e.cantilever}),this.tank_count.push(0);this.self_sealing=!1,this.is_cantilever=!1,this.wing_area=-1}toJSON(){return{tank_count:this.tank_count,self_sealing:this.self_sealing,fire_extinguisher:this.fire_extinguisher}}fromJSON(t,e){this.tank_count=A(t.tank_count,this.tank_count.length),this.self_sealing=t.self_sealing,this.fire_extinguisher=t.fire_extinguisher,this.wing_area=-1}serialize(t){t.PushNumArr(this.tank_count),t.PushBool(this.self_sealing),t.PushBool(this.fire_extinguisher)}deserialize(t){this.tank_count=t.GetNumArr(this.tank_count.length),this.self_sealing=t.GetBool(),this.fire_extinguisher=t.GetBool(),this.wing_area=-1}GetTankList(){return this.tank_stats}GetTankEnabled(){const t=[];for(const e of this.tank_stats)!this.is_cantilever&&e.cantilever?t.push(!1):t.push(!0);return t}GetTankCount(){return this.tank_count}SetTankCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.tank_count[t]=e,this.VerifyOK(),this.CalculateStats()}SetCantilever(t){this.is_cantilever&&!t&&(this.is_cantilever=t,this.VerifyOK()&&this.CalculateStats()),this.is_cantilever=t}SetArea(t){this.wing_area>t&&(this.wing_area=t,this.VerifyOK()&&this.CalculateStats()),this.wing_area=t}VerifyOK(){if(-1!=this.wing_area){var t=0;for(let e=0;e0;for(;s>0;)for(let t=this.tank_count.length-1;t>=0;t--)if(this.tank_stats[t].cantilever){this.tank_count[t]--,s--;break}for(let t=0;t0}GetSelfSealing(){return this.self_sealing}SetSelfSealing(t){this.self_sealing=t,this.CalculateStats()}GetExtinguisher(){return this.fire_extinguisher}SetExtinguisher(t){this.fire_extinguisher=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u,e=0;for(let s=0;s0&&(t.wetmass+=5-t.wetmass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class at extends H{constructor(){super(),this.bomb_count=0,this.rocket_count=0,this.internal_bay_count=0,this.internal_bay_1=!1,this.internal_bay_2=!1}toJSON(){return{bomb_count:this.bomb_count,rocket_count:this.rocket_count,bay_count:this.internal_bay_count,bay1:this.internal_bay_1,bay2:this.internal_bay_2}}fromJSON(t,e){this.bomb_count=t.bomb_count,this.internal_bay_count=t.bay_count,this.internal_bay_1=t.bay1,this.internal_bay_2=t.bay2,e>10.75&&(this.rocket_count=t.rocket_count)}serialize(t){t.PushNum(this.bomb_count),t.PushNum(this.internal_bay_count),t.PushBool(this.internal_bay_1),t.PushBool(this.internal_bay_2),t.PushNum(this.rocket_count)}deserialize(t){this.bomb_count=t.GetNum(),this.internal_bay_count=t.GetNum(),this.internal_bay_1=t.GetBool(),this.internal_bay_2=t.GetBool(),t.version>10.75&&(this.rocket_count=t.GetNum())}GetRocketCount(){return this.rocket_count}GetBombCount(){return this.bomb_count}GetInternalBombCount(){var t=10*this.internal_bay_count;return this.bomb_count>0&&this.internal_bay_count>0&&this.internal_bay_1&&(t*=2,this.internal_bay_2&&(t*=2)),t}GetMaxBombSize(){var t=0;const e=this.GetInternalBombCount();return this.bomb_count>0&&this.internal_bay_count>0&&(t=this.internal_bay_1?this.internal_bay_2?Math.floor(1e-6+e):Math.floor(1e-6+e/2):Math.floor(1e-6+e/4)),t}SetRocketCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.rocket_count=t,this.LimitMass(),this.CalculateStats()}SetBombCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.bomb_count=t,this.LimitMass(),this.CalculateStats()}GetBayCount(){return this.internal_bay_count}GetBay1(){return this.internal_bay_1}GetBay2(){return this.internal_bay_2}SetBayCount(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),this.internal_bay_count=t,this.CalculateStats()}SetUseBays(t,e){this.internal_bay_1=t,this.internal_bay_2=e,!this.internal_bay_1&&this.internal_bay_2&&(this.internal_bay_1=!0,this.internal_bay_2=!1),this.CalculateStats()}LimitMass(){var t=!1;const e=Math.min(this.GetInternalBombCount(),Math.floor(1e-6+3*this.acft_struct*this.maxbomb));var s,i,a=0,n=0;s=this.bomb_count>e?e:this.bomb_count,i=this.rocket_count+s>e?e-s:this.rocket_count,a=this.bomb_count-s,n=this.rocket_count-i;const r=Math.floor(1e-6+this.acft_struct*this.maxbomb-(s+i)/3)*this.gull_factor;for(;a+n>r;)n>0?n--:a--;let o=Math.max(0,s+a);this.bomb_count>o&&(t=!0,this.bomb_count=o);let l=Math.max(0,i+n);return this.rocket_count>l&&(t=!0,this.rocket_count=l),t}GetExternalMass(){const t=this.bomb_count+this.rocket_count;return Math.max(0,t-this.GetInternalBombCount())}SetAcftParameters(t,e,s){switch(this.acft_struct=t,this.maxbomb=e,s){case 2:case 3:this.gull_factor=1.1;break;case 4:this.gull_factor=1.2;break;default:this.gull_factor=1}this.LimitMass()&&this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u,e=this.GetExternalMass();if(t.reqsections+=this.internal_bay_count,this.internal_bay_count>0){const e=t.reqsections;this.internal_bay_1&&(t.reqsections+=e,this.internal_bay_2&&(t.reqsections+=e))}const s=Math.ceil(e/5-1e-6);return t.mass+=s,t.drag+=s,t.bomb_mass=this.bomb_count+this.rocket_count,t.reqsections=Math.ceil(-1e-6+t.reqsections),t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class nt extends H{constructor(t){super(),this.cargo_list=[];for(const e of t.spaces)this.cargo_list.push({name:e.name,stats:new u(e)});this.cargo_sel=0}toJSON(){return{space_sel:this.cargo_sel}}fromJSON(t,e){this.cargo_sel=t.space_sel}serialize(t){t.PushNum(this.cargo_sel)}deserialize(t){this.cargo_sel=t.GetNum()}GetSpaceList(){return this.cargo_list}GetSpace(){return this.cargo_sel}SetSpace(t){this.cargo_sel=t,this.CalculateStats()}SetCalculateStats(t){this.CalculateStats=t}PartStats(){var t=new u;return(t=t.Add(this.cargo_list[this.cargo_sel].stats)).bomb_mass+=3*t.reqsections,t.bomb_mass%5>0&&(t.bomb_mass+=5-t.bomb_mass%5),t}GetElectrics(){return{storage:0,equipment:[]}}}class rt extends H{constructor(t){super(),this.gear_list=[],this.gear_sel=0,this.retract=!1;for(const e of t.gear)this.gear_list.push({name:e.name,stats:new u(e),DpLMP:e.DpLMP,SpLMP:e.SpLMP,can_retract:e.can_retract});this.extra_list=[];for(const e of t.extras)this.extra_list.push({name:e.name,stats:new u(e),MpLMP:e.MpLMP});this.extra_sel=[...Array(this.extra_list.length).fill(!1)]}toJSON(){return{gear_sel:this.gear_sel,retract:this.retract,extra_sel:this.extra_sel}}fromJSON(t,e){this.gear_sel=t.gear_sel,this.retract=t.retract,this.extra_sel=b(t.extra_sel,this.extra_sel.length)}serialize(t){t.PushNum(this.gear_sel),t.PushBool(this.retract),t.PushBoolArr(this.extra_sel)}deserialize(t){this.gear_sel=t.GetNum(),this.retract=t.GetBool(),this.extra_sel=t.GetBoolArr(this.extra_sel.length)}IsDefault(){return 0==this.gear_sel&&0==this.retract&&0==this.extra_sel.reduce(((t,e)=>t||e),!1)}GetGearName(){return this.retract&&"Boat Hull"==this.gear_list[this.gear_sel].name?h("Retractable Gear + Boat Hull"):this.retract?h("Retractable ")+h(this.gear_list[this.gear_sel].name):h(this.gear_list[this.gear_sel].name)}GetGearList(){return this.gear_list}CanGear(){const t=[...Array(this.gear_list.length).fill(!0)];for(let e=0;e=2||0==t&&e>=3}SetGull(t){this.gull_deck=t}SetCalculateStats(t){this.CalculateStats=t}IsVital(){return!0}PartStats(){var t=new u;this.CanGear()[this.gear_sel]||(this.gear_sel=0),this.CanRetract()||(this.retract=!1);var e=this.loadedMass;for(let s=0;s=0;i--)s+=t[i],t[i]=s-e;return t}SetArmourCoverage(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),this.armour_coverage[t]=1!=t?e:e-this.skin_armour,this.NormalizeCoverage(),this.CalculateStats()}NormalizeCoverage(){var t=-8+Math.min(0,-Math.floor(1e-6+(this.vital_parts-8)/2));t+=this.skin_armour;for(let e=this.armour_coverage.length-1;e>=0;e--)this.armour_coverage[e]=Math.max(0,Math.min(Math.abs(t),this.armour_coverage[e])),t+=this.armour_coverage[e]}GetElectricalList(){return this.electric_list}GetElectricalCount(){return this.electrical_count}SetElectricalCount(t,e){(e!=e||e<0)&&(e=0),e=Math.floor(1e-6+e),e=Math.min(e,50),this.electrical_count[t]=e,this.CalculateStats()}GetRadioList(){return this.radio_list}GetRadioSel(){return this.radio_sel}SetRadioSel(t){this.radio_sel=t,this.CalculateStats()}GetReconList(){return this.recon_list}GetReconSel(){return this.recon_sel}SetReconSel(t,e){((e=Math.trunc(e))!=e||e<0)&&(e=0),this.recon_sel[t]=e,this.CalculateStats()}GetVisibilityList(){return this.visi_list}GetCanVisibility(){return this.can_visi}GetVisibilitySel(){return this.visi_sel}SetVisibilitySel(t,e){this.visi_sel[t]=e,this.CalculateStats()}GetClimateList(){return this.clim_list}GetClimateSel(){return this.clim_sel}GetClimateEnable(){const t=[];for(const e of this.clim_list)!this.acft_rad&&e.req_radiator?t.push(!1):t.push(!0);return t}SetClimateSel(t,e){this.clim_sel[t]=e,this.CalculateStats()}GetAutopilotList(){return this.auto_list}GetAutopilotSel(){return this.auto_sel}SetAutopilotSel(t){this.auto_sel=t,this.CalculateStats()}GetControlList(){return this.cont_list}GetControlSel(){return this.cont_sel}SetControlSel(t){this.cont_sel=t,this.CalculateStats()}SetAcftRadiator(t){this.acft_rad=t}IsElectrics(){for(const t of this.electrical_count)if(t>0)return!0;for(let t=0;t0&&(""!=e&&(e+=", "),e+=n.toString()+"/"+(11-s[a]).toString()+"+")}""!=e&&t.warnings.push({source:h("Armour"),warning:e,color:c.WHITE});for(let e=0;e0){let s=this.electric_list[e].stats.Clone();s=s.Multiply(this.electrical_count[e]),t=t.Add(s)}t=t.Add(this.radio_list[this.radio_sel].stats);for(let e=0;e0){let s=this.recon_list[e].stats.Clone();s=s.Multiply(this.recon_sel[e]),t=t.Add(s)}for(let e=0;e0&&(t+=i.storage*a,i.cp10s>0?e.push({source:h(i.name),charge:n.Format("{0}"+h("Derived Per 10 Speed"),Math.floor(1e-6+a*i.cp10s))}):0!=i.stats.charge&&e.push({source:h(i.name),charge:(a*i.stats.charge).toString()}))}const s=this.radio_list[this.radio_sel];e=this.FormatEquipment(e,s.name,s.stats.charge);for(let t=0;t0&&(e=this.FormatEquipment(e,s.name,i*s.stats.charge))}for(let t=0;t0){let e=Math.min(t,this.drag);e=Math.max(e,0),this.drag-=e,t-=e,e=Math.min(t,this.reliability),e=Math.max(e,0),this.reliability-=e,t-=e,e=Math.min(t,this.maxstrain),e=Math.max(e,0),this.maxstrain-=e,t-=e,e=Math.min(t,this.toughness),e=Math.max(e,0),this.toughness-=e,t-=e,e=Math.min(t,this.mass),e=Math.max(e,0),this.mass-=e,t-=e,e=Math.min(t,this.escape),e=Math.max(e,0),this.escape-=e,t-=e,e=Math.min(t,this.bleed),e=Math.max(e,0),this.bleed-=e,t-=e,e=Math.min(t,this.cost),e=Math.max(e,0),this.cost-=e,t-=e}}GetFreeDots(){return this.free_dots}SetFreeDots(t){(t!=t||t<0)&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,0),this.free_dots=t,this.ReduceDots(),this.CalculateStats()}GetCost(){return this.cost}SetCost(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.cost=t,this.ReduceDots(),this.CalculateStats()}GetBleed(){return this.bleed}SetBleed(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.bleed=t,this.ReduceDots(),this.CalculateStats()}GetEscape(){return this.escape}SetEscape(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.escape=t,this.ReduceDots(),this.CalculateStats()}GetMass(){return this.mass}SetMass(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.mass=t,this.ReduceDots(),this.CalculateStats()}GetToughness(){return this.toughness}SetToughness(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.toughness=t,this.ReduceDots(),this.CalculateStats()}GetMaxStrain(){return this.maxstrain}SetMaxStrain(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.maxstrain=t,this.ReduceDots(),this.CalculateStats()}GetReliabiilty(){return this.reliability}SetReliability(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.reliability=t,this.ReduceDots(),this.CalculateStats()}GetDrag(){return this.drag}SetDrag(t){t!=t&&(t=0),t=Math.floor(1e-6+t),t=Math.max(t,-3),t=Math.min(t,3),this.drag=t,this.ReduceDots(),this.CalculateStats()}SetAcftStats(t){this.acft_stats=t}SetCalculateStats(t){this.CalculateStats=t}PartStats(){const t=new u;return t.cost=Math.floor(1e-6+-this.cost*this.acft_stats.cost/10),t.liftbleed=Math.floor(1e-6+3*-this.bleed),t.escape=this.escape,t.visibility=this.escape,t.mass=Math.floor(1e-6+-this.mass*this.acft_stats.mass/10),t.toughness=Math.floor(1e-6+this.toughness*this.acft_stats.toughness/4),t.reliability=2*this.reliability,t.drag=Math.floor(1e-6+-this.drag*this.acft_stats.drag/10),t}GetElectrics(){return{storage:0,equipment:[]}}}!function(t){t[t.NONE=-1]="NONE",t[t.INTERRUPT=0]="INTERRUPT",t[t.SYNCH=1]="SYNCH",t[t.SPINNER=2]="SPINNER",t[t.DEFLECT=3]="DEFLECT",t[t.NO_INTERFERENCE=4]="NO_INTERFERENCE",t[t.ENUM_MAX=5]="ENUM_MAX"}(O||(O={})),function(t){t[t.BULLETS=0]="BULLETS",t[t.HEATRAY=1]="HEATRAY",t[t.PNEUMATIC=2]="PNEUMATIC",t[t.ENUM_MAX=3]="ENUM_MAX",t[t.GYROJETS=4]="GYROJETS"}(k||(k={})),function(t){t[t.STANDARD=0]="STANDARD",t[t.MECHANICAL=1]="MECHANICAL",t[t.GAST=2]="GAST",t[t.ROTARY=3]="ROTARY",t[t.ENUM_MAX=4]="ENUM_MAX"}(L||(L={}));class ht extends H{constructor(t,e,s,i=!1){super(),this.weapon_type=t,this.fixed=i,this.wing=!0,this.covered=!1,this.accessible=!1,this.free_accessible=!1,this.synchronization=i?O.NONE:O.INTERRUPT,this.w_count=1,this.repeating=!1,this.wing_reinforcement=!1}toJSON(){return{fixed:this.fixed,wing:this.wing,covered:this.covered,accessible:this.accessible,free_accessible:this.free_accessible,synchronization:this.synchronization,w_count:this.w_count}}fromJSON(t,e){this.fixed=t.fixed,this.wing=t.wing,this.covered=t.covered,this.accessible=t.accessible,this.free_accessible=t.free_accessible,this.synchronization=t.synchronization,this.w_count=t.w_count,e<10.95&&(this.repeating=t.repeating)}serialize(t){t.PushBool(this.fixed),t.PushBool(this.wing),t.PushBool(this.covered),t.PushBool(this.accessible),t.PushBool(this.free_accessible),t.PushNum(this.synchronization),t.PushNum(this.w_count)}deserialize(t){this.fixed=t.GetBool(),this.wing=t.GetBool(),this.covered=t.GetBool(),this.accessible=t.GetBool(),this.free_accessible=t.GetBool(),this.synchronization=t.GetNum(),this.w_count=t.GetNum(),t.version<10.95&&(this.repeating=t.GetBool())}SetWeaponType(t,e,s){this.weapon_type=t,this.action=e,16==this.weapon_type.size&&(this.w_count=1),this.SetCount(this.w_count,!1)}GetFixed(){return this.fixed}SetFixed(t){t!=this.fixed&&(t?this.fixed=!0:(this.fixed=!1,this.synchronization=O.NONE))}SetCanWing(t){this.canwing=t,this.wing&&!t&&(this.wing=!1)}GetWing(){return this.wing}CanWing(){return this.weapon_type.size<=16&&this.canwing}SetWing(t){t&&this.CanWing()?(this.wing=!0,this.free_accessible=!1,this.synchronization=O.NONE):this.wing=!1,this.CalculateStats()}CanCovered(){return this.wing?this.has_cantilever&&!(16==this.weapon_type.size&&!this.fixed):!(this.GetArty()&&!this.fixed)}GetCovered(){return this.covered}SetCovered(t){this.covered=t,this.CalculateStats()}GetAccessible(){return this.accessible||this.free_accessible}SetAccessible(t){t&&this.free_accessible&&(t=!1),this.accessible=t,this.CalculateStats()}GetFreeAccessible(){return this.free_accessible}SetFreeAccessible(t){t&&!this.wing&&this.can_free_accessible?(this.free_accessible=!0,this.accessible=!1):this.free_accessible=!1,this.CalculateStats()}CanSynchronization(){const t=[];for(let e=-1;e16;)t-=1;this.w_count=t,e&&this.CalculateStats()}CanRepeating(){return!this.weapon_type.rapid||this.weapon_type.reload>0}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:this.repeating=!1,this.CalculateStats()}ResolveSynch(){const t=this.synchronization;if(this.synchronization=O.ENUM_MAX,this.CanSynch(t))this.action==L.MECHANICAL&&t!=O.SPINNER?this.synchronization=O.SYNCH:this.synchronization=t;else{for(let t=-1;t8||16==this.weapon_type.size)&&(t.reqsections+=1),this.accessible&&(t.cost+=Math.max(1,Math.floor(1e-6+this.w_count/2))),!this.fixed)if(e<=2);else if(e<=4)t.cost+=1;else if(e<=8)t.mass+=1,t.cost+=3;else{if(!(e<=16))throw"Weapon size screwup in Turret size cost.";t.mass+=2,t.cost+=5}return this.synchronization==O.INTERRUPT?(t.cost+=2*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=2*this.w_count),t.era.push({name:h("Interruptor Gear"),era:h("WWI")})):this.synchronization==O.SYNCH&&this.action!=L.MECHANICAL?(t.cost+=3*this.w_count,"Light Machine Cannon"==this.weapon_type.name&&(t.cost+=3*this.w_count),t.era.push({name:h("Synchronization Gear"),era:h("Roaring 20s")})):this.synchronization==O.DEFLECT?(t.cost+=1,t.warnings.push({source:h(this.weapon_type.name),warning:h("Deflector Plate Warning"),color:c.WHITE})):this.synchronization!=O.NO_INTERFERENCE||this.IsLightningArc()||t.warnings.push({source:h(this.weapon_type.name)+" "+h("No Interference"),warning:h("No Interference Warning"),color:c.YELLOW}),this.wing_reinforcement&&(t.mass+=2),t.Round(),t}GetElectrics(){return{storage:0,equipment:[]}}}class ct extends H{constructor(t,e){super(),this.weapon_list=t,this.wl_permute=e,this.directions=[...Array(6).fill(!1)],this.directions[0]=!0,this.fixed=!0,this.ammo=1,this.weapon_type=0,this.raw_weapon_type=0,this.weapons=[],this.action_sel=L.STANDARD,this.projectile_sel=k.BULLETS,this.has_propeller=!0,this.sticky_guns=0,this.repeating=!1,this.seat=0,this.final_weapon={name:"",abrv:"",era:"",size:0,stats:new u,damage:0,hits:0,ammo:0,ap:0,jam:"",reload:0,rapid:!1,synched:!1,shells:!1,can_action:!1,can_projectile:!1,deflection:0},this.MakeFinalWeapon(),this.SWC(1)}toJSON(){const t=[];for(const e of this.weapons)t.push(e.toJSON());return{weapon_type:this.raw_weapon_type,fixed:this.fixed,directions:this.directions,weapons:t,ammo:this.ammo,action:this.action_sel,projectile:this.projectile_sel,repeating:this.repeating,seat:this.seat}}fromJSON(t,e){this.raw_weapon_type=t.weapon_type,this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.fixed,this.directions=b(t.directions,this.directions.length),this.weapons=[],this.ammo=t.ammo,null==this.ammo&&(this.ammo=1),e<10.25?(this.action_sel=L.STANDARD,this.projectile_sel=k.BULLETS):(this.action_sel=t.action,this.projectile_sel=t.projectile),e<11.75&&(this.projectile_sel==k.PNEUMATIC?this.projectile_sel=k.BULLETS:this.projectile_sel==k.ENUM_MAX&&(this.projectile_sel=k.PNEUMATIC)),this.MakeFinalWeapon();for(const s of t.weapons){const t=new ht(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),t.fromJSON(s,e),this.weapons.push(t)}if(e<10.95){this.repeating=!1;for(const t of this.weapons)this.repeating=this.repeating||t.GetRepeating()}else this.repeating=t.repeating;this.seat=e>11.65?t.seat:0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}serialize(t){t.PushNum(this.raw_weapon_type),t.PushBool(this.fixed),t.PushBoolArr(this.directions),t.PushNum(this.ammo),t.PushNum(this.weapons.length);for(const e of this.weapons)e.serialize(t);t.PushNum(this.action_sel),t.PushNum(this.projectile_sel),t.PushBool(this.repeating),t.PushNum(this.seat)}deserialize(t){this.raw_weapon_type=t.GetNum(),this.weapon_type=this.wl_permute[this.raw_weapon_type],this.fixed=t.GetBool(),this.directions=t.GetBoolArr(this.directions.length),this.ammo=t.GetNum();const e=t.GetNum();this.weapons=[],this.MakeFinalWeapon();for(let s=0;s11.65?this.seat=t.GetNum():this.seat=0,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}GetWeaponSelected(){return this.weapon_type}MakeFinalWeapon(){const t=this.weapon_type;if(this.final_weapon.can_action=this.weapon_list[t].can_action,this.final_weapon.can_projectile=this.weapon_list[t].can_projectile,this.final_weapon.ammo=this.weapon_list[t].ammo,this.final_weapon.ap=this.weapon_list[t].ap,this.final_weapon.damage=this.weapon_list[t].damage,this.final_weapon.era=this.weapon_list[t].era,this.final_weapon.name=this.weapon_list[t].name,this.final_weapon.abrv=this.weapon_list[t].abrv,this.final_weapon.reload=this.weapon_list[t].reload,this.final_weapon.shells=this.weapon_list[t].shells,this.final_weapon.size=this.weapon_list[t].size,this.final_weapon.stats=this.weapon_list[t].stats.Clone(),this.final_weapon.deflection=this.weapon_list[t].deflection,this.final_weapon.jam=this.weapon_list[t].jam,this.final_weapon.stats.era=[],this.final_weapon.stats.era.push({name:this.weapon_list[t].name,era:this.weapon_list[t].era}),0==this.weapon_list[t].hits&&(this.action_sel==L.MECHANICAL&&(this.action_sel=L.STANDARD),this.projectile_sel!=k.GYROJETS&&this.projectile_sel!=k.HEATRAY||(this.projectile_sel=k.BULLETS)),this.action_sel==L.STANDARD)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.synched=this.weapon_list[t].synched;else if(this.action_sel==L.MECHANICAL)this.final_weapon.hits=this.weapon_list[t].hits,this.final_weapon.stats.warnings.push({source:h("Mechanical Action"),warning:h("Mechanical Action Warning"),color:c.WHITE}),this.final_weapon.jam="0/0",this.final_weapon.rapid=!0,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!0,this.final_weapon.stats.era.push({name:h("Mechanical Action"),era:h("WWI")});else if(this.action_sel==L.GAST)this.final_weapon.hits=2*this.weapon_list[t].hits,this.final_weapon.ammo=this.weapon_list[t].ammo/2,this.final_weapon.rapid=this.weapon_list[t].rapid,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.synched=!1,this.final_weapon.stats.era.push({name:h("Gast Principle"),era:h("WWI")});else if(this.action_sel==L.ROTARY){this.final_weapon.stats.mass+=this.weapon_list[t].stats.mass,this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.size+=this.weapon_list[t].size,this.final_weapon.size=Math.min(16,this.final_weapon.size),this.final_weapon.hits=3*this.weapon_list[t].hits,this.final_weapon.deflection-=1,this.final_weapon.synched=!1;const e=this.final_weapon.jam.split("/");e[0]="9999",e[1]=(parseInt(e[1])+1).toString(),this.final_weapon.jam=e.join("/"),this.final_weapon.stats.era.push({name:h("Rotary_Gun"),era:h("WWI")})}if(this.repeating&&0!=this.final_weapon.reload&&(this.final_weapon.reload=0,this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost))),this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=k.HEATRAY||(this.projectile_sel=k.BULLETS),this.action_sel!=L.GAST&&this.action_sel!=L.ROTARY&&this.action_sel!=L.MECHANICAL||this.projectile_sel!=k.PNEUMATIC||(this.projectile_sel=k.BULLETS),this.projectile_sel==k.HEATRAY)this.final_weapon.stats.cost+=this.weapon_list[t].stats.cost,this.final_weapon.shells=!1,this.final_weapon.ammo=0,this.final_weapon.deflection=0,this.final_weapon.ap=Math.max(0,this.final_weapon.ap-1),this.final_weapon.stats.warnings.push({source:h("Heat Ray"),warning:h("Heat Ray Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Heat Ray"),era:h("Himmilgard")});else if(this.projectile_sel==k.GYROJETS)this.final_weapon.stats.cost+=Math.max(1,Math.floor(1e-6+.5*this.weapon_list[t].stats.cost)),this.final_weapon.shells=!1,this.final_weapon.damage-=1,this.final_weapon.stats.warnings.push({source:h("Gyrojets"),warning:h("Gyrojets Warning"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Gyrojets"),era:h("Roaring 20s")});else if(this.projectile_sel==k.PNEUMATIC){if(this.final_weapon.ammo*=2,this.final_weapon.shells=!1,this.final_weapon.rapid){const t=this.final_weapon.jam.split("/");t[1]="9999",this.final_weapon.jam=t.join("/"),this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 1"),color:c.WHITE}),this.final_weapon.stats.era.push({name:h("Pneumatic"),era:h("Pioneer")})}this.final_weapon.hits>0&&this.final_weapon.stats.warnings.push({source:h("Pneumatic"),warning:h("Pneumatic Warning 2"),color:c.WHITE})}0!=this.final_weapon.deflection&&this.final_weapon.stats.warnings.push({source:h(this.final_weapon.name),warning:h("Deflection Warning",this.final_weapon.deflection),color:c.WHITE})}SetWeaponSelected(t){const e=this.IsLightningArc();if(this.weapon_type=t,this.raw_weapon_type=this.wl_permute.findIndex((e=>e==t)),16==this.weapon_list[t].size)for(;this.weapons.length>1;)this.weapons.pop();this.weapon_list[t].can_action&&this.GetCanAction()[this.action_sel]||(this.action_sel=L.STANDARD),this.weapon_list[t].can_projectile&&this.GetCanProjectile()[this.projectile_sel]||(this.projectile_sel=k.BULLETS),this.weapon_list[t].rapid?this.repeating=!1:this.repeating||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD),this.CanRepeating()||(this.repeating=!1),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);if(this.IsLightningArc()){this.SetFixed(!0),this.directions[0]=!0;for(let t=1;t0)&&this.weapon_list[this.weapon_type].ammo>0&&"Precision Rifle"!=this.weapon_list[this.weapon_type].name}GetRepeating(){return this.repeating}SetRepeating(t){t&&this.CanRepeating()?this.repeating=!0:(this.repeating=!1,this.weapon_list[this.weapon_type].rapid||this.action_sel!=L.GAST||(this.action_sel=L.STANDARD)),this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel);this.CalculateStats()}GetFixed(){return this.fixed}SetFixed(t){if(this.IsLightningArc()&&(t=!0),this.fixed!=t){this.fixed=t;for(const t of this.weapons)t.SetFixed(this.fixed);if(t){let t=!1;for(let e=0;ethis.weapons.length;){const t=new ht(this.final_weapon,this.action_sel,this.projectile_sel,this.fixed);t.SetCalculateStats(this.CalculateStats),this.weapons.push(t)}for(;t1||this.weapons[0].GetCount()>1}SetAmmo(t){(t!=t||t<1)&&(t=1),t=Math.floor(1e-6+t),this.ammo=t,this.CalculateStats()}SetHavePropeller(t){this.has_propeller&&!t&&this.action_sel==L.MECHANICAL&&(this.has_propeller=t,this.SetAction(L.STANDARD)),this.has_propeller=t}SetCanWing(t){for(const e of this.weapons)e.SetCanWing(t)}GetAction(){return this.action_sel}GetCanAction(){return[!0,this.has_propeller&&this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].hits>0&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&(this.repeating||this.weapon_list[this.weapon_type].rapid),this.weapon_list[this.weapon_type].can_action&&this.weapon_list[this.weapon_type].rapid]}SetAction(t){if(this.final_weapon.can_action){this.action_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.action_sel=L.STANDARD;this.CalculateStats()}GetCanProjectile(){return[!0,this.final_weapon.can_projectile&&this.action_sel!=L.MECHANICAL&&this.action_sel!=L.GAST&&this.weapon_list[this.weapon_type].hits>0,this.final_weapon.can_projectile&&this.action_sel!=L.ROTARY&&this.action_sel!=L.GAST&&this.action_sel!=L.MECHANICAL]}GetProjectile(){return this.projectile_sel}SetProjectile(t){if(this.final_weapon.can_projectile){this.projectile_sel=t,this.MakeFinalWeapon();for(const t of this.weapons)t.SetWeaponType(this.final_weapon,this.action_sel,this.projectile_sel)}else this.projectile_sel=k.BULLETS;this.CalculateStats()}GetFinalWeapon(){return this.final_weapon}SetStickyGuns(t){this.sticky_guns=t}GetHRCharges(){if(this.IsLightningArc())return[3];let t=0;for(const e of this.weapons)t+=e.GetCount();if(this.final_weapon.hits>0){let e=this.weapon_list[this.weapon_type].stats.cost;return this.action_sel==L.ROTARY&&(e*=2),this.final_weapon.rapid?[t*e,Math.max(t*e+1,Math.floor(1e-6+1.5*t*e))]:[t*e]}return"Scattergun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(1.875001),Math.floor(3.125001)]:[Math.floor(1.875001)]:"Punt Gun"==this.final_weapon.name?this.final_weapon.rapid?[Math.floor(3.750001),Math.floor(6.250001)]:[Math.floor(3.750001)]:void 0}GetShots(){return Math.max(1,Math.floor(1e-6+this.final_weapon.ammo*this.ammo))}IsLightningArc(){return"Lightning Arc"==this.final_weapon.name}GetReload(){return this.final_weapon.reload}GetWingWeight(){let t=0;for(const e of this.weapons)e.GetWing()&&(t+=e.PartStats().mass);return t}GetDirectionCount(){let t=0;for(const e of this.directions)e&&t++;return t}SetSeat(t){this.seat=t,this.CalculateStats()}GetSeat(){return this.seat}GetIsFullyAccessible(){for(const t of this.weapons)if(!t.GetAccessible())return!1;return!0}GetIsPartlyAccessible(){for(const t of this.weapons)if(t.GetAccessible())return!0;return!1}SetCalculateStats(t){this.CalculateStats=t;for(const e of this.weapons)e.SetCalculateStats(t)}PartStats(){var t=new u;let e=this.GetDirectionCount(),s=0;for(const i of this.weapons)i.has_cantilever=this.has_cantilever,i.SetTurret(e>2),t=t.Add(i.PartStats()),s+=i.GetCount(),this.fixed||(2==e?t.cost+=1:3==e||4==e?t.cost+=2:5==e?t.cost+=3:6==e&&(t.cost+=4));return(this.projectile_sel==k.HEATRAY||this.IsLightningArc())&&(this.ammo=1),t.mass+=(this.ammo-1)*s,t}GetElectrics(){return{storage:0,equipment:[]}}}const ut=JSON.parse('{"A":[{"name":"Submachine Gun","abrv":"SMG","era":"WWI","cost":1,"mass":1,"drag":0,"damage":1,"hits":4,"ap":0,"ammo":10,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"0/1","reload":2,"size":1,"can_action":true,"can_projectile":true,"deflection":0,"warning":"SMG Warning"},{"name":"Scattergun","abrv":"SG","era":"Pioneer","cost":2,"mass":2,"drag":2,"damage":0.5,"hits":0,"ap":0,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Scattergun Warning","size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Machine Gun","abrv":"LMG","era":"WWI","cost":2,"mass":2,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":false,"shells":false,"jam":"1/2","reload":2,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Machine Gun","abrv":"MG","era":"WWI","cost":2,"mass":3,"drag":1,"damage":2,"hits":4,"ap":1,"ammo":10,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"1/2","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Balloon Gun","abrv":"BMG","era":"WWI","cost":3,"mass":3,"drag":1,"damage":2,"hits":4,"ap":0,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":-2},{"name":"Enhanced Machine Gun","abrv":"EMG","era":"Coming Storm","cost":3,"mass":2,"drag":1,"damage":2,"hits":5,"ap":1,"ammo":8,"rapid":true,"manual":false,"synched":true,"shells":false,"jam":"0/0","reload":0,"size":2,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Enhanced Heavy Machine Gun","abrv":"EHMG","era":"Coming Storm","cost":5,"mass":3,"drag":2,"damage":4,"hits":5,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Punt Gun","abrv":"PG","era":"Pioneer","cost":4,"mass":4,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":false,"jam":"0","reload":1,"warning":"Punt Gun Warning","size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Light Repeating Cannon","abrv":"LRC","era":"WWI","cost":4,"mass":4,"drag":3,"damage":8,"hits":3,"ap":2,"ammo":6,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"2/5","reload":2,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Heavy Cannon","abrv":"HC","era":"WWI","cost":6,"mass":5,"drag":2,"damage":16,"hits":1,"ap":2,"ammo":5,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":8,"can_action":true,"can_projectile":true,"deflection":-3},{"name":"Light Machine Cannon","abrv":"LMC","era":"Coming Storm","cost":8,"mass":4,"drag":3,"damage":8,"hits":4,"ap":4,"ammo":6,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Machine Cannon","abrv":"HMC","era":"WWII","cost":12,"mass":5,"drag":4,"damage":12,"hits":3,"ap":4,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":8,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Fliergerflammenwerfer","abrv":"FFW","era":"WWI","cost":5,"mass":1,"drag":3,"damage":0.5,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0/0","reload":0,"warning":"Fliergerflammenwerfer Warning","size":8,"can_action":false,"can_projectile":false,"deflection":0},{"name":"Recoilless Cannon","abrv":"RC","era":"WWI","cost":5,"mass":8,"drag":3,"damage":30,"hits":1,"ap":3,"ammo":3,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":-5},{"name":"Autocannon","abrv":"AC","era":"WWII","cost":15,"mass":8,"drag":5,"damage":24,"hits":2,"ap":5,"ammo":2,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"0/0","reload":0,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Battle Cannon","abrv":"BC","era":"WWII","cost":15,"mass":40,"drag":8,"damage":24,"hits":2,"ap":5,"ammo":1,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":16,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Precision Rifle","abrv":"PR","era":"WWI","mass":1,"drag":1,"cost":2,"damage":5,"hits":10,"ap":2,"ammo":8,"rapid":false,"manual":true,"synched":false,"shells":true,"jam":"0","reload":1,"size":2,"can_action":false,"can_projectile":false,"warning":"Precision Rifle Warning","deflection":0},{"name":"Lightning Arc","abrv":"LA","era":"Himmilgard","cost":8,"mass":5,"drag":3,"damage":0,"hits":0,"ap":0,"ammo":0,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":"0","reload":0,"size":16,"can_action":false,"can_projectile":false,"warning":"Lightning Arc Warning","deflection":0},{"name":"Harpoon Launcher","abrv":"HL","era":"Himmilgard","cost":3,"mass":3,"drag":2,"damage":4,"hits":1,"ap":1,"ammo":2,"rapid":false,"manual":false,"synched":false,"shells":false,"jam":0,"reload":1,"size":4,"can_action":false,"can_projectile":false,"warning":"Harpoon Launcher Warning","deflection":0},{"name":"Heavy Machine Gun","abrv":"HMG","era":"WWI","cost":4,"mass":4,"drag":2,"damage":4,"hits":4,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":true,"shells":true,"jam":"2/3","reload":0,"size":4,"can_action":true,"can_projectile":true,"deflection":0},{"name":"Heavy Repeating Cannon","abrv":"HRC","era":"WWI","cost":10,"mass":6,"drag":4,"damage":16,"hits":2,"ap":2,"ammo":5,"rapid":true,"manual":false,"synched":false,"shells":true,"jam":"4/6","reload":2,"size":16,"can_action":true,"can_projectile":true,"deflection":-3}]}');class mt extends H{constructor(){super(),this.direction_list=["Forward","Rearward","Up","Down","Left","Right"],this.synchronization_list=["None","Interruptor Gear","Synchronization Gear","Spinner Gun","Deflector Plate","No Interference"],this.action_list=[{name:"Standard Action"},{name:"Mechanical Action"},{name:"Gast Principle"},{name:"Rotary_Gun"}],this.projectile_list=[{name:"Standard"},{name:"Heat Ray"},{name:"Pneumatic"}],this.weapon_list=[];for(const t of ut.A){const e={name:t.name,abrv:t.abrv,era:t.era,size:t.size,stats:new u(t),damage:t.damage,hits:t.hits,ammo:t.ammo,ap:t.ap,jam:t.jam.toString(),reload:t.reload,rapid:t.rapid,synched:t.synched,shells:t.shells,can_action:t.can_action,can_projectile:t.can_projectile,deflection:t.deflection};this.weapon_list.push(e)}const t=(t,e)=>{const s=(t,e)=>tt(this.weapon_list[e],this.weapon_list[s])));const e=[];for(let t=0;te==t)));this.wl_permute=e,this.weapon_list=this.weapon_list.sort(t),this.weapon_sets=[],this.brace_count=0,this.isheli=!1}toJSON(){const t=[];for(const e of this.weapon_sets)t.push(e.toJSON());return{weapon_systems:t,brace_count:this.brace_count}}fromJSON(t,e){this.weapon_sets=[];const s=t.weapon_systems;for(const t of s){const s=new ct(this.weapon_list,this.wl_permute);s.SetCalculateStats(this.CalculateStats),s.fromJSON(t,e),this.weapon_sets.push(s)}e>10.35&&(this.brace_count=t.brace_count)}serialize(t){t.PushNum(this.weapon_sets.length);for(const e of this.weapon_sets)e.serialize(t);t.PushNum(this.brace_count)}deserialize(t){this.weapon_sets=[];const e=t.GetNum();for(let s=0;s10.35&&(this.brace_count=t.GetNum())}GetWeaponList(){return this.weapon_list}GetDirectionList(){return this.direction_list}GetSynchronizationList(){return this.synchronization_list}SetWeaponSetCount(t){for((t!=t||t<1)&&(t=0),t=Math.floor(1e-6+t);t>this.weapon_sets.length;){const t=new ct(this.weapon_list,this.wl_permute);t.SetCalculateStats(this.CalculateStats),this.weapon_sets.push(t)}for(;t=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER)return void e[t].SetSynchronization(O.INTERRUPT)}}RemoveOneArtyTractorSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[0]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(O.NO_INTERFERENCE)}}RemoveOnePusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER)return void e[t].SetSynchronization(O.INTERRUPT)}}RemoveOneArtyPusherSpinner(){for(let t=this.weapon_sets.length-1;t>=0;t--)if(this.weapon_sets[t].GetDirection()[1]){const e=this.weapon_sets[t].GetWeapons();for(let t=e.length-1;t>=0;t--)if(e[t].GetSynchronization()==O.SPINNER&&e[t].GetArty())return void e[t].SetSynchronization(O.NO_INTERFERENCE)}}CanTractorSpinner(){return this.CountTractorSpinner()+this.CountArtyTractorSpinner()this.tractor_arty_spinner_count;)this.RemoveOneArtyTractorSpinner();for(;this.CountTractorSpinner()>this.tractor_spinner_count;)this.RemoveOneTractorSpinner();for(;this.CountArtyPusherSpinner()>this.pusher_arty_spinner_count;)this.RemoveOneArtyPusherSpinner();for(;this.CountPusherSpinner()>this.pusher_spinner_count;)this.RemoveOnePusherSpinner();var e=0,s=0;0==this.cant_type?(e=4,s=2):1==this.cant_type?(e=8,s=4):(e=16,s=8);const i=[];for(const t of this.weapon_sets)for(const e of t.GetWeapons()){e.wing_reinforcement=!1;const s={total:0,count:0,sz:0,w:e};e.GetWing()&&(s.count=e.GetCount(),s.sz=this.weapon_list[t.GetWeaponSelected()].size,s.total=s.count*s.sz,i.push(s))}i.sort((function(t,e){return t.total-e.total}));for(const t of i)e>=0&&(s0,t=t.Add(e.PartStats());return t.cost+=this.brace_count/3,this.brace_count>0&&t.warnings.push({source:h("Weapons Braces"),warning:h("Weapons Braces Warning"),color:c.WHITE}),t.control-=Math.floor(1e-6+this.GetWingWeight()/5),t}GetElectrics(){const t={storage:0,equipment:[]};for(let e=0;e11.55&&(this.blade_idx=t.blade_idx),e<12.45&&(this.rotor_span=0),this.rotor_thickness=e<12.55?0:t.rotor_thickness,this.dryMP=-1}serialize(t){t.PushNum(this.type),t.PushNum(this.rotor_count),t.PushNum(this.rotor_span),t.PushNum(this.cant_idx),t.PushNum(this.stagger_sel),t.PushBool(this.accessory),t.PushNum(this.blade_idx),t.PushNum(this.rotor_thickness)}deserialise(t){this.type=t.GetNum(),this.rotor_count=t.GetNum(),this.rotor_span=t.GetNum(),this.cant_idx=t.GetNum(),t.version<12.35?(t.GetBool(),this.stagger_sel=0):this.stagger_sel=t.GetNum(),this.accessory=t.GetBool(),t.version>11.55&&(this.blade_idx=t.GetNum()),t.version<12.45&&(this.rotor_span=0),t.version<12.55?this.rotor_thickness=0:this.rotor_thickness=t.GetNum(),this.dryMP=-1}SetCantileverList(t){this.cant_list=t}GetCantileverList(){return this.cant_list}SetCantilever(t){this.cant_idx=t,this.CalculateStats()}GetCantilever(){return this.cant_idx}SetRotorThickness(t){t<0&&(t=0),this.rotor_thickness=Math.floor(1e-6+t),this.CalculateStats()}GetRotorThickness(){return this.rotor_thickness}SetType(t){this.type!=t&&(this.accessory=!1,this.cant_idx=0,this.stagger_sel=0,this.rotor_count=1,this.type=t,this.rotor_span=0)}CanRotorCount(){return this.type==N.HELICOPTER}SetRotorCount(t){t<1&&(t=1),t>=2&&t%2==1&&(t==this.rotor_count+1?t+=1:t-=1),this.rotor_count=t,this.rotor_count<2&&(this.stagger_sel=0),this.CalculateStats()}GetRotorCount(){return this.rotor_count}CanRotorSpan(){return this.type==N.HELICOPTER}SetRotorSpan(t){this.rotor_span=Math.floor(1e-6+t),this.CalculateStats()}GetRotorSpan(){return this.rotor_span}CanTandem(){return this.type==N.HELICOPTER&&this.rotor_count>1}SetBladeCount(t){this.blade_idx=t,this.CalculateStats()}SetWingArea(t){this.wing_area=t}GetSizingSpan(){return this.sizing_span}SetMP(t){t!=this.dryMP&&(this.dryMP=t,this.CalculateStats())}GetRotorStrain(){const t=this.GetRotorArea();return this.rotor_count*Math.max(1,2*(this.sizing_span+this.rotor_span)+t-10)}GetRotorArea(){return Math.PI/9*(this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span)}GetIdealRotorArea(){return Math.PI/9*this.sizing_span*this.sizing_span}GetRotorDrag(){if(this.type==N.HELICOPTER||this.type==N.AUTOGYRO){const t=this.GetRotorArea();return 1==this.rotor_count?Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))):Math.floor(1e-6+.75*this.rotor_count*Math.floor(1e-6+6*t*t/((this.sizing_span+this.rotor_span)*(this.sizing_span+this.rotor_span))))}return 0}GetType(){return this.type}GetAccessory(){return this.accessory}SetAccessory(t){this.accessory=t,this.CalculateStats()}SetEngineCount(t){this.engine_count=t}GetTailRotor(){return this.type==N.HELICOPTER&&this.rotor_count<2}GetBladeList(){return this.blade_list}GetRotorBleed(){return this.type==N.HELICOPTER?this.blade_list[this.blade_idx].rotor_bleed:0}GetPowerFactor(){return this.stagger_list[this.stagger_sel].powerfactor}GetBladeCountIdx(){return this.blade_idx}GetStaggerList(){return this.stagger_list}GetStagger(){return this.stagger_sel}SetStagger(t){t!=this.stagger_sel&&(this.stagger_sel=t,this.CalculateStats())}CanStagger(){const t=[];for(let e=0;e=2&&3==this.stagger_list[e].count?t.push(!0):t.push(!1);return t}VerifySizes(){this.type==N.AIRPLANE?(this.rotor_count=0,this.rotor_span=0,this.stagger_sel=0):this.type==N.AUTOGYRO?(this.rotor_count=1,this.sizing_span=Math.ceil(-1e-6+Math.sqrt(.6*this.wing_area/(Math.PI/8))),this.rotor_span=Math.max(this.rotor_span,2-this.sizing_span),this.stagger_sel=0):this.type==N.HELICOPTER&&(this.rotor_count=Math.max(1,this.rotor_count),this.rotor_count>1&&this.rotor_count%2==1&&(this.rotor_count=this.rotor_count-1),-1!=this.dryMP?(1==this.rotor_count?this.sizing_span=Math.ceil(5*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6):this.sizing_span=Math.ceil(4*Math.pow(this.dryMP,.4)*this.blade_list[this.blade_idx].sizing-1e-6),this.sizing_span=Math.min(100,this.sizing_span),this.rotor_span=Math.max(this.rotor_span,-Math.floor(1e-6+this.sizing_span/2))):this.sizing_span=10)}VerifyStagger(){if(this.rotor_count>2&&this.stagger_list[this.stagger_sel].count<=2){for(let t=0;t{var s=document.getElementById(t);s.classList.toggle("active",e);var i=s.nextElementSibling;(i=i.nextElementSibling).style.maxHeight=e?"inherit":"0px"};class kt{}class Lt extends kt{constructor(t){super(),this.weap=t,document.getElementById("lbl_weapons").textContent=h("Weapons Section Title"),document.getElementById("lbl_num_wsets").textContent=h("Weapons Number of Weapon Sets"),this.inp_w_count=document.getElementById("num_wsets"),this.inp_w_count.onchange=()=>{this.weap.SetWeaponSetCount(this.inp_w_count.valueAsNumber)},document.getElementById("lbl_num_wbraces").textContent=h("Weapons Number of Weapon Braces"),this.inp_w_brace=document.getElementById("num_wbraces"),this.inp_w_brace.onchange=()=>{this.weap.SetBraceCount(this.inp_w_brace.valueAsNumber)},this.tbl=document.getElementById("table_weapons"),this.wrow=[]}CreateWSetRow(){const t=document.createDocumentFragment(),e=this.tbl.insertRow(),s=function(t,e){const s=document.createElement("TD");return s.innerHTML="",t.appendChild(s),s}(e),i=document.createElement("SPAN");St(e,h("Weapons Weapons")),St(e,h("Weapons Weapon Stats"));const a=xt(t),n=a.insertCell(),r={plus:document.createElement("BUTTON"),minus:document.createElement("BUTTON"),type:document.createElement("SELECT"),dirs:[],count:document.createElement("INPUT"),action:document.createElement("SELECT"),projectile:document.createElement("SELECT"),fixed:document.createElement("INPUT"),wcell:null,weaps:[],ammo:document.createElement("INPUT"),stats:{mass:null,drag:null,cost:null,sect:null,mounting:null,jams:null,hits:null,damg:null,shots:null,shots_header:null},repeating:document.createElement("INPUT"),seat:document.createElement("SELECT")},o=this.weap.GetWeaponList();for(const t of o){const e=document.createElement("OPTION");e.text=h(t.name)+" ("+h(t.era)+")",r.type.add(e)}r.type.required=!0;const l=this.weap.GetSeatList();for(const t of l){const e=document.createElement("OPTION");e.text=t,r.seat.add(e)}const c=this.weap.GetActionList();for(const t of c){const e=document.createElement("OPTION");e.text=h(t.name),r.action.add(e)}r.action.required=!0;const u=this.weap.GetProjectileList();for(const t of u){const e=document.createElement("OPTION");e.text=h(t.name),r.projectile.add(e)}r.projectile.required=!0,r.plus.textContent="+",r.minus.textContent="-";const m=bt(n);i.appendChild(r.minus),i.appendChild(r.plus);const p=St(i,h("Weapons Weapon Set"));p.style.border="none",p.style.width="100%",p.style.padding="0",i.style.display="inline-flex",i.style.width="100%",s.appendChild(i),Bt(h("Weapons Type"),r.type,m),Bt(h("Seat Location"),r.seat,m);const d=bt(m.div1),g=bt(m.div2);wt(h("Weapons Number of Mounts"),r.count,d),wt(h("Weapons Ammunition"),r.ammo,g),Bt(h("Weapons Action"),r.action,d),Bt(h("Weapons Projectile"),r.projectile,g),Pt(h("Weapons Belt Fed"),r.repeating,d),Rt(g),Pt(h("Fixed"),r.fixed,d),Rt(g);const _=this.weap.GetDirectionList();for(let t=0;t<_.length;t+=2){const e=h(_[t]);var f=document.createElement("INPUT");Pt(e,f,d),r.dirs.push(f),Pt(h(_[t+1]),f=document.createElement("INPUT"),g),r.dirs.push(f)}r.wcell=a.insertCell();const A=a.insertCell();A.classList.toggle("inner_table");const b=document.createElement("TABLE");b.classList.toggle("inner_table"),A.appendChild(b);const S=b.insertRow();St(S,h("Stat Mass")),St(S,h("Stat Drag")),St(S,h("Stat Cost"));const y=b.insertRow();r.stats.mass=y.insertCell(),r.stats.drag=y.insertCell(),r.stats.cost=y.insertCell();const w=b.insertRow();St(w,h("Stat Required Sections")),St(w,h("Weapons Stat Mounting")),St(w,h("Weapons Stat Jam"));const C=b.insertRow();r.stats.sect=C.insertCell(),r.stats.mounting=C.insertCell(),r.stats.jams=C.insertCell();const B=b.insertRow();St(B,h("Weapons Stat Hits")),St(B,h("Weapons Stat Damage")),r.stats.shots_header=St(B,h("Weapons Stat Shots"));const E=b.insertRow();return r.stats.hits=E.insertCell(),r.stats.damg=E.insertCell(),r.stats.shots=E.insertCell(),this.tbl.appendChild(t),r}CreateWRow(t){const e={span:document.createElement("SPAN"),wing:document.createElement("INPUT"),covered:document.createElement("INPUT"),accessible:document.createElement("INPUT"),free_access:document.createElement("INPUT"),synch:document.createElement("SELECT"),count:document.createElement("INPUT")};Et(h("Weapons Wing Mount"),e.wing,e.span,!1),Et(h("Weapons Accessible"),e.accessible,e.span,!1),Et(h("Weapons Free Accessible"),e.free_access,e.span,!1),Et(h("Weapons Covered"),e.covered,e.span,!0),yt(h("Weapons # Weapons at Mount"),e.count,e.span,!1),function(t,e,s,i=!0){const a=document.createElement("SPAN"),n=document.createElement("LABEL");e.id=At(),n.htmlFor=e.id,n.style.marginLeft="0.25em",n.style.marginRight="0.5em",n.textContent=t,a.appendChild(n),a.appendChild(e),s.appendChild(a),i&&s.appendChild(document.createElement("BR"))}(h("Weapons Synchronization"),e.synch,e.span,!1),e.span.appendChild(document.createElement("HR"));const s=this.weap.GetSynchronizationList();for(const t of s){const s=document.createElement("OPTION");s.text=h(t),e.synch.add(s)}return t.appendChild(e.span),e}UpdateWSet(t,e){e.type.selectedIndex=t.GetWeaponSelected(),e.type.onchange=()=>{t.SetWeaponSelected(e.type.selectedIndex)};const s=this.weap.GetSeatList();if(e.seat.options.length!=s.length){for(;e.seat.options.length>0;)e.seat.options.remove(e.seat.options.length-1);for(const t of s){const s=document.createElement("OPTION");s.text=t,e.seat.add(s)}}e.seat.selectedIndex=t.GetSeat(),e.seat.onchange=()=>{t.SetSeat(e.seat.selectedIndex)},e.count.valueAsNumber=t.GetMountingCount(),e.count.onchange=()=>{t.SetMountingCount(e.count.valueAsNumber)},e.action.selectedIndex=t.GetAction();const i=t.GetCanAction();for(let t=0;t{t.SetAction(e.action.selectedIndex)},e.projectile.selectedIndex=t.GetProjectile();const a=t.GetCanProjectile();for(let t=0;t{t.SetProjectile(e.projectile.selectedIndex)},e.repeating.checked=t.GetRepeating(),e.repeating.onchange=()=>{t.SetRepeating(e.repeating.checked)},e.repeating.disabled=!t.CanRepeating(),e.fixed.checked=t.GetFixed(),e.fixed.onchange=()=>{t.SetFixed(e.fixed.checked)};const r=t.GetDirection(),o=t.CanDirection();for(let s=0;s{t.SetDirection(s,e.dirs[s].checked)},e.dirs[s].disabled=!o[s];e.ammo.valueAsNumber=t.GetAmmo(),e.ammo.onchange=()=>{t.SetAmmo(e.ammo.valueAsNumber)};const l=t.GetWeapons();for(;e.weaps.lengthl.length;){const t=e.weaps.pop();e.wcell.removeChild(t.span)}for(let t=0;t{l[t].SetWing(e.weaps[t].wing.checked)},e.weaps[t].wing.disabled=!l[t].CanWing(),e.weaps[t].covered.checked=l[t].GetCovered(),e.weaps[t].covered.onchange=()=>{l[t].SetCovered(e.weaps[t].covered.checked)},e.weaps[t].covered.disabled=!l[t].CanCovered(),e.weaps[t].accessible.checked=l[t].GetAccessible(),e.weaps[t].accessible.onchange=()=>{l[t].SetAccessible(e.weaps[t].accessible.checked)},e.weaps[t].free_access.checked=l[t].GetFreeAccessible(),e.weaps[t].free_access.onchange=()=>{l[t].SetFreeAccessible(e.weaps[t].free_access.checked)},e.weaps[t].free_access.disabled=!(l[t].can_free_accessible||l[t].GetFreeAccessible()),e.weaps[t].count.valueAsNumber=l[t].GetCount(),e.weaps[t].count.onchange=()=>{l[t].SetCount(e.weaps[t].count.valueAsNumber)},e.weaps[t].synch.selectedIndex=l[t].GetSynchronization()+1,e.weaps[t].synch.onchange=()=>{l[t].SetSynchronization(e.weaps[t].synch.selectedIndex-1)},e.weaps[t].synch.disabled=!l[t].can_synchronize;const s=l[t].CanSynchronization();for(let i=0;ithis.wrow.length;)this.wrow.push(this.CreateWSetRow());for(;t.length{this.weap.DuplicateSet(e)},this.wrow[e].minus.onclick=()=>{this.weap.RemoveSet(e)},this.UpdateWSet(t[e],this.wrow[e])}UpdateDisplay(){this.UpdateWSets(),this.inp_w_count.valueAsNumber=this.weap.GetWeaponSets().length,this.inp_w_brace.valueAsNumber=this.weap.GetBraceCount()}}function Wt(t,e){const s=t.GetDirection();let i=0;for(const t of s)t&&i++;let a="";return 1==i&&t.GetFixed()?a+=h("Fixed")+" ":a+=i<=2?h("Flexible")+" ":h("Turreted")+" ",t.GetAction()==L.MECHANICAL?a+=h("Weapon Tag Mechanical Action")+" ":t.GetAction()==L.GAST?a+=h("Weapon Tag Gast Principle")+" ":t.GetAction()==L.ROTARY&&(a+=h("Weapon Tag Rotary")+" "),t.GetProjectile()==k.HEATRAY?a+=h("Weapon Tag Heat Ray")+" ":t.GetProjectile()==k.GYROJETS?a+=h("Weapon Tag Gyrojet")+" ":t.GetProjectile()==k.PNEUMATIC&&(a+=h("Weapon Tag Pneumatic")+" "),a+=e[t.GetWeaponSelected()].abrv,a}function Ht(t){const e=[h("Weapon Tag Jam",t.GetJam())],s=t.GetFinalWeapon();return t.GetReload()>0&&(1==t.GetReload()?e.push(h("Weapon Tag Manual")):e.push(h("Weapon Tag Reload",t.GetReload()))),s.rapid&&e.push(h("Weapon Tag Rapid Fire")),s.shells&&e.push(h("Weapon Tag Shells")),s.ap>0&&e.push(h("Weapon Tag AP",s.ap)),t.GetIsFullyAccessible()?e.push(h("Weapon Tag Fully Accessible")):t.GetIsPartlyAccessible()?e.push(h("Weapon Tag Partly Accessible")):e.push(h("Weapon Tag Inaccessible")),s.deflection&&e.push(h("Weapon Tag Awkward",s.deflection)),e}function qt(t,e,s){var i="";const a=t.GetDirection(),r=[];for(let t=0;t{this.CalculateStats()})),this.cockpits.SetCalculateStats((()=>{this.CalculateStats()})),this.passengers.SetCalculateStats((()=>{this.CalculateStats()})),this.engines.SetCalculateStats((()=>{this.CalculateStats()})),this.propeller.SetCalculateStats((()=>{this.CalculateStats()})),this.frames.SetCalculateStats((()=>{this.CalculateStats()})),this.wings.SetCalculateStats((()=>{this.CalculateStats()})),this.stabilizers.SetCalculateStats((()=>{this.CalculateStats()})),this.controlsurfaces.SetCalculateStats((()=>{this.CalculateStats()})),this.reinforcements.SetCalculateStats((()=>{this.CalculateStats()})),this.fuel.SetCalculateStats((()=>{this.CalculateStats()})),this.munitions.SetCalculateStats((()=>{this.CalculateStats()})),this.cargo.SetCalculateStats((()=>{this.CalculateStats()})),this.gear.SetCalculateStats((()=>{this.CalculateStats()})),this.accessories.SetCalculateStats((()=>{this.CalculateStats()})),this.optimization.SetCalculateStats((()=>{this.CalculateStats()})),this.weapons.SetCalculateStats((()=>{this.CalculateStats()})),this.used.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCalculateStats((()=>{this.CalculateStats()})),this.alter.SetCalculateStats((()=>{this.CalculateStats()})),this.rotor.SetCantileverList(this.reinforcements.GetCantileverList()),this.cockpits.SetNumberOfCockpits(1),this.engines.SetNumberOfEngines(1),this.frames.SetTailType(1),this.use_storage=e,this.updated_stats=!1,this.freeze_calculation=!1,this.aircraft_type=N.AIRPLANE,this.Reset()}InteractiveDash(){const t=this.GetStats(),e=this.GetDerivedStats(),s=this.VitalComponentList();for(var i=!1;s.length>10;)s.pop(),i=!0;for(i&&(s.pop(),s.push("And More. See Plane Builder for full list."));s.length<10;)s.push("");const a=this.GetAccessories().GetEffectiveCoverage();var n="";for(let t=0;t0&&(n+=""!=n?", ":h("Armour")+" ",n+=e.toString()+"/+"+(11-a[t]).toString())}const r=[],o=this.GetMunitions().GetBombCount(),l=this.GetMunitions().GetRocketCount();var c=this.GetMunitions().GetInternalBombCount();if((o>0||l>0)&&r.push("Current load here."),o>0){const t=Math.min(o,c),e=Math.max(0,o-t);if(t>0&&r.push(h(" Bomb Mass Internally.",t)),e>0&&r.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.GetMunitions().GetMaxBombSize());r.push(h("Largest Internal Bomb",e.toString()))}c-=t}if(l>0){const t=Math.min(l,c),e=Math.max(0,l-t);t>0&&r.push(h(" Rocket Mass Internally.",t)),e>0&&r.push(h(" Rocket Mass Externally.",e))}for(;r.length<5;)r.push("");let u="";for(const e of t.warnings)u+=e.source+": "+e.warning+"\n";const m={altitude:0,airspeed:0,fuel:e.FuelUses,dropoff:e.Dropoff,visibility:this.GetCockpits().GetCockpit(0).GetVisibility(),energy_loss:e.EnergyLoss,turn_bleed:e.TurnBleed,stability:e.Stabiilty,stress:this.GetCockpits().GetCockpit(0).GetFlightStress()[0],plane_escape:this.GetCockpits().GetCockpit(0).GetEscape(),crash:this.GetCockpits().GetCockpit(0).GetCrash(),max_toughness:e.Toughness,current_toughness:e.Toughness,max_strain:e.MaxStrain,current_strain:e.MaxStrain,g_force:0,kills:0,full_load_boost:e.BoostFullwBombs,full_load_handling:e.HandlingFullwBombs,full_load_climb:e.RateOfClimbwBombs,full_load_stall:e.StallSpeedFullwBombs,full_load_speed:e.MaxSpeedwBombs,half_fuel_bombs_boost:Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),half_fuel_bombs_handling:Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),half_fuel_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),half_fuel_bombs_stall:Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),half_fuel_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),full_fuel_no_bombs_boost:e.BoostFull,full_fuel_no_bombs_handling:e.HandlingFull,full_fuel_no_bombs_climb:e.RateOfClimbFull,full_fuel_no_bombs_stall:e.StallSpeedFull,full_fuel_no_bombs_speed:Math.floor(1e-6+e.MaxSpeedFull),half_fuel_no_bombs_boost:Math.floor((e.BoostFull+e.BoostEmpty)/2),half_fuel_no_bombs_handling:Math.floor((e.HandlingFull+e.HandlingEmpty)/2),half_fuel_no_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),half_fuel_no_bombs_stall:Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),half_fuel_no_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),empty_boost:0,empty_handling:e.HandlingEmpty,empty_climb:0,empty_stall:e.StallSpeedEmpty,empty_speed:0,vital_part_1:s[0],vital_part_2:s[1],vital_part_3:s[2],vital_part_4:s[3],vital_part_5:s[4],vital_part_6:s[5],vital_part_7:s[6],vital_part_8:s[7],vital_part_9:s[8],vital_part_10:s[9],armor:n,max_bomb_load:r[0],ordinance_1:r[1],ordinance_2:r[2],ordinance_3:r[3],ordinance_4:r[4],notes:u,full_load_selected:!0,half_fuel_bombs_selected:!1,full_fuel_no_bombs_selected:!1,half_fuel_no_bombs_selected:!1,empty_selected:!1,engines:this.InteractiveEngines(),weapons:this.InteractiveWeapons()};return JSON.stringify(m)}InteractiveEngines(){const t=[];for(let e=0;e0&&t.starter&&r.push(h("Starter"))}else{s.IsRotary()&&s.IsTractor()?r.push(h("Turns Right")):s.IsRotary()&&s.IsPusher()&&r.push(h("Turns Left"));const t=T().get(s.GetSelectedList()).get_name(a.name);t.upgrades[1]?r.push(h("War Emergency Power")):t.compressor_count>0&&1==t.compressor_type&&r.push(h("War Emergency Power from altitudes 0-9"))}if(i.notes=n.Join(", ",r),s.GetUsePushPull()){const e=i.reliability.split("/");i.reliability=e[0].toString(),t.push(JSON.stringify(i)),i.reliability=e[0].toString(),t.push(JSON.stringify(i))}else t.push(JSON.stringify(i))}return t}InteractiveWeapons(){const t=[];for(const s of this.GetWeapons().GetWeaponSets()){const i=this.GetWeapons().GetWeaponList(),a=s.GetHits(),r=[];"PR"==i[s.GetWeaponSelected()].abrv?(r.push(5),r.push(5),r.push(5),r.push(5)):(r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[0])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[1])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[2])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[3])));const o=s.GetFinalWeapon(),l=[],c={type:Wt(s,i),ammo:s.GetShots(),ap:o.ap,jam:s.GetJam(),knife_hits:a[0],close_hits:a[1],long_hits:a[2],extreme_hits:a[3],knife_damage:r[0],close_damage:r[1],long_damage:r[2],extreme_damage:r[3],tags:""},u=this.GetWeapons().GetDirectionList();s.IsPlural()&&(c.type=s.GetWeaponCount().toString()+"x "+c.type);const m=s.GetDirection();var e="";e+="[";for(let t=0;t11.05?(this.aircraft_type=t.aircraft_type,this.rotor.SetType(t.aircraft_type)):(this.aircraft_type=N.AIRPLANE,this.rotor.SetType(N.AIRPLANE)),this.era.fromJSON(t.era,s),this.cockpits.fromJSON(t.cockpits,s),this.passengers.fromJSON(t.passengers,s),this.engines.fromJSON(t.engines,s),this.propeller.fromJSON(t.propeller,s),this.frames.fromJSON(t.frames,s),this.wings.fromJSON(t.wings,s),this.stabilizers.fromJSON(t.stabilizers,s),this.controlsurfaces.fromJSON(t.controlsurfaces,s),this.reinforcements.fromJSON(t.reinforcements,s),this.fuel.fromJSON(t.fuel,s),this.munitions.fromJSON(t.munitions,s),this.cargo.fromJSON(t.cargo,s),this.gear.fromJSON(t.gear,s),this.accessories.fromJSON(t.accessories,s),this.optimization.fromJSON(t.optimization,s),this.weapons.fromJSON(t.weapons,s),s>10.65&&this.used.fromJSON(t.used,s),s>11.05&&this.rotor.fromJSON(t.rotor,s),s>12.25?this.alter.fromJSON(t.alter,s):this.alter.ClearAll(),this.freeze_calculation=!1,!0}serialize(t){t.PushString(this.version),t.PushString(this.name),this.era.serialize(t),this.cockpits.serialize(t),this.passengers.serialize(t),this.engines.serialize(t),this.propeller.serialize(t),this.frames.serialize(t),this.wings.serialize(t),this.stabilizers.serialize(t),this.controlsurfaces.serialize(t),this.reinforcements.serialize(t),this.fuel.serialize(t),this.munitions.serialize(t),this.cargo.serialize(t),this.gear.serialize(t),this.accessories.serialize(t),this.optimization.serialize(t),this.weapons.serialize(t),this.used.serialize(t),this.rotor.serialize(t),t.PushNum(this.aircraft_type),this.alter.serialize(t)}deserialize(t){this.freeze_calculation=!0,t.version=parseFloat(t.GetString()),this.name=t.GetString(),this.era.deserialize(t),this.cockpits.deserialize(t),this.passengers.deserialize(t),this.engines.deserialize(t),this.propeller.deserialize(t),this.frames.deserialize(t),this.wings.deserialize(t),this.stabilizers.deserialize(t),this.controlsurfaces.deserialize(t),this.reinforcements.deserialize(t),this.fuel.deserialize(t),this.munitions.deserialize(t),this.cargo.deserialize(t),this.gear.deserialize(t),this.accessories.deserialize(t),this.optimization.deserialize(t),this.weapons.deserialize(t),t.version>10.65&&this.used.deserialize(t),t.version>11.05&&t.GetRemaining()>0?(this.rotor.deserialise(t),this.aircraft_type=t.GetNum(),this.rotor.SetType(this.aircraft_type)):(this.aircraft_type=N.AIRPLANE,this.rotor.SetType(N.AIRPLANE)),t.version>12.25?this.alter.deserialize(t):this.alter.ClearAll(),this.freeze_calculation=!1}SetType(t){this.aircraft_type=t,this.rotor.SetType(t),this.CalculateStats()}SetDisplayCallback(t){this.DisplayCallback=t}CalculateStats(){if(this.freeze_calculation)return;this.recurrent_calculation_depth=this.recurrent_calculation_depth+1,this.updated_stats=!1;let t=new u;if(t=t.Add(this.era.PartStats()),t=t.Add(this.cockpits.PartStats()),t=t.Add(this.passengers.PartStats()),this.engines.SetTailMods(this.frames.GetFarmanOrBoom(),this.wings.GetSwept()&&this.stabilizers.GetVOutboard(),this.stabilizers.GetCanard()),this.engines.SetInternal(this.aircraft_type==N.HELICOPTER||W(this.aircraft_type)),this.engines.SetMetalArea(this.wings.GetMetalArea()),this.engines.HaveParasol(this.wings.GetParasol()),t=t.Add(this.engines.PartStats()),this.propeller.SetEngineTypes(this.engines.GetEngineTypes()),this.propeller.SetAcftType(this.aircraft_type),t=t.Add(this.propeller.PartStats()),t=t.Add(this.fuel.PartStats()),t=t.Add(this.munitions.PartStats()),this.weapons.SetNumberOfCockpits(this.cockpits.GetNumberOfCockpits()),this.weapons.SetTractorInfo(this.engines.GetTractorSpinner()),this.weapons.SetPusherInfo(this.engines.GetPusherSpinner()),this.weapons.cant_type=this.reinforcements.GetCantileverType(),this.weapons.SetHavePropeller(this.engines.GetNumPropellers()>0),this.weapons.SetCanWing(!W(this.aircraft_type)),t=t.Add(this.weapons.PartStats()),t=t.Add(this.cargo.PartStats()),this.wings.SetAcftType(this.aircraft_type),this.aircraft_type==N.AUTOGYRO?this.wings.SetRotorSpan(this.rotor.GetRotorSpan()):this.wings.SetRotorSpan(0),t=t.Add(this.wings.PartStats()),this.rotor.SetWingArea(t.wingarea),this.aircraft_type==N.AUTOGYRO&&(this.rotor.SetEngineCount(this.engines.GetNumberOfEngines()),t=t.Add(this.rotor.PartStats())),this.controlsurfaces.SetWingArea(t.wingarea),this.controlsurfaces.SetBoomTail(this.frames.GetUseBoom()),this.controlsurfaces.SetSpan(this.wings.GetSpan()),this.controlsurfaces.SetAcftType(this.aircraft_type),this.controlsurfaces.SetCanElevator(this.stabilizers.GetHStabCount()>0),this.controlsurfaces.SetCanRudder(this.stabilizers.GetVStabCount()>0),this.controlsurfaces.SetIsVTail(this.stabilizers.GetIsVTail()),this.aircraft_type==N.AIRPLANE?this.controlsurfaces.SetNumCantilever(this.reinforcements.GetTotalCantilevers()):this.controlsurfaces.SetNumCantilever(0),t=t.Add(this.controlsurfaces.PartStats()),this.reinforcements.SetMonoplane(this.wings.GetMonoplane()),this.reinforcements.SetTandem(this.wings.GetTandem()),this.reinforcements.SetStaggered(this.wings.GetStaggered()),this.reinforcements.SetCanUseExternal(this.wings.GetArea()>0),this.reinforcements.SetSesquiplane(this.wings.GetIsSesquiplane()),this.reinforcements.SetAircraftType(this.aircraft_type),this.reinforcements.SetCantLift(this.era.GetCantLift()),t=t.Add(this.reinforcements.PartStats()),this.rotor.GetTailRotor()&&(t.power=Math.floor(1e-6+.9*t.power)),this.accessories.SetAcftRadiator(this.engines.GetNumberOfRadiators()>0),this.accessories.SetSkinArmor(this.frames.GetArmor()),this.accessories.SetCanCutouts(this.wings.CanCutout(),this.frames.CanCutout()),t=t.Add(this.accessories.PartStats()),this.frames.SetRequiredSections(t.reqsections),this.frames.SetHasTractorNacelles(this.engines.GetHasTractorNacelles()),this.frames.SetIsTandem(this.wings.GetTandem()),t=t.Add(this.frames.PartStats()),this.stabilizers.SetEngineCount(this.engines.GetNumberOfEngines()),this.stabilizers.SetIsTandem(this.wings.GetTandem()),this.stabilizers.SetIsSwept(this.wings.GetSwept()),this.stabilizers.SetHaveTail(!this.frames.GetIsTailless()),this.stabilizers.SetHelicopter(!1),this.stabilizers.SetLiftingArea(t.wingarea),this.stabilizers.wing_drag=this.wings.GetWingDrag()+this.rotor.GetRotorDrag(),t=t.Add(this.stabilizers.PartStats()),this.wings.SetAircraftMass(t.mass),t.mass+=this.wings.GetPaperMass(),t.mass=Math.max(1,t.mass),this.gear.SetGull(this.wings.HasInvertedGull()),this.gear.SetLoadedMass(t.mass+t.wetmass),this.gear.CanBoat(this.engines.GetEngineHeight(),this.wings.GetWingHeight()),t=t.Add(this.gear.PartStats()),t.toughness+=Math.floor(1e-6+t.structure/5),this.optimization.SetAcftStats(t),t=t.Add(this.optimization.PartStats()),this.cockpits.SetHasRotary(this.engines.HasTractorRotary()),t=t.Add(this.alter.PartStats()),t.Round(),!this.updated_stats){this.updated_stats=!0,this.stats=t;const e=this.GetDerivedStats();this.stats.cost+=this.controlsurfaces.GetFlapCost(e.DryMP),t.reliability-=this.used.burnt_out,this.weapons.SetStickyGuns(this.used.sticky_guns),this.cockpits.SetArmed(this.weapons.GetArmedSeats()),this.cockpits.UpdateCrewStats(this.stats.escape,e.ControlStress,e.RumbleStress,this.stats.visibility,this.stats.crashsafety);let s=0;for(const t of this.cockpits.GetStressList())s=Math.max(s,t[0]-t[1]);0!=s&&-1==this.stats.warnings.findIndex((t=>t.source==h("Co-Pilot Controls")))&&this.stats.warnings.push({source:h("Co-Pilot Controls"),warning:h("Co-Pilot Warning",s),color:c.WHITE}),W(this.aircraft_type)&&(t.upkeep+=1),this.aircraft_type==N.ORNITHOPTER_BUZZER&&(t.reliability-=2),this.engines.UpdateReliability(t),this.reinforcements.SetAcftStructure(t.structure),this.fuel.SetArea(this.wings.GetArea()),this.fuel.SetCantilever(this.reinforcements.GetIsCantilever()),this.accessories.SetVitalParts(this.VitalComponentList().length),this.munitions.SetAcftParameters(t.structure,this.era.GetMaxBomb(),this.wings.HasInvertedGull()),this.stats.cost=Math.max(1,this.stats.cost),this.stats.liftbleed=Math.max(1,this.stats.liftbleed),10*this.engines.GetRumble()>t.structure&&(this.stats.power=0,this.stats.warnings.push({source:h("Stat Rumble"),warning:h("Rumble Warning"),color:c.RED})),this.use_storage&&window.localStorage.setItem("test.aircraft",JSON.stringify(this))}this.recurrent_calculation_depth=this.recurrent_calculation_depth-1,this.DisplayCallback&&!this.freeze_calculation&&0==this.recurrent_calculation_depth&&this.DisplayCallback()}GetDerivedStats(){let t=Math.floor(1e-6+this.stats.mass/5);t=Math.max(t,1);let e=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass)/5);e=Math.max(e,1);let s=Math.floor(1e-6+(this.stats.mass+this.stats.wetmass+this.stats.bomb_mass)/5);s=Math.max(s,1);let i=Math.floor(1e-6+(this.stats.drag+t)/5);i=Math.max(i,1);const a=i;let n=Math.floor(1e-6+(this.stats.drag+this.munitions.GetExternalMass()+t)/5);n=Math.max(n,1);let r=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*i))),o=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*a))),l=Math.floor(1e-6+this.stats.pitchspeed*Math.sqrt(2e3*this.stats.power/(9*n)));this.stats.mass<15&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Mass")))&&this.stats.warnings.push({source:h("Stat Mass"),warning:h("Low Mass Warning"),color:c.YELLOW}),this.stats.drag+t<35&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Drag")))&&this.stats.warnings.push({source:h("Stat Drag"),warning:h("Low Drag Warning"),color:c.YELLOW});let u=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*t/Math.max(1,this.stats.wingarea))),m=Math.max(1,Math.floor(1e-6+this.stats.liftbleed*e/Math.max(1,this.stats.wingarea))),p=Math.max(Math.floor(1e-6+this.stats.liftbleed*s/Math.max(1,this.stats.wingarea)));var d=this.engines.GetOverspeed();const g=Math.floor(1e-6+this.stats.power/t),_=Math.floor(1e-6+this.stats.power/e),f=Math.floor(1e-6+this.stats.power/s);0==f&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Boost")))&&this.stats.warnings.push({source:h("Derived Boost"),warning:h("Boost Warning"),color:c.RED});const A=Math.floor(1e-6+this.stats.pitchboost*r);r=Math.floor(1e-6+r*(1-.1*this.used.ragged)),o=Math.floor(1e-6+o*(1-.1*this.used.ragged)),l=Math.floor(1e-6+l*(1-.1*this.used.ragged));let b=this.stats.pitchstab+this.stats.latstab;this.stats.pitchstab>0&&this.stats.latstab>0?b+=2:this.stats.pitchstab<0&&this.stats.latstab<0&&(b-=2);let S=100+this.stats.control-t;b>10||b<-10?(S=-1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Stability")))&&this.stats.warnings.push({source:h("Derived Stability"),warning:h("Stability Warning"),color:c.RED})):10==b?S-=4:b>6?S-=3:b>3?S-=2:b>0?S-=1:0==b?S+=0:b>-4?S+=1:b>-7?S+=2:b>-10?S+=3:-10==b&&(S+=4);let y=S+t-e,w=S+t-s;S=Math.floor(1e-6+S-5*this.used.sluggish),y=Math.floor(1e-6+y-5*this.used.sluggish),w=Math.floor(1e-6+w-5*this.used.sluggish);let C=Math.min(this.stats.maxstrain-t,this.stats.structure);this.optimization.final_ms=Math.floor(1e-6+1.5*this.optimization.GetMaxStrain()*C/10),C+=this.optimization.final_ms,C=Math.floor(1e-6+C*(1-.2*this.used.fragile)),C<10&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stat Max Strain")))&&this.stats.warnings.push({source:h("Stat Max Strain"),warning:h("Max Strain Warning"),color:c.RED});let B=this.stats.toughness;B=Math.floor(1e-6+B*(1-.5*this.used.weak));const E=this.stats.structure;let M=Math.ceil(i/this.propeller.GetEnergy()-1e-6),P=M+1;M=Math.min(M,10),P=Math.min(P,10);let G=Math.ceil(Math.floor(1e-6+(u+m)/2)/this.propeller.GetTurn()-1e-6);this.aircraft_type==N.HELICOPTER&&(G=Math.max(1,Math.floor(1e-6+t/2))+this.rotor.GetRotorBleed(),M=Math.max(1,Math.floor(1e-6+i/7)),u=0,m=0,p=0,r=Math.min(37,r),o=Math.min(37,o),l=Math.min(37,l)),G=Math.max(G,1);let F=G+1;F=Math.max(F,1),u=Math.max(1,Math.floor(1e-6+u*(1+.2*this.used.hefty))),m=Math.max(1,Math.floor(1e-6+m*(1+.2*this.used.hefty))),p=Math.max(1,Math.floor(1e-6+p*(1+.2*this.used.hefty))),(l<=p||o<=m)&&-1==this.stats.warnings.findIndex((t=>t.source==h("Stall Speed")))&&this.stats.warnings.push({source:h("Stall Speed"),warning:h("Stall Speed Warning"),color:c.RED});let R=Math.floor(1e-6+this.stats.fuel/this.stats.fuelconsumption);R=Math.floor(1e-6+R*(1-.2*this.used.leaky)),isFinite(R)||(R=0),R<6&&0!=this.stats.fuelconsumption&&-1==this.stats.warnings.findIndex((t=>t.source==h("Derived Fuel Uses")))&&this.stats.warnings.push({source:h("Derived Fuel Uses"),warning:h("Fuel Uses Warning"),color:c.YELLOW});let x=1;(b>3||b<-3)&&x++;let I=0;x+=Math.min(this.accessories.GetMaxMassStress(),Math.floor(1e-6+t/10));const T=this.accessories.GetMaxTotalStress();x=Math.min(T,x),this.engines.GetMaxRumble()>0&&(I+=Math.max(1,.5*this.engines.GetRumble()),I=Math.floor(1e-6+I),I=Math.min(3,I)),0==T&&(I=0);let v=Math.max(1,Math.floor(1e-6+this.stats.power/t*(23/this.stats.pitchspeed)/i)),D=Math.max(1,Math.floor(1e-6+this.stats.power/e*(23/this.stats.pitchspeed)/a)),O=Math.max(1,Math.floor(1e-6+this.stats.power/s*(23/this.stats.pitchspeed)/n));return isFinite(v)||(v=0,D=0,O=0),W(this.aircraft_type)&&(S+=5,y+=5,w+=5,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Stall")))&&this.stats.warnings.push({source:h("Ornithopter Stall"),warning:h("Ornithopter Stall Warning"),color:c.WHITE}),d=C),this.aircraft_type==N.ORNITHOPTER_FLUTTER&&(S+=5,y+=5,w+=5,d=1/0,-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Flutterer Attack")))&&this.stats.warnings.push({source:h("Ornithopter Flutterer Attack"),warning:h("Ornithopter Flutterer Attack Warning"),color:c.WHITE})),this.aircraft_type==N.ORNITHOPTER_BUZZER&&(-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Boost")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Boost"),warning:h("Ornithopter Buzzer Boost Warning"),color:c.WHITE}),-1==this.stats.warnings.findIndex((t=>t.source==h("Ornithopter Buzzer Stall")))&&this.stats.warnings.push({source:h("Ornithopter Buzzer Stall"),warning:h("Ornithopter Buzzer Stall Warning"),color:c.WHITE})),{DryMP:t,WetMP:e,WetMPwBombs:s,DPEmpty:i,DPFull:a,DPwBombs:n,MaxSpeedEmpty:r,MaxSpeedFull:o,MaxSpeedwBombs:l,StallSpeedEmpty:u,StallSpeedFull:m,StallSpeedFullwBombs:p,Overspeed:d,BoostEmpty:g,BoostFull:_,BoostFullwBombs:f,Dropoff:A,Stabiilty:b,HandlingEmpty:S,HandlingFull:y,HandlingFullwBombs:w,MaxStrain:C,Toughness:B,Structure:E,EnergyLoss:M,EnergyLosswBombs:P,TurnBleed:G,TurnBleedwBombs:F,FuelUses:R,ControlStress:x,RumbleStress:I,RateOfClimbFull:D,RateOfClimbEmpty:v,RateOfClimbwBombs:O}}VitalComponentList(){const t=this.GetDerivedStats(),e=[];e.push(h("Vital Part Controls"));for(let t=0;t0&&e.push(h("Vital Part Fuel Tanks"));for(let t=0;t{let s=parseInt(t.charge);"-"==t.charge&&(s=0);let i=parseInt(e.charge);return"-"==e.charge&&(i=0),isNaN(s)&&isNaN(i)?0:isNaN(s)?-1:isNaN(i)?1:i-s})),t=q(this.engines.GetElectrics(),t),t=q(t,this.weapons.GetElectrics());let e=!1;for(const s of t.equipment){const t=parseInt(s.charge);!isNaN(t)&&t>0&&(s.charge="+"+s.charge,e=!0)}return t.equipment.length>0&&t.storage<=0&&!e&&-1==this.stats.warnings.findIndex((t=>t.source==h("Insufficient Charge")))&&this.stats.warnings.push({source:h("Insufficient Charge"),warning:h("Insufficient Charge Warning"),color:c.RED}),t}}class zt extends kt{constructor(t){super(),this.model=t,document.getElementById("lbl_era").textContent=h("Era Section Title");const e=document.getElementById("table_era"),s=document.createDocumentFragment();var i=xt(s);St(i,h("Era Option")),St(i,h("Stat Lift Bleed")),St(i,h("Stat Cost")),St(i,h("Stat Pitch Stability"));const a=(i=xt(s)).insertCell();this.select=document.createElement("SELECT"),a.append(this.select),this.bleed=i.insertCell(),this.cost=i.insertCell(),this.pstab=i.insertCell(),this.select.required=!0,this.select.onchange=()=>{this.model.SetSelected(this.select.selectedIndex)};for(let t of this.model.GetEraOptions()){const e=document.createElement("OPTION");e.text=h(t.name),this.select.add(e)}e.appendChild(s)}UpdateDisplay(){this.select.selectedIndex=this.model.GetSelected();const t=this.model.PartStats();Nt(this.bleed,t.liftbleed.toString(),!1),Nt(this.cost,t.cost.toString(),!1),Nt(this.pstab,t.pitchstab.toString(),!1)}}class Jt extends kt{constructor(t,e){super(),this.row=t,this.cockpit=e,this.upg_chbxs=[],this.sft_chbxs=[],this.gun_chbxs=[];const s=document.createDocumentFragment(),i=It(s),a=It(s),n=It(s),r=It(s),o=It(s),l=document.createElement("TABLE"),c=l.insertRow();St(c,h("Stat Mass")),St(c,h("Stat Drag")),St(c,h("Stat Cost"));const u=l.insertRow();this.d_mass=u.insertCell(),this.d_drag=u.insertCell(),this.d_cost=u.insertCell();const m=l.insertRow();St(m,h("Stat Control")),St(m,h("Stat Required Sections")),St(m,"");const p=l.insertRow();this.d_cont=p.insertCell(),this.d_rseq=p.insertCell(),p.insertCell();const d=l.insertRow();St(d,h("Stat Flight Stress")),St(d,h("Stat Escape")),St(d,h("Stat Visibility"));const g=l.insertRow();this.d_strs=g.insertCell(),this.d_escp=g.insertCell(),this.d_visi=g.insertCell(),o.appendChild(l),o.className="inner_table",l.className="inner_table",this.sel_type=document.createElement("SELECT"),this.d_strs.className="part_local",this.d_visi.className="part_local",this.d_escp.className="part_local";for(let t of e.GetTypeList()){let e=document.createElement("OPTION");e.text=h(t.name),this.sel_type.add(e)}i.appendChild(this.sel_type);var _=bt(a);const f=e.GetUpgradeList(),A=e.CanUpgrades();for(let t=0;t{this.cockpit.SetUpgrade(t,e.checked)}),this.upg_chbxs.push(e)}_=bt(n);var b=0;for(let t of e.GetSafetyList()){let e=document.createElement("INPUT");Pt(h(t.name),e,_);let s=b;b+=1,e.onchange=()=>{this.cockpit.SetSafety(s,e.checked)},this.sft_chbxs.push(e)}_=bt(r);var S=0;for(let t of e.GetGunsightList()){let e=document.createElement("INPUT");Pt(h(t.name),e,_);let s=S;S+=1,e.onchange=()=>{this.cockpit.SetGunsight(s,e.checked)},this.gun_chbxs.push(e)}this.bombsight=document.createElement("INPUT"),wt(h("Cockpit Bombsight"),this.bombsight,_),this.bombsight.onchange=()=>{this.cockpit.SetBombsightQuality(this.bombsight.valueAsNumber)},this.bombsight.min="0",this.bombsight.max="301",this.bombsight.step="1",this.sel_type.onchange=()=>{this.cockpit.SetType(this.sel_type.selectedIndex)},this.row.appendChild(s)}UpdateCockpit(t){this.cockpit=t}UpdateDisplay(){let t=this.cockpit.PartStats();Nt(this.d_mass,t.mass.toString(),!1),Nt(this.d_drag,t.drag.toString(),!1),Nt(this.d_cost,t.cost.toString(),!1),Nt(this.d_cont,t.control.toString(),!0),Nt(this.d_rseq,t.reqsections.toString(),!1);const e=this.cockpit.GetFlightStress();e[0],e[1],Nt(this.d_strs,n.Format("{0}",e[0])),Nt(this.d_escp,this.cockpit.GetEscape().toString(),!0),Nt(this.d_visi,this.cockpit.GetVisibility().toString(),!0),this.sel_type.selectedIndex=this.cockpit.GetType();const s=this.cockpit.GetSelectedUpgrades();for(let t=0;t{this.cockpits.SetNumberOfCockpits(this.counter.valueAsNumber)},this.tbl.appendChild(e)}CounterChange(){for(;this.positions.length>this.counter.valueAsNumber;)this.RemoveCockpit();for(;this.positions.length{this.pass.SetSeats(this.nseats.valueAsNumber)},this.nbeds.onchange=()=>{this.pass.SetBeds(this.nbeds.valueAsNumber)},this.connect.onchange=()=>{this.pass.SetConnected(this.connect.checked)},e.appendChild(s)}SetCollapse(){Ot("passenger_collapse",!this.pass.IsDefault())}UpdateDisplay(){const t=this.pass.PartStats();this.nseats.valueAsNumber=this.pass.GetSeats(),this.nbeds.valueAsNumber=this.pass.GetBeds(),this.connect.checked=this.pass.GetConnected(),this.connect.disabled=!this.pass.PossibleConnection(),Nt(this.mass,t.mass.toString(),!1),Nt(this.reqseq,t.reqsections.toString(),!1)}}class Qt extends kt{constructor(t,e){super(),this.engine=t;const s=e;this.InitTypeSelect(s);const i=s.insertCell();i.className="inner_table";const a=document.createElement("TABLE");a.className="inner_table",St(a.insertRow(),h("Engine Cooling")),this.cool_cell=a.insertRow().insertCell(),St(a.insertRow(),h("Engine Mounting"));const n=a.insertRow().insertCell();St(a.insertRow(),h("Engine Upgrades"));const r=a.insertRow().insertCell();i.appendChild(a);const o=s.insertCell();o.className="inner_table";const l=document.createElement("TABLE");l.className="inner_table",St(l.insertRow(),h("Engine Cowls"));const c=l.insertRow().insertCell();o.appendChild(l),St(l.insertRow(),h("Engine Electrical"));const u=l.insertRow().insertCell();this.InitMountSelect(n),this.InitUpgradeSelect(r),this.InitCowlSelect(c),this.InitElectricSelect(u),this.InitStatDisplay(s),this.intake_fan=document.createElement("INPUT"),this.intake_fan.onchange=()=>{this.engine.SetIntakeFan(this.intake_fan.checked)}}InitTypeSelect(t){this.e_rarity=document.createElement("LABEL"),this.e_pwr=document.createElement("LABEL"),this.e_mass=document.createElement("LABEL"),this.e_drag=document.createElement("LABEL"),this.e_rely=document.createElement("LABEL"),this.e_cool=document.createElement("LABEL"),this.e_over=document.createElement("LABEL"),this.e_fuel=document.createElement("LABEL"),this.e_alti=document.createElement("LABEL"),this.e_torq=document.createElement("LABEL"),this.e_rumb=document.createElement("LABEL"),this.e_cost=document.createElement("LABEL"),this.cool_count=document.createElement("INPUT"),this.cool_count.setAttribute("type","number");const e=t.insertCell(0);this.e_list_select=document.createElement("SELECT"),this.e_list_select.required=!0,e.appendChild(this.e_list_select),e.appendChild(document.createElement("BR"));for(let t of T().keys()){let e=document.createElement("OPTION");e.text=t,this.e_list_select.add(e)}this.e_select=document.createElement("SELECT"),this.e_select.required=!0,e.appendChild(this.e_select),e.appendChild(document.createElement("BR"));const s=T();for(let t=0;t{this.engine.SetSelectedList(this.e_list_select.options[this.e_list_select.selectedIndex].text)},this.e_select.onchange=()=>{this.engine.SetSelectedIndex(this.e_select.selectedIndex)}}UpdateEngine(t){this.engine=t}InitMountSelect(t){const e=document.createElement("SPAN");e.textContent=h("Engine Mounting Location"),t.appendChild(e),t.appendChild(document.createElement("BR")),this.mount_select=document.createElement("SELECT");for(let t of this.engine.GetMountList()){let e=document.createElement("OPTION");e.text=h(t.name),this.mount_select.add(e)}this.mount_select.required=!0,this.mount_select.selectedIndex=this.engine.GetMountIndex(),this.mount_select.onchange=()=>{this.engine.SetMountIndex(this.mount_select.selectedIndex)},t.appendChild(this.mount_select),t.appendChild(document.createElement("BR")),this.pushpull_input=document.createElement("INPUT"),this.torque_input=document.createElement("INPUT");const s=bt(t);this.pushpull_label=Pt(" "+h("Engine Push Pull"),this.pushpull_input,s),Pt(" "+h("Engine Torque To Structure"),this.torque_input,s),this.pushpull_input.checked=this.engine.GetUsePushPull(),this.torque_input.checked=this.engine.GetUsePushPull(),this.pushpull_input.onchange=()=>{this.engine.SetUsePushPull(this.pushpull_input.checked)},this.torque_input.onchange=()=>{this.engine.SetTorqueToStruct(this.torque_input.checked)}}InitUpgradeSelect(t){this.ds_input=document.createElement("INPUT"),this.op_input=document.createElement("INPUT"),this.gp_input=document.createElement("INPUT"),this.gpr_input=document.createElement("INPUT");const e=bt(t);Pt(h("Engine Extended Driveshafts"),this.ds_input,e),Pt(h("Engine Outboard Propeller"),this.op_input,e),wt(h("Engine Geared Propeller"),this.gp_input,e),wt(h("Engine Negate Reliability Penalty"),this.gpr_input,e),this.gp_input.onchange=()=>{this.engine.SetGearCount(this.gp_input.valueAsNumber)},this.gpr_input.onchange=()=>{this.engine.SetGearReliability(this.gpr_input.valueAsNumber)},this.ds_input.onchange=()=>{this.engine.SetUseExtendedDriveshaft(this.ds_input.checked)},this.op_input.onchange=()=>{this.engine.SetOutboardProp(this.op_input.checked)}}InitElectricSelect(t){const e=bt(t);this.alternator_input=document.createElement("INPUT"),this.generator_input=document.createElement("INPUT"),Pt(h("Engine Alternator"),this.alternator_input,e),Pt(h("Engine Generator"),this.generator_input,e),this.alternator_input.onchange=()=>{this.engine.SetAlternator(this.alternator_input.checked)},this.generator_input.onchange=()=>{this.engine.SetGenerator(this.generator_input.checked)}}InitStatDisplay(t){const e=t.insertCell();e.className="inner_table";const s=document.createElement("TABLE");s.className="inner_table",e.appendChild(s);const i=s.insertRow();St(i,h("Stat Power")),St(i,h("Stat Mass")),St(i,h("Stat Drag"));const a=s.insertRow();this.d_powr=a.insertCell(),this.d_mass=a.insertCell(),this.d_drag=a.insertCell();const n=s.insertRow();St(n,h("Stat Reliability")),St(n,h("Stat Visibility")),St(n,h("Stat Overspeed"));const r=s.insertRow();this.d_rely=r.insertCell(),this.d_rely.className="part_local",this.d_visi=r.insertCell(),this.d_over=r.insertCell();const o=s.insertRow();St(o,h("Stat Cost")),St(o,h("Stat Altitude")),St(o,h("Stat Fuel Consumption"));const l=s.insertRow();this.d_cost=l.insertCell(),this.d_alti=l.insertCell(),this.d_fuel=l.insertCell();const c=s.insertRow();St(c,h("Stat Pitch Stability")),St(c,h("Stat Lateral Stability")),St(c,h("Stat Raw Strain"));const u=s.insertRow();this.d_pstb=u.insertCell(),this.d_lstb=u.insertCell(),this.d_maxs=u.insertCell();const m=s.insertRow();St(m,h("Stat Structure")),St(m,h("Stat Flight Stress")),St(m,h("Stat Required Sections"));const p=s.insertRow();this.d_strc=p.insertCell(),this.d_fstr=p.insertCell(),this.d_sect=p.insertCell();const d=s.insertRow();St(d,h("Stat Charge")),St(d,""),St(d,"");const g=s.insertRow();this.d_chrg=g.insertCell(),g.insertCell(),g.insertCell()}InitCowlSelect(t){this.cowl_select=document.createElement("SELECT");for(let t of this.engine.GetCowlList()){let e=document.createElement("OPTION");e.text=h(t.name),this.cowl_select.add(e)}this.cowl_select.required=!0,this.cowl_select.selectedIndex=this.engine.GetMountIndex(),this.cowl_select.onchange=()=>{this.engine.SetCowl(this.cowl_select.selectedIndex)},t.appendChild(this.cowl_select)}InitCoolingSelect(){for(;this.cool_cell.children.length>0;)this.cool_cell.removeChild(this.cool_cell.children[0]);if(this.engine.IsRotary()){this.e_cool.textContent="0";const t=document.createElement("SPAN");t.innerText=h("Engine Rotary Cooling"),this.cool_cell.appendChild(t)}else if("0"==this.e_cool.textContent){const t=document.createElement("SPAN");t.textContent=h("Engine Air-Cooled Engine."),this.cool_cell.appendChild(t);const e=bt(this.cool_cell);Pt(h("Engine Air Cooling Fan"),this.intake_fan,e),this.intake_fan.disabled=!this.engine.CanIntakeFan()}else{this.cool_select||(this.cool_select=document.createElement("SELECT"),this.cool_select.required=!0);const t=bt(this.cool_cell);Bt(h("Engine Select Radiator"),this.cool_select,t),wt(h("Engine Cooling Amount"),this.cool_count,t);const e=this.engine.GetNumRadiators();for(;this.cool_select.options.length>0;)this.cool_select.options.remove(this.cool_select.options.length-1);for(let t=1;t{this.engine.SetRadiator(this.cool_select.selectedIndex)},this.cool_select.selectedIndex=this.engine.GetRadiator(),this.cool_count.min="0",this.cool_count.max=this.engine.GetMaxCooling().toString(),this.cool_count.valueAsNumber=this.engine.GetCooling(),this.cool_count.onchange=()=>{this.engine.SetCooling(this.cool_count.valueAsNumber)}}}UpdateDisplay(){for(;this.e_list_select.options.length>0;)this.e_list_select.options.remove(this.e_list_select.options.length-1);for(;this.e_select.options.length>0;)this.e_select.options.remove(this.e_select.options.length-1);const t=this.engine.GetSelectedList();if(""!=t){var e=!1,s=0;const i=T();for(let a of i.keys()){let i=document.createElement("OPTION");i.text=a,this.e_list_select.add(i),a==t||e?(s=Math.abs(s),e=!0):s-=1}this.e_list_select.selectedIndex=s;const a=this.engine.CanSelectIndex();for(let e=0;e{this.radiator.SetTypeIndex(this.type_select.selectedIndex)},s.appendChild(this.type_select);const i=t.insertCell();this.mount_select=document.createElement("SELECT");for(let t of this.radiator.GetMountList()){let e=document.createElement("OPTION");e.text=h(t.name),this.mount_select.add(e)}this.mount_select.onchange=()=>{this.radiator.SetMountIndex(this.mount_select.selectedIndex)},i.appendChild(this.mount_select);const a=t.insertCell();this.coolant_select=document.createElement("SELECT");for(let t of this.radiator.GetCoolantList()){let e=document.createElement("OPTION");e.text=h(t.name),this.coolant_select.add(e)}this.coolant_select.onchange=()=>{this.radiator.SetCoolantIndex(this.coolant_select.selectedIndex)},a.appendChild(this.coolant_select),a.appendChild(document.createElement("BR")),this.harden_input=document.createElement("INPUT");const n=bt(a);Pt(h("Radiators Harden Radiator"),this.harden_input,n),this.harden_input.onchange=()=>{this.radiator.SetHarden(this.harden_input.checked)};const r=t.insertCell(),o=document.createElement("TABLE");r.className="inner_table",o.className="inner_table";const l=o.insertRow();St(l,h("Stat Mass")),St(l,h("Stat Cost")),St(l,h("Stat Drag")),St(l,h("Stat Reliability")),St(l,h("Stat Lateral Stability")),St(l,h("Derived Is Flammable Question"));const c=o.insertRow();this.c_mass=c.insertCell(),this.c_cost=c.insertCell(),this.c_drag=c.insertCell(),this.c_rely=c.insertCell(),this.c_lstb=c.insertCell(),this.c_flam=c.insertCell(),r.appendChild(o)}UpdateRadiator(t){this.radiator=t}UpdateDisplay(){const t=this.radiator.CanType();for(let e=0;e{this.eng.SetNumberOfEngines(this.num_engines.valueAsNumber)},this.num_engines.valueAsNumber=this.eng.GetNumberOfItems(),document.getElementById("lbl_num_radiators").textContent=h("Engines Num Radiators"),this.num_radiators=document.getElementById("num_radiators"),this.num_radiators.onchange=()=>{this.eng.SetNumberOfRadiators(this.num_radiators.valueAsNumber)},this.num_radiators.valueAsNumber=this.eng.GetNumberOfRadiators(),document.getElementById("lbl_asymmetric").textContent=h("Engines Asymmetric Plane"),this.is_asymmetric=document.getElementById("asymmetric"),this.is_asymmetric.onchange=()=>{this.eng.SetAsymmetry(this.is_asymmetric.checked)},this.is_asymmetric.checked=this.eng.GetAsymmetry()}UpdateDisplay(){const t=this.eng.GetNumberOfItems();for(this.tbl.style.display=0==t?"none":"",this.num_engines.valueAsNumber=t;this.engines.length>t;)this.engines.pop(),this.tbl.deleteRow(this.engines.length+1);for(var e=document.createDocumentFragment();this.engines.lengths;)this.radiators.pop(),this.tblR.deleteRow(this.radiators.length+1);for(e=document.createDocumentFragment();this.radiators.length{this.prop.SetPropIndex(this.select_prop.selectedIndex)},document.getElementById("lbl_propeller_upgrade").textContent=h("Propeller Propeller Upgrades:"),this.select_upgrade=document.getElementById("propeller_upgrade");for(let e of t.GetUpgradeList()){let t=document.createElement("OPTION");t.text=h(e.name),this.select_upgrade.add(t)}this.select_upgrade.onchange=()=>{this.prop.SetUpgradeIndex(this.select_upgrade.selectedIndex)}}UpdateDisplay(){this.select_upgrade.selectedIndex=this.prop.GetUpgradeIndex(),this.select_prop.selectedIndex=this.prop.GetPropIndex(),0==this.prop.GetNumPropellers()?(this.select_upgrade.disabled=!0,this.select_prop.disabled=!0,this.select_prop.selectedIndex=-1):(this.select_prop.disabled=!1,this.select_upgrade.disabled=!1)}}class Xt extends kt{constructor(t){super(),this.c_sec=[],this.t_sec=[],this.frames=t,document.getElementById("lbl_frames").textContent=h("Frames Frames and Covering"),this.table=document.getElementById("table_frames");const e=document.createDocumentFragment();var s=xt(e);this.all_frame=document.createElement("SELECT"),this.all_skin=document.createElement("SELECT"),St(s,h("Frames Frame Type")).append(document.createElement("BR"),this.all_frame),St(s,h("Frames Skin Type")).append(document.createElement("BR"),this.all_skin),St(s,h("Frames Frame Options")),St(s,h("Frames Frame Stats")),s=xt(e),this.c_frame=s.insertCell(),this.c_skin=s.insertCell(),this.c_options=s.insertCell(),this.c_stats=s.insertCell(),this.c_stats.className="inner_table",this.c_stats.rowSpan=0;const i=document.createElement("TABLE");i.className="inner_table";const a=i.insertRow();St(a,h("Stat Mass")),St(a,h("Stat Drag")),St(a,h("Stat Cost"));const n=i.insertRow();this.d_mass=n.insertCell(),this.d_drag=n.insertCell(),this.d_cost=n.insertCell();const r=i.insertRow();St(r,h("Stat Structure")),St(r,h("Stat Toughness")),St(r,h("Stat Visibility"));const o=i.insertRow();this.d_strc=o.insertCell(),this.d_tugh=o.insertCell(),this.d_visi=o.insertCell();const l=i.insertRow();St(l,h("Stat Wing Area")),St(l,h("Derived Is Flammable Question")),St(l,h("Stat Pitch Stability"));const c=i.insertRow();this.d_area=c.insertCell(),this.d_flammable=c.insertCell(),this.d_pstb=c.insertCell();const u=i.insertRow();St(u,h("Stat Raw Strain")),St(u,h("Stat Lift Bleed")),St(u,"");const m=i.insertRow();this.d_strn=m.insertCell(),this.d_lift=m.insertCell(),m.insertCell(),this.c_stats.appendChild(i);const p=xt(e);St(p,h("Frames Tail Frame Type")),St(p,h("Frames Tail Skin Type")),St(p,h("Frames Tail Frame Options"));const d=xt(e);this.t_frame=d.insertCell(),this.t_skin=d.insertCell(),this.t_options=d.insertCell(),document.getElementById("lbl_tail").textContent=h("Frames Tail Section Title"),document.getElementById("lbl_tail_type").textContent=h("Frames Tail Type"),this.t_select=document.getElementById("tail_type"),document.getElementById("lbl_tail_farman").textContent=h("Frames Tail Farman"),this.t_farman=document.getElementById("tail_farman"),document.getElementById("lbl_tail_boom").textContent=h("Frames Tail Boom"),this.t_boom=document.getElementById("tail_boom"),document.getElementById("lbl_flying_wing").textContent=h("Frames Flying Wing"),this.t_fwing=document.getElementById("flying_wing");const g=this.frames.GetFrameList();for(let t of g){let e=document.createElement("OPTION");e.text=h(t.name),t.basestruct<=0&&(e.disabled=!0),this.all_frame.add(e)}this.all_frame.onchange=()=>{this.frames.SetAllFrame(this.all_frame.selectedIndex)};const _=this.frames.GetSkinList();for(let t of _){let e=document.createElement("OPTION");e.text=h(t.name),this.all_skin.add(e)}this.all_skin.onchange=()=>{this.frames.SetAllSkin(this.all_skin.selectedIndex)};for(let t of this.frames.GetTailList()){let e=document.createElement("OPTION");e.text=h(t.name),this.t_select.add(e)}this.t_select.onchange=()=>{this.frames.SetTailType(this.t_select.selectedIndex)},this.t_farman.onchange=()=>{this.frames.SetUseFarman(this.t_farman.checked)},this.t_boom.onchange=()=>{this.frames.SetUseBoom(this.t_boom.checked)},this.t_fwing.onchange=()=>{this.frames.SetFlyingWing(this.t_fwing.checked)},this.table.appendChild(e)}UpdateDisplay(){const t=document.createDocumentFragment();for(;this.table.children.length;)t.append(this.table.children[0]);const e=this.frames.GetSectionList(),s=this.frames.GetTailSectionList();for(;e.length>this.c_sec.length;){let t=this.c_sec.length;this.CreateSection(t,e[t])}for(;e.lengththis.t_sec.length;){let t=this.t_sec.length;this.CreateTailSection(t,s[t])}for(;s.length{this.frames.DeleteSection(t)},s.add.textContent="+",s.add.onclick=()=>{this.frames.DuplicateSection(t)};const i=this.frames.GetFrameList();for(let t of i){let e=document.createElement("OPTION");e.text=h(t.name),s.fsel.add(e)}s.fsel.onchange=()=>{this.frames.SetFrame(t,s.fsel.selectedIndex)},s.fspan.appendChild(s.rem),s.fspan.appendChild(s.add),s.fspan.appendChild(s.fsel),s.fspan.appendChild(document.createElement("BR")),this.c_frame.appendChild(s.fspan),s.sspan.appendChild(s.ssel),s.sspan.appendChild(document.createElement("BR")),this.c_skin.appendChild(s.sspan),Et(h("Frames Geodesic"),s.geo,s.ospan,!1),s.geo.onchange=()=>{this.frames.SetGeodesic(t,s.geo.checked)},Et(h("Frames Monocoque"),s.mono,s.ospan,!1),s.mono.onchange=()=>{this.frames.SetMonocoque(t,s.mono.checked)},Et(h("Frames Internal Bracing"),s.int,s.ospan,!1),s.int.onchange=()=>{this.frames.SetInternalBracing(t,s.int.checked)},Et(h("Frames Lifting Body"),s.lb,s.ospan,!0),s.lb.onchange=()=>{this.frames.SetLiftingBody(t,s.lb.checked)},this.c_options.appendChild(s.ospan),this.c_sec.push(s),this.UpdateSection(t,e)}RemoveSection(){const t=this.c_sec.pop();this.c_frame.removeChild(t.fspan),this.c_skin.removeChild(t.sspan),this.c_options.removeChild(t.ospan)}UpdateSection(t,e){const s=this.c_sec[t];s.rem.disabled=!e.internal_bracing&&!this.frames.PossibleRemoveSections(),s.add.disabled=e.internal_bracing&&!this.frames.PossibleInternalBracing();const i=this.frames.GetFrameList();for(let t=0;t{this.frames.SetTailFrame(t,s.fsel.selectedIndex)},s.fspan.appendChild(s.fsel),s.fspan.appendChild(document.createElement("BR")),this.t_frame.appendChild(s.fspan),s.sspan.appendChild(s.ssel),s.sspan.appendChild(document.createElement("BR")),this.t_skin.appendChild(s.sspan),Et(h("Frames Geodesic"),s.geo,s.ospan,!1),s.geo.onchange=()=>{this.frames.SetTailGeodesic(t,s.geo.checked)},Et(h("Frames Monocoque"),s.mono,s.ospan,!1),s.mono.onchange=()=>{this.frames.SetTailMonocoque(t,s.mono.checked)},Et(h("Frames Lifting Body"),s.lb,s.ospan,!0),s.lb.onchange=()=>{this.frames.SetTailLiftingBody(t,s.lb.checked)},this.t_options.appendChild(s.ospan),this.t_sec.push(s),this.UpdateTailSection(t,e)}RemoveTailSection(){const t=this.t_sec.pop();this.t_frame.removeChild(t.fspan),this.t_skin.removeChild(t.sspan),this.t_options.removeChild(t.ospan)}UpdateTailSection(t,e){const s=this.t_sec[t],i=this.frames.GetFrameList();for(let t=0;t{this.wings.SetStagger(this.stagger.selectedIndex)},this.closed.onchange=()=>{this.wings.SetClosed(this.closed.checked)},this.swept.onchange=()=>{this.wings.SetSwept(this.swept.checked)};const e=document.getElementById("wing_table"),s=document.createDocumentFragment(),i=xt(s);St(i,h("Wings Wing Type")),St(i,h("Wings Wing Options")),St(i,h("Wings Wing Stats"));const a=xt(s);St(a,h("Wings Full Wings"));const n=xt(s);St(n,h("Wings Miniature Wings")),this.full_cell=a.insertCell(),this.mini_cell=n.insertCell();const r=a.insertCell();r.rowSpan=0,this.InitStatDisplay(r),e.appendChild(s)}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Wing Area")),St(s,h("Stat Mass")),St(s,h("Stat Drag"));const i=e.insertRow();this.d_area=i.insertCell(),this.d_mass=i.insertCell(),this.d_drag=i.insertCell();const a=e.insertRow();St(a,h("Stat Control")),St(a,h("Stat Pitch Stability")),St(a,h("Stat Lateral Stability"));const n=e.insertRow();this.d_cont=n.insertCell(),this.d_pstb=n.insertCell(),this.d_lstb=n.insertCell();const r=e.insertRow();St(r,h("Stat Raw Strain")),St(r,h("Stat Crash Safety")),St(r,h("Stat Lift Bleed"));const o=e.insertRow();this.d_maxs=o.insertCell(),this.d_crsh=o.insertCell(),this.d_lift=o.insertCell();const l=e.insertRow();St(l,h("Stat Cost")),St(l,h("Stat Visibility")),St(l,h("Stat Charge"));const c=e.insertRow();this.d_cost=c.insertCell(),this.d_visi=c.insertCell(),this.d_chrg=c.insertCell();const u=e.insertRow();St(u,""),St(u,h("Wings Sesquiplane")),St(u,h("Derived Is Flammable Question"));const m=e.insertRow();m.insertCell(),this.d_sesq=m.insertCell(),this.d_flam=m.insertCell()}UpdateDisplay(){const t=this.wings.CanStagger();for(let e=0;ee.length;)this.PopFullWing();const s=this.wings.GetMiniWingList();for(let t=0;ts.length;)this.PopMiniWing();this.CreateFWAdd(e.length),this.CreateMWAdd(s.length);const i=this.wings.PartStats();Nt(this.d_area,i.wingarea.toString(),!0),Nt(this.d_mass,(i.mass+this.wings.GetPaperMass()).toString(),!1),Nt(this.d_drag,i.drag.toString(),!1),Nt(this.d_cont,i.control.toString(),!0),Nt(this.d_pstb,i.pitchstab.toString(),!0),Nt(this.d_lstb,i.latstab.toString(),!0),Nt(this.d_maxs,i.maxstrain.toString(),!0),Nt(this.d_lift,i.liftbleed.toString(),!1),Nt(this.d_crsh,i.crashsafety.toString(),!0),Nt(this.d_cost,i.cost.toString(),!1),Nt(this.d_visi,i.visibility.toString(),!0),Nt(this.d_chrg,i.charge.toString(),!0),this.wings.GetIsSesquiplane().is?Nt(this.d_sesq,h("Yes")):Nt(this.d_sesq,h("No")),this.wings.IsFlammable()?Nt(this.d_flam,h("Yes")):Nt(this.d_flam,h("No"))}AddFullWing(){const t={span:document.createElement("SPAN"),deck:document.createElement("SELECT"),skin:document.createElement("SELECT"),area:document.createElement("INPUT"),wspan:document.createElement("INPUT"),gull:document.createElement("INPUT"),dihedral:document.createElement("INPUT"),anhedral:document.createElement("INPUT"),br:document.createElement("BR")};t.span.appendChild(t.deck);const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),t.deck.append(s);for(let s=0;s{let i={...s};i.deck=t.deck.selectedIndex-1,this.wings.SetFullWing(e,i)},t.deck.selectedIndex=s.deck+1,t.skin.onchange=()=>{let i={...s};i.surface=t.skin.selectedIndex,this.wings.SetFullWing(e,i)},t.skin.selectedIndex=s.surface,t.area.onchange=()=>{let i={...s};i.area=t.area.valueAsNumber,this.wings.SetFullWing(e,i)},t.area.valueAsNumber=s.area,t.wspan.onchange=()=>{let i={...s};i.span=t.wspan.valueAsNumber,this.wings.SetFullWing(e,i)},t.wspan.valueAsNumber=s.span,t.gull.onchange=()=>{let i={...s};i.gull=t.gull.checked,this.wings.SetFullWing(e,i)},t.gull.checked=s.gull,t.gull.disabled=!this.wings.CanGull(s.deck),t.dihedral.onchange=()=>{let i={...s};isNaN(t.dihedral.valueAsNumber)||(i.dihedral=t.dihedral.valueAsNumber),this.wings.SetFullWing(e,i)},t.dihedral.max=(s.span-s.anhedral-1).toString(),t.dihedral.valueAsNumber=s.dihedral,t.anhedral.onchange=()=>{let i={...s};isNaN(t.anhedral.valueAsNumber)||(i.anhedral=t.anhedral.valueAsNumber),this.wings.SetFullWing(e,i)},t.anhedral.max=(s.span-s.dihedral-1).toString(),t.anhedral.valueAsNumber=s.anhedral}AddMiniWing(){const t={span:document.createElement("SPAN"),deck:document.createElement("SELECT"),skin:document.createElement("SELECT"),area:document.createElement("INPUT"),wspan:document.createElement("INPUT"),gull:void 0,dihedral:void 0,anhedral:void 0,br:document.createElement("BR")};t.span.appendChild(t.deck);const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),t.deck.append(s);for(let s=0;s{let i={...s};i.deck=t.deck.selectedIndex-1,this.wings.SetMiniWing(e,i)},t.deck.selectedIndex=s.deck+1,t.skin.onchange=()=>{let i={...s};i.surface=t.skin.selectedIndex,this.wings.SetMiniWing(e,i)},t.skin.selectedIndex=s.surface,t.area.onchange=()=>{let i={...s};i.area=t.area.valueAsNumber,this.wings.SetMiniWing(e,i)},t.area.valueAsNumber=s.area,t.wspan.onchange=()=>{let i={...s};i.span=t.wspan.valueAsNumber,this.wings.SetMiniWing(e,i)},t.wspan.valueAsNumber=s.span}PopMiniWing(){const t=this.mw_list.pop();this.mini_cell.removeChild(t.span),this.mini_cell.removeChild(t.br)}CreateFWAdd(t){this.fw_add=document.createElement("SELECT");const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),this.fw_add.append(s);var i=!1;for(let t=0;t{let e={surface:0,area:10,span:5,gull:!1,dihedral:0,anhedral:0,deck:this.fw_add.selectedIndex-1};this.wings.SetFullWing(t,e)},this.fw_add.selectedIndex=0,this.fw_add.disabled=!i,this.full_cell.appendChild(this.fw_add)}CreateMWAdd(t){this.mw_add=document.createElement("SELECT");const e=this.wings.GetDeckList(),s=document.createElement("OPTION");s.textContent=h("Wings No Wing"),this.mw_add.append(s);var i=!1;for(let t=0;t{let e={surface:0,area:2,span:2,gull:!1,dihedral:0,anhedral:0,deck:this.mw_add.selectedIndex-1};this.wings.SetMiniWing(t,e)},this.mw_add.selectedIndex=0,this.mw_add.disabled=!i,this.mini_cell.appendChild(this.mw_add)}}class te extends kt{constructor(t){super(),this.stab=t,document.getElementById("lbl_stab").textContent=h("Stabilizers Section Title");const e=document.getElementById("stab_table"),s=document.createDocumentFragment();var i=xt(s);St(i,h("Stabilizers Horizontal Stabilizers")),St(i,h("Stabilizers Vertical Stabilizers")),St(i,h("Stabilizers Stabilizer Stats"));const a=(i=xt(s)).insertCell(),n=i.insertCell();this.h_type=document.createElement("SELECT"),this.h_count=document.createElement("INPUT"),a.appendChild(this.h_type),a.append(document.createElement("BR")),yt(h("Stabilizers # of Stabilizers"),this.h_count,a),this.h_count.min="0",this.h_count.max="20",this.h_count.onchange=()=>{this.stab.SetHStabCount(this.h_count.valueAsNumber)},this.h_type.onchange=()=>{this.stab.SetHStabType(this.h_type.selectedIndex)};for(let e of t.GetHStabList()){let t=document.createElement("OPTION");t.text=h(e.name),this.h_type.add(t)}this.v_type=document.createElement("SELECT"),this.v_count=document.createElement("INPUT"),n.appendChild(this.v_type),n.appendChild(document.createElement("BR")),yt(h("Stabilizers # of Stabilizers"),this.v_count,n),this.v_count.min="0",this.v_count.max="20",this.v_count.onchange=()=>{this.stab.SetVStabCount(this.v_count.valueAsNumber)},this.v_type.onchange=()=>{this.stab.SetVStabType(this.v_type.selectedIndex)};for(let e of t.GetVStabList()){let t=document.createElement("OPTION");t.text=h(e.name),this.v_type.add(t)}const r=i.insertCell();r.rowSpan=0,this.InitStatDisplay(r),e.appendChild(s)}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Control")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_cont=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Pitch Stability")),St(a,h("Stat Lateral Stability")),St(a,h("Stat Lift Bleed"));const n=e.insertRow();this.d_pstb=n.insertCell(),this.d_lstb=n.insertCell(),this.d_lift=n.insertCell()}SetCollapse(){Ot("stabilizer_collapse",!this.stab.IsDefault())}UpdateDisplay(){this.h_type.selectedIndex=this.stab.GetHStabType(),this.v_type.selectedIndex=this.stab.GetVStabType();var t=this.stab.GetHValidList();for(let e=0;e{this.cs.SetAileron(this.aileron_select.selectedIndex)},this.rudder_select=document.createElement("SELECT");for(let e of t.GetRudderList()){let t=document.createElement("OPTION");t.text=h(e.name),this.rudder_select.add(t)}this.rudder_select.onchange=()=>{this.cs.SetRudder(this.rudder_select.selectedIndex)},this.elevator_select=document.createElement("SELECT");for(let e of t.GetElevatorList()){let t=document.createElement("OPTION");t.text=h(e.name),this.elevator_select.add(t)}this.elevator_select.onchange=()=>{this.cs.SetElevator(this.elevator_select.selectedIndex)},this.flaps_select=document.createElement("SELECT");for(let e of t.GetFlapsList()){let t=document.createElement("OPTION");t.text=h(e.name),this.flaps_select.add(t)}this.flaps_select.onchange=()=>{this.cs.SetFlaps(this.flaps_select.selectedIndex)},this.slats_select=document.createElement("SELECT");for(let e of t.GetSlatsList()){let t=document.createElement("OPTION");t.text=h(e.name),this.slats_select.add(t)}this.slats_select.onchange=()=>{this.cs.SetSlats(this.slats_select.selectedIndex)};const n=bt(a);Bt(h("Control Surfaces Ailerons"),this.aileron_select,n),Bt(h("Control Surfaces Rudders"),this.rudder_select,n),Bt(h("Control Surfaces Elevators"),this.elevator_select,n),Bt(h("Control Surfaces Flaps"),this.flaps_select,n),Bt(h("Control Surfaces Slats"),this.slats_select,n);const r=bt(i.insertCell());this.drag_chbx=[];const o=t.GetDragList();for(let t=0;t{this.cs.SetDrag(t,e.checked)},this.drag_chbx.push(e)}this.InitStatDisplay(i.insertCell()),e.appendChild(s)}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Control")),St(a,h("Stat Pitch Stability")),St(a,h("Stat Lateral Stability"));const n=e.insertRow();this.d_cont=n.insertCell(),this.d_pstb=n.insertCell(),this.d_lstb=n.insertCell();const r=e.insertRow();St(r,h("Stat Lift Bleed")),St(r,h("Stat Crash Safety")),St(r," ");const o=e.insertRow();this.d_lift=o.insertCell(),this.d_crsh=o.insertCell(),this.d_none=o.insertCell()}SetCollapse(){Ot("control_collapse",!this.cs.IsDefault())}UpdateDisplay(){const t=this.cs.CanAileron();for(let e=0;e{this.rf.SetExternalWoodCount(t,r.valueAsNumber)},o.onchange=()=>{this.rf.SetExternalSteelCount(t,o.valueAsNumber)},this.ext_wood_inp.push(r),this.ext_steel_inp.push(o)}this.cabane=document.createElement("SELECT"),Bt(h("Reinforcement Cabane"),this.cabane,e);for(let t of this.rf.GetCabaneList()){let e=document.createElement("OPTION");e.text=h(t.name),this.cabane.add(e)}this.cabane.onchange=()=>{this.rf.SetCabane(this.cabane.selectedIndex)},this.cabane.selectedIndex=0,this.wires=document.createElement("INPUT"),Pt(h("Reinforcement Wires"),this.wires,e),this.wires.onchange=()=>{this.rf.SetWires(this.wires.checked)}}InitInternal(t){const e=bt(t),s=this.rf.GetCantileverList();for(let t=0;t{this.rf.SetCantileverCount(t,a.valueAsNumber)},this.cant_inp.push(a)}this.wing_blades=document.createElement("INPUT"),Pt(h("Reinforcement Wing Blades"),this.wing_blades,e),this.wing_blades.onchange=()=>{this.rf.SetWingBlade(this.wing_blades.checked)}}InitStatDisplay(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Structure")),St(a,h("Stat Raw Strain")),St(a,h("Reinforcement Aircraft Max Strain"));const n=e.insertRow();this.d_strc=n.insertCell(),this.d_maxs=n.insertCell(),this.d_amax=n.insertCell(),this.d_amax.className="part_local"}UpdateDisplay(){this.cabane.selectedIndex=this.rf.GetCabane(),this.wires.checked=this.rf.GetWires();const t=this.rf.GetExternalWoodCount(),e=this.rf.CanExternalWood();for(let s=0;s{this.fuel.SetTankCount(t,i.valueAsNumber)},this.fuel_list.push(i)}this.seal=document.createElement("INPUT"),Pt(h("Load Self-Sealing Gas Tank"),this.seal,s),this.seal.onchange=()=>{this.fuel.SetSelfSealing(this.seal.checked)},this.extinguish=document.createElement("INPUT"),Pt(h("Load Remote Fire Extinguisher"),this.extinguish,s),this.extinguish.onchange=()=>{this.fuel.SetExtinguisher(this.extinguish.checked)}}InitMunitions(t){const e=bt(t);this.bombs=document.createElement("INPUT"),wt(h("Load Bombs"),this.bombs,e),this.bombs.onchange=()=>{this.boom.SetBombCount(this.bombs.valueAsNumber)},this.rockets=document.createElement("INPUT"),wt(h("Load Rockets"),this.rockets,e),this.rockets.onchange=()=>{this.boom.SetRocketCount(this.rockets.valueAsNumber)},this.bay_count=document.createElement("INPUT"),wt(h("Load Internal Bay Count"),this.bay_count,e),this.bay_count.onchange=()=>{this.boom.SetBayCount(this.bay_count.valueAsNumber)},this.bay1=document.createElement("INPUT"),Pt(h("Load Widen Internal Bay 1"),this.bay1,e),this.bay1.onchange=()=>{this.boom.SetUseBays(this.bay1.checked,this.bay2.checked)},this.bay2=document.createElement("INPUT"),Pt(h("Load Widen Internal Bay 2"),this.bay2,e),this.bay2.onchange=()=>{this.boom.SetUseBays(this.bay1.checked,this.bay2.checked)}}InitCargoAndPassengers(t){this.carg=document.createElement("SELECT"),t.appendChild(this.carg);const e=this.cargo.GetSpaceList();for(let t of e){let e=document.createElement("OPTION");e.text=h(t.name),this.carg.add(e)}this.carg.onchange=()=>{this.cargo.SetSpace(this.carg.selectedIndex)}}InitStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Wet Mass"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_wmas=i.insertCell();var a=e.insertRow();St(a,h("Stat Required Sections")),St(a,h("Stat Fuel")),St(a,h("Stat Cost"));var n=e.insertRow();this.d_rsec=n.insertCell(),this.d_fuel=n.insertCell(),this.d_cost=n.insertCell(),St(a=e.insertRow(),""),St(a,h("Derived Fuel Uses")),St(a,""),(n=e.insertRow()).insertCell(),this.d_fuse=n.insertCell(),n.insertCell()}UpdateFuelUses(t){var e=Math.floor(1e-6+10*t)/10;isFinite(e)||(e=0),Nt(this.d_fuse,e.toString(),!1)}UpdateDisplay(){const t=this.fuel.GetTankCount(),e=this.fuel.GetTankEnabled();for(let s=0;s0?(this.bay1.disabled=!1,this.bay1.checked?this.bay2.disabled=!1:this.bay2.disabled=!0):(this.bay1.disabled=!0,this.bay2.disabled=!0),this.carg.selectedIndex=this.cargo.GetSpace();var s=this.fuel.PartStats();s=(s=s.Add(this.boom.PartStats())).Add(this.cargo.PartStats()),Nt(this.d_drag,s.drag.toString(),!1),Nt(this.d_mass,s.mass.toString(),!1),Nt(this.d_wmas,s.wetmass.toString(),!1),Nt(this.d_rsec,s.reqsections.toString(),!1),Nt(this.d_fuel,s.fuel.toString(),!0),Nt(this.d_cost,s.cost.toString(),!1)}}class ae extends kt{constructor(t){super(),this.gear=t,document.getElementById("lbl_landing_gear").textContent=h("Landing Gear Section Title");const e=document.getElementById("tbl_gear"),s=document.createDocumentFragment();var i=xt(s);St(i,h("Landing Gear Landing Gear")),St(i,h("Landing Gear Extras")),St(i,h("Landing Gear Gear Stats")),i=xt(s),this.InitGear(i.insertCell()),this.InitExtras(i.insertCell()),this.InitStats(i.insertCell()),e.appendChild(s)}InitGear(t){const e=this.gear.GetGearList(),s=bt(t);this.sel=document.createElement("SELECT"),Bt("Type",this.sel,s);for(let t=0;t{this.gear.SetGear(this.sel.selectedIndex)},this.retract=document.createElement("INPUT"),Pt(h("Landing Gear Retractable"),this.retract,s),this.retract.onchange=()=>{this.gear.SetRetract(this.retract.checked)}}InitExtras(t){this.extras=[];const e=this.gear.GetExtraList(),s=bt(t);for(let t=0;t{this.gear.SetExtraSelected(t,i.checked)},this.extras.push(i)}}InitStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Structure")),St(a,h("Stat Crash Safety")),St(a,"");const n=e.insertRow();this.d_strc=n.insertCell(),this.d_crsh=n.insertCell(),n.insertCell()}SetCollapse(){Ot("gear_collapse",!this.gear.IsDefault())}UpdateDisplay(){this.sel.selectedIndex=this.gear.GetGear();const t=this.gear.CanGear();for(let e=0;e{this.acc.SetArmourCoverage(t,this.a_AP[t].valueAsNumber)};let n=t+a/2;e=n+1,wt("Thickness "+e.toString(),this.a_AP[n],i),this.a_AP[n].onchange=()=>{this.acc.SetArmourCoverage(n,this.a_AP[n].valueAsNumber)}}}InitElectrical(t){const e=bt(t);this.radio=document.createElement("SELECT"),Bt(h("Accessories Radio"),this.radio,e);const s=this.acc.GetRadioList();for(let t=0;t{this.acc.SetRadioSel(this.radio.selectedIndex)},this.elect=[];const i=this.acc.GetElectricalList();for(let t=0;t{this.acc.SetElectricalCount(t,s.valueAsNumber)},this.elect.push(s)}}InitInformation(t){const e=bt(t),s=this.acc.GetReconList();this.recon=[];for(let t=0;t{this.acc.SetReconSel(t,i.valueAsNumber)},this.recon.push(i)}}InitVisibility(t){const e=bt(t),s=this.acc.GetVisibilityList();this.visi=[];for(let t=0;t{this.acc.SetVisibilitySel(t,i.checked)},this.visi.push(i)}}InitClimate(t){const e=bt(t),s=this.acc.GetClimateList();this.clim=[];for(let t=0;t{this.acc.SetClimateSel(t,i.checked)},this.clim.push(i)}}InitControl(t){const e=bt(t);this.auto=document.createElement("SELECT");const s=this.acc.GetAutopilotList();Bt(h("Accessories Autopilot"),this.auto,e);for(let t=0;t{this.acc.SetAutopilotSel(this.auto.selectedIndex)};const i=this.acc.GetControlList();this.cont=document.createElement("SELECT"),Bt(h("Accessories Control Aids"),this.cont,e);for(let t=0;t{this.acc.SetControlSel(this.cont.selectedIndex)}}InitStats(t){t.rowSpan=3,t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.d_drag=i.insertCell(),this.d_mass=i.insertCell(),this.d_cost=i.insertCell();const a=e.insertRow();St(a,h("Stat Structure")),St(a,h("Stat Charge")),St(a,h("Stat Lift Bleed"));const n=e.insertRow();this.d_strc=n.insertCell(),this.d_chgh=n.insertCell(),this.d_lift=n.insertCell();const r=e.insertRow();St(r,h("Stat Visibility")),St(r,h("Stat Flight Stress")),St(r,h("Stat Required Sections"));const o=e.insertRow();this.d_visi=o.insertCell(),this.d_strs=o.insertCell(),this.d_rsec=o.insertCell()}UpdateDisplay(){const t=this.acc.GetArmourCoverageForDisplay();for(let e=0;e{this.opt.SetFreeDots(this.free_inp.valueAsNumber)};const e=document.getElementById("tbl_optimization"),s=document.createDocumentFragment(),i=xt(s);St(i,h("Optimization Negative")),St(i,h("Optimization Effect")),St(i,h("Optimization Positive")),St(i,h("Optimization Optimization Stats"));const a=xt(s);this.cost_cbx=this.InitRow(a,h("Optimization Cost"),(t=>this.opt.SetCost(t))),this.bleed_cbx=this.InitRow(xt(s),h("Optimization Lift Bleed"),(t=>this.opt.SetBleed(t))),this.escape_cbx=this.InitRow(xt(s),h("Optimization Leg Room"),(t=>this.opt.SetEscape(t))),this.mass_cbx=this.InitRow(xt(s),h("Optimization Mass"),(t=>this.opt.SetMass(t))),this.toughness_cbx=this.InitRow(xt(s),h("Optimization Toughness"),(t=>this.opt.SetToughness(t))),this.maxstrain_cbx=this.InitRow(xt(s),h("Optimization Max Strain"),(t=>this.opt.SetMaxStrain(t))),this.reliability_cbx=this.InitRow(xt(s),h("Optimization Reliability"),(t=>this.opt.SetReliability(t))),this.drag_cbx=this.InitRow(xt(s),h("Optimization Drag"),(t=>this.opt.SetDrag(t))),this.InitStatDisplay(a.insertCell()),e.appendChild(s)}InitRow(t,e,s){const i=[];for(let t=0;t<6;t++)i.push(document.createElement("INPUT")),i[t].setAttribute("type","checkbox"),i[t].onchange=t<3?()=>{i[t].checked?s(t-3):s(t-2)}:()=>{i[t].checked?s(t-2):s(t-3)};const a=t.insertCell(),n=t.insertCell(),r=t.insertCell();return a.appendChild(i[0]),a.appendChild(i[1]),a.appendChild(i[2]),n.textContent=e,r.appendChild(i[3]),r.appendChild(i[4]),r.appendChild(i[5]),i}InitStatDisplay(t){t.rowSpan=0,t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Cost")),St(s,h("Stat Lift Bleed")),St(s,h("Stat Escape"));const i=e.insertRow();this.d_cost=i.insertCell(),this.d_lift=i.insertCell(),this.d_escp=i.insertCell();const a=e.insertRow();St(a,h("Stat Visibility")),St(a,h("Stat Mass")),St(a,h("Stat Toughness"));const n=e.insertRow();this.d_visi=n.insertCell(),this.d_mass=n.insertCell(),this.d_tugh=n.insertCell();const r=e.insertRow();St(r,h("Stat Max Strain")),St(r,h("Stat Reliability")),St(r,h("Stat Drag"));const o=e.insertRow();this.d_mstr=o.insertCell(),this.d_reli=o.insertCell(),this.d_drag=o.insertCell()}SetCollapse(){Ot("optimization_collapse",!this.opt.IsDefault())}UpdateChecked(t,e){for(let t=0;t0&&(e[3].checked=!0,t>1&&(e[4].checked=!0,t>2&&(e[5].checked=!0)))}UpdateEnabled(t,e){var s=0;for(let i=3;it}UpdateDisplay(){this.free_inp.valueAsNumber=this.opt.GetFreeDots(),this.UpdateChecked(this.opt.GetCost(),this.cost_cbx),this.UpdateChecked(this.opt.GetBleed(),this.bleed_cbx),this.UpdateChecked(this.opt.GetEscape(),this.escape_cbx),this.UpdateChecked(this.opt.GetMass(),this.mass_cbx),this.UpdateChecked(this.opt.GetToughness(),this.toughness_cbx),this.UpdateChecked(this.opt.GetMaxStrain(),this.maxstrain_cbx),this.UpdateChecked(this.opt.GetReliabiilty(),this.reliability_cbx),this.UpdateChecked(this.opt.GetDrag(),this.drag_cbx);const t=this.opt.GetUnassignedCount();this.UpdateEnabled(t,this.cost_cbx),this.UpdateEnabled(t,this.bleed_cbx),this.UpdateEnabled(t,this.escape_cbx),this.UpdateEnabled(t,this.mass_cbx),this.UpdateEnabled(t,this.toughness_cbx),this.UpdateEnabled(t,this.maxstrain_cbx),this.UpdateEnabled(t,this.reliability_cbx),this.UpdateEnabled(t,this.drag_cbx);const e=this.opt.PartStats();Nt(this.d_cost,e.cost.toString(),!1),Nt(this.d_lift,e.liftbleed.toString(),!1),Nt(this.d_escp,e.escape.toString(),!0),Nt(this.d_visi,e.visibility.toString(),!0),Nt(this.d_mass,e.mass.toString(),!1),Nt(this.d_tugh,e.toughness.toString(),!0),Nt(this.d_mstr,this.opt.final_ms.toString(),!0),Nt(this.d_reli,e.reliability.toString(),!0),Nt(this.d_drag,e.drag.toString(),!1)}}class oe extends kt{constructor(t){super(),this.used=t,document.getElementById("lbl_used").textContent=h("Used Section Title"),this.tbl=document.getElementById("tbl_used");const e=document.createDocumentFragment(),s=xt(e);St(s,h("Used Effect")),St(s,h("Used Description")),St(s,h("Used Penalties(+)
Benefits(-)")),this.InitTable(e),this.tbl.appendChild(e)}InitTable(t){this.burnt_out=document.createElement("INPUT"),this.ragged=document.createElement("INPUT"),this.hefty=document.createElement("INPUT"),this.sticky_guns=document.createElement("INPUT"),this.weak=document.createElement("INPUT"),this.fragile=document.createElement("INPUT"),this.leaky=document.createElement("INPUT"),this.sluggish=document.createElement("INPUT");var e=xt(t);e.insertCell().textContent=h("Used Burnt Out"),e.insertCell().textContent=h("Used Burnt Out Description");var s=e.insertCell();yt("",this.burnt_out,s,!1),(e=xt(t)).insertCell().textContent=h("Used Ragged"),e.insertCell().textContent=h("Used Ragged Description"),s=e.insertCell(),yt("",this.ragged,s,!1),(e=xt(t)).insertCell().textContent=h("Used Hefty"),e.insertCell().textContent=h("Used Hefty Description"),s=e.insertCell(),yt("",this.hefty,s,!1),(e=xt(t)).insertCell().textContent=h("Used Sticky Guns"),e.insertCell().textContent=h("Used Sticky Guns Description"),s=e.insertCell(),yt("",this.sticky_guns,s,!1),(e=xt(t)).insertCell().textContent=h("Used Weak"),e.insertCell().textContent=h("Used Weak Description"),s=e.insertCell(),yt("",this.weak,s,!1),(e=xt(t)).insertCell().textContent=h("Used Fragile"),e.insertCell().textContent=h("Used Fragile Description"),s=e.insertCell(),yt("",this.fragile,s,!1),(e=xt(t)).insertCell().textContent=h("Used Leaky"),e.insertCell().textContent=h("Used Leaky Description"),s=e.insertCell(),yt("",this.leaky,s,!1),(e=xt(t)).insertCell().textContent=h("Used Sluggish"),e.insertCell().textContent=h("Used Sluggish Description"),s=e.insertCell(),yt("",this.sluggish,s,!1),this.burnt_out.onchange=()=>{this.used.burnt_out=this.burnt_out.valueAsNumber,this.used.TriggerCS()},this.ragged.onchange=()=>{this.used.ragged=this.ragged.valueAsNumber,this.used.TriggerCS()},this.hefty.onchange=()=>{this.used.hefty=this.hefty.valueAsNumber,this.used.TriggerCS()},this.sticky_guns.onchange=()=>{this.used.sticky_guns=this.sticky_guns.valueAsNumber,this.used.TriggerCS()},this.weak.onchange=()=>{this.used.weak=this.weak.valueAsNumber,this.used.TriggerCS()},this.fragile.onchange=()=>{this.used.fragile=this.fragile.valueAsNumber,this.used.TriggerCS()},this.leaky.onchange=()=>{this.used.leaky=this.leaky.valueAsNumber,this.used.TriggerCS()},this.sluggish.onchange=()=>{this.used.sluggish=this.sluggish.valueAsNumber,this.used.TriggerCS()},this.burnt_out.min="-1",this.burnt_out.max="1",this.ragged.min="-1",this.ragged.max="1",this.hefty.min="-1",this.hefty.max="1",this.sticky_guns.min="-1",this.sticky_guns.max="1",this.weak.min="-1",this.weak.max="1",this.fragile.min="-1",this.fragile.max="1",this.leaky.min="-1",this.leaky.max="1",this.sluggish.min="-1",this.sluggish.max="1"}SetCollapse(){Ot("used_collapse",!this.used.IsDefault())}UpdateDisplay(){this.burnt_out.valueAsNumber=this.used.burnt_out,this.ragged.valueAsNumber=this.used.ragged,this.hefty.valueAsNumber=this.used.hefty,this.sticky_guns.valueAsNumber=this.used.sticky_guns,this.weak.valueAsNumber=this.used.weak,this.fragile.valueAsNumber=this.used.fragile,this.leaky.valueAsNumber=this.used.leaky,this.sluggish.valueAsNumber=this.used.sluggish}}class le extends kt{constructor(t){super(),this.rotor=t,document.getElementById("lbl_rotor").textContent=h("Rotor Section Title"),this.div=document.getElementById("Rotors"),this.wing_div=document.getElementById("Wings"),this.reinforce_div=document.getElementById("Reinforcements"),this.control_div=document.getElementById("ControlSurfaces");const e=document.getElementById("rotor_table"),s=document.createDocumentFragment();this.InitAutogyro(s),this.InitHelicopter(s),e.appendChild(s)}InitAutogyro(t){this.auto_header=xt(t),St(this.auto_header,h("Rotor Rotor")),St(this.auto_header,h("Rotor Material")),St(this.auto_header,h("Rotor Accessories")),St(this.auto_header,h("Rotor Stats")),this.auto_row=xt(t);const e=bt(this.auto_row.insertCell());this.auto_min=document.createElement("LABEL"),Ct(h("Rotor Minimum Span"),this.auto_min,e),this.auto_span=document.createElement("INPUT"),wt(h("Rotor Span"),this.auto_span,e),this.auto_span.onchange=()=>{this.rotor.SetRotorSpan(this.auto_span.valueAsNumber)};const s=bt(this.auto_row.insertCell());this.auto_mat=document.createElement("SELECT"),Bt(h("Rotor Material"),this.auto_mat,s);for(let t of this.rotor.GetCantileverList()){let e=document.createElement("OPTION");e.text=h(t.name),this.auto_mat.add(e)}this.auto_mat.onchange=()=>{this.rotor.SetCantilever(this.auto_mat.selectedIndex)};const i=bt(this.auto_row.insertCell());this.auto_clutch=document.createElement("INPUT"),Pt(h("Rotor Clutched Rotor"),this.auto_clutch,i),this.auto_clutch.onchange=()=>{this.rotor.SetAccessory(this.auto_clutch.checked)},this.InitAutogyroStats(this.auto_row.insertCell())}InitAutogyroStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.a_drag=i.insertCell(),this.a_mass=i.insertCell(),this.a_cost=i.insertCell();const a=e.insertRow();St(a,h("Rotor Area")),St(a,""),St(a,"");const n=e.insertRow();this.a_area=n.insertCell(),n.insertCell(),n.insertCell()}UpdateAutogyroStats(){this.auto_span.valueAsNumber=this.rotor.GetRotorSpan(),this.auto_mat.selectedIndex=this.rotor.GetCantilever(),this.auto_min.innerText=""+this.rotor.GetSizingSpan(),this.auto_clutch.checked=this.rotor.GetAccessory();const t=this.rotor.PartStats();Nt(this.a_drag,t.drag.toString(),!1),Nt(this.a_mass,t.mass.toString(),!1),Nt(this.a_cost,t.cost.toString(),!1),Nt(this.a_area,t.wingarea.toString(),!0)}InitHelicopter(t){this.heli_header=xt(t),St(this.heli_header,h("Rotor Rotor")),St(this.heli_header,h("Rotor Material")),St(this.heli_header,h("Rotor Accessories")),St(this.heli_header,h("Rotor Stats")),this.heli_row=xt(t);const e=bt(this.heli_row.insertCell());this.heli_count=document.createElement("INPUT"),wt(h("Rotor Number of Rotors"),this.heli_count,e),this.heli_count.onchange=()=>{this.rotor.SetRotorCount(this.heli_count.valueAsNumber)},this.heli_min=document.createElement("LABEL"),Ct(h("Rotor Ideal Rotor Span"),this.heli_min,e),this.heli_span=document.createElement("INPUT"),wt(h("Rotor Span"),this.heli_span,e),this.heli_span.min="",this.heli_span.onchange=()=>{this.rotor.SetRotorSpan(this.heli_span.valueAsNumber)},this.heli_stagger=document.createElement("SELECT"),Bt(h("Rotor Stagger"),this.heli_stagger,e);const s=this.rotor.GetStaggerList();for(let t of s){let e=document.createElement("OPTION");e.text=h(t.name),this.heli_stagger.add(e)}this.heli_stagger.onchange=()=>{this.rotor.SetStagger(this.heli_stagger.selectedIndex)},this.heli_blade_count=document.createElement("SELECT"),Bt(h("Rotor Blade Count"),this.heli_blade_count,e);const i=this.rotor.GetBladeList();for(let t of i){let e=document.createElement("OPTION");e.textContent=t.name,this.heli_blade_count.add(e)}this.heli_blade_count.onchange=()=>{this.rotor.SetBladeCount(this.heli_blade_count.selectedIndex)};const a=bt(this.heli_row.insertCell());this.heli_mat=document.createElement("SELECT"),Bt(h("Rotor Rotor Material"),this.heli_mat,a);for(let t of this.rotor.GetCantileverList()){let e=document.createElement("OPTION");e.text=h(t.name),this.heli_mat.add(e)}this.heli_mat.onchange=()=>{this.rotor.SetCantilever(this.heli_mat.selectedIndex)},this.heli_blade_thickness=document.createElement("INPUT"),wt(h("Rotor Thickness"),this.heli_blade_thickness,a),this.heli_blade_thickness.onchange=()=>{this.rotor.SetRotorThickness(this.heli_blade_thickness.valueAsNumber)};const n=bt(this.heli_row.insertCell());this.heli_shafts=document.createElement("INPUT"),Pt(h("Rotor Motor Cross-link"),this.heli_shafts,n),this.heli_shafts.onchange=()=>{this.rotor.SetAccessory(this.heli_shafts.checked)},this.InitHelicopterStats(this.heli_row.insertCell())}InitHelicopterStats(t){t.className="inner_table";const e=document.createElement("TABLE");e.className="inner_table",t.appendChild(e);const s=e.insertRow();St(s,h("Stat Drag")),St(s,h("Stat Mass")),St(s,h("Stat Cost"));const i=e.insertRow();this.h_drag=i.insertCell(),this.h_mass=i.insertCell(),this.h_cost=i.insertCell();const a=e.insertRow();St(a,h("Rotor Area")),St(a,h("Stat Reliability")),St(a,h("Reinforcement Aircraft Max Strain"));const n=e.insertRow();this.h_area=n.insertCell(),this.h_rely=n.insertCell(),this.h_strn=n.insertCell();const r=e.insertRow();St(r,""),St(r,h("Power")),St(r,"");const o=e.insertRow();o.insertCell(),this.h_powr=o.insertCell(),o.insertCell()}UpdateHelicopterStats(){this.heli_count.valueAsNumber=this.rotor.GetRotorCount(),1==this.rotor.GetRotorCount()?this.heli_count.step="1":this.heli_count.step="2",this.heli_min.innerText=""+this.rotor.GetSizingSpan(),this.heli_span.valueAsNumber=this.rotor.GetRotorSpan();const t=this.rotor.CanStagger();for(let e=0;e{let t=new u;t.drag=this.drag.valueAsNumber,t.mass=this.mass.valueAsNumber,t.wetmass=this.wmas.valueAsNumber,t.bomb_mass=this.bmas.valueAsNumber,t.cost=this.cost.valueAsNumber,t.upkeep=this.upkp.valueAsNumber,t.liftbleed=this.lfbd.valueAsNumber,t.wingarea=this.area.valueAsNumber,t.control=this.ctrl.valueAsNumber,t.pitchstab=this.pstb.valueAsNumber,t.latstab=this.lstb.valueAsNumber,t.maxstrain=this.rstn.valueAsNumber,t.structure=this.strc.valueAsNumber,t.toughness=this.tugh.valueAsNumber,t.power=this.powr.valueAsNumber,t.fuelconsumption=this.fcon.valueAsNumber,t.fuel=this.fuel.valueAsNumber,t.charge=this.chrg.valueAsNumber,t.crashsafety=this.sfty.valueAsNumber,t.visibility=this.visi.valueAsNumber,t.escape=this.escp.valueAsNumber,t.reliability=this.rely.valueAsNumber,this.sprl.value=this.sprl.value.trim(),this.sprl.value.length>0&&t.warnings.push({source:this.name.value,warning:this.sprl.value,color:c.WHITE}),this.alter.AddPart(this.name.value,t),this.UpdateSelect(),this.sel.selectedIndex=-1},this.rem.onclick=()=>{this.alter.RemovePart(this.name.value),this.ResetInputs(),this.UpdateSelect(),this.sel.selectedIndex=-1},this.sel.onchange=()=>{let t=this.alter.GetParts()[this.sel.selectedIndex];this.name.value=t.name,this.drag.valueAsNumber=t.stats.drag,this.mass.valueAsNumber=t.stats.mass,this.wmas.valueAsNumber=t.stats.wetmass,this.bmas.valueAsNumber=t.stats.bomb_mass,this.cost.valueAsNumber=t.stats.cost,this.upkp.valueAsNumber=t.stats.upkeep,this.lfbd.valueAsNumber=t.stats.liftbleed,this.area.valueAsNumber=t.stats.wingarea,this.ctrl.valueAsNumber=t.stats.control,this.pstb.valueAsNumber=t.stats.pitchstab,this.lstb.valueAsNumber=t.stats.latstab,this.rstn.valueAsNumber=t.stats.maxstrain,this.strc.valueAsNumber=t.stats.structure,this.tugh.valueAsNumber=t.stats.toughness,this.powr.valueAsNumber=t.stats.power,this.fcon.valueAsNumber=t.stats.fuelconsumption,this.fuel.valueAsNumber=t.stats.fuel,this.chrg.valueAsNumber=t.stats.charge,this.sfty.valueAsNumber=t.stats.crashsafety,this.visi.valueAsNumber=t.stats.visibility,this.escp.valueAsNumber=t.stats.escape,this.rely.valueAsNumber=t.stats.reliability;const e=[];for(let s of t.stats.warnings)e.push(s.warning);this.sprl.value=n.Join(" ",e),this.sel.selectedIndex=-1},this.ResetInputs(),this.UpdateSelect()}ResetInputs(){this.name.value="Default",this.drag.valueAsNumber=0,this.mass.valueAsNumber=0,this.wmas.valueAsNumber=0,this.bmas.valueAsNumber=0,this.cost.valueAsNumber=0,this.upkp.valueAsNumber=0,this.lfbd.valueAsNumber=0,this.area.valueAsNumber=0,this.ctrl.valueAsNumber=0,this.pstb.valueAsNumber=0,this.lstb.valueAsNumber=0,this.rstn.valueAsNumber=0,this.strc.valueAsNumber=0,this.tugh.valueAsNumber=0,this.powr.valueAsNumber=0,this.fcon.valueAsNumber=0,this.fuel.valueAsNumber=0,this.chrg.valueAsNumber=0,this.sfty.valueAsNumber=0,this.visi.valueAsNumber=0,this.escp.valueAsNumber=0,this.rely.valueAsNumber=0,this.sprl.value=""}UpdateSelect(){for(;this.sel.options.length;)this.sel.remove(this.sel.options.length-1);const t=this.alter.GetParts();for(let e of t){let t=document.createElement("OPTION");t.textContent=e.name,this.sel.add(t)}this.sel.selectedIndex=-1}SetCollapse(){Ot("alter_collapse",!this.alter.IsDefault())}UpdateDisplay(){this.UpdateSelect();const t=this.alter.GetParts();for(let e=0;e{this.alter.SetUsedPart(e,t.qty.valueAsNumber)},this.add_fs.div1.appendChild(t.lbl),this.add_fs.div2.appendChild(t.qty),this.add_list.push(t)}this.add_list[e].lbl.textContent=t[e].name,this.add_list[e].qty.valueAsNumber=t[e].qty}for(;this.add_list.length>t.length;)this.add_list[this.add_list.length-1].lbl.remove(),this.add_list[this.add_list.length-1].qty.remove(),this.add_list.pop()}}class ce{constructor(t){const e=document.createDocumentFragment(),s=xt(e),i=s.insertCell();i.colSpan=2,this.name_inp=document.createElement("INPUT"),this.name_inp.defaultValue=h("Derived Aircraft Name"),i.appendChild(this.name_inp),St(s,h("Stat Cost")),this.cost_cell=s.insertCell(),St(s,h("Stat Upkeep")),this.upkeep_cell=s.insertCell(),St(s,h("Derived Era Report")),this.version_cell=s.insertCell();const a=xt(e);St(a,h("Derived Mass Variations")),St(a,h("Derived Boost")),St(a,h("Derived Handling")),St(a,h("Derived Rate of Climb")),St(a,h("Derived Stall Speed")),St(a,h("Derived Top Speed")),St(a,h("Derived Vital Components")).colSpan=2,this.bomb_row2=xt(e),St(this.bomb_row2,h("Derived Full Fuel with Bombs")),this.boost_fullwB=this.bomb_row2.insertCell(),this.hand_fullwB=this.bomb_row2.insertCell(),this.roc_fullwB=this.bomb_row2.insertCell(),this.ss_fullwB=this.bomb_row2.insertCell(),this.ts_fullwB=this.bomb_row2.insertCell(),this.vital_components=this.bomb_row2.insertCell(),this.vital_components.rowSpan=3,this.vital_components.colSpan=3,this.bomb_row1=xt(e),St(this.bomb_row1,h("Derived Half Fuel with Bombs")),this.boost_halfwB=this.bomb_row1.insertCell(),this.hand_halfwB=this.bomb_row1.insertCell(),this.roc_halfwB=this.bomb_row1.insertCell(),this.ss_halfwB=this.bomb_row1.insertCell(),this.ts_halfwB=this.bomb_row1.insertCell(),this.full_row=xt(e),St(this.full_row,h("Derived Full Fuel")),this.boost_full=this.full_row.insertCell(),this.hand_full=this.full_row.insertCell(),this.roc_full=this.full_row.insertCell(),this.ss_full=this.full_row.insertCell(),this.ts_full=this.full_row.insertCell();const n=xt(e);St(n,h("Derived Half Fuel")),this.boost_half=n.insertCell(),this.hand_half=n.insertCell(),this.roc_half=n.insertCell(),this.ss_half=n.insertCell(),this.ts_half=n.insertCell();const r=xt(e);St(r,h("Derived Empty Fuel")),this.boost_empty=r.insertCell(),this.hand_empty=r.insertCell(),this.roc_empty=r.insertCell(),this.ss_empty=r.insertCell(),this.ts_empty=r.insertCell();const o=xt(e);St(o,h("Derived Propulsion")).colSpan=2,St(o,h("Derived Aerodynamics")).colSpan=2,St(o,h("Derived Survivability")).colSpan=2,St(o,h("Derived Crew Members")).colSpan=2;const l=xt(e);St(l,h("Derived Dropoff")),this.dropoff_cell=l.insertCell(),St(l,h("Derived Stability")),this.stability_cell=l.insertCell(),St(l,h("Derived Crash Safety")),this.crashsafety_cell=l.insertCell(),St(l,h("Derived Crew/Passengers")),this.crew_cell=l.insertCell();const c=xt(e);St(c,h("Derived Overspeed")),this.overspeed_cell=c.insertCell(),St(c,h("Derived Energy Loss")),this.eloss_cell=c.insertCell(),St(c,h("Stat Toughness")),this.toughness_cell=c.insertCell(),St(c,h("Stat Visibility")),this.visibility_cell=c.insertCell();const u=xt(e);St(u,h("Derived Fuel Uses")),this.maxfuel_cell=u.insertCell(),this.turnbleed_label=St(u,h("Derived Turn Bleed")),this.turnbleed_cell=u.insertCell(),St(u,h("Stat Max Strain")),this.mxstrain_cell=u.insertCell(),St(u,h("Derived Attack Modifier")),this.attack_cell=u.insertCell();const m=xt(e);St(m,h("Stat Reliability")),this.reliability_cell=m.insertCell(),St(m,h("Derived Landing Gear")),this.landing_cell=m.insertCell(),St(m,h("Derived Communications")),this.communications_cell=m.insertCell(),St(m,h("Derived Escape")),this.escape_cell=m.insertCell();const p=xt(e);St(p,h("Derived Ideal Engine Altitude")),this.maxalt_cell=p.insertCell(),St(p,h("Derived Is Flammable Question")),this.flammable_cell=p.insertCell(),this.desc_cell=p.insertCell(),this.desc_cell.colSpan=2,St(p,h("Stat Flight Stress")),this.flightstress_cell=p.insertCell();const d=xt(e),g=xt(e);this.weapon_head=St(d,h("Derived Weapon Systems")),this.weapon_head.colSpan=6,this.weapon_cell=g.insertCell(),this.weapon_cell.colSpan=6,this.warning_head=St(xt(e),h("Derived Special Rules")),this.warning_head.colSpan=6,this.warning_cell=xt(e).insertCell(),this.warning_cell.colSpan=6,St(d,h("Derived Electrics")).colSpan=2,this.electric_cell=g.insertCell(),this.electric_cell.colSpan=2,this.electric_cell.rowSpan=3,t.appendChild(e),this.tbl=t}UpdateDisplay(t,e,s){for(this.name_inp.value=t.name;this.version_cell.children.length>0;)this.version_cell.removeChild(this.version_cell.children[0]);this.version_cell.className="tooltip";const i=document.createElement("DIV");i.className="tooltiptext";let a=document.createElement("P");a.textContent=h("Derived Problematic Parts"),i.appendChild(a);const r=p(t.GetEra().GetSelectedText());var o=0;for(let t of e.era){const e=p(t.era);if(e>r){o+=e-r;let s=document.createElement("P");s.textContent=t.name+": "+t.era,i.appendChild(s)}}if(0==o){let t=document.createElement("P");t.textContent=h("None"),i.appendChild(t)}const l=document.createElement("P");for(l.textContent=h(t.GetEra().GetSelectedText()),l.className=0==o?"green":o>2?"red":"yellow",this.version_cell.appendChild(l),this.version_cell.appendChild(i),this.cost_cell.textContent=e.cost.toString()+"þ ",t.GetUsed().IsDefault()||(this.cost_cell.textContent+=" ("+Math.floor(1e-6+e.cost/2).toString()+"þ "+h("Price Word Used")+")"),this.upkeep_cell.textContent=e.upkeep.toString()+"þ",this.ts_empty.textContent=(0).toString(),this.ss_empty.textContent=s.StallSpeedEmpty.toString(),this.hand_empty.textContent=s.HandlingEmpty.toString(),this.boost_empty.textContent=(0).toString(),this.roc_empty.textContent=(0).toString(),this.ts_half.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedFull)/2).toString(),this.ss_half.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFull)/2).toString(),this.hand_half.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFull)/2).toString(),this.boost_half.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFull)/2).toString(),this.roc_half.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbFull)/2).toString(),this.ts_full.textContent=Math.floor(1e-6+s.MaxSpeedFull).toString(),this.ss_full.textContent=s.StallSpeedFull.toString(),this.hand_full.textContent=s.HandlingFull.toString(),this.boost_full.textContent=s.BoostFull.toString(),this.roc_full.textContent=s.RateOfClimbFull.toString(),e.bomb_mass>0||this.show_bombs?(this.bomb_row1.hidden=!1,this.bomb_row2.hidden=!1,this.bomb_row2.appendChild(this.vital_components),this.vital_components.rowSpan=5,this.ts_halfwB.textContent=Math.floor(1e-6+(s.MaxSpeedEmpty+s.MaxSpeedwBombs)/2).toString(),this.ss_halfwB.textContent=Math.floor(1e-6+(s.StallSpeedEmpty+s.StallSpeedFullwBombs)/2).toString(),this.hand_halfwB.textContent=Math.floor(1e-6+(s.HandlingEmpty+s.HandlingFullwBombs)/2).toString(),this.boost_halfwB.textContent=Math.floor(1e-6+(s.BoostEmpty+s.BoostFullwBombs)/2).toString(),this.roc_halfwB.textContent=Math.floor(1e-6+(s.RateOfClimbEmpty+s.RateOfClimbwBombs)/2).toString(),this.ts_fullwB.textContent=Math.floor(1e-6+s.MaxSpeedwBombs).toString(),this.ss_fullwB.textContent=s.StallSpeedFullwBombs.toString(),this.hand_fullwB.textContent=s.HandlingFullwBombs.toString(),this.boost_fullwB.textContent=s.BoostFullwBombs.toString(),this.roc_fullwB.textContent=s.RateOfClimbwBombs.toString(),this.turnbleed_label.textContent=h("Derived Turn Bleed wB"),this.turnbleed_cell.textContent=n.Format("{0} ({1})",s.TurnBleed,s.TurnBleedwBombs)):(this.bomb_row1.hidden=!0,this.bomb_row2.hidden=!0,this.full_row.appendChild(this.vital_components),this.vital_components.rowSpan=3,this.turnbleed_label.textContent=h("Derived Turn Bleed"),this.turnbleed_cell.textContent=n.Format("{0}",s.TurnBleed)),this.dropoff_cell.textContent=s.Dropoff.toString(),this.overspeed_cell.textContent=s.Overspeed.toString(),this.maxfuel_cell.textContent=(Math.floor(1e-6+10*s.FuelUses)/10).toString(),t.GetIsFlammable()?this.flammable_cell.textContent=h("Yes"):this.flammable_cell.textContent=h("No"),this.stability_cell.textContent=s.Stabiilty.toString(),this.eloss_cell.textContent=s.EnergyLoss.toString(),this.landing_cell.textContent=t.GetGearName(),this.maxalt_cell.textContent=t.GetMinAltitude().toString()+"-"+t.GetMaxAltitude().toString(),this.reliability_cell.textContent=n.Join(", ",t.GetReliabilityList()),this.toughness_cell.textContent=s.Toughness.toString(),this.mxstrain_cell.textContent=s.MaxStrain.toString(),this.escape_cell.textContent=n.Join(", ",t.GetEscapeList()),this.crashsafety_cell.textContent=e.crashsafety.toString(),this.crew_cell.textContent=t.GetCockpits().GetNumberOfCockpits().toString()+"/"+(t.GetPassengers().GetSeats()+t.GetPassengers().GetBeds()).toString(),this.flightstress_cell.textContent=g(t.GetStressList()),this.visibility_cell.textContent=n.Join(", ",t.GetVisibilityList()),this.attack_cell.textContent=n.Join(", ",t.GetAttackList()),this.communications_cell.textContent=t.GetCommunicationName();this.electric_cell.childElementCount>0;)this.electric_cell.removeChild(this.electric_cell.firstChild);const u=t.GetElectrics(),m=bt(this.electric_cell);u.storage>0&&Ft(h("Derived Battery"),u.storage.toString(),m);for(let t of u.equipment)Ft(t.source,t.charge,m);var d="";const _=t.VitalComponentList();for(let t of _)d+=t+"
";this.vital_components.innerHTML=d;const f=t.GetWeapons().GetWeaponList(),A=t.GetWeapons().GetDirectionList(),b=t.GetMunitions().GetBombCount(),S=t.GetMunitions().GetRocketCount();var y=t.GetMunitions().GetInternalBombCount(),w="";if(b>0){const e=Math.min(b,y),s=Math.max(0,b-e);e>0&&(w+=h(" Bomb Mass Internally.",e)),s>0&&(w+=h(" Bomb Mass Externally.",s)),e>0&&(w+=h("Largest Internal Bomb",Math.min(e,t.GetMunitions().GetMaxBombSize()).toString())),y-=e,w+="
"}if(S>0){const t=Math.min(S,y),e=Math.max(0,S-t);t>0&&(w+=h(" Rocket Mass Internally.",t)),e>0&&(w+=h(" Rocket Mass Externally.",e)),w+="
"}for(let e of t.GetWeapons().GetWeaponSets())w+=qt(e,f,A),w+="
";this.weapon_cell.innerHTML=w,e.warnings.sort(((t,e)=>t.color-e.color));var C="";for(let t of e.warnings){switch(t.color){case c.RED:C+='
';break;case c.YELLOW:C+='
';break;case c.WHITE:default:C+='
'}C+=t.source+": "+t.warning+"
"}this.warning_cell.innerHTML=C;var B="";const E=t.GetWings().GetWingList().length;if(1==E){const e=t.GetWings().GetWingList()[0].deck;e{t()},this.fires=document.getElementById("input_fires"),this.fires.onchange=()=>{t()},this.oxidized=document.getElementById("input_oxidized"),this.oxidized.onchange=()=>{t()},this.fRow=xt(this.tbl),St(this.fRow,h("Altitude Altitude")),St(this.fRow,h("Derived Boost")),St(this.fRow,h("Derived Rate of Climb")),St(this.fRow,h("Derived Stall Speed")),St(this.fRow,h("Derived Top Speed")),this.rows=[]}AddRow(t){const e=document.createElement("TR");e.insertCell().textContent=n.Format("{0}-{1}",10*t,10*t+9),e.insertCell(),e.insertCell(),e.insertCell(),e.insertCell(),this.rows.push(e)}UpdateDisplay(t,e){for(;this.tbl.lastChild;)this.tbl.removeChild(this.tbl.lastChild);const s=document.createDocumentFragment();s.appendChild(this.fRow);var i=0,a=0,n=0,r=0;switch(this.fuel_state.selectedIndex){case ue.FULLWBOMBS:i=e.BoostFullwBombs,a=e.RateOfClimbwBombs,n=e.StallSpeedFullwBombs,r=e.MaxSpeedwBombs;break;case ue.HALFWBOMBS:i=Math.floor(1e-6+(e.BoostEmpty+e.BoostFullwBombs)/2),a=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),n=Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFullwBombs)/2),r=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2);break;case ue.FULL:i=e.BoostFull,a=e.RateOfClimbFull,n=e.StallSpeedFull,r=e.MaxSpeedFull;break;case ue.HALF:i=Math.floor(1e-6+(e.BoostEmpty+e.BoostFull)/2),a=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),n=Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFull)/2),r=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2)}for(let e=0;e<100;e++){var o=0,l=0;if(es&&(o=e-s)}this.fires.checked&&(o=0),this.rows.length<=e&&this.AddRow(e);const c=this.rows[e];var h=0;h=o>0&&0!=i?Math.max(1,i-1):i;const u=Math.max(1,a-o),m=Math.max(1,n+e),p=Math.max(1,r+l-o);if(c.children[1].textContent=h.toString(),c.children[2].textContent=u.toString(),c.children[3].textContent=m.toString(),c.children[4].textContent=p.toString(),s.appendChild(c),m>p){for(;this.rows.length>e;)this.rows.pop();break}}this.tbl.appendChild(s)}}!function(t){t[t.SINGLE=0]="SINGLE",t[t.PUSHER=1]="PUSHER",t[t.PULLER=2]="PULLER"}(me||(me={}));class de{constructor(){this.dash_canvas=document.createElement("CANVAS"),this.dash_canvas.width=1122,this.dash_canvas.height=786,this.dash_image=document.getElementById("dash_img"),this.dash_image.width=1122,this.dash_image.height=786,this.weap_canvas=document.createElement("CANVAS"),this.weap_canvas.width=483,this.weap_canvas.height=291,this.weap_image=document.getElementById("weap_img"),this.weap_image.width=483,this.weap_image.height=291,this.eng_canvas=document.createElement("CANVAS"),this.eng_canvas.width=600,this.eng_canvas.height=360,this.eng_image=document.getElementById("eng_img"),this.eng_image.width=600,this.eng_image.height=360,this.rad_canvas=document.createElement("CANVAS"),this.rad_canvas.width=479,this.rad_canvas.height=290,this.rad_image=document.getElementById("rad_img"),this.rad_image.width=479,this.rad_image.height=290,this.npc_canvas=document.createElement("CANVAS"),this.npc_canvas.width=482,this.npc_canvas.height=290,this.npc_image=document.getElementById("npc_img"),this.npc_image.width=482,this.npc_image.height=290,this.acft_data={full_bomb_boost:0,half_bomb_boost:0,full_boost:0,half_boost:0,empty_boost:0,full_bomb_hand:0,half_bomb_hand:0,full_hand:0,half_hand:0,empty_hand:0,full_bomb_climb:0,half_bomb_climb:0,full_climb:0,half_climb:0,empty_climb:0,full_bomb_stall:0,half_bomb_stall:0,full_stall:0,half_stall:0,empty_stall:0,full_bomb_speed:0,half_bomb_speed:0,full_speed:0,half_speed:0,empty_speed:0,fuel:0,dropoff:0,ordinance:[""],escape:0,crash:0,visibility:0,energy_loss:0,turn_bleed:0,stability:0,stress:0,toughness:0,max_strain:0,vital_parts:[""],armour:[],warnings:[{source:"",warning:""}]},this.weap_data={type:"",abrv:"",ammo:0,ap:0,jam:"",hits:[],damage:[],tags:[],reload:0,gyrojet:!1},this.eng_data={reliability:"0",min_IAF:0,altitude:0,overspeed:0,radiator:0,notes:[]},this.rad_data={mount_type:"",coolant_type:""}}SaveDash(){var t=this.dash_canvas.getContext("2d");t.clearRect(0,0,this.dash_canvas.width,this.dash_canvas.height),t.textAlign="center",t.drawImage(this.dash_image,0,0),t.font="35px Balthazar",t.fillText(this.acft_data.full_bomb_boost.toString(),493,94,80),t.fillText(this.acft_data.full_bomb_hand.toString(),555,94,80),t.fillText(this.acft_data.full_bomb_climb.toString(),617,94,80),t.fillText(this.acft_data.full_bomb_stall.toString(),679,94,80),t.fillText(this.acft_data.full_bomb_speed.toString(),741,94,80),t.fillText(this.acft_data.half_bomb_boost.toString(),493,134,80),t.fillText(this.acft_data.half_bomb_hand.toString(),555,134,80),t.fillText(this.acft_data.half_bomb_climb.toString(),617,134,80),t.fillText(this.acft_data.half_bomb_stall.toString(),679,134,80),t.fillText(this.acft_data.half_bomb_speed.toString(),741,134,80),t.fillText(this.acft_data.full_boost.toString(),493,174,80),t.fillText(this.acft_data.full_hand.toString(),555,174,80),t.fillText(this.acft_data.full_climb.toString(),617,174,80),t.fillText(this.acft_data.full_stall.toString(),679,174,80),t.fillText(this.acft_data.full_speed.toString(),741,174,80),t.fillText(this.acft_data.half_boost.toString(),493,214,80),t.fillText(this.acft_data.half_hand.toString(),555,214,80),t.fillText(this.acft_data.half_climb.toString(),617,214,80),t.fillText(this.acft_data.half_stall.toString(),679,214,80),t.fillText(this.acft_data.half_speed.toString(),741,214,80),t.fillText("0",493,254,80),t.fillText(this.acft_data.empty_hand.toString(),555,254,80),t.fillText("0",617,254,80),t.fillText(this.acft_data.empty_stall.toString(),679,254,80),t.fillText("0",741,254,80),t.fillText(Math.floor(this.acft_data.fuel).toString(),417,310,35),t.fillText(this.acft_data.dropoff.toString(),1048,375,35),t.fillText(this.acft_data.escape.toString(),85,640,35),t.fillText(this.acft_data.crash.toString(),85,720,35),t.fillText(this.acft_data.visibility.toString(),135,460,35),t.fillText(this.acft_data.stability.toString(),135,550,35),t.fillText(this.acft_data.energy_loss.toString(),70,505,35),t.fillText(this.acft_data.turn_bleed.toString(),195,505,35),t.fillText(this.acft_data.stress.toString(),285,495,35),t.fillText(this.acft_data.toughness.toString(),250,645,35),t.fillText(this.acft_data.max_strain.toString(),250,720,35),t.font="20px Balthazar",t.textAlign="left";var e=Math.min(this.acft_data.ordinance.length,2),s=Math.ceil(this.acft_data.ordinance.length/e-1e-6),i=0;for(let a=0;a0&&(a+=""!=a?", ":h("Armour")+" ",a+=e.toString()+"/+"+(11-this.acft_data.armour[t]).toString())}t.fillText(a,335,558,375),t.font="14px Balthazar",i=1;for(let e=0;ee+1?t.fillText(h("Cards Too Many Warnings Warning"),335,673+14*i,370):i>6||t.fillText(s,335,673+14*i,370),i++}this.download(this.name+"_Dashboard",this.dash_canvas)}SaveWeapon(t){t++;var e=this.weap_canvas.getContext("2d");e.clearRect(0,0,this.weap_canvas.width,this.weap_canvas.height),e.textAlign="center",e.drawImage(this.weap_image,0,0),e.font="25px Balthazar",e.fillText(this.weap_data.type,150,112,215),e.font="15px Balthazar";var s="";this.weap_data.reload>0?(s+=h("Cards Gun String Reload",(this.weap_data.ammo/this.weap_data.reload).toString(),this.weap_data.reload.toString()),this.weap_data.tags.push(h("Weapon Tag Reload",this.weap_data.reload.toString()))):s+=h("Cards Gun String No Reload",this.weap_data.ammo),e.fillText(s,95,158,105),e.fillText(this.weap_data.ap.toString(),172,158,23),e.fillText(this.weap_data.jam,230,158,65),e.fillText(this.weap_data.hits[0].toString(),157,208,80),e.fillText(this.weap_data.hits[1].toString(),237,208,80),e.fillText(this.weap_data.hits[2].toString(),317,208,80),e.fillText(this.weap_data.hits[3].toString(),397,208,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[0]).toString(),157,231,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[1]).toString(),237,231,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[2]).toString(),317,231,80),e.fillText(Math.floor(1e-6+this.weap_data.damage[3]).toString(),397,231,80),e.textAlign="left",e.fillText(this.weap_data.tags[0],90,256,350);var i="";for(let t=1;t=0&&s.fillText(h("Cards Uses Radiator",this.eng_data.radiator+1),109,340,270),s.textAlign="right",s.font="30px Balthazar",s.fillStyle="#fff",s.strokeStyle="#fff",s.fillText("#"+t.toString(),37,67,35),e){case me.SINGLE:this.download(this.name+"_Engine_"+t.toString(),this.eng_canvas);break;case me.PUSHER:this.download(this.name+"_Engine_"+t.toString()+"_Pusher",this.eng_canvas);break;case me.PULLER:this.download(this.name+"_Engine_"+t.toString()+"_Puller",this.eng_canvas)}}SaveRadiator(t){t++;var e=this.rad_canvas.getContext("2d");e.clearRect(0,0,this.rad_canvas.width,this.rad_canvas.height),e.drawImage(this.rad_image,0,0),e.textAlign="center",e.font="25px Balthazar",e.fillStyle="#000",e.strokeStyle="#000",e.fillText(this.rad_data.mount_type,162,141,230),e.fillText(this.rad_data.coolant_type,162,217,230),e.textAlign="right",e.font="25px Balthazar",e.fillStyle="#fff",e.strokeStyle="#fff",e.fillText("#"+t.toString(),37,56,35),this.download(this.name+"_Radiator_"+t.toString(),this.rad_canvas)}SaveNPC(){var t=this.npc_canvas.getContext("2d");t.clearRect(0,0,this.npc_canvas.width,this.npc_canvas.height),t.drawImage(this.npc_image,0,0),t.font="20px Balthazar",t.textAlign="center",t.fillStyle="#000",t.strokeStyle="#000",t.fillText(this.name,100,100,145),t.fillText(""+this.lowest_overspeed,70,158,40),t.fillText(""+this.acft_data.full_speed,126,158,40);var e=this.acft_data.full_speed-this.acft_data.turn_bleed-Math.floor(1e-6+.1*this.acft_data.full_speed);t.fillText(""+e,187,158,40),t.fillText(""+this.acft_data.full_stall,245,158,40);var s,i=this.acft_data.toughness+this.acft_data.max_strain;if(t.fillText(""+i,70,236,40),t.fillText(""+this.acft_data.full_hand,123,236,40),this.all_weapons[0]){s=this.all_weapons[0],t.font="12px Avenir",t.fillText(s.abrv,232,71,91),t.font="20px Balthazar";var a=n.Join("/",[s.hits[0],s.hits[1],s.hits[2],s.hits[3]]),r=n.Join("/",[Math.floor(1e-6+s.damage[0]),Math.floor(1e-6+s.damage[1]),Math.floor(1e-6+s.damage[2]),Math.floor(1e-6+s.damage[3])]);t.fillText(a,320,71,80),t.fillText(r,401,71,80)}this.all_weapons[1]&&(s=this.all_weapons[1],t.font="12px Avenir",t.fillText(s.abrv,232,103,91),t.font="20px Balthazar",a=n.Join("/",[s.hits[0],s.hits[1],s.hits[2],s.hits[3]]),r=n.Join("/",[Math.floor(1e-6+s.damage[0]),Math.floor(1e-6+s.damage[1]),Math.floor(1e-6+s.damage[2]),Math.floor(1e-6+s.damage[3])]),t.fillText(a,320,103,80),t.fillText(r,401,103,80)),this.download(this.name+"_NPC",this.npc_canvas)}download(t,e){var s=document.createElement("a");if(s.download=t+".png",s.href=e.toDataURL(),document.createEvent){var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.dispatchEvent(i)}}}var ge=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function a(t,e){if(!i[t]){i[t]={};for(let e=0;e>>8,s[2*t+1]=i%256}return s},decompressFromUint8Array:function(e){if(null==e)return n.decompress(e);var s=new Array(e.length/2);for(let t=0,i=s.length;t>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=r[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++),r[h]=m++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(o,c)){if(c.charCodeAt(0)<256){for(i=0;i>=1}else{for(a=1,i=0;i>=1}0==--u&&(u=Math.pow(2,p),p++),delete o[c]}else for(a=r[c],i=0;i>=1;0==--u&&(u=Math.pow(2,p),p++)}for(a=2,i=0;i>=1;for(;;){if(g<<=1,_==e-1){d.push(s(g));break}_++}return d.join("")},decompress:function(t){return null==t?"":""==t?null:n._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,s,i){var a,n,r,o,l,h,c,u=[],m=4,p=4,d=3,g="",_=[],f={val:i(0),position:s,index:1};for(a=0;a<3;a+=1)u[a]=a;for(r=0,l=Math.pow(2,2),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;switch(r){case 0:for(r=0,l=Math.pow(2,8),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;c=t(r);break;case 1:for(r=0,l=Math.pow(2,16),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;c=t(r);break;case 2:return""}for(u[3]=c,n=c,_.push(c);;){if(f.index>e)return"";for(r=0,l=Math.pow(2,d),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;switch(c=r){case 0:for(r=0,l=Math.pow(2,8),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;u[p++]=t(r),c=p-1,m--;break;case 1:for(r=0,l=Math.pow(2,16),h=1;h!=l;)o=f.val&f.position,f.position>>=1,0==f.position&&(f.position=s,f.val=i(f.index++)),r|=(o>0?1:0)*h,h<<=1;u[p++]=t(r),c=p-1,m--;break;case 2:return _.join("")}if(0==m&&(m=Math.pow(2,d),d++),u[c])g=u[c];else{if(c!==p)return null;g=n+n.charAt(0)}_.push(g),u[p++]=n+g.charAt(0),n=g,0==--m&&(m=Math.pow(2,d),d++)}}};return n}();class _e extends kt{constructor(t,e){super(),this.acft=t,this.parts_JSON=e,this.era=new zt(this.acft.GetEra()),this.cockpits=new jt(t.GetCockpits()),this.passengers=new Yt(t.GetPassengers()),this.engines=new Kt(t.GetEngines()),this.propeller=new Zt(t.GetPropeller()),this.frames=new Xt(t.GetFrames()),this.wings=new $t(t.GetWings()),this.stabilizers=new te(t.GetStabilizers()),this.controlsurfaces=new ee(t.GetControlSurfaces()),this.reinforcements=new se(t.GetReinforcements()),this.load=new ie(t.GetFuel(),t.GetMunitions(),t.GetCargoAndPassengers()),this.gear=new ae(t.GetLandingGear()),this.accessories=new ne(t.GetAccessories()),this.optimization=new re(t.GetOptimization()),this.weapons=new Lt(t.GetWeapons()),this.used=new oe(t.GetUsed()),this.rotor=new le(t.GetRotor()),this.alter=new he(t.GetAlter()),this.altitude=new pe((()=>{this.UpdateDisplay()})),this.acft_type=document.getElementById("acft_type");let s=0;for(let t in N)if(isNaN(Number(t))&&(s+=1,2!=s)){let e=document.createElement("OPTION");e.text=h(t),this.acft_type.add(e)}this.acft_type.onchange=()=>{let t=this.acft_type.selectedIndex;t>=1&&(t+=1),this.acft.SetType(t)};const i=document.getElementById("tbl_stats");this.InitStats(i);const a=document.getElementById("tbl_derived");this.InitDerived(a),this.acft.SetDisplayCallback((()=>{this.UpdateDisplay()})),document.getElementById("acft_save").onclick=()=>{this.SaveJSON()};const n=document.getElementById("acft_load");n.multiple=!1,n.accept="application/JSON",n.onchange=t=>{this.LoadJSON(n)};const r=document.getElementById("acft_load_text");r.onchange=()=>{this.LoadText(r)};const o=document.getElementById("acft_load_text2");o.onchange=()=>{this.LoadText(o)},document.getElementById("acft_save_link").onclick=()=>{this.SaveLink()},this.cards=new de,document.getElementById("acft_save_dash").onclick=()=>{this.SaveDash()},document.getElementById("acft_interactive_dash").onclick=()=>{this.SaveInteractive()},document.getElementById("acft_save_npc").onclick=()=>{this.SaveNPC()},document.getElementById("acft_reset").onclick=()=>{this.acft.Reset(),this.derived.SetName(this.acft.name),this.acft.CalculateStats(),this.SetCollapse()},document.getElementById("acft_save_cat").onclick=()=>{this.CatalogStats()},document.getElementById("acft_save_cat_json").onclick=()=>{this.CatalogJSON()},this.SetCollapse()}UpdateCard(){this.acft.name=this.derived.GetName();const t=this.acft.GetStats(),e=this.acft.GetDerivedStats();this.cards.name=this.acft.name,this.cards.acft_data.armour=this.acft.GetAccessories().GetEffectiveCoverage(),this.cards.acft_data.crash=t.crashsafety,this.cards.acft_data.dropoff=e.Dropoff,this.cards.acft_data.empty_boost=e.BoostEmpty,this.cards.acft_data.empty_hand=e.HandlingEmpty,this.cards.acft_data.empty_climb=e.RateOfClimbEmpty,this.cards.acft_data.empty_stall=e.StallSpeedEmpty,this.cards.acft_data.empty_speed=Math.floor(1e-6+e.MaxSpeedEmpty),this.cards.acft_data.energy_loss=e.EnergyLoss,this.cards.acft_data.escape=this.acft.GetCockpits().GetEscapeList()[0],this.cards.acft_data.fuel=e.FuelUses,this.cards.acft_data.full_bomb_boost=e.BoostFullwBombs,this.cards.acft_data.full_bomb_hand=e.HandlingFullwBombs,this.cards.acft_data.full_bomb_climb=e.RateOfClimbwBombs,this.cards.acft_data.full_bomb_stall=e.StallSpeedFullwBombs,this.cards.acft_data.full_bomb_speed=e.MaxSpeedwBombs,this.cards.acft_data.full_boost=e.BoostFull,this.cards.acft_data.full_hand=e.HandlingFull,this.cards.acft_data.full_climb=e.RateOfClimbFull,this.cards.acft_data.full_stall=e.StallSpeedFull,this.cards.acft_data.full_speed=Math.floor(1e-6+e.MaxSpeedFull),this.cards.acft_data.half_bomb_boost=Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),this.cards.acft_data.half_bomb_hand=Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),this.cards.acft_data.half_bomb_climb=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),this.cards.acft_data.half_bomb_stall=Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),this.cards.acft_data.half_bomb_speed=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),this.cards.acft_data.half_boost=Math.floor((e.BoostFull+e.BoostEmpty)/2),this.cards.acft_data.half_hand=Math.floor((e.HandlingFull+e.HandlingEmpty)/2),this.cards.acft_data.half_climb=Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),this.cards.acft_data.half_stall=Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),this.cards.acft_data.half_speed=Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),this.cards.acft_data.max_strain=e.MaxStrain;const s=[],i=this.acft.GetMunitions().GetBombCount(),a=this.acft.GetMunitions().GetRocketCount();var n=this.acft.GetMunitions().GetInternalBombCount();if(i>0){const t=Math.min(i,n),e=Math.max(0,i-t);if(t>0&&s.push(h(" Bomb Mass Internally.",t)),e>0&&s.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.acft.GetMunitions().GetMaxBombSize());s.push(h("Largest Internal Bomb",e.toString()))}n-=t}if(a>0){const t=Math.min(a,n),e=Math.max(0,a-t);t>0&&s.push(h(" Rocket Mass Internally.",t)),e>0&&s.push(h(" Rocket Mass Externally.",e))}this.cards.acft_data.ordinance=s,this.cards.acft_data.stability=e.Stabiilty,this.cards.acft_data.stress=this.acft.GetCockpits().GetStressList()[0][0],this.cards.acft_data.toughness=e.Toughness,this.cards.acft_data.turn_bleed=e.TurnBleed,this.cards.acft_data.visibility=this.acft.GetCockpits().GetVisibilityList()[0],this.cards.acft_data.vital_parts=this.acft.VitalComponentList(),this.cards.acft_data.warnings=t.warnings}UpdateWeaponCard(t){const e=this.acft.GetWeapons().GetWeaponList(),s=this.acft.GetWeapons().GetDirectionList();var i=Wt(t,e);t.IsPlural()&&(i=t.GetWeaponCount().toString()+"x "+i);const a=t.GetDirection();var n="";n+="[";for(let t=0;t0&&s.starter&&this.cards.eng_data.notes.push(h("Starter"))}}else if(t.IsRotary()&&t.IsTractor()?this.cards.eng_data.notes.push(h("Turns Right")):t.IsRotary()&&t.IsPusher()&&this.cards.eng_data.notes.push(h("Turns Left")),""!=t.GetSelectedList()){const s=T().get(t.GetSelectedList()).get_name(e.name);this.cards.eng_data.min_IAF=s.min_IdealAlt,s.upgrades[1]?this.cards.eng_data.notes.push(h("War Emergency Power")):s.compressor_count>0&&1==s.compressor_type&&this.cards.eng_data.notes.push(h("War Emergency Power from altitudes 0-9"))}}UpdateRadiatorCard(t){this.cards.rad_data.mount_type=h(t.GetMountList()[t.GetMountIndex()].name),this.cards.rad_data.coolant_type=h(t.GetCoolantList()[t.GetCoolantIndex()].name)}LoadJSON(t){if(0==t.files.length)return;const e=t.files[0],s=new FileReader;s.onloadend=()=>{try{var t=JSON.parse(s.result);new Ut(this.parts_JSON,!1).fromJSON(t)&&(t=JSON.parse(s.result),console.log(t),this.acft.fromJSON(t),this.derived.SetName(this.acft.name),this.acft.CalculateStats(),this.SetCollapse())}catch(t){console.error(t,t.stack)}},s.readAsText(e),t.value=""}CatalogStats(){this.acft.name=this.derived.GetName();const t=this.acft.GetStats(),e=this.acft.GetDerivedStats();var s="\\FCPlane[Nickname=\\FrameDefault{Not Set}, %Box Text = {}, Image = {},\n";s+=n.Format("Name={{0}}, Price={1}, Used={2}, Upkeep={3},\n",this.acft.name,t.cost,Math.floor(1e-6+t.cost/2),t.upkeep),s+="Stats = {\n",t.bomb_mass>0&&(s+=n.Format("Full Load & {0} & {1} & {2} & {3} & {4} \\\\\n",e.BoostFullwBombs,e.HandlingFullwBombs,e.RateOfClimbwBombs,e.StallSpeedFullwBombs,e.MaxSpeedwBombs),s+="\\nicefrac{1}{2}"+n.Format(", Bombs & {0} & {1} & {2} & {3} & {4}\\\\\n",Math.floor(1e-6+(e.BoostEmpty+e.BoostFullwBombs)/2),Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFullwBombs)/2),Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFullwBombs)/2),Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2))),s+=n.Format("Full Fuel & {0} & {1} & {2} & {3} & {4}\\\\\n",e.BoostFull,e.HandlingFull,e.RateOfClimbFull,e.StallSpeedFull,e.MaxSpeedFull),s+=n.Format("Half Fuel & {0} & {1} & {2} & {3} & {4}\\\\\n",Math.floor(1e-6+(e.BoostEmpty+e.BoostFull)/2),Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFull)/2),Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFull)/2),Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2)),s+=n.Format("Empty & {0} & {1} & {2} & {3} & {4}\\\\\n","-",e.HandlingEmpty,"-",e.StallSpeedEmpty,0),s+="},\n";var i=this.acft.VitalComponentList(),a=new Map;for(let t of i)t=t.replace(/Weapon Set #.*/g,"Guns").trim(),t=t.replace(/#.*/g,"").trim(),a.has(t)?a.set(t,a.get(t)+1):a.set(t,1);i=[];for(let t of a.keys())1==a.get(t)?i.push(t):i.push(t+" x"+a.get(t).toString());s+="Vital Parts = {"+n.Join(", ",i)+"},\n";var r=[];for(let t=0;t0){const t=Math.min(c,m),e=Math.max(0,c-t);t>0&&(s+=h(" Bomb Mass Internally.",t)),e>0&&(s+=h(" Bomb Mass Externally.",e)),t>0&&(s+=h("Largest Internal Bomb",Math.min(t,this.acft.GetMunitions().GetMaxBombSize()).toString())),m-=t,s+="\\\\\n"}if(u>0){const t=Math.min(u,m),e=Math.max(0,u-t);t>0&&(s+=h(" Rocket Mass Internally.",t)),e>0&&(s+=h(" Rocket Mass Externally.",e)),s+="\\\\\n"}const p=this.acft.GetWeapons().GetWeaponSets();for(let t=0;t0&&(s.push({Name:"Full Load",Boost:e.BoostFullwBombs,Handling:e.HandlingFullwBombs,Climb:e.RateOfClimbwBombs,Stall:e.StallSpeedFullwBombs,Speed:e.MaxSpeedwBombs}),s.push({Name:"1/2, Bombs",Boost:Math.floor(1e-6+(e.BoostEmpty+e.BoostFullwBombs)/2),Handling:Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFullwBombs)/2),Climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),Stall:Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFullwBombs)/2),Speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2)})),s.push({Name:"Full Fuel",Boost:e.BoostFull,Handling:e.HandlingFull,Climb:e.RateOfClimbFull,Stall:e.StallSpeedFull,Speed:e.MaxSpeedFull}),s.push({Name:"Half Fuel",Boost:Math.floor(1e-6+(e.BoostEmpty+e.BoostFull)/2),Handling:Math.floor(1e-6+(e.HandlingEmpty+e.HandlingFull)/2),Climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),Stall:Math.floor(1e-6+(e.StallSpeedEmpty+e.StallSpeedFull)/2),Speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2)}),s.push({Name:"Empty",Boost:"-",Handling:e.HandlingEmpty,Climb:"-",Stall:e.StallSpeedEmpty,Speed:0});let i=this.acft.VitalComponentList(),a=new Map;for(let t of i)t=t.replace(/Weapon Set #.*/g,"Guns").trim(),t=t.replace(/#.*/g,"").trim(),a.has(t)?a.set(t,a.get(t)+1):a.set(t,1);i=[];for(let t of a.keys())1==a.get(t)?i.push(t):i.push(t+" x"+a.get(t).toString());let r=[];for(let t=0;t0){const t=Math.min(d,f),e=Math.max(0,d-t);t>0&&(u+=h(" Bomb Mass Internally.",t)),e>0&&(u+=h(" Bomb Mass Externally.",e)),t>0&&(u+=h("Largest Internal Bomb",Math.min(t,this.acft.GetMunitions().GetMaxBombSize()).toString())),f-=t,u+="\n"}if(_>0){const t=Math.min(_,f),e=Math.max(0,_-t);t>0&&(u+=h(" Rocket Mass Internally.",t)),e>0&&(u+=h(" Rocket Mass Externally.",e)),u+="\n"}const A=this.acft.GetWeapons().GetWeaponSets();for(let t=0;t10;)s.pop(),i=!0;for(i&&(s.pop(),s.push("And More. See Plane Builder for full list."));s.length<10;)s.push("");const a=this.acft.GetAccessories().GetEffectiveCoverage();var n="";for(let t=0;t0&&(n+=""!=n?", ":h("Armour")+" ",n+=e.toString()+"/+"+(11-a[t]).toString())}const r=[],o=this.acft.GetMunitions().GetBombCount(),l=this.acft.GetMunitions().GetRocketCount();var c=this.acft.GetMunitions().GetInternalBombCount();if((o>0||l>0)&&r.push("Current load here."),o>0){const t=Math.min(o,c),e=Math.max(0,o-t);if(t>0&&r.push(h(" Bomb Mass Internally.",t)),e>0&&r.push(h(" Bomb Mass Externally.",e)),t>0){const e=Math.min(t,this.acft.GetMunitions().GetMaxBombSize());r.push(h("Largest Internal Bomb",e.toString()))}c-=t}if(l>0){const t=Math.min(l,c),e=Math.max(0,l-t);t>0&&r.push(h(" Rocket Mass Internally.",t)),e>0&&r.push(h(" Rocket Mass Externally.",e))}for(;r.length<5;)r.push("");var u="";for(let e of t.warnings)u+=e.source+": "+e.warning+"\n";const m={altitude:0,airspeed:0,fuel:e.FuelUses,dropoff:e.Dropoff,visibility:this.acft.GetCockpits().GetCockpit(0).GetVisibility(),energy_loss:e.EnergyLoss,turn_bleed:e.TurnBleed,stability:e.Stabiilty,stress:this.acft.GetCockpits().GetCockpit(0).GetFlightStress()[0],plane_escape:this.acft.GetCockpits().GetCockpit(0).GetEscape(),crash:this.acft.GetCockpits().GetCockpit(0).GetCrash(),max_toughness:e.Toughness,current_toughness:e.Toughness,max_strain:e.MaxStrain,current_strain:e.MaxStrain,g_force:0,kills:0,full_load_boost:e.BoostFullwBombs,full_load_handling:e.HandlingFullwBombs,full_load_climb:e.RateOfClimbwBombs,full_load_stall:e.StallSpeedFullwBombs,full_load_speed:e.MaxSpeedwBombs,half_fuel_bombs_boost:Math.floor((e.BoostFullwBombs+e.BoostEmpty)/2),half_fuel_bombs_handling:Math.floor((e.HandlingFullwBombs+e.HandlingEmpty)/2),half_fuel_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbwBombs)/2),half_fuel_bombs_stall:Math.floor((e.StallSpeedFullwBombs+e.StallSpeedEmpty)/2),half_fuel_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedwBombs)/2),full_fuel_no_bombs_boost:e.BoostFull,full_fuel_no_bombs_handling:e.HandlingFull,full_fuel_no_bombs_climb:e.RateOfClimbFull,full_fuel_no_bombs_stall:e.StallSpeedFull,full_fuel_no_bombs_speed:Math.floor(1e-6+e.MaxSpeedFull),half_fuel_no_bombs_boost:Math.floor((e.BoostFull+e.BoostEmpty)/2),half_fuel_no_bombs_handling:Math.floor((e.HandlingFull+e.HandlingEmpty)/2),half_fuel_no_bombs_climb:Math.floor(1e-6+(e.RateOfClimbEmpty+e.RateOfClimbFull)/2),half_fuel_no_bombs_stall:Math.floor((e.StallSpeedFull+e.StallSpeedEmpty)/2),half_fuel_no_bombs_speed:Math.floor(1e-6+(e.MaxSpeedEmpty+e.MaxSpeedFull)/2),empty_boost:0,empty_handling:e.HandlingEmpty,empty_climb:0,empty_stall:e.StallSpeedEmpty,empty_speed:0,vital_part_1:s[0],vital_part_2:s[1],vital_part_3:s[2],vital_part_4:s[3],vital_part_5:s[4],vital_part_6:s[5],vital_part_7:s[6],vital_part_8:s[7],vital_part_9:s[8],vital_part_10:s[9],armor:n,max_bomb_load:r[0],ordinance_1:r[1],ordinance_2:r[2],ordinance_3:r[3],ordinance_4:r[4],notes:u,full_load_selected:!0,half_fuel_bombs_selected:!1,full_fuel_no_bombs_selected:!1,half_fuel_no_bombs_selected:!1,empty_selected:!1,engines:this.InteractiveEngines(),weapons:this.InteractiveWeapons()};return JSON.stringify(m)}InteractiveEngines(){const t=[];for(let e=0;e0&&t.starter&&r.push(h("Starter"))}else{s.IsRotary()&&s.IsTractor()?r.push(h("Turns Right")):s.IsRotary()&&s.IsPusher()&&r.push(h("Turns Left"));const t=T().get(s.GetSelectedList()).get_name(a.name);t.upgrades[1]?r.push(h("War Emergency Power")):t.compressor_count>0&&1==t.compressor_type&&r.push(h("War Emergency Power from altitudes 0-9"))}if(i.notes=n.Join(", ",r),s.GetUsePushPull()){const e=i.reliability.split("/");i.reliability=e[0].toString(),t.push(JSON.stringify(i)),i.reliability=e[0].toString(),t.push(JSON.stringify(i))}else t.push(JSON.stringify(i))}return t}InteractiveWeapons(){const t=[];for(let s of this.acft.GetWeapons().GetWeaponSets()){const i=this.acft.GetWeapons().GetWeaponList(),a=s.GetHits(),r=[];"PR"==i[s.GetWeaponSelected()].abrv?(r.push(5),r.push(5),r.push(5),r.push(5)):(r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[0])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[1])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[2])),r.push(Math.floor(1e-6+i[s.GetWeaponSelected()].damage*a[3])));const o=s.GetFinalWeapon(),l=[];let c={type:Wt(s,i),ammo:s.GetShots(),ap:o.ap,jam:s.GetJam(),knife_hits:a[0],close_hits:a[1],long_hits:a[2],extreme_hits:a[3],knife_damage:r[0],close_damage:r[1],long_damage:r[2],extreme_damage:r[3],tags:""};const u=this.acft.GetWeapons().GetDirectionList();s.IsPlural()&&(c.type=s.GetWeaponCount().toString()+"x "+c.type);const m=s.GetDirection();var e="";e+="[";for(let t=0;t=1&&(s-=1),this.acft_type.selectedIndex=s,this.era.UpdateDisplay(),this.cockpits.UpdateDisplay(),this.passengers.UpdateDisplay(),this.engines.UpdateDisplay(),this.propeller.UpdateDisplay(),this.frames.UpdateDisplay(),this.wings.UpdateDisplay(),this.stabilizers.UpdateDisplay(),this.controlsurfaces.UpdateDisplay(),this.reinforcements.UpdateDisplay(),this.reinforcements.UpdateMaxStrain(e.MaxStrain),this.load.UpdateDisplay(),this.load.UpdateFuelUses(t.fuel/t.fuelconsumption),this.gear.UpdateDisplay(),this.accessories.UpdateDisplay(),this.optimization.UpdateDisplay(),this.weapons.UpdateDisplay(),this.used.UpdateDisplay(),this.rotor.UpdateDisplay(),this.alter.UpdateDisplay(),this.UpdateStats(t),this.UpdateDerived(t,e)}}function fe(){Ae(),Be().hash&&(De.forEach(be),xe?.observe(document,ve),Ce(),Ie=setTimeout(Ae,Ne))}function Ae(){clearTimeout(Ie),cancelAnimationFrame(Te),xe?.disconnect(),De.forEach(Se)}function be(t){document.addEventListener(t,Ae)}function Se(t){document.removeEventListener(t,Ae)}function ye(t){if(t.defaultPrevented)return;const e=function(t){let e=t;for(;e&&"A"!==e.nodeName;)e=e.parentElement;return e}(t.target);e&&e.hash&&e.pathname===Be().pathname&&Pe(fe)}function we(){Pe(Ce)}function Ce(){const t=Be().hash;if(!t)return;const e=decodeURIComponent(t.substring(1)),s=Ge.call(null,e);s&&Fe.call(null,s)}function Be(){return location}function Ee(t){return document.getElementById(t)}function Me(t){t.scrollIntoView()}function Pe(t){cancelAnimationFrame(Te),Te=requestAnimationFrame(t)}let Ge,Fe,Re,xe,Ie,Te;const ve={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ne=1e4,De=["selectstart","touchend","wheel"],Oe=JSON.parse('{"version":"12.7","era":{"options":[{"name":"Pioneer","liftbleed":30,"maxbomb":0.166666666666,"cost":-2,"cant_lift":4,"pitchstab":0},{"name":"WWI","liftbleed":25,"maxbomb":0.2,"cant_lift":3,"pitchstab":0,"cost":0},{"name":"Roaring 20s","liftbleed":22,"maxbomb":0.25,"cost":5,"cant_lift":1,"pitchstab":0},{"name":"Coming Storm","liftbleed":22,"maxbomb":0.333333333333,"cost":10,"cant_lift":0,"pitchstab":2},{"name":"WWII","liftbleed":20,"maxbomb":0.333333333333,"cost":15,"cant_lift":0,"pitchstab":2},{"name":"Last Hurrah","liftbleed":18,"maxbomb":0.5,"cost":20,"cant_lift":0,"pitchstab":2}]},"cockpit":{"options":[{"name":"Open","era":"Pioneer","mass":1,"drag":3,"control":0,"escape":2,"cost":0,"flightstress":0,"visibility":1,"exposed":true,"warning":""},{"name":"Windscreen","era":"Pioneer","mass":2,"drag":1,"control":0,"escape":2,"cost":1,"flightstress":0,"visibility":1,"exposed":true,"warning":""},{"name":"Sealed","era":"Pioneer","mass":2,"drag":0,"control":0,"escape":-3,"cost":1,"flightstress":-1,"visibility":-99,"warning":"Sealed Warning","exposed":false},{"name":"Narrow Canopy","era":"WWI","mass":3,"drag":0,"control":0,"escape":0,"cost":3,"flightstress":-1,"visibility":-1,"exposed":false,"warning":""},{"name":"Bubble Canopy","era":"WWII","mass":3,"drag":-3,"control":0,"escape":0,"cost":8,"flightstress":-1,"visibility":0,"exposed":false,"warning":""}],"upgrades":[{"name":"Co-Pilot Controls","era":"Pioneer","mass":0,"drag":0,"control":0,"escape":0,"cost":1,"flightstress":-2,"visibility":0,"warning":"","charge":0},{"name":"Escape Hatch","era":"Pioneer","mass":1,"drag":0,"control":0,"escape":3,"cost":2,"flightstress":0,"visibility":0,"warning":"","charge":0},{"name":"Ejection Seat","era":"Last Hurrah","mass":2,"drag":0,"control":0,"escape":5,"cost":4,"flightstress":0,"visibility":0,"warning":"","charge":0},{"name":"Connectivity","era":"Pioneer","mass":1,"drag":0,"control":0,"escape":0,"cost":0,"flightstress":0,"visibility":0,"warning":"Connectivity Warning","charge":0},{"name":"Oxygen Mask","era":"WWI","warning":"Oxygen Mask Warning","mass":0,"drag":0,"control":0,"escape":0,"charge":-1,"cost":2,"flightstress":0,"visibility":0},{"name":"Isolated","era":"Pioneer","mass":1,"drag":5,"control":0,"escape":-2,"cost":1,"flightstress":1,"visibility":2,"warning":"Isolated Warning","charge":0}],"safety":[{"name":"Padding","era":"Pioneer","cost":1,"warning":"Injury Reduction Warning","charge":0,"escape":0,"visibility":0,"mass":0},{"name":"Harness","era":"Pioneer","escape":-1,"cost":1,"warning":"Injury Reduction Warning","charge":0,"visibility":0,"mass":0},{"name":"Fast Release System","era":"Coming Storm","escape":2,"cost":1,"warning":"","charge":0,"visibility":0,"mass":0},{"name":"Roll Bar","era":"WWI","mass":2,"warning":"Injury Reduction Warning","charge":0,"escape":0,"visibility":0,"cost":0},{"name":"Flare Slot","era":"Roaring 20s","cost":1,"warning":"Flare Slot Warning","charge":0,"escape":0,"visibility":0,"mass":0},{"name":"Basic Fan","era":"Pioneer","charge":1e-9,"visibility":-1,"warning":"Basic Fan Warning","escape":0,"mass":0,"cost":0}],"gunsights":[{"name":"X1 Collimated Gunsight","era":"WWI","visibility":-1,"attack":1,"cost":2,"warning":"X1 Collimated Gunsight Warning","charge":0},{"name":"Telescopic Gunsight","era":"WWI","visibility":-1,"attack":0,"cost":3,"warning":"Telescopic Gunsight Warning","charge":0},{"name":"Illuminated Reflex Sight","era":"WWI","visibility":-1,"attack":2,"charge":1e-9,"cost":6,"warning":"Illuminated Reflex Sight Warning"},{"name":"Gyro Gunsight","era":"WWII","visibility":-1,"attack":2,"charge":1e-9,"cost":12,"warning":"Gyro Gunsight Warning"}]},"passengers":{},"engines":{"mounts":[{"name":"Tractor","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":0,"visibility":0,"liftbleed":0,"strainfactor":0,"dragfactor":0,"location":"fuselage","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Center-Mounted Tractor","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":-2,"visibility":1,"liftbleed":0,"strainfactor":0,"dragfactor":0,"location":"fuselage","reqED":true,"powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqTail":false,"escape":0},{"name":"Rear-Mounted Pusher","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":-4,"visibility":2,"liftbleed":0,"strainfactor":0,"dragfactor":0,"escape":-2,"location":"fuselage","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqTail":false,"reqED":false},{"name":"Center-Mounted Pusher","era":"Pioneer","drag":0,"reqsections":1,"pitchstab":-2,"visibility":2,"liftbleed":0,"strainfactor":0,"dragfactor":0,"escape":-2,"location":"fuselage","reqTail":true,"powerfactor":1,"helicopter":false,"pushpull":false,"turbine":false,"reqED":false},{"name":"Pod","era":"Pioneer","drag":5,"reqsections":1,"pitchstab":0,"visibility":-2,"liftbleed":0,"strainfactor":0,"dragfactor":0,"location":"pod","powerfactor":0.9,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Nacelle (Inside)","era":"Pioneer","drag":0,"reqsections":0,"pitchstab":0,"visibility":0,"liftbleed":1,"strainfactor":0.5,"dragfactor":0,"location":"wing","powerfactor":0.8,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Nacelle (Offset)","era":"Pioneer","drag":0,"reqsections":0,"pitchstab":0,"visibility":0,"liftbleed":0,"strainfactor":0,"dragfactor":1,"location":"wing","powerfactor":0.8,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Channel Tractor","era":"Pioneer","drag":0,"reqsections":0,"pitchstab":0,"visibility":0,"liftbleed":-1,"strainfactor":1,"dragfactor":0,"location":"wing","powerfactor":0.9,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"escape":0,"reqED":false},{"name":"Fuselage Push-Pull","era":"Pioneer","reqsections":2,"pitchstab":-2,"escape":-2,"strainfactor":0,"dragfactor":0,"location":"fuselage","powerfactor":0.9,"helicopter":false,"pushpull":true,"turbine":false,"reqTail":false,"liftbleed":0,"visibility":0,"drag":0,"reqED":false},{"name":"Front Intake","era":"Pioneer","strainfactor":0,"dragfactor":0,"location":"fuselage","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":true,"reqTail":false,"liftbleed":0,"escape":0,"visibility":0,"reqsections":0,"drag":0,"pitchstab":0,"reqED":false},{"name":"Wing Pod","era":"Pioneer","liftbleed":1,"strainfactor":0.5,"dragfactor":0,"location":"wing","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":true,"reqTail":false,"escape":0,"visibility":0,"reqsections":0,"drag":0,"pitchstab":0,"reqED":false},{"name":"Underwing Pod","era":"Pioneer","drag":3,"visibility":-1,"strainfactor":0,"dragfactor":0,"location":"wing","powerfactor":1,"helicopter":false,"pushpull":false,"turbine":true,"reqTail":false,"liftbleed":0,"escape":0,"reqsections":0,"pitchstab":0,"reqED":false}],"radiator-type":[{"name":"Panel","era":"Pioneer","drag":0,"mass":0,"cost":0,"cooling":0,"dragpercool":0.5,"warning":""},{"name":"Box","era":"Pioneer","drag":2,"mass":-1,"cost":0,"cooling":0,"dragpercool":0.5,"warning":""},{"name":"Intake","era":"Roaring 20s","drag":0,"mass":0,"cost":3,"cooling":2,"dragpercool":0.5,"warning":""},{"name":"Evaporation","era":"Coming Storm","warning":"Evaporation Warning","drag":0,"mass":0,"cost":0,"cooling":0,"dragpercool":0}],"radiator-mount":[{"name":"Low","era":"Pioneer","warning":"Low Warning","reliability":1,"drag":0,"latstab":0},{"name":"Inline","era":"Pioneer","reliability":0,"drag":0,"latstab":0,"warning":""},{"name":"High","era":"Pioneer","warning":"High Warning","reliability":0,"drag":1,"latstab":0},{"name":"High Offset","era":"WWI","warning":"High Offset Warning","reliability":0,"drag":1,"latstab":-1}],"radiator-coolant":[{"name":"Water","era":"Pioneer","cost":0,"harden":false,"reliability":0,"flammable":false,"warning":""},{"name":"Salt Water","era":"Pioneer","cost":1,"harden":true,"reliability":1,"flammable":false,"warning":""},{"name":"Mineral Oil","era":"Pioneer","warning":"Mineral Oil Warning","cost":1,"harden":true,"reliability":0,"flammable":true},{"name":"Castor Oil","era":"Pioneer","warning":"Castor Oil Warning","cost":0,"harden":false,"reliability":0,"flammable":true},{"name":"Glycol","era":"Roaring 20s","reliability":2,"harden":false,"cost":2,"flammable":false,"warning":""},{"name":"Freon","era":"Coming Storm","warning":"Freon Warning","reliability":4,"harden":false,"cost":3,"flammable":false},{"name":"Ammonia","era":"Pioneer","warning":"Ammonia Warning","reliability":4,"harden":false,"cost":2,"flammable":false}],"cowling":[{"name":"No Cowling","era":"Pioneer","ed":1,"mpd":0,"air":true,"liquid":true,"rotary":true,"reliability":0,"mass":0,"cost":0},{"name":"Basic Cowl","era":"Pioneer","mass":1,"cost":1,"ed":0.8,"mpd":0,"air":true,"liquid":false,"rotary":false,"reliability":0},{"name":"Rotary Basic Cowl","era":"Pioneer","mass":1,"cost":1,"ed":0.4,"mpd":0,"air":false,"liquid":false,"rotary":true,"reliability":0},{"name":"Closed Cowl","era":"WWI","mass":1,"cost":1,"reliability":-1,"ed":0.3,"mpd":0,"air":false,"liquid":false,"rotary":true},{"name":"Adjustable Slat Cowl","era":"Coming Storm","mass":2,"reliability":2,"cost":2,"ed":0.5,"mpd":0,"air":true,"liquid":false,"rotary":true},{"name":"Foil Cowl","era":"Roaring 20s","mass":2,"reliability":3,"cost":3,"ed":0.4,"mpd":0,"air":true,"liquid":false,"rotary":true},{"name":"Sealed Cowl","era":"Pioneer","cost":1,"ed":0.5,"mpd":0.333333333333,"air":false,"liquid":true,"rotary":false,"reliability":0,"mass":0}]},"propellers":{"props":[{"name":"High Power","era":"Pioneer","pitchspeed":0.8,"pitchboost":0.9,"cost":0,"energy":1.5,"turn":8},{"name":"Power","era":"Pioneer","pitchspeed":0.9,"pitchboost":0.8,"cost":0,"energy":2,"turn":7},{"name":"Default","era":"Pioneer","pitchspeed":1,"pitchboost":0.6,"cost":0,"energy":3,"turn":6},{"name":"Speed","era":"Pioneer","pitchspeed":1.1,"pitchboost":0.4,"cost":0,"energy":4,"turn":5},{"name":"High Speed","era":"Pioneer","pitchspeed":1.2,"pitchboost":0.3,"cost":0,"energy":4.5,"turn":4}],"upgrades":[{"name":"None","era":"Pioneer","energy":0,"turn":0,"warning":"","pitchboost":0,"mass":0,"pitchspeed":0,"cost":0},{"name":"Manually Adjustable Pitch","era":"Pioneer","energy":0,"turn":0,"cost":2,"warning":"MVP_Warning","pitchboost":0,"mass":0,"pitchspeed":0},{"name":"Automatic Pitch","era":"Roaring 20s","pitchspeed":0.1,"pitchboost":0.1,"energy":0.5,"turn":1,"mass":1,"cost":8,"warning":""}]},"frames":{"frames":[{"name":"Wooden Spars","era":"Pioneer","basestructure":15,"basecost":0,"mass":1,"structure":2,"cost":0,"geodesic":false,"warning":""},{"name":"Steel Spars","era":"Pioneer","basestructure":25,"basecost":1,"mass":1,"structure":5,"cost":1,"geodesic":false,"warning":""},{"name":"Aluminum Spars","era":"WWI","basestructure":20,"basecost":2,"mass":0.5,"structure":4,"cost":2,"geodesic":false,"warning":""},{"name":"Wooden Ribs","era":"WWI","basestructure":30,"basecost":1,"mass":2,"structure":5,"cost":0.5,"geodesic":true,"warning":""},{"name":"Steel Ribs","era":"Roaring 20s","basestructure":60,"basecost":2,"mass":3,"structure":12,"cost":2,"geodesic":true,"warning":""},{"name":"Aluminum Ribs","era":"Roaring 20s","basestructure":50,"basecost":3,"mass":2,"structure":8,"cost":3,"geodesic":true,"warning":""},{"name":"Titanium","era":"Last Hurrah","basestructure":0,"basecost":0,"mass":1,"structure":10,"cost":8,"geodesic":false,"warning":""},{"name":"Living Grove","era":"Pioneer","basestructure":30,"basecost":8,"mass":2,"structure":4,"cost":0,"geodesic":true,"warning":"Living Grove Warning"}],"skin":[{"name":"Naked","era":"Pioneer","dragfactor":1,"massfactor":0.6,"visibility":1,"flammable":false,"monocoque":false,"monocoque_structure":0,"toughness":0,"cost":0},{"name":"Cloth Canvas","era":"Pioneer","dragfactor":0.5,"massfactor":1,"flammable":false,"monocoque":false,"monocoque_structure":0,"toughness":0,"visibility":0,"cost":0},{"name":"Transparent Celluloid","era":"Pioneer","dragfactor":0.6,"massfactor":1,"visibility":1,"cost":1,"flammable":true,"monocoque":false,"monocoque_structure":0,"toughness":0},{"name":"Treated Paper","era":"Pioneer","dragfactor":0.5,"massfactor":0.75,"flammable":true,"monocoque":false,"monocoque_structure":0,"toughness":0,"visibility":0,"cost":0},{"name":"Tense Silk","era":"Pioneer","dragfactor":0.5,"massfactor":1,"toughness":1,"cost":1,"flammable":false,"monocoque":false,"monocoque_structure":0,"visibility":0},{"name":"Dragon Skin","era":"Himmilgard","dragfactor":0.5,"massfactor":1,"cost":4,"flammable":false,"monocoque":false,"monocoque_structure":0,"toughness":0,"visibility":0},{"name":"Molded Plywood","era":"Pioneer","dragfactor":0.4,"massfactor":1,"cost":0.5,"flammable":false,"monocoque":true,"monocoque_structure":3,"toughness":0,"visibility":0},{"name":"Clinker Build","era":"Pioneer","dragfactor":0.5,"massfactor":1,"cost":0,"flammable":false,"monocoque":true,"monocoque_structure":-3,"toughness":0,"visibility":0},{"name":"Glass Reinforced Plastic","era":"Last Hurrah","dragfactor":0.3,"massfactor":1,"cost":1,"flammable":false,"monocoque":true,"monocoque_structure":0,"toughness":0,"visibility":0},{"name":"Corrugated Duralumin","era":"WWI","dragfactor":0.5,"massfactor":1,"toughness":3,"cost":1,"flammable":false,"monocoque":true,"monocoque_structure":10,"visibility":0},{"name":"Steel Sheet","era":"Roaring 20s","dragfactor":0.35,"massfactor":1,"cost":1.5,"toughness":3,"flammable":false,"monocoque":true,"monocoque_structure":8,"visibility":0},{"name":"Aluminum Sheet","era":"Roaring 20s","dragfactor":0.35,"massfactor":0.75,"cost":2,"toughness":2,"flammable":false,"monocoque":true,"monocoque_structure":6,"visibility":0}],"tail":[{"name":"Tailless","era":"Pioneer","reqsections":0,"pitchstab":-4,"visibility":3},{"name":"Stubby","era":"Pioneer","reqsections":1,"pitchstab":-3,"visibility":0},{"name":"Standard","era":"Pioneer","reqsections":2,"pitchstab":0,"visibility":0},{"name":"Long","era":"Pioneer","reqsections":3,"pitchstab":3,"visibility":0}]},"wings":{"decks":[{"name":"Wing Deck Parasol","era":"Pioneer","pitchstab":3,"maxstrain":-10,"liftbleed":-2,"visibility":-1,"limited":false,"crashsafety":0},{"name":"Wing Deck Shoulder","era":"Pioneer","pitchstab":2,"liftbleed":-1,"visibility":-1,"limited":true,"crashsafety":0,"maxstrain":0},{"name":"Wing Deck Mid","era":"Pioneer","limited":true,"liftbleed":0,"visibility":0,"pitchstab":0,"crashsafety":0,"maxstrain":0},{"name":"Wing Deck Low","era":"Pioneer","pitchstab":-2,"crashsafety":-1,"liftbleed":-1,"limited":true,"visibility":0,"maxstrain":0},{"name":"Wing Deck Gear","era":"Pioneer","pitchstab":-3,"maxstrain":-10,"crashsafety":-1,"liftbleed":-2,"limited":false,"visibility":0}],"largest":[{"name":"Wing Deck Parasol","era":"Pioneer","latstab":1,"control":-1,"dragfactor":1},{"name":"Wing Deck Shoulder","era":"Pioneer","control":-1,"dragfactor":1,"latstab":0},{"name":"Wing Deck Mid","era":"Pioneer","dragfactor":0.9,"latstab":0,"control":0},{"name":"Wing Deck Low","era":"Pioneer","latstab":-1,"control":2,"dragfactor":1},{"name":"Wing Deck Gear","era":"Pioneer","latstab":-1,"control":3,"dragfactor":1}],"surface":[{"name":"Cloth Canvas","era":"Pioneer","flammable":false,"strainfactor":1,"dragfactor":1,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0,"cost":0},{"name":"Treated Paper","era":"Pioneer","flammable":true,"strainfactor":1,"dragfactor":1,"mass":-0.25,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0,"cost":0},{"name":"Tense Silk Layers","era":"Pioneer","flammable":false,"strainfactor":0.9,"dragfactor":1,"cost":0.2,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0},{"name":"Plywood","era":"Pioneer","flammable":false,"strainfactor":0.9,"dragfactor":1,"mass":0.2,"cost":0.1,"metal":false,"transparent":false,"charge":0,"toughness":0,"control":0},{"name":"Aluminum Sheet","era":"Roaring 20s","flammable":false,"strainfactor":1,"dragfactor":0.8,"cost":0.3,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0},{"name":"Corrugated Duralumin","era":"Pioneer","flammable":false,"strainfactor":0.6,"dragfactor":1,"mass":0.25,"cost":0.2,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0},{"name":"Thin Sheet Steel","era":"Roaring 20s","flammable":false,"strainfactor":0.6,"dragfactor":0.9,"mass":0.2,"cost":0.3,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0},{"name":"Grand Eagle Feather","era":"Himmilgard","flammable":false,"strainfactor":1,"dragfactor":1,"control":0.2,"cost":0.6,"metal":false,"transparent":false,"charge":0,"toughness":0,"mass":0},{"name":"Solar Fiber","era":"Himmilgard","flammable":false,"strainfactor":1,"dragfactor":1,"charge":0.2,"cost":0.4,"metal":false,"transparent":false,"toughness":0,"control":0,"mass":0},{"name":"Dragon Skin","era":"Himmilgard","flammable":false,"strainfactor":0.4,"dragfactor":1,"cost":0.8,"metal":true,"transparent":false,"charge":0,"toughness":0,"control":0,"mass":0},{"name":"Transparent Celluloid","era":"Pioneer","flammable":true,"strainfactor":1,"dragfactor":1,"toughness":-0.1,"cost":0.1,"metal":false,"transparent":true,"charge":0,"control":0,"mass":0}],"stagger":[{"name":"Monoplane","era":"Pioneer","inline":false,"wing_count":1,"hstab":true,"pitchstab":0,"liftbleed":0},{"name":"Tandem","era":"Pioneer","inline":true,"wing_count":20,"hstab":false,"pitchstab":4,"liftbleed":0},{"name":"Extreme Positive","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":2,"liftbleed":-2},{"name":"Positive","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":1,"liftbleed":-1},{"name":"Unstaggered","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":0,"liftbleed":0},{"name":"Negative","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":-1,"liftbleed":-1},{"name":"Extreme Negative","era":"Pioneer","inline":false,"wing_count":20,"hstab":true,"pitchstab":-2,"liftbleed":-2}]},"stabilizers":{"hstab":[{"name":"Tailplane","era":"Pioneer","dragfactor":1,"is_canard":false,"increment":1,"is_vtail":false,"is_tail":true,"warning":"","liftbleed":0,"latstab":0,"pitchstab":0,"cost":0},{"name":"The Wings","era":"Pioneer","dragfactor":0,"is_canard":false,"increment":0,"is_vtail":false,"is_tail":false,"warning":"","liftbleed":0,"latstab":0,"pitchstab":0,"cost":0},{"name":"Canards","era":"Pioneer","pitchstab":-3,"dragfactor":0.5,"is_canard":true,"increment":1,"is_vtail":false,"is_tail":true,"warning":"","liftbleed":0,"latstab":0,"cost":0},{"name":"Outboard","era":"Pioneer","latstab":1,"dragfactor":1,"is_canard":false,"increment":2,"is_vtail":false,"is_tail":false,"warning":"","liftbleed":0,"pitchstab":0,"cost":0},{"name":"V-Tail","era":"Coming Storm","latstab":2,"pitchstab":2,"cost":5,"dragfactor":0.8,"is_canard":false,"increment":1,"is_vtail":true,"is_tail":true,"warning":"","liftbleed":0},{"name":"T-Tail","era":"WWII","liftbleed":-2,"dragfactor":0.5,"is_canard":false,"increment":1,"is_vtail":false,"is_tail":true,"warning":"T-Tail Warning","latstab":0,"pitchstab":0,"cost":0}],"vstab":[{"name":"Tailfin","era":"Pioneer","dragfactor":1,"increment":1,"is_vtail":false,"is_tail":true,"control":0},{"name":"Outboard","era":"Pioneer","dragfactor":1,"control":1,"increment":2,"is_vtail":false,"is_tail":false},{"name":"V-Tail","era":"Coming Storm","dragfactor":0,"increment":0,"is_vtail":true,"is_tail":true,"control":0}]},"controls":{"ailerons":[{"name":"Flap Ailerons","era":"Pioneer","warping":false,"warning":"","cost":0,"control":0,"drag":0,"crashsafety":0},{"name":"Wing Warping","era":"Pioneer","drag":-1,"warping":true,"warning":"Wing Warping Warning 2","cost":0,"control":0,"crashsafety":0},{"name":"Spoilerons","era":"WWII","cost":2,"warping":false,"warning":"Spoilerons Warning","control":0,"drag":0,"crashsafety":0},{"name":"None","era":"Pioneer","warping":false,"control":-15,"crashsafety":-1,"cost":-2,"warning":"","drag":0}],"rudders":[{"name":"Flap Rudder","era":"Pioneer","latstab":0,"control":0},{"name":"Flying Rudder","era":"Pioneer","latstab":-1,"control":3}],"elevators":[{"name":"Flap Elevator","era":"Pioneer","pitchstab":0,"control":0},{"name":"Flying Elevator","era":"Pioneer","pitchstab":-1,"control":2}],"flaps":[{"name":"None","era":"Pioneer","costfactor":0,"control":0,"warning":"","liftbleed":0,"crashsafety":0},{"name":"Basic Flaps","era":"WWI","liftbleed":-3,"control":-3,"costfactor":0.333333333333,"warning":"","crashsafety":0},{"name":"Advanced Flaps","era":"Coming Storm","liftbleed":-5,"costfactor":0.666666666666,"control":0,"warning":"","crashsafety":0},{"name":"Control Flaps","era":"WWII","liftbleed":-5,"control":3,"costfactor":1,"warning":"","crashsafety":0},{"name":"Lift Dumpers","era":"Last Hurrah","crashsafety":2,"costfactor":1,"warning":"Lift Dumpers Warning","control":0,"liftbleed":0}],"slats":[{"name":"None","era":"Pioneer","control":0,"drag":0,"liftbleed":0,"cost":0},{"name":"Fixed Slots","era":"Roaring 20s","drag":5,"liftbleed":-3,"cost":1,"control":0},{"name":"Automatic Slats","era":"WWII","liftbleed":-1,"control":3,"cost":4,"drag":0}],"drag_inducers":[{"name":"Air Brake","era":"WWII","mass":1,"cost":3,"warning":"Air Brake Warning"},{"name":"Dive Brake","era":"Pioneer","mass":2,"cost":4,"warning":"Dive Brake Warning"},{"name":"Drogue Chute","era":"Last Hurrah","cost":3,"warning":"Drogue Chute Warning","mass":0}]},"reinforcement":{"external_wood":[{"name":"Parallel Struts","era":"Pioneer","drag":2,"mass":1,"structure":5,"maxstrain":5,"tension":30,"cost":1,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"N-Strut","era":"Pioneer","drag":2,"mass":1,"structure":6,"maxstrain":8,"tension":20,"cost":1,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"V-Strut","era":"Pioneer","drag":1,"mass":1,"structure":-5,"maxstrain":5,"tension":30,"cost":1,"config":true,"first":true,"small_sqp":true,"ornith":false},{"name":"I-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":20,"tension":15,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false,"structure":0},{"name":"W-Strut","era":"WWI","drag":3,"mass":1,"maxstrain":35,"tension":0,"cost":2,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Single Strut","era":"Pioneer","drag":1,"mass":1,"maxstrain":10,"tension":0,"cost":1,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Star Strut","era":"WWI","drag":8,"mass":2,"structure":10,"maxstrain":30,"tension":0,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Wing Truss","era":"Pioneer","drag":4,"tension":40,"cost":1,"config":false,"first":true,"small_sqp":true,"ornith":true,"structure":0,"mass":0,"maxstrain":0},{"name":"Wire Root","era":"Pioneer","tension":10,"config":true,"first":false,"small_sqp":true,"ornith":true,"structure":0,"mass":0,"drag":0,"cost":0,"maxstrain":0}],"external_steel":[{"name":"Steel Parallel Struts","era":"Pioneer","drag":2,"mass":1,"structure":10,"maxstrain":10,"tension":15,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Steel N-Strut","era":"Pioneer","drag":2,"mass":1,"structure":12,"maxstrain":13,"tension":10,"cost":2,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Steel V-Strut","era":"Pioneer","drag":1,"mass":1,"structure":0,"maxstrain":10,"tension":15,"cost":2,"config":true,"first":true,"small_sqp":true,"ornith":false},{"name":"Steel I-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":25,"tension":7,"cost":4,"config":true,"first":true,"small_sqp":false,"ornith":false,"structure":0},{"name":"Steel W-Strut","era":"WWI","drag":3,"mass":1,"maxstrain":40,"tension":0,"cost":4,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Steel Single Strut","era":"Pioneer","drag":1,"mass":1,"maxstrain":15,"tension":0,"cost":2,"config":true,"first":true,"small_sqp":true,"ornith":false,"structure":0},{"name":"Steel Star Strut","era":"WWI","drag":6,"mass":2,"structure":20,"maxstrain":35,"tension":0,"cost":4,"config":true,"first":true,"small_sqp":false,"ornith":false},{"name":"Steel Wing Truss","era":"Pioneer","drag":4,"maxstrain":5,"tension":20,"cost":2,"config":false,"first":true,"small_sqp":true,"ornith":true,"structure":0,"mass":0},{"name":"Steel Wire Root","era":"Pioneer","tension":10,"config":true,"first":false,"small_sqp":true,"ornith":true,"structure":0,"mass":0,"drag":0,"cost":0,"maxstrain":0}],"cabane":[{"name":"None","era":"Pioneer","tension":0,"structure":0,"config":false,"drag":0,"mass":0,"cost":0,"maxstrain":0},{"name":"Parallel Struts","era":"Pioneer","drag":0,"mass":1,"structure":5,"maxstrain":5,"tension":15,"cost":1,"config":true},{"name":"Steel Parallel Struts","era":"Pioneer","drag":0,"mass":1,"structure":10,"maxstrain":10,"tension":7,"cost":2,"config":true},{"name":"N-Strut","era":"Pioneer","drag":0,"mass":1,"structure":6,"maxstrain":8,"tension":10,"cost":1,"config":true},{"name":"Steel N-Strut","era":"Pioneer","drag":0,"mass":1,"structure":12,"maxstrain":13,"tension":5,"cost":2,"config":true},{"name":"V-Strut","era":"Pioneer","drag":0,"mass":1,"structure":-5,"maxstrain":5,"tension":15,"cost":1,"config":true},{"name":"Steel V-Strut","era":"Pioneer","drag":0,"mass":1,"structure":0,"maxstrain":10,"tension":7,"cost":2,"config":true},{"name":"I-Strut","era":"WWI","drag":0,"mass":1,"maxstrain":20,"tension":7,"cost":2,"config":true,"structure":0},{"name":"Steel I-Strut","era":"WWI","drag":0,"mass":1,"maxstrain":25,"tension":3,"cost":4,"config":true,"structure":0},{"name":"W-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":35,"tension":0,"cost":2,"config":true,"structure":0},{"name":"Steel W-Strut","era":"WWI","drag":1,"mass":1,"maxstrain":40,"tension":0,"cost":4,"config":true,"structure":0},{"name":"Single Strut","era":"Pioneer","drag":0,"mass":1,"maxstrain":10,"tension":0,"cost":1,"config":true,"structure":0},{"name":"Steel Single Strut","era":"Pioneer","drag":0,"mass":1,"maxstrain":15,"tension":0,"cost":2,"config":true,"structure":0},{"name":"Star Strut","era":"WWI","drag":6,"mass":2,"structure":10,"maxstrain":30,"tension":0,"cost":2,"config":true},{"name":"Steel Star Strut","era":"WWI","drag":4,"mass":2,"structure":20,"maxstrain":35,"tension":0,"cost":4,"config":true}],"cantilever":[{"name":"Birch","era":"WWI","mass":1,"maxstrain":10,"toughness":2,"cost":1,"limited":true,"liftbleed":0},{"name":"Duralumin","era":"WWI","mass":1,"maxstrain":15,"toughness":3,"cost":2,"limited":true,"liftbleed":0},{"name":"Steel","era":"WWI","mass":1,"maxstrain":20,"toughness":5,"cost":3,"limited":true,"liftbleed":0},{"name":"Aluminium","era":"Roaring 20s","mass":1,"maxstrain":25,"toughness":3,"cost":4,"limited":true,"liftbleed":0},{"name":"Whalebone","era":"Himmilgard","mass":1,"liftbleed":-3,"maxstrain":5,"cost":8,"limited":true,"toughness":0}]},"fuel":{"tanks":[{"name":"Internal Fuselage Tank","era":"Pioneer","mass":1,"wetmass":5,"fuel":125,"reqsections":0.5,"internal":true,"cantilever":false,"control":0,"drag":0},{"name":"External Wing Tank","era":"Pioneer","mass":1,"wetmass":5,"fuel":125,"drag":3,"control":-1,"internal":false,"cantilever":false,"reqsections":0},{"name":"Internal Wing Tank","era":"Pioneer","mass":1,"wetmass":5,"fuel":125,"control":-1,"internal":true,"cantilever":true,"reqsections":0,"drag":0},{"name":"Microtank","era":"Pioneer","mass":1,"wetmass":0,"fuel":25,"internal":true,"cantilever":false,"reqsections":0,"control":0,"drag":0}]},"cargo":{"spaces":[{"name":"None","era":"Pioneer","reqsections":0,"mass":0,"warning":""},{"name":"Tiny","era":"Pioneer","mass":1,"warning":"Cargo Tiny","reqsections":0},{"name":"Small","era":"Pioneer","reqsections":1,"warning":"Cargo Small","mass":0},{"name":"Medium","era":"Pioneer","reqsections":3,"warning":"Cargo Medium","mass":0},{"name":"Large","era":"Pioneer","reqsections":5,"warning":"Cargo Large","mass":0},{"name":"Huge","era":"Pioneer","reqsections":10,"warning":"Cargo Huge","mass":0}]},"landing_gear":{"gear":[{"name":"Landing Gear","era":"Pioneer","DpLMP":1,"SpLMP":0,"can_retract":true,"mass":0,"warning":""},{"name":"Floats","era":"Pioneer","DpLMP":1.5,"SpLMP":0,"can_retract":true,"mass":0,"warning":""},{"name":"Hybrid Floats","era":"Pioneer","DpLMP":2,"SpLMP":0,"can_retract":true,"mass":0,"warning":""},{"name":"Boat Hull","era":"Pioneer","mass":5,"DpLMP":1,"SpLMP":1,"can_retract":false,"warning":""},{"name":"Landing Skid","era":"Pioneer","DpLMP":0,"SpLMP":0,"can_retract":false,"warning":"Landing Skid Warning","mass":0}],"extras":[{"name":"Zeppelin Hook","era":"Pioneer","mass":1,"MpLMP":0,"warning":"Zeppelin Hook Warning","drag":0,"crashsafety":0},{"name":"Carrier Hook","era":"Pioneer","MpLMP":0.5,"warning":"Carrier Hook Warning","mass":0,"drag":0,"crashsafety":0},{"name":"Underwing Skid","era":"Pioneer","MpLMP":0,"drag":3,"crashsafety":2,"mass":0,"warning":""}]},"accessories":{"electrical":[{"name":"Windmill","era":"Pioneer","drag":1,"cost":1,"cp10s":1,"storage":0,"mass":0},{"name":"Battery","era":"Pioneer","mass":1,"cost":2,"cp10s":0,"storage":5,"drag":0},{"name":"Battery (High Quality)","era":"Roaring 20s","mass":0,"cost":4,"cp10s":0,"storage":5,"drag":0}],"radios":[{"name":"Loud Yelling","era":"Pioneer","mass":0,"drag":0,"charge":0,"cost":0},{"name":"Intercom System","era":"Pioneer","charge":1e-9,"cost":1,"mass":0,"drag":0},{"name":"Radio Receiver","era":"Pioneer","mass":2,"drag":2,"charge":1e-9,"cost":3},{"name":"Radio Transmitter","era":"WWI","mass":3,"drag":3,"charge":-1,"cost":3},{"name":"Radio Transceiver","era":"WWI","mass":5,"drag":3,"charge":-1,"cost":3},{"name":"Whalebone Radio Receiver","era":"Himmilgard","charge":1e-9,"cost":5,"mass":0,"drag":0},{"name":"Whalebone Radio Base Station","era":"Himmilgard","mass":6,"drag":1,"charge":-1,"cost":12},{"name":"Radio Receiver (High Quality)","era":"Roaring 20s","mass":1,"drag":2,"charge":1e-9,"cost":6},{"name":"Radio Transmitter (High Quality)","era":"Roaring 20s","mass":2,"drag":3,"charge":-1,"cost":6},{"name":"Radio Transceiver (High Quality)","era":"Roaring 20s","mass":4,"drag":3,"charge":-1,"cost":6},{"name":"Whalebone Radio Base Station (High Quality)","era":"Himmilgard","mass":5,"drag":1,"charge":-1,"cost":24}],"recon":[{"name":"Guncam","era":"Pioneer","cost":1,"warning":"Guncam Warning","reqsections":0,"mass":0,"drag":0},{"name":"Small Reconnaissance Camera","era":"Pioneer","mass":1,"drag":1,"cost":2,"warning":"Small Reconnaissance Camera Warning","reqsections":0},{"name":"Medium Reconnaissance Camera","era":"Pioneer","mass":2,"drag":2,"cost":2,"warning":"Medium Reconnaissance Camera Warning","reqsections":0},{"name":"Large Reconnaissance Camera","era":"Pioneer","mass":3,"drag":3,"cost":2,"warning":"Large Reconnaissance Camera Warning","reqsections":0},{"name":"Internal Small Reconnaissance Camera","era":"Pioneer","mass":1,"cost":4,"warning":"Small Reconnaissance Camera Warning","reqsections":0,"drag":0},{"name":"Internal Medium Reconnaissance Camera","era":"Pioneer","mass":2,"cost":2,"reqsections":1,"warning":"Medium Reconnaissance Camera Warning","drag":0},{"name":"Internal Large Reconnaissance Camera","era":"Pioneer","mass":3,"cost":2,"reqsections":1,"warning":"Large Reconnaissance Camera Warning","drag":0}],"visibility":[{"name":"Wing Cutouts","era":"Pioneer","visibility":1,"liftbleed":1,"charge":0,"structure":0,"cost":0},{"name":"Hull Cutouts","era":"Pioneer","visibility":1,"structure":-5,"charge":0,"liftbleed":0,"cost":0},{"name":"Searchlight","era":"Pioneer","charge":1e-9,"cost":1,"liftbleed":0,"structure":0,"visibility":0}],"climate":[{"name":"Electric Heating","era":"Pioneer","charge":-1,"cost":1,"req_radiator":false},{"name":"Radiator Loop","era":"Pioneer","cost":1,"req_radiator":true,"charge":0},{"name":"Air Conditioning","era":"Pioneer","charge":-2,"cost":4,"req_radiator":false}],"autopilots":[{"name":"None","era":"Pioneer","mass":0,"warning":"","charge":0,"cost":0},{"name":"Gyroscopic","era":"WWI","cost":3,"warning":"Gyroscopic Warning","mass":0,"charge":0},{"name":"Altitude Holding","era":"Coming Storm","mass":1,"cost":5,"warning":"Altitude Holding Warning","charge":0},{"name":"Clockwork Programmable","era":"Himmilgard","mass":1,"cost":6,"warning":"Clockwork Programmable Warning","charge":0},{"name":"Programmable","era":"WWII","mass":1,"charge":-2,"cost":6,"warning":"Programmable Warning"},{"name":"Rattenhirn","era":"Himmilgard","mass":3,"charge":-3,"cost":25,"warning":"Rattenhirn Warning"}],"control":[{"name":"None","era":"Pioneer","max_mass_stress":1000,"max_total_stress":1000,"mass":0,"cost":0},{"name":"Control Rods","era":"WWI","mass":1,"cost":2,"max_mass_stress":1,"max_total_stress":1000},{"name":"Hydraulic-Assisted","era":"WWII","mass":3,"cost":5,"max_mass_stress":0,"max_total_stress":1000},{"name":"Fly by Wire","era":"Last Hurrah","mass":3,"cost":10,"max_mass_stress":0,"max_total_stress":0}]},"rotor":{"blade_count":[{"name":"Two","sizing":1.05,"flightstress":1,"rotor_bleed":0,"cost":0},{"name":"Three","sizing":1,"cost":2,"rotor_bleed":1,"flightstress":0},{"name":"Four","sizing":0.95,"cost":4,"rotor_bleed":2,"flightstress":0},{"name":"Five","sizing":0.9,"cost":6,"rotor_bleed":3,"flightstress":0}],"arrangement":[{"name":"Single Rotor","count":1,"powerfactor":1,"blades":0,"reliability":0,"latstab":0,"pitchstab":0,"cost":0},{"name":"Coaxial","count":2,"cost":2,"reliability":-1,"powerfactor":1,"blades":0,"latstab":0,"pitchstab":0},{"name":"Synchropter","count":2,"cost":-2,"powerfactor":0.95,"blades":0,"reliability":0,"latstab":0,"pitchstab":0},{"name":"Tandem","count":2,"pitchstab":4,"powerfactor":1,"blades":0,"reliability":0,"latstab":0,"cost":0},{"name":"Transverse","count":2,"latstab":4,"powerfactor":1,"blades":0,"reliability":0,"pitchstab":0,"cost":0},{"name":"Tandem Transverse","count":3,"pitchstab":4,"latstab":4,"powerfactor":1,"blades":0,"reliability":0,"cost":0}]}}');var ke=a.t(Oe,2);window.addEventListener("DOMContentLoaded",(()=>{const t=new URLSearchParams(location.search);var e=t.get("json"),s=t.get("lang"),i=t.get("test");s?l.SetCurrentLanguage(s):window.localStorage.language&&l.SetCurrentLanguage(window.localStorage.language),i&&function(){var t=JSON.parse(String.raw`{ "names": ["Theler Kobra MD", "Kreuzer Spinne M3", "Ritter Model F \"Singvogel\"", "Markgraf Zerstörer B", "Theler Drachen", "Living Grove (Farman)", "Rathenau 7k", "Braun VJ", "KW-S1", "KW-S4", "Ritter Model D \"SeePfau\"", "Teicher Möwe 13S-J", "Ritter \"Ersatz S\"", "Kreuzer Spinne V8", "Hugo's Ganzmetall Wunderflugzeug!", "L&L Kessel IIb", "Ajeet Interceptor", "Shamsher Interceptor", "Bahadur Escort", "Cheetal Fighter", "Markgraf Attentäter C", "Königskondor L.1", "Von Morgen Vampyr", "Hugo's Einzigartiger Stahl-Jagdbomber!", "Theler Kobra MB", "Kreuzer Skorpion", "KW Adler N", "Markgraf Volksfestung A", "Arntwerke c.7", "Mitscher IG J-79SF", "Recht Luftschlepper", "Ritter Model Cj \"Spatz\"", "Theler Zweihander", "Mitscher IG J-83 Geistliche", "Arntwerke d.13", "Rathenau-9c", "Gernsback 0012", "Gegenbeispeil", "Universität Kobra M01", "Teicher Schnelles Mammut", "Rathenau-16d", "Braun DC \"Puma\"", "Ritter Model S \"Fink\"", "Theler Eklipse", "Mitscher IG JA-81", "Arntwerke c.10", "SAM 99", "SAM 1144", "Teicher Mammut", "Mammut Smuggler Custom", "Markgraf Totengräber A", "Kreuzer Spinnmilbe", "KW Dickhäuter", "Mushshak Trainer", "Sonnenjäger Hummel", "Ritter Model ABh Eule", "Albrecht Kugel", "Flugzeugwerft-Neustadt Korsar", "Kreuzer Zecke", "Markgraf Streiter", "Mitscher IG B-78", "Müller Experimental 3", "SFW Flitzer", "SFW-Rathenau Nimbus", "Teicher Fuchs", "Weiss Wrackbarsch", "Braun GA 'Gulaschkanone'", "Ritter Model X \"Falke\"", "von Morgen Walküre", "Hugo's Metallisches Jagdflugzeug!", "Sonnenjäger Seitenwinder", "Tejas Interceptor", "Sonnenjäger Haifisch", "Albrecht Pfeil", "Teicher Sperber 8N-A", "Markgraf Todesbote C", "von Morgen Pferd", "von Morgen Oger", "Dryad of Hanriot", "Thorstad S1M2b \"Schreckensgans\"", "Straßenkämpfer", "Marut Raider", "DFB Blitzgewitter", "KZ-2 Mangusten", "Rebuilt LM \"Viper\"", "Libelle T.87", "Mauss Z-95 Phönix"], "acft": ["AAEAjATAdALMDwAVAFgUwDaoE4AIDSA9gEZYCGOAsgCLACAdDAYMC68M2yyPZ5-QOgAhbABdk5AGJgYANhk4AO0Ww4wADgAMyAA7AAGMAC4vBmwAwwAMCsAkCd42A-wF-gAJGABkez98sBwlhiktJyisq46lq6lgDqsQCSwEKi4jhSsvJKKlE6fACCusAAAgApAF4Ah0wA-ADOAMwNNQBmba1tJiB8wHZ+vDxWnABArNbWgxNjpsCjUyzzs2zMoywAcL2+AOCbnNYLPf5++yx9rIP29Gf9bACgvvT73Rc3e2wAEK-T9juvJ0NfViORznJaWeiMF4MWiDQarXirSEzaEo4HIw6Ar5AA", "AAEAjATAdALMCIBpATgUwK4C9XIAQGUAHASwDtTVcBZAZmAEAHhmAwZ91j9kL3pgDABKACwD2pAIbVRAF1HIARhPS4AWpFxgwABmGFgAFGABcYAGBmjJhzYAIdgHA+fAP8vgAaGAAEZ3-+WwEJiktJyispqGlq6+mYA6vEAkkEi4lJUsvJKKuoQmjp67ABADACC+sAAAgAF7ACQDAD8ADIAMwCzTQABzD1+PBxWbv4WfKXMFlbs04FD1jPzY8D2Tn5sbFzTAKDAu1xTixMcPMtzC7PsZ428l7w3Aby7x+PMPHePHGf2n1d+a58zmdfs5GGZGCw7ox6NNpi8tiDEcwgA", "AAEAjATAdALMBYAlAlgF1QUwE4AICyA9gCYYA2OAYjgEQDKyAdgOYBuBTZ1wAgD8PwDB+-XsCHDhIURJm8AKLQDGACywZkAI2w4AQlACSADRxgAzAAZlAB2ABkYAFxQIlxIDgwAFDCAEDP-+ALDAAAgB4RGywAoqapraekYmFtbAAMAA6hn60Uqq6lq4icZmljb8AEA8AIIAgQCZAFkAAvVNwACQPAD8AM6mpt0AAfzdADEAMwCzASBRwAD-C5FVAavpkRHSEtu8695+EQd8wmmn8ycRZ8Jd25v8Xff+AKCRvKJzdxLrVxKHT-wzl9gB4AWlpNcAW90rwBF93u9Lj8LlCoUA", "AAEAjATAdALMAoBZAhgJwNYHNXIGYAIAtAU1QGcAXAN9VPwCFgBAYAIGA4DAOeuXfQ-AcG7DRAkMOEsA+AHUA9gBsllYgEsAduhy4K+OckzEAFslX4AwvggBOAAwmADsAA4wALjMB7XgFhgAGAeAGgpYQBIHi8AVHD4hI5ZRRU1LR08fUNjMwtrO0cXQLk5AElgeWVVCg1tXSyjU3MyKxsHZwEmAEFcXoABAEqATIAsthEAfiHRiYAAjgmAGIAZgFmpSV52KMTxJO8hDl9QRNOjs+PvY4BkYAAYbykAJHvhTaDOnkOpYJ4oy8S2zOwgAoAkWL5JN8hAAIU6-Dhw4EcBHCADgyMCQlRyKk7CxIm+BxYJK+4V83CYJNJhyYAH+6eNPo9ccigA", "AAEAjATAdALMBwAVAFgUwDaoE4AIAiWAhgMZoB2wAgMAEDD0Bg9zjLzIbLTn3bHnbagGQAsqgCW2HAHVxZACbIArgpwB2AAzIADsACowALgDqXYAGBmlgWwDgze-ZvOXVYKIlTZC5as06LaWkASXcxSVxvRRV5dS1dFkoAAQBJgEyALKSAAOZqEAB+NMyCgDKAM3KCgBkAGYBZgX484CcXXnpqLrZrC1cbOn7Bzrd6HAROUxMWqan6XuAASH7mYeWVtgBQFznmlmGVhYAIDatnNv6FhdOdm7ugA", "AAEAjATAdALMCoAZAlgN2QOwOYAIDiATgPaoCmOAFAGICGBAtjRgJTBsCAbwAYF373zYhBI4JwBIAIVIEALgAsaOKmBgA2NTjAB2AAzyADsAAYwALijOfADDAAwFwCQokQAgA-wD-gARGABkFyDgjmApGQUlFXVNHX0jOwB1RIBJMOk5RWVVDS09Q0F2AEEjYAABABSALwBDsR4AfgAzFubWgACg4T5OVy4HENDOKy4AIH7gAHBBab5ZsamZwVGR3nHOAFhgACgXTltdwQHQQq5hoOPgZz5xwevBwQBQYJGT14ejvj6Ptkulj8ufx+Ik4IE43He9XYI3Y7ncwFulmByKAA", "AAEAjATAdALMDQAlAhgFwBYFMB2yCuABAOwDWwAgBcNQGDX20P0hOtUAoAygMboBOmAJYAjTHwIAhKAEkAGgTABmAAzoADsADIwALihqlKgwDgwAFD0AEGxvUAsMAAItly8pdeAkWMkz5S1Q0AYAB1EOlgD34hUXEpOQUVdXoAIAoAQQBAgEyALIABbLzgAEgKAH4AZ0VFcoAA6nKAGIAZgFm2FgZDAH+elzS2QeAg1xthge6jYAAkBDGpgypKQ3pR+jKF6c2t+gBQNxHqFlXdhnXqazOL1lMtm5uz1koUyhpTpfJVylGPxaetkA", "AAEAjATAdALMAQAhATgQwK4DsAEA1AUsAIDABAxwAYMDbVXbSAzSdc2w08wyQLAoYcAVQAy2AJwAGABYAHYAHRgAXG4k68YAGBaO7t3IBIYACh95iy2D80WbKIkz5WgOouAktYF2HUubRIiAEEAGAAZgFmAAQBIgEyALLJQAH44xJSAMoAzbJSAAPMuAJoAf9KEdUtGWgBQaobmKrpmnUDgAHhTRqsacj1uAeBjRqqRnpp682amcgmGIc0JtooaJgBwHqGh+f1m3csgA", "AAEAjATAdALMCgBpA6gWgMpmAQB3gYMEccISUSOVXgBQBiA9gNZMCmATgAR0CuAdgHMAlgC8hAEwAWHAM4AXVgBtF-AZwAqATwAOnCDADsnMADYADJO3AAmMAC41XCQBQwAMDEA0NSoBwAP-+wAAIwADIPpFRRLj0zGxcvIKiEtLs8koqgho6eobG5pbuyMgAksBxLBzcqilSsgrKqjm6+kamFlYk2ACC4gAzALMAAgCZowBZBAD8AJqT0wAyQ9PjU1SU3cC+xGTReLhOTh5EAEDEThfE5zHklzdEhA8R3nfEAJDAABAbxJtXtyiJyIny2+1BwAe+3gUUuoDw+yoJ2B30RJBR5B2aJRGLRjncuHwcNu2Eu2ECkMixLxiKAA", "AAEAjATAdALMCgBpA6gWgMpwIDAEDBwDBgTThiySQDL8LL6zrKWcBkdAQQFkACRAK4AnAJYBTIbwAaU3hAAM8gBYAHYABxgAXBpl8ZABDAAwKSMsWASAD-14ABRgABAuu3ldlz6DRE6bIVlNWNkZABJYA4efmFxSRk5RVUPTgBmdIABAEqATIAsvFAAfgAYgBmAWaKAAJIat2ZSfEtSRt1yDxocPVbSbr7Osn79dpJhsmIcUzZgAChRtsHRi1NSFvdXdY2WeA6GqmXtklXVknMj47cAcAuTMlPb1ymifoGsHA-bQ4HHx6A", "AAEAjATAdALMAYAlAlgF1QUwE4AICyA9gCYYA2OAIjgEQDKGGACgGYCGArtcAIA-D8AwfsMEjhIMZL4AUWgGMAFlgzIARthwAhKAEkAGjjABmAAwKADsADIwALih+vPiIDgwAFDCAEFN-8AsMAACH6hobyyispqGtr6hqYWwADAAOqpOsCRSirquHEGxmaW-ABAPACCAIEAmQBZAAI19cAAkDwA-ADORkYdAAH8HQAxADMAs1ISIk4A-7Oh5VJLKWG+TmIbfMnCbj5+e5Ibh2I7ZZvCW1Jn-O1HYXdrYgCg4cBuDldPzjfA+9+rXwfJ7JDa-AFSXig4ACL68bgbRF+L4QsJAA", "AAEAjATAdALMBIAVApgSwMYAtkCcAEAsgG8DuyeYAzAMoC0AUsAIDABAwHAYBz17zyH69OLftyGCh-FvABCuAC6YAhngBiYGADYtFAOwAGTAAdgADGABcKaJ4AYYAGAeASClCAEAH+Af8ACIwADI7qFhHDLyOEqqGtq6YIYmTgDqKQCSCFEx6po6+kamvEwAgkUAAgApAF4Ah8zAnAD8AGZtre0AAaGSPCwe4TYNthzsHIIjDcXS-OyTk2MRbDwA8MAAUGFrm-zO4zNLh7u8boNCp+GTAKDH7oKLQjtDTrwDZzx7UgDg7y8fv5cnCwREIWExbLYHgcAb8gA", "AAEAjATAdALMCIAlAlgF1QUwE4AIBEAolgM4CGqAXjgMp7ACADwzAYM+6x+yF70wNAB1KAHkoAZhwRxABgAWAB2ABUYAFxgAUGaNgAYC4BIYADh2AeD58A-9eAB0YABwrrtzuBDREqbMX7BQQBJT2ExSWl5JWYAIAYAQQBxhQASgAEAMoAzLOBjegB+HKyCgBkAGYBZgoBMmoAsvh4OA2Bbdys45maOrl0mfo5Bxi7PYAAINwAoCaZ2Vv0+9kG+Bby53uZjTY5tV0ZdHlGdlo5Jk7WuAHAdvX7L-d52jy6WA6GBpnbjpZOToA", "AAEAjATAdALMCIBpATgUwK4C9XIAQGUAHASwDtTVcA1ADmAEAHhmAwZ91j9kL3pgdABCyAIakAJgBdcidMmI5cADSoBJXGBoAGABaFgAHGABcPgCAuACGABgdtb5cA4AH+XwAEjAACI7--mRiFRCWlZeUUVdU1dfRsAdXjVYGCxKRk5BTwojW09LnoAQQBmUoABAEqATIAs4AsQAH4AAOYWttbHHg4LJwC+RkZeC2Y7IfZxwIKmDknGO2ZrPr82NmnmAFBgLa4xifreHgX9qdPdjgBIAYCr-t4tkccRnkm78-s39mPeZbvv78+1xsjBYryY9HG8yYj1mgLhQA", "AAEAjATAdALMCEAJArgcwPYHIDOACA4gIYB2AXgLYCmALoQDZ24DqyxAJpQE4BmdaplNPGABAUcAkAwCTKmyZIeUvEAkAEJdqAC0K4AYmDAA2I7kgAGLQAdgADGABcZWNkAIYAGAZAUGVKA4AD-gcAAMMAA0H7RMRJi6po6+oYmZhCWNh5MTACSwAmc2roGxqYW1vIiAIIAaNzcAAIACTJikgD8ADEAMwCz7QABEoPRirJi-rHO0QBAMl4urZXyc4txK7IAkOK+9gCwSnN+iyfKXjLbU0qXV7K+smPKimu3sucS7hLvMd-yk7ffX6vJRiDxtF7iESndbHYFwoA", "AAEAjATAdALMBwAZAZIgBAaQKYGcdYBs0BJYgI2AEBgAgYegMHucZeZDZac+7Y87Z0AKAGUAxgAsA9gQBeaRAFdJONAA00YMAAYJAB2ABMYAFwB1FgFBg11gM4B-h8ADQwAAj2v3+tVGSZeSUVdU0dfWAAYAB1aOJgf2k5BWUJVQ0tXQNfKgBBXIBMgCyAAQBsgGYKm1oAfkQAGYBZ2oAzdtqAGOaBfmYLJ2BeNgtmRMCUkIzwg2MzTlH6a1shn2ZBt0817f6E8SSg1PSwrKjY+PHk4LTQzIicynzi8qqamnrmto7upt6R+kGwxYi2B7B2u1BdDWNFG1ChwAA6MAAIjeADwwAAMJxImDQfQONQQfRccwAJBRcH0ClUpbeIkE5jwqxrUn0AAQtLZnAA4ODudzaYJgJyhgzdotKINiXDWJRJVRFdRpQsckKdkA", "AAEAjATAdALMCIBBAVgU1QFwAQEkB2GqATgMaoAOGA9kcAID3BMBgTbL7bInPjAGACUAFlTwBDLAFkq1IgCMxAVywAtSFjBgADEPLAAKMAC4wAMBMGjdqwAQbAOC9eAf+fAA0MAAIT334vAgiLiUjI0CspqEBraumYA6vE4gcKiEtKyEarqmjp6TABA9Ij5AAIABWwAkPQA-AAyADMAs7UAAUztvtzslq5+5ryDZmyWo5xjRQG9bFNMjmMAcMAAUDxj6+MD7DX+W8C7e5wAoH4b3BtHnKZjdldMwzyOV4+vfv2bDDfAzJeMdGNAbMJvdQUwgA", "AAEAjATAdALMAoBlAFgQwLYGdkFMBOABAJIB2ALvgMY4AOZA9nsAIAvDsBg73nP3IfQWwAYAJWT0SqAgFl6DPACNUAVwIAtSATBgADMhoJgAXGABgdqzY8uACG4BwIUID-L4AGhgABGd--lsBiElKy8ozKapoQ2noG5gDqCURB4pLScgqRGlo6+obsAEAsAIIFAAIABdwAkCwA-AAyADMAs-UAAeydfgI8Vm7+FkLD5txW43wTxYH93DPsThMAcMD2U34TrNsjPHUBk6z7B3wAoP4ToNYnXHxmE+sn7KOCTk8vH09CrIWsHJeBZhAtiDaYbL4Q4BAA", "AAEAjATAdALMBwAhAhgC2QEwK4CcAEAogM4DGA9jgC7ACAtwDAYAy06yyO18AEDAAoAZRKocAUwCWAIzH4A4lACSADTxgwABlQAHAcAC4vBnXqsAoMAAQLAODduAf4C-wANDAACPe8-jA4aKSMvJKqupaugDAAOrRiv4i4tKyeAoqapo6LHw0AIIAvtoAJQACANkAzBXAAJC0APwAMgAzALNNbfUAAd6crCYODsB2vgxCiUEpaWGZuvwGRqYmLBbWDCOjzm6eo7v9CYHJIenhWTFxB0nBqaEZEdm0BcXlVbUNLe0f3b3sA0Mbez4fmBplBy2GoIAqG92ED2Jw+HC-ODgJFWHU9ujMeYIaM+g9sajlmtMWj7ADfGSGFTCVw6CA6IwUfQaMsaINFtxmbTvEA", "AAEAjATAdALMDwBhAFgU1QFwIYBsAEAYgJYDmyGqATsAIDABAwTAYE2y+2yJ+6z35249OdANAB1KAHkoAZjwRZABmQAHYAFRgAXGABQJnWABgTgEhgAODbxhwgP-3gAdGAAcO56+HgE6XIVlNRNxcQBJX0kZeUUVdSZGGgBBAHHVABKAAQAygDNc4AsaAH583OKAGQAZgFnigEz6gCzhITZTYEcTbx5GJgMfdiM2YcGRtj7vemGAcFo2AExgAFgeofGx9g6mIrXhizXOAbs6I25tw85jYYAIS6YLzjnD6-b7r0S6ZlGfGlPaLqTSbzYDfP60f6jGiAiaDH7vbxAA", "AAEAjATAdALMCoBZAhgJwNYHNXIGYAIBBAF2IFMA7YgE-NXwGFgBAFtgMGC++E565Ct+-VgGQAyoUT4A0gFdUASzL0AGqvwQADFoAWAB2AAcYAFw2PAED8AEMADA3O8OEBIAP-vgAFGAAEF0CgkWAJKVkFZTUNbT1DewB1BIBJUMlpeSUVfHVNHQMRQgBmEoABAEqATIAs4GsQAH4AGIAZgFmGgACuLqCQfmtXQKFeEJGeRy5J4JdrGbqeVjngABhgAChhEbXN-mmAUBCucZdp4CHl+a4hq-5DoPH+k9vuM+cXs-4AcA+LT9vPNxWI57Kx2M9WMwRiNLlYwcdFiwoWxAbDuJYwRCkSNUQ8XviuEA", "AAEAjATAdALMAIBpAbwOwJYHMDOBrA9qgCb4BOABADJRjACA9wTAYE0w8M3R2yD2wMYBEAMqUA6uRFYAbulJFyYABwAGABYAHYOWC1+wAMCCA4MDNMA0IJsCGAJGAA0W67eCGoiVNnzFKjW1DcXEASWAvSWlMOQUlNS1eegBBVSYAAQABpLoAfgAApgKigDKAMzLgACBqpIFjYAB-xpseBgNamuNjHh62PqYa9g82IZZapgAYYAAId2m5wQHGMaSGtjb3IwEASC3XPdatgFBBVcGmEAn913XZm-q3CxuBw02Hmy6GLiOq9-p2hwah1Bt8OoD2k0WiDhh84cAgA", "AAEAjATAdALMCIA1A9gOwAQFlkCcDmAphogIYC2ADgJ47ACA9wTAYE2y+2yA55wwOgAhAjgAuACxLoAYmBgA2eegA7AIxHowADgAM4isAAYwALi9G7ADDAAwGwCQ53vYD-AX+AAkYAGQn-gKYBYTFJGTlFFXUcTV19WwB1BIBJYCERCSlZBSU1DW09A3Y6AEEigAEAFIAvAEPGZgB+AGcAZlbGgDNuru7zED5gR0DWYsYeNgAgNjsJoMH2abmLKbHppgAoIYCt4fZZtgZ19gG7MfmAs6Y9wM495YCAUFAdpgGH2-32AAhPr6cAOB-Wz-YH+Bg2BjMB4MOgTCbHXgfMEBIA", "AAEAjATAdALMBkAJArgcwPYHIDOACAogJYB2AXoagIYBOALhQKbW4DKtlAFgDYC0AUpVQATAEboAtiKYBCYAEBgAIGAqAYCpULg6jRpC6DOzWoMr9pgwoDoAISa0OlXADEwMAGzvcAHanMwABwADBwADsAAGMAAuBZaGgAwwADAGgCQFqZpAP8Av8AASMAAyJll5ca29o4ubp4+friBIeHJAOptAJLAVXQ1rh5evkxNwWGWAILhwAACACmkAIfy2gD82ADMG6sAZnu7exbmGgoZcRrq8QrXBqkqAKAruvHGz5YnSk8fusrpK49RJK-FR3c6vL66UHAM4VLKwiyPXTHUz6F5fRHlKEACHhkPOAHBcSk8UTyspkgpVGiVnIrhpgbcTLS3i85NlshDXtTSRUgA", "AAEAjATAdALMDwAVAFgUwDaoE4AIDSA9gEZYCGOAsgELACAdDAYMC68M2yyJzwwEhVsAF2TkAYmBgA2KTjAB2AAzIADsAAYwALi96bADDAAwKwCQvHgAgA-wD-gARGABkC2-ct6A4aJwTpsgrKakYA6qEAksDeWCLikjJySqqctACCasAAAgApAF4Ah0wA-ABm5WUVAAFu3Gz0lh66rABAnG0sJiZ6xgydfcBt3azDLB0szOMAsMDmbgDQwI2cJlyprD0Wqyzmmx70c02cAKDu9Kvce0ds20vXI24A4Pe3t-fNy4z0m98M9NbWAY8K7vDxAA", "AAEAjATAdALMAIBpATgUwK4C9XIAQGUBrAe2QAcBLYgO2AEB7gmAwJtl9tkTnxgDABKACxoBDXAFliAF1IAjUelwAtSLjBgADELLAAKMAC4wAMBMGjdqwAQbAOC9eAf6fAA0Akdfv54IJHU4lKyyApKqhDqWjqmAOqxAJJ+wmKSMvKKKmoa2rpMAED0AIJ5AAIABWwAkPQA-AAyADMAs7UAAUztXtzsFi7eZryDppZsFmOcDOO+E+MeNbzjDIWcPZMTM5zDwAs+PLt77ACgI14AUEzc04db7LY3TNucDjfbTw88DCYMzNeMdEs2CtFh9QUA", "AAEAjATAdALMBQBpA6gAgIIBMA2BTATqgHLACAZFAYMDbcNXTSOY4+QCgDK6AsqogFd8ASwKoAGgElJqMAFYADAAsADsACYwALisKdABDAAwLUO7GDYAHhr5u-ZodufQSLFSZ85WqPJkk4C5efiFRQg9ZRVU2dABmeIABAEykgCzgACBQAH4AAJo8goAYgBmAWd0QNnpzFhq6ckbGExoWh1Y6hq6smgBoYENOun7Buja2x1oh1gmASD12innFxgBQeybQBZXmgx3WuwBwHaM6ibsAf4u7cizT+mnGprrpmh7KTcnn4Cvt6v39kA", "AAEAjATAdALMDoBZAhgJwNYHNXIGYAIA1AewBt0BnXAUwoBcBXAO03wEFgBAYAUGH4Bg-LsKHDhIcVIHcRgqf0kL5-WcDFSlwgFCjhajeK0KNB5ceXAAQMABEAdTKl61AJZN0OXHSLVUdNwATV0w-fAAJfABmADYABgALAAdgfGAAXGUbcQBYUGEAVEspAAgAf7LgABJgAEJihobuBycXd088H0I-ANdg0NQI6Pjk4ABge3sASTtHUmdejy8unqCQsMjYxJTxTjYAAv4AAQAB4RsBAH4ATQBMgCzLqOfLgDLcXHMpGxK9ZUNZq1Fh1vL5-GsBkMtqM0pkFNlhHktEVGsBypUavVUdj9ID5m0lp0wb1+hthttxpMZi18cDlsSIWToTt9Adjmd+Bcbg8ni93p8FBYfiIAX9ziI1BLvsJ4Di5fKFcVJXJcbspMqNeqtWqdbixorxmqEQAtYAAPAal2AKPE+sU0v4dpVtvEAEh1Ni1O7FXwlXJJKLhBancoQ795frNQBwOUhkMG4T67IyLicNNS-QVZ2c6zydO4yWcLPKw3J1UZ1TFwXjEsJ5RAA", "AAEAjATAdALMCwBBATgOwC4HcCmyDW2ABAMZQDswAgFTQGDAOPD1MMisc0AIAsgPYATAdgGEAWpEJgwABgAWAB2AAUYGGABgBtWAAgVvQAQjAFCdOAf4vAA0MC7nHT6gEREAG3QBLdAFdhhAAqcsh86Oju2GrBXgDOhNioAOZeqERyAIbx6HJEAOoAogAKhL4KScgZARnohB7efsLxMgC0AJxQ3PxCIuKS0vJKGnl5AJL23cKiEhBSsoqM+pSISsAAAgAFjACQVAD8ADIAMwCzewABDBeM1DqgrPrAVk6PHOwMWk7mry9Mt4wOXZ3GjmO5gkGMT4MXZfG47WGcACgziY7GBCNYUOAxgxH0cAHBcVisbjONQNNRaOiaJRwdpHNTSV8gA", "AAEAjATAdALMBIBZAlgFwM4GMAWBTATgAQCSA4oQFIC0A7AJwDKAYsAIBvCcBgnv3fvEAOEcAKAxz5cyAEYFCpKMQAahMGAAM2AA7BRwALjAAQJ3Yc+AUGAAIXgHARIgP8Bf4AGhgABCd--ZnoS2FKy8ooqapo6wADAAOrxxEGS0nJEEarqWrqcpqwAggC+2gAlAAIA2QDM1cAAkGwA-AAyADMAs62dTQABfkJ85s7OcQHCpnnjJtPG5hyTng3+Xo0CsYIC89siG7yN89PLR1b+7OaDFie8e5x217fCjkePj+OsIyLn7FyHgazbT5-IbXUFAA", "AAEAjATAdALMDIAlApgYwBYBcAEAZArgGaYDOGANsgA5XIBOwAgMAEDDsBg73nP3IfHl0HC+AwX2YAKAHIBDTAEsA9gDs5lEtgCyyzMroAjAD91l2AIJHkizPWwANAGoBJF9jAB2AAzoqwABxgAFwmPjYeAAhgAGBuaIk+AEgAf5TgAERgBMTcvOl5JTUNZC1dfSNTcytDGzs6R1d3L19-GIB1dpdgWQUVdU0dPQMTM0trW3tnNw8fP0kLAG4AZmWAAQBKgEyALNZQAH4AGIAZgFmDgAD2K9zxMLYk7ji87mZ38OfXxJfvvhjmDwIsAABjAABweTBkP+-G4bF+vx+PCeSL+Tz+fAAoPkwqA3hIAFDfJE5TFongAcExsR4FJpkmA1OAHHejHZYUB7EYaTxPEBXIZmKAA", "AAEAjATAdALMDoAlAlgF1QUwE4AICyA9gCYYA2OAwgFY4BEAygA4CGqAXrcAIDe8BgwQUOADhgkDzFieADEQALAgDtm+AqgJYARswCuOAFqQcYMAAZ5jYABRgAXGABgQZMlCBACCEBwKX+AA-wHAANDAAAj+UdEuwHKKKmoa2nqGxqYWVo4A6tkAknEKyqqEyTr6RhAm5pZCAEDcAIJWwAACAAVCAJDcAPwAMgAzALO9AAGC41Eg0oJB0Q1+i04x-ssLwjzLPV5RO7xCzoJHQm5u-ifAPeerV7dSAKDRPJIzN-eHwrsfl2K+9443L8PlIeICRO8XmdTlF3iCYkA", "AAEAjATAdALMCIAVAFgUwDaoE4AIBaA7qgJbICGAdgCbbACA9wAwMAGDAedtecg-+MASACFsAF3I4AYmBgA2OTjAB2AAzIADsAAYwALgCGXADDNOASAH8AEAH+AfwmABkK2-ccGI8ZJnzFKupaTADqIQCSwN5YEmTSsgpKapo8dACCWsAAAgApAF4Ah4ysAPwAZhXllQABbnxcDNacLIzuRgL1Zp6pPRwtrZzt3X1c7ABAZgBQ3D0s0+w8-UOMDBPu-cCWHgJb2zwAoIuGoAN7vCOcTWcXAgDg1xsb18djDKzLKwxftranvc-XIA", "AAEAjATAdALMDYBZAlgFwM4GMAWBTATgAQCSA4oQFIC0AHAMyGm7LqoA2yOuwAgMAEDAhAMCFiR4sSEnjR4vnMnS+MsXwDwAIXwBDAK4A7QgFUAMgGlCYMAAZsAB2AB0YAFxVKsQAhgAYCmqgXwA0MAAMIGRUUIa2vpGZpbWdo6+AOppxMBauoYmFla2Dmq8AIJhADMAswACAJEAmQBZAqAA-A3NHV0AAWKCntLyQgD-I9GB-kJDE9GCE-MxrUIAsMChkWsb4lN+kp6ek+IAkMuzQqfn4gCgUXwqylequ8A+Ty+SAOBXLx9P+8thPdeHwBvIxrwzpDof9zkA", "AAEAjATAdALMBwBBATgOwC4HcCmyDW2ABACZRgDMwAgMAMDAMBgDLTrLI7rzXP7nXNr0EDBLGgHQASgAsA9qgCGhALJz0c5ACNFAV0IAtMGEIAOAAwyADsABIwALjAAQAxrV+wABAcxXAP-+3sAAUH7h4ZKyCspqGtp6hsZmlja0AOrpAJLA0vJKquqaOvpGJhbWLK5UiFAAZnUAAgAJLACQ1AD8AAEMPX29YqJuDIHeVO6sroL0QhHz89MR1SNLAAih4Rth7LOg7EsrNJMMe8AdZwsdC+wAoJF0DJxLXD4RZ283j2IA4F9nlwi7jGUxcTGOIwh4jGJ1W4I87ihbhhXGmsK+CyAA", "AAEAjATAdALMDQAlAhgFwBYFMB2yCuAtAJwDGwAgBcNQGDX20P0hOtUAYi6A9rgAQBZbqm4AnAEb4+ALUh8wYAAzoADsAAowALjAAwNUpUGdABD0A4GzYB-6wmAAEK85cHgnHvyEiJU2RHklVT0AdRCASXcuXmRBYTFJPBk5BWU1agAgCgBBdIABAAL6AEgKAH4AGQAZgFmygADqBucWBkNbFyy2Lr1XKx7OtuAegChgM2cAUHHWfWo5+kMjZYYF4FKhvo2+pmnnSkMWJb7W1YYJnfnnS0u1tb72uyGMyhpjt3JPqg73zcv-6hAA", "AAEAjATAdALMBwBxApgJwHYGcBGBDAxgNYAEADKZMAIDXADAwAYMC6026yFTR2zQCgoMOAiQCyAewAuE1GXIBWYMWABcWmwZsAEOxYAoXkYCgAf9PAAqMH5G79jgKFY8RYpJlzypJXQDqfgCSNs4ibh6y8j6sxtQAggACLAkAAzHAAEAA-AABLLn5eXYgHAyxLBl2zDwatSw1WnVNDaw19Y6sjeyNurptOsB9mqy9dTXlmbQ0lQ5dAJAO9gt2MyaLbCWr60ZduhXbjVvAAOBNdl1d2-Y02jSM-VM1VOa1-Q9X20A", "AAEAjATAdALMCwBxApgc2QOwEbIJYGcAHPAG2AEAKqAwYO+4WhukZtqgFAGUBBAWQAEAaQCuAJ1zIxAgBoBJOQLABWAAwALQsACYwALjtKDABDAAwPVPtmTYAHh71p87qVu-YeMnT5ilRq0zAHUguWB3QVEJKVkFJTVNZnIeAGY0gAEATMyALOAAIFAAfgAAulLygBiAGYBZ9lYGSlsLKgZbV3ojekK6VraupMHOkboAKAL6AGhgK2sZufpG8x6B7tG+hgBIIZdgHfW94ABQZ0pe1kOjhn7Z6-pb5gBwe4sjR+cAf8-DKifmq6UchAijfAZsK73PZAA", "AAEAjATAdALMCoBVAdgSwG4FMBOBnVALgCcEAEA0gPYBG2AhqQLIAMYwAgB1wGDB--BeAviE7DhnAEgAhHAQAWDAGJgYANjWkwAdmbyADsAAYwALjiuAgDDAAwPwCQF8QAgA-wD-gARGABkZ0CgvilZbAVlVQ0tXQM7AHV4gElgGTlFUhV1TR09QwF2AEF8gAEAFIAvAEOeAH4AM0aGpoAAwJAJYBdgizE7YQAgfnt7PtHhy2Ah8b4ZqYFeDr5up0CAcGBVgSWuzaCNrf4dzhPOoPtHeZ6QvevhAFAg09BJu+EL5bfZ9beP-q++G43PxTrZONw+iCOH0+kNnJCAT0gA", "AAEAjATAdALMAYAVApgSwMYAtkCcAEAylgHbIA2ZyAzngLICGAtowK4AuwAgMAMC-AAwYMO7ChwiaEnAAUBPFd504SGVKR66arWTVAFAAKLMlWQArZGzwGAagFowAVjwAKAOpuAkgEpgAE2AAXAkAIEVlbj4NHWkAf4Af4AB4YDsY9PTuQ2NTCytbB2d3L18eD09gbJNzS2t7J1dy31FFJIB+AADhTrVY2MEMiSrc2oKG4p9-INDw6UiJFoyE5NTBtckso2q8usLGkt5yyq2R-Pqiptnudq7gHuU+gbXhmrO9id8A4OEwxYX+aKDZYpNLrdabHKvXbjS5lLzHSE7MYXA4ta73e5xfoKDIvJHnfaTL4zP4aKKzJaJEFg8EI7ajAkfQ7wvEM96XNHJDG3LFPMFhYQAGBpIsBYopEr+UoBIvJigFwAAMsAAHjpMDAACoynJ2n+wnJpJlwAAkHzMhIzaKAKAWiR6uSAvTABVqOUACFlLu9GgA4GC5XKwY8NGEogJuJHIxTOI9OYpw1wo4pFrH+vGBUbRTogA", "AAEAjATAdALMAwAlAhgFwBYFMB2yCuAtGAGwAmwAgJcDQGA0N2MMjNvUAoAygMboBOmAJYAjTPwAEAISgBJABoSwAZgAM6AA7AAyMAC4oGlWqMA4MABQDABDs7NALDAACPbduq3PoNHjpcxRV1LQBgAHUw2WAvAWExSRkFJTVNBgAgSgBBAECATIAsgAFcguAASEoAfgBnZWVKgACaSoAYgBmAWfZWRmMAf763DPZh4BD3O1Gh3rGbcrd6W2ZjQ3pmDJWqKZpWbc2GFcZxhgrGbbtTieYAUA9gYdZDq+ZjmiXn2btzZ9fP9gHlvYMiEqLQntQKPsaOc3qDwVRIQjgADwQcPuiaEA", "AAEAjATAdALMDwAhATgQwK4DsAEARAwtgEQAK6AtqkcAIC3AMBgDLTrLI7X9AhAHKoALgEsA9plQAbAKYBnbAFlRg0cgBGAH+SjsAJQC0YABwA2AAzYw5gBYAHYAAxgYYACAGdN+wAQwADAsAHDc3AD-ocAACI4hsXF0AIgAgpIigugAJtLYACrW2oKCMs55wvLSmADmwpjZ1qjygtbZAOoAoiTY6LaVaFnYQtgpaZly2Gb6AJxQvAIi4lJjSirqWjoGxuaWNvYAwC0tAJLA-EJiEjLyy6qa2nqGphZWZnYsu7RJACkAMwCzAAIAAZYAGhaAB+ABkADNoeCAAEMBEsOieUDsdzAcJcNGYuLvd5owlvegMdzvVgUlh44DMPHBABQcQA4MAAJBcKlUjwouLAbkc1hokJ0QV8rgAUHi-IYnBp4s5rF8CpJIVZKu53PFnmxQv5dEYwp5NDRptiRpVKqAA", "AAEAjATAdALMCoAlAlgF1QUwE4AICyA9gCYYA2OAyjgEQBiyAdgNbXACA7wXAYF1x8F58+ITsPEcA0AHUoAeSgBmHBEUAGABYAHBMAC4wAKD8uAYHEBIYADg+AeHGO+Af+fAA6MAA4T334nAMvJKKurawKbS0gCSgbIKyqqaOlwAQOwAggDjWgAlAAIAZQBmxcBWbAD8pcWVADIAMwCzlQCZrQBZTqLC5sCu-ukCwulm-n7DwpMco8AAsOVijgAwi5N9EQEm-huLs+N8VgeOxhNiovvil067ABDHvX4A4A+bfLuvThymHNyTJmwOEC+Nc+P9PgcgA", "AAEAjATAdALMBwAVAFgUwDaoE4AICiA1ugJYAOAzqsAIDADAwjAYI6826yB2y97x1zYAoVvx7dQEjgCBgAJABC2AC7IAhjgBiEAAx6cEAKw7kpYACxgAXAm02AFEmN4UjgGgA-x+ABMa64CA2kUVdS1dfSMTMzoAdViASXklLFUNbT0dA2NTDmoAQQAagBmAWYABADz7AG8aYCYAfgAZMsaAAMYO10FWWjdRKTFk0PSIrKjcyxtuO1ZHXpdA4E9vPxnlzcZglLTwzOzo+nikkNSwjMicszYCkorqutom1tLu4HeJXu2V+uHBtiyWhzeog+qMAAwW2hPx+c2BfXBoMR8KRtFkywx7CxAFpgAAMAJ4wkcBiMb5owJkxgASGAAFAYcA6UyGUFgBiuBSHMtqcAABBMvkcADg0L5wtZrFkGKYCOo8tuXiRiNlNAVCuRfWVYI5sKlyyAA", "AAEAjATAdALMCIBZAlgFwM4GMAWBTATgAQCSA4oQFICCAtABxjACAwAQMBwGAc9e88h+vbkJH9BQ-iwBIiXMgKEA8jnSEIhMADYADNgAOwABjAAuJJa8AUMADAPADCShAcAD-AP+AAEYABRnQKCOGTkFIhVsNQ1tPUNbAHUE4mBZeUVI6M1dAykqABCAGYBZgAEABJ4WTgB+BKsAXhqAZlaagEz2gCzJCSrgFx57YJCh-nYOYZH+Kemhy2BuCeAAdGAAeCC1zZmBKX7RoVmASDs5nlPzngBQIJZLPoXrEdmACCuz50G52dmP8bYXHuvGBVTcbmYQhYE04TDh8MhTyY4Mhzie-2CQA", "AAEAjATAdALMBwBBATgOwC4HcCmyDW2ABAMZRgAMwAgNbQGDCNPAPOMhue0AYASgBYB7VAENCAWUHpByAEYiAroQBakQmAr8ADsAAowALjAAwIxq1mDABBMA4Fy4B-x8ADQwAAgPvPs8D5CohJSMvJKqhDqmjrGAOqxAJL+AsJiktJyiipqGuTaTABA1Ig6wAACAAVMAJDUAPwAMgAzALN1AAGMHd4czObOPkVcQya+DiODfRaewLXmfg7zNMvTjKY1Y0wrtZtsAKA+86Cru8zrjDanow72u+fXV4smNHRHflRLW95vj75AA", "AAEAjATAdALMBgBlAggWQAQE5PAIB4PmGJIVJJAPNPwGQUMBpAVwCcBLAU1fQA1f0EAAxCAFgAdgAHGABcKiQBA5ABDAAwCTXVqASAD-+4ABRgABB2Wr5Og3QsO3PgOFjJ6gOoeAksHpp7Ni4efkERCRtkAGYYgAEASoBMgCzgZRAAfgAYgBmAWYyAAOIiq0pSZV1LfHwiGgJ8UnLQa1bSTTbqDuJ8ZWIq7UsBroobEkarbuAqvs7+ufIAUGsa4koJ6mUNka0F4inyAHAFqYPqQ0MGnXx1Wu2GiYnZ6nu91qA", "AAEAjATAdALMAQBlAggWQARjDOBAYAQMPgGDDkXBmXkj43nU1OUg1s34DoKGAKgCcAhgDsAzgAcA9gIAuAUwHoAkugDMABg0ALCcAAYwALgNCNACigKAWFMMAkAH-HwAHjAA2He8-y3XuiCopIyCkqqmjp6AMAA6rHKwDxogcLi0nKKKupaupzIAA0AxQDrAAIACRREJAD8AMlqarUAAeSt3hzVwPZ29FScxEOU0RRsRJQT3ZM0RFPk82YU+FMAmMAAcD6GtjSj5ACgg36m-fvkvYs++L2+pkcLDPj0494AUHfnCHd73gDgP3IXy+3mc3hWwGipH6y2I-XhdgmZFwz2ewz8YKu9BhgNxQA", "AAEAjATAdALMBwAVApgSwMYAtkCcAEAsgIYC2JArgC7ACAwAwA8AGDBt1utveg-ABQ3LrSF82IMaPZS+EyTwl4AckUqoA9gDsiAG2QBnQusrqcAIwA-OdXgAiAWgDsANgAMeMAFZXmAA7AAXECRHgAgPgAIJjYAUHk+YQB4YABoePT0umVVDW09QwJjU0trOyc3D28-BgB1GoBJYGy1LV0DIxNzKxsHF3cvH38eGgABAGeAZgmRgAbucJAAfgAYgBmAWcWAAbZFgEwATIAsyTl5lhkM5ty2gqKu0t6KgeqgoI5znijGWIzObmSaT+wO4WRULTy7UKnRKPXK-Sq-nodUa11a+Q6xW6ZT6lUGfFGk2mczYCxWG22u0OJzEZ1JFzowkkHzRkLuMOxTwR+LeIU+3G+3DifySqRB4rBOXRUPusJxz0RtQaTXBNwx0Kxj3heOqw3GU1m5yWa02O2A+2Opz44VYNsy3FZt0xDzhuJe-l5H3pX2iwGFGVFQPFf0lEKdGpd8u51WRysd6tlnO17oJ+uJRvJpqpltp1oujCZ6QkdC9JeGfJEXuA4TYABhgw3pOXm6CCW3yz8G52RDXgAAZYAAPHSYGAAFQxJ26XzO1W2N2AJAXEPcJeN-3MhSXbgAFGr6W7UWD3dbAHBxd36HPG-ua8wyzQH8MAP-PivSO+0EtP0Gv9-7-8b3kIA", "AAEAjATAdALMBoBZAhgW1QVwC4AIDKmA5oQDYCmATjgMIYDOWA9qsAICjADAwAYMP+359+IjqP7cegwb3H8QcrrIEjh4hXMkiZa0RvUqFAYgByyLAEtGAO2Tk6ORIyYUARgB+KjHABEAtADsAGwADFikOGAAHCEAFgAOwAC4wGBs4gBA4gCQSkLpiqoA-wB-wABIwADQhbV1KqbmVrb2js6Mbp7e-sFhEdFxiZwA6sMAksCNljZ2ZA5OLh5evoGh4SSRMQnirAACAM8AzIe7AA0iWSAA-AAxADMAs1cAA-wAfHePSjL6-FlqujqU2as3m7U6yx6a36W0SKTSMj+OTyskRih4pQq1XqOLk7GBM1aCw6S26qz6GwG2xG40mZmmLTmbUWXRWvXWm0GOwOxzOF1At0eL3enwe3xEv2A-3SgJ2IgJjLBLMh5I5VLhqQK-NEuW4+TRcgxZUqNVxZvSCtBzJJrKhFM51NGE0tRPBpLZ0MpsO5RxO5yR13uT1ewA+X24P0ysmltRkLqZxIhZPZMK58K1SJ1KL4BvERqxpvNOPx9JBruVyc9DqGTrpTUJCbdttVqe2oj2vr5AcFwZF4a1kulWlxCnYiLH7YzE9EeuAAFgi4ul8varOi2v2Fl+CFgABUOppffiWeSmSzmRnrOy+q5JcAUDq0-018Ka7XAAhF2vtMAAODmt8LxXKUxCkVgx3YCN2yKIoQK3AMhHAtgkKg7QYLgmcVGA+ogA", "AAEAjATAdALMBoBZAhgJwNYHNXIGYAIAVAewBcBTAO2wBOAjc1fAQWAEBgAgYHgMB4F9BAkMMH8xE4aLHCOAfADqxADYqAzhQCWldDlyl8i5JnIALZBqL4AzADYADGYAOwADjAAou2HdBABFABADgfWQEASAB-qOAAEmAAVHCU1J4FZTVNch09PENjUwsrQltHF2AAYEVFAElgJVUNbV19ApNzS3VreydXQTZmXGGAAQBKgEyALK5gXgB+Cen5gACeeYAYgBmAWarZnhkBbgi02Q4OMT9gAFAz+6v7659rgGRgABgwsQAkT7FKgJAQMBJcUsCeKdnmkTg9hHcUhw-KJoXCeBDgAAINH7cIAcDhlTBGJxwkBRLmYNB7Au3ypgj8-DYF1pVLYMQOIOxlO+PlZwA59JBpIeQA", "AAEAjATAdALMBIBpATgUwK4C9XIAQGUAHASwDtSBbYgGwCNVgBAJ4VgMFdeeA885D6DOzAKj4AxgAs0xengAqAcSgBJABq4wAZgAMkwsAAowALjAAQFyt8OAKE4AIIc+AB-gL-AAsEZd--VmJSMnK4Sqoa2noGAMAA6nEqwEHSqLI4Ycrqmrr6nJaMAIIAvoQAJQACANlaWsAAkEwA-AAyADMAs62dTQAB+SzGAnzcrq7+MSyC3MCTM9bC01OLi5asANAN-puNgnOrQgLDK8vznJOcuwFCV9d8AKDAj372oMt3QhesTh+sX0IAcF+-xiZ1+S1BPDBzEYMxma2cYPBASAA", "AAEAjATAdALMCwBpA6gAgCIEsDGBrAFgCcCuALgKYBOwAgLcAwGAMN3DMssic8sBAwAKgBlAIIBZVImKVMVVAA0AkitRgAHAAZ8AB2ABMYGF7ABnAJDAAoC0tsTTFgCRgAeAcfPrIWMnTZ8sqqGtp6AMDIyEo+ElIycpSKKkpqWro8NKIAzDkAAgCZ+QBZpqAA-AABDJXVADEAMwCzwGH0AFCgPAIc7A7M9iKx-glJwWl6hsa8ZrbWs-Z9zm5eK7x0g37xgcmpoS2R0RtxAYlBKSHpnJk5WQXFpSA1wE9lDc2tdB3cnN0sPTz-Up0BbArpcVYrBYsUH0GYABGAABhPAjkTxWgwMdD+CZ7FjgJYZhDLBDODYPDDuESeAAIFb4umkloeADgpPxHyZDgENLojCh9Bo9hoAH+RfQTGE+QLgWw6GLSg4BVzPEA", "AAEAjATAdALMAIBZArgZwBYYIYGsAEAKgE5YCWAdgKZHACAwAQMMwGDPusfshccv1c2vHry70AWACUA9gCNkRPAAlqWNADNpRACbVqeMAA4ADOgAOwAGjAwwIQIDAXAFAJ2AGDqiuAf5-AAJGAACG8w8OYJGXlFFRINLV0ifSNTCwcAdQyASWApOQVlVQSdPUVU83YmWgBBAATmAAEABvYAUEYAfnUezoAA5n72J3oAClBI+idgPwjvJmYOueWuBYi1rwFgAFxAxg4t3i36Q65p5gBIFf3L644l70OeU5WRBy3Qu-PeAHBr7++dxm-hOjHo-COdFooNmawWAheQPCQA", "AAEAjATAdALMBIBlA9gO1QU1QKwCcHMMAnAAgAkBXAWyowBtgBAJlgMGA5eHc85F4GdmANBTosVZABdkpAKIBxMgGYSECAAYAFgAdgAdGABcQcADAAgPDAAkJwAQpwfAD-AX+DCETn744ixTFRJGXklVXVtPQBwAAUASzQMYk9AiWlZEkUVNU1dQQBBAAKOAAESjgAgUAB+AACOGoAzFvrOauYIUCFzb1NmXgGWIf4OCzHeoYsprmBq6c4Fqt52DuAAGGBHAWZmTe3ece7Bnt8j236-Oz9TAFBfZmiOUdmhm96Hd8OfJ5vmc6WPhcLh8u3MzFYb38TCG-1m8KhXy+QA", "AAEAjATAdALMCoAlAlgF1QUwE4AICyA9gCYYA2OAggEIAWOAogK6kbACA7wXAYF3z-z4hBIzgBQAygGMaWDMgBG2HABUoASQAaOMADYADDQAOwAMjAAuKC4dgAIEEAIYAFg+ASFFeuABGBjvQMCOSRk5RWU1LR0DY2AAYAB1RPV-aVl5JVwo7T1DEy4HNgoAQIBMgCyAATLK4E82AH4AZwBmVsaAAK5GgBiAGYBZ+04APGt+B2AAf+nAqZF4viWg0RXVwXXOBb8AKE5RAHhgfc3lwVsD7y2Gjf5PO-4AUGD6rmFLm28AcEX+Z0eCR+jy2W0BIg4U24HE+MM4HFmIy8n3BqyAA", "AAEAjATAdALMBwBBANgIwE4FMDGALALgAQDSArgOabLACAwAQMEwGBNsvtsifus9+duPTnQDIAWUwBLTOkIB1KQDsAJrlKrCAdgAMuAA7AAqMAC4wur2ABgNreGcA4G2fOH7j7WATpshcrUNFW09Q2t5eQBJb0kZOUVVdU1dAxEAAQBJgEyALLSAALY6EAB+LNySgDKAM2qSgBkAGYBZ4SEi4DdPEQ72extuiyGOy2AAFGAAGB5GB1HZ937gAEhBplHVtfYAUA9R0GEFwaWACC2mJactpcvznrZmOn2nrzoAf7eGd3277qA", "AAEAjATAdALMC4AxANgVwOYC8CmGDu2ATgGYAuAtAHK4DOpAhgCakAEA0gPaE32HACAwAEDBRAMFGTxUySBlSJ8xTLnyZggAgBRAJYA7Gl1YBZAEoswAVgAMACwAOwAFgI1gqQHBgASEkBoNXkAYAB-kOAAeGAAVEC4+NFNXQMjFjMLGwdgIIB1HIBJYG19Q0ITcys7R1EAUAEAQTwAHQBKAAEAAslffgB+AHEAOoAUXuJx3oAYgBmAWbVVSUEghOBlRIFhGRFRRdX4nYTDzcOAJGAAuIBEC+DZdSWEle6t-Ze3qTq4wXc5d0fRMdAs9RAAID6iEHyLxvKFQiHyERBQRif6Pfj-TGBHYSDFSH74sKbB7EhFvIA", "AAEAjATAdALMCwBpATgUwK4C9XIAQC1UBjAa1WAEBLgaAwGhuxhkZt6gJACEcAXACwCGuAGJgwANgm5IABn4AHYAAxgAXHZVGACGABgBgFB2bAOAB-88AAwwANAnHTmlW58ho8VJkR5SvQDqAQCSwG7IAsJiktJyiswUAIIAaABmqQACAAkMVLQA-AAxADMAs-kAATSVjqyMVKbOmtRaDABADAZNbB1NvS7A-QBQwACQTiPjzF36CbnUA4wzY4PdjFNrRk5UWqytm0s6B7MmjWvLy8dzenn7AxStj453V05AA", "AAEAjATAdALMCIBZAhgJwNYHNXIGYAIBlAF1QFMBLYs1YAQHuCYDAm2X22ROfGB0AEoALAPYA7ZPkQjiI1ACNkAV3wAtMGHwAOAAxCADsABIwALjAAQEwaN23ABBdevAP8vgjgFDOfv68EFRCSkZOUUVdU1dA2AAYAB1eIBJAOFxSWlZBWU1DW09QyYrOgBBKFxcAAEABLYASHoAfgAApha21ududhs3X1jnKyK-YZGh-3GGxx8pngGmebYbWxX2ReAG5ZGmBu3OAFBfBhtuznWR9em9uJ8AcGv18+ueBiHmZZtjnputzl-nkZAA", "AAEAjATAdALMAIBZAlgFwM4GMAWBTATgAQCSA4oQEIC0A7ABzACAwAQMOwGDveffPsgeQrkOAihg0UObwAosgB26APb5UhRIkJgYABmwAHYACxgAXCn9uAcGABIbgGgpogMAB-98ABwwACgugUHsMvJKquqa2nqGwK4A6vHECGEqahpaOvpG7ACgTACCANYAoQD4AAIABdwOjAD8pAB1fvUAZh31ADEAMwCzUpJ8cdyuwcPMVuxsAkzS8zxTrHOLQixWXDPAAJjAAPBBuwdCY7OrIRMnPA6n47V3ovmBk7NLVk9Bt8AAEA+jgbYHl8vn9LMsxEs5lNGJ4VudIaDgkA", "AAEAjATAdALMCoBZAPwG1QUwE4AICiAHgA7YCWAthgHYAuAhqjgMzACAbwnAYJ7937xADhHACgBlAMYALLBlIAjbDgDyUAGoBJTTgCsABmlFgo4AFwOl9nwDAwAKC87I4QH-XD4AAgXvv53YJGTlFZTUtHQMjYBsAdVjNEylZeSVccO09Q2NOACA2AEFeAAEAbKYWAHA2AH4AGQAZgFmagADONt8hPmt3fxd8vP7gQf9c6w4JgDhvYQm53nYlkWdOAEhhgN4Nzb5HX3nugVX5l1XZ3Zjfas3z88uDh8ugA", "AAEAjATAdALMDQBlAYgdQATIDYEsAuAXgKYBOwAgBcNQGDX20P0hOtUAoiAxgBYlE4ARqXQAZKADUAklPQAOAAw8ADsAAIwALjAAQNUpUGLABDM2bAP8Bf4KYCQ5x0-3BOvfkJHjpsxSuAAwKioUq7cfALCJGKSMvJKqtR65ACCAHwAZhkAAgDuAHXswADgFAD8AJkVAFllogAzALNlAAGOLAwGFhZOAeZ6SfQGQ-QDzmPAdGMOpo4zrH3UiyMuvQwOw870DlusAKBOlAYdTMu7Z7O7S46lV2dnV86bj1dAA", "AAEAjATAdALMDIBlAYgdQLQCUCGAXAFgKYB22ArgAQByAlgLYBGZAzsAIDvBcBgXfP-PiEEjOAFEQBjfACdCNBoRkUAMlABqASU0UAHAAZ8AB2AAEYAFxgAIC4dO-YQAgho0QH+Av8BcBINwGBdsAS0nIKSqoa2nqGJgDAqKiaIVKy8orKalo6BsZ8tmwAggB8AGZlAAIA7gB1YsAA4OwA-ACZbQBZLSoAMwCzLQABAcL89u7uwPFBIrZcM7NLHPPAAJjAAHBNbhvbzXyLoGwc9pyrbkfA-ldL-kuCAKCBp1zCZw+Cixwun9MBByWV1uf0EHHMwG4H2CHzYkwcomhoKCQA", "AAEAjATAdALMCwAVApgSwMYAtkCcAEAYgK5YDOwAgJcDQGA0N2MMhXPNUBIAsmrngHkyeCHjAA2AAyYADsAAYwALjtqjAFDAAwAwAwq9gHAA-wD-gABGAAUA3fs0uvVPyGZSIsVNnaA6r4BJYB4+fDcPUQlpOUYKAEEAEIAZgFmAAQAEhipaAH5fdQBeXIBmMtyATIqALNUQDmBDB1U2YAAgZg6aHWb2VtjGei7gfQBIezH2Hu0Gxwdp4HHe5iWHfuAAUGbNUDVs5e7GAAgDw4Mm5YWFu2NjOyoqLRz16go3hlu9vtOfoA", "AAEAjATAdALMCIB1ApgSwM7oASIE4EMBjAawCN9d1CALYAQHsYDBhW3gX3WQvfGAMAErUA9gDt8WALIiALiNzkArlgBakLGDAAGagAdgAFGABcYAGBWDRuxYAINgHA+fAP+vgAaGAAEF-4CrYCFRCWk5BWU1DS1dA3NERABJYOFxSRl5RXwVdQhNHX02ACB6AEEDYAABAAK2AEh6AH4AGQAZgFmmgADWHv8edmt3ANK+MYtAlwnR9kseBhYWayGONa4GRfW5xh4AUF5BydWggMsGmymLq64D-03uS5uuc9YHZ+O+ZxvzFdePvgMX4cFZsTYrFYzDYAj5AA", "AAEAjATAdALMAYAhATgQwK4DsAEBxAgtgOS7oA2qAzgMYAWA1qpgPaYCmRwAgMAEDACAYAJFDRIkONHCpM8ZKnieAFADKdZGwCWAIzbJsAeSgA1AJJnsAVgAMtAA7BlwALjcBPd6IDAwAKAivopSAP8h-sAAEMExsR5O6rSauvpGphbWdo7eAOo5Zgka2noGxuaWtg4i-Fz4IgACANkAzM3AAODcAPwAMgAzALNdAAECIzEKIp5hUVxz4kFeAvwCAXHriosbgaI8K8AA2MAA8LEAyMAAUFKTk-H3MVsAkMBbGy-bomvBPJ6Snp8FqJooDfL8JB1Pls3oCfrDAUA", "AAEAjATAdALMBoAlAlgF1QUwE4AICyA9gCYYA2OAGjgEQBiAhqQNYbXACAHw3AYN952B9+-EFxETOALABCWDGgBGAVwDOAYwAWOADLJFZUhhwByAMwQADJoAOJ4AHRgAXHH8AwBIDQwAFD9-CSDuAH+AT5dgABxg2LjJYFl5JTUtXX1DY3MrW3t3AHV8gElEuQVUFQ1tPQNSI1MLazt+TnYAQQA2gF4ARwABAFibABLgAEgOAH4AcoA6gBRJgBiAGYBZgD4ATK2ALOCxEU9gEJD41qCAIA94uMEEluBr7gBYcbcJABh3iWPgP4Ej3iAImz1uIgm4KCAFBzuIxGCoUEAQAIJE3WIAcHRAIB6OCnHcnB490e7Au90RD3x6KAA", "AAEAjATAdALMBIA3A9gOwAQFlkCcDmAphgOoCGANgNYA-OBwAgI8CwGAsducchPfdMAyAGUAgpnQBpAK44AlgRzoAGsvQQADBoAWAB2AAcYAFxmnAEDcAEMADAHG-34BIAP+vgAFGAAEJ-4CBYBFxKVkFJVV1LT07YmIASWCxCRl5RRU1TR19TgZRAGYigAEASoBMgCzgSxAAfgAYgBmAWbqAAJYOgJBuS2dArjyOPg5LFnsWUamglnGzEbHOdkngAHhgAGhAmwAoflG9-lXe4ZnA1eABwadrvsGAUECmfdAF-lOLzhtLdhvL7gAcBuHEuAJB03czFsTFY0xmDCYSKW-nhIPRwCAA", "AAEAjATAdALMCEAJArgcwPYHIDOACAsgKYAuAhgDbkCW2AxgBaF4BSpqAJgGbloBehaeMACAI4OIBg48aOBTp0kAuXTRAdABChAE7F6pXADEwMAGyncAHYBGO3GAAcABnoAHYAAxgAXBViFADDAAMDSAJB+KmEA-wC-wABIwADIkWnpMsCaOnoGxmYWNnaOLu7BAOrlAJJZWrr6RibmVrba9s5uysIAgu7AAAIAKbwAh2ISAPzYAMzTE5wL8wt+SgqiEX6ycv5iolvioQc7mWvKAEDHlxfhYgCgwADwwBHXR5FbH36H4hsZUX9+e4KVYrS77P7fYAACABCkhygA4LCQnC-uDlNFomJgqIJOi9p9xK8VOjkX8gA", "AAEAjATAdALMAYBlA9gO1QU1QKwCcHMMAnAAkQwEsAXLAdwtQBNjgBANjgMGB9+G748QgkRwBIAIWJUAFgEMSAMTAwAbKpJgA7AAYZABwTAAuKPZ8AMMADAvAJCiRACAD-AP+ABEYAGRH-gJ52SWl5JRV1TV0DGwB1WIBJYBCiWQVlNQ1tPUM+VgBBXIABABSALwBDrgB+ADN6uoaAAP9hPOAnQLNeWz4AIB6bDh5bcyGx9lHeMf5QXk6AcADhJcEBoWBVvl6OzZE24HXp44Cd4Ad+rvOrkQBQAMmNmeGbs86bkf8trrOzj+7rOxOM8OKwJrwjiIQf9AkA", "AAEAjATAdALMCIAVApgKwIYGcAEBJAdgC7IBOAxsgA6ED2JwAgI8wGDDsfBufsg--MAhADl0hAJY186ADbIcAWRq0SAIwA-JGtgBKAWjBgAnAAZshkwAtKwABjAwzJwCAebAJAcAUAN9MA0MAA8L6hYUzwAIIyEoQArgAmyNiIllqEhHIOqeI4yPgA5uL4yZZY2ISWyQDqAKIACthxlAUk6EnYYtjRsYny2CZ6RlBCohJSsv1KKhpaugbGZhbWwADA1dW4wCJiktJyisp0s9r6hqbmYFY27KuMkQB8AGZPAAIAAxyeDAD8ANQAUIA+D8AJmggBZPwAARwmExeDxXMAAP8o-gIta+Pi3OE8THsTHIpx49jE4AAcBJ8GAgXxJKY5MRGNJoTuXzCoU8-CZ-AAoJzQIiCYL+KtMQAIUWcdkCKnS8UcWVY0JogTwtZMFgi5gMDVEjhMnXS0VAA", "AAEAjATAdALMAoBlA9gO1QU1QKwCcHMMAnAAgAkBDASwDMqBnAYwAtgBAd4LgMC75-58QgkZwDoAIWIAXZhRIAxMDABsKkgB2ARsRJgAHAAZmAB2AAMYAFxRHfgBhgAYD4BIUSNcB-gL-AASMAAyB6hYVwckjJyispqmjqkBsZmTgDqaQCSwFFEsvJKqurausmmgmwAgmbAAAIAKQBeAIec3AD89ADMXe00-X39osL8HO7hIhxTggBAfC4uds6cXIt8c2urK8BzfLy7wADQwOOjfMen80IVfEseLm7bE1yXz1wAoGEcAOBcwndvFYPLgACEBWw8vzewOW4NCHCcHG4AM4bGmSwOkzh4KAA", "AAEAjATAdALMBwBBANgIwE4FMDGALALgAQAKAZpgJbLACAwAQLcAGDBvssfshceu-8uPXlzoB0AELoAhgDsAJkQDSAV3QVM6QgA0AagElCYABwAGXAAdgAHGABcEYw4AIYAGB2rkVwDgAf79gACRgAARvCMi2cSk5RUJVdU0dAyMzS3cAdUz9YEkZBWU1DS09QxNzKw4aRABmeoABAEqATIAshlAAfgAAtl7+vu9hdkYfKM5q0a4PNh4POjYF9mWlpmj3da3OReAAFGAAGAmpjcjZtgBIE95r3ZuAUGAniOEee5uOC+AvT+-fP5fT5RRhuOjMD5MGi7GHeJysaG0OjI6oBbZnSHAqJAA", "AAEAjATAdALMAoAVApgSwMYAtkCcAEAygA64BGueAHAHIC0AgsAIDPBsBgbXH3XIvA1vAJYcacvgBCUAJIANPGADMABkxFgAZGABcUGxatuAcGAAoLgAhBNtgFhgABFsuXLYaPEVp8xavXAAMAA6sEyCCKYYqgSeD4KymoabABAzPQAgQCZAFkAAlm5wACQzAD8AM5KSmUAAWxlADEAMwCzgvzchgD-3S5pggNBrjZD-V3AQwAwJQKGwACgwKa8gXy885uCa1ylIwJ7gvMCS64D-Mf7q9zWV2w7giv7gfMPdzYsL8Dsl6xMWyxAUd3iCgA", "AAEAjATAdALMAoBZAhgJwNYHNXIGYAIAVAewBMBTAZwCNiAXc-AYWAEBgAgN4AMGH4G9BAkMMF8xE4aLHD2AIgDqxADYrKDAJYA7dDlx18ANXKotpTZlP4AEvgDMANgAMACwAOwfMAC4sroIAsKACAKiyYgAQAP-RwAAkwACEEalp-ArKahrkOnp4hiZmuRZWqLYOLh7AAMCKigCSwEqq6lq6+oWm5pbWdk5unoKsAIIABfwAAgADAlw8APwAmgCZAFkL9lsLAGW4uLIyc8CR6bLs7GIBwACgZ-diNQ-CTwLs1-DAAHBpnz8vIjkb3OAle-AAkJxnuxIWlLsI7ql3vxREcxAAoJH8V7sU7PWqpADgzzBBPS8NksShNXYPApGTY8KZEQCfFYFwu3DeVPpXN5+PSQA", "AAEAjATAdALMAIA3A9gOwAQFlkCcDmAphgAoBmBOAJsAIDADgwAwMAGDAd0fse+h+8WrLlzYCOIcczYjePAZPFDeo+X0VT5qqRo4AoOSsPjdArcYVSBAIGAB0AEIUALgAsAhugBiEAAwAOX3QAHYAjCnQIAHZfVwAHYABMYABcKVs+AFhpDgB4KwEAaAB-gF-gAGxgACwCurq6RxcPbz9AkPCcSJj45gB1PoBJeyccN08fAKCwiOjYhL4aAEEAXIBMgCyAATXN2mAACAB+AACOI8TNo92NnRtgADQ5UT52USaxlsn2ma653uSaXEGV42RYeXqHBK5SqtUh8KMH3GrSmHVmPQSTAGwyRXza0063XmAmW622N32xzOwAuVwpJnuTzowk09044hewBBABR9osSQL+UKjML2aK+SLJWKpRLpXLZQqWJzlQJweyQahgAAqOqanWq3imEEgqxq4AASGAABgEbxLbbeABQBrqYAGKzEUCcvhmg4OnKWRgIs1m-0GjIsmhRui2F40YrFLkMiPR2gx2XxxMmjjOiP7USxxYJpNmeVhupAA", "AAEAjATAdArMDwA3A9gOwAQFlkCcDmAphgPKE7ACAlwNAYDTVcPQwyKxw1QEgBCBOAC4ALAIboAYmAAsANlnowAdgAMwgA7AAGMAC4naqwAwwAMAMAkAc4AIAP8A-4AERgAZGuevjYHwEjxKTkFZTVNUwB1CIBJX34hMUkZeUVVDQ4KAEFNYAABABSALwBD6loAfgAzaqqagADPdlYqGy4fJmZDag7Wcxom70GAIEHgEYZ6ceArVs8AaGAAKDHehj62ny916YYpwatRjgBQLyo+9h7D1YZZq+2OAHA7jvurzioAFCpaS+6qf5WPSBbxBQA", "AAEAjATAdArMAIARATgTwIYBMAEB7AZtgBLoB2yAlrgC7B0CAdwAYE2623SJz8IwCgBlAMYALXABsAXtgAyAVzEBnbAA1sYMAAZRAB2ABMYAFxejNgFBgVuh16cA-w+ABoBPY+eGwIWMkyFZTUNbT1gAGAAdUiASR8RcWk5RVEVdU0dfW96AEEcgEyALIABAGyAZnLrYAAgAH5ZABmAWbr8drqAGJbebjZzJy97GqZw4ABwTkm2aaZGWe8mVjGxgAgJ+zHWOzmI0H3OMboj3cWPE+AASD4hzmvbzht7ea4bh94L9fe9+wWvcPMP2+XkBwNuQA", "AAEAjATAdArMD4AVAFgewE4GcAuBDAJgAQDKYAshAEaEBExAxsugKb0DWzAdpgOa7c1gAQGAAgYBIBgEmVNkyQI+VKWzpykMuUiAKACF0-fNkIAFXNnQBLVCYhgADMgAOwAHjAAuFvGyA0MAAwDIACFrKAOAA-wB-wACowADY4alpEroGRibmljZ2ji5BAOrFAJLA+oacxmYW1raE9k6uskIAggAxEgACAC0AMwCzwsCSAPwAZABm0+MAzIvjAJnLAFlamrLiETK+GamqqhJboOnnEsEX8lcH+wAwwABQaY8vNzK34iIi++G3wAAkGJrjJgaCZABQNIiK6aP6gpQAgAQEKCqV212CSLRqWCAGQRJJjhJvj9hFEoqMfCpRkJycchJTqW1gAAkWks74yETMkms3HXIA", "AAEAjATAdArMBwBlALgJwIYH2CmA7A1gCcC2ADgGbarACAtwDAYAy06yyO1-QNADqUAPJQwAAjAwADAAtSwACjAAuKAZ1gAIHYBwYDxYAIbtwD-J4AHhgAJGN37avQOFiJMuQGA+fAJJOhIuJSsixaNACCABEAMwCzAAIAOXHAAJC0APwAAQzZuTnGnKxawGbAHsYV3CXl9KzqLA0MYexNmg3pWgCgwACwacY9+unsVbX1jQ5jAw7c6W2zPXZ0JZwLs6zTRhXTdrusuhvjDPtHXOp0jAt0NA00ZWM1jmcvwEA", "AAEAjATAdArMAwBZAhgJwK4BcAEAlZAlgCYCmqwAgMAEDB0BgdTDzTIrzjHXr7HrVACgBlAIKJsAaXSoCZbAA0AkkuxgYABgAWAB2ABMYAFx+VZgAhgAYCaX+rHgHhgz+2-eVgI8VJlzUiipqmrrWAOphSl5iEtKy8sqq6tp6zBSiAMxZAAIAmbkAWTSgAPwAAXTllQAxADMAs-x8TFQ8bm2eVGZMtHTsNt0DTEN0I55j3cAA4MV0AJDACwJMANCLHDZ03duzbpvzHmmeS4esAKDuk+yTHgBQG912p6NuM8-71s+HtCCtN507Lb2XqMChdLqeFoAf6hu16Zn+X0OQA", "AAEAjATAdArMCIARAYgIQASoDYEsAuAXgOYCmA7vniQE7ACAwAQMCwGAsduccj3df92-Xv27MAKAGUAxgAsA9lgLoAMgFc5AZ3QANdGDAAGWQAdgATGABcUQ04BQYI4GjuAf7fAA0MAAIrgMCWBik5RWV1LV19I1NgAGAAdUSASWBQhSVVDVltPQNjM2D6AEESgEyALIABAGyAZnqnJgB+FQAZgFmWgDM+loAYrtERDjsPYCFXO3SZTIicvJjCi2tbbkdnSaCOCZ9-HcOx2bCsyNzogrik1JP57Kj82KK+OjKqusbmxjau3v6hp0Rtxxp4pusxBx4kdITtmHZ2MwWAA4YAAWECqIx3GhLFGxRYSL4BISnAAkEwYQwKTCOFt1nZRkTaaSOAAIFm40QAcBhXNZLOB8QYrBmxzoMzoEzF5JFMteYulnBm8Dl-AYEuJoC1sPYEslOqlnnldnlgoCQA", "AAEAjATAdArMBwBpAWgWggAgLIEMB2A5gK4DOALgKZ7ACAwAQMEwGBNsvtsifus9+duPTnQCoAZQDGACwBOFAJYAjCrIwAZKAA0AkgDUMYAGwAGaQAdgABGABcYHzq1OAKGAAINgEhhwgP8Av9bAAMi+4RFMYlJyiipqmroGxmaWAMAA6hk6wBIy8sqqGtr6hqYWbIw0AIIAfQBm9QACAO4AdQAowADgDAD8AJkDAFl96gAzALN9AAHhQmxOfn4RjMJroJFbTBur7HQbADDAPuEA0Cc8aWzX+4uRt0w+Ttt0p9vsAKARdE7cLzwFkwgUxHh4Pjdwr0og92GCIetgGk6MwATCaC8Xrt2GtWBjaL9nItlkS7qSER8gA", "AAEAjATAdArMBIAlApgIwK4EsA2AXABADICy+ARAGqYAOyATmcAIDPBsBgbXH3XIvA1vABC9XAAsAhvgBiYACwA2RfjAB2AAzjqwABjAAuIJbcAMMADAXAJCCBACAD-AP+ABEYAGQ7P32xYiYlKyCsqqmtqWAOpRAJIIonQS0nJKKupaOtxMAIJZAAIAKQBeAIes7AD8AGa1NXUAAT782cD2XABAflwsJrxdbFZWfcNco2xdVtxTndwA4MCTwACwwLYD-pbAANBtAjMti6wsG3Yza6zdm7ZXvACgvn2gl7f73O2vW3YLt+fnAk8BI5HD1Fix2IDjn0mMCjnZIZ8-EA", "AAEAjATAdArMAwAZAlgIwKYBtPoAQBUoAOAdmAEAKqAwYO+4WhukZtqgDACUALAewB2AQ1wBZPgBc+AJ1RCArrgBakXGDAAGHgAdgAFGABcYAGA6lKg1oAIegHB27AP9PgAaGAAERz9-ng3PzCYpIycooqEGqaOqYA6nEAkgG8giLiUrIKyqrqWrp0AEAUAIIFAAIABfQAkBQA-IgAMwCz9QABdB0+rAwWLsDF7ENsI2b+fcwWg-TTEzP0tCO2DlP0K6OzW-4jjuN0dZN+wIfHzACgvnOsc2fM+8C2d3QPzKtnD693A-6UJpTUW5UcjTcgDXZrZ5Q4BAA", "AAEAjATAdArMCIBZAhgVwM7oAQC0C0AnDFgAoAWAbwHYCWAHsAIBPADAwAYMNz57zyG7N+PZgDQASgHt0AUwBus5ACcsAQSoBrKaiwAhLGAAcABjIAHYAGxgYEW34AoYAAgeASHtfmAJGBivQKChf2k5RRV1LR19Q1MLNgB1RIBJUJkFJVUNbV0DYzNLEMY1ADkAM3KAAQBS8wAS4E9GAH5K8paAZoBmbrbK4AAgIYF+dmAAf4mRYRZZnnGHYPth5dWQ9a5PQIA4JpFF9ZDjwMX95ZFtniPAgFAg5kFQEYuvM7duJ+D2G+4AcFebEYwjOgPszFYzA482Ks1m6xhMLByyAA"]}`),e=JSON.parse(String.raw`[{"name":"Theler Kobra MD","cost":37,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":2,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":22,"Toughness":10,"Structure":51,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Kreuzer Spinne M3","cost":32,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"3","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":109,"HandlingFull":108,"HandlingFullwBombs":108,"MaxStrain":21,"Toughness":16,"Structure":60,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Ritter Model F \"Singvogel\"","cost":28,"upkeep":1,"bomb_mass":5,"escape":"2","crash":"-1","stress":"3","DryMP":4,"WetMP":5,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":12,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":8,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-6,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":99,"MaxStrain":24,"Toughness":7,"Structure":38,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":4},{"name":"Markgraf Zerstörer B","cost":32,"upkeep":2,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":7,"WetMP":8,"WetMPwBombs":10,"DPEmpty":20,"DPFull":20,"DPwBombs":22,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":5,"StallSpeedFull":5,"StallSpeedFullwBombs":7,"Overspeed":28,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":1,"HandlingEmpty":91,"HandlingFull":90,"HandlingFullwBombs":88,"MaxStrain":26,"Toughness":10,"Structure":52,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Theler Drachen","cost":6,"upkeep":0,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"1, 0","DryMP":3,"WetMP":3,"WetMPwBombs":3,"DPEmpty":16,"DPFull":16,"DPwBombs":16,"MaxSpeedEmpty":10,"MaxSpeedFull":10,"MaxSpeedwBombs":10,"StallSpeedEmpty":2,"StallSpeedFull":2,"StallSpeedFullwBombs":2,"Overspeed":21,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":4,"Stabiilty":1,"HandlingEmpty":91,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":3,"RateOfClimbwBombs":3},{"name":"Living Grove (Farman)","cost":24,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":20,"Toughness":9,"Structure":45,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Rathenau 7k","cost":14,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":3,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":19,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":9,"Stabiilty":-2,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":20,"Toughness":7,"Structure":36,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":9,"RateOfClimbwBombs":6},{"name":"Braun VJ","cost":13,"upkeep":1,"bomb_mass":0,"escape":"0/0","crash":"-1/-1","stress":"1, 0","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":21,"MaxSpeedFull":21,"MaxSpeedwBombs":21,"StallSpeedEmpty":7,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":23,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":-1,"HandlingEmpty":79,"HandlingFull":77,"HandlingFullwBombs":77,"MaxStrain":20,"Toughness":6,"Structure":32,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":12,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":5,"RateOfClimbwBombs":3},{"name":"KW-S1","cost":29,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":17,"DPFull":17,"DPwBombs":17,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":-1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":32,"Toughness":11,"Structure":56,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":3,"RateOfClimbwBombs":3},{"name":"KW-S4","cost":42,"upkeep":2,"bomb_mass":0,"escape":"2/-3","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":42,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":-3,"HandlingEmpty":96,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":31,"Toughness":22,"Structure":51,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Ritter Model D \"SeePfau\"","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-2,"HandlingEmpty":103,"HandlingFull":102,"HandlingFullwBombs":102,"MaxStrain":26,"Toughness":5,"Structure":28,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Teicher Möwe 13S-J","cost":43,"upkeep":1,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"1(0), 1(0)","DryMP":7,"WetMP":9,"WetMPwBombs":11,"DPEmpty":18,"DPFull":18,"DPwBombs":20,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":13,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":8,"Overspeed":24,"BoostEmpty":2,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":8,"Stabiilty":0,"HandlingEmpty":97,"HandlingFull":95,"HandlingFullwBombs":93,"MaxStrain":38,"Toughness":31,"Structure":80,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":13,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":1},{"name":"Ritter \"Ersatz S\"","cost":25,"upkeep":2,"bomb_mass":0,"escape":"3","crash":"-1","stress":"3","DryMP":4,"WetMP":6,"WetMPwBombs":6,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":5,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":21,"BoostEmpty":5,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":11,"Stabiilty":-7,"HandlingEmpty":102,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":23,"Toughness":8,"Structure":43,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":9,"RateOfClimbwBombs":6},{"name":"Kreuzer Spinne V8","cost":29,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":28,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":11,"Stabiilty":-1,"HandlingEmpty":108,"HandlingFull":107,"HandlingFullwBombs":107,"MaxStrain":21,"Toughness":16,"Structure":60,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":7,"RateOfClimbEmpty":9,"RateOfClimbwBombs":7},{"name":"Hugo's Ganzmetall Wunderflugzeug!","cost":43,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"1","DryMP":7,"WetMP":8,"WetMPwBombs":8,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":1,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":8,"Stabiilty":-1,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":49,"Toughness":51,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"L&L Kessel IIb","cost":30,"upkeep":2,"bomb_mass":5,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":8,"WetMPwBombs":9,"DPEmpty":22,"DPFull":22,"DPwBombs":23,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":13,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":6,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":0,"HandlingEmpty":94,"HandlingFull":92,"HandlingFullwBombs":91,"MaxStrain":36,"Toughness":10,"Structure":52,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Ajeet Interceptor","cost":24,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-1,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":94,"MaxStrain":33,"Toughness":7,"Structure":35,"EnergyLoss":2,"EnergyLosswBombs":3,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":8,"RateOfClimbEmpty":10,"RateOfClimbwBombs":8},{"name":"Shamsher Interceptor","cost":23,"upkeep":1,"bomb_mass":10,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":13,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":10,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":6,"Stabiilty":-2,"HandlingEmpty":100,"HandlingFull":99,"HandlingFullwBombs":97,"MaxStrain":35,"Toughness":7,"Structure":35,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":2},{"name":"Bahadur Escort","cost":39,"upkeep":2,"bomb_mass":0,"escape":"2","crash":"0","stress":"1","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":101,"HandlingFull":99,"HandlingFullwBombs":99,"MaxStrain":22,"Toughness":21,"Structure":39,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Cheetal Fighter","cost":37,"upkeep":2,"bomb_mass":0,"escape":"0/0","crash":"0/0","stress":"2, 0","DryMP":5,"WetMP":8,"WetMPwBombs":8,"DPEmpty":19,"DPFull":19,"DPwBombs":19,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":4,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":21,"BoostEmpty":4,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":94,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":41,"Toughness":9,"Structure":49,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":13,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":5,"RateOfClimbwBombs":3},{"name":"Markgraf Attentäter C","cost":32,"upkeep":2,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":7,"WetMP":8,"WetMPwBombs":8,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":7,"StallSpeedFull":9,"StallSpeedFullwBombs":9,"Overspeed":42,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-4,"HandlingEmpty":94,"HandlingFull":93,"HandlingFullwBombs":93,"MaxStrain":28,"Toughness":7,"Structure":35,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Königskondor L.1","cost":70,"upkeep":1,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":48,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":13,"Stabiilty":1,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":34,"Toughness":21,"Structure":55,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Von Morgen Vampyr","cost":41,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":2,"HandlingEmpty":96,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":51,"Toughness":21,"Structure":67,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Hugo's Einzigartiger Stahl-Jagdbomber!","cost":65,"upkeep":1,"bomb_mass":5,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":9,"WetMP":10,"WetMPwBombs":11,"DPEmpty":16,"DPFull":16,"DPwBombs":17,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":16,"StallSpeedEmpty":8,"StallSpeedFull":9,"StallSpeedFullwBombs":10,"Overspeed":36,"BoostEmpty":2,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":6,"Stabiilty":-2,"HandlingEmpty":93,"HandlingFull":92,"HandlingFullwBombs":91,"MaxStrain":49,"Toughness":50,"Structure":60,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":2,"RateOfClimbwBombs":2},{"name":"Theler Kobra MB","cost":32,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":1,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":94,"MaxStrain":30,"Toughness":12,"Structure":61,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Kreuzer Skorpion","cost":33,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":6,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-3,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":37,"Toughness":15,"Structure":45,"EnergyLoss":2,"EnergyLosswBombs":3,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"KW Adler N","cost":25,"upkeep":1,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":37,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":30,"Toughness":7,"Structure":38,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Markgraf Volksfestung A","cost":70,"upkeep":7,"bomb_mass":30,"escape":"2/2/2/2/2","crash":"-1/-1/-1/-1/-1","stress":"2(0), 2(0), 0, 0, 0","DryMP":17,"WetMP":23,"WetMPwBombs":29,"DPEmpty":65,"DPFull":65,"DPwBombs":65,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":32,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":3,"HandlingEmpty":71,"HandlingFull":65,"HandlingFullwBombs":59,"MaxStrain":28,"Toughness":21,"Structure":107,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Arntwerke c.7","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":-2,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Mitscher IG J-79SF","cost":11,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":2,"WetMP":3,"WetMPwBombs":3,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":20,"BoostEmpty":5,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":8,"Stabiilty":-6,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":25,"Toughness":5,"Structure":38,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":7,"RateOfClimbEmpty":10,"RateOfClimbwBombs":7},{"name":"Recht Luftschlepper","cost":22,"upkeep":1,"bomb_mass":10,"escape":"0/0","crash":"-1/-1","stress":"2, 0","DryMP":5,"WetMP":6,"WetMPwBombs":8,"DPEmpty":25,"DPFull":25,"DPwBombs":27,"MaxSpeedEmpty":12,"MaxSpeedFull":12,"MaxSpeedwBombs":11,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":4,"Overspeed":28,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-4,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":94,"MaxStrain":46,"Toughness":10,"Structure":52,"EnergyLoss":9,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":15,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":1},{"name":"Ritter Model Cj \"Spatz\"","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":0,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":26,"Toughness":8,"Structure":40,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Theler Zweihander","cost":40,"upkeep":1,"bomb_mass":0,"escape":"-2","crash":"-1","stress":"0","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":7,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":24,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":3,"HandlingEmpty":100,"HandlingFull":99,"HandlingFullwBombs":99,"MaxStrain":33,"Toughness":21,"Structure":33,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Mitscher IG J-83 Geistliche","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2/0","crash":"-1/-1","stress":"1, 1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":23,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":2,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":94,"MaxStrain":38,"Toughness":9,"Structure":47,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":10,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Arntwerke d.13","cost":24,"upkeep":1,"bomb_mass":10,"escape":"0/0/0","crash":"-1/-1/-1","stress":"3, 1, 1","DryMP":6,"WetMP":8,"WetMPwBombs":10,"DPEmpty":22,"DPFull":22,"DPwBombs":23,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":12,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":8,"Overspeed":18,"BoostEmpty":2,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":5,"Stabiilty":-9,"HandlingEmpty":105,"HandlingFull":103,"HandlingFullwBombs":101,"MaxStrain":45,"Toughness":10,"Structure":53,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":12,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":2,"RateOfClimbwBombs":1},{"name":"Rathenau-9c","cost":13,"upkeep":1,"bomb_mass":5,"escape":"2","crash":"-1","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":5,"DPEmpty":9,"DPFull":9,"DPwBombs":10,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":8,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-1,"HandlingEmpty":105,"HandlingFull":104,"HandlingFullwBombs":103,"MaxStrain":25,"Toughness":6,"Structure":30,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":7,"RateOfClimbEmpty":9,"RateOfClimbwBombs":5},{"name":"Gernsback 0012","cost":52,"upkeep":2,"bomb_mass":0,"escape":"-2","crash":"-1","stress":"0","DryMP":6,"WetMP":8,"WetMPwBombs":8,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":8,"StallSpeedFull":11,"StallSpeedFullwBombs":11,"Overspeed":32,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":13,"Stabiilty":0,"HandlingEmpty":102,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":32,"Toughness":11,"Structure":38,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":12,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Gegenbeispeil","cost":34,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-8,"HandlingEmpty":103,"HandlingFull":102,"HandlingFullwBombs":102,"MaxStrain":32,"Toughness":24,"Structure":62,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Universität Kobra M01","cost":34,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-2","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":3,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":30,"Toughness":13,"Structure":65,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":7,"RateOfClimbwBombs":6},{"name":"Teicher Schnelles Mammut","cost":64,"upkeep":10,"bomb_mass":20,"escape":"0/2/2","crash":"-1/-1/-1","stress":"7, 6, 6","DryMP":12,"WetMP":22,"WetMPwBombs":26,"DPEmpty":45,"DPFull":45,"DPwBombs":45,"MaxSpeedEmpty":0,"MaxSpeedFull":0,"MaxSpeedwBombs":0,"StallSpeedEmpty":2,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":100,"BoostEmpty":0,"BoostFull":0,"BoostFullwBombs":0,"Dropoff":0,"Stabiilty":3,"HandlingEmpty":67,"HandlingFull":57,"HandlingFullwBombs":53,"MaxStrain":34,"Toughness":16,"Structure":80,"EnergyLoss":9,"EnergyLosswBombs":10,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":5,"ControlStress":2,"RumbleStress":6,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Rathenau-16d","cost":28,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":7,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":19,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":3,"HandlingEmpty":103,"HandlingFull":102,"HandlingFullwBombs":102,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Braun DC \"Puma\"","cost":31,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":3,"WetMP":5,"WetMPwBombs":5,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":3,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":36,"BoostEmpty":5,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":13,"Stabiilty":1,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":22,"Toughness":11,"Structure":55,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":10,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":9,"RateOfClimbEmpty":15,"RateOfClimbwBombs":9},{"name":"Ritter Model S \"Fink\"","cost":38,"upkeep":2,"bomb_mass":5,"escape":"2","crash":"-1","stress":"3","DryMP":5,"WetMP":7,"WetMPwBombs":8,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":8,"Overspeed":21,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":-6,"HandlingEmpty":99,"HandlingFull":97,"HandlingFullwBombs":96,"MaxStrain":43,"Toughness":8,"Structure":43,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":4},{"name":"Theler Eklipse","cost":60,"upkeep":5,"bomb_mass":20,"escape":"2/2/2","crash":"-1/-1/-1","stress":"2, 0, 0","DryMP":16,"WetMP":20,"WetMPwBombs":24,"DPEmpty":41,"DPFull":41,"DPwBombs":45,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":7,"Overspeed":26,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":11,"Stabiilty":1,"HandlingEmpty":70,"HandlingFull":66,"HandlingFullwBombs":62,"MaxStrain":20,"Toughness":20,"Structure":104,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Mitscher IG JA-81","cost":26,"upkeep":1,"bomb_mass":10,"escape":"0/0","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":7,"WetMPwBombs":9,"DPEmpty":21,"DPFull":21,"DPwBombs":23,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":12,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":24,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":7,"Stabiilty":0,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":89,"MaxStrain":43,"Toughness":10,"Structure":52,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":2,"RateOfClimbwBombs":1},{"name":"Arntwerke c.10","cost":14,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-2,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":30,"Toughness":6,"Structure":30,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"SAM 99","cost":26,"upkeep":2,"bomb_mass":5,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":22,"MaxSpeedFull":22,"MaxSpeedwBombs":22,"StallSpeedEmpty":8,"StallSpeedFull":10,"StallSpeedFullwBombs":11,"Overspeed":42,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":3,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":95,"MaxStrain":49,"Toughness":11,"Structure":49,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":3,"TurnBleedwBombs":4,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"SAM 1144","cost":60,"upkeep":3,"bomb_mass":10,"escape":"1/1","crash":"-1/-1","stress":"1, 0","DryMP":9,"WetMP":11,"WetMPwBombs":13,"DPEmpty":21,"DPFull":21,"DPwBombs":23,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":18,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":36,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":0,"HandlingEmpty":85,"HandlingFull":83,"HandlingFullwBombs":81,"MaxStrain":39,"Toughness":18,"Structure":64,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":9,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Teicher Mammut","cost":48,"upkeep":6,"bomb_mass":20,"escape":"0/2/2","crash":"-1/-1/-1","stress":"1, 0, 0","DryMP":16,"WetMP":22,"WetMPwBombs":26,"DPEmpty":56,"DPFull":56,"DPwBombs":56,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":5,"Overspeed":29,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":3,"HandlingEmpty":67,"HandlingFull":61,"HandlingFullwBombs":57,"MaxStrain":33,"Toughness":16,"Structure":80,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":17,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Mammut Smuggler Custom","cost":96,"upkeep":7,"bomb_mass":15,"escape":"0/0/0/0","crash":"-1/-1/-1/-1","stress":"2(0), 2(0), 0, 0","DryMP":22,"WetMP":28,"WetMPwBombs":31,"DPEmpty":59,"DPFull":59,"DPwBombs":59,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":7,"Overspeed":29,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":3,"HandlingEmpty":67,"HandlingFull":61,"HandlingFullwBombs":58,"MaxStrain":53,"Toughness":17,"Structure":87,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":17,"ControlStress":3,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Markgraf Totengräber A","cost":40,"upkeep":3,"bomb_mass":0,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":9,"WetMP":11,"WetMPwBombs":11,"DPEmpty":23,"DPFull":23,"DPwBombs":23,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":6,"StallSpeedFull":8,"StallSpeedFullwBombs":8,"Overspeed":28,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":2,"HandlingEmpty":88,"HandlingFull":86,"HandlingFullwBombs":86,"MaxStrain":34,"Toughness":10,"Structure":54,"EnergyLoss":8,"EnergyLosswBombs":9,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Kreuzer Spinnmilbe","cost":41,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"3","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":12,"Stabiilty":-7,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":37,"Toughness":19,"Structure":45,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"KW Dickhäuter","cost":40,"upkeep":3,"bomb_mass":10,"escape":"2","crash":"-1","stress":"1","DryMP":9,"WetMP":11,"WetMPwBombs":13,"DPEmpty":23,"DPFull":23,"DPwBombs":24,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":9,"Overspeed":25,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":91,"HandlingFull":89,"HandlingFullwBombs":87,"MaxStrain":22,"Toughness":9,"Structure":45,"EnergyLoss":8,"EnergyLosswBombs":9,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Mushshak Trainer","cost":20,"upkeep":1,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"2(1), 2(1)","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":22,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":-2,"HandlingEmpty":85,"HandlingFull":84,"HandlingFullwBombs":84,"MaxStrain":22,"Toughness":6,"Structure":34,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":15,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Sonnenjäger Hummel","cost":37,"upkeep":2,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":15,"DPFull":15,"DPwBombs":15,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":5,"Overspeed":34,"BoostEmpty":5,"BoostFull":4,"BoostFullwBombs":4,"Dropoff":7,"Stabiilty":0,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":42,"Toughness":10,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":7,"RateOfClimbwBombs":6},{"name":"Ritter Model ABh Eule","cost":20,"upkeep":1,"bomb_mass":10,"escape":"2","crash":"-1","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":8,"DPEmpty":16,"DPFull":16,"DPwBombs":18,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":6,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":2,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":92,"MaxStrain":21,"Toughness":7,"Structure":37,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Albrecht Kugel","cost":8,"upkeep":0,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"1, 0","DryMP":3,"WetMP":3,"WetMPwBombs":3,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":13,"StallSpeedEmpty":3,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":21,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":-3,"HandlingEmpty":95,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":23,"Toughness":5,"Structure":28,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":4,"RateOfClimbwBombs":4},{"name":"Flugzeugwerft-Neustadt Korsar","cost":22,"upkeep":1,"bomb_mass":5,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":6,"WetMP":7,"WetMPwBombs":8,"DPEmpty":19,"DPFull":19,"DPwBombs":19,"MaxSpeedEmpty":13,"MaxSpeedFull":13,"MaxSpeedwBombs":13,"StallSpeedEmpty":4,"StallSpeedFull":5,"StallSpeedFullwBombs":6,"Overspeed":26,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":7,"Stabiilty":1,"HandlingEmpty":93,"HandlingFull":92,"HandlingFullwBombs":91,"MaxStrain":35,"Toughness":9,"Structure":47,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Kreuzer Zecke","cost":12,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":1,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":98,"MaxStrain":43,"Toughness":9,"Structure":45,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Markgraf Streiter","cost":11,"upkeep":0,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":3,"WetMP":3,"WetMPwBombs":3,"DPEmpty":9,"DPFull":9,"DPwBombs":9,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":4,"StallSpeedFullwBombs":4,"Overspeed":18,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-1,"HandlingEmpty":104,"HandlingFull":104,"HandlingFullwBombs":104,"MaxStrain":27,"Toughness":7,"Structure":38,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":6,"RateOfClimbwBombs":6},{"name":"Mitscher IG B-78","cost":26,"upkeep":1,"bomb_mass":5,"escape":"0/0","crash":"-1/-1","stress":"2, 0","DryMP":5,"WetMP":6,"WetMPwBombs":7,"DPEmpty":21,"DPFull":21,"DPwBombs":22,"MaxSpeedEmpty":12,"MaxSpeedFull":12,"MaxSpeedwBombs":11,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":26,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-5,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":96,"MaxStrain":40,"Toughness":16,"Structure":80,"EnergyLoss":7,"EnergyLosswBombs":8,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Müller Experimental 3","cost":4,"upkeep":0,"bomb_mass":5,"escape":"2","crash":"0","stress":"2","DryMP":2,"WetMP":2,"WetMPwBombs":3,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":10,"MaxSpeedFull":10,"MaxSpeedwBombs":10,"StallSpeedEmpty":3,"StallSpeedFull":3,"StallSpeedFullwBombs":5,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":6,"Stabiilty":0,"HandlingEmpty":100,"HandlingFull":100,"HandlingFullwBombs":99,"MaxStrain":28,"Toughness":5,"Structure":28,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":9,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":5,"RateOfClimbwBombs":3},{"name":"SFW Flitzer","cost":11,"upkeep":0,"bomb_mass":0,"escape":"2","crash":"-1","stress":"2","DryMP":2,"WetMP":2,"WetMPwBombs":2,"DPEmpty":8,"DPFull":8,"DPwBombs":8,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":2,"StallSpeedFull":2,"StallSpeedFullwBombs":2,"Overspeed":16,"BoostEmpty":4,"BoostFull":4,"BoostFullwBombs":4,"Dropoff":8,"Stabiilty":0,"HandlingEmpty":101,"HandlingFull":101,"HandlingFullwBombs":101,"MaxStrain":28,"Toughness":8,"Structure":40,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":11,"RateOfClimbEmpty":11,"RateOfClimbwBombs":11},{"name":"SFW-Rathenau Nimbus","cost":10,"upkeep":0,"bomb_mass":0,"escape":"0","crash":"1","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":18,"DPFull":18,"DPwBombs":18,"MaxSpeedEmpty":9,"MaxSpeedFull":9,"MaxSpeedwBombs":9,"StallSpeedEmpty":2,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":16,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":6,"HandlingEmpty":89,"HandlingFull":88,"HandlingFullwBombs":88,"MaxStrain":46,"Toughness":9,"Structure":46,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":13,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Teicher Fuchs","cost":26,"upkeep":1,"bomb_mass":0,"escape":"1","crash":"-1","stress":"1","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-1,"HandlingEmpty":97,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":30,"Toughness":9,"Structure":48,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Weiss Wrackbarsch","cost":19,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-2","stress":"2","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":14,"MaxSpeedFull":14,"MaxSpeedwBombs":14,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":8,"Stabiilty":-3,"HandlingEmpty":109,"HandlingFull":108,"HandlingFullwBombs":108,"MaxStrain":19,"Toughness":8,"Structure":40,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":5},{"name":"Braun GA 'Gulaschkanone'","cost":20,"upkeep":1,"bomb_mass":0,"escape":"2/2","crash":"-1/-1","stress":"2, 1","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":23,"DPFull":23,"DPwBombs":23,"MaxSpeedEmpty":9,"MaxSpeedFull":9,"MaxSpeedwBombs":9,"StallSpeedEmpty":3,"StallSpeedFull":3,"StallSpeedFullwBombs":3,"Overspeed":20,"BoostEmpty":1,"BoostFull":1,"BoostFullwBombs":1,"Dropoff":5,"Stabiilty":1,"HandlingEmpty":89,"HandlingFull":88,"HandlingFullwBombs":88,"MaxStrain":43,"Toughness":10,"Structure":54,"EnergyLoss":8,"EnergyLosswBombs":9,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"Ritter Model X \"Falke\"","cost":33,"upkeep":2,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":5,"WetMP":7,"WetMPwBombs":7,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":21,"MaxSpeedFull":21,"MaxSpeedwBombs":21,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":23,"BoostEmpty":5,"BoostFull":4,"BoostFullwBombs":4,"Dropoff":12,"Stabiilty":-1,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":43,"Toughness":8,"Structure":43,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":9,"RateOfClimbwBombs":6},{"name":"von Morgen Walküre","cost":46,"upkeep":2,"bomb_mass":5,"escape":"2","crash":"-1","stress":"1","DryMP":7,"WetMP":8,"WetMPwBombs":9,"DPEmpty":15,"DPFull":15,"DPwBombs":15,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":7,"StallSpeedFull":8,"StallSpeedFullwBombs":9,"Overspeed":28,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":2,"HandlingEmpty":95,"HandlingFull":94,"HandlingFullwBombs":93,"MaxStrain":35,"Toughness":26,"Structure":35,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Hugo's Metallisches Jagdflugzeug!","cost":54,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":7,"WetMP":8,"WetMPwBombs":8,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":9,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":36,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":-2,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":50,"Toughness":45,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Sonnenjäger Seitenwinder","cost":30,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-2","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-7,"HandlingEmpty":110,"HandlingFull":109,"HandlingFullwBombs":109,"MaxStrain":36,"Toughness":8,"Structure":43,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Tejas Interceptor","cost":46,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"0","stress":"2","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":22,"MaxSpeedFull":22,"MaxSpeedwBombs":22,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":36,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":6,"Stabiilty":1,"HandlingEmpty":92,"HandlingFull":91,"HandlingFullwBombs":91,"MaxStrain":40,"Toughness":9,"Structure":47,"EnergyLoss":2,"EnergyLosswBombs":3,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":7,"RateOfClimbwBombs":6},{"name":"Sonnenjäger Haifisch","cost":35,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":24,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":10,"Stabiilty":0,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":40,"Toughness":11,"Structure":55,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"Albrecht Pfeil","cost":43,"upkeep":1,"bomb_mass":0,"escape":"2/2","crash":"0/0","stress":"1, 0","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":11,"DPFull":11,"DPwBombs":11,"MaxSpeedEmpty":20,"MaxSpeedFull":20,"MaxSpeedwBombs":20,"StallSpeedEmpty":5,"StallSpeedFull":6,"StallSpeedFullwBombs":6,"Overspeed":28,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":3,"Dropoff":8,"Stabiilty":1,"HandlingEmpty":89,"HandlingFull":88,"HandlingFullwBombs":88,"MaxStrain":34,"Toughness":24,"Structure":72,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":6,"RateOfClimbwBombs":5},{"name":"Teicher Sperber 8N-A","cost":19,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"3","DryMP":4,"WetMP":5,"WetMPwBombs":5,"DPEmpty":9,"DPFull":9,"DPwBombs":9,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":19,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-5,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":27,"Toughness":8,"Structure":40,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"Markgraf Todesbote C","cost":38,"upkeep":3,"bomb_mass":10,"escape":"2/2","crash":"1/1","stress":"2, 0","DryMP":8,"WetMP":12,"WetMPwBombs":14,"DPEmpty":25,"DPFull":25,"DPwBombs":27,"MaxSpeedEmpty":17,"MaxSpeedFull":17,"MaxSpeedwBombs":17,"StallSpeedEmpty":4,"StallSpeedFull":6,"StallSpeedFullwBombs":7,"Overspeed":32,"BoostEmpty":4,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":4,"HandlingEmpty":84,"HandlingFull":80,"HandlingFullwBombs":78,"MaxStrain":38,"Toughness":11,"Structure":56,"EnergyLoss":9,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":15,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"von Morgen Pferd","cost":145,"upkeep":10,"bomb_mass":80,"escape":"0/0/0/0/2/2/2","crash":"-1/-1/-1/-1/-1/-1/-1","stress":"4(0), 4(0), 4(0), 0, 0, 0, 0","DryMP":30,"WetMP":40,"WetMPwBombs":56,"DPEmpty":72,"DPFull":72,"DPwBombs":72,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":3,"StallSpeedFull":4,"StallSpeedFullwBombs":6,"Overspeed":25,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":9,"Stabiilty":4,"HandlingEmpty":41,"HandlingFull":31,"HandlingFullwBombs":15,"MaxStrain":32,"Toughness":41,"Structure":205,"EnergyLoss":10,"EnergyLosswBombs":10,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":12,"ControlStress":5,"RumbleStress":0,"RateOfClimbFull":1,"RateOfClimbEmpty":1,"RateOfClimbwBombs":1},{"name":"von Morgen Oger","cost":36,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":12,"DPFull":12,"DPwBombs":12,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":8,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":36,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":2,"HandlingEmpty":94,"HandlingFull":93,"HandlingFullwBombs":93,"MaxStrain":37,"Toughness":10,"Structure":50,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":6,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":4,"RateOfClimbwBombs":4},{"name":"Dryad of Hanriot","cost":17,"upkeep":1,"bomb_mass":0,"escape":"2","crash":"-1","stress":"1","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":10,"DPFull":10,"DPwBombs":10,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":1,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":41,"Toughness":11,"Structure":56,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":6,"RateOfClimbEmpty":8,"RateOfClimbwBombs":6},{"name":"Thorstad S1M2b \"Schreckensgans\"","cost":39,"upkeep":2,"bomb_mass":0,"escape":"0/0","crash":"-1/-1","stress":"1(0), 1(0)","DryMP":7,"WetMP":9,"WetMPwBombs":9,"DPEmpty":17,"DPFull":17,"DPwBombs":17,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":7,"StallSpeedFull":9,"StallSpeedFullwBombs":9,"Overspeed":45,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":5,"Stabiilty":-2,"HandlingEmpty":97,"HandlingFull":95,"HandlingFullwBombs":95,"MaxStrain":40,"Toughness":9,"Structure":45,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":9,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":2,"RateOfClimbEmpty":3,"RateOfClimbwBombs":2},{"name":"Straßenkämpfer","cost":34,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":6,"WetMP":7,"WetMPwBombs":7,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":20,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":97,"MaxStrain":20,"Toughness":33,"Structure":75,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"Marut Raider","cost":30,"upkeep":1,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":4,"WetMP":5,"WetMPwBombs":7,"DPEmpty":12,"DPFull":12,"DPwBombs":14,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":15,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":9,"Overspeed":25,"BoostEmpty":3,"BoostFull":3,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":1,"HandlingEmpty":99,"HandlingFull":98,"HandlingFullwBombs":96,"MaxStrain":28,"Toughness":10,"Structure":50,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":8,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":5,"RateOfClimbEmpty":7,"RateOfClimbwBombs":3},{"name":"DFB Blitzgewitter","cost":49,"upkeep":2,"bomb_mass":0,"escape":"2/2","crash":"-1/-1","stress":"1, 0","DryMP":7,"WetMP":9,"WetMPwBombs":9,"DPEmpty":18,"DPFull":18,"DPwBombs":18,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":25,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":0,"HandlingEmpty":92,"HandlingFull":90,"HandlingFullwBombs":90,"MaxStrain":41,"Toughness":9,"Structure":45,"EnergyLoss":6,"EnergyLosswBombs":7,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3},{"name":"KZ-2 Mangusten","cost":26,"upkeep":1,"bomb_mass":10,"escape":"2/2","crash":"-1/-1","stress":"3, 1","DryMP":6,"WetMP":7,"WetMPwBombs":9,"DPEmpty":15,"DPFull":15,"DPwBombs":16,"MaxSpeedEmpty":15,"MaxSpeedFull":15,"MaxSpeedwBombs":14,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":10,"Overspeed":16,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":1,"Dropoff":9,"Stabiilty":-4,"HandlingEmpty":98,"HandlingFull":97,"HandlingFullwBombs":95,"MaxStrain":24,"Toughness":8,"Structure":42,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":2},{"name":"Rebuilt LM \"Viper\"","cost":19,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"2","DryMP":5,"WetMP":6,"WetMPwBombs":6,"DPEmpty":14,"DPFull":14,"DPwBombs":14,"MaxSpeedEmpty":16,"MaxSpeedFull":16,"MaxSpeedwBombs":16,"StallSpeedEmpty":6,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":24,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":9,"Stabiilty":-5,"HandlingEmpty":101,"HandlingFull":100,"HandlingFullwBombs":100,"MaxStrain":27,"Toughness":8,"Structure":41,"EnergyLoss":5,"EnergyLosswBombs":6,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":6,"ControlStress":2,"RumbleStress":0,"RateOfClimbFull":4,"RateOfClimbEmpty":5,"RateOfClimbwBombs":4},{"name":"Libelle T.87","cost":23,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"0","stress":"1","DryMP":3,"WetMP":4,"WetMPwBombs":4,"DPEmpty":7,"DPFull":7,"DPwBombs":7,"MaxSpeedEmpty":18,"MaxSpeedFull":18,"MaxSpeedwBombs":18,"StallSpeedEmpty":5,"StallSpeedFull":7,"StallSpeedFullwBombs":7,"Overspeed":20,"BoostEmpty":3,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":10,"Stabiilty":-2,"HandlingEmpty":104,"HandlingFull":103,"HandlingFullwBombs":103,"MaxStrain":18,"Toughness":6,"Structure":30,"EnergyLoss":3,"EnergyLosswBombs":4,"TurnBleed":1,"TurnBleedwBombs":2,"FuelUses":7,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":9,"RateOfClimbEmpty":12,"RateOfClimbwBombs":9},{"name":"Mauss Z-95 Phönix","cost":44,"upkeep":1,"bomb_mass":0,"escape":"0","crash":"-1","stress":"0","DryMP":7,"WetMP":9,"WetMPwBombs":9,"DPEmpty":13,"DPFull":13,"DPwBombs":13,"MaxSpeedEmpty":19,"MaxSpeedFull":19,"MaxSpeedwBombs":19,"StallSpeedEmpty":8,"StallSpeedFull":10,"StallSpeedFullwBombs":10,"Overspeed":40,"BoostEmpty":2,"BoostFull":2,"BoostFullwBombs":2,"Dropoff":7,"Stabiilty":2,"HandlingEmpty":98,"HandlingFull":96,"HandlingFullwBombs":96,"MaxStrain":31,"Toughness":15,"Structure":37,"EnergyLoss":4,"EnergyLosswBombs":5,"TurnBleed":2,"TurnBleedwBombs":3,"FuelUses":11,"ControlStress":1,"RumbleStress":0,"RateOfClimbFull":3,"RateOfClimbEmpty":4,"RateOfClimbwBombs":3}]`),s=new Ut(ke,!1),i=0,a=0;for(let m=0;m{(function(t={}){Ae(),removeEventListener("click",ye),Re&&Re(),Re=void 0,xe=void 0,Ge=t.getElement||Ee,Fe=t.scrollIntoView||Me,xe=new MutationObserver(we),addEventListener("click",ye),Re=void 0,fe()})(),setTimeout((()=>{window.onscroll=function(t,e){let s;return function(){clearTimeout(s),s=setTimeout(t,250)}}(He)}),1e3)}));var c=document.getElementsByClassName("collapsible");for(let t=0;tdocument.getElementById(t).offsetTop))break;s=t}We!=s&&(We=s,window.history.replaceState(null,null,"index.html#"+s))}})(); \ No newline at end of file diff --git a/Test/src/impl/Engine.ts b/Test/src/impl/Engine.ts index af0c653..9518d37 100644 --- a/Test/src/impl/Engine.ts +++ b/Test/src/impl/Engine.ts @@ -394,7 +394,7 @@ export class Engine extends Part { if (this.NeedCooling()) { this.cooling_count = Math.max(1, this.cooling_count); } - this.cooling_count = Math.min(this.etype_stats.stats.cooling, this.cooling_count); + this.cooling_count = Math.min(this.GetMaxCooling(), this.cooling_count); this.CalculateStats(); }